query_id
stringlengths
32
32
query
stringlengths
7
29.6k
positive_passages
listlengths
1
1
negative_passages
listlengths
88
101
47bb48ef68b6931f3ecb3fd858c9c201
message validator cant be blank (done in the JS because the tet input box is a text area)
[ { "docid": "71f7c7e1ad03bd917a408228a30ec3ff", "score": "0.77812755", "text": "function messageValidator(){\n let userMessage = document.getElementById(\"userMessage\").value;\n if(userMessage == \"\"){\n validFormMessage = false;\n errorMessage+=\"-Message field must not be empty \\n\"\n // alert(\"Message field must not be empty\");\n }\n else{\n validFormMessage = true;\n }\n}", "title": "" } ]
[ { "docid": "3db16571cbe0a1dda314db0f9edc06bf", "score": "0.76774174", "text": "function isMessageValid() {\n return $message.val().length > 0;\n }", "title": "" }, { "docid": "0ace65b523e4fee6ec2266c7f2d78f58", "score": "0.7569094", "text": "function messageValidate(message) {\r\n var messageValue = document.getElementById('contact-message').value;\r\n var messageRegex = /^[A-Za-z0-9,\\.\\!\\?\\$ ]+$/.test(messageValue);\r\n var inputErr = document.getElementsByTagName('textarea')[0];\r\n\r\n if (messageValue == null || messageValue == \"\") {\r\n document.getElementById('message-err').innerHTML = \"This field is required.\";\r\n inputErr.setAttribute('class', 'input-err');\r\n document.getElementById('message-err').style.display = 'block';\r\n return false;\r\n } else if (!messageRegex) {\r\n document.getElementById('message-err').innerHTML = \"No special characters.\";\r\n inputErr.setAttribute('class', 'input-err');\r\n document.getElementById('message-err').style.display = 'block';\r\n return false;\r\n } else if (messageRegex) {\r\n var inputValid = document.getElementsByTagName('textarea')[0]\r\n inputValid.setAttribute('class', 'input-valid');\r\n document.getElementById('message-err').style.display = 'none';\r\n return true;\r\n }\r\n }", "title": "" }, { "docid": "1805eeef63ac2ffc98e800b1b1a7f920", "score": "0.7335387", "text": "function checkMessage() {\r\n if (message.value.length < 20) {\r\n message.className = \"textarea-error\";\r\n document.getElementById(\"messageError\").style.display = \"block\";\r\n submit.setAttribute('disabled', 'disabled');\r\n }\r\n else {\r\n message.className = \"normal\";\r\n document.getElementById(\"messageError\").style.display = \"none\";\r\n submit.removeAttribute('disabled');\r\n }\r\n}", "title": "" }, { "docid": "f8cd74ae946a15b97092b7f8733ff3f6", "score": "0.73062074", "text": "function validateMessage() {\r\n\t\tif(message.val().length < 20) {\r\n\t\t\tmessageInfo.text(\"Votre message est trop court\");\r\n\t\t\tmessageInfo.removeClass(\"ok\");\r\n\t\t\tmessageInfo.addClass(\"error\");\r\n\t\t\tmessage.removeClass(\"ok\");\r\n\t\t\tmessage.addClass(\"error\");\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\tmessageInfo.text(\"Message accepté\");\r\n\t\t\tmessageInfo.removeClass(\"error\");\r\n\t\t\tmessageInfo.addClass(\"ok\");\r\n\t\t\tmessage.removeClass(\"error\");\r\n\t\t\tmessage.addClass(\"ok\");\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "8da56fbd6fccda5ae29f16c6e8aa0aef", "score": "0.7249995", "text": "function inputMessage()\r\n{\r\n\tvar title = document.getElementById(\"messsage\").value;\r\n\tif (title == null || title == \"\") {\r\n\t\t//$('#Err_contentUrl').css('display', 'block');\r\n\t\t$('#Err_message').html(\"* Required\");\r\n\t} else {\r\n\t\t//$('#Err_contentUrl').css('display', 'none');\r\n\t\t$('#Err_message').html(\"*\");\r\n\t}\r\n}", "title": "" }, { "docid": "d17e171ba9d5d7c4cc1154cb8b307834", "score": "0.7232127", "text": "function basicValidation(input,messageId){\n let = validationMessage = document.getElementById(messageId);\n if(input.value.trim().length === 0){\n input.classList.remove('is-valid');\n input.classList.add('is-invalid');\n validationMessage.innerText = 'This field can\\'t be empty';\n return false;\n }\n else{\n input.classList.remove('is-invalid');\n input.classList.add('is-valid');\n validationMessage.innerText = '';\n return true;\n }\n}", "title": "" }, { "docid": "5364e849282f4f197b0c282e576df81b", "score": "0.7216107", "text": "function validateMessage() {\n if (msg.value === \"\") {\n msg.classList.add(\"invalid\");\n submitBtn.disabled = true;\n } else {\n msg.classList.remove(\"invalid\");\n checkInput();\n }\n}", "title": "" }, { "docid": "4fc4f814eabd24a1a74d4803e48afc9b", "score": "0.70954865", "text": "function suggestMessage()// this function attractive onblur in textarea\n {\n var validateTextarea = myForm.textMessage.value;\n var spanMessage = document.getElementById('span_message');\n var j = validateTextarea.length; // to get length one by one of user input\n\n if (validateTextarea == \"\")\n {\n spanMessage.innerHTML = \" Message is required\";\n spanMessage.style.color=\"red\";\n }\n else if (j < 20)\n {\n spanMessage.innerHTML = \" Message is at least 20 characters\";\n spanMessage.style.color=\"red\";\n }\n else if ( j > 900)\n {\n spanMessage.innerHTML = \" Message is less than 900 characters\";\n spanMessage.style.color=\"red\";\n }\n else\n {\n spanMessage.innerHTML = \" Message is correct\";\n spanMessage.style.color=\"green\";\n }\n }", "title": "" }, { "docid": "fe523c2d7fc09626b07c4ea85a984e2b", "score": "0.69717413", "text": "function fn_validaCampo(campo, msg) {\r\n if (campo === null || campo === \"\" || $.trim(campo).length === 0) {\r\n return msg + \"<br>\";\r\n }\r\n return \"\";\r\n}", "title": "" }, { "docid": "8f96d656298a010bfbdd5dd72129b4c9", "score": "0.6939168", "text": "function message_verify() {\n if (this.value) {\n mark_valid(this);\n this.placeholder = \"Send yourself a message!\"\n check_all_valid();\n } else {\n mark_invalid(this);\n this.placeholder = \"Don't forget your message!\";\n }\n}", "title": "" }, { "docid": "0b49e11be0e119a19102498d81f701e8", "score": "0.6925836", "text": "function validateMessage(message) {\n if (message.length < 1) {\n // return false (and show error) if input is too short\n document.getElementById(\"message\").style.borderColor = \"red\";\n document.getElementById(\"messageErrorMessage\").innerHTML = \"Please enter a message.\";\n return false;\n }\n // Reset input field to get rid of error messages if valid input is submitted\n document.getElementById(\"message\").style.borderColor = \"gray\";\n document.getElementById(\"messageErrorMessage\").innerHTML = \"\";\n return true;\n}", "title": "" }, { "docid": "76c40f86df1edd3c2077eb1b68bda913", "score": "0.69193655", "text": "function validateMessage() {\n var message=document.getElementById(\"usermessage\");\n if(message.value.length<=250) {\n message.style.border=\"2px solid green\";\n return true;\n } else {\n message.style.border=\"2px solid red\";\n return false;\n }\n}", "title": "" }, { "docid": "c38da7e125cb2d58e55edab6c2306d41", "score": "0.6890927", "text": "function validarEntradaCifradoDSA(){\n\tvar mensaje = \"\";\n\tvar texto = $('#in-txtPlanoDSA').val();\n\tif (texto.length < 1 || texto.length > 20) {\n\t\tmensaje = \"El mensaje claro debe contener entre 1 y 20 caracteres.\";\n\t}\n\treturn mensaje;\n}", "title": "" }, { "docid": "05f2968413e623d2b2502c24b4970b3d", "score": "0.68891984", "text": "function validateMessageBox(){\n\n let message_name = document.querySelector('#messageName');\n let message_box = document.querySelector('#messageText');\n \n if(message_name.value.trim() == \"\" ){\n document.getElementById('errorsMessage').innerHTML = \"please write your name\";\n \n message_name.focus();\n return false;\n } else if(message_box.value.length <= 15 || message_box.value.length >= 200){\n document.getElementById('errorsMessage').innerHTML = \"must be between 15 and 200 charicters\";\n \n message_box.focus();\n return false;\n }else{\n localStorage.setItem(\"messagetext\", message_box.value)\n localStorage.setItem(\"message\", message_name.value);\n return true;\n }\n}", "title": "" }, { "docid": "c5decc33991d2b000921a7da6302178e", "score": "0.6886233", "text": "function validarCampoM() {\n if (id_m.value == \"\" || msg.value == \"\" ) {\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "30ee968346a4ea15a9d710c9646d2013", "score": "0.6874131", "text": "function isValidMsgOnTyping() {\n\t$(\"#message\").keyup(function() {\n\t\tif ( $('#message').val().split(/\\s+/).length >= 3) { \n\t\t\t$(\"#message\").unbind(\"keyup\");\n\t\t\t$('#message_error').addClass('hide');\n\t\t}\n\t});\n}", "title": "" }, { "docid": "53a28f19ae346b573661d96d0b164def", "score": "0.6861972", "text": "function validateMsg() {\n if (document.forms[\"contactForm\"][\"inputMsg\"].value != \"\") {\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "6fbf5e5e0119c590253c38ebb5446e92", "score": "0.68612397", "text": "function blank_validation(id,err_msg,msg){\n // // alert(id);\n // return false;\n var field_val= document.getElementById(id).value;\n if(field_val.trim()==''){\n // document.getElementById(err_msg).innerHTML=msg;\n document.getElementById(id).focus();\n return false;\n }\n else{\n // console.log('err_'+id);\n var get_availability = $('div').hasClass('div_err_msg');\n // console.log(get_availability);\n if(get_availability==true)\n {\n // console.log('err_'+id);\n document.getElementById('err_'+id).innerHTML='';\n }\n \n return true;\n }\n \n }", "title": "" }, { "docid": "dfb30ff3e05895c5396dfef756738f07", "score": "0.68608356", "text": "function checkInput() {\n if (inputSubject.value.trim() !== ''\n &&\n inputSubject.value !== inputSubject.title\n &&\n textareaMessage.value.trim() !== ''\n &&\n regExForMail.test(inputMail.value)) {\n submitMessage.style.backgroundColor = '#66CC66';\n submitMessage.style.cursor = 'pointer';\n submitMessage.disabled = false;\n } else {\n submitMessage.style.backgroundColor = '';\n submitMessage.style.cursor = 'not-allowed';\n submitMessage.disabled = true;\n }\n}", "title": "" }, { "docid": "97d5a298bbb7265902ab0379c49f279c", "score": "0.6817863", "text": "function validateMBox() {\n\tvar textInput = document.getElementById(\"messageText\");\n\tvar errorDiv = document.getElementById(\"errorMsg\");\n\tvar mBoxCheck = /^[A-Za-z0-9!@#$%^&*()_ ]{1,250}$/; \n\ttry {\n\t\tif (mBoxCheck.test(textInput.value) === false) {\n\t\t\tthrow \"Please enter proper message.\"; \n\t\t}\n\t\ttextInput.style.background = \"\";\n\t\terrorDiv.innerHTML = \"\";\n errorDiv.style.display = \"none\";\n\t}\n\tcatch(msg) {\n\t\t//display error message\n errorDiv.innerHTML = msg;\n errorDiv.style.display = \"block\";\n //change input style\n textInput.style.background = \"rgb(255,165,165)\";\n\t}\n}", "title": "" }, { "docid": "f8796c47e612a02e2cdbee38ae1d0f53", "score": "0.68075407", "text": "function valida_senha(String) {\r\n\tvar mensagem = \"As senhas nao conferem!\"\r\n\tvar msg = \"\";\r\n\tif ((String) != document.getElementById('senha2').value) msg = mensagem;\r\n\treturn msg;\r\n}", "title": "" }, { "docid": "c1adcb53680dff5b8bb4e947230924af", "score": "0.67959124", "text": "function validateMessage()\n{\n//variable contactMessage is set by element id contactMessage from the form\n\tvar contactMessage = document.getElementById(\"contactMessage\").value; \n\t//validation for contactMessage\n\tif(contactMessage.length == 0)\n\t{\n\t\tproducePrompt(\"Message is Required\", \"messagePrompt\", \"red\"); \n\t\treturn false; \n\t}\n\tproducePrompt(\"Now press send, you will be contacted shortly. \", \"messagePrompt\", \"green\"); \n\t\treturn true; \n\n}", "title": "" }, { "docid": "98d9d44190ea7f59bfd01ff0b45ca7fc", "score": "0.6788039", "text": "function validate_text_noalert(data,mandatory,errmsg)\n{\n if (mandatory==1 && data.value=='')\n {\n //alert(errmsg);\n //data.focus();\n //data.select();\n return (false);\n }\n\n if (data.value!='' && (data.value.replace(/^\\s+|\\s+$/, '').length<=0) )\n {\n //alert(errmsg);\n //data.focus();\n //data.select();\n return (false);\n }\n return(true);\n}", "title": "" }, { "docid": "b77ecce1219f748dc6db686b86937451", "score": "0.6768351", "text": "function showMessage() // this function attractive with contact button\n {\n var validateUname = myForm.isUname.value;// to get value from the typing of user\n var validateEmail = myForm.isEmail.value;// to get value from the typing of user\n var validateTextarea = myForm.textMessage.value;\n var i = validateUname.length;// to count one by one of user input\n //formular required email in javascript\n var emailCheck =/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i;\n var j = validateTextarea.length; // to get length one by one of user input\n if (validateUname == \"\" || validateEmail == \"\" || validateTextarea == \"\")\n {\n alert(\" Sorry, the field cannot be empty!\");\n }\n else if ( i < 4 || i > 10) // warning for username input type\n {\n alert(\" Sorry, your information is not correct!\");\n }\n else if ( j < 20 || j > 900)// warning for message input type\n {\n alert(\" Sorry, your information is not correct!\");\n }\n else if (!emailCheck.test(validateEmail)) // warning for email valid type\n {\n alert(\" Sorry, your information is not correct!\");\n }\n else\n {\n //the user input is correct\n alert (\"Thanks for your comment for improving our service\");\n }\n }", "title": "" }, { "docid": "c3e7896583285446528d4287293a70f6", "score": "0.6732822", "text": "function validateMessage(message) {\n\n if (message.length < 5){\n \n msg = \"Enter at least 5 words\";\n \n\n } else {\n msg = \"\";\n return true;\n }\n }", "title": "" }, { "docid": "dc47a94d2f310c14944fc07e98824158", "score": "0.6722699", "text": "function validateTextArea() {\n console.log($(this));\n if ($(this).children(\"textarea\")[0].value.length == 0) { // text area is empty\n $(this).children(\"p\")[0].innerHTML = \"Please input valid input\";\n }\n }", "title": "" }, { "docid": "3f7ec0a7fcef45230d057d428940805e", "score": "0.6722243", "text": "function generalValidations(broadCast_name,broadCast_message)\n{\n\tif(broadCast_name=='')\n\t\t{\n\t\t\talert(\"Broadcsat name cannot be empty\");\n\t\t\tdocument.getElementById(\"bname\").focus();\n\t\t\tif(document.getElementById(\"takeOneAction\").value==\"false\")\n\t\t\t\t{\n\t\t\t\t\t$('#takeOneAction').val('');\n\t\t\t\t}\n\t\t}\n\t\tif(broadCast_message==''||broadCast_message==' ')\n\t\t\t{\n\t\t\t\talert(\"Broadcast message cannot be empty\");\n\t\t\t\t\n\t\t\t\tdocument.getElementById(\"textarea\").focus();\n\t\t\t\tif(document.getElementById(\"takeOneAction\").value==\"false\")\n\t\t\t\t\t{\n\t\t\t\t\t\t$('#takeOneAction').val('');\n\t\t\t\t\t}\n\t\t\t}\n}", "title": "" }, { "docid": "f0db131226161fb82ac44aa8cc6221b0", "score": "0.6701509", "text": "function validate_text_no_focus(data,mandatory,errmsg)\n{\n\tif (mandatory==1 && data.value=='')\n\t{\n\t\talert(errmsg);\n\t\treturn (false);\n\t}\n\t\n\tif (data.value!='' && (data.value.replace(/^\\s+|\\s+$/, '').length<=0) )\n\t{\n\t\talert(errmsg);\n\t\treturn (false);\n\t}\n\treturn(true);\n}", "title": "" }, { "docid": "a685ca5f5064be9712c149bfae5a2cfa", "score": "0.6685956", "text": "function checkText(value, error, message)\n {\n //checks is a value is input\n if (value === \"\" || value === null)\n {\n //inserts error from parameter\n error.innerHTML = message;\n //alert (name);\n valid = false;\n }\n\n }", "title": "" }, { "docid": "9300f678f8d90ca3db27860bf6f7ad8d", "score": "0.6673939", "text": "function checkEmpty(fieldName, message) {\n\tif (isNullOrEmpty(document.getElementById(fieldName).value)) {\t\n\t\talert(message);\t\n\t\t//document.getElementById(fieldName).focus();\n\t\treturn false;\n\t}\n\treturn true;\n}", "title": "" }, { "docid": "8532fb6fa21ea4ee5b2d7297df891c35", "score": "0.6612417", "text": "function notEmpty(elemid, helperMsg){\n\telem = document.getElementById(elemid);\n\tif(elem.value.length == 0){\n\t\tdocument.getElementById('msg_error').innerHTML = helperMsg;\n//\t\talert(helperMsg);\n\t\telem.focus(); // set the focus to this input\n\t\treturn false;\n\t}\n\treturn true;\n}", "title": "" }, { "docid": "e2b962fe35840d5438fcef9a3e671494", "score": "0.6602787", "text": "function validateReviewTextbox(){\r\n var reviewID = document.getElementById(\"reviewId\");\r\n var reviewMsg = document.getElementById(\"reviewMessage\");\r\n \r\n if (reviewID.value.length > 0) {\r\n if (reviewID.value.indexOf(' ') === -1) {\r\n reviewMsg.style.color = \"black\";\r\n reviewMsg.innerHTML = \"\";\r\n reviewID.style.border = \"\";\r\n reviewID.style.background = \"\";\r\n return true;\r\n } else {\r\n reviewMsg.style.color = \"red\";\r\n reviewMsg.innerHTML = \"No spaces allowed\";\r\n reviewID.style.border = \"1px solid red\";\r\n }\r\n } else {\r\n reviewMsg.style.color = \"red\";\r\n reviewMsg.innerHTML = \"Field Required\";\r\n reviewID.style.border = \"1px solid red\";\r\n }\r\n \r\n return false; \r\n }", "title": "" }, { "docid": "ab8ef78845ea5a4f54eb28cef618299e", "score": "0.6600218", "text": "function messageValidation(field, classNr) {\n let feedbackMsg = field.value;\n let strLen = feedbackMsg.length;\n if (field.value.trim() === \"\") {\n errorClasses[classNr].innerHTML = \"Please provide some content in feedback form.\";\n field.style.border = \"2px solid red\";\n } else if (strLen < 5 || strLen > 750) {\n errorClasses[classNr].innerHTML = \"Minimum characters: 5. Maximum characters: 750.\";\n field.style.border = \"2px solid red\";\n return false;\n } else {\n errorClasses[classNr].innerHTML = \"\";\n field.style.border = \"2px solid green\";\n return true;\n }\n}", "title": "" }, { "docid": "8e3a131c13d17af9c189ea325d4790e9", "score": "0.6591336", "text": "function validateTextArea(obj, req) {\n\n\tif(req) {\n\n\t\tif(obj.value == \"\") {\n\n\t\t\tobj.style.border = cssAttentionBorder;\n\n\t\t\tobj.style.background = cssAttentionBackground;\n\n\t\t\treturn 'Please specify ' + ucwords(obj.name);\n\n\t\t}\n\n\t}\n\n\tobj.style.border = cssDefaultBorder;\n\n\tobj.style.background = cssDefaultBackground;\n\n\treturn null;\n\n}", "title": "" }, { "docid": "09b04f335b1fc752bdd236e2fa936811", "score": "0.6576631", "text": "function formValidation(){\n\t\"use strict\";\n\tvar reply = document.getElementById(\"answer\").value;\n\tvar warning, str = \" \";\n\tif (reply === \"\"|| reply.length < 5) {\n\t\tstr = \"*This field is required with minimum 5 characters\";\n\t\twarning = document.getElementById(\"warning\");\n\t\twarning.firstChild.nodeValue = str;\n\t\treturn false;\n\t}\n\telse {\n\t\tstr = \" \";\n\t\twarning = document.getElementById(\"warning\");\n\t\twarning.firstChild.nodeValue = str;\n\n\t}\n\treturn true;\t\t\n}", "title": "" }, { "docid": "c909d44e1d065037da7b5e587be375a6", "score": "0.65740716", "text": "function checkMessage() {\n var subject = document.forms['messageForm']['msg-subject'],\n recipients = document.forms['messageForm']['msg-recipients'],\n body = document.forms['messageForm']['msg-body'],\n valid=true,\n check=[subject,recipients,body];\n \n \n // add validation\n for(var i=0;i<check.length;i++)\n {\n if(check[i].value==null||check[i].value==\"\"){\n valid=false;\n check[i].style.backgroundColor=\"red\";\n }\n else{\n check[i].style.backgroundColor=\"white\";\n }\n }\n \n \n if(valid){\n doSend(subject.value, recipients.value, body.value);\n subject.value = \"\";\n recipients.value = \"\";\n body.value = \"\";\n }\n}", "title": "" }, { "docid": "ae2aae9080e99b88025d7195957dc702", "score": "0.65504676", "text": "validateMessageInfo(message)\n {\n if(message.data === undefined || !validator.matches(message.data,/(^[\\p{L}\\s\\d,\\.'-]{2,512}$)/ugi))\n return \"Invalid message data !\";\n \n return \"pass\";\n }", "title": "" }, { "docid": "e59f3f50f2156c64846ca72e9ee73235", "score": "0.6539701", "text": "function isValidUsername() {\n var value_input = document.getElementById(\"username-input\").value;\n if (value_input == \"\") {\n resetMessage(\"username-input-control\", \"success\");\n setMessage(\"username-input-control\", \"error\", \"Must not be empty!\");\n }\n\n if (value_input.length < 8) {\n resetMessage(\"username-input-control\", \"success\");\n setMessage(\"username-input-control\", \"error\", \"Must be at least 8 character!\");\n } else {\n resetMessage(\"username-input-control\", \"error\");\n setMessage(\"username-input-control\", \"success\", \"Great!\");\n }\n}", "title": "" }, { "docid": "5be36583674284728378db83fa48fa2f", "score": "0.6537386", "text": "function MTInput(inputText){\n return (inputText.length == 0)\n}", "title": "" }, { "docid": "4c30d57f9706113f288ced4cd621e574", "score": "0.65293795", "text": "function validateComment() {\n var comment = document.querySelector(\"#textfield textarea\");\n var errorDiv = document.querySelector(\"#textfield .errorMessage\");\n var msgBox = document.getElementById(\"comment\");\n try {\n if (msgBox.value === \"\") {\n comment.style.border = \"3px solid red\";\n comment.style.background = \"rgb(255,233,233)\";\n throw \"Please enter a comment!\"; \n } else {\n errorDiv.style.display = \"none\";\n comment.style.border = \"none\";\n msgBox.style.background = \"white\";\n }\n }\n catch (msg) {\n errorDiv.style.display = \"block\";\n errorDiv.innerHTML = msg;\n formValidity = false;\n }\n}", "title": "" }, { "docid": "b044b27ff595c7dc25bc25d189a80728", "score": "0.6525341", "text": "function textChanged() {\n var text = document.getElementById(\"mailText\").value;\n document.getElementById(\"validationButton\").disabled = true;\n if (text.length > 0) {\n document.getElementById(\"validationButton\").disabled = false;\n }\n}", "title": "" }, { "docid": "208089c82d70cb963f24ba4777349969", "score": "0.6506784", "text": "function notEmpty(elemid, helperMsg){\n\telem = document.getElementById(elemid);\n\tif(elem.value.length == 0){\n//\t\tdocument.getElementById('msg_error').innerHTML += \"<li>\"+helperMsg+\"</li>\";\n\t\t$('<br/><label class=\\'label_error\\'>'+helperMsg+'</label>').insertAfter('#'+elemid);\n\t\tinvalid(elemid);\n\t\telem.focus(); // set the focus to this input\n\t\treturn false;\n\t}\n\telse\n\t{\n\t\tvalid(elemid);\n\t\treturn true;\n\t}\n}", "title": "" }, { "docid": "d407d65c9644b082e6278f1fddb77410", "score": "0.65046793", "text": "function checkValidMessage(message) {\n return (message.length == 0)\n}", "title": "" }, { "docid": "873273db72e6f4904cbc5fa5bc7489a2", "score": "0.650157", "text": "_checkBuiltInValidation () {\n if (this.builtInValidationMessage && this.$ && this.$.input && this.$.input.checkValidity) {\n this._editorValidationMsg = this._editingValue === '' && !this.$.input.checkValidity() ? this.builtInValidationMessage : null;\n }\n }", "title": "" }, { "docid": "9496db0c1e742b044f2cffbe789ebec6", "score": "0.6491967", "text": "function validateMissionStateMent(txtID,imageArea,messageArea){\r\n\t\tvar minLength = 200; \r\n\t\tvar flag=\"true\";\r\n\t \r\n if (txtID!=\"\" && txtID.length > minLength){\r\n message=\"Mission Statement should be within\" + minLength + \" characters long. Try again.\"\r\n flag=\"false\"\r\n setMessageForEmprAccountValidation(message,flag,imageArea,messageArea);\r\n editEmployerAccountStatus=false;\r\n }else if(txtID!=\"\" && trimFieldVal(txtID)==\"\"){// check for only spaces allowed in \r\n\t message=\"Please enter Mission StateMent\"\r\n\t flag=\"false\"\r\n\t setMessageForEmprAccountValidation(message,flag,imageArea,messageArea);\r\n\t editEmployerAccountStatus=false;\r\n }else {\r\n message=\"\"\r\n setMessageForEmprAccountValidation(message,flag,imageArea,messageArea);\r\n }\r\n\t\r\n\t\r\n\t}", "title": "" }, { "docid": "c9509c553ccaa0e8be5591c6afac8e2d", "score": "0.6484928", "text": "validate(value) {\n if(value.length === 0) {\n return \"Por favor ingrese un valor\";\n }\n return true; // la validacion paso\n }", "title": "" }, { "docid": "1a39ecf3c00b1aceb942236f7b375269", "score": "0.6479186", "text": "function emptyFilledValidate(fieldBody, alertelement) {\n //?argument list => first:input-text-field $ second : invalid feedback body\n let str = fieldBody.value;\n let addressFeedback = document.getElementById(alertelement);\n let alertMsg;\n if (str == \"\") {\n alertMsg = `<b>*${fieldBody.id} is empty kindly fillout it!</b>`;\n fieldBody.classList.add(\"is-invalid\");\n validAdress = false;\n validCity = false;\n } else {\n validAdress = true;\n validCity = true;\n fieldBody.classList.remove(\"is-invalid\");\n }\n alertelement.innerHTML = alertMsg;\n}", "title": "" }, { "docid": "a6e422c6081b067d6f4db906ba24528f", "score": "0.6477838", "text": "function validationInput (){\n let regexEmail = /^[a-zA-Z0-9._-]+@[a-z0-9._-]{2,}\\.[a-z]{2,4}$/\n if (firstName.value.length === 0){\n alert(\"Merci de renseigner votre prénom.\")\n } else if (lastName.value.length === 0){\n alert(\"Merci de renseigner votre nom\")\n } else if (eMail.value.length === 0 || !regexEmail.test(eMail.value)) {\n alert(\"Merci de renseigner votre adresse mail valide\")\n eMail.style.borderColor = \"red\"\n } else if (address.value.length === 0){\n alert(\"Merci de renseigner une adresse.\")\n } else if (telephoneNumber.value.length === 0){\n alert(\"Merci de renseigner un numéro valide.\")\n } else if (city.value.length === 0){\n alert(\"Merci de renseigner votre ville.\")\n } else if (zip.value.length === 0){\n alert(\"Merci de renseigner un code postal valide.\")\n } else {\n alert(\"Vos informations ont bien été enregistrées. Vous pouvez à présent valider votre commande.\");\n validationButton.classList.remove(\"disabled\");\n send () // si tout est ok on créé un nouveau client et on envoie au serveur\n }\n}", "title": "" }, { "docid": "18bdf515bf7f0d4ae9563d7b37d4527a", "score": "0.6476957", "text": "function checkInput() {\n var val = document.getElementsByClassName('userMovie')[0].value;\n if (val.length == null || val.length == '') {\n // Creating a warning message.\n var newValidContainer = document.getElementsByClassName('validation')[0];\n newValidContainer.style.display = 'block';\n console.log('Warning message created!');\n } else {\n createMovieItem();\n }\n }", "title": "" }, { "docid": "da2b706cb5c5651e976bdc6bbd72865d", "score": "0.64522415", "text": "function validation() {\n\tconst filter = /^([a-zA-Z0-9_\\-\\.]+)@([a-zA-Z0-9_\\-\\.]+)\\.([a-zA-Z]{2,5})$/;\n\tconst filterName = /[a-zA-Z]/\n\n\tif (email.value === '' || message.value === '' || name.value === '') {\n\t\tmodal.style.display = \"none\";\n\t\tSwal.fire({\n\t\t\ttype: 'error',\n\t\t\ttitle: 'Molimo popunite sva polja!',\n\t\t\ttext: 'Molimo Vas, probajte ponovo!',\n\n\t\t})\n\n\t} else if (message.value.length <= 20) {\n\t\tmodal.style.display = \"none\";\n\t\tSwal.fire({\n\t\t\ttype: 'error',\n\t\t\ttitle: 'Molimo da pošaljete poruku sa minimum 20 slova',\n\t\t\ttext: 'Molimo Vas, probajte ponovo!',\n\n\t\t})\n\t} else if (!filter.test(email.value)) {\n\t\tmodal.style.display = \"none\";\n\t\tSwal.fire({\n\t\t\ttype: 'error',\n\t\t\ttitle: 'Pogresan unos email-a',\n\t\t\ttext: 'Molimo Vas, probajte ponovo!',\n\t\t})\n\n\t} else if (!filterName.test(name.value)) {\n\t\tSwal.fire({\n\t\t\ttype: 'error',\n\t\t\ttitle: 'Molimo unesite samo slova',\n\t\t\ttext: 'Molimo Vas, probajte ponovo!',\n\t\t})\n\t} else {\n\t\tmodal.style.display = 'block';\n\t\tdocument.getElementById('showMessage').innerHTML = message.value;\n\t\tdocument.getElementById('showEmail').innerHTML = email.value;\n\t\tdocument.getElementById('showName').innerHTML = name.value;\n\n\t}\n}", "title": "" }, { "docid": "8d83501dcbb9c1a0d2a3f0b5a06e338d", "score": "0.6451909", "text": "validate(message){\n //Check for empty\n if (message.name === \"\" || message.email === \"\" || message.message === \"\"){\n return { success: false, status: \"empty\"};\n }\n //Check for spam words\n else if (this.containsSpamWords(message.message, this.spamWordList)){\n return { success: false, status: \"spam\"};\n }\n else{\n return { success: true};\n }\n }", "title": "" }, { "docid": "bbd574a4a9e68fcd02a1920887f69174", "score": "0.6449278", "text": "function emptyWarning() {\n \n user_warning.innerHTML = validate.required((user.value == \"\")? \"user\" : 0)\n phone_warning.innerHTML = validate.required((phone.value == \"\")? \"phone\" : 0)\n email_warning.innerHTML = validate.required((email.value == \"\")? \"email\" : 0)\n pass_warning.innerHTML = validate.required((pass.value == \"\") ? \"password\" : 0)\n c_pass_warning.innerHTML = validate.required((c_pass.value == \"\") ? \"confirm password\" : 0)\n \n \n \n \n \n }", "title": "" }, { "docid": "9fabf3475995ac5b94d7fabc4096ddeb", "score": "0.643747", "text": "function empty_val(valor, txt) {\n if( valor == null || valor.length == 0 || /^\\s+$/.test(valor) ) {\n $(txt).parent().addClass('has-error');\n $(txt).parent().children(\"span\").text(\"El Campo de Texto esta vacio\").show();\n return false;\n }\n $(txt).parent().removeClass('has-error');\n $(txt).parent().children(\"span\").text(\"\");\n return true;\n}", "title": "" }, { "docid": "ec9f1c91df9a9163188681f850903fcf", "score": "0.6428536", "text": "function validarNome(){\n if(objfnome.value == ''){\n objfnome.style.borderColor = '#f00';\n objfnome.focus();\n botaoCadastrar.disabled = true;\n spanfNome.innerHTML = ' O campo Nome não pode estar vazio';\n }else if(objfnome.value.length < 10){\n objfnome.style.borderColor = '#f00';\n objfnome.focus();\n botaoCadastrar.disabled = true;\n spanfNome.innerHTML = ' Digite seu Nome completo';\n }else{\n botaoCadastrar.disabled = false;\n objfnome.style.borderColor = '#F8F8FF';\n spanfNome.innerHTML = '';\n }\n}", "title": "" }, { "docid": "5548faf2e83fe6faa4394fc62020b93c", "score": "0.6426744", "text": "function check_null(obj, error_message_id, length_min, length_max, error_message_check_length_id) {\n var temp = $(\"#\" + obj);\n if (temp.val() == \"\") {\n $(\"#\" + error_message_id).fadeIn(\"slow\").show();\n temp.focus();\n return false;\n } else {\n if (length_min != null) {\n if (temp.val().length < length_min) {\n $(\"#\" + error_message_check_length_id).fadeIn(\"slow\").show();\n temp.focus();\n return false;\n }\n }\n \n if (length_max != null) {\n if (temp.val().length > length_max) {\n $(\"#\" + error_message_check_length_id).fadeIn(\"slow\").show();\n temp.focus();\n return false;\n }\n }\n return true;\n }\n}", "title": "" }, { "docid": "4435dbe090d172884289d28b0576a48d", "score": "0.6423242", "text": "function showInputMessage(message) {\n var inputError = document.getElementById('input-error');\n if (message === '') {\n inputError.innerHTML = '';\n } else {\n inputError.innerHTML = '(' + message + '...)';\n }\n}", "title": "" }, { "docid": "53d7c972f351b577d96189c6866701b2", "score": "0.6412243", "text": "function validtionCheck() {\n var noticeName=$('#noticeName').val().trim();\n\n\n // description\n\n //Error\n var noticeName_error=$('#noticeName_error');\n\n\n //Msg Error\n var msgError=\"Empty Field\";\n\n if(!noticeName){\n\n if(!noticeName){\n noticeName_error.text(msgError);\n noticeName_error.show();\n }\n\n\n\n\n return false;\n }else{\n\n if(noticeName.length<2){\n noticeName_error.text(\"size must be between 2 and 30\");\n noticeName_error.show();\n return false;\n }else{\n return true;\n }\n }\n}", "title": "" }, { "docid": "c12a1937c84aa4a87f33c86e85aee486", "score": "0.63982403", "text": "function checkInputTextFieldEmpty(element,e){\n initializeTooltipster(element);\n var myfield = $(element).val();\n if(myfield.length == 0){\n $(element).tooltipster('show');\n return true; \n\n }\n else{\n $(element).tooltipster('hide'); \n return false; \n }\n\n }", "title": "" }, { "docid": "71804d31b481b142da929004fa8d97ab", "score": "0.63930565", "text": "function required($id , $msg){\n if($(\"#\"+$id).val().trim() == \"\"){\n notify(\"Error! \"+$msg , \"danger\");\t\n //setTimeout(function() { $(\"#\"+$id).focus(); }, 100);\n $(\"#\"+$id ).addClass(\"border_input_error\");\n $(\"#\"+$id ).focus();\n return false;\n }\n else{\n return true;\t\n }\n}", "title": "" }, { "docid": "9d22e674dfc11703e10462eaca272bba", "score": "0.6380825", "text": "function space_validation(id,err_msg,msg){\n var field_val= document.getElementById(id).value;\n \n if(field_val.indexOf(' ')>0){\n // document.getElementById(err_msg).innerHTML=msg;\n document.getElementById(id).focus();\n return false;\n }\n else{\n var get_availability = $('div').hasClass('div_err_msg');\n // console.log(get_availability);\n if(get_availability==true)\n {\n document.getElementById('err_'+id).innerHTML='';\n }\n return true;\n }\n \n }", "title": "" }, { "docid": "a9b6ade658983e7802f11a425eb5a4f2", "score": "0.6376565", "text": "function validateInputs(){\n let valid = email.value.search('@itesm.mx');\n if (valid < 0) {\n email.style.borderColor = 'red';\n document.getElementsByClassName('invalid-feedback')[0].style.display = 'initial';\n }\n else {\n email.style.borderColor = '#ced4da';\n document.getElementsByClassName('invalid-feedback')[0].style.display = 'none';\n sendObject();\n }\n}", "title": "" }, { "docid": "ab73030227591e0c1ae5cbffe0e6c3f1", "score": "0.6374286", "text": "function validar_nombre_usuario () {\n\t//Validar si la variable esta vacía\n\tvar nombre_usuario = document.getElementById(\"nombre_usuario\").value;\n\tvar mensaje;\n\tif(nombre_usuario == \"\") {\n\t\tmensaje = \"Escriba un nombre de usuario\";\n\t\tdocument.getElementById(\"mensaje_nombre\").style.color = 'rgba(30,119,0,1)';\n\t\treturn document.getElementById(\"mensaje_nombre\").innerHTML = mensaje;\n\t}else {\n\t\tmensaje=\"\";\n\t\tdocument.getElementById(\"mensaje_nombre\").style.color = 'rgba(30,119,0,1)';\n\t\treturn document.getElementById(\"mensaje_nombre\").innerHTML = mensaje;\n\t}\n\t\n}", "title": "" }, { "docid": "180978ff0a96019caee9829c78d069da", "score": "0.63732195", "text": "function fValidaTodo(){\n cMsg = fValElements();\n\n if(cMsg != \"\"){\n fAlert(cMsg);\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "17ae1a5950837834437d3428de307d6d", "score": "0.6368765", "text": "function validarTextArea() {\n var descripcion = document.getElementById(\"descripcion\");\n var warning = document.getElementById(\"advertencia-textArea\");\n if (descripcion.value.length > 300) {\n if (!warning) {\n advertencia(\"Prohibido agregar mas de 300 caracteres\", descripcion, \"advertencia-textArea\");\n }\n return false;\n }\n warning === null || warning === void 0 ? void 0 : warning.remove();\n return true;\n}", "title": "" }, { "docid": "dd63dda0f28a5a1c12dd2acb6d7d609c", "score": "0.63662106", "text": "function validateInput() {\n var emailInput = $.trim($('#eingabe_abo_email').val());\n var pwInput = $.trim($('#eingabe_abo_email_pw').val());\n var pwInputRepeat = $.trim($('#eingabe_abo_email_pw_repeat').val());\n \n var emailInputOK = emailInput.length >= 4 ? true:false;\n var pwInputOK = pwInput.length >= 4 ? true:false;\n var pwRepeatInputOK = pwInputRepeat.length >= 4 ? true:false;\n var passwordsAreEqual = $('#eingabe_abo_email_pw').val() === $('#eingabe_abo_email_pw_repeat').val() ? true:false;\n \n // first we are resetting and hiding all messages\n $('ul.listview.error_email.error.theemail').hide();\n $('#eingabe_abo_email').parent().css('background-color','transparent');\n $('ul.listview.error_email.error.aboexisting').hide();\n $('ul.listview.error_email.error.aboservererror').hide();\n $('ul.listview.error_email.error.pw_value').hide();\n $('#eingabe_abo_email_pw').parent().css('background-color','transparent');\n $('ul.listview.error_email.error.pw_repeat_value').hide();\n $('#eingabe_abo_email_pw_repeat').parent().css('background-color','transparent');\n $('ul.listview.error_email.error.pw').hide();\n \n // check email length\n if(!emailInputOK) {\n $('ul.listview.error_email.error.theemail').show();\n// $('#eingabe_abo_email').parent().css('background-color','red');\n application.alert(application.config.i18n[application.config.language].information_head, application.config.i18n[application.config.language].videomaut.error_abo_email, 'OK', \"videomaut\", function() {});\n return false;\n }\n \n // check pw length\n if(!pwInputOK) {\n $('ul.listview.error_email.error.pw_value').show();\n// $('#eingabe_abo_email_pw').parent().css('background-color','red');\n// $('input#eingabe_abo_email_pw').focus();\n application.alert(application.config.i18n[application.config.language].information_head, application.config.i18n[application.config.language].videomaut.error_abo_pw_value_four, 'OK', \"videomaut\", function() {});\n return false;\n }\n \n // check pw repeat length\n if(!pwRepeatInputOK) {\n \t$('ul.listview.error_email.error.pw_repeat_value').show();\n// \t$('#eingabe_abo_email_pw_repeat').parent().css('background-color','red');\n// \t$('input#eingabe_abo_email_pw_repeat').focus();\n \tapplication.alert(application.config.i18n[application.config.language].information_head, application.config.i18n[application.config.language].videomaut.error_abo_pw_repeat_value, 'OK', \"videomaut\", function() {});\n \treturn false;\n }\n \n // check if pw and pw-repeat values are equal\n\t if (!passwordsAreEqual) {\n\t \t$('ul.listview.error_email.error.pw').show();\n//\t \t$('#eingabe_abo_email_pw').parent().css('background-color','red');\n//\t \t$('#eingabe_abo_email_pw_repeat').parent().css('background-color','red');\n\t \tapplication.alert(application.config.i18n[application.config.language].information_head, application.config.i18n[application.config.language].videomaut.error_abo_pw, 'OK', \"videomaut\", function() {});\n\t \treturn false;\n\t }\n\t \n return true;\n }", "title": "" }, { "docid": "b5de803af77828518ad1f5ba65181018", "score": "0.6365672", "text": "function myFunction()\n {\n/*check input validity*/\n var message=document.getElementById(\"message\").value;\n var checkName = document.getElementById(\"names\").value;\n var checkEmail = document.getElementById(\"email\").value;\n if (checkName == \"\")\n {\n alert(\"Name must be filled out\");\n return false;\n }\n else if (checkEmail == \"\")\n {\n alert(\"Email must be filled out\");\n return false;\n }\n else if (message == \"\")\n {\n alert(\"please write a message\");\n return false;\n }\n else\n {\n alert(checkName+\" we have received your message. Thank you for reaching out to us. \");\n }\n\n\n }", "title": "" }, { "docid": "ae5c3d50f7a71b327cce0ed3a2ddd78b", "score": "0.63638794", "text": "function validarApellidos(){\r\n\tvar mensaje=\"\";\r\n\tvar apell = document.getElementById(\"apellidos\");\r\n\tvar valid = true;\r\n\r\n valid = valid && (apell.value != \"\");\r\n\t\r\n\tif(!valid){\r\n\t\tmensaje = \"Los apellidos no pueden estar vacíos\";\r\n\t}\r\n apell.setCustomValidity(mensaje);\r\n\treturn mensaje;\r\n}", "title": "" }, { "docid": "7f273085f24e10818225fd4def6e07c8", "score": "0.6359782", "text": "function checkEmpty(field){\n\t\n if($(field).val().length > 0){\n $(field).css(\"border\", \"1px solid rgb(11, 243, 116)\");\n $(field + \"Error\").text(\"\").removeClass(\"errorMessage\");\n return true;\n }\n else{ \n $(field).css(\"border\", \"1px solid #ff0000\");\n $(field + \"Error\").text(\"This field cannot be empty !!\").addClass(\"errorMessage\"); \n return false;\n }\n}", "title": "" }, { "docid": "bedf20e78761fb5ef21849f82c92cf00", "score": "0.63570833", "text": "function onblurevt(evt, t) {\n if(t.value == \"\"){\n t.style.backgroundColor = \"pink\";\n document.getElementById(\"usernameError\").innerHTML = \"<div style='color:red;margin-bottom: 20px;'>Please enter username</div>\";\n return false;\n }\n else{\n \n }\n return true;\n }", "title": "" }, { "docid": "33af322ec7ec2435f5b7e70fda2e7f30", "score": "0.6351467", "text": "function validarTextReview() {\n\tvar textReview = reviewMessage.val();\n\tvar validacion = false;\n\n\tif (textReview === null || textReview.length === 0 || textReview === \"\") {\n\t\t$('#errorReview').fadeIn('slow').find('span').text('Ingrese una reseña');\n\t} else {\n\t\tvalidacion = true;\n\t}\n\n\treturn validacion;\n}", "title": "" }, { "docid": "49ccf8d45b74970368ac277e6c4c41c4", "score": "0.63309854", "text": "function createSmsValidations(){\n var statusObj = document.getElementById ('hdStatus');\n if (statusObj)\n {\n if (statusObj.value == 'enabled')\n {\n alert(LANG_LOCALE['30415']);\n return false;\n }\n }\n var txtFieldIdArr = new Array();\n txtFieldIdArr[0] = \"tf1_receiver,\"+LANG_LOCALE['12060'];\n txtFieldIdArr[1] = \"tf1_textMessage,\"+LANG_LOCALE['12199'];\n \n if (txtFieldArrayCheck(txtFieldIdArr) == false) \n return false; \n \n var txtMsgObj = $(\"#tf1_textMessage\");\n if (txtMsgObj && txtMsgObj.val().length > 160)\n {\n alert(LANG_LOCALE['30613']);\n txtMsgObj.focus();\n return false;\n }\n\n \tif (chkPhoneNumber('tf1_receiver') == false) \n return false; \n \n return true;\n}", "title": "" }, { "docid": "45f4d5ec4257d30cfe8ed428f3d9bb2d", "score": "0.6328862", "text": "function controlInputNOM() {\r\n $(\"#erreur-nom\").css(\"display\", \"none\");\r\n if($('#nom').val() == ''){\r\n $(\"#erreur-nom\").css(\"display\", \"block\");\r\n }\r\n}", "title": "" }, { "docid": "4f76bf6928e647d489a66ab0ca0ae190", "score": "0.6320504", "text": "function validate() {\n var name = document.forms[\"formContact\"][\"name\"].value;\n var message = document.forms[\"formContact\"][\"message\"].value;\n \n //Message input should be at least 15 characters\n if(message.length < 15) {\n\t\t alert(\"Your message should be at least 15 characters\");\n\t\t return false;\n }\n //Name input must be equal to 3 characters\n if(name.length < 3) {\n alert(\"First and Last Name must be at least 3 characters in length\");\n return false;\n }\n \n alert(\"Thanks for getting in touch!\");\n \n \n}", "title": "" }, { "docid": "9b603f49a846d77af4bb494ff5ac2e0d", "score": "0.6320296", "text": "function validateText(e) {\n if ($(e).val().trim() != '') {\n return 1;\n }\n else {\n return 0;\n }\n}", "title": "" }, { "docid": "07a22e0f735ca14a0763c7ffaa81b960", "score": "0.6319007", "text": "function checkCommentsForm(){\r\n\t\tif(inputUser.attr(\"value\") && inputMessage.attr(\"value\"))\r\n\t\t\treturn true;\r\n\t\telse\r\n\t\t\treturn false;\r\n\t}", "title": "" }, { "docid": "322a055328ba75562a2588b8ea948f44", "score": "0.63127315", "text": "function eventEditsAreValid() { \n $('#js-error-message').text(\"\");\n if ( $('#eventName').val() == null || $('#eventName').val().length == 0) {\n $('#js-error-message').text(\"Event Name is required\");\n $('#js-error-message').prop(\"hidden\",false); \n }\n return $('#js-error-message').text().length == 0;\n }", "title": "" }, { "docid": "f2974a9bf504b77e0df15cba9226b63a", "score": "0.63047886", "text": "validate(value){\n if(value.length===0){\n return \"Por favor, ingrese un valor\"\n }\n return true;\n }", "title": "" }, { "docid": "32804a306a7b64949e84977eb05629b8", "score": "0.6303441", "text": "function noInputCheck(form, errorText){\n\t\tif(form.val().length === 0){\n\t\t\treturn true;\n\t\t}\n\t}", "title": "" }, { "docid": "e8e017b5b6fae3863351965becc5e9fb", "score": "0.6302643", "text": "function warn_blank_fields(){\n $(\"#blank_email_warning\").empty()\n $(\"#blank_email_warning\").append($('<div/>').css('color', 'red').text('Blank fields are not allowed'));\n}", "title": "" }, { "docid": "0e5de04858cc01c14f17ae8d1907ed5c", "score": "0.62939924", "text": "function mesages_validation(data)\n { alert(\"\")\n\n \n }", "title": "" }, { "docid": "2f58fd970c45c51a0ae61c0227172b1c", "score": "0.6290636", "text": "function special_character_validation(id,err_msg,msg){\n var field_val= document.getElementById(id).value;\n \n var re = /^[a-zA-Z0-9 ]+$/;\n\n if(!re.test(field_val)){\n // document.getElementById(err_msg).innerHTML=msg;\n document.getElementById(id).focus();\n return false;\n }\n else{\n var get_availability = $('div').hasClass('div_err_msg');\n // console.log(get_availability);\n if(get_availability==true)\n {\n document.getElementById('err_'+id).innerHTML='';\n }\n return true;\n }\n \n \n }", "title": "" }, { "docid": "7b789480104c60c2dce25cca108e6106", "score": "0.62895656", "text": "function tweetValidation(data) {\n if (\n data.val().length === 0 ||\n (data.val()[0] === \" \" || data.val()[1] === \" \")\n ) {\n errorDisplay(\"empty\");\n return false;\n } else if (data.val().length > 140) {\n errorDisplay(\"long\");\n return false;\n }\n return true;\n}", "title": "" }, { "docid": "ebae0dceee49be08fbb4b411d2792690", "score": "0.6287446", "text": "function Validation() {\n\t var nom = document.getElementById('Nom').value \n\t var prenom = document.getElementById('Prénom').value \n\t if (nom.length < 5) {\n\t\tdocument.getElementById('error').innerHTML =\"error Nom\"\n\t\t document.getElementById('resultat').innerHTML =\"\"\n\t }\n\t else if (prenom.length < 5) {\n\t document.getElementById('error').innerHTML =\"error Prénom\"\ndocument.getElementById('resultat').innerHTML =\"\"\n\t }\n\t else{document.getElementById('resultat').innerHTML =\"bienvenu\"\n\t document.getElementById('error').innerHTML =\"\"}\n}", "title": "" }, { "docid": "72555848472d048f577adf82ad700897", "score": "0.62871325", "text": "function noticeNameOnChange () {\n var noticeName=$('#noticeName').val().trim();\n //Error\n var noticeName_error=$('#noticeName_error');\n //Error Msg\n var msgError=\"Empty Field\";\n\n if(!noticeName){\n noticeName_error.text(msgError);\n noticeName_error.show();\n }else{\n\n if(noticeName.length<2){\n noticeName_error.text(\"size must be between 2 and 30\");\n noticeName_error.show();\n\n }else{\n noticeName_error.hide();\n }\n }\n\n}", "title": "" }, { "docid": "e72a564d63fb090460f59a9c2c0c9ac8", "score": "0.6286793", "text": "function elmInputFn(e){\n var colorSuccessData = e.srcElement.dataset.materialinputColor || this.colorSuccess;\n var padre = e.srcElement.parentElement;\n var msg = padre.getElementsByTagName(this.tagMsg)[0];\n var txt = e.srcElement.value.length || 0;\n msg.className = this.classOpen;\n\n if (validate(txt)) {\n msg.className = this.classOpen;\n e.srcElement.style.borderBottomColor = colorSuccessData;\n e.srcElement.style.color = colorSuccessData;\n msg.style.color = colorSuccessData;\n //console.log('texto');\n }else{\n //console.log('vacio');\n e.srcElement.style.borderBottomColor = this.colorError;\n msg.style.color = this.colorError;\n e.srcElement.style.color = colorSuccessData;\n msg.className = this.classClose;\n }\n }", "title": "" }, { "docid": "4994d2040cbd20d09198fdc7a3abcfcd", "score": "0.62822217", "text": "function chat_input_received( ) {\n const _chat_in_ = document.getElementById(\"chat-in\");\n\n console.log(_chat_in_.value.length)\n if( _chat_in_.value.length > 0) {\n const _btm_chat_ = document.getElementById(\"btm-chat\");\n _btm_chat_.innerHTML = \"Send\";\n }\n\n}", "title": "" }, { "docid": "e98d63f73790fe2832e0951c30d38e3e", "score": "0.6280066", "text": "function check_vegetable_botanical_name() \n\t\t{ \n\t\t\tvar boname_length = $(\"#vegetable_botanical_name\").val().length;\n\n\t\t\tif(boname_length == \"\" || boname_length == null)\n\t\t\t\t{\n\t\t\t\t\t$(\"#vegetable_botanical_name_error_message\").html(\"Please fill in data into the field\"); \n\t\t\t\t\t$(\"#vegetable_botanical_name_error_message\").show(); \n\t\t\t\t\terror_vegetable_botanical_name = true;\n\t\t\t\t}\n\t\t\t\n\t\t\telse if(boname_length < 2 || boname_length > 40) {\n\t\t\t\t$(\"#vegetable_botanical_name_error_message\").html(\"Should be between 2-40 characters\");\n\t\t\t\t$(\"#vegetable_botanical_name_error_message\").show(); \n\t\t\t\terror_vegetable_botanical_name = true;\n\t\t\t}\n\t\t\t\n\t\t\telse \n\t\t\t{\n\t\t\t\t$(\"#vegetable_botanical_name_error_message\").hide();\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "3650dc6cc57412afe1145b352f06e6e2", "score": "0.6275444", "text": "function isValidMinLengthTextBox(control, strlength, error_message)\n{\n\tif (control.value == null || control.value.length < strlength)\n\t{\n\t\tshowErrorBubble(control, error_message);\n\t\treturn false;\n\t}\n\treturn true;\n}", "title": "" }, { "docid": "5dc6e7d5c6045f2a28fd8f269a5558ba", "score": "0.62731695", "text": "function required() { \n var izenburua = document.getElementById('izenburua').value;\n var data = CKEDITOR.instances.text.getData();\n var hitzGakoak = document.getElementById('hitzGako').value;\n var deskribapena = document.getElementById('deskribapena').value;\n\n if (izenburua.length == 0 || hitzGakoak.length ==0 || data.length ==0 || deskribapena.length == 0){ \n return false; \n } \n return true; \n}", "title": "" }, { "docid": "6fc1a792a09267784c8c52357bb9a08d", "score": "0.6270269", "text": "function isEmpty(msgID, text) {\n if (text === \"\")\n msgID.show();\n else\n msgID.hide();\n}", "title": "" }, { "docid": "18fa9cb88ee6ae7f1d40f15990410ddb", "score": "0.6267654", "text": "function validarCampo() {\r\n \r\n // Se valida la longitud del texto que no este vacio \r\n validarLongitud(this);\r\n\r\n // Validar unicamente el 'email'\r\n if(this.type === 'email') {\r\n validarEmail(this);\r\n }\r\n \r\n\r\n\r\nlet errores = document.querySelectorAll('.error')\r\n\r\nif(email.value !== '' && asunto.value !== '' && mensaje.value !== '' ) {\r\n if(errores.length === 0) {\r\n btnEnviar.disabled = false;\r\n }\r\n}\r\n \r\n}", "title": "" }, { "docid": "fa00ed9c122a960d0ece68ddbb56fb16", "score": "0.62664276", "text": "function validatemessage(messageText, subjectText, minLength, maxLength, ishtml, tForm)\n{\n\t// bypass Safari and Konqueror browsers with Javascript problems\n\tif (is_kon || is_saf || is_webtv)\n\t{\n\t\treturn true;\n\t}\n\n\t// attempt to get a code-stripped version of the text\n\tvar strippedMessage = stripcode(messageText, ishtml, ignorequotechars);\n\n\t// check for completed subject\n\tif (subjectText.length < 1)\n\t{\n\t\talert(vbphrase[\"must_enter_subject\"]);\n\t\treturn false;\n\t}\n\t// check for minimum message length\n\telse if (strippedMessage.length < minLength)\n\t{\n\t\talert(construct_phrase(vbphrase[\"message_too_short\"], minLength));\n\t\treturn false;\n\t}\n\t// everything seems okay\n\telse\n\t{\n\t\treturn true;\n\t}\n}", "title": "" }, { "docid": "4b0f896a9e4520c62d06e1f3e0ff366e", "score": "0.6263689", "text": "function remove_error(){\n if($(\"#email_subscribe\").val().trim()!=\"\"){\n $(\"#subscribe_correct\").css(\"visibility\" , \"hidden\");\n $(\"#subscribe_incorrect\").css(\"visibility\" , \"hidden\");\n }\n }", "title": "" }, { "docid": "9e7cde2d05996b09e9aabcc95dcc13a6", "score": "0.62627935", "text": "function validarCampo () {\n // Se valida la long del texto y que no este vacio\n validarLongitud(this);\n\n // Validar email\n if (this.type === 'email') {\n validarEmail(this);\n }\n\n let errores = document.querySelectorAll('.error');\n\n if (email.value !== '' && asunto.value !== '' && mensaje.value !== '') {\n if (errores.length === 0) {\n btnEnviar.disabled = false;\n }\n }\n}", "title": "" }, { "docid": "28d3c71fdc84e714e3be78827308d672", "score": "0.6255448", "text": "function fieldCheckEmailMessage(fieldID, tR, minL, maxL, required){\n var t = $(\"#\"+fieldID).val();\n t = t.replace(\"`\", \"'\");\n var Pt = /^[_=+\\/~!@#$%^*()[\\]{} \\n\\t0-9A-Za-z;:?,.<>\\'\\'\\\"-]{1,10000}$/i; // '\n if(!required && t == \"\"){\n $(\"#\"+fieldID+\"Error\").html(\"\");\n } else if(t.length < minL || t.length > maxL){\n $(\"#\"+fieldID+\"Error\").html(\"The field must contain \"+minL+\" to \"+maxL+\" characters\");\n tR = false;\n } else if(!Pt.test(t)){\n $(\"#\"+fieldID+\"Error\").html(\"Must be \"+minL+\" to \"+maxL+\" characters, with no especially uncommon characters\");\n tR = false;\n } else {\n $(\"#\"+fieldID+\"Error\").html(\"\");\n }\n return tR;\n}", "title": "" }, { "docid": "54299a063074451b214d42b7c0594e7f", "score": "0.6253506", "text": "function check_vegetable_botanical_name() \n\t\t{ \n\t\t\tvar boname_length = $(\"#update_vegetable_botanical_name\").val().length;\n\n\t\t\tif(boname_length == \"\" || boname_length == null)\n\t\t\t\t{\n\t\t\t\t\t$(\"#update_vegetable_botanical_name_error_message\").html(\"Please fill in data into the field\"); \n\t\t\t\t\t$(\"#update_vegetable_botanical_name_error_message\").show(); \n\t\t\t\t\terror_vegetable_botanical_name = true;\n\t\t\t\t}\n\t\t\t\n\t\t\telse if(boname_length <2 || boname_length > 20) {\n\t\t\t\t$(\"#update_vegetable_botanical_name_error_message\").html(\"Should be between 2-20 characters\");\n\t\t\t\t$(\"#update_vegetable_botanical_name_error_message\").show(); \n\t\t\t\terror_vegetable_botanical_name = true;\n\t\t\t}\n\t\t\t\n\t\t\telse \n\t\t\t{\n\t\t\t\t$(\"#update_vegetable_botanical_name_error_message\").hide();\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "604fd1998415b9cf443231aed1008067", "score": "0.6250754", "text": "function InputFormSetError(elem, elem_box)\n{\n\tvar element = document.getElementById(elem);\n\tvar element_box = document.getElementById(elem_box);\n\t\n\tif(element.value.trim() == \"\")\n\t{\n\t\tif(element_box.className.indexOf(\"has-error\") == -1)\n\t\t{\n\t\t\telement_box.className = element_box.className + \" has-error\";\n\t\t}\n\n\t\treturn false;\n\t}\n\telse\n\t{\n\t\telement_box.className = element_box.className.replace(\"has-error\", \n\t\t\t\"\").replace(\"has-warning\", \"\").replace(\"has-success\", \"\");\n\t\t\n\t\treturn true;\n\t}\t\n}", "title": "" }, { "docid": "864d61f7d293729d8a5f55dac78b2f6a", "score": "0.624266", "text": "function clearErrorMessage() {\n formMessage.removeClass(\"form__message--show\");\n formMessage.text(\"\");\n}", "title": "" }, { "docid": "c069821feee63530e783c9b01ebbca9a", "score": "0.6240874", "text": "function validInputs()\n{\n var empty = [];\n var msg = '';\n\n if ($name.value === '')\n empty.push('Name');\n\n if ($fbpage.value === '') {\n if (empty.length > 0)\n empty.push(', Facebookseite');\n\n else\n empty.push('Facebookseite');\n }\n\n if ($address.value === '')\n {\n if (empty.length > 0)\n empty.push(', Adresse');\n\n else\n empty.push('Adresse');\n }\n\n if (empty.length > 1) {\n msg = 'Die Felder ';\n\n for (var i = 0; i < empty.length; i++)\n {\n msg += empty[i];\n }\n\n msg += ' dürfen nicht leer sein!';\n chayns.dialog.alert('', msg);\n\n return false;\n }\n\n else if (empty.length == 1)\n {\n msg = 'Das Feld ' + empty[0] + ' darf nicht leer sein!';\n chayns.dialog.alert('', msg);\n\n return false;\n }\n\n else\n return true;\n}", "title": "" }, { "docid": "9f97475d310f8376442cba3adc621699", "score": "0.6240496", "text": "function validate_text(data,mandatory,errmsg)\n{\n\tif (mandatory==1 && data.value=='')\n\t{\n\t\talert(errmsg);\n\t\tdata.focus();\n\t\t//data.select();\n\t\treturn (false);\n\t}\n\t\n\tif (data.value!='' && (data.value.replace(/^\\s+|\\s+$/, '').length<=0) )\n\t{\n\t\talert(errmsg);\n\t\tdata.focus();\n\t\t//data.select();\n\t\treturn (false);\n\t}\n\treturn(true);\n}", "title": "" } ]
9d786afb8f1c3c40b8bddc5af168542f
CONCATENATED MODULE: D:/Projects/Wordpress/gutenberg/packages/blocklibrary/buildmodule/archives/edit.js WordPress dependencies
[ { "docid": "612129d51063ddebe8e47728a0ca7917", "score": "0.0", "text": "function ArchivesEdit(_ref) {\n var attributes = _ref.attributes,\n setAttributes = _ref.setAttributes;\n var showPostCounts = attributes.showPostCounts,\n displayAsDropdown = attributes.displayAsDropdown;\n return Object(react[\"createElement\"])(react[\"Fragment\"], null, Object(react[\"createElement\"])(inspector_controls, null, Object(react[\"createElement\"])(panel_body[\"a\" /* default */], {\n title: Object(i18n_build_module[\"__\"])('Archives settings')\n }, Object(react[\"createElement\"])(toggle_control[\"a\" /* default */], {\n label: Object(i18n_build_module[\"__\"])('Display as dropdown'),\n checked: displayAsDropdown,\n onChange: function onChange() {\n return setAttributes({\n displayAsDropdown: !displayAsDropdown\n });\n }\n }), Object(react[\"createElement\"])(toggle_control[\"a\" /* default */], {\n label: Object(i18n_build_module[\"__\"])('Show post counts'),\n checked: showPostCounts,\n onChange: function onChange() {\n return setAttributes({\n showPostCounts: !showPostCounts\n });\n }\n }))), Object(react[\"createElement\"])(build_module_disabled[\"a\" /* default */], null, Object(react[\"createElement\"])(server_side_render_build_module, {\n block: \"core/archives\",\n attributes: attributes\n })));\n}", "title": "" } ]
[ { "docid": "d4020cd2126f49289c1fb1e03265fb68", "score": "0.5732769", "text": "renderSubmodules() { }", "title": "" }, { "docid": "b19e7483d8ad5b8adb10f9132f55c958", "score": "0.55830777", "text": "static insert_require_for(pkg_name){\n let path_prefix = \"\"\n if(this.is_installed(pkg_name, \"add_on\")){\n path_prefix = \"DDE_NPM.folder + \"\n }\n let full_arg = path_prefix + '\"' + pkg_name + '\"'\n let var_name = replace_substrings(pkg_name, \"-\", \"_\")\n let insertion = 'var ' + var_name + ' = require(' + full_arg + \")\\n\"\n Editor.insert(insertion)\n /*this.list(\"add_on\", function(arr){\n let pkg_name_at = pkg_name + \"@\" //because an elt in the array looks like \"[email protected]\" with ist verison nubmer on the end.\n let pkg_name_prefix = \"\"\n for(let str of arr){\n if(str.startsWith(pkg_name_at)){\n pkg_name_prefix = \"DDE_NPM.folder + \"\n break;\n }\n }\n let insertion = 'var ' + pkg_name + ' = require(' + pkg_name_prefix + '\"' + pkg_name + '\")\\n'\n Editor.insert(insertion)\n })*/\n }", "title": "" }, { "docid": "86d48c8cfdcc1b1392f1a4833afe9326", "score": "0.5544563", "text": "function createModule() {\n var module = new Element('div', {\n 'class': 'singlemodule ckbloc',\n 'id': getUniqueid()\n });\n var html = \"<div class=\\\"ckstyle\\\"></div><div class=\\\"moduletable\\\">\"\n +\"<h3>News module</h3>\"\n +getModnewsHTML()\n +\"</div>\";\n var fields = createFields('vertical',1);\n module.set('html',fields+html);\n $('wrapper').adopt(module); // inject the block in the page\n addckfieldsevent(module); // add avents on fields and controls\n fillFields(module, 'module', '', 'news', 'xhtml');\n}", "title": "" }, { "docid": "54282166765a6160a1f7fad359b81222", "score": "0.55103076", "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": "e6ca08dd5b7e597555e4a470414ecc04", "score": "0.5496398", "text": "function Vendor2BuildPlugin() {\n}", "title": "" }, { "docid": "09e436451ea5effd7ad1049078e0cd08", "score": "0.5481617", "text": "function onModuleLoaded(e)\n\t{\n\t\t// -- resolve plugin id\n\t\tif (e.url) var name = e.url;\n\t\telse var name = e.target.src;\n\t\tvar dot = name.lastIndexOf(\".\");\n\t\tvar tail = name.slice(dot);\n\t\tif (tail == \".pexe\") name = name.slice(0,dot) + \".nmf\"; \n\t\tvar id = modules[name];\n\t\tmodules[name] = e.path[0];\n\t\t\n\t\tif (id)\n\t\t{\n\t\t\tvar plug = plugins[id];\n\t\t\tif (!plug.isPNaCl)\t// todo: how to load multiple emscripten modules ?\n\t\t\t\tDAWPlugin.prototype.c_createPlugin = Module.cwrap(\"createPlugin\", \"string\", [\"number\",\"number\",\"number\"]);\n\t\t\tplug.create();\n\t\t\tif (pending[name])\n\t\t\t{\n\t\t\t\tpending[name].forEach(function(plug) { plug.create(); });\n\t\t\t\tpending.splice(pending.indexOf(pending[name]), 1);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "5af54fee181bd9dfbafe977fc6fd7c73", "score": "0.5455054", "text": "async function build() {\n console.time('Packager');\n\n let requires = [];\n let esmExportString = '';\n let cjsExportString = '';\n\n try {\n if (!fs.existsSync(DIST_PATH)) fs.mkdirSync(DIST_PATH);\n fs.writeFileSync(ROLLUP_INPUT_FILE, '');\n fs.writeFileSync(TEST_MODULE_FILE, '');\n\n // All the snippets that are Node.js-based and will break in a browser\n // environment\n const nodeSnippets = fs\n .readFileSync('tag_database', 'utf8')\n .split('\\n')\n .filter(v => v.search(/:.*node/g) !== -1)\n .map(v => v.slice(0, v.indexOf(':')));\n\n const snippets = fs.readdirSync(SNIPPETS_PATH);\n const archivedSnippets = fs\n .readdirSync(SNIPPETS_ARCHIVE_PATH)\n .filter(v => v !== 'README.md');\n\n snippets.forEach(snippet => {\n const rawSnippetString = getRawSnippetString(SNIPPETS_PATH, snippet);\n const snippetName = snippet.replace('.md', '');\n let code = getCode(rawSnippetString);\n if (nodeSnippets.includes(snippetName)) {\n requires.push(code.match(/const.*=.*require\\(([^\\)]*)\\);/g));\n code = code.replace(/const.*=.*require\\(([^\\)]*)\\);/g, '');\n }\n esmExportString += `export ${code}`;\n cjsExportString += code;\n });\n archivedSnippets.forEach(snippet => {\n const rawSnippetString = getRawSnippetString(\n SNIPPETS_ARCHIVE_PATH,\n snippet\n );\n cjsExportString += getCode(rawSnippetString);\n });\n\n requires = [\n ...new Set(\n requires\n .filter(Boolean)\n .map(v =>\n v[0].replace(\n 'require(',\n 'typeof require !== \"undefined\" && require('\n )\n )\n )\n ].join('\\n');\n\n fs.writeFileSync(ROLLUP_INPUT_FILE, `${requires}\\n\\n${esmExportString}`);\n\n const testExports = `module.exports = {${[...snippets, ...archivedSnippets]\n .map(v => v.replace('.md', ''))\n .join(',')}}`;\n\n fs.writeFileSync(\n TEST_MODULE_FILE,\n `${requires}\\n\\n${cjsExportString}\\n\\n${testExports}`\n );\n\n // Check Travis builds - Will skip builds on Travis if not CRON/API\n if (util.isTravisCI() && util.isNotTravisCronOrAPI()) {\n fs.unlink(ROLLUP_INPUT_FILE);\n console.log(\n `${chalk.green(\n 'NOBUILD'\n )} Module build terminated, not a cron job or a custom build!`\n );\n console.timeEnd('Packager');\n process.exit(0);\n }\n\n await doRollup();\n\n // Clean up the temporary input file Rollup used for building the module\n fs.unlink(ROLLUP_INPUT_FILE);\n\n console.log(`${chalk.green('SUCCESS!')} Snippet module built!`);\n console.timeEnd('Packager');\n } catch (err) {\n console.log(`${chalk.red('ERROR!')} During module creation: ${err}`);\n process.exit(1);\n }\n}", "title": "" }, { "docid": "aadb1abe83975b8e42e2ad77ae1db075", "score": "0.5371893", "text": "if (module.workspace?.manager.isWorkspaceDependency(module, ownDepModule)) {\n\t\t\t\t\tlinkedModules.push(ownDepModule)\n\t\t\t\t}", "title": "" }, { "docid": "32c32052a3ead720121cbaec7fa1e7c6", "score": "0.53696436", "text": "function getModuleToBuild() {\n calcTutorFolder();\n listModules();\n try {\n if (process.argv[2] && process.argv[2] === MODULETHIS) {\n if (!modName) {\n console.info(\"Error: command must be run from Root folder of Module.\");\n terminate();\n }\n else {\n let target = lModules.indexOf(modName[0]);\n if (target >= 0) {\n module_name = lModules[target];\n console.log(`Building: ${modName[0]}`);\n generateModuleGUID();\n }\n }\n }\n // If there is just one Module -- build it\n // \n else {\n if (!process.argv[2] || !lModules.includes(process.argv[2])) {\n let queryText = MODULEPROMPT;\n lModules.forEach((element, index) => {\n queryText += (index + 1) + \":\\t\" + element + \"\\n\";\n });\n queryText += \"\\n>\";\n rl.question(queryText, (answer) => {\n let target = parseInt(answer) - 1;\n if (target >= 0 && target < lModules.length) {\n module_name = lModules[target];\n console.log(`\\n\\nBuilding: ${module_name}\\n`);\n generateModuleGUID();\n }\n else {\n console.error(\"\\n\\nInvalid selection!\\n\");\n terminate();\n }\n rl.close();\n });\n }\n else {\n let target = lModules.indexOf(process.argv[2]);\n module_name = lModules[target];\n console.log(`\\n\\nBuilding: ${module_name}\\n`);\n generateModuleGUID();\n }\n }\n }\n catch (err) {\n }\n}", "title": "" }, { "docid": "e8a3048c11302e6ec0ff0d84f032051c", "score": "0.53654546", "text": "function yoZ_GetThatPart(fullpath, part_name, part_path, modules, mod_loco, PError, _log, success) {\n _log(\"Compiling module\", part_name, \"from\", modules.length, \"available components\");\n var tocheck = [part_path];\n var check_count = 0;\n var list = new List(fullpath);\n\n return yoZ_GetNextPart();\n\n function yoZ_GetNextPart() {\n\n if (modules.length < 1) {\n\n return new PError(\"no repos avail, what's you tweaking?\");\n }\n\n if (check_count < tocheck.length) {\n var checking = tocheck[check_count++]; //fullpath\n _log(\"getting\", checking);\n list.add(checking);\n var input = fs.createReadStream(checking);\n readLines(input, white_iverson, yoZ_GetNextPart);\n return;\n }\n //list.parts.shift();\n if (tocheck.length !== list.parts.length) {\n var missing = tocheck.filter(function(x) {\n return !list.has(x)\n });\n return PError(\"ERROR: missing \" + missing.length + \"/\" + tocheck.length + \"\\n\" + missing);\n }\n\n _log(\"-----\" + part_name, \"Part List (\" + tocheck.length + \"/\" + list.parts.length + \")-----\");\n _log(list.parts.join(\" \"));\n\n return success(list, part_name);\n\n }\n\n function white_iverson(data) {\n\n //var rex = new RegExp('[ ,]+');\n var rex = new RegExp(/\\s+/g);\n\n var barrel = data.split(rex); //any white space and tabs\n for (var x = 0; x < barrel.length; x++) {\n var token = barrel[x] + \".v\";\n //_log(token, modules.contains(token) && !list.has(mod_loco[token]))\n if (modules.contains(token) && !list.has(token) && !tocheck.contains(mod_loco[token])) {\n //_log(mod_loco[token]);\n tocheck.push(mod_loco[token]);\n }\n }\n }\n //http://stackoverflow.com/questions/6831918/node-js-read-a-text-file-into-an-array-each-line-an-item-in-the-array\n function readLines(input, func, endfunc) {\n var remaining = '';\n\n input.on('data', function(data) {\n remaining += data;\n var index = remaining.indexOf('\\n');\n var last = 0;\n while (index > -1) {\n var line = remaining.substring(last, index);\n last = index + 1;\n func(line);\n index = remaining.indexOf('\\n', last);\n }\n\n remaining = remaining.substring(last);\n });\n\n input.on('end', function() {\n if (remaining.length > 0) {\n func(remaining);\n }\n endfunc();\n });\n }\n}", "title": "" }, { "docid": "563b370a8f2c01f0de36d46041f49822", "score": "0.5349861", "text": "function buildModule(data){\n\tlet exportobj = {};\n\texportobj.js = js.script;\n\n\t//get our css\n\tconst layoutCSS = css[data.layout];\n\tvar moduleCSS = layoutCSS.general; // will be appended to..\n\n\t//create wrapper\n\tvar gitViewModule = document.createElement('section');\n\tgitViewModule.id = \"gitViewModule\";\n\n\tdata.nodes.forEach(function(node){\n\n\t\t// create the node\n\t\tlet div = document.createElement('div');\n\t\tdiv.innerHTML = node.html;\n\t\tdiv.id = \"gitViewNode\"+ node.index;\n\n\t\t// append the individual node css\n\t\tlet nodestyle = layoutCSS.nodestyles[node.index];\n\t\tmoduleCSS += \"#\"+div.id+\"{\"+nodestyle+\"}\";\n\n\t\t// check to see if we already included the relevant type CSS\n\t\t// this is a switch statement to make it easy to add features\n\t\t// and functionality that I didn't get to during this project,\n\t\t// but had planned to do\n\t\tswitch(node.type){\n\t\t\tcase \"title\": {\n\t\t\t\tif(!moduleCSS.includes(layoutCSS.title)) //its horribly slow to check the string each time, would be better to set a bit field. but meh.\n\t\t\t\t\tmoduleCSS += layoutCSS.title;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"titleDescrip\":{\n\t\t\t\tif(!moduleCSS.includes(layoutCSS.title))\n\t\t\t\t\tmoduleCSS += layoutCSS.title;\n\t\t\t\tif(!moduleCSS.includes(layoutCSS.descrip))\n\t\t\t\t\tmoduleCSS += layoutCSS.descrip;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"file\":{\n\t\t\t\t// add file show event\n\t\t\t\tdiv.classList.add(\"fileDisplay\");\n\n\t\t\t\tif(!moduleCSS.includes(layoutCSS.file))\n\t\t\t\t\tmoduleCSS += layoutCSS.file;\n\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase \"fileList\":{\n\t\t\t\t// should loop through li elements here and add a\n\t\t\t\t// file display class.. but.. meh\n\n\t\t\t\tif(!moduleCSS.includes(layoutCSS.fileList))\n\t\t\t\t\tmoduleCSS += layoutCSS.fileList;\n\n\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t\tcase \"readme\":{\n\t\t\t\tif(!moduleCSS.includes(layoutCSS.readme))\n\t\t\t\t\tmoduleCSS += layoutCSS.readme;\n\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase \"contributions\":{\n\t\t\t\tif(!moduleCSS.includes(layoutCSS.contributions))\n\t\t\t\t\tmoduleCSS += layoutCSS.contributions;\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase \"image\":{\n\t\t\t\tif(!moduleCSS.includes(layoutCSS.image))\n\t\t\t\t\tmoduleCSS += layoutCSS.image;\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase \"info\":{\n\t\t\t\tif(!moduleCSS.includes(layoutCSS.info))\n\t\t\t\t\tmoduleCSS += layoutCSS.info;\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tgitViewModule.appendChild(div);\n\n\t});\n\n\texportobj.html = gitViewModule.outerHTML;\n\texportobj.css = moduleCSS;\n\treturn exportobj;\n}", "title": "" }, { "docid": "45029331bbed588e4fba3abfb5975536", "score": "0.5331448", "text": "function MK_Append_New_Module_Afbeelding(rij_id, mod_id, kolom_id, module_class, module_img, module_slot, module_size, module_url) { jQuery(function ($) {\n\n\t$(\"#rij_\" + rij_id + \" .kolom.kolom_\" + kolom_id + \" .newrij_inner\" ).append(\n\n\t\t'<li id=\"mod_id_'+mod_id+'\" class=\"module_afbeelding module\" type=\"afbeelding\">'+\n\n\t\t\t'<div class=\"mod_titel\">'+\n\n\t\t\t\t//'<div id=\"edit\" class=\"edit\" onclick=\"editModuleTekst('+mod_id+')\"></div>'+\n\n\t\t\t\t//'<div id=\"module_kopieren\" class=\"module_kopieren\" onclick=\"module_kopieren('+mod_id+')\"></div>'+\n\n\t\t\t\t'<div class=\"mod_naam\">Afbeelding module <span>'+mod_id+ '</span></div>'+\n\n\t\t\t\t//'<div id=\"delete\" class=\"delete\" onclick=\"deleteModule('+mod_id+')\"></div>'+\n\n\t\t\t\t'<div class=\"mod_gegevens\" module_class=\"'+module_class+'\" module_img=\"'+module_img+'\" module_slot=\"'+module_slot+'\" module_size=\"'+module_size+'\" module_url=\"'+module_url+'\">'+\n\n\t\t\t\t'</div>'+\n\n\t\t\t'</div>'+\n\n\t\t\t'<div class=\"mod_inner\">'+\n\n\t\t\t\t//'<div class=\"module_preview_afbeelding module_preview\" onclick=\"editModuleTekst('+mod_id+')\"></div>'+\n\n \t\t\t\t//'<div class=\"module_preview_edit\" onclick=\"editModuleTekst('+mod_id+')\">Aanpassen</div>' +\n\n\t\t\t'</div>'+\n\n\t\t'</li>'\n\n\t);\n\n\n\tif(builder_admin == 0 || builder_admin == 1 && module_slot != 1)\n\t{\n\n\t\tif(builder_klant_create == 0 || builder_klant_edit == 0)\n\t\t{\n\t\t\t$('#mod_id_'+mod_id+' .mod_titel').append(\n\n\t\t\t\t'<div id=\"delete\" class=\"delete\" onclick=\"deleteModule('+mod_id+')\"></div>'\n\t\t\t);\n\n\t\t\t$('#mod_id_'+mod_id+' .mod_titel').prepend(\n\n\t\t\t\t'<div id=\"module_kopieren\" class=\"module_kopieren\" onclick=\"module_kopieren('+mod_id+')\"></div>'\n\t\t\t);\n\t\t}\n\n\t\tif(builder_klant_edit == 0)\n\t\t{\n\t\t\t$('#mod_id_'+mod_id+' .mod_titel').prepend(\n\n\t\t\t\t'<div id=\"edit\" class=\"edit\" onclick=\"editModuleTekst('+mod_id+')\"></div>'\n\t\t\t);\n\n\t\t\t$('#mod_id_'+mod_id+' .mod_inner').append(\n\n\t\t\t\t'<div class=\"module_preview_afbeelding module_preview\" onclick=\"editModuleTekst('+mod_id+')\"></div>'+\n\n\t\t\t\t'<div class=\"module_preview_edit\" onclick=\"editModuleTekst('+mod_id+')\">Aanpassen</div>'\n\t\t\t);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$('#mod_id_'+mod_id+' .mod_inner').append(\n\t\t\t\t'<div class=\"module_preview_afbeelding module_preview\"></div>'\n\t\t\t);\n\t\t}\n\n\t\t\n\t}\n\telse\n\t{\n\t\t$('#mod_id_'+mod_id+'').addClass('module_opslot');\n\n\t\t$('#mod_id_'+mod_id+' .mod_inner').append(\n\t\t\t'<div class=\"module_preview_afbeelding module_preview\"></div>'\n\t\t);\n\t}\n\n\t\n\n\tif(module_img != \"\")\n\t{\n\t\tif(string_images != \"\") { string_images += \",\"; }\n\n\t\tstring_images += module_img;\n\n\t\tif(string_images_location != \"\") \n\t\t{ \n\t\t\tstring_images_location += ',#mod_id_'+mod_id+' .module_preview_afbeelding'; \n\t\t}\n\t\telse\n\t\t{\n\t\t\tstring_images_location += '#mod_id_'+mod_id+' .module_preview_afbeelding';\n\t\t}\n\n\t\tif(string_images_type != \"\") { string_images_type += \",\"; }\n\n\t\tstring_images_type += \"afbeelding\";\n\n\t\t// wp.media.attachment(module_img).fetch().then(function (data) {\n\n\t\t// //console.log( wp.media.attachment(module_img).get('url') );\n\n\t\t// //$('#mod_id_'+mod_id+' .module_preview_afbeelding img').css('background-image', 'url('+ wp.media.attachment(module_img).get('url') +')');\n\n\t\t// console.log(module_img);\n\n\t\t// $('#mod_id_'+mod_id+' .module_preview_afbeelding').html( '<img src=\"'+ wp.media.attachment(module_img).get('url') +'\"/>' );\n\n\t\t// });\n\n\t}\n\n}); }", "title": "" }, { "docid": "dd5b0079e61396ec478d2e6f7592b45d", "score": "0.5322892", "text": "function processModule(releaseHome, bundledModule) {\n const bundledAssets = bundledModule.assets;\n const configAssets = util.selectEntries(bundledAssets, assetPath.configHome, '.js');\n const classAssets = util.selectEntries(bundledAssets, assetPath.classHome, '.js');\n const publicAssets = util.selectEntries(bundledAssets, assetPath.publicHome);\n const processingAssets = [\n // collect primary configuration script \n util.unzipText(bundledModule.archive.file, bundledAssets[assetPath.configScript])\n .then(configSource => { bundledModule.configs.unshift(configSource); })\n ];\n // promise to process selected assets\n function processAssets(assets, processor) {\n processingAssets.push(...Object.keys(assets).map(processor));\n }\n // collect secondary configuration script from subdirectory\n processAssets(configAssets, configPath =>\n util.unzipText(bundledModule.archive.file, configAssets[configPath])\n .then(configSource => { bundledModule.configs.push(configSource); })\n );\n // collect class scripts\n processAssets(classAssets, classPath =>\n util.unzipText(bundledModule.archive.file, classAssets[classPath])\n .then(classSource => {\n bundledModule.classes[classPath.replace(util.vseps, '.')] = classSource;\n })\n );\n // copy public assets\n processAssets(publicAssets, publicPath => {\n const input = util.unzipStream(bundledModule.archive.file, publicAssets[publicPath]);\n const outputPath = `${releaseHome}/${bundledModule.ordinal}/${publicPath}`;\n const output = util.openWriteStream(outputPath);\n return util.copy(input, output);\n });\n // minify JavaScript assets\n /*\n processAssets(publicAssets, publicPath => {\n if (publicPath.endsWith('.js') && !publicPath.endsWith('.min.js')) {\n const javaScriptAsset = publicAssets[publicPath];\n return util.unzipText(bundledModule.archive.file, javaScriptAsset)\n .then(scriptSource => {\n const miniSource = uglify.minify(scriptSource, { fromString: true }).code;\n javaScriptAsset.minifiedSize = Buffer.byteLength(miniSource);\n const miniPath = publicPath.replace(/js$/, 'min.js');\n const outputPath = `${releaseHome}/${bundledModule.ordinal}/${miniPath}`;\n return util.copy(util.streamInput(miniSource), util.openWriteStream(outputPath));\n })\n ;\n }\n });\n */\n // datafy small binary assets\n processAssets(publicAssets, publicPath => {\n const extension = path.extname(publicPath).substring(1);\n const publicAsset = publicAssets[publicPath];\n if (datafyExtensions[extension] && publicAsset.uncompressedSize <= datafyLimit) {\n return util.unzipBuffer(bundledModule.archive.file, publicAsset)\n .then(data => { publicAsset.datafied = datafy(extension, data); })\n ;\n }\n });\n // improve info about large graphics assets\n processAssets(publicAssets, publicPath => {\n const extension = path.extname(publicPath).substring(1);\n const publicAsset = publicAssets[publicPath];\n if (graphicsExtensions[extension] && publicAsset.uncompressedSize > datafyLimit) {\n return util.unzipBuffer(bundledModule.archive.file, publicAsset)\n .then(data => {\n const dimensions = imageDimensions(data);\n publicAsset.imageHeight = dimensions.height;\n publicAsset.imageWidth = dimensions.width;\n })\n ;\n }\n });\n // promise to process all assets\n return Promise.all(processingAssets);\n}", "title": "" }, { "docid": "31a7fdd2c25eab067049db81a633ef75", "score": "0.5319747", "text": "function MK_Append_New_Module_lijst(rij_id, mod_id, kolom_id, text, module_class, module_slot) { jQuery(function ($) {\n\n\t$(\"#rij_\" + rij_id + \" .kolom.kolom_\" + kolom_id +\" .newrij_inner\" ).append(\n\n\t\t'<li id=\"mod_id_'+mod_id+'\" class=\"module module_lijst\" type=\"code\">'+\n\n\t\t\t'<div class=\"mod_titel\">'+\n\n\t\t\t\t//'<div id=\"edit\" class=\"edit\" onclick=\"editModuleTekst('+mod_id+')\"></div>'+\n\n\t\t\t\t//'<div id=\"module_kopieren\" class=\"module_kopieren\" onclick=\"module_kopieren('+mod_id+')\"></div>'+\n\n\t\t\t\t'<div class=\"mod_naam\">Code module <span>'+mod_id+ '</span></div>'+\n\n\t\t\t\t//'<div id=\"delete\" class=\"delete\" onclick=\"deleteModule('+mod_id+')\"></div>'+\n\n\t\t\t\t'<div class=\"mod_gegevens\" module_class=\"'+module_class+'\" module_slot=\"'+module_slot+'\"><textarea>'+text+'</textarea></div>'+\n\n\t\t\t'</div>'+\n\n\t\t\t'<div class=\"mod_inner\">'+\n\n\t\t\t\t'<div class=\"module_preview_lijst module_preview\" onclick=\"editModuleTekst('+mod_id+')\">'+text+'</div>' +\n\n\t\t\t\t'<div class=\"module_preview_edit\" onclick=\"editModuleTekst('+mod_id+')\">Aanpassen</div>' +\n\n\t\t\t'</div>'+\n\n\t\t'</li>'\n\n\t);\n\n\n\tif(builder_admin == 0 || builder_admin == 1 && module_slot != 1)\n\t{\n\n\t\tif(builder_klant_create == 0 || builder_klant_edit == 0)\n\t\t{\n\t\t\t$('#mod_id_'+mod_id+' .mod_titel').append(\n\n\t\t\t\t'<div id=\"delete\" class=\"delete\" onclick=\"deleteModule('+mod_id+')\"></div>'\n\t\t\t);\n\n\t\t\t$('#mod_id_'+mod_id+' .mod_titel').prepend(\n\n\t\t\t\t'<div id=\"module_kopieren\" class=\"module_kopieren\" onclick=\"module_kopieren('+mod_id+')\"></div>'\n\t\t\t);\n\t\t}\n\n\t\tif(builder_klant_edit == 0)\n\t\t{\n\t\t\t$('#mod_id_'+mod_id+' .mod_titel').prepend(\n\n\t\t\t\t'<div id=\"edit\" class=\"edit\" onclick=\"editModuleTekst('+mod_id+')\"></div>'\n\t\t\t);\n\n\t\t\t$('#mod_id_'+mod_id+' .mod_inner').append(\n\n\t\t\t\t'<div class=\"module_preview_lijst module_preview\" onclick=\"editModuleTekst('+mod_id+')\">'+text+'</div>' +\n\n\t\t\t\t'<div class=\"module_preview_edit\" onclick=\"editModuleTekst('+mod_id+')\">Aanpassen</div>'\n\t\t\t);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$('#mod_id_'+mod_id+' .mod_inner').append(\n\t\t\t\t'<div class=\"module_preview_lijst module_preview\">'+text+'</div>'\n\t\t\t);\n\t\t}\n\n\t\t\n\t}\n\telse\n\t{\n\t\t$('#mod_id_'+mod_id+'').addClass('module_opslot');\n\n\t\t$('#mod_id_'+mod_id+' .mod_inner').append(\n\t\t\t'<div class=\"module_preview_lijst module_preview\">'+text+'</div>'\n\t\t);\n\t}\n\n\t\n\n}); }", "title": "" }, { "docid": "5569949439856106bc16d9d31ab31ef8", "score": "0.5297982", "text": "getModuleName() {\n return 'uploader';\n }", "title": "" }, { "docid": "8d61e078f195764ced49db05d2fae5f5", "score": "0.52872294", "text": "function buildDeps() {\n // const subsDist = path.join(__dirname, 'node_modules/substance/dist')\n // if (!fs.existsSync(path.join(subsDist,'substance.js')) ||\n // !fs.existsSync(path.join(subsDist, 'substance.cjs.js'))) {\n // b.make('substance')\n // }\n}", "title": "" }, { "docid": "c54fe336fd6b136b2c4308c9c3dc878c", "score": "0.52761835", "text": "test(module, chunks) {\n //Nombre del modulo en el que estamos\n const name = module.nameForConfition && module.nameForConfition();\n //Validando que sea diferente de vendors y este dentro de node_modules\n return (chunk) => chunk.name !== 'vendors' && /[\\\\/]node_modules[\\\\/]/.test(name);\n\n }", "title": "" }, { "docid": "0e8189568c7419a47a2a438b1f133d94", "score": "0.5271397", "text": "function addRSWGuideModule() {\n $( '<section>' )\n .attr( 'class', 'RSWGuide module' )\n .append(\n $( '<h2>' )\n .css( {\n 'margin-top': '0px',\n 'margin-bottom': '10px'\n } )\n \n // Head text for module\n .text( header_text )\n )\n .append(\n $( '<div>' )\n .append(\n $( '<p>' )\n .append(\n $( '<a>' )\n .attr( 'href', mw.util.wikiGetlink(link_pagename) )\n .text( link_description )\n )\n )\n )\n .insertBefore( '.ChatModule' );\n }", "title": "" }, { "docid": "b877f5aa2d8a6554664000682d22bd68", "score": "0.5264498", "text": "function MK_Append_New_Module_Code(rij_id, mod_id, kolom_id, text, module_class, module_slot) { jQuery(function ($) {\n\n\t$(\"#rij_\" + rij_id + \" .kolom.kolom_\" + kolom_id +\" .newrij_inner\" ).append(\n\n\t\t'<li id=\"mod_id_'+mod_id+'\" class=\"module module_code\" type=\"code\">'+\n\n\t\t\t'<div class=\"mod_titel\">'+\n\n\t\t\t\t//'<div id=\"edit\" class=\"edit\" onclick=\"editModuleTekst('+mod_id+')\"></div>'+\n\n\t\t\t\t//'<div id=\"module_kopieren\" class=\"module_kopieren\" onclick=\"module_kopieren('+mod_id+')\"></div>'+\n\n\t\t\t\t'<div class=\"mod_naam\">Code module <span>'+mod_id+ '</span></div>'+\n\n\t\t\t\t//'<div id=\"delete\" class=\"delete\" onclick=\"deleteModule('+mod_id+')\"></div>'+\n\n\t\t\t\t'<div class=\"mod_gegevens\" module_class=\"'+module_class+'\" module_slot=\"'+module_slot+'\"><textarea>'+text+'</textarea> </div>'+\n\n\t\t\t'</div>'+\n\n\t\t\t'<div class=\"mod_inner\">'+\n\n\t\t\t//\t'<div class=\"module_preview_code module_preview\" onclick=\"editModuleTekst('+mod_id+')\"><textarea>'+text+'</textarea></div>'+\n\n\t\t\t//\t'<div class=\"module_preview_edit\" onclick=\"editModuleTekst('+mod_id+')\">Aanpassen</div>' +\n\n\t\t\t'</div>'+\n\n\t\t'</li>'\n\n\t);\n\n\n\tif(builder_admin == 0 || builder_admin == 1 && module_slot != 1)\n\t{\n\n\t\tif(builder_klant_create == 0 || builder_klant_edit == 0)\n\t\t{\n\t\t\t$('#mod_id_'+mod_id+' .mod_titel').append(\n\n\t\t\t\t'<div id=\"delete\" class=\"delete\" onclick=\"deleteModule('+mod_id+')\"></div>'\n\t\t\t);\n\n\t\t\t$('#mod_id_'+mod_id+' .mod_titel').prepend(\n\n\t\t\t\t'<div id=\"module_kopieren\" class=\"module_kopieren\" onclick=\"module_kopieren('+mod_id+')\"></div>'\n\t\t\t);\n\t\t}\n\n\t\tif(builder_klant_edit == 0)\n\t\t{\n\t\t\t$('#mod_id_'+mod_id+' .mod_titel').prepend(\n\n\t\t\t\t'<div id=\"edit\" class=\"edit\" onclick=\"editModuleTekst('+mod_id+')\"></div>'\n\t\t\t);\n\n\t\t\t$('#mod_id_'+mod_id+' .mod_inner').append(\n\n\t\t\t\t'<div class=\"module_preview_code module_preview\" onclick=\"editModuleTekst('+mod_id+')\"><textarea>'+text+'</textarea></div>'+\n\n\t\t\t\t'<div class=\"module_preview_edit\" onclick=\"editModuleTekst('+mod_id+')\">Aanpassen</div>'\n\t\t\t);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$('#mod_id_'+mod_id+' .mod_inner').append(\n\t\t\t\t'<div class=\"module_preview_code module_preview\"><textarea>'+text+'</textarea></div>'\n\t\t\t);\n\t\t}\n\n\t\t\n\t}\n\telse\n\t{\n\t\t$('#mod_id_'+mod_id+'').addClass('module_opslot');\n\n\t\t$('#mod_id_'+mod_id+' .mod_inner').append(\n\t\t\t'<div class=\"module_preview_code module_preview\" ><textarea>'+text+'</textarea></div>'\n\t\t);\n\t}\n\n}); }", "title": "" }, { "docid": "48d6f07fd756bd1fded04b3a06c1d618", "score": "0.5240604", "text": "for (let common: string in bundleConfig.commons) {\n if (alreadyChecked[common + ':' + module.module]) {\n continue;\n }\n\n const commonConfig = this._config.bundles[common];\n const commonBundle = getOrCreate(\n this._pendingBundles,\n common,\n () => new Set(),\n );\n if (\n !Object.keys(commonConfig.contentTypes).length ||\n (module.contentType &&\n commonConfig.contentTypes[module.contentType])\n ) {\n // if it passes the content type check, then we see how often this module\n // appears in other bundles that share this same commons dependency\n const dependedBy = Object.keys(commonConfig.dependedBy);\n const frequency = dependedBy.reduce((prev, next) => {\n const dependentBundle = this._pendingBundles[next];\n return dependentBundle.has(module) ? prev + 1 : prev;\n }, 0);\n // if it appears in these modules above the configured frequency threshold\n // then extract it from these modules into the common bundle\n if (frequency / dependedBy.length >= commonConfig.threshold) {\n commonBundle.add(module);\n for (let dependentBundleName in commonConfig.dependedBy) {\n this._mergeSymbols(dependentBundleName, common, module);\n if (dependentBundleName !== bundleName) {\n this._pendingBundles[dependentBundleName].delete(module);\n } else {\n extracted.push(module);\n }\n }\n }\n break;\n }\n alreadyChecked[common + ':' + module.module] = true;\n }", "title": "" }, { "docid": "9fd48aae6e9a8670f5d6baddff28fbf9", "score": "0.52363855", "text": "function loadSecondChunk(module){\n\treturn new Promise((resolve,reject)=>{\n\t\t//this line ensures cart and co tags are bundled into one file\n\t\trequire.ensure(['./tags/browse.tag','./tags/product.tag'], (require) => {\n\t\t\tswitch(module){\n\t\t\t\tcase 'BROWSE':\n\t\t\t\t\t//till we do this the tag will not be executed\n\t\t\t\t\trequire('./tags/browse.tag');\n\t\t\t\tbreak;\n\t\t\t\tcase 'PRODUCT':\n\t\t\t\t\trequire('./tags/product.tag');\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tresolve();\n\t\t});\n\t});\n}", "title": "" }, { "docid": "87032bec98bbec8a407bdd569c9f4439", "score": "0.5226391", "text": "function load_module()\r\n {\r\n document.addEventListener('d2n_gamebody_reload', function(event) {\r\n if (!D2N.is_on_page_in_city('bank') && !D2N.is_outside()) {\r\n return;\r\n }\r\n\r\n var module = Module.get(\"external_tools_bar\");\r\n JS.wait_for_id(module.container_id, function(node){\r\n\r\n if (module === null || !module.is_enabled()) {\r\n return;\r\n }\r\n\r\n module.actions.refresh();\r\n });\r\n }.bind(this), false);\r\n }", "title": "" }, { "docid": "dd9a83bf5db9006c45f8b9cd60904e96", "score": "0.52070975", "text": "function ls(){throw new Error(\"Dynamic requires are not currently supported by rollup-plugin-commonjs\");}", "title": "" }, { "docid": "a0bcd062739843540ed395bc7c5fdfc3", "score": "0.5198761", "text": "function embeded (schema){\n console.log('got in here');\n var requireStr ='';\n schema.fields.forEach((field) => {\n if(field.type === \"Embed...\")\n requireStr += 'var ' + field.selectedEmbed + ' = require(\"./' + field.selectedEmbed + '\");' + '\\n\\n';\n\n })\n return requireStr;\n}", "title": "" }, { "docid": "61c00ad0f8027bf642f520cdb954c595", "score": "0.5188086", "text": "function packageModule (options, args, callback) {\n\tvar name = makeModuleName(options.moduleid),\n\t\tcopyValues = _.extend(options.manifest, {\n\t\t\tmodulename: name,\n\t\t\tapp: options.main,\n\t\t\tprefix: options.prefix\n\t\t}),\n\t\tskipAPIDocGen = options.apidoc===false,\n\t\tsrcdir = path.join(options.dest,'src'),\n\t\ttemplateDir = path.join(__dirname,'templates'),\n\t\tsrcs = [];\n\n\tutil.copyAndFilterEJS(path.join(templateDir,'module.h'),path.join(srcdir,name+'.h'),copyValues);\n\tutil.copyAndFilterEJS(path.join(templateDir,'module.m'),path.join(srcdir,name+'.m'),copyValues);\n\tutil.copyAndFilterEJS(path.join(templateDir,'module_assets.h'),path.join(srcdir,name+'Assets.h'),copyValues);\n\tutil.copyAndFilterEJS(path.join(templateDir,'module_assets.m'),path.join(srcdir,name+'Assets.m'),copyValues);\n\n\tsrcs.push(path.join(srcdir,name+'.m'));\n\tsrcs.push(path.join(srcdir,name+'Assets.m'));\n\n\tvar libname = options.libname.replace(/^lib/,'').replace(/\\.a$/,'').trim(),\n\t\tlibdir = util.escapePaths(path.resolve(options.dest)),\n\t\tincludedir = util.escapePaths(path.resolve(srcdir)),\n\t\thllib = util.escapePaths(path.join(options.dest,options.libname)),\n\t\tfinallib = util.escapePaths(path.join(options.dest,'lib'+options.moduleid+'.a')),\n\t\tbuildoptions = {\n\t\t\tno_arc: true,\n\t\t\tminVersion: options['min-version'] || '7.0',\n\t\t\tlibname: 'lib'+options.moduleid+'module.a',\n\t\t\tsrcfiles: srcs,\n\t\t\toutdir: options.dest,\n\t\t\tcflags: options.cflags.concat(['-I'+includedir]),\n\t\t\tlinkflags: options.linkflags.concat(['-L'+libdir,'-l'+libname])\n\t\t};\n\n\tbuildlib.compileAndMakeStaticLib(buildoptions,function(err,results){\n\t\tif (err) return callback(err);\n\t\tbuildlib.getXcodeSettings(function(err,settings){\n\t\t\tvar jobs = [],\n\t\t\t\tlibs = [],\n\t\t\t\tremoval = [hllib, path.join(options.dest,buildoptions.libname)];\n\n\t\t\t// we need to merge together the hyperloop generated libs and our module libs\n\t\t\tObject.keys(results.libfiles).forEach(function(key) {\n\t\t\t\tvar lib1 = finallib.replace(/\\.a$/,'-'+key+'.a'),\n\t\t\t\t\tlib2 = util.escapePaths(results.libfiles[key]),\n\t\t\t\t\tlib3 = hllib.replace(/\\.a$/,'-'+key+'.a'),\n\t\t\t\t\tcmd = settings.libtool+' -static -o '+lib1+' '+lib2+' '+lib3;\n\n\t\t\t\tlibs.push(lib1);\n\t\t\t\tremoval.push(lib1);\n\t\t\t\tremoval.push(lib2);\n\t\t\t\tremoval.push(lib3);\n\n\t\t\t\tjobs.push(function(next) {\n\t\t\t\t\tlog.debug(cmd);\n\t\t\t\t\texec(cmd,next);\n\t\t\t\t});\n\t\t\t});\n\n\t\t\t// now recreate the lipo of the merged libraries for all archs\n\t\t\tjobs.push(function(next){\n\t\t\t\tvar cmd = settings.lipo+' -output '+finallib+' -create '+libs.join(' ');\n\t\t\t\tlog.debug(cmd);\n\t\t\t\texec(cmd,next);\n\t\t\t});\n\n\t\t\t// cleanup our temp libs\n\t\t\tremoval.forEach(function(lib){\n\t\t\t\tjobs.push(function(next){\n\t\t\t\t\tlog.debug('removing',lib);\n\t\t\t\t\tfs.unlink(lib,next);\n\t\t\t\t});\n\t\t\t});\n\n\t\t\tasync.series(jobs,function(err,results){\n\t\t\t\tif (err) return callback(err);\n\n\t\t\t\tlog.info('Creating module zip distribution');\n\n\t\t\t\tvar Zipper = require('zipper').Zipper,\n\t\t\t\t\tbasedir = 'modules/iphone/'+options.moduleid+'/'+options.manifest.version+'/',\n\t\t\t\t\tfiles = [],\n\t\t\t\t\tfinalzip = path.join(options.dest,options.moduleid+'-iphone-'+options.manifest.version+'.zip'),\n\t\t\t\t\tzipfile = new Zipper(finalzip),\n\t\t\t\t\ttasks = [];\n\n\t\t\t\tif (fs.existsSync(finalzip)) {\n\t\t\t\t\tfs.unlinkSync(finalzip);\n\t\t\t\t}\n\n\t\t\t\tfunction generateDocumentation(callback) {\n\t\t\t\t\tif (skipAPIDocGen) {\n\t\t\t\t\t\treturn callback();\n\t\t\t\t\t}\n\t\t\t\t\tappc.environ.detect();\n\t\t\t\t\tvar ti_sdk = appc.environ.getSDK('latest'),\n\t\t\t\t\t\troot = process.env.TI_ROOT /* || (ti_sdk && ti_sdk.path)*/, //<-- we don't ship this!\n\t\t\t\t\t\tfn = root && path.join(root,'apidoc','docgen.py');\n\t\t\t\t\tif (fn) {\n\t\t\t\t\t\tvar api_doc_path = path.join(options.src,'..','apidoc'),\n\t\t\t\t\t\t\tapi_build_path = path.join(options.dest,'apidoc');\n\t\t\t\t\t\tif (!fs.existsSync(api_doc_path)) {\n\t\t\t\t\t\t\twrench.mkdirSyncRecursive(api_build_path);\n\t\t\t\t\t\t\tapi_doc_path = path.join(options.src,'..','..','apidoc');\n\t\t\t\t\t\t\tif (!fs.existsSync(api_doc_path)) {\n\t\t\t\t\t\t\t\treturn callback();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvar cmd = fn+' --format=jsca,modulehtml --css=styles.css -o \"'+api_build_path+'\" -e \"'+api_doc_path+'\"';\n\t\t\t\t\t\tlog.info('Running',cmd);\n\t\t\t\t\t\texec(cmd, function(err,stdout,stderr) {\n\t\t\t\t\t\t\tif (err) {\n\t\t\t\t\t\t\t\tlog.fatal(String(stderr));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcallback(api_build_path);\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\tlog.warn(\"Not generating API documentation, make sure $TI_ROOT is setup to SDK source directory\");\n\t\t\t\t\t\tcallback();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tgenerateDocumentation(function(doc_path){\n\t\t\t\t\tvar rd = path.join(options.src,'..');\n\t\t\t\t\tif (doc_path) {\n\t\t\t\t\t\trd = path.join(rd,'build');\n\t\t\t\t\t\twrench.readdirSyncRecursive(doc_path).forEach(function(nf){\n\t\t\t\t\t\t\tvar zfn = path.join(doc_path,nf);\n\t\t\t\t\t\t\tfiles.push([zfn,basedir+path.relative(rd,zfn)]);\n\t\t\t\t\t\t});\n\t\t\t\t\t\trd = path.join(rd,'..');\n\t\t\t\t\t}\n\t\t\t\t\tfiles.push([finallib,basedir+path.basename(finallib)]);\n\n\t\t\t\t\t// directories & files we want to include in the module zip\n\t\t\t\t\t['assets','platform','hooks','manifest','module.xcconfig','timodule.xml','LICENSE','metadata.json', 'documentation', 'example'].forEach(function(fn){\n\t\t\t\t\t\tvar f = path.join(rd,fn);\n\t\t\t\t\t\tif (fs.existsSync(f)) {\n\t\t\t\t\t\t\tif (util.isDirectory(f)) {\n\t\t\t\t\t\t\t\tfilelisting(f).forEach(function(zfn){\n\t\t\t\t\t\t\t\t\tfiles.push([zfn,basedir+path.relative(rd,zfn)]);\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\t//special hack to make sure we indicate this module is a hyperloop module\n\t\t\t\t\t\t\t\tif (fn=='manifest') {\n\t\t\t\t\t\t\t\t\tvar c = fs.readFileSync(f).toString();\n\t\t\t\t\t\t\t\t\tif (c.indexOf('hyperloop: true')===-1) {\n\t\t\t\t\t\t\t\t\t\tc+='\\n# added to indicate hyperloop compiled module\\nhyperloop: true\\n';\n\t\t\t\t\t\t\t\t\t\tfs.writeFileSync(f,c);\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\tfiles.push([f,basedir+path.relative(rd,f)]);\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\t// create a zip task for each file\n\t\t\t\t\tfiles.forEach(function(entry){\n\t\t\t\t\t\ttasks.push(function(callback){\n\t\t\t\t\t\t\tzipfile.addFile(entry[0],entry[1],callback);\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\n\t\t\t\t\t// run the zip tasks\n\t\t\t\t\tasync.series(tasks,function(err){\n\t\t\t\t\t\tif (err) return callback(err);\n\t\t\t\t\t\tlog.info('Created module distribution:',finalzip.yellow.bold);\n\t\t\t\t\t\tcallback();\n\t\t\t\t\t});\n\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t});\n}", "title": "" }, { "docid": "7660ee5c434ec45441a1309e12e11cd2", "score": "0.5165486", "text": "function grabOnlyModuleJavascript(id, widgetDir) {\n\n // Create the js dir under the widget if it does not exist already.\n const widgetJsDir = `${widgetDir}/js/`\n makeTrackedDirectory(widgetJsDir)\n const widgetModuleDir = `${widgetDir}/module`\n makeTrackedDirectory(widgetModuleDir)\n const widgetModuleJsDir = `${widgetDir}/module/js`\n makeTrackedDirectory(widgetModuleJsDir)\n\n // Get the javascript - if any.\n return endPointTransceiver.getWidgetDescriptorJavascriptExtensionInfoById([id]).then(results => {\n\n // Keep track of all the promises, returning them as a single promise at the end.\n const promises = []\n\n results.data.jsFiles && results.data.jsFiles.forEach(jsFile => {\n promises.push(endPointTransceiver.get(jsFile.url).tap(results => {\n\n if (isJavascriptModule(jsFile)) {\n writeFileAndETag(`${widgetModuleJsDir}/${jsFile.name}`, results.data, results.response.headers.etag)\n }\n\n }))\n })\n\n return Promise.all(promises)\n })\n}", "title": "" }, { "docid": "b6045c2f55ab1fd04bef5b851c324b74", "score": "0.5144506", "text": "function Bower() { }", "title": "" }, { "docid": "00d3cdb26fe5d171bf81bb5e89d7a90f", "score": "0.514447", "text": "function modules() {\n // Bootstrap JS\n var bootstrapJS = gulp.src(path.join(NODE_MODULE_PATH, 'bootstrap/dist/js/*'))\n .pipe(gulp.dest(path.join(VENDOR_SRC, 'bootstrap/js')));\n // Bootstrap SCSS\n var bootstrapSCSS = gulp.src(path.join(NODE_MODULE_PATH, 'bootstrap/scss/**/*'))\n .pipe(gulp.dest(path.join(VENDOR_SRC,'bootstrap/scss')));\n // ChartJS\n var chartJS = gulp.src(path.join(NODE_MODULE_PATH, 'chart.js/dist/*.js'))\n .pipe(gulp.dest(path.join(VENDOR_SRC,'chart.js')));\n // dataTables\n var dataTables = gulp.src([\n path.join(NODE_MODULE_PATH, 'datatables.net/js/*.js'),\n path.join(NODE_MODULE_PATH, 'datatables.net-bs4/js/*.js'),\n path.join(NODE_MODULE_PATH, 'datatables.net-bs4/css/*.css')\n ])\n .pipe(gulp.dest(path.join(VENDOR_SRC,'datatables')));\n // Font Awesome\n var fontAwesome = gulp.src(path.join(NODE_MODULE_PATH, '@fortawesome/**/*'))\n .pipe(gulp.dest(path.join(VENDOR_SRC,'')));\n // jQuery Easing\n var jqueryEasing = gulp.src(path.join(NODE_MODULE_PATH, 'jquery.easing/*.js'))\n .pipe(gulp.dest(path.join(VENDOR_SRC,'jquery-easing')));\n // jQuery\n var jquery = gulp.src([\n path.join(NODE_MODULE_PATH, 'jquery/dist/*'),\n '!'+path.join(NODE_MODULE_PATH, 'jquery/dist/core.js')\n ])\n .pipe(gulp.dest(path.join(VENDOR_SRC,'jquery')));\n return merge(bootstrapJS, bootstrapSCSS, chartJS, dataTables, fontAwesome, jquery, jqueryEasing);\n }", "title": "" }, { "docid": "bfee40939ea50cdb5c5c080c884f4d66", "score": "0.51411587", "text": "function AndiModule(moduleVersionNumber, moduleLetter){\n\n\t//Display the module letter in the logo when the module is instantiated\n\tvar moduleName = document.getElementById(\"ANDI508-module-name\");\n\t$(moduleName).attr(\"data-andi508-moduleversion\",moduleLetter+\"ANDI: \"+moduleVersionNumber);\n\tif(moduleLetter == \"f\"){\n\t\t$(moduleName).html(\"&nbsp;\"); //do not display default module letter\n\t\tdocument.getElementById(\"ANDI508-toolName-link\").setAttribute(\"aria-label\", \"andi \"+andiVersionNumber); //using setAttribute because jquery .attr(\"aria-label\") is not recognized by ie7\n\t}\n\telse{\n\t\t$(moduleName).html(moduleLetter);\n\t\tdocument.getElementById(\"ANDI508-toolName-link\").setAttribute(\"aria-label\", moduleLetter+\"andi \"+moduleVersionNumber); //using setAttribute because jquery .attr(\"aria-label\") is not recognized by ie7\n\t\t//Append module's css file. The version number is added to the href string (?v=) so that when the module is updated, the css file is reloaded and not pulled from browser cache\n\t\t$(\"head\").append(\"<link id='andiModuleCss' href='\"+host_url+moduleLetter+\"andi.css?v=\"+moduleVersionNumber+\"' type='text/css' rel='stylesheet' />\");\n\t}\n\n\t//Module Selection Menu Operation\n\t$(\"#ANDI508-moduleMenu\")\n\t\t.on(\"mouseover\",AndiModule.showMenu)\n\t\t.on(\"mouseleave\",AndiModule.hideMenu);\n\t$(\"#ANDI508-moduleMenu button\")\n\t\t.on(\"focusout\",AndiModule.hideMenu)\n\t\t.on(\"focus\",AndiModule.showMenu)\n\t\t.on(\"keydown\",function(event){\n\t\t\tvar keyCode = event.keyCode || event.which;\n\t\t\tswitch(keyCode){\n\t\t\tcase 40: //down\n\t\t\t\t$(this).nextAll().filter(\":visible\").first().focus();\n\t\t\t\tbreak;\n\t\t\tcase 38: //up\n\t\t\t\t$(this).prevAll().filter(\":visible\").first().focus();\n\t\t\t\tbreak;\n\t\t\tcase 27: //esc\n\t\t\t\t$(\"#ANDI508-moduleMenu\").children(\"button\").first().focus();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t});\n\n\t//The module should implement these priveleged methods\n\tthis.analyze = undefined;\n\tthis.results = undefined;\n\n\t//Set Default Module function logic\n\tAndiModule.hoverability = function(event){\n\t\t//check for holding shift key or if element is excluded from inspection for some reason\n\t\tif(!event.shiftKey && !$(this).hasClass(\"ANDI508-exclude-from-inspection\"))\n\t\t\tAndiModule.inspect(this);\n\t};\n\tAndiModule.focusability = function(){\n\t\tandiLaser.eraseLaser();\n\t\tAndiModule.inspect(this);\n\t\tandiResetter.resizeHeights();\n\t};\n\tAndiModule.cleanup = function(){}; //Cleanup does nothing by default\n\n\t//Previous Element Button - modules may overwrite this\n\t//Instantiating a module will reset any overrides\n\t$(\"#ANDI508-button-prevElement\").off(\"click\").click(function(){\n\t\tvar index = parseInt($(\"#ANDI508-testPage .ANDI508-element-active\").attr(\"data-andi508-index\"));\n\t\tif(isNaN(index)) //no active element yet\n\t\t\tindex = 2; //begin at first element (this number will be subtracted in the loop)\n\t\telse if(index == 1)\n\t\t\tindex = testPageData.andiElementIndex + 1; //loop back to last element\n\n\t\t//Find the previous element with data-andi508-index\n\t\t//Skips over elements that have become hidden, removed from DOM, or excluded from inspection for some reason\n\t\tfor(var x=index, prev; x>0; x--){\n\t\t\tprev = $(\"#ANDI508-testPage [data-andi508-index='\"+(x - 1)+\"']\");\n\t\t\tif($(prev).length && $(prev).is(\":visible\") && !$(prev).hasClass(\"ANDI508-exclude-from-inspection\")){\n\t\t\t\tandiFocuser.focusByIndex(x - 1);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t});\n\n\t//Next Element Button - modules may overwrite this\n\t//Instantiating a module will reset any overrides\n\t$(\"#ANDI508-button-nextElement\").off(\"click\").click(function(){\n\t\tvar index = parseInt($(\"#ANDI508-testPage .ANDI508-element-active\").attr(\"data-andi508-index\"));\n\n\t\tif(index == testPageData.andiElementIndex || isNaN(index)) //if active is last or not established yet\n\t\t\tindex = 0; //begin at first element\n\n\t\t//Find the next element with data-andi508-index\n\t\t//Skips over elements that have become hidden, removed from DOM, or excluded from inspection for some reason\n\t\tfor(var x=index, next; x<testPageData.andiElementIndex; x++){\n\t\t\tnext = $(\"#ANDI508-testPage [data-andi508-index='\"+(x + 1)+\"']\");\n\t\t\tif($(next).length && $(next).is(\":visible\") && !$(next).hasClass(\"ANDI508-exclude-from-inspection\")){\n\t\t\t\tandiFocuser.focusByIndex(x + 1);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t});\n}", "title": "" }, { "docid": "7899f76e85452513bc117b06790cbef6", "score": "0.5140166", "text": "getModuleSource(type, targetGLSLVersion) {\n let moduleSource;\n switch (type) {\n case VERTEX_SHADER:\n moduleSource = Object(_transpile_shader__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this.vs || '', targetGLSLVersion, true);\n break;\n case FRAGMENT_SHADER:\n moduleSource = Object(_transpile_shader__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this.fs || '', targetGLSLVersion, false);\n break;\n default:\n Object(_utils__WEBPACK_IMPORTED_MODULE_1__[\"assert\"])(false);\n }\n\n return `\\\n#define MODULE_${this.name.toUpperCase()}\n${moduleSource}\\\n// END MODULE_${this.name}\n\n`;\n }", "title": "" }, { "docid": "636f20fb300217c7fd84ee11d8be19e0", "score": "0.5140152", "text": "function MK_Append_New_Module_bestand(rij_id, mod_id, kolom_id, module_class, module_slot, module_link_titel, module_link_url, module_link_id) { jQuery(function ($) {\n\n\t//console.log('module_link_titel:' + module_link_titel + ':module_link_titel')\n\n\t$(\"#rij_\" + rij_id + \" .kolom.kolom_\" + kolom_id +\" .newrij_inner\" ).append(\n\n\t\t'<li id=\"mod_id_'+mod_id+'\" class=\"module module_bestand\" type=\"bestand\">'+\n\n\t\t\t'<div class=\"mod_titel\">'+\n\n\t\t\t\t//'<div id=\"edit\" class=\"edit\" onclick=\"editModuleTekst('+mod_id+')\"></div>'+\n\n\t\t\t\t//'<div id=\"module_kopieren\" class=\"module_kopieren\" onclick=\"module_kopieren('+mod_id+')\"></div>'+\n\n\t\t\t\t'<div class=\"mod_naam\">Bestand module <span>'+mod_id+ '</span></div>'+\n\n\t\t\t\t//'<div id=\"delete\" class=\"delete\" onclick=\"deleteModule('+mod_id+')\"></div>'+\n\n\t\t\t\t'<div class=\"mod_gegevens\" module_class=\"'+module_class+'\" module_link_url=\"'+module_link_url+'\" module_link_titel=\"'+module_link_titel+'\" module_slot=\"'+module_slot+'\" module_link_id=\"'+module_link_id+'\" ></div>'+\n\n\t\t\t'</div>'+\n\n\t\t\t'<div class=\"mod_inner\">'+\n\n\t\t\t//\t'<div class=\"module_preview_knop module_preview\" onclick=\"editModuleTekst('+mod_id+')\">'+\n\n\t\t\t//\t\tmodule_link_titel + ' : ' + module_link_url +\n\n\t\t\t//\t'</div>' +\n\n\t\t\t//\t'<div class=\"module_preview_edit\" onclick=\"editModuleTekst('+mod_id+')\">Aanpassen</div>' +\n\n\t\t\t'</div>'+\n\n\t\t'</li>'\n\n\t);\n\n\n\n\tif(builder_admin == 0 || builder_admin == 1 && module_slot != 1)\n\t{\n\n\t\tif(builder_klant_create == 0 || builder_klant_edit == 0)\n\t\t{\n\t\t\t$('#mod_id_'+mod_id+' .mod_titel').append(\n\n\t\t\t\t'<div id=\"delete\" class=\"delete\" onclick=\"deleteModule('+mod_id+')\"></div>'\n\t\t\t);\n\n\t\t\t$('#mod_id_'+mod_id+' .mod_titel').prepend(\n\n\t\t\t\t'<div id=\"module_kopieren\" class=\"module_kopieren\" onclick=\"module_kopieren('+mod_id+')\"></div>'\n\t\t\t);\n\t\t}\n\n\t\tif(builder_klant_edit == 0)\n\t\t{\n\t\t\t$('#mod_id_'+mod_id+' .mod_titel').prepend(\n\n\t\t\t\t'<div id=\"edit\" class=\"edit\" onclick=\"editModuleTekst('+mod_id+')\"></div>'\n\t\t\t);\n\n\t\t\t$('#mod_id_'+mod_id+' .mod_inner').append(\n\n\t\t\t\t'<div class=\"module_preview_bestand module_preview\" onclick=\"editModuleTekst('+mod_id+')\">'+\n\n\t\t\t\t\t// module_link_titel + ' : ' + module_link_url +\n\n\t\t\t\t\t'<div class=\"titel\">'+module_link_titel+'</div>' +\n\t\t\t\t\t'<div class=\"url\"></div>' +\n\n\t\t\t\t'</div>' +\n\n\t\t\t\t'<div class=\"module_preview_edit\" onclick=\"editModuleTekst('+mod_id+')\">Aanpassen</div>'\n\t\t\t);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$('#mod_id_'+mod_id+' .mod_inner').append(\n\t\t\t\t'<div class=\"module_preview_bestand module_preview\">'+\n\n\t\t\t\t\t// module_link_titel + ' : ' + module_link_url +\n\n\t\t\t\t\t'<div class=\"titel\">'+module_link_titel+'</div>' +\n\t\t\t\t\t'<div class=\"url\"></div>' +\n\n\t\t\t\t'</div>'\n\t\t\t);\n\t\t}\n\t\t\n\t}\n\telse\n\t{\n\t\t$('#mod_id_'+mod_id+'').addClass('module_opslot');\n\n\t\t$('#mod_id_'+mod_id+' .mod_inner').append(\n\t\t\t'<div class=\"module_preview_bestand module_preview\">'+\n\n\t\t\t\t\t// module_link_titel + ' : ' + module_link_url +\n\n\t\t\t\t\t'<div class=\"titel\">'+module_link_titel+'</div>' +\n\t\t\t\t\t'<div class=\"url\"></div>' +\n\n\t\t\t\t'</div>'\n\t\t);\n\t}\n\n\n\tif(module_link_id != \"\")\n\t{\n\t\tif(string_images != \"\") { string_images += \",\"; }\n\n\t\tstring_images += module_link_id;\n\n\t\tif(string_images_location != \"\") \n\t\t{ \n\t\t\tstring_images_location += ',#mod_id_'+mod_id+' .module_preview_bestand'; \n\t\t}\n\t\telse\n\t\t{\n\t\t\tstring_images_location += '#mod_id_'+mod_id+' .module_preview_bestand';\n\t\t}\n\n\t\tif(string_images_type != \"\") { string_images_type += \",\"; }\n\n\t\tstring_images_type += \"bestand\";\n\n\t}\n\n}); }", "title": "" }, { "docid": "6f7b1e04c49cceceae0fe1426f318ac1", "score": "0.51368886", "text": "function getDescription() {\n\treturn 'A template for writing plug-in scripts.';\n}", "title": "" }, { "docid": "5d23e93f69579fa8e6203f2a6776d869", "score": "0.5122054", "text": "function buildModuleInfoTask() {\n var MarkdownIt = require('markdown-it');\n var markdown = new MarkdownIt({\n highlight: function (str, lang) {\n return prism.highlight(str, prism.languages[lang || 'markup']);\n }\n });\n ['Components', 'Views'].forEach(function (moduleType) {\n listDirectories(paths['src' + moduleType])\n .filter(function (name) {\n return (name.substr(0, 1) !== '_');\n })\n .map(function (name) {\n var srcBasename = paths['src' + moduleType] + name + '/' + name;\n var distBasename = paths['dist' + moduleType] + name + '/' + name;\n var moduleInfo = {\n name: name,\n readme: markdown.render(getFileContents(paths['src' + moduleType] + name + '/README.md')),\n html: highlightCode(getFileContents(distBasename + '.html'), 'markup'),\n scss: highlightCode(getFileContents(srcBasename + '.scss'), 'css')\n };\n fs.writeFileSync(distBasename + '-info.json', JSON.stringify(moduleInfo, null, 4));\n });\n });\n}", "title": "" }, { "docid": "b2639f445af2a275d0a22eedebf956ce", "score": "0.51147974", "text": "processModule(module) {\n if (module.groups) {\n module.groups.forEach(group => this.processGroup(group));\n }\n if (module.subgroups) {\n module.subgroups.forEach(subgroup => {\n let group = module.groups ? module.groups.filter(mod => mod.id === subgroup.groupId)[0] : undefined;\n this.processSubGroup(group, subgroup);\n });\n }\n if (module.contents) {\n module.contents.forEach(content => {\n let group = module.groups ? module.groups.filter(mod => mod.id === content.groupId)[0] : undefined;\n let subgroup = module.subgroups ? module.subgroups.filter(sg => sg.id === content.subgroupId)[0] : undefined;\n this.processContent(group, subgroup, content);\n });\n }\n if (module.environmentVars) {\n Object.keys(module.environmentVars).forEach(env => this.appendEnviromentVars(env, module.environmentVars[env]));\n }\n if (module.preBuildCommands) {\n this.prebuildCommands = this.prebuildCommands.concat(module.preBuildCommands);\n }\n if (module.indexHeadAmends) {\n this.indexHeadAmends = this.indexHeadAmends.concat(module.indexHeadAmends);\n }\n }", "title": "" }, { "docid": "5a60cd615c7cf10edaeac78374f3482c", "score": "0.5111738", "text": "function loadModules()\n{\n Crafty.modules('http://cdn.craftycomponents.com', {\n CraftyBox2d: 'release'\n }, function() {\n console.log(\"loadGame()>>> Modules loaded!\");\n \n initGame();\n });\n}", "title": "" }, { "docid": "9dfc939d5489a7c742175f190aa28760", "score": "0.51061475", "text": "function appendModules(modules) {\n $('.modules-loading').remove();\n modules.forEach(function(module) {\n if (!module.name) { return; }\n var url = 'https://npmjs.org/package/' + module.name;\n var desc = module.description ? ': ' + module.description : '';\n var a = $('<a/>')\n .attr({href: url, target: '_blank', id: module.name})\n .html(module.name)\n .after(desc)\n ;\n if (ul.find('#' + module.name).length < 1) {\n ul.append($('<li/>').append(a));\n }\n });\n // sort module list\n ul.find('li').sort(function(a, b) {\n return ($(b).text()) < ($(a).text());\n }).appendTo(ul);\n }", "title": "" }, { "docid": "75a23ab58a3a7a66a7d48d90d52e87ff", "score": "0.51025224", "text": "function lazyLoadConfig($ocLazyLoadProvider) {\n\n $ocLazyLoadProvider.config({\n modules: [\n // {\n // name: 'angularFileUpload',\n // files: [\n // 'vendor/angular-file-upload/angular-file-upload.min.js',\n // 'js/directives/ptteng-uploadThumb/ptteng-uploadThumb-0.0.1.js'\n // ]\n // },\n // {\n // name: 'summernote',\n // files: [\n // 'vendor/summernote/summernote.js',\n // 'vendor/summernote/summernote.css',\n // 'vendor/summernote/summernote-bs3.css',\n // 'vendor/angular-summernote/angular-summernote.js'\n // ]\n // },\n // {\n // name: 'datepicker',\n // files: [\n // 'js/directives/datepicker/datepicker.css',\n // 'js/directives/datepicker/datepicker.js'\n // ]\n // },\n // {\n // name: 'dndLists',\n // files: [\n // 'vendor/angular-drag-and-drop-lists/angular-drag-and-drop-lists.js'\n // ]\n // }\n ]\n });\n}", "title": "" }, { "docid": "fe1a17719e49939cb4449223e40c8aae", "score": "0.5099507", "text": "function getRequired(name) {\n if (VENDOR_ASSETS.modules)\n for(var m in VENDOR_ASSETS.modules)\n if(VENDOR_ASSETS.modules[m].name && VENDOR_ASSETS.modules[m].name === name)\n return VENDOR_ASSETS.modules[m];\n return VENDOR_ASSETS.scripts && VENDOR_ASSETS.scripts[name];\n }", "title": "" }, { "docid": "816cf501a871adba81cecbc0c928303a", "score": "0.5097892", "text": "getModuleName() {\n return 'slider';\n }", "title": "" }, { "docid": "5fd7b5965277efa30571ca038a70e6fa", "score": "0.50934076", "text": "function prepareModule(module) {\n\t// name the module\n\tvar nameOfModule = \"module\" + modules.length;\n\tmodule.attr({\n\t\t\"id\" : nameOfModule,\n\t\t\"class\" : \"module\"\n\t});\n\n\t// it floats when you hover your mouse over it\n\tmodule.hover(function() {\n\t\t$(\"[id^=module]\").css(\"z-index\", \"-10\");\n\t\tmodule.css(\"z-index\", \"10\");\n\t});\n\n\t// current length of modules array\n\tvar moduleIndex = modules.length;\n\n\t// add module to workspace\n\tmodules[moduleIndex] = module;\n\tmodule.appendTo(\"#workspace\");\n\n\t// make draggable\n\tjsPlumb.draggable(module, {});\n\n\t// module type & select box setup\n\tvar modType = $(\"#\" + nameOfModule + \" .moduleType\");\n\n\t// handle when the value is changed\n\tmodType.change(selectModuleType);\n\n\t// kill with fire when close button is clicked\n\t// (but don't delete its space, the space remains)\n\t$(\"#\" + nameOfModule + \" .closeBtn\").click(function() {\n\t\tvar oldEndpoints = jsPlumb.getEndpoints(nameOfModule);\n\t\tif (oldEndpoints !== undefined) {\n\t\t\tfor (var i = 0; i < oldEndpoints.length; i++)\n\t\t\t\tjsPlumb.deleteEndpoint(oldEndpoints[i]);\n\t\t}\n\n\t\t$(\"#\" + nameOfModule).remove();\n\t\tmodules[moduleIndex] = null;\n\t\t//.splice(moduleIndex, 1);\n\t});\n}", "title": "" }, { "docid": "0634a0ef79949f03cd5b183cabb50184", "score": "0.5077243", "text": "compile(moduleName, contents) {\n let { compiled, dependencies } = this.precompile(moduleName, contents);\n let lines = [];\n let counter = 0;\n for (let { runtimeName, path } of dependencies) {\n lines.push(`import a${counter} from \"${path.split(path_1.sep).join('/')}\";`);\n lines.push(`window.define('${runtimeName}', function(){ return a${counter++}});`);\n }\n lines.push(`export default Ember.HTMLBars.template(${compiled});`);\n return lines.join('\\n');\n }", "title": "" }, { "docid": "b9cb8899f4ca483381b9fd597f99a633", "score": "0.506544", "text": "[_loadDeps] () {}", "title": "" }, { "docid": "5e766d9368adbe2417d53b76be9f9887", "score": "0.50651795", "text": "function emit_core_module_list()\n{\n\tvar module_names = (new VBArray(MODULES.Keys())).toArray();\n\tvar i, mod_name, j;\n\tvar item;\n\tvar output = \"\";\n\n\tC.WriteLine(\"core_module_list = new Array(\");\n\n\t// first, look for modules with empty deps; emit those first\n\tfor (i in module_names) {\n\t\tmod_name = module_names[i];\n\t\tC.WriteLine(\"\\\"\" + mod_name.replace(/_/g, \"-\") + \"\\\",\");\n\t}\n\n\tC.WriteLine(\"false // dummy\");\n\n\tC.WriteLine(\");\");\n}", "title": "" }, { "docid": "ce04a5c81361f5e218d7c66c7dee493f", "score": "0.5059166", "text": "extend (config, { isDev, isClient }) {\n config.resolve.mainFields = ['module', 'main']\n }", "title": "" }, { "docid": "6e6c67fd3f658e4ac7cc0139b14f2b08", "score": "0.5035704", "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": "2f96fca9fc865daf10b38f6420218602", "score": "0.5034354", "text": "function MK_Append_New_Module_Video(rij_id, mod_id, kolom_id, url, optie, module_class, module_slot, module_target, module_poster) { jQuery(function ($) {\n\n\t$(\"#rij_\" + rij_id + \" .kolom.kolom_\" + kolom_id +\" .newrij_inner\" ).append(\n\n\t\t'<li id=\"mod_id_'+mod_id+'\" class=\"module module_video\" type=\"video\">'+\n\n\t\t\t'<div class=\"mod_titel\">'+\n\n\t\t\t\t'<div class=\"mod_naam\">Video module <span>'+mod_id+ '</span></div>'+\n\n\t\t\t\t'<div class=\"mod_gegevens\" module_class=\"'+module_class+'\" module_slot=\"'+module_slot+'\" module_url=\"'+url+'\" module_optie=\"'+optie+'\" module_target=\"'+module_target+'\" module_poster=\"'+module_poster+'\"></div>'+\n\n\t\t\t'</div>'+\n\n\t\t\t'<div class=\"mod_inner\">'+\n\n\n\t\t\t'</div>'+\n\n\t\t'</li>'\n\n\t);\n\n\n\tif(builder_admin == 0 || builder_admin == 1 && module_slot != 1)\n\t{\n\n\t\tif(builder_klant_create == 0 || builder_klant_edit == 0)\n\t\t{\n\t\t\t$('#mod_id_'+mod_id+' .mod_titel').append(\n\n\t\t\t\t'<div id=\"delete\" class=\"delete\" onclick=\"deleteModule('+mod_id+')\"></div>'\n\t\t\t);\n\n\t\t\t$('#mod_id_'+mod_id+' .mod_titel').prepend(\n\n\t\t\t\t'<div id=\"module_kopieren\" class=\"module_kopieren\" onclick=\"module_kopieren('+mod_id+')\"></div>'\n\t\t\t);\n\t\t}\n\n\t\tif(builder_klant_edit == 0)\n\t\t{\n\t\t\t$('#mod_id_'+mod_id+' .mod_titel').prepend(\n\n\t\t\t\t'<div id=\"edit\" class=\"edit\" onclick=\"editModuleTekst('+mod_id+')\"></div>'\n\t\t\t);\n\n\t\t\t$('#mod_id_'+mod_id+' .mod_inner').append(\n\n\t\t\t\t'<div class=\"module_preview_video module_preview target_'+module_target+'\" onclick=\"editModuleTekst('+mod_id+')\">'+\n\t\t\t\t\t'<div class=\"titel\"></div>' +\n\t\t\t\t\t'<div class=\"url\"></div>' +\n\n\t\t\t\t\t'<div class=\"titel_embedd\"><span class=\"vimeo\">Vimeo</span><span class=\"yt\">Youtube</span> : <span class=\"id\">'+url+'</span></div>' +\n\t\t\t\t'</div>' +\n\n\t\t\t\t'<div class=\"module_preview_edit\" onclick=\"editModuleTekst('+mod_id+')\">Aanpassen</div>'\n\t\t\t);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$('#mod_id_'+mod_id+' .mod_inner').append(\n\t\t\t\t'<div class=\"module_preview_video module_preview target_'+module_target+'\">' +\n\t\t\t\t\t'<div class=\"titel\"></div>' +\n\t\t\t\t\t'<div class=\"url\"></div>' +\n\n\t\t\t\t\t'<div class=\"titel_embedd\"><span class=\"vimeo\">Vimeo</span><span class=\"yt\">Youtube</span> : <span class=\"id\">'+url+'</span></div>' +\n\t\t\t\t'</div>'\n\t\t\t);\n\t\t}\n\n\t\t\n\t}\n\telse\n\t{\n\t\t$('#mod_id_'+mod_id+'').addClass('module_opslot');\n\n\t\t$('#mod_id_'+mod_id+' .mod_inner').append(\n\t\t\t'<div class=\"module_preview_video module_preview target_'+module_target+'\">'+\n\t\t\t\t'<div class=\"titel\"></div>' +\n\t\t\t\t'<div class=\"url\"></div>' +\n\n\t\t\t\t'<div class=\"titel_embedd\"><span class=\"vimeo\">Vimeo</span><span class=\"yt\">Youtube</span> : <span class=\"id\">'+url+'</span></div>' +\n\t\t\t'</div>'\n\t\t);\n\t}\n\n\tif(url != \"\" && module_target == 3 )\n\t{\n\t\tif(string_images != \"\") { string_images += \",\"; }\n\n\t\tstring_images += url;\n\n\t\tif(string_images_location != \"\") \n\t\t{ \n\t\t\tstring_images_location += ',#mod_id_'+mod_id+' .module_preview_video'; \n\t\t}\n\t\telse\n\t\t{\n\t\t\tstring_images_location += '#mod_id_'+mod_id+' .module_preview_video';\n\t\t}\n\n\t\tif(string_images_type != \"\") { string_images_type += \",\"; }\n\n\t\tstring_images_type += \"videofile\";\n\t}\n\n\tif(module_poster != \"\" && module_target == 3 )\n\t{\n\t\tif(string_images != \"\") { string_images += \",\"; }\n\n\t\tstring_images += module_poster;\n\n\t\tif(string_images_location != \"\") \n\t\t{ \n\t\t\tstring_images_location += ',#mod_id_'+mod_id+' .module_preview_video'; \n\t\t}\n\t\telse\n\t\t{\n\t\t\tstring_images_location += '#mod_id_'+mod_id+' .module_preview_video';\n\t\t}\n\n\t\tif(string_images_type != \"\") { string_images_type += \",\"; }\n\n\t\tstring_images_type += \"videoposter\";\n\t}\n\n}); }", "title": "" }, { "docid": "b60497d8a4cc83d6c3de698a444d4d38", "score": "0.50306195", "text": "getModuleName() {\n return 'Adaptor';\n }", "title": "" }, { "docid": "ebd5cbb0df0ad949de60beea6b306d40", "score": "0.5028519", "text": "function generateModuleSpec(generate, bundledModule) {\n const archive = bundledModule.archive, assets = bundledModule.assets;\n return util.unzipText(archive.file, assets[assetPath.configScript])\n .then(scriptSource => { generate(`{'':[`, scriptSource); })\n .then(() => {\n let chainedPromise = Promise.resolve();\n const secondaryScripts = util.selectEntries(assets, assetPath.configHome);\n for (const configName of Object.keys(secondaryScripts)) {\n chainedPromise = chainedPromise\n .then(() => {\n generate(',');\n return util.unzipText(archive.file, secondaryScripts[configName]).then(generate);\n })\n ;\n }\n return chainedPromise;\n })\n .then(() => {\n const publicAssets = util.selectEntries(assets, assetPath.publicHome);\n if (util.hasEnumerables(publicAssets)) {\n generatePublicSpecs(generate, archive, publicAssets);\n }\n })\n .then(() => {\n generate(']');\n const classes = bundledModule.classes;\n for (const className of Object.keys(classes).sort()) {\n generate(`,'`, className, `':`, classes[className]);\n }\n generate('}');\n })\n ;\n}", "title": "" }, { "docid": "2b0a0942db80f7506ecd5e7760d1744d", "score": "0.5022114", "text": "name(module, chunks, cacheGroupKey) {\n const moduleFileName = module\n .identifier()\n .split('/')\n .reduceRight((item) => item);\n const allChunksNames = chunks.map((item) => item.name).join('~');\n return `${cacheGroupKey}-${allChunksNames}-${moduleFileName}`;\n }", "title": "" }, { "docid": "7bc61f678528e0192a5ed7ab7263df9b", "score": "0.5017104", "text": "function prepareModule(module) {\n // name the module\n var nameOfModule = \"module\" + modules.length;\n module.attr({\n \"id\" : nameOfModule,\n \"class\" : \"module\"\n });\n\n // it floats when you hover your mouse over it\n module.hover(function() {\n $(\"[id^=module]\").css(\"z-index\", \"-10\");\n module.css(\"z-index\", \"10\");\n });\n\n // current length of modules array\n var moduleIndex = modules.length;\n\n // add module to workspace\n modules[moduleIndex] = module;\n module.appendTo(\"#workspace\");\n\n // make draggable\n jsPlumb.draggable(module, {\n //containment: \"#workspace\"\n });\n\n // module type & select box setup\n var modType = $(\"#\" + nameOfModule + \" .moduleType\");\n modType.selectBoxIt({\n showFirstOption : false,\n showEffect : \"fadeIn\",\n showEffectSpeed : 400,\n hideEffect : \"fadeOut\",\n hideEffectSpeed : 400,\n autoWidth : false\n });\n\n // handle when the value is changed\n modType.change(selectModuleType);\n\n // kill with fire when close button is clicked\n // (but don't delete its space, the space remains)\n $(\"#\" + nameOfModule + \" .closeBtn\").click(function() {\n var oldEndpoints = jsPlumb.getEndpoints(nameOfModule);\n if (oldEndpoints !== undefined) {\n for (var i = 0; i < oldEndpoints.length; i++)\n jsPlumb.deleteEndpoint(oldEndpoints[i]);\n }\n\n $(\"#\" + nameOfModule).remove();\n modules[moduleIndex] = null;\n //.splice(moduleIndex, 1);\n });\n\n touched();\n}", "title": "" }, { "docid": "a8ed40b6ca14f38550e171a1b2e58209", "score": "0.5015403", "text": "function dependencyHTML(visArray) {\n\t\tvar html = '', allDeps = [];\n\t\t\n\t\t// Standard dependencies\n\t\thtml += '<script src=\"/web-api/js/lib/jquery.min.js\"></script>\\n';\n\t\thtml += '<script src=\"/web-api/js/lib/jquery.xml2json.js\"></script>\\n';\n\t\thtml += '<script src=\"/web-api/js/lib/d3.min.js\"></script>\\n';\n\t\thtml += '<script src=\"/web-api/js/rmvpp-ext.js\"></script>\\n';\n\t\thtml += '<script src=\"/web-api/js/obieeUI.js\"></script>\\n\\n';\n\t\thtml += '\\n<script src=\"/web-api/js/obiee-v8.js\"></script>\\n';\n\t\thtml += '<link\trel=\"stylesheet\" type=\"text/css\" href=\"/web-api/css/obiee.css\">\\n';\n\t\thtml += '\\n<script src=\"/web-api/js/pluginAPI.js\"></script>\\n';\n\t\thtml += '<link\trel=\"stylesheet\" type=\"text/css\" href=\"/web-api/css/pluginAPI.css\">\\n';\n\t\thtml += '\\n<script src=\"/web-api/js/lib/jquery.sumoselect.min.js\"></script>\\n';\n\t\thtml += '<link\trel=\"stylesheet\" type=\"text/css\" href=\"/web-api/css/lib/sumoselect.css\">\\n';\n\t\thtml += '\\n<!-- Fonts -->\\n';\n\t\thtml += '<link href=\"http://fonts.googleapis.com/css?family=Open+Sans:400,700\" rel=\"stylesheet\" type=\"text/css\">\\n';\n\t\thtml += '<link rel=\"stylesheet\" href=\"https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css\">\\n';\n\t\t\n\t\tfor (var i=0; i < visArray.length; i++) {\n\t\t\tdeps = rmvpp[visArray[i].Plugin].dependencies;\n\n\t\t\tfor (var j=0; j < deps.js.length; j++) {\n\t\t\t\tvar dep = '<script src=\"' + deps.js[j] + '\"></script>\\n';\n\t\t\t\tif ($.inArray(dep, allDeps) == -1) { // Check if dependency already included\n\t\t\t\t\thtml += dep;\n\t\t\t\t\tallDeps.push(dep);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif ('css' in deps) {\n\t\t\t\tfor (var j=0; j < deps.css.length; j++ ) {\n\t\t\t\t\tvar dep = '<link rel=\"stylesheet\" type=\"text/css\" href=\"' + deps.css[j] + '\">\\n';\n\t\t\t\t\tif ($.inArray(dep, allDeps) == -1) { // Check if dependency already included\n\t\t\t\t\t\thtml += dep;\n\t\t\t\t\t\tallDeps.push(dep);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn html;\t\t\n\t}", "title": "" }, { "docid": "d9cc5bbe619f8e3b8f6d57e70fdde3f6", "score": "0.5013431", "text": "function getListOfModulesAndCreateModules(projectAttachment, configs) {\n\t\tExt.Ajax.request({\n\t\t\tmethod : \"GET\",\n\t\t\turl : projectAttachment + \"/projectModules\",\n\t\t\tscope : this,\n\t\t\tsuccess : function (response) {\n\t\t\t\tvar json = Ext.decode(response.responseText);\n\t\t\t\tExt.each(json.data, function (projectModule) {\n\t\t\t\t\tvar projectConfig = findProjectModuleConfig(configs, projectModule.id);\n\t\t\t\t\tif (!Ext.isEmpty(projectConfig)) {\n\t\t\t\t\t\tvar configModule = Ext.applyIf(projectConfig, projectModule\t|| {});\n\t\t\t\t\t\tvar module = createModule(configModule);\t\t\t\t\t\t\n\t\t\t\t\t\tSitoolsDesk.app.modules.push(module);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tExt.Msg.alert(i18n.get('label.error'), String.format(i18n\n\t\t\t\t\t\t\t\t\t\t\t.get('label.undefinedModule'),\n\t\t\t\t\t\t\t\t\tprojectModule.name));\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t//if all includes are done, Add 1 to the modulesCharges \n\t\t\t\t\t\tSitoolsDesk.modulesCharges++;\n\t\t\t\t\t\t//test if all modules are loaded.\n\t\t\t\t\t\tif (SitoolsDesk.modulesCharges === SitoolsDesk.modulesACharger) {\n\t\t\t\t\t\t\t//End of loading all Javascript files. \n\t\t\t\t\t\t\tSitoolsDesk.app.fireEvent('allJsIncludesDone', this);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}, this);\n\t\t\t},\n\t\t\tfailure : alertFailure\n\t\t});\t\t\n\t}", "title": "" }, { "docid": "e3ce2ead07443aea8b1a07dcbe4f71d5", "score": "0.50086766", "text": "name(module, chunks, cacheGroupKey) {\n const sep = require('path').sep;\n const moduleFileName = module.identifier().split(`${sep}`).reduceRight(item => item);\n const allChunksNames = chunks.map((item) => item.name).join('~');\n return `${cacheGroupKey}-${allChunksNames}-${moduleFileName}`;\n }", "title": "" }, { "docid": "64eaffa4b586e35f2f468f9e47b12b6c", "score": "0.5005792", "text": "function generateModuleGUID() {\n let domDocPath = path.join(twd, module_name, ANDOMDOCUMENT);\n console.info(domDocPath);\n // *****************************************************\n // Update the AnimateCC project XMLDocument\n // \n var DOMParser = require('xmldom').DOMParser;\n var XMLSerializer = require('xmldom').XMLSerializer;\n let parser = new DOMParser();\n let serializer = new XMLSerializer();\n // Read the DOMDocument file and parse it into XML\n // \n let _document = fs.readFileSync(domDocPath, \"utf8\");\n var doc = parser.parseFromString(_document, 'text/xml');\n var _fileGUID = genGUID();\n console.info(_fileGUID);\n // Set the guid on the document itself\n doc.documentElement.setAttribute('fileGUID', _fileGUID);\n // There is only one parametersAsXML node in this document\n // TODO: manage other cases\n // \n var element = doc.documentElement.getElementsByTagName(\"parametersAsXML\");\n // extract the CData \n var compXML = element[0].childNodes[0].data;\n // Note this is a special case - there is no containing outer document.\n // i.e. it is a list of <property> elements.\n // \n let cdata = parser.parseFromString(compXML, 'text/xml');\n // Get the Inspectables from the parsed CData and set the defaultValue\n // Note: this is sensitive to the efModule.js AnimateCC custom component \n // implementation.\n // \n let inspectables = cdata.documentElement.getElementsByTagName(\"Inspectable\");\n inspectables[0].setAttribute('defaultValue', _fileGUID);\n element[0].childNodes[0].data = serializer.serializeToString(cdata);\n // Generate the new DOMDocument from the XML\n let update = serializer.serializeToString(doc.documentElement);\n // console.info(update);\n try {\n fs.writeFileSync(domDocPath, update, 'utf8');\n }\n catch (err) {\n if (err) {\n console.error('ERROR:', err);\n return;\n }\n }\n // *****************************************************\n // Update/Add the associated anModule entry in <MOD>/Efconfig.json\n let loaderPath = path.join(twd, module_name, EFLOADERCONFIG);\n console.info(loaderPath);\n let loaderJSON = fs.readFileSync(loaderPath, \"utf8\");\n var loaderDoc = JSON.parse(loaderJSON);\n loaderDoc.compID = _fileGUID;\n // Generate the new DOMDocument from the XML\n // \n let loaderUpdate = JSON.stringify(loaderDoc, null, '\\t');\n console.info(loaderUpdate);\n try {\n fs.writeFileSync(loaderPath, loaderUpdate, 'utf8');\n }\n catch (err) {\n if (err) {\n console.error('ERROR:', err);\n return;\n }\n }\n console.info(\"Update Complete\");\n}", "title": "" }, { "docid": "e4b7302e5bec51224105d3f249919269", "score": "0.5002509", "text": "function preRequires() {\r\n try {\r\n buildHelperCommons.loadDashArgs();\r\n // includeCwdOnModulePath(module, buildHelperCommons.argsMap['verbose']);\r\n } catch (err) {\r\n console.error('[' + nodeModuleName + ']:' + err);\r\n process.exit(1);\r\n }\r\n}", "title": "" }, { "docid": "e4b7302e5bec51224105d3f249919269", "score": "0.5002509", "text": "function preRequires() {\r\n try {\r\n buildHelperCommons.loadDashArgs();\r\n // includeCwdOnModulePath(module, buildHelperCommons.argsMap['verbose']);\r\n } catch (err) {\r\n console.error('[' + nodeModuleName + ']:' + err);\r\n process.exit(1);\r\n }\r\n}", "title": "" }, { "docid": "7a811bb22b90fc04edbded1dc5f30586", "score": "0.49985537", "text": "function part2lib(part){\n\n\n\n\n\n}", "title": "" }, { "docid": "a840b2d6896f8105976c3f042f9d7df0", "score": "0.4995058", "text": "function js() {\n\tvar files, contents;\n\tconsole.log('Building f2.no-third-party.js...');\n\t\n\tfiles = [JS_HEADER]\n\t\t.concat(CORE_FILES)\n\t\t.concat([JS_FOOTER]);\n\n\tcontents = files.map(function(f) {\n\t\treturn fs.readFileSync(f.src, ENCODING);\n\t});\n\n\tcontents = processTemplate(contents.join(EOL), f2Info);\n\tfs.writeFileSync('./sdk/f2.no-third-party.js', contents, ENCODING);\n\tconsole.log('COMPLETE');\n\n\n\tconsole.log('Building Debug Package...');\n\tfiles = [JS_HEADER]\n\t\t.concat(PACKAGE_FILES)\n\t\t.concat(CORE_FILES)\n\t\t.concat([JS_FOOTER]);\n\n\tcontents = files.map(function(f) {\n\t\treturn fs.readFileSync(f.src, ENCODING);\n\t});\n\tcontents = processTemplate(contents.join(EOL), f2Info);\n\tfs.writeFileSync('./sdk/f2.debug.js', contents, ENCODING);\n\tconsole.log('COMPLETE');\n\n\n\tconsole.log('Building Minified Package...');\n\tcontents = files.map(function(f) {\n\n\t\tvar code = fs.readFileSync(f.src, ENCODING);\n\n\t\tif (f.minify) {\n\t\t\tvar comments = [];\n\t\t\tvar token = '\"F2: preserved commment block\"';\n\n\t\t\t// borrowed from ender-js\n\t\t\tcode = code.replace(/\\/\\*![\\s\\S]*?\\*\\//g, function(comment) {\n\t\t\t\tcomments.push(comment);\n\t\t\t\treturn token;\n\t\t\t\t//return ';' + token + ';';\n\t\t\t});\n\n\t\t\tvar ast = jsp.parse(code); // parse code and get the initial AST\n\t\t\tast = pro.ast_mangle(ast); // get a new AST with mangled names\n\t\t\tast = pro.ast_squeeze(ast); // get an AST with compression optimizations\n\t\t\tcode = pro.gen_code(ast); // compressed code here\n\n\t\t\tcode = code.replace(RegExp(token, 'g'), function() {\n\t\t\t\treturn EOL + comments.shift() + EOL;\n\t\t\t});\n\t\t}\n\n\t\treturn code;\n\t});\n\tcontents = processTemplate(contents.join(';' + EOL), f2Info);\n\tfs.writeFileSync('./sdk/f2.min.js', contents, ENCODING);\n\n\t// update Last Update Date and save F2.json\n\tf2Info.sdk.lastUpdateDate = (new Date()).toJSON();\n\tsaveF2Info();\n\n\tconsole.log('COMPLETE');\n\n\t//copy F2.min.js over to docs/js folder so it makes to gh-pages\n\tconsole.log('Copying f2.min.js to ./docs/js/f2.js...');\n\tfs.copy('./sdk/f2.min.js', './docs/js/f2.js', function(err){\n\t\tif (err) {\n\t\t\tdie(err);\n\t\t} else {\n\t\t\tconsole.log(\"COMPLETE\");\n\t\t\t// Issue #35\n\t\t\tconsole.log('Copying f2.min.js to ./docs/js/f2.min.js...');\n\t\t\tfs.copy('./sdk/f2.min.js', './docs/js/f2.min.js', function(err){\n\t\t\t\tif (err) {\n\t\t\t\t\tdie(err);\n\t\t\t\t} else {\n\t\t\t\t\tconsole.log(\"COMPLETE\");\n\n\t\t\t\t\tconsole.log('Copying F2.min.js to /f2.js...');\n\t\t\t\t\tfs.copy('./sdk/f2.min.js', './f2.js', function(err){\n\t\t\t\t\t\tif (err) {\n\t\t\t\t\t\t\tdie(err);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tconsole.log(\"COMPLETE\");\n\t\t\t\t\t\t\tnextStep();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t});\n}", "title": "" }, { "docid": "74516dd8d58f614f2ec83962668d9024", "score": "0.4994766", "text": "function register_site_module(module_name, module_tab, main_page, templates, activate_callback, deactivate_callback){\n var $ = jQuery;\n \n //build the module object\n var mod={\n \"module_name\": module_name,\n \"module_tab\": module_tab,\n \"main_page\": main_page,\n \"activate_callback\": activate_callback,\n \"deactivate_callback\": deactivate_callback\n };\n \n //copy any templates to the DOM\n if(templates !== null){\n console.log(\"Add templates\");\n var tdiv=$(\"<div />\");\n tdiv.attr(\"data-module\",module_name)\n $.each(templates, function (i,entry){\n tdiv.append(entry);\n });\n $(\"div.templates\").append(tdiv);\n }\n \n //add the module link to the tab bar\n if(module_tab !== null){\n console.log(\"Add tab \" + module_tab);\n var tab = $(\"<span class='tab-entry tab-inactive' />\");\n tab.attr(\"data-module\",module_name);\n tab.text(module_tab);\n tab.click(function (){\n display_module(module_name);\n });\n $(\"div.tab-listing\").append(tab);\n }\n \n //add the module to the list\n modules[module_name] = mod;\n \n //Activate if this is the first module loaded (\"main page\")\n if(active_module === null){\n display_module(module_name);\n }\n}", "title": "" }, { "docid": "4ab31b68375afb87a94e4613bb1f4dde", "score": "0.49910164", "text": "function getModuleLongType(aModule) {\n if (aModule == ORIGINAL) return BIBLE;\n var typeRE = new RegExp(\"(^|<nx>)\\\\s*\" + escapeRE(aModule) + \"\\\\s*;\\\\s*(.*?)\\\\s*(<nx>|$)\");\n var type = LibSword.getModuleList().match(typeRE);\n if (type) type = type[2];\n return type;\n}", "title": "" }, { "docid": "cd2335facf0107ca6d4da718c4b54de6", "score": "0.49890143", "text": "function installModules(callback) {\r\n FileIO.getDirectoryListing(sys.dir+\"/system/core/modules/\",\r\n function (err,result) {\r\n if (err) console.log(err);\r\n if (result) {\r\n var filenames=result.map(function(i) {return i.path+\"/\"+i.filename});\r\n async.forEachSeries(filenames,installModule,function(){log(\"modules installed\");callback()});\r\n }\r\n }\r\n );\r\n\t}", "title": "" }, { "docid": "fa680289530ad007e95669d664916b84", "score": "0.49885207", "text": "function _getBuilder(_Core) {\n return 'build' + (_Core.modulePath || 'Core').replace(/\\./g, '');\n}", "title": "" }, { "docid": "826a2547d0f7f5fc5d43cad8088856ab", "score": "0.49881178", "text": "function build(plugin_name)\r\n{\r\n\tvar f;\r\n\tvar p;\r\n\tvar plugfolder;\r\n\tvar plugname;\r\n\tvar plugpath;\r\n\tvar plugbuildpath;\r\n\tf = new Folder(pluginsfolder);\r\n\t\r\n\tplugname = plugin_name;\r\n\tplugfolder = plugname + \"-source\";\r\n\r\n\tif(max.os == \"macintosh\"){\r\n\t\tplugpath = pluginsfolder + plugfolder + \"/\" + plugname + \".mxt\";\r\n\t}\r\n\telse if(max.os == \"windows\"){\r\n\t\tplugpath = pluginsfolder + plugfolder + \"\\\\\" + plugname + \".mxt\";\r\n\t}\r\n\t\t\t\t\t\t\r\n\tpost(plugpath);\r\n\tpost();\r\n\t\t\t\r\n\tif(max.os == \"macintosh\"){\r\n\t\tplugbuildpath = vstfolder + plugname;\r\n\t}\r\n\telse if(max.os == \"windows\"){\r\n\t\tplugbuildpath = vstfolder + plugname + \".dll\";\r\n\t}\r\n\t\t\t\r\n\tpost(\"JS IS BUILDING: \" + plugbuildpath);\r\n\tpost();\r\n\r\n\t\r\n\r\n\tmax.openfile(plugref, plugpath); // open the patch at plugpath and name it plugref\r\n\tmax.buildplugin(plugref,plugbuildpath); // build plugref as a plugin at plugbuildpath\r\n\tmax.closefile(plugref); // close out the patch named plugref\r\n\t\r\n}", "title": "" }, { "docid": "8a4a687ee546973c9ed697570db63ef4", "score": "0.49596938", "text": "function lookup_module_rec($data, module_arr, title, signature, constraints){\n console.log(\"[DEBUG] Call - lookup_module_rec(data:\"+$data+\", module_arr:\"+module_arr+\", title:\"+title+\", signature:\"+signature+\")\");\n \n if (module_arr.length == 0)\n\treturn {content:$data, title:title, signature:signature, constraints:constraints};\n\n // else {\n var content, target_title;\n var $query = $data.find('> div.ocaml_module[name='+module_arr[0]+']');\n \n // If there are no matching elements, then it can be in an include\n if ($query.length == 0){\n\n\tvar includes = $data.find('> div.ocaml_include');\n\tfor (var i = 0; i < includes.length; i++){\n\t var item_attr = $(includes[i]).attr('items');\n\t \n\t if (typeof str === undefined){\n\t\tcontinue;\n\t }\n\t \n\t var items = JSON.parse(item_attr);\n\n\t console.log(\"looking for : \"+module_arr[0]);\n\t \n\t // if the include contains the module we are looking for :\n\t if (items.indexOf(module_arr[0]) !== -1){\n\t\t\n\t\tvar next_path = $(includes[i]).attr('path');\n\t\t//if this include is an anonymous declaration we do a recursion on the internal content\n\t\tif (typeof next_path === 'undefined'){\n\t\t var include_sig_content = $(includes[i]).find(\"> div.ocaml_module_content\");\n\t\t if (include_sig_content.length > 0){\n\t\t\treturn lookup_module_rec(include_sig_content, module_arr, title, signature, constraints);\n\t\t } else {\n\t\t\tconsole.log(\"this include : \"+ includes[i] +\" is weird - it points items it doesn't have -- continue..\");\n\t\t\tcontinue;\n\t\t }\n\t\t} \n\t\t// if there is a path then we do an ajax request on this\n\t\telse {\n\t\t var args = $.parseParams(next_path.substring(1));\n\n\t\t var alias_module_arr = args.module.split('.');\n\t\t\n\t\t $data = perform_ajax_request(args.package+'/'+ alias_module_arr[0]+'.html', false);\n\t\t return lookup_module_rec($data, alias_module_arr.slice(1).concat(module_arr), title, signature, constraints); \n\t\t}\n\t\t\n\t } //end of : we found the good entry somewhere\n\t else {\n\t\t// not found, we continue\n\t\tcontinue;\n\t }\n\t}\n }\n // There is a module we found with that name\n else {\n\t// Retrieve the possible constraints\n\tvar $constraints = $query.find(\"> div.constraints > * \");\n\tif ($constraints.length > 0)\n\t constraints = $constraints;\n\t\n\t\n\t//check sig or ident\n\t//if sig, recursion with module_content ~ like the include one\n\t//else ident, recursion on the ajax request... ~like the include one\n\n\tif ($query.is(\"div.sig\")){\n\t var module_sig_content = $query.find(\"> div.ocaml_module_content\");\n\t title.addSig(module_arr[0]);\n\t \n\t if (signature == null && module_arr.length == 1){\n\t\tsignature = $query.find('> pre:not(div.ocaml_module_content)');\n\t }\n\t \n\t return lookup_module_rec(module_sig_content, module_arr.slice(1), title, signature, constraints);\n\t} \n\telse {\n\t var next_path = $query.attr('path');\n\t \n\t if (signature == null){\n\t\tsignature = $query.find('> pre:not(div.ocaml_module_content)');\n\t }\n\t \n\t if (typeof next_path === 'undefined'){\n\t\t//if this is an ident and there is no path, it is very wrong\n\t\tconsole.log(\"Incomplete path -- Missing dependencies\");\n\t\tvar info_content = $query.prepend('<div class=\"failed_lookup\">Could not lookup the content, process the package\\'s dependencies</div>');\n\t\treturn lookup_module_rec(info_content, [], undefined, signature, constraints);\n\t } \n\t // if there is a path then we do an ajax request on this\n\t else {\n\t\tvar args = $.parseParams(next_path.substring(1));\n\t\tvar alias_module_arr = args.module.split('.');\n\t\t\n\t\t$data = perform_ajax_request(args.package+'/'+ alias_module_arr[0]+'.html', false);\n\t\ttitle.setAlias(args.package, alias_module_arr[0]);\n\n\t\treturn lookup_module_rec($data, alias_module_arr.slice(1).concat(module_arr.slice(1)), title, signature, constraints); \n\t }\n\t}\n }\n // }\n}", "title": "" }, { "docid": "5c626370a79754f6cdb3c8a5cb33a26e", "score": "0.49469382", "text": "function load_module(where_to_add,obj)\n {\n // $(where_to_add).add_loading();\n $.get('../engine/req_modules_handler.php',obj,function(response_html){\n $(where_to_add).empty().html(response_html);\n\t end_progressbar();\t\n return true;\n\t });\n\t return false;\n }", "title": "" }, { "docid": "d657fcb5f7f2eeab5f8bad1aeab9a4b4", "score": "0.49445307", "text": "function buildModule(options, cb) {\n var fn = Config.get('buildModuleFunction');\n return fn(options, cb);\n}", "title": "" }, { "docid": "ad276f0ddfd8a6d38010f5c823256b84", "score": "0.49379915", "text": "function AddModule(mFileName) //Takes the Javascript file name and adds it to the document as a script\n{\n var sTag = document.createElement(\"script\"); //Create a SCRIPT tag\n sTag.setAttribute(\"src\", mFileName); //Set the SCRIPT src=mFileName\n sTag.setAttribute(\"type\", \"text/javascript\"); //set the SCRIPT type=\"text/javascript\"\n hHead.appendChild(sTag); //Add it to your header section (parsed and run immediately)\n}", "title": "" }, { "docid": "677571504b9985a1ee02f3aebb2ec27f", "score": "0.49371713", "text": "function livelog_module(module) {\r\n var ul = document.getElementById(\"log_module\");\r\n var li = document.createElement(\"li\");\r\n li.appendChild(document.createTextNode(module));\r\n ul.appendChild(li);\r\n }", "title": "" }, { "docid": "abf3dd42df729e71e5302a1f503e86f2", "score": "0.49175423", "text": "function makeHtmlFlexibleModule(bloc, blocid, blocclass, j) {\n // initialisation\n var code = new Array(\"head\", \"body\");\n code[\"head\"] = '';\n code[\"body\"] = '';\n\n code[\"body\"] += '|tab|<?php if ($nbmodules'+j+' > 0) : ?>|rr|'\n +'|tab|<div'+blocid+blocclass+'>|rr|'\n +'|tab||tab|<div class=\"inner\">|rr|';\n\n code[\"head\"] += '<?php|rr|'\n +'$nbmodules'+j+' = 0;|rr|';\n\n //var modulepos = new Array();\n bloc.getElements('.flexiblemodule').each(function(module){\n\n // retrieve data for the block\n module.ckid = module.getProperty(\"ckid\") ? ' id=\"'+module.getProperty(\"ckid\")+'\"' : '';\n module.classe = module.getProperty(\"ckclass\") ? module.getProperty(\"ckclass\") : '';\n module.jdocstyle = module.getProperty(\"ckmodulestyle\") ? ' style=\"'+module.getProperty(\"ckmodulestyle\")+'\"' : ' style=\"xhtml\"';\n module.jdocposition = module.getProperty(\"ckmoduleposition\") ? module.getProperty(\"ckmoduleposition\") : '';\n\n code[\"body\"] += '|tab||tab||tab|<?php if ($this->countModules(\\''+module.jdocposition+'\\')) : ?>|rr|'\n +'|tab||tab||tab|<div'+module.ckid+' class=\"flexiblemodule <?php echo $modulesclasse'+j+'; ?> '+module.classe+'\">|rr|'\n +'|tab||tab||tab||tab|<div class=\"inner\">|rr|'\n +'|tab||tab||tab||tab||tab|<jdoc:include type=\"modules\" name=\"'+module.jdocposition+'\"'+module.jdocstyle+' />|rr|'\n +'|tab||tab||tab||tab|</div>|rr|'\n +'|tab||tab||tab|</div>|rr|'\n +'|tab||tab||tab|<?php endif; ?>|rr|';\n\n code[\"head\"] += 'if ($this->countModules(\\''+module.jdocposition+'\\')) $nbmodules'+j+'|plus||plus|;|rr|';\n });\n code[\"body\"] += '|tab||tab||tab|<div class=\"clr\"></div>|rr|'\n +'|tab||tab|</div>|rr|'\n +'|tab|</div>|rr|'\n +'|tab|<?php endif; ?>|rr||rr|';\n\n code[\"head\"] += 'if ($nbmodules'+j+' == 1) $modulesclasse'+j+' = \\'full\\';|rr|'\n +'if ($nbmodules'+j+' == 2) $modulesclasse'+j+' = \\'demi\\';|rr|'\n +'if ($nbmodules'+j+' == 3) $modulesclasse'+j+' = \\'tiers\\';|rr|'\n +'if ($nbmodules'+j+' == 4) $modulesclasse'+j+' = \\'quart\\';|rr|'\n +'?>|rr||rr|';\n\n return code;\n}", "title": "" }, { "docid": "b991da2ffae00578636e0625d3834748", "score": "0.49170327", "text": "function module(id, opts, next) {\n\tif (id.slice(-3) === '.js') id = id.slice(0, -3);\n\topts = getOptions(opts);\n\tgetUri(id, opts, function(err, uri) {\n\t\tfs.stat(uri, function(err, stat) {\n\t\t\tif (err) { return next(err); }\n\t\t\tfs.readFile(uri, function(err, buffer) {\n\t\t\t\tif (err) return next(err);\n\t\t\t\tvar content = buffer.toString('utf8');\n\t\t\t\tif ('bundles.json' === id) { \n\t\t\t\t\tbundles(JSON.parse(content), opts, function(err, content) {\n\t\t\t\t\t\tif (err) { return next(err); }\n\t\t\t\t\t\tcontent = 'define.bundle.map(' + JSON.stringify(content) + ');\\n';\n\t\t\t\t\t\tnext(null, content, stat.mtime);\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tif ('require' !== id) {\n\t\t\t\t\t\tcontent = translate(id, uri, buffer, opts);\n\t\t\t\t\t\tcontent = 'define(' + JSON.stringify(id) +\n\t\t\t\t\t\t\t',function(require,exports,module){' + content + '\\n});\\n';\n\t\t\t\t\t}\n\t\t\t\t\tif (opts.compress) {\n\t\t\t\t\t\topts.compress(content, function(err, content) {\n\t\t\t\t\t\t\tif (err) return next(err);\n\t\t\t\t\t\t\tnext(null, content, stat.mtime);\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\tnext(null, content, stat.mtime);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t});\n}", "title": "" }, { "docid": "421ce68ccb755b43b0b8a28703b7be1c", "score": "0.49061054", "text": "getModuleName() {\n return 'maskedtextbox';\n }", "title": "" }, { "docid": "6b2976190b1a8cb407b567d73112866c", "score": "0.49057838", "text": "async ensureComponentDefBackup () {\n if (this._backupComponentDef) return;\n const { moduleId, exportedName } = this[metaSymbol];\n const source = await module(moduleId).source();\n const { start, end } = findComponentDef(await module(moduleId).ast(), exportedName);\n this._backupComponentDef = source.slice(start, end);\n }", "title": "" }, { "docid": "de83c2d26d86907cae0c1dd29199c336", "score": "0.49027184", "text": "function getConfigAndCreateModule(config) {\n\t\tExt.Ajax.request({\n\t\t\tmethod : \"GET\",\n\t\t\turl : loadUrl.get('APP_URL') + loadUrl.get('APP_PROJECTS_MODULES_URL') + \"/\" + config.id,\n\t\t\tscope : this,\n\t\t\tsuccess : function (response) {\n\t\t\t\tvar json = Ext.decode(response.responseText);\n\t\t\t\tif (json.success) {\n\t\t\t\t\tvar configModule = Ext.applyIf(config, json.projectModule || {});\n\t\t\t\t\tvar module = createModule(configModule);\n\t\t\t\t\tSitoolsDesk.app.modules.push(module);\n\t\t\t\t} else {\n\t\t\t\t\tExt.Msg.alert(i18n.get('label.error'), String.format(i18n\n\t\t\t\t\t\t\t\t\t\t\t.get('label.undefinedModule'),\n\t\t\t\t\t\t\t\t\tconfig.name));\n\t\t\t\t\t//if all includes are done, Add 1 to the modulesCharges \n\t\t\t\t\tSitoolsDesk.modulesCharges++;\n\t\t\t\t\t//test if all modules are loaded.\n\t\t\t\t\tif (SitoolsDesk.modulesCharges === SitoolsDesk.modulesACharger) {\n\t\t\t\t\t\t//End of loading all Javascript files. \n\t\t\t\t\t\tSitoolsDesk.app.fireEvent('allJsIncludesDone', this);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tfailure : alertFailure\n\t\t});\n\t}", "title": "" }, { "docid": "e4ad5d1ccbb3e19059222f455c49449b", "score": "0.4901949", "text": "async consumerComponentToVersion({\n consumerComponent,\n consumer\n }) {\n const clonedComponent = consumerComponent.clone();\n\n const setEol = files => {\n if (!files) return null;\n const result = files.map(file => {\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n file.file = file.toSourceAsLinuxEOL();\n return file;\n });\n return result;\n };\n\n const manipulateDirs = pathStr => {\n return (0, _manipulateDir().revertDirManipulationForPath)(pathStr, clonedComponent.originallySharedDir, clonedComponent.wrapDir);\n };\n\n const files = consumerComponent.files.map(file => {\n return {\n name: file.basename,\n relativePath: manipulateDirs(file.relative),\n file: file.toSourceAsLinuxEOL(),\n test: file.test\n };\n }); // @todo: is this the best way to find out whether a compiler is set?\n\n const isCompileSet = Boolean(consumerComponent.compiler || clonedComponent.extensions.some(e => e.name === _constants().Extensions.compiler || e.name === 'bit.core/compile' || e.name === _constants().Extensions.envs));\n const {\n dists,\n mainDistFile\n } = clonedComponent.dists.toDistFilesModel(consumer, consumerComponent.originallySharedDir, isCompileSet);\n const compilerFiles = setEol((0, _path2().default)(['compiler', 'files'], consumerComponent));\n const testerFiles = setEol((0, _path2().default)(['tester', 'files'], consumerComponent));\n clonedComponent.mainFile = manipulateDirs(clonedComponent.mainFile);\n clonedComponent.getAllDependencies().forEach(dependency => {\n // ignoreVersion because when persisting the tag is higher than currently exist in .bitmap\n const depFromBitMap = consumer.bitMap.getComponentIfExist(dependency.id, {\n ignoreVersion: true\n });\n dependency.relativePaths.forEach(relativePath => {\n if (!relativePath.isCustomResolveUsed) {\n // for isCustomResolveUsed it was never stripped\n relativePath.sourceRelativePath = manipulateDirs(relativePath.sourceRelativePath);\n }\n\n if (depFromBitMap && depFromBitMap.origin !== _constants().COMPONENT_ORIGINS.AUTHORED) {\n // when a dependency is not authored, we need to also change the\n // destinationRelativePath, which is the path written in the link file, however, the\n // dir manipulation should be according to this dependency component, not the\n // consumerComponent passed to this function\n relativePath.destinationRelativePath = (0, _manipulateDir().revertDirManipulationForPath)(relativePath.destinationRelativePath, depFromBitMap.originallySharedDir, depFromBitMap.wrapDir);\n }\n });\n });\n clonedComponent.overrides.addOriginallySharedDir(clonedComponent.originallySharedDir);\n\n const version = _models().Version.fromComponent({\n component: clonedComponent,\n files: files,\n dists,\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n mainDistFile\n }); // $FlowFixMe it's ok to override the pendingVersion attribute\n\n\n consumerComponent.pendingVersion = version; // helps to validate the version against the consumer-component\n\n return {\n version,\n files,\n dists,\n compilerFiles,\n testerFiles\n };\n }", "title": "" }, { "docid": "4b68a2d452a3b8a1642234ee5b955580", "score": "0.4900826", "text": "generateModuleInclude() {\n let moduleInclude = this._grammar.getModuleInclude();\n\n if (!moduleInclude) {\n // Example: add some default module include if needed.\n moduleInclude = `\n let foo = 'Example module include';\n `;\n }\n\n this.writeData('MODULE_INCLUDE', moduleInclude);\n }", "title": "" }, { "docid": "c5ab0a25cc4f2b56612466eac19f6f34", "score": "0.4899683", "text": "function getRequiredModules (exercise) {\n var before = exercise.wrapData.requiresBefore\n var after = exercise.wrapData.requiresAfter\n var source = path.resolve(exercise.args[0])\n\n var additions = after.filter(function (item) {\n return (\n item !== source &&\n before.indexOf(item) === -1\n )\n })\n\n return additions\n}", "title": "" }, { "docid": "7dc08d6755e35c9be68d8554a0c2d8df", "score": "0.48946393", "text": "exportInternalScripts(directory) {\n var cScripts = this.html('script');\n\n cScripts.each((index, cScriptElement) => {\n if (cScriptElement.attribs[\"src\"]) { return; } /* skip external */\n\n /* If the type attribute is set it should be valid for JS */\n var scriptType = cScriptElement.attribs[\"type\"];\n if (scriptType && !VALID_JS_TYPES.includes(scriptType)) { return; }\n \n /* Store the inline script into a local file */\n var inlineScriptContent = cheerio(cScriptElement).html();\n var randomFileName = \"exported_\" + getRandomFilename(6) + \".js\";\n var relativeFilePath = path.join(lacunaSettings.LACUNA_OUTPUT_DIR, randomFileName); /* relative to the project */\n var filePath = path.join(directory, relativeFilePath); /* relative to pwd */\n fs.writeFileSync(filePath, inlineScriptContent);\n\n /* Since the lacuna_cache resides at the framework directory level, references should take it into account */\n var relativePathDifference = path.relative(directory, entryFile);\n var numberOfNestedDirectories = relativePathDifference.split(\"/\").length - 1; // counts the number of directories between the directory and the entry file\n var relDirFix = \"../\".repeat(numberOfNestedDirectories);\n\n /* Update the reference */\n var oldReference = this.html.html(cScriptElement);\n var newReference = `<script src=\"${path.join(relDirFix, relativeFilePath)}\"></script>`;\n this.updateCode(oldReference, newReference);\n this.saveFile();\n\n\n \n });\n }", "title": "" }, { "docid": "03d1e6b5377444a4c9758edf8dbf3022", "score": "0.48944938", "text": "static npminstall ( name, version, scope ) {\n\n }", "title": "" }, { "docid": "f463acdf3eb14137292ab39a92919a27", "score": "0.48927417", "text": "release() {\n this.requireOverrides.map((override) => {\n override.release();\n });\n require = Require.__require;\n let parent = module.parent;\n while (!!parent) {\n if (!parent.require) {\n parent.require = parent.require['_' + parent.filename + module.filename];\n parent.require['_' + parent.filename + module.filename] = false;\n delete parent['override'];\n }\n \n let children = (modules) => {\n if (!modules || modules.length == 0) {\n return;\n }\n modules.map((child) => {\n if (!child.require['_' + child.filename + module.filename]) { \n return;\n }\n child.require = child.require['_' + child.filename + module.filename];\n child.require['_' + child.filename + module.filename] = false;\n delete child['override'];\n children(child.children);\n });\n };\n children(parent.children);\n parent = parent.parent;\n }\n delete require['override'];\n }", "title": "" }, { "docid": "e2344a35427e0054d83652a73b929925", "score": "0.4890816", "text": "_itemContentChanged(newValue,oldValue){if(newValue){var html=newValue;// only append if not empty\nif(null!==html){html=(0,_haxutils.encapScript)(newValue);(0,_haxutils.wipeSlot)(this,\"*\");// insert the content as quickly as possible, then work on the dynamic imports\n_async.microTask.run(()=>{setTimeout(()=>{let frag=document.createRange().createContextualFragment(html);(0,_polymerDom.dom)(this).appendChild(frag)},5)});// if there are, dynamically import them\nif(this.manifest.metadata.dynamicElementLoader){let tagsFound=(0,_haxutils.findTagsInHTML)(html);const basePath=(0,_resolveUrl.pathFromUrl)(decodeURIComponent(meta.url));for(var i in tagsFound){const tagName=tagsFound[i];if(this.manifest.metadata.dynamicElementLoader[tagName]&&!window.customElements.get(tagName)){new Promise((res,rej)=>_require.default([`${basePath}../../../../../${this.manifest.metadata.dynamicElementLoader[tagName]}`],res,rej)).then(response=>{//console.log(tagName + ' dynamic import');\n}).catch(error=>{/* Error handling */console.log(error)})}}}}}}", "title": "" }, { "docid": "c59ea220f738b8f558d701ea2c89168a", "score": "0.48705372", "text": "function AddModule(name, id)\n{\n elements.watcher.append(\"<div id='modtree_title_\" + id + \"' style='text-align:center'>\" + name + \"<div style='text-align:left' id='modtree_\" + id + \"'></div></div>\");\n\n var mod = $(\"#modtree_\" + id);\n\n $(mod).dynatree({\n onKeydown : KeyPressModuleWatch\n });\n\n ModuleTreeRoots[name] = $(mod).dynatree(\"getRoot\");\n\n\n}", "title": "" }, { "docid": "1f9c323b10dddb7b4244d0c486a5565d", "score": "0.48696366", "text": "getModuleName() {\n return 'numerictextbox';\n }", "title": "" }, { "docid": "75a63c69dd7223f13d5285d9864a80ba", "score": "0.48693508", "text": "function updateBowerJson(){ \n return update_bower_json; \n}", "title": "" }, { "docid": "dc56c12e5029db93285b2e9009d4f4fe", "score": "0.4864017", "text": "function assetDeployHTML(asset){\n\tvar html='';\n\tif (asset) {\n\t\thtml += '<div class=\"asset-description\">';\n html += '\t<div class=\"asset-description-header\">';\n html += ' \t<div class=\"row\">';\n html += ' <div class=\"span9\">';\n html += ' <div class=\"editor-warpper\">';\n\t\thtml += '\t \t\t<ul class=\"nav nav-tabs mytabs\">';\n\t\thtml += '\t\t\t\t\t <li class=\"active\"><a href=\"#myeditor\" data-toggle=\"tab\">Editor</a></li>';\n\t\thtml += '\t\t\t\t\t <li><a href=\"#raw-json\" data-toggle=\"tab\">Raw JSON</a></li>';\n\t\thtml += '\t\t\t\t\t <li><a href=\"#editor-help\" data-toggle=\"tab\">Help</a></li>';\n\t\thtml += '\t\t\t\t\t</ul>';\n\t\thtml += '\t\t\t\t\t<div class=\"tab-content\">';\n\t\thtml += '\t\t\t\t\t <div class=\"tab-pane active json-editor\" id=\"myeditor\"></div>';\n\t\thtml += '\t\t\t\t\t <div class=\"tab-pane\" id=\"raw-json\"><textarea id=\"raw-json-edit\" class=\"form-control\"></textarea></div>';\n\t\thtml += '\t\t\t\t\t <div class=\"tab-pane\" id=\"editor-help\">' +\n\n\t\t\t\t\t\t\t\t\t\t'<div class=\"table-responsive\">'+\n\t\t\t\t\t\t\t\t\t\t '<table class=\"table\">'+\n\t\t\t\t\t\t\t\t\t\t '<thead><tr><th>Key</th><th>Description</th></tr></thead>'+\n\t\t\t\t\t\t\t\t\t\t '<tbody>'+\n\t\t\t\t\t\t\t\t\t\t \t'<tr ><td class=\"h-array\"></td><td>Array</td></tr>'+\n\t\t\t\t\t\t\t\t\t\t \t'<tr><td class=\"h-object\"></td><td>Object</td></tr>'+\n\t\t\t\t\t\t\t\t\t\t \t'<tr><td class=\"h-string\"></td><td>String</td></tr>'+\n\t\t\t\t\t\t\t\t\t\t \t'<tr><td class=\"h-number\"></td><td>Number</td></tr>'+\n\t\t\t\t\t\t\t\t\t\t \t'<tr><td class=\"h-boolean\"></td><td>Boolean</td></tr>'+\n\t\t\t\t\t\t\t\t\t\t \t'<tr><td></td><td>Delete a property name to remove item</td></tr>'+\n\t\t\t\t\t\t\t\t\t\t '</tbody>'+\n\t\t\t\t\t\t\t\t\t\t '</table>'+\n\t\t\t\t\t\t\t\t\t\t'</div>'+\n\t\t\t\t\t\t\t\t\t '</div>';\n\t\thtml += '\t\t\t\t\t</div>';\n html += ' </div>';\n html += ' <div class=\"asset-introduction-box\">';\n html += ' <img src=\"'+asset.attributes.images_thumbnail+'\" class=\"intro-img\">';\n html += ' <h3>'+asset.attributes.overview_name+'</h3>';\n html += ' <small> Version : '+asset.attributes.overview_version+'</small>';\n html += ' <small> Version : '+asset.attributes.overview_category+'</small>';\n html += ' <small> by : '+asset.attributes.overview_provider+' </small>';\t\n\t\thtml +=\t\t\t\t'<small><button type=\"button\" class=\"btn btn-danger asset-curl-btn\" style=\"position: relative;\" id=\"'+asset.id\n\t\t\t\t\t\t\t+'\" data-name=\"'+asset.attributes.overview_deployablename+'\"> Deploy </button></small>';\n html += ' </div>';\n\t\thtml += '\t\t\t</div>';\n\t\thtml += '\t\t</div>';\n html += ' </div>';\n html += '</div>';\n\t}\n\n\treturn html;\n}", "title": "" }, { "docid": "edcbb6783b00d6901fa5feea1a1f0b04", "score": "0.4860389", "text": "function install() {\n console.log('install module');\n}", "title": "" }, { "docid": "486906bb0fbd10ae9a01cc3a3c99d54f", "score": "0.48593906", "text": "function updateModulesForCommonModule(options) {\n return (tree, context) => {\n logging_1.logInfoWithDescriptor('Aktualisiere die Components aus LuxCommonModule.');\n return util_1.waitForTreeCallback(tree, () => {\n const luxCommonComponentTags = [\n 'lux-badge',\n 'lux-label',\n 'lux-message-box',\n 'lux-message',\n 'lux-progress',\n 'lux-spinner',\n 'lux-table',\n 'lux-table-column',\n 'lux-table-column-content',\n 'lux-table-column-footer',\n 'lux-table-column-header',\n ];\n const luxCommonComponentNames = [\n 'LuxBadgeComponent',\n 'LuxLabelComponent',\n 'LuxMessageBoxComponent',\n 'LuxMessageComponent',\n 'LuxProgressComponent',\n 'LuxSpinnerComponent',\n 'LuxTableComponent',\n 'LuxTableColumnComponent',\n 'LuxTableColumnContentComponent',\n 'LuxTableColumnFooterComponent',\n 'LuxTableColumnHeaderComponent',\n ];\n files_1.searchInComponentAndModifyModule(tree, options.path + '/src/app', [...luxCommonComponentTags, ...luxCommonComponentNames], (filePath, content) => {\n if (content.indexOf('LuxCommonModule') === -1) {\n // Den Import anpassen import { LuxLookupModule } from 'lux-components';\n content = 'import { LuxCommonModule } from \\'lux-components\\';\\n' + content;\n // Das imports-Array anpassen\n const matches = content.match(/imports:(.*)\\[((.|\\n)*?)\\]/gm);\n if (matches && matches.length > 0) {\n let importString = matches[0];\n importString = importString.trim().replace(/\\s\\s+/g, '');\n let importEntries = importString.substring(importString.indexOf('[') + 1, importString.length - 1);\n if (!importEntries.trim().endsWith(',')) {\n importEntries = importEntries.trim() + ',';\n }\n importEntries += 'LuxCommonModule';\n importString = 'imports: [\\n\\t\\t' + importEntries + '\\n\\t]';\n importString = importString.replace(/,/gm, ',\\n\\t\\t');\n content = content.replace(matches[0], importString);\n tree.overwrite(filePath, content);\n }\n }\n }, '.ts', '.html');\n logging_1.logSuccess(`Module erfolgreich angepasst.`);\n return tree;\n });\n };\n}", "title": "" }, { "docid": "ddffde59412dd552c14c5dc81c08da04", "score": "0.48563504", "text": "function MissingBlockWarning(_ref) {\n var attributes = _ref.attributes,\n convertToHTML = _ref.convertToHTML;\n var originalName = attributes.originalName,\n originalUndelimitedContent = attributes.originalUndelimitedContent;\n var hasContent = !!originalUndelimitedContent;\n var hasHTMLBlock = registration_getBlockType('core/html');\n var actions = [];\n var messageHTML;\n\n if (hasContent && hasHTMLBlock) {\n messageHTML = Object(i18n_build_module[\"sprintf\"])(\n /* translators: %s: block name */\n Object(i18n_build_module[\"__\"])('Your site doesn’t include support for the \"%s\" block. You can leave this block intact, convert its content to a Custom HTML block, or remove it entirely.'), originalName);\n actions.push(Object(react[\"createElement\"])(build_module_button[\"a\" /* default */], {\n key: \"convert\",\n onClick: convertToHTML,\n isLarge: true,\n isPrimary: true\n }, Object(i18n_build_module[\"__\"])('Keep as HTML')));\n } else {\n messageHTML = Object(i18n_build_module[\"sprintf\"])(\n /* translators: %s: block name */\n Object(i18n_build_module[\"__\"])('Your site doesn’t include support for the \"%s\" block. You can leave this block intact or remove it entirely.'), originalName);\n }\n\n return Object(react[\"createElement\"])(react[\"Fragment\"], null, Object(react[\"createElement\"])(warning, {\n actions: actions\n }, messageHTML), Object(react[\"createElement\"])(raw_html[\"a\" /* default */], null, originalUndelimitedContent));\n}", "title": "" }, { "docid": "251d27a5e47c048366fb2c01a88f636b", "score": "0.4848683", "text": "function templateContent() {\n const html = fs.readFileSync(\n path.resolve(process.cwd(), 'app/index.html')\n ).toString();\n\n if (!dllPlugin) { return html; }\n\n const doc = cheerio(html);\n const body = doc.find('body');\n const dllNames = !dllPlugin.dlls ? ['reactBoilerplateDeps'] : Object.keys(dllPlugin.dlls);\n\n dllNames.forEach((dllName) => body.append(`<script data-dll='true' src='/${dllName}.dll.js'></script>`));\n\n return doc.toString();\n}", "title": "" }, { "docid": "c7b38b033e4252ddcf27b200a8c115c7", "score": "0.48350966", "text": "function load(){\n\t // b()\n\t tool()\n\t console.log('全部文件都从一个入口打包')\n\t //虽然始终会加载\n\t if(true){\n\t __webpack_require__.e/* nsure */(2, function(require){\n\t var di = __webpack_require__(13)\n\t })\n\t }\n\t}", "title": "" }, { "docid": "a5e3b8c285c44ff361dfcc20b8718ab4", "score": "0.48338774", "text": "function checkModules(action) {\n if (!action) action = 'test';\n var myurl = \"index.php?option=com_templateck&view=templateck&layout=ajaxcheckmodules&tmpl=component\"\n +\"&positions=\"+$$('.ckbloc').getProperty('ckmoduleposition')\n +\"&action=\"+action;\n\n var packageRequest = new Request.HTML({\n url:myurl,\n method: 'get',\n update: document.id('modules_code_inner'),\n onRequest: function(){\n // document.id('packagestepxml').set('text', Joomla.JText._('CK_LOADING', 'Loading...'));\n },\n onSuccess: function(){\n // document.id('packagestepxml').set('text', Joomla.JText._('CK_LOAD_SUCCESS_STEP_XML', 'Next step finished with success'));\n },\n onFailure: function(){\n // document.id('packagestepxml').set('text', Joomla.JText._('CK_LOAD_FAILURE_STEP_XML', 'Next step encounter some errors'));\n }\n });\n packageRequest.send();\n\n\n\n}", "title": "" }, { "docid": "18e0fc5a598745525f094cfddf0fb5af", "score": "0.48295876", "text": "function i(){throw new Error(\"Dynamic requires are not currently supported by rollup-plugin-commonjs\")}", "title": "" }, { "docid": "0ff72ff7d5169526954f64226d52c846", "score": "0.48182747", "text": "getComponent(nextState, cb) {\n /* Webpack - use 'require.ensure' to create a split point\n and embed an async module loader (jsonp) when bundling */\n require.ensure(\n [],\n require => {\n /* Webpack - use require callback to define\n dependencies for bundling */\n const RecommendCompanyList = require('./components/RecommendCompanyList')\n .default\n const RecommendCompanyListTitle = require('./title/RecommendCompanyListTitle')\n .default\n\n cb(null, {\n title: RecommendCompanyListTitle,\n content: RecommendCompanyList\n })\n\n /* Webpack named bundle */\n },\n 'RecommendCompanyList'\n )\n }", "title": "" }, { "docid": "506fb3d0f854a6f1344172da745da019", "score": "0.4816036", "text": "function loadUpdateChunk(chunkId, updatedModulesList) {\n/******/ \t\t\tvar update = require(\"./\" + __webpack_require__.hu(chunkId));\n/******/ \t\t\tvar updatedModules = update.modules;\n/******/ \t\t\tvar runtime = update.runtime;\n/******/ \t\t\tfor(var moduleId in updatedModules) {\n/******/ \t\t\t\tif(__webpack_require__.o(updatedModules, moduleId)) {\n/******/ \t\t\t\t\tcurrentUpdate[moduleId] = updatedModules[moduleId];\n/******/ \t\t\t\t\tif(updatedModulesList) updatedModulesList.push(moduleId);\n/******/ \t\t\t\t}\n/******/ \t\t\t}\n/******/ \t\t\tif(runtime) currentUpdateRuntime.push(runtime);\n/******/ \t\t}", "title": "" }, { "docid": "506fb3d0f854a6f1344172da745da019", "score": "0.4816036", "text": "function loadUpdateChunk(chunkId, updatedModulesList) {\n/******/ \t\t\tvar update = require(\"./\" + __webpack_require__.hu(chunkId));\n/******/ \t\t\tvar updatedModules = update.modules;\n/******/ \t\t\tvar runtime = update.runtime;\n/******/ \t\t\tfor(var moduleId in updatedModules) {\n/******/ \t\t\t\tif(__webpack_require__.o(updatedModules, moduleId)) {\n/******/ \t\t\t\t\tcurrentUpdate[moduleId] = updatedModules[moduleId];\n/******/ \t\t\t\t\tif(updatedModulesList) updatedModulesList.push(moduleId);\n/******/ \t\t\t\t}\n/******/ \t\t\t}\n/******/ \t\t\tif(runtime) currentUpdateRuntime.push(runtime);\n/******/ \t\t}", "title": "" }, { "docid": "506fb3d0f854a6f1344172da745da019", "score": "0.4816036", "text": "function loadUpdateChunk(chunkId, updatedModulesList) {\n/******/ \t\t\tvar update = require(\"./\" + __webpack_require__.hu(chunkId));\n/******/ \t\t\tvar updatedModules = update.modules;\n/******/ \t\t\tvar runtime = update.runtime;\n/******/ \t\t\tfor(var moduleId in updatedModules) {\n/******/ \t\t\t\tif(__webpack_require__.o(updatedModules, moduleId)) {\n/******/ \t\t\t\t\tcurrentUpdate[moduleId] = updatedModules[moduleId];\n/******/ \t\t\t\t\tif(updatedModulesList) updatedModulesList.push(moduleId);\n/******/ \t\t\t\t}\n/******/ \t\t\t}\n/******/ \t\t\tif(runtime) currentUpdateRuntime.push(runtime);\n/******/ \t\t}", "title": "" }, { "docid": "fe49c62be9b5bf01ead2825d9e4004d0", "score": "0.48120278", "text": "function makeHtmlFlexibleModules(bloc, blocid, blocclass, j) {\n\t// initialisation\n\tbloc = $ck(bloc);\n\tvar code = new Array(\"head\", \"body\");\n\tcode[\"head\"] = '';\n\tcode[\"body\"] = '';\n\n\tcode[\"body\"] += '|tab|<?php if ($nbmodules' + j + ') : ?>|rr|'\n\t\t\t+ '|tab|<div' + blocid + blocclass + '>|rr|'\n\t\t\t+ '|tab||tab|<div class=\"inner clearfix <?php echo \\'n\\'.$nbmodules' + j + ' ?>\">|rr|';\n\n\tcode[\"head\"] += '<?php|rr|'\n\t\t\t+ '$nbmodules' + j + ' = ';\n\n\t$ck('.flexiblemodule', bloc).each(function(i, module) {\n\t\tmodule = $ck(module);\n\t\tif (module.attr('isdisabled') != 'true') {\n\t\t\tif (i > 0)\n\t\t\t\tcode[\"head\"] += ' + ';\n\t\t\t// retrieve data for the block\n\t\t\tmodule.ckid = module.attr(\"id\") ? ' id=\"' + module.attr(\"id\") + '\"' : '';\n\t\t\tmodule.classe = module.attr(\"ckclass\") ? module.attr(\"ckclass\") : '';\n\t\t\tmodule.jdocstyle = module.attr(\"ckmodulestyle\") ? ' style=\"' + module.attr(\"ckmodulestyle\") + '\"' : ' style=\"xhtml\"';\n\t\t\tmodule.jdocposition = module.attr(\"ckmoduleposition\") ? module.attr(\"ckmoduleposition\") : '';\n\n\t\t\tcode[\"body\"] += '|tab||tab||tab|<?php if ($this->countModules(\\'' + module.jdocposition + '\\')) : ?>|rr|'\n\t\t\t\t\t+ '|tab||tab||tab|<div' + module.ckid + ' class=\"flexiblemodule ' + module.classe + '\">|rr|'\n\t\t\t\t\t+ '|tab||tab||tab||tab|<div class=\"inner clearfix\">|rr|'\n\t\t\t\t\t+ '|tab||tab||tab||tab||tab|<jdoc:include type=\"modules\" name=\"' + module.jdocposition + '\"' + module.jdocstyle + ' />|rr|'\n\t\t\t\t\t+ '|tab||tab||tab||tab|</div>|rr|'\n\t\t\t\t\t+ '|tab||tab||tab|</div>|rr|'\n\t\t\t\t\t+ '|tab||tab||tab|<?php endif; ?>|rr|';\n\n\t\t\tcode[\"head\"] += '(bool)$this->countModules(\\'' + module.jdocposition + '\\')';\n\t\t}\n\t});\n\tcode[\"body\"] += '|tab||tab||tab|<div class=\"clr\"></div>|rr|'\n\t\t\t+ '|tab||tab|</div>|rr|'\n\t\t\t+ '|tab|</div>|rr|'\n\t\t\t+ '|tab|<?php endif; ?>|rr||rr|';\n\n\tcode[\"head\"] += ';|rr|'\n\t\t\t+ '?>|rr||rr|';\n\n\treturn code;\n}", "title": "" }, { "docid": "bddbf1aac231b0f59b6580b5a200cc5e", "score": "0.4805466", "text": "function MK_Append_New_Module_galerij(rij_id, mod_id, kolom_id, module_class, module_galerij, module_slot, module_view, module_size, module_target) { jQuery(function ($) {\n\n\t$(\"#rij_\" + rij_id + \" .kolom.kolom_\" + kolom_id + \" .newrij_inner\" ).append(\n\n\t\t'<li id=\"mod_id_'+mod_id+'\" class=\"module module_galerij\" type=\"galerij\">'+\n\n\t\t\t'<div class=\"mod_titel\">'+\n\n\t\t\t\t//'<div id=\"edit\" class=\"edit\" onclick=\"editModuleTekst('+mod_id+')\"></div>'+\n\n\t\t\t\t//'<div id=\"module_kopieren\" class=\"module_kopieren\" onclick=\"module_kopieren('+mod_id+')\"></div>'+\n\n\t\t\t\t'<div class=\"mod_naam\">Galerij module <span>'+mod_id+ '</span></div>'+\n\n\t\t\t\t//'<div id=\"delete\" class=\"delete\" onclick=\"deleteModule('+mod_id+')\"></div>'+\n\n\t\t\t\t'<div class=\"mod_gegevens\" module_class=\"'+module_class+'\" module_galerij=\"'+module_galerij+'\" module_view=\"'+module_view+'\" module_slot=\"'+module_slot+'\" module_size=\"'+module_size+'\" module_target=\"'+module_target+'\">'+\n\n\t\t\t\t'</div>'+\n\n\t\t\t'</div>'+\n\n\t\t\t'<div class=\"mod_inner\">'+\n\n\t\t\t\t'<div class=\"galerij_items\">'+\n\n\t\t\t\t\t//'<div class=\"module_preview_galerij module_preview\" onclick=\"editModuleTekst('+mod_id+')\"></div>'+\n\n\t\t\t\t\t//'<div class=\"module_preview_edit\" onclick=\"editModuleTekst('+mod_id+')\">Aanpassen</div>' +\n\n\t\t\t\t'</div>'+\n\n\n\t\t\t'</div>'+\n\n\t\t'</li>'\n\n\t);\n\n\n\tif(builder_admin == 0 || builder_admin == 1 && module_slot != 1)\n\t{\n\n\t\tif(builder_klant_create == 0 || builder_klant_edit == 0)\n\t\t{\n\t\t\t$('#mod_id_'+mod_id+' .mod_titel').append(\n\n\t\t\t\t'<div id=\"delete\" class=\"delete\" onclick=\"deleteModule('+mod_id+')\"></div>'\n\t\t\t);\n\n\t\t\t$('#mod_id_'+mod_id+' .mod_titel').prepend(\n\n\t\t\t\t'<div id=\"module_kopieren\" class=\"module_kopieren\" onclick=\"module_kopieren('+mod_id+')\"></div>'\n\t\t\t);\n\t\t}\n\n\t\tif(builder_klant_edit == 0)\n\t\t{\n\t\t\t$('#mod_id_'+mod_id+' .mod_titel').prepend(\n\n\t\t\t\t'<div id=\"edit\" class=\"edit\" onclick=\"editModuleTekst('+mod_id+')\"></div>'\n\t\t\t);\n\n\t\t\t$('#mod_id_'+mod_id+' .mod_inner .galerij_items').append(\n\n\t\t\t\t'<div class=\"module_preview_galerij module_preview\" onclick=\"editModuleTekst('+mod_id+')\"></div>'+\n\n\t\t\t\t'<div class=\"module_preview_edit\" onclick=\"editModuleTekst('+mod_id+')\">Aanpassen</div>'\n\t\t\t);\n\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$('#mod_id_'+mod_id+' .mod_inner .galerij_items').append(\n\t\t\t\t'<div class=\"module_preview_galerij module_preview\"></div>'\n\t\t\t);\n\t\t}\n\n\t\t\n\t}\n\telse\n\t{\n\t\t$('#mod_id_'+mod_id+'').addClass('module_opslot');\n\n\t\t$('#mod_id_'+mod_id+' .mod_inner').append(\n\t\t\t'<div class=\"module_preview_galerij module_preview\" ></div>'\n\t\t);\n\t}\n\n\n\tif(module_galerij != \"\" && module_target != 1)\n\t{\n\n\t\tif(string_images != \"\") { string_images += \",\"; }\n\n\t\tstring_images += module_galerij;\n\n\t\t//module_galerij\n\n\t\tvar array_galerij_module = module_galerij.split(',');\n\n\t\t//console.log( array_galerij_module.length + \"\" + array_galerij_module );\n\n\t\tfor(var i = 0; i < array_galerij_module.length; i++)\n\t\t{\n\t\t\tif(string_images_location != \"\") \n\t\t\t{ \n\n\t\t\t\tstring_images_location += ',#mod_id_'+mod_id+' .module_preview_galerij'; \n\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\n\t\t\t\tstring_images_location += '#mod_id_'+mod_id+' .module_preview_galerij';\n\n\t\t\t}\n\t\t\tif(string_images_type != \"\") { string_images_type += \",\"; }\n\n\t\t\tstring_images_type += \"galerij\";\n\n\t\t}\n\n\t}\n\n}); }", "title": "" }, { "docid": "26c550d3d0379148c0a3d1dff5266505", "score": "0.48027158", "text": "contentFor (type, config) {\n if (type === 'head-footer') {\n var fileName = config.environment === 'production' ? 'esri-loader.min.js' : 'esri-loader.js';\n return '<script src=\"' + (config.rootURL || '') + 'assets/' + fileName + '\"></script>';\n }\n }", "title": "" }, { "docid": "9c341fb56bc19bbcaecfd9f80f1b6013", "score": "0.48015025", "text": "function annotateDependencies(deps) {\n var ul = document.getElementById(\"modules\");\n for(var i = 0, l = deps.length; i < l; i++) {\n var e = deps[i]\n , depender = e[0]\n , on = e[1];\n MONEY.each(on,function(o){\n var $li = MONEY(\"#\"+o).addClass(\"depended\");\n $li.append(cabin.o(\"p.depender\",\"Depended on by \"+depender));\n modules.appendChild($li[0]);\n });\n }\n }", "title": "" }, { "docid": "2344a40d94e5a9f208ebb97121ce15de", "score": "0.4800929", "text": "function expandCodiusModules(path) {\n if (path.indexOf('.') !== 0 && path.indexOf('codius_modules') !== 0) {\n path = './codius_modules/' + path;\n }\n return path;\n }", "title": "" }, { "docid": "2ee23956feef7a7d57b45e7087a2fada", "score": "0.4799852", "text": "function prepareGoDependencies(mod) {\n if (!mod) {\n return { name: \"\", modules: {} };\n }\n const [, mainModuleLine, ...versionsLines] = mod.split(\"\\n\");\n const [, name] = mainModuleLine.split(\"\\t\");\n const modules = versionsLines.reduce((accum, curr) => {\n // Skip If for some reason after splitting there is a empty line\n if (!curr) {\n return accum;\n }\n const [, name, ver] = curr.split(\"\\t\");\n // Versions in Go have trailing 'v'\n let version = ver.substring(1);\n // In versions with hash, we only care about hash\n // v0.0.0-20200905004654-be1d3432aa8f => #be1d3432aa8f\n version = version.includes(\"-\")\n ? `#${version.substring(version.lastIndexOf(\"-\") + 1)}`\n : version;\n accum[name] = version;\n return accum;\n }, {});\n return { name, modules };\n}", "title": "" } ]
c20308423b60456aaa8dcf30eefcfede
Decrypt all data in the object
[ { "docid": "c4ea0a41127f675679150a3f27304d3c", "score": "0.628595", "text": "async decryptDbData(cipherText) {\n var plainText = [];\n for(let cipher of cipherText){\n for (let key in cipher) {\n if (cipher.hasOwnProperty(key)) {\n if(await _allow (key)){\n if(cipher[key] != null){\n if(cipher[key] == null) console.log(\"ASF\");\n cipher[key] = await this.decrypt(cipher[key]);\n }\n }\n }\n var cipherArr = cipher;\n }\n plainText.push(cipherArr);\n }\n return plainText;\n }", "title": "" } ]
[ { "docid": "e1343a56b8700be50b8eff15a4fa20d6", "score": "0.67944306", "text": "function decryptWithYourPrivate() {\n decryptMyPrivate();\n}", "title": "" }, { "docid": "0a70c3cff5066e7a22ee7dace0d5f351", "score": "0.65403056", "text": "Decrypt(text){\n let reponse = new Object()\n reponse.decryptedValide = false\n reponse.decryptedData = \"\"\n let Cryptr = require('cryptr')\n let cryptr = new Cryptr(this._Secret)\n try {\n reponse.decryptedData = cryptr.decrypt(text)\n reponse.decryptedValide = true\n } catch (error) {\n this.LogAppliError(\"cryptr non valide\", \"Server\", \"Server\")\n }\n return reponse\n }", "title": "" }, { "docid": "fbc7178ac35058e400fcfba30d6d0b3a", "score": "0.6536163", "text": "async decrypt_values(obj, filter = null, uuid = null) {\n return await this.walk_values_async(obj, filter, async function(val) {\n return await global.frostybot._modules_['encryption'].decrypt(val, uuid);\n }); \n }", "title": "" }, { "docid": "5cc72b4a306b7444e4bb23165f0981bb", "score": "0.650873", "text": "decrypt(seed){\n if(this.isEncrypted()) this.keychain = Keychain.fromJson(CryptoJS.AES.decrypt(this.keychain, seed));\n }", "title": "" }, { "docid": "33af254e24e8b9b8c10bfbb21920f7d4", "score": "0.6391329", "text": "decrypt(dataArrayBuffer) {\n if (!this.isConfigExecuted) {\n throw new Error(\n 'Must configurate cypher-aes before call this method, use the method config()'\n );\n }\n return this.isStaticInitialVector\n ? this.generateEncryptMethodInstance().decrypt(dataArrayBuffer)\n : this.enctrypMethodInstance.decrypt(dataArrayBuffer);\n }", "title": "" }, { "docid": "59c52d1fc99c90335ef1c13be4493955", "score": "0.6354177", "text": "static decrypt(data, key) {\n\n const keyAsBytes = aesjs.utils.hex.toBytes(key);\n\n const iv = data['iv'];\n const cipherText = data['cipherText'];\n\n const ivAsBytes = aesjs.utils.hex.toBytes(iv);\n const cipherAsBytes = aesjs.utils.hex.toBytes(cipherText);\n\n const aesOfb = new aesjs.ModeOfOperation.cbc(keyAsBytes, ivAsBytes);\n\n let decryptedBytes = aesOfb.decrypt(cipherAsBytes);\n decryptedBytes = aesjs.padding.pkcs7.strip(decryptedBytes);\n\n return aesjs.utils.utf8.fromBytes(decryptedBytes);\n }", "title": "" }, { "docid": "90cb8ec0a564a974f1df975f7ff265e6", "score": "0.62496376", "text": "decrypt(str, settings){}", "title": "" }, { "docid": "13222eb31572b73c8ca8fbd03036f082", "score": "0.62360924", "text": "decrypt(data) {\n let key = \"2139226343519743\";\n let iv = \"4370627107694550\";\n key = CryptoJS.enc.Utf8.parse(key);\n iv = CryptoJS.enc.Utf8.parse(iv);\n\n let decrypted = CryptoJS.AES.decrypt(\n data, key,\n {\n iv: iv,\n padding: CryptoJS.pad.ZeroPadding\n }\n );\n return decrypted.toString(CryptoJS.enc.Utf8);\n }", "title": "" }, { "docid": "fdbfa10f43ea95562338d8339f115d20", "score": "0.6220367", "text": "decrypt(data, key) {\n if (data.length == 0) {\n return '';\n }\n let aesMode, dataToDecrypt;\n if (data.length % 16 == 0) {\n // ECB\n aesMode = new Aes.ModeOfOperation.ecb(key);\n dataToDecrypt = data;\n } else if (data.length % 16 == 1 && data[0] == '!'.charCodeAt(0)) {\n // CBC\n let iv = data.subarray(1,17);\n aesMode = new Aes.ModeOfOperation.cbc(key, iv);\n dataToDecrypt = data.subarray(17, data.length);\n } else {\n throw new Error(`Unable to decrypt data of length ${data.length}`);\n }\n let decryptedBytes = Aes.padding.pkcs7.strip(aesMode.decrypt(dataToDecrypt));\n return Aes.utils.utf8.fromBytes(decryptedBytes);\n }", "title": "" }, { "docid": "63dda95f58c4d704c7c8d97c9f08d98a", "score": "0.6080048", "text": "function decrypt(data,key){\n\tvar decipher = crypto.createDecipher('aes256', key);\n var decrypted = decipher.update(data, 'hex', 'utf-8');\n decrypted += decipher.final('utf-8');\n return decrypted;\n}", "title": "" }, { "docid": "eae158a8254cbcc30c738be8d70beda0", "score": "0.6033423", "text": "function decrypt(key, data) {\n var decipher = crypto.createDecipher('aes-256-cbc', key);\n var decrypted = decipher.update(data, 'hex', 'utf-8');\n decrypted += decipher.final('utf-8');\n return decrypted;\n}", "title": "" }, { "docid": "dc7ec34cdad533da194cb5f92f7638ad", "score": "0.602911", "text": "decrypt(text, publicKey) {\n const privateKey = this.state.privateKey;\n\n const myKey = new NodeRSA();\n myKey.importKey(privateKey, 'private');\n\n const otherKey = new NodeRSA();\n otherKey.importKey(publicKey, 'public');\n\n return otherKey.decryptPublic(\n myKey.decrypt(text, 'base64'),\n 'utf8'\n );\n }", "title": "" }, { "docid": "78241f8671ecb012228f7652956b7934", "score": "0.60155845", "text": "function decrypt(text) { \n \n var inmess = Buffer.from(text);\n let ivv = Buffer.from(iv, 'hex'); \n let encryptedText = Buffer.from(inmess, 'hex'); \n let decipher = crypto.createDecipheriv('aes-256-cbc', Buffer.from(key), ivv); \n let decrypted = decipher.update(encryptedText); \n decypted = Buffer.concat([decrypted, decipher.final()]); \n //console.log(decypted.toString());\n var txt=decypted.toString()\n return txt; \n}", "title": "" }, { "docid": "aa7eed106f58ff8b2cbb5d9aa004b26e", "score": "0.5946873", "text": "function decryptData(data) {\n\tlogger.info(\"Inside decryptData..\");\n\tvar decipher = crypto.createDecipher(encryptionType, cipherPwd);\n\tlogger.info(\"decipher is \" + decipher);\n\ttry {\n\t\tvar decrypted = decipher.update(data, config.HEX, config.UTF8);\n\t\tlogger.info(\"decrypted1 is \" + decrypted);\n\t\tdecrypted += decipher.final(\"utf8\");\n\t\tlogger.info(\"decrypted1 is \" + decrypted);\n\t\treturn decrypted;\n\t} catch (exception) {\n\t\tlogger.info(\"Exception in decrypting...\");\n\t\t//callback(exception);\n\t}\n}", "title": "" }, { "docid": "7efb6468b2ce1b5108b9c70ed60e1f96", "score": "0.59462637", "text": "decrypt(encrypted) {\n logger_1.Logger.log.debug(\"AesEncryptor.decrypt: start.\");\n if (!this.passphrase) {\n throw new encryption_error_1.EncryptionError(\"Encryption passphrase not available.\", \"AES256\");\n }\n try {\n logger_1.Logger.log.debug(`AesEncryptor.decrypt: encrypted data: ${encrypted}`);\n let params = this.deriveKeyAndIV(encrypted);\n let decipher = Crypto.createDecipheriv(\"aes256\", params.key, params.iv);\n let decrypted = decipher.update(params.content, \"base64\", \"utf8\");\n decrypted += decipher.final(\"utf8\");\n logger_1.Logger.log.debug(`AesEncryptor.decrypt: data decrypted successfully.`);\n return decrypted;\n }\n catch (e) {\n logger_1.Logger.log.error(`AesEncryptor.decrypt: Failed to decrypt: ${e}`);\n throw new encryption_error_1.EncryptionError(`Failed to decrypt: ${e}`, \"AES256\");\n }\n }", "title": "" }, { "docid": "440d7ec8c6cd4e666c5bbfbc3023dac0", "score": "0.59233624", "text": "function aesDecryption(crypted, password){\r\n var bytes = CryptoJS.AES.decrypt(crypted, password);\r\n var originalText = bytes.toString(CryptoJS.enc.Utf8);\r\n return originalText;\r\n}", "title": "" }, { "docid": "8d88295872fd3824b96e3f0705822cc4", "score": "0.58896947", "text": "function decrypt(text){\n var decipher = crypto.createDecipher('aes-256-ctr', clave)\n var dec = decipher.update(text,'hex','utf8')\n dec += decipher.final('utf8');\n return dec;\n }", "title": "" }, { "docid": "6b84e5c364e2c972a4a8de47e8085ba6", "score": "0.58550155", "text": "async decrypt(cipher){\n if(this._iv === undefined) throw new Error(\"No IV defined!\");\n var plainText = \"\";\n var cipherTextBlock = _splitCipherBlock(cipher);\n var subIv = _newIv(this._iv);\n if(cipherTextBlock !== null)\n for(let cipherBlock of cipherTextBlock){\n var cipherBlockWithIv = _decryptBlock(cipherBlock, this._algorithm, this._password);\n var encodedBlockWithIv = _encode(cipherBlockWithIv, this._plainTextBlockSize);\n var encodedBlock = _xor(encodedBlockWithIv[0], subIv);\n var plainTextBlock = _decode(encodedBlock);\n subIv = _newIv(cipherBlock);\n plainText += plainTextBlock;\n }\n return plainText;\n }", "title": "" }, { "docid": "3b37c5a1d0eb524a975b42ede412cffc", "score": "0.58500844", "text": "function decrypt()\n{\n\ttry\n\t{\n\t\tvar algo=\"aes\";\n\t\t\n\t\tif(kony.os.deviceInfo().name == \"blackberry\")\n\t\t\tvar encryptDecryptKey = kony.crypto.newKey(\"passphrase\", 128, {passphrasetext: [\"inputstring1inputstring1\"], subalgo: \"aes\", passphrasehashalgo: \"md5\"});\n\t\telse\n\t\t\tvar encryptDecryptKey = kony.crypto.newKey(\"passphrase\", 128, {passphrasetext: [\"inputstring1\"], subalgo: \"aes\", passphrasehashalgo: \"md5\"});\n\n\t\tvar prptobj= {padding:\"pkcs5\",mode:\"cbc\",initializationvector:\"1234567890123456\"};\n\t\t\n\t\tif(frmCrypto.lblEncrypt.text == \"\" ||frmCrypto.lblEncrypt.text == null || frmCrypto.lblEncrypt.text == \"Please enter the text to encrypt\")\n\t\t{\n\t\t\tfrmCrypto.lblDecrypt.text = \"There is no encrypted text\";\n\t\t\treturn;\n\t\t}\n\t\tvar str = frmCrypto.lblEncrypt.text;\n\t\t//convertToRawBytes is not supported in SPA\n\t\tif(kony.os.deviceInfo().name == \"thinclient\")\n\t\t{\n\t\t\tvar myEncryptedTextRa = myEncryptedTextRaw;\n\t\t}\n\t\telse\n\t\t\tvar myEncryptedTextRa = kony.convertToRawBytes(str.substring(17));\n\t\tvar myClearText = kony.crypto.decrypt(algo,encryptDecryptKey,myEncryptedTextRa,prptobj);\n\t\tif(kony.os.deviceInfo().name == \"WindowsPhone\")\n\t\t\tfrmCrypto.lblDecrypt.text =\"Decrypted text = \"+myClearText;\n\t\telse\n\t\t\tfrmCrypto.lblDecrypt.text =\"Decrypted text = \"+myClearText.toString();\n\t\t\t\t\t\n\t}\n\tcatch(err)\n\t{\n\t\talert(typeof err);\n\t\talert(\"Error in callbackDecryptAes : \"+err );\n\t}\n}", "title": "" }, { "docid": "a6e067d38285144dc86748202670c835", "score": "0.5830845", "text": "function zeroDecipher(key, data) {\n return decompress(sjcl.decrypt(key,data));\n}", "title": "" }, { "docid": "d0a27e0a95c1eac38f1528a63a9e96bb", "score": "0.57803047", "text": "clearSecurityData(){\n this.setPassphrase(undefined);\n this.keys.clearSecurityData();\n }", "title": "" }, { "docid": "0886003c956f332a144278d2a4eea2de", "score": "0.5759477", "text": "function privateDecrypt(_ref4) {\n var privateKeyPath = _ref4.privateKeyPath,\n toDecrypt = _ref4.toDecrypt;\n var privateKey = fs__WEBPACK_IMPORTED_MODULE_1___default.a.readFileSync(privateKeyPath, {\n encoding: 'utf8'\n });\n var buffer = Buffer.from(toDecrypt, 'base64');\n var decrypted = crypto__WEBPACK_IMPORTED_MODULE_0___default.a.privateDecrypt(privateKey, buffer);\n return decrypted.toString('utf8');\n}", "title": "" }, { "docid": "650c94e8fb2eb893b4b0c8238d03091b", "score": "0.5704669", "text": "function decryption(value) {\n var encryptedBytes = aesjs.utils.hex.toBytes(value);\n var aesCtr = new aesjs.ModeOfOperation.ctr(passKey, new aesjs.Counter(1));\n var decryptedBytes = aesCtr.decrypt(encryptedBytes);\n var decryptedText = aesjs.utils.utf8.fromBytes(decryptedBytes);\n return decryptedText;\n}", "title": "" }, { "docid": "eade8204ab55d180cb379574c9117d12", "score": "0.57025075", "text": "function decryptData(data, nonce, theirPubKey, mySecretKey) {\n curve.box.publicKeyLength = 32;\n curve.box.secretKeyLength = 64;\n var dec = curve.box.open(data, nonce, theirPubKey, mySecretKey);\n return dec;\n}", "title": "" }, { "docid": "ff3fa15e30ec7976b3992e304d496e75", "score": "0.5691744", "text": "function AesDecryptionWrapper(key, ciphertext)\r\n{\r\n\tvar xorBlock = ciphertext.splice(0, 4);\t\t// get the IV for the first round, encrypted block for the following rounds\r\n\tvar cipher = new AES(key);\r\n\tvar plaintext = new Array();\r\n\r\n\twhile(ciphertext.length > 0) {\r\n\t\tvar cipherBlock = ciphertext.splice(0, 4);\r\n\t\tvar plainBlock = cipher.decrypt_core(cipherBlock);\r\n\t\tplainBlock = XorArrays(plainBlock, xorBlock);\r\n\t\tplaintext = plaintext.concat(plainBlock);\r\n\t\txorBlock = cipherBlock;\r\n\t}\r\n\r\n\treturn plaintext;\r\n}", "title": "" }, { "docid": "9c493d56ba170df05eafec89e840bda0", "score": "0.56759316", "text": "function decryptAppData(data, iv) {\n // Intialize encryption\n var decipher = crypto.createDecipheriv('AES-256-CBC', keyBuf, iv);\n decipher.setAutoPadding(false);\n\n // Decrypt data\n var decrypted = decipher.update(data);\n decrypted += decipher.final();\n decrypted = decrypted.toString().replace(/\\x00/g, '');\n\n try {\n return JSON.parse(decrypted);\n } catch(_) {\n // Bad key, bad data or bad IV will result in random garbage,\n // which causes a SyntaxError when trying to parse it as JSON.\n return null;\n }\n }", "title": "" }, { "docid": "c49fceb23a5e448220428b803d22a5bf", "score": "0.5668556", "text": "function decryptConversation(username) {\n //alert(\"test_decryption clicked.\");\n var sender_passphrase = $('#sender_passphrase').val();\n if (sender_passphrase === '') {\n alert(\"Please insert your passphrase to decrypt.\");\n return false;\n }\n sender_passphrase = username + sender_passphrase;\n var bits = $('#sender_rsa_bit_length').val();\n //alert(\"sender_passphrase:\" + sender_passphrase + \" , bits:\" + bits);\n var sender_rsa_key = cryptico.generateRSAKey(sender_passphrase, bits);\n //alert(\"sender_rsa_key\" + sender_rsa_key);\n\n var encryptedFields = $(\"div[id^='enc_body_']\");\n encryptedFields.each(function () {\n var internalId = $(this).attr('id');\n var decId = internalId.replace(\"enc\", \"dec\");\n var sender_encrypted_message = $(this).text();\n //alert(\"sender_encrypted_message:\" + sender_encrypted_message);\n var sender_decryption_result = cryptico.decrypt(sender_encrypted_message, sender_rsa_key);\n var sender_decrypted_message_b64 = sender_decryption_result.plaintext;\n var sender_decrypted_message_2 = base64.decode(sender_decrypted_message_b64);\n //alert(sender_decrypted_message_2); // TODO handle key errors...\n sender_decrypted_message_2 = escapeHtml(sender_decrypted_message_2);\n if (sender_decrypted_message_2 !== '') {\n $('#' + decId).text(sender_decrypted_message_2);\n $('#' + decId).attr('style', 'display: block;');\n $(this).attr('style', 'display: none;');\n } else {\n $('#' + decId).text(\"decryption error.\");\n $('#' + decId).attr('style', 'display: block;');\n }\n });\n\n return false;\n}", "title": "" }, { "docid": "96afc2ffe8f6736e6b696e1aa103b4e9", "score": "0.5650425", "text": "function decrypt(raw) {\n // const converted = raw.toString('utf-8') // for debug\n const converted = raw.toString('base64')\n\n const reciverKey = webPushDecipher.reciverKeyBuilder(publicKey,privateKey,authSecret)\n var decrypted = webPushDecipher.decrypt(converted,reciverKey,false)\n return decrypted\n}", "title": "" }, { "docid": "e33fccd4100a210b4370d95cf04be051", "score": "0.5642808", "text": "clear() {return this.iv = this.key = undefined; }", "title": "" }, { "docid": "37683444f7247cc886bc0cdcb5ab1d9c", "score": "0.5597428", "text": "decrypt(cipherText, key) {\n if (!key) {\n // decrypt every key\n const keys = this.keys;\n for (let i = 0; i < keys.length; i++) {\n const value = this.decrypt(cipherText, keys[i]);\n if (value !== false)\n return { value, index: i };\n }\n return false;\n }\n try {\n const algorithm = getAlgorithm();\n const cipherTextParts = cipherText.split(getEncryptedPrefix());\n // If it's not encrypted by this, reject with undefined\n if (cipherTextParts.length !== 2) {\n // console.warn('Could not determine the beginning of the cipherText. Maybe not encrypted by this method.');\n return void 0;\n }\n else {\n cipherText = cipherTextParts[1];\n }\n const inputData = Buffer.from(cipherText, 'hex');\n // Split cipherText into partials\n const salt = inputData.slice(0, 64);\n const iv = inputData.slice(64, 80);\n const authTag = inputData.slice(80, 96);\n const iterations = parseInt(inputData.slice(96, 101).toString('utf-8'), 10);\n const encryptedData = inputData.slice(101);\n // Derive key\n const decryptionKey = deriveKeyFromPassword(key, salt, Math.floor(iterations * 0.47 + 1337));\n // Create decipher\n const decipher = (0, crypto_1.createDecipheriv)(algorithm, decryptionKey, iv);\n decipher.setAuthTag(authTag);\n // Decrypt data\n return (decipher.update(encryptedData, 'binary', 'utf-8') +\n decipher.final('utf-8'));\n }\n catch (err) {\n debug('crypt error', err.stack);\n return false;\n }\n }", "title": "" }, { "docid": "58760dac0187bf558012c1b6b757dd2b", "score": "0.55855316", "text": "function _decryptSafeContents(data, password) {\n\t var capture = {};\n\t var errors = [];\n\t if(!asn1.validate(\n\t data, forge.pkcs7.asn1.encryptedDataValidator, capture, errors)) {\n\t var error = new Error('Cannot read EncryptedContentInfo.');\n\t error.errors = errors;\n\t throw error;\n\t }\n\n\t var oid = asn1.derToOid(capture.contentType);\n\t if(oid !== pki.oids.data) {\n\t var error = new Error(\n\t 'PKCS#12 EncryptedContentInfo ContentType is not Data.');\n\t error.oid = oid;\n\t throw error;\n\t }\n\n\t // get cipher\n\t oid = asn1.derToOid(capture.encAlgorithm);\n\t var cipher = pki.pbe.getCipher(oid, capture.encParameter, password);\n\n\t // get encrypted data\n\t var encryptedContentAsn1 = _decodePkcs7Data(capture.encryptedContentAsn1);\n\t var encrypted = forge.util.createBuffer(encryptedContentAsn1.value);\n\n\t cipher.update(encrypted);\n\t if(!cipher.finish()) {\n\t throw new Error('Failed to decrypt PKCS#12 SafeContents.');\n\t }\n\n\t return cipher.output.getBytes();\n\t}", "title": "" }, { "docid": "bb2f9b1b31e787b3ff705236a09a38e9", "score": "0.55759585", "text": "function disableDecryptFields() {\r\n $(\"#text-to-decrypt\").prop('disabled', true);\r\n $(\"#vigenere-to-decrypt\").prop('disabled', true);\r\n }", "title": "" }, { "docid": "fe015b5101f0ee3bd8957040cccf0bfd", "score": "0.5570902", "text": "function decrypt(input, firstKey) {\r\n\tif (oldNode == \"no\") {\r\n\t\tvar buf = Buffer.from(input)\r\n\t} else {\r\n\t\tvar buf = new Buffer(input)\r\n\t}\r\n\tvar key = 0x2B\r\n\tvar nextKey\r\n\tfor (var i = 0; i < buf.length; i++) {\r\n\t\tnextKey = buf[i]\r\n\t\tbuf[i] = buf[i] ^ key\r\n\t\tkey = nextKey\r\n\t}\r\n\treturn buf\r\n}", "title": "" }, { "docid": "b6b0d9099b8683c70c828b3f1e0b3952", "score": "0.557059", "text": "function decrypt(text){\n var decipher = crypto.createDecipher(algorithm,password)\n var dec = decipher.update(text,'hex','utf8')\n dec += decipher.final('utf8');\n return dec;\n}", "title": "" }, { "docid": "48f0fe3afe0da4bf2130c2ed3519e4dd", "score": "0.55613583", "text": "static decrypt(){\n var _key = \"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAltCJNfK/cFz4cykxUO0720lT6KUY1Q1t\"+\n \"+cCDzuSkxGW8eFsHSai7W8exSHSH68sGVUq5Nw7zl+4QK6bRI1qT79b6YE4cfteb7y3LEaeBAqks\"+\n \"pcU1z4jY3TGLSVDH+e6BvO1QdDFVglRYurqZmFjjzLOkNk400eYtNmIN6vHmLnrkxUI1CatlVqmj\"+\n \"IxLzhoW1HyGGit0//bMSTd9QbS37F5VabCEnn2oAxPj39M08ZlAEknSsK+kBMeg1aapMLJVxJI63\"+\n \"dGnrLAASpW/SckjJmrNErKKfap+7ev3I8YrMEDt5KPFcWi+PpJbZAJpdE0IULHKQ0t6v5tyXo1U3\"+\n \"bYYteQIDAQAB\";\n var _msg = \"cvv_number=&amount=1.00&currency=INR&card_number=1112&customer_identifier=stg&expiry_year=2027&expiry_month=07&\"\n // console.log(RSA)\n // RSA.decrypt(_msg, _key)\n // .then(decryptedMessage => {\n // console.log(`The original message was ${decryptedMessage}`);\n // return decryptedMessage;\n // })\n // .catch((e)=>{console.log(e);return e;});\n RNRsaEncryption.encryptString(_msg, _key,(response) => {\n console.log(response);\n }, (error) => {\n console.log(error);\n });\n }", "title": "" }, { "docid": "d0fa5dbe1d8d16842f2576ad5e00bc86", "score": "0.55567795", "text": "function _decrypt(data, key, ciphertext) {\n const cipher = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_10__utils__[\"a\" /* searchPath */])(data, \"crypto/cipher\");\n if (cipher === \"aes-128-ctr\") {\n const iv = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_10__utils__[\"b\" /* looseArrayify */])(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_10__utils__[\"a\" /* searchPath */])(data, \"crypto/cipherparams/iv\"));\n const counter = new __WEBPACK_IMPORTED_MODULE_0_aes_js___default.a.Counter(iv);\n const aesCtr = new __WEBPACK_IMPORTED_MODULE_0_aes_js___default.a.ModeOfOperation.ctr(key, counter);\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__ethersproject_bytes__[\"a\" /* arrayify */])(aesCtr.decrypt(ciphertext));\n }\n return null;\n}", "title": "" }, { "docid": "f3c3cb252ded72ef749324d0701f7317", "score": "0.5538005", "text": "function enableDecryptFields() {\r\n $(\"#text-to-decrypt\").prop('disabled', false);\r\n $(\"#vigenere-to-decrypt\").prop('disabled', false);\r\n }", "title": "" }, { "docid": "d5b7ee678408b74d6dc4e78f5c2a8042", "score": "0.5535843", "text": "function EncryptData() {\n var _0xd2e2x2 = $('#ctl00_ucRight1_txtMatKhau')[_0xa5e2[0]]();\n var _0xd2e2x3 = document[_0xa5e2[1]]('ctl00_ucRight1_txtMatKhau'); // Lấy đối tượng input passowrd\n var _0xd2e2x4 = $('#ctl00_ucRight1_txtMaSV')[_0xa5e2[0]](); // Lấy ra giá trị mã sinh viên để tạo salt\n try {\n var _0xd2e2x5 = CryptoJS[_0xa5e2[5]][_0xa5e2[4]][_0xa5e2[3]](_0xa5e2[2]);\n var _0xd2e2x6 = CryptoJS[_0xa5e2[5]][_0xa5e2[6]][_0xa5e2[3]](GetPrivateKey(_0xd2e2x4)); /// Lấy chuổi salt\n var _0xd2e2x7 = CryptoJS[_0xa5e2[5]][_0xa5e2[6]][_0xa5e2[3]](_0xa5e2[7]);\n var _0xd2e2x8 = CryptoJS.PBKDF2(_0xd2e2x6.toString(CryptoJS[_0xa5e2[5]].Utf8), _0xd2e2x7, {\n keySize: 128 / 32,\n iterations: 1000\n });\n var _0xd2e2x9 = CryptoJS[_0xa5e2[13]][_0xa5e2[12]](_0xd2e2x2, _0xd2e2x8, {\n mode: CryptoJS[_0xa5e2[9]][_0xa5e2[8]],\n iv: _0xd2e2x5,\n padding: CryptoJS[_0xa5e2[11]][_0xa5e2[10]]\n });\n _0xd2e2x3[_0xa5e2[14]] = _0xd2e2x9[_0xa5e2[15]].toString(CryptoJS[_0xa5e2[5]].Base64); // Lấy ra Passowrd đã dược hash\n } catch (err) {\n return _0xa5e2[16]; // trả về \"\"\n };\n}", "title": "" }, { "docid": "1231ce14cde9c6b19d4c751b4f3e6f29", "score": "0.55322474", "text": "decrypt(ciphertext, plaintext) {\n let i;\n let l = 0;\n let r = 0;\n for (i = 0; i < 4; i++) {\n l |= (ciphertext[i] & 0xff) << (24 - i * 8);\n r |= (ciphertext[i + 4] & 0xff) << (24 - i * 8);\n }\n for (i = this.rounds - 1; i > 0; i -= 2) {\n l ^= this.roundFunc(r, this.keySchedule[i]);\n r ^= this.roundFunc(l, this.keySchedule[i - 1]);\n }\n for (i = 0; i < 4; i++) {\n plaintext[3 - i] = Number(r & 0xff);\n plaintext[7 - i] = Number(l & 0xff);\n r >>>= 8;\n l >>>= 8;\n }\n }", "title": "" }, { "docid": "1263562a11179f9fbb11dbb774215a1a", "score": "0.5530538", "text": "function deserialize(arrayful) {\n return {\n \"ciphertext\": new Uint8Array(arrayful.ciphertext),\n \"iv\": new Uint8Array(arrayful.iv),\n };\n }", "title": "" }, { "docid": "f90821fbfdfb1992e511ce8d78e0dfd0", "score": "0.55169964", "text": "function encryption(){\n this.saltrounds = 10;\n this.rawtext = '';\n this.encryptedword = '';\n}", "title": "" }, { "docid": "c8644a8c0892ea965b1fb654b2fdd7ed", "score": "0.55168134", "text": "function _decryptSafeContents(data, password) {\n var capture = {};\n var errors = [];\n if(!asn1.validate(\n data, forge.pkcs7.asn1.encryptedDataValidator, capture, errors)) {\n var error = new Error('Cannot read EncryptedContentInfo.');\n error.errors = errors;\n throw error;\n }\n\n var oid = asn1.derToOid(capture.contentType);\n if(oid !== pki.oids.data) {\n var error = new Error(\n 'PKCS#12 EncryptedContentInfo ContentType is not Data.');\n error.oid = oid;\n throw error;\n }\n\n // get cipher\n oid = asn1.derToOid(capture.encAlgorithm);\n var cipher = pki.pbe.getCipher(oid, capture.encParameter, password);\n\n // get encrypted data\n var encryptedContentAsn1 = _decodePkcs7Data(capture.encryptedContentAsn1);\n var encrypted = forge.util.createBuffer(encryptedContentAsn1.value);\n\n cipher.update(encrypted);\n if(!cipher.finish()) {\n throw new Error('Failed to decrypt PKCS#12 SafeContents.');\n }\n\n return cipher.output.getBytes();\n}", "title": "" }, { "docid": "c8644a8c0892ea965b1fb654b2fdd7ed", "score": "0.55168134", "text": "function _decryptSafeContents(data, password) {\n var capture = {};\n var errors = [];\n if(!asn1.validate(\n data, forge.pkcs7.asn1.encryptedDataValidator, capture, errors)) {\n var error = new Error('Cannot read EncryptedContentInfo.');\n error.errors = errors;\n throw error;\n }\n\n var oid = asn1.derToOid(capture.contentType);\n if(oid !== pki.oids.data) {\n var error = new Error(\n 'PKCS#12 EncryptedContentInfo ContentType is not Data.');\n error.oid = oid;\n throw error;\n }\n\n // get cipher\n oid = asn1.derToOid(capture.encAlgorithm);\n var cipher = pki.pbe.getCipher(oid, capture.encParameter, password);\n\n // get encrypted data\n var encryptedContentAsn1 = _decodePkcs7Data(capture.encryptedContentAsn1);\n var encrypted = forge.util.createBuffer(encryptedContentAsn1.value);\n\n cipher.update(encrypted);\n if(!cipher.finish()) {\n throw new Error('Failed to decrypt PKCS#12 SafeContents.');\n }\n\n return cipher.output.getBytes();\n}", "title": "" }, { "docid": "c8644a8c0892ea965b1fb654b2fdd7ed", "score": "0.55168134", "text": "function _decryptSafeContents(data, password) {\n var capture = {};\n var errors = [];\n if(!asn1.validate(\n data, forge.pkcs7.asn1.encryptedDataValidator, capture, errors)) {\n var error = new Error('Cannot read EncryptedContentInfo.');\n error.errors = errors;\n throw error;\n }\n\n var oid = asn1.derToOid(capture.contentType);\n if(oid !== pki.oids.data) {\n var error = new Error(\n 'PKCS#12 EncryptedContentInfo ContentType is not Data.');\n error.oid = oid;\n throw error;\n }\n\n // get cipher\n oid = asn1.derToOid(capture.encAlgorithm);\n var cipher = pki.pbe.getCipher(oid, capture.encParameter, password);\n\n // get encrypted data\n var encryptedContentAsn1 = _decodePkcs7Data(capture.encryptedContentAsn1);\n var encrypted = forge.util.createBuffer(encryptedContentAsn1.value);\n\n cipher.update(encrypted);\n if(!cipher.finish()) {\n throw new Error('Failed to decrypt PKCS#12 SafeContents.');\n }\n\n return cipher.output.getBytes();\n}", "title": "" }, { "docid": "c8644a8c0892ea965b1fb654b2fdd7ed", "score": "0.55168134", "text": "function _decryptSafeContents(data, password) {\n var capture = {};\n var errors = [];\n if(!asn1.validate(\n data, forge.pkcs7.asn1.encryptedDataValidator, capture, errors)) {\n var error = new Error('Cannot read EncryptedContentInfo.');\n error.errors = errors;\n throw error;\n }\n\n var oid = asn1.derToOid(capture.contentType);\n if(oid !== pki.oids.data) {\n var error = new Error(\n 'PKCS#12 EncryptedContentInfo ContentType is not Data.');\n error.oid = oid;\n throw error;\n }\n\n // get cipher\n oid = asn1.derToOid(capture.encAlgorithm);\n var cipher = pki.pbe.getCipher(oid, capture.encParameter, password);\n\n // get encrypted data\n var encryptedContentAsn1 = _decodePkcs7Data(capture.encryptedContentAsn1);\n var encrypted = forge.util.createBuffer(encryptedContentAsn1.value);\n\n cipher.update(encrypted);\n if(!cipher.finish()) {\n throw new Error('Failed to decrypt PKCS#12 SafeContents.');\n }\n\n return cipher.output.getBytes();\n}", "title": "" }, { "docid": "c8644a8c0892ea965b1fb654b2fdd7ed", "score": "0.55168134", "text": "function _decryptSafeContents(data, password) {\n var capture = {};\n var errors = [];\n if(!asn1.validate(\n data, forge.pkcs7.asn1.encryptedDataValidator, capture, errors)) {\n var error = new Error('Cannot read EncryptedContentInfo.');\n error.errors = errors;\n throw error;\n }\n\n var oid = asn1.derToOid(capture.contentType);\n if(oid !== pki.oids.data) {\n var error = new Error(\n 'PKCS#12 EncryptedContentInfo ContentType is not Data.');\n error.oid = oid;\n throw error;\n }\n\n // get cipher\n oid = asn1.derToOid(capture.encAlgorithm);\n var cipher = pki.pbe.getCipher(oid, capture.encParameter, password);\n\n // get encrypted data\n var encryptedContentAsn1 = _decodePkcs7Data(capture.encryptedContentAsn1);\n var encrypted = forge.util.createBuffer(encryptedContentAsn1.value);\n\n cipher.update(encrypted);\n if(!cipher.finish()) {\n throw new Error('Failed to decrypt PKCS#12 SafeContents.');\n }\n\n return cipher.output.getBytes();\n}", "title": "" }, { "docid": "c8644a8c0892ea965b1fb654b2fdd7ed", "score": "0.55168134", "text": "function _decryptSafeContents(data, password) {\n var capture = {};\n var errors = [];\n if(!asn1.validate(\n data, forge.pkcs7.asn1.encryptedDataValidator, capture, errors)) {\n var error = new Error('Cannot read EncryptedContentInfo.');\n error.errors = errors;\n throw error;\n }\n\n var oid = asn1.derToOid(capture.contentType);\n if(oid !== pki.oids.data) {\n var error = new Error(\n 'PKCS#12 EncryptedContentInfo ContentType is not Data.');\n error.oid = oid;\n throw error;\n }\n\n // get cipher\n oid = asn1.derToOid(capture.encAlgorithm);\n var cipher = pki.pbe.getCipher(oid, capture.encParameter, password);\n\n // get encrypted data\n var encryptedContentAsn1 = _decodePkcs7Data(capture.encryptedContentAsn1);\n var encrypted = forge.util.createBuffer(encryptedContentAsn1.value);\n\n cipher.update(encrypted);\n if(!cipher.finish()) {\n throw new Error('Failed to decrypt PKCS#12 SafeContents.');\n }\n\n return cipher.output.getBytes();\n}", "title": "" }, { "docid": "dbf3f79f467ee9a97175ef90a9efbf1d", "score": "0.5501065", "text": "function decryptElements($encryptedElms, isDraft) {\n var decryptDict = {};\n $.each($encryptedElms, function(i, elm) {\n\n var htmlsToReplace = getHtmlToReplace($(elm));\n\n var isEncryptedDraft = $(elm).html().indexOf(htmlsToReplace[0]) == 0;\n if (!isEncryptedDraft) {\n setDraftStateFor($(elm), false);\n }\n\n var encryptedTexts = htmlsToReplace.map(function(html) {\n return getTextFromHtml(html);\n });\n\n\n for (var j in htmlsToReplace) {\n if (encryptedTexts[j] == null) {\n continue;\n }\n var cipher_text = getCipherText(encryptedTexts[j]);\n decryptEncryptedHtml($(elm), htmlsToReplace[j], cipher_text);\n }\n });\n}", "title": "" }, { "docid": "f4d3e85d287e157b5c6a7e5a1b6f7960", "score": "0.5498585", "text": "function fromCrypt (text) {\n\tvar decipher = crypto.createDecipher('des-ede3-cbc','s3cr37k3Y');\n\tvar decrypted = decipher.update(text,'hex','utf8');\n\tdecrypted += decipher.final('utf8');\n\treturn decrypted;\n}", "title": "" }, { "docid": "2d931408660be967caef4d6aeda9eb03", "score": "0.54925567", "text": "function decryptMessage(cipherJson) {\n var cipherObject = JSON.parse(cipherJson);\n var decryptedData = CryptoJS.AES.decrypt(cipherObject, localStorage.getItem(KEY_PHRASE));\n return decryptedData.toString(CryptoJS.enc.Utf8);\n}", "title": "" }, { "docid": "7df04a596708e16c2914b5d2765e476b", "score": "0.54821837", "text": "decryptAll(keyphrase) {\r\n const results = [];\r\n this.accounts.map((acct, i) => {\r\n results.push(this.decrypt(i, keyphrase));\r\n });\r\n log.info(`decryptAll for Wallet ${this.name}: ${results.reduce((c, p) => {\r\n return p + (c ? \"1\" : \"0\");\r\n }, \"\")}`);\r\n return results;\r\n }", "title": "" }, { "docid": "b9e768aae902122ed30d164284b48281", "score": "0.5473475", "text": "function decryptData(encrypted_data, password, iv){\n\n\treturn crypto.subtle.digest(\n \t\t{\n \t\t\tname: \"SHA-256\"\n \t\t}, \n \t\tconvertStringToArrayBufferView(password)\n \t)\n \t.then(function(result){\n\t\treturn window.crypto.subtle.importKey(\n\t\t\t\"raw\", \n\t\t\tresult, \n\t\t\t{\n\t\t\t\tname: \"AES-GCM\"\n\t\t\t}, \n\t\t\tfalse, \n\t\t\t[\"encrypt\", \"decrypt\"]\n\t\t)\n\t\t.then(function(key){\n\t\t\treturn crypto.subtle.decrypt(\n\t\t\t\t{\n\t\t\t\t\tname: \"AES-GCM\", \n\t\t\t\t\tiv: iv\n\t\t\t\t}, \n\t\t\t\tkey, \n\t\t\t\tencrypted_data\n\t\t\t)\n\t\t\t.then(function(result){\n\t\t\t\tdata = new Uint8Array(result);\n\t\t\t\treturn data;\n\t\t\t})\n\t\t\t.catch(function(e){\n\t\t\t\tconsole.log(e);\n\t\t\t});\n \t})\n \t.catch(function(e){\n \t\tconsole.log(e);\n \t});\n })\n .catch(function(e){\n \tconsole.log(e);\n });\n}", "title": "" }, { "docid": "680b1c04c46dd94f7faa7bab5f0b55b9", "score": "0.54713637", "text": "function Decrypt(plainText) {\n try {\n var j;\n var hexes = plainText.match(/.{1,2}/g) || [];\n var back = \"\";\n for (j = 0; j < hexes.length; j++) {\n back += String.fromCharCode(parseInt(hexes[j], 16));\n }\n\n var decipher = fg.cipher.createDecipher('3DES-CBC', cGLOBAL_ENCRYPTION_KEY);\n decipher.start({ iv: cGLOBAL_ECRYPTION_VECTOR });\n decipher.update(fg.util.createBuffer(back));\n decipher.finish();\n\n var decipherOutput = decipher.output.getBytes();\n\n return decipherOutput;\n\n } catch (error) {\n logger.logError(error);\n return \"\";\n }\n}", "title": "" }, { "docid": "7009f30dd669fe638ada5e8f69d83eff", "score": "0.5464642", "text": "function decrypt([dummyKey, encryptedKey]) {\n const originalBytes = Buffer.alloc(encryptedKey.length);\n let i = 0;\n while(i < encryptedKey.length) {\n const encryptedByte = encryptedKey.readUInt8(i);\n const dummyByte = dummyKey.readUInt8(i);\n originalBytes.writeUInt8(encryptedByte ^ dummyByte, i);\n i++;\n }\n return originalBytes.toString('utf8');\n}", "title": "" }, { "docid": "03d2b5a8813b9490713f69deea17ed5b", "score": "0.5434837", "text": "function decryptSigned() {\n var message = document.getElementById(\"messageArea\").value;\n friendsKeyPair.setType(\"public\");\n message = RSA.decryptWithKey(message, friendsKeyPair);\n userKeyPair.setType(\"private\");\n message = RSA.decryptWithKey(message, userKeyPair);\n document.getElementById(\"messageArea\").value = message;\n}", "title": "" }, { "docid": "076be62bf3cf7bf99562c90f354b3473", "score": "0.5434384", "text": "function dec(encrypted_text) {\n var key = sessionStorage.enc_key;\n var decryptedText = sjcl.decrypt(key, encrypted_text);\n return decryptedText;\n}", "title": "" }, { "docid": "0b6516b265765c920c683237ed2d053a", "score": "0.543029", "text": "function decryptFromPassword(something){\n return sjcl.decrypt(userPassword, something);\n}", "title": "" }, { "docid": "441d01a40e5c87e736502e969fdf68cb", "score": "0.54296154", "text": "clearSensitiveData() {\n this.xpriv = undefined;\n this.seed = undefined;\n }", "title": "" }, { "docid": "eccfc76e759ea7dbb6f09913d3ba80d3", "score": "0.54279935", "text": "get(keys, value) {\n var key = crypto_js__WEBPACK_IMPORTED_MODULE_1__[\"enc\"].Utf8.parse(keys);\n var iv = crypto_js__WEBPACK_IMPORTED_MODULE_1__[\"enc\"].Utf8.parse(keys);\n var decrypted = crypto_js__WEBPACK_IMPORTED_MODULE_1__[\"AES\"].decrypt(value, key, {\n keySize: 128 / 8,\n iv: iv,\n mode: crypto_js__WEBPACK_IMPORTED_MODULE_1__[\"mode\"].CBC,\n padding: crypto_js__WEBPACK_IMPORTED_MODULE_1__[\"pad\"].Pkcs7\n });\n return decrypted.toString(crypto_js__WEBPACK_IMPORTED_MODULE_1__[\"enc\"].Utf8);\n }", "title": "" }, { "docid": "7387ef661085ac99d68a07b9b57e7cd2", "score": "0.5422516", "text": "function decryptPrivKey(encryptedPrivKey, encryptionKey) {\n var decrypted = CryptoJS.AES.decrypt(encryptedPrivKey, encryptionKey).toString(CryptoJS.enc.Utf8);\n return JSON.parse(atob(decrypted))\n}", "title": "" }, { "docid": "d739e00e4621cdcd837383341cc12fac", "score": "0.5407073", "text": "function decryptMyPrivate() {\n var message = document.getElementById(\"messageArea\").value;\n userKeyPair.setType(\"private\");\n message = RSA.decryptWithKey(message, userKeyPair);\n document.getElementById(\"messageArea\").value = message;\n}", "title": "" }, { "docid": "0c4e99db65e93956985dcc18c77267f7", "score": "0.5399297", "text": "function decrypt(phone) {\n let iv = Buffer.from(phone.iv, 'hex');\n let encryptedText = Buffer.from(phone.encryptedData, 'hex');\n let decipher = crypto.createDecipheriv('aes-256-cbc', Buffer.from(key), iv);\n decipher.setAutoPadding(false);\n let decrypted = decipher.update(encryptedText);\n decrypted = Buffer.concat([decrypted, decipher.final()]);\n return decrypted.toString();\n}", "title": "" }, { "docid": "0ad9851ca2a7bf1d8a66b7c6ce9cb1f8", "score": "0.5396154", "text": "function decryptWithYourPublic() {\n var message = document.getElementById(\"messageArea\").value;\n userKeyPair.setType(\"public\");\n message = RSA.decryptWithKey(message, userKeyPair);\n document.getElementById(\"messageArea\").value = message;\n}", "title": "" }, { "docid": "151c3a2dd2fbd00661157edea545306c", "score": "0.53948325", "text": "function decrypt(text) {\n const textParts = text.split(':');\n const iv = new Buffer(textParts.shift(), 'hex');\n const encryptedText = new Buffer(textParts.join(':'), 'hex');\n\n console.log('Encrypted text:', encryptedText);\n\n const decipher = crypto.createDecipheriv(algorithm, key, iv);\n let decrypted = decipher.update(encryptedText);\n decrypted = Buffer.concat([decrypted, decipher.final()]);\n\n return decrypted.toString();\n}", "title": "" }, { "docid": "71cdccc25a7e2f0df1f2aca0dd941492", "score": "0.53941506", "text": "reset() {\n // Reset data buffer\n super.reset.call(this); // Perform concrete-cipher logic\n\n this._doReset();\n }", "title": "" }, { "docid": "fc75db20b7d5247661d965780fefaf1b", "score": "0.53747594", "text": "function decrypt(encrypted) { //Function for decryption of passwords. Uses the aes128 standard with the crypto package\n decryptalgo = crypto.createDecipher('aes128', secret);\n let decrypted = decryptalgo.update(encrypted, 'hex', 'utf8');\n decrypted += decryptalgo.final('utf8');\n return decrypted;\n}", "title": "" }, { "docid": "485ad9b87599517455bca2bb46124433", "score": "0.53676873", "text": "decrypt(str, key, step) {\n\t\tlet str_fact = this.knows(str);\n\t\tlet key_fact = this.knows(key);\n\n\t\tif (! str.isEncrypted()) {\n\t\t\tthrow 'Agent: ' + this.id + ' is trying to decrypt non encrypted message: ' + str;\n\t\t}\n\n\t\tif (str_fact != null) {\n\t\t\tif (key_fact != null) {\n\t\t\t\tvar plain = str_fact.decrypt(key);\n\t\t\t\tthis.learns(plain, step);\n\t\t\t\treturn plain;\n\t\t\t}\n\t\t\telse\n\t\t\t\tthrow 'Agent: ' + this.id + ': unknown key: ' + key;\n\t\t} else\n\t\t\tthrow 'Agent: ' + this.id + ': unknown str: ' + str;\n\t}", "title": "" }, { "docid": "21ed3f68b98f2210d3e05cc9e0bf1cf0", "score": "0.53653985", "text": "crypt(bytes, dk, ivmod, encrypt) {\n \n // xor dk.iv and the iv modifier\n var actualIV = Buffer.alloc(NEXO_IV_LENGTH);\n for (var i = 0; i < NEXO_IV_LENGTH; i++) {\n actualIV[i] = dk.iv[i] ^ ivmod[i];\n }\n \n var cipher;\n if (encrypt) {\n cipher = crypto.createCipheriv('aes-256-cbc', dk.cipher_key, actualIV);\n } else {\n cipher = crypto.createDecipheriv('aes-256-cbc', dk.cipher_key, actualIV);\n }\n \n var data = cipher.update(bytes);\n data = Buffer.concat([data, cipher.final()]);\n \n return data;\n }", "title": "" }, { "docid": "652a5ef8955b16816aa61850ac1100b3", "score": "0.5364378", "text": "function decrypt () {\n var text = document.getElementById(\"encrypt-textarea\").value;\n document.getElementById(\"decrypt-textarea\").value = (decryptText(text.toLowerCase()));\n document.getElementById(\"encrypt-textarea\").value = \"\"; \n}", "title": "" }, { "docid": "d285b6655bc06abaf0cc55babd161598", "score": "0.53585625", "text": "function decryptAESecb(dataBuffer, key, iv) {\n\tvar decipher = crypto.createDecipheriv('aes-128-ecb', key, iv);\n\treturn Buffer.concat([decipher.update(dataBuffer), decipher.final()]).toString();\n}", "title": "" }, { "docid": "b6a39203845bb1ddd337e1bf38838117", "score": "0.5346209", "text": "function CBC(plaintext, IV, keys, is_decode) {\n var ciphertext = [];\n var lst_cipher = IV;\n for (let i = 0; i < plaintext.length; i += 64)\n {\n if (is_decode)\n {\n var cur_text = plaintext.slice(i, i + 64);\n ciphertext = ciphertext.concat(XOR(DES(cur_text, keys), lst_cipher));\n lst_cipher = cur_text;\n }\n else\n {\n var cur_text = XOR(plaintext.slice(i, i + 64), lst_cipher);\n lst_cipher = DES(cur_text, keys);\n ciphertext = ciphertext.concat(lst_cipher);\n }\n }\n return ciphertext;\n}", "title": "" }, { "docid": "abdf04a2aef871895e8c25e8b605b522", "score": "0.5345603", "text": "function decrypt(c, d, s, r, private_key, prime) {\n\n return elgamal.decrypt(c, d, s, r, private_key, prime);\n}", "title": "" }, { "docid": "358cbb588b891b2d931f651aab76c0be", "score": "0.53311586", "text": "async encryptDbData(plain) {\n for (var key in plain) {\n if (plain.hasOwnProperty(key)) {\n if(await _allow (key)){\n plain[key] = await this.encrypt(plain[key]);\n }\n }\n }\n return plain;\n }", "title": "" }, { "docid": "49180f966b2e53b1745c1c4fc6df9d2e", "score": "0.53305167", "text": "function _decryptContent(msg) {\n\t if(msg.encryptedContent.key === undefined) {\n\t throw new Error('Symmetric key not available.');\n\t }\n\n\t if(msg.content === undefined) {\n\t var ciph;\n\n\t switch(msg.encryptedContent.algorithm) {\n\t case forge.pki.oids['aes128-CBC']:\n\t case forge.pki.oids['aes192-CBC']:\n\t case forge.pki.oids['aes256-CBC']:\n\t ciph = forge.aes.createDecryptionCipher(msg.encryptedContent.key);\n\t break;\n\n\t case forge.pki.oids['desCBC']:\n\t case forge.pki.oids['des-EDE3-CBC']:\n\t ciph = forge.des.createDecryptionCipher(msg.encryptedContent.key);\n\t break;\n\n\t default:\n\t throw new Error('Unsupported symmetric cipher, OID ' +\n\t msg.encryptedContent.algorithm);\n\t }\n\t ciph.start(msg.encryptedContent.parameter);\n\t ciph.update(msg.encryptedContent.content);\n\n\t if(!ciph.finish()) {\n\t throw new Error('Symmetric decryption failed.');\n\t }\n\n\t msg.content = ciph.output;\n\t }\n\t}", "title": "" }, { "docid": "2af340e3e93f7eacfe10cbecc484eb93", "score": "0.5330509", "text": "function decryptWithRSA(data) {\n let decrypted = crypto.privateDecrypt(keyPrivate, Buffer.from(data, 'base64'))\n return decrypted.toString('utf8')\n}", "title": "" }, { "docid": "fc1302bdae33acf7e8fde291af70ed97", "score": "0.5329782", "text": "async decryptJSON(cipher) {\n try {\n return JSON.parse(await this.decrypt(cipher));\n } catch (err) {\n throw new Error(err);\n }\n }", "title": "" }, { "docid": "b22ce4a63a2e95a639b583e8b8293d68", "score": "0.5327061", "text": "function _decryptContent(msg) {\n if(msg.encryptedContent.key === undefined) {\n throw new Error('Symmetric key not available.');\n }\n\n if(msg.content === undefined) {\n var ciph;\n\n switch(msg.encryptedContent.algorithm) {\n case forge.pki.oids['aes128-CBC']:\n case forge.pki.oids['aes192-CBC']:\n case forge.pki.oids['aes256-CBC']:\n ciph = forge.aes.createDecryptionCipher(msg.encryptedContent.key);\n break;\n\n case forge.pki.oids['desCBC']:\n case forge.pki.oids['des-EDE3-CBC']:\n ciph = forge.des.createDecryptionCipher(msg.encryptedContent.key);\n break;\n\n default:\n throw new Error('Unsupported symmetric cipher, OID ' +\n msg.encryptedContent.algorithm);\n }\n ciph.start(msg.encryptedContent.parameter);\n ciph.update(msg.encryptedContent.content);\n\n if(!ciph.finish()) {\n throw new Error('Symmetric decryption failed.');\n }\n\n msg.content = ciph.output;\n }\n}", "title": "" }, { "docid": "b22ce4a63a2e95a639b583e8b8293d68", "score": "0.5327061", "text": "function _decryptContent(msg) {\n if(msg.encryptedContent.key === undefined) {\n throw new Error('Symmetric key not available.');\n }\n\n if(msg.content === undefined) {\n var ciph;\n\n switch(msg.encryptedContent.algorithm) {\n case forge.pki.oids['aes128-CBC']:\n case forge.pki.oids['aes192-CBC']:\n case forge.pki.oids['aes256-CBC']:\n ciph = forge.aes.createDecryptionCipher(msg.encryptedContent.key);\n break;\n\n case forge.pki.oids['desCBC']:\n case forge.pki.oids['des-EDE3-CBC']:\n ciph = forge.des.createDecryptionCipher(msg.encryptedContent.key);\n break;\n\n default:\n throw new Error('Unsupported symmetric cipher, OID ' +\n msg.encryptedContent.algorithm);\n }\n ciph.start(msg.encryptedContent.parameter);\n ciph.update(msg.encryptedContent.content);\n\n if(!ciph.finish()) {\n throw new Error('Symmetric decryption failed.');\n }\n\n msg.content = ciph.output;\n }\n}", "title": "" }, { "docid": "b22ce4a63a2e95a639b583e8b8293d68", "score": "0.5327061", "text": "function _decryptContent(msg) {\n if(msg.encryptedContent.key === undefined) {\n throw new Error('Symmetric key not available.');\n }\n\n if(msg.content === undefined) {\n var ciph;\n\n switch(msg.encryptedContent.algorithm) {\n case forge.pki.oids['aes128-CBC']:\n case forge.pki.oids['aes192-CBC']:\n case forge.pki.oids['aes256-CBC']:\n ciph = forge.aes.createDecryptionCipher(msg.encryptedContent.key);\n break;\n\n case forge.pki.oids['desCBC']:\n case forge.pki.oids['des-EDE3-CBC']:\n ciph = forge.des.createDecryptionCipher(msg.encryptedContent.key);\n break;\n\n default:\n throw new Error('Unsupported symmetric cipher, OID ' +\n msg.encryptedContent.algorithm);\n }\n ciph.start(msg.encryptedContent.parameter);\n ciph.update(msg.encryptedContent.content);\n\n if(!ciph.finish()) {\n throw new Error('Symmetric decryption failed.');\n }\n\n msg.content = ciph.output;\n }\n}", "title": "" }, { "docid": "b22ce4a63a2e95a639b583e8b8293d68", "score": "0.5327061", "text": "function _decryptContent(msg) {\n if(msg.encryptedContent.key === undefined) {\n throw new Error('Symmetric key not available.');\n }\n\n if(msg.content === undefined) {\n var ciph;\n\n switch(msg.encryptedContent.algorithm) {\n case forge.pki.oids['aes128-CBC']:\n case forge.pki.oids['aes192-CBC']:\n case forge.pki.oids['aes256-CBC']:\n ciph = forge.aes.createDecryptionCipher(msg.encryptedContent.key);\n break;\n\n case forge.pki.oids['desCBC']:\n case forge.pki.oids['des-EDE3-CBC']:\n ciph = forge.des.createDecryptionCipher(msg.encryptedContent.key);\n break;\n\n default:\n throw new Error('Unsupported symmetric cipher, OID ' +\n msg.encryptedContent.algorithm);\n }\n ciph.start(msg.encryptedContent.parameter);\n ciph.update(msg.encryptedContent.content);\n\n if(!ciph.finish()) {\n throw new Error('Symmetric decryption failed.');\n }\n\n msg.content = ciph.output;\n }\n}", "title": "" }, { "docid": "5ecd58d76d09180a654ef855a5fd7ca1", "score": "0.5308667", "text": "function decrypt(ciphertext, key) {\r\n return processToStr(ciphertext, key, -1);\r\n}", "title": "" }, { "docid": "8f8088d402a7ac9fe91eb99cd6a48a51", "score": "0.53066754", "text": "function decrypt(request) {\n\tvar engine = encrypter(request.password, {ttl: true});\n\t\n\ttry {\n\t\tvar data = engine.decrypt(request.message);\n\t\treturn {\n\t\t\tsuccess:true,\n\t\t\tdata:engine.decrypt(request.message)\n\t\t}\n\t} catch(e) {\n\t\treturn {\n\t\t\tsuccess:false,\n\t\t\tdata:null\n\t\t}\n\t}\n\t\n}", "title": "" }, { "docid": "0be4a8dd9a02ec62bebc2f272bcda184", "score": "0.5298513", "text": "function createDecipher() {\n return crypto.createDecipheriv(algoritsymm, Buffer.from(password), initVector);\n }", "title": "" }, { "docid": "d8ad871790970115734663af1591b23a", "score": "0.5295331", "text": "function decrypt(password) {\n var decipher = crypto.createDecipher(algorithm, privateKey);\n console.log(\"decipher\",decipher,password);\n var dec = decipher.update(password, 'hex', 'utf8');\n dec += decipher.final('utf8');\n return dec;\n}", "title": "" }, { "docid": "84a64c7ecefc8975c98677881743c921", "score": "0.52942216", "text": "function decryptWithFriendsPublic() {\n var message = document.getElementById(\"messageArea\").value;\n friendsKeyPair.setType(\"public\");\n message = RSA.decryptWithKey(message, friendsKeyPair);\n document.getElementById(\"messageArea\").value = message;\n}", "title": "" }, { "docid": "09c3f7db314913765beea2e0253dee1e", "score": "0.52930456", "text": "function decryptBallotIDs(){\n var alertBox = $(\".alert\");\n userData.BallotID.forEach(function(el, ind, all){\n encryptedBallotIDs[el.PostID] = el.BallotString;\n ballotIDs[el.PostID] = decryptFromPassword(el.BallotString);\n alertBox.html(alertBox.html()+\"<br>Ballot ID for Post \"+el.PostID+\" = \"+ballotIDs[el.PostID]);\n });\n}", "title": "" }, { "docid": "a52e1fe93d162350f6aed5da71567c21", "score": "0.5288442", "text": "decryptCoins(wrapper, passphrase) {\r\n // console.log(wrapper,passphrase);\r\n const {\r\n ALG,\r\n DIGEST,\r\n } = this.config;\r\n\r\n let localArgs = Object.assign({\r\n alg: ALG,\r\n digest: DIGEST,\r\n }, wrapper);\r\n\r\n let iv = this._Base64ToUint8Array(wrapper.iv);\r\n passphrase = new TextEncoder().encode(passphrase);\r\n\r\n return window.crypto.subtle.digest(localArgs.digest, passphrase).then((response) => {\r\n // Returns the digest\r\n return window.crypto.subtle.importKey(\"raw\", response, {\r\n name: localArgs.alg,\r\n }, false, [\"decrypt\"]);\r\n }).then((key) => {\r\n let coins = [];\r\n wrapper.coins.forEach((elt) => {\r\n let b64 = this._Base64ToUint8Array(elt);\r\n coins.push(this._decrypt_data(localArgs.alg, iv, key, b64));\r\n });\r\n return Promise.all(coins);\r\n });\r\n }", "title": "" }, { "docid": "87068843ad94b934d0f82764670e0b2e", "score": "0.528837", "text": "decrypt_aes(password, encrypted) {\n\t\tconst decipher = crypto.createDecipher('aes128', password);\n\t\tvar decrypted = decipher.update(encrypted, 'hex', 'utf8');\n\t\tdecrypted += decipher.final('utf8');\n\t\treturn decrypted;\n\t}", "title": "" }, { "docid": "64d545b84ab95b6d383bd1c338300814", "score": "0.52777606", "text": "decrypt(value, purpose) {\n if (typeof value !== 'string') {\n throw new utils_1.Exception('\"Encryption.decrypt\" expects a string value', 500, 'E_RUNTIME_EXCEPTION');\n }\n /**\n * Make sure the encrypted value is in correct format. ie\n * [encrypted value]--[iv]--[hash]\n */\n const [encryptedEncoded, ivEncoded, hash] = value.split(this.separator);\n if (!encryptedEncoded || !ivEncoded || !hash) {\n return null;\n }\n /**\n * Make sure we are able to urlDecode the encrypted value\n */\n const encrypted = this.base64.urlDecode(encryptedEncoded, 'base64');\n if (!encrypted) {\n return null;\n }\n /**\n * Make sure we are able to urlDecode the iv\n */\n const iv = this.base64.urlDecode(ivEncoded);\n if (!iv) {\n return null;\n }\n /**\n * Make sure the hash is correct, it means the first 2 parts of the\n * string are not tampered.\n */\n const isValidHmac = new Hmac_1.Hmac(this.cryptoKey).compare(`${encryptedEncoded}${this.separator}${ivEncoded}`, hash);\n if (!isValidHmac) {\n return null;\n }\n /**\n * The Decipher can raise exceptions with malformed input, so we wrap it\n * to avoid leaking sensitive information\n */\n try {\n const decipher = crypto_1.createDecipheriv(this.algorithm, this.cryptoKey, iv);\n const decrypted = decipher.update(encrypted, 'base64', 'utf8') + decipher.final('utf8');\n return new helpers_1.MessageBuilder().verify(decrypted, purpose);\n }\n catch (error) {\n return null;\n }\n }", "title": "" }, { "docid": "5863f173efd92480c89a6f0bb449363b", "score": "0.5275661", "text": "messageDecrypt(emsg, receiver_private_key, sender_public_key){\n\n let msgDecoded = UTIL.decodeBase64(emsg)\n let nonce = msgDecoded.slice(0, NACL.box.nonceLength);\n let message = msgDecoded.slice(NACL.box.nonceLength, emsg.length);\n let key = this.decodeSecretKey(receiver_private_key)\n let secret = this.decodePublicKey(sender_public_key)\n let decrypted = NACL.box.open(message, nonce, secret, key)\n if (!decrypted) {\n throw new Error('Could not decrypt message');\n }\n return UTIL.encodeUTF8(decrypted); \n }", "title": "" }, { "docid": "4f5523cd485a99404a32f0511d060e11", "score": "0.52508837", "text": "function decryptSymmetric(encryptText, ENCRYPTION_KEY) {\n const algorithm = 'aes-256-ctr';\n let textParts = encryptText.split(':');\n // @ts-ignore\n let iv = Buffer.from(textParts.shift(), 'base64');\n let encryptedText = Buffer.from(textParts.join(':'), 'base64');\n let decipher = crypto_1.default.createDecipheriv(algorithm, Buffer.from(ENCRYPTION_KEY, 'base64'), iv);\n let decrypted = decipher.update(encryptedText);\n decrypted = Buffer.concat([decrypted, decipher.final()]);\n return decrypted.toString();\n}", "title": "" }, { "docid": "d2742ba4041c33d2a32d19e06d3476a5", "score": "0.525027", "text": "isDecrypted() {\n return this.getKeys().some(({ keyPacket }) => keyPacket.isDecrypted());\n }", "title": "" }, { "docid": "922683222c61fc743f807633e37b6d16", "score": "0.523617", "text": "function RSADecrypt(ctext) {\n\t var c = parseBigInt(ctext, 16);\n\t var m = this.doPrivate(c);\n\t if(m == null) return null;\n\t return pkcs1unpad2(m, (this.n.bitLength()+7)>>3);\n\t}", "title": "" }, { "docid": "96e4dbf614c77fbe9f1dff5cf2df8d04", "score": "0.52350354", "text": "encrypt(data) {\n logger_1.Logger.log.debug(\"AesEncryptor.encrypt: start.\");\n if (!this.passphrase) {\n throw new encryption_error_1.EncryptionError(\"Encryption passphrase not available.\", \"AES256\");\n }\n let params = this.createKeyAndIV();\n let cipher = Crypto.createCipheriv(\"aes256\", params.key, params.iv);\n let encrypted = cipher.update(data, \"utf8\", \"base64\");\n encrypted += cipher.final(\"base64\");\n params.data = Buffer.concat([new Buffer(\"Salted__\", \"utf8\"), params.salt, new Buffer(encrypted, \"base64\")]);\n logger_1.Logger.log.debug(`AesEncryptor.encrypt: encryption complete: '${encrypted}'.`);\n return params.data.toString(\"base64\");\n }", "title": "" }, { "docid": "d8c02b818e75b28cbb1fdba12264a09d", "score": "0.5228749", "text": "function decrypt(data, callback) {\n\tvar parts = data.split('#');\n\n\tvar iv = new Buffer(parts[0], settings.encryption.outputEncoding);\n\tvar content = new Buffer(parts[1], settings.encryption.outputEncoding);\n\n\tvar decipher = crypto.createDecipheriv(algorithm, settings.encryption.key, iv);\n\n\tvar decryptedData = decipher.update(content, '', settings.app.encoding) + decipher.final(settings.app.encoding);\n\n\tcallback(null,decryptedData);\n}", "title": "" }, { "docid": "b08311241614ac054c3db479545e6c8b", "score": "0.52194786", "text": "function aesDecrypt(ciphertext, key, iv) {\n\tvar encryptedBytes = aes.utils.hex.toBytes(ciphertext);\n\tvar buffer = Buffer.from(key);\n\tvar aesCTR = new aes.ModeOfOperation.ctr(buffer, iv);\n\tvar decryptedBytes = aesCTR.decrypt(encryptedBytes);\n\tvar decryptedText = aes.utils.utf8.fromBytes(decryptedBytes);\n\treturn decryptedText;\n}", "title": "" }, { "docid": "92676d23ab3a3c631676fd5f74b96062", "score": "0.52145624", "text": "decrypt(publicKey, data) {\r\n if (stringHelper_1.StringHelper.isEmpty(publicKey)) {\r\n throw new platformError_1.PlatformError(\"The publicKey must be a non empty string\");\r\n }\r\n if (stringHelper_1.StringHelper.isEmpty(data)) {\r\n throw new platformError_1.PlatformError(\"The data must be a non empty string\");\r\n }\r\n const buffer = Buffer.from(data, \"hex\");\r\n const decrypted = crypto.publicDecrypt(publicKey, buffer);\r\n return decrypted.toString(\"ascii\");\r\n }", "title": "" }, { "docid": "958b709536549c317819187d64a6c41c", "score": "0.5210721", "text": "function AES_Decrypt(block, key) {\n var l = key.length;\n AES_AddRoundKey(block, key.slice(l - 16, l));\n AES_ShiftRows(block, AES_ShiftRowTab_Inv);\n AES_SubBytes(block, AES_Sbox_Inv);\n for(var i = l - 32; i >= 16; i -= 16) {\n AES_AddRoundKey(block, key.slice(i, i + 16));\n AES_MixColumns_Inv(block);\n AES_ShiftRows(block, AES_ShiftRowTab_Inv);\n AES_SubBytes(block, AES_Sbox_Inv);\n }\n AES_AddRoundKey(block, key.slice(0, 16));\n}", "title": "" }, { "docid": "9c18afd54973d0ae5b913d8acf205caf", "score": "0.5199895", "text": "function decrypt_aes(ciphertext, iv, secret_key) {\n var decipher = forge.cipher.createDecipher('AES-CBC', secret_key);\n var encrypted = new forge.util.ByteStringBuffer().putBytes(ciphertext);\n decipher.start({iv: iv});\n decipher.update(encrypted);\n var finished = decipher.finish(); // check 'result' for true/false\n\n return decipher.output.data;\n }", "title": "" }, { "docid": "01c372070fe11603475a5391e70cc100", "score": "0.5195733", "text": "encryptAll(keyphrase) {\r\n const results = [];\r\n this.accounts.map((acct, i) => {\r\n results.push(this.encrypt(i, keyphrase));\r\n });\r\n log.info(`decryptAll for Wallet ${this.name}: ${results.reduce((c, p) => {\r\n return p + (c ? \"1\" : \"0\");\r\n }, \"\")}`);\r\n return results;\r\n }", "title": "" } ]
5528d8ad21c7475b5383effd35b542ed
Deal with updates to configuration
[ { "docid": "4a4046ed81f2e66412c1461892885ce9", "score": "0.0", "text": "function setAlarm(num, time) {\n console.log(`setting alarm ${num} to ${time}`);\n\n // Clear anything there already\n if (timeouts[num]) {\n clearTimeout(timeouts[num]);\n if (currAlarm == num) {\n clearTimeout(currTimeout);\n currSnooze = 0;\n currAlarm = -1; // no current alarm any more\n }\n }\n\n // If we have nothing new to add - we're done\n if (typeof time != 'undefined' && time != \"\" && !isNaN(parseInt(time))) {\n\n let tokens = time.split(\":\");\n alarms[num] = {\n name: \"alarm\" + num.toString(),\n value: {\n hour: tokens[0],\n minute: tokens[1]\n }\n };\n console.log(`alarm value is ${alarms[num].value.hour}:${alarms[num].value.minute}`);\n\n let now = new Date();\n let then = new Date();\n then.setHours(tokens[0], tokens[1], 0);\n let diff = then.getTime() - now.getTime();\n if (diff < 0) { // Make it for tomorrow instead\n diff += util.Hour2ms(24);\n console.log(\"Setting alarm for tomorrow\");\n }\n\n console.log(`setting alarm to ${diff} ms`);\n timeouts[num] = setTimeout(onWakeup, diff);\n currSnooze = now.getTime() + diff;\n } else {\n console.log(`clearing alarm num ${num}`);\n try {\n unlinkSync(\"note\" + num);\n } catch(err) {};\n return;\n }\n\n if (typeof messages[num] == 'undefined' ||\n messages[num].value == \"\") {\n setMessage(num, \"\"); // Make sure it's *something*\n } else {\n writeFileSync(\"note\" + num, {\n time: alarms[num],\n message: messages[num]\n }, \"json\");\n }\n}", "title": "" } ]
[ { "docid": "6feee72820ce21d9dff27d499547db46", "score": "0.73891175", "text": "function update_config() {\n\tdb.config.load(function (cfg_new) {\n\t\tfor (var i = 0; i < cfg_new.length; i++) {\n\t\t\tvar key = cfg_new[i].key;\n\t\t\tvar value = cfg_new[i].value;\n\t\t\tif (value === null && key in config) {\n\t\t\t\tlog.info(\"Config\", \"Removed \" + key);\n\t\t\t\tdelete config[key];\n\t\t\t} else if (value !== null && config[key] !== value) {\n\t\t\t\tlog.info(\"Config\", \"Set \" + key + \" to \" + value);\n\t\t\t\tconfig[key] = value;\n\t\t\t}\n\t\t}\n\t});\n}", "title": "" }, { "docid": "871558449ff6d56d32de19b543b4d357", "score": "0.7161136", "text": "updateConfig (key) {\n const configKey = `${PREFIX}.${key}`\n if (this.config[key] === atom.config.get(configKey)) { return }\n this.config[key] = atom.config.get(configKey)\n if (key === 'schedules') {\n return this.updateParsedSchedules()\n } else if (key === 'subscriptions') {\n return this.updateParsedSubscriptions()\n }\n }", "title": "" }, { "docid": "7a94e4e97cc393e1fbf0cc0dc7398c53", "score": "0.7138856", "text": "updateConfig(config) {\n return; /*\n this.settings.value = config;\n this.emit(\"config\", config);\n if (this.config.tslint.useLint) this.linter = new Linter(this);\n this.settings.store();\n this.iSense.setSettings(this.config.compiler, this.config.codeFormat);\n */\n }", "title": "" }, { "docid": "33f31a3226237d41d3c55ce75af81e9a", "score": "0.70660895", "text": "function updateConfig() {\n\n const config = getCurrentConfig();\n run.updateMonitorConfiguration(config);\n\n $('#config').html(JSONTree.create(JSON.parse(config)));\n\n run.isMonitorConfigurationSynced(function(result) {\n $('#resetDescription').html(result.responseText);\n\n if (result.responseText === 'true') {\n $('#sourceDescription').html('Default');\n } else {\n $('#sourceDescription').html('User-Specific');\n }\n\n });\n }", "title": "" }, { "docid": "4ae9ce2a11aa0db4ca2e218e4cc5b056", "score": "0.6977634", "text": "function onConfigurationChangeHandler() {\n var configuration = window.Twitch.ext.configuration;\n Nimble.logger.info(\"Configuration Change Handler called.\", window.Twitch.ext.configuration);\n // Load up any configuration from the Config Service into a store\n var developerConfig = configuration.developer ? configuration.developer.content : \"{}\";\n var streamerConfig = configuration.broadcaster ? configuration.broadcaster.content : \"{}\";\n var globalConfig = configuration.global ? configuration.global.content : \"{}\";\n twitch.store.config.developer = parseConfig(developerConfig);\n twitch.store.config.streamer = parseConfig(streamerConfig);\n twitch.store.config.global = parseConfig(globalConfig);\n Nimble.logger.info(\"Configuration Updated: \", twitch.store.config);\n\n // Iterate through any callbacks that have been registered\n window.onTwitchExtConfigCallbacks.forEach(function (callback) {\n callback(twitch.store);\n });\n}", "title": "" }, { "docid": "9cc4f04ccde04ba1345c795e097aa54b", "score": "0.6957587", "text": "updateConfig(config) {\n this.init(config)\n }", "title": "" }, { "docid": "be4e384d246e9bcaf36ad42ecc80b0ba", "score": "0.6807738", "text": "function updateConfig() {\n let settings = {\n position: position,\n display: display\n };\n updateConfigField('notificationSettings', settings);\n updateNotification(position, display);\n}", "title": "" }, { "docid": "68143291a6f00f02c6ba18adecf23bf4", "score": "0.675469", "text": "function onConfigurationChanged() {\r\n reloadConfiguration();\r\n}", "title": "" }, { "docid": "83644205428362aa45e207b2ccc0f5dd", "score": "0.6741049", "text": "reload () {\n this.updateAllConfig()\n this.update()\n }", "title": "" }, { "docid": "14b7d2ac2108f99737d77c310c8b40c2", "score": "0.6701781", "text": "_updateConfig(blockNumber) {\n if (this._initializingConfig) {\n this._onConfigInitialization = () => this._updateConfig(blockNumber);\n return;\n }\n\n if (!this.config.lastBlock || this.config.lastBlock < blockNumber) {\n this.config.lastBlock = blockNumber;\n\n if (!this.config._id) this._initializingConfig = true;\n\n this.model.update({ _id: this.config._id }, this.config, { upsert: true }, (err, numAffected, affectedDocs, upsert) => {\n if (err) console.error('updateConfig ->', err); // eslint-disable-line no-console\n\n if (upsert) {\n this.config._id = affectedDocs._id;\n this._initializingConfig = false;\n if (this._onConfigInitialization) this._onConfigInitialization();\n }\n });\n }\n }", "title": "" }, { "docid": "b8baccd44c5709b4dcfb7d06940f2269", "score": "0.6679969", "text": "function updateSettings() {\n\t\tstore.set('config', config);\n\t}", "title": "" }, { "docid": "666eda706f8ee1fcc83d5ebab0fee758", "score": "0.6665554", "text": "afterupdate() {\n if (this.configOptions.disabled !== undefined) {\n this.isDisabled = this.configOptions.disabled\n }\n\n if (this.configOptions.invalid !== undefined) {\n this.isInvalid = this.configOptions.invalid\n }\n this.addGlobalListeners()\n }", "title": "" }, { "docid": "70e3fd86602f1142423ff7d4f23160d3", "score": "0.6577946", "text": "configuring() {\n this.config.set(this.configuration);\n }", "title": "" }, { "docid": "394f9c5e79fb8e58e41ff80b85632999", "score": "0.6575181", "text": "function checkAndHandleConfig(){\n if(!config_checked){\n // NOTE: The current implementation is rudementary\n // If the config doesn't match the saved config, it will delete ALL data\n // this can and should be updated in any production ready implementaiton\n // e.g. You can using hashing of config to save data for recovery/rollback/migration purposes\n const config = JSON.parse(window.localStorage.getItem(LS_CONFIG_NAME));\n if(\n config &&\n config.hasOwnProperty('START_OF_DAY') &&\n config.START_OF_DAY === CONF_START_OF_DAY &&\n // Removed End of day check as this changing shouldn't really break anything\n //config.hasOwnProperty('END_OF_DAY') &&\n //config.END_OF_DAY === END_OF_DAY &&\n config.hasOwnProperty('TIME_OF_DAY_FORMAT') &&\n config.TIME_OF_DAY_FORMAT === CONF_TIME_OF_DAY_FORMAT &&\n config.hasOwnProperty('TIME_BLOCK_INTERVAL') &&\n config.TIME_BLOCK_INTERVAL === CONF_TIME_BLOCK_INTERVAL &&\n config.hasOwnProperty('TIME_BLOCK_INTERVAL_UNIT') &&\n config.TIME_BLOCK_INTERVAL_UNIT === CONF_TIME_BLOCK_INTERVAL_UNIT &&\n config.hasOwnProperty('PLANNER_SAVE_FORMAT') &&\n config.PLANNER_SAVE_FORMAT === CONF_PLANNER_SAVE_FORMAT\n ){\n // config matches previous config\n // current imp load the planner_data\n // probably not necessary, but a nice place to add this to be loaded once.\n planner_data = JSON.parse(window.localStorage.getItem(LS_PLANNER_DATA));\n console.log('CONFIG UNCHANGED');\n } else{\n console.log('WARNING: CONFIG CHANGED');\n // config doesn't match previous config\n // current imp: delete storage\n window.localStorage.removeItem(LS_CONFIG_NAME);\n window.localStorage.removeItem(LS_PLANNER_DATA);\n\n // Save current config\n let curr_config = {};\n curr_config.START_OF_DAY = CONF_START_OF_DAY;\n //curr_config.END_OF_DAY = END_OF_DAY;\n curr_config.TIME_OF_DAY_FORMAT = CONF_TIME_OF_DAY_FORMAT;\n curr_config.TIME_BLOCK_INTERVAL = CONF_TIME_BLOCK_INTERVAL;\n curr_config.TIME_BLOCK_INTERVAL_UNIT = CONF_TIME_BLOCK_INTERVAL_UNIT;\n curr_config.PLANNER_SAVE_FORMAT = CONF_PLANNER_SAVE_FORMAT;\n window.localStorage.setItem(LS_CONFIG_NAME, JSON.stringify(curr_config));\n\n // save a blank planner data object\n planner_data = {};\n window.localStorage.setItem(LS_PLANNER_DATA, JSON.stringify(planner_data));\n }\n\n config_checked = true;\n }\n \n}", "title": "" }, { "docid": "53b1544f1083381809ba7bcb705d2d8c", "score": "0.65139014", "text": "refreshConfig() {\n this.config = globals.configVault.getScoped('monitor');\n this.nextSkip = false;\n this.nextTempSchedule = false;\n this.checkSchedule();\n }", "title": "" }, { "docid": "9c911856cf3d3270bbd3f0904514b004", "score": "0.64743173", "text": "function updateConfig(newConfig)\n {\n config = newConfig;\n\n if (config.enableDebug) {\n debug = _debugFunc;\n } else {\n debug = _emptyFunc;\n }\n\n debug('Update config successfully');\n }", "title": "" }, { "docid": "9567621c4c1b92832af47e92d71a7f6b", "score": "0.64395446", "text": "function updateConfig() {\r\n\t\tvar appcontext = Documa.RuntimeManager.getApplicationContext();\r\n\t\tvar distributionSet = appcontext.getDistributionManager().getDistributions();\r\n\t\t\r\n\t\tvar foundConfig = false;\r\n\t\tvar device_count;\r\n\t\tif(distributionSet.length > 6) device_count = 6;\r\n\t\telse device_count = distributionSet.length;\r\n\t\t\r\n\t\t//_configManager = Documa.RuntimeManager.getUIManager().getConfigManager();\r\n\t\t\r\n\t\t// if configs are there already, check if the number of devices fits\r\n\t\tif(_configManager.getCurrentConfig() !== null) {\r\n\t\t\t\r\n\t\t\tvar configs = _configManager.getConfigs();\r\n\t\t\tfor(var k = 0; k < _configManager.getConfigs().length; k++) {\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t// if config has right number of devices, activate it\r\n\t\t\t\tif(configs[k].devices.length === device_count) {\r\n\t\t\t\t\t_configManager.activateConfig(k);\r\n\t\t\t\t\tfoundConfig = true;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// if there is still no config found\r\n\t\tif(!foundConfig) {\r\n\t\t\t// this is where the dialogue for choosing a config should appear\r\n\t\t\t\r\n\t\t\t// for now create a default config\r\n\t\t\tswitch (device_count) {\r\n\t\t\t\tcase 1:\r\n\t\t\t\t\t_configManager.setConfig(\"ID1\", \"default1\", \"Bob\", \"Device\", 1, 1, [0]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\t_configManager.setConfig(\"ID2\", \"default2\", \"Bob\", \"Device\", 2, 1, [0, 1]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\t_configManager.setConfig(\"ID3\", \"default3\", \"Bob\", \"Device\", 3, 1, [0, 1, 2]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t\tcase 4:\r\n\t\t\t\t\t_configManager.setConfig(\"ID4\", \"default4\", \"Bob\", \"Device\", 2, 2, [0, 1, 2, 3]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t\tcase 5:\r\n\t\t\t\t\t_configManager.setConfig(\"ID5\", \"default5\", \"Bob\", \"Device\", 3, 2, [0, 1, 2, 3, 4]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t\tcase 6:\r\n\t\t\t\t\t_configManager.setConfig(\"ID6\", \"default6\", \"Bob\", \"Device\", 3, 2, [0, 1, 2, 3, 4, 5]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "daee9eb792441c874bb04674202fe37a", "score": "0.6421639", "text": "updateAllConfig () {\n for (const key in this.config.spec) {\n this.updateConfig(key)\n }\n }", "title": "" }, { "docid": "c9ca23fdbb9a20c4cc33225962d2d228", "score": "0.6417066", "text": "updateConfig(blockNumber) {\n let onConfigInitialization;\n if (this.initializingConfig) {\n onConfigInitialization = () => this.updateConfig(blockNumber);\n return;\n }\n\n if (!this.config.lastBlock || this.config.lastBlock < blockNumber) {\n this.config.lastBlock = blockNumber;\n\n if (!this.config._id) this.initializingConfig = true;\n\n this.model.update(\n { _id: this.config._id },\n this.config,\n { upsert: true },\n (err, numAffected, affectedDocs, upsert) => {\n if (err) logger.error('updateConfig ->', err);\n\n if (upsert) {\n this.config._id = affectedDocs._id;\n this.initializingConfig = false;\n if (onConfigInitialization) onConfigInitialization();\n }\n },\n );\n }\n }", "title": "" }, { "docid": "a2c1f8ab3492636c489f2fb8340ad53b", "score": "0.6381909", "text": "onSettingsUpdated() {}", "title": "" }, { "docid": "52834e5051bcb37399857222e3aaaa65", "score": "0.63712645", "text": "_addToConfig(config) {\n for (let key in config) {\n this.config.set(key, config[key]);\n }\n this.config.save();\n }", "title": "" }, { "docid": "70bab5f89c4ed44f6616b05671124dd0", "score": "0.63571304", "text": "function handleConfiguration(data) {\n\n if (data.type != 'configuration') {\n // Not a configuration event.\n return\n }\n\n if (data.value) {\n // Start by setting the raw value.\n settings[data.key] = data.value;\n }\n\n if (data.key === 'things_on_off') {\n updateThingsOnOff()\n }\n\n if (data.key === 'things_dimmable') {\n updateThingsDimmable()\n }\n}", "title": "" }, { "docid": "feaec25f36b2621da38270f1c8ed3d1d", "score": "0.6343419", "text": "function onChangeConfig(data) {\n excludedTeams.value = data.excludedTeams;\n self.excludedTeams = excludedTeams.value;\n $log.log('(CHANGE:config) new data: ' + JSON.stringify(data));\n\n }", "title": "" }, { "docid": "d981b82984529ba766454e467258ba48", "score": "0.63431793", "text": "updateConfig() {\n localStorage.setItem(this.configKey, JSON.stringify(this.config));\n }", "title": "" }, { "docid": "835926a323ed68da1d978b3d7a758540", "score": "0.63357884", "text": "updateConfig() {\r\n GHOST_SCARED_TIME = this.ghost_scared_dur_input.value();\r\n GHOST_SPEED = this.ghost_speed_input.value();\r\n }", "title": "" }, { "docid": "8b0961d510f51f14c3a21cb77f018e37", "score": "0.6316203", "text": "_applyConfiguration() {\n\n // this.config was set to the options provided in the constructor\n // so layer data attributes on top\n\n const data = this.getDataAttributes();\n const settings = this.getSettings();\n Object\n .keys(data)\n .forEach((key) => {\n let normalizedKey = key.replace(DATA_REPLACE_PATTERN, '_');\n\n let val = data[key];\n\n // Attempt to convert the value if there's a setting for it\n if (settings[normalizedKey]) val = settings[normalizedKey].value(val, false);\n\n if (!okanjo.util.isEmpty(val)) {\n this.config[normalizedKey] = val;\n }\n })\n ;\n\n // Apply defaults from the widget settings\n Object.keys(settings).forEach((key) => {\n if (this.config[key] === undefined && settings[key]._default !== undefined) {\n this.config[key] = settings[key].value(undefined, false);\n }\n });\n }", "title": "" }, { "docid": "6f9e20621675ce7422f551a471dee8a1", "score": "0.62854886", "text": "function didChangeConfiguration() {\n clearConfigMap();\n clearRunMap();\n clearIgnores();\n cleanLintVisibleFiles();\n}", "title": "" }, { "docid": "4066afed9bea217921f057929123b14c", "score": "0.6210001", "text": "function applyConfigUpdates () {\n\t\tif (debug) { this.print(\"Updating Config from level \"+configUpdateLevel+\" to \"+me.charlvl)}\n\t\twhile (configUpdateLevel < me.charlvl) {\n\t\t\tconfigUpdateLevel += 1;\n\t\t\tif (AutoBuildTemplate[configUpdateLevel] !== undefined) {\n\t\t\t\tAutoBuildTemplate[configUpdateLevel].Update.apply(Config); // TODO: Make sure this works\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "24def73e6d737a118fc89730df99a6a1", "score": "0.6169835", "text": "updateConfiguration(options) {\n const folder = utils.getConfFolder(this.home);\n if (!fs.existsSync(folder)) {\n this.logger.warn(`Git repository with tln configuration dosn't exist '${folder}', use 'init-config' command first.`);\n } else {\n this.logger.con(execSync(`pushd ${folder} && git pull origin master && popd`).toString());\n }\n }", "title": "" }, { "docid": "cbd423ba14f929f3a1533d84b98bc6d5", "score": "0.61502415", "text": "didChangeConfiguration(params) {\n this._sendNotification('workspace/didChangeConfiguration', params);\n }", "title": "" }, { "docid": "7c320d5f39be3311b0a3c13eada5c54e", "score": "0.6140835", "text": "updatePropsConfig() {\n this.props.onDecompositionChange({\n datasetId: this.state.datasetId,\n decompositionMode: this.state.decompositionMode,\n category: this.state.selection.category,\n fieldname: this.state.selection.fieldname,\n persistenceLevel: this.state.persistenceLevel,\n modelname: this.state.selection.modelname,\n sigmaScale: this.state.model.sigmaScale,\n ms: this.state.ms,\n });\n }", "title": "" }, { "docid": "8861438f6f8897af45557c668d0df411", "score": "0.60970485", "text": "function resetConfiguration() {\n run.resetMonitorConfiguration(function() {\n run.getConfiguration(function(config) {\n configuration = JSON.parse(config.responseJSON);\n resetInput();\n loadGrid();\n updateConfig();\n });\n });\n }", "title": "" }, { "docid": "fe955c53e7b760ffa9e9e70b11686b92", "score": "0.60913545", "text": "function obliviate() {\n Modify_JSON_For_Config(CosmicComicsData + \"/config.json\", \"path\", \"\");\n window.location.reload();\n}", "title": "" }, { "docid": "4e460361c0fc37fe725eadeed82c2c30", "score": "0.6090985", "text": "update () {\n const disk = JSON.parse(fs.readSync(this.src))\n this.config = Object.assign(disk, this.config)\n fs.writeFile(this.src, JSON.stringify(this.config), {flag: 'w'}, (err) => {\n if (err) throw err\n })\n }", "title": "" }, { "docid": "9f764a56f12a9a32ab9004a25d766250", "score": "0.6089781", "text": "updateConfig(canvas) {}", "title": "" }, { "docid": "d3454a5352913419fcbb56a1839c656f", "score": "0.60571975", "text": "function updateConfig(param) {\n\t$.trace.debug(\"Update Config exit called\");\n\tlet before = param.beforeTableName;\n\tlet after = param.afterTableName;\n\tlet pStmt = param.connection.prepareStatement('select * from \"' + after + '\"');\n\n\t// Get Input Data from OData Create\n\tvar data = Utils.recordSetToJSON(pStmt.executeQuery(), 'ConfigBucket');\n\n\t// GET entity\t\n\tvar promiseImportEntities = Utils.getImportEntitiesPromise([\"db::adm.config.bucketCustom\", \"db::adm.config.bucket\"]);\n\n\ttry {\n\t\tvar oRow = data.ConfigBucket[0];\n\t\tpromiseImportEntities.then(function(entities) {\n\t\t\tvar ConfigBucket = entities[\"db::adm.config.bucketCustom\"];\n\t\t\tvar DefaultConfigBucket = entities[\"db::adm.config.bucket\"];\n\t\t\treturn Utils.getTxPromise([ConfigBucket, DefaultConfigBucket]);\n\t\t}).then(function(txObj) {\n\t\t\treturn Promise.all([\n\t\t\t\tUtils.getTxFindPromise(txObj.entities[0], {\n\t\t\t\t\tBUCKET_ID: oRow.BUCKET_ID,\n\t\t\t\t\tSEQ: oRow.SEQ,\n\t\t\t\t\tREACTION_TYPE: oRow.REACTION_TYPE\n\t\t\t\t}, txObj.tx), //ConfigBucket\n\t\t\t\tUtils.getTxFindPromise(txObj.entities[1], {\n\t\t\t\t\tBUCKET_ID: oRow.BUCKET_ID,\n\t\t\t\t\tSEQ: oRow.SEQ,\n\t\t\t\t\tREACTION_TYPE: oRow.REACTION_TYPE\n\t\t\t\t}, txObj.tx)\n\t\t\t]); //DefaultConfigBucket\n\t\t}).then(function(aValues) {\n\t\t\tvar oConfigBucket, oDefaultConfigBucket, oConfigBucketCurrent, oDefaultConfigBucketCurrent, tx;\n\t\t\toConfigBucket = aValues[0].entities[0];\n\t\t\toDefaultConfigBucket = aValues[1].entities[0];\n\t\t\ttx = aValues[0].tx;\n\t\t\tvar newConfigBucket, newConfigBucketCurrent;\n\t\t\tvar oHistory = {\n\t\t\t\tCHANGED_ON: new Date(),\n\t\t\t\tCHANGED_BY: $.session.getUsername()\n\t\t\t};\n\n\t\t\tif (oConfigBucket) {\n\t\t\t\toConfigBucket.FROM_VALUE = validValue(oRow.FROM_VALUE, oConfigBucket.FROM_VALUE);\n\t\t\t\toConfigBucket.TO_VALUE = validValue(oRow.TO_VALUE, oConfigBucket.TO_VALUE);\n\t\t\t\toConfigBucket.STR_VALUE = oRow.STR_VALUE || '';\n\t\t\t\toConfigBucket.DESCRIPTION = validValue(oRow.DESCRIPTION, oConfigBucket.DESCRIPTION);\n\t\t\t\toConfigBucket.IS_ENABLED = validValue(oRow.IS_ENABLED, oConfigBucket.IS_ENABLED);\n\t\t\t\toConfigBucket.REACTION_TYPE = oRow.REACTION_TYPE || '';\n\t\t\t\toConfigBucket.CHANGED_ON = new Date(),\n\t\t\t\toConfigBucket.CHANGED_BY = $.session.getUsername();\n\n\t\t\t} else {\n\n\t\t\t\toConfigBucket = {\n\t\t\t\t\t$entity: aValues[0].entityType,\n\t\t\t\t\tBUCKET_ID: oRow.BUCKET_ID,\n\t\t\t\t\tSEQ: oRow.SEQ,\n\t\t\t\t\tFROM_VALUE: validValue(oRow.FROM_VALUE, oDefaultConfigBucket.FROM_DEFAULT), // Use default value if not set\n\t\t\t\t\tTO_VALUE: validValue(oRow.TO_VALUE, oDefaultConfigBucket.TO_DEFAULT), // Use default value if not set\n\t\t\t\t\tSTR_VALUE: validValue(oRow.STR_VALUE, oDefaultConfigBucket.STR_DEFAULT),\n\t\t\t\t\tDESCRIPTION: oRow.DESCRIPTION,\n\t\t\t\t\tREACTION_TYPE: oRow.REACTION_TYPE,\n\t\t\t\t\tIS_ENABLED: validValue(oRow.IS_ENABLED, oDefaultConfigBucket.IS_ENABLED),\n\t\t\t\t\tCHANGED_ON: new Date(),\n\t\t\t\t\tCHANGED_BY: $.session.getUsername()\n\t\t\t\t};\n\n\t\t\t}\n\t\t\t// Verify that FROM_VALUE <= TO_VALUE\n\t\t\tif (oConfigBucket.TO_VALUE && oConfigBucket.FROM_VALUE && oConfigBucket.TO_VALUE < oConfigBucket.FROM_VALUE) {\n\t\t\t\t//oConfigBucket.TO_VALUE = oConfigBucket.FROM_VALUE;\n\t\t\t\tthrow \"Validation Error: TO_VALUE must be less than or equal to FROM_VALUE or equal to null. Received TO_VALUE: \" +\n\t\t\t\t\toConfigBucket\n\t\t\t\t\t.TO_VALUE +\n\t\t\t\t\t\", FROM_VALUE: \" + oConfigBucket.FROM_VALUE;\n\t\t\t}\n\t\t\treturn Utils.getTxSavePromise(oConfigBucket, tx);\n\t\t}).then(function(tx) {\n\t\t\t//save successful, close tx\n\t\t\t$.trace.debug('Saved');\n\t\t\ttx.$close();\n\t\t}).catch((error) => {\n\t\t\t//throw critical, log warnings\n\t\t\tthrow \"Execution Error: \" + (error.message || error);\n\t\t});\n\t} catch (e) {\n\t\tthrow \"Execution Error: \" + (e.message || e);\n\t} finally {\n\t\tpStmt.close();\n\t}\n}", "title": "" }, { "docid": "9e15662a638859db54921aab48c9a61a", "score": "0.6038172", "text": "updatePreferences(config) {\n this.config = config;\n this.setTheme(config.theme);\n this.emit(\"config\", config);\n this.savePreferences();\n }", "title": "" }, { "docid": "e3c21e6a1fbffbc53dce9a4f5909d6ee", "score": "0.60291463", "text": "async update(newConfiguration) {\n this._forceComponentUpdate = false;\n this._updateAvailabilityPolicy(newConfiguration);\n this._updateConfiguration(newConfiguration);\n }", "title": "" }, { "docid": "9fb4a3565cfd14e5897f79b4deb251b2", "score": "0.60227126", "text": "function initConfiguration() {\r\n oConfiguration = {};\r\n if (oDefinition.contracts.configuration && oDefinition.contracts.configuration.parameters) {\r\n // clone the parameters so that we can merge in oAlterEgo.configuration\r\n oConfiguration = JSON.parse(JSON.stringify(oDefinition.contracts.configuration.parameters));\r\n }\r\n that.updateConfiguration(oConfiguration, oAlterEgo.configuration);\r\n }", "title": "" }, { "docid": "2d680e63955cc8400371ccbb0a92744a", "score": "0.5982854", "text": "function updateConfigLiveReload() {\n var configs = grunt.file.expand(settings.dir.cordova + '/platforms/**/config.xml');\n var interfaces = require('os').networkInterfaces(),\n baseUrl = null;\n\n for (var name in interfaces) {\n var option = _.find(interfaces[name], {internal: false, family: \"IPv4\"});\n if (option) {\n baseUrl = 'http://' + option.address + ':9010/';\n break;\n }\n }\n configs.forEach(function (file) {\n var data = grunt.file.read(file),\n platform = file.match(/platforms\\/([A-Za-z0-9\\._-]*)\\/./)[1];\n data = data.replace('<content src=\"', '<content src=\"' + baseUrl + platform + '/www/');\n grunt.file.write(file, data);\n });\n }", "title": "" }, { "docid": "3c63804458500991335da08bc7fbc41d", "score": "0.5979881", "text": "function updateConfig(config, cb) {\n var configSet = {}\n if (config.components) configSet[\"components\"] = config.components;\n if (config.menuItems) configSet[\"menus\"] = config.menuItems;\n if (config.defaultWorkspace) configSet[\"workspaces\"] = config.defaultWorkspace.workspaces;\n\n //if (config.overrides) configSet[\"cssOverridePath\"] = config.overrides;\n FSBL.Clients.ConfigClient.processAndSet(\n {\n newConfig: configSet,\n overwrite: true,\n replace: true\n },\n function (err, config) {\n return cb(err)\n })\n}", "title": "" }, { "docid": "641d732885d3122f64c87d83f6c98b53", "score": "0.59701484", "text": "applyConfig(config) {\n Object.keys(config).forEach(key => this[key] = config[key]);\n }", "title": "" }, { "docid": "f5f20c8b9d0efb6d77b17202f3900e3f", "score": "0.5963838", "text": "updateConfig(results) {\n this.setState({config: results});\n }", "title": "" }, { "docid": "82475af51ae509bfeb18ed7f9f1a2b84", "score": "0.5962315", "text": "updateProjectConfig(callback) {\n if (this.projectConfigService) {\n var self = this;\n this.projectConfigService.getConfig()\n .then((configs) => {\n self.cachedProjectConfigs = configs; // Cache config object\n callback(null, configs);\n }).catch((err) => {\n self.cachedProjectConfigs = null;\n callback(err || new Error(), null);\n });\n } else {\n callback('Project config service not exists.', null);\n }\n }", "title": "" }, { "docid": "cd410c631d3459b42978ea97d379dd9b", "score": "0.5939316", "text": "set updateConfigPath(value) {\n this.clientPromise = null;\n this._appUpdateConfigPath = value;\n this.configOnDisk = new (_lazyVal().Lazy)(() => this.loadUpdateConfig());\n }", "title": "" }, { "docid": "7b1caa8036e492f412e0e5d0915b1c2b", "score": "0.5936947", "text": "writeConfig_() {\n // Already resolved.\n if (!this.configWrittenResolver_) {\n return;\n }\n\n // Create the markup object according to values specified in the parameters.\n const isPartOfObj = {\n 'productID': this.markupValues_.isPartOfProductId,\n '@type': this.markupValues_.isPartOfType,\n };\n const obj = {\n '@context': 'http://schema.org',\n '@type': this.markupValues_.type,\n 'isAccessibleForFree': this.markupValues_.isAccessibleForFree,\n 'isPartOf': isPartOfObj,\n };\n\n // Try to find an existing ld+json markup to update, if one exists.\n const elements = this.doc_\n .getRootNode()\n .querySelectorAll('script[type=\"application/ld+json\"]');\n for (let i = 0; i < elements.length; i++) {\n const element = elements[i];\n if (element.textContent) {\n const possibleConfigs = tryParseJson(element.textContent);\n if (!possibleConfigs) {\n continue;\n }\n\n // Support arrays of JSON objects.\n let possibleConfig;\n if (Array.isArray(possibleConfigs)) {\n possibleConfig = possibleConfigs[0];\n } else {\n possibleConfig = possibleConfigs;\n }\n\n // Merge the '@type' lists, and set the other fields, preferring the\n // existing values\n possibleConfig['@type'] = this.merge_(\n possibleConfig['@type'],\n this.markupValues_.type\n );\n possibleConfig['isAccessibleForFree'] =\n possibleConfig['isAccessibleForFree'] ||\n this.markupValues_.isAccessibleForFree;\n if (possibleConfig['isPartOf']) {\n possibleConfig['isPartOf']['@type'] = this.merge_(\n possibleConfig['isPartOf']['@type'],\n this.markupValues_.isPartOfType\n );\n possibleConfig['isPartOf']['productID'] =\n possibleConfig['isPartOf']['productID'] ||\n this.markupValues_.isPartOfProductId;\n } else {\n possibleConfig['isPartOf'] = isPartOfObj;\n }\n\n element.textContent = JSON.stringify(possibleConfigs);\n this.configWrittenResolver_();\n this.configWrittenResolver_ = null;\n return;\n }\n }\n\n // No valid existing ld+json markup to modify, so insert the markup in a new\n // script tag.\n const element = createElement(\n this.doc_.getWin().document,\n 'script',\n {'type': 'application/ld+json'},\n JSON.stringify(obj)\n );\n this.doc_.getHead().appendChild(element);\n this.configWrittenResolver_();\n this.configWrittenResolver_ = null;\n }", "title": "" }, { "docid": "ff1456dbc5b4987263b1d294030767c4", "score": "0.5931572", "text": "configure() {\n //\n }", "title": "" }, { "docid": "ff1456dbc5b4987263b1d294030767c4", "score": "0.5931572", "text": "configure() {\n //\n }", "title": "" }, { "docid": "bc9d21edcced659b4b5236b23d923816", "score": "0.59290373", "text": "function reloadConfig() {\n\tvar configData = JSON.parse(fs.readFileSync('config.json'));\n\tapp.set('config', configData);\n}", "title": "" }, { "docid": "63b7a0d34894c6d512579b409ecdd318", "score": "0.5919638", "text": "loadConfig() {\n\n }", "title": "" }, { "docid": "a2549c65dd0edd75eadde8f96e90cff5", "score": "0.5913695", "text": "function myCustomConfigurationChangeFunction(data) {\t\r\n\t\t\t//console.log(data);\r\n\t\t}", "title": "" }, { "docid": "a8b752baa88d56138024ad73e3b9dd0c", "score": "0.59031415", "text": "function handleConfigAndStart(response) {\n if(response) {\n config = response;\n initialiseBeaver(config.hlcServerUrl);\n updateGraphs();\n setInterval(updateGraphs, config.updateGraphsMilliseconds);\n } \n else {\n console.log(\"Unable to get config. Refresh page to try again.\");\n }\n}", "title": "" }, { "docid": "ef3fa06cd3579ef355cc068abef23700", "score": "0.5892671", "text": "refreshConfig(){\n this.config = globals.configVault.getScoped('playerController');\n const cmd = 'txAdmin-checkPlayerJoin ' + (this.config.onJoinCheckBan || this.config.onJoinCheckWhitelist).toString();\n try {\n globals.fxRunner.srvCmd(cmd);\n } catch (error) {\n if(GlobalData.verbose) dir(error);\n }\n }", "title": "" }, { "docid": "eaa789f00ae5668afdabde1533fa72d3", "score": "0.5889264", "text": "function configDidUpdate() {\n const config = store.state.config;\n\n\n\tquality = qualitySelector();\n\tisLowQuality = quality === QUALITY_LOW;\n\tisNormalQuality = quality === QUALITY_NORMAL;\n\tisHighQuality = quality === QUALITY_HIGH;\n\n\tif (skyLightingSelector() === SKY_LIGHT_NONE) {\n\t\tappNodes.canvasContainer.style.backgroundColor = '#000';\n\t}\n\n\tSpark.drawWidth = quality === QUALITY_HIGH ? 0.75 : 1;\n}", "title": "" }, { "docid": "8cb4505f458fc9c4d63ac5a3f8d617d0", "score": "0.5853", "text": "function newconfig() {\r\n prompt.start();\r\n\r\n prompt.message = \"\";\r\n\r\n prompt.get([{\r\n name: 'witnessname',\r\n description: 'Witness Account Name? (No @)',\r\n required: true\r\n }, {\r\n name: 'witnessurl',\r\n description: \"Witness Campaign URL/Website?\",\r\n required: true\r\n }, {\r\n name: 'wifinput',\r\n description: \"Witness Account Posting Private Key?\",\r\n required: true,\r\n replace: '*',\r\n hidden: true\r\n }, {\r\n name: 'activekey',\r\n description: \"Witness Account Active Key?\",\r\n required: true,\r\n replace: '*',\r\n hidden: true\r\n }, {\r\n name: 'bkey',\r\n description: \"Witness Account Block Signing Key?\",\r\n required: true,\r\n replace: '*',\r\n hidden: true\r\n }, {\r\n name: 'interval',\r\n description: \"Number of Blocks Between Update? (1 block = 3 seconds)\",\r\n required: false,\r\n default: 100\r\n }, {\r\n name: 'voteklye',\r\n description: \"Vote KLYE for Witness? (true / false)\",\r\n required: true,\r\n default: true\r\n }], function(err, result) {\r\n // If we messed up and got error on setup\r\n if (err) {\r\n console.log(\"!!! ERROR: Something Went Wrong During Config.. Please Restart Service! (ctrl + c to exit)\")\r\n };\r\n\r\n if (result) {\r\n\r\n var newconfig = {\r\n witnessname: result.witnessname,\r\n wif: result.wifinput,\r\n url: result.witnessurl,\r\n activekey: result.activekey,\r\n bkey: result.bkey,\r\n interval: result.interval,\r\n voteklye: result.voteklye\r\n };\r\n\r\n console.log(\"*** SUCCESS: You Completed The Configuration - Saving to Disk!\");\r\n // Save data to file\r\n fs.writeFile(__dirname + \"/pricesnatcher.config\", JSON.stringify(newconfig), function(err, win) {\r\n if (err) {\r\n console.log(\"!!! ERROR: Unable to Save Config to Disk!\");\r\n };\r\n if (win) {\r\n console.log(\"New Configuration Input Saved\");\r\n console.log(\"Initializing Price Feed Updater, Loading Config File...\");\r\n // Start price feed\r\n startfeed();\r\n };\r\n }); // END config writeFile\r\n // Start price feed (backup/redundancy)\r\n startfeed();\r\n }; //END if (result)\r\n }); // END Setup Prompt\r\n}", "title": "" }, { "docid": "d6f39c06418c6370a06b9dc39b1abc5a", "score": "0.585054", "text": "set config(value) {\n this._config = value;\n }", "title": "" }, { "docid": "2bf069f72a7f9f35f5620ec31670ee1a", "score": "0.5848719", "text": "function updateConfig() {\n\n\tcalculate({ config: 'radius', trigger: 3, ranges: ['sublow', 'low', 'lowmid', 'mid', 'highmid', 'high', 'superhigh'] });\n\n\tcalculate({ config: 'lineCount', trigger: 10, ranges: ['high', 'superhigh'] });\n\n\tcalculate({ config: 'lineWidth', trigger: 80, ranges: ['lowmid', 'mid', 'high', 'high'] });\n\n\tcalculate({ config: 'length', trigger: 25, ranges: ['sublow', 'low', 'mid', 'high'] });\n\n\tcalculate({ config: 'lengthMove', trigger: 115, ranges: ['highmid', 'high', 'superhigh'] });\n\n\tcalculate({ config: 'offset', trigger: 185, ranges: ['sublow', 'low', 'lowmid', 'mid', 'highmid', 'high', 'superhigh'] });\n\n\t//calculate({ config : 'speed', trigger: 10, ranges : [ 'superhigh' ] });\n\n\tcalculate({ config: 'spin', trigger: 255, ranges: ['highmid', 'high', 'superhigh'] });\n\n\t//calculate({ config : 'pulse', ranges : [ 'superhigh' ] });\n\n\tcalculate({ config: 'hueBase', trigger: 25, ranges: ['low', 'mid', 'high', 'superhigh'] });\n\n\tcalculate({ config: 'hueRange', trigger: 25, ranges: ['highmid', 'high', 'superhigh'] });\n}", "title": "" }, { "docid": "7e3937640ac9dacdfd87779563b8e7f3", "score": "0.5825153", "text": "function configureUpdater(callback) {\n\texports.updater = new UpdaterConfig();\n//\texports.updater.init(callback);\n exports.updater.init(function() {\n callback();\n });\n}", "title": "" }, { "docid": "0b524afd392616d42fc17258b7f93551", "score": "0.582029", "text": "function updateSettings() {\n\n function updateContents(id, dataKey, defaultValue) {\n let val = getSetting(dataKey, defaultValue);\n $(id).val(val);\n }\n\n $('input[data-config]').each((i,input)=>{\n let $input = $(input);\n let key = $input.data('config');\n let defaultVal = $input.data('default-value');\n let val = getSetting(key, defaultVal);\n $input.val(val);\n });\n\n // updateContents('#radiusInput', 'radius', 30);\n // updateContents('#fontColorInput', 'fontColor', 30);\n // updateContents('#fontColorInput', 'fontColor', 30);\n\n\n let refreshInterval = getSetting('refreshInterval', DEFAULT_REFRESH_INTERVAL);\n $('#refreshInterval').val(refreshInterval);\n\n }", "title": "" }, { "docid": "4003aa00602b435a028d48edfa5d6cc8", "score": "0.5819618", "text": "watchConfig (key) {\n const configKey = `${PREFIX}.${key}`\n atom.config.observe(configKey, () => this.updateConfig(key))\n }", "title": "" }, { "docid": "6fe6dd9b0482463353cdade6c98dec4d", "score": "0.5818261", "text": "setConfig(config) {\n super.setConfig(this.processConfig(config));\n }", "title": "" }, { "docid": "6fe6dd9b0482463353cdade6c98dec4d", "score": "0.5818261", "text": "setConfig(config) {\n super.setConfig(this.processConfig(config));\n }", "title": "" }, { "docid": "6fe6dd9b0482463353cdade6c98dec4d", "score": "0.5818261", "text": "setConfig(config) {\n super.setConfig(this.processConfig(config));\n }", "title": "" }, { "docid": "9ddd667a222ab909473996be0b4bf0ef", "score": "0.5816688", "text": "async _migrateConfigs(blueprintConfigs) {\n if (!Array.isArray(blueprintConfigs)) {\n blueprintConfigs = [blueprintConfigs];\n }\n blueprintConfigs.forEach(bc => {\n Object.keys(bc.getAll()).forEach(key => {\n const blueprintValue = bc.get(key);\n const jhipsterValue = this.config.get(key);\n // Remove duplicated value\n if (jhipsterValue === blueprintValue || blueprintValue === undefined) {\n bc.delete(key);\n }\n });\n });\n\n // Get every config from blueprint configs and ask for conflict resolution.\n let keys = [];\n blueprintConfigs.forEach(bc => {\n keys = keys.concat(Object.keys(bc.getAll()));\n });\n keys = this._.uniq(keys);\n keys.forEach(key => {\n this.queueMethod(this._askConfigConflict.bind(this, key, blueprintConfigs), `${key}Prompt`, 'initializing');\n // this._askConfigConflict(key, blueprintConfigs);\n });\n }", "title": "" }, { "docid": "509a003c1c5d4a6c633de5adfc825a39", "score": "0.58004355", "text": "function ProcessConfigStrings() {\n\tfor (var key in cgs.gameState) {\n\t\tif (!cgs.gameState.hasOwnProperty(key)) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tConfigStringModified(key, cgs.gameState[key]);\n\t}\n}", "title": "" }, { "docid": "717c3fa373bca0596541d4b26c6c7df1", "score": "0.58002883", "text": "updateConfig(config) {\n if (this.actions.length > 0) {\n let action = this.actions[this.actions.length - 1];\n if (notSet(action.actionConfig))\n action.actionConfig = {};\n updateObject(config, action.actionConfig);\n }\n return this;\n }", "title": "" }, { "docid": "8903764daa60395a202520b6e6dc0f61", "score": "0.57977724", "text": "async loadConfig() {\n notify(\"RELOADING=1\");\n if (this.configurationDirectory) {\n this.trace(`load: ${this.configurationDirectory}/config.json`);\n await this.configure(\n await expand(\"${include('config.json')}\", {\n constants: {\n basedir: this.configurationDirectory\n },\n default: {}\n })\n );\n }\n\n for (const listener of this.listeningFileDescriptors) {\n if (listener.name === undefined) {\n this.warn(`listener without name ${JSON.stringify(listener)}`);\n } else {\n await this.configureValue(listener.name, listener);\n }\n }\n }", "title": "" }, { "docid": "d703779b58c5b12564029ce5d1bc202d", "score": "0.5796895", "text": "updateViewerConfig (event) {\n if (!event.target) return\n this.setState({\n stateChanged: true,\n [event.target.dataset.configkey]: event.target.value,\n })\n }", "title": "" }, { "docid": "81a3fdc18fb2484eda3e0fdf72228b6f", "score": "0.577982", "text": "reconfigure(config) {\n // clear the cached headers\n const me = this;\n me.headers = null; // Ensure correct ordering\n\n me.setConfig(config);\n me.trigger('reconfigure');\n }", "title": "" }, { "docid": "734967c90d1241ae43ae6216a028408d", "score": "0.57723874", "text": "setConfig(config) {\n super.setConfig(this.processConfig(config));\n }", "title": "" }, { "docid": "734967c90d1241ae43ae6216a028408d", "score": "0.57723874", "text": "setConfig(config) {\n super.setConfig(this.processConfig(config));\n }", "title": "" }, { "docid": "c4034607f944d43f829429d60bf7654f", "score": "0.5766982", "text": "function updateConfig(settings) {\n let code = Object.assign({}, notebook_lib_widget[\"b\" /* StaticNotebook */].defaultEditorConfig.code, settings.get('codeCellConfig').composite);\n let markdown = Object.assign({}, notebook_lib_widget[\"b\" /* StaticNotebook */].defaultEditorConfig.markdown, settings.get('markdownCellConfig').composite);\n let raw = Object.assign({}, notebook_lib_widget[\"b\" /* StaticNotebook */].defaultEditorConfig.raw, settings.get('rawCellConfig').composite);\n factory.editorConfig = { code, markdown, raw };\n factory.notebookConfig = {\n scrollPastEnd: settings.get('scrollPastEnd').composite,\n defaultCell: settings.get('defaultCell').composite\n };\n factory.shutdownOnClose = settings.get('kernelShutdown')\n .composite;\n updateTracker({\n editorConfig: factory.editorConfig,\n notebookConfig: factory.notebookConfig,\n kernelShutdown: factory.shutdownOnClose\n });\n }", "title": "" }, { "docid": "a7af09460b4c380c23acc381cf491617", "score": "0.57660955", "text": "function ExpedTabUpdateConfig() {\n\t\tvar conf = ExpedTabValidateConfig();\n\t\tconf.fleetConf[ selectedFleet ].expedition = selectedExpedition;\n\t\tconf.expedConf[ selectedExpedition ].greatSuccess = plannerIsGreatSuccess;\n\t\tlocalStorage.expedTab = JSON.stringify( conf );\n\t}", "title": "" }, { "docid": "032fb49c6f87a0d03fcc50e62840d491", "score": "0.57550555", "text": "static getUpdateConfig () {\n MC.request( \"update.get_config\"\n , []\n , UAC.receiveUpdateConfig\n );\n }", "title": "" }, { "docid": "6535b09a7b0a82ca5318e18c8a359592", "score": "0.5754884", "text": "recompile(){\n\t\tif(this.currentJob) return;\n\t\tconst source = path.join(__dirname, \"..\", \"..\", \"config.cson\");\n\t\tconst target = path.join(__dirname, \".icondb.js\");\n\t\tthis.compileConfig(source, target)\n\t\t\t.then(result => atom.notifications.addInfo(\"Config recompiled\", {dismissable: true}))\n\t\t\t.catch(error => atom.notifications.addError(error.message, {\n\t\t\t\tdetail: error.detail || error.toString(),\n\t\t\t\tstack: error.stack || null,\n\t\t\t\tdismissable: true\n\t\t\t}));\n\t}", "title": "" }, { "docid": "bab77c79b2b3c5265dfc6cb786b8fde0", "score": "0.5744755", "text": "configure(config) {\n this._config = config;\n }", "title": "" }, { "docid": "3004418d3e79562f8f5e531a28ce0492", "score": "0.5733265", "text": "async function updateConfig(configName, companyName, channelName) {\r\n\r\n //shell.env[\"PATH\"] = NETWORK_PATH + `channel-artifacts/${channelName}` + shell.env[\"PATH\"]\r\n let path = NETWORK_PATH + `/channel-artifacts/${channelName}/`\r\n\r\n var data1 = fs.readFileSync(path + `${configName}.json`);\r\n var myObject1 = JSON.parse(data1);\r\n myObject1 = { ...myObject1.data.data[0].payload.data.config }\r\n\r\n fs.writeFileSync(path + `${configName}.json`, JSON.stringify(myObject1, null, 4))\r\n\r\n var data2 = fs.readFileSync(path + `${companyName}.json`);\r\n var myObject2 = JSON.parse(data2);\r\n\r\n myObject1.channel_group.groups.Application.groups[`${companyName}.msp`] = myObject2\r\n fs.writeFileSync(path + \"modified_config.json\", JSON.stringify(myObject1, null, 4)) //\r\n}", "title": "" }, { "docid": "c1a39b1161595ce60d72173a1833f528", "score": "0.5727437", "text": "function updateConfig() {\n return new Promise(function (resolve, reject) {\n if (window.kbconfig) {\n resolve(window.kbconfig);\n }\n console.log('Config: checking remote widgets');\n assertConfig();\n if (!config.use_local_widgets) {\n // var uiCommonPaths = config.urls.ui_common_root + \"widget-paths.json\";\n require(['uiCommonPaths'], function (pathConfig) {\n for (var name in pathConfig.paths) {\n pathConfig.paths[name] = config.urls.ui_common_root + pathConfig.paths[name];\n }\n require.config(pathConfig);\n config.new_paths = pathConfig;\n resolve(config);\n }, function () {\n console.warn(\"Unable to get updated widget paths. Sticking with what we've got.\");\n resolve(config);\n });\n } else {\n resolve(config);\n }\n }).then(function (config) {\n console.log('Config: fetching remote data configuration.');\n return Promise.resolve($.ajax({\n dataType: 'json',\n cache: false,\n url: config.urls.data_panel_sources\n }));\n }).then(function (dataCategories) {\n console.log('Config: processing remote data configuration.');\n var env = config.environment;\n // little bit of a hack, but dev should => ci for all things data.\n // it doesn't seem worth making a new dev block for the example data.\n if (env === 'dev') {\n env = 'ci';\n }\n config.publicCategories = dataCategories[env].publicData;\n config.exampleData = dataCategories[env].exampleData;\n return Promise.try(function () {\n return config;\n });\n }).catch(function (error) {\n console.error('Config: unable to process remote data configuration options. Searching locally.');\n // hate embedding this stuff, but it seems the only good way.\n // the filename is the last step of that url path (after the last /)\n var path = config.urls.data_panel_sources.split('/');\n\n return Promise.resolve($.ajax({\n dataType: 'json',\n cache: false,\n url: 'static/kbase/config/' + path[path.length - 1]\n }))\n .then(function (dataCategories) {\n console.log('Config: processing local data configuration.');\n var env = config.environment;\n if (env === 'dev') {\n env = 'ci';\n }\n config.publicCategories = dataCategories[env].publicData;\n config.exampleData = dataCategories[env].exampleData;\n return config;\n })\n .catch(function (error) {\n console.error('Config: unable to process local configuration options, too! Public and Example data unavailable!');\n return config;\n });\n });\n }", "title": "" }, { "docid": "8a21e80d001ddd0e82f52084df1bfa38", "score": "0.5717323", "text": "function readConfig() {\n // get config update:\n var upd = Object.assign({}, cfg, OvmsConfig.GetValues(\"usr\", \"chgthrottle.\"));\n cfg = upd;\n\n // process:\n state.enabled = (cfg[\"enabled\"] == \"yes\");\n if (state.enabled && !state.ticker) {\n print(\"throttling enabled\");\n state.ticker = PubSub.subscribe(tickerEvent, ticker);\n ticker();\n } else if (!state.enabled && state.ticker) {\n print(\"throttling disabled\");\n PubSub.unsubscribe(state.ticker);\n state.ticker = false;\n state.temp = state.level = state.amps = state.charging = state.notified = null;\n OvmsVehicle.SetChargeCurrent(0); // unlimited\n }\n}", "title": "" }, { "docid": "02d52e41cc8f1c9be33e9e0332790247", "score": "0.57171243", "text": "WriteConfig() {\r\n /*\r\n * We need a little helper function to convert the color string (e.g. #12AB3F)\r\n * from the adapter config into an array of RGB values.\r\n */\r\n const hexToRgb = function (hex) {\r\n var result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(hex);\r\n return result ? [\r\n parseInt(result[1], 16),\r\n parseInt(result[2], 16),\r\n parseInt(result[3], 16)\r\n ] : null;\r\n }\r\n\r\n /* take every color from user configuration and send it to hyperion server */\r\n for(var color of this.config.colors) {\r\n this.serverCon.Color( hexToRgb(color.color), Number(color.prio), 0);\r\n this.configElementsRequested++;\r\n }\r\n\r\n /* then do the same again with the effects... */\r\n for(var effect of this.config.effects) {\r\n this.serverCon.Effect( effect.effect, Number(effect.prio), 0);\r\n this.configElementsRequested++;\r\n }\r\n }", "title": "" }, { "docid": "9029721b43a2619284252360c1c5626d", "score": "0.56907374", "text": "function loadConfiguration() {\r\n\t\tif( $( \"form[action='login.html']\" ).length != 0 ) { //alert(\"login\") \r\n\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Global\r\n\t\tif( !getValue( \"configFastLinks\" ) ) { setValue( \"configFastLinks\", \"true\" ); }\r\n\t\tif( !getValue( \"configMUFastLinks\" ) ) { setValue( \"configMUFastLinks\", \"true\" ); }\r\n\t\tif( !getValue( \"configMoveNotifications\" ) ) { setValue( \"configMoveNotifications\", \"true\" ); }\r\n\t\tif( !getValue( \"banned\" ) ) { checkforMumembers(); }\r\n\t\tif( !getValue( \"configLinkBar\" ) ) { setValue( \"configLinkBar\", \"true\" ); }\r\n\t\tif( !getValue( \"configHideMissionStuff\" ) ) { setValue( \"configHideMissionStuff\", \"true\" ); }\r\n\t\tif( !getValue( \"configHideChat\" ) ) { setValue( \"configHideChat\", \"false\" ); }\r\n\t\tif( !getValue( \"configKari\" ) ) { setValue( \"configKari\", \"true\" ); }\r\n \r\n //Run Once\r\n\t\tif( !getValue( \"configStatisticData\" ) ) { setValue( \"configStatisticData\", \"false\" ); }\r\n\t\t\r\n\t\t//HIT\r\n\t\tif( !getValue( \"today_miss\" ) ) { setValue( \"today_miss\", 0 ); }\r\n\t\tif( !getValue( \"today_crit\" ) ) { setValue( \"today_crit\", 0 ); }\r\n\t\tif( !getValue( \"today_avoid\" ) ) { setValue( \"today_avoid\", 0 ); }\r\n\t\tif( !getValue( \"today_all\" ) ) { setValue( \"today_all\", 0 ); }\r\n\t\tif( !getValue( \"today_hitday\" ) ) { setValue( \"today_hitday\", getDay() ); }\r\n\t\t\r\n\t\t//if( !getValue( \"configEatButtons\" ) ) { setValue( \"configEatButtons\", \"false\" ); }\r\n\t\tif( !getValue( \"configSkillImprovements\" ) ) { setValue( \"configSkillImprovements\", \"true\" ); }\r\n\t\tif( !getValue( \"configRemoveLang\" ) ) { setValue( \"configRemoveLang\", \"true\" ); }\r\n\t\tif( !getValue( \"configOrgAcc\" ) ) { setValue( \"configOrgAcc\", \"true\" ); }\r\n\t\tif( !getValue( \"configRemoveUselessFastButtons\" ) ) { setValue( \"configRemoveUselessFastButtons\", \"true\" ); }\r\n\t\tif( !getValue( \"configMUBrodcastMsg\" ) ) { setValue( \"configMUBrodcastMsg\", \"true\" ); }\r\n\t\tif( !getValue( \"configSomeFix\" ) ) { setValue( \"configSomeFix\", \"true\" ); }\r\n\t\tif( !getValue( \"configSounds\" ) ) { setValue( \"configSounds\", \"true\" ); }\r\n\r\n\t\t// MU storage\r\n\t\tif( !getValue( \"configMUStorageDonateToMe\" ) ) { setValue( \"configStorageDonateToMe\", \"true\" ); }\r\n\t\tif( !getValue( \"configMUStorageSelect\" ) ) { setValue( \"configMUStorageSelect\", \"true\" ); }\t\r\n\t\tif( !getValue( \"configMUStorageFastButtons\" ) ) { setValue( \"configMUStorageFastButtons\", \"true\" ); }\r\n\t\tif( !getValue( \"configMUStorageDonateImprovements\" ) ) { setValue( \"configMUStorageDonateImprovements\", \"true\" ); }\r\n\t\tif( !getValue( \"configMUStorageDonateCounter\" ) ) { setValue( \"configMUStorageDonateCounter\", \"true\" ); }\r\n\r\n\t\t// MU money\r\n\t\tif( !getValue( \"configMUMoneyDonateToMe\" ) ) { setValue( \"configMUMoneyDonateToMe\", \"true\" ); }\r\n\t\tif( !getValue( \"configMUMoneyDonateImprovements\" ) ) { setValue( \"configMUMoneyDonateImprovements\", \"true\" ); }\r\n\r\n\t\t// Donate\r\n\t\tif( !getValue( \"configDonateProduct\" ) ) { setValue( \"configDonateProduct\", \"true\" ); }\r\n\t\tif( !getValue( \"configDonateFastButtons\" ) ) { setValue( \"configDonateFastButtons\", \"true\" ); }\r\n\r\n\t\t// Battle\r\n\t\tif( !getValue( \"configRoundSelector\" ) ) { setValue( \"configRoundSelector\", \"true\" ); }\r\n\t\tif( !getValue( \"configHideResponse\" ) ) { setValue( \"configHideResponse\", \"true\" ); }\r\n\t\tif( !getValue( \"configBattleList\" ) ) { setValue( \"configBattleList\", \"true\" ); }\r\n\t\tif( !getValue( \"configWeaponSelector\" ) ) { setValue( \"configWeaponSelector\", \"true\" ); }\r\n\t\tif( !getValue( \"configExtraEatUseButton\" ) ) { setValue( \"configExtraEatUseButton\", \"true\" ); }\r\n\t\tif( !getValue( \"configTime\" ) ) { setValue( \"configTime\", \"true\" ); }\r\n\t\tif( !getValue( \"configWeaponTheme\" ) ) { setValue( \"configWeaponTheme\", \"default\" ); }\r\n\t\tif( !getValue( \"configDefaultWeapon\" ) ) { setValue( \"configDefaultWeapon\", \"1\" ); }\r\n\t\tif( !getValue( \"configExtraInfo\" ) ) { setValue( \"configExtraInfo\", \"true\" ); }\r\n\r\n\t\t// Equipment\r\n\t\tif( !getValue( \"configDesignEquipment\" ) ) { setValue( \"configDesignEquipment\", \"true\" ); }\r\n\t\tif( !getValue( \"configCalculateDamage\" ) ) { setValue( \"configCalculateDamage\", \"true\" ); }\r\n\r\n\t\t// Shares\r\n\t\tif( !getValue( \"configSharesMenu\" ) ) { setValue( \"configSharesMenu\", \"true\" ); }\r\n\t\tif( !getValue( \"configSharesProductSelection\" ) ) { setValue( \"configSharesProductSelection\", \"true\" ); }\r\n\t\tif( !getValue( \"configStockcoEditOffers\" ) ) { setValue( \"configStockcoEditOffers\", \"true\" ); }\r\n\r\n\t\t// Travel\r\n\t\tif( !getValue( \"configTravelMenu\" ) ) { setValue( \"configTravelMenu\", \"true\" ); }\r\n\r\n\t\t// Company\r\n\t\tif( !getValue( \"configCompanyRedesign\" ) ) { setValue( \"configCompanyRedesign\", \"true\" ); }\r\n\t\tif( !getValue( \"configCompanyWorkResults\" ) ) { setValue( \"configCompanyWorkResults\", \"true\" ); }\r\n\r\n\t\t// Market\r\n\t\tif( !getValue( \"configProductMarketSelection\" ) ) { setValue( \"configProductMarketSelection\", \"true\" ); }\r\n\t\tif( !getValue( \"configProductMarketTable\" ) ) { setValue( \"configProductMarketTable\", \"true\" ); }\r\n\t\tif( !getValue( \"configProductMarketOffers\" ) ) { setValue( \"configProductMarketOffers\", \"true\" ); }\r\n\t\tif( !getValue( \"configProductMarketAdvanced\" ) ) { setValue( \"configProductMarketAdvanced\", \"true\" ); }\r\n\t\tif( !getValue( \"configEditOffers\" ) ) { setValue( \"configEditOffers\", \"true\" ); }\r\n\r\n\t\t// Monetary Market\r\n\t\tif( !getValue( \"configMonetaryMarketSelection\" ) ) { setValue( \"configMonetaryMarketSelection\", \"true\" ); }\r\n\t\tif( !getValue( \"configMonetaryMarketTable\" ) ) { setValue( \"configMonetaryMarketTable\", \"true\" ); }\r\n\t\tif( !getValue( \"configEditPrice\" ) ) { setValue( \"configEditPrice\", \"true\" ); }\r\n\t\tif( !getValue( \"configRatioPrice\" ) ) { setValue( \"configRatioPrice\", \"true\" ); }\r\n\t\t\r\n\t\t//New Citizen\r\n\t\tif( !getValue( \"configNCM\" ) ) { setValue( \"configNCM\", \"true\" ); }\r\n\t\tif( !getValue( \"configNRC\" ) ) { setValue( \"configNRC\", \"true\" ); }\r\n\t\t\r\n\t\t//search\r\n\t\tif( !getValue( \"configEBS\" ) ) { setValue( \"configEBS\", \"true\" ); }\r\n\t\t//Article\r\n\t\tif( !getValue( \"configBBcode\" ) ) { setValue( \"configBBcode\", \"true\" ); }\r\n\t\t// Profile\r\n\t\tif( !getValue( \"configProfile\" ) ) { setValue( \"configProfile\", \"true\" ); }\r\n\t\tif( !getValue( \"configProfileCalc\" ) ) { setValue( \"configProfileCalc\", \"true\" ); }\r\n\r\n //FastButtons\r\n\t\tif( !getValue( \"config_FB_eq\" ) ) { setValue( \"config_FB_eq\", \"true\" ); }\r\n\t\tif( !getValue( \"config_FB_co\" ) ) { setValue( \"config_FB_co\", \"true\" ); }\r\n\t\tif( !getValue( \"config_FB_con\" ) ) { setValue( \"config_FB_con\", \"true\" ); }\r\n\t\tif( !getValue( \"config_FB_share\" ) ) { setValue( \"config_FB_share\", \"true\" ); }\r\n\t\tif( !getValue( \"config_FB_pm\" ) ) { setValue( \"config_FB_pm\", \"true\" ); }\r\n\t\tif( !getValue( \"config_FB_mm\" ) ) { setValue( \"config_FB_mm\", \"true\" ); }\r\n\t\tif( !getValue( \"config_FB_trav\" ) ) { setValue( \"config_FB_trav\", \"true\" ); }\r\n\t\tif( !getValue( \"config_FB_buff\" ) ) { setValue( \"config_FB_buff\", \"true\" ); }\r\n\t\tif( !getValue( \"config_FB_newC\" ) ) { setValue( \"config_FB_newC\", \"true\" ); }\r\n \r\n \r\n //MUFasTBUttons\r\n\t\tif( !getValue( \"config_MFB_mu\" ) ) { setValue( \"config_MFB_mu\", \"true\" ); }\r\n\t\tif( !getValue( \"config_MFB_st\" ) ) { setValue( \"config_MFB_st\", \"true\" ); }\r\n\t\tif( !getValue( \"config_MFB_mm\" ) ) { setValue( \"config_MFB_mm\", \"true\" ); }\r\n\t\tif( !getValue( \"config_MFB_dc\" ) ) { setValue( \"config_MFB_dc\", \"true\" ); }\r\n\t\tif( !getValue( \"config_MFB_dp\" ) ) { setValue( \"config_MFB_dp\", \"true\" ); }\r\n\t\tif( !getValue( \"config_MFB_dm\" ) ) { setValue( \"config_MFB_dm\", \"true\" ); }\r\n\t\tif( !getValue( \"config_MFB_mc\" ) ) { setValue( \"config_MFB_mc\", \"true\" ); }\r\n\t\tif( !getValue( \"config_MFB_mumem\" ) ) { setValue( \"config_MFB_mumem\", \"true\" ); }\r\n\r\n\r\n\t}", "title": "" }, { "docid": "83ff34ea3db75913d1d630e88587e6de", "score": "0.56867343", "text": "saveConfigWithDefaults() {\n this._validateAppConfiguration();\n }", "title": "" }, { "docid": "4fb018c96768e0338e6d87631f9d1c5e", "score": "0.56672835", "text": "configure() {\n \n }", "title": "" }, { "docid": "8c696c9a50001c2d38dc772e7b51deb4", "score": "0.566575", "text": "function changeConfiguration(e)\r\n\t\t{\r\n\t\t\tvar element = e.target;\r\n\r\n\t\t\tif (element.type == 'checkbox')\r\n\t\t\t{\r\n\t\t\t\tif (element.checked == 1)\r\n\t\t\t\t{\r\n\t\t\t\t\tlsSetVal(\"hosts\", element.id, true);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tlsSetVal(\"hosts\", element.id, false);\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "8c696c9a50001c2d38dc772e7b51deb4", "score": "0.566575", "text": "function changeConfiguration(e)\r\n\t\t{\r\n\t\t\tvar element = e.target;\r\n\r\n\t\t\tif (element.type == 'checkbox')\r\n\t\t\t{\r\n\t\t\t\tif (element.checked == 1)\r\n\t\t\t\t{\r\n\t\t\t\t\tlsSetVal(\"hosts\", element.id, true);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tlsSetVal(\"hosts\", element.id, false);\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "1cdba2b814763d71718b88f439295fa1", "score": "0.56589156", "text": "function saveConfig()\r\n{\r\n //console.log(\"Saving config\");\r\n try{\r\n\r\n setSetting(HIGHLIGHT_TRADE_PARTNERS_KEY,$(HIGHLIGHT_TRADE_PARTNERS_KEY).checked);\r\n setSetting(HIGHLIGHT_POOR_TRADES_KEY,$(HIGHLIGHT_POOR_TRADES_KEY).checked);\r\n setSetting(POOR_TRADE_UPPER_THRESHOLD_KEY,$(POOR_TRADE_UPPER_THRESHOLD_KEY).value);\r\n setSetting(POOR_TRADE_LOWER_THRESHOLD_KEY,$(POOR_TRADE_LOWER_THRESHOLD_KEY).value);\r\n setSetting(HIGHLIGHT_DUPLICATE_TRADE_PARTNERS_KEY,$(HIGHLIGHT_DUPLICATE_TRADE_PARTNERS_KEY).checked);\r\n setSetting(SHOW_TOTAL_FLEET_ROW_KEY,$(SHOW_TOTAL_FLEET_ROW_KEY).checked);\r\n setSetting(SHOW_ATTACK_SIZE_KEY,$(SHOW_ATTACK_SIZE_KEY).checked);\r\n setSetting(ADD_FLEET_MOVE_LINK_KEY,$(ADD_FLEET_MOVE_LINK_KEY).checked);\r\n setSetting(ENABLE_PRODUCTION_PRESETS_KEY,$(ENABLE_PRODUCTION_PRESETS_KEY).checked);\r\n setSetting(ADD_EMPIRE_SUBMENU_KEY,$(ADD_EMPIRE_SUBMENU_KEY).checked);\r\n setSetting(MOVE_EMPIRE_SUBMENU_KEY,$(MOVE_EMPIRE_SUBMENU_KEY).checked);\r\n setSetting(INSERT_BATTLECALC_LINK_KEY,$(INSERT_BATTLECALC_LINK_KEY).checked);\r\n setSetting(FILL_TECH_DATA_KEY,$(FILL_TECH_DATA_KEY).checked);\r\n setSetting(PREFILL_BATTLE_CALC_KEY,$(PREFILL_BATTLE_CALC_KEY).checked);\r\n setSetting(ADD_FINISH_TIMES_KEY,$(ADD_FINISH_TIMES_KEY).checked);\r\n setSetting(ADD_FINISH_TIMES_EMPIRE_KEY,$(ADD_FINISH_TIMES_EMPIRE_KEY).checked);\r\n setSetting(FINISH_TIMES_SINGLE_LINE_KEY,$(FINISH_TIMES_SINGLE_LINE_KEY).checked);\r\n// setSetting(ANIMATE_SERVER_TIME_KEY,$(ANIMATE_SERVER_TIME_KEY).checked);\r\n setSetting(ADJUST_TITLES_KEY,$(ADJUST_TITLES_KEY).checked);\r\n setSetting(FIX_QUEUES_KEY,$(FIX_QUEUES_KEY).checked);\r\n setSetting(MAX_QUEUES_KEY,$(MAX_QUEUES_KEY).value);\r\n setSetting(HOUR_24_DISPLAY_KEY,$(HOUR_24_DISPLAY_KEY).checked);\r\n setSetting(HIGHLIGHT_PLAYERS_KEY,$(HIGHLIGHT_PLAYERS_KEY).checked);\r\n setSetting(PLAYER_COLORS_KEY,escape($(PLAYER_COLORS_KEY).value));\r\n setSetting(MY_GUILD_KEY,escape($(MY_GUILD_KEY).value));\r\n setSetting(ALLIED_GUILDS_KEY,escape($(ALLIED_GUILDS_KEY).value));\r\n setSetting(NAPPED_GUILDS_KEY,escape($(NAPPED_GUILDS_KEY).value));\r\n setSetting(ENEMY_GUILDS_KEY,escape($(ENEMY_GUILDS_KEY).value));\r\n setSetting(MY_GUILD_COLOUR_KEY,escape($(MY_GUILD_COLOUR_KEY).value));\r\n setSetting(ENEMY_GUILDS_COLOUR_KEY,escape($(ENEMY_GUILDS_COLOUR_KEY).value));\r\n setSetting(NAPPED_GUILDS_COLOUR_KEY,escape($(NAPPED_GUILDS_COLOUR_KEY).value));\r\n setSetting(ALLIED_GUILDS_COLOUR_KEY,escape($(ALLIED_GUILDS_COLOUR_KEY).value));\r\n setSetting(HIGHLIGHT_TRADE_COLOUR_KEY,escape($(HIGHLIGHT_TRADE_COLOUR_KEY).value));\r\n setSetting(HIGHLIGHT_TIMER_CSS_KEY,escape($(HIGHLIGHT_TIMER_CSS_KEY).value));\r\n setSetting(HIGHLIGHT_TIMER1_CSS_KEY,escape($(HIGHLIGHT_TIMER1_CSS_KEY).value));\r\n setSetting(HIGHLIGHT_TIMER2_CSS_KEY,escape($(HIGHLIGHT_TIMER2_CSS_KEY).value));\r\n setSetting(HIGHLIGHT_TIMER3_CSS_KEY,escape($(HIGHLIGHT_TIMER3_CSS_KEY).value));\r\n setSetting(HIGHLIGHT_TIMER4_CSS_KEY,escape($(HIGHLIGHT_TIMER4_CSS_KEY).value));\r\n setSetting(HIGHLIGHT_TIMER5_CSS_KEY,escape($(HIGHLIGHT_TIMER5_CSS_KEY).value));\r\n setSetting(HIGHLIGHT_TIMER6_CSS_KEY,escape($(HIGHLIGHT_TIMER6_CSS_KEY).value));\r\n setSetting(HIGHLIGHT_TIMER7_CSS_KEY,escape($(HIGHLIGHT_TIMER7_CSS_KEY).value));\r\n setSetting(HIGHLIGHT_TIMER8_CSS_KEY,escape($(HIGHLIGHT_TIMER8_CSS_KEY).value));\r\n setSetting(HIGHLIGHT_BASE_COLOUR_KEY,escape($(HIGHLIGHT_BASE_COLOUR_KEY).value));\r\n setSetting(HIGHLIGHT_SYSTEM_COLOUR_KEY,escape($(HIGHLIGHT_SYSTEM_COLOUR_KEY).value));\r\n setSetting(HIGHLIGHT_CUS_SCANNER_KEY,escape($(HIGHLIGHT_CUS_SCANNER_KEY).value));\r\n setSetting(HIGHLIGHT_CUSBASE_COLOUR_KEY,escape($(HIGHLIGHT_CUSBASE_COLOUR_KEY).value));\r\n setSetting(HIGHLIGHT_CUSSYSTEM_COLOUR_KEY,escape($(HIGHLIGHT_CUSSYSTEM_COLOUR_KEY).value));\r\n setSetting(STRUCT_COLOUR1_KEY,escape($(STRUCT_COLOUR1_KEY).value));\r\n setSetting(STRUCT_COLOUR2_KEY,escape($(STRUCT_COLOUR2_KEY).value));\r\n setSetting(SUM_FLEETS_KEY,$(SUM_FLEETS_KEY).checked);\r\n setSetting(SUM_CREDITS_KEY,$(SUM_CREDITS_KEY).checked);\r\n setSetting(REFRESH_PAGES_KEY,$(REFRESH_PAGES_KEY).checked);\r\n setSetting(REFRESH_INTERVALS_KEY,$(REFRESH_INTERVALS_KEY).value);\r\n setSetting(FORMAT_NUMBERS_KEY,$(FORMAT_NUMBERS_KEY).checked);\r\n setSetting(NUMBER_DELIMETER_KEY,escape($(NUMBER_DELIMETER_KEY).value));\r\n setSetting(CLONE_BASE_LINKS_KEY,$(CLONE_BASE_LINKS_KEY).checked);\r\n setSetting(CLONE_FLEET_LINKS_KEY,$(CLONE_FLEET_LINKS_KEY).checked);\r\n setSetting(MOVE_GALAXY_LINKS_KEY,$(MOVE_GALAXY_LINKS_KEY).checked);\r\n setSetting(STRUCTURES_GOALS_KEY,$(STRUCTURES_GOALS_KEY).checked);\r\n setSetting(INSERT_MOVE_PRESETS_KEY,$(INSERT_MOVE_PRESETS_KEY).checked);\r\n setSetting(SHOW_EXECUTION_TIME_KEY,$(SHOW_EXECUTION_TIME_KEY).checked);\r\n setSetting(ENTER_PRODUCTION_TIME_KEY,$(ENTER_PRODUCTION_TIME_KEY).checked);\r\n setSetting(USE_SERVER_TIME,$(USE_SERVER_TIME).checked);\r\n setSetting(AUTOSET_GUILD_KEY,$(AUTOSET_GUILD_KEY).checked);\r\n setSetting(PRODUCTION_ENHANCE_KEY,$(PRODUCTION_ENHANCE_KEY).checked);\r\n setSetting(CONSTRUCT_ENHANCE_KEY,$(CONSTRUCT_ENHANCE_KEY).checked);\r\n setSetting(SCRIPT_BATTLECALC_KEY,$(SCRIPT_BATTLECALC_KEY).checked);\r\n// setSetting(STATIC_SERVER_TIME_KEY,$(STATIC_SERVER_TIME_KEY).checked);\r\n setSetting(AUTOSET_GUILD_NOTIFY_KEY,$(AUTOSET_GUILD_NOTIFY_KEY).checked);\r\n setSetting(TIME_HELPER_KEY,$(TIME_HELPER_KEY).checked);\r\n setSetting(FLEET_REMINDER_KEY,$(FLEET_REMINDER_KEY).checked);\r\n setSetting(QUICK_BOOKMARKS_KEY,$(QUICK_BOOKMARKS_KEY).checked);\r\n setSetting(BOOKMARKS_COLOR1_KEY,$(BOOKMARKS_COLOR1_KEY).value);\r\n setSetting(BOOKMARKS_COLOR2_KEY,$(BOOKMARKS_COLOR2_KEY).value);\r\n\r\n setSetting(NAME_LOCATIONS_KEY,$(NAME_LOCATIONS_KEY).checked);\r\n setSetting(LOCATION_NAMES_KEY,escape($(LOCATION_NAMES_KEY).value));\r\n\r\n setSetting(SHOW_PILLAGE_KEY,$(SHOW_PILLAGE_KEY).checked);\r\n setSetting(FORMAT_SCANNER_KEY,$(FORMAT_SCANNER_KEY).checked);\r\n setSetting(REMOVE_REDIRECT_KEY,$(REMOVE_REDIRECT_KEY).checked);\r\n setSetting(DEBUG_KEY,$(DEBUG_KEY).checked);\r\n\r\n var logLevel = LOG_LEVEL_WARN;\r\n var radioButtons = document.evaluate(\r\n \"//input[@type='radio']\",\r\n document,\r\n null,\r\n XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,\r\n null);\r\n //console.log(redCells.snapshotLength);\r\n for(var i=0;i<radioButtons.snapshotLength;i++)\r\n {\r\n //console.log(radioButtons.snapshotItem(i));\r\n if (radioButtons.snapshotItem(i).checked==true) {\r\n logLevel = radioButtons.snapshotItem(i).value;\r\n }\r\n\r\n }\r\n setSetting(LOG_LEVEL_KEY,logLevel);\r\n } catch (e) {console.log(\"Save settings on \"+getServer()+\": \"+e);}\r\n notify(\"Settings successfully saved.\");\r\n}", "title": "" }, { "docid": "7a6fe2a6fd6bef9da1fdc5010f3c5dbe", "score": "0.56565696", "text": "configure() {}", "title": "" }, { "docid": "7e8158d16b43399a1780bd2d0a49708a", "score": "0.5656302", "text": "zoneConfigurationChanged(_zoneConfigurationXML, _lastUpdateId)\r\n {\r\n var self = this;\r\n this.logVerbose(\"Zone configuration changed\");\r\n\r\n // parse the xml data into a \"usable\" js object and store this object at a class instance\r\n ParseString(_zoneConfigurationXML, function (err, result) {\r\n if(!err && result)\r\n {\r\n self.zoneConfiguration = result;\r\n self.updateZoneInformationMap();\r\n self.lastUpdateId = _lastUpdateId;\r\n self.logDebug(\"Zone Configuration changed to: \" + JSON.stringify(self.zoneConfiguration));\r\n self.emit(\"zoneConfigurationChanged\", self.zoneConfiguration);\r\n }\r\n else\r\n {\r\n self.logError(\"Error parsing zone configuration result\", { \"xml\": _zoneConfigurationXML } );\r\n }\r\n });\r\n }", "title": "" }, { "docid": "c32e34824c4b7487860c233a8628c133", "score": "0.565449", "text": "reinit(config) {\n\n }", "title": "" }, { "docid": "a938fe503ce9b824bafe67f17461ddd6", "score": "0.5653125", "text": "function updateConfigFromConfigFile(val, config) {\n var cmdLine = getStringFromCommandLine(val);\n var newConfig = 0;\n var jsonObj, key, i;\n cmdLine = cmdLine.split(',');\n if (cmdLine[0].indexOf('.json') > -1) { //if the first array item is json file\n jsonObj = getJSONObjFromFilename(cmdLine[0]);\n cmdLine.shift(); // get rid of json string in array\n if (jsonObj.hasOwnProperty('default')) { //new jsons have \"default\" key\n newConfig = getWantedOptionsFromJSONObj(jsonObj, cmdLine);\n } else { //old json. ex: local.json\n newConfig = jsonObj;\n }\n } else { //if the first item is not a json file\n //use the json file path passed through the constructor\n jsonObj = getJSONObjFromFilename(_configJsonPath);\n if (jsonObj.hasOwnProperty('default')) { //new jsons have \"default\" key\n newConfig = getWantedOptionsFromJSONObj(jsonObj, cmdLine); //items are options\n } else {\n console.log(\"ERROR: Invalid json object passed to constructor.\");\n }\n }\n\n //add to or overwrite config items\n if (newConfig) {\n for (key in newConfig) {\n if (newConfig.hasOwnProperty(key)) {\n config[key] = newConfig[key];\n }\n }\n }\n}", "title": "" }, { "docid": "2572d45811cf5e531b7460a27ae17f0a", "score": "0.5648117", "text": "function updateConfig(configObj){\n //since PropertiesService.getDocumentProperties() is not available to this library script\n //the calling script pushes it's config back here to be merged with the local config\n if( ! configObj) throw 'Missing config object';\n //merge supplied config with local config, supplied values (should) replace defaults\n assignDeep(config, configObj);\n}", "title": "" }, { "docid": "cabda73f20ed06e30e0912855fa4ef51", "score": "0.56371903", "text": "function updateStep6_Aug2017(targetConfig, sourceConfig, configKey) {\n debug('Performing updateStep6_Aug2017()');\n\n var targetGlobals = loadGlobals(targetConfig);\n targetGlobals.version = 6;\n\n var updateApiConfig = function (cfg) {\n if (cfg.request_path) {\n cfg.uris = [cfg.request_path]; // wrap in array\n delete cfg.request_path;\n }\n if (cfg.hasOwnProperty('strip_request_path')) {\n cfg.strip_uri = cfg.strip_request_path;\n delete cfg.strip_request_path;\n }\n if (!cfg.hasOwnProperty('http_if_terminated')) {\n cfg.http_if_terminated = true;\n }\n return cfg;\n };\n\n // Kong API change (tsk tsk, don't do that, please)\n // Change all request_path and strip_request_path occurrances\n // to uris and strip_uris.\n const apis = loadApis(targetConfig);\n for (let i = 0; i < apis.apis.length; ++i) {\n const apiConfig = loadApiConfig(targetConfig, apis.apis[i].id);\n let needsSaving = false;\n // Look for \"api.request_path\"\n if (apiConfig && apiConfig.api) {\n apiConfig.api = updateApiConfig(apiConfig.api);\n needsSaving = true;\n }\n if (needsSaving) {\n debug('API ' + apis.apis[i].id + ' updated.');\n debug(apiConfig.api);\n saveApiConfig(targetConfig, apis.apis[i].id, apiConfig);\n debug('Reloaded: ');\n debug(loadApiConfig(targetConfig, apis.apis[i].id).api);\n }\n }\n\n // Also check all Authorization Servers for this setting; these also\n // have a request_path set which needs to be mapped to a uris array.\n var authServers = loadAuthServerList(targetConfig);\n for (let i = 0; i < authServers.length; ++i) {\n var authServerId = authServers[i];\n var authServer = loadAuthServer(targetConfig, authServerId);\n if (authServer.config && authServer.config.api) {\n authServer.config.api = updateApiConfig(authServer.config.api);\n saveAuthServer(targetConfig, authServerId, authServer);\n }\n }\n\n if (!targetGlobals.sessionStore) {\n debug('Adding a default sessionStore property.');\n targetGlobals.sessionStore = {\n type: 'file',\n host: 'portal-redis',\n port: 6379,\n password: ''\n };\n }\n\n saveGlobals(targetConfig, targetGlobals);\n}", "title": "" }, { "docid": "367e698d2943f319f07c163e0fc1575d", "score": "0.5631444", "text": "function appSpecificSettings() {\n\tupdateLabelSettings();\n\tupdateTimeSettings();\n\tupdateKeySettings();\n\tupdateSpeakmodeSettings();\n}", "title": "" }, { "docid": "d221eb84d88bcbf3e6e7661a31f0a0c4", "score": "0.5613115", "text": "loadConfiguration() {\n if (this.configurationFile !== null) {\n const configurationObject = loadAndValidate(this.configurationFile);\n if (configurationObject instanceof Error) {\n handleErrorThenExit(configurationObject.message);\n } else {\n this.configuration = configurationObject;\n }\n } else {\n this.configuration = getFirstValidConfiguration();\n }\n this.database = createInfluxDatabase(this.configuration.database);\n }", "title": "" }, { "docid": "7e4d6e97f137f97a6ff911a65d771a6e", "score": "0.56091875", "text": "async loadConfig() {\n const configLoader = new config_1.default(this.logger);\n const userConfig = await configLoader.loadConfig();\n this.logger.verbose.success(\"Loaded `auto` with config:\", userConfig);\n // Allow plugins to be overriden for testing\n this.config = Object.assign(Object.assign({}, userConfig), { plugins: this.options.plugins || userConfig.plugins });\n this.loadPlugins(this.config);\n this.loadDefaultBehavior();\n this.config = this.hooks.modifyConfig.call(this.config);\n this.labels = this.config.labels;\n this.semVerLabels = release_1.getVersionMap(this.config.labels);\n await this.hooks.beforeRun.promise(this.config);\n const errors = [\n ...(await validate_config_1.validateAutoRc(this.config)),\n ...(await validate_config_1.validatePlugins(this.hooks.validateConfig, this.config)),\n ];\n if (errors.length) {\n this.logger.log.error(endent_1.default `\n Found configuration errors:\n \n ${errors.map(validate_config_1.formatError).join(\"\\n\")}\n `, \"\\n\");\n this.logger.log.warn(\"These errors are for the fully loaded configuration (this is why some paths might seem off).\");\n if (this.config.extends) {\n this.logger.log.warn(\"Some errors might originate from an extend config.\");\n }\n process.exit(1);\n }\n const config = Object.assign(Object.assign(Object.assign({}, this.config), omit_1.omit(this.options, [\"_command\", \"_all\", \"main\"])), { baseBranch: this.config.baseBranch || this.baseBranch });\n this.config = config;\n this.baseBranch = config.baseBranch;\n const repository = await this.getRepo(config);\n const token = (repository === null || repository === void 0 ? void 0 : repository.token) || process.env.GH_TOKEN || process.env.GITHUB_TOKEN;\n if (!token || token === \"undefined\") {\n this.logger.log.error(\"No GitHub was found. Make sure it is available on process.env.GH_TOKEN.\");\n throw new Error(\"GitHub token not found!\");\n }\n const githubOptions = Object.assign(Object.assign({ owner: config.owner, repo: config.repo }, repository), { token, agent: proxyUrl ? https_proxy_agent_1.default(proxyUrl) : undefined, baseUrl: config.githubApi, graphqlBaseUrl: config.githubGraphqlApi });\n this.git = this.startGit(githubOptions);\n this.release = new release_1.default(this.git, config, this.logger);\n this.remote = await this.getRemote();\n this.logger.verbose.info(`Using remote: ${this.remote.replace(token, `****${token.slice(-4)}`)}`);\n this.hooks.onCreateRelease.call(this.release);\n return config;\n }", "title": "" }, { "docid": "c7e82aa77c2ca00bf8d05acc189df4ef", "score": "0.56089735", "text": "function Configuration() {\r\n \r\n if (typeof(global.popups['config_popup']) !== 'undefined') {\r\n global.popups['config_popup'].show();\r\n return;\r\n }\r\n var checkboxes = [\r\n {id:'checkForUpdates', label:'Check for Addon updates.'},\r\n {id:'opt_PlayerStats', label:'Modify player stats to show energy/stamita/global ratios.'},\r\n {id:'opt_JobRates', label:'Modify jobs stats to show energy/stamita ratios.'},\r\n {id:'opt_GiftPage', label:'Modify gift page to show new gifts and options.'},\r\n {id:'opt_CollectionPage', label:'Modify Collection Page to use Multi Gifter popup for send gifts.'},\r\n {id:'opt_HideSocialModule', label:'Hide Social Module in Main page.'}\r\n ];\r\n var popupElt = new domPopupObject('config_popup', {\r\n type: 'main',\r\n title: '<img src=\"'+global.resource.configuration_title+'\">',\r\n persistent: true,\r\n width: 650,\r\n center: false,\r\n buttons: [{\r\n label: 'Save configuration'\r\n }],\r\n onclose: saveConfig\r\n });\r\n var option_click = function() {\r\n var isfor = $(this).attr('isfor').replace('[','\\\\[').replace(']','\\\\]');\r\n var elem = $('#'+isfor).get(0);\r\n \r\n // throggle checked\r\n elem.checked = elem.checked !== true;\r\n $(this).toggleClass('checked',elem.checked);\r\n };\r\n var importSettings_click = function() {\r\n var index, values = new Object();\r\n popupElt.destroy();\r\n showPromptPopup(\r\n 'Paste here the encoded configuration:', '', \r\n function(resp) {\r\n try {\r\n\t if (index = resp.indexOf('base64,')) {\r\n\t resp = global.Base64.decode(resp.substr(index + 7));\r\n\t }\r\n\t $.each($.parseJSON(resp), function(name, value) {\r\n\t if (!Util.isSet(defaults[name])) {\r\n\t return; \r\n\t }\r\n\t var options = new Config(name, defaults[name]);\r\n options.load(function() {\r\n\t options.loadConfig(value);\r\n\t if (name === 'main') {\r\n global.options = options;\r\n global.options.save(function() {\r\n setTimeout(Configuration, 100);\r\n });\r\n } \r\n else {\r\n options.save(); \r\n }\r\n });\r\n\t });\r\n }\r\n catch(err) {\r\n logErr$(err);\r\n }\r\n }\r\n );\r\n return false;\r\n };\r\n var exportSettings_click = function() {\r\n var savedValues = new Object();\r\n var categories = new Array();\r\n \r\n $.each(defaults, function(name, value) {categories.push(name);});\r\n saveConfig(function() {loadSettings(categories.shift());});\r\n \r\n function loadSettings(name) {\r\n if (Util.isSet(name)) {\r\n var options = new Config(name, defaults[name]);\r\n\t options.load(function() {\r\n savedValues[name] = new Object();\r\n $.each(options.all, function(opt, value) {\r\n if (!/blackList|whiteList|excluded_thanks|excluded_gifts|todayLinks/.test(opt))\r\n savedValues[name][opt] = value;\r\n });\r\n loadSettings(categories.shift());\r\n\t });\r\n }\r\n else {\r\n\t var sOutput = String($.toJSON(savedValues));\r\n\t showTextPopup(\r\n\t 'Copy this encoded configuration to share/save:', \r\n\t 'data:application/json;base64,' + global.Base64.encode(sOutput)\r\n\t ); \r\n }\r\n }\r\n return false;\r\n };\r\n var privacy_change = function() {\r\n var self = this;\r\n var pflElt = $('#privacy_fl', popupElt.content);\r\n var selected = this.options[this.selectedIndex].value;\r\n var privacy = global.options.get('privacy');\r\n \r\n if(selected == 'CUSTOM') {\r\n facebook.needAppPermission('read_friendlists', function(success) {\r\n if(!success) {\r\n self.selectedIndex = 1;\r\n return;\r\n }\r\n facebook.friendlist(function(list) {\r\n if (!list || list.error_code || list.data.length < 1) {\r\n showHelpPopup({\r\n icon: 'error',\r\n title: 'friendlist length',\r\n message: 'Seem that you haven\\'t friendlists.'\r\n });\r\n return;\r\n }\r\n var data = list.data, opt;\r\n pflElt.empty();\r\n for(var i = 0; i < data.length; i++) {\r\n opt = c$('option', 'value:'+data[i].id).text(data[i].name);\r\n pflElt.append(opt);\r\n if (privacy && privacy.allow == data[i].id) {\r\n opt.attr('selected', 'selected');\r\n }\r\n }\r\n pflElt.show();\r\n });\r\n });\r\n }\r\n else {\r\n pflElt.hide();\r\n }\r\n return false;\r\n };\r\n function saveConfig(callback) {\r\n var value = $('option:selected', '#privacy').val();\r\n if (value !== 'CUSTOM') {\r\n global.options.set('privacy', {'value':value});\r\n }\r\n else {\r\n global.options.set('privacy', {\r\n 'value': value,\r\n 'friends': 'SOME_FRIENDS',\r\n 'allow': $('option:selected', '#privacy_fl').val()\r\n });\r\n }\r\n global.options.fromDomElements();\r\n global.options.save(callback);\r\n }\r\n function addCheckBox(id, label, element, bLeft) {\r\n var bChecked = global.options.get(id);\r\n id = String(id).toLowerCase();\r\n \r\n var checkElt = c$('input:checkbox', 'id:main_'+id).appendTo(element).hide();\r\n var boxElt = c$('div', 'isfor:main_'+id+',class:checkbox clearfix')\r\n .appendTo(element).text(label).click(option_click);\r\n \r\n if (bChecked) {\r\n checkElt.attr('checked', 'checked');\r\n boxElt.addClass('checked'); \r\n }\r\n if (bLeft) {\r\n boxElt.css('float', 'left').width(100);\r\n }\r\n }\r\n // add style\r\n popupElt.addBase64Style(\r\n\t\t'I2NvbmZpZ19wb3B1cCAuYmxhY2tfYm94IHsNCgl3aWR0aDogNDAwcHg7DQoJZm9udC13ZWlnaHQ6IGJvbGQ7IA0KCWNvbG9yOiBy'+\r\n\t\t'Z2IoMjA4LCAyMDgsIDIwOCk7IA0KCWJvcmRlcjogMXB4IHNvbGlkIHJnYigxNTMsIDE1MywgMTUzKTsgDQoJYmFja2dyb3VuZC1j'+\r\n\t\t'b2xvcjogYmxhY2s7IA0KCWZvbnQtc2l6ZTogMTRweDsNCn0NCiNjb25maWdfcG9wdXAgLmZyYW1lX2JveCB7DQoJYm9yZGVyOiAx'+\r\n\t\t'cHggc29saWQgIzRGNEY0RjsNCgltYXJnaW4tYm90dG9tOiAyMHB4Ow0KCXBhZGRpbmc6IDEwcHg7DQoJdGV4dC1hbGlnbjogbGVm'+\r\n\t\t'dDsNCn0NCiNjb25maWdfcG9wdXAgZGl2LmNoZWNrYm94IHsNCgliYWNrZ3JvdW5kOiB1cmwoImh0dHA6Ly9td2ZiLnN0YXRpYy56'+\r\n\t\t'eW5nYS5jb20vbXdmYi9ncmFwaGljcy9mbGFncy9td19tZXNzYWdlYm94X2NoZWNrYm94Ml9ub3JtYWxpemVkLmdpZiIpIG5vLXJl'+\r\n\t\t'cGVhdCBzY3JvbGwgMCUgMCUgdHJhbnNwYXJlbnQ7DQoJdGV4dC1hbGlnbjogbGVmdDsNCgltYXJnaW4tdG9wOiA0cHg7DQoJbWlu'+\r\n\t\t'LWhlaWdodDogMjBweDsNCgl3aWR0aDogYXV0bzsgDQoJcGFkZGluZy1sZWZ0OiAzMHB4OyANCgloZWlnaHQ6IDIwcHg7DQoJY3Vy'+\r\n\t\t'c29yOiBwb2ludGVyOw0KfQ0KI2NvbmZpZ19wb3B1cCBkaXYuY2hlY2tib3guY2hlY2tlZCB7DQoJYmFja2dyb3VuZDogdXJsKCJo'+\r\n\t\t'dHRwOi8vbXdmYi5zdGF0aWMuenluZ2EuY29tL213ZmIvZ3JhcGhpY3MvZmxhZ3MvbXdfbWVzc2FnZWJveF9jaGVja2JveDFfbm9y'+\r\n\t\t'bWFsaXplZC5naWYiKSBuby1yZXBlYXQgc2Nyb2xsIDAlIDAlIHRyYW5zcGFyZW50Ow0KfQ=='\r\n );\r\n \r\n function genMainDom() {\r\n c$('div').appendTo(popupElt.header).html('Version: '+ scriptAppInfo.appVer).css({\r\n 'float' : 'right',\r\n 'font-size' : 16,\r\n 'font-weight' : 'bold',\r\n 'margin' : '35px 40px 0px'\r\n });\r\n popupElt.content.css('padding', '10px 30px');\r\n \r\n var thisTab, tb = new domTabObject(popupElt.content,'config_tabs',\r\n ['General', 'Autodeposit', 'Short Service', 'Publish'], 300);\r\n \r\n // GENERAL SETTINGS \r\n thisTab = tb.getLayout(0).css('padding',20);\r\n c$('p').appendTo(thisTab)\r\n .append(c$('span').text('To make all MWAddon work, you need to give '))\r\n .append(c$('a','href:#').text('All required Permission')\r\n .click(function () {facebook.requestPermission('read_stream,publish_stream,user_groups,offline_access,read_friendlists');}))\r\n .append(c$('span').text(' to Mafia Wars.'));\r\n $.each(checkboxes, function(index, item) {addCheckBox(item.id, item.label, thisTab);});\r\n c$('center').appendTo(thisTab).css('margin-top', 20)\r\n .append(b$('Import all settings', 'class:medium orange').click(importSettings_click))\r\n .append('<br /><br />')\r\n .append(b$('Export all settings', 'class:medium orange').click(exportSettings_click))\r\n \r\n // AUTODEPOSIT SETTINGS\r\n thisTab = tb.getLayout(1).css('padding',20);\r\n c$('p').text('Set Autodeposit for:').appendTo(thisTab);\r\n var ulElt = c$('ul').appendTo(thisTab).css('list-style-type','none');\r\n $.each(global.cities, function(index, name) {\r\n var boxElt = c$('li').appendTo(ulElt).height(25);\r\n addCheckBox('autoDepositIn'+index, name, boxElt, true);\r\n c$('span').text(' When cash is more than: ').appendTo(boxElt);\r\n c$('input:text','class:black_box,id:main_autodepositamount'+index).width(150).appendTo(boxElt);\r\n });\r\n \r\n // SHORT LINK SERVICES\r\n thisTab = tb.getLayout(2).css('padding',20);\r\n addCheckBox('usebitly', 'Use bit.ly service for shorting url.', thisTab);\r\n var table = new domTableObject(thisTab, 2, 2);\r\n table.cell(0, 0).css('text-align', 'right').append(c$('span').text('Login name: '));\r\n table.cell(0, 1).append(c$('input:text', 'id:main_api_bit_ly_login, class:black_box'));\r\n table.cell(1, 0).css('text-align', 'right').append(c$('a').text('Your api key: ').attr({\r\n 'href': \"http://bit.ly/a/your_api_key\",\r\n 'target': \"_black\"\r\n }));\r\n table.cell(1, 1).append(c$('input:text', 'id:main_api_bit_ly_key, class:black_box'));\r\n \r\n // PUBLISH SETTINGS\r\n thisTab = tb.getLayout(3).css('padding',20);\r\n var privacy = global.options.get('privacy');\r\n var privacyOpts = {\r\n 'Everyone' : 'EVERYONE',\r\n 'All friends' : 'ALL_FRIENDS',\r\n 'Friends of friends' : 'FRIENDS_OF_FRIENDS',\r\n 'Myself' : 'SELF',\r\n 'From friend list' : 'CUSTOM'\r\n };\r\n c$('p').appendTo(thisTab).text('Wall posts privacy: ');\r\n var elem = c$('select', 'id:privacy,class:black_box').width(200)\r\n .css('margin-left',10).change(privacy_change).appendTo(thisTab);\r\n c$('select', 'id:privacy_fl,class:black_box').appendTo(thisTab)\r\n .css('margin-left',10).width(200).hide();\r\n $.each(privacyOpts, function(name, value) {\r\n var opt = c$('option', 'value:'+value).text(name);\r\n elem.append(opt);\r\n if (privacy && privacy.value == value) {\r\n opt.attr('selected', 'selected');\r\n }\r\n });\r\n elem.change();\r\n c$('p').appendTo(thisTab).text('Publish API: ');\r\n addCheckBox('publishPreview', 'Use Facebook user interface.', thisTab);\r\n c$('div').appendTo(thisTab).text('IMPORTANT!').css('color','red');\r\n c$('div').appendTo(thisTab).html('Check this option ONLY if you\\'re going to publish in your wall.<br>Otherwise uncheck it.');\r\n \r\n // PAYPAL BUTTON\r\n c$('a', 'target:_black').appendTo(c$('center').css('margin',5).appendTo(popupElt.content))\r\n .attr('href', 'https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=CQVWPSUMDKW5N')\r\n .append(c$('img').attr('src', 'https://www.paypal.com/en_US/i/btn/btn_donate_SM.gif'));\r\n \r\n }\r\n \r\n global.options.load(function() {\r\n genMainDom();\r\n global.options.toDomElements();\r\n // show popup\r\n popupElt.show();\r\n });\r\n}", "title": "" }, { "docid": "eb27a05f9777482a154850c49d5c40a6", "score": "0.56083494", "text": "function syncConfig(callback) {\n function is_dev_in_config(device, device_list) {\n const id = id_to_ip(device._id.split('.').slice(-1)[0]);\n const ip = id.split(':')[0];\n const port = id.split(':')[1];\n\n for (let i=0;i<device_list.length;i++) {\n if(ip === device_list[i].ip\n && port === device_list[i].port) {\n\n return true;\n }\n }\n return false;\n }\n\n function is_dev_in_db(device, device_list) {\n for (let i=0;i<device_list.length;i++) {\n let ip_port = id_to_ip_port(device_list[i]._id);\n\n if(device.ip === ip_port.ip\n && device.port === ip_port.port) {\n\n return true;\n }\n }\n return false;\n }\n\n function is_channel_in_db(channel, channel_list) {\n for (let _chan in channel_list) {\n if (!channel_list.hasOwnProperty(_chan)) continue;\n const chan = channel_list[_chan];\n\n if(channel.remote === chan.common.name) {\n return true;\n }\n }\n return false;\n }\n\n adapter.getDevices(function (err, devices) {\n // go through all devices in the config\n for (let i=0;i<adapter.config.devices.length;i++) {\n // do we have to remove the whole device?\n if(!is_dev_in_db(adapter.config.devices[i], devices)) {\n // this one has to be added\n\n if (adapter.config.devices[i].ip && adapter.config.devices[i].port && adapter.config.devices[i].remote) {\n createBasicStates(adapter.config.devices[i])\n }\n } else {\n // the devices are there, but are there missing channels?\n adapter.getForeignObjects(\n adapter_db_prefix + ip_to_id(adapter.config.devices[i].ip, adapter.config.devices[i].port) + '.*',\n 'channel', (err, _channels) => {\n\n // is there a channel missing in the db?\n if (!is_channel_in_db(adapter.config.devices[i], _channels)) {\n // this one has to be added\n createBasicStates(adapter.config.devices[i])\n }\n });\n }\n }\n\n // go through all devices in the db\n for (let i=0;i<devices.length;i++) {\n if(!is_dev_in_config(devices[i], adapter.config.devices)) {\n // this one has to be removed\n adapter.delObject(devices[i]._id);\n\n // TODO: channels have to be removed correctly\n // deleteChannelFromEnum = function deleteChannelFromEnum(enumName, parentDevice, channelName, callback)\n /*\n adapter.deleteChannelFromEnum('room', ip_to_id(_device.ip, _device.port), _device.remote, function (err) {\n if (err) adapter.log.error('Could not add LIRC with ' + _device.ip + ' to enum. Error: ' + err);\n });*/\n }\n }\n });\n\n // check operating mode, since the operating mode changes the role of the states\n for(let i=0;i<adapter.config.devices.length;i++) {\n const cdev = adapter.config.devices[i];\n const opmode = get_operating_mode(ip_to_id(cdev.ip, cdev.port), cdev.remote);\n\n // get states for the given device\n adapter.getForeignObjects(\n adapter_db_prefix + ip_to_id(cdev.ip, cdev.port)\n + '.' + cdev.remote + '.*', 'state', (err, _states) => {\n\n for(let cstate in _states) {\n if(!_states.hasOwnProperty(cstate)) continue;\n\n switch(opmode) {\n case 'switch':\n adapter.getObject(_states[cstate]._id, (err, obj) => {\n obj.common.role = 'switch';\n\n adapter.setObject(obj._id, obj);\n });\n break;\n case 'button':\n adapter.getObject(_states[cstate]._id, (err, obj) => {\n obj.common.role = 'button';\n\n adapter.setObject(obj._id, obj);\n });\n break;\n }\n }\n });\n }\n\n if(callback) callback(false);\n}", "title": "" }, { "docid": "b8c66e5c620ed95f1aedefb510191b5b", "score": "0.56075907", "text": "function _onShowConfiguration() {\n\t\t\t\tif (_isNewFlag) {\n\t\t\t\t\t// show next button\n\t\t\t\t\t$('#auditDialogFinishBtn').hide();\n\t\t\t\t\t$('#auditDialogBackBtn').hide();\n\t\t\t\t\t$('#auditDialogNextBtn').show();\n\t\t\t\t} else {\n\t\t\t\t\t// hide next button\n\t\t\t\t\t$('#auditDialogBackBtn').hide();\n\t\t\t\t\t$('#auditDialogNextBtn').hide();\n\t\t\t\t}\n\n\t\t\t\t$('#' + _namespace + '_configuration').show();\n\t\t\t\t$('#' + _namespace + '_sitemaps').hide();\n\t\t\t}", "title": "" }, { "docid": "10287edd27db70291d142819a9420df8", "score": "0.5601181", "text": "_updateEditorConfig() {\n for (let i = 0; i < this.widgets.length; i++) {\n const cell = this.widgets[i];\n let config;\n switch (cell.model.type) {\n case 'code':\n config = this._editorConfig.code;\n break;\n case 'markdown':\n config = this._editorConfig.markdown;\n break;\n default:\n config = this._editorConfig.raw;\n break;\n }\n Object.keys(config).forEach((key) => {\n cell.editor.setOption(key, config[key]);\n });\n cell.editor.refresh();\n }\n }", "title": "" }, { "docid": "580e3280fd884f568815fde0a5b93b7c", "score": "0.55986005", "text": "checkConfig() {\n super.checkConfig();\n if (!this.config.storeCurrentTime) {\n throw new Error(exceptionMsgInternal.noStoreCurrentTime);\n } else if (!(this.config.storeCurrentTime instanceof StoreCurrentTime)) {\n throw new Error(exceptionMsgInternal.wrongInstance);\n } else if (!this.config.time) {\n throw new Error(exceptionMsgInternal.noTime);\n } else if (!this.config.timezone) {\n throw new Error(exceptionMsgInternal.noTimeZone);\n }\n }", "title": "" }, { "docid": "8c7f9b2f5aa5ad2e01a04e1669c21a43", "score": "0.55981266", "text": "function update(configName, configValue) {\n return {\n type: UPDATE_CONFIGS,\n payload: _babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()({},\n configName, configValue) };\n\n\n}", "title": "" } ]
a5dc4dd10d98db3fef93724153dd3cd1
check if a number is prime
[ { "docid": "b906ac2454aad7de8d22861a8b4ee714", "score": "0.0", "text": "function isPremier(n) {\n for (var j = 2; j < Math.round(Math.sqrt(n)); j++) {\n if (isDivisibleBy(n, j)) {\n\n return true;\n }\n }\n return false;\n}", "title": "" } ]
[ { "docid": "22252d796604d8365a712c38801629ac", "score": "0.8061402", "text": "function is_prime(number) {\n if (number <= 1) {\n return false;\n }\n\n for (var i = 2; i < number; i++) {\n if ((number % i) === 0) {\n return false;\n }\n }\n return true;\n}", "title": "" }, { "docid": "8e8cdeb06bfb7f13387a71ce12bb1cc3", "score": "0.7982245", "text": "function isPrime(num){\n\tif(isNaN(num)){\n\t\treturn false;\n\t}\n\telse if(num % 5==0 && num %2==0){\n\t\treturn false;\n\t}\n\telse if(num % num == 0 && num % 1 ==0){\n\t\treturn true;\n\t}\n\t\n}", "title": "" }, { "docid": "88ed7bf4f0a2f64eaab286946d0463a8", "score": "0.7970712", "text": "function isPrime(number) {\n if (number <= 1) return false\n\n for (let i = 2; i < number; i++) \n if (number % i == 0) return false\n return true\n}", "title": "" }, { "docid": "434119ce20ac25d2498a3dc3e8a644bf", "score": "0.79569775", "text": "function primeNumber(number) {\n if (number < 2) return false\n for (var i = 2; i < number; i++) {\n if (number % i === 0) return false\n }\n return true\n}", "title": "" }, { "docid": "05d0a767ab3a7e56cf6cda41eddce2ff", "score": "0.7950088", "text": "function isPrime(number){\r\n for(let factor = 2; factor < number ; factor++)\r\n if(number % factor === 0)\r\n return false; \r\n return true;\r\n}", "title": "" }, { "docid": "754f6eec747525bb89d54991f2704815", "score": "0.79194796", "text": "function isPrime(num){\n var ceiling = Math.sqrt(num);\n var counter;\n for(counter = 2; counter<ceiling;counter++){\n if (num%counter ==0){\n return false;\n }\n }\n return true;\n}", "title": "" }, { "docid": "d6911d3cec3c0f1a07947e1d098f2ffb", "score": "0.78972673", "text": "function checkPrime(num) {\nfor (let i = 2; i < num; i++)\nif (num % i === 0) return false;\nreturn num > 1;\n}", "title": "" }, { "docid": "35d628f271dd65716c79e7f28502bfcc", "score": "0.78961504", "text": "function isPrime(num) {\n var divisor = 2;\n\n while (num > divisor) {\n if(num % divisor == 0) {\n return false;\n } else\n divisor++;\n } \n return true;\n }", "title": "" }, { "docid": "7155484fe4d5c3a9d52c9b01fe415a04", "score": "0.7889339", "text": "function isPrime (number) {\n if (number < 2) {\n return false;\n }\n for (let i = 2; i < number; i++) {\n if (number % i === 0)\n return false;\n }\n return true;\n}", "title": "" }, { "docid": "bac42f34f557e03e05ee6bac286cf88b", "score": "0.7864812", "text": "function checkPrime(number) {\n if (number === 0 || number === 1) {\n return false\n } else {\n for (let i = 2; i < number; i++) {\n if (number % i === 0) {\n return false;\n } else {\n return true;\n }\n }\n }\n}", "title": "" }, { "docid": "0ea488319bba45e4cad8c861df4e4fe1", "score": "0.78437316", "text": "function isPrime(number) {\n if (number < 2) { return false; }\n\n for (let i = 2; i < number; i++) {\n if (number % i == 0) {\n return false;\n }\n }\n\n return true;\n}", "title": "" }, { "docid": "a66233aa6acd9064933d22bcdce35ad0", "score": "0.7827915", "text": "function isPrime(num){\n for (var i=2; i<num; i++){\n if(num%i==0){\n return false;\n }\n }\n return true;\n }", "title": "" }, { "docid": "8edb8bc755769fec7860d6ad4e8c2f3a", "score": "0.7817083", "text": "function isPrime(num)\r\n{\r\nfor(let i=2 ; i < num ; i++ )\r\n{\r\n\r\nif (num % i == 0) \r\nreturn false;\r\n\r\n}\r\nreturn num>1;\r\n\r\n}", "title": "" }, { "docid": "eb3e8bdf8fc6f1093b8728828f69a6d0", "score": "0.7811012", "text": "function isPrime(number) {\n var divisor;\n\n if (number <= 1 || (number > 2 && number % 2 === 0)) {\n return false;\n }\n\n divisor = 3;\n\n while (divisor < number) {\n if (number % divisor === 0) {\n return false;\n }\n\n divisor += 2;\n }\n\n return true;\n}", "title": "" }, { "docid": "5bcabb63f4a60e9459b1ab42284c4ebf", "score": "0.7806055", "text": "function isPrime(number) {\n if (number < 2) {\n return false;\n }\n\n for (let i = 2; i < number; i++) {\n if (number % i === 0) {\n return false;\n }\n }\n\n return true;\n}", "title": "" }, { "docid": "1770b892f114c54d1a3252e5f7be8fe1", "score": "0.7805747", "text": "function isPrime(number){\n if(number%2==0)\n\treturn false;\n var sqrt = Math.floor(Math.sqrt(number));\n for(var i=3;i<=sqrt;i+=2){\n\tif(number%i==0)\n\t return false;\n }\n return true;\n}", "title": "" }, { "docid": "a9c7d3935fe18a51b81b4eb1179bb9c2", "score": "0.7804535", "text": "function isPrime(number) {\n for (let i = 2; i <= number; i++) {\n if (number % i === 0 && number != i) {\n // Return true if it is divisible by any num that is not itself.\n return false;\n }\n }\n // If it passes the condition it is a prime\n return true;\n }", "title": "" }, { "docid": "c2894e5734d834953124b4bd4dbaad83", "score": "0.7804117", "text": "function isPrime(number) {\n if (number < 2) {\n return false\n }\n for (let i = 2; i < number; i++) {\n if (number % i === 0) {\n return false\n } \n }\n return true\n}", "title": "" }, { "docid": "b7d4a4e0e499d81ec65c1d686027c464", "score": "0.78033555", "text": "function isPrime(number) {\n var upperLim = Math.ceil(Math.sqrt(number));\n for (let i = 2; i < upperLim+1; i++) {\n if (number % i === 0) {\n return false;\n }\n }\n return true;\n }", "title": "" }, { "docid": "9556f9e1d9efc17944a5b60ea355e253", "score": "0.78001726", "text": "function isPrime(number) {\n if ((number === 0) || (number === 1) || ((number % 2 === 0) && number != 2)) {\n return false;\n } else {\n for (var i = 3; i < number; i++) {\n if (number % i == 0) {\n return false;\n }\n }\n return true;\n }\n}", "title": "" }, { "docid": "06ab5eaa67408d420b9112ceaab9404c", "score": "0.77986157", "text": "function is_prime(num) {\n if (num < 2 || num % 2 == 0 && num !== 2) {\n \treturn false;\n }\n if (num > 2) {\n for (var n = 3; n < num; n += 2) {\n if (num % n == 0) return false;\n }\n }\n return true;\n}", "title": "" }, { "docid": "71d3343ba8c72e5a04c7b78f5f7f581f", "score": "0.7789958", "text": "function isPrime(num) {\n var counter = num - 1;\n while (counter > 1 && num % counter !== 0) {\n counter -= 1;\n }\n if (counter === 1) {\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "a5dc0b9b568b62679b17229e7f504e33", "score": "0.77791333", "text": "function isPrime(num) {\nif (num <= 0) {\n return false;\n}\nfor(let i = 2; i < num; i++)\n if(num % i === 0) return false;\n return num !== 1;\n}", "title": "" }, { "docid": "28a87302eaa3351e5377ee65b7081f1e", "score": "0.77739435", "text": "function isPrime(number) {\n var bool = true;\n for (var i = number - 1; i > 1; i--) {\n if (number % i == 0) {\n bool = false;\n }\n } return bool;\n}", "title": "" }, { "docid": "f05b1d0cd05a5535dd8a1869f600a6f1", "score": "0.77723515", "text": "function isPrime(x) {\n \n}", "title": "" }, { "docid": "53e3825436295e69e4163b35d56dcf43", "score": "0.7770138", "text": "function checkPrime(num) {\n for (var b = 2; b < num; b++) {\n if ((num % b) == 0)\n return false;\n }\n return true;\n}", "title": "" }, { "docid": "800ac2c3a9f82356d31ab0d907e333b6", "score": "0.7758659", "text": "function checkIfNumberIsPrime(number) {\n for (let i = 2, s = sqrt(number); i <= s; i++) {\n if (number % BigInt(i) === 0n) {\n return false;\n }\n }\n return true;\n}", "title": "" }, { "docid": "b124d9ffd3ce3e9baf61cb600bed179d", "score": "0.7752512", "text": "function isPrime(num){\n \n // return first cases:\n if(num==2){return true;}\n if(num==1){return false;}\n // remove even numbers:\n if(num%2 == 0){return false;}\n\n //start checkin from 3:\n var j = 3;\n \n //loop until num:\n while(j<num){\n \n // as soon as a divider is found, return false\n if(num%j == 0){\n return false;\n }\n //even numbers were already returned\n j+=2;\n }\n \n // if no divider has been found from 1 < X < NUM, then NUM is a prime\n return true;\n\n}", "title": "" }, { "docid": "1158259f4238842fbd647d910ee9dc64", "score": "0.77484274", "text": "function isPrime(number) {\n var start = 2;\n while (start <= Math.sqrt(number)) if (number % start++ < 1) return false;\n return number > 1;\n}", "title": "" }, { "docid": "f0e9f4e8d9b056458b4fa887e8db82bd", "score": "0.7739057", "text": "function isPrime(num) {\n var flag = false;\n count = 0;\n for (var i = 1; i <= num; i++) {\n if (num % i == 0) {\n count++\n }\n }\n if (count == 2) {\n flag = true;\n }\n return flag;\n}", "title": "" }, { "docid": "35fe97dca2ae46aef24664b9fb48ca6a", "score": "0.7733628", "text": "function isPrime(num){\n\n var root = Math.ceil(Math.pow(num, .5));\n\n // Check only once if the number is divisible by 2\n // or if the number is positive\n if ((num % 2 == 0 && num != 2) || num < 1) {\n return false;\n }\n\n for (var i = 3; i <= root; i+=2) {\n if (num % i == 0){\n return false;\n }\n }\n\n console.log(num + \" Is prime!\");\n return true;\n}", "title": "" }, { "docid": "d794fff7557e3078b731bcf28d1e1480", "score": "0.7729628", "text": "function isPrime(number){\n\t//determine if number is 1\n if(number === 1){\n return false;\n }\n//0 gives you NaN and all the numbers are divisible by 1. Therefore, you\n//start at 2.\n for(var i = 2; i < number; i++){\n if(number % i === 0){ //if the statement is true, then return false\n return false;\n }\n }\n return true;\n}", "title": "" }, { "docid": "0d0ca1aad5883140288de24056966aa0", "score": "0.7727777", "text": "function isPrime(number) {\n if(number < 2) return false;\n for(let i = 2; i <= Math.sqrt(number); i++) {\n if(number % i == 0){\n return false;\n }\n }\n return true;\n}", "title": "" }, { "docid": "0f52f4c70650457189a58fa427aa266e", "score": "0.7724086", "text": "function isPrime(num) {\n if (num<=1) return false;\n if (num>0){\n for(var i = 2; i < num; i++)\n if ( num%i == 0) return false;\n return true;\n }\n}", "title": "" }, { "docid": "663843eadcf18244a0a609e0efa6383d", "score": "0.77222955", "text": "function isPrime(num) {\n var divisor = 2;\n if (num === 0) {\n return false;\n }\n\n while (num > divisor) {\n if (num % divisor === 0) {\n return false;\n } else {\n divisor++;\n }\n }\n return true;\n}", "title": "" }, { "docid": "198c0afc8059658125452a88a0531fff", "score": "0.772213", "text": "function isPrime(num) {\n if (num < 2)\n return false;\n for (var i=2; i<num; i++) {\n if (num % i == 0) {\n return false;}}\n return true;\n}", "title": "" }, { "docid": "762640b416c657c6303f7050f794f1b3", "score": "0.7717375", "text": "function checkPrime(number){\n for (var d=2;d<number+1;d++){\n if(d==number){\n return true;\n }else if(number%d==0){\n return false;\n }\n }\n}", "title": "" }, { "docid": "5a03a0877b5109c3c0daf5f1456c10d2", "score": "0.7714128", "text": "function isPrimeNumber(num) {\n for (var y = 2; y < num; y++) {\n if (num % y === 0) {\n return false;\n }\n }\n return true;\n}", "title": "" }, { "docid": "452eee0cfcd5a007515ce9feaf1e748e", "score": "0.77121645", "text": "function isPrime(num) {\n let i = 1;\n\n while (i < num) {\n i += 1;\n\n if (num % i === 0) {\n return false;\n }\n\n }\n\n return true;\n}", "title": "" }, { "docid": "972d58215a61ec2249dec10adbeacdc2", "score": "0.77118474", "text": "function primeNumber(num){\n for(let i = 2; i < num; i++){\n if(num%i === 0){\n return false;\n }\n }\n return true;\n}", "title": "" }, { "docid": "7f8f4596ee8dd5a55735fc5931b1420f", "score": "0.77075267", "text": "function prime(num) {\n\tvar test = true;\n\tfor (var i=2; i<num; i++) {\n\t\tif (num%i == 0) {\n\t\t\ttest = false;\n\t\t}\n\t}\n\treturn test;\n}", "title": "" }, { "docid": "2d3fd229ccafe428c24ba55f193be756", "score": "0.77054983", "text": "function isPrime(num) {\n for (let i = 2; i <= Math.floor(num / 2); i++) {\n if (num % i === 0) {\n return false;\n }\n }\n return true;\n}", "title": "" }, { "docid": "b6131d7bd8dd4e50afb988f57312a8d9", "score": "0.76998293", "text": "function isPrime(num) {\r\n if(num < 2) return false;\r\n for (var i = 2; i < num; i++) {\r\n if(num%i==0)\r\n return false;\r\n }\r\n return true;\r\n}", "title": "" }, { "docid": "7cacc280333b18dbd97e5270449f5d22", "score": "0.7697667", "text": "function isPrime(num) {\n for(var i=2; i<=Math.sqrt(num); i++) {\n if(num%i === 0) {\n return false;\n }\n }\n return true;\n}", "title": "" }, { "docid": "38b06377f04aa5fc84a2fce01ac010ad", "score": "0.7691123", "text": "function isPrime(num) {\n for (var j = 2; j < num; j++) {\n if (num % j === 0) {\n return false;\n }\n }\n return true;\n }", "title": "" }, { "docid": "38b06377f04aa5fc84a2fce01ac010ad", "score": "0.7691123", "text": "function isPrime(num) {\n for (var j = 2; j < num; j++) {\n if (num % j === 0) {\n return false;\n }\n }\n return true;\n }", "title": "" }, { "docid": "ea6158395a6714ccb9db553b4d987225", "score": "0.7684422", "text": "function isPrime(num) {\n for (let i = 2; i < num; i++) {\n if (num % i === 0 && num != i) {\n return false;\n }\n }\n return true;\n }", "title": "" }, { "docid": "aa39900ee716c1b8890a930c19b5ee48", "score": "0.7682376", "text": "function isPrime(num) {\n if (num < 2) {\n return false;\n }\n\n let i = 2;\n while (i < num) {\n if (num % i === 0) {\n return false;\n }\n i++;\n }\n\n return true;\n}", "title": "" }, { "docid": "4fc1bc531a1b1f746705506db70fc41c", "score": "0.76806253", "text": "function isPrime(num) { \n var limit = Math.sqrt(num);\n for (var i = 2; i <= limit; i++) {\n if (num % i === 0) {return false;}\n }\n return num >= 2;\n}", "title": "" }, { "docid": "e3f6ab449565363ab387555a762fcdd7", "score": "0.7680121", "text": "function isPrime(number) {\n for (let i = 2; i <= Math.sqrt(number); i++) {\n if (number % i == 0) {\n return false;\n }\n }\n return true;\n}", "title": "" }, { "docid": "ab78bba6c5752476b671867d3cdce2c2", "score": "0.76777107", "text": "function isprime(num){\n for(var i = 2;i<num;i++){ //loop starting from 2 up to the num\n if(num % i == 0){ //check if it is divisible and return outcome\n return false\n }\n }\n return true\n}", "title": "" }, { "docid": "29d5615cb2d72c646597a71c12fdc763", "score": "0.7675844", "text": "function isPrime(num) {\n for (var i = 2; i < num; i++) {\n if (num % i === 0) {\n return false;\n }\n }\n return num > 1;\n}", "title": "" }, { "docid": "418fbf1138fda0bcfd35a6f61a587b4d", "score": "0.76738596", "text": "function isItPrime(num) {\n if (num < 0) {\n return false;\n }\n\tvar saveTime = Math.ceil(num /2) + 1;\n\tfor (var i = 2; i < saveTime; i++) {\n\t\tif (num % i === 0) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}", "title": "" }, { "docid": "be98c4c5d778381d95f236390122a0db", "score": "0.7663365", "text": "function isPrime(num) {\n if (num === 2) {\n return true;\n } else if (num < 2) {\n return false;\n }\n\n let i = 2;\n\n while (i < num) {\n if (num % i == 0) {\n return false;\n }\n i += 1;\n }\n return true;\n}", "title": "" }, { "docid": "bafee57e5e10b4574a5a023b8f7853ae", "score": "0.76600224", "text": "function isPrime(num) {\n if(num == 2) {\n return true\n }\n for(i=2; i <= Math.floor(num/2)+1; i++) {\n if(num%i == 0) {\n return false\n }\n }\n\n return true\n}", "title": "" }, { "docid": "8dc949dc91434ec7ab7cb9dcc6f18320", "score": "0.7658237", "text": "function isPrime(num) {\n for (var i = 2; i <= Math.sqrt(num); i++)\n if (num % i == 0) return false\n return num >= 2\n}", "title": "" }, { "docid": "a174ff51514f7d9226a1275580a611ee", "score": "0.7657446", "text": "function is_prime(n)\n{\n let i ;\n for(i = 2 ; i < n ; i++)\n {\n if (n % i == 0)\n {\n return false;\n }\n }\n return true;\n}", "title": "" }, { "docid": "218632749f35550857d5c9f27877c5ef", "score": "0.76541173", "text": "function isPrime(num) {\n for (var i = 2; i < num; i++) {\n if (num % i === 0) {\n return false;\n }\n }\n return true;\n}", "title": "" }, { "docid": "86c56d7943c4e9da1fd108103bb0fd8a", "score": "0.7653535", "text": "function isPrime(num) {\n if (num < 2) return false;\n\n for (let i = 2; i < num; i++) {\n if (num % i === 0) return false;\n }\n\n return true;\n}", "title": "" }, { "docid": "f88c1f13a8bcec936be592c644b5a402", "score": "0.76514286", "text": "function isPrime(num) {\n for (let i = 2; i < num; i++) {\n if (num % i === 0) {\n return false;\n }\n }\n\n return true;\n}", "title": "" }, { "docid": "9f7ddb7a11536e535d221ea5445b8fb8", "score": "0.7650666", "text": "function isPrime(num) {\n if (num < 2) {\n return false;\n }\n for (let i = 2; i < num; i++) {\n if (num % i === 0) {\n return false;\n }\n }\n return true;\n }", "title": "" }, { "docid": "2e4bc71ba7b13269d98ea59679e655e6", "score": "0.76451004", "text": "function isPrime(num) {\n\tfor (var i=2; i<num; i++) {\n\t\tif (num % i === 0)\n\t\treturn false;\n\t}\n\treturn true;\n}", "title": "" }, { "docid": "2c2d0c902d7468f9274d86f0c537cb0b", "score": "0.76395476", "text": "function isPrime(num) {\n\n\t\tvar count = num - 1;\n\t\twhile (count > 1) {\n\t\t\tif (num % count === 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tcount--;\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "eae52aafe71136a781c2c87ea6ddd41f", "score": "0.76358277", "text": "function isPrime(num) {\n if (num === 2) {\n return true;\n }\n for (var i = 2; i < num; i ++) {\n if (num % i === 0) {\n return false;\n }\n }\n return true;\n}", "title": "" }, { "docid": "774fa9146a58d4cab49f026b9dac5005", "score": "0.7633832", "text": "function isPrime(num) {\n if (num <= 1)\n return false;\n else if (num === 2)\n return true;\n else {\n for (let i = 2; i < num; i++)\n if (num % i === 0)\n return false;\n return true;\n }\n}", "title": "" }, { "docid": "a43c72039e26237861e8f55e10e42e5b", "score": "0.7631764", "text": "function isprime(num) { \n var i,flag='true';\n for(i = 2; i < num ; i++) \n if (num % i == 0) { \n flag = 'false'; \n break; \n } \n return flag;\n}", "title": "" }, { "docid": "9fa56e4217bf8cfee81720b445d5037b", "score": "0.76303196", "text": "function isPrime(num){\n\t\tfor (var i = 2; i < num; i++) {\n\t\t\tif (num%i === 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t return num > 1;\n\t}", "title": "" }, { "docid": "c32e02eb817f59dcb6dafb1114a3d275", "score": "0.76242036", "text": "function isPrimeNum(num) {\n for (let i = 2; i * i <= num; i++) {\n if (num % i == 0) {\n return false;\n }\n }\n return true;\n}", "title": "" }, { "docid": "d0d487408802e1b7f52169c8287db7ef", "score": "0.76214904", "text": "function checkPrime(num) {\n if(num <= 1) { return false; }\n for(var i = 2; i < num; i++) {\n if(num % i === 0) {\n return false;\n }\n }\n return true;\n}", "title": "" }, { "docid": "db2b094685496c5d534ed59a485ecc4a", "score": "0.76214546", "text": "function isPrime (num) {\n\t\tif (num <= 2) {\n\t\t\treturn true;\n\t\t} \n\t\tif (num % 2 === 0) {\n\t\t\treturn false;\n\t\t} \n\t\tfor (let i = 3; i <= Math.sqrt(num); i++) {\n\t\t\tif (num % i === 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "de83bb3056644227d1aa1e7e77fe540c", "score": "0.7621335", "text": "function isNumberPrime(n) {\n for(var i = 2; i< n; i++){\n if(n%i == 0){\n return false;\n }\n }\nreturn true;\n}", "title": "" }, { "docid": "4aceb7b2dea637e8c4d220fd44a3dd53", "score": "0.7615037", "text": "function isPrime(number) {\n for (let i = 2; i <= number; i++) {\n if (number % i === 0 && number != i) {\n // return true if it is divisible by any number that is not itself.\n return false;\n }\n }\n // if it passes the for loops conditions it is a prime\n return true;\n }", "title": "" }, { "docid": "c0960f0a511453123da809a0c9be3efa", "score": "0.76150185", "text": "function isPrime(integer) {\n for(var x = 2; x < integer; x++) {\n if(integer % x === 0) {\n console.log(integer + \" is divisible by \" + x);\n return false;\n }\n }\n return true;\n }", "title": "" }, { "docid": "02f7599e9d58d6e5c7ebc035573ff6a4", "score": "0.7609979", "text": "function checkPrime(num) {\n if (num <= 1) return false;\n if (num === 2) return true;\n for (let i = 2; i < num; i++) {\n if (num % i === 0) {\n return false;\n }\n }\n return true;\n}", "title": "" }, { "docid": "8e43d91baa8dba8b2ada11e6fd0f8252", "score": "0.76088876", "text": "function isPrime(num){\n for(let i = 2; i <= Math.sqrt(num); i++){\n if(num%i == 0) {\n return false;\n }\n }\n return num <= 1? false : true;\n}", "title": "" }, { "docid": "ed10b79705c55fdc44d08cbc1f4362ea", "score": "0.7607022", "text": "function isPrime(num) {\n if (num < 2) return false;\n for (let i = 2; i < num; i++) {\n if (num % i == 0)\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "a0cae22f0dc3533a33cdd348da935b94", "score": "0.7606453", "text": "function isPrime(num) {\n if (num < 2) {\n return false; \n }\n\n for (let i = 2; i < num; i += 1) {\n if (num % i === 0) {\n return false \n }\n }\n return true; \n}", "title": "" }, { "docid": "0de6a845e9fb62f53e7b3b6fe10ff34f", "score": "0.7606248", "text": "function isPrime(num){\n\tfor (var i = 2; i <= Math.sqrt(num); i++){\n\t\tif (num % i === 0) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}", "title": "" }, { "docid": "ee7d5b672a84949c36f21f7d2c5b2c7a", "score": "0.7605646", "text": "function isPrime(num) {\n if (num === 1) return false;\n for (let i = 2; i <= Math.sqrt(num); i++) {\n if (num % i === 0) return false;\n }\n return true;\n}", "title": "" }, { "docid": "f313d7e1c8d119020e631b133e312062", "score": "0.76026803", "text": "function isPrime(num) {\n for (let i = 2; num > i; i++) {\n if (num % i == 0) {\n return false;\n }\n }\n return num > 1;\n}", "title": "" }, { "docid": "3b1034f399f21dd46f78dd6bb652764a", "score": "0.76018244", "text": "function isPrime(n) {\r\n return !(Array(n + 1).join(1).match(/^1?$|^(11+?)\\1+$/));\r\n }", "title": "" }, { "docid": "42d632ce4a9019ffabd862516fe700ad", "score": "0.7592655", "text": "function isPrime(num) {\n if (num < 2) {\n return false;\n } for (var i = 2; i < num; i++) {\n if (num % i === 0){\n return false;\n }\n } return true;\n}", "title": "" }, { "docid": "594ba2803552f933a6978a4655471d2b", "score": "0.7577729", "text": "function isPrime(num) {\n if (num < 2) {\n return false\n }\n\n for (var i = 2; i < num; i += 1) {\n if (num % i === 0) {\n return false\n }\n }\n\n return true\n}", "title": "" }, { "docid": "7a4a08f3ae4c542e4710f10b6fa63eb5", "score": "0.75767636", "text": "function isPrime(num) {\n if (num <= 0) {\n return false;\n }\n for(var i = 2; i < num; i++)\n if(num % i === 0) return false;\n return num !== 1;\n}", "title": "" }, { "docid": "3ad6284d61775384a6c64c1b1c6263f8", "score": "0.7575853", "text": "function isPrime(number) {\n\t // true if number is prime, assumes number is an integer > 0\n\t number = Math.floor(number);\n\t if (number === 1) return false;\n\t if (number === 2) return true;\n\t for (var i = 2; i <= Math.sqrt(number + 0.5); i++) {\n\t if (number % i === 0) return false; // has divisor, hence not prime\n\t }\n\t return true; // has no divisors \n }", "title": "" }, { "docid": "0cc9cbcfc293b4f7b29cdb6f49c47abd", "score": "0.757562", "text": "function primeNum(num){\n for (i=2; i<num/2; i++){\n if(num%i===0){\n return false;\n } \n }\n return true;\n}", "title": "" }, { "docid": "2fe1a9c82d28ff2be9daf3536d4dece4", "score": "0.75748044", "text": "function isPrime(input){\n if(input===1){\n return false;\n }\n for(let i=2;i<=Math.sqrt(input);i++){\n if(input%i===0){\n return false;\n }\n }\n return true;\n}", "title": "" }, { "docid": "c5eebe5111776ab73cfbe82194560d56", "score": "0.7570879", "text": "function isPrime(x) {\n for (let i = 2; i < x; i++) {\n if (x % i === 0) return false;\n }\n return x !== 1 && x !== 0;\n}", "title": "" }, { "docid": "6f3592ba72c12fc28a97447f4a529331", "score": "0.7558056", "text": "function isPrime(n) {\n var divisor = 2;\n\n while (n > divisor) {\n if (n % divisor == 0) {\n return false;\n } else divisor++;\n }\n return true;\n}", "title": "" }, { "docid": "c3190c427e93c4bc08ef9792e64e731a", "score": "0.75300175", "text": "function isPrime(num) {\n if (num < 2){\n return false\n }\n for (let i = 2; i <= Math.sqrt(num); i++){\n if (num % i === 0) {\n return false\n }\n }\n return true \n}", "title": "" }, { "docid": "81b8e4f1a0c3225f3711747ed8b3ee68", "score": "0.7529512", "text": "function primeNumber(inptNumber)\r\n{\r\n\tvar flag=0;\r\n\tfor(var i=2;i<10;i++)\r\n\t{\r\n\t\tif(inptNumber%i===0 && inptNumber/i!==1)\r\n\t\t{\r\n\t\t\treturn 'FALSE';\r\n\t\t}\r\n\t\telse\r\n\t\t\tflag=1;\r\n\t\r\n\t}\r\n\tif(flag===1)\r\n\t{\r\n\t\treturn 'TRUE';\r\n\t}\r\n}", "title": "" }, { "docid": "cd253fba1b14fdec415e74814fbb46a0", "score": "0.75269085", "text": "function isPrime(num) {\n if (num < 2) return false;\n let sqrtnum = Math.floor(Math.sqrt(num));\n for (let i = 2; i < sqrtnum+1; i++){\n if (num%i==0){\n return false\n }\n }\n return true;\n}", "title": "" }, { "docid": "48e20b32204d6d7533ea6d15f8914b77", "score": "0.7523068", "text": "function isPrime(num) {\n\tvar output = true;\n\tfor (var i = 2 ; i < num ; i++) {\n\t if (num % i === 0) {\n\t return output = false;\n\t }\n\t}\n\treturn output;\n}", "title": "" }, { "docid": "86e2a0918135af4293af47848bcaf9e3", "score": "0.75222903", "text": "function isPrime(num) {\n\tfor (var i = 2; i < num; i++) {\n\t\tif(num % i === 0) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}", "title": "" }, { "docid": "a5eb3319006f11b1562ea3e5d62c0a4f", "score": "0.75123346", "text": "function isPrime(num) {\n for (let i = num - 1; i > 1; i--) {\n if (num % i === 0) {\n return false;\n }\n }\n\n return true;\n}", "title": "" }, { "docid": "853519433008f4505be7865f49cbb29d", "score": "0.75090486", "text": "function isPrime(n) {\n for (i = 2; i < n; i = i + 1) {\n if (mod(n, i) == 0) {\n return 0;\n }\n }\n return 1;\n}", "title": "" }, { "docid": "f67a4e57ab690e2d595583b36313e07d", "score": "0.75048476", "text": "function isPrime (x){ \n for(let i=2;i<=Math.sqrt(x);i++){\n if (x % i == 0 ){ \n return false ; \n \n }\n }\n return true ;\n}", "title": "" }, { "docid": "cf9108984eb5907b43f4bf7cc443f1d1", "score": "0.7500425", "text": "function PrimeTime(num) { \n for (var i=2; i<=Math.sqrt(num); i++){\n if (num%i === 0){\n return false\n }\n }\n return true; \n \n}", "title": "" }, { "docid": "e6efe4903b72294f4eff0aedd64efbd1", "score": "0.7494788", "text": "function PrimeCheck(num) {\n\tlet isPrime = true;\n\tlet number = num;\n\t\tfor (let i = 2; i < number; i++) {\n\t\t\tif (number % i == 0) {\n\t\t\t\tisPrime = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\treturn isPrime;\n}", "title": "" }, { "docid": "15a930e86f9c0f45577ba6c76cfcc26e", "score": "0.74944866", "text": "function isPrime(num) {\n\tif(num <= 1)\n\t\treturn false;\n\tif(num == 2 || num == 3)\n\t\treturn true;\n\tif(num % 2 == 0 || num % 3 == 0)\n\t\treturn false;\n\tfor(i=5, w=2; i*i<=num; i+=w, w=6-w) {\n\t\tif(num % i == 0)\n\t\t\treturn false;\n\t}\n\treturn true;\n}", "title": "" }, { "docid": "0f8635b814dca9e7db69a32c37389707", "score": "0.7494298", "text": "function isPrime(n) {\n for (let i = 2; i < n; i++) {\n if ( n % i == 0) return false;\n }\n return true;\n}", "title": "" } ]
1333d6a956ec35f39385a08385cb5c54
Retrieve full text and display in Location editor Pane
[ { "docid": "b51aca0c961c74676a500990712b22f0", "score": "0.7469526", "text": "function _getFullTextForLocation ()\n{\n if (m_resultSet[m_rawRecordId].data.text != null) {\n _displayLocationEditText(m_rawRecordId);\n }\n else {\n var uri = TROVE_URL + m_currentZone + '/' + m_resultSet[m_rawRecordId].data.id +\n '?key=' + m_user.key +\n '&encoding=json' +\n '&include=articletext' +\n '&callback=?';\n $.getJSON(uri, function (data, status, jqXHR) {\n if (status == \"success\") {\n var record = data['article'];\n if (record) {\n if (typeof record.articleText === UNDEF) {\n m_resultSet[m_rawRecordId].data.text = '&lt;nil&gt;';\n } else {\n var text = record.articleText.toString();\n text = text.replace(/<p>/g, '');\n text = text.replace(/<\\/p>/g, '');\n m_resultSet[m_rawRecordId].data.text = text;\n }\n _displayLocationEditText(m_rawRecordId);\n }\n }\n });\n }\n}", "title": "" } ]
[ { "docid": "4473d3dc081db03b11a669392482aa8b", "score": "0.6764342", "text": "function _displayLocationEditText (id)\n{\n var text = m_resultSet[id].data.text;\n var html = '<table id=\"raw-record\"><tr><td class=\"td-crud-name\">ID:</td><td>' + m_resultSet[id].data.id + '</td></tr>' +\n '<td class=\"td-crud-name\">Source:</td><td>' + m_resultSet[id].data.title.value + '</td></tr>' +\n '<td class=\"td-crud-name\">Snippet:</td><td>' + m_resultSet[id].data.snippet + '</td></tr>' +\n '<tr><td class=\"td-crud-name\">Full Text:</td><td>';\n html += ((text === null) ? '<button id=\"rdv-pbx\" onClick=\"_getFullTextForLocation()\">Load full text</button>' : text);\n html += '</td></tr></table>';\n $(_selById('record-text-container')).html(html);\n}", "title": "" }, { "docid": "5a4eec6af85bd5a442f33ebdbaec3ba7", "score": "0.6697081", "text": "function getOriginal() {\n deactivateSynonyms();\n _GS.TextStore.newText(org_document);\n $(\"#textarea\").html(_GS.TextStore.text);\n synOn = 0;\n $(\"#sum-range\").val(\"0\");\n\n // Closes open options in sidenav\n sidenavControl(\"none\");\n\n // Graphical adjustments\n $(\"#textarea\").css(\"padding-left\", \"3%\");\n $(\"#textarea\").css(\"padding-right\", \"3%\");\n $(\"#textarea\").css(\"font-size\", \"18px\");\n $(\"#textarea\").css(\"font-family\", \"Arial\");\n $(\"#textarea\").css(\"line-height\", \"1.5\");\n\n // Feedback to the user\n showFeedback(\"Texten är återställd\");\n}", "title": "" }, { "docid": "62363dda09c4bcf6ea3a381621b3cfc9", "score": "0.66167384", "text": "function showTextEditor () {\n document.getElementById('descForum').innerHTML = editorText.document.body.innerHTML;\n return;\n}", "title": "" }, { "docid": "065a22b1c5460be938416d56973a7dfc", "score": "0.6319558", "text": "function getEditorText() {\n\treturn editor.getValue();\n}", "title": "" }, { "docid": "06d0ed444247b868a427f5f5a9a5fea0", "score": "0.62360245", "text": "function captureText(){\r\n var textComponent = document.getElementById('editor');\r\n if (textComponent.selectionStart !== undefined) {// Standards Compliant Version\r\n startPos = textComponent.selectionStart;\r\n endPos = textComponent.selectionEnd;\r\n selectedText = textComponent.value.substring(startPos, endPos);\r\n }\r\n else if (document.selection !== undefined) {// IE Version\r\n textComponent.focus();\r\n var sel = document.selection.createRange();\r\n selectedText = sel.text;\r\n }\r\n synFlag = 1;\r\n //alert(\"You selected: \" + selectedText);\r\n deletePrev();\r\n generateSyns(selectedText);\r\n}", "title": "" }, { "docid": "8f714a1fe019e5f2dc94ddf5402fbcf3", "score": "0.60076207", "text": "showEditor() {\n var textEditorView = this.getEditTextView();\n var region = this.getRegion('content');\n region.show(textEditorView);\n this._setCache();\n }", "title": "" }, { "docid": "38a6f0154376e167d0417d9e653f24a3", "score": "0.59856224", "text": "function getEditorText() {\n return codeEditor.getValue();\n}", "title": "" }, { "docid": "5c575185e2dbbe3e11cb6143c5a9426c", "score": "0.59842926", "text": "function getWholeText() {\n let editor = vscode.window.activeTextEditor;\n let firstLine = editor.document.lineAt(0);\n let lastLine = editor.document.lineAt(editor.document.lineCount - 1);\n let textRange = new vscode.Range(0, firstLine.range.start.character, editor.document.lineCount - 1, lastLine.range.end.character);\n return editor.document.getText(textRange);\n}", "title": "" }, { "docid": "19b224a784953988fd17edddde4e3f79", "score": "0.5954682", "text": "function getCurText(startLine, startChar, endLine, endChar) {\n // console.log('getCurText running'); \n let curText;\n const startPos = new vscode.Position( startLine, startChar);\n const endPos = new vscode.Position( endLine, endChar );\n curText = editor.document.getText( new vscode.Range( startPos, endPos ));\n return curText;\n }", "title": "" }, { "docid": "b358c2ce82e3857fffd5cdd07a7f2e63", "score": "0.5913028", "text": "function displayAllContentInViewer(selectedText) {\n\t// divContentAll assigned upon load\n\tdivContentAll.innerHTML = \"<pre>\" + selectedText + \"</pre>\";\n}", "title": "" }, { "docid": "295402f9e578161180d57cd4fce64ab1", "score": "0.58954376", "text": "exportToTextarea() {\n var value = this.editor.getHTML() !== '<p></p>' ? this.editor.getHTML() : null;\n this.textarea.value = value;\n }", "title": "" }, { "docid": "8b50ecddeadebf6e6757a0b6cd0ef9ac", "score": "0.5881442", "text": "function editorOf(text) {\n return {\n editor: {\n display: { view: [{ line: { text: text.replace(/\\|/g, \"\") } }] },\n },\n cursor: { line: 0, ch: text.indexOf(\"|\") },\n };\n }", "title": "" }, { "docid": "5648ad3a212158924ebd0f3688515bc4", "score": "0.58795184", "text": "function updateContent() {\n source_code = editor.getValue();\n }", "title": "" }, { "docid": "e3adafae953c57e3fa9b4174df112479", "score": "0.58765024", "text": "getText() {\n return this.getParsed(new _pnp_odata__WEBPACK_IMPORTED_MODULE_4__[\"TextParser\"]());\n }", "title": "" }, { "docid": "8cebdba5f1bbbb57abb0183ad86fbc3a", "score": "0.5840582", "text": "provideTextDocumentContent(uri) {\n let checkpointId = uri.fragment;\n let checkpoint = this.model.getCheckpoint(checkpointId);\n // Checkpoint was removed\n if (checkpoint) {\n return checkpoint.text;\n }\n else {\n console.warn(\"Checkpoint you are currently viewing has been removed.\");\n }\n }", "title": "" }, { "docid": "6e953482e56045f0d724be35f480de2c", "score": "0.58392835", "text": "function onSuccess(recognizedText) {\n //var element = document.getElementById('pp');\n //element.innerHTML=recognizedText.blocks.blocktext;\n //Use above two lines to show recognizedText in html\n console.log(recognizedText);\n alert(recognizedText.blocks.blocktext);\n }", "title": "" }, { "docid": "6e953482e56045f0d724be35f480de2c", "score": "0.58392835", "text": "function onSuccess(recognizedText) {\n //var element = document.getElementById('pp');\n //element.innerHTML=recognizedText.blocks.blocktext;\n //Use above two lines to show recognizedText in html\n console.log(recognizedText);\n alert(recognizedText.blocks.blocktext);\n }", "title": "" }, { "docid": "f2705ce462539d8dcbf4bce56a8ec4f2", "score": "0.583914", "text": "function text(sel) { return getSelectedContent(sel, true); }", "title": "" }, { "docid": "d6e4e3ecf9e8c4e9cf9b1de4d5e0f7d1", "score": "0.58012265", "text": "function readUserVisibleText(elem) {\n const selection = window.getSelection();\n const range = document.createRange();\n range.selectNodeContents(elem);\n selection.removeAllRanges();\n selection.addRange(range);\n const selectionString = selection.toString();\n selection.removeAllRanges();\n return selectionString;\n}", "title": "" }, { "docid": "4c3725a9d213c2ecac07531c29089f32", "score": "0.57891035", "text": "function displayRoomInfo(room) {\n textContent = room.describe();\n\n document.getElementById(\"textArea\").innerHTML = textContent;\n document.getElementById(\"userInput\").focus();\n}", "title": "" }, { "docid": "5deb4c227a6509abb212a3f7a9ba6c65", "score": "0.57810336", "text": "function cmd_Look() {\n\t\tvar msg_box = document.getElementById(\"ta_Main\");\n\t\tmsg_box.value = loc[current_loc].loc_desc() + \"\\n\\n\" + msg_box.value;\n\t}", "title": "" }, { "docid": "bf1bbb531f446b4459e79ede6afd070b", "score": "0.5779548", "text": "function displayText(text) {\n createTextBox();\n\n console.log(text);\n document.getElementById(\"deepl-ext-body\").innerText = text;\n}", "title": "" }, { "docid": "f4bc849aedf4e5f7e0e793af547b9f45", "score": "0.57548994", "text": "function lookText() {\n appendOut(currentRoom.desc);\n}", "title": "" }, { "docid": "1a5f2f98e0c27e3ae661797a8190bebd", "score": "0.57446676", "text": "function showNote(contents) {\n editor.root.innerHTML = localStorage.getItem(contents);\n}", "title": "" }, { "docid": "0f12047397fd38a3048d181fb271b022", "score": "0.5731419", "text": "function Gettext(value,bb) {\n var text = document.getElementById(value);\n if (comm._viewmode == 2){\n var source = document.getElementById('box_text');\n text.value = source.value;\n comm._viewmode = 1; // WYSIWYG\n }else {\n Editor = document.getElementById('box').contentWindow.document;\n var ceditor = bbcode._HTMLtoBBcode(bbcode._erase(Editor.body.innerHTML));\n text.value = ceditor;\n }\n \n}", "title": "" }, { "docid": "5a475fab2ea24070515fd6da12c00f9f", "score": "0.57159567", "text": "function retrieveFullText (message, cb) {\n var href = message.children[1].href;\n bot.log(href, 'substitution expanding message');\n\n bot.IO.xhr({\n method: 'GET',\n url: href,\n data: { plain: true },\n complete: cb\n });\n }", "title": "" }, { "docid": "c3de1074eb913cb6a8f628e426b3a25d", "score": "0.570969", "text": "function Display(place, doc) {\n var d = this;\n\n // The semihidden textarea that is focused when the editor is\n // focused, and receives input.\n var input = d.input = elt(\"textarea\", null, null, \"position: absolute; padding: 0; width: 1px; height: 1em; outline: none\");\n // The textarea is kept positioned near the cursor to prevent the\n // fact that it'll be scrolled into view on input from scrolling\n // our fake cursor out of view. On webkit, when wrap=off, paste is\n // very slow. So make the area wide instead.\n if (webkit) input.style.width = \"1000px\";\n else input.setAttribute(\"wrap\", \"off\");\n // If border: 0; -- iOS fails to open keyboard (issue #1287)\n if (ios) input.style.border = \"1px solid black\";\n input.setAttribute(\"autocorrect\", \"off\"); input.setAttribute(\"autocapitalize\", \"off\"); input.setAttribute(\"spellcheck\", \"false\");\n\n // Wraps and hides input textarea\n d.inputDiv = elt(\"div\", [input], null, \"overflow: hidden; position: relative; width: 3px; height: 0px;\");\n // The fake scrollbar elements.\n d.scrollbarH = elt(\"div\", [elt(\"div\", null, null, \"height: 100%; min-height: 1px\")], \"CodeMirror-hscrollbar\");\n d.scrollbarV = elt(\"div\", [elt(\"div\", null, null, \"min-width: 1px\")], \"CodeMirror-vscrollbar\");\n // Covers bottom-right square when both scrollbars are present.\n d.scrollbarFiller = elt(\"div\", null, \"CodeMirror-scrollbar-filler\");\n // Covers bottom of gutter when coverGutterNextToScrollbar is on\n // and h scrollbar is present.\n d.gutterFiller = elt(\"div\", null, \"CodeMirror-gutter-filler\");\n // Will contain the actual code, positioned to cover the viewport.\n d.lineDiv = elt(\"div\", null, \"CodeMirror-code\");\n // Elements are added to these to represent selection and cursors.\n d.selectionDiv = elt(\"div\", null, null, \"position: relative; z-index: 1\");\n d.cursorDiv = elt(\"div\", null, \"CodeMirror-cursors\");\n // A visibility: hidden element used to find the size of things.\n d.measure = elt(\"div\", null, \"CodeMirror-measure\");\n // When lines outside of the viewport are measured, they are drawn in this.\n d.lineMeasure = elt(\"div\", null, \"CodeMirror-measure\");\n // Wraps everything that needs to exist inside the vertically-padded coordinate system\n d.lineSpace = elt(\"div\", [d.measure, d.lineMeasure, d.selectionDiv, d.cursorDiv, d.lineDiv],\n null, \"position: relative; outline: none\");\n // Moved around its parent to cover visible view.\n d.mover = elt(\"div\", [elt(\"div\", [d.lineSpace], \"CodeMirror-lines\")], null, \"position: relative\");\n // Set to the height of the document, allowing scrolling.\n d.sizer = elt(\"div\", [d.mover], \"CodeMirror-sizer\");\n // Behavior of elts with overflow: auto and padding is\n // inconsistent across browsers. This is used to ensure the\n // scrollable area is big enough.\n d.heightForcer = elt(\"div\", null, null, \"position: absolute; height: \" + scrollerCutOff + \"px; width: 1px;\");\n // Will contain the gutters, if any.\n d.gutters = elt(\"div\", null, \"CodeMirror-gutters\");\n d.lineGutter = null;\n // Actual scrollable element.\n d.scroller = elt(\"div\", [d.sizer, d.heightForcer, d.gutters], \"CodeMirror-scroll\");\n d.scroller.setAttribute(\"tabIndex\", \"-1\");\n // The element in which the editor lives.\n d.wrapper = elt(\"div\", [d.inputDiv, d.scrollbarH, d.scrollbarV,\n d.scrollbarFiller, d.gutterFiller, d.scroller], \"CodeMirror\");\n\n // Work around IE7 z-index bug (not perfect, hence IE7 not really being supported)\n if (ie && ie_version < 8) { d.gutters.style.zIndex = -1; d.scroller.style.paddingRight = 0; }\n // Needed to hide big blue blinking cursor on Mobile Safari\n if (ios) input.style.width = \"0px\";\n if (!webkit) d.scroller.draggable = true;\n // Needed to handle Tab key in KHTML\n if (khtml) { d.inputDiv.style.height = \"1px\"; d.inputDiv.style.position = \"absolute\"; }\n // Need to set a minimum width to see the scrollbar on IE7 (but must not set it on IE8).\n if (ie && ie_version < 8) d.scrollbarH.style.minHeight = d.scrollbarV.style.minWidth = \"18px\";\n\n if (place) {\n if (place.appendChild) place.appendChild(d.wrapper);\n else place(d.wrapper);\n }\n\n // Current rendered range (may be bigger than the view window).\n d.viewFrom = d.viewTo = doc.first;\n // Information about the rendered lines.\n d.view = [];\n // Holds info about a single rendered line when it was rendered\n // for measurement, while not in view.\n d.externalMeasured = null;\n // Empty space (in pixels) above the view\n d.viewOffset = 0;\n d.lastWrapHeight = d.lastWrapWidth = 0;\n d.updateLineNumbers = null;\n\n // Used to only resize the line number gutter when necessary (when\n // the amount of lines crosses a boundary that makes its width change)\n d.lineNumWidth = d.lineNumInnerWidth = d.lineNumChars = null;\n // See readInput and resetInput\n d.prevInput = \"\";\n // Set to true when a non-horizontal-scrolling line widget is\n // added. As an optimization, line widget aligning is skipped when\n // this is false.\n d.alignWidgets = false;\n // Flag that indicates whether we expect input to appear real soon\n // now (after some event like 'keypress' or 'input') and are\n // polling intensively.\n d.pollingFast = false;\n // Self-resetting timeout for the poller\n d.poll = new Delayed();\n\n d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null;\n\n // Tracks when resetInput has punted to just putting a short\n // string into the textarea instead of the full selection.\n d.inaccurateSelection = false;\n\n // Tracks the maximum line length so that the horizontal scrollbar\n // can be kept static when scrolling.\n d.maxLine = null;\n d.maxLineLength = 0;\n d.maxLineChanged = false;\n\n // Used for measuring wheel scrolling granularity\n d.wheelDX = d.wheelDY = d.wheelStartX = d.wheelStartY = null;\n\n // True when shift is held down.\n d.shift = false;\n\n // Used to track whether anything happened since the context menu\n // was opened.\n d.selForContextMenu = null;\n }", "title": "" }, { "docid": "d0877db5a0acd35c9293612cb240cb4c", "score": "0.570969", "text": "function Display(place, doc) {\n var d = this;\n\n // The semihidden textarea that is focused when the editor is\n // focused, and receives input.\n var input = d.input = elt(\"textarea\", null, null, \"position: absolute; padding: 0; width: 1px; height: 1em; outline: none\");\n // The textarea is kept positioned near the cursor to prevent the\n // fact that it'll be scrolled into view on input from scrolling\n // our fake cursor out of view. On webkit, when wrap=off, paste is\n // very slow. So make the area wide instead.\n if (webkit) input.style.width = \"1000px\";\n else input.setAttribute(\"wrap\", \"off\");\n // If border: 0; -- iOS fails to open keyboard (issue #1287)\n if (ios) input.style.border = \"1px solid black\";\n input.setAttribute(\"autocorrect\", \"off\"); input.setAttribute(\"autocapitalize\", \"off\"); input.setAttribute(\"spellcheck\", \"false\");\n\n // Wraps and hides input textarea\n d.inputDiv = elt(\"div\", [input], null, \"overflow: hidden; position: relative; width: 3px; height: 0px;\");\n // The fake scrollbar elements.\n d.scrollbarH = elt(\"div\", [elt(\"div\", null, null, \"height: 100%; min-height: 1px\")], \"CodeMirror-hscrollbar\");\n d.scrollbarV = elt(\"div\", [elt(\"div\", null, null, \"min-width: 1px\")], \"CodeMirror-vscrollbar\");\n // Covers bottom-right square when both scrollbars are present.\n d.scrollbarFiller = elt(\"div\", null, \"CodeMirror-scrollbar-filler\");\n // Covers bottom of gutter when coverGutterNextToScrollbar is on\n // and h scrollbar is present.\n d.gutterFiller = elt(\"div\", null, \"CodeMirror-gutter-filler\");\n // Will contain the actual code, positioned to cover the viewport.\n d.lineDiv = elt(\"div\", null, \"CodeMirror-code\");\n // Elements are added to these to represent selection and cursors.\n d.selectionDiv = elt(\"div\", null, null, \"position: relative; z-index: 1\");\n d.cursorDiv = elt(\"div\", null, \"CodeMirror-cursors\");\n // A visibility: hidden element used to find the size of things.\n d.measure = elt(\"div\", null, \"CodeMirror-measure\");\n // When lines outside of the viewport are measured, they are drawn in this.\n d.lineMeasure = elt(\"div\", null, \"CodeMirror-measure\");\n // Wraps everything that needs to exist inside the vertically-padded coordinate system\n d.lineSpace = elt(\"div\", [d.measure, d.lineMeasure, d.selectionDiv, d.cursorDiv, d.lineDiv],\n null, \"position: relative; outline: none\");\n // Moved around its parent to cover visible view.\n d.mover = elt(\"div\", [elt(\"div\", [d.lineSpace], \"CodeMirror-lines\")], null, \"position: relative\");\n // Set to the height of the document, allowing scrolling.\n d.sizer = elt(\"div\", [d.mover], \"CodeMirror-sizer\");\n // Behavior of elts with overflow: auto and padding is\n // inconsistent across browsers. This is used to ensure the\n // scrollable area is big enough.\n d.heightForcer = elt(\"div\", null, null, \"position: absolute; height: \" + scrollerCutOff + \"px; width: 1px;\");\n // Will contain the gutters, if any.\n d.gutters = elt(\"div\", null, \"CodeMirror-gutters\");\n d.lineGutter = null;\n // Actual scrollable element.\n d.scroller = elt(\"div\", [d.sizer, d.heightForcer, d.gutters], \"CodeMirror-scroll\");\n d.scroller.setAttribute(\"tabIndex\", \"-1\");\n // The element in which the editor lives.\n d.wrapper = elt(\"div\", [d.inputDiv, d.scrollbarH, d.scrollbarV,\n d.scrollbarFiller, d.gutterFiller, d.scroller], \"CodeMirror\");\n\n // Work around IE7 z-index bug (not perfect, hence IE7 not really being supported)\n if (ie && ie_version < 8) { d.gutters.style.zIndex = -1; d.scroller.style.paddingRight = 0; }\n // Needed to hide big blue blinking cursor on Mobile Safari\n if (ios) input.style.width = \"0px\";\n if (!webkit) d.scroller.draggable = true;\n // Needed to handle Tab key in KHTML\n if (khtml) { d.inputDiv.style.height = \"1px\"; d.inputDiv.style.position = \"absolute\"; }\n // Need to set a minimum width to see the scrollbar on IE7 (but must not set it on IE8).\n if (ie && ie_version < 8) d.scrollbarH.style.minHeight = d.scrollbarV.style.minWidth = \"18px\";\n\n if (place.appendChild) place.appendChild(d.wrapper);\n else place(d.wrapper);\n\n // Current rendered range (may be bigger than the view window).\n d.viewFrom = d.viewTo = doc.first;\n // Information about the rendered lines.\n d.view = [];\n // Holds info about a single rendered line when it was rendered\n // for measurement, while not in view.\n d.externalMeasured = null;\n // Empty space (in pixels) above the view\n d.viewOffset = 0;\n d.lastSizeC = 0;\n d.updateLineNumbers = null;\n\n // Used to only resize the line number gutter when necessary (when\n // the amount of lines crosses a boundary that makes its width change)\n d.lineNumWidth = d.lineNumInnerWidth = d.lineNumChars = null;\n // See readInput and resetInput\n d.prevInput = \"\";\n // Set to true when a non-horizontal-scrolling line widget is\n // added. As an optimization, line widget aligning is skipped when\n // this is false.\n d.alignWidgets = false;\n // Flag that indicates whether we expect input to appear real soon\n // now (after some event like 'keypress' or 'input') and are\n // polling intensively.\n d.pollingFast = false;\n // Self-resetting timeout for the poller\n d.poll = new Delayed();\n\n d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null;\n\n // Tracks when resetInput has punted to just putting a short\n // string into the textarea instead of the full selection.\n d.inaccurateSelection = false;\n\n // Tracks the maximum line length so that the horizontal scrollbar\n // can be kept static when scrolling.\n d.maxLine = null;\n d.maxLineLength = 0;\n d.maxLineChanged = false;\n\n // Used for measuring wheel scrolling granularity\n d.wheelDX = d.wheelDY = d.wheelStartX = d.wheelStartY = null;\n\n // True when shift is held down.\n d.shift = false;\n\n // Used to track whether anything happened since the context menu\n // was opened.\n d.selForContextMenu = null;\n }", "title": "" }, { "docid": "d0877db5a0acd35c9293612cb240cb4c", "score": "0.570969", "text": "function Display(place, doc) {\n var d = this;\n\n // The semihidden textarea that is focused when the editor is\n // focused, and receives input.\n var input = d.input = elt(\"textarea\", null, null, \"position: absolute; padding: 0; width: 1px; height: 1em; outline: none\");\n // The textarea is kept positioned near the cursor to prevent the\n // fact that it'll be scrolled into view on input from scrolling\n // our fake cursor out of view. On webkit, when wrap=off, paste is\n // very slow. So make the area wide instead.\n if (webkit) input.style.width = \"1000px\";\n else input.setAttribute(\"wrap\", \"off\");\n // If border: 0; -- iOS fails to open keyboard (issue #1287)\n if (ios) input.style.border = \"1px solid black\";\n input.setAttribute(\"autocorrect\", \"off\"); input.setAttribute(\"autocapitalize\", \"off\"); input.setAttribute(\"spellcheck\", \"false\");\n\n // Wraps and hides input textarea\n d.inputDiv = elt(\"div\", [input], null, \"overflow: hidden; position: relative; width: 3px; height: 0px;\");\n // The fake scrollbar elements.\n d.scrollbarH = elt(\"div\", [elt(\"div\", null, null, \"height: 100%; min-height: 1px\")], \"CodeMirror-hscrollbar\");\n d.scrollbarV = elt(\"div\", [elt(\"div\", null, null, \"min-width: 1px\")], \"CodeMirror-vscrollbar\");\n // Covers bottom-right square when both scrollbars are present.\n d.scrollbarFiller = elt(\"div\", null, \"CodeMirror-scrollbar-filler\");\n // Covers bottom of gutter when coverGutterNextToScrollbar is on\n // and h scrollbar is present.\n d.gutterFiller = elt(\"div\", null, \"CodeMirror-gutter-filler\");\n // Will contain the actual code, positioned to cover the viewport.\n d.lineDiv = elt(\"div\", null, \"CodeMirror-code\");\n // Elements are added to these to represent selection and cursors.\n d.selectionDiv = elt(\"div\", null, null, \"position: relative; z-index: 1\");\n d.cursorDiv = elt(\"div\", null, \"CodeMirror-cursors\");\n // A visibility: hidden element used to find the size of things.\n d.measure = elt(\"div\", null, \"CodeMirror-measure\");\n // When lines outside of the viewport are measured, they are drawn in this.\n d.lineMeasure = elt(\"div\", null, \"CodeMirror-measure\");\n // Wraps everything that needs to exist inside the vertically-padded coordinate system\n d.lineSpace = elt(\"div\", [d.measure, d.lineMeasure, d.selectionDiv, d.cursorDiv, d.lineDiv],\n null, \"position: relative; outline: none\");\n // Moved around its parent to cover visible view.\n d.mover = elt(\"div\", [elt(\"div\", [d.lineSpace], \"CodeMirror-lines\")], null, \"position: relative\");\n // Set to the height of the document, allowing scrolling.\n d.sizer = elt(\"div\", [d.mover], \"CodeMirror-sizer\");\n // Behavior of elts with overflow: auto and padding is\n // inconsistent across browsers. This is used to ensure the\n // scrollable area is big enough.\n d.heightForcer = elt(\"div\", null, null, \"position: absolute; height: \" + scrollerCutOff + \"px; width: 1px;\");\n // Will contain the gutters, if any.\n d.gutters = elt(\"div\", null, \"CodeMirror-gutters\");\n d.lineGutter = null;\n // Actual scrollable element.\n d.scroller = elt(\"div\", [d.sizer, d.heightForcer, d.gutters], \"CodeMirror-scroll\");\n d.scroller.setAttribute(\"tabIndex\", \"-1\");\n // The element in which the editor lives.\n d.wrapper = elt(\"div\", [d.inputDiv, d.scrollbarH, d.scrollbarV,\n d.scrollbarFiller, d.gutterFiller, d.scroller], \"CodeMirror\");\n\n // Work around IE7 z-index bug (not perfect, hence IE7 not really being supported)\n if (ie && ie_version < 8) { d.gutters.style.zIndex = -1; d.scroller.style.paddingRight = 0; }\n // Needed to hide big blue blinking cursor on Mobile Safari\n if (ios) input.style.width = \"0px\";\n if (!webkit) d.scroller.draggable = true;\n // Needed to handle Tab key in KHTML\n if (khtml) { d.inputDiv.style.height = \"1px\"; d.inputDiv.style.position = \"absolute\"; }\n // Need to set a minimum width to see the scrollbar on IE7 (but must not set it on IE8).\n if (ie && ie_version < 8) d.scrollbarH.style.minHeight = d.scrollbarV.style.minWidth = \"18px\";\n\n if (place.appendChild) place.appendChild(d.wrapper);\n else place(d.wrapper);\n\n // Current rendered range (may be bigger than the view window).\n d.viewFrom = d.viewTo = doc.first;\n // Information about the rendered lines.\n d.view = [];\n // Holds info about a single rendered line when it was rendered\n // for measurement, while not in view.\n d.externalMeasured = null;\n // Empty space (in pixels) above the view\n d.viewOffset = 0;\n d.lastSizeC = 0;\n d.updateLineNumbers = null;\n\n // Used to only resize the line number gutter when necessary (when\n // the amount of lines crosses a boundary that makes its width change)\n d.lineNumWidth = d.lineNumInnerWidth = d.lineNumChars = null;\n // See readInput and resetInput\n d.prevInput = \"\";\n // Set to true when a non-horizontal-scrolling line widget is\n // added. As an optimization, line widget aligning is skipped when\n // this is false.\n d.alignWidgets = false;\n // Flag that indicates whether we expect input to appear real soon\n // now (after some event like 'keypress' or 'input') and are\n // polling intensively.\n d.pollingFast = false;\n // Self-resetting timeout for the poller\n d.poll = new Delayed();\n\n d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null;\n\n // Tracks when resetInput has punted to just putting a short\n // string into the textarea instead of the full selection.\n d.inaccurateSelection = false;\n\n // Tracks the maximum line length so that the horizontal scrollbar\n // can be kept static when scrolling.\n d.maxLine = null;\n d.maxLineLength = 0;\n d.maxLineChanged = false;\n\n // Used for measuring wheel scrolling granularity\n d.wheelDX = d.wheelDY = d.wheelStartX = d.wheelStartY = null;\n\n // True when shift is held down.\n d.shift = false;\n\n // Used to track whether anything happened since the context menu\n // was opened.\n d.selForContextMenu = null;\n }", "title": "" }, { "docid": "62c5bad9cf66eaff8d169bedc3c2d589", "score": "0.570969", "text": "function Display(place, doc) {\n var d = this;\n\n // The semihidden textarea that is focused when the editor is\n // focused, and receives input.\n var input = d.input = elt(\"textarea\", null, null, \"position: absolute; padding: 0; width: 1px; height: 1em; outline: none\");\n // The textarea is kept positioned near the cursor to prevent the\n // fact that it'll be scrolled into view on input from scrolling\n // our fake cursor out of view. On webkit, when wrap=off, paste is\n // very slow. So make the area wide instead.\n if (webkit) input.style.width = \"1000px\";\n else input.setAttribute(\"wrap\", \"off\");\n // If border: 0; -- iOS fails to open keyboard (issue #1287)\n if (ios) input.style.border = \"1px solid black\";\n input.setAttribute(\"autocorrect\", \"off\"); input.setAttribute(\"autocapitalize\", \"off\"); input.setAttribute(\"spellcheck\", \"false\");\n\n // Wraps and hides input textarea\n d.inputDiv = elt(\"div\", [input], null, \"overflow: hidden; position: relative; width: 3px; height: 0px;\");\n // The fake scrollbar elements.\n d.scrollbarH = elt(\"div\", [elt(\"div\", null, null, \"height: 100%; min-height: 1px\")], \"CodeMirror-hscrollbar\");\n d.scrollbarV = elt(\"div\", [elt(\"div\", null, null, \"min-width: 1px\")], \"CodeMirror-vscrollbar\");\n // Covers bottom-right square when both scrollbars are present.\n d.scrollbarFiller = elt(\"div\", null, \"CodeMirror-scrollbar-filler\");\n // Covers bottom of gutter when coverGutterNextToScrollbar is on\n // and h scrollbar is present.\n d.gutterFiller = elt(\"div\", null, \"CodeMirror-gutter-filler\");\n // Will contain the actual code, positioned to cover the viewport.\n d.lineDiv = elt(\"div\", null, \"CodeMirror-code\");\n // Elements are added to these to represent selection and cursors.\n d.selectionDiv = elt(\"div\", null, null, \"position: relative; z-index: 1\");\n d.cursorDiv = elt(\"div\", null, \"CodeMirror-cursors\");\n // A visibility: hidden element used to find the size of things.\n d.measure = elt(\"div\", null, \"CodeMirror-measure\");\n // When lines outside of the viewport are measured, they are drawn in this.\n d.lineMeasure = elt(\"div\", null, \"CodeMirror-measure\");\n // Wraps everything that needs to exist inside the vertically-padded coordinate system\n d.lineSpace = elt(\"div\", [d.measure, d.lineMeasure, d.selectionDiv, d.cursorDiv, d.lineDiv],\n null, \"position: relative; outline: none\");\n // Moved around its parent to cover visible view.\n d.mover = elt(\"div\", [elt(\"div\", [d.lineSpace], \"CodeMirror-lines\")], null, \"position: relative\");\n // Set to the height of the document, allowing scrolling.\n d.sizer = elt(\"div\", [d.mover], \"CodeMirror-sizer\");\n // Behavior of elts with overflow: auto and padding is\n // inconsistent across browsers. This is used to ensure the\n // scrollable area is big enough.\n d.heightForcer = elt(\"div\", null, null, \"position: absolute; height: \" + scrollerCutOff + \"px; width: 1px;\");\n // Will contain the gutters, if any.\n d.gutters = elt(\"div\", null, \"CodeMirror-gutters\");\n d.lineGutter = null;\n // Actual scrollable element.\n d.scroller = elt(\"div\", [d.sizer, d.heightForcer, d.gutters], \"CodeMirror-scroll\");\n d.scroller.setAttribute(\"tabIndex\", \"-1\");\n // The element in which the editor lives.\n d.wrapper = elt(\"div\", [d.inputDiv, d.scrollbarH, d.scrollbarV,\n d.scrollbarFiller, d.gutterFiller, d.scroller], \"CodeMirror\");\n\n // Work around IE7 z-index bug (not perfect, hence IE7 not really being supported)\n if (ie_upto7) { d.gutters.style.zIndex = -1; d.scroller.style.paddingRight = 0; }\n // Needed to hide big blue blinking cursor on Mobile Safari\n if (ios) input.style.width = \"0px\";\n if (!webkit) d.scroller.draggable = true;\n // Needed to handle Tab key in KHTML\n if (khtml) { d.inputDiv.style.height = \"1px\"; d.inputDiv.style.position = \"absolute\"; }\n // Need to set a minimum width to see the scrollbar on IE7 (but must not set it on IE8).\n if (ie_upto7) d.scrollbarH.style.minHeight = d.scrollbarV.style.minWidth = \"18px\";\n\n if (place.appendChild) place.appendChild(d.wrapper);\n else place(d.wrapper);\n\n // Current rendered range (may be bigger than the view window).\n d.viewFrom = d.viewTo = doc.first;\n // Information about the rendered lines.\n d.view = [];\n // Holds info about a single rendered line when it was rendered\n // for measurement, while not in view.\n d.externalMeasured = null;\n // Empty space (in pixels) above the view\n d.viewOffset = 0;\n d.lastSizeC = 0;\n d.updateLineNumbers = null;\n\n // Used to only resize the line number gutter when necessary (when\n // the amount of lines crosses a boundary that makes its width change)\n d.lineNumWidth = d.lineNumInnerWidth = d.lineNumChars = null;\n // See readInput and resetInput\n d.prevInput = \"\";\n // Set to true when a non-horizontal-scrolling line widget is\n // added. As an optimization, line widget aligning is skipped when\n // this is false.\n d.alignWidgets = false;\n // Flag that indicates whether we expect input to appear real soon\n // now (after some event like 'keypress' or 'input') and are\n // polling intensively.\n d.pollingFast = false;\n // Self-resetting timeout for the poller\n d.poll = new Delayed();\n\n d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null;\n\n // Tracks when resetInput has punted to just putting a short\n // string into the textarea instead of the full selection.\n d.inaccurateSelection = false;\n\n // Tracks the maximum line length so that the horizontal scrollbar\n // can be kept static when scrolling.\n d.maxLine = null;\n d.maxLineLength = 0;\n d.maxLineChanged = false;\n\n // Used for measuring wheel scrolling granularity\n d.wheelDX = d.wheelDY = d.wheelStartX = d.wheelStartY = null;\n\n // True when shift is held down.\n d.shift = false;\n\n // Used to track whether anything happened since the context menu\n // was opened.\n d.selForContextMenu = null;\n }", "title": "" }, { "docid": "d0877db5a0acd35c9293612cb240cb4c", "score": "0.570969", "text": "function Display(place, doc) {\n var d = this;\n\n // The semihidden textarea that is focused when the editor is\n // focused, and receives input.\n var input = d.input = elt(\"textarea\", null, null, \"position: absolute; padding: 0; width: 1px; height: 1em; outline: none\");\n // The textarea is kept positioned near the cursor to prevent the\n // fact that it'll be scrolled into view on input from scrolling\n // our fake cursor out of view. On webkit, when wrap=off, paste is\n // very slow. So make the area wide instead.\n if (webkit) input.style.width = \"1000px\";\n else input.setAttribute(\"wrap\", \"off\");\n // If border: 0; -- iOS fails to open keyboard (issue #1287)\n if (ios) input.style.border = \"1px solid black\";\n input.setAttribute(\"autocorrect\", \"off\"); input.setAttribute(\"autocapitalize\", \"off\"); input.setAttribute(\"spellcheck\", \"false\");\n\n // Wraps and hides input textarea\n d.inputDiv = elt(\"div\", [input], null, \"overflow: hidden; position: relative; width: 3px; height: 0px;\");\n // The fake scrollbar elements.\n d.scrollbarH = elt(\"div\", [elt(\"div\", null, null, \"height: 100%; min-height: 1px\")], \"CodeMirror-hscrollbar\");\n d.scrollbarV = elt(\"div\", [elt(\"div\", null, null, \"min-width: 1px\")], \"CodeMirror-vscrollbar\");\n // Covers bottom-right square when both scrollbars are present.\n d.scrollbarFiller = elt(\"div\", null, \"CodeMirror-scrollbar-filler\");\n // Covers bottom of gutter when coverGutterNextToScrollbar is on\n // and h scrollbar is present.\n d.gutterFiller = elt(\"div\", null, \"CodeMirror-gutter-filler\");\n // Will contain the actual code, positioned to cover the viewport.\n d.lineDiv = elt(\"div\", null, \"CodeMirror-code\");\n // Elements are added to these to represent selection and cursors.\n d.selectionDiv = elt(\"div\", null, null, \"position: relative; z-index: 1\");\n d.cursorDiv = elt(\"div\", null, \"CodeMirror-cursors\");\n // A visibility: hidden element used to find the size of things.\n d.measure = elt(\"div\", null, \"CodeMirror-measure\");\n // When lines outside of the viewport are measured, they are drawn in this.\n d.lineMeasure = elt(\"div\", null, \"CodeMirror-measure\");\n // Wraps everything that needs to exist inside the vertically-padded coordinate system\n d.lineSpace = elt(\"div\", [d.measure, d.lineMeasure, d.selectionDiv, d.cursorDiv, d.lineDiv],\n null, \"position: relative; outline: none\");\n // Moved around its parent to cover visible view.\n d.mover = elt(\"div\", [elt(\"div\", [d.lineSpace], \"CodeMirror-lines\")], null, \"position: relative\");\n // Set to the height of the document, allowing scrolling.\n d.sizer = elt(\"div\", [d.mover], \"CodeMirror-sizer\");\n // Behavior of elts with overflow: auto and padding is\n // inconsistent across browsers. This is used to ensure the\n // scrollable area is big enough.\n d.heightForcer = elt(\"div\", null, null, \"position: absolute; height: \" + scrollerCutOff + \"px; width: 1px;\");\n // Will contain the gutters, if any.\n d.gutters = elt(\"div\", null, \"CodeMirror-gutters\");\n d.lineGutter = null;\n // Actual scrollable element.\n d.scroller = elt(\"div\", [d.sizer, d.heightForcer, d.gutters], \"CodeMirror-scroll\");\n d.scroller.setAttribute(\"tabIndex\", \"-1\");\n // The element in which the editor lives.\n d.wrapper = elt(\"div\", [d.inputDiv, d.scrollbarH, d.scrollbarV,\n d.scrollbarFiller, d.gutterFiller, d.scroller], \"CodeMirror\");\n\n // Work around IE7 z-index bug (not perfect, hence IE7 not really being supported)\n if (ie && ie_version < 8) { d.gutters.style.zIndex = -1; d.scroller.style.paddingRight = 0; }\n // Needed to hide big blue blinking cursor on Mobile Safari\n if (ios) input.style.width = \"0px\";\n if (!webkit) d.scroller.draggable = true;\n // Needed to handle Tab key in KHTML\n if (khtml) { d.inputDiv.style.height = \"1px\"; d.inputDiv.style.position = \"absolute\"; }\n // Need to set a minimum width to see the scrollbar on IE7 (but must not set it on IE8).\n if (ie && ie_version < 8) d.scrollbarH.style.minHeight = d.scrollbarV.style.minWidth = \"18px\";\n\n if (place.appendChild) place.appendChild(d.wrapper);\n else place(d.wrapper);\n\n // Current rendered range (may be bigger than the view window).\n d.viewFrom = d.viewTo = doc.first;\n // Information about the rendered lines.\n d.view = [];\n // Holds info about a single rendered line when it was rendered\n // for measurement, while not in view.\n d.externalMeasured = null;\n // Empty space (in pixels) above the view\n d.viewOffset = 0;\n d.lastSizeC = 0;\n d.updateLineNumbers = null;\n\n // Used to only resize the line number gutter when necessary (when\n // the amount of lines crosses a boundary that makes its width change)\n d.lineNumWidth = d.lineNumInnerWidth = d.lineNumChars = null;\n // See readInput and resetInput\n d.prevInput = \"\";\n // Set to true when a non-horizontal-scrolling line widget is\n // added. As an optimization, line widget aligning is skipped when\n // this is false.\n d.alignWidgets = false;\n // Flag that indicates whether we expect input to appear real soon\n // now (after some event like 'keypress' or 'input') and are\n // polling intensively.\n d.pollingFast = false;\n // Self-resetting timeout for the poller\n d.poll = new Delayed();\n\n d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null;\n\n // Tracks when resetInput has punted to just putting a short\n // string into the textarea instead of the full selection.\n d.inaccurateSelection = false;\n\n // Tracks the maximum line length so that the horizontal scrollbar\n // can be kept static when scrolling.\n d.maxLine = null;\n d.maxLineLength = 0;\n d.maxLineChanged = false;\n\n // Used for measuring wheel scrolling granularity\n d.wheelDX = d.wheelDY = d.wheelStartX = d.wheelStartY = null;\n\n // True when shift is held down.\n d.shift = false;\n\n // Used to track whether anything happened since the context menu\n // was opened.\n d.selForContextMenu = null;\n }", "title": "" }, { "docid": "97bdd498f57c029158e9d1e9d3fa4e7f", "score": "0.57028556", "text": "function domarkdown(e){\n var req = ocpu.call(\"rmdtext\", {\n text : editor.getSession().getValue()\n }, function(session){\n $(\"iframe\").attr('src', session.getFileURL(\"output.html\"));\n }).fail(function(text){\n alert(\"Error: \" + req.responseText);\n });\n }", "title": "" }, { "docid": "28789eac8e31a4db56c1c506c82f40b1", "score": "0.57007563", "text": "get textContent() {\n return this.data;\n }", "title": "" }, { "docid": "cc822436972cf950f633815fb604125c", "score": "0.56777525", "text": "function preview_content(){\n $(\"#preiview_title\").text($(\"#wiki_title\").val());\n $(\"#preview_time\").text($(\"#wiki_author\").val() + \" \" + get_date());\n content = CKEDITOR.instances.wiki_content.getData();\n $('#preview_content').html(content);\n $(document).scrollTop(200);\n }", "title": "" }, { "docid": "f1fde6dc9b4c44984fe1842657bb4386", "score": "0.56762576", "text": "callback() {\n openFile( textEditor, p.name );\n }", "title": "" }, { "docid": "89c21215046a808631eaea422a552c26", "score": "0.5668807", "text": "function getStoredText() {\n // retrieve stored text\n var loadedText = JSON.parse(localStorage.getItem(\"storedText\"));\n console.log(loadedText);\n // check to see if retrieved text exsists\n if (loadedText !== null) {\n savedText = loadedText;\n $(\".row\").each(function () {\n var rowMatch = $(this).attr(\"id\");\n var foundText = $(this).children(\".description\");\n if (savedText.rowMatch !== \"\") {\n foundText.val(savedText[rowMatch]);\n }\n });\n }\n }", "title": "" }, { "docid": "45533c37ee020c787fd5de4f6787e1b3", "score": "0.5665212", "text": "function Display(place, doc) {\n var d = this;\n\n // The semihidden textarea that is focused when the editor is\n // focused, and receives input.\n var input = d.input = elt(\"textarea\", null, null, \"position: absolute; padding: 0; width: 1px; height: 1em; outline: none\");\n // The textarea is kept positioned near the cursor to prevent the\n // fact that it'll be scrolled into view on input from scrolling\n // our fake cursor out of view. On webkit, when wrap=off, paste is\n // very slow. So make the area wide instead.\n if (webkit) input.style.width = \"1000px\";\n else input.setAttribute(\"wrap\", \"off\");\n // If border: 0; -- iOS fails to open keyboard (issue #1287)\n if (ios) input.style.border = \"1px solid black\";\n input.setAttribute(\"autocorrect\", \"off\"); input.setAttribute(\"autocapitalize\", \"off\"); input.setAttribute(\"spellcheck\", \"false\");\n\n // Wraps and hides input textarea\n d.inputDiv = elt(\"div\", [input], null, \"overflow: hidden; position: relative; width: 3px; height: 0px;\");\n // Covers bottom-right square when both scrollbars are present.\n d.scrollbarFiller = elt(\"div\", null, \"CodeMirror-scrollbar-filler\");\n d.scrollbarFiller.setAttribute(\"not-content\", \"true\");\n // Covers bottom of gutter when coverGutterNextToScrollbar is on\n // and h scrollbar is present.\n d.gutterFiller = elt(\"div\", null, \"CodeMirror-gutter-filler\");\n d.gutterFiller.setAttribute(\"not-content\", \"true\");\n // Will contain the actual code, positioned to cover the viewport.\n d.lineDiv = elt(\"div\", null, \"CodeMirror-code\");\n // Elements are added to these to represent selection and cursors.\n d.selectionDiv = elt(\"div\", null, null, \"position: relative; z-index: 1\");\n d.cursorDiv = elt(\"div\", null, \"CodeMirror-cursors\");\n // A visibility: hidden element used to find the size of things.\n d.measure = elt(\"div\", null, \"CodeMirror-measure\");\n // When lines outside of the viewport are measured, they are drawn in this.\n d.lineMeasure = elt(\"div\", null, \"CodeMirror-measure\");\n // Wraps everything that needs to exist inside the vertically-padded coordinate system\n d.lineSpace = elt(\"div\", [d.measure, d.lineMeasure, d.selectionDiv, d.cursorDiv, d.lineDiv],\n null, \"position: relative; outline: none\");\n // Moved around its parent to cover visible view.\n d.mover = elt(\"div\", [elt(\"div\", [d.lineSpace], \"CodeMirror-lines\")], null, \"position: relative\");\n // Set to the height of the document, allowing scrolling.\n d.sizer = elt(\"div\", [d.mover], \"CodeMirror-sizer\");\n d.sizerWidth = null;\n // Behavior of elts with overflow: auto and padding is\n // inconsistent across browsers. This is used to ensure the\n // scrollable area is big enough.\n d.heightForcer = elt(\"div\", null, null, \"position: absolute; height: \" + scrollerGap + \"px; width: 1px;\");\n // Will contain the gutters, if any.\n d.gutters = elt(\"div\", null, \"CodeMirror-gutters\");\n d.lineGutter = null;\n // Actual scrollable element.\n d.scroller = elt(\"div\", [d.sizer, d.heightForcer, d.gutters], \"CodeMirror-scroll\");\n d.scroller.setAttribute(\"tabIndex\", \"-1\");\n // The element in which the editor lives.\n d.wrapper = elt(\"div\", [d.inputDiv, d.scrollbarFiller, d.gutterFiller, d.scroller], \"CodeMirror\");\n\n // Work around IE7 z-index bug (not perfect, hence IE7 not really being supported)\n if (ie && ie_version < 8) { d.gutters.style.zIndex = -1; d.scroller.style.paddingRight = 0; }\n // Needed to hide big blue blinking cursor on Mobile Safari\n if (ios) input.style.width = \"0px\";\n if (!webkit) d.scroller.draggable = true;\n // Needed to handle Tab key in KHTML\n if (khtml) { d.inputDiv.style.height = \"1px\"; d.inputDiv.style.position = \"absolute\"; }\n\n if (place) {\n if (place.appendChild) place.appendChild(d.wrapper);\n else place(d.wrapper);\n }\n\n // Current rendered range (may be bigger than the view window).\n d.viewFrom = d.viewTo = doc.first;\n d.reportedViewFrom = d.reportedViewTo = doc.first;\n // Information about the rendered lines.\n d.view = [];\n d.renderedView = null;\n // Holds info about a single rendered line when it was rendered\n // for measurement, while not in view.\n d.externalMeasured = null;\n // Empty space (in pixels) above the view\n d.viewOffset = 0;\n d.lastWrapHeight = d.lastWrapWidth = 0;\n d.updateLineNumbers = null;\n\n d.nativeBarWidth = d.barHeight = d.barWidth = 0;\n d.scrollbarsClipped = false;\n\n // Used to only resize the line number gutter when necessary (when\n // the amount of lines crosses a boundary that makes its width change)\n d.lineNumWidth = d.lineNumInnerWidth = d.lineNumChars = null;\n // See readInput and resetInput\n d.prevInput = \"\";\n // Set to true when a non-horizontal-scrolling line widget is\n // added. As an optimization, line widget aligning is skipped when\n // this is false.\n d.alignWidgets = false;\n // Flag that indicates whether we expect input to appear real soon\n // now (after some event like 'keypress' or 'input') and are\n // polling intensively.\n d.pollingFast = false;\n // Self-resetting timeout for the poller\n d.poll = new Delayed();\n\n d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null;\n\n // Tracks when resetInput has punted to just putting a short\n // string into the textarea instead of the full selection.\n d.inaccurateSelection = false;\n\n // Tracks the maximum line length so that the horizontal scrollbar\n // can be kept static when scrolling.\n d.maxLine = null;\n d.maxLineLength = 0;\n d.maxLineChanged = false;\n\n // Used for measuring wheel scrolling granularity\n d.wheelDX = d.wheelDY = d.wheelStartX = d.wheelStartY = null;\n\n // True when shift is held down.\n d.shift = false;\n\n // Used to track whether anything happened since the context menu\n // was opened.\n d.selForContextMenu = null;\n }", "title": "" }, { "docid": "45533c37ee020c787fd5de4f6787e1b3", "score": "0.5665212", "text": "function Display(place, doc) {\n var d = this;\n\n // The semihidden textarea that is focused when the editor is\n // focused, and receives input.\n var input = d.input = elt(\"textarea\", null, null, \"position: absolute; padding: 0; width: 1px; height: 1em; outline: none\");\n // The textarea is kept positioned near the cursor to prevent the\n // fact that it'll be scrolled into view on input from scrolling\n // our fake cursor out of view. On webkit, when wrap=off, paste is\n // very slow. So make the area wide instead.\n if (webkit) input.style.width = \"1000px\";\n else input.setAttribute(\"wrap\", \"off\");\n // If border: 0; -- iOS fails to open keyboard (issue #1287)\n if (ios) input.style.border = \"1px solid black\";\n input.setAttribute(\"autocorrect\", \"off\"); input.setAttribute(\"autocapitalize\", \"off\"); input.setAttribute(\"spellcheck\", \"false\");\n\n // Wraps and hides input textarea\n d.inputDiv = elt(\"div\", [input], null, \"overflow: hidden; position: relative; width: 3px; height: 0px;\");\n // Covers bottom-right square when both scrollbars are present.\n d.scrollbarFiller = elt(\"div\", null, \"CodeMirror-scrollbar-filler\");\n d.scrollbarFiller.setAttribute(\"not-content\", \"true\");\n // Covers bottom of gutter when coverGutterNextToScrollbar is on\n // and h scrollbar is present.\n d.gutterFiller = elt(\"div\", null, \"CodeMirror-gutter-filler\");\n d.gutterFiller.setAttribute(\"not-content\", \"true\");\n // Will contain the actual code, positioned to cover the viewport.\n d.lineDiv = elt(\"div\", null, \"CodeMirror-code\");\n // Elements are added to these to represent selection and cursors.\n d.selectionDiv = elt(\"div\", null, null, \"position: relative; z-index: 1\");\n d.cursorDiv = elt(\"div\", null, \"CodeMirror-cursors\");\n // A visibility: hidden element used to find the size of things.\n d.measure = elt(\"div\", null, \"CodeMirror-measure\");\n // When lines outside of the viewport are measured, they are drawn in this.\n d.lineMeasure = elt(\"div\", null, \"CodeMirror-measure\");\n // Wraps everything that needs to exist inside the vertically-padded coordinate system\n d.lineSpace = elt(\"div\", [d.measure, d.lineMeasure, d.selectionDiv, d.cursorDiv, d.lineDiv],\n null, \"position: relative; outline: none\");\n // Moved around its parent to cover visible view.\n d.mover = elt(\"div\", [elt(\"div\", [d.lineSpace], \"CodeMirror-lines\")], null, \"position: relative\");\n // Set to the height of the document, allowing scrolling.\n d.sizer = elt(\"div\", [d.mover], \"CodeMirror-sizer\");\n d.sizerWidth = null;\n // Behavior of elts with overflow: auto and padding is\n // inconsistent across browsers. This is used to ensure the\n // scrollable area is big enough.\n d.heightForcer = elt(\"div\", null, null, \"position: absolute; height: \" + scrollerGap + \"px; width: 1px;\");\n // Will contain the gutters, if any.\n d.gutters = elt(\"div\", null, \"CodeMirror-gutters\");\n d.lineGutter = null;\n // Actual scrollable element.\n d.scroller = elt(\"div\", [d.sizer, d.heightForcer, d.gutters], \"CodeMirror-scroll\");\n d.scroller.setAttribute(\"tabIndex\", \"-1\");\n // The element in which the editor lives.\n d.wrapper = elt(\"div\", [d.inputDiv, d.scrollbarFiller, d.gutterFiller, d.scroller], \"CodeMirror\");\n\n // Work around IE7 z-index bug (not perfect, hence IE7 not really being supported)\n if (ie && ie_version < 8) { d.gutters.style.zIndex = -1; d.scroller.style.paddingRight = 0; }\n // Needed to hide big blue blinking cursor on Mobile Safari\n if (ios) input.style.width = \"0px\";\n if (!webkit) d.scroller.draggable = true;\n // Needed to handle Tab key in KHTML\n if (khtml) { d.inputDiv.style.height = \"1px\"; d.inputDiv.style.position = \"absolute\"; }\n\n if (place) {\n if (place.appendChild) place.appendChild(d.wrapper);\n else place(d.wrapper);\n }\n\n // Current rendered range (may be bigger than the view window).\n d.viewFrom = d.viewTo = doc.first;\n d.reportedViewFrom = d.reportedViewTo = doc.first;\n // Information about the rendered lines.\n d.view = [];\n d.renderedView = null;\n // Holds info about a single rendered line when it was rendered\n // for measurement, while not in view.\n d.externalMeasured = null;\n // Empty space (in pixels) above the view\n d.viewOffset = 0;\n d.lastWrapHeight = d.lastWrapWidth = 0;\n d.updateLineNumbers = null;\n\n d.nativeBarWidth = d.barHeight = d.barWidth = 0;\n d.scrollbarsClipped = false;\n\n // Used to only resize the line number gutter when necessary (when\n // the amount of lines crosses a boundary that makes its width change)\n d.lineNumWidth = d.lineNumInnerWidth = d.lineNumChars = null;\n // See readInput and resetInput\n d.prevInput = \"\";\n // Set to true when a non-horizontal-scrolling line widget is\n // added. As an optimization, line widget aligning is skipped when\n // this is false.\n d.alignWidgets = false;\n // Flag that indicates whether we expect input to appear real soon\n // now (after some event like 'keypress' or 'input') and are\n // polling intensively.\n d.pollingFast = false;\n // Self-resetting timeout for the poller\n d.poll = new Delayed();\n\n d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null;\n\n // Tracks when resetInput has punted to just putting a short\n // string into the textarea instead of the full selection.\n d.inaccurateSelection = false;\n\n // Tracks the maximum line length so that the horizontal scrollbar\n // can be kept static when scrolling.\n d.maxLine = null;\n d.maxLineLength = 0;\n d.maxLineChanged = false;\n\n // Used for measuring wheel scrolling granularity\n d.wheelDX = d.wheelDY = d.wheelStartX = d.wheelStartY = null;\n\n // True when shift is held down.\n d.shift = false;\n\n // Used to track whether anything happened since the context menu\n // was opened.\n d.selForContextMenu = null;\n }", "title": "" }, { "docid": "45533c37ee020c787fd5de4f6787e1b3", "score": "0.5665212", "text": "function Display(place, doc) {\n var d = this;\n\n // The semihidden textarea that is focused when the editor is\n // focused, and receives input.\n var input = d.input = elt(\"textarea\", null, null, \"position: absolute; padding: 0; width: 1px; height: 1em; outline: none\");\n // The textarea is kept positioned near the cursor to prevent the\n // fact that it'll be scrolled into view on input from scrolling\n // our fake cursor out of view. On webkit, when wrap=off, paste is\n // very slow. So make the area wide instead.\n if (webkit) input.style.width = \"1000px\";\n else input.setAttribute(\"wrap\", \"off\");\n // If border: 0; -- iOS fails to open keyboard (issue #1287)\n if (ios) input.style.border = \"1px solid black\";\n input.setAttribute(\"autocorrect\", \"off\"); input.setAttribute(\"autocapitalize\", \"off\"); input.setAttribute(\"spellcheck\", \"false\");\n\n // Wraps and hides input textarea\n d.inputDiv = elt(\"div\", [input], null, \"overflow: hidden; position: relative; width: 3px; height: 0px;\");\n // Covers bottom-right square when both scrollbars are present.\n d.scrollbarFiller = elt(\"div\", null, \"CodeMirror-scrollbar-filler\");\n d.scrollbarFiller.setAttribute(\"not-content\", \"true\");\n // Covers bottom of gutter when coverGutterNextToScrollbar is on\n // and h scrollbar is present.\n d.gutterFiller = elt(\"div\", null, \"CodeMirror-gutter-filler\");\n d.gutterFiller.setAttribute(\"not-content\", \"true\");\n // Will contain the actual code, positioned to cover the viewport.\n d.lineDiv = elt(\"div\", null, \"CodeMirror-code\");\n // Elements are added to these to represent selection and cursors.\n d.selectionDiv = elt(\"div\", null, null, \"position: relative; z-index: 1\");\n d.cursorDiv = elt(\"div\", null, \"CodeMirror-cursors\");\n // A visibility: hidden element used to find the size of things.\n d.measure = elt(\"div\", null, \"CodeMirror-measure\");\n // When lines outside of the viewport are measured, they are drawn in this.\n d.lineMeasure = elt(\"div\", null, \"CodeMirror-measure\");\n // Wraps everything that needs to exist inside the vertically-padded coordinate system\n d.lineSpace = elt(\"div\", [d.measure, d.lineMeasure, d.selectionDiv, d.cursorDiv, d.lineDiv],\n null, \"position: relative; outline: none\");\n // Moved around its parent to cover visible view.\n d.mover = elt(\"div\", [elt(\"div\", [d.lineSpace], \"CodeMirror-lines\")], null, \"position: relative\");\n // Set to the height of the document, allowing scrolling.\n d.sizer = elt(\"div\", [d.mover], \"CodeMirror-sizer\");\n d.sizerWidth = null;\n // Behavior of elts with overflow: auto and padding is\n // inconsistent across browsers. This is used to ensure the\n // scrollable area is big enough.\n d.heightForcer = elt(\"div\", null, null, \"position: absolute; height: \" + scrollerGap + \"px; width: 1px;\");\n // Will contain the gutters, if any.\n d.gutters = elt(\"div\", null, \"CodeMirror-gutters\");\n d.lineGutter = null;\n // Actual scrollable element.\n d.scroller = elt(\"div\", [d.sizer, d.heightForcer, d.gutters], \"CodeMirror-scroll\");\n d.scroller.setAttribute(\"tabIndex\", \"-1\");\n // The element in which the editor lives.\n d.wrapper = elt(\"div\", [d.inputDiv, d.scrollbarFiller, d.gutterFiller, d.scroller], \"CodeMirror\");\n\n // Work around IE7 z-index bug (not perfect, hence IE7 not really being supported)\n if (ie && ie_version < 8) { d.gutters.style.zIndex = -1; d.scroller.style.paddingRight = 0; }\n // Needed to hide big blue blinking cursor on Mobile Safari\n if (ios) input.style.width = \"0px\";\n if (!webkit) d.scroller.draggable = true;\n // Needed to handle Tab key in KHTML\n if (khtml) { d.inputDiv.style.height = \"1px\"; d.inputDiv.style.position = \"absolute\"; }\n\n if (place) {\n if (place.appendChild) place.appendChild(d.wrapper);\n else place(d.wrapper);\n }\n\n // Current rendered range (may be bigger than the view window).\n d.viewFrom = d.viewTo = doc.first;\n d.reportedViewFrom = d.reportedViewTo = doc.first;\n // Information about the rendered lines.\n d.view = [];\n d.renderedView = null;\n // Holds info about a single rendered line when it was rendered\n // for measurement, while not in view.\n d.externalMeasured = null;\n // Empty space (in pixels) above the view\n d.viewOffset = 0;\n d.lastWrapHeight = d.lastWrapWidth = 0;\n d.updateLineNumbers = null;\n\n d.nativeBarWidth = d.barHeight = d.barWidth = 0;\n d.scrollbarsClipped = false;\n\n // Used to only resize the line number gutter when necessary (when\n // the amount of lines crosses a boundary that makes its width change)\n d.lineNumWidth = d.lineNumInnerWidth = d.lineNumChars = null;\n // See readInput and resetInput\n d.prevInput = \"\";\n // Set to true when a non-horizontal-scrolling line widget is\n // added. As an optimization, line widget aligning is skipped when\n // this is false.\n d.alignWidgets = false;\n // Flag that indicates whether we expect input to appear real soon\n // now (after some event like 'keypress' or 'input') and are\n // polling intensively.\n d.pollingFast = false;\n // Self-resetting timeout for the poller\n d.poll = new Delayed();\n\n d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null;\n\n // Tracks when resetInput has punted to just putting a short\n // string into the textarea instead of the full selection.\n d.inaccurateSelection = false;\n\n // Tracks the maximum line length so that the horizontal scrollbar\n // can be kept static when scrolling.\n d.maxLine = null;\n d.maxLineLength = 0;\n d.maxLineChanged = false;\n\n // Used for measuring wheel scrolling granularity\n d.wheelDX = d.wheelDY = d.wheelStartX = d.wheelStartY = null;\n\n // True when shift is held down.\n d.shift = false;\n\n // Used to track whether anything happened since the context menu\n // was opened.\n d.selForContextMenu = null;\n }", "title": "" }, { "docid": "b4cc567983a187e0e4475ebcdadee6eb", "score": "0.566394", "text": "function getDocumentText() {\n\tvar text = \"\";\n\tvar child = document.getElementById(\"editor\").firstChild;\n\twhile (child != null) {\n\t\tif ((child.nodeName.toLowerCase() == \"div\") && (child.getAttribute(\"type\") != null)) {\n\t\t\t//This must be a section\n\t\t\ttext += getSectionText(child);\n\t\t}\n\t\tchild = child.nextSibling;\n\t}\n\tif (dsPHI != 0) text += \"\\n<insert-dataset phi=\\\"yes\\\"/>\\n\";\n\tif (dsNoPHI != 0) text += \"\\n<insert-dataset phi=\\\"no\\\"/>\\n\";\n\ttext += \"</MIRCdocument>\";\n\treturn text;\n}", "title": "" }, { "docid": "650404c4fde935d070d011292c3af726", "score": "0.5654292", "text": "function getSelectedText() {\n var text = \"\";\n if (typeof window.getSelection != \"undefined\") {\n text = window.getSelection().toString();\n sel = window.getSelection();\n rangeOfSelectedText = sel.getRangeAt(0);\n }\n return text;\n}", "title": "" }, { "docid": "99fdadad5bac80dd4650a319616455b3", "score": "0.5635684", "text": "function load() {\n $(\"#textarea\").val(localStorage.getItem(\"savedText\"));\n $(\"#displayarea\").html(localStorage.getItem(\"savedText\"));\n}", "title": "" }, { "docid": "5375fcb00e9a28f3e9f57ce91f2da78f", "score": "0.562575", "text": "function TextEditor() {}", "title": "" }, { "docid": "83eb808044d68b6486572b5c761c19ef", "score": "0.5607011", "text": "function editText() {\n receiverElement.innerText = minder.queryCommandValue('text');\n fsm.jump('input', 'input-request');\n receiver.selectAll();\n }", "title": "" }, { "docid": "4a3872692a7f97cb30dd6fc64c4702bc", "score": "0.55997103", "text": "function fetch_proposal_text(url) {\n chrome.extension.sendRequest({\n 'action' : 'fetch_proposal_text', \n 'url' : url\n }, \n function(response) {\n parse_full_text(response);\n }\n );\n}", "title": "" }, { "docid": "a605dbf39a085e5930e56e4e24b6917b", "score": "0.55946547", "text": "callback() {\n scrollToVarDefn( textEditor, t.name, range );\n }", "title": "" }, { "docid": "630711b4ff756d5203703de0a1a3b4cc", "score": "0.558563", "text": "function renderDocument(){\n $(displayElement).val(treedoc.treeToString(tree));\n}", "title": "" }, { "docid": "b02d64cc60618db5f4c42d9549f1b994", "score": "0.5579274", "text": "get text() { return this._text; }", "title": "" }, { "docid": "fea10246e7e2cdf12adaa75e9883c0c8", "score": "0.55708295", "text": "function saveTextToForm() {\n var content = getText($(\"#textentry\"));\n $(\"#hidden-textarea\").val(content);\n }", "title": "" }, { "docid": "7ea3faa36c8943bfd93292ecc32d1699", "score": "0.55666727", "text": "function showTextFile(){\n\n\t//process text\n formatTextFile(this.response);\n\n}", "title": "" }, { "docid": "95ab3dade6927dc9820b24ff048b3bf4", "score": "0.5540591", "text": "updateText(t) {\n document.getElementById(\"markedText\").innerHTML = t;\n }", "title": "" }, { "docid": "dfafb52be1ef6bdddafbd7e943106036", "score": "0.5538233", "text": "get text () {\n\t\treturn this._text;\n\t}", "title": "" }, { "docid": "bde29bad6a29dda78f65ea9cf19d68db", "score": "0.55259454", "text": "function selectedText(editor) {\n restoreRange(editor);\n if (ie) return getRange(editor).text;\n return getSelection(editor).toString();\n }", "title": "" }, { "docid": "bde29bad6a29dda78f65ea9cf19d68db", "score": "0.55259454", "text": "function selectedText(editor) {\n restoreRange(editor);\n if (ie) return getRange(editor).text;\n return getSelection(editor).toString();\n }", "title": "" }, { "docid": "bde29bad6a29dda78f65ea9cf19d68db", "score": "0.55259454", "text": "function selectedText(editor) {\n restoreRange(editor);\n if (ie) return getRange(editor).text;\n return getSelection(editor).toString();\n }", "title": "" }, { "docid": "a9582ea2bebb51a31c741207105e1c69", "score": "0.55202115", "text": "function __EditGetValue()\n{\n __EditorValue = __textarea.value = __SimpleHTML(cleanNodes(__EditorWindow.document.body.innerHTML));\n if(document.getElementById(__SummaryID))\n {\n if(isNaN(__SummaryLen)){__SummaryLen = 50;}\n var obj = document.getElementById(__SummaryID);\n\tvar text = __EditorValue.replace(/<\\/?[^>]*>|[\\r\\n]/gi, \"\");\n\tobj.value = text.substr(0, __SummaryLen);\n }\n //alert(__EditorValue);\n if(document.getElementById(__ContentID))\n {\n\t document.getElementById(__ContentID).value = __EditorValue;\n }\n return __EditorValue;\n}", "title": "" }, { "docid": "fb6669adf590da963e0cac054c5dfe6c", "score": "0.55181485", "text": "function updateContent(/** @type {string} */ text) {\n\t\tconst translationParts = processText(text);\n\t\tconst enteredText = document.getElementsByTagName('textarea');\n\t\tconst currentSegment= translationParts.translation === null ? '' : translationParts.translation;\n\t\tenteredText[0].value = translationParts.translated;\n\t\tenteredText[1].value = currentSegment;\n\t\tenteredText[2].value = currentSegment;\n\t\tenteredText[3].value = translationParts.remaining;\n\t}", "title": "" }, { "docid": "d15451dc61b6fe3a002e26d339f5d09f", "score": "0.55116844", "text": "substitute() {\n console.log('Fetching code');\n let editor\n if (editor = atom.workspace.getActiveTextEditor()) {\n let selection = editor.getSelectedText(); //this is the highlighted string\n if (selection.length != 0)\n {\n selection = selection.toLowerCase().trim();\n let codeTemplate = this.search(selection)\n if (codeTemplate !== undefined)\n {\n editor.insertText(codeTemplate)\n }\n }\n }\n }", "title": "" }, { "docid": "996a829bdbe12a0c5aad03dd8c9ae09f", "score": "0.55113345", "text": "function get_text(){\n var text = new String(\"\");\n if(window.getSelection()){\n var selection = window.getSelection();\n text = selection.toString().trim().toLowerCase();\n }\n return text;\n}", "title": "" }, { "docid": "573fd6ac43149ee5ab6cbaaa4db8dad2", "score": "0.5510311", "text": "function Display(place, doc) {\r\n var d = this;\n\n // The semihidden textarea that is focused when the editor is\n // focused, and receives input.\n var input = d.input = elt(\"textarea\", null, null, \"position: absolute; padding: 0; width: 1px; height: 1em; outline: none\");\n // The textarea is kept positioned near the cursor to prevent the\n // fact that it'll be scrolled into view on input from scrolling\n // our fake cursor out of view. On webkit, when wrap=off, paste is\n // very slow. So make the area wide instead.\n if (webkit) input.style.width = \"1000px\";\n else input.setAttribute(\"wrap\", \"off\");\n // If border: 0; -- iOS fails to open keyboard (issue #1287)\n if (ios) input.style.border = \"1px solid black\";\n input.setAttribute(\"autocorrect\", \"off\"); input.setAttribute(\"autocapitalize\", \"off\"); input.setAttribute(\"spellcheck\", \"false\");\n\n // Wraps and hides input textarea\n d.inputDiv = elt(\"div\", [input], null, \"overflow: hidden; position: relative; width: 3px; height: 0px;\");\n // Covers bottom-right square when both scrollbars are present.\n d.scrollbarFiller = elt(\"div\", null, \"CodeMirror-scrollbar-filler\");\n d.scrollbarFiller.setAttribute(\"not-content\", \"true\");\n // Covers bottom of gutter when coverGutterNextToScrollbar is on\n // and h scrollbar is present.\n d.gutterFiller = elt(\"div\", null, \"CodeMirror-gutter-filler\");\n d.gutterFiller.setAttribute(\"not-content\", \"true\");\n // Will contain the actual code, positioned to cover the viewport.\n d.lineDiv = elt(\"div\", null, \"CodeMirror-code\");\n // Elements are added to these to represent selection and cursors.\n d.selectionDiv = elt(\"div\", null, null, \"position: relative; z-index: 1\");\n d.cursorDiv = elt(\"div\", null, \"CodeMirror-cursors\");\n // A visibility: hidden element used to find the size of things.\n d.measure = elt(\"div\", null, \"CodeMirror-measure\");\n // When lines outside of the viewport are measured, they are drawn in this.\n d.lineMeasure = elt(\"div\", null, \"CodeMirror-measure\");\n // Wraps everything that needs to exist inside the vertically-padded coordinate system\n d.lineSpace = elt(\"div\", [d.measure, d.lineMeasure, d.selectionDiv, d.cursorDiv, d.lineDiv],\n null, \"position: relative; outline: none\");\n // Moved around its parent to cover visible view.\n d.mover = elt(\"div\", [elt(\"div\", [d.lineSpace], \"CodeMirror-lines\")], null, \"position: relative\");\n // Set to the height of the document, allowing scrolling.\n d.sizer = elt(\"div\", [d.mover], \"CodeMirror-sizer\");\n d.sizerWidth = null;\n // Behavior of elts with overflow: auto and padding is\n // inconsistent across browsers. This is used to ensure the\n // scrollable area is big enough.\n d.heightForcer = elt(\"div\", null, null, \"position: absolute; height: \" + scrollerGap + \"px; width: 1px;\");\n // Will contain the gutters, if any.\n d.gutters = elt(\"div\", null, \"CodeMirror-gutters\");\n d.lineGutter = null;\n // Actual scrollable element.\n d.scroller = elt(\"div\", [d.sizer, d.heightForcer, d.gutters], \"CodeMirror-scroll\");\n d.scroller.setAttribute(\"tabIndex\", \"-1\");\n // The element in which the editor lives.\n d.wrapper = elt(\"div\", [d.inputDiv, d.scrollbarFiller, d.gutterFiller, d.scroller], \"CodeMirror\");\n\n // Work around IE7 z-index bug (not perfect, hence IE7 not really being supported)\n if (ie && ie_version < 8) { d.gutters.style.zIndex = -1; d.scroller.style.paddingRight = 0; }\n // Needed to hide big blue blinking cursor on Mobile Safari\n if (ios) input.style.width = \"0px\";\n if (!webkit) d.scroller.draggable = true;\n // Needed to handle Tab key in KHTML\n if (khtml) { d.inputDiv.style.height = \"1px\"; d.inputDiv.style.position = \"absolute\"; }\n\n if (place) {\r\n if (place.appendChild) place.appendChild(d.wrapper);\n else place(d.wrapper);\r\n }\n\n // Current rendered range (may be bigger than the view window).\n d.viewFrom = d.viewTo = doc.first;\n d.reportedViewFrom = d.reportedViewTo = doc.first;\n // Information about the rendered lines.\n d.view = [];\n d.renderedView = null;\n // Holds info about a single rendered line when it was rendered\n // for measurement, while not in view.\n d.externalMeasured = null;\n // Empty space (in pixels) above the view\n d.viewOffset = 0;\n d.lastWrapHeight = d.lastWrapWidth = 0;\n d.updateLineNumbers = null;\n\n d.nativeBarWidth = d.barHeight = d.barWidth = 0;\n d.scrollbarsClipped = false;\n\n // Used to only resize the line number gutter when necessary (when\n // the amount of lines crosses a boundary that makes its width change)\n d.lineNumWidth = d.lineNumInnerWidth = d.lineNumChars = null;\n // See readInput and resetInput\n d.prevInput = \"\";\n // Set to true when a non-horizontal-scrolling line widget is\n // added. As an optimization, line widget aligning is skipped when\n // this is false.\n d.alignWidgets = false;\n // Flag that indicates whether we expect input to appear real soon\n // now (after some event like 'keypress' or 'input') and are\n // polling intensively.\n d.pollingFast = false;\n // Self-resetting timeout for the poller\n d.poll = new Delayed();\n\n d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null;\n\n // Tracks when resetInput has punted to just putting a short\n // string into the textarea instead of the full selection.\n d.inaccurateSelection = false;\n\n // Tracks the maximum line length so that the horizontal scrollbar\n // can be kept static when scrolling.\n d.maxLine = null;\n d.maxLineLength = 0;\n d.maxLineChanged = false;\n\n // Used for measuring wheel scrolling granularity\n d.wheelDX = d.wheelDY = d.wheelStartX = d.wheelStartY = null;\n\n // True when shift is held down.\n d.shift = false;\n\n // Used to track whether anything happened since the context menu\n // was opened.\n d.selForContextMenu = null;\r\n }", "title": "" }, { "docid": "969393f3c737bad0d4c13c144d3fb914", "score": "0.5506115", "text": "function getTextRange() {\n let doc = (document.getElementById(\"textFrame\").contentDocument) ? document.getElementById(\"textFrame\").contentDocument : document.getElementById(\"textFrame\").contentWindow.document;\n let el = doc.getElementById(\"text\");\n let range = rangy.createRange();\n range.selectNodeContents(el);\n return range;\n }", "title": "" }, { "docid": "51db8b046d7d307349ebbeae4e83e6d1", "score": "0.5501163", "text": "async getText() {\n return (await this._content()).text();\n }", "title": "" }, { "docid": "5eeff5d9e6f9eb5123006c8312379443", "score": "0.5483572", "text": "function onFileLoaded(doc) {\n var collaborativeString = doc.getModel().getRoot().get('demo_string');\n wireTextBoxes(collaborativeString);\n }", "title": "" }, { "docid": "07676262456d4114ed98cc5b974b4cc5", "score": "0.5476795", "text": "string(editor, at) {\n var range = Editor.range(editor, at);\n var [start, end] = Range.edges(range);\n var text = '';\n\n for (var [node, path] of Editor.nodes(editor, {\n at: range,\n match: Text.isText\n })) {\n var t = node.text;\n\n if (Path.equals(path, end.path)) {\n t = t.slice(0, end.offset);\n }\n\n if (Path.equals(path, start.path)) {\n t = t.slice(start.offset);\n }\n\n text += t;\n }\n\n return text;\n }", "title": "" }, { "docid": "3e40362c977dce4e170ac680f603c8ad", "score": "0.54728055", "text": "function get() {\n\t\t\treturn output.text;\n\t\t}", "title": "" }, { "docid": "bdb349a284c0bb179d34a0d4e91aaf15", "score": "0.5470299", "text": "function storyTextFieldArea2()\n{\n var v=document.getElementById(\"mobileScreenTextArea\").value;\n console.log(v);\n document.getElementById(\"storyPrintSectionArea\").innerHTML=v;\n txt=v;\n}", "title": "" }, { "docid": "c2d2e7f3b9a91604d3a1658caf50dc6a", "score": "0.5468974", "text": "function setInfoText(){\n const selectedTextTitle = document.getElementById(\"selected-text-title\");\n const selectedTextInfo = document.getElementById(\"selected-text-info\");\n const text = texts.find(t => t.title == selector.value);\n const wordCount = text.text.split(\" \").length;\n selectedTextTitle.innerHTML = text.title;\n selectedTextInfo.innerHTML = text.author + \" (\" + wordCount + \" ord, \" + \n chars.length + \" tecken)\"\n}", "title": "" }, { "docid": "17031a059773b2af499d0b775b42a109", "score": "0.5444661", "text": "function display(){\n fetch(CreateURL(inputText.value))\n .then(response=>response.json())\n .then(json=>{result.innerText=json.contents.translated})\n .catch(errorHandler);\n\n}", "title": "" }, { "docid": "5020e79c7428f98fbbb30697c0c4717d", "score": "0.5441388", "text": "function smartify(info, tab) {\n\n var returnText = translateParagraph(info.selectionText);\n\n}", "title": "" }, { "docid": "bff72e01aea5c6e6201300e2d2303ab3", "score": "0.5440784", "text": "function getText() {\n chrome.tabs.query({active: true, currentWindow: true}, function (tabs) {\n var activeTab = tabs[0];\n const scriptToExec = `(${scrapeThePage})()`;\n const text = chrome.tabs.executeScript(activeTab.id, {code: scriptToExec}, processText);\n });\n}", "title": "" }, { "docid": "42ca31d0f80f5ead05fc65583f3766b8", "score": "0.5426506", "text": "function postToEditor(){\r\n\teditor.html(extractToText(thisElement.val()));\r\n}", "title": "" }, { "docid": "b332cbf10e1e4c200bc93b1faeb070ce", "score": "0.5420797", "text": "function getUserTextarea(){\n return $editorPanel.find(\"textarea.usertext\");\n }", "title": "" }, { "docid": "e3c5f5bc7448af3c888c09d057cd9096", "score": "0.5412065", "text": "function ShowTextPoint(oTP)\r\n{\r\n\ttry\r\n\t{\r\n\t\tif (!oTP.Parent.Parent.ProjectItem.IsOpen)\r\n\t\t{\r\n\t\t\tvar window = oTP.Parent.Parent.ProjectItem.Open();\r\n\t\t\tif (window != null)\r\n\t\t\t\twindow.visible = true;\r\n\t\t}\r\n\t\tvar oSel = null;\r\n\t\toSel = oTP.Parent.Selection;\r\n\t\toSel.MoveToPoint(oTP);\r\n\t\toSel.ActivePoint.TryToShow(vsPaneShowHow.vsPaneShowAsIs);\r\n\t}\r\n\tcatch (e)\r\n\t{\r\n\t\tthrow (e);\r\n\t}\r\n}", "title": "" }, { "docid": "199f0d55405fad5d1b2dd6af1bbab631", "score": "0.5411342", "text": "getText() {\n return this._text;\n }", "title": "" }, { "docid": "290a2ab5b7a29df9097b9ef8530324ff", "score": "0.54091734", "text": "get text() {\n\t\treturn this.__text;\n\t}", "title": "" }, { "docid": "a195d96234cbc3071c9bc04c7c2425a1", "score": "0.54051864", "text": "get text() {\n return this._text;\n }", "title": "" }, { "docid": "2f65eaef37642287ce2428eb5f5b426a", "score": "0.5401441", "text": "function update_displayed_text_art() {\n const textarea = $('section.index .ascii-text-output textarea[name=\"output\"]');\n const resize_div = $('section.index #ascii-text-output-resize-textarea');\n textarea.text(generated_text_ascii[$('section.index .ascii-text-output #select-method').val()]);\n textarea.css({'width': '100%'});\n resize_div.width(0).css({'width': 'unset', 'max-width': textarea[0].scrollWidth + 2});\n if ($('section.index .wrapper').width() > resize_div.width()) {\n textarea.height(0).height(textarea[0].scrollHeight - 20);\n } else {\n textarea.height(0).height(textarea[0].scrollHeight - 3);\n }\n\n\n window.scrollBy(0, document.body.scrollHeight);\n }", "title": "" }, { "docid": "2cdca926895f0df8c863db699debb752", "score": "0.53921664", "text": "function updateWordBox(ui) {\n var drag_item = $(ui);\n var drag_item_data = drag_item.attr('data-display-text');\n\n //this is where the wording goes\n $('.box').html('<p><strong>' + drag_item_data + '</p></strong>').show();\n }", "title": "" }, { "docid": "8cab82e23b0b5d0878a1a2dfea3c07af", "score": "0.53893167", "text": "function getDataFromSelection() {\n\t\tOffice.context.document.getSelectedDataAsync(Office.CoercionType.Text,\n\t\t\tfunction (result) {\n\t\t\t\tif (result.status === Office.AsyncResultStatus.Succeeded) {\n\t\t\t\t\tvar output = js_beautify(result.value);\n\t\t\t\t\t$(\"#code1\").text(output);\n var codeFather = document.querySelector('.dp-highlighter');\n \n if(codeFather != null){\n codeFather.parentNode.removeChild(codeFather);\n }\n \n\t\t\t\t\tdp.SyntaxHighlighter.HighlightAll('code', true,false);\n var htmlContent = SetStyle(document.querySelector('.dp-highlighter'));\n \n var content = \"\";\n var type = 'html';\n if(document.querySelector('#withStyle').checked){\n content = htmlContent;\n type = 'html';\n }\n else{\n content = output;\n type = 'text';\n }\n if(!document.querySelector('#noreplace').checked){\n Office.context.document.setSelectedDataAsync(content, {coercionType: type}, function (asyncResult) {\n app.showNotification(asyncResult.error.message);\n });\n }\n\t\t\t\t} else {\n\t\t\t\t\tapp.showNotification('Error:', result.error.message);\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}", "title": "" }, { "docid": "2e72a8a1766bdd3638cc4f886934adae", "score": "0.5384175", "text": "function getEditorCode(){\n\tvar editorContent = editor.getValue();\n\tdocument.getElementsByClassName(\"code_input\").value = editorContent;\n}", "title": "" }, { "docid": "136f0b97a3f4e9bb1ed068e3240f2ad5", "score": "0.5382864", "text": "function changeSampleText() {\n preview.innerHTML = document.getElementById(\"sampletext\").value;\n}", "title": "" }, { "docid": "06c1baca56d8d0aa894e46f5f9f0253a", "score": "0.53781444", "text": "setSelectionText() {\n SelectionUtil.checkValidTextSelection();\n if (!SelectionUtil.currentSelection.containerNode) {\n SelectionUtil.setContainerNode();\n }\n let selection = SelectionUtil.currentSelection;\n var startOffset = SelectionUtil.getTrimmedOffset(selection.startNode, selection.startOffset);\n var endOffset = SelectionUtil.getTrimmedOffset(selection.endNode, selection.endOffset);\n let textNodes = RDFaUtil.getRDFaTextNodesExtended(selection.containerNode)\n let ignoreNodes = RDFaUtil.getRDFaIgnoreNodes(selection.containerNode);\n if (ignoreNodes.length === 0)\n return true; // no ignore nodes in selection, no changes needed\n var include = false;\n var textChunks = [];\n var unfilteredText = selection.selectionText;\n selection.selectionText = \"\";\n textNodes.forEach((textNode) => {\n var displayText = DOMUtil.getTextNodeDisplayText(textNode.node);\n let startNodePosition = selection.startNode.compareDocumentPosition(textNode.node)\n let startNodePreceeds = startNodePosition & Node.DOCUMENT_POSITION_FOLLOWING;\n let endNodePosition = selection.endNode.compareDocumentPosition(textNode.node)\n let endNodePreceeds = endNodePosition & Node.DOCUMENT_POSITION_FOLLOWING;\n if (selection.startNode === textNode.node || startNodePreceeds) {\n include = true;\n }\n if (selection.startNode === textNode.node) {\n displayText = displayText.substr(startOffset);\n }\n if (selection.endNode === textNode.node) {\n displayText = displayText.substr(0, endOffset);\n }\n if (include){\n if (textNode.ignore) {\n let ignoreOffset = unfilteredText.indexOf(displayText);\n selection.selectionText += unfilteredText.substr(0, ignoreOffset);\n let chunkLength = ignoreOffset + displayText.length;\n unfilteredText = unfilteredText.substr(chunkLength);\n } else {\n let chunkLength = unfilteredText.indexOf(displayText.trim()) + displayText.trim().length;\n selection.selectionText += unfilteredText.substr(0, chunkLength);\n unfilteredText = unfilteredText.substr(chunkLength);\n }\n textChunks.push(displayText.trim());\n }\n if (selection.endNode === textNode.node || endNodePreceeds) {\n include = false;\n }\n });\n // if there is any trailing whitespace in the unfiltered text, move it to the filtered text\n selection.selectionText += unfilteredText;\n }", "title": "" }, { "docid": "aec1f7abaae9257ca6a1e68940a50ac5", "score": "0.5371208", "text": "getInputText() {\n var cursor = this.sourceEditor.getPosition();\n var text = this.sourceEditor.getLine(cursor.row).slice(0, cursor.column);\n // console.log(\"input text:\" + text);\n var matches = text.match(/[a-zA-Z_0-9\\$]*$/);\n if (matches && matches[0])\n return matches[0];\n else\n return \"\";\n }", "title": "" }, { "docid": "0c8c6c5ab4a5c5ae7e95ef20eec64142", "score": "0.5369951", "text": "function add_content ( contenu , div ){\r\n\r\n\tvar zone = document.getElementById('edit' + div ).document.selection.createRange();\r\n\tvar selection = zone.txt;\r\n\tif ( selection != undefined ){\r\n\t\tzone.text += contenu;\r\n\t}\r\n\telse{\r\n\t\tdocument.getElementById('edit' + div ).innerHTML += contenu;\r\n\t}\r\n\r\n}", "title": "" }, { "docid": "0aa2bf9f24ac2044610a94249e3eb5e9", "score": "0.5368558", "text": "function updateEditAnnotationText() {\n var selAnn = getSelectedDBAnnotation();\n if (selAnn) {\n selAnn.note.title = $(\"#edit-annotation-panel #annotation-title\").val();\n selAnn.note.label = $(\"#edit-annotation-panel #annotation-label\").val();\n }\n\n renderAllAnnotations(true);\n}", "title": "" }, { "docid": "df9d6e032bc3e4c35d4a2d18242b0a49", "score": "0.5367302", "text": "function getContentEditableText(element) {\n let doc = element.ownerDocument;\n let range = doc.createRange();\n range.selectNodeContents(element);\n let encoder = FormAssistant.documentEncoder;\n encoder.setRange(range);\n return encoder.encodeToString();\n}", "title": "" }, { "docid": "0222df934c2957735b031781fd4cd20b", "score": "0.5362658", "text": "function openWhat(){\r\n Element.show('plan_what_editor');\r\n expandTextArea($('plan_description'));\r\n editor_open=true;\r\n}", "title": "" }, { "docid": "c233d86e22617e7842ce09ef9ed3b700", "score": "0.53586066", "text": "function parse_full_text(response){\n //var textHTML = $.parseHTML(response);\n /*text_html = $(response).find(\"#fileRendered\")[0].innerHTML;\n \n for (var i=0; i < $(text_html).filter(\".pydocx-center\").length; i++){\n console.log($(text_html).filter(\".pydocx-center\")[i]);\n }*/\n\n console.log(response);\n}", "title": "" }, { "docid": "714690709e09544f0d1c170183bbef4c", "score": "0.5357801", "text": "function getDataFromSelection() {\n Office.context.document.getSelectedDataAsync(Office.CoercionType.Text,\n function (result) {\n if (result.status === Office.AsyncResultStatus.Succeeded) {\n \tvar text = result.value;\n \tvar hyperlink = '<a href=\"http://www.bing.com/search?q=' + text + '\">' + text + '</a>';\n \tsetDataSelection(hyperlink);\n } else {\n app.showNotification('Error:', result.error.message);\n }\n }\n );\n }", "title": "" }, { "docid": "1702698030a5f4f7bf2a97916702e122", "score": "0.53553957", "text": "function getTextEditor(el) {\n\t\tif (!el.textEditor) {\n\t\t\tvar editorType = el.readAttribute('riot:editorType');\n\t\t\tvar content = findContent(el);\n\t\t\tif (editorType == 'text') {\n\t\t\t\tel.textEditor = new riot.InplaceTextEditor(el, content, {\n\t\t\t\t\ttextTransform: el.readAttribute('riot:textTransform') == 'true'\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (editorType == 'textarea') {\n\t\t\t\tel.textEditor = new riot.PopupTextEditor(el, content, {useInnerHtmlAsDefault: true});\n\t\t\t}\n\t\t\tif (editorType == 'richtext') {\n\t\t\t\tel.textEditor = new riot.RichtextEditor(el, content, {useInnerHtmlAsDefault: true, config: el.readAttribute('riot:config')});\n\t\t\t}\n\t\t\tif (editorType == 'richtext-chunks') {\n\t\t\t\tel.textEditor = new riot.RichtextEditor(el, content, {split: true, useInnerHtmlAsDefault: true, config: el.readAttribute('riot:config')});\n\t\t\t}\n\t\t}\n\t\treturn el.textEditor;\n\t}", "title": "" }, { "docid": "774a8e6c1f5f1931f1c4b0b7582053c4", "score": "0.53542054", "text": "resolveCustomTextEditor(document, webviewPanel, _token) {\n return __awaiter(this, void 0, void 0, function* () {\n //\n // setup initial content for the webview:\n //\n webviewPanel.webview.options = {\n enableScripts: true,\n };\n webviewPanel.webview.html = this.getWebviewContent(webviewPanel.webview, document.uri, true);\n //\n // function to synchronize webview with document:\n //\n function updateWebview() {\n webviewPanel.webview.postMessage({\n type: 'update',\n text: document.uri,\n });\n }\n //\t\n // hook up event handlers so that we can synchronize the webview with the text document:\n //\n // 1. wiring to uodate webview on document change:\n //\n const changeDocumentSubscription = vscode.workspace.onDidChangeTextDocument(e => {\n if (e.document.uri.toString() === document.uri.toString()) {\n updateWebview();\n }\n });\n // \n // 2. wiring to dispose of the listener when editor is closed:\n //\n webviewPanel.onDidDispose(() => {\n changeDocumentSubscription.dispose();\n });\n // \n // 3. wiring to receive messages from webview:\n //\n webviewPanel.webview.onDidReceiveMessage(e => {\n switch (e.type) {\n case 'add':\n vscode.window.showInformationMessage('onDidReceiveMessage');\n return;\n }\n });\n //\n // show document in webview:\n //\n updateWebview();\n });\n }", "title": "" }, { "docid": "21b614d7eb489bb049cda3b738e9084a", "score": "0.53524154", "text": "function gotContent(data){\r\n let page = data.query.pages; \r\n //console.log(page);\r\n let pageID = Object.keys(data.query.pages)[0];\r\n console.log(pageID);\r\n\r\n let content = page[pageID].revisions[0][\"*\"];\r\n startOfContentChar = \"'''\"\r\n startCharIndex = content.search(startOfContentChar) + 3;\r\n console.log(startCharIndex);\r\n endCharIndex = startCharIndex + 200 + 1;\r\n description = content.substring(startCharIndex, endCharIndex) + '...'\r\n document.getElementById('contentDisplay').innerHTML =description;\r\n //console.log(content); \r\n // access summary brute force \r\n //let summary = page[pageID].revisions[0][\"*\"][10];\r\n //console.log('SUMMARY' + summary);\r\n\r\n list = [], i = -1;\r\n while((i=content.indexOf(startOfContentChar,i+1)) >= 0) ;list.push(i);\r\n console.log(list);\r\n }", "title": "" }, { "docid": "2db0a30abe3ba6cddef58fca6826407d", "score": "0.53475034", "text": "function getText() {\n fetch('demo.txt')\n .then(function (data) {\n return data.text();\n })\n .then(function (data) {\n document.getElementById('text').innerHTML = `<p class=\"mt-3 p-3 bg-light\">${data}</p>`;\n })\n .catch(function (err) {\n document.getElementById('text').innerHTML = err;\n\n })\n}", "title": "" }, { "docid": "58c75eb2ec81ef1be6b1bc0dad0c0973", "score": "0.5347115", "text": "function update_buffer() {\n\n\n\tworkspace[get_index_from_title(active_file.title)].contents = editor.getValue();\n\t// Find the approprate file in the workspace\n}", "title": "" }, { "docid": "775c0331d64c60194f6a6af9991b33bb", "score": "0.53433174", "text": "function file_code(path){\n\tvar type = {\n \"srt\": \"srt\",\n \"txt\": \"Text\",\n\t};\n\tvar name = path.split('/').pop();\n\tvar ext = name.split('.').pop();\n\tvar href = window.location.origin + path;\n\tvar content = `\n<div class=\"mdui-container\">\n<pre id=\"editor\" height=80vh></pre>\n</div>\n\n<script src=\"https://cdn.staticfile.org/ace/1.4.7/ace.js\"></script>\n<script src=\"https://cdn.staticfile.org/ace/1.4.7/ext-language_tools.js\"></script>\n\t`;\n\t$('#content').html(content);\n\t\n\t$.get(path, function(data){\n\t\t$('#editor').html($('<div/>').text(data).html());\n\t\tvar code_type = \"Text\";\n\t\tif(type[ext] != undefined ){\n\t\t\tcode_type = type[ext];\n\t\t}\n\t\tvar editor = ace.edit(\"editor\");\n\t editor.setTheme(\"ace/theme/ambiance\");\n\t editor.setFontSize(13);\n\t editor.session.setMode(\"ace/mode/\"+code_type);\n\t editor.session.setUseWrapMode(true);\n\n\t //Autocompletion\n\t editor.setOptions({\n\t enableBasicAutocompletion: true,\n\t\tautoScrollEditorIntoView: true,\n\t enableSnippets: true,\n\t enableLiveAutocompletion: true,\n\t\t//\n\t\tmaxLines: 40\n\t\t//\n\t });\n\t});\n}", "title": "" }, { "docid": "5736032bb8c5a49007a0271d167df53c", "score": "0.5336158", "text": "function readViewText() {\n\t\t\t\tvar html = element.html()\n\t\t\t\t// When we clear the content editable the browser leaves a <br> behind\n\t\t\t\t// If strip-br attribute is provided then we strip this out\n\t\t\t\tif (attrs.stripBr && html === '<br>') {\n\t\t\t\t\thtml = ''\n\t\t\t\t}\n\t\t\t\tngModel.$setViewValue(html)\n\t\t\t}", "title": "" }, { "docid": "c8c91147fec4bda1a7d16f49b65bde39", "score": "0.5332638", "text": "onEditorChange() {\n // If the handler is in standby mode, bail.\n if (this._standby) {\n return;\n }\n const editor = this.editor;\n if (!editor) {\n return;\n }\n const text = editor.model.value.text;\n const position = editor.getCursorPosition();\n const offset = _jupyterlab_coreutils__WEBPACK_IMPORTED_MODULE_0__[\"Text\"].jsIndexToCharIndex(editor.getOffsetAt(position), text);\n const update = { content: null };\n const pending = ++this._pending;\n void this._connector\n .fetch({ offset, text })\n .then(reply => {\n // If handler has been disposed or a newer request is pending, bail.\n if (this.isDisposed || pending !== this._pending) {\n this._inspected.emit(update);\n return;\n }\n const { data } = reply;\n const mimeType = this._rendermime.preferredMimeType(data);\n if (mimeType) {\n const widget = this._rendermime.createRenderer(mimeType);\n const model = new _jupyterlab_rendermime__WEBPACK_IMPORTED_MODULE_1__[/* MimeModel */ \"a\"]({ data });\n void widget.renderModel(model);\n update.content = widget;\n }\n this._inspected.emit(update);\n })\n .catch(reason => {\n // Since almost all failures are benign, fail silently.\n this._inspected.emit(update);\n });\n }", "title": "" }, { "docid": "ee555c16c7583da6f3029267f4a73189", "score": "0.5329414", "text": "get text() {\n return `${this.body} ${this.lastWord}`\n }", "title": "" }, { "docid": "2de4201e74d0c0954145e2484afea63c", "score": "0.53282875", "text": "function performAnnotate() {\n\n // //update the extension text\n // let script = 'document.getSelection().toString()';\n // let annotation;\n // // See https://developer.chrome.com/extensions/tabs#method-executeScript.\n // // chrome.tabs.executeScript allows us to programmatically inject JavaScript\n // // into a page. Since we omit the optional first argument \"tabId\", the script\n // // is inserted into the active tab of the current window, which serves as the\n // // default.\n // let executeScriptPromise = chrome.tabs.executeScript({\n // code: script\n // }, function (response){\n // document.getElementById(\"quoteText\").innerHTML=response[0];\n // annotation = prompt(\"enter your annotation\");\n // document.getElementById(\"annotationText\").innerHTML=annotation;\n // return annotation;\n // });\n\n var annotation = prompt(\"enter your annotation\");\n //document.getElementById(\"annotationText\").innerHTML = annotation;\n return annotation;\n}", "title": "" }, { "docid": "080e24ba2fff72b0371252450698592f", "score": "0.53277117", "text": "function displayWord(word) {\n let previewWord = document.createElement(\"p\");\n previewWord.innerText = word;\n document.querySelector(\".madLibsEdit\").appendChild(previewWord);\n }", "title": "" } ]
6ba9938d147cadec4f18cea1fe3eaf58
xObjArr is the source array of anon objects xKeys = ['region','country','city'] xValues = ['Europe','France','Paris']
[ { "docid": "77191f8b00b1184600772dc352b53410", "score": "0.5484398", "text": "function aggro(xObjArr, xKeys, xAggro) {\r\n let obj = {};\r\n for (let y = 0; y < xObjArr.length; y++) {\r\n let xValues = [];\r\n for (let i = 0; i < xKeys.length; i++) {\r\n xValues.push(xObjArr[y][xKeys[i]]);\r\n }\r\n let categories = Object.values(xObjArr[y]);\r\n let val = parseFloat(xObjArr[y][xAggro]);\r\n aggregate_constructively(obj, xValues, val, 0);\r\n }\r\n return obj;\r\n}", "title": "" } ]
[ { "docid": "8f6826dd9a82b2b72332455abee25dcb", "score": "0.58330196", "text": "function _obj(xys) {\n var o = {};\n for (var i = 0; i < xys.length; i++)\n o[xys[i][0]] = xys[i][1];\n return o;\n }", "title": "" }, { "docid": "06651eb4d4243198b0d80c66cf69e1e8", "score": "0.55802166", "text": "getxAxisValues(data) {\n let datax = [];\n let dictXValue = {};\n for (let i = 0; i < data.length; i++) {\n let dataArray = data[i];\n for (let i = 0; i < dataArray.length; i++) {\n let dataObj = dataArray[i];\n if (dictXValue[dataObj.xValue] !== 1) {\n datax.push(dataObj.xValue);\n }\n dictXValue[dataObj.xValue] = 1;\n }\n }\n return datax;\n }", "title": "" }, { "docid": "6e380ca82d48cf1b49828c83ed1cf5b5", "score": "0.540487", "text": "function myFilter (arr) {\n\n console.log (\"its working up to here\")\n \n columntoFilter.forEach((filter) => {\n console.log(filter); \n \n \n Object.entries(filter).forEach(([key, value]) => {\n var x = key\n var y = value\n console.log(x);\n console.log(y);\n });\n });\n\n }", "title": "" }, { "docid": "9a71c457c752e71c8f6e81a9b59e0505", "score": "0.5316269", "text": "function bzConvertSous(obj){\n //acc or transact etc ....\n //console.log(\"obj\",obj)\n var ebzObj =obj[Object.keys(obj)[0]];\n //convert element no Array (1 elment ds le xml) en array\n ////console.log(\"ebzObj\",ebzObj)\n try{\n $.each(ebzObj,function(i,e){\n if(typeof(e)!=\"object\" || i==\"optimiz\" || i==\"securiz\") return;\n \n //console.log(\"e\",e['observations'])\n //console.log(\"i\",i)\n \n if(!Handlebars.Utils.isArray(e[0])){\n return;\n if(e){\n e.element=[e];\n }\n }\n })\n }catch(error){\n \n }\n}", "title": "" }, { "docid": "acc15a2d7ce4ab5e39947b2fa36819fa", "score": "0.522376", "text": "arrayAsValues(dataArray) {\n return dataArray.map((y, ix) => {\n return { x: ix, y }\n })\n }", "title": "" }, { "docid": "7e013254c13bb69607338122d23ec6d4", "score": "0.5193683", "text": "function convertToxy(country_name, layer) {\n var data;\n var factor = 1;\n switch (layer) {\n case 'pop_layer':\n data = pop_density;\n factor = 1;\n break;\n case 'co2_layer':\n data = co2_density;\n break;\n case 'gdp_layer':\n data = gdp_density;\n break;\n default:\n data = pop_density;\n break;\n }\n\n var property = data.filter(function (f) {\n return f.Country_Name == country_name;\n });\n\n var start_year = 1960;\n var end_year = 2016;\n var xyObjArr = [];\n var Obj = {};\n\n if (property != undefined && property.length > 0) {\n for (var i = start_year; i <= end_year; i++) {\n var value = property[0][i];\n if (value != undefined && value.length > 0) {\n Obj[\"year\"] = i;\n Obj[\"value\"] = Number(value) / factor;\n xyObjArr.push(Obj);\n Obj = {};\n }\n }\n }\n\n return xyObjArr;\n}", "title": "" }, { "docid": "82a31f2db377a1adceae44b44c8c88e7", "score": "0.51434946", "text": "static arrayExtract(data,propertyNames){const result=[];for(const item of Tools.arrayMake(data)){const newItem={};for(const propertyName of Tools.arrayMake(propertyNames))if(item.hasOwnProperty(propertyName))newItem[propertyName]=item[propertyName];result.push(newItem)}return result}", "title": "" }, { "docid": "f1ce8c3df3c446a2045c9a1ff3bef0b8", "score": "0.5124871", "text": "function createDataArray(obj, is_binary) {\r\n\tvar foo = '[';\r\n\tvar size = obj.size() - 1;\r\n\r\n\tfor (var i = size; i >= 0; i--) {\r\n\t\tvar time = obj.get(i).time;\r\n\t\tvar value = obj.get(i).value;\r\n\t\tif (is_binary)\r\n\t\t\tvalue = String(value) == \"true\" ? 1 : 0;\r\n\r\n\t\tfoo += '{\"x\":' + time + ',';\r\n\t\tfoo += '\"y\":\"' + value + '\"}';\r\n\t\t\r\n\t\tif (i != 0) {\r\n\t\t\tfoo += ',';\r\n\t\t}\r\n\t}\r\n\t\r\n\tfoo += ']';\r\n\treturn foo;\r\n}", "title": "" }, { "docid": "d5bf218b7d2de12e5e16a57fb65b9e0f", "score": "0.51086897", "text": "function collect_values(obj,keys){\n\t\tvar new_arr = [];\n\t\tfor (var k in obj) {\n\t\t\tif ((obj.hasOwnProperty(k)) && (keys.indexOf(k) != -1)) {\n\t\t\t\tnew_arr.push(obj[k].value);\n\t\t\t}\n\t\t}\n\t\treturn new_arr;\n\t}", "title": "" }, { "docid": "ccd072ff93961c957169d47090f102c5", "score": "0.5090501", "text": "generateCountryList(finalData) {\n this.countryList = Object.keys(finalData).map((item) => {\n return { label: item, value: item };\n });\n }", "title": "" }, { "docid": "e453f56bb9a96af5a238448d827d09fa", "score": "0.506018", "text": "function srvcObj(obj) {\n var megaports = {};\n if (typeof obj != 'object') return [];\n obj.map(function (e) {\n e.megaports.map(function (m) {\n megaports[m.productUid] = m;\n });\n });\n var arr = Object.keys(megaports).map(function (key) {\n return megaports[key];\n });\n return arr;\n }", "title": "" }, { "docid": "6595936a6a170a27e3e0b93aa4f070f8", "score": "0.5054662", "text": "function objToArray(obj){\n\t\tvar dataArray = new Array;\n\t\tfor(var i in obj) {\n\t\t dataArray.push([new Date(i),obj[i]]);\n\t\t}\n\t\treturn dataArray;\n\t}", "title": "" }, { "docid": "651b6b8df581056c33177b80d7d4e9b2", "score": "0.5021026", "text": "function objToArray(item, index) {\n \n var temp = [item.id, item.cen_name, item.cen_description, item.cen_email, item.cen_pno, item.cen_address];\n return temp;\n}", "title": "" }, { "docid": "a22cb96736e5e8565a03c39ca9c8292f", "score": "0.49895257", "text": "function convertObjectForStackBar(dataObj, x_axis, txnDate, locationDes, amount) {\n\tvar convertedJSON = {\n\t\tdata: []\n\t};\n\tvar tempJSON = {};\n\tvar tempDateArray = [];\n\tvar tempDescArray = [];\n\tvar tempAmountArray = [];\n\tvar othersDateArray = [];\n\tvar othersDescArray = [];\n\tvar othersAmountArray = [];\n\tfor (var i = 0; i < dataObj.length; i++) {\n\t\tx_axis.push(dataObj[i][txnDate]);\n\t\tvar dataArray = dataObj[i];\n\t\tdataArray[locationDes] = null === dataArray[locationDes] ? '-' : dataArray[locationDes];\n\t\tif ('-' !== dataArray[locationDes]) {\n\t\t\tif (Array.isArray(dataArray[locationDes])) {\n\t\t\t\tvar tempAmount = 0;\n\t\t\t\tfor (var indx = 0; indx < dataArray[locationDes].length; indx++) {\n\t\t\t\t\tif (indx < 5) {\n\t\t\t\t\t\ttempDateArray.push(dataArray[txnDate]);\n\t\t\t\t\t\ttempDescArray.push(dataArray[locationDes][indx].toUpperCase());\n\t\t\t\t\t\tif (null != dataArray[amount]) {\n\t\t\t\t\t\t\ttempAmountArray.push(Number(parseFloat(dataArray[amount][indx])).toString());\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttempAmountArray.push(Number(parseFloat(0)).toString());\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (null != dataArray[amount]) {\n\t\t\t\t\t\t\ttempAmount += Number(parseFloat(dataArray[amount][indx]));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (indx == dataArray[locationDes].length - 1) {\n\t\t\t\t\t\t\tothersDateArray.push(dataArray[txnDate]);\n\t\t\t\t\t\t\tothersDescArray.push(\"Others\");\n\t\t\t\t\t\t\tothersAmountArray.push(Number(parseFloat(tempAmount)).toString());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\ttempDateArray.push(dataArray[txnDate]);\n\t\t\t\ttempDescArray.push(dataArray[locationDes].toUpperCase());\n\t\t\t\ttempAmountArray.push(parseFloat(dataArray[amount]).toString());\n\t\t\t}\n\t\t}\n\t}\n\ttempDateArray = iterateArrOverArr(othersDateArray, tempDateArray);\n\ttempDescArray = iterateArrOverArr(othersDescArray, tempDescArray);\n\ttempAmountArray = iterateArrOverArr(othersAmountArray, tempAmountArray);\n\ttempJSON[txnDate] = tempDateArray;\n\ttempJSON[locationDes] = tempDescArray;\n\ttempJSON[amount] = tempAmountArray;\n\tconvertedJSON.data.push(tempJSON);\n\treturn convertedJSON;\n}", "title": "" }, { "docid": "789cdbb32b0bddbd12a912294458e594", "score": "0.4970872", "text": "function convertObjectForServiceStackBar(dataObj, x_axis, txnDate, locationDes, amount) {\n\tvar convertedJSON = {\n\t\tdata: []\n\t};\n\tvar tempJSON = {};\n\tvar tempDateArray = [];\n\tvar tempDescArray = [];\n\tvar tempAmountArray = [];\n\tfor (var i = 0; i < dataObj.length; i++) {\n\t\tx_axis.push(dataObj[i][txnDate]);\n\t\tvar dataArray = dataObj[i];\n\t\tdataArray[locationDes] = null === dataArray[locationDes] ? '-' : dataArray[locationDes];\n\t\tif ('-' !== dataArray[locationDes]) {\n\t\t\tif (Array.isArray(dataArray[locationDes])) {\n\t\t\t\tvar tempAmount = 0;\n\t\t\t\tfor (var indx = 0; indx < dataArray[locationDes].length; indx++) {\n\n\t\t\t\t\ttempDateArray.push(dataArray[txnDate]);\n\t\t\t\t\ttempDescArray.push(dataArray[locationDes][indx].toUpperCase());\n\t\t\t\t\tif (null != dataArray[amount]) {\n\t\t\t\t\t\ttempAmountArray.push(Math.abs(parseInt(dataArray[amount][indx])).toString());\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttempAmountArray.push(Math.abs(parseInt(0)).toString());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\ttempDateArray.push(dataArray[txnDate]);\n\t\t\t\ttempDescArray.push(dataArray[locationDes].toUpperCase());\n\t\t\t\ttempAmountArray.push(Math.abs(parseInt(dataArray[amount])).toString());\n\t\t\t}\n\t\t}\n\t}\n\ttempJSON[txnDate] = tempDateArray;\n\ttempJSON[locationDes] = tempDescArray;\n\ttempJSON[amount] = tempAmountArray;\n\tconvertedJSON.data.push(tempJSON);\n\treturn convertedJSON;\n}", "title": "" }, { "docid": "5de6924852fc9e9d1004aa5c2a8850b0", "score": "0.49622202", "text": "function parseDataByCountry(data){\n\n console.log(data);\n\n var obj = [];\n\n for(var j = 0; j < data.length; j++)\n {\n if(IsSelectedCountry(data[j][\"LOCATION\"])){\n \n //consturct and add that new object \n var newObj = {};\n newObj[\"LOCATION\"] = data[j][\"LOCATION\"];\n newObj[\"SUBJECT\"] = data[j][\"SUBJECT\"];\n newObj[\"Value\"] = +data[j][\"Value\"];\n newObj[\"TIME\"] = +data[j][\"TIME\"] ; \n obj.push(newObj);\n }\n }\n\n console.log(obj);\n\n return obj;\n }", "title": "" }, { "docid": "1aad693db988b3b0755574f69375b1c6", "score": "0.49579236", "text": "function afo ( obj )\n{\n\tvar arr = [];\n\tfor ( var x in obj )\n\t{\n\t\t// arr.push( { x: obj[ x ] } );\n\t\tarr.push( obj[ x ] );\n\t}\n\treturn arr;\n}", "title": "" }, { "docid": "4a45984583e5351c019528bcc6d63ce9", "score": "0.49448407", "text": "function arrCountryName(res){\n const arrCountry = [];\n for(const country of res){ arrCountry.push(country.countryRegion)}\n const newCountry = arrCountry.filter((countries, i) => arrCountry.indexOf(countries) === i);\n return newCountry;\n}", "title": "" }, { "docid": "d01840b525c1012d3b1c346128413f27", "score": "0.49300796", "text": "function values(obj){\n var outArr = [] ;\n each(obj, function(element, key){\n outArr.push(element) ;\n })\n return outArr ;\n}", "title": "" }, { "docid": "2376ac3bb09cfcdd0ba750c616768439", "score": "0.4902896", "text": "function populateRegions(city_ids, regions_obj) {\n var regions = [];\n city_ids.map(function (city_id) {\n regions[city_id] = regions_obj.filter(function (item) {\n return item['city_id'] == city_id;\n });\n });\n return regions;\n }", "title": "" }, { "docid": "7ab851124e723c6df5e6548bb4a72aa3", "score": "0.48890662", "text": "function filterValuesByKeys( obj, filter ) { // returns array\n\tvar arraykeys = [];\n\t\tif(filter(key)){\n\t\t\tarraykeys.push(obj[key]);\n\t\t}\n\treturn arraykeys;\n}", "title": "" }, { "docid": "86c223843789dfd967d11c21dd02116d", "score": "0.48624578", "text": "objectToArray(object) {\n return Object.keys(object).map((key) => {\n object[key].id = key;\n object[key].label = key.toString();\n return object[key];\n });\n }", "title": "" }, { "docid": "667c813dcd5265e3e8706510be565c65", "score": "0.48461926", "text": "objectToArray(objectArray) {\n const header = ['Task', 'Minutes per day'];\n\n const arrayOfArrays = objectArray.map(elem => Object.values(elem));\n arrayOfArrays.unshift(header);\n\n return arrayOfArrays;\n }", "title": "" }, { "docid": "194446aaf813f10dcc97d2598188ac3d", "score": "0.48260617", "text": "function getSeriesData(objOAT, categoryArray) {\n var seriesObj = [];\n var seriesColSource;\n var isColumn;\n if (objOAT.colConditions.length == 0) {\n seriesColSource = null;\n isColumn = false;\n }\n else {\n seriesColSource = objOAT.colStructure.items;\n isColumn = true;\n }\n var tempArray = [];\n var totalSeries = [];\n if (seriesColSource == null) {\n totalSeries.push(\"Data Value\");\n }\n else {\n if (seriesColSource[0] && seriesColSource[0].items) {\n totalSeries = getSeriesNameCol(seriesColSource, tempArray, \"\");\n }\n else {\n totalSeries = getSeriesName(seriesColSource, tempArray, \"\");\n }\n }\n // For all series\n var data = objOAT.filteredData;\n if (data.length == 0) {\n data = objOAT.filteredData;\n }\n if (isColumn == false && objOAT.colConditions.length > 0) {\n isColumn = true;\n }\n for (var k = 0; k < totalSeries.length; k++) {\n var seriesItem = new Object();\n var seriesName = [];\n seriesItem.name = totalSeries[k];\n try {\n if (totalSeries[k].indexOf('{@@}') > -1) {\n seriesName = totalSeries[k].split('{@@}');\n }\n else {\n seriesName.push(totalSeries[k]);\n }\n }\n catch (err) {\n seriesItem.name = totalSeries[k].value;\n seriesName.push(totalSeries[k].value);\n }\n //seriesItem.stack = (objOAT.allData[i])[1];\n var dataArray = [];\n var isExistAll;\n // Get data with filtering process\n var rowIndex = objOAT.rowConditions;\n for (var c = 0; c < categoryArray.length; c++) {\n var isDataExist = false;\n for (var i = 0; i < data.length; i++) {\n if (isColumn) {\n for (var j = 0; j < seriesName.length; j++) {\n isExistAll = true;\n var index = objOAT.colConditions[j];\n if (objOAT.colConditions.length == 0) {\n index = 1;\n }\n if (!isMatchAllCondition(seriesName[j], data[i], index, categoryArray[c], rowIndex)) {\n isExistAll = false;\n break;\n }\n }\n if (isExistAll) {\n isDataExist = true;\n var dataValueString = (data[i])[objOAT.dataColumnIndex];\n var dataValue = extractDataVale(dataValueString);\n dataArray.push(parseFloat(dataValue));\n }\n }\n else {\n if (seriesColSource == null) // If there is only 2 column in grid\n {\n if (isMatchSpacialCondition(data[i], objOAT.dataColumnIndex, categoryArray[c], rowIndex)) {\n isExistAll = true;\n var dataValueString = (data[i])[objOAT.dataColumnIndex];\n var dataValue = extractDataVale(dataValueString);\n dataArray.push(parseFloat(dataValue));\n }\n }\n else {\n if (seriesColSource[k] == (data[i])[1] && categoryArray[c] == (data[i])[0]) {\n isDataExist = true;\n var dataValueString = (data[i])[objOAT.dataColumnIndex];\n var dataValue = extractDataVale(dataValueString);\n dataArray.push(parseFloat(dataValue));\n }\n }\n }\n }\n if (isDataExist == false && seriesColSource != null) {\n dataArray.push(null);\n }\n seriesItem.name = seriesItem.name.replace(/{@@}/g, \" \");\n seriesItem.data = dataArray\n /*if(!isColumn && seriesColSource!=null)\n {\n break;\n }*/\n }\n seriesObj.push(seriesItem);\n }\n return seriesObj;\n}", "title": "" }, { "docid": "f8852497de5deb273f0fefa855cdff8a", "score": "0.4804541", "text": "function keysAndValues(obj) {\n\tvar k = [];\n\tvar o = [];\n\tfor (var i in obj){\n\t k.push(i);\n\t o.push(obj[i]);\n\t}\n\treturn [k,o];\n }", "title": "" }, { "docid": "43db68a8e86d9238e7fe709fbfd576fd", "score": "0.48041293", "text": "getDataArray(stateArray) {\n const dataPointArray = stateArray.map((e) =>\n [(new Date(e.date)).getTime(), e.value]\n );\n return dataPointArray;\n }", "title": "" }, { "docid": "6d98e05a008bed04ae042f666ae57826", "score": "0.48040935", "text": "function toArray(obj,keyval){\n\tvar arr = []\n\t$.each(obj, function(a,b){\n\t\tif(keyval && (typeof b==\"string\"||typeof b==\"number\")) //filter out subobjects\n\t\t\tarr.push(a+':'+b);\n\t\telse arr.push(b);\n\t})\n\treturn arr;\n}", "title": "" }, { "docid": "1c9c05068c83cf52872874e98b8f8b7b", "score": "0.47825065", "text": "function d3DataGen (paramWeekWiseObj)\n{\n var transformedArray = [];\n //var hold_object = {};\n\n for(year in paramWeekWiseObj)\n {\n var temp_obj={};\n for(week in paramWeekWiseObj[year])\n {\n temp_obj={};\n temp_obj[\"year\"]=parseInt(year);\n temp_obj[\"weekNo\"]=parseInt(week);\n temp_obj[\"noCommits\"]=0;\n temp_obj[\"dailyCommitList\"]=[\n {\n \"day\": \"Sunday\",\n \"noCommit\": 0\n },\n {\n \"day\": \"Monday\",\n \"noCommit\": 0\n },\n {\n \"day\": \"Tuesday\",\n \"noCommit\": 0\n },\n {\n \"day\": \"Wednesday\",\n \"noCommit\": 0\n },\n {\n \"day\": \"Thursday\",\n \"noCommit\": 0\n },\n {\n \"day\": \"Friday\",\n \"noCommit\": 0\n },\n {\n \"day\": \"Saturday\",\n \"noCommit\": 0\n }\n ];\n //var temp_day_obj=[];\n for(day in paramWeekWiseObj[year][week])\n {\n temp_obj[\"noCommits\"]+=paramWeekWiseObj[year][week][day];\n for(var i=0;i<temp_obj[\"dailyCommitList\"].length;i++)\n {\n if(temp_obj[\"dailyCommitList\"][i][\"day\"]===day)\n {\n temp_obj[\"dailyCommitList\"][i][\"noCommit\"]=paramWeekWiseObj[year][week][day];\n }\n }\n\n }\n transformedArray.push(temp_obj);\n }\n\n }\n return transformedArray;\n}", "title": "" }, { "docid": "9b9c8b3548fa372451ae4f75399335e3", "score": "0.4773776", "text": "getData() {\n return axios\n .get('https://api.covid19api.com/summary')\n .then(res => {\n const RES = res.data.Countries;\n //console.log(RES)\n\n //arr of objects\n function top5(data) {\n let dObj = {}\n let d1 = data.map(d => {\n if (d.TotalRecovered !== null) {\n dObj[d.TotalRecovered] = d.Country\n }\n }\n )\n\n\n //console.log(\"d1\", dObj)\n\n let ordered = {}\n let ob = Object.keys(dObj).sort().forEach((k) =>\n ordered[k] = dObj[k]\n );\n\n //console.log(\"ob\", ordered)\n let ans = Object.entries(ordered).slice(-4)\n //console.log(\"ans\", ans)\n\n let revObj = []\n let creatObj = ans.map((d, i) => {\n revObj[i] = { \"name\": ans[i][1], \"value\": ans[i][0] }\n\n })\n //console.log(\"answer1\", revObj)\n return revObj\n\n\n }\n\n //arry of objects\n let calcTop5 = top5(RES)\n //console.log(\"c\", calcTop5)\n let newFiveValues = []\n let newFiveNames = []\n calcTop5.forEach((ele) => {\n //append num vals \n newFiveValues.push(parseInt(ele.value))\n //append name\n newFiveNames.push(ele.name)\n\n })\n\n this.setState({\n\n FiveValues: newFiveValues,\n FiveNames: newFiveNames,\n // series: { ...this.state.series, data: newFiveValues },\n options: {\n ...this.state.options,\n xaxis: {\n ...this.state.options.xaxis,\n categories: newFiveNames\n },\n\n },\n series: [{ ...this.state.series, data: newFiveValues }]\n\n })\n //console.log(\"top\", this.state.FiveValues, this.state.FiveNames, this.state.options.labels)\n\n\n })\n .catch(err => {\n console.log(\"err\", err)\n })\n\n\n }", "title": "" }, { "docid": "d6c2685eecc09820e3d4b241b69cc645", "score": "0.47732484", "text": "function makeRegions(countries, regions){\n //loop through countries and group into regions object\n for (let country in countries){\n let setRegion = countries[country].properties.REGION_UN;\n regions[setRegion].push(countries[country]);\n regions[\"All\"].push(countries[country]);\n };\n return regions;\n }", "title": "" }, { "docid": "2293bd49c63b27f1137882a38baef24c", "score": "0.4768165", "text": "function line(data, selectedCountries, subject, width, height, colourScale){\n var newData = [];\n\n console.log(selectedCountries); \n\n var countryObject = {};\n for(var j = 0; j < selectedCountries.length; j++){\n var newData = [];\n for(var g = 0; g < data.length; g++){ \n var newObj = {};\n if(subject == data[g].SUBJECT && selectedCountries[j] == data[g].LOCATION){\n newObj['TIME'] = data[g].TIME;\n newObj['Value'] = data[g].Value;\n newData.push(newObj);\n }\n }\n countryObject[selectedCountries[j]] = newData;\n\n }\n\n LineChart(countryObject[selectedCountries[0]], countryObject, colourScale);\n\n}", "title": "" }, { "docid": "9c0e980835bad325c79c5331fc043dd4", "score": "0.4768117", "text": "function processPropertyArray(objArray, superclass) {\n console.log('')\n console.log('processTypeObjectArray', objArray, superclass)\n console.log('')\n try {\n //\n // Loop over schema properties an create an OWL element for each field defined\n //\n var ids = [];\n for (var key in objArray) {\n\n console.log(objArray[key]);\n\n let obj = objArray[key]\n\n let _key = key || obj.id || obj['x_contentmap'] || null;\n\n let _semantic = obj['x_semantic'] || null;\n\n let _id = obj.id || _key;\n\n _id = \"sdm:\" + _id;\n\n\n //\n // Starting DataProperty\n //\n if (['string', 'number', 'boolean'].includes(obj.type)) {\n\n let _type = \"owl:DatatypeProperty\";\n\n // let _comment = obj['title'] || null;\n // let _comment = obj['placeholder'] || null;\n let _comment = obj['description'] || null;\n\n let _label = obj['label'] || obj['name'] || obj['title'] || null;\n\n let _domain = superclass;\n\n // if (obj['x_contentmap'].includes(\"person\")) {\n // _domain = \"sdm:Person\";\n // }\n // else {\n // _domain = \"sdm:Person\";\n // }\n\n let _range = null;\n\n if (obj.type === \"string\") {\n _range = \"xsd:string\";\n }\n else if (obj.type === \"boolean\") {\n _range = \"xsd:boolean\";\n }\n else if (obj.type === \"number\") {\n _range = \"xsd:integer\";\n }\n else {\n _range = \"rdfs:Literal\";\n }\n\n if (obj.format === \"date\") {\n _range = \"xsd:date\";\n }\n //\n // more formats here\n\n let _equivalentProperty = obj['x_semantic'] || null;\n\n let _definition = obj['helpMessage'] || null;\n\n let _example = obj['default'] || null; /// Use HOW ???\n\n\n //\n // Process restrictions for formats\n //\n if (obj.format === \"range\") {\n\n let _min = obj['min'] || null;\n let _max = obj['max'] || null;\n\n let _restrictions = [\n {\n \"@id\": \"sdm:personAge\",\n \"equivalentClass\": \"_:min12max19\"\n },\n {\n \"@id\": \"sdm:personAge\",\n \"equivalentClass\": \"_:min12max19\"\n },\n {\n \"@id\": \"_:min12max19\",\n \"@type\": \"rdfs:Datatype\",\n \"onDatatype\": \"xsd:integer\",\n \"withRestrictions\": {\n \"@list\": [\n { \"xs:minExclusive\": 12 },\n { \"xs:maxInclusive\": 19 }\n ]\n }\n }\n ]\n\n _graph.push(_restrictions)\n\n }; // end process restrictions\n\n\n // {\n // \"@id\": \"sdm:age\",\n // \"@type\": \"owl:DatatypeProperty\",\n // \"comment\": \"\\nAge in years.\\n\",\n // \"domain\": \"sdm:Person\",\n // \"label\": \"age\",\n // \"range\": \"sdm:personAge\",\n // \"equivalentProperty\": \"foaf:age\"\n // },\n // {\n // \"@id\": \"sdm:personAge\",\n // \"equivalentClass\": \"_:min12max19\"\n // },\n // {\n // \"@id\": \"_:min12max19\",\n // \"@type\": \"rdfs:Datatype\",\n // \"onDatatype\": \"xsd:integer\",\n // \"withRestrictions\": {\n // \"@list\": [\n // \"_:min12\",\n // \"_:max19\"\n // ]\n // }\n // },\n\n // \"txtGivenName\": {\n // \"control\": \"input\",\n // \"type\": \"string\",\n // \"format\": \"text\",\n // \"id\": \"txtGivenName\",\n // \"name\": \"givenName\",\n // \"title\": \"First or given name \",\n // \"placeholder\": \"Fisrst Name goes here \",\n // \"value\": \"Michael\",\n // \"x_semantic\": \"foaf:givenName\",\n // \"x_contentmap\": \"person.givenname\",\n // \"size\": 13,\n // \"autocomplete\": \"FALSE\",\n // \"required\": true,\n // \"helpMessage\": \"First name to be used \",\n // \"default\": \"Michael\"\n // },\n // {\n // \"@id\": \"sdm:given-name\",\n // \"@type\": \"owl:DatatypeProperty\",\n // \"comment\": {\n // \"@language\": \"en\",\n // \"@value\": \"The given name associated with the object\"\n // },\n // \"domain\": \"sdm:Person\",\n // \"label\": {\n // \"@language\": \"en\",\n // \"@value\": \"given name\"\n // },\n // \"range\": \"xsd:string\",\n // owl:equivalentProperty foaf:birthday ,\n // skos:definition \"Strategy maps identified entity(s).\" .\n\n // :hasResponseType a owl:DatatypeProperty;\n // rdfs:range [\n // a rdfs:Datatype;\n // owl:oneOf ( \"Accept\" \"Decline\" \"Provisional\" )\n // ] .\n\n // },\n\n\n // create _entry entry\n let _entry = {};\n _entry.key = _key;\n _entry[\"@id\"] = _id;\n _entry[\"@type\"] = _type;\n if (_label) _entry[\"rdfs:label\"] = _label;\n if (_comment) _entry[\"rdfs:comment\"] = _comment;\n if (_domain) _entry[\"rdfs:doman\"] = _domain;\n if (_range) _entry[\"rdfs:range\"] = _range;\n if (_equivalentProperty) _entry[\"owl:equivalentProperty\"] = _equivalentProperty;\n if (_definition) _entry[\"skos:definition\"] = _definition;\n\n //\n // Add entry to json-ld elements\n //\n // console.log('_entry', _entry)\n _graph.push(_entry)\n\n\n }; // end if datatype property\n //\n // end of DataProperty \n //\n\n\n\n //\n // start of ObjectProperty or subclass object\n //\n if (obj.type === 'object') {\n\n //do object routine\n // \"customer\": {\n // \"type\": \"object\",\n // \"title\": \"Customer\",\n // \"properties\": {\n // \"name\": {\n // \"type\": \"string\",\n // \"title\": \"Name\"\n // },\n // \"gender\": {\n // \"type\": \"string\",\n // \"title\": \"Gender\",\n // \"enum\": [\n // \"male\",\n // \"female\",\n // \"alien\"\n // ]\n // }\n // }\n\n var _akey = key || objArray['x_contentmap'] || null;\n var _aid = objArray['id'] || _akey;\n var _atype = \"owl:Class\";\n var _alabel = objArray['title'] || objArray['x_semantic'];\n var _acomment = objArray['description'] || null;\n var _asubclassof = superclass;\n\n let _aclass = {};\n if (_akey) _aclass.key = _akey;\n if (_aid) _aclass[\"@id\"] = _aid;\n if (_atype) _aclass[\"@type\"] = _atype;\n if (_alabel) _aclass[\"rdfs:label\"] = _alabel;\n if (_acomment) _aclass[\"rdfs:comment\"] = _acomment;\n if (_asubclassof) _aclass[\"rdfs:subClassOf\"] = _asubclassof;\n\n // console.log('_aclass', _aclass)\n _graph.push(_aclass)\n\n // get properties of obj that has _key\n var _aproparray = obj.properties\n\n // call function to process properties recureively\n //\n //\n //\n // var processTypeObjectArray(_aproparray, _key);\n\n\n }; // end if object\n //\n // end of ObjectProperty \n //\n\n }; // end for each obj\n } // end try\n catch (e) {\n console.log('catch e error in function processTypeObjectArray ', e);\n }\n finally {\n return;\n }\n } // end of function processTypeObjectArray", "title": "" }, { "docid": "17da0ddc8ae6e523acd5847f2b8d7055", "score": "0.4765796", "text": "function buildxData(data){\r\n //TODO - Add shift to function arg\r\n var pointsShift = 0; //X data is in the start\r\n var arr = [];\r\n var i;\r\n //document.getElementById(\"debug16\").innerHTML = \"Into buildxData\";\r\n\r\n var convertToArr = Object.keys(data).map(i => data[i]); // Convert to array \r\n\r\n //document.getElementById(\"debug17\").innerHTML = \"Converted: \" + convertToArr + \"Place 0 = \" + convertToArr[0];\r\n \r\n var l = convertToArr.length;\r\n var j = l/typesNum; //number of values to push EDIT IF NEW DATA KIND ADDED TO DATASET - typesNum global var\r\n\r\n // Dynamic values add\r\n\r\n for(i=pointsShift;i<j;i++){\r\n arr.push(convertToArr[i]);\r\n }\r\n\r\n\r\n var finalData = [];\r\n for(i=0;i<arr.length;i++){\r\n if(arr[i]!=\"-\"){\r\n finalData.push(arr[i]);\r\n }\r\n }\r\n\r\n //document.getElementById(\"debug18\").innerHTML = finalData;\r\n return finalData;\r\n}", "title": "" }, { "docid": "e9851387e397238a6c3e588c9b1c29f4", "score": "0.47654158", "text": "static initialize(obj, line1, city, country) { \n obj['line1'] = line1;\n obj['city'] = city;\n obj['country'] = country;\n }", "title": "" }, { "docid": "8452438792ba515a6992e6c955fdd3b7", "score": "0.47571337", "text": "function ShowIndiaObj() {\r\n for (let i=0; i<=Array.length-1; i++){\r\n if (Array[i].country=='India') {\r\n console.log(Array[i])\r\n }\r\n }\r\n\r\n}", "title": "" }, { "docid": "7de362a50435205e6d2d796fd2a4b625", "score": "0.47487992", "text": "parseValues(values) {\n const newValues = fromJS(values);\n const prefixes = this._getObjectPrefixes();\n\n let parsedValues = Map({});\n let invalidProps = Map({});\n\n let result = List();\n // console.log(prefixes, ' prefixes ................');\n\n newValues.forEach((fieldGroup, fieldGroupName) => {\n // console.log(fieldGroupName, ' field group name');\n let fullRequestData = null;\n if (prefixes[fieldGroupName]) {\n const { properties, axapi } = prefixes[fieldGroupName];\n // check each properties\n fieldGroup.forEach((fieldValue, fieldName) => { // eslint-disable-line\n // console.log('properties.....', properties[fieldName], 'fieldName', fieldName);\n if (properties[fieldName]) {\n parsedValues = parsedValues.setIn([ fieldGroupName, fieldName ], fieldValue);\n } else {\n invalidProps = invalidProps.setIn([ fieldGroupName, fieldName ], fieldValue);\n }\n });\n fullRequestData = {\n path: this._parseAxapiURL(axapi, fieldGroup),\n method: 'POST',\n body: parsedValues\n };\n // console.log('full auth data', fullRequestData);\n }\n\n if (fullRequestData) {\n result = result.push(fullRequestData);\n }\n\n });\n\n // console.log('axapi path and result', result.toJS());\n return result;\n }", "title": "" }, { "docid": "e17c283eb9e41e1010cc1b14c66af4fa", "score": "0.47427648", "text": "function getJobFutureInRegionDXChartFormatted(json,region){\n\n var year=[];\n var predictedNumberEmployed=[];\n\n var employmentByYear;\n var employmentByYearData=[];\n\n\n for(var index = 0; index < json.predictedEmployment.length; index++){\n\n employmentByYear = new Object()\n\n employmentByYear.year = parseInt(json.predictedEmployment[index].year);\n year.push(parseInt(json.predictedEmployment[index].year));\n\n\n for(var j=0;j<json.predictedEmployment[index].breakdown.length; j++){\n\n if(parseInt(json.predictedEmployment[index].breakdown[j].code) == 1){\n\n employmentByYear.employment = parseInt(json.predictedEmployment[index].breakdown[j].employment);\n predictedNumberEmployed.push(parseInt(json.predictedEmployment[index].breakdown[j].employment));\n break;\n }\n }\n\n employmentByYearData.push(employmentByYear);\n }\n\n console.log(employmentByYearData);\n return employmentByYearData;\n}", "title": "" }, { "docid": "6f60147d8751cfa7739fb760002046d7", "score": "0.47421283", "text": "function getData(key){\n var table = document.getElementById( \"dataTable\" );\n var xArr = [];\n var yArr = [];\n var dict = {};\n var data=[];\n var xA1,xArr1=[];\n\n for (var i = 1; i < table.rows.length; i++ ) {\n xArr.push(\n table.rows[i].cells[1].getElementsByTagName('input')[0].value\n );\n yArr.push(\n table.rows[i].cells[2].getElementsByTagName('input')[0].value\n );\n dict = {x: parseFloat(table.rows[i].cells[1].getElementsByTagName('input')[0].value),\n y: parseFloat(table.rows[i].cells[2].getElementsByTagName('input')[0].value)};\n data.push(dict);\n xA1=parseFloat(table.rows[i].cells[1].getElementsByTagName('input')[0].value);\n xArr1.push(xA1);\n }\n\n switch(key){\n case 'linedata':{\n return data;\n break;\n }\n\n case 'xarr':{\n return xArr;\n break;\n }\n\n case 'yarr':{\n return yArr;\n break;\n }\n\n case 'piedata':{\n return xArr1;\n break;\n }\n\n default:{\n alert(\"error\");\n }\n }\n \n}", "title": "" }, { "docid": "f946777b224f68704cea49e539a6628d", "score": "0.4741119", "text": "function getUniqueXDomainValues(results) {\r\n var valueSet = new Set();\r\n for (var _i = 0, results_1 = results; _i < results_1.length; _i++) {\r\n var result = results_1[_i];\r\n for (var _a = 0, _b = result.series; _a < _b.length; _a++) {\r\n var d = _b[_a];\r\n valueSet.add(d.name);\r\n }\r\n }\r\n return Array.from(valueSet);\r\n}", "title": "" }, { "docid": "93e13e33160cf1d0da31829ef58fac83", "score": "0.47282907", "text": "function makeInfantMoratalityObjects(headerVal){\n\tvar json = fetchParsedJson();\n\tfor(var i = 0 ; i < json.length; i++){\n\t\tvar record = json[i];\n\t\tlet infantObject = new Disease(record[headerVal[0]],record[headerVal[1]],record[headerVal[2]],record[headerVal[3]],record[headerVal[4]],record[headerVal[5]],record[headerVal[6]],record[headerVal[7]],record[headerVal[8]],record[headerVal[9]],record[headerVal[10]],record[headerVal[11]],record[headerVal[12]]);\n\t\t\n\t\tarrObj.push(infantObject);\n\t}\n}", "title": "" }, { "docid": "e9fde11336f523fce15bf279699b8e49", "score": "0.47261938", "text": "function getDataStructure(objOAT) {\n var dataStructure = [];\n var displayData = objOAT.filteredData;\n var rows = objOAT.rowConditions;\n for (var i = 0; i < rows.length; i++) {\n var allCategory = [];\n for (var j = 0; j < displayData.length; j++) {\n var dataPoint = displayData[j];\n allCategory.push(dataPoint[rows[i]]);\n }\n allCategory = allCategory.unique();\n //allCategory = allCategory.sort();\n dataStructure.push(allCategory);\n }\n return dataStructure;\n}", "title": "" }, { "docid": "d6968ebe7ba15aedc1ec9fc61c20e6e2", "score": "0.47155124", "text": "function extractSeries(data, axises, xAxis) {\r\n return axises.map(function (seriesConfig) {\r\n var columnName = seriesConfig.series;\r\n var xAxisColumnName = seriesConfig && seriesConfig.x && seriesConfig.x.series || xAxis && xAxis.series;\r\n var xAxisValues = xAxisColumnName && data && data.series && data.series[xAxisColumnName] && data.series[xAxisColumnName].values || [];\r\n return {\r\n name: columnName,\r\n data: buildApexSeries(columnName, data, xAxisValues),\r\n };\r\n });\r\n}", "title": "" }, { "docid": "766e6349c2ef7aee9a1599901e946749", "score": "0.47147313", "text": "function values(obj) {\r\n\tvar a = []\r\n\tforeach(obj, function(e) {\r\n\t\t\t\ta.push(e)\r\n\t\t\t})\r\n\treturn a\r\n}", "title": "" }, { "docid": "529c80e1702b41cc21bba98f23257865", "score": "0.47029462", "text": "function createXY (data, xKey, yKey) {\n return data.map(item => {\n return {\n x: item[xKey],\n y: item[yKey]\n }\n })\n}", "title": "" }, { "docid": "3358609c435dc0feecfb27470f7f66a0", "score": "0.470151", "text": "function jsonArrayToData(jsonArray){\n\n //console.log(jsonArray)\n // We get all the keys\n s = jsonArray[0]\n var keys = []\n for(var k in s) keys.push(k);\n // console.log(keys)\n var datePosition = 'Ref_Date'\n\n if(keys.contains('GEO')){\n var geoPosition = 'GEO'\n }else{\n var geoPosition = 'GEOGRAPHY'\n }\n\n // Now we get all the values and make a multi dimensional array\n // for each row in the csv\n if(keys.indexOf(datePosition) > -1 && keys.indexOf(geoPosition) > -1){\n // Both filters exist\n // convert object to an multi dimensional array of the form\n // ['date',['geo',[...Stuff...]]\n\n\n // Get all unique datePositions and geoPositions\n var uniqueDates = []\n var uniqueGeo = []\n\n for(var index in jsonArray){\n //console.log(jsonArray[index])\n var thisdate = jsonArray[index]['Ref_Date']\n var thisGeo = jsonArray[index]['GEO']\n\n if(!uniqueDates.contains(thisdate)){\n // Unique Date\n uniqueDates.push(thisdate)\n uniqueDates.push(thisGeo)\n var helpermap = new Hashmap()\n for(var i = 0; i < keys.length; i++){\n var thisKey = keys[i]\n if(thisKey !== 'GEO' && thisKey !== 'Ref_Date' && thisKey !== 'Coordinate' && thisKey !== 'Vector'){\n var thisValue = jsonArray[index][thisKey]\n //console.log(\"-> \"+thisKey+ \" : \" + thisValue)\n helpermap.set(thisKey,thisValue)\n }\n }\n // now the map has all the values\n completeMap.set(thisdate,new Hashmap(thisGeo, helpermap))\n }else{\n // not unique date\n // get previous Stuff\n var olderMap = completeMap.get(thisdate)\n if(!uniqueGeo.contains(thisGeo)){\n // but Unique Geo\n uniqueDates.push(thisGeo)\n var helpermap = new Hashmap()\n for(var i = 0; i < keys.length; i++){\n var thisKey = keys[i]\n if(thisKey !== 'GEO' && thisKey !== 'Ref_Date' && thisKey !== 'Coordinate' && thisKey !== 'Vector'){\n var thisValue = jsonArray[index][thisKey]\n //console.log(\"-> \"+thisKey+ \" : \" + thisValue)\n helpermap.set(thisKey,thisValue)\n }\n }\n // now the older map has all the values\n olderMap.set(thisGeo, helpermap)\n\n // Add back to completeMap\n completeMap.set(thisdate,olderMap)\n }else{\n var helpermap = olderMap.get(thisGeo)\n for(var i = 0; i < keys.length; i++){\n var thisKey = keys[i]\n if(thisKey !== 'GEO' && thisKey !== 'Ref_Date' && thisKey !== 'Coordinate' && thisKey !== 'Vector'){\n var thisValue = jsonArray[index][thisKey]\n //console.log(\"-> \"+thisKey+ \" : \" + thisValue)\n helpermap.set(thisKey,thisValue)\n }\n }\n // now the older map has all the values\n olderMap.set(thisGeo, helpermap)\n\n // Add back to completeMap\n completeMap.set(thisdate,olderMap)\n }\n }\n }\n }\n\n // we now pull all the years and geography out of the array and make\n // a json object over those values\n\n mapToJSON(completeMap)\n\n\n // Now we save that object\n\n\n}", "title": "" }, { "docid": "fda233f4ee9e74864416efb056557472", "score": "0.4697757", "text": "function item_type_to_arr(filter_value) {\n\t\tlet xlat = {rad:'radical',kan:'kanji',voc:'vocabulary',kana_voc:'kana_vocabulary'};\n\t\tlet arr = {}, value;\n\t\tif (typeof filter_value === 'string') filter_value = split_list(filter_value);\n\t\tif (typeof filter_value !== 'object') return {};\n\t\tif (Array.isArray(filter_value)) {\n\t\t\tfor (let idx in filter_value) {\n\t\t\t\tvalue = filter_value[idx];\n\t\t\t\tvalue = xlat[value] || value;\n\t\t\t\tarr[value] = true;\n\t\t\t}\n\t\t} else {\n\t\t\tfor (value in filter_value) {\n\t\t\t\tarr[xlat[value] || value] = (filter_value[value] === true);\n\t\t\t}\n\t\t}\n\t\treturn arr;\n\t}", "title": "" }, { "docid": "cc8968bc687e1cd8e3eb0cd496136e82", "score": "0.4697585", "text": "function objToArray(item, index) {\n\t\n\tvar temp = [item.id, \n\t\t\t\titem.name, \n\t\t\t\titem.desc, \n\t\t\t\titem.email, \n\t\t\t\titem.p_number, \n\t\t\t\titem.address];\n\t\treturn temp;\n}", "title": "" }, { "docid": "a5f0c04ddc9bf9beb3489d99831c901b", "score": "0.46969518", "text": "static initialize(obj, teamKey, xs, ys) { \n obj['team_key'] = teamKey;\n obj['xs'] = xs;\n obj['ys'] = ys;\n }", "title": "" }, { "docid": "72ed068c8d092f8b4c4d475f7d5843b6", "score": "0.46919343", "text": "function GetAllASIT(gArray) {\r\n for (var tableName in gArray) {\r\n logDebug(tableName);\r\n var valueAttributes = gArray[tableName];\r\n for (var vv in valueAttributes) {\r\n var tempArray = valueAttributes[vv];\r\n for (var row in tempArray) {\r\n var tempObject = tempArray[row];\r\n for (var val in tempObject) {\r\n var fieldInfo = tempObject[val];\r\n logDebug(fieldInfo.columnName);\r\n logDebug(fieldInfo.fieldValue);\r\n logDebug(fieldInfo.readOnly);\r\n logDebug('------');\r\n }\r\n }\r\n }\r\n }\r\n}", "title": "" }, { "docid": "337a8ea5f672a4b393e3e5d6e497776c", "score": "0.46913785", "text": "function getUniqueXDomainValues(results) {\n var valueSet = new Set();\n for (var _i = 0, results_1 = results; _i < results_1.length; _i++) {\n var result = results_1[_i];\n for (var _a = 0, _b = result.series; _a < _b.length; _a++) {\n var d = _b[_a];\n valueSet.add(d.name);\n }\n }\n return Array.from(valueSet);\n}", "title": "" }, { "docid": "30ce82a2635ef7250e358d9a415bb835", "score": "0.4690854", "text": "function parseDaysRegion(arr) {\n const regionInstances = {};\n\n const over90 = arr.filter(v => v.days >= 90);\n\n over90.forEach((v) => {\n let keyAZ = v.region\n let region = keyAZ.replace(/[.abcd]$/, \"\")\n regionInstances[region] = regionInstances[region] ? [...regionInstances[region], v] : [v]\n })\n\n return regionInstances\n}", "title": "" }, { "docid": "1e819fb4c02005638bb24d11565c51e1", "score": "0.46866688", "text": "function fillSslSortArray (obj, arr) {\n for (var i = 0; i < obj.length; i++) {\n arr.push({\n index: i,\n price: obj[i].Prices[0].PriceDetail.Amount,\n name: obj[i].Name,\n isWild: obj[i].IsWildCard,\n isSan: obj[i].IsSan,\n isEv: obj[i].IsEv,\n isOrg: obj[i].IsOrganizationValidation\n });\n }\n }", "title": "" }, { "docid": "34e4511351f50b7471d272ccee49172e", "score": "0.46831304", "text": "function array2Object(arr){\n var vals = {};\n for(var i=0;i<arr.length;i++){\n var o = arr[i];\n vals[o.name] = o.value;\n }\n return vals;\n}", "title": "" }, { "docid": "4fbb17cefa06cc0d49bb86f32f583d45", "score": "0.46783647", "text": "function getObjects_(data, keys, getBlanks, getMetadata, dataRangeStartRowIndex, base) {\n var objects = [];\n \n for (var i = 0; i < data.length; ++i) {\n var object = getMetadata ? {arrayIndex:i,sheetRow:i+dataRangeStartRowIndex} : {};\n if (base) object.shortcut = base + (i+dataRangeStartRowIndex);\n var hasData = false;\n for (var j = 0; j < data[i].length; ++j) {\n var cellData = data[i][j];\n if (isCellEmpty_(cellData)) {\n if (getBlanks){\n object[keys[j]] = '';\n }\n continue;\n }\n object[keys[j]] = cellData;\n hasData = true;\n }\n if (hasData) {\n objects.push(object);\n }\n }\n return objects;\n}", "title": "" }, { "docid": "90a3495adb65ae2c1fe80976beb4dcbe", "score": "0.46779656", "text": "function transformEmployeeData(arr) {\r\n \tvar tranformEmployeeList = []\r\n \tfor(var i of arr)\r\n \t{\r\n \t\tobj={}\r\n \t\tfor(var j=0;j<i.length;j++)\r\n \t\t{\r\n \t\t\tobj[i[j][0]]=i[j][1]\r\n \t\t}\r\n \t\ttranformEmployeeList.push(obj)\r\n \t}\r\n \treturn tranformEmployeeList\r\n}", "title": "" }, { "docid": "d512e376376e54cca7e6e5acf17183db", "score": "0.4672082", "text": "function serializeObj(arr) {\n\t\tvar paramObj = {};\n\t\t\n\t\t$.each( arr, function( _, kv ) {\n\t\t\tif ( paramObj.hasOwnProperty(kv.name) ) {\n\t\t\t\tparamObj[kv.name] = $.makeArray( paramObj[kv.name] );\n\t\t\t\tparamObj[kv.name].push( kv.value );\n\t\t\t}\n\t\t\telse {\n\t\t\t\tparamObj[kv.name] = kv.value;\n\t\t\t}\n\t\t});\n\n\t\treturn paramObj;\n\t}", "title": "" }, { "docid": "f74732f67af2ed00f6f84a9834a02e78", "score": "0.4672014", "text": "function xyByKey (data, xKey, yKey, useKey) {\n return data.reduce((accum, item) => {\n const useAsKey = item[useKey]\n const byDay = accum[useAsKey]\n const toXY = {\n x: item[xKey],\n y: item[yKey]\n }\n\n if (byDay) {\n accum[useAsKey].push(toXY)\n } else {\n accum[useAsKey] = [toXY]\n }\n return accum\n }, {})\n}", "title": "" }, { "docid": "536f65aa417f8b029c4f31a8d19fe519", "score": "0.46690986", "text": "function extractSeries(data, axises, xAxis) {\r\n return axises.map(function (seriesConfig) {\r\n var columnName = seriesConfig.series;\r\n var xAxisColumnName = seriesConfig.x && seriesConfig.x.series || xAxis && xAxis.series;\r\n var xAxisValues = xAxisColumnName ? pluckValues(xAxisColumnName, data.values) : data.index.values;\r\n return {\r\n name: columnName,\r\n data: buildApexSeries(columnName, data.values, xAxisValues),\r\n };\r\n });\r\n}", "title": "" }, { "docid": "91917c9e2ea1e599b5cf20788c2f4121", "score": "0.46660227", "text": "function getValues(obj) { //???????Quedstion : How come do i get the values???\n let keys = [];\n for(let key in obj) {\n keys.push(obj[key])\n }\n return keys\n}", "title": "" }, { "docid": "7367eacbd4b7489e5c7a27dfd378ac28", "score": "0.4661653", "text": "groupByArray(xs, key) {\n return xs.reduce(function (rv, x) {\n let v = key instanceof Function ? key(x) : x[key];\n let el = rv.find(r => r && r.key === v);\n if (el) {\n el.values.push(x);\n } else {\n rv.push({\n key: v,\n values: [x],\n });\n }\n return rv;\n }, []);\n }", "title": "" }, { "docid": "81047113f97ba8f17e03568f8c726a8c", "score": "0.4661499", "text": "static arrayExtractIfPropertyExists(data,propertyName){if(data&&propertyName){const result=[];for(const item of Tools.arrayMake(data)){let exists=false;for(const key in item)if(key===propertyName&&item.hasOwnProperty(key)&&![undefined,null].includes(item[key])){exists=true;break}if(exists)result.push(item)}return result}return data}", "title": "" }, { "docid": "30688c21c66243fc20bb9f6dba5c1b7f", "score": "0.46569344", "text": "function createObjInterCoChartList(arrInterCoChartResult) {\r\n var stLogTitle = 'scheduled_approveTime.processTimeAndMaterialsJEs.createObjInterCoChartList';\r\n\r\n var objInterCoChartList = {};\r\n\r\n for (var intCtr = 0; intCtr < arrInterCoChartResult.length; intCtr++) {\r\n var stSubsidiary = arrInterCoChartResult[intCtr].getValue('custrecord_subsidiary');\r\n var stUnbilledIC = arrInterCoChartResult[intCtr].getValue('custrecord_unbilled_ic_ar');\r\n var stAccruedIC = arrInterCoChartResult[intCtr].getValue('custrecord_accrued_ic_ap');\r\n var stICAcctRec = arrInterCoChartResult[intCtr].getValue('custrecord_ic_ar');\r\n var stICAcctPay = arrInterCoChartResult[intCtr].getValue('custrecord_ic_ap');\r\n\r\n objInterCoChartList[stSubsidiary] = {};\r\n objInterCoChartList[stSubsidiary].stUnbilledIC = stUnbilledIC;\r\n objInterCoChartList[stSubsidiary].stAccruedIC = stAccruedIC;\r\n objInterCoChartList[stSubsidiary].stICAcctRec = stICAcctRec;\r\n objInterCoChartList[stSubsidiary].stICAcctPay = stICAcctPay;\r\n }\r\n\r\n nlapiLogExecution('DEBUG', stLogTitle, 'objInterCoChartList = ' + JSON.stringify(objInterCoChartList));\r\n return objInterCoChartList;\r\n}", "title": "" }, { "docid": "c3a194045fd118990c5be5ad3336c26a", "score": "0.46563882", "text": "static initialize(obj, x, y) { \n obj['x'] = x;\n obj['y'] = y;\n }", "title": "" }, { "docid": "d17e15bfabbefbd81781bdb28567911c", "score": "0.46548834", "text": "function getObjectValues(object) {\n // YOUR CODE BELOW HERE //\n //declare an array literal where the object's values can be stored\n //using a for in loop, loop through the keys\n //using bracket notation, pull the values of the keys\n //return array\n var array = [];\n \n for (var key in object) {\n array.push(object[key]);\n }\n \n return array;\n \n \n \n // YOUR CODE ABOVE HERE //\n}", "title": "" }, { "docid": "697d60fd2061af5541174f97ae7f8cd9", "score": "0.46336538", "text": "function createLocationsArray(locationObjArray) {\n var locationsList = [];\n locationObjArray.forEach(function(element) {\n $.each(element, function (key, value) {\n if (key === 'locations') {\n value.forEach(function(locObj) {\n locationsList.push(locObj);\n });\n }\n });\n }, this);\n return locationsList;\n}", "title": "" }, { "docid": "e0df4f97b25ea6b43b0eafea39bf914f", "score": "0.46332517", "text": "getAllValues(arr, property) {\n let valuesList = [];\n for (let element in arr) {\n if (!valuesList.includes(arr[element][property])) {\n valuesList.push(arr[element][property]);\n }\n }\n return valuesList;\n }", "title": "" }, { "docid": "1580eb81910ca424cc031f870413845b", "score": "0.46324185", "text": "function trueName(regionsArray, regionsObject, sorted, sex) {\n const display = {};\n regionsArray.forEach((itemArray) => {\n display[itemArray] = regionsObject[itemArray]\n .reduce((accumulator, currentItem) => {\n const residents = {};\n let residentSpecies = species.find((itemSpec) => itemSpec.name === currentItem).residents;\n if (sex) {\n residentSpecies = residentSpecies.filter((itemResident) => itemResident.sex === sex);\n }\n residentSpecies = residentSpecies.map((item) => item.name);\n if (sorted) residentSpecies.sort();\n residents[currentItem] = residentSpecies;\n accumulator.push(residents);\n return accumulator;\n }, []);\n });\n return display;\n}", "title": "" }, { "docid": "2019ff8722bdde882a0a1febc8db34b4", "score": "0.4622347", "text": "function buildxDataYear(data){\r\n //TODO - Add shift to function arg\r\n var pointsShift = 0; //X data is in the start\r\n var arr = [];\r\n var i;\r\n //document.getElementById(\"debug40\").innerHTML = \"Into buildxData\";\r\n\r\n var convertToArr = Object.keys(data).map(i => data[i]); // Convert to array \r\n\r\n //document.getElementById(\"debug41\").innerHTML = \"Converted: \" + convertToArr + \"Place 0 = \" + convertToArr[0];\r\n \r\n var l = convertToArr.length;\r\n var j = l/typesNum; //number of values to push EDIT IF NEW DATA KIND ADDED TO DATASET - typesNum global var\r\n\r\n // Dynamic values add\r\n\r\n for(i=pointsShift;i<j;i++){\r\n arr.push(convertToArr[i]);\r\n }\r\n\r\n\r\n var finalData = [];\r\n for(i=0;i<arr.length;i++){\r\n if(arr[i]!=\"-\"){\r\n finalData.push(arr[i]);\r\n }\r\n }\r\n\r\n //document.getElementById(\"debug42\").innerHTML = finalData;\r\n return finalData;\r\n}", "title": "" }, { "docid": "21300fbf23dee4ee04cc5dad818d4081", "score": "0.4619251", "text": "function toArray(objectData){\n\n return Object.keys(objectData).map(function(key) {\n\n return objectData[key];\n\n });\n\n }", "title": "" }, { "docid": "58f2101921f61efc2ab5dc5667593c1e", "score": "0.46175775", "text": "function grabValues(obj)\n{\n\tvar values = [];\n\n\tfor (var index = 0, index < obj.length, index++)\n\t{\n\t\tvalues.push(obj[index]); \n\t}\n\n\treturn values;\n}", "title": "" }, { "docid": "f1d972dd957858c1baf26c71b4e7413f", "score": "0.46174508", "text": "function dataCollector(obj) {\n // collect keys\n objectList = Object.keys(obj);\n objectKeyList = Object.keys(obj[objectList[0]]);\n min = objectKeyList[0];\n max = objectKeyList[1];\n\n // create empty arrays for x and y\n xArr = [];\n yArrMin = [];\n yArrMax = [];\n\n // fill arrays with data\n var i;\n for(i = 0; i < objectList.length; i++){\n xArr.push(Number(objectList[i]));\n yArrMin.push(obj[objectList[i]][min]);\n yArrMax.push(obj[objectList[i]][max]);\n };\n\n // calculate the domains\n var xArrMin = Math.min.apply(null, xArr);\n var xArrMax = Math.max.apply(null, xArr);\n var dateMin = dateConverter(xArrMin);\n var dateMax = dateConverter(xArrMax);\n xDomain = [dateMin.getTime(), dateMax.getTime()];\n yDomain = [Math.min.apply(null, yArrMin),\n Math.max.apply(null, yArrMax)];\n xRange = [GRAPH_LEFT, GRAPH_RIGHT];\n yRange = [GRAPH_BOTTOM, GRAPH_TOP];\n\n // transfor the data\n xData = transformData(xArr, xDomain, xRange, true);\n yMinData = transformData(yArrMin, yDomain, yRange);\n yMaxData = transformData(yArrMax, yDomain, yRange);\n\n // return the data\n return [xData, yMinData, yMaxData, yDomain, xArr, yArrMin, yArrMax];\n}", "title": "" }, { "docid": "20aee677751cb095bc6d21459972d16c", "score": "0.4616128", "text": "function organizeFieldData(xmlObj)\n{\n var retObj = {};\n\n retObj[\"rawData\"] = rawFieldData(xmlObj);\n retObj[\"metaData\"] = metaFieldData(xmlObj);\n\n return(retObj);\n}", "title": "" }, { "docid": "694cbbf52fda9095ea36a9510a5f79e4", "score": "0.46133888", "text": "async function prepareDataSource() {\n const orders = await fetchOrders()\n const ordersByShipCountry = orders.reduce((a, v) => {\n a[v.ShipCountry] = a[v.ShipCountry] || []\n a[v.ShipCountry].push(v)\n return a\n }, {})\n\n return Object.keys(ordersByShipCountry).map((country) => {\n const ordersInCountry = ordersByShipCountry[country]\n\n const accumulated = {}\n\n ordersInCountry.forEach((o) => {\n o.OrderDate = new Date(o.OrderDate);\n const key = o.OrderDate.getFullYear() + '/' + (o.OrderDate.getMonth() + 1);\n accumulated[key] = accumulated[key] || {\n value: 0,\n orderDate: o.OrderDate\n };\n accumulated[key].value++;\n });\n\n return {\n rows: ordersInCountry,\n country,\n accumulated\n }\n\n }).slice(0, 2)\n}", "title": "" }, { "docid": "ed79ab8feb2850620a8aa7b7a2b7109d", "score": "0.4612195", "text": "function myForStates(array/*,obj*/) {\n /*1*/ var valorDropdown = document.getElementById(\"select\").value;\n /*2*/ var arrayofstates = [];\n\n /*3*/ for (var i = 0; i < array.length; i++) {\n /*4*/ if (array[i].state/*[obj]*/ == valorDropdown || valorDropdown == \"Default\") {\n /*5*/ arrayofstates.push(array[i]);\n }\n }\n/*6*/ return arrayofstates;\n}", "title": "" }, { "docid": "621a532968252e57f02c6f87a1612c3a", "score": "0.46066692", "text": "function serializeXGridToParameter(xGrid, colArr)\n{\n\tvar result=\"\";\n\tvar rowNum = xGrid.getRowsNum();\n\tvar colsNum = xGrid.getColumnsNum();\n \n\tresult += (rowNum+\",\"+colsNum+\",\");\n \n\tfor(i = 0; i < rowNum; i++ ) {\n\t\tvar rowId = xGrid.getRowId(i);\n \n \n\t\tfor(k = 0; k < colArr.length;k++) {\n\t\t\tvar value = xGrid.cells(rowId, colArr[k]).getValue();\n\t\t\tresult += (xGrid.getColumnLabel(colArr[k]) + \",\" + value + \",\");\n\t\t}\n \n\t}\n \n\treturn result;\n \n}", "title": "" }, { "docid": "5b855fe4374d5bdb4139c03be8649226", "score": "0.46041813", "text": "function scatterPlotData() {\n\t\tconst out = []\n\t\tconst week = selectedWeek.value\n\n\t\tObject.keys(data).forEach(x => {\n\t\t\tconst value = data[x]\n\n\t\t\tif (!(selectedFactor.value in value)) return\n\t\t\tconst factor = value[selectedFactor.value]\n\n\t\t\tif (!(week in value.covid)) return\n\t\t\tconst covid = value.covid[week]\n\n\t\t\tout.push({\n\t\t\t\tcountry: x,\n\t\t\t\tname: value.name,\n\t\t\t\tcases: covid.cases,\n\t\t\t\tdeaths: covid.deaths,\n\t\t\t\tfactor: factor.value,\n\t\t\t})\n\t\t})\n\n\t\treturn out\n\t}", "title": "" }, { "docid": "cfd6ff3566a420b0ac0c3edadfaec4f4", "score": "0.46021125", "text": "function GetObjectValues(source) {\n\t var destination = [];\n\t for (var value in source) {\n\t if (source.hasOwnProperty(value)) {\n\t destination.push(source[value]);\n\t }\n\t }\n\t return destination;\n\t}", "title": "" }, { "docid": "c49d5c51aa44f650cc2390d7cd60ad36", "score": "0.4599854", "text": "formatSelectValues(valuesArray) {\n\t\t\t const data = valuesArray.map((valueItem) => {\n\t\t\t let data = {\n\t\t\t label: valueItem.nombre,\n\t\t\t value: valueItem.id\n\t\t\t }\n\t\t\t return data;\n\t\t\t })\n\t\t\t return data;\n\t\t\t}", "title": "" }, { "docid": "912bf231584b19a104555bbf2457a293", "score": "0.459958", "text": "function select(arr, obj) {\n var result = {}\n for(var i = 0; i < arr.length; i++){\n if(obj[arr[i]] !== undefined){\n result[arr[i]] = obj[arr[i]];\n }\n }\n\n return result;\n}", "title": "" }, { "docid": "bf80376ae21d199d90a982eac7171cd3", "score": "0.45992944", "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": "94d9c71a052f9fe957358f4fc0e40c85", "score": "0.45962173", "text": "function getFirstRowKeyObject(dataitem, tmp, call) {\n var arr = new Array();\n $.each(tmp, function (key, value) {\n $.each(value, function (key, value) {\n arr.length = 0;\n if (dataitem === true)\n arr.push(key);\n for (var key in value) {\n arr.push(key);\n }\n call(arr);\n });\n return false;\n });\n}", "title": "" }, { "docid": "1718b83d5813454a94aed574b8136fe2", "score": "0.45902488", "text": "static initialize(obj, country, street, postalCode, city, email, ip, documents) { \n obj['country'] = country;\n obj['street'] = street;\n obj['postal_code'] = postalCode;\n obj['city'] = city;\n obj['email'] = email;\n obj['ip'] = ip;\n obj['documents'] = documents;\n }", "title": "" }, { "docid": "9c86aa6f2a093269a831ed7128a822c5", "score": "0.45876798", "text": "static arrayDeleteEmptyItems(data,propertyNames=[]){if(!data)return data;const result=[];for(const item of Tools.arrayMake(data)){let empty=true;for(const propertyName in item)if(item.hasOwnProperty(propertyName))if(!['',null,undefined].includes(item[propertyName])&&(!propertyNames.length||Tools.arrayMake(propertyNames).includes(propertyName))){empty=false;break}if(!empty)result.push(item)}return result}", "title": "" }, { "docid": "2477805849002bd2df5e78656d02a947", "score": "0.4584543", "text": "function getElementValues(obj) {\n var result = [];\n $.each(obj, function(k, v) {\n result.push(v);\n });\n return result;\n}", "title": "" }, { "docid": "2fc067a1cb8f5c8f9c54325cd8449d4b", "score": "0.45833778", "text": "createArrayObjects(){\n \n let arr = new Array();\n \n for(let i = 0; i <this.rows; i++){\n \n arr[i] = new Array();\n \n for(let j = 0; j <this.cols; j++){\n\n let number=this.fieldNumbers[i];\n let letter=this.fieldLetters[j];\n let coord_x=(i+2)*this.width/20;\n let coord_y=(j+2)*this.height/20;\n let arr_i=i;\n let arr_j=j;\n let stateTerritory=this.stateTerritory;\n let cheskBreath=this.cheskBreath\n\n let objTerritory=new Territory(\n letter,\n number,\n coord_x,\n coord_y,\n arr_i,\n arr_j,\n stateTerritory,\n cheskBreath\n );\n\n arr[i][j] = objTerritory; \n };\n };\n\n return arr;\n\n }", "title": "" }, { "docid": "ebb310fb33f886c57761669283b9bf48", "score": "0.45783013", "text": "function ostk_getListByKey(obj, key){\n var array = Array();\n for(var i = 0 ; i < obj.length ; i++){\n \tvar item = obj[i];\n array.push(item[key]);\n }//foreach\n return array;\n}", "title": "" }, { "docid": "16159749b25fda58b1b94938d0709cad", "score": "0.45700583", "text": "function createObjects(objProperty, i = 0, array = []) {\n // if (!objProperty[0] && !objProperty[1]) {\n // throw \"Error: Missing information\";\n // }\n\n // try {\n let keys = objProperty[0];\n let values = objProperty[1];\n let obj = {};\n\n if (Array.isArray(values[i])) {\n keys.forEach(function (key, index) {\n obj[key] = values[i][index];\n });\n array.push(obj);\n if (++i < values.length) {\n createObjects(objProperty, i, array);\n }\n } else {\n keys.forEach(function (key, index) {\n obj[key] = values[index];\n });\n array.push(obj);\n }\n return array;\n // } catch (e) {\n // console.log(e);\n // }\n}", "title": "" }, { "docid": "ca98b70cc78815e65e88a6eada1ed512", "score": "0.45624655", "text": "values(x) {\n\t\treturn this\n\t}", "title": "" }, { "docid": "609cca5382204893d4b948e06a401eca", "score": "0.45601273", "text": "function toArray(obj, kernel) {\n\tvar ret = [],\n\t\titem;\n\tfor (var key in obj) {\n\t\t// if ((item = kernel == null ? obj[key] : kernel(key, obj[key])) !== undefined) {\n\t\tif ((item = evalKernel(kernel, key, obj[key], obj)) !== undefined) {\n\t\t\tret.push(item);\n\t\t}\n\t}\n\treturn ret;\n}", "title": "" }, { "docid": "5bcf7736972b235950ca19bb756f02c7", "score": "0.45586145", "text": "function loadMappingArray() {\n \n request = new Request(\"SELECT Title, AssignedTE, AssignedBE FROM dbo.PartnerIsvs\", function(err) {\n if (err) {\n console.log(err);\n arrayErr.push(err);\n }\n else {\n console.log('SQL request succeeded');\n arrayErr.push(\"SQL request succeeded\");\n }\n });\n\n //unpack data from SQL query\n request.on('row', function(columns) {\n columns.forEach(function(column) {\n if (column.value === null) {\n arrayIsvTE.push('');\n } else {\n arrayIsvTE.push(column.value);\n }\n });\n }); \n\n connection.execSql(request);\n }", "title": "" }, { "docid": "eadeaa27f7bf7bf221d31d739ba1c929", "score": "0.4555103", "text": "function datatable_fields_array_from_custom_fields(custom_fields){\n l = []\n custom_fields.forEach(function(custom_field){\n new_dictionary = {data:custom_field, name: custom_field,title:custom_field}\n l.push(new_dictionary)\n })\n return l \n}", "title": "" }, { "docid": "3db8a28382f46f0f932b965cddb9d182", "score": "0.45545164", "text": "function generateData() {\n var sin = [];\n var x = window.x;\n var y = window.y;\n\n\n for(var i = 0; i < x.length; i++)\n {\n sin.push({ x:x[i], y:y[i] });\n }\n\n //Returns an object to map the set of data points\n return [\n {\n area:true,\n values: sin,\n key: window.company,\n }\n ]\n}", "title": "" }, { "docid": "ee2daef5236161b69efddedf285aa38b", "score": "0.45528692", "text": "function objValues(obj) {\n let values = [];\n for (let key in obj) {\n values.push(obj[key]);\n }\n return values;\n}", "title": "" }, { "docid": "fb5e1dc880d2fc522ba8523eef5ec238", "score": "0.45487225", "text": "function buildAllCityArray() {\n self.allCityArray([]);\n self.allCityArray.push( {\n country : \"SA\", City : \"Riydh\"\n });\n self.allCityArray.push( {\n country : \"SA\", City : \"Jeddah\"\n });\n self.allCityArray.push( {\n country : \"SA\", City : \"Haradh project\"\n });\n self.allCityArray.push( {\n country : \"JO\", City : \"Amman\"\n });\n self.allCityArray.push( {\n country : \"BH\", City : \"Al Manamah\"\n });\n self.allCityArray.push( {\n country : \"BH\", City : \"Al Manamah\"\n });\n self.allCityArray.push( {\n country : \"CA\", City : \"Candiac\"\n });\n \n }", "title": "" }, { "docid": "62d6f2647a784ec2776440c815a41b98", "score": "0.45482963", "text": "static convertObjectToArray(obj){\n return Object.keys(obj).map(function (key) { return obj[key]; });\n }", "title": "" }, { "docid": "8c0a889b399b22209f46bbb531741d3d", "score": "0.45465153", "text": "function load_data(data_from_file, data_object, field_names, top_level_node) {\n $.each($(data_from_file).find(\"Root\").find(\"Row\"), function(index, raw_data) { \n\tvar data = $(raw_data);\n\tvar key = data.find(top_level_node).text().replace(/ /gi, \"_\").toLowerCase();\n\n\tdata_object[key] = Array();\n\t\n \t$.each(field_names, function (index, field_name) {\n \t var value = data.find(field_name).text();\n\t var field_name_key = field_name.toLowerCase();\n\t //console.log(\"[\" + top_level_node + \"] \" + \"(\" + key + \") \" + field_name_key + \": \" + value);\n\n \t data_object[key][field_name_key] = value;\n \t});\n\n });\n return data_object;\n}", "title": "" }, { "docid": "3638076475e735c758b06cedcbd2d7b3", "score": "0.45436764", "text": "function loadMappingArray() {\n \n request = new Request(\"SELECT Title, AssignedTE, AssignedBE FROM dbo.PartnerIsvs\", function(err) {\n if (err) {\n console.log(err);\n arrayErr.push(err);\n }\n else {\n arrayErr.push(\"SQL request succeeded\");\n }\n });\n\n//unpack data from SQL query\n request.on('row', function(columns) {\n columns.forEach(function(column) {\n if (column.value === null) {\n arrayIsvTE.push('');\n } else {\n arrayIsvTE.push(column.value);\n }\n });\n }); \n\n connection.execSql(request);\n }", "title": "" }, { "docid": "0afe0aaa16bd2209856aa3bf9bac673b", "score": "0.45402145", "text": "function getValues(obj, key) {\n var objects = [];\n for (var i in obj) {\n if (!obj.hasOwnProperty(i)) continue;\n if (typeof obj[i] == 'object') {\n objects = objects.concat(getValues(obj[i], key));\n } else if (i == key) {\n objects.push(obj[i]);\n }\n }\n return objects;\n }", "title": "" }, { "docid": "7d3cdbf4c1438e3bf352c992246ab4dd", "score": "0.45383632", "text": "function update_dataset() {\n dataset = [];\n x_values = []\n y_values = []\n for (var i in mydata) {\n\n group = []\n if (p1 in mydata[i] && p2 in mydata[i] && p3 in mydata[i]) {\n value_x = mydata[i][p1]\n value_y = mydata[i][p2]\n value_z = mydata[i][p3]\n\n if (typeof(value_x) === 'number' && typeof(value_y) === 'number' && typeof(value_z) === 'number' && mydata[i]['City']) {\n group.push(value_x, value_y, value_z, mydata[i]['City'])\n x_values.push(value_x)\n y_values.push(value_y)\n dataset.push(group)\n // console.log(group)\n }\n\n }\n }\n // console.log(dataset)\n\n }", "title": "" }, { "docid": "8abb025e0370b8829f5b118a2f3ba26b", "score": "0.45379272", "text": "getObjectKeys(obj){\n\t\tlet arr = '';\n\t\tObject.keys(obj).map(function(keyName, keyIndex) {\t\t\t\n\t\t\tarr = obj[keyName]['name'];\n\t\t})\n\t\treturn arr;\n\t}", "title": "" } ]
abae7c50a5527ab8ceaaf4b8074042bc
Returns a nearby bee, between the minDistance and the maxDistance ahead. If multiple bees are the same distance, a random bee is chosen
[ { "docid": "c1c96383166e020800c22f7af55f6899", "score": "0.8331553", "text": "getClosestBee(minDistance, maxDistance) {\n\t\tvar p = this;\n\t\tfor(var dist = 0; p!==undefined && dist <= maxDistance; dist++)\n\t\t{\n\t\t\tif(dist >= minDistance && p.bees.length > 0) {\n\t\t\t\treturn p.bees[Math.floor(Math.random()*p.bees.length)]; //pick a random bee\n }\n\t\t\tp = p.entrance;\n\t\t}\n\t\treturn undefined; //no bee found\n }", "title": "" } ]
[ { "docid": "d1442c4d951ef7dea4aed0af61623a2c", "score": "0.57651585", "text": "function getNearest()\n{\n var dist = Number.MAX_VALUE;\n for (count = 0; count<ridesLatLng.length; count++){\n var temp = toMiles(google.maps.geometry.spherical.computeDistanceBetween(me, ridesLatLng[count]));\n if (temp < dist){\n dist = temp;\n }\n }\n return dist;\n}", "title": "" }, { "docid": "5777485a6b7c2b01ddbdc4c37d157997", "score": "0.5741388", "text": "function isNear(value, target, maxDistance) {\n if (target === void 0) { target = 0; }\n if (maxDistance === void 0) { maxDistance = 0.01; }\n return Object(_popmotion_popcorn__WEBPACK_IMPORTED_MODULE_2__[\"distance\"])(value, target) < maxDistance;\n}", "title": "" }, { "docid": "c2a1f739da580de235729bc85c69a8fe", "score": "0.57095253", "text": "function getClosest(beacons, min = -60) {\n var closest = null;\n var minDistance = min;\n for (var beaconID in beacons) {\n if (isBeaconIDValid(beaconID)) {\n var distance = beacons[beaconID];\n if (distance > minDistance) {\n closest = beaconID;\n minDistance = distance;\n }\n }\n }\n return closest;\n}", "title": "" }, { "docid": "64f288de1f0ced0f11b486e60f9a933d", "score": "0.5629686", "text": "function randomBroj(min, max) {\n return Math.floor(Math.random() * (max - min) ) + min;\n }", "title": "" }, { "docid": "5facae0b32902e74aa88ac0cf09f28f5", "score": "0.55892456", "text": "function isNear(value, target, maxDistance) {\n if (target === void 0) { target = 0; }\n if (maxDistance === void 0) { maxDistance = 0.01; }\n return distance(value, target) < maxDistance;\n}", "title": "" }, { "docid": "71bea84bb43d5f463f656dec273d2df1", "score": "0.5587009", "text": "function getNearestElevator(btnFloorNum){\n \n let minDistance = numOfFloors;\n let bestElevator = null;\n\n for (elevator = 0; elevator < numElevators; elevator++ ){\n\n let currElevator = arrayOfElevators[elevator];\n let finalDest = currElevator.queue.length !== 0 ? currElevator.queue[currElevator.queue.length - 1] : currElevator.currentFloor;\n let dist = Math.abs(btnFloorNum - finalDest);\n\n // checks if min value needs to be updated\n if (dist < minDistance) {\n\n minDistance = dist;\n bestElevator = currElevator;\n }\n }\n return bestElevator;\n}", "title": "" }, { "docid": "e1541434cde2340e4964874438384552", "score": "0.55842763", "text": "function pickBestRandom() {\n randomNumber = Math.floor(Math.random() * bestPositions.length);\n computerNextMove = bestPositions[randomNumber];\n return;\n }", "title": "" }, { "docid": "9ca0c03bf1b07fe66d074186ce0b8d76", "score": "0.55668133", "text": "function isNear(value, target, maxDistance) {\n if (target === void 0) { target = 0; }\n if (maxDistance === void 0) { maxDistance = 0.01; }\n return (0,popmotion__WEBPACK_IMPORTED_MODULE_0__.distance)(value, target) < maxDistance;\n}", "title": "" }, { "docid": "d1ab60a88c3ff05d9f0916d51706d384", "score": "0.5555513", "text": "function checkDist(){\n let closestDist;\n let maxDist = 1000;\n\n //for each value in the points array, check to define which value is the lowest.\n points.forEach(element => {\n if(shapeToMove.dist(element) < maxDist){\n //assign the maxDist to the lowest value in the array\n maxDist = shapeToMove.dist(element);\n //closest distance will be the lowest distance value in the array when compared to the shapeMove\n closestDist = element;\n }\n });\n //Return the closestDist value\n return closestDist;\n}", "title": "" }, { "docid": "53bdff439fb2a7d77b8c2486e21783c5", "score": "0.5551273", "text": "min_random() {\n let reduced_range = this.better_random() * .75;\n if (reduced_range >= 0) reduced_range += .25;\n else reduced_range -= .25;\n return reduced_range;\n }", "title": "" }, { "docid": "8166f1c866f265f8a36f2b04169b49ea", "score": "0.5541475", "text": "function generatePointReboundsFauls(max){\n return Math.floor(Math.random()*(max-1+1));\n }", "title": "" }, { "docid": "108b95b5e6fa95e580cbafffdf3e748f", "score": "0.5529903", "text": "function exports(min, max, floating)\n {\n if (max == null)\n {\n max = min;\n min = 0;\n }\n\n var rand = Math.random();\n\n if (floating || min % 1 || max % 1)\n {\n return Math.min(min + (rand * (max - min + parseFloat('1e-' + ((rand + '').length - 1)))), max);\n }\n\n return min + Math.floor(rand * (max - min + 1));\n }", "title": "" }, { "docid": "a4a8e27f1a1297bdfb7d7d0cef38fb57", "score": "0.55211425", "text": "function findFurthestEnemy() {\n var enemies = hero.findEnemies();\n var furthestEnemy = null;\n var maxDistance = 0;\n var enemyIndex = 0;\n while (enemyIndex < enemies.length) {\n var currentEnemy = enemies[enemyIndex];\n // Find the distance to currentEnemy:\n var dis = hero.distanceTo(currentEnemy);\n // If that distance greater than maxDistance:\n if(dis > maxDistance){\n // Reassign furthestEnemy to currentEnemy:\n furthestEnemy = currentEnemy;\n // Reassign maxDistance to the distance:\n dis = maxDistance;\n }\n enemyIndex++;\n }\n return furthestEnemy;\n \n}", "title": "" }, { "docid": "27cac725466609e0cd256d317fb17b88", "score": "0.5513067", "text": "randomPositionFromRange(min, max) {\n return (\n Math.floor(Math.random() * (max - min + 1) + min) * this.game.blockSize\n );\n }", "title": "" }, { "docid": "798273cb0b453fe4be91ffc2575c434a", "score": "0.54835385", "text": "function BonusAiens() { // empty parma to since its random we can past new ships\n let Range = [7, 8, 9, 10]\n let bAliens = Range[Math.floor(Math.random() * Range.length)]// randomizing \n return bAliens // returning what we requested\n }", "title": "" }, { "docid": "e8fea9c0ebb3d5dc811f16db192615a3", "score": "0.54645073", "text": "function randomBall(min, max) {\n return Math.round(min + Math.random() * (max - min)); //Defining the minimum and maximum bounds for the game\n\n }", "title": "" }, { "docid": "dce45b680c52889de4aac7e73ed3b597", "score": "0.5461304", "text": "function hasard(max){\n let min = 0;\n\treturn Math.floor(Math.random() * (max - min)) + min; \n}", "title": "" }, { "docid": "f29b1f1a4bee072fcc471e720bbcc17e", "score": "0.54602665", "text": "function isNear(value, target, maxDistance) {\n if (target === void 0) { target = 0; }\n if (maxDistance === void 0) { maxDistance = 0.01; }\n return Object(__WEBPACK_IMPORTED_MODULE_0_popmotion__[\"n\" /* distance */])(value, target) < maxDistance;\n}", "title": "" }, { "docid": "e6b7e08eb5635aed3155c3d2c27a04b1", "score": "0.5423331", "text": "function randomDifference(max) {\n\tvar diff = Math.floor(Math.random() * max);\n\tdiff *= Math.floor(Math.random() * 2) == 1 ? 1 : -1;\n\treturn diff;\n}", "title": "" }, { "docid": "e6b7e08eb5635aed3155c3d2c27a04b1", "score": "0.5423331", "text": "function randomDifference(max) {\n\tvar diff = Math.floor(Math.random() * max);\n\tdiff *= Math.floor(Math.random() * 2) == 1 ? 1 : -1;\n\treturn diff;\n}", "title": "" }, { "docid": "46bdc187583f1ca3dde2ccff57bd405d", "score": "0.5421428", "text": "function getFarest() {\n var farest = Object.keys(floors)[0];\n var firstDistance = Math.abs(farest - currentFloor);\n\n for (var floor in floors) {\n if (Math.abs(floor - currentFloor) > firstDistance) {\n farest = floor;\n }\n }\n\n return farest;\n }", "title": "" }, { "docid": "3fd6e64717dcaf350cecc06c1260295a", "score": "0.5420405", "text": "function randomCoordinate() {\n\tvar magnitude = Math.floor(Math.random() * 6); // get magnitude\n\tvar chance = Math.floor(Math.random() * 2); // chance that it's + or -\n\n\tif (chance == 1) {\n\t\treturn magnitude * -1;\n\t}\n\telse {\n\t\treturn magnitude;\n\t}\n}", "title": "" }, { "docid": "a47c3f952b51f7b2159fd4aeafea57b8", "score": "0.54060477", "text": "function generaBombe(min, max) {\n var random = Math.floor(Math.random()* (max-min+1))+ min;\n return random;\n}", "title": "" }, { "docid": "d7647ec411c10697e0e65f379ace0fc6", "score": "0.53958374", "text": "function randomFloatWithBias(min,max){\r\n /*var rand = Math.random();\r\n rand = Math.pow(rand,bias);\r\n return (rand*(max-min)+min);*/\r\n return (Math.random() * Math.random() * max) + min;\r\n \r\n}", "title": "" }, { "docid": "1833965eed0fdd0e09654b931babdbb2", "score": "0.5395006", "text": "function chooseMoleHill (min, max) {\n max = (moleHill.length-1);\n min = 0;\n return Math.floor(Math.random() * (max - min + 1) + min);\n}", "title": "" }, { "docid": "89a4a7fe8830f2c21377d0c164d033e7", "score": "0.5367407", "text": "function randomEntre(min, max) {\n return Math.floor( Math.random() * (max-min + 1) + min );\n}", "title": "" }, { "docid": "0b4f638a21674243602744b09d0e5bd7", "score": "0.5361795", "text": "function randomEntre( min, max) {\n\treturn Math.floor( Math.random() * (max - min + 1) + min );\n}", "title": "" }, { "docid": "9d698eb170bd0b80c868aca88033ca73", "score": "0.5348544", "text": "function isNear(value, target, maxDistance) {\n if (target === void 0) { target = 0; }\n if (maxDistance === void 0) { maxDistance = 0.01; }\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0_popmotion__[\"v\" /* distance */])(value, target) < maxDistance;\n}", "title": "" }, { "docid": "0466e511435dbe38c3c726138dd3b8cc", "score": "0.53456485", "text": "function generatePosition(min, max) {\n return Math.random() * (max - min) + min;\n}", "title": "" }, { "docid": "ab42fec10d47e5fa0d7ba7c1faf1169b", "score": "0.5344442", "text": "function getDeviceDistance(min, max){\n return Math.floor(Math.random() * (max - min)) + min;\n}", "title": "" }, { "docid": "c13d86723752e922a239abeda51cfe2b", "score": "0.5340117", "text": "function getEnemyClosestToAlly(){\n\t//load values\n\tvar distances = [];\n\tvar dictionary = [];\n\tvar enemies = getEnemies();\n\tfor(var i=0;i<enemies.length;i++){\n\t\tvar enemy = enemies[i];\n\t\tvar dist = distanceBetween(enemy,getClosestTeammate(enemy));\n\t\tdistances.push(dist);\n\t\tvar item = {\n\t\t\tdistance: dist,\n\t\t\tenemy: enemy,\n\t\t}\n\t\tdictionary.push(item);\n\t}\n\t\n\t//find closest value\n\tvar closest = distances.sort()[0];\n\t//find teammate with that value\n\tfor(var i=0;i<enemies.length;i++){\n\t\tif(dictionary[i].distance == closest){\n\t\t\treturn dictionary[i].enemy\n\t\t}\n\t}\n\t\n\t//some sort of error...\n\treturn enemies[0];\n}", "title": "" }, { "docid": "760503e54ca770db2c9b2c3466c7facd", "score": "0.53341895", "text": "function offset(min, max) {\n return min + Math.floor(Math.random() * (max + 1 - min));\n}", "title": "" }, { "docid": "0e9fb43c34427e75b61596139d260439", "score": "0.5328297", "text": "function ezRandom(min, max)\n{\n\treturn Math.floor(Math.random() * (max - min) ) + min;\n}", "title": "" }, { "docid": "d1b4ba1b825b2d9ad2bd65518bb18b47", "score": "0.53193694", "text": "function GetRandomBetween(max, min)\n{\n return Math.random() * (max - min) + min;\n}", "title": "" }, { "docid": "449c357213b39679a64f2d1ef762374c", "score": "0.5307676", "text": "static calcNearPointOnAABB(targetPoint, minBoxPoint, maxBoxPoint) {\n let nearPoint = targetPoint.clone();\n\n if (nearPoint.x < minBoxPoint.x) {\n nearPoint.x = minBoxPoint.x;\n } else if (nearPoint.x > maxBoxPoint.x) {\n nearPoint.x = maxBoxPoint.x;\n }\n\n if (nearPoint.y < minBoxPoint.y) {\n nearPoint.y = minBoxPoint.y;\n } else if (nearPoint.y > maxBoxPoint.y) {\n nearPoint.y = maxBoxPoint.y;\n }\n\n if (nearPoint.z < minBoxPoint.z) {\n nearPoint.z = minBoxPoint.z;\n } else if (nearPoint.z > maxBoxPoint.z) {\n nearPoint.z = maxBoxPoint.z;\n }\n\n return nearPoint;\n }", "title": "" }, { "docid": "4bbac09369d8d15aacc5a73f57d455ca", "score": "0.5299246", "text": "function nbAlea(min, max) {\n return Math.floor(Math.random() * (max - min+1)) + min;\n }", "title": "" }, { "docid": "b4192efbc19ef7fbe7365d20724a119f", "score": "0.5298091", "text": "function getNearest(beaconId) {\n var baseStations = beacons[beaconId];\n // If only one base station is in range of the beacon,\n // return the address of the base station.\n /*if (Object.keys(baseStations).length === 1) {\n return Object.keys(baseStations)[0];\n }*/\n \n // Search for the basestation that is closest to the beacon\n // and return the address of the base station.\n var nearestBaseStation = null;\n var distance = 1000;\n for (var address in baseStations) {\n if (baseStations.hasOwnProperty(address)) {\n if (baseStations[address].prediction < distance) {\n distance = baseStations[address].prediction;\n nearestBaseStation = address;\n }\n }\n }\n return nearestBaseStation;\n}", "title": "" }, { "docid": "303b5e9920eb4fe0c26625d5df775d4c", "score": "0.52814865", "text": "getRandomPos(min, max) {\n return Math.floor(Math.floor(Math.random() * (max - min + 1) + min) / this.squareSize) * this.squareSize;\n }", "title": "" }, { "docid": "a451c44bcc3ee78c71e317eeb53aabda", "score": "0.527438", "text": "function dist_min(rando){\n //Call function to create lines between each random point and transit stop\n var line=Merged.map(linecreate)\n function linecreate(trando){\n //var transitcoords = ee.Geometry.Point(trando.lon, trando.lat)\n //var randcoords = ee.Geometry.Point(rando.lon, rando.lat)\n var Lines=ee.Geometry.LineString({coords:[trando.geometry(),rando.geometry()], geodesic : true});\n return trando.set({'Length':Lines.length()})\n \n }\n var mini=line.aggregate_min('Length')\n return rando.set({'Mindis':mini})\n \n \n}", "title": "" }, { "docid": "a5070335490e0d49aa696447fd5a432f", "score": "0.52739173", "text": "function randomPick(max, min) {\n return Math.random() * (max - min) + min\n}", "title": "" }, { "docid": "4ac90854daf457336688b745ee87eb5d", "score": "0.5254978", "text": "function randomFromRange(minNumber,maxNumber) {\n var numberToMatch = Math.floor(Math.random() * (maxNumber-minNumber+1)+minNumber);\n return numberToMatch;\n }", "title": "" }, { "docid": "a55cf94950c8bd3f425649fed5f83a0d", "score": "0.5251245", "text": "function getZombieGuess() {\n\treturn getRandomIntInclusive(1, 5);\n}", "title": "" }, { "docid": "e3b2f6c95395117a599038c52bcc21f5", "score": "0.52445656", "text": "function randGPSFloatBetween(min, max) {\n return parseFloat((Math.random()*(max-min)+min).toFixed(10));\n}", "title": "" }, { "docid": "d8a51a901fb45c70b2d0bdb852eee8e0", "score": "0.5222205", "text": "function ourRandomRange(ourMin, ourMax) {\n\n return Math.floor(Math.random() * (ourMax - ourMin + 1)) + ourMin;\n}", "title": "" }, { "docid": "6c7a15866dd93d7930a3b6cd4b4ad6f9", "score": "0.52209044", "text": "function randomize(min,max){\r\n\tnum = Math.ceil((Math.random()*(max-min))+min);\r\n\treturn Math.abs(num);\r\n}", "title": "" }, { "docid": "5cc44b0ac1c1abd98a1e0f20dd8f762d", "score": "0.52207065", "text": "function randomStartSpot(min, max){\n\treturn Math.floor((Math.random() * (max - min) + min));\n}", "title": "" }, { "docid": "92ca5d742f47f876a4ff02b350c8cb82", "score": "0.5218256", "text": "function randomFloatWithBias2(min,max){\r\n return (Math.random() * Math.random() * max) + min;\r\n \r\n}", "title": "" }, { "docid": "6e43c72f17935bf3b59102a5cf8d7ddd", "score": "0.5208457", "text": "randomNumberWithinRange(maxNumber, minNumber){\n return Math.random()*(maxNumber-minNumber)+minNumber;\n }", "title": "" }, { "docid": "cbf4d594000e66d49f4f346540bc45c9", "score": "0.51986927", "text": "function nearAverageRandom(startNum, min, max){\n //console.log (\"nearAverageRandom run with: \"+min+\" \"+max+\" \"+startNum);\n var num = Math.floor(((max-min)/10)+1);\n for (var i = 0; i < 10; i++) {\n var negNum = -1*Math.abs(num);\n var smallNum = randNum(negNum,num);\n startNum += smallNum;\n // console.log (\"the nearAverageRandom numbers were: \" +num+\" \"+smallNum+\" \"+startNum);\n if (startNum >max){startNum = max;}\n if (startNum <min){startNum = min;}\n }\n //console.log (\"the nearAverageRandom numbers were: \" +num+\" \"+smallNum+\" \"+startNum);\n return startNum;\n}", "title": "" }, { "docid": "39919f95416060bc57859ee555b111d0", "score": "0.5197908", "text": "function getRandomPos(min, max) {\n return (Math.floor((Math.random() * (max-min) + min)/10) * 10 );\n}", "title": "" }, { "docid": "4c62b01cd10ea43226b4d97047adeec5", "score": "0.51939255", "text": "function randomizer(max,min){\n return Math.round(Math.random()*max-min)+min;\n}", "title": "" }, { "docid": "fb7a69d7f2a9c11a2bd1d16f48e78f80", "score": "0.51919645", "text": "function rand_float(min, max) {\n try {\n return chance.floating({min: min, max: max});\n }\n catch (e) {\n return chance.floating({min: max, max: min});\n }\n}", "title": "" }, { "docid": "95c104a8d2b41c03b0c99d914e7186fb", "score": "0.5172621", "text": "function numberFlower (min, max) {\n\n var numeri = parseInt(Math.floor(Math.random() * max - min + 1)) + min;\n return numeri;\n}", "title": "" }, { "docid": "6aaf54786e01afd58c47b32282804725", "score": "0.5164928", "text": "function rdmGenBounds(min, max) { return Math.floor(Math.random() * (max - min)) + min }", "title": "" }, { "docid": "83ef7c908e0cd359e86fb1a3e818dc9e", "score": "0.51604015", "text": "function randomFloatBetween(minValue,maxValue){\n return parseFloat(Math.min(minValue + (Math.random() * (maxValue - minValue)),maxValue));\n}", "title": "" }, { "docid": "76153ba6ec93e746a1bf3402174d9e61", "score": "0.51538795", "text": "function attackValue(){\n let min = 15;\n let max = 25;\n return Math.floor(Math.random() * (max-min+1)+min)\n}", "title": "" }, { "docid": "75534a691b577b4169f037212b322d75", "score": "0.51481056", "text": "function randomPick(min, max) {\n return Math.floor(Math.random() * (max - min + 1)) + min;\n}", "title": "" }, { "docid": "02ae760d95aa71fe878675520e944260", "score": "0.5140521", "text": "nearestEnemy(enemies) {\n var arrayEnemies = Array.from(enemies);\n if (enemies.size != 0) {\n var nearestEnemy = arrayEnemies[0];\n var min = Math.sqrt(Math.pow(this.pos.getx() - nearestEnemy.getPos().getx(), 2)\n + Math.pow(this.pos.gety() - nearestEnemy.getPos().gety(), 2));\n for (var i = 1; i < arrayEnemies.length; ++i) {\n var e = arrayEnemies[i];\n var dist = Math.sqrt(Math.pow(this.pos.getx() - e.getPos().getx(), 2)\n + Math.pow(this.pos.gety() - e.getPos().gety(), 2));\n if (min > dist) {\n nearestEnemy = e;\n min = dist;\n }\n }\n if (this.scale >= min) {\n return nearestEnemy;\n }\n }\n return null;\n }", "title": "" }, { "docid": "0f46749d72c1fbb00170d54da4c25d9d", "score": "0.5139932", "text": "function getRandomFreePos(startPos, distance) {\n var x, y;\n do {\n x = startPos.x + Math.floor(Math.random() * (distance * 2 + 1)) - distance;\n y = startPos.y + Math.floor(Math.random() * (distance * 2 + 1)) - distance;\n }\n while ((x + y) % 2 != (startPos.x + startPos.y) % 2 || Game.map.getTerrainAt(x, y, startPos.roomName) == 'wall');\n return new RoomPosition(x, y, startPos.roomName);\n}", "title": "" }, { "docid": "637ffd076df42cc643bc15f3b6c2eb23", "score": "0.5138749", "text": "function randomLocation() {\n var latitude = (Math.random() * (latTo - latFrom) + latFrom).toFixed(6) * 1;\n m = (lngFrom - lngTo) / (latFrom - latTo);\n var longitude = (m * (latitude - latTo) + lngTo) + (((Math.random() > 0.5) ? -1 : 1) * (Math.random() / 10));\n return [latitude, longitude];\n}", "title": "" }, { "docid": "69d8789d7761639dc0ae9ce9ce4e39c7", "score": "0.5135833", "text": "function randomUpTo(randomMax) {\n return ((Math.floor(Math.random() * (randomMax + 1))))\n}", "title": "" }, { "docid": "b97a6b33839468279ca6d3196325017c", "score": "0.5134074", "text": "function findRandomNumber(min, max) {\n let random = Math.round(Math.random() * (max - min) + min);\n return random;\n}", "title": "" }, { "docid": "8e5153fceb473a6df76c9b6bd5ada236", "score": "0.5130783", "text": "getRandomFloat(min, max) {\n\t\t return (Math.random() * (max - min)) + min;\n\t}", "title": "" }, { "docid": "788cb2141c821ce65757aae808d9950a", "score": "0.5130003", "text": "function randomWaktu(min, max) {\n return Math.round(Math.random() * (max - min) + min);\n}", "title": "" }, { "docid": "286973df7ced0c4f7bb037cfa63dcaaf", "score": "0.51271784", "text": "function randomized(){\n const MIN = 0.22;\n const MAX = 1.9;\n \n return Math.random() * (MAX - MIN) + MIN;\n}", "title": "" }, { "docid": "a37d10f5185cf96776d0b3ff5dfe3855", "score": "0.5126638", "text": "function between(min, max) { \n return Math.floor(\n Math.random() * (max - min) + min\n )\n }", "title": "" }, { "docid": "5322fd82d71e74dfb5bc8872541bccd6", "score": "0.5123811", "text": "function BoundedRandom(min, max)\n{\n\treturn (Math.random() * (max - min)) + min;\n}", "title": "" }, { "docid": "150becad37ae3d49418e49ff91e32603", "score": "0.51235044", "text": "function selectInterest(min, max) {\n var selection = Math.floor(\n Math.random() * (max - min) + min\n )\n return selection\n}", "title": "" }, { "docid": "f264f1e97aaf38237745c9503ae9c5bb", "score": "0.5122626", "text": "function getRandomArbitrary(min, max) {\n /*\n | \n | Returns a random number between two other numbers\n |\n */ \n return Math.random() * (max - min) + min\n}", "title": "" }, { "docid": "4916b4afde67bb3a615467f3f4641e45", "score": "0.5122558", "text": "function randomBetween(a, b) {\r\n return Math.floor(Math.random() * (b - a)) + a;\r\n}", "title": "" }, { "docid": "c1718b8405885873113174348c150bbf", "score": "0.5121889", "text": "function closestToTheMark(player1, player2){\n const theMark = Math.floor(Math.random() * 100)\n console.log(`If theMark is ${theMark}...`);\n // ADD CODE HERE\n if(player1-theMark<player2-theMark){\n return \"Player 1 is closest\"\n } else {\n return \"Player 2 is closest\"\n }\n }", "title": "" }, { "docid": "f131b777075a21c88c043dcdcaa43fe5", "score": "0.51185435", "text": "function Randomvalue(max, min) {\n return Math.floor(Math.random() * (max - min + 1)) + min;\n}", "title": "" }, { "docid": "da1245ee349eadb5ef74c39c67ecb3f3", "score": "0.5116487", "text": "function findPositionInBounds() {\r\n // We would like the position to be on the edge of the bounds\r\n var x = 0, y = 0;\r\n var offsetShort = Math.random() * boundWidth;\r\n var offsetLong = 0;\r\n\r\n // Use left/right bound\r\n if (Math.round(Math.random()) == 0) {\r\n y = Math.random() * (bounds[3] - bounds[2]) + bounds[2];\r\n // Use left bound\r\n if (Math.round(Math.random()) == 0)\r\n x = bounds[0] + offsetShort;\r\n // Use right bound\r\n else\r\n x = bounds[1] - offsetShort;\r\n }\r\n // Use upper/lower bound\r\n else {\r\n x = Math.random() * (bounds[1] - bounds[0]) + bounds[0];\r\n // Use upper bound\r\n if (Math.round(Math.random()) == 0)\r\n y = bounds[2] + offsetShort;\r\n // Use lower bound\r\n else\r\n y = bounds[3] - offsetShort;\r\n }\r\n\r\n return coorToPos(Math.round(x), Math.round(y));\r\n}", "title": "" }, { "docid": "e210179d608fa8c734c9d6ba4b507810", "score": "0.51121163", "text": "function tools_random2(min, max){\n var delta = max - min;\n return Math.floor(Math.random()*delta)+min;\n}", "title": "" }, { "docid": "291046b18439c659b7efd5fcab2bb8f4", "score": "0.51065266", "text": "static randomPoint(max = 1.0) {\n return Point.random().multiply(max);\n }", "title": "" }, { "docid": "65a63e0219a453564b868768d18e63d0", "score": "0.51048756", "text": "function ran(min, max) \n { \n return Math.floor(Math.random() * (max - min + 1)) + min; \n }", "title": "" }, { "docid": "eec65fb8f797e9e093d12ef7dc2a0c43", "score": "0.51020986", "text": "function getRandomRadius(min, max) {\n return Math.floor(Math.random()*(max-min)+min+1);\n}", "title": "" }, { "docid": "3b875dc717db642d616ac81f9f4c05f7", "score": "0.51002234", "text": "function myRandom(min, max) {\r\n return min + Math.floor(Math.round((Math.random() * (max - min))));\r\n }", "title": "" }, { "docid": "6438635e52b67d78bfa5e10fb91d0691", "score": "0.50980705", "text": "function randFloat(min, max) {\n return min + Math.random() * (max - min);\n}", "title": "" }, { "docid": "b99ec5a9cf7521f564bf18d6f0d56665", "score": "0.50952226", "text": "function getRandomBetween(min, max){\nreturn Math.floor(Math.random() * (max-min+1)+min)\n}", "title": "" }, { "docid": "3f9d2d8f9216eac2d973dd4d43f74915", "score": "0.50941473", "text": "function randomFloat(max) {\n if (max) {\n return Math.random() * max;\n } else {\n return Math.random();\n }\n }", "title": "" }, { "docid": "53c153e57ab2cefdcea1faaa643a2391", "score": "0.5093653", "text": "function randomValue(min, max) { // min and max included \n return Math.floor(Math.random() * (max - min + 1) + min);\n}", "title": "" }, { "docid": "50222fcb7ceb7b8f20e42f92b1c6ceed", "score": "0.5092387", "text": "function getRandomFloat(min, max) {\n return Math.random() * (max - min) + min;\n}", "title": "" }, { "docid": "105131362214ecef3851e99dd8686764", "score": "0.50922984", "text": "function randomFloat(max) {\n if (max) {\n return Math.random() * max;\n } else {\n return Math.random();\n }\n }", "title": "" }, { "docid": "0e275b971e9acc32749274771678974e", "score": "0.5088801", "text": "function randomNumberBetween(min, max) {\n var difference = max - min;\n var randomValue = Math.random() * difference;\n return min + randomValue;\n }", "title": "" }, { "docid": "ae45c0e9a1452e3519c825cd52886133", "score": "0.50853974", "text": "function getRandomArbitrary(min, max) { return Math.random() * (max - min) + min; }", "title": "" }, { "docid": "f9293ebc386eba747d787b34e9831d5b", "score": "0.5077678", "text": "function randomBetween(min, max){\r\n return Math.floor(Math.random() * (max - min + 1)) + min;\r\n}", "title": "" }, { "docid": "a7c689c20711cd98745a31bdc0d0af4b", "score": "0.5077077", "text": "function playerWrenchDamage(){\n let min = 15;\n let max = 25;\n return Math.floor(Math.random() * (max-min+1)+min)\n}", "title": "" }, { "docid": "37932817fa1362a72b6a7efd7d3ac68a", "score": "0.5074682", "text": "function entero_aleatorio(min,max) {\n // Valor entre min y max, ambos incluidos.\n var valorEntero = Math.floor(Math.random()*(max-min+1)+min);\n return valorEntero;\n }", "title": "" }, { "docid": "06dc30a156b1730fe5f3864fede93483", "score": "0.507427", "text": "function sortear(min, max) {\n return Math.floor(Math.random() * (max - min + 1)) + min;\n}", "title": "" }, { "docid": "8300f99d33b585c11fc549714a6a1d78", "score": "0.50699675", "text": "static getRndBias(min, max, bias, influence) {\n const rnd = (Math.random() * (max - min)) + min; // random in range\n const mix = Math.random() * influence; // random mixer\n return rnd * (1 - mix) + bias * mix; // mix full range and bias\n }", "title": "" }, { "docid": "136114c7274529330e9ec6ac7266d4fa", "score": "0.50675255", "text": "function getNearest($select,value){var delta={};$select.children('option').each(function(i,opt){var optValue=$(opt).attr('value'),distance;if(optValue==='')return;distance=Math.abs(optValue-value);if(typeof delta.distance==='undefined'||distance<delta.distance){delta={value:optValue,distance:distance};}});return delta.value;}", "title": "" }, { "docid": "9418e2e32406c09f2630e1e446a61e51", "score": "0.5063006", "text": "function getRandomBtw(min, max) {\n return Math.random() * (max - min) + min;\n}", "title": "" }, { "docid": "9fdc3573b60185b807658b52568c45e3", "score": "0.50627", "text": "function randomFloat(min, max) {\r\n\treturn Math.random() * (max - min) + min;\r\n}", "title": "" }, { "docid": "83aff883393d757798bc57978bccc435", "score": "0.505965", "text": "function numAleatEnt(max,min){\n var aleatEnt=Math.floor(Math.random()*((max+1)-min))+min;\n return aleatEnt;\n}", "title": "" }, { "docid": "44b708ffbd59050ca858d8fd26728c8f", "score": "0.50550675", "text": "function get_random(Min, Max){\n return Math.floor(Math.random() * (Max - Min +1)) + Min;\n }", "title": "" }, { "docid": "6232733ed441da07e0faf188c578bbbb", "score": "0.50520027", "text": "function random(max) {\n\tvar value = Math.random() * max;\t\t\n\treturn Math.round(value) > max ? Math.floor(value) : Math.round(value);\n}", "title": "" }, { "docid": "f3cbb3acacdb38889b17b5f881f0a752", "score": "0.5049537", "text": "function randomize(min, max){\n return Math.floor(Math.random()*(max-min)+min);\n}", "title": "" }, { "docid": "89701b43e9f5b75946365bbef9a6792f", "score": "0.50483507", "text": "function getRandomFloat(min, max) {\n if (!(min < max))\n return -1;\n var shift = 0;\n if (min < 0)\n shift = Math.abs(min);\n min += shift;\n max += shift;\n var tmp = Math.random() * (max - min) + min;\n tmp -= shift;\n return tmp;\n}", "title": "" }, { "docid": "d17b295edd64f3a9a0eccb326f8780dc", "score": "0.50470674", "text": "function getRandomValue(min, max) {\n min = Math.ceil(min);\n max = Math.floor(max);\n return Math.floor(Math.random() * (max - min + 1)) + min; //The maximum is inclusive and the minimum is inclusive \n }", "title": "" } ]
c8722d7cba9a91eb88408558afe473ba
carrega a imagem da logo da empresa
[ { "docid": "94dedc467348b3fedf68a8ddbf0c4e1b", "score": "0.0", "text": "function readURLEmpresa(input) {\n if (input.files && input.files[0]) {\n var reader = new FileReader();\n reader.onload = function (e) {\n $(\"#iImgEmpresa\").attr('src', e.target.result);\n };\n reader.readAsDataURL(input.files[0]);\n }\n }", "title": "" } ]
[ { "docid": "48e792b7ca735eb27035500755cc3266", "score": "0.69192797", "text": "function refactoringLogoImage() {\n if ($scope.fileUpload) {\n $scope.app.icon = {\n name: $scope.fileUpload.name,\n link: 'images/' + $scope.app.platform + '/' + $scope.app.appID.name + '/logo' + $scope.fileUpload.name,\n state: true\n };\n }\n }", "title": "" }, { "docid": "c2222790c30f92cd4c71bef9eb316e44", "score": "0.6780282", "text": "function trocarimagem() {\n document.getElementById(\"logao\").src=\"capa/LH_HTML.png\";\n\n\n}", "title": "" }, { "docid": "bc925f66ca0230f114abc26b76e1e8e7", "score": "0.67420936", "text": "function addLogo(evt) {\n\tif (logo_enable) {\n\t\tvar image = preload.getResult(\"logo\"); // Get file from preloader by ID \n\t\tvar logo = new createjs.Bitmap(image);\n\t\tlogo.regX = logo.image.width / 2 - logo_x;\n\t\tlogo.regY = logo.image.height / 2 - logo_y;\n\t\tlogo.scaleX = logo.scaleY = logo_scale/100;\n\t\texportRoot.main.main2.logo.logocontainer.addChild(logo);\n\t\tstage.update();\n\t}\n}", "title": "" }, { "docid": "f2cd3794f0edfc9db8aa13d19b39efed", "score": "0.65319294", "text": "function logoArmee(){\r\n img1.src = 'images/armée.png';\r\n img2.src = 'images/armée.png';\r\n}", "title": "" }, { "docid": "bf92c0a2ef22737a35859b4b05394150", "score": "0.63452", "text": "function afficheLogo(oui){\n if (oui & !enAdministration) {\n try {\n if (config.Logo != \"\"){\n var l = 'url(\"/static/Informations/images/logos/' + config.Logo + '\")';\n document.getElementById(\"admin\").style.backgroundImage = l;\n }\n } catch {}\n } else {\n document.getElementById(\"admin\").style.backgroundImage = null;\n }\n}", "title": "" }, { "docid": "1a3621cd5d26f18a5d1e0c2f8c0f6268", "score": "0.6341184", "text": "function addUCLLogo() {\n\tdocument.getElementById(\"ucllogo\").innerHTML =\"<img src=' images/ucl.png'>\"\n}", "title": "" }, { "docid": "8843a11e9d8cb36d624ab0d6807d4b61", "score": "0.61862427", "text": "function logoStart() {\n console.log(\n logo({ \n name: \"MYSQL EMPLOYEE TRACKER\", \n font: \"Doom\", \n borderColor: \"bold-green\", \n logoColor: \"bold-green\", \n textColor: \"bold-green\" \n }).render());\n directory();\n}", "title": "" }, { "docid": "49053a01c9ea6f3b06c6973a429b76f9", "score": "0.61662054", "text": "function getLogo(team) {\n return \"./assets/teamlogos/\" + team + \".svg\";\n}", "title": "" }, { "docid": "d3af552771ea496dae6ee96653290a00", "score": "0.6156661", "text": "function open_logo(src) {\n var logo;\n if (isRed) {\n logo = document.getElementById(\"red_logo\");\n }\n else {\n logo = document.getElementById(\"blue_logo\");\n }\n\n var ctxLogo = logo.getContext(\"2d\");\n ctxLogo.clearRect(0, 0, logo.width, logo.height);\n\tvar img = new Image();\n img.onload = function () {\n ctxLogo.drawImage(img, 10, 10, img.width/2, img.height/5);\n };\n img.src = src;\n}", "title": "" }, { "docid": "074313f2e337d13529cc3e5d75fef414", "score": "0.6151092", "text": "blason() {\n // supprime l'image existante\n if (document.getElementsByClassName(\"blason\")[0] != undefined) {\n document.getElementsByClassName(\"blason\")[0].remove();\n }\n\n // affiche l'image\n let currentDiv = document.getElementById(\"joueur\");\n\n let img = document.createElement(\"img\");\n currentDiv.parentElement.appendChild(img);\n img.setAttribute('class', 'blason');\n\n // on définit quel est l'image que l'on doit afficher\n img.setAttribute('src', '../img/blason_du_joueur/joueur' + String(this.game.getCurrentPlayer() + 1) + '.png');\n }", "title": "" }, { "docid": "cb93794025f88a76fd8f0ebf22c191a1", "score": "0.6122976", "text": "function PluginLogo({namespace, src}) {\n const logo_src = (src !== null) ? namespace + \".\" + src : \"_logo_na.png\"\n return (<img className=\"fair-logo\" src={\"/library/logo/\" + logo_src}></img>)\n}", "title": "" }, { "docid": "6ed2a7486185173b44e342e72f312368", "score": "0.61167884", "text": "render(logo) { \n return `\n <img src=\"${logo}\" alt=\"Sergio Huertas logo\" width=\"75px\" height=\"65px\">\n `;\n }", "title": "" }, { "docid": "c47d9a983c8f4bcd3400191152196619", "score": "0.60907996", "text": "function trocarLogo(url){\n let $trocarURLdoLogo = document.querySelector('.logo-bg');\n\n $trocarURLdoLogo.setAttribute('src', './assets/img/movies/' +url)\n}", "title": "" }, { "docid": "89e1b53fb4422ddfd49e9d3e6ff85448", "score": "0.6076863", "text": "function replaceGridLogo(logo_url) {\n // Update the preview and output embed.\n //wistiaEmbed.plugin.logoOverVideo.setLogo($('#logo_url').val());\n //updateOutputEmbedOption('plugin.logoOverVideo.logoUrl', $('#logo_url').val());\n\n // Update the minimap grid.\n var $grid = $('#wlov-grid')[0];\n if ($grid.minimap) {\n $grid.minimap.clear();\n }\n\n // XXX: Move this!\n // Create the logo image element.\n var $logo = $('<img/>');\n\n // Bind a handler to the load event.\n $logo.load(function(e){\n log(\" *** Logo image loaded.\");\n try {\n $grid.minimap.addItem('logo', e.target, [parseInt($('#logo_x_offset').val()), parseInt($('#logo_y_offset').val())]);\n\n // Update the output embed code.\n var init_mapping = $grid.minimap.posFor('logo');\n updateOutputEmbedOptions({\n 'plugin.logoOverVideo.pos': init_mapping.grid,\n 'plugin.logoOverVideo.xOffset': init_mapping.offset[0],\n 'plugin.logoOverVideo.yOffset': init_mapping.offset[1]\n });\n\n $grid.minimap.on('logo-stop', function(e, mapping){\n // XXX: Deprecated.\n $('#logo_x_offset').val(mapping.offset[0]);\n $('#logo_y_offset').val(mapping.offset[1]);\n\n // Update the output embed code.\n updateOutputEmbedOptions({\n 'plugin.logoOverVideo.pos': mapping.grid,\n 'plugin.logoOverVideo.xOffset': mapping.offset[0],\n 'plugin.logoOverVideo.yOffset': mapping.offset[1]\n });\n\n if (wistiaEmbed) {\n wistiaEmbed.plugin.logoOverVideo.pos(mapping.offset[0], mapping.offset[1], mapping.grid);\n }\n });\n\n } catch (err) {\n log(\"Minimap logo add error.\", err);\n }\n });\n\n // Set the src to trigger image loading.\n $logo.attr('src', $('#logo_url').val());\n\n}", "title": "" }, { "docid": "9e1d964e66ffb735987b3bf4d06f2bca", "score": "0.60726327", "text": "function Logo(assetManager, imageString, x, y) {\n if (x === void 0) { x = 0; }\n if (y === void 0) { y = 0; }\n var _this = _super.call(this, assetManager.getResult(imageString)) || this;\n _this.regX = _this.getBounds().width * 0.5;\n _this.regY = _this.getBounds().height * 0.5;\n _this.x = x;\n _this.y = y;\n return _this;\n }", "title": "" }, { "docid": "ecdffaf7ce0c419e47c34fc0214d79dc", "score": "0.60658073", "text": "function mostraCarros() {\n for (let i = 0; i < imgCarros.length; i++) {\n image(imgCarros[i], xCarros[i], yCarros[i], tamanhoDosCarros[0], tamanhoDosCarros[1])\n }\n}", "title": "" }, { "docid": "3c1ad7abb4df73b0468e8145e7e532ed", "score": "0.6063341", "text": "function onSucessoFoto(foto) {\n // exibie a foto na tela\n $(\"#imgaluno\").attr(\"src\", \"data:image/jpeg;base64,\" + foto);\n}", "title": "" }, { "docid": "82e6259d3787002a31d6e005b88d1d43", "score": "0.6060753", "text": "function logoMer(){\r\n img1.src = 'images/marine.png';\r\n img2.src = 'images/marine.png';\r\n}", "title": "" }, { "docid": "c26b26090d9a05e98f294a0609af034c", "score": "0.6058251", "text": "function logoTerre(){\r\n img1.src = 'images/terre.png';\r\n img2.src = 'images/terre.png';\r\n}", "title": "" }, { "docid": "150df8aee5ee274dea4d836de7ae621a", "score": "0.6054496", "text": "function showCorrectMovieLogo() {\n movieLogo = randomMovie.title\n if (movieLogo === randomMovie.title) {\n var url = encodeURI(`movie-logo/${movieLogo}.svg`)\n $(\".movieLogo\").append(`<img src=\"${url}\">`)\n }\n}", "title": "" }, { "docid": "9f4a2b32cc9a7f137ed0395183cb335f", "score": "0.6038955", "text": "function getBrandLogo() {\n $http.get(self.config_['getCombinedServiceUrl']() + '/config/logo', {'responseType': 'blob'}).then(function(response) {\n if(response.status == 200) {\n //get image data as blob\n var blob = new Blob([response.data], {type: \"image/png\"});\n //convert to object url ready for display\n self.config_['brandLogo'] = (window.URL || window.webkitURL).createObjectURL(blob);\n self.config_['brandLogoExists'] = true; \n } else {\n self.config_['brandLogoExists'] = false;\n } \n }, function() {\n self.config_['brandLogoExists'] = false;\n });\n }", "title": "" }, { "docid": "0ae04a86a20baf41d0d39b105ee6c628", "score": "0.6037169", "text": "function troca_estrela(id)\n{ \n src_imagem = document.getElementById(id).src; \n ultima_barra = src_imagem.lastIndexOf(\"/\");\n imagem = src_imagem.substring(ultima_barra+1);\n \n if(imagem == 'estrela_cheia.png')\n document.getElementById(id).src = 'img/estrela_vazia.png';\n else\n document.getElementById(id).src = 'img/estrela_cheia.png';\n \n}", "title": "" }, { "docid": "628060d2a8b3f4eddb9eeae0f766bd8e", "score": "0.602231", "text": "function displayStreamLogo() {\n for(i in randomMovie.stream) {\n streamLogo = randomMovie.stream[i]\n if(randomMovie.stream[i] === \"Binge\") { // Binge logo is png, needs own src url\n $(\".rInfoStreams\").append(`<img src=\"logo-img/Binge_logo-free.png\">`)\n }\n if (streamLogo != \"Binge\")\n $(\".rInfoStreams\").append(`<img src=\"logo-img/${streamLogo}_logo.svg\">`)\n }\n}", "title": "" }, { "docid": "a700311dce05e5af56a4138b06f66424", "score": "0.6003162", "text": "function makeImage() {\n\n var toAdd = {_page: vm.pageId, type: \"IMAGE\", width: \"100%\", url: \"\", order: 0};\n\n navigate(toAdd);\n\n }", "title": "" }, { "docid": "f8f65f07e837bb2737d609126f813d1e", "score": "0.5981533", "text": "function displayProviderLogo(e){\n\n $(\".provider-uploaded-logo\").attr('src', e.target.result);\n $(\"#provider-logo-content\").addClass(\"hidden-element\");\n $(\".provider-uploaded-logo\").removeClass(\"hidden-element\");\n }", "title": "" }, { "docid": "1e1d25c3c66c8701baf22c93da46508c", "score": "0.59810525", "text": "function logoMaker(c) {\n const label = elementMaker('label');\n const logo = elementMaker('img');\n logo.setAttribute('src', `./logos/${c.symbol}.svg`);\n logo.setAttribute(`alt`, `${c.name}`);\n logo.setAttribute(`id`, `clogo`)\n logo.style.minHeight = `70px`;\n logo.style.maxHeight = `75px`;\n logo.style.maxWidth = `300px`;\n label.appendChild(logo);\n label.style.display = \"block\";\n label.style.paddingTop = \"15px\";\n return label;\n }", "title": "" }, { "docid": "eb50a3f79dfd4414117caf085a2ee21f", "score": "0.59700924", "text": "function setEvoImage(name, last) {\n fetch(`${baseURL}pokemon/${name}`)\n .then((res) => {\n return res.json()\n })\n .then((pokemon) =>{ \n if (pokemon == null) {\n errorMessage();\n } else {\n let sprite = pokemon.sprites.front_default;\n let img = document.createElement('img');\n img.style.width = \"93px\";\n img.style.height = \"93px\";\n img.src = sprite;\n imageScreen.appendChild(img);\n\n if (!last) {\n let arrow = document.createElement('img');\n arrow.src = \"images/arrow.png\";\n arrow.style.width = \"10px\";\n arrow.style.height = \"10px\";\n imageScreen.appendChild(arrow);\n }\n }\n }).catch(() => {\n errorMessage();\n })\n}", "title": "" }, { "docid": "297575c92e8eaf7237ae6ba5da22f85d", "score": "0.5960578", "text": "function mountLogo() {\n $('header').prepend(HTMLheaderLogo);\n var formattedLogoImages = HTMLheaderLogoImages.replace('%dataDesktop%', bio.logo.desktopLogo);\n $('#headerLogo').append(formattedLogoImages);\n if(hasObject(bio.logo.mobileLogo)){\n $('#headerLogo').find('picture').prepend(HTMLheaderLogoImagesMobile.replace('%dataMobile%', bio.logo.mobileLogo ))\n }\n if(hasObject(bio.logo.tabletLogo)){\n //it was done with before, to fix the problem of load picture precedence in the browsers\n $('#headerLogo').find('img').before(HTMLheaderLogoImagesTablet.replace('%dataTablet%', bio.logo.tabletLogo));\n }\n }", "title": "" }, { "docid": "65474a9adbe48af233dee4d2f4a2a923", "score": "0.5954863", "text": "function establecerImagen( numeroDado, cara ){ \r\n\timagenesDado[ numeroDado ].setAttribute( \"src\" , \"dado\" + cara + \".png\" ); \r\n\timagenesDado[ numeroDado ].setAttribute( \"alt\" , \"dado con \" + cara + \"punto(s)\" ); \r\n} // fin de la función establecerlmagen ", "title": "" }, { "docid": "c35d34618d201619abbf8729f746931a", "score": "0.59085727", "text": "function renderizarImagen () {\n $imagen.style.backgroundImage = `url(${IMAGENES[posicionActual]})`;\n}", "title": "" }, { "docid": "5169ca5b6be567f6757ac363c522630d", "score": "0.58973455", "text": "function Logo(){\n return(\n <div id=\"logo\"><img src={logo1} width=\"1000\" height=\"80\" /></div>\n )\n}", "title": "" }, { "docid": "bb6bb5450cd14fda44677bf3606a7c6d", "score": "0.5888956", "text": "function colocarimagem0(ou,t){\r\n\t\toupc = ou;\r\n\t\tconsole.log(\"JOGADOR jogou: \"+ou);\r\n\t\t\r\n\r\n\t\tif(vet[oupc]!=0){ console.log(\"Você não pode jogar ai\"); oupc=10 /*ele recebe 10 porque essa posição não existe*/}else{//nessa linha eu evito que jogue em um lugar que já foi jogado;\r\n\t\t\tt.innerHTML= \"<img src='x.png'>\";\r\n\t\t\tvet[ou]=1;\r\n\t\t\t\r\n\r\n\t\t\tfor(i=0; i< vet.length; i++){ \r\n\t\t\t\tif(vet[i]==0){\r\n\t\t\t\t\tjogadapc();\r\n\t\t\t\t\ti=9;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\r\n\t\t}\r\n\t\tif ((vet[0]>0)&(vet[1]>0)&(vet[2]>0)&(vet[3]>0)&(vet[4]>0)&(vet[5]>0)&(vet[6]>0)&(vet[7]>0)&(vet[8]>0)){\r\n\t\t\t\t\tvencedor();\r\n\t\t\t\t\tswitch (verificarvitoria) { case 1: alert(\"VOCÊ GANHOU\"); break; case 2: alert(\"O PC GANHOU!\"); break; case 0: break; }\r\n\t\t\t\t}\r\n\r\n\t\t\r\n\t}", "title": "" }, { "docid": "e11bff2dcccfdf435eea7668c81c43f2", "score": "0.58807796", "text": "function logoAir(){\r\n img1.src = 'images/air.png';\r\n img2.src = 'images/air.png';\r\n}", "title": "" }, { "docid": "bbb4a33c71b65389a0bf4c65d79b91b2", "score": "0.58750105", "text": "function HeaderLogo() {\n // Import result is the URL of your image\n return <img src={logo} alt=\"Verde Paw Logo\" placeholder=\"blurred\" width={100} height={45} />\n\n}", "title": "" }, { "docid": "1cbf6c3b22ab0034bed962c53e01a398", "score": "0.58662987", "text": "function mudarImagem() {\n document.getElementById('img1').src = \"img/pao-queijo.jpg\";\n}", "title": "" }, { "docid": "8ec74319307e0305ffbbb4171702500d", "score": "0.58599895", "text": "function horca(errores){\r\n var imagen = new Image();\r\n imagen.src = \"../imagenes/ahorcado\"+errores+\".png\";\r\n imagen.onload = function(){\r\n ctx.clearRect(230,0,490,230);\r\n ctx.drawImage(imagen, 230, 0, 490, 230);\r\n }\r\n }", "title": "" }, { "docid": "174fb8b1bd417447a6a77bb78f5ffd77", "score": "0.58590215", "text": "image(name, x, y) {\n\t\tconst img = this.images[name];\n\t\tthis.imageEl(img, x, y, img.origin);\n\t}", "title": "" }, { "docid": "f45dfb2082e890084dbafbfafca892e5", "score": "0.5855487", "text": "function updateLogo() {\n const curWidth = window.innerWidth;\n const headerLogo = document.getElementById('logo');\n if (curWidth < 1113) {\n const mobileLogo = new URL('UnoLogoSmall.png', headerLogo.src).href;\n headerLogo.src = mobileLogo;\n } else {\n const deskLogo = new URL('uno-logo.svg', headerLogo.src).href;\n headerLogo.src = deskLogo;\n }\n}", "title": "" }, { "docid": "8793cc2dad70077d32fe43d90bff3870", "score": "0.5840908", "text": "get logo() {\n return SALESFORCE_LOGO_URL;\n }", "title": "" }, { "docid": "7fe67ac082787a7e8c10ee9f69571c4f", "score": "0.58105373", "text": "function obtenerLinkImagen(tipoimagen) {\n\tif (tipoimagen == 'animada') {\n\t\treturn (link_imagen = '../public/images/conceptos/animados/'); //le doy la ruta de las imagenes animadas\n\t} else {\n\t\treturn (link_imagen = '../public/images/conceptos/reales/'); //le doy la ruta de las imagenes reales\n\t}\n}", "title": "" }, { "docid": "52ac67f67b9f06ac905b198b7dbef78b", "score": "0.5797508", "text": "get logo() { return this._logo; }", "title": "" }, { "docid": "ffe8a21f55f3646fe818891d42878893", "score": "0.5785966", "text": "function Header() {\n return (\n <div> \n <img alt =\"plate1\" src={logoHeader} ></img>\n </div>\n );\n}", "title": "" }, { "docid": "1fc0fa143f78fd79896cc9d6e29f6246", "score": "0.5785375", "text": "function html()\n {\n logo.src = 'logos/logohtml.png';\n }", "title": "" }, { "docid": "d4ac530dd3f774cc110820795b1f8831", "score": "0.57808095", "text": "function dibujaFondo(){\n ctx.drawImage(imgFondo,0,0);\n}", "title": "" }, { "docid": "9f52a7372ff13f5136b5a5d98e6b595d", "score": "0.57649666", "text": "function abrirImg(path){ \n var img = IJ.openImage(path);\n img.show();\n return img;\n}", "title": "" }, { "docid": "53c6ac9b7b992fb87b1c2c3ff2014a05", "score": "0.5763163", "text": "function mudarImagem2() {\n document.getElementById('img2').src = \"img/pao-queijo.jpg\";\n}", "title": "" }, { "docid": "df08c041720201ab02951716e699e6e2", "score": "0.57516116", "text": "function Androit() {\n // Import result is the URL of your image\n return <img id=\"stores\" className=\"androit\" src={logo} alt=\"Logo\" />;\n}", "title": "" }, { "docid": "9e622720e64bf5bf127e57d9e313dd1d", "score": "0.5743414", "text": "function definirImagemEmOverlay(event){\r\n \r\n const overlay = $(\"#overlay\");\r\n const img = event.target;\r\n \r\n // console.log(\"batata\");\r\n // a intenção que se clicando em uma imagem na pagina de reembolos e esta imagem ira aprecer em overlay\r\n \r\n overlay.append(`<img src='${img.src}' />`);\r\n overlay.css(\"visibility\", \"visible\");\r\n \r\n}", "title": "" }, { "docid": "1172140ca0d25f8604e894c6d972a4a2", "score": "0.5736514", "text": "getImg(hog) {\n return `hog-imgs/${hog.name.toLowerCase().split(\" \").join(\"_\")}.jpg`\n }", "title": "" }, { "docid": "b672e117c4e07c5c1ba6bdd1f0a78d48", "score": "0.57327414", "text": "function va_getUrlImagenDocumento(id_visor, documento){\n\tvar Url = documento.Uri;\n\tif(Url == '' || typeof Url=='undefined' || Url == null){\n\t\tUrl = va_visores[id_visor].rutaServletWAS + '?na=' + documento.Path;\n\t}\n\tvar tipo = va_getTipoFromUrl(Url, documento.tipo);\n\tif(tipo==''){tipo='img';}\n\tvar urlIcono = va_iconoFromTipo(tipo);\n\tif(urlIcono=='')urlIcono=Url;\n\treturn urlIcono;\n}", "title": "" }, { "docid": "b00a0fcceb36b8c7fb38e38ea7148a88", "score": "0.5728052", "text": "function upLogo(input) {\n var getImagePath = URL.createObjectURL(event.target.files[0]);\n $('.uploadLogo .imgPrev').attr('src', getImagePath);\n $('.customLogo').attr('src', getImagePath);\n}", "title": "" }, { "docid": "de8fa8641edf76d7220240687cc32e96", "score": "0.5716007", "text": "preload(){\n\t\tthis.load.image('game_logo','assets/logo.png');\n\t}", "title": "" }, { "docid": "fe892319a64220fdc88486bf55e55f9a", "score": "0.57148725", "text": "function llegadaCoordenadas(datos){\n var centro = datos[0];\n initMap(centro);\n $('#info_centro').html('<img class=\"imagenCentro\" src=\"../IMG/'+centro.imatge+'\">');\n }", "title": "" }, { "docid": "3e5929ad2f383445353a0d2912abd7c6", "score": "0.57092655", "text": "function atualizarPlanoDeFundo() {\n ctx.drawImage(imgBack, 0, 1020, 613, 270, 0, 0, canvas.width, canvas.height);\n desenhoLogo.novoCentroY = 80;\n desenhoLogo.desenha();\n}", "title": "" }, { "docid": "f61d820ea2ba0c2dc30f39ca3cfcae8d", "score": "0.5709169", "text": "function limpiar(){\n\n $(\"#imagenmuestra_logo\").attr(\"src\", \"../public/img/logo-default.jpg\");\n\n $(\"#imagenmuestra_favicon\").attr(\"src\", \"../public/img/logo-default.jpg\");\n\n $(\"#imagenmuestra_extra\").attr(\"src\", \"../public/img/logo-default.jpg\");\n\n cambio_colores('#d9534f','#5e5e5e');\n\n $('#agregarcolor_superior').css({\n 'background':'#5e5e5e'\n })\n\n $('#agregarcolor_dominante').css({\n 'background':'#d9534f'\n })\n\n\n}", "title": "" }, { "docid": "5bd7727a7888ef05bfdad0eb3aa469d2", "score": "0.5708203", "text": "function displayImg(index){\n let imgUrl = fObj.list[index].weather[0].icon;\n // Note: When deployed remove the http part of the url and change it to //\n // When working locally make sure to have the http included in the url or else it wont work http:\n let imgPath = `//openweathermap.org/img/w/${imgUrl}.png`;\n return imgPath;\n }", "title": "" }, { "docid": "c49f559cffdfdb7cede7154e228d06ee", "score": "0.57068765", "text": "function insertImage (main) {\n if (main === 'Clear') {\n return 'images/clear.svg';\n } else if (main === 'Clouds') {\n return 'images/cloudy.svg';\n } else {\n return 'images/rain.svg';\n }\n}", "title": "" }, { "docid": "fc873d83ad236201c495b5a68f726d14", "score": "0.5704183", "text": "function Fondo () {\n\tthis.URL = \"fondo.png\";\n\tthis.OK = false;\n\tthis.imagen = new Image();\n\tthis.imagen.src = this.URL;\n\tthis.x = 0;\n\tthis.y = 0;\n\tthis.dibujar = function(){\n\t\tthis.OK = true;\n\t\tif (this.OK == true) {\n\t\ttablero.drawImage(fondo.imagen, 0, 0);\n\t\t};\n\t};\n}", "title": "" }, { "docid": "ff69a7678e5c659b94a0bd71b5466d60", "score": "0.57000554", "text": "blason() {\n // supprime l'image existante\n if (document.getElementsByClassName(\"mini_persos\")[0] != undefined) {\n document.getElementsByClassName(\"mini_persos\")[0].remove();\n }\n\n // affiche l'image\n let currentDiv = document.getElementById(\"player_number\");\n\n let img = document.createElement(\"img\");\n currentDiv.parentElement.appendChild(img);\n img.setAttribute('class', 'mini_persos');\n\n // on définit quel est l'image que l'on doit afficher\n if (this.game.currentPlayer == 0) img.setAttribute('src', 'frodon.png');\n else img.setAttribute('src', 'sauron.png');\n }", "title": "" }, { "docid": "bad7ae9af7b3ef6aac68a7ca1dcc91f3", "score": "0.5693993", "text": "function inicializa() {\r\n cargaImagenes();\r\n}", "title": "" }, { "docid": "7a72f94ef347472beb44f65473f7c0f1", "score": "0.56807023", "text": "function addBrandingImages(el, src) {\n el.empty();\n\n if (src != \"\") {\n $('<img src=\"img/branding/' + src + '\" class=\"imgResponsive\">').appendTo(el);\n el.show();\n } else {\n el.hide();\n }\n }", "title": "" }, { "docid": "a1679981fdec47c5d295af40db48a890", "score": "0.5679588", "text": "preload () {\n this.load.image('ggj-logo', 'assets/ggj-logo.png');\n }", "title": "" }, { "docid": "8a2e40b288ab4c9ca71716626b3ccfbc", "score": "0.5677965", "text": "function mudarImagem(url) {\n document.getElementById(\"fotoLogin\").style.backgroundImage = 'url(' + url + ')';\n }", "title": "" }, { "docid": "7c8aefd8f0a78291a71c698ed641b98a", "score": "0.5664387", "text": "function _loadImage() {\n _image = new Image();\n _image.src = \"assets/cars/car\" + _carType + \".svg\";\n }", "title": "" }, { "docid": "fd5268d7d243601b9285b53499082b6d", "score": "0.5658254", "text": "function crearImagen(ruta, alt, clase) {\n let img = document.createElement(\"img\");\n img.src = ruta;\n img.alt = alt;\n img.className = clase;\n return img;\n}", "title": "" }, { "docid": "1555a61934be6b5b05506b6b2f9169b6", "score": "0.5647513", "text": "function createLogo(x,y){\r\n\t gameTitle = this.game.add.sprite(x, y,\"logo\");\r\n\t\tgameTitle.anchor.setTo(0.5,0.5);\t\r\n}", "title": "" }, { "docid": "c82c02e80bd33e4c7d98b58f6dbdc703", "score": "0.56436944", "text": "function resizeLogo() {\n\n}", "title": "" }, { "docid": "81208ae3300015e00ffbf648506a44f1", "score": "0.56388587", "text": "function showLogo(nameLieu){\n\tdocument.getElementById(nameLieu).style.visibility = \"visible\";\n}", "title": "" }, { "docid": "8026efe65967fc36ba0a9ea5f24100a3", "score": "0.5636603", "text": "function HeaderLogo( props ) {\n\t\n\tconst logo = \"https://www.benjamin-jager.com/projects/sacha-assets/img/logo/hoechstetter.svg\"\n\treturn (\n\t\t\n\t\t\t<div \n\t\t\t\tclassName = \"header-logo invisible\" \n\t\t\t\tid = \"header-logo\" \n\t\t\t>\n\t\t\t\t<NavLink to = \"/\">\n\t\t\t\t\t<picture>\n\t\t\t\t\t\t<source srcSet = { logo } type = \"image/svg+xml\" />\n\t\t\t\t\t\t<img src = { logo } alt = \"geil\" />\n\t\t\t\t\t</picture>\n\t\t\t\t</NavLink>\n\n\t\t\t</div>\n\n\t)\n\n}", "title": "" }, { "docid": "566dbf0499204fd1747e2f73e57daf1c", "score": "0.5632297", "text": "function createImageFromFile() {\n\n}", "title": "" }, { "docid": "e3cb10dbb544476228b19cf841a9733c", "score": "0.56268877", "text": "function randomizeLogos(){\r\n urls = ['/static/images/64/365 kalendar.png', '/static/images/64/a.png','/static/images/64/adde.png',\r\n '/static/images/64/artigo.png','/static/images/64/bijelo_polje.png','/static/images/64/bolon.png',\r\n '/static/images/64/crno polje.png', '/static/images/64/braille kalendar.png','/static/images/64/crno polje.png',\r\n '/static/images/64/crveno polje.png','/static/images/64/cvrcak kalendar.png','/static/images/64/d.png',\r\n '/static/images/64/danskina.png','/static/images/64/desso.png','/static/images/64/dlw.png',\r\n '/static/images/64/e.png','/static/images/64/ege.png','/static/images/64/igla kalendar.png',\r\n '/static/images/64/kuca kalendar.png','/static/images/64/maljevich kalendar.png','/static/images/64/muratto.png',\r\n '/static/images/64/narancasto polje.png','/static/images/64/nesite.png','/static/images/64/origami kalendar.png',\r\n '/static/images/64/sivo polje.png','/static/images/64/vilic kalendar.png'];\r\n\r\n //1 in 10 only 1 logo\r\n //setup num of logos\r\n if (Math.floor(Math.random()*10) == 0){\r\n numOfDifferentLogos = 1;\r\n bulkImages = [];\r\n }else {\r\n numOfDifferentLogos = 5;\r\n }\r\n\r\n for (var i=0; i<numOfDifferentLogos; i++){\r\n var temp_image = new Image();\r\n var logo_selection = Math.floor(Math.random()*urls.length)\r\n temp_image.src = urls[logo_selection]\r\n temp_image.width = '64';\r\n temp_image.height = '64';\r\n urls.splice(logo_selection, 1);\r\n bulkImages[i] = temp_image;\r\n }\r\n}", "title": "" }, { "docid": "64e77340c01f6fc68de57c88037048d0", "score": "0.56095684", "text": "render() {\n //la clase va a retornar lo siguiente\n return (\n <nav className=\"navbar navbar-ligth bg-primary\">\n <div className=\"navbar-brand\">\n PROYECT CHIMOPO\n {/* <img src=\"./img/ipn.png\" alt=\"\" className=\"img\" />\n <img src=\"./img/upiicsa.png\" alt=\"\" className=\"img\" /> */}\n </div>\n </nav>\n );\n }", "title": "" }, { "docid": "8d897ffc2049bb2a841ada75df981104", "score": "0.56072754", "text": "function cargarListaImagenes(lista, padre) {\n \n /*var oveja = [\"Lala\", \"img/oveja.jpg\"];\n \n var coneja = [\"pepito\", \"img/pepito.jpg\"];\n\n var amigos = [oveja, coneja];*/\n\n for (var i = 0; i < lista.length; i++) {\n var img = document.createElement('img');\n padre.appendChild(img);\n img.src = lista[i][1];\n }\n}", "title": "" }, { "docid": "5ec87a815f7ac04584dea9d14816f129", "score": "0.5605642", "text": "function initImage() {\n imageId = \"logo_img\";\n image = document.getElementById(imageId);\n setOpacity(image, 0);\n image.style.visibility = 'visible';\n fadeIn(imageId,0);\n}", "title": "" }, { "docid": "12657145fa314427531898d91bca1987", "score": "0.5605487", "text": "function create_logo(){\r\n // load model\r\n THREE.Loader.Handlers.add( /\\.dds$/i, new THREE.DDSLoader() );\r\n var loader = new THREE.OBJMTLLoader();\r\n loader.load( '/obj/logo.obj', '/obj/logo.mtl', function ( object ) {\r\n logo = object;\r\n \r\n logo.scale.set(45,45,45);\r\n windowAspect = window.innerWidth / window.innerHeight;\r\n \r\n logo.rotation.set(-0.30,-0.90,-0.2);\r\n \r\n scene.add( logo );\r\n\r\n pointLight.target = logo;\r\n \r\n $(document).trigger('loadable_loaded');\r\n }, function(x){}, function(x){} );\r\n}", "title": "" }, { "docid": "d8cab8029dac7d5e41183410cfe2f23f", "score": "0.55968916", "text": "titleAnimation(step) {\n\t\t\tctx.putImageData(game.initialTerrain, 0, 0);\n\t\t\tlet grow = step / 100;\n\t\t\tctx.drawImage(logo, 200, 180, logo.width * grow, logo.height * grow);\n\t\t\tlogo.src = 'img/scorchlogo.png';\n\t\t}", "title": "" }, { "docid": "09012f90ac419ea14edd0706434257e1", "score": "0.5594929", "text": "function addIcon(icon) {\n const imgSRC = `http://openweathermap.org/img/wn/${icon}@4x.png`;\n document.querySelector(\"img\").src = imgSRC;\n }", "title": "" }, { "docid": "464d093afa31d520f5f4bc8c58c10240", "score": "0.5582708", "text": "function dibujar (){\n if (fondo.cargaOk){\n papel.drawImage(fondo.imagen,0,0);\n }\n if (vaca.cargaOk){\n\n for(var v = 0; v < cantidad; v++){\n var x = aleatorio(0,420);\n var y = aleatorio(0,420);\n\n papel.drawImage(vaca.imagen,x,y);\n }\n \n }\n \n}", "title": "" }, { "docid": "6d16c5f56cff2d0cb2b43788f05b7dac", "score": "0.55804425", "text": "function trocarImagem(filename, animalName) { //os nomes que eu der dentro de()vao representar os atributos colocados no HTML respectivo\n document.querySelector('.imagem').setAttribute('src', './'+filename);\n document.querySelector('.imagem').setAttribute('data-animal', animalName);\n\n}", "title": "" }, { "docid": "a63d33c4df7a31be76bd256d0361277d", "score": "0.5569872", "text": "addLogo(event) {\n // console.log(event.target.files[0].path)\n var globalPresets = this.props.globalPresets;\n globalPresets.logo = event.target.files[0].path;\n this.props.updateGlobalPresets(globalPresets);\n console.log(\"global logo state: \" + globalPresets)\n }", "title": "" }, { "docid": "98480c7dfca91f40a7a4828874f77dbc", "score": "0.55652946", "text": "function ini (){\n aleatorio();\n var foto1 = window.document.getElementById(\"foto\");\n foto1.src=imagenes[posiciones[1]].imagen;\n}", "title": "" }, { "docid": "e150e3cadb2a0038c0090304879df0f4", "score": "0.5561371", "text": "function setData (data) {\n logoImage.src = `assets/${data.image}`\n logoImage.style.top = `${data.y}px`\n logoImage.style.left = `${data.x}px`\n logoImage.style.width = `${data.w}px`\n logoImage.style.height = `${data.h}px`\n}", "title": "" }, { "docid": "0e9f89177c4692e6e7e1f5fd2fd71d87", "score": "0.55564743", "text": "function createImages (name,promo) {\n var image = document.createElement(\"img\");\n image.classList.add (\"sizeImages\");\n image.setAttribute(\"src\",\"assets/images/\"+ promo +\"/\"+name+\".jpg\");\n image.setAttribute(\"alt\",name);\n imagesContainer.appendChild(image);\n}", "title": "" }, { "docid": "ec0540efb9da3547be970cda9a888115", "score": "0.55545306", "text": "get logoFile() {\n return _logoFile;\n }", "title": "" }, { "docid": "f410ec898424a47708d7faf2d5e661fc", "score": "0.5550905", "text": "function addImage($modal, pokemonDetails) {\n $modal.append(\n `<img src=\"${\n pokemonDetails.sprites.front_default\n }\" alt=\"The front view of ${\n pokemonDetails.species.name\n }\" class=\"modal_image\">`\n );\n }", "title": "" }, { "docid": "42260585707575fa12cb4e3bce21a11d", "score": "0.5548301", "text": "function SetNewImage()\n{\n document.getElementById(\"LogoAnim\").src =\"../logo/logo2.png\";\n}", "title": "" }, { "docid": "e2126a39dbc2a03c1694a545e3c75fe1", "score": "0.55361784", "text": "get mainLogo () { return $('.b-top-logo a') }", "title": "" }, { "docid": "e67e5c8791683ae69d5e85bbb9d66f76", "score": "0.5533795", "text": "function bankLogo(cell) {\n if (cell) {\n return (\n <img\n alt=\"action-icon\"\n style={{ height: '25px', width: '25px' }}\n src={cell}\n />\n );\n }\n return '-';\n }", "title": "" }, { "docid": "2abc8a0820229e68e1aec35c0a7370fd", "score": "0.552274", "text": "function getWeatherIconImg(name) {\n return \"<img src= http://openweathermap.org/img/wn/\" + name + \".png>\"\n}", "title": "" }, { "docid": "2b6f64fd2b97352bfa27891847a7357f", "score": "0.55199873", "text": "function mostrarImagenesAutor(nombre) {\r\n var auth;\r\n for (var i = 0; i < galeria.autores.length; i++) {\r\n if (galeria.autores[i].nick == nombre) {\r\n auth = galeria.autores[i];\r\n }\r\n }\r\n loadCarruselAut(galeria, auth);\r\n}", "title": "" }, { "docid": "de05629b5aaca95eec78b06afafe0578", "score": "0.5517226", "text": "function muestra(num) {\r\n var imagen = document.images[num].src \r\n // console.log(imagen)\r\n var comentario = document.images[num].alt\r\n // console.log(comentario)\r\n var grande = document.images[\"pantalla\"]\r\n var texto = document.getElementById(\"descripcion\")\r\n grande.src = imagen\r\n texto.innerHTML = comentario\r\n }", "title": "" }, { "docid": "bbcd9a218b9cd51c1d15b762ea98841b", "score": "0.55075765", "text": "function OnDrawGizmos () {\n\tGizmos.DrawIcon (transform.position, \"Skull And Crossbones Icon.tif\");\n}", "title": "" }, { "docid": "aadb80a1494f02ccce141194a746fe52", "score": "0.5507083", "text": "function LogoSimple() {\n\n return (\n <View style={{\n flex: 1,\n flexDirection:'row',\n justifyContent: 'center'\n }}>\n <Image\n style={{ width: 200, height: 50 }}\n source={require('../images/fiap.jpg')}\n />\n </View>\n );\n}", "title": "" }, { "docid": "6394ada895328beb57df1fc377a4db81", "score": "0.55066085", "text": "function fncBuildLogo()\r\n{\r\n\tvar strTemp = '<td align=\"right\" valign=\"top\" rowspan=\"4\" height=\"114\">';\r\n\tstrTemp += '<a href=\"' + gobjNavArray[4].href + '\"><img src=\"' + gobj3ComLogo.on.src +'\" width=\"141\" height=\"99\" border=\"0\" alt=\"' + gobjNavArray[4].label + '\"></a>';\r\n\tstrTemp += '<img src=\"' + gobjClear.on.src +'\" width=\"5\" height=\"1\">';\r\n\tstrTemp += '</td>';\r\n\tdocument.write(strTemp);\r\n}", "title": "" }, { "docid": "c4aa1142b2b96faed4df2ddcc9dccc74", "score": "0.549817", "text": "function imagePath(a) {\n return document.getElementById('gmbr').innerHTML = `<div class=\"d-flex justify-content-center\"><img src=\"${a}\" alt=\"gambar persegi\"></div>`\n}", "title": "" }, { "docid": "26d1c04ac11498e1831e52973eaa1bb4", "score": "0.5496315", "text": "function retrocederFoto() {\n if(posicionActual <= 0) {\n posicionActual = IMAGENES.length - 1;\n } else {\n posicionActual--;\n }\n renderizarImagen();\n}", "title": "" }, { "docid": "774161425420bc30afae1bf57f2151f4", "score": "0.5484902", "text": "function setNewImage()\n{\n document.getElementById(\"imggeladeira\").src=\"imagens/indisponivel.jpg\"\n}", "title": "" }, { "docid": "941a37ca813eb39a4f07ac681c59c377", "score": "0.54811907", "text": "function imageForGoIcon(mright, mtop)\n{\n var element = document.createElement(\"img\");\n element.src = prepend_with_image_path + \"/images/GoIcon.gif\";\n element.className = \"goto_image\";\n element.style.marginRight = mright + \"px\";\n element.style.marginTop = mtop - 2 + \"px\";\n\n return element;\n}", "title": "" }, { "docid": "1ec4e999220391e1e8c5c9e956b81e99", "score": "0.5480785", "text": "function logoImg(input) {\n if (input.files && input.files[0]) {\n var reader = new FileReader();\n\n reader.onload = function (e) {\n $('#img_prev')\n .attr('src', e.target.result);\n };\n\n reader.readAsDataURL(input.files[0]);\n}\n$('.delete-logo').css('display', 'inline-block');\n}", "title": "" }, { "docid": "5d421c9572ab62ab03f537f3abcf408a", "score": "0.547613", "text": "function showimage() {\n // Mostro l'immagine successiva\n $('.immagine-carosello').eq(immagine_attuale).show();\n // Aggiungo il colore nero al pallino\n $('.punto').eq(immagine_attuale).addClass('nero');\n}", "title": "" }, { "docid": "8c63fc48cf281e40a15ea6af08dd24dc", "score": "0.5471869", "text": "Logo() {\r\n this.logo.addEventListener('click', () => {\r\n // Hide Catalogue Display\r\n this.catalogueRow.style.display = 'none';\r\n // Clear UI InnerHTML\r\n ui.clearInnerHtml();\r\n\r\n // Save Page Status To Local Storage\r\n storage.save2Storage('Page Status', 'Logo');\r\n\r\n // Change Page Heading To Default\r\n this.catalogue.textContent = 'Season Films Catalogue';\r\n })\r\n }", "title": "" } ]
79526710e4a802153e4620982a595c84
Set new properties on the nodes at a location.
[ { "docid": "71c2fcc0247a089c192a2da7486e6081", "score": "0.54579616", "text": "setNodes(editor, props) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n Editor.withoutNormalizing(editor, () => {\n var {\n match,\n at = editor.selection\n } = options;\n var {\n hanging = false,\n mode = 'lowest',\n split = false,\n voids = false\n } = options;\n\n if (!at) {\n return;\n }\n\n if (match == null) {\n match = Path.isPath(at) ? matchPath(editor, at) : n => Editor.isBlock(editor, n);\n }\n\n if (!hanging && Range.isRange(at)) {\n at = Editor.unhangRange(editor, at);\n }\n\n if (split && Range.isRange(at)) {\n var rangeRef = Editor.rangeRef(editor, at, {\n affinity: 'inward'\n });\n var [start, end] = Range.edges(at);\n var splitMode = mode === 'lowest' ? 'lowest' : 'highest';\n Transforms.splitNodes(editor, {\n at: end,\n match,\n mode: splitMode,\n voids\n });\n Transforms.splitNodes(editor, {\n at: start,\n match,\n mode: splitMode,\n voids\n });\n at = rangeRef.unref();\n\n if (options.at == null) {\n Transforms.select(editor, at);\n }\n }\n\n for (var [node, path] of Editor.nodes(editor, {\n at,\n match,\n mode,\n voids\n })) {\n var properties = {};\n var newProperties = {}; // You can't set properties on the editor node.\n\n if (path.length === 0) {\n continue;\n }\n\n for (var k in props) {\n if (k === 'children' || k === 'text') {\n continue;\n }\n\n if (props[k] !== node[k]) {\n properties[k] = node[k];\n newProperties[k] = props[k];\n }\n }\n\n if (Object.keys(newProperties).length !== 0) {\n editor.apply({\n type: 'set_node',\n path,\n properties,\n newProperties\n });\n }\n }\n });\n }", "title": "" } ]
[ { "docid": "9af655aa128105e79e489d7caf54218d", "score": "0.6123925", "text": "set location(newValue) {\n this.setProperty(\"location\", newValue);\n }", "title": "" }, { "docid": "84a9522884b365417dbbb3f5af695159", "score": "0.6095759", "text": "function setProperties(node, properties) {\n Object.keys(properties).forEach(function (propName) {\n var propValue = properties[propName];\n if (propName.startsWith('on')) {\n // node的事件都是小写\n propName = propName.toLowerCase();\n }\n node[propName] = propValue;\n });\n}", "title": "" }, { "docid": "39f5d25143698db6c7f77d3e408aefb3", "score": "0.5929088", "text": "function setProperty(node, name, value) {\n\ttry {\n\t\tnode[name] = value;\n\t} catch (e) { }\n}", "title": "" }, { "docid": "39f5d25143698db6c7f77d3e408aefb3", "score": "0.5929088", "text": "function setProperty(node, name, value) {\n\ttry {\n\t\tnode[name] = value;\n\t} catch (e) { }\n}", "title": "" }, { "docid": "39f5d25143698db6c7f77d3e408aefb3", "score": "0.5929088", "text": "function setProperty(node, name, value) {\n\ttry {\n\t\tnode[name] = value;\n\t} catch (e) { }\n}", "title": "" }, { "docid": "18ebb741611f64492a1b26208e056f49", "score": "0.5901687", "text": "function setProperty(node, name, value) {\n\ttry {\n\t\tnode[name] = value;\n\t} catch (e) {}\n}", "title": "" }, { "docid": "18ebb741611f64492a1b26208e056f49", "score": "0.5901687", "text": "function setProperty(node, name, value) {\n\ttry {\n\t\tnode[name] = value;\n\t} catch (e) {}\n}", "title": "" }, { "docid": "18ebb741611f64492a1b26208e056f49", "score": "0.5901687", "text": "function setProperty(node, name, value) {\n\ttry {\n\t\tnode[name] = value;\n\t} catch (e) {}\n}", "title": "" }, { "docid": "18ebb741611f64492a1b26208e056f49", "score": "0.5901687", "text": "function setProperty(node, name, value) {\n\ttry {\n\t\tnode[name] = value;\n\t} catch (e) {}\n}", "title": "" }, { "docid": "18ebb741611f64492a1b26208e056f49", "score": "0.5901687", "text": "function setProperty(node, name, value) {\n\ttry {\n\t\tnode[name] = value;\n\t} catch (e) {}\n}", "title": "" }, { "docid": "b0fa24d1a67dd990cd6dd20e7f7ede21", "score": "0.5822683", "text": "set location(value){\n this._location = value;\n }", "title": "" }, { "docid": "4603067707b924a491ae175696c985bb", "score": "0.57772666", "text": "function setCoordinates(node, x, y) {\n node.attr('transform','translate(' + x + ',' + y + ')');\n }", "title": "" }, { "docid": "cb56c95f60f9f7c7e6a53dc0f122211a", "score": "0.57568717", "text": "function setProperties( record, doc ){\n addrProps.forEach( function ( prop ){\n try {\n record.setAddress( prop, doc.getAddress( prop ) );\n } catch ( ex ) {}\n });\n}", "title": "" }, { "docid": "99d0bb822950938c7cc69ba99d93d211", "score": "0.5708191", "text": "function SetLocation(new_loc) {\r\n if (!GameState.location) {GameState.location = {}};\r\n GameState.location.map = new_loc.map;\r\n GameState.location.x = new_loc.x;\r\n GameState.location.y = new_loc.y;\r\n GameState.location.camera_x = GameState.location.x * 32;\r\n GameState.location.camera_y = GameState.location.y * 32;\r\n if (!new_loc.dx) {GameState.location.dx = 0}\r\n else {GameState.location.dx = new_loc.dx}\r\n if (!new_loc.dy) {GameState.location.dy = 1}\r\n else {GameState.location.dy = new_loc.dy}\r\n GameState.location.stepwait = 3;\r\n}", "title": "" }, { "docid": "f9f8ba490ae27b71a58c46e3aac3c663", "score": "0.5626199", "text": "set(values) {\n\t\tfor (let i = 0; i < this.nodes.length; i++) {\n\t\t\tlet node = this.nodes[i];\n\n\t\t\tif (node.isType === 'Node') {\n\t\t\t\tif (typeof values.bias !== 'undefined') {\n\t\t\t\t\tnode.bias = values.bias;\n\t\t\t\t}\n\n\t\t\t\tnode.squash = values.squash || node.squash;\n\t\t\t\tnode.type = values.type || node.type;\n\t\t\t} else if (node.isType === 'Group') {\n\t\t\t\tnode.set(values);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "1e04e260057366f24922846ab5301180", "score": "0.5567436", "text": "function setNodeLocationFull(currNodeLocation, newLocationInfo) {\n // First (valid) update for this cst node\n if (isNaN(currNodeLocation.startOffset) === true) {\n // assumption1: Token location information is either NaN or a valid number\n // assumption2: Token location information is fully valid if it exist\n // (all start/end props exist and are numbers).\n currNodeLocation.startOffset = newLocationInfo.startOffset;\n currNodeLocation.startColumn = newLocationInfo.startColumn;\n currNodeLocation.startLine = newLocationInfo.startLine;\n currNodeLocation.endOffset = newLocationInfo.endOffset;\n currNodeLocation.endColumn = newLocationInfo.endColumn;\n currNodeLocation.endLine = newLocationInfo.endLine;\n }\n // Once the start props has been updated with a valid number it should never receive\n // any farther updates as the Token vector is sorted.\n // We still have to check this this condition for every new possible location info\n // because with error recovery enabled we may encounter invalid tokens (NaN location props)\n else if (currNodeLocation.endOffset < newLocationInfo.endOffset === true) {\n currNodeLocation.endOffset = newLocationInfo.endOffset;\n currNodeLocation.endColumn = newLocationInfo.endColumn;\n currNodeLocation.endLine = newLocationInfo.endLine;\n }\n}", "title": "" }, { "docid": "4b1d6039d0599edbf63c19a3aa3b7f03", "score": "0.5560542", "text": "updateLocation(newX,newY) {\n this.x = newX;\n this.y = newY;\n }", "title": "" }, { "docid": "334911d630d1d415c75e45c71c1efb78", "score": "0.5546345", "text": "setLocation(x, y) {\n this.location = { x, y };\n }", "title": "" }, { "docid": "7110d9bb2973fff473d20697744aec4b", "score": "0.5512395", "text": "function treeSetValue(tree,value){tree.node.value=value;treeUpdateParents(tree);}", "title": "" }, { "docid": "7dadcaf925e3fe1ae5889e6fcee32606", "score": "0.54667974", "text": "function setAll(uniqueDestination, property, value) {\n\n for (var i = 0; i < uniqueDestination.sourceTravels.length; i++) {\n\n uniqueDestination.sourceTravels[i][property] = value;\n\n }\n\n}", "title": "" }, { "docid": "f2d841e6116e3d82fda68e9fbc20171e", "score": "0.5463432", "text": "updateNode(graphComponent, id, newName, newShort, newImgurl, newColor) {\n // get cytoscape instance\n let cy = graphComponent.getCytoGraph();\n\n // get node element\n let node = cy.getElementById(id);\n\n console.log(\"updating node ...\");\n console.log(\"before update:\", node);\n\n // update node data\n node.data(\"name\", newName);\n node.data(\"short\", newShort);\n node.data(\"imgUrl\", newImgurl);\n node.data(\"color\", newColor);\n node.style(\"background-color\", \"#\" + newColor);\n\n console.log(\"after update:\", node);\n }", "title": "" }, { "docid": "38b0a5eb80b710d2f7480ec3727ad43f", "score": "0.54563254", "text": "function setPosition(mutState, newPos) {\n mutState.setIn(myPath.concat('position'), newPos);\n }", "title": "" }, { "docid": "04996451e0d97fd1b283946bf46f9703", "score": "0.5456322", "text": "function setNodeStyle(node, property, value) {\n if (stylesMap.hasOwnProperty(property)) {\n if (styleValuesMap.hasOwnProperty(property)) {\n if (typeof styleValuesMap[property] === 'function') {\n value = styleValuesMap[property](value)\n } else if (styleValuesMap[property].hasOwnProperty(value)) {\n value = styleValuesMap[property][value]\n }\n }\n\n node.style[stylesMap[property]] = value\n }\n}", "title": "" }, { "docid": "c9892c02e8424d664b07cd0be1ce4f73", "score": "0.54527867", "text": "function setter(node) {\n var value;\n var polarity;\n\n if ('value' in node || node.type === 'WordNode') {\n value = nlcstToString(node);\n\n if (config && has(config, value)) {\n polarity = config[value];\n } else if (has(polarities, value)) {\n polarity = polarities[value];\n }\n\n if (polarity) {\n patch(node, polarity);\n }\n }\n }", "title": "" }, { "docid": "d4f49fcf8e89de9db47854275737416c", "score": "0.543019", "text": "setLocation(location) {\n this.location = location;\n }", "title": "" }, { "docid": "3fd7977bbbaa58499b76c4090818ee9c", "score": "0.5429148", "text": "function setPosition(x, y) {\n pos.x = x\n pos.y = y\n}", "title": "" }, { "docid": "127dc724679548c712b00377868d65b4", "score": "0.5426271", "text": "SetPosition(x, y){\n this.x = x;\n this.y = y;\n }", "title": "" }, { "docid": "70bfeab1af1e830cb6bf8d454d4276bb", "score": "0.5418872", "text": "function setArbitrarilyDeepObject(location, value, target = window) {\n\t\tif (Array.isArray(location)) {\n\t\t\tlocation = location.join(\".\");\n\t\t}\n\t\tconst segments = location.split(\".\");\n\t\tconst lastPoint = segments.pop();\n\t\tlet nextPoint;\n\t\twhile ((nextPoint = segments.shift())) {\n\t\t\tif (typeof target[nextPoint] == \"undefined\" || target[nextPoint] === null) {\n\t\t\t\ttarget[nextPoint] = {};\n\t\t\t}\n\t\t\ttarget = target[nextPoint];\n\t\t}\n\t\ttarget[lastPoint] = value;\n\t\tif (window.AUTOKITTENS_ENABLE_DEBUG) {\n\t\t\tconsole.log(`Set ${location}=${value}`);\n\t\t}\n\t}", "title": "" }, { "docid": "5fd121dd925700fe469107ef26f326e4", "score": "0.5348561", "text": "function setProps(thingy,proparray,value){\n for (var i=0; i<proparray.length; i++){ //loop through possible properties\n thingy.css(proparray[i],value)\n }\n}", "title": "" }, { "docid": "1e8d96b5a457df8acfa5734d03a98f2a", "score": "0.53433204", "text": "setAttr() {\n const { display } = this.parent;\n const { from, to } = this.getFromTo();\n this.complement(from, to);\n this.copyAndResetAttr(this.proxyAttr, from);\n display.attr(this.proxyAttr);\n }", "title": "" }, { "docid": "3262c7804e867d1bec9d1126d85915ea", "score": "0.5342136", "text": "function setNodeProperty(node, key, value) {\n return node[key] = value;\n}", "title": "" }, { "docid": "3262c7804e867d1bec9d1126d85915ea", "score": "0.5342136", "text": "function setNodeProperty(node, key, value) {\n return node[key] = value;\n}", "title": "" }, { "docid": "e7a06b3d26ccb9f9bacbe83336fe0edd", "score": "0.5300529", "text": "function updateElementProperties() {\n // sidebar.setExpression(\"(\" + getPropsForSidebar + \")()\"); \n sidebar.setObject(getPropsForSidebar()); \n }", "title": "" }, { "docid": "eb48705321c84784c3c0231e8943ef9b", "score": "0.5283625", "text": "function setChild(node,nm,c) {\n // this needs to work before om.ComputedField is defined\n var cf = om.ComputedField;\n var iscf = cf && cf.isPrototypeOf(c);\n adopt(node,nm,c);\n node[nm] = c;\n if (iscf) {\n node.declareComputedFieldContainment();\n }\n if (om.isShape(node)) {\n // keep track of shape and lnode children order\n if (om.isShape(c) || om.LNode.isPrototypeOf(c)) {\n //console.log(\"setting shapehild \",c.__name__,\" of \",node.__name__);\n var scnt = om.getval(node,'__setCount__');\n scnt = scnt?scnt+1:1;\n node.__setCount__ = scnt;\n c.__setIndex__ = scnt;\n }\n }\n }", "title": "" }, { "docid": "99328e61e402601a47a42bf7d714be33", "score": "0.5280562", "text": "setLocation(x, y) {\n this.x = x;\n this.y = y;\n }", "title": "" }, { "docid": "99328e61e402601a47a42bf7d714be33", "score": "0.5280562", "text": "setLocation(x, y) {\n this.x = x;\n this.y = y;\n }", "title": "" }, { "docid": "1971ebf63eb5d1d88a2af8269e09424c", "score": "0.52707237", "text": "function updatesettingsvalue(event, nodeid, property) {\n nodes.nodes[nodeid].settings.values[property] = event.target.value;\n nodes.nodes[nodeid].refresh();\n}", "title": "" }, { "docid": "14bdcedb2f2b2dbb9c33a6cbc25d5f50", "score": "0.52631485", "text": "function set(type, node) {\n if (type === 'path') {\n node.classList.add('path');\n return;\n }\n node.className = 'node ' + type;\n }", "title": "" }, { "docid": "b05c0accb7a9541ec560419a406fc8a4", "score": "0.5255005", "text": "set Point(value) {\n this.point = value;\n }", "title": "" }, { "docid": "0ee15b18c0a8c81ef67b5c2aa3a08d07", "score": "0.52433205", "text": "function setNamedNode(thing, property, value) {\n internal_throwIfNotThing(thing);\n return setTerm(thing, property, value);\n}", "title": "" }, { "docid": "34f9bc3ccff983aea5abd42b0ce52be1", "score": "0.52267003", "text": "function setThingProperties(params) {\n return new Promise((resolve, reject) => {\n iotData.setThingProperties(params, (err, data) => {\n err ? reject(err) : resolve(data);\n });\n });\n}", "title": "" }, { "docid": "08e8f4a08f97ad4fba85b9dcfab6068d", "score": "0.5210644", "text": "function extendNodeProperties(node, type) {\n // We want to add a label property to display on the nodes in the graph viewer.\n // Space Types have different fields, so we need to get the right one based on the type.\n var label;\n switch (type) {\n case \"space\": label = node.friendlyName ? node.friendlyName : node.name; break;\n case \"device\": label = node.friendlyName ? node.friendlyName : node.name; break;\n case \"sensor\": label = node.friendlyName ? node.friendlyName : node.hardwareId; break;\n case \"userdefinedfunctions\": label = node.friendlyName ? node.friendlyName : node.hardwareId; break;\n case \"matchers\": label = node.friendlyName ? node.friendlyName : node.hardwareId; break;\n default: return;\n }\n $.extend(node, {\n \"label\": label ? label : \"\", // Add the label\n \"type\": type, // Add the type to the node.\n \"childCount\": 0, // Set initial child count to 0;\n \"children\": [], // Create empty array for children\n \"_children\": [] // Create empty array for hidden children.\n });\n return node;\n}", "title": "" }, { "docid": "62c95dca8474bc6fe613aa0ea2a176a0", "score": "0.520879", "text": "setNeighbor(...neighbors){\n\n //Adding each neighbor node to neighbors array\n for (let i = 0; i < neighbors.length; i++) {\n //Finding the difference between node and neighbor's x and y coords\n //Used in the calculation of cartesian distance between nodes\n var xDist = Math.abs(this.xCoord - neighbors[i].xCoord);\n var yDist = Math.abs(this.yCoord - neighbors[i].yCoord);\n //Neighbors list will contain neighbor node and associated distance \n this.neighbors.push({neighbor: neighbors[i], distance: Math.hypot(xDist, yDist) }); \n }//end for\n\n }", "title": "" }, { "docid": "71da43eba44704227e2a49a1c1dacf25", "score": "0.5207008", "text": "SetPos(newX,newY)\n\t{\n\t\tthis.x = newX;\n\t\tthis.y = newY;\n\t}", "title": "" }, { "docid": "2d71d84811fde546d0f673175d7f6e6c", "score": "0.5195336", "text": "function setNodesInfo(nodeData, parentNode) {\n if (!nodesInfo[\"Root\"])\n return nodesInfo[\"Root\"] = {x: that.radius,y: centerX};\n if (!nodeData)\n return console.log(\"Specify item to init coords\");\n if (!parentNode)\n parentNode = nodeData.parent;\n if (!nodesInfo[nodeData.name] && nodeData.origin) {\n return nodesInfo[nodeData.name] = nodesInfo[nodeData.origin]\n }\n if (nodesInfo[parentNode.name]) {\n nodesInfo[nodeData.name] = {x: nodesInfo[parentNode.name].x,y: nodesInfo[parentNode.name].y}\n } else if (parentNode.type != \"Root\")\n setNodesInfo(nodeData, parentNode.parent);\n return nodesInfo[nodeData.name]\n }", "title": "" }, { "docid": "26e48719fa017583bdda824aa7aeeeef", "score": "0.5195155", "text": "resetStartLocationFromNode(node, locationNode) {\n node.start = locationNode.start;\n node.loc.start = locationNode.loc.start;\n if (this.options.ranges) node.range[0] = locationNode.range[0];\n }", "title": "" }, { "docid": "43642ec1b2d888773f0042eaa37c2786", "score": "0.5180244", "text": "function set_location(params) {\n if(typeof(params)==\"string\")\n params=string_to_hash(params);\n\n // TODO: Maybe not optimal, want to leave link intact when there are\n // parameters to it?\n if(params.obj)\n set_url({ obj: params.obj });\n\n location_params=params;\n\n if(map) {\n redraw();\n call_hooks(\"hash_changed\", location_params);\n }\n else {\n start_location=params;\n }\n}", "title": "" }, { "docid": "4e2737a1ece0aac4d4e53f4813cf1ced", "score": "0.51742566", "text": "setCoordinates(x, y) {\n if(this.isFilled()) {\n if(typeof x === \"undefined\" && typeof y === \"undefined\") {\n // No coordinates were passed into the function\n if(this.value < this.parent.value) {\n // Left node\n this.x = this.parent.x - this.parent.leftSpacing;\n } else {\n // Right node\n this.x = this.parent.x + this.parent.rightSpacing;\n }\n\n this.y = this.parent.y + Node.VERTICALSPACING;\n\n } else {\n // Coordinates were passed into the function\n this.x = x;\n this.y = y;\n }\n\n this.leftNode.setCoordinates();\n this.rightNode.setCoordinates();\n }\n }", "title": "" }, { "docid": "ad2de6ca1846f25f3db45b0cfe063e54", "score": "0.516266", "text": "setProperty(key, value) {\n this.properties_[key] = value;\n this.mutationCompleteHandler_(this.cssText);\n }", "title": "" }, { "docid": "57543ceaa30fa97e25164514bda70201", "score": "0.51389617", "text": "setGoalNode(row, col) {\n const oldRow = this.goalNode.row;\n const oldCol = this.goalNode.col;\n this.nodes[oldRow][oldCol].type = nodeTypes.EMPTY_NODE;\n this.nodes[oldRow][oldCol].weight = MIN_NODE_WEIGHT;\n this.nodes[row][col].type = nodeTypes.GOAL_NODE;\n this.nodes[row][col].weight = MIN_NODE_WEIGHT;\n this.goalNode = this.nodes[row][col];\n }", "title": "" }, { "docid": "8a869adb4570047974358a0adff59f71", "score": "0.51383495", "text": "set(node, value) {\n if (node instanceof BufferNode)\n this.setBuffer(node.context.buffer, node.index, value);\n else if (node instanceof TreeNode)\n this.map.set(node.tree, value);\n }", "title": "" }, { "docid": "b2a88ffd673b764d386a24869304a650", "score": "0.5138025", "text": "setProperty(label, property) {\n this._properties.set(label, property);\n }", "title": "" }, { "docid": "b2a88ffd673b764d386a24869304a650", "score": "0.5138025", "text": "setProperty(label, property) {\n this._properties.set(label, property);\n }", "title": "" }, { "docid": "f98e7ef99cb05a1f3feecf70f27b656e", "score": "0.5130859", "text": "setPoint(vertexID, attrName, x, y) {\n if (this._numVertices < vertexID + 1) this.numVertices = vertexID + 1\n\n const { _posOffset, _rawData, _vertexSize } = this\n const offset =\n attrName === 'position' ? _posOffset : this.getAttribute(attrName).offset\n const position = vertexID * _vertexSize + offset\n _rawData.setFloat32(position, x, true)\n _rawData.setFloat32(position + 4, y, true)\n }", "title": "" }, { "docid": "ec46507c9eae8f7e3b8ff7a3c16ac5a2", "score": "0.51116234", "text": "function setNodeLocationOnlyOffset(currNodeLocation, newLocationInfo) {\n // First (valid) update for this cst node\n if (isNaN(currNodeLocation.startOffset) === true) {\n // assumption1: Token location information is either NaN or a valid number\n // assumption2: Token location information is fully valid if it exist\n // (both start/end offsets exist and are numbers).\n currNodeLocation.startOffset = newLocationInfo.startOffset;\n currNodeLocation.endOffset = newLocationInfo.endOffset;\n }\n // Once the startOffset has been updated with a valid number it should never receive\n // any farther updates as the Token vector is sorted.\n // We still have to check this this condition for every new possible location info\n // because with error recovery enabled we may encounter invalid tokens (NaN location props)\n else if (currNodeLocation.endOffset < newLocationInfo.endOffset === true) {\n currNodeLocation.endOffset = newLocationInfo.endOffset;\n }\n}", "title": "" }, { "docid": "e76b90389992b1350e963207167c3cd6", "score": "0.5111179", "text": "$setPos(pos) {\n checkArgs('$setPos', arguments, ['point']);\n [this.x, this.y] = [pos.x, pos.y];\n this.$rec.setTo(this.x, this.y, this.width, this.height);\n }", "title": "" }, { "docid": "3fa640a9fcac88698f1d2b0fe3fc4e1a", "score": "0.51041377", "text": "async function refreshNodes() {\n let result = await axios.get(NODES_URL);\n let payload = result.data['Nodes'];\n\n let newState = {};\n for (var i = 0; i < payload.length; i++) {\n let node = payload[i];\n if (!newState[node.Location.X]) {\n newState[node.Location.X] = {};\n }\n newState[node.Location.X][node.Location.Y] = node;\n }\n state.nodes = newState;\n}", "title": "" }, { "docid": "82d447dd8b638e27860443c4347c6ed2", "score": "0.5098238", "text": "function SetLocation(data, id) {\n this.title = data.title;\n this.position = data.location;\n this.id = id;\n}", "title": "" }, { "docid": "d5274af3e46037e84f108512012fe2fa", "score": "0.5087275", "text": "setTargetOnCell(color, shape) {\n this.target = {};\n this.target.color = color;\n this.target.shape = shape;\n }", "title": "" }, { "docid": "3d86ce5f6e23e775304fcb854d20d918", "score": "0.5085524", "text": "setAt(idx, val) {\n let currNode = this.head;\n for (let i = 0; i < idx; i++) {\n currNode = currNode.next;\n }\n currNode.val = val;\n }", "title": "" }, { "docid": "fa904b4a7c635cf8caccc92dde2b3edb", "score": "0.5072151", "text": "putNodeValue() {\n this.node.createSpecificNode(this.keys, this.eventKeyup);\n }", "title": "" }, { "docid": "a03e2ede6d35988adad6b3e257756579", "score": "0.506476", "text": "set(idx, val) {\n\n //use get to find the node\n let theNode = this.get(idx)\n\n //if not found return false\n if (!theNode) return false\n\n //set the new value into theNode val to update the list\n theNode.val = val\n\n //return confirmation of update\n return true\n }", "title": "" }, { "docid": "23e32e83863bf9bfeaf0b3b8dfc17370", "score": "0.50514597", "text": "function updateNode(){\n\tvar node_id = $(\"#node_id\").val()\n\tvar node_name = $(\"#node_name\").val()\n\tvar node_posx = $(\"#node_posx\").val()\n\tvar node_posy = $(\"#node_posy\").val()\n\tvar node_color = $(\"#node_color\").val()\n\tvar node_size = $(\"#node_size\").val()\n\tselected_node.x(node_posx);\n\tselected_node.y(node_posy);\n\tselected_node.radius(node_size);\n\tselected_node.name(node_name);\n\tselected_node.fill(node_color);\n\tlayer.draw();\n}", "title": "" }, { "docid": "acb4f9bb5b754a8d821a3c22dbf37024", "score": "0.50444794", "text": "function updateNodePosition(args){\n var nodePos = args[0];\n\n //update positions of all nodes in data\n if(nodePos) {\n console.log(nodePos);\n for (var k in nodePos) {\n data.nodes[k][\"x\"] = nodePos[k][\"x\"];\n data.nodes[k][\"y\"] = nodePos[k][\"y\"];\n }\n\n\n //update file data.txt\n //write data to external file .txt\n\n var data_json = JSON.stringify(data);\n\n //clear file content\n fs.writeFile(data_path, '', function(err) {\n if(err) {\n return console.log(err);\n }\n });\n\n fs.writeFile(data_path, data_json, function(err) {\n if(err) {\n return console.log(err);\n }\n });\n }\n\n //publish the update\n session.publish(\"sdlSCI.data.onUpdatePos\", args);\n }", "title": "" }, { "docid": "758e2bd5b20b2132e2e0e99b9604d602", "score": "0.5038958", "text": "changeLoc() {\n this.x = 50 + Math.floor(Math.random() * 400);\n this.y = 112 + ((Math.floor(Math.random() * 4)) * 82);\n }", "title": "" }, { "docid": "32ba23036be1b474e243934042706bd8", "score": "0.50184906", "text": "function setupProperties(obj){\n var defaultKeys = Object.keys(this.defaultOffset);\n\n for (var i = 0; i < defaultKeys.length; i++) {\n var k = defaultKeys[i];\n\n if(obj[k]){\n //user defined option overrides defaultOffset\n obj.el[k] = obj[k];\n } else if(obj.el){\n //user object exists, but no override specified, fallback to default\n obj.el[k] = this.defaultOffset[k];\n } else {\n //no user object at all, working directly with dom ref\n obj[k] = this.defaultOffset[k];\n }\n }\n }", "title": "" }, { "docid": "ffb28e96565ba24d42ba8f0c04df08e6", "score": "0.5016972", "text": "move() {\n super.move();\n this.circle.setAttribute(\"cx\", this.position[0].toString());\n this.circle.setAttribute(\"cy\", this.position[1].toString());\n }", "title": "" }, { "docid": "6e59e93338b9427f66fd5389321f0e2f", "score": "0.50145805", "text": "setPosition(position) {\n this.x = position.x;\n this.y = position.y;\n\n d3.select(`#${this.id}`).attr(\"transform\", \"translate(\" + [this.x, this.y] + \")\");\n this.boundaryMgmt.edgeMgmt.updatePathConnectForVertex(this);\n\n this.reorderPositionMember(position);\n }", "title": "" }, { "docid": "89443f0fe6fde4c54d524c086d9b9850", "score": "0.50141513", "text": "setProperties(properties, options) {\n this.properties = properties;\n this.options = options;\n this.updateProperties();\n this.updateTitle();\n }", "title": "" }, { "docid": "aa4b405799020505d452a54f3e5368f8", "score": "0.50127554", "text": "function _updateCrests() {\n $svg.children().each(function(){\n var attrHref = $(this).attr('href');\n\n if(typeof attrHref !== typeof undefined && attrHref !== false) {\n $(this).attr('y', 130);\n }\n\n });\n }", "title": "" }, { "docid": "7384054f614eb0ddb08fb83ff68c2d63", "score": "0.5001898", "text": "setPos(pos){this.pos = pos;}", "title": "" }, { "docid": "9a0f9abb3a03bbefe230a9448a427e49", "score": "0.49983767", "text": "changeLocation(location){\n this.location = location;\n }", "title": "" }, { "docid": "b80fda8e41e89852877f4d1c58983f0e", "score": "0.4997997", "text": "updatePropertiesLocalization() {\n // resgata latitude e longitude do estado do componente\n this.loadProperties();\n }", "title": "" }, { "docid": "9e132521a359f0f8bddf2b8656865e12", "score": "0.49957138", "text": "function patch(node) {\n if (!node.position) {\n node.position = {};\n }\n}", "title": "" }, { "docid": "d0eb71ae51c5bb619f2aaea19435b218", "score": "0.4987721", "text": "establishNodePostions() {\n for (var i = 0; i < this.nodes.length; i++) {\n this.element = document.getElementById(this.nodes[i]['id']);\n this.position = this.element.getBoundingClientRect();\n this.yTop = this.position.top;\n this.yBottom = this.position.bottom;\n this.yCenter = this.yTop + ((this.yBottom - this.yTop) / 2); // distance between top and btm: center\n this.nodes[i]['yPos'] = this.yCenter;\n }\n }", "title": "" }, { "docid": "12dbf450ca945124757c080055416a94", "score": "0.49841765", "text": "set positions(value) {}", "title": "" }, { "docid": "d416d3e3523be9542b0e63df5747d190", "score": "0.4984057", "text": "function setProperties(buffer) {\n for (var i = 0; i < buffer.features.length; i++) {\n buffer.features[i].properties = bufferStyle;\n }\n}", "title": "" }, { "docid": "1e8f330395ea637e6d8eef9426c1afe0", "score": "0.49809098", "text": "Property(node, state) {\n this.go(node.key, state)\n if (node.value != null) {\n this.go(node.value, state)\n }\n }", "title": "" }, { "docid": "b84d30df0025e1399a96fd490b70aa61", "score": "0.497671", "text": "static setAddress(context, reference, address, forceNewScope = false) {\n let temp;\n\n if (reference.object != undefined && !forceNewScope) {\n let obj = reference.object;\n context.store.pushTemp(obj);\n\n // Square bracket properties - [\"this stuff\"]\n let propName = reference.identifier;\n if (propName instanceof Obj) {\n // Evaluate the expression in the square brackets\n let result = propName;\n\n // If it isn't already a string or number, convert it to a string\n if (result.type != Types.String && result.type != Types.Number) {\n let call = new FunctionCall(new Reference('toString', result));\n result = this.evaluateFunctionCall(context, call);\n }\n\n // If it is a number\n // Check if it is an array and access the corresponding array index\n if (result.type == Types.Number) {\n if (obj.type != Types.Array) {\n Report.error(`Cannot set numeric property of non-Array object`, reference.identifier);\n }\n \n // Array indexing\n let index = result.get('value');\n let arr = obj.get('value');\n // Allows negative indexing\n if (index < 0) index += arr.length;\n\n if (index < 0 || index >= arr.length) {\n Report.error(`Array index [${index}] out of range (Array length: ${arr.length})`, reference.identifier);\n }\n\n context.store.popTemp();\n arr[index] = address;\n return;\n }\n\n // Otherwise it is a string and the property name can be retrieved easily\n propName = result.get('value');\n }\n\n // Look for the property on the object\n temp = obj.getProperty(propName);\n if (temp != undefined) {\n obj.setProperty(propName, address);\n context.store.popTemp();\n return;\n }\n\n // Create a new property of the object\n obj.setProperty(propName, address);\n context.store.popTemp();\n return;\n\n } else {\n // Look for the identifier in the current scope\n temp = context.environment.get(reference.identifier, forceNewScope);\n if (temp != undefined) {\n context.environment.set(reference.identifier, address, forceNewScope);\n return;\n }\n\n // Look for the property in the current 'this' object\n if (context.self != null && !forceNewScope) {\n temp = context.self.getProperty(reference.identifier);\n if (temp != undefined) {\n context.self.setProperty(reference.identifier, address)\n return;\n }\n }\n\n // Create a new variable in the current scope\n context.environment.set(reference.identifier, address, forceNewScope);\n return address;\n }\n }", "title": "" }, { "docid": "a53fc69e64e95a62fb8cbfabc4b0d88d", "score": "0.49656248", "text": "function setLocation(grp, x, y, width, height) {\n grp.forEach(function(person) {\n person.position.x = x + random(-0.5, 0.5) * width;\n person.position.y = y + random(-0.5, 0.5) * height;\n });\n}", "title": "" }, { "docid": "2363bb6b945487ad282b5a79d39625d9", "score": "0.49621665", "text": "function setProperties(descriptor, data, properties) {\n forEach(properties, function(property) {\n if (data[property] !== undefined) {\n descriptor[property] = data[property];\n }\n });\n}", "title": "" }, { "docid": "cebcf43b0decefe039ef3994b2640456", "score": "0.49607673", "text": "function setPositionOfOldLabelsOnNewLabels(oldLabelNodes, labelNodes) {\n labelNodes.forEach(function (labelNode) {\n for (var i = 0; i < oldLabelNodes.length; i++) {\n var oldNode = oldLabelNodes[i];\n if (oldNode.equals(labelNode)) {\n labelNode.x = oldNode.x;\n labelNode.y = oldNode.y;\n labelNode.px = oldNode.px;\n labelNode.py = oldNode.py;\n break;\n }\n }\n });\n }", "title": "" }, { "docid": "e7c234552dc42e921787280a74cfe4d9", "score": "0.495541", "text": "setRobotPosition(x, y, direction) {\n this.currentPosition = {\n x,\n y,\n direction\n };\n }", "title": "" }, { "docid": "51bd1bdc5b2d44eac41c93bc7e9c920f", "score": "0.4952579", "text": "function setTILEPos(TILE, posX, posY) {\n\n TILE.posX = posX;\n TILE.posY = posY;\n TILE.id = calcTILEId(posX, posY);\n\n}", "title": "" }, { "docid": "aecf8ca2bcef31a88c8af1f83f79cac8", "score": "0.49414912", "text": "function updateNodes(nodes) {\n nodes.each(function (node) {\n node.data.layoutX = node.data.x = node.x;\n node.data.layoutY = node.data.y = node.y;\n });\n return nodes;\n}", "title": "" }, { "docid": "1f7babe623808cc2a3d3994d12bd590a", "score": "0.49377877", "text": "function setProperties() {\n $target.draggable = false;\n $target.classList.add('cut-focus');\n $base.classList.add('cut-base');\n $newImg.src = $target.src;\n $newImg.draggable = false;\n $container.classList.add('cut-container');\n $box.classList.add('cut-box');\n insertComponents();\n }", "title": "" }, { "docid": "58c3b7a577e689b0aff37ca4257e168f", "score": "0.49340886", "text": "set setLocation(location) {\n /*YOUR CODE HERE*/\n }", "title": "" }, { "docid": "d0203c148c2c746640cfedd730618691", "score": "0.49327102", "text": "function refresh_node_values(nodes) {\n var i;\n for (i = 0; i < nodes.length; i++) {\n if (nodes[i].onWorldChange) {\n nodes[i].onWorldChange(world);\n }\n }\n }", "title": "" }, { "docid": "188f9b10b629d1c2d7d85b8b320df763", "score": "0.49265227", "text": "function refresh_node_values(nodes) {\n var i;\n for (i = 0; i < nodes.length; i++) {\n if (nodes[i].onWorldChange) {\n nodes[i].onWorldChange(world);\n }\n }\n }", "title": "" }, { "docid": "188f9b10b629d1c2d7d85b8b320df763", "score": "0.49265227", "text": "function refresh_node_values(nodes) {\n var i;\n for (i = 0; i < nodes.length; i++) {\n if (nodes[i].onWorldChange) {\n nodes[i].onWorldChange(world);\n }\n }\n }", "title": "" }, { "docid": "99496b201727c054d99c8eefd5377b95", "score": "0.49137682", "text": "set p(newValue) {\n this.setAttribute(\"moving-circle-locus-length\", newValue);\n }", "title": "" }, { "docid": "7f7360f47413b853a7060aff06c332c9", "score": "0.4911777", "text": "setTape(pos, vals){\n this.tape.curr = pos;\n this.tape.values = vals;\n }", "title": "" }, { "docid": "abacbf5eddc2f7d42f3d7089007a3ffc", "score": "0.49114773", "text": "function setProperty(elm, name, value) {\n try {\n elm[name] = value;\n }\n catch (e) { }\n}", "title": "" }, { "docid": "9181a5f1cfa6eeeb54d70e6d6b99a50d", "score": "0.49057037", "text": "indexateNodes() {\n this.nodes.forEach(function (node, index) {\n node.index = index;\n });\n }", "title": "" }, { "docid": "5afe261b92d698bf783885e42ecac188", "score": "0.49033698", "text": "setTupletLocation(location) {\n if (!location) {\n location = Tuplet.LOCATION_TOP;\n } else if (location !== Tuplet.LOCATION_TOP && location !== Tuplet.LOCATION_BOTTOM) {\n throw new _vex__WEBPACK_IMPORTED_MODULE_0__[\"Vex\"].RERR('BadArgument', 'Invalid tuplet location: ' + location);\n }\n\n this.location = location;\n return this;\n }", "title": "" }, { "docid": "f0b40a6dfffb874f76a5de01b217f869", "score": "0.49008876", "text": "function setnx() {\n}", "title": "" }, { "docid": "1f57226105a4327fd2fb84904bd9da26", "score": "0.48981848", "text": "function setLocation(position) {\n last_lat = position.coords.latitude;\n last_lng = position.coords.longitude;\n const formData = {\n user: {\n last_lat,\n last_lng\n },\n course_id: mapElement.dataset.course\n };\n axios\n .patch(\n `/api/v1/users/${mapElement.dataset.driverId}/set_location`,\n formData,\n config\n )\n .then(r => console.log(r));\n }", "title": "" }, { "docid": "8433128baf40af109564be3324685a89", "score": "0.48855567", "text": "function addCoordinate( coordinateObject, coordinatesToUpdate, curPos ) {\n var name = coordinateObject.node ;\n var pos = [coordinateObject.data.lat, coordinateObject.data.lon] ;\n var nodeNum = coordinatesToUpdate[0].indexOf(name);\n if ( nodeNum == -1 ) {\n coordinatesToUpdate[0].push(name);\n coordinatesToUpdate[1].push(pos);\n } else {\n coordinatesToUpdate[1][nodeNum] = pos ;\n }\n lastUpdatePos = curPos;\n}", "title": "" }, { "docid": "9385630dae0f9d9f91c99c328c57345f", "score": "0.48845324", "text": "function setContactProperty(block, context) {\n var _a;\n (_a = block.config.set_contact_property) === null || _a === void 0 ? void 0 : _a.forEach(setContactProperty => setSingleContactProperty(setContactProperty, context));\n}", "title": "" }, { "docid": "b0876d3f7a6986c4c4df2aaaf0cede7f", "score": "0.48786741", "text": "function updateNodeInfo(node,queryType){\n\tvar indexVersion =-1;\n\tif((queryType!=null)&&(queryType!==undefined)){\n\t if(Array.isArray(queryType)&&(queryType.length==2)){//if queryType is an array that means that it is object property, othercase will be version\n\t\tindexVersion = queryType[0];\n\t\tvar indexProperty = queryType[1];\n\t\tif(node[\"properties\"].indexOf(properties[indexProperty])===-1){\n\t\t node[\"properties\"].push(properties[indexProperty]);\n\t\t}\n\t\tif(node[\"edge\"]===undefined){\n\t\t node[\"edge\"] = getColour((versions.length+indexProperty));//to avoid the 0 position for the property vector\n\t\t}\n\t }else{\n\t\tindexVersion = queryType;\n\t\tif(node[\"versions\"].indexOf(indexVersion)===-1){\n\t\t node[\"versions\"].push(indexVersion);\n\t\t}\n\t }\n\t if(node[\"colour\"]===undefined){\n\t\tnode[\"colour\"] = getColour(indexVersion);\n\t\tresult = parseColour(node[\"colour\"]);\n\t\tif(Array.isArray(result)&&(result.length==3)) {\n\t\t result[2] = parseFloat(result[2]) + 30;\n\t\t node[\"leaf\"] = \"hsl(\" + result[0] + \",\" + result[1] + \",\" + result[2] + \"%)\";\n\t\t}\n\t }\n\t}\n\treturn(node);\n }", "title": "" } ]
c3a4004ee0fc9d047a8b5a63b8635945
===================================================================== tg_selectTab() This is the event assigned to onclick=""
[ { "docid": "c7e38724054c8ca92282ae8c40950415", "score": "0.6964025", "text": "function tg_selectTab(selectedTab) {\r\n\t\tchangeTabSelection(selectedTab); // A new selection has been made\r\n\t\tif ( $(selectedTab).closest(\"div\").hasClass(\"tab-to-dropdown\") ) {\r\n\t\t\ttg_toggleDropdown( $(selectedTab).closest(\"div\"), false); // we're just closing the dropdown\r\n\t\t}\r\n\r\n\r\n\r\n\t\t// TODO: what if current tab reselected?\r\n\t}", "title": "" } ]
[ { "docid": "39bcf5a92a7a86809b766275364ea110", "score": "0.7869406", "text": "function clickTab( event ) {\n\n selectTab( window.thinc.tabsBox.selected );\n\n event.preventDefault();\n event.stopPropagation();\n\n }", "title": "" }, { "docid": "70a6e3a8fb261a4bdd0e5e1dcb0f65ce", "score": "0.73244077", "text": "onClick(event) {\n this.setSelectedTab(event.currentTarget);\n }", "title": "" }, { "docid": "a2c980676edd32fc8c654523d122d3a9", "score": "0.7224388", "text": "onTabSelected(_) {\r\n throw new Error(\"Method not implemented.\");\r\n }", "title": "" }, { "docid": "a851d08c3f50eb99e0cc6f503627e4a5", "score": "0.7195305", "text": "function tabButtonClick() {\n tabs.tabs(\"select\", getTabButtonIndex(this));\n }", "title": "" }, { "docid": "f3e0f8a4c67a70b92808abb688c9274a", "score": "0.71581477", "text": "function Tab_OnClick( pintIndex ) // function selectTab( tab )\n{\n\tif (Firebug) console.info('Tab_OnClick', pintIndex);\n\n\t//If the page is the quick Tour, exit this function\n\tif (is_QuickTour) return false;\n\n\tif (!UI.NetworkMap)\n\t\treturn false;\n\tif (typeof UI.Device != 'undefined')\n\t\tif (UI.Device.DeviceType == 'WebCam')\n\t\treturn false;\n\n ClearTC();\n \n // Do not save the Shopping Cart Tab, it will reload when redirected back to the UI.\n if (pintIndex != 4) \n {\n UI.Tab = pintIndex;\n setCookie(COOKIE_TAB, pintIndex);\n }else{\n rotateLoadingAnim(0);\n }\n\n\tvar Tab =\n\t{\n\t\tItems: [\n\t\t{\n\t\t\tName: 'SecurityTab',\n\t\t\tPanel: Tabs.SecurityPanel,\n\t\t\tControl: '~/WelcomeCtrl/WelcomeCtrlBeta.ascx',\n\t\t\tControlFullPanel: 'rightFull',\n\t\t\tOnLoad: 'reloadNetworkMap();'\n\t\t},\n\t\t{\n\t\t\tName: 'InfoTab',\n\t\t\tPanel: 'InfoPanel',\n\t\t\tControl: '~/TabInfoControl/TabInfoControl.ascx',\n\t\t\tControlFullPanel: 'rightFull',\n\t\t\tOnLoad: 'InfoPanel_Update( UI.Device );'\n\t\t},\n\t\t{\n\t\t\tName: 'SupportTab',\n\t\t\tPanel: Tabs.pnlSupport,\n\t\t\tControl: '~/TabSupportControl/SupportInfoCtrl.ascx',\n\t\t\tControlFullPanel: 'rightFull',\n\t\t\tOnLoad: null\n\t\t},\n\t\t{\n\t\t\tName: 'UpgradeTab',\n\t\t\tPanel: Tabs.pnlUpgrade,\n\t\t\tControl: '~/TabUpgradeControl/UpgradeCtrl.ascx',\n\t\t\tControlFullPanel: 'rightFull',\n\t\t\tOnLoad: null\n\t\t},\n\t\t{\n\t\t\tName: MasterControls.PurchaseNowTab,\n\t\t\tPanel: Tabs.pnlPurchase,\n\t\t\tControl: null,\n\t\t\tControlFullPanel: null,\n\t\t\tOnLoad: 'window.location = \"ShoppingCartCtrl/default.aspx\";'\n }]\n\t};\n\n\t\tif (typeof UI.Device != 'undefined')\n\t\t{\n\t\t\t// Hide all panels and show the panel associated with the clicked tab\n\t\t\t// Reset each tab's class and highlight the clicked tab\n\t\t\tfor (var i = 0; i < Tab.Items.length; i++)\n\t\t\t{\n\t\t\t var objTab = Tab.Items[i];\n\t\t\t if (objTab.Panel !== null) \n\t\t\t {\n\t\t\t\t if (!is_IE6)\n\t\t\t\t $get(objTab.Panel).setAttribute(attributeClass(), (i == pintIndex) ? \"TabPanelVisible\" : \"TabPanelInvisible\");\n \t\t\t\t\t\n\t\t\t\t $get(objTab.Panel).style.display = (i == pintIndex) ? \"block\" : \"none\";\n\t\t\t\t}\n\t\t\t \n\t\t\t\tif ($get(objTab.Name))\n\t\t\t\t\t$get(objTab.Name).setAttribute(attributeClass(), (i == pintIndex) ? \"tab selected\" : \"tab\");\n\t } // for \n\t\t\t\t\t\t\n\t\t\t// Select Guest Setup if the selected Device is a Guest\n\t if (pintIndex === 0 && UI.Device.DeviceType == 'Guest')\n\t\t\t\tNetworkMapIcon_OnClick(1);\n\n\t\tif (Tab.Items[pintIndex].OnLoad !== null)\n\t\t eval(Tab.Items[pintIndex].OnLoad);\n\n\t\tif (Tab.Items[pintIndex].Control !== null)\n\t\t\t{\n\t\t\t\tvar cookieService = getCookie(COOKIE_SERVICE);\n\t\t\t\tif (pintIndex == 0 && cookieService != '')\n\t\t\t\t{\n\t\t\t\t\t// A service is selected > load the service panel\n\t\t\t\t\tset_ContentTarget('right');\n\n\t\t\t\t\tif ($get('divShoppingCart') != null)\n\t\t\t\t\t\tSys.WebForms.PageRequestManager.getInstance().add_endRequest(pageRefresh);\n\t\t\t\t\telse\n\t\t\t\t\t\tpageRefresh();\n\t\t\t\t}\n\t\t\t\telse if (UI.Device.DeviceType != 'Guest' && UI.Device.DeviceType != 'Unknown' && UI.Device.DeviceType != 'WebCam')\n\t\t\t\t{\n\t\t\t\t UI.ContentTarget = Tab.Items[pintIndex].ControlFullPanel; //Don't set the content target cookie\n\t\t\t\t\tUI.LoadPanel(Tab.Items[pintIndex].Control);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "0bc9930919446ab7282d864705b94181", "score": "0.7033909", "text": "handleTabClick(tab) {\n this.select(tab.key);\n this.tabChange.emit(tab);\n }", "title": "" }, { "docid": "3939f02cb4a5727a019f67c4f1ef9a0c", "score": "0.7004922", "text": "function selectTab( tabIndex ) {\n\n window.thinc.tabsBox.selected = tabIndex;\n window.thinc.pagesBox.selected = tabIndex;\n\n }", "title": "" }, { "docid": "f32c1e2cbc5462bca3147ad7513fd403", "score": "0.6931371", "text": "function clickEventListener(event) {\n var tab = event.target;\n activateTab(tab, false);\n }", "title": "" }, { "docid": "2ebe74346750d07ae171d4bbe5cefbcd", "score": "0.69311357", "text": "function Tab_Click(e) {\n //close overlays\n CloseAllOverlays();\n\n var clickedTab = $(e.target);\n SetSelectedTabProperties(clickedTab);\n LoadTab(clickedTab.text());\n\n //clear powders filter\n //$(\"#chkPowders\").attr(\"checked\", false); -- BYTE IT - maintain state\n }", "title": "" }, { "docid": "d88dd3732763d1f189d6fc106d3c840f", "score": "0.69089246", "text": "onSelect(tabName) {\n\t\tthis.props.onTabSelect(tabName)\n\t}", "title": "" }, { "docid": "90355fec9d0f4fa5b1ae78e310ecd6b9", "score": "0.6902615", "text": "function clickEventListener(event) {\n var tab = event.target;\n activateTab(tab, false);\n }", "title": "" }, { "docid": "e9bb3c92356c6e9d118d2a3de4f9eb09", "score": "0.6897091", "text": "function selectTab(e) {\n var tabId = Number(e);\n chrome.tabs.update(tabId, { active: true });\n}", "title": "" }, { "docid": "9dd6e89a093b57ac6acb492de74b5f50", "score": "0.6847538", "text": "function tab(evt, tabname, id) {\n //reset the bg colour if it is red.\n var i, tabcontent, tablinks;\n tabcontent = document.getElementsByClassName(\"tabcontent\");\n for (i = 0; i < tabcontent.length; i++) {\n tabcontent[i].style.display = \"none\";\n }\n tablinks = document.getElementsByClassName(\"tablinks\");\n for (i = 0; i < tablinks.length; i++) {\n tablinks[i].className = tablinks[i].className.replace(\" active\", \"\");\n }\n document.getElementById(tabname).style.display = \"block\";\n var tab = document.getElementById(id);\n // print(tab);\n tab.style.backgroundColor = \"white\";\n evt.currentTarget.className += \" active\";\n}", "title": "" }, { "docid": "dc3fa694fdb945be230a22a1ab861a22", "score": "0.6816854", "text": "function tabClick(selectTab) {\r\n if (selectTab.getAttribute(\"class\") != \"openDialogTab\") {\r\n var div = document.getElementById(\"handleTab\");\r\n var tabs = div.childNodes;\r\n for (var i = 0; i < tabs.length; i++) {\r\n var otherTab = tabs[i];\r\n if (otherTab.nodeType == \"1\") {\r\n if ((otherTab.id == \"modelTab\") | (otherTab.id == \"publicationTab\"))\r\n otherTab.setAttribute(\"class\", \"dialogTab\");\r\n }\r\n }\r\n selectTab.setAttribute(\"class\", \"openDialogTab\");\r\n switchView();\r\n }\r\n}", "title": "" }, { "docid": "9d8efbc65704b899fc2d1b0faf29538b", "score": "0.67868507", "text": "function changeTab(){\n\tchangeButStat();\n\tthis.className=\"clicked\";\n\tthis.onclick=undefined;\n\trefreshPages(this.id);\n\tremoveContent($(\"content\"));\n\tsearchEntries(this.id,0);\n}", "title": "" }, { "docid": "1596857ed7de01394ffad6bab90bf94e", "score": "0.6750913", "text": "function selectTab(tabId) {\r\n // #6 #taptab #remove selection from all buttons...\r\n $('#tab-bar button').removeClass('selected');\r\n\r\n //...#6 #taptab #log the new tab on change...\r\n console.log('Changing to tab', tabId);\r\n\r\n //...#6 #taptab #add selection to the given tab button, its id is passed via the #argument tabId\r\n $(tabId).addClass('selected');\r\n}", "title": "" }, { "docid": "1596857ed7de01394ffad6bab90bf94e", "score": "0.6750913", "text": "function selectTab(tabId) {\r\n // #6 #taptab #remove selection from all buttons...\r\n $('#tab-bar button').removeClass('selected');\r\n\r\n //...#6 #taptab #log the new tab on change...\r\n console.log('Changing to tab', tabId);\r\n\r\n //...#6 #taptab #add selection to the given tab button, its id is passed via the #argument tabId\r\n $(tabId).addClass('selected');\r\n}", "title": "" }, { "docid": "1596857ed7de01394ffad6bab90bf94e", "score": "0.6750913", "text": "function selectTab(tabId) {\r\n // #6 #taptab #remove selection from all buttons...\r\n $('#tab-bar button').removeClass('selected');\r\n\r\n //...#6 #taptab #log the new tab on change...\r\n console.log('Changing to tab', tabId);\r\n\r\n //...#6 #taptab #add selection to the given tab button, its id is passed via the #argument tabId\r\n $(tabId).addClass('selected');\r\n}", "title": "" }, { "docid": "1596857ed7de01394ffad6bab90bf94e", "score": "0.6750913", "text": "function selectTab(tabId) {\r\n // #6 #taptab #remove selection from all buttons...\r\n $('#tab-bar button').removeClass('selected');\r\n\r\n //...#6 #taptab #log the new tab on change...\r\n console.log('Changing to tab', tabId);\r\n\r\n //...#6 #taptab #add selection to the given tab button, its id is passed via the #argument tabId\r\n $(tabId).addClass('selected');\r\n}", "title": "" }, { "docid": "f6d27726a7e7cdcfd241a904ec8a7959", "score": "0.67396736", "text": "function selectTab() {\n var href = tab.href.split('#')[1];\n var panel = layout.content_.querySelector('#' + href);\n layout.resetTabState_(tabs);\n layout.resetPanelState_(panels);\n tab.classList.add(layout.CssClasses_.IS_ACTIVE);\n panel.classList.add(layout.CssClasses_.IS_ACTIVE);\n }", "title": "" }, { "docid": "65c2095834970c9f189b6e54d810bb11", "score": "0.6737542", "text": "function selectTab($tab) {\n\n //hide previously selected tab panel\n $obj.find('.' + opts.panelClass + ':visible').attr({\n 'aria-hidden': 'true'\n }).hide();\n\n //show newly selected tab panel\n $obj.find('.' + opts.panelClass).eq($tab.parent().index()).attr({\n 'aria-hidden': 'false'\n }).show();\n\n //change state of previously selected tab list anchor\n $tabList.find(' > .' + opts.selClass).removeClass(opts.selClass).find('> a').attr({\n 'aria-selected': 'false',\n 'tabindex': '-1'\n });\n\n //set state of newly selected tab list anchor\n $tab.attr({\n 'aria-selected': 'true',\n 'tabindex': '0'\n }).parent().addClass(opts.selClass);\n\n //focus in the newly selected tab list anchor\n $tab.focus();\n }", "title": "" }, { "docid": "7c9b8c4de58a3c19692d974b0d2a842a", "score": "0.6721486", "text": "_handleClick(tab, tabHeader, index) {\n if (!tab.disabled) {\n this.selectedIndex = tabHeader.focusIndex = index;\n }\n }", "title": "" }, { "docid": "7c9b8c4de58a3c19692d974b0d2a842a", "score": "0.6721486", "text": "_handleClick(tab, tabHeader, index) {\n if (!tab.disabled) {\n this.selectedIndex = tabHeader.focusIndex = index;\n }\n }", "title": "" }, { "docid": "2e2f8ef30a2f650e209ac2d36591723c", "score": "0.67168254", "text": "function openTab(evt, infoTabName, pageName) {\n page_selected_tab = pageName + '_selected_tab';\n sessionStorage.setItem(page_selected_tab, infoTabName);\n var i, x, tablinks;\n\n x = document.getElementsByClassName(\"infoTab\");\n for (i = 0; i < x.length; i++) {\n x[i].style.display = \"none\";\n }\n tablinks = document.getElementsByClassName(\"tablink\");\n for (i = 0; i < tablinks.length; i++) {\n tablinks[i].className = tablinks[i].className.replace(\" w3-black\", \"\");\n }\n document.getElementById(infoTabName).style.display = \"block\";\n evt.currentTarget.className += \" w3-black\";\n}", "title": "" }, { "docid": "1c371a97ea3872fe6f7c798188a2ed29", "score": "0.66823363", "text": "function openTab(evt, tabChoice) {\n var i, tabcontent, tablinks;\n tabcontent = document.getElementsByClassName(\"tabcontent\");\n for (i = 0; i < tabcontent.length; i++) {\n // this turns off both content tabs, so you can turn on the one associated to the click event\n tabcontent[i].style.display = \"none\";\n }\n tablinks = document.getElementsByClassName(\"tablinks\");\n for (i = 0; i < tablinks.length; i++) {\n // this kills both active tabs (no active color dislpayed, reset below)\n tablinks[i].className = tablinks[i].className.replace(\" active\", \"\");\n }\n document.getElementById(tabChoice).style.display = \"block\";\n // this resets the color for the clicked, now active, tab\n evt.currentTarget.className += \" active\";\n}", "title": "" }, { "docid": "c278ea25c22c905d263d5f6619b55280", "score": "0.6667887", "text": "function onTabSelect(event) {\n let tab = event.target;\n let previousTabState = Ss.getTabValue(tab, \"previousTabState\");\n if (previousTabState) {\n // restore state\n Ss.setTabState(tab, previousTabState);\n // update last-active value\n Ss.setTabValue(tab, \"lastActive\", Date.now());\n }\n}", "title": "" }, { "docid": "6989e9a070f59d3df3372bf338e291f9", "score": "0.6667605", "text": "function selectTab() {\n layout.resetTabState_(tabs);\n tab.classList.add(layout.CssClasses_.IS_ACTIVE);\n }", "title": "" }, { "docid": "c7c61af58a394a0fec64d051c95fb6cd", "score": "0.6650569", "text": "function openTab(evt, tabName) {\n\n var i, tabcontent, tablinks;\n tabcontent = document.getElementsByClassName(\"tvt-tabcontent\");\n for (i = 0; i < tabcontent.length; i++) {\n tabcontent[i].style.display = \"none\";\n }\n tablinks = document.getElementsByClassName(\"tvt-tablinks\");\n for (i = 0; i < tablinks.length; i++) {\n tablinks[i].className = tablinks[i].className.replace(\" active\", \"\");\n }\n document.getElementById(tabName).style.display = \"block\";\n\n if (evt) {\n evt.currentTarget.className += \" active\";\n } else {\n $($('.tvt-tablinks')[0]).addClass('active');\n }\n\n\n\tremoveRequiredFromHiddenFields();\n}", "title": "" }, { "docid": "c5e97ab8ffb7f3e88f3ceb8a086407f3", "score": "0.66460675", "text": "function openTab(evt, tabName)\r\n{\r\n\tvar i, tabcontent, tablinks;\r\n\ttabcontent = document.getElementsByClassName(\"tabcontent\");\r\n\tfor (i = 0; i < tabcontent.length; i++)\r\n\t{\r\n\t\ttabcontent[i].style.display = \"none\";\r\n\t}\r\n\ttablinks = document.getElementsByClassName('tablinks');\r\n\tfor (i = 0; i < tablinks.length; i++)\r\n\t{\r\n\t\ttablinks[i].className = tablinks[i].className.replace(\" active\", \"\");\r\n\t}\r\n\tdocument.getElementById(tabName).style.display = \"block\";\r\n\tif (evt.type != \"click\")\r\n\t{\r\n\t\ttablinks[0].className += \" active\"; \r\n\t} else\r\n\t{\r\n\t\tevt.currentTarget.className += \" active\";\r\n\t}\r\n}", "title": "" }, { "docid": "694b376b64922bf60674ec086163e26d", "score": "0.6639213", "text": "function selectionOnClick(info, tab) {\r\n\tsendTextToWA(info.selectionText);\r\n}", "title": "" }, { "docid": "686a2eec528c80de4039c3e1b924985b", "score": "0.66384107", "text": "function onTab(event, data, state, opts) {}", "title": "" }, { "docid": "09f4107681251b0d6be49797bb01ae6a", "score": "0.6622023", "text": "function tabHandler(e) {\n const activeLabel = e.currentTarget.querySelector('.is-active .c-tab__label');\n const activeItem = getParent(activeLabel);\n const target = maybeValid(predicate(activeLabel))(e.target);\n clickItem(target, activeItem);\n}", "title": "" }, { "docid": "8ffb4d38f822e66cfed5daa5e7922183", "score": "0.66211647", "text": "function tabclick(e){\n\t\n\tvar $li = $(this);\n\t\n\tif (!$li.hasClass('active')) {\n\t\tshowtab(this.className);\n\t}\n\t\n}", "title": "" }, { "docid": "8ffb4d38f822e66cfed5daa5e7922183", "score": "0.66211647", "text": "function tabclick(e){\n\t\n\tvar $li = $(this);\n\t\n\tif (!$li.hasClass('active')) {\n\t\tshowtab(this.className);\n\t}\n\t\n}", "title": "" }, { "docid": "8feef12a6b9dfb87f25ae05d1b07cff3", "score": "0.66062653", "text": "function fnc_tabs_select_tab (ic_object, tab_select) {\n\t$('#' + ic_object).tabs('select', tab_select);\n}", "title": "" }, { "docid": "4808bcba2524f48efe3ab989722a622c", "score": "0.6581048", "text": "function tabClicked(event) {\n\n if (tabHasStandardLink(event.target)) {\n return true;\n }\n\n event.preventDefault();\n\n if (tabIsActive(event.target)) {\n return true;\n }\n\n deselectAllTabs(event.target);\n selectTab(event.target);\n\n (0, _utilities.triggerEvent)(event.target, 'beckett.tab.clicked');\n }", "title": "" }, { "docid": "3f3605a6a264cec72160881f6127adf3", "score": "0.656886", "text": "function handler_tab(container,tab,state){\n\n\n\n\n\n}", "title": "" }, { "docid": "b0fa0f00e8f4f9553615e1bced91ff65", "score": "0.65409", "text": "function tabClickHandler(pEvent){\n\n // Si une animation n'est pas en cours\n if(!that.isAnimating){\n\n // Cibler l'élément\n var $target = $(pEvent.currentTarget);\n\n // Cibler l'index\n that.selectedIndex = $target.data().tabIndex;\n\n // Mise à jour de l'état\n updateState();\n }\n }", "title": "" }, { "docid": "733e996b1199ee97785088a19cb2d93b", "score": "0.65405536", "text": "function _announceTabChosen(e) {\n\t\tvar elTarget = YAHOO.util.Event.getTarget(e);\n\t\tvar tabText = elTarget.innerHTML;\n\t\tvar tabNumber;\n\t\tfor (var i=0; i<_tabView.get(\"tabs\").length; i++) {\n\t\t\tif (_tabView.get('tabs')[i].get('labelEl') == elTarget) {\n\t\t\t\ttabNumber = i+1;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tvar source = { box: _this, tabNumber: tabNumber, tabText: tabText }; \n\t\t_this.tabChosen.fire(source);\n\t}", "title": "" }, { "docid": "adffd6b3dcb85c6b6d5e05acb0823704", "score": "0.65324557", "text": "select(tab) {\n var _this3 = this;\n\n return _asyncToGenerator(\n /*#__PURE__*/\n regeneratorRuntime.mark(function _callee3() {\n var selectedTab;\n return regeneratorRuntime.wrap(function _callee3$(_context3) {\n while (1) switch (_context3.prev = _context3.next) {\n case 0:\n selectedTab = getTab(_this3.tabs, tab);\n\n if (_this3.shouldSwitch(selectedTab)) {\n _context3.next = 3;\n break;\n }\n\n return _context3.abrupt(\"return\", false);\n\n case 3:\n _context3.next = 5;\n return _this3.setActive(selectedTab);\n\n case 5:\n _context3.next = 7;\n return _this3.notifyRouter();\n\n case 7:\n _this3.tabSwitch();\n\n return _context3.abrupt(\"return\", true);\n\n case 9:\n case \"end\":\n return _context3.stop();\n }\n }, _callee3);\n }))();\n }", "title": "" }, { "docid": "51dec87bb6e0ccf338d8be852601ba05", "score": "0.6529672", "text": "function tabs (event) {\n var actives = document.querySelectorAll('.activeTab');\n for (var i = 0; i < actives.length; i++){\n actives[i].className = '';\n }\n this.className = 'activeTab';\n document.getElementById(this.getAttribute('data-link')).className = 'activeTab';\n}", "title": "" }, { "docid": "6098e68481432b58ba34540548f7b96f", "score": "0.65240383", "text": "function tabCustom(evt, dataId) {\r\n \"use strict\";\r\n\r\n var i, tabcontent, tablinks;\r\n tabcontent = document.getElementsByClassName(\"tabcontent\");\r\n for (i = 0; i < tabcontent.length; i++) {\r\n tabcontent[i].style.display = \"none\";\r\n }\r\n tablinks = document.getElementsByClassName(\"tablinks\");\r\n for (i = 0; i < tablinks.length; i++) {\r\n tablinks[i].className = tablinks[i].className.replace(\" active\", \"\");\r\n }\r\n document.getElementById(dataId).style.display = \"block\";\r\n evt.currentTarget.className += \" active\";\r\n}", "title": "" }, { "docid": "849f9e9f92613638fc0d1d2706c13083", "score": "0.65059876", "text": "function changeTab(e) {\n if (e.target.classList.contains('label')) {\n handleClick(e);\n Tracker.activePane.setActiveTab(this);\n Tracker.refresh();\n }\n}", "title": "" }, { "docid": "b8be217ab277dc86818f6b13eb840bad", "score": "0.65038157", "text": "function selectSecurityTab()\n\t{\n\t\tif (Firebug) console.info('selectSecurityTab');\n\n\t\tTab_OnClick(0);\n\t\tSys.WebForms.PageRequestManager.getInstance().remove_endRequest(selectSecurityTab);\n\t}", "title": "" }, { "docid": "120b6fe1d4522574ba062381389cefec", "score": "0.6492654", "text": "onTabClick(tab) {\n this.attrs.onTabChange(tab);\n }", "title": "" }, { "docid": "ee0b0dff12e3e802fa7306a223c77ea4", "score": "0.6487239", "text": "function tabClickHandler(link, index) {\n link.addEventListener('click', function(e) {\n e.preventDefault();\n goToTab(index);\n });\n }", "title": "" }, { "docid": "3da7e2d4d52da4044170f37963b99536", "score": "0.64837265", "text": "function openTab(evt, tabName) { \n var i, tabcontent, tablinks;\n tabcontent = document.getElementsByClassName(\"tabcontent\");\n for (i = 0; i < tabcontent.length; i++) {\n tabcontent[i].style.display = \"none\";\n }\n tablinks = document.getElementsByClassName(\"tablinks\");\n for (i = 0; i < tablinks.length; i++) {\n tablinks[i].className = tablinks[i].className.replace(\" active\", \"\");\n }\n document.getElementById(tabName).style.display = \"block\";\n evt.currentTarget.className += \" active\"; \n}", "title": "" }, { "docid": "4b7c50359861a10d5cefd73706a5bb60", "score": "0.64821684", "text": "function openTab(evt, tabName) {\n // Declare all variables\n var i, tabcontent, tablinks;\n\n // Get all elements with class=\"tabcontent\" and hide them\n tabcontent = document.getElementsByClassName(\"tabcontent\");\n for (i = 0; i < tabcontent.length; i++) {\n tabcontent[i].style.display = \"none\";\n }\n\n // Get all elements with class=\"tablinks\" and remove the class \"active\"\n tablinks = document.getElementsByClassName(\"tablinks\");\n for (i = 0; i < tablinks.length; i++) {\n tablinks[i].className = tablinks[i].className.replace(\" active\", \"\");\n }\n\n // Show the current tab, and add an \"active\" class to the button that opened the tab\n document.getElementById(tabName).style.display = \"block\";\n evt.currentTarget.className += \" active\";\n\t\n}", "title": "" }, { "docid": "48efcf1606c81ec331932f01d7060879", "score": "0.6474177", "text": "function onSelectHandler(info, tab) {\n\tchrome.tabs.sendMessage(tab.id,\n\t\t{ type: \"select\" },\n\t\t{ frameId: info.frameId },\n\t\tfunction() {}\n\t);\n}", "title": "" }, { "docid": "cfb973baff6d43af305bb50121a2f225", "score": "0.6473509", "text": "function onSelectTab(tab) {\n // Resize table\n var tabGrid = tab.grid;\n if (nfCommon.isDefinedAndNotNull(tabGrid)) {\n tabGrid.resizeCanvas();\n }\n\n // Clear filter text\n clearFilter();\n\n // Reset filter options\n $('#cluster-filter-type').combo({\n options: tab.filterOptions,\n select: function (option) {\n applyFilter();\n }\n });\n\n updateFilterStats(tab);\n }", "title": "" }, { "docid": "5cefb2d42a53a2802fb7190b9f4c8a61", "score": "0.64337915", "text": "function openTab(evt, tabTitle) {\n // Declare all variables\n var i, tabcontent, tab;\n\n // Get all elements with class=\"tabcontent\" and hide them\n tabcontent = document.getElementsByClassName(\"tab-content\");\n for (i = 0; i < tabcontent.length; i++) {\n tabcontent[i].style.display = \"none\";\n }\n\n // // Get all elements with class=\"tab\" and remove the class \"active\"\n tab = document.getElementsByClassName(\"tab\");\n for (i = 0; i < tab.length; i++) {\n tab[i].className = tab[i].className.replace(\" active\", \"\");\n }\n\n // Show the current tab, and add an \"active\" class to the button that opened the tab\n document.getElementById(tabTitle).style.display = \"grid\";\n evt.currentTarget.className += \" active\";\n}", "title": "" }, { "docid": "12dbe0d98fa4da0fb1ff4565de5ff896", "score": "0.64149296", "text": "function onClickHandler(info, tab) {\n document.getElementsByTagName('body')[0].innerHTML+= info.selectionText;\n console.log(info.selectionText)\n}", "title": "" }, { "docid": "2676080537893d0dca1b0a4b880dc426", "score": "0.6409168", "text": "function openTab(evt, tabName) {\n var i, x, tablinks;\n x = $(\".content-tab\");\n for (i = 0; i < x.length; i++) {\n x[i].style.display = \"none \";\n }\n tablinks = $(\".tab\");\n for (i = 0; i < x.length; i++) {\n tablinks[i].className = tablinks[i].className.replace(\"is-active\", \"\");\n }\n document.getElementById(tabName).style = \"\";\n evt.currentTarget.className += \" is-active\";\n}", "title": "" }, { "docid": "90d3a92396cc9ea36c5f4095f4b47543", "score": "0.64090824", "text": "function tabChanged(e){\t\n\tvar node = e.selectedValueTab;\n\tgTrans.showDialogCorp = true;\t\t\n\tif (node.id == 'tab1') {\n\t\tgTrans.dialog.activeDataOnTab('tab1');\n\t\tgTrans.dialog.USERID = gCustomerNo;\n\t\tgTrans.dialog.PAYNENAME = \"0\";\n\t\tgTrans.dialog.TYPETEMPLATE = \"0\";\n\t\tgTrans.dialog.requestData(node.id);\n\t}\n\tif (node.id == 'tab2'){\t\t\t\n\t\tgTrans.dialog.activeDataOnTab('tab2');\n\t\tgTrans.dialog.USERID = gCustomerNo;\n\t\tgTrans.dialog.PAYNENAME = \"0\";\n\t\tgTrans.dialog.TYPETEMPLATE = \"1\";\n\t\tgTrans.dialog.requestData(node.id);\n\t}\t\n}", "title": "" }, { "docid": "8609aa40a915f7252f5367722e6be762", "score": "0.640886", "text": "function setClickEvents(e) {\n $(\"li.uss-box-suggestion.uss-omnibox-selectable\").click(function(){\n if (DEBUG) console.log(\"[INFO] In function setTabClickEvents().\");\n\n // reset tabs aria attributes\n $(\"li.uss-box-suggestion.uss-omnibox-selectable a']\").attr(\"aria-selected\",\"false\");\n $(this).attr(\"aria-selected\",\"true\");\n\n // reset tabpanels aria attributes\n var tabpanid= $(this).attr(\"aria-controls\"); // find tabpanel this tab controls\n var tabpan = $(\"#\"+tabpanid);\n $(\"ul.uss-box-suggestions']\").attr(\"aria-hidden\",\"true\");\n tabpan.attr(\"aria-hidden\",\"false\");\n\n $(this).focus();\n });\n\n }", "title": "" }, { "docid": "28f24882aa1e80191708cf69ce5ac62a", "score": "0.6404558", "text": "function openTab(evt, tabName){\n var i, tabbox, tabbtn;\n\n tabbox = document.getElementsByClassName('info-box');\n for( i = 0; i < tabbox.length; i++){\n tabbox[i].style.display = \"none\";\n }\n\n tabbtn = document.getElementsByClassName('info-btn');\n for( i = 0; i < tabbtn.length; i++){\n tabbtn[i].className = tabbtn[i].className.replace(\" active\", \"\");\n }\n\n document.getElementById(tabName).style.display = \"block\";\n evt.currentTarget.className += \" active\";\n}", "title": "" }, { "docid": "6bdf14e0fd2129b8a85e55b085167d25", "score": "0.6400957", "text": "function openTab(evt, tabName) {\r\n let i, tabcontent, tablinks;\r\n\r\n tabcontent = document.getElementsByClassName(\"tabcontent\");\r\n for (i = 0; i < tabcontent.length; i++) {\r\n tabcontent[i].style.display = \"none\";\r\n }\r\n \r\n tablinks = document.getElementsByClassName(\"tablinks\");\r\n for (i = 0; i < tablinks.length; i++) {\r\n tablinks[i].className = tablinks[i].className.replace(\" active\", \"\");\r\n }\r\n \r\n document.getElementById(tabName).style.display = \"block\";\r\n evt.currentTarget.className += \" active\";\r\n }", "title": "" }, { "docid": "a703ac9bcfac0976c80b571915e3c1bf", "score": "0.6389184", "text": "function onTabClick(event) {\n event.stopPropagation();\n event.preventDefault();\n\n var clickedTab = event.target;\n\n if (!clickedTab.getAttribute(\"class\").match(\"tab\")) {\n clickedTab = clickedTab.parentElement;\n }\n\n const clickedParent = clickedTab.closest(\".documentation__tabs\");\n const activeTab = clickedParent.querySelectorAll(\".tab--active\");\n const activeTabContent = clickedParent.querySelectorAll(\n \".tab-content--active\"\n );\n\n // deactivate existing active tab and panel\n if (activeTab.length) {\n activeTab[0].classList.remove(\"tab--active\");\n activeTabContent[0].classList.remove(\"tab-content--active\");\n }\n\n // activate new tab and panel\n if (clickedTab.href && clickedTab != activeTab[0]) {\n clickedTab.className += \" tab--active\";\n const activeTabContent = document.getElementById(\n clickedTab.href.split(\"#\")[1]\n );\n activeTabContent.className += \" tab-content--active\";\n }\n }", "title": "" }, { "docid": "d25022b83224da3c095d773051307baf", "score": "0.63885325", "text": "click_TVShows_HighlightsTab(){\n this.TVShows_HighlightsTab.waitForExist();\n this.TVShows_HighlightsTab.click();\n }", "title": "" }, { "docid": "7e4d0729276ac75ed838456d5551a18e", "score": "0.63871664", "text": "function onTab(e){\n var isShiftPressed = e.shiftKey;\n var activeElement = document.activeElement;\n var focusableElements = getFocusables(getSlideOrSection($(SECTION_ACTIVE_SEL)[0]));\n\n function preventAndFocusFirst(e){\n preventDefault(e);\n return focusableElements[0] ? focusableElements[0].focus() : null;\n }\n\n //outside any section or slide? Let's not hijack the tab!\n if(isFocusOutside(e)){\n return;\n }\n\n //is there an element with focus?\n if(activeElement){\n if(closest(activeElement, SECTION_ACTIVE_SEL + ',' + SECTION_ACTIVE_SEL + ' ' + SLIDE_ACTIVE_SEL) == null){\n activeElement = preventAndFocusFirst(e);\n }\n }\n\n //no element if focused? Let's focus the first one of the section/slide\n else{\n preventAndFocusFirst(e);\n }\n\n //when reached the first or last focusable element of the section/slide\n //we prevent the tab action to keep it in the last focusable element\n if(!isShiftPressed && activeElement == focusableElements[focusableElements.length - 1] ||\n isShiftPressed && activeElement == focusableElements[0]\n ){\n preventDefault(e);\n }\n }", "title": "" }, { "docid": "7e4d0729276ac75ed838456d5551a18e", "score": "0.63871664", "text": "function onTab(e){\n var isShiftPressed = e.shiftKey;\n var activeElement = document.activeElement;\n var focusableElements = getFocusables(getSlideOrSection($(SECTION_ACTIVE_SEL)[0]));\n\n function preventAndFocusFirst(e){\n preventDefault(e);\n return focusableElements[0] ? focusableElements[0].focus() : null;\n }\n\n //outside any section or slide? Let's not hijack the tab!\n if(isFocusOutside(e)){\n return;\n }\n\n //is there an element with focus?\n if(activeElement){\n if(closest(activeElement, SECTION_ACTIVE_SEL + ',' + SECTION_ACTIVE_SEL + ' ' + SLIDE_ACTIVE_SEL) == null){\n activeElement = preventAndFocusFirst(e);\n }\n }\n\n //no element if focused? Let's focus the first one of the section/slide\n else{\n preventAndFocusFirst(e);\n }\n\n //when reached the first or last focusable element of the section/slide\n //we prevent the tab action to keep it in the last focusable element\n if(!isShiftPressed && activeElement == focusableElements[focusableElements.length - 1] ||\n isShiftPressed && activeElement == focusableElements[0]\n ){\n preventDefault(e);\n }\n }", "title": "" }, { "docid": "437b3419bad51c6afec64c169a433ecc", "score": "0.63855386", "text": "function tabSelect(current) {\n jQuery('.buildTabControls .tabs-title').each(function() {\n jQuery(this).children(\".bottomBorder\").children().remove();\n jQuery(this).removeClass('is-active');\n jQuery(this).children('a').attr('aria-selected', 'false');\n var buildTabSelect = jQuery(this).children('a').attr('href');\n if (current === buildTabSelect) {\n jQuery(this).prevAll().children(\".bottomBorder\").append(\"<div class='activePast'></div>\");\n jQuery(this).children(\".bottomBorder\").append(\"<div class='activeBorder'></div>\");\n jQuery(this).addClass('is-active');\n jQuery(this).children('a').attr('aria-selected', 'true');\n }\n });\n}", "title": "" }, { "docid": "567d85595cbeaa816644dc9d91f4e63a", "score": "0.6382897", "text": "function changeTab (pressedTabIndex) {\n\n var tabsArea \n = document.getElementById(TABS_AREA);\n \n var tabs = tabsArea.getElementsByTagName(DIV_TAG);\n\n for (var tabIndex = 0; tabIndex < tabs.length; ++tabIndex) {\n tabs[tabIndex].className = TAB_CLASS_NAME;\n }\n\n tabs[pressedTabIndex].className = TAB_CLASS_NAME + ' ' + SELECTED_TAB_CLASS_NAME;\n}", "title": "" }, { "docid": "28124058dcfcba0f3bcac6561b5863f6", "score": "0.6373425", "text": "function SetSelectedTabProperties(selectedTab) {\n $(\"#colouratlas .tablist div.tab\").removeClass(\"selected\").unbind(\"click\", Tab_Click);\n $(\"#colouratlas .tablist div.tab\").bind(\"click\", Tab_Click)\n selectedTab.addClass(\"selected\").unbind(\"click\", Tab_Click);\n }", "title": "" }, { "docid": "6361c5eb630bb9fcb54b95f8cc0863c7", "score": "0.6361629", "text": "function activateTab(evt) {\n var i, tablinks;\n\n // Get all elements with class=\"tablinks\" and remove the class \"active\"\n tablinks = document.getElementsByClassName(\"tablinks\");\n for (i = 0; i < tablinks.length; i++) {\n tablinks[i].className = tablinks[i].className.replace(\" active\", \" \");\n }\n\n //Add an \"active\" class to the button that opened the tab\n evt.currentTarget.className += \" active\";\n}", "title": "" }, { "docid": "d98ba6206bafddf91577c95f02bbbf53", "score": "0.63324195", "text": "function tab_link_click(event) \n\t\t\t\n\t\t{event.preventDefault();\n\t\t\t//kill the link, we will take it from here\n\n\n\t\t\t//change chosen one class\n\t\t\t$('#tabbed nav a').removeClass('theChosenOne'); //<---blanket removal\n\t\t\t$(this).addClass('theChosenOne');\n\n\n\t\t\t/*show and hide appropriate section*/\n\n\n\t\t\t$('#tabbed section').hide(); //hide all of them\n\n\t\t\tvar theHref = $ (this).attr('href');\n\t\t\t$(theHref).show(); //show section based on ID in Href of our link\t\t\t\n\n\t\t\tconsole.log ('hey there !');}", "title": "" }, { "docid": "e27863269ccf4914f78c921c1d13d03f", "score": "0.6330428", "text": "function openTabs(evt, tabName) {\n // Declare variables\n var i, tabcontent, tablinks;\n\n // Get all elements with class=\"tabcontent\" and hide them\n tabcontent = document.getElementsByClassName(\"tabcontent\");\n for (i = 0; i < tabcontent.length; i++) {\n tabcontent[i].style.display = \"none\";\n }\n\n // Get all elements with class=\"tablinks\" and remove the class \"active\"\n tablinks = document.getElementsByClassName(\"tablinks\");\n for (i = 0; i < tablinks.length; i++) {\n tablinks[i].className = tablinks[i].className.replace(\" active\", \"\");\n }\n\n // do anything else each individual tab requires\n if (tabName == \"playinfo\") {\n // fill in tables\n PIreset();\n playinfotables();\n } else if (tabName == \"qbperformance\") {\n // fill in tables\n QBPreset();\n throwmetrics();\n }\n\n // Show the current tab, and add an \"active\" calss to the button that opened the tab\n document.getElementById(tabName).style.display = \"block\";\n evt.currentTarget.className += \" active\";\n}", "title": "" }, { "docid": "df4d8f2b204c4084271d4bb13e03bf49", "score": "0.6318299", "text": "function openTab(evt, tabName) {\n var i, x, tablinks;\n x = document.getElementsByClassName(\"tab\");\n for (i = 0; i < x.length; i++) {\n x[i].style.display = \"none\";\n }\n tablinks = document.getElementsByClassName(\"tablink\");\n for (i = 0; i < x.length; i++) {\n tablinks[i].className = tablinks[i].className.replace(\" w3-border-theme\", \"\");\n }\n document.getElementById(tabName).style.display = \"block\";\n evt.currentTarget.firstElementChild.className += \" w3-border-theme\";\n }", "title": "" }, { "docid": "2086b4e1c13b8daad4c874304dc9d920", "score": "0.63107836", "text": "function OuvrirOnglet_Relances()\n{\n var tabs = top.document.getElementById(\"Tous_les_onglets\");\n tabs.selectedItem = top.document.getElementById(\"Onglet_Relances\");\n}", "title": "" }, { "docid": "7f3671dff41f254b9fce4569d6fbc87a", "score": "0.6302742", "text": "function OuvrirOnglet_Routage()\n{\n var tabs = top.document.getElementById(\"Tous_les_onglets\");\n tabs.selectedItem = top.document.getElementById(\"Onglet_Routage\");\n}", "title": "" }, { "docid": "a84099de933ec3c7a9098a37ae2db2e8", "score": "0.6298288", "text": "function changeTabs(e) {\n // The target is the drop down menu item of the tab\n var target = $(e.target);\n\n // Change the tab title to reflect which operation is selected\n target.parents(\"li\").find(\"span.title\").html(target.html());\n\n // Change the current operation in different tab\n switch (target.parents(\"li.dropdown\").attr(\"id\")) {\n case \"base-stage1-dropdown\":\n currentBaseLayerStage1Op = $(e.target).attr(\"href\").substring(1);\n break;\n case \"base-stage2-dropdown\":\n currentBaseLayerStage2Op = $(e.target).attr(\"href\").substring(1);\n break;\n case \"shade-dropdown\":\n currentShadeLayerOp = $(e.target).attr(\"href\").substring(1);\n break;\n case \"outline-dropdown\":\n currentOutlineLayerOp = $(e.target).attr(\"href\").substring(1);\n break;\n }\n}", "title": "" }, { "docid": "2abe4321b889065b26ee215d8cfc618d", "score": "0.62911636", "text": "function selectItem(e) {\n removeBorder();\n removeShow();\n // Add border to current tab\n this.classList.add('tab-border');\n}", "title": "" }, { "docid": "5bb43fedc5bc84569a66ae41a1d9cc03", "score": "0.6287128", "text": "function openTab(evt, tabName, tabId) {\n // Declare all variables\n var i, tabcontent, tablinks;\n\n // Get all elements with class=\"tabcontent\" and hide them\n tabcontent = document.getElementsByClassName(\"tabcontent\");\n for (i = 0; i < tabcontent.length; i++) {\n if (tabcontent[i].id.split('-')[1][0] == tabId[0])\n tabcontent[i].style.display = \"none\";\n }\n\n // Get all elements with class=\"tablinks\" and remove the class \"active\"\n tablinks = document.getElementsByClassName(\"tablinks\");\n for (i = 0; i < tablinks.length; i++) {\n if (tablinks[i].id.split('-')[1][0] == tabId[0])\n tablinks[i].className = tablinks[i].className.replace(\" active\", \"\");\n }\n\n // Show the current tab, and add an \"active\" class to the button that opened the tab\n document.getElementById(tabName + '-' + tabId).style.display = \"block\";\n evt.currentTarget.className += \" active\";\n}", "title": "" }, { "docid": "0223f732901e53b74f3a66217921a095", "score": "0.62775356", "text": "function selectItem(e){\r\n removeBorder();\r\n removeShow();\r\n\r\n this.classList.add('tab-border');\r\n const tabContentItem=document.querySelector(`#${this.id}-content`);\r\n tabContentItem.classList.add('show');\r\n}", "title": "" }, { "docid": "fab72aa545e42116d8504b64c607e84a", "score": "0.6274736", "text": "function actionChangeTab(selectedTab) {\r\n\treturn {\r\n\t\ttype: CHANGE_TAB,\r\n\t\ttab: selectedTab\r\n\t}\r\n}", "title": "" }, { "docid": "497c96f1134c4f8981f8e7e948ddb775", "score": "0.6262655", "text": "function select (index) { // 23812\n if (!locked) ctrl.focusIndex = ctrl.selectedIndex = index; // 23813\n ctrl.lastClick = true; // 23814\n // nextTick is required to prevent errors in user-defined click events // 23815\n $mdUtil.nextTick(function () { // 23816\n ctrl.tabs[ index ].element.triggerHandler('click'); // 23817\n }, false); // 23818\n } // 23819", "title": "" }, { "docid": "d140c6a72c5d51223c1091ae8e5bdf91", "score": "0.62603104", "text": "function OuvrirOnglet_Cotisations()\n{\n var tabs = top.document.getElementById(\"Tous_les_onglets\");\n tabs.selectedItem = top.document.getElementById(\"Onglet_Cotisations\");\n}", "title": "" }, { "docid": "6be95568877d15c35a390de40c7a107f", "score": "0.62387586", "text": "function openTab(evt, tabName) {\r\n var i, sidebar, tablinks;\r\n\r\n sidebar = document.getElementsByClassName(\"sidebar-text\");\r\n for (i = 0; i < sidebar.length; i++) {\r\n sidebar[i].style.display = \"none\";\r\n }\r\n\r\n tablinks = document.getElementsByClassName(\"tablinks\");\r\n for (i = 0; i < tablinks.length; i++) {\r\n tablinks[i].className = tablinks[i].className.replace(\" active\", \"\");\r\n }\r\n\r\n document.getElementById(tabName).style.display = \"block\";\r\n evt.currentTarget.className += \" active\";\r\n}", "title": "" }, { "docid": "463a00c84e1ba3e6f1a4822d9bcc3f6f", "score": "0.6237791", "text": "function selectItem(e) {\n // Calling other functions\n removeBorder();\n removeShow();\n // Add border to current tab.\n this.classList.add(\"tab-border\");\n // Grab content ID from the DOM\n const tabContentItem = document.querySelector(`#${this.id}-content`);\n // Add show class\n tabContentItem.classList.add(\"show\");\n}", "title": "" }, { "docid": "cbe459ea70a04a0b17ad4d042cdf3334", "score": "0.623698", "text": "function openInventoryTab(event, tabName) {\n // Declare all variables\n var tabContent, tabButton;\n\n // Get all elements with class=\"tabContent\" and hide them\n tabContent = document.getElementsByClassName(\"tabContent\");\n for (var i = 0; i < tabContent.length; i++)\n tabContent[i].style.display = \"none\";\n\n tabButton = document.getElementsByClassName(\"tabButton\");\n for (var i = 0; i < tabButton.length; i++)\n tabButton[i].className = tabButton[i].className.replace(\" active\", \"\");\n\n document.getElementById(tabName).style.display = \"block\";\n event.currentTarget.className += \" active\";\n}", "title": "" }, { "docid": "dcdf67df3e5a75d83c321bd97837d6ac", "score": "0.62317693", "text": "function select(index,canSkipClick){if(!locked)ctrl.focusIndex=ctrl.selectedIndex=index;// skip the click event if noSelectClick is enabled\nif(canSkipClick&&ctrl.noSelectClick)return;// nextTick is required to prevent errors in user-defined click events\n$mdUtil.nextTick(function(){ctrl.tabs[index].element.triggerHandler('click');},false);}", "title": "" }, { "docid": "949b4a8244793938bdd0a6224eb501a7", "score": "0.62288195", "text": "function chooseTab(tabIndex) {\n\n var tablesArea\n = document.getElementById(TABLES_AREA);\n var tables\n = tablesArea.getElementsByTagName(TABLE_TAG);\n\n for (var tableIndex = 0; tableIndex < tables.length; ++tableIndex) {\n setVisibilityOfElement(tables[tableIndex], tableIndex == tabIndex);\n }\n\n changeTab(tabIndex);\n\n saveCurrentTabIndex(tabIndex);\n\n}", "title": "" }, { "docid": "c1d7a13c30fcc9d6af374275d521ca8c", "score": "0.62253904", "text": "function openTab(evt, name) {\n var i, tabcontent, tablinks;\n localStorage.setItem('activeTab', name);\n\n tabcontent = document.getElementsByClassName(\"tabcontent\");\n for (i = 0; i < tabcontent.length; i++) {\n tabcontent[i].style.display = \"none\";\n }\n\n tablinks = document.getElementsByClassName(\"tablinks\");\n for (i = 0; i < tablinks.length; i++) {\n tablinks[i].className = tablinks[i].className.replace(\" active\", \"\");\n }\n\n document.getElementById(name).style.display = \"block\";\n evt.currentTarget.className += \" active\";\n\n document.getElementById(\"title\").innerHTML = document.getElementById(\"button\"+name).innerHTML;\n}", "title": "" }, { "docid": "3b9f25e062521312dc4a62c628cd542e", "score": "0.62249523", "text": "function openTab(evt, customTab) {\n var i, tabcontent, tablinks;\n tabcontent = document.getElementsByClassName(\"tabcontent\");\n for (i = 0; i < tabcontent.length; i++) {\n tabcontent[i].style.display = \"none\";\n }\n tablinks = document.getElementsByClassName(\"cart-tablinks\");\n for (i = 0; i < tablinks.length; i++) {\n tablinks[i].className = tablinks[i].className.replace(\" active\", \"\");\n }\n document.getElementById(customTab).style.display = \"block\";\n evt.currentTarget.className += \" active\";\n}", "title": "" }, { "docid": "83f3ebe5bc02abded09cd35445c5515d", "score": "0.6222834", "text": "function tabClick(e) {\r\n var elem = e.target,\r\n elemHREF = elem.getAttribute('href'),\r\n tabContents = document.querySelectorAll('.programs__content .programs__item');\r\n\r\n // if we click on elem whose href contains 'tab-', proceed\r\n if (elemHREF != null && elemHREF.indexOf('program-') != -1) {\r\n e.preventDefault();\r\n\r\n // if we didn't click an active item, switch tabs\r\n if (elem.className.indexOf('active') == -1) {\r\n // remove the active class from the tabs and the visible class from the tab cotents\r\n for (var i = 0; i < tabs.length; i++) {\r\n tabs[i].classList.remove('active');\r\n tabContents[i].classList.remove('visible');\r\n }\r\n\r\n //add the active class to the clicked elem and the visible class to the corresponding tab content\r\n elem.classList.add('active');\r\n document.getElementById(elemHREF).classList.add('visible');\r\n }\r\n }\r\n}", "title": "" }, { "docid": "06c8b12d52d2f0fe609865d8f98eb210", "score": "0.62091994", "text": "function openDosage(evt, doseName) {\n var i, x, tablinks;\n x = document.getElementsByClassName(\"dosage-select\");\n for (i = 0; i < x.length; i++) {\n x[i].style.display = \"none\";\n }\n tablinks = document.getElementsByClassName(\"tablink\");\n for (i = 0; i < x.length; i++) {\n tablinks[i].className = tablinks[i].className.replace(\" dosage-btn-selected\", \"\");\n }\n document.getElementById(doseName).style.display = \"block\";\n evt.currentTarget.className += \" dosage-btn-selected\";\n}", "title": "" }, { "docid": "34e99376bff4ce953335031fa26c4253", "score": "0.6195853", "text": "function setTabEvents(page) {\n\n\td3.selectAll(\".tab\")\n\t\t.on(\"click\", function() { \n\t\t\tif (tabview !== d3.select(this).attr(\"id\")) { return changeDetailContent(this, page); }\n\t\t})\n\t\t.on(\"mouseover\", function() { return highlightTab(this); })\t\n\t\t.on(\"mouseout\", function() { return highlightTab(this); });\t\n}", "title": "" }, { "docid": "754f68a7be3bf05259488548386270a9", "score": "0.61868256", "text": "function selectTab(selectedTab) {\n for (let tab of tabs) {\n let selected = tab == selectedTab;\n tab.node.style.display = selected ? \"\" : \"none\";\n tab.button.style.color = selected ? \"red\" : \"\";\n }\n }", "title": "" }, { "docid": "4522aae9ae47d272919590f25ce645a7", "score": "0.61785614", "text": "function EuterpeTabSelectionEvent(SelectTab){\n\tvar Msg={\n\t\ttype: \"Euterpe_Sel_Tab\",\n\t\teventPhase: 2,\n\t\ttarget: SelectTab.Element,\n\t\tsrcElement: SelectTab.Element,\n\t\tSelectTab: SelectTab,\n\t\tUID: SelectTab.GetUID(),\n\t\tTabSelected: SelectTab\t\t\n\t};\n\tif(SelectTab.Dad!=null && SelectTab.Dad!=undefined)\n\t{\n\t\tMsg.target=SelectTab.Dad.Element;\n\t\tMsg.srcElement=SelectTab.Dad.Element;\n\t\tif(SelecteTab.Dad.EventMgr)\n\t\t\treturn SelectTab.Dad.EventMgr(Msg);\n\t\telse\n\t\t\treturn Euterpe_Undefined_EventMgr;\t\t\n\t}\n}", "title": "" }, { "docid": "68867b62d9c5d2e335b0b302f86b9c5e", "score": "0.6174263", "text": "function selectItem (e) {\n removeBorder ();\n removeShow ();\n this.classList.add ('tab-border');\n const tabContentItem = document.querySelector (`#${this.id}-content`);\n tabContentItem.classList.add ('show');\n}", "title": "" }, { "docid": "0ebc277cd57587bad1c06f1057ee0c78", "score": "0.6173183", "text": "function openTab(evt, tabName) {\n // Declare all variables\n var i, tabcontent, tabButtons;\n\n // Get all elements with class=\"tabcontent\" and hide them\n tabcontent = document.getElementsByClassName(\"tab-content\");\n for (i = 0; i < tabcontent.length; i++) {\n tabcontent[i].style.display = \"none\";\n }\n\n // Get all elements with class=\"tab-button\" and remove the class \"active\"\n tabButtons = document.getElementsByClassName(\"tab-button\");\n for (i = 0; i < tabButtons.length; i++) {\n tabButtons[i].className = tabButtons[i].className.replace(\" active\", \"\");\n }\n\n // Show the current tab, and add an \"active\" class to the button that opened the tab\n let openTabContent = document.getElementById(tabName);\n openTabContent.style.display = \"block\";\n evt.currentTarget.className += \" active\";\n\n updateOpenTab(openTabContent);\n}", "title": "" }, { "docid": "272ec018da62f9f3b5044849397d2635", "score": "0.61721313", "text": "function onClickHandler(info, tab) {\n\t//Send Selected Text to context page\n\tchrome.tabs.query({active: true, currentWindow: true}, function(tabs) {\n\t\tchrome.tabs.sendMessage(tabs[0].id, {\"selectionText\": info.selectionText}, function(response) {\n\t\t\t//alert(\"Success\");\n\t\t});\n\t});\n}", "title": "" }, { "docid": "33b8de895ad1406196d10697929c9b66", "score": "0.61610264", "text": "function OuvrirOnglet_Personnes()\n{\n var tabs = top.document.getElementById(\"Tous_les_onglets\");\n tabs.selectedItem = top.document.getElementById(\"Onglet_Personnes\");\n}", "title": "" }, { "docid": "33b8de895ad1406196d10697929c9b66", "score": "0.61610264", "text": "function OuvrirOnglet_Personnes()\n{\n var tabs = top.document.getElementById(\"Tous_les_onglets\");\n tabs.selectedItem = top.document.getElementById(\"Onglet_Personnes\");\n}", "title": "" }, { "docid": "33b8de895ad1406196d10697929c9b66", "score": "0.61610264", "text": "function OuvrirOnglet_Personnes()\n{\n var tabs = top.document.getElementById(\"Tous_les_onglets\");\n tabs.selectedItem = top.document.getElementById(\"Onglet_Personnes\");\n}", "title": "" }, { "docid": "5dafc42176a59c3021b892d50a40eeaf", "score": "0.615939", "text": "notifySelected() {\n debug(LOG, 'notifySelected',{tab: this});\n //foundation sets selectedIndex\n if (this.element.props.hasOwnProperty('onSelect')) {\n this.element.props.onSelect({tab: this})\n }\n }", "title": "" }, { "docid": "1e77b977795582d8ae681b54ee1deed1", "score": "0.6150044", "text": "function openTab(evt, TabName) {\r\n \r\n var i, tabcontent, tablinks;\r\n tabcontent = document.getElementsByClassName(\"tabcontent\");\r\n for (i = 0; i < tabcontent.length; i++) {\r\n tabcontent[i].style.display = \"none\";\r\n }\r\n tablinks = document.getElementsByClassName(\"tablinks\");\r\n for (i = 0; i < tablinks.length; i++) {\r\n tablinks[i].className = tablinks[i].className.replace(\" active\", \"\");\r\n }\r\n document.getElementById(TabName).style.display = \"block\";\r\n evt.currentTarget.className += \" active\";\r\n\r\n // run specific function depending on tab name\r\n switch(TabName) {\r\n case 'map':\r\n\tmapSearch(TabName);\r\n\tbreak;\r\n case 'demographics':\r\n\tdemoSearch(TabName);\r\n\tbreak;\r\n case 'schools':\r\n\tschoolSearch(TabName);\r\n\tbreak;\r\n case 'weather':\r\n\tweatherSearch(TabName);\r\n\tbreak;\r\n \r\n }\r\n}", "title": "" }, { "docid": "485cc8d954886f79c0c0d08d39d5aee0", "score": "0.6147178", "text": "onLabelClick(event) {\n // Select and focus first tab when label is clicked\n this.onTabClick(this.tabs[0].value, event);\n this.focusFirstTab();\n }", "title": "" }, { "docid": "7462b7d3994a0808884f0907f65549c6", "score": "0.6143279", "text": "function genericOnClick(info, tab) {\n var pageUrl;\n if (!info.linkUrl) {\n patt = /http(s)?:\\/\\/([\\w-]+\\.)+[\\w-]+(\\/[\\w- .\\/?%&=]*)?/;\n if (patt.test(info.selectionText)) { // 如果选择的是一个url地址\n pageUrl = info.selectionText;\n }\n else {\n pageUrl = info.pageUrl;\n }\n }\n else {\n pageUrl = info.linkUrl;\n }\n // setPref(\"vidown_ext_chrome_id\", \"\");\n doVidp(pageUrl, \"context\");\n}", "title": "" }, { "docid": "e21097ea88225b0aac71df8cb8aa8eef", "score": "0.6139071", "text": "function tabs(){\r\n\tvar container = document.getElementById(\"tabbedsection\");\r\n\tvar navItem = container.querySelector(\".tabs ul li\");\r\n\tvar ident = navItem.id.split(\"_\")[1];\r\n\tnavItem.parentNode.setAttribute(\"data-current\",ident);\r\n //set current tab with class of activetabheader\r\n navItem.setAttribute(\"class\",\"tabActiveHeader\");\r\n\t\r\n\t//hide two tab contents we don't need\r\n var pages = container.querySelectorAll(\".tabpage\");\r\n for (var i = 1; i < pages.length; i++) {\r\n pages[i].style.display=\"none\";\r\n }\r\n\r\n //this adds click event to tabs\r\n var tabs = container.querySelectorAll(\".tabs ul li\");\r\n for (var i = 0; i < tabs.length; i++) {\r\n tabs[i].addEventListener('click', displayPage, false);\r\n }\r\n}", "title": "" } ]
b210a1d3a648ef4d83de053a1dcfb5c0
Create path match function from `pathtoregexp` spec.
[ { "docid": "b8aa27e9b55ede2322c316709cdb43ec", "score": "0.56202406", "text": "function match(str, options) {\n var keys = [];\n var re = pathToRegexp(str, keys, options);\n return regexpToFunction(re, keys, options);\n}", "title": "" } ]
[ { "docid": "f5f74eacc706dd2d17654701b58d50a5", "score": "0.6699938", "text": "function PathMatcher(pattern) {\n this.pattern = pattern;\n }", "title": "" }, { "docid": "eb944368b21527f1ad908967487b4a36", "score": "0.6252223", "text": "function matchPath(e,t){void 0===t&&(t={}),(\"string\"===typeof t||Array.isArray(t))&&(t={path:t});var n=t,r=n.path,o=n.exact,a=void 0!==o&&o,i=n.strict,l=void 0!==i&&i,u=n.sensitive,s=void 0!==u&&u;return[].concat(r).reduce((function(t,n){if(!n&&\"\"!==n)return null;if(t)return t;var r=function compilePath$1(e,t){var n=\"\"+t.end+t.strict+t.sensitive,r=H[n]||(H[n]={});if(r[e])return r[e];var o=[],a={regexp:P()(e,o,t),keys:o};return z<W&&(r[e]=a,z++),a}(n,{end:a,strict:l,sensitive:s}),o=r.regexp,i=r.keys,u=o.exec(e);if(!u)return null;var c=u[0],d=u.slice(1),p=e===c;return a&&!p?null:{path:n,\n// the path used to match\nurl:\"/\"===n&&\"\"===c?\"/\":c,\n// the matched portion of the URL\nisExact:p,\n// whether or not we matched exactly\nparams:i.reduce((function(e,t,n){return e[t.name]=d[n],e}),{})}}),null)}", "title": "" }, { "docid": "fdf52a5312a7a728466f22ae964b942f", "score": "0.61984235", "text": "createPathRegex() {\n let regexText = punycode.toASCII(this.IncomingPath);\n\n // Get the keys.\n Object.keys(this.PathFormats).forEach((format) => {\n let formatCompound = this.Options.parameterPrefix + format;\n formatCompound += this.Options.hasParameterSuffix ? this.Options.parameterSuffix : '';\n regexText = regexText.replace(formatCompound, this.PathFormats[format].value);\n });\n\n this.pathRegex = new RegExp(`${regexText}[/]?`);\n }", "title": "" }, { "docid": "4b435974aeaecebe847fc105828b5cbd", "score": "0.61721456", "text": "function matchPattern(pattern,pathname){ // Ensure pattern starts with leading slash for consistency with pathname.\nif(pattern.charAt(0)!=='/'){pattern='/'+pattern;}var _compilePattern2=compilePattern(pattern),regexpSource=_compilePattern2.regexpSource,paramNames=_compilePattern2.paramNames,tokens=_compilePattern2.tokens;if(pattern.charAt(pattern.length-1)!=='/'){regexpSource+='/?'; // Allow optional path separator at end.\n} // Special-case patterns like '*' for catch-all routes.\nif(tokens[tokens.length-1]==='*'){regexpSource+='$';}var match=pathname.match(new RegExp('^'+regexpSource,'i'));if(match==null){return null;}var matchedPath=match[0];var remainingPathname=pathname.substr(matchedPath.length);if(remainingPathname){ // Require that the match ends at a path separator, if we didn't match\n// the full path, so any remaining pathname is a new path segment.\nif(matchedPath.charAt(matchedPath.length-1)!=='/'){return null;} // If there is a remaining pathname, treat the path separator as part of\n// the remaining pathname for properly continuing the match.\nremainingPathname='/'+remainingPathname;}return {remainingPathname:remainingPathname,paramNames:paramNames,paramValues:match.slice(1).map(function(v){return v&&decodeURIComponent(v);})};}", "title": "" }, { "docid": "873aa1756cd76b5a0780ece6eb994625", "score": "0.61576015", "text": "function pathMatch(e,t){if(t===e){return true}const a=e.indexOf(t);if(a===0){if(t.substr(-1)===\"/\"){return true}if(e.substr(t.length,1)===\"/\"){return true}}return false}", "title": "" }, { "docid": "eb502bfc0ae329f81d5ad498431d8986", "score": "0.60794526", "text": "function pathMatch(t,a){if(a===t){return true}var i=t.indexOf(a);if(i===0){if(a.substr(-1)===\"/\"){return true}if(t.substr(a.length,1)===\"/\"){return true}}return false}", "title": "" }, { "docid": "b1de5c62b8c1e2c9401eb05424d8c551", "score": "0.6069134", "text": "pathMatches(doc, regex) {\n return doc && doc.path && new RegExp(regex).test(doc.path);\n }", "title": "" }, { "docid": "e61a25770cc5d97a2c522d7f77169ac8", "score": "0.6042764", "text": "function matchPattern(pattern,pathname){// Ensure pattern starts with leading slash for consistency with pathname.\n\tif(pattern.charAt(0)!=='/'){pattern='/'+pattern;}var _compilePattern2=compilePattern(pattern);var regexpSource=_compilePattern2.regexpSource;var paramNames=_compilePattern2.paramNames;var tokens=_compilePattern2.tokens;if(pattern.charAt(pattern.length-1)!=='/'){regexpSource+='/?';// Allow optional path separator at end.\n\t}// Special-case patterns like '*' for catch-all routes.\n\tif(tokens[tokens.length-1]==='*'){regexpSource+='$';}var match=pathname.match(new RegExp('^'+regexpSource,'i'));if(match==null){return null;}var matchedPath=match[0];var remainingPathname=pathname.substr(matchedPath.length);if(remainingPathname){// Require that the match ends at a path separator, if we didn't match\n\t// the full path, so any remaining pathname is a new path segment.\n\tif(matchedPath.charAt(matchedPath.length-1)!=='/'){return null;}// If there is a remaining pathname, treat the path separator as part of\n\t// the remaining pathname for properly continuing the match.\n\tremainingPathname='/'+remainingPathname;}return{remainingPathname:remainingPathname,paramNames:paramNames,paramValues:match.slice(1).map(function(v){return v&&decodeURIComponent(v);})};}", "title": "" }, { "docid": "96d4f6f939c54871f4fd2fb041827d12", "score": "0.6023632", "text": "function matchPath(pathname,options){if(options===void 0){options={};}if(typeof options===\"string\")options={path:options};var _options=options,path=_options.path,_options$exact=_options.exact,exact=_options$exact===void 0?false:_options$exact,_options$strict=_options.strict,strict=_options$strict===void 0?false:_options$strict,_options$sensitive=_options.sensitive,sensitive=_options$sensitive===void 0?false:_options$sensitive;var paths=[].concat(path);return paths.reduce(function(matched,path){if(matched)return matched;var _compilePath=compilePath$1(path,{end:exact,strict:strict,sensitive:sensitive}),regexp=_compilePath.regexp,keys=_compilePath.keys;var match=regexp.exec(pathname);if(!match)return null;var url=match[0],values=match.slice(1);var isExact=pathname===url;if(exact&&!isExact)return null;return{path:path,// the path used to match\nurl:path===\"/\"&&url===\"\"?\"/\":url,// the matched portion of the URL\nisExact:isExact,// whether or not we matched exactly\nparams:keys.reduce(function(memo,key,index){memo[key.name]=values[index];return memo;},{})};},null);}", "title": "" }, { "docid": "f72fe46d4613ce64c9242ce91cfaa491", "score": "0.5995508", "text": "function matchPath(pathname,options){if(options===void 0){options={};}if(typeof options===\"string\"||Array.isArray(options)){options={path:options};}var _options=options,path=_options.path,_options$exact=_options.exact,exact=_options$exact===void 0?false:_options$exact,_options$strict=_options.strict,strict=_options$strict===void 0?false:_options$strict,_options$sensitive=_options.sensitive,sensitive=_options$sensitive===void 0?false:_options$sensitive;var paths=[].concat(path);return paths.reduce(function(matched,path){if(!path&&path!==\"\")return null;if(matched)return matched;var _compilePath=compilePath$1(path,{end:exact,strict:strict,sensitive:sensitive}),regexp=_compilePath.regexp,keys=_compilePath.keys;var match=regexp.exec(pathname);if(!match)return null;var url=match[0],values=match.slice(1);var isExact=pathname===url;if(exact&&!isExact)return null;return{path:path,// the path used to match\nurl:path===\"/\"&&url===\"\"?\"/\":url,// the matched portion of the URL\nisExact:isExact,// whether or not we matched exactly\nparams:keys.reduce(function(memo,key,index){memo[key.name]=values[index];return memo;},{})};},null);}", "title": "" }, { "docid": "8c1e6512fbe3fa200d9bfc083bab79b3", "score": "0.5932161", "text": "function trivia4and5(path, pattern, matchPathEnds) {\n var nativePath = sep !== posix.sep ? path.replace(ALL_FORWARD_SLASHES, sep) : path;\n var nativePathEnd = sep + nativePath;\n var parsedPattern = matchPathEnds ? function (path, basename) {\n return typeof path === 'string' && (path === nativePath || endsWith(path, nativePathEnd)) ? pattern : null;\n } : function (path, basename) {\n return typeof path === 'string' && path === nativePath ? pattern : null;\n };\n parsedPattern.allPaths = [(matchPathEnds ? '*/' : './') + path];\n return parsedPattern;\n}", "title": "" }, { "docid": "b57742ef8e19b90f5e5e8d01058422d4", "score": "0.590654", "text": "function trivia4and5(path, pattern, matchPathEnds) {\n var nativePath = nativeSep !== sep ? path.replace(ALL_FORWARD_SLASHES, nativeSep) : path;\n var nativePathEnd = nativeSep + nativePath;\n var parsedPattern = matchPathEnds ? function (path, basename$$1) {\n return path && (path === nativePath || endsWith(path, nativePathEnd)) ? pattern : null;\n } : function (path, basename$$1) {\n return path && path === nativePath ? pattern : null;\n };\n parsedPattern.allPaths = [(matchPathEnds ? '*/' : './') + path];\n return parsedPattern;\n}", "title": "" }, { "docid": "486f1fc97f280d27b3bdcfbd64f98d90", "score": "0.58884364", "text": "function trivia4and5(path, pattern, matchPathEnds) {\n var nativePath = paths.nativeSep !== paths.sep ? path.replace(ALL_FORWARD_SLASHES, paths.nativeSep) : path;\n var nativePathEnd = paths.nativeSep + nativePath;\n var parsedPattern = matchPathEnds ? function (path, basename) {\n return path && (path === nativePath || strings.endsWith(path, nativePathEnd)) ? pattern : null;\n } : function (path, basename) {\n return path && path === nativePath ? pattern : null;\n };\n parsedPattern.allPaths = [(matchPathEnds ? '*/' : './') + path];\n return parsedPattern;\n }", "title": "" }, { "docid": "c7d5b5138828046af5504abb8eb70b04", "score": "0.5843794", "text": "function matchPath(pathname, options) {\n if (options === void 0) {\n options = {};\n }\n\n if (typeof options === \"string\" || Array.isArray(options)) {\n options = {\n path: options,\n };\n }\n\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === void 0 ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === void 0 ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive =\n _options$sensitive === void 0 ? false : _options$sensitive;\n var paths = [].concat(path);\n return paths.reduce(function (matched, path) {\n if (!path && path !== \"\") return null;\n if (matched) return matched;\n\n var _compilePath = compilePath$1(path, {\n end: exact,\n strict: strict,\n sensitive: sensitive,\n }),\n regexp = _compilePath.regexp,\n keys = _compilePath.keys;\n\n var match = regexp.exec(pathname);\n if (!match) return null;\n var url = match[0],\n values = match.slice(1);\n var isExact = pathname === url;\n if (exact && !isExact) return null;\n return {\n path: path,\n // the path used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url,\n // the matched portion of the URL\n isExact: isExact,\n // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {}),\n };\n }, null);\n }", "title": "" }, { "docid": "7260b63d539111c21565b328a98627cd", "score": "0.5810216", "text": "function routeMatcher(paths) {\n // EXAMPLE. For the following paths:\n /* [\n \"/orgs/{org}/invitations\",\n \"/repos/{owner}/{repo}/collaborators/{username}\"\n ] */\n const regexes = paths.map((p) => p\n .split(\"/\")\n .map((c) => (c.startsWith(\"{\") ? \"(?:.+?)\" : c))\n .join(\"/\"));\n // 'regexes' would contain:\n /* [\n '/orgs/(?:.+?)/invitations',\n '/repos/(?:.+?)/(?:.+?)/collaborators/(?:.+?)'\n ] */\n const regex = `^(?:${regexes.map((r) => `(?:${r})`).join(\"|\")})[^/]*$`;\n // 'regex' would contain:\n /*\n ^(?:(?:\\/orgs\\/(?:.+?)\\/invitations)|(?:\\/repos\\/(?:.+?)\\/(?:.+?)\\/collaborators\\/(?:.+?)))[^\\/]*$\n \n It may look scary, but paste it into https://www.debuggex.com/\n and it will make a lot more sense!\n */\n return new RegExp(regex, \"i\");\n}", "title": "" }, { "docid": "e8d88d9533494b93f4082b47866648b5", "score": "0.57909775", "text": "function trivia4and5(targetPath, pattern, matchPathEnds) {\n const usingPosixSep = paths.sep === paths.posix.sep;\n const nativePath = usingPosixSep ? targetPath : targetPath.replace(ALL_FORWARD_SLASHES, paths.sep);\n const nativePathEnd = paths.sep + nativePath;\n const targetPathEnd = paths.posix.sep + targetPath;\n const parsedPattern = matchPathEnds ? function (testPath, basename) {\n return typeof testPath === 'string' &&\n ((testPath === nativePath || testPath.endsWith(nativePathEnd))\n || !usingPosixSep && (testPath === targetPath || testPath.endsWith(targetPathEnd)))\n ? pattern : null;\n } : function (testPath, basename) {\n return typeof testPath === 'string' &&\n (testPath === nativePath\n || (!usingPosixSep && testPath === targetPath))\n ? pattern : null;\n };\n parsedPattern.allPaths = [(matchPathEnds ? '*/' : './') + targetPath];\n return parsedPattern;\n }", "title": "" }, { "docid": "01f4c77af77da2bc8e7e6ed973d38e4a", "score": "0.57702583", "text": "function matchPath(pathname, options) {\n if (options === void 0) {\n options = {};\n }\n\n if (typeof options === \"string\" || Array.isArray(options)) {\n options = {\n path: options\n };\n }\n\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === void 0 ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === void 0 ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === void 0 ? false : _options$sensitive;\n var paths = [].concat(path);\n return paths.reduce(function (matched, path) {\n if (!path && path !== \"\") return null;\n if (matched) return matched;\n\n var _compilePath = compilePath$1(path, {\n end: exact,\n strict: strict,\n sensitive: sensitive\n }),\n regexp = _compilePath.regexp,\n keys = _compilePath.keys;\n\n var match = regexp.exec(pathname);\n if (!match) return null;\n var url = match[0],\n values = match.slice(1);\n var isExact = pathname === url;\n if (exact && !isExact) return null;\n return {\n path: path,\n // the path used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url,\n // the matched portion of the URL\n isExact: isExact,\n // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n }, null);\n}", "title": "" }, { "docid": "01f4c77af77da2bc8e7e6ed973d38e4a", "score": "0.57702583", "text": "function matchPath(pathname, options) {\n if (options === void 0) {\n options = {};\n }\n\n if (typeof options === \"string\" || Array.isArray(options)) {\n options = {\n path: options\n };\n }\n\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === void 0 ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === void 0 ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === void 0 ? false : _options$sensitive;\n var paths = [].concat(path);\n return paths.reduce(function (matched, path) {\n if (!path && path !== \"\") return null;\n if (matched) return matched;\n\n var _compilePath = compilePath$1(path, {\n end: exact,\n strict: strict,\n sensitive: sensitive\n }),\n regexp = _compilePath.regexp,\n keys = _compilePath.keys;\n\n var match = regexp.exec(pathname);\n if (!match) return null;\n var url = match[0],\n values = match.slice(1);\n var isExact = pathname === url;\n if (exact && !isExact) return null;\n return {\n path: path,\n // the path used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url,\n // the matched portion of the URL\n isExact: isExact,\n // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n }, null);\n}", "title": "" }, { "docid": "01f4c77af77da2bc8e7e6ed973d38e4a", "score": "0.57702583", "text": "function matchPath(pathname, options) {\n if (options === void 0) {\n options = {};\n }\n\n if (typeof options === \"string\" || Array.isArray(options)) {\n options = {\n path: options\n };\n }\n\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === void 0 ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === void 0 ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === void 0 ? false : _options$sensitive;\n var paths = [].concat(path);\n return paths.reduce(function (matched, path) {\n if (!path && path !== \"\") return null;\n if (matched) return matched;\n\n var _compilePath = compilePath$1(path, {\n end: exact,\n strict: strict,\n sensitive: sensitive\n }),\n regexp = _compilePath.regexp,\n keys = _compilePath.keys;\n\n var match = regexp.exec(pathname);\n if (!match) return null;\n var url = match[0],\n values = match.slice(1);\n var isExact = pathname === url;\n if (exact && !isExact) return null;\n return {\n path: path,\n // the path used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url,\n // the matched portion of the URL\n isExact: isExact,\n // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n }, null);\n}", "title": "" }, { "docid": "01f4c77af77da2bc8e7e6ed973d38e4a", "score": "0.57702583", "text": "function matchPath(pathname, options) {\n if (options === void 0) {\n options = {};\n }\n\n if (typeof options === \"string\" || Array.isArray(options)) {\n options = {\n path: options\n };\n }\n\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === void 0 ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === void 0 ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === void 0 ? false : _options$sensitive;\n var paths = [].concat(path);\n return paths.reduce(function (matched, path) {\n if (!path && path !== \"\") return null;\n if (matched) return matched;\n\n var _compilePath = compilePath$1(path, {\n end: exact,\n strict: strict,\n sensitive: sensitive\n }),\n regexp = _compilePath.regexp,\n keys = _compilePath.keys;\n\n var match = regexp.exec(pathname);\n if (!match) return null;\n var url = match[0],\n values = match.slice(1);\n var isExact = pathname === url;\n if (exact && !isExact) return null;\n return {\n path: path,\n // the path used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url,\n // the matched portion of the URL\n isExact: isExact,\n // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n }, null);\n}", "title": "" }, { "docid": "01f4c77af77da2bc8e7e6ed973d38e4a", "score": "0.57702583", "text": "function matchPath(pathname, options) {\n if (options === void 0) {\n options = {};\n }\n\n if (typeof options === \"string\" || Array.isArray(options)) {\n options = {\n path: options\n };\n }\n\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === void 0 ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === void 0 ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === void 0 ? false : _options$sensitive;\n var paths = [].concat(path);\n return paths.reduce(function (matched, path) {\n if (!path && path !== \"\") return null;\n if (matched) return matched;\n\n var _compilePath = compilePath$1(path, {\n end: exact,\n strict: strict,\n sensitive: sensitive\n }),\n regexp = _compilePath.regexp,\n keys = _compilePath.keys;\n\n var match = regexp.exec(pathname);\n if (!match) return null;\n var url = match[0],\n values = match.slice(1);\n var isExact = pathname === url;\n if (exact && !isExact) return null;\n return {\n path: path,\n // the path used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url,\n // the matched portion of the URL\n isExact: isExact,\n // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n }, null);\n}", "title": "" }, { "docid": "01f4c77af77da2bc8e7e6ed973d38e4a", "score": "0.57702583", "text": "function matchPath(pathname, options) {\n if (options === void 0) {\n options = {};\n }\n\n if (typeof options === \"string\" || Array.isArray(options)) {\n options = {\n path: options\n };\n }\n\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === void 0 ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === void 0 ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === void 0 ? false : _options$sensitive;\n var paths = [].concat(path);\n return paths.reduce(function (matched, path) {\n if (!path && path !== \"\") return null;\n if (matched) return matched;\n\n var _compilePath = compilePath$1(path, {\n end: exact,\n strict: strict,\n sensitive: sensitive\n }),\n regexp = _compilePath.regexp,\n keys = _compilePath.keys;\n\n var match = regexp.exec(pathname);\n if (!match) return null;\n var url = match[0],\n values = match.slice(1);\n var isExact = pathname === url;\n if (exact && !isExact) return null;\n return {\n path: path,\n // the path used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url,\n // the matched portion of the URL\n isExact: isExact,\n // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n }, null);\n}", "title": "" }, { "docid": "01f4c77af77da2bc8e7e6ed973d38e4a", "score": "0.57702583", "text": "function matchPath(pathname, options) {\n if (options === void 0) {\n options = {};\n }\n\n if (typeof options === \"string\" || Array.isArray(options)) {\n options = {\n path: options\n };\n }\n\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === void 0 ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === void 0 ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === void 0 ? false : _options$sensitive;\n var paths = [].concat(path);\n return paths.reduce(function (matched, path) {\n if (!path && path !== \"\") return null;\n if (matched) return matched;\n\n var _compilePath = compilePath$1(path, {\n end: exact,\n strict: strict,\n sensitive: sensitive\n }),\n regexp = _compilePath.regexp,\n keys = _compilePath.keys;\n\n var match = regexp.exec(pathname);\n if (!match) return null;\n var url = match[0],\n values = match.slice(1);\n var isExact = pathname === url;\n if (exact && !isExact) return null;\n return {\n path: path,\n // the path used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url,\n // the matched portion of the URL\n isExact: isExact,\n // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n }, null);\n}", "title": "" }, { "docid": "01f4c77af77da2bc8e7e6ed973d38e4a", "score": "0.57702583", "text": "function matchPath(pathname, options) {\n if (options === void 0) {\n options = {};\n }\n\n if (typeof options === \"string\" || Array.isArray(options)) {\n options = {\n path: options\n };\n }\n\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === void 0 ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === void 0 ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === void 0 ? false : _options$sensitive;\n var paths = [].concat(path);\n return paths.reduce(function (matched, path) {\n if (!path && path !== \"\") return null;\n if (matched) return matched;\n\n var _compilePath = compilePath$1(path, {\n end: exact,\n strict: strict,\n sensitive: sensitive\n }),\n regexp = _compilePath.regexp,\n keys = _compilePath.keys;\n\n var match = regexp.exec(pathname);\n if (!match) return null;\n var url = match[0],\n values = match.slice(1);\n var isExact = pathname === url;\n if (exact && !isExact) return null;\n return {\n path: path,\n // the path used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url,\n // the matched portion of the URL\n isExact: isExact,\n // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n }, null);\n}", "title": "" }, { "docid": "01f4c77af77da2bc8e7e6ed973d38e4a", "score": "0.57702583", "text": "function matchPath(pathname, options) {\n if (options === void 0) {\n options = {};\n }\n\n if (typeof options === \"string\" || Array.isArray(options)) {\n options = {\n path: options\n };\n }\n\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === void 0 ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === void 0 ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === void 0 ? false : _options$sensitive;\n var paths = [].concat(path);\n return paths.reduce(function (matched, path) {\n if (!path && path !== \"\") return null;\n if (matched) return matched;\n\n var _compilePath = compilePath$1(path, {\n end: exact,\n strict: strict,\n sensitive: sensitive\n }),\n regexp = _compilePath.regexp,\n keys = _compilePath.keys;\n\n var match = regexp.exec(pathname);\n if (!match) return null;\n var url = match[0],\n values = match.slice(1);\n var isExact = pathname === url;\n if (exact && !isExact) return null;\n return {\n path: path,\n // the path used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url,\n // the matched portion of the URL\n isExact: isExact,\n // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n }, null);\n}", "title": "" }, { "docid": "01f4c77af77da2bc8e7e6ed973d38e4a", "score": "0.57702583", "text": "function matchPath(pathname, options) {\n if (options === void 0) {\n options = {};\n }\n\n if (typeof options === \"string\" || Array.isArray(options)) {\n options = {\n path: options\n };\n }\n\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === void 0 ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === void 0 ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === void 0 ? false : _options$sensitive;\n var paths = [].concat(path);\n return paths.reduce(function (matched, path) {\n if (!path && path !== \"\") return null;\n if (matched) return matched;\n\n var _compilePath = compilePath$1(path, {\n end: exact,\n strict: strict,\n sensitive: sensitive\n }),\n regexp = _compilePath.regexp,\n keys = _compilePath.keys;\n\n var match = regexp.exec(pathname);\n if (!match) return null;\n var url = match[0],\n values = match.slice(1);\n var isExact = pathname === url;\n if (exact && !isExact) return null;\n return {\n path: path,\n // the path used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url,\n // the matched portion of the URL\n isExact: isExact,\n // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n }, null);\n}", "title": "" }, { "docid": "01f4c77af77da2bc8e7e6ed973d38e4a", "score": "0.57702583", "text": "function matchPath(pathname, options) {\n if (options === void 0) {\n options = {};\n }\n\n if (typeof options === \"string\" || Array.isArray(options)) {\n options = {\n path: options\n };\n }\n\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === void 0 ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === void 0 ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === void 0 ? false : _options$sensitive;\n var paths = [].concat(path);\n return paths.reduce(function (matched, path) {\n if (!path && path !== \"\") return null;\n if (matched) return matched;\n\n var _compilePath = compilePath$1(path, {\n end: exact,\n strict: strict,\n sensitive: sensitive\n }),\n regexp = _compilePath.regexp,\n keys = _compilePath.keys;\n\n var match = regexp.exec(pathname);\n if (!match) return null;\n var url = match[0],\n values = match.slice(1);\n var isExact = pathname === url;\n if (exact && !isExact) return null;\n return {\n path: path,\n // the path used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url,\n // the matched portion of the URL\n isExact: isExact,\n // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n }, null);\n}", "title": "" }, { "docid": "01f4c77af77da2bc8e7e6ed973d38e4a", "score": "0.57702583", "text": "function matchPath(pathname, options) {\n if (options === void 0) {\n options = {};\n }\n\n if (typeof options === \"string\" || Array.isArray(options)) {\n options = {\n path: options\n };\n }\n\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === void 0 ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === void 0 ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === void 0 ? false : _options$sensitive;\n var paths = [].concat(path);\n return paths.reduce(function (matched, path) {\n if (!path && path !== \"\") return null;\n if (matched) return matched;\n\n var _compilePath = compilePath$1(path, {\n end: exact,\n strict: strict,\n sensitive: sensitive\n }),\n regexp = _compilePath.regexp,\n keys = _compilePath.keys;\n\n var match = regexp.exec(pathname);\n if (!match) return null;\n var url = match[0],\n values = match.slice(1);\n var isExact = pathname === url;\n if (exact && !isExact) return null;\n return {\n path: path,\n // the path used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url,\n // the matched portion of the URL\n isExact: isExact,\n // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n }, null);\n}", "title": "" }, { "docid": "01f4c77af77da2bc8e7e6ed973d38e4a", "score": "0.57702583", "text": "function matchPath(pathname, options) {\n if (options === void 0) {\n options = {};\n }\n\n if (typeof options === \"string\" || Array.isArray(options)) {\n options = {\n path: options\n };\n }\n\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === void 0 ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === void 0 ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === void 0 ? false : _options$sensitive;\n var paths = [].concat(path);\n return paths.reduce(function (matched, path) {\n if (!path && path !== \"\") return null;\n if (matched) return matched;\n\n var _compilePath = compilePath$1(path, {\n end: exact,\n strict: strict,\n sensitive: sensitive\n }),\n regexp = _compilePath.regexp,\n keys = _compilePath.keys;\n\n var match = regexp.exec(pathname);\n if (!match) return null;\n var url = match[0],\n values = match.slice(1);\n var isExact = pathname === url;\n if (exact && !isExact) return null;\n return {\n path: path,\n // the path used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url,\n // the matched portion of the URL\n isExact: isExact,\n // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n }, null);\n}", "title": "" }, { "docid": "01f4c77af77da2bc8e7e6ed973d38e4a", "score": "0.57702583", "text": "function matchPath(pathname, options) {\n if (options === void 0) {\n options = {};\n }\n\n if (typeof options === \"string\" || Array.isArray(options)) {\n options = {\n path: options\n };\n }\n\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === void 0 ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === void 0 ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === void 0 ? false : _options$sensitive;\n var paths = [].concat(path);\n return paths.reduce(function (matched, path) {\n if (!path && path !== \"\") return null;\n if (matched) return matched;\n\n var _compilePath = compilePath$1(path, {\n end: exact,\n strict: strict,\n sensitive: sensitive\n }),\n regexp = _compilePath.regexp,\n keys = _compilePath.keys;\n\n var match = regexp.exec(pathname);\n if (!match) return null;\n var url = match[0],\n values = match.slice(1);\n var isExact = pathname === url;\n if (exact && !isExact) return null;\n return {\n path: path,\n // the path used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url,\n // the matched portion of the URL\n isExact: isExact,\n // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n }, null);\n}", "title": "" }, { "docid": "01f4c77af77da2bc8e7e6ed973d38e4a", "score": "0.57702583", "text": "function matchPath(pathname, options) {\n if (options === void 0) {\n options = {};\n }\n\n if (typeof options === \"string\" || Array.isArray(options)) {\n options = {\n path: options\n };\n }\n\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === void 0 ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === void 0 ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === void 0 ? false : _options$sensitive;\n var paths = [].concat(path);\n return paths.reduce(function (matched, path) {\n if (!path && path !== \"\") return null;\n if (matched) return matched;\n\n var _compilePath = compilePath$1(path, {\n end: exact,\n strict: strict,\n sensitive: sensitive\n }),\n regexp = _compilePath.regexp,\n keys = _compilePath.keys;\n\n var match = regexp.exec(pathname);\n if (!match) return null;\n var url = match[0],\n values = match.slice(1);\n var isExact = pathname === url;\n if (exact && !isExact) return null;\n return {\n path: path,\n // the path used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url,\n // the matched portion of the URL\n isExact: isExact,\n // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n }, null);\n}", "title": "" }, { "docid": "01f4c77af77da2bc8e7e6ed973d38e4a", "score": "0.57702583", "text": "function matchPath(pathname, options) {\n if (options === void 0) {\n options = {};\n }\n\n if (typeof options === \"string\" || Array.isArray(options)) {\n options = {\n path: options\n };\n }\n\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === void 0 ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === void 0 ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === void 0 ? false : _options$sensitive;\n var paths = [].concat(path);\n return paths.reduce(function (matched, path) {\n if (!path && path !== \"\") return null;\n if (matched) return matched;\n\n var _compilePath = compilePath$1(path, {\n end: exact,\n strict: strict,\n sensitive: sensitive\n }),\n regexp = _compilePath.regexp,\n keys = _compilePath.keys;\n\n var match = regexp.exec(pathname);\n if (!match) return null;\n var url = match[0],\n values = match.slice(1);\n var isExact = pathname === url;\n if (exact && !isExact) return null;\n return {\n path: path,\n // the path used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url,\n // the matched portion of the URL\n isExact: isExact,\n // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n }, null);\n}", "title": "" }, { "docid": "01f4c77af77da2bc8e7e6ed973d38e4a", "score": "0.57702583", "text": "function matchPath(pathname, options) {\n if (options === void 0) {\n options = {};\n }\n\n if (typeof options === \"string\" || Array.isArray(options)) {\n options = {\n path: options\n };\n }\n\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === void 0 ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === void 0 ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === void 0 ? false : _options$sensitive;\n var paths = [].concat(path);\n return paths.reduce(function (matched, path) {\n if (!path && path !== \"\") return null;\n if (matched) return matched;\n\n var _compilePath = compilePath$1(path, {\n end: exact,\n strict: strict,\n sensitive: sensitive\n }),\n regexp = _compilePath.regexp,\n keys = _compilePath.keys;\n\n var match = regexp.exec(pathname);\n if (!match) return null;\n var url = match[0],\n values = match.slice(1);\n var isExact = pathname === url;\n if (exact && !isExact) return null;\n return {\n path: path,\n // the path used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url,\n // the matched portion of the URL\n isExact: isExact,\n // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n }, null);\n}", "title": "" }, { "docid": "01f4c77af77da2bc8e7e6ed973d38e4a", "score": "0.57702583", "text": "function matchPath(pathname, options) {\n if (options === void 0) {\n options = {};\n }\n\n if (typeof options === \"string\" || Array.isArray(options)) {\n options = {\n path: options\n };\n }\n\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === void 0 ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === void 0 ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === void 0 ? false : _options$sensitive;\n var paths = [].concat(path);\n return paths.reduce(function (matched, path) {\n if (!path && path !== \"\") return null;\n if (matched) return matched;\n\n var _compilePath = compilePath$1(path, {\n end: exact,\n strict: strict,\n sensitive: sensitive\n }),\n regexp = _compilePath.regexp,\n keys = _compilePath.keys;\n\n var match = regexp.exec(pathname);\n if (!match) return null;\n var url = match[0],\n values = match.slice(1);\n var isExact = pathname === url;\n if (exact && !isExact) return null;\n return {\n path: path,\n // the path used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url,\n // the matched portion of the URL\n isExact: isExact,\n // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n }, null);\n}", "title": "" }, { "docid": "01f4c77af77da2bc8e7e6ed973d38e4a", "score": "0.57702583", "text": "function matchPath(pathname, options) {\n if (options === void 0) {\n options = {};\n }\n\n if (typeof options === \"string\" || Array.isArray(options)) {\n options = {\n path: options\n };\n }\n\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === void 0 ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === void 0 ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === void 0 ? false : _options$sensitive;\n var paths = [].concat(path);\n return paths.reduce(function (matched, path) {\n if (!path && path !== \"\") return null;\n if (matched) return matched;\n\n var _compilePath = compilePath$1(path, {\n end: exact,\n strict: strict,\n sensitive: sensitive\n }),\n regexp = _compilePath.regexp,\n keys = _compilePath.keys;\n\n var match = regexp.exec(pathname);\n if (!match) return null;\n var url = match[0],\n values = match.slice(1);\n var isExact = pathname === url;\n if (exact && !isExact) return null;\n return {\n path: path,\n // the path used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url,\n // the matched portion of the URL\n isExact: isExact,\n // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n }, null);\n}", "title": "" }, { "docid": "01f4c77af77da2bc8e7e6ed973d38e4a", "score": "0.57702583", "text": "function matchPath(pathname, options) {\n if (options === void 0) {\n options = {};\n }\n\n if (typeof options === \"string\" || Array.isArray(options)) {\n options = {\n path: options\n };\n }\n\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === void 0 ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === void 0 ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === void 0 ? false : _options$sensitive;\n var paths = [].concat(path);\n return paths.reduce(function (matched, path) {\n if (!path && path !== \"\") return null;\n if (matched) return matched;\n\n var _compilePath = compilePath$1(path, {\n end: exact,\n strict: strict,\n sensitive: sensitive\n }),\n regexp = _compilePath.regexp,\n keys = _compilePath.keys;\n\n var match = regexp.exec(pathname);\n if (!match) return null;\n var url = match[0],\n values = match.slice(1);\n var isExact = pathname === url;\n if (exact && !isExact) return null;\n return {\n path: path,\n // the path used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url,\n // the matched portion of the URL\n isExact: isExact,\n // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n }, null);\n}", "title": "" }, { "docid": "01f4c77af77da2bc8e7e6ed973d38e4a", "score": "0.57702583", "text": "function matchPath(pathname, options) {\n if (options === void 0) {\n options = {};\n }\n\n if (typeof options === \"string\" || Array.isArray(options)) {\n options = {\n path: options\n };\n }\n\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === void 0 ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === void 0 ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === void 0 ? false : _options$sensitive;\n var paths = [].concat(path);\n return paths.reduce(function (matched, path) {\n if (!path && path !== \"\") return null;\n if (matched) return matched;\n\n var _compilePath = compilePath$1(path, {\n end: exact,\n strict: strict,\n sensitive: sensitive\n }),\n regexp = _compilePath.regexp,\n keys = _compilePath.keys;\n\n var match = regexp.exec(pathname);\n if (!match) return null;\n var url = match[0],\n values = match.slice(1);\n var isExact = pathname === url;\n if (exact && !isExact) return null;\n return {\n path: path,\n // the path used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url,\n // the matched portion of the URL\n isExact: isExact,\n // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n }, null);\n}", "title": "" }, { "docid": "01f4c77af77da2bc8e7e6ed973d38e4a", "score": "0.57702583", "text": "function matchPath(pathname, options) {\n if (options === void 0) {\n options = {};\n }\n\n if (typeof options === \"string\" || Array.isArray(options)) {\n options = {\n path: options\n };\n }\n\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === void 0 ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === void 0 ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === void 0 ? false : _options$sensitive;\n var paths = [].concat(path);\n return paths.reduce(function (matched, path) {\n if (!path && path !== \"\") return null;\n if (matched) return matched;\n\n var _compilePath = compilePath$1(path, {\n end: exact,\n strict: strict,\n sensitive: sensitive\n }),\n regexp = _compilePath.regexp,\n keys = _compilePath.keys;\n\n var match = regexp.exec(pathname);\n if (!match) return null;\n var url = match[0],\n values = match.slice(1);\n var isExact = pathname === url;\n if (exact && !isExact) return null;\n return {\n path: path,\n // the path used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url,\n // the matched portion of the URL\n isExact: isExact,\n // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n }, null);\n}", "title": "" }, { "docid": "01f4c77af77da2bc8e7e6ed973d38e4a", "score": "0.57702583", "text": "function matchPath(pathname, options) {\n if (options === void 0) {\n options = {};\n }\n\n if (typeof options === \"string\" || Array.isArray(options)) {\n options = {\n path: options\n };\n }\n\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === void 0 ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === void 0 ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === void 0 ? false : _options$sensitive;\n var paths = [].concat(path);\n return paths.reduce(function (matched, path) {\n if (!path && path !== \"\") return null;\n if (matched) return matched;\n\n var _compilePath = compilePath$1(path, {\n end: exact,\n strict: strict,\n sensitive: sensitive\n }),\n regexp = _compilePath.regexp,\n keys = _compilePath.keys;\n\n var match = regexp.exec(pathname);\n if (!match) return null;\n var url = match[0],\n values = match.slice(1);\n var isExact = pathname === url;\n if (exact && !isExact) return null;\n return {\n path: path,\n // the path used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url,\n // the matched portion of the URL\n isExact: isExact,\n // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n }, null);\n}", "title": "" }, { "docid": "01f4c77af77da2bc8e7e6ed973d38e4a", "score": "0.57702583", "text": "function matchPath(pathname, options) {\n if (options === void 0) {\n options = {};\n }\n\n if (typeof options === \"string\" || Array.isArray(options)) {\n options = {\n path: options\n };\n }\n\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === void 0 ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === void 0 ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === void 0 ? false : _options$sensitive;\n var paths = [].concat(path);\n return paths.reduce(function (matched, path) {\n if (!path && path !== \"\") return null;\n if (matched) return matched;\n\n var _compilePath = compilePath$1(path, {\n end: exact,\n strict: strict,\n sensitive: sensitive\n }),\n regexp = _compilePath.regexp,\n keys = _compilePath.keys;\n\n var match = regexp.exec(pathname);\n if (!match) return null;\n var url = match[0],\n values = match.slice(1);\n var isExact = pathname === url;\n if (exact && !isExact) return null;\n return {\n path: path,\n // the path used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url,\n // the matched portion of the URL\n isExact: isExact,\n // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n }, null);\n}", "title": "" }, { "docid": "01f4c77af77da2bc8e7e6ed973d38e4a", "score": "0.57702583", "text": "function matchPath(pathname, options) {\n if (options === void 0) {\n options = {};\n }\n\n if (typeof options === \"string\" || Array.isArray(options)) {\n options = {\n path: options\n };\n }\n\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === void 0 ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === void 0 ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === void 0 ? false : _options$sensitive;\n var paths = [].concat(path);\n return paths.reduce(function (matched, path) {\n if (!path && path !== \"\") return null;\n if (matched) return matched;\n\n var _compilePath = compilePath$1(path, {\n end: exact,\n strict: strict,\n sensitive: sensitive\n }),\n regexp = _compilePath.regexp,\n keys = _compilePath.keys;\n\n var match = regexp.exec(pathname);\n if (!match) return null;\n var url = match[0],\n values = match.slice(1);\n var isExact = pathname === url;\n if (exact && !isExact) return null;\n return {\n path: path,\n // the path used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url,\n // the matched portion of the URL\n isExact: isExact,\n // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n }, null);\n}", "title": "" }, { "docid": "01f4c77af77da2bc8e7e6ed973d38e4a", "score": "0.57702583", "text": "function matchPath(pathname, options) {\n if (options === void 0) {\n options = {};\n }\n\n if (typeof options === \"string\" || Array.isArray(options)) {\n options = {\n path: options\n };\n }\n\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === void 0 ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === void 0 ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === void 0 ? false : _options$sensitive;\n var paths = [].concat(path);\n return paths.reduce(function (matched, path) {\n if (!path && path !== \"\") return null;\n if (matched) return matched;\n\n var _compilePath = compilePath$1(path, {\n end: exact,\n strict: strict,\n sensitive: sensitive\n }),\n regexp = _compilePath.regexp,\n keys = _compilePath.keys;\n\n var match = regexp.exec(pathname);\n if (!match) return null;\n var url = match[0],\n values = match.slice(1);\n var isExact = pathname === url;\n if (exact && !isExact) return null;\n return {\n path: path,\n // the path used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url,\n // the matched portion of the URL\n isExact: isExact,\n // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n }, null);\n}", "title": "" }, { "docid": "01f4c77af77da2bc8e7e6ed973d38e4a", "score": "0.57702583", "text": "function matchPath(pathname, options) {\n if (options === void 0) {\n options = {};\n }\n\n if (typeof options === \"string\" || Array.isArray(options)) {\n options = {\n path: options\n };\n }\n\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === void 0 ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === void 0 ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === void 0 ? false : _options$sensitive;\n var paths = [].concat(path);\n return paths.reduce(function (matched, path) {\n if (!path && path !== \"\") return null;\n if (matched) return matched;\n\n var _compilePath = compilePath$1(path, {\n end: exact,\n strict: strict,\n sensitive: sensitive\n }),\n regexp = _compilePath.regexp,\n keys = _compilePath.keys;\n\n var match = regexp.exec(pathname);\n if (!match) return null;\n var url = match[0],\n values = match.slice(1);\n var isExact = pathname === url;\n if (exact && !isExact) return null;\n return {\n path: path,\n // the path used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url,\n // the matched portion of the URL\n isExact: isExact,\n // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n }, null);\n}", "title": "" }, { "docid": "01f4c77af77da2bc8e7e6ed973d38e4a", "score": "0.57702583", "text": "function matchPath(pathname, options) {\n if (options === void 0) {\n options = {};\n }\n\n if (typeof options === \"string\" || Array.isArray(options)) {\n options = {\n path: options\n };\n }\n\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === void 0 ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === void 0 ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === void 0 ? false : _options$sensitive;\n var paths = [].concat(path);\n return paths.reduce(function (matched, path) {\n if (!path && path !== \"\") return null;\n if (matched) return matched;\n\n var _compilePath = compilePath$1(path, {\n end: exact,\n strict: strict,\n sensitive: sensitive\n }),\n regexp = _compilePath.regexp,\n keys = _compilePath.keys;\n\n var match = regexp.exec(pathname);\n if (!match) return null;\n var url = match[0],\n values = match.slice(1);\n var isExact = pathname === url;\n if (exact && !isExact) return null;\n return {\n path: path,\n // the path used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url,\n // the matched portion of the URL\n isExact: isExact,\n // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n }, null);\n}", "title": "" }, { "docid": "01f4c77af77da2bc8e7e6ed973d38e4a", "score": "0.57702583", "text": "function matchPath(pathname, options) {\n if (options === void 0) {\n options = {};\n }\n\n if (typeof options === \"string\" || Array.isArray(options)) {\n options = {\n path: options\n };\n }\n\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === void 0 ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === void 0 ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === void 0 ? false : _options$sensitive;\n var paths = [].concat(path);\n return paths.reduce(function (matched, path) {\n if (!path && path !== \"\") return null;\n if (matched) return matched;\n\n var _compilePath = compilePath$1(path, {\n end: exact,\n strict: strict,\n sensitive: sensitive\n }),\n regexp = _compilePath.regexp,\n keys = _compilePath.keys;\n\n var match = regexp.exec(pathname);\n if (!match) return null;\n var url = match[0],\n values = match.slice(1);\n var isExact = pathname === url;\n if (exact && !isExact) return null;\n return {\n path: path,\n // the path used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url,\n // the matched portion of the URL\n isExact: isExact,\n // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n }, null);\n}", "title": "" }, { "docid": "01f4c77af77da2bc8e7e6ed973d38e4a", "score": "0.57702583", "text": "function matchPath(pathname, options) {\n if (options === void 0) {\n options = {};\n }\n\n if (typeof options === \"string\" || Array.isArray(options)) {\n options = {\n path: options\n };\n }\n\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === void 0 ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === void 0 ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === void 0 ? false : _options$sensitive;\n var paths = [].concat(path);\n return paths.reduce(function (matched, path) {\n if (!path && path !== \"\") return null;\n if (matched) return matched;\n\n var _compilePath = compilePath$1(path, {\n end: exact,\n strict: strict,\n sensitive: sensitive\n }),\n regexp = _compilePath.regexp,\n keys = _compilePath.keys;\n\n var match = regexp.exec(pathname);\n if (!match) return null;\n var url = match[0],\n values = match.slice(1);\n var isExact = pathname === url;\n if (exact && !isExact) return null;\n return {\n path: path,\n // the path used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url,\n // the matched portion of the URL\n isExact: isExact,\n // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n }, null);\n}", "title": "" }, { "docid": "01f4c77af77da2bc8e7e6ed973d38e4a", "score": "0.57702583", "text": "function matchPath(pathname, options) {\n if (options === void 0) {\n options = {};\n }\n\n if (typeof options === \"string\" || Array.isArray(options)) {\n options = {\n path: options\n };\n }\n\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === void 0 ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === void 0 ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === void 0 ? false : _options$sensitive;\n var paths = [].concat(path);\n return paths.reduce(function (matched, path) {\n if (!path && path !== \"\") return null;\n if (matched) return matched;\n\n var _compilePath = compilePath$1(path, {\n end: exact,\n strict: strict,\n sensitive: sensitive\n }),\n regexp = _compilePath.regexp,\n keys = _compilePath.keys;\n\n var match = regexp.exec(pathname);\n if (!match) return null;\n var url = match[0],\n values = match.slice(1);\n var isExact = pathname === url;\n if (exact && !isExact) return null;\n return {\n path: path,\n // the path used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url,\n // the matched portion of the URL\n isExact: isExact,\n // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n }, null);\n}", "title": "" }, { "docid": "01f4c77af77da2bc8e7e6ed973d38e4a", "score": "0.57702583", "text": "function matchPath(pathname, options) {\n if (options === void 0) {\n options = {};\n }\n\n if (typeof options === \"string\" || Array.isArray(options)) {\n options = {\n path: options\n };\n }\n\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === void 0 ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === void 0 ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === void 0 ? false : _options$sensitive;\n var paths = [].concat(path);\n return paths.reduce(function (matched, path) {\n if (!path && path !== \"\") return null;\n if (matched) return matched;\n\n var _compilePath = compilePath$1(path, {\n end: exact,\n strict: strict,\n sensitive: sensitive\n }),\n regexp = _compilePath.regexp,\n keys = _compilePath.keys;\n\n var match = regexp.exec(pathname);\n if (!match) return null;\n var url = match[0],\n values = match.slice(1);\n var isExact = pathname === url;\n if (exact && !isExact) return null;\n return {\n path: path,\n // the path used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url,\n // the matched portion of the URL\n isExact: isExact,\n // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n }, null);\n}", "title": "" }, { "docid": "01f4c77af77da2bc8e7e6ed973d38e4a", "score": "0.57702583", "text": "function matchPath(pathname, options) {\n if (options === void 0) {\n options = {};\n }\n\n if (typeof options === \"string\" || Array.isArray(options)) {\n options = {\n path: options\n };\n }\n\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === void 0 ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === void 0 ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === void 0 ? false : _options$sensitive;\n var paths = [].concat(path);\n return paths.reduce(function (matched, path) {\n if (!path && path !== \"\") return null;\n if (matched) return matched;\n\n var _compilePath = compilePath$1(path, {\n end: exact,\n strict: strict,\n sensitive: sensitive\n }),\n regexp = _compilePath.regexp,\n keys = _compilePath.keys;\n\n var match = regexp.exec(pathname);\n if (!match) return null;\n var url = match[0],\n values = match.slice(1);\n var isExact = pathname === url;\n if (exact && !isExact) return null;\n return {\n path: path,\n // the path used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url,\n // the matched portion of the URL\n isExact: isExact,\n // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n }, null);\n}", "title": "" }, { "docid": "a226968e09b4bf67425548fcf80e8e52", "score": "0.5752913", "text": "function match(str, options) {\n var keys = [];\n var re = pathToRegexp(str, keys, options);\n return regexpToFunction(re, keys, options);\n }", "title": "" }, { "docid": "84387acee6713bca5d367a50f3c9cbbe", "score": "0.57498634", "text": "function matchPath(pathname, options) {\n if (options === void 0) {\n options = {};\n }\n\n if (typeof options === \"string\") options = {\n path: options\n };\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === void 0 ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === void 0 ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === void 0 ? false : _options$sensitive;\n var paths = [].concat(path);\n return paths.reduce(function (matched, path) {\n if (!path) return null;\n if (matched) return matched;\n\n var _compilePath = compilePath$1(path, {\n end: exact,\n strict: strict,\n sensitive: sensitive\n }),\n regexp = _compilePath.regexp,\n keys = _compilePath.keys;\n\n var match = regexp.exec(pathname);\n if (!match) return null;\n var url = match[0],\n values = match.slice(1);\n var isExact = pathname === url;\n if (exact && !isExact) return null;\n return {\n path: path,\n // the path used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url,\n // the matched portion of the URL\n isExact: isExact,\n // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n }, null);\n}", "title": "" }, { "docid": "84387acee6713bca5d367a50f3c9cbbe", "score": "0.57498634", "text": "function matchPath(pathname, options) {\n if (options === void 0) {\n options = {};\n }\n\n if (typeof options === \"string\") options = {\n path: options\n };\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === void 0 ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === void 0 ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === void 0 ? false : _options$sensitive;\n var paths = [].concat(path);\n return paths.reduce(function (matched, path) {\n if (!path) return null;\n if (matched) return matched;\n\n var _compilePath = compilePath$1(path, {\n end: exact,\n strict: strict,\n sensitive: sensitive\n }),\n regexp = _compilePath.regexp,\n keys = _compilePath.keys;\n\n var match = regexp.exec(pathname);\n if (!match) return null;\n var url = match[0],\n values = match.slice(1);\n var isExact = pathname === url;\n if (exact && !isExact) return null;\n return {\n path: path,\n // the path used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url,\n // the matched portion of the URL\n isExact: isExact,\n // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n }, null);\n}", "title": "" }, { "docid": "84387acee6713bca5d367a50f3c9cbbe", "score": "0.57498634", "text": "function matchPath(pathname, options) {\n if (options === void 0) {\n options = {};\n }\n\n if (typeof options === \"string\") options = {\n path: options\n };\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === void 0 ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === void 0 ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === void 0 ? false : _options$sensitive;\n var paths = [].concat(path);\n return paths.reduce(function (matched, path) {\n if (!path) return null;\n if (matched) return matched;\n\n var _compilePath = compilePath$1(path, {\n end: exact,\n strict: strict,\n sensitive: sensitive\n }),\n regexp = _compilePath.regexp,\n keys = _compilePath.keys;\n\n var match = regexp.exec(pathname);\n if (!match) return null;\n var url = match[0],\n values = match.slice(1);\n var isExact = pathname === url;\n if (exact && !isExact) return null;\n return {\n path: path,\n // the path used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url,\n // the matched portion of the URL\n isExact: isExact,\n // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n }, null);\n}", "title": "" }, { "docid": "84387acee6713bca5d367a50f3c9cbbe", "score": "0.57498634", "text": "function matchPath(pathname, options) {\n if (options === void 0) {\n options = {};\n }\n\n if (typeof options === \"string\") options = {\n path: options\n };\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === void 0 ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === void 0 ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === void 0 ? false : _options$sensitive;\n var paths = [].concat(path);\n return paths.reduce(function (matched, path) {\n if (!path) return null;\n if (matched) return matched;\n\n var _compilePath = compilePath$1(path, {\n end: exact,\n strict: strict,\n sensitive: sensitive\n }),\n regexp = _compilePath.regexp,\n keys = _compilePath.keys;\n\n var match = regexp.exec(pathname);\n if (!match) return null;\n var url = match[0],\n values = match.slice(1);\n var isExact = pathname === url;\n if (exact && !isExact) return null;\n return {\n path: path,\n // the path used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url,\n // the matched portion of the URL\n isExact: isExact,\n // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n }, null);\n}", "title": "" }, { "docid": "84387acee6713bca5d367a50f3c9cbbe", "score": "0.57498634", "text": "function matchPath(pathname, options) {\n if (options === void 0) {\n options = {};\n }\n\n if (typeof options === \"string\") options = {\n path: options\n };\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === void 0 ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === void 0 ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === void 0 ? false : _options$sensitive;\n var paths = [].concat(path);\n return paths.reduce(function (matched, path) {\n if (!path) return null;\n if (matched) return matched;\n\n var _compilePath = compilePath$1(path, {\n end: exact,\n strict: strict,\n sensitive: sensitive\n }),\n regexp = _compilePath.regexp,\n keys = _compilePath.keys;\n\n var match = regexp.exec(pathname);\n if (!match) return null;\n var url = match[0],\n values = match.slice(1);\n var isExact = pathname === url;\n if (exact && !isExact) return null;\n return {\n path: path,\n // the path used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url,\n // the matched portion of the URL\n isExact: isExact,\n // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n }, null);\n}", "title": "" }, { "docid": "84387acee6713bca5d367a50f3c9cbbe", "score": "0.57498634", "text": "function matchPath(pathname, options) {\n if (options === void 0) {\n options = {};\n }\n\n if (typeof options === \"string\") options = {\n path: options\n };\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === void 0 ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === void 0 ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === void 0 ? false : _options$sensitive;\n var paths = [].concat(path);\n return paths.reduce(function (matched, path) {\n if (!path) return null;\n if (matched) return matched;\n\n var _compilePath = compilePath$1(path, {\n end: exact,\n strict: strict,\n sensitive: sensitive\n }),\n regexp = _compilePath.regexp,\n keys = _compilePath.keys;\n\n var match = regexp.exec(pathname);\n if (!match) return null;\n var url = match[0],\n values = match.slice(1);\n var isExact = pathname === url;\n if (exact && !isExact) return null;\n return {\n path: path,\n // the path used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url,\n // the matched portion of the URL\n isExact: isExact,\n // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n }, null);\n}", "title": "" }, { "docid": "84387acee6713bca5d367a50f3c9cbbe", "score": "0.57498634", "text": "function matchPath(pathname, options) {\n if (options === void 0) {\n options = {};\n }\n\n if (typeof options === \"string\") options = {\n path: options\n };\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === void 0 ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === void 0 ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === void 0 ? false : _options$sensitive;\n var paths = [].concat(path);\n return paths.reduce(function (matched, path) {\n if (!path) return null;\n if (matched) return matched;\n\n var _compilePath = compilePath$1(path, {\n end: exact,\n strict: strict,\n sensitive: sensitive\n }),\n regexp = _compilePath.regexp,\n keys = _compilePath.keys;\n\n var match = regexp.exec(pathname);\n if (!match) return null;\n var url = match[0],\n values = match.slice(1);\n var isExact = pathname === url;\n if (exact && !isExact) return null;\n return {\n path: path,\n // the path used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url,\n // the matched portion of the URL\n isExact: isExact,\n // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n }, null);\n}", "title": "" }, { "docid": "84387acee6713bca5d367a50f3c9cbbe", "score": "0.57498634", "text": "function matchPath(pathname, options) {\n if (options === void 0) {\n options = {};\n }\n\n if (typeof options === \"string\") options = {\n path: options\n };\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === void 0 ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === void 0 ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === void 0 ? false : _options$sensitive;\n var paths = [].concat(path);\n return paths.reduce(function (matched, path) {\n if (!path) return null;\n if (matched) return matched;\n\n var _compilePath = compilePath$1(path, {\n end: exact,\n strict: strict,\n sensitive: sensitive\n }),\n regexp = _compilePath.regexp,\n keys = _compilePath.keys;\n\n var match = regexp.exec(pathname);\n if (!match) return null;\n var url = match[0],\n values = match.slice(1);\n var isExact = pathname === url;\n if (exact && !isExact) return null;\n return {\n path: path,\n // the path used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url,\n // the matched portion of the URL\n isExact: isExact,\n // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n }, null);\n}", "title": "" }, { "docid": "6e965e736af92c70684a9d3aebfbb65f", "score": "0.5745282", "text": "function matchPath(pathname, options) {\n if (options === void 0) {\n options = {};\n }\n\n if (typeof options === \"string\") options = {\n path: options\n };\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === void 0 ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === void 0 ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === void 0 ? false : _options$sensitive;\n var paths = [].concat(path);\n return paths.reduce(function (matched, path) {\n if (matched) return matched;\n\n var _compilePath = compilePath$1(path, {\n end: exact,\n strict: strict,\n sensitive: sensitive\n }),\n regexp = _compilePath.regexp,\n keys = _compilePath.keys;\n\n var match = regexp.exec(pathname);\n if (!match) return null;\n var url = match[0],\n values = match.slice(1);\n var isExact = pathname === url;\n if (exact && !isExact) return null;\n return {\n path: path,\n // the path used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url,\n // the matched portion of the URL\n isExact: isExact,\n // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n }, null);\n}", "title": "" }, { "docid": "6e965e736af92c70684a9d3aebfbb65f", "score": "0.5745282", "text": "function matchPath(pathname, options) {\n if (options === void 0) {\n options = {};\n }\n\n if (typeof options === \"string\") options = {\n path: options\n };\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === void 0 ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === void 0 ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === void 0 ? false : _options$sensitive;\n var paths = [].concat(path);\n return paths.reduce(function (matched, path) {\n if (matched) return matched;\n\n var _compilePath = compilePath$1(path, {\n end: exact,\n strict: strict,\n sensitive: sensitive\n }),\n regexp = _compilePath.regexp,\n keys = _compilePath.keys;\n\n var match = regexp.exec(pathname);\n if (!match) return null;\n var url = match[0],\n values = match.slice(1);\n var isExact = pathname === url;\n if (exact && !isExact) return null;\n return {\n path: path,\n // the path used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url,\n // the matched portion of the URL\n isExact: isExact,\n // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n }, null);\n}", "title": "" }, { "docid": "6e965e736af92c70684a9d3aebfbb65f", "score": "0.5745282", "text": "function matchPath(pathname, options) {\n if (options === void 0) {\n options = {};\n }\n\n if (typeof options === \"string\") options = {\n path: options\n };\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === void 0 ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === void 0 ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === void 0 ? false : _options$sensitive;\n var paths = [].concat(path);\n return paths.reduce(function (matched, path) {\n if (matched) return matched;\n\n var _compilePath = compilePath$1(path, {\n end: exact,\n strict: strict,\n sensitive: sensitive\n }),\n regexp = _compilePath.regexp,\n keys = _compilePath.keys;\n\n var match = regexp.exec(pathname);\n if (!match) return null;\n var url = match[0],\n values = match.slice(1);\n var isExact = pathname === url;\n if (exact && !isExact) return null;\n return {\n path: path,\n // the path used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url,\n // the matched portion of the URL\n isExact: isExact,\n // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n }, null);\n}", "title": "" }, { "docid": "45995d1938df5f461094c3531cac61d6", "score": "0.57423943", "text": "function match(str, options) {\n var keys = [];\n var re = pathToRegexp(str, keys, options);\n return regexpToFunction(re, keys);\n }", "title": "" }, { "docid": "69e78ba056582b14963dab15fedcdfb8", "score": "0.57313305", "text": "function matchPath(pathname, options = {}) {\n if (typeof options === 'string' || Array.isArray(options)) {\n options = { path: options };\n }\n\n const { path, exact = false, strict = false, sensitive = false } = options;\n\n const paths = [].concat(path);\n\n return paths.reduce((matched, path) => {\n if (!path && path !== '') return null;\n if (matched) return matched;\n\n const { regexp, keys } = compilePath(path, {\n end: exact,\n strict,\n sensitive,\n });\n const match = regexp.exec(pathname);\n\n if (!match) return null;\n\n const [url, ...values] = match;\n const isExact = pathname === url;\n\n if (exact && !isExact) return null;\n\n return {\n path, // the path used to match\n url: path === '/' && url === '' ? '/' : url, // the matched portion of the URL\n isExact, // whether or not we matched exactly\n params: keys.reduce((memo, key, index) => {\n memo[key.name] = values[index];\n return memo;\n }, {}),\n };\n }, null);\n}", "title": "" }, { "docid": "ab6e0bb53823bd967eb2fac5c2633d61", "score": "0.57262915", "text": "function createRegexPath(path) {\n\n var parts = path.split(/:[^/]*/),\n path = '^';\n\n path += parts.join('([^/]*)') + '(:?\\\\.|/|$)';\n\n return new RegExp(path);\n}", "title": "" }, { "docid": "1d007ebce9f55fd68c483a69cd1b011b", "score": "0.57209283", "text": "function thisPath(aPath /* : string */) {\n return new RegExp(aPath.replace(/\\//g, '\\\\' + path.sep))\n}", "title": "" }, { "docid": "99fd9d7d4879552692da7d422340cb0f", "score": "0.57027245", "text": "function PathResolver() {}", "title": "" }, { "docid": "e6ead6006f54f979f75b9054b1308f51", "score": "0.56899977", "text": "function matchPattern(pattern, pathname) {\n\t // Make leading slashes consistent between pattern and pathname.\n\t if (pattern.charAt(0) !== '/') {\n\t pattern = '/' + pattern;\n\t }\n\t if (pathname.charAt(0) !== '/') {\n\t pathname = '/' + pathname;\n\t }\n\t\n\t var _compilePattern2 = compilePattern(pattern);\n\t\n\t var regexpSource = _compilePattern2.regexpSource;\n\t var paramNames = _compilePattern2.paramNames;\n\t var tokens = _compilePattern2.tokens;\n\t\n\t regexpSource += '/*'; // Capture path separators\n\t\n\t // Special-case patterns like '*' for catch-all routes.\n\t var captureRemaining = tokens[tokens.length - 1] !== '*';\n\t\n\t if (captureRemaining) {\n\t // This will match newlines in the remaining path.\n\t regexpSource += '([\\\\s\\\\S]*?)';\n\t }\n\t\n\t var match = pathname.match(new RegExp('^' + regexpSource + '$', 'i'));\n\t\n\t var remainingPathname = undefined,\n\t paramValues = undefined;\n\t if (match != null) {\n\t if (captureRemaining) {\n\t remainingPathname = match.pop();\n\t var matchedPath = match[0].substr(0, match[0].length - remainingPathname.length);\n\t\n\t // If we didn't match the entire pathname, then make sure that the match\n\t // we did get ends at a path separator (potentially the one we added\n\t // above at the beginning of the path, if the actual match was empty).\n\t if (remainingPathname && matchedPath.charAt(matchedPath.length - 1) !== '/') {\n\t return {\n\t remainingPathname: null,\n\t paramNames: paramNames,\n\t paramValues: null\n\t };\n\t }\n\t } else {\n\t // If this matched at all, then the match was the entire pathname.\n\t remainingPathname = '';\n\t }\n\t\n\t paramValues = match.slice(1).map(function (v) {\n\t return v != null ? decodeURIComponent(v) : v;\n\t });\n\t } else {\n\t remainingPathname = paramValues = null;\n\t }\n\t\n\t return {\n\t remainingPathname: remainingPathname,\n\t paramNames: paramNames,\n\t paramValues: paramValues\n\t };\n\t}", "title": "" }, { "docid": "e6ead6006f54f979f75b9054b1308f51", "score": "0.56899977", "text": "function matchPattern(pattern, pathname) {\n\t // Make leading slashes consistent between pattern and pathname.\n\t if (pattern.charAt(0) !== '/') {\n\t pattern = '/' + pattern;\n\t }\n\t if (pathname.charAt(0) !== '/') {\n\t pathname = '/' + pathname;\n\t }\n\t\n\t var _compilePattern2 = compilePattern(pattern);\n\t\n\t var regexpSource = _compilePattern2.regexpSource;\n\t var paramNames = _compilePattern2.paramNames;\n\t var tokens = _compilePattern2.tokens;\n\t\n\t regexpSource += '/*'; // Capture path separators\n\t\n\t // Special-case patterns like '*' for catch-all routes.\n\t var captureRemaining = tokens[tokens.length - 1] !== '*';\n\t\n\t if (captureRemaining) {\n\t // This will match newlines in the remaining path.\n\t regexpSource += '([\\\\s\\\\S]*?)';\n\t }\n\t\n\t var match = pathname.match(new RegExp('^' + regexpSource + '$', 'i'));\n\t\n\t var remainingPathname = undefined,\n\t paramValues = undefined;\n\t if (match != null) {\n\t if (captureRemaining) {\n\t remainingPathname = match.pop();\n\t var matchedPath = match[0].substr(0, match[0].length - remainingPathname.length);\n\t\n\t // If we didn't match the entire pathname, then make sure that the match\n\t // we did get ends at a path separator (potentially the one we added\n\t // above at the beginning of the path, if the actual match was empty).\n\t if (remainingPathname && matchedPath.charAt(matchedPath.length - 1) !== '/') {\n\t return {\n\t remainingPathname: null,\n\t paramNames: paramNames,\n\t paramValues: null\n\t };\n\t }\n\t } else {\n\t // If this matched at all, then the match was the entire pathname.\n\t remainingPathname = '';\n\t }\n\t\n\t paramValues = match.slice(1).map(function (v) {\n\t return v != null ? decodeURIComponent(v) : v;\n\t });\n\t } else {\n\t remainingPathname = paramValues = null;\n\t }\n\t\n\t return {\n\t remainingPathname: remainingPathname,\n\t paramNames: paramNames,\n\t paramValues: paramValues\n\t };\n\t}", "title": "" }, { "docid": "e6ead6006f54f979f75b9054b1308f51", "score": "0.56899977", "text": "function matchPattern(pattern, pathname) {\n\t // Make leading slashes consistent between pattern and pathname.\n\t if (pattern.charAt(0) !== '/') {\n\t pattern = '/' + pattern;\n\t }\n\t if (pathname.charAt(0) !== '/') {\n\t pathname = '/' + pathname;\n\t }\n\t\n\t var _compilePattern2 = compilePattern(pattern);\n\t\n\t var regexpSource = _compilePattern2.regexpSource;\n\t var paramNames = _compilePattern2.paramNames;\n\t var tokens = _compilePattern2.tokens;\n\t\n\t regexpSource += '/*'; // Capture path separators\n\t\n\t // Special-case patterns like '*' for catch-all routes.\n\t var captureRemaining = tokens[tokens.length - 1] !== '*';\n\t\n\t if (captureRemaining) {\n\t // This will match newlines in the remaining path.\n\t regexpSource += '([\\\\s\\\\S]*?)';\n\t }\n\t\n\t var match = pathname.match(new RegExp('^' + regexpSource + '$', 'i'));\n\t\n\t var remainingPathname = undefined,\n\t paramValues = undefined;\n\t if (match != null) {\n\t if (captureRemaining) {\n\t remainingPathname = match.pop();\n\t var matchedPath = match[0].substr(0, match[0].length - remainingPathname.length);\n\t\n\t // If we didn't match the entire pathname, then make sure that the match\n\t // we did get ends at a path separator (potentially the one we added\n\t // above at the beginning of the path, if the actual match was empty).\n\t if (remainingPathname && matchedPath.charAt(matchedPath.length - 1) !== '/') {\n\t return {\n\t remainingPathname: null,\n\t paramNames: paramNames,\n\t paramValues: null\n\t };\n\t }\n\t } else {\n\t // If this matched at all, then the match was the entire pathname.\n\t remainingPathname = '';\n\t }\n\t\n\t paramValues = match.slice(1).map(function (v) {\n\t return v != null ? decodeURIComponent(v) : v;\n\t });\n\t } else {\n\t remainingPathname = paramValues = null;\n\t }\n\t\n\t return {\n\t remainingPathname: remainingPathname,\n\t paramNames: paramNames,\n\t paramValues: paramValues\n\t };\n\t}", "title": "" }, { "docid": "a39b8eceeec7505a1bd40f1a596f48cd", "score": "0.56876254", "text": "function UrlMatcher(pattern) {\n //Process $\n pattern = pattern.replace(/:\\$/g,\":__\");\n\n var placeholder = /([:*])([\\w\\$]+)|\\{(\\w+)(?:\\:((?:[^{}\\\\]+|\\\\.|\\{(?:[^{}\\\\]+|\\\\.)*\\})+))?\\}/g,\n names = {}, compiled = '^', last = 0, m,\n segments = this.segments = [],\n params = this.params = [];\n\n function addParameter(id) {\n if (!/^\\w+(-+\\w+)*$/.test(id)) throw new Error(\"Invalid parameter name '\" + id + \"' in pattern '\" + pattern + \"'\");\n if (names[id]) throw new Error(\"Duplicate parameter name '\" + id + \"' in pattern '\" + pattern + \"'\");\n names[id] = true;\n params.push(id);\n }\n function quoteRegExp(string) {\n return string.replace(/[\\\\\\[\\]\\^$*+?.()|{}]/g, \"\\\\$&\");\n }\n // Split into static segments separated by path parameter placeholders.\n // The number of segments is always 1 more than the number of parameters.\n var id, regexp, segment;\n while ((m = placeholder.exec(pattern))) {\n id = m[2] || m[3]; // IE[78] returns '' for unmatched groups instead of null\n regexp = m[4] || (m[1] == '*' ? '.*' : '[^/]*');\n segment = pattern.substring(last, m.index);\n if (segment.indexOf('?') >= 0) break; // we're into the search part\n compiled += quoteRegExp(segment) + '(' + regexp + ')';\n addParameter(id);\n segments.push(segment);\n last = placeholder.lastIndex;\n }\n segment = pattern.substring(last);\n segments.push(segment);\n}", "title": "" }, { "docid": "3a049d005217a40cf60248469721fbfa", "score": "0.5675568", "text": "function match (str, options) {\n var keys = [];\n var re = pathToRegexp(str, keys, options);\n return regexpToFunction(re, keys)\n}", "title": "" }, { "docid": "a09845ebfeeb75bfdab3c42899d49639", "score": "0.56587785", "text": "function matchPattern(pattern, pathname) {\n // Make leading slashes consistent between pattern and pathname.\n if (pattern.charAt(0) !== '/') {\n pattern = '/' + pattern;\n }\n if (pathname.charAt(0) !== '/') {\n pathname = '/' + pathname;\n }\n\n var _compilePattern2 = compilePattern(pattern);\n\n var regexpSource = _compilePattern2.regexpSource;\n var paramNames = _compilePattern2.paramNames;\n var tokens = _compilePattern2.tokens;\n\n regexpSource += '/*'; // Capture path separators\n\n // Special-case patterns like '*' for catch-all routes.\n var captureRemaining = tokens[tokens.length - 1] !== '*';\n\n if (captureRemaining) {\n // This will match newlines in the remaining path.\n regexpSource += '([\\\\s\\\\S]*?)';\n }\n\n var match = pathname.match(new RegExp('^' + regexpSource + '$', 'i'));\n\n var remainingPathname = undefined,\n paramValues = undefined;\n if (match != null) {\n if (captureRemaining) {\n remainingPathname = match.pop();\n var matchedPath = match[0].substr(0, match[0].length - remainingPathname.length);\n\n // If we didn't match the entire pathname, then make sure that the match\n // we did get ends at a path separator (potentially the one we added\n // above at the beginning of the path, if the actual match was empty).\n if (remainingPathname && matchedPath.charAt(matchedPath.length - 1) !== '/') {\n return {\n remainingPathname: null,\n paramNames: paramNames,\n paramValues: null\n };\n }\n } else {\n // If this matched at all, then the match was the entire pathname.\n remainingPathname = '';\n }\n\n paramValues = match.slice(1).map(function (v) {\n return v != null ? decodeURIComponent(v) : v;\n });\n } else {\n remainingPathname = paramValues = null;\n }\n\n return {\n remainingPathname: remainingPathname,\n paramNames: paramNames,\n paramValues: paramValues\n };\n}", "title": "" }, { "docid": "a09845ebfeeb75bfdab3c42899d49639", "score": "0.56587785", "text": "function matchPattern(pattern, pathname) {\n // Make leading slashes consistent between pattern and pathname.\n if (pattern.charAt(0) !== '/') {\n pattern = '/' + pattern;\n }\n if (pathname.charAt(0) !== '/') {\n pathname = '/' + pathname;\n }\n\n var _compilePattern2 = compilePattern(pattern);\n\n var regexpSource = _compilePattern2.regexpSource;\n var paramNames = _compilePattern2.paramNames;\n var tokens = _compilePattern2.tokens;\n\n regexpSource += '/*'; // Capture path separators\n\n // Special-case patterns like '*' for catch-all routes.\n var captureRemaining = tokens[tokens.length - 1] !== '*';\n\n if (captureRemaining) {\n // This will match newlines in the remaining path.\n regexpSource += '([\\\\s\\\\S]*?)';\n }\n\n var match = pathname.match(new RegExp('^' + regexpSource + '$', 'i'));\n\n var remainingPathname = undefined,\n paramValues = undefined;\n if (match != null) {\n if (captureRemaining) {\n remainingPathname = match.pop();\n var matchedPath = match[0].substr(0, match[0].length - remainingPathname.length);\n\n // If we didn't match the entire pathname, then make sure that the match\n // we did get ends at a path separator (potentially the one we added\n // above at the beginning of the path, if the actual match was empty).\n if (remainingPathname && matchedPath.charAt(matchedPath.length - 1) !== '/') {\n return {\n remainingPathname: null,\n paramNames: paramNames,\n paramValues: null\n };\n }\n } else {\n // If this matched at all, then the match was the entire pathname.\n remainingPathname = '';\n }\n\n paramValues = match.slice(1).map(function (v) {\n return v != null ? decodeURIComponent(v) : v;\n });\n } else {\n remainingPathname = paramValues = null;\n }\n\n return {\n remainingPathname: remainingPathname,\n paramNames: paramNames,\n paramValues: paramValues\n };\n}", "title": "" }, { "docid": "a09845ebfeeb75bfdab3c42899d49639", "score": "0.56587785", "text": "function matchPattern(pattern, pathname) {\n // Make leading slashes consistent between pattern and pathname.\n if (pattern.charAt(0) !== '/') {\n pattern = '/' + pattern;\n }\n if (pathname.charAt(0) !== '/') {\n pathname = '/' + pathname;\n }\n\n var _compilePattern2 = compilePattern(pattern);\n\n var regexpSource = _compilePattern2.regexpSource;\n var paramNames = _compilePattern2.paramNames;\n var tokens = _compilePattern2.tokens;\n\n regexpSource += '/*'; // Capture path separators\n\n // Special-case patterns like '*' for catch-all routes.\n var captureRemaining = tokens[tokens.length - 1] !== '*';\n\n if (captureRemaining) {\n // This will match newlines in the remaining path.\n regexpSource += '([\\\\s\\\\S]*?)';\n }\n\n var match = pathname.match(new RegExp('^' + regexpSource + '$', 'i'));\n\n var remainingPathname = undefined,\n paramValues = undefined;\n if (match != null) {\n if (captureRemaining) {\n remainingPathname = match.pop();\n var matchedPath = match[0].substr(0, match[0].length - remainingPathname.length);\n\n // If we didn't match the entire pathname, then make sure that the match\n // we did get ends at a path separator (potentially the one we added\n // above at the beginning of the path, if the actual match was empty).\n if (remainingPathname && matchedPath.charAt(matchedPath.length - 1) !== '/') {\n return {\n remainingPathname: null,\n paramNames: paramNames,\n paramValues: null\n };\n }\n } else {\n // If this matched at all, then the match was the entire pathname.\n remainingPathname = '';\n }\n\n paramValues = match.slice(1).map(function (v) {\n return v != null ? decodeURIComponent(v) : v;\n });\n } else {\n remainingPathname = paramValues = null;\n }\n\n return {\n remainingPathname: remainingPathname,\n paramNames: paramNames,\n paramValues: paramValues\n };\n}", "title": "" }, { "docid": "cbbd0ca03162fbe86c54d115a344d633", "score": "0.5652319", "text": "function match(str, options) {\n var keys = [];\n var re = pathToRegexp(str, keys, options);\n return regexpToFunction(re, keys, options);\n}", "title": "" }, { "docid": "383b11f9f8a47d95a30c3de57a8fa6dd", "score": "0.56519306", "text": "function createMatcherWith(cons) {\n return function() {\n var args = arguments;\n var checkMatch = function (o) {\n // Check matching\n if (cons === undefined) {\n // Default value\n } else if (o[\"is\" + cons.name]()) {\n for (var j in args) {\n var a = args[j];\n // Recursviely check that this is a match.\n if (is('Function', a) && a.match) {\n if (a.match(o[cons.params[j].name]) === false) {\n return false;\n }\n } else if (is('String', a) && a[0] != \"'\") {\n // Variable, do nothing for now\n } else {\n if (is('String', a) && a[0] == \"'\") {\n // Literal string value\n if (a.substring(1) !== o[cons.params[j].name]) {\n return false;\n }\n } else if (a !== o[cons.params[j].name]) {\n // Actual value\n return false;\n }\n }\n }\n } else {\n return false;\n }\n\n // A match has been found, so we now need to assign\n // properties specified by the variables given in the pattern.\n for (var j in args) {\n var a = args[j];\n if (is('String', a) && a != \"_\" && a[0] != \"'\") {\n if (cons === undefined) {\n matcher[a] = o;\n } else {\n matcher[a] = o[cons.params[j].name];\n }\n }\n }\n\n return true;\n }\n // Register pattern when a callback is given.\n var f = function(fn) {\n matcher.patterns.push({checkMatch: checkMatch, callback: fn});\n };\n f.match = checkMatch;\n return f;\n };\n }", "title": "" }, { "docid": "2b0060e8dcf3c0dbd63f322a15249155", "score": "0.5615761", "text": "function matchPattern(pattern, pathname) {\n\t // Make leading slashes consistent between pattern and pathname.\n\t if (pattern.charAt(0) !== '/') {\n\t pattern = '/' + pattern;\n\t }\n\t if (pathname.charAt(0) !== '/') {\n\t pathname = '/' + pathname;\n\t }\n\n\t var _compilePattern2 = compilePattern(pattern);\n\n\t var regexpSource = _compilePattern2.regexpSource;\n\t var paramNames = _compilePattern2.paramNames;\n\t var tokens = _compilePattern2.tokens;\n\n\t regexpSource += '/*'; // Capture path separators\n\n\t // Special-case patterns like '*' for catch-all routes.\n\t var captureRemaining = tokens[tokens.length - 1] !== '*';\n\n\t if (captureRemaining) {\n\t // This will match newlines in the remaining path.\n\t regexpSource += '([\\\\s\\\\S]*?)';\n\t }\n\n\t var match = pathname.match(new RegExp('^' + regexpSource + '$', 'i'));\n\n\t var remainingPathname = undefined,\n\t paramValues = undefined;\n\t if (match != null) {\n\t if (captureRemaining) {\n\t remainingPathname = match.pop();\n\t var matchedPath = match[0].substr(0, match[0].length - remainingPathname.length);\n\n\t // If we didn't match the entire pathname, then make sure that the match\n\t // we did get ends at a path separator (potentially the one we added\n\t // above at the beginning of the path, if the actual match was empty).\n\t if (remainingPathname && matchedPath.charAt(matchedPath.length - 1) !== '/') {\n\t return {\n\t remainingPathname: null,\n\t paramNames: paramNames,\n\t paramValues: null\n\t };\n\t }\n\t } else {\n\t // If this matched at all, then the match was the entire pathname.\n\t remainingPathname = '';\n\t }\n\n\t paramValues = match.slice(1).map(function (v) {\n\t return v != null ? decodeURIComponent(v) : v;\n\t });\n\t } else {\n\t remainingPathname = paramValues = null;\n\t }\n\n\t return {\n\t remainingPathname: remainingPathname,\n\t paramNames: paramNames,\n\t paramValues: paramValues\n\t };\n\t}", "title": "" }, { "docid": "2b0060e8dcf3c0dbd63f322a15249155", "score": "0.5615761", "text": "function matchPattern(pattern, pathname) {\n\t // Make leading slashes consistent between pattern and pathname.\n\t if (pattern.charAt(0) !== '/') {\n\t pattern = '/' + pattern;\n\t }\n\t if (pathname.charAt(0) !== '/') {\n\t pathname = '/' + pathname;\n\t }\n\n\t var _compilePattern2 = compilePattern(pattern);\n\n\t var regexpSource = _compilePattern2.regexpSource;\n\t var paramNames = _compilePattern2.paramNames;\n\t var tokens = _compilePattern2.tokens;\n\n\t regexpSource += '/*'; // Capture path separators\n\n\t // Special-case patterns like '*' for catch-all routes.\n\t var captureRemaining = tokens[tokens.length - 1] !== '*';\n\n\t if (captureRemaining) {\n\t // This will match newlines in the remaining path.\n\t regexpSource += '([\\\\s\\\\S]*?)';\n\t }\n\n\t var match = pathname.match(new RegExp('^' + regexpSource + '$', 'i'));\n\n\t var remainingPathname = undefined,\n\t paramValues = undefined;\n\t if (match != null) {\n\t if (captureRemaining) {\n\t remainingPathname = match.pop();\n\t var matchedPath = match[0].substr(0, match[0].length - remainingPathname.length);\n\n\t // If we didn't match the entire pathname, then make sure that the match\n\t // we did get ends at a path separator (potentially the one we added\n\t // above at the beginning of the path, if the actual match was empty).\n\t if (remainingPathname && matchedPath.charAt(matchedPath.length - 1) !== '/') {\n\t return {\n\t remainingPathname: null,\n\t paramNames: paramNames,\n\t paramValues: null\n\t };\n\t }\n\t } else {\n\t // If this matched at all, then the match was the entire pathname.\n\t remainingPathname = '';\n\t }\n\n\t paramValues = match.slice(1).map(function (v) {\n\t return v != null ? decodeURIComponent(v) : v;\n\t });\n\t } else {\n\t remainingPathname = paramValues = null;\n\t }\n\n\t return {\n\t remainingPathname: remainingPathname,\n\t paramNames: paramNames,\n\t paramValues: paramValues\n\t };\n\t}", "title": "" }, { "docid": "578be1c90865e13219198f41128c67c2", "score": "0.5615353", "text": "function matchPattern(pattern, pathname) {\n\t var _compilePattern2 = compilePattern(pattern);\n\n\t var regexpSource = _compilePattern2.regexpSource;\n\t var paramNames = _compilePattern2.paramNames;\n\t var tokens = _compilePattern2.tokens;\n\n\t regexpSource += '/*'; // Ignore trailing slashes\n\n\t var captureRemaining = tokens[tokens.length - 1] !== '*';\n\n\t if (captureRemaining) regexpSource += '([\\\\s\\\\S]*?)';\n\n\t var match = pathname.match(new RegExp('^' + regexpSource + '$', 'i'));\n\n\t var remainingPathname = undefined,\n\t paramValues = undefined;\n\t if (match != null) {\n\t paramValues = Array.prototype.slice.call(match, 1).map(function (v) {\n\t return v != null ? decodeURIComponent(v.replace(/\\+/g, '%20')) : v;\n\t });\n\n\t if (captureRemaining) {\n\t remainingPathname = paramValues.pop();\n\t } else {\n\t remainingPathname = pathname.replace(match[0], '');\n\t }\n\t } else {\n\t remainingPathname = paramValues = null;\n\t }\n\n\t return {\n\t remainingPathname: remainingPathname,\n\t paramNames: paramNames,\n\t paramValues: paramValues\n\t };\n\t}", "title": "" }, { "docid": "48867b7a1f0a69122d87faf434a51d2d", "score": "0.5601101", "text": "function matchPattern(pattern, pathname) {\n\t // Ensure pattern starts with leading slash for consistency with pathname.\n\t if (pattern.charAt(0) !== '/') {\n\t pattern = '/' + pattern;\n\t }\n\t\n\t var _compilePattern2 = compilePattern(pattern);\n\t\n\t var regexpSource = _compilePattern2.regexpSource;\n\t var paramNames = _compilePattern2.paramNames;\n\t var tokens = _compilePattern2.tokens;\n\t\n\t\n\t if (pattern.charAt(pattern.length - 1) !== '/') {\n\t regexpSource += '/?'; // Allow optional path separator at end.\n\t }\n\t\n\t // Special-case patterns like '*' for catch-all routes.\n\t if (tokens[tokens.length - 1] === '*') {\n\t regexpSource += '$';\n\t }\n\t\n\t var match = pathname.match(new RegExp('^' + regexpSource, 'i'));\n\t if (match == null) {\n\t return null;\n\t }\n\t\n\t var matchedPath = match[0];\n\t var remainingPathname = pathname.substr(matchedPath.length);\n\t\n\t if (remainingPathname) {\n\t // Require that the match ends at a path separator, if we didn't match\n\t // the full path, so any remaining pathname is a new path segment.\n\t if (matchedPath.charAt(matchedPath.length - 1) !== '/') {\n\t return null;\n\t }\n\t\n\t // If there is a remaining pathname, treat the path separator as part of\n\t // the remaining pathname for properly continuing the match.\n\t remainingPathname = '/' + remainingPathname;\n\t }\n\t\n\t return {\n\t remainingPathname: remainingPathname,\n\t paramNames: paramNames,\n\t paramValues: match.slice(1).map(function (v) {\n\t return v && decodeURIComponent(v);\n\t })\n\t };\n\t}", "title": "" }, { "docid": "48867b7a1f0a69122d87faf434a51d2d", "score": "0.5601101", "text": "function matchPattern(pattern, pathname) {\n\t // Ensure pattern starts with leading slash for consistency with pathname.\n\t if (pattern.charAt(0) !== '/') {\n\t pattern = '/' + pattern;\n\t }\n\t\n\t var _compilePattern2 = compilePattern(pattern);\n\t\n\t var regexpSource = _compilePattern2.regexpSource;\n\t var paramNames = _compilePattern2.paramNames;\n\t var tokens = _compilePattern2.tokens;\n\t\n\t\n\t if (pattern.charAt(pattern.length - 1) !== '/') {\n\t regexpSource += '/?'; // Allow optional path separator at end.\n\t }\n\t\n\t // Special-case patterns like '*' for catch-all routes.\n\t if (tokens[tokens.length - 1] === '*') {\n\t regexpSource += '$';\n\t }\n\t\n\t var match = pathname.match(new RegExp('^' + regexpSource, 'i'));\n\t if (match == null) {\n\t return null;\n\t }\n\t\n\t var matchedPath = match[0];\n\t var remainingPathname = pathname.substr(matchedPath.length);\n\t\n\t if (remainingPathname) {\n\t // Require that the match ends at a path separator, if we didn't match\n\t // the full path, so any remaining pathname is a new path segment.\n\t if (matchedPath.charAt(matchedPath.length - 1) !== '/') {\n\t return null;\n\t }\n\t\n\t // If there is a remaining pathname, treat the path separator as part of\n\t // the remaining pathname for properly continuing the match.\n\t remainingPathname = '/' + remainingPathname;\n\t }\n\t\n\t return {\n\t remainingPathname: remainingPathname,\n\t paramNames: paramNames,\n\t paramValues: match.slice(1).map(function (v) {\n\t return v && decodeURIComponent(v);\n\t })\n\t };\n\t}", "title": "" }, { "docid": "48867b7a1f0a69122d87faf434a51d2d", "score": "0.5601101", "text": "function matchPattern(pattern, pathname) {\n\t // Ensure pattern starts with leading slash for consistency with pathname.\n\t if (pattern.charAt(0) !== '/') {\n\t pattern = '/' + pattern;\n\t }\n\t\n\t var _compilePattern2 = compilePattern(pattern);\n\t\n\t var regexpSource = _compilePattern2.regexpSource;\n\t var paramNames = _compilePattern2.paramNames;\n\t var tokens = _compilePattern2.tokens;\n\t\n\t\n\t if (pattern.charAt(pattern.length - 1) !== '/') {\n\t regexpSource += '/?'; // Allow optional path separator at end.\n\t }\n\t\n\t // Special-case patterns like '*' for catch-all routes.\n\t if (tokens[tokens.length - 1] === '*') {\n\t regexpSource += '$';\n\t }\n\t\n\t var match = pathname.match(new RegExp('^' + regexpSource, 'i'));\n\t if (match == null) {\n\t return null;\n\t }\n\t\n\t var matchedPath = match[0];\n\t var remainingPathname = pathname.substr(matchedPath.length);\n\t\n\t if (remainingPathname) {\n\t // Require that the match ends at a path separator, if we didn't match\n\t // the full path, so any remaining pathname is a new path segment.\n\t if (matchedPath.charAt(matchedPath.length - 1) !== '/') {\n\t return null;\n\t }\n\t\n\t // If there is a remaining pathname, treat the path separator as part of\n\t // the remaining pathname for properly continuing the match.\n\t remainingPathname = '/' + remainingPathname;\n\t }\n\t\n\t return {\n\t remainingPathname: remainingPathname,\n\t paramNames: paramNames,\n\t paramValues: match.slice(1).map(function (v) {\n\t return v && decodeURIComponent(v);\n\t })\n\t };\n\t}", "title": "" }, { "docid": "48867b7a1f0a69122d87faf434a51d2d", "score": "0.5601101", "text": "function matchPattern(pattern, pathname) {\n\t // Ensure pattern starts with leading slash for consistency with pathname.\n\t if (pattern.charAt(0) !== '/') {\n\t pattern = '/' + pattern;\n\t }\n\t\n\t var _compilePattern2 = compilePattern(pattern);\n\t\n\t var regexpSource = _compilePattern2.regexpSource;\n\t var paramNames = _compilePattern2.paramNames;\n\t var tokens = _compilePattern2.tokens;\n\t\n\t\n\t if (pattern.charAt(pattern.length - 1) !== '/') {\n\t regexpSource += '/?'; // Allow optional path separator at end.\n\t }\n\t\n\t // Special-case patterns like '*' for catch-all routes.\n\t if (tokens[tokens.length - 1] === '*') {\n\t regexpSource += '$';\n\t }\n\t\n\t var match = pathname.match(new RegExp('^' + regexpSource, 'i'));\n\t if (match == null) {\n\t return null;\n\t }\n\t\n\t var matchedPath = match[0];\n\t var remainingPathname = pathname.substr(matchedPath.length);\n\t\n\t if (remainingPathname) {\n\t // Require that the match ends at a path separator, if we didn't match\n\t // the full path, so any remaining pathname is a new path segment.\n\t if (matchedPath.charAt(matchedPath.length - 1) !== '/') {\n\t return null;\n\t }\n\t\n\t // If there is a remaining pathname, treat the path separator as part of\n\t // the remaining pathname for properly continuing the match.\n\t remainingPathname = '/' + remainingPathname;\n\t }\n\t\n\t return {\n\t remainingPathname: remainingPathname,\n\t paramNames: paramNames,\n\t paramValues: match.slice(1).map(function (v) {\n\t return v && decodeURIComponent(v);\n\t })\n\t };\n\t}", "title": "" }, { "docid": "48867b7a1f0a69122d87faf434a51d2d", "score": "0.5601101", "text": "function matchPattern(pattern, pathname) {\n\t // Ensure pattern starts with leading slash for consistency with pathname.\n\t if (pattern.charAt(0) !== '/') {\n\t pattern = '/' + pattern;\n\t }\n\t\n\t var _compilePattern2 = compilePattern(pattern);\n\t\n\t var regexpSource = _compilePattern2.regexpSource;\n\t var paramNames = _compilePattern2.paramNames;\n\t var tokens = _compilePattern2.tokens;\n\t\n\t\n\t if (pattern.charAt(pattern.length - 1) !== '/') {\n\t regexpSource += '/?'; // Allow optional path separator at end.\n\t }\n\t\n\t // Special-case patterns like '*' for catch-all routes.\n\t if (tokens[tokens.length - 1] === '*') {\n\t regexpSource += '$';\n\t }\n\t\n\t var match = pathname.match(new RegExp('^' + regexpSource, 'i'));\n\t if (match == null) {\n\t return null;\n\t }\n\t\n\t var matchedPath = match[0];\n\t var remainingPathname = pathname.substr(matchedPath.length);\n\t\n\t if (remainingPathname) {\n\t // Require that the match ends at a path separator, if we didn't match\n\t // the full path, so any remaining pathname is a new path segment.\n\t if (matchedPath.charAt(matchedPath.length - 1) !== '/') {\n\t return null;\n\t }\n\t\n\t // If there is a remaining pathname, treat the path separator as part of\n\t // the remaining pathname for properly continuing the match.\n\t remainingPathname = '/' + remainingPathname;\n\t }\n\t\n\t return {\n\t remainingPathname: remainingPathname,\n\t paramNames: paramNames,\n\t paramValues: match.slice(1).map(function (v) {\n\t return v && decodeURIComponent(v);\n\t })\n\t };\n\t}", "title": "" }, { "docid": "48867b7a1f0a69122d87faf434a51d2d", "score": "0.5601101", "text": "function matchPattern(pattern, pathname) {\n\t // Ensure pattern starts with leading slash for consistency with pathname.\n\t if (pattern.charAt(0) !== '/') {\n\t pattern = '/' + pattern;\n\t }\n\t\n\t var _compilePattern2 = compilePattern(pattern);\n\t\n\t var regexpSource = _compilePattern2.regexpSource;\n\t var paramNames = _compilePattern2.paramNames;\n\t var tokens = _compilePattern2.tokens;\n\t\n\t\n\t if (pattern.charAt(pattern.length - 1) !== '/') {\n\t regexpSource += '/?'; // Allow optional path separator at end.\n\t }\n\t\n\t // Special-case patterns like '*' for catch-all routes.\n\t if (tokens[tokens.length - 1] === '*') {\n\t regexpSource += '$';\n\t }\n\t\n\t var match = pathname.match(new RegExp('^' + regexpSource, 'i'));\n\t if (match == null) {\n\t return null;\n\t }\n\t\n\t var matchedPath = match[0];\n\t var remainingPathname = pathname.substr(matchedPath.length);\n\t\n\t if (remainingPathname) {\n\t // Require that the match ends at a path separator, if we didn't match\n\t // the full path, so any remaining pathname is a new path segment.\n\t if (matchedPath.charAt(matchedPath.length - 1) !== '/') {\n\t return null;\n\t }\n\t\n\t // If there is a remaining pathname, treat the path separator as part of\n\t // the remaining pathname for properly continuing the match.\n\t remainingPathname = '/' + remainingPathname;\n\t }\n\t\n\t return {\n\t remainingPathname: remainingPathname,\n\t paramNames: paramNames,\n\t paramValues: match.slice(1).map(function (v) {\n\t return v && decodeURIComponent(v);\n\t })\n\t };\n\t}", "title": "" }, { "docid": "48867b7a1f0a69122d87faf434a51d2d", "score": "0.5601101", "text": "function matchPattern(pattern, pathname) {\n\t // Ensure pattern starts with leading slash for consistency with pathname.\n\t if (pattern.charAt(0) !== '/') {\n\t pattern = '/' + pattern;\n\t }\n\t\n\t var _compilePattern2 = compilePattern(pattern);\n\t\n\t var regexpSource = _compilePattern2.regexpSource;\n\t var paramNames = _compilePattern2.paramNames;\n\t var tokens = _compilePattern2.tokens;\n\t\n\t\n\t if (pattern.charAt(pattern.length - 1) !== '/') {\n\t regexpSource += '/?'; // Allow optional path separator at end.\n\t }\n\t\n\t // Special-case patterns like '*' for catch-all routes.\n\t if (tokens[tokens.length - 1] === '*') {\n\t regexpSource += '$';\n\t }\n\t\n\t var match = pathname.match(new RegExp('^' + regexpSource, 'i'));\n\t if (match == null) {\n\t return null;\n\t }\n\t\n\t var matchedPath = match[0];\n\t var remainingPathname = pathname.substr(matchedPath.length);\n\t\n\t if (remainingPathname) {\n\t // Require that the match ends at a path separator, if we didn't match\n\t // the full path, so any remaining pathname is a new path segment.\n\t if (matchedPath.charAt(matchedPath.length - 1) !== '/') {\n\t return null;\n\t }\n\t\n\t // If there is a remaining pathname, treat the path separator as part of\n\t // the remaining pathname for properly continuing the match.\n\t remainingPathname = '/' + remainingPathname;\n\t }\n\t\n\t return {\n\t remainingPathname: remainingPathname,\n\t paramNames: paramNames,\n\t paramValues: match.slice(1).map(function (v) {\n\t return v && decodeURIComponent(v);\n\t })\n\t };\n\t}", "title": "" }, { "docid": "48867b7a1f0a69122d87faf434a51d2d", "score": "0.5601101", "text": "function matchPattern(pattern, pathname) {\n\t // Ensure pattern starts with leading slash for consistency with pathname.\n\t if (pattern.charAt(0) !== '/') {\n\t pattern = '/' + pattern;\n\t }\n\t\n\t var _compilePattern2 = compilePattern(pattern);\n\t\n\t var regexpSource = _compilePattern2.regexpSource;\n\t var paramNames = _compilePattern2.paramNames;\n\t var tokens = _compilePattern2.tokens;\n\t\n\t\n\t if (pattern.charAt(pattern.length - 1) !== '/') {\n\t regexpSource += '/?'; // Allow optional path separator at end.\n\t }\n\t\n\t // Special-case patterns like '*' for catch-all routes.\n\t if (tokens[tokens.length - 1] === '*') {\n\t regexpSource += '$';\n\t }\n\t\n\t var match = pathname.match(new RegExp('^' + regexpSource, 'i'));\n\t if (match == null) {\n\t return null;\n\t }\n\t\n\t var matchedPath = match[0];\n\t var remainingPathname = pathname.substr(matchedPath.length);\n\t\n\t if (remainingPathname) {\n\t // Require that the match ends at a path separator, if we didn't match\n\t // the full path, so any remaining pathname is a new path segment.\n\t if (matchedPath.charAt(matchedPath.length - 1) !== '/') {\n\t return null;\n\t }\n\t\n\t // If there is a remaining pathname, treat the path separator as part of\n\t // the remaining pathname for properly continuing the match.\n\t remainingPathname = '/' + remainingPathname;\n\t }\n\t\n\t return {\n\t remainingPathname: remainingPathname,\n\t paramNames: paramNames,\n\t paramValues: match.slice(1).map(function (v) {\n\t return v && decodeURIComponent(v);\n\t })\n\t };\n\t}", "title": "" }, { "docid": "48867b7a1f0a69122d87faf434a51d2d", "score": "0.5601101", "text": "function matchPattern(pattern, pathname) {\n\t // Ensure pattern starts with leading slash for consistency with pathname.\n\t if (pattern.charAt(0) !== '/') {\n\t pattern = '/' + pattern;\n\t }\n\t\n\t var _compilePattern2 = compilePattern(pattern);\n\t\n\t var regexpSource = _compilePattern2.regexpSource;\n\t var paramNames = _compilePattern2.paramNames;\n\t var tokens = _compilePattern2.tokens;\n\t\n\t\n\t if (pattern.charAt(pattern.length - 1) !== '/') {\n\t regexpSource += '/?'; // Allow optional path separator at end.\n\t }\n\t\n\t // Special-case patterns like '*' for catch-all routes.\n\t if (tokens[tokens.length - 1] === '*') {\n\t regexpSource += '$';\n\t }\n\t\n\t var match = pathname.match(new RegExp('^' + regexpSource, 'i'));\n\t if (match == null) {\n\t return null;\n\t }\n\t\n\t var matchedPath = match[0];\n\t var remainingPathname = pathname.substr(matchedPath.length);\n\t\n\t if (remainingPathname) {\n\t // Require that the match ends at a path separator, if we didn't match\n\t // the full path, so any remaining pathname is a new path segment.\n\t if (matchedPath.charAt(matchedPath.length - 1) !== '/') {\n\t return null;\n\t }\n\t\n\t // If there is a remaining pathname, treat the path separator as part of\n\t // the remaining pathname for properly continuing the match.\n\t remainingPathname = '/' + remainingPathname;\n\t }\n\t\n\t return {\n\t remainingPathname: remainingPathname,\n\t paramNames: paramNames,\n\t paramValues: match.slice(1).map(function (v) {\n\t return v && decodeURIComponent(v);\n\t })\n\t };\n\t}", "title": "" }, { "docid": "48867b7a1f0a69122d87faf434a51d2d", "score": "0.5601101", "text": "function matchPattern(pattern, pathname) {\n\t // Ensure pattern starts with leading slash for consistency with pathname.\n\t if (pattern.charAt(0) !== '/') {\n\t pattern = '/' + pattern;\n\t }\n\t\n\t var _compilePattern2 = compilePattern(pattern);\n\t\n\t var regexpSource = _compilePattern2.regexpSource;\n\t var paramNames = _compilePattern2.paramNames;\n\t var tokens = _compilePattern2.tokens;\n\t\n\t\n\t if (pattern.charAt(pattern.length - 1) !== '/') {\n\t regexpSource += '/?'; // Allow optional path separator at end.\n\t }\n\t\n\t // Special-case patterns like '*' for catch-all routes.\n\t if (tokens[tokens.length - 1] === '*') {\n\t regexpSource += '$';\n\t }\n\t\n\t var match = pathname.match(new RegExp('^' + regexpSource, 'i'));\n\t if (match == null) {\n\t return null;\n\t }\n\t\n\t var matchedPath = match[0];\n\t var remainingPathname = pathname.substr(matchedPath.length);\n\t\n\t if (remainingPathname) {\n\t // Require that the match ends at a path separator, if we didn't match\n\t // the full path, so any remaining pathname is a new path segment.\n\t if (matchedPath.charAt(matchedPath.length - 1) !== '/') {\n\t return null;\n\t }\n\t\n\t // If there is a remaining pathname, treat the path separator as part of\n\t // the remaining pathname for properly continuing the match.\n\t remainingPathname = '/' + remainingPathname;\n\t }\n\t\n\t return {\n\t remainingPathname: remainingPathname,\n\t paramNames: paramNames,\n\t paramValues: match.slice(1).map(function (v) {\n\t return v && decodeURIComponent(v);\n\t })\n\t };\n\t}", "title": "" }, { "docid": "d56d79513c0feeb2be2b1dd73bebfa0a", "score": "0.5597042", "text": "function matchPattern(pattern, pathname) {\n\t // Ensure pattern starts with leading slash for consistency with pathname.\n\t if (pattern.charAt(0) !== '/') {\n\t pattern = '/' + pattern;\n\t }\n\t\n\t var _compilePattern2 = compilePattern(pattern);\n\t\n\t var regexpSource = _compilePattern2.regexpSource;\n\t var paramNames = _compilePattern2.paramNames;\n\t var tokens = _compilePattern2.tokens;\n\t\n\t if (pattern.charAt(pattern.length - 1) !== '/') {\n\t regexpSource += '/?'; // Allow optional path separator at end.\n\t }\n\t\n\t // Special-case patterns like '*' for catch-all routes.\n\t if (tokens[tokens.length - 1] === '*') {\n\t regexpSource += '$';\n\t }\n\t\n\t var match = pathname.match(new RegExp('^' + regexpSource, 'i'));\n\t if (match == null) {\n\t return null;\n\t }\n\t\n\t var matchedPath = match[0];\n\t var remainingPathname = pathname.substr(matchedPath.length);\n\t\n\t if (remainingPathname) {\n\t // Require that the match ends at a path separator, if we didn't match\n\t // the full path, so any remaining pathname is a new path segment.\n\t if (matchedPath.charAt(matchedPath.length - 1) !== '/') {\n\t return null;\n\t }\n\t\n\t // If there is a remaining pathname, treat the path separator as part of\n\t // the remaining pathname for properly continuing the match.\n\t remainingPathname = '/' + remainingPathname;\n\t }\n\t\n\t return {\n\t remainingPathname: remainingPathname,\n\t paramNames: paramNames,\n\t paramValues: match.slice(1).map(function (v) {\n\t return v && decodeURIComponent(v);\n\t })\n\t };\n\t}", "title": "" }, { "docid": "336a671ca8bcfedf976d475b097b6ae7", "score": "0.5589107", "text": "function matchPattern(pattern, pathname) {\n // Ensure pattern starts with leading slash for consistency with pathname.\n if (pattern.charAt(0) !== '/') {\n pattern = '/' + pattern;\n }\n\n var _compilePattern2 = compilePattern(pattern);\n\n var regexpSource = _compilePattern2.regexpSource;\n var paramNames = _compilePattern2.paramNames;\n var tokens = _compilePattern2.tokens;\n\n\n if (pattern.charAt(pattern.length - 1) !== '/') {\n regexpSource += '/?'; // Allow optional path separator at end.\n }\n\n // Special-case patterns like '*' for catch-all routes.\n if (tokens[tokens.length - 1] === '*') {\n regexpSource += '$';\n }\n\n var match = pathname.match(new RegExp('^' + regexpSource, 'i'));\n if (match == null) {\n return null;\n }\n\n var matchedPath = match[0];\n var remainingPathname = pathname.substr(matchedPath.length);\n\n if (remainingPathname) {\n // Require that the match ends at a path separator, if we didn't match\n // the full path, so any remaining pathname is a new path segment.\n if (matchedPath.charAt(matchedPath.length - 1) !== '/') {\n return null;\n }\n\n // If there is a remaining pathname, treat the path separator as part of\n // the remaining pathname for properly continuing the match.\n remainingPathname = '/' + remainingPathname;\n }\n\n return {\n remainingPathname: remainingPathname,\n paramNames: paramNames,\n paramValues: match.slice(1).map(function (v) {\n return v && decodeURIComponent(v);\n })\n };\n}", "title": "" }, { "docid": "336a671ca8bcfedf976d475b097b6ae7", "score": "0.5589107", "text": "function matchPattern(pattern, pathname) {\n // Ensure pattern starts with leading slash for consistency with pathname.\n if (pattern.charAt(0) !== '/') {\n pattern = '/' + pattern;\n }\n\n var _compilePattern2 = compilePattern(pattern);\n\n var regexpSource = _compilePattern2.regexpSource;\n var paramNames = _compilePattern2.paramNames;\n var tokens = _compilePattern2.tokens;\n\n\n if (pattern.charAt(pattern.length - 1) !== '/') {\n regexpSource += '/?'; // Allow optional path separator at end.\n }\n\n // Special-case patterns like '*' for catch-all routes.\n if (tokens[tokens.length - 1] === '*') {\n regexpSource += '$';\n }\n\n var match = pathname.match(new RegExp('^' + regexpSource, 'i'));\n if (match == null) {\n return null;\n }\n\n var matchedPath = match[0];\n var remainingPathname = pathname.substr(matchedPath.length);\n\n if (remainingPathname) {\n // Require that the match ends at a path separator, if we didn't match\n // the full path, so any remaining pathname is a new path segment.\n if (matchedPath.charAt(matchedPath.length - 1) !== '/') {\n return null;\n }\n\n // If there is a remaining pathname, treat the path separator as part of\n // the remaining pathname for properly continuing the match.\n remainingPathname = '/' + remainingPathname;\n }\n\n return {\n remainingPathname: remainingPathname,\n paramNames: paramNames,\n paramValues: match.slice(1).map(function (v) {\n return v && decodeURIComponent(v);\n })\n };\n}", "title": "" } ]
5e7fca8c5e3d0b806cb16f3930b13b47
end of login action sets the cookie name, value, and days until it expires
[ { "docid": "cdcd2b996378ef349d92452d508568c3", "score": "0.6391861", "text": "function setCookie(cname, cvalue, exdays) {\n var d = new Date();\n d.setTime(d.getTime() + (exdays*24*60*60*1000));\n var expires = \"expires=\"+ d.toUTCString();\n document.cookie = cname + \"=\" + cvalue + \";\" + expires + \";path=/\";\n}", "title": "" } ]
[ { "docid": "94d6fcfab083ccfe47b403b9577ac68e", "score": "0.68342936", "text": "function logOut()\n{\n userId = 0;\n firstName = \"\";\n lastName = \"\";\n document.cookie = \"firstName= ; expires = Thu, 01 Jan 1970 00:00:00 GMT\";\n location.href = \"index.html\";\n}", "title": "" }, { "docid": "16696e717dfec104a9b7b68ee7d02833", "score": "0.6763247", "text": "function logOut() {\n document.cookie = 'userName=;expires=-1';\n window.location = window.location;\n}", "title": "" }, { "docid": "6f6ad92ff480f3002e52140f759bae7b", "score": "0.6751605", "text": "function setCookie(c_name,value,expiredays) {\nvar exdate=new Date()\nexdate.setDate(exdate.getDate()+expiredays)\ndocument.cookie=c_name+ \"=\" +escape(value) + ((expiredays==null) ? \"\" : \";expires=\"+exdate.toGMTString())\n}", "title": "" }, { "docid": "6f6ad92ff480f3002e52140f759bae7b", "score": "0.6751605", "text": "function setCookie(c_name,value,expiredays) {\nvar exdate=new Date()\nexdate.setDate(exdate.getDate()+expiredays)\ndocument.cookie=c_name+ \"=\" +escape(value) + ((expiredays==null) ? \"\" : \";expires=\"+exdate.toGMTString())\n}", "title": "" }, { "docid": "83e8641f6c61b7a333cc613887e5c025", "score": "0.66350305", "text": "function SetCookie(c_name,value,expiredays) {\r\n var exdate=new Date();\r\n exdate.setDate(exdate.getDate()+expiredays);\r\n document.cookie=c_name+ \"=\" +escape(value)+((expiredays==null) ? \"\" : \";expires=\"+exdate.toGMTString());\r\n}", "title": "" }, { "docid": "109b1aaf99fe7a7b97f0ab464b821e22", "score": "0.6627333", "text": "function setOreo(name, value, days) {\n let d = new Date\n d.setTime(d.getTime() + 24*60*60*1000*days)\n document.cookie = name + \"=\" + value + \";path=/;expires=\" + d.toGMTString()\n}", "title": "" }, { "docid": "12d6d754894f292052654f186da8ffe2", "score": "0.66075", "text": "function setCookie(c_name,value,expiredays) {\r\n\tvar exdate=new Date();\r\n\texdate.setDate(exdate.getDate()+expiredays);\r\n\tdocument.cookie=c_name+ \"=\" +escape(value)+((expiredays==null) ? \"\" : \";expires=\"+exdate.toGMTString())+\"; path=/\";\r\n}", "title": "" }, { "docid": "18474c4f6472bb2722a5a977d1d684a1", "score": "0.65932477", "text": "function setCookie(name, value, daysTillExpiration = 2) {\n const d = new Date();\n d.setTime(d.getTime() + (daysTillExpiration * 24 * 60 * 60 * 1000));\n const expires = `expires=${d.toUTCString()}`;\n document.cookie = `${name}=${value};${expires};path=/`;\n}", "title": "" }, { "docid": "df0d69ec953d9def56239911f9409858", "score": "0.65829074", "text": "function logout(){\n document.cookie = 'logintoken' + '=;expires=Thu, 01 Jan 1970 00:00:01 GMT;';\n Finch.navigate(\"login\");\n return false;\n}", "title": "" }, { "docid": "7eea06dc0c6987d66de04d2cad4fdfcf", "score": "0.6559899", "text": "function setCookie(c_name,value,expiredays)\r\n{\r\n var exdate=new Date();\r\n exdate.setTime(exdate.getTime()+(expiredays*24*3600*1000));\r\n document.cookie=c_name+ '=' +escape(value)+ ((expiredays==null) ? '' : '; expires='+exdate);\r\n}", "title": "" }, { "docid": "26a92a528a953d0799e1fe4ec908e1af", "score": "0.65392125", "text": "function set_cookie_value( name, value, age_in_days ){\n\n // Set the number of seconds in a day\n var seconds_per_day = 60 * 60 * 24;\n\n // Creates a new Date object to set expire date\n var expires = new Date();\n\n // Setting the proper expire date\n expires.setTime( \n\n expires.getTime() + ( seconds_per_day * age_in_days )\n \n );\n\n // Convert date to an UTC string\n var expire_date = expires.toUTCString();\n\n // Sets the cookie\n document.cookie = name + \"=\" + value + \";expires=\" + expire_date;\n\n }", "title": "" }, { "docid": "dbc7288af405eee4f83b49de962cacbe", "score": "0.65368414", "text": "function setCookie(c_name,value)\n{\n\tvar exdays = 14;\n\tvar exdate=new Date();\n\texdate.setDate(exdate.getDate() + exdays);\n\tvar c_value=escape(value) + ((exdays==null) ? \"\" : \"; expires=\"+exdate.toUTCString());\n\tdocument.cookie=c_name + \"=\" + c_value;\n}", "title": "" }, { "docid": "695ae9d72c005e574053dd5684f54d79", "score": "0.65172774", "text": "function setCookie(c_name, value, expiredays) {\n\tvar exdate = new Date();\n\texdate.setDate(exdate.getDate() + expiredays);\n\tdocument.cookie = c_name + \"=\" + escape(value) + ((expiredays == null) ? \"\" : \";expires=\" + exdate.toGMTString());\n}", "title": "" }, { "docid": "3173302df901dd3713111ac310ccb1f0", "score": "0.650873", "text": "function setCookie(c_name,value,exdays) {\r\n var exdate=new Date();\r\n exdate.setDate(exdate.getDate() + exdays);\r\n var c_value=escape(value) + ((exdays==null) ? \"\" : \"; expires=\"+exdate.toUTCString());\r\n document.cookie=c_name + \"=\" + c_value;\r\n}", "title": "" }, { "docid": "ff3603ac91602a61e91c153413ad2f36", "score": "0.64987963", "text": "function setCookie(c_name,value,exdays){\n\tvar exdate=new Date();\n\texdate.setDate(exdate.getDate() + exdays);\n\tvar c_value=escape(value) + ((exdays==null) ? \"\" : \"; expires=\"+exdate.toUTCString());\n\tdocument.cookie=c_name + \"=\" + c_value;\n}", "title": "" }, { "docid": "67fe688624cedb7438128509fe7f27b5", "score": "0.64963174", "text": "function bl_setCookie(c_name, value, exdays) {\n var c_value,\n exdate = new Date();\n exdate.setDate(exdate.getDate() + exdays);\n c_value = escape(value) + ((exdays === null) ? \"\" : \"; expires=\" + exdate.toUTCString());\n document.cookie = c_name + \"=\" + c_value + '; path=/';\n}", "title": "" }, { "docid": "435a27fd87b1ce973056972369d74f73", "score": "0.6495703", "text": "function setCookie(c_name,value,expiredays)\n\t\t\t{\n\t\t\t\tvar exdate=new Date();exdate.setDate(exdate.getDate()+expiredays);document.cookie=c_name+\"=\"+escape(value)+\n((expiredays==null)?\"\":\";expires=\"+exdate.toUTCString());\n\t\t\t}", "title": "" }, { "docid": "35446f1dc99cb7bd4c37edc0aba61c03", "score": "0.648646", "text": "function setCookie(c_name, value, expiredays) {\n\tvar exdate = new Date();\n\texdate.setDate(exdate.getDate() + expiredays);\n\tdocument.cookie = c_name + \"=\" + escape(value) +\n\t((expiredays == null) ? \"\" : \";expires=\"+ exdate.toGMTString());\n}", "title": "" }, { "docid": "ff8ea96f0bcdeafd66f6813a0bd037db", "score": "0.6478466", "text": "setToCookie(exdays) {\n\t\tif (!this.key) {\n\t\t\treturn false;\n\t\t}\n\t\tvar date = new Date();\n\t\tdate.setTime(d.Datetime.strToTime('+' + exdays + 'days'));\n\t\tvar expires = 'expires=' + date.toUTCString();\n\t\tdocument.cookie = this.key + '=' + this.value + '; ' + expires;\n\t}", "title": "" }, { "docid": "7b22ab7ce0cd4dc118f89b6f1e9401c0", "score": "0.64741194", "text": "function setCookie(cname, cvalue, exdays) \n{\n var d = new Date();\n d.setTime(d.getTime() + (exdays*24*60*60*1000));\n var expires = \"expires=\"+ d.toUTCString();\n document.cookie = cname + \"=\" + cvalue + \";\" + expires + \";path=/\";\n}", "title": "" }, { "docid": "d77e5a71c20ec8fa13f65a625b470ebf", "score": "0.6471779", "text": "function setCookie(cname, cvalue, exdays) {\n var d = new Date();\n d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));\n var expires = \"expires=\" + d.toUTCString();\n document.cookie = cname + \"=\" + cvalue + \"; \" + expires;\n }", "title": "" }, { "docid": "366bd9c148baf6a98e35ead29f35cbb1", "score": "0.64691395", "text": "function setCookie(cname,cvalue,exdays) {\n var d = new Date(); //Create an date object\n d.setTime(d.getTime() + (exdays*1000*60*60*24)); //Set the time to exdays from the current date in milliseconds. 1000 milliseonds = 1 second\n var expires = \"expires=\" + d.toGMTString(); //Compose the expirartion date\n document.cookie = cname+\"=\"+cvalue+\"; \"+expires;//Set the cookie with value and the expiration date\n}", "title": "" }, { "docid": "fd6e9a7d8ecb58f468a035b4fab0e3d0", "score": "0.6461891", "text": "function setCookie(c_name,value,exdays) {\r\n\tvar exdate=new Date(); exdate.setDate(exdate.getDate() + exdays); var c_value=escape(value) + ((exdays==null) ? \"\" : \"; expires=\"+exdate.toUTCString());\r\n\tdocument.cookie=c_name + \"=\" + c_value + \";domain=.startpage.com;path=/\";\r\n}", "title": "" }, { "docid": "3ea8d3eaf6158cc88135e8d58823ce16", "score": "0.64557904", "text": "function setCookie(c_name,value,exdays) {\n\tvar exdate = new Date();\n\texdate.setDate(exdate.getDate() + exdays);\n\tvar c_value = escape(value) + ((exdays==null) ? \"\" : \"; expires=\"+exdate.toUTCString());\n\tdocument.cookie=c_name + \"=\" + c_value;\n}", "title": "" }, { "docid": "0c77f5a7f7a1be39b16610c6d483a0bc", "score": "0.6455664", "text": "function SetCookie(cname,cvalue, exdays){\n let d = new Date();\n d.setTime(d.getTime() + exdays*24*60*60*1000);\n let expires = \"expires=\"+d.toLocaleDateString();\n\n document.cookie = cname+\"=\"+cvalue+\";\"+expires;\n}", "title": "" }, { "docid": "e00fa5ef773a92589f4f9b04a0296e52", "score": "0.6444121", "text": "function setCookie(cname,cvalue,exdays) {\n var d = new Date();\n d.setTime(d.getTime() + (exdays*24*60*60*1000));\n var expires = \"expires=\" + d.toGMTString();\n document.cookie = cname+\"=\"+cvalue+\"; \"+expires;\n }", "title": "" }, { "docid": "db74ccb56ebf3447e886f19c12b19da2", "score": "0.6443116", "text": "function setCookie(cname, cvalue, exdays) {\r\n var d = new Date();\r\n d.setTime(d.getTime() + (exdays*24*60*60*1000));\r\n var expires = \"expires=\"+d.toGMTString();\r\n document.cookie = cname + \"=\" + cvalue + \"; \" + expires +\r\n \"; path=/\";\r\n}", "title": "" }, { "docid": "49aa15efec9d5329b47614fa7ad0bcaf", "score": "0.64425033", "text": "function setCookie(name,value,days) {\n if (days) {\n var date = new Date();\n date.setTime(date.getTime()+(days*24*60*60*1000));\n var expires = \"; expires=\"+date.toGMTString();\n }\n else var expires = \"\";\n document.cookie = name+\"=\"+value+expires+\"; path=/\";\n}", "title": "" }, { "docid": "0b2c4d5786179c2a6e19fe9cc87159c5", "score": "0.6438505", "text": "function setCookie(cname, cvalue, exdays) {\r\n var d = new Date();\r\n d.setTime(d.getTime() + (exdays*24*60*60*1000));\r\n var expires = \"expires=\"+d.toUTCString();\r\n document.cookie = cname + \"=\" + cvalue + \"; \" + expires;\r\n}", "title": "" }, { "docid": "0b2c4d5786179c2a6e19fe9cc87159c5", "score": "0.6438505", "text": "function setCookie(cname, cvalue, exdays) {\r\n var d = new Date();\r\n d.setTime(d.getTime() + (exdays*24*60*60*1000));\r\n var expires = \"expires=\"+d.toUTCString();\r\n document.cookie = cname + \"=\" + cvalue + \"; \" + expires;\r\n}", "title": "" }, { "docid": "550d88c2e7153d2b3dad7b14a9948713", "score": "0.6438413", "text": "function setCookie(cname, cvalue, exdays) {\r\n var d = new Date();\r\n d.setTime(d.getTime() + (exdays*24*60*60*1000));\r\n var expires = \"expires=\"+ d.toUTCString();\r\n document.cookie = cname + \"=\" + cvalue + \";\" + expires + \";path=/\";\r\n}", "title": "" }, { "docid": "550d88c2e7153d2b3dad7b14a9948713", "score": "0.6438413", "text": "function setCookie(cname, cvalue, exdays) {\r\n var d = new Date();\r\n d.setTime(d.getTime() + (exdays*24*60*60*1000));\r\n var expires = \"expires=\"+ d.toUTCString();\r\n document.cookie = cname + \"=\" + cvalue + \";\" + expires + \";path=/\";\r\n}", "title": "" }, { "docid": "550d88c2e7153d2b3dad7b14a9948713", "score": "0.6438413", "text": "function setCookie(cname, cvalue, exdays) {\r\n var d = new Date();\r\n d.setTime(d.getTime() + (exdays*24*60*60*1000));\r\n var expires = \"expires=\"+ d.toUTCString();\r\n document.cookie = cname + \"=\" + cvalue + \";\" + expires + \";path=/\";\r\n}", "title": "" }, { "docid": "fad8b476c39eb58208377e15d0ffa640", "score": "0.64382553", "text": "function setCookie(c_name, value, exdays){\n var exdate = new Date();\n exdate.setDate(exdate.getDate() + exdays);\n var c_value = escape(value) + ((exdays == null) ? \"\" : \"; expires=\" + exdate.toUTCString());\n document.cookie = c_name + \"=\" + c_value;\n}", "title": "" }, { "docid": "667392079b709d6f57cb80f07f066f5d", "score": "0.6437441", "text": "function setCookie(cname,cvalue,exdays) {\r\n var d = new Date();\r\n d.setTime(d.getTime() + (exdays*24*60*60*1000));\r\n var expires = \"expires=\" + d.toGMTString();\r\n document.cookie = cname + \"=\" + cvalue + \";\" + expires + \";path=/\";\r\n}", "title": "" }, { "docid": "5b610b69c1bf712909e8c1e8cb5aff62", "score": "0.64330065", "text": "function setCookie(cname, cvalue, exdays) {\r\n var d = new Date();\r\n d.setTime(d.getTime() + (exdays*24*60*60*1000));\r\n var expires = \"expires=\"+d.toUTCString();\r\n document.cookie = cname + \"=\" + cvalue + \";\" + expires + \";path=/\";\r\n}", "title": "" }, { "docid": "5b610b69c1bf712909e8c1e8cb5aff62", "score": "0.64330065", "text": "function setCookie(cname, cvalue, exdays) {\r\n var d = new Date();\r\n d.setTime(d.getTime() + (exdays*24*60*60*1000));\r\n var expires = \"expires=\"+d.toUTCString();\r\n document.cookie = cname + \"=\" + cvalue + \";\" + expires + \";path=/\";\r\n}", "title": "" }, { "docid": "a3e0917b6d5d60c9f870e444791ab6a7", "score": "0.64328253", "text": "function setCookie(cname, cvalue, exdays) {\n var d = new Date();\n d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));\n var expires = \"expires=\" + d.toUTCString();\n document.cookie = cname + \"=\" + cvalue + \";\" + expires + \";path=/\";\n }", "title": "" }, { "docid": "a3e0917b6d5d60c9f870e444791ab6a7", "score": "0.64328253", "text": "function setCookie(cname, cvalue, exdays) {\n var d = new Date();\n d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));\n var expires = \"expires=\" + d.toUTCString();\n document.cookie = cname + \"=\" + cvalue + \";\" + expires + \";path=/\";\n }", "title": "" }, { "docid": "a3e0917b6d5d60c9f870e444791ab6a7", "score": "0.64328253", "text": "function setCookie(cname, cvalue, exdays) {\n var d = new Date();\n d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));\n var expires = \"expires=\" + d.toUTCString();\n document.cookie = cname + \"=\" + cvalue + \";\" + expires + \";path=/\";\n }", "title": "" }, { "docid": "528a6093ca00e2727a8e5108cbd4335d", "score": "0.64323825", "text": "function setCookie(c_name, value, exdays) {\n var exdate = new Date();\n exdate.setDate(exdate.getDate() + exdays);\n var c_value = escape(value) + ((exdays == null) ? \"\" : \"; expires=\" + exdate.toUTCString());\n document.cookie = c_name + \"=\" + c_value;\n}", "title": "" }, { "docid": "7223815a24839a2861b1663d9f65f75e", "score": "0.6430512", "text": "function setCookie(c_name, value, exdays) {\n var exdate = new Date();\n exdate.setDate(exdate.getDate() + exdays);\n var c_value = escape(value) + ((exdays == null) ? '' : '; expires=' + exdate.toUTCString());\n document.cookie = c_name + '=' + c_value;\n }", "title": "" }, { "docid": "8b14970cf85eae6c693b6ae6996936a9", "score": "0.6423235", "text": "function ebSetCookie(cname, cvalue, exdays) {\r\n var d = new Date();\r\n d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));\r\n var expires = \"expires=\"+d.toUTCString();\r\n document.cookie = cname + \"=\" + cvalue + \";\" + expires + \";path=/\";\r\n}", "title": "" }, { "docid": "a37b696a4a456632a2d8666068453994", "score": "0.64215696", "text": "function setCookie(cname, cvalue, exdays) {\n var d = new Date();\n d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));\n var expires = \"expires=\" + d.toGMTString();\n document.cookie = cname + \"=\" + cvalue + \"; \" + expires;\n }", "title": "" }, { "docid": "24bbaa6e20c9b13565a716d3ab0b10cb", "score": "0.64194715", "text": "function setCookie(cname, cvalue, exdays) {\n var d = new Date();\n d.setTime(d.getTime() + (exdays*1000));\n var expires = \"expires=\" + d.toGMTString();\n document.cookie = cname+\"=\"+cvalue+\"; \"+expires;\n}", "title": "" }, { "docid": "76932e78932fe54ee3cb2cfe4ea9454a", "score": "0.6416121", "text": "function setCookie(name,value,days) {\n var expires = \"\";\n if (days) {\n var date = new Date();\n date.setTime(date.getTime() + (days*24*60*60*1000));\n expires = \"; expires=\" + date.toUTCString();\n }\n document.cookie = name + \"=\" + (value || \"\") + expires + \"; path=/\";\n }", "title": "" }, { "docid": "566d126d83381c3f96c5db841fadd6c8", "score": "0.64112824", "text": "function setCookie(c_name, value, exdays) {\n\tvar exdate = new Date();\n\texdate.setDate(exdate.getDate() + exdays);\n\tvar c_value = escape(value) + ((exdays == null) ? \"\" : \"; expires=\" + exdate.toUTCString());\n\tdocument.cookie = c_name + \"=\" + c_value;\n}", "title": "" }, { "docid": "fa6c8a144ec547a309a2681372b0bc82", "score": "0.64109325", "text": "function setCookie(name, value, days) {\n var expires = \"\";\n if (days) {\n var date = new Date();\n date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));\n expires = \"; expires=\" + date.toUTCString();\n }\n document.cookie = name + \"=\" + (value || \"\") + expires + \"; path=/\";\n }", "title": "" }, { "docid": "127c00b80dbdb49ba1aaac7b5de78e26", "score": "0.6410421", "text": "function setCookie(cname, cvalue, exdays) {\n var d = new Date()\n d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1000)\n var expires = 'expires=' + d.toUTCString()\n document.cookie = cname + '=' + cvalue + ';' + expires + ';path=/'\n}", "title": "" }, { "docid": "ad86720b7488b1072ace55bfcc39ad57", "score": "0.6410383", "text": "function setCookie(cname, cvalue, exdays) {\n var d = new Date();\n d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1000);\n var expires = \"expires=\" + d.toUTCString();\n document.cookie = cname + \"=\" + cvalue + \";\" + expires + \";path=/\";\n}", "title": "" }, { "docid": "ad86720b7488b1072ace55bfcc39ad57", "score": "0.6410383", "text": "function setCookie(cname, cvalue, exdays) {\n var d = new Date();\n d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1000);\n var expires = \"expires=\" + d.toUTCString();\n document.cookie = cname + \"=\" + cvalue + \";\" + expires + \";path=/\";\n}", "title": "" }, { "docid": "ad86720b7488b1072ace55bfcc39ad57", "score": "0.6410383", "text": "function setCookie(cname, cvalue, exdays) {\n var d = new Date();\n d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1000);\n var expires = \"expires=\" + d.toUTCString();\n document.cookie = cname + \"=\" + cvalue + \";\" + expires + \";path=/\";\n}", "title": "" }, { "docid": "90b12f82b12ff9916cf68514a261ec92", "score": "0.6410151", "text": "function setCookie(cname, cvalue, exdays) {\n var d = new Date();\n d.setTime(d.getTime() + (exdays*24*60*60*1000));\n var expires = \"expires=\"+ d.toUTCString();\n document.cookie = cname + \"=\" + cvalue + \";\" + expires + \";path=/\";\n }", "title": "" }, { "docid": "0381ac76955952a56616dec551fad02c", "score": "0.6410017", "text": "function setCookie(cname, cvalue, exdays) {\n var d = new Date();\n d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));\n var expires = \"expires=\"+d.toUTCString();\n document.cookie = cname + \"=\" + cvalue + \";\" + expires + \";path=/\";\n}", "title": "" }, { "docid": "9af94bc6393627b297e91147ea333101", "score": "0.64078915", "text": "function setCookie(cname, cvalue, exdays) {\n var d = new Date();\n d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));\n var expires = \"expires=\" + d.toUTCString();\n document.cookie = cname + \"=\" + cvalue + \";\" + expires + \";path=/\";\n}", "title": "" }, { "docid": "9af94bc6393627b297e91147ea333101", "score": "0.64078915", "text": "function setCookie(cname, cvalue, exdays) {\n var d = new Date();\n d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));\n var expires = \"expires=\" + d.toUTCString();\n document.cookie = cname + \"=\" + cvalue + \";\" + expires + \";path=/\";\n}", "title": "" }, { "docid": "d404e6c479b273b0495fba9383ecad28", "score": "0.64072657", "text": "function setCookie(cname, cvalue, exdays) {\n var d = new Date();\n d.setTime(d.getTime() + (exdays*24*60*60*1000));\n var expires = \"expires=\"+ d.toUTCString();\n document.cookie = cname + \"=\" + cvalue + \";\" + expires + \";path=/\";\n }", "title": "" }, { "docid": "d54c96192815573082a44b8f5c77caf6", "score": "0.6405452", "text": "function set_cookie (name, value, days_before_expiration)\n{\n\tvar expires;\n\tif( days_before_expiration !== 0 )\n\t{\n\t\tvar expiration_date = new Date();\n\t\texpiration_date.setTime(expiration_date.getTime() + (days_before_expiration*24*60*60*1000));\n\t\texpires = '; expires=' + expiration_date.toGMTString();\n\t}\n\telse\n\t{\n\t\texpires = '';\n\t}\n\n\tdocument.cookie = name + \"=\" + encodeURIComponent (value) + expires;\n}", "title": "" }, { "docid": "265185e8863591bdd78f73d6d59cf435", "score": "0.6404729", "text": "function setCookie(cname, cvalue, exdays) {\n var d = new Date();\n d.setTime(d.getTime() + (exdays*24*60*60*1000));\n var expires = \"expires=\"+d.toUTCString();\n document.cookie = cname + \"=\" + cvalue + \"; \" + expires;\n }", "title": "" }, { "docid": "59e2e83b31d7b64cfea95d8f8f16b3eb", "score": "0.6404418", "text": "function setCookie(cname, cvalue, exdays) {\n var d = new Date();\n d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));\n var expires = \"expires=\" + d.toUTCString();\n document.cookie = cname + \"=\" + cvalue + \"; \" + expires;\n}", "title": "" }, { "docid": "986acffe79d120e4bfbacc1fd48d3dc8", "score": "0.6399188", "text": "function setCookie(name,value,days) {\n var expires = \"\";\n if (days) {\n var date = new Date();\n date.setTime(date.getTime() + (days*24*60*60*1000));\n expires = \"; expires=\" + date.toUTCString();\n }\n document.cookie = name + \"=\" + (value || \"\") + expires + \"; path=/\";\n }", "title": "" }, { "docid": "9960da96373b86dda3b3dd2408835da6", "score": "0.6398385", "text": "function setCookie(cname, cvalue, exdays) {\r\n\tvar d = new Date();\r\n\td.setTime(d.getTime() + (exdays*24*60*60*1000));\r\n\tvar expires = \"expires=\"+ d.toUTCString();\r\n\tdocument.cookie = cname + \"=\" + cvalue + \"; \" + expires;\r\n}", "title": "" }, { "docid": "bd1061c4155b94522e30b80feb5e06f9", "score": "0.6396841", "text": "function setCookie(cname, cvalue, exdays) {\n\t var d = new Date();\n\t d.setTime(d.getTime() + (exdays*24*60*60*1000));\n\t var expires = \"expires=\"+ d.toUTCString();\n\t document.cookie = cname + \"=\" + cvalue + \";\" + expires + \";path=/\";\n\t}", "title": "" }, { "docid": "13763b123c49f59de75fe2c239cdff7f", "score": "0.6395197", "text": "function saveCookie(name, color, duration) {\n let date = new Date(); //grabs current date as value for date\n\n date.setTime(date.getTime() + (duration*24*60*60*1000)); //duration*24*60*60*1000 sets duration into milliseconds\n\n let expiryDate = \"expires=\" + date.toGMTString(); //sets the expiry date to \"expires= \" + date in GTM String format to be used for setting the expiry date of thge cookie\n\n document.cookie = `userName=${name};${expiryDate}`;\n document.cookie = `favColor=${color};${expiryDate}`;\n\n $('#cookie-ask').hide();\n \n checkCookieUserAndColor();\n}", "title": "" }, { "docid": "d7470533ae0a9a89a95988fc7a14116f", "score": "0.6390571", "text": "function setCookie(cname, cvalue, exdays) {\n var d = new Date();\n d.setTime(d.getTime() + (exdays*24*60*60*1000));\n var expires = \"expires=\"+d.toUTCString();\n document.cookie = cname + \"=\" + cvalue + \"; \" + expires;\n}", "title": "" }, { "docid": "3134b1717248c39160e616998d416b41", "score": "0.6389335", "text": "function setCookie(cname, cvalue, exdays) {\n var d = new Date();\n d.setTime(d.getTime() + (exdays*24*60*60*1000));\n var expires = \"expires=\"+d.toUTCString();\n document.cookie = cname + \"=\" + cvalue + \";\" + expires + \";path=/\";\n}", "title": "" }, { "docid": "b3f90e18fa5f53d3cb316c3a60fdc1e6", "score": "0.63860404", "text": "function setCookie(cname, cvalue, exdays) {\r\n\tvar d = new Date();\r\n\td.setTime(d.getTime() + (exdays*24*60*60*1000));\r\n\tvar expires = \"expires=\"+ d.toUTCString();\r\n\tdocument.cookie = cname + \"=\" + cvalue + \";\" + expires + \";path=/\";\r\n}", "title": "" }, { "docid": "7e90fa3a22e9c177f878217e7774deed", "score": "0.6383931", "text": "function deleteCookie(res) {\r\n // setting the cookie without providing a value should delete that cookie, by setting an\r\n // appropriate expire date\r\n res.cookies.set(_cookieName);\r\n }", "title": "" }, { "docid": "33533b46fba04aa003da32945ff0a3ac", "score": "0.6383126", "text": "function writeCookie(name,value,days) {\n\tvar expires = \"\";\n\tif (days) {\n\t\tvar date = new Date();\n\t\tdate.setTime(date.getTime()+(days*24*60*60*1000));\n\t\texpires = \"; expires=\"+date.toGMTString();\n\t}\n\t// cumulative\n\tdocument.cookie = name + \"=\" + value + expires + \"; path=/\";\n}", "title": "" }, { "docid": "27bfe5a029919a226618edb74182c769", "score": "0.63814306", "text": "function setCookie(cname, cvalue, exdays) {\n\t\t\tvar d = new Date();\n\t\t\td.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));\n\t\t\tvar expires = \"expires=\" + d.toUTCString();\n\t\t\tdocument.cookie = cname + \"=\" + cvalue + \";\" + expires + \";path=/\";\n\t\t}", "title": "" }, { "docid": "1ffe77946d98909395002af65a140b25", "score": "0.6380251", "text": "function setCookie(name,value,days) {\n var expires = \"\";\n if (days) {\n var date = new Date();\n if(days != 0){\n date.setTime(date.getTime() + (days*24*60*60*1000));\n }\n expires = \"; expires=\" + date.toUTCString();\n }\n document.cookie = name + \"=\" + (value || \"\") + expires + \"; path=/\";\n console.log('set Cookie '+name + \"=\" + (value || \"\"));\n}", "title": "" }, { "docid": "34fc2ecc5d7e1ef1af65cde8cd85df09", "score": "0.6377766", "text": "function setCookie(cname, cvalue, exdays) {\n var d = new Date();\n d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));\n var expires = \"expires=\"+d.toUTCString();\n document.cookie = cname + \"=\" + cvalue + \";\" + expires + \";path=/\";\n}", "title": "" }, { "docid": "34fc2ecc5d7e1ef1af65cde8cd85df09", "score": "0.6377766", "text": "function setCookie(cname, cvalue, exdays) {\n var d = new Date();\n d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));\n var expires = \"expires=\"+d.toUTCString();\n document.cookie = cname + \"=\" + cvalue + \";\" + expires + \";path=/\";\n}", "title": "" }, { "docid": "64dddc38609023ba6c80459b5e82a01b", "score": "0.63718647", "text": "function setCookie(name,value,days) {\n var expires = \"\";\n if (days) {\n var date = new Date();\n date.setTime(date.getTime() + (days*24*60*60*1000));\n expires = \"; expires=\" + date.toUTCString();\n }\n document.cookie = name + \"=\" + (value || \"\") + expires + \"; path=/\";\n}", "title": "" }, { "docid": "64dddc38609023ba6c80459b5e82a01b", "score": "0.63718647", "text": "function setCookie(name,value,days) {\n var expires = \"\";\n if (days) {\n var date = new Date();\n date.setTime(date.getTime() + (days*24*60*60*1000));\n expires = \"; expires=\" + date.toUTCString();\n }\n document.cookie = name + \"=\" + (value || \"\") + expires + \"; path=/\";\n}", "title": "" }, { "docid": "d067ca2caab05c586f75cc40fe294390", "score": "0.6367345", "text": "function trialFinished() {\n setCookie(\"totalTime\", logger.totalElapsed);\n setCookie(\"totalScored\", totalScored);\n setCookie(\"numBadMistakes\", numBadMistakes);\n // Browse to the finish page\n window.location = \"finish.html\"; \n}", "title": "" }, { "docid": "60d4d3c6c6bb4490c293bc89917a8d08", "score": "0.63618946", "text": "function setCookie (name, value, lifespan, access_path) {\r\n var cookietext = name + \"=\" + escape(value) \r\n if (lifespan != null) { \r\n var today=new Date() \r\n var expiredate = new Date() \r\n expiredate.setTime(today.getTime() + 1000*60*60*24*lifespan)\r\n cookietext += \"; expires=\" + expiredate.toGMTString()\r\n }\r\n if (access_path != null) { \r\n cookietext += \"; PATH=\"+access_path \r\n }\r\n document.cookie = cookietext \r\n return null \r\n}", "title": "" }, { "docid": "8ec905597e825fceae6f411343da2f52", "score": "0.6361404", "text": "function setCookie(name, value, days) {\n var expires = \"\";\n if (days) {\n var date = new Date();\n date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));\n expires = \"; expires=\" + date.toUTCString();\n }\n document.cookie = name + \"=\" + (value || \"\") + expires + \"; path=/\";\n}", "title": "" }, { "docid": "8ec905597e825fceae6f411343da2f52", "score": "0.6361404", "text": "function setCookie(name, value, days) {\n var expires = \"\";\n if (days) {\n var date = new Date();\n date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));\n expires = \"; expires=\" + date.toUTCString();\n }\n document.cookie = name + \"=\" + (value || \"\") + expires + \"; path=/\";\n}", "title": "" }, { "docid": "8ec905597e825fceae6f411343da2f52", "score": "0.6361404", "text": "function setCookie(name, value, days) {\n var expires = \"\";\n if (days) {\n var date = new Date();\n date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));\n expires = \"; expires=\" + date.toUTCString();\n }\n document.cookie = name + \"=\" + (value || \"\") + expires + \"; path=/\";\n}", "title": "" }, { "docid": "ed2f94b3e745f56fe8d02233f5728960", "score": "0.63608426", "text": "function setCookie(cname, cvalue, exdays) {\n var d = new Date();\n d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1000);\n var expires = 'expires=' + d.toGMTString();\n document.cookie = cname + '=' + cvalue + ';' + expires + ';path=/';\n}", "title": "" }, { "docid": "f48f618e0e0afe721abb7b8a87005126", "score": "0.6357177", "text": "function setCookie(cName, cValue, cExpireDay) {\r\n var expireDate = new Date(),\r\n cValue = escape(cValue);;\r\n expireDate.setDate(expireDate.getDate() + cExpireDay);\r\n \r\n // write cookie\r\n d.cookie = cName + \"=\" + cValue + \";domain=.startpage.com;path=/\";\r\n \r\n // reload page, to load the settings\r\n d.location.reload(true);\r\n}", "title": "" }, { "docid": "e8d99f090a4a789f59b0c3e21a01eb64", "score": "0.63560903", "text": "function setCookie(name, value, duration) {\r\n\tvar d = new Date();\r\n\td.setTime(d.getTime() + (duration*24*60*60*1000));\r\n\tvar expires = \"expires=\" + d.toUTCString();\r\n\tdocument.cookie = name + \"=\" + value + \"; \" + expires;\r\n}", "title": "" }, { "docid": "3aec663c4d87dd38758d10a5bfd790a9", "score": "0.63546693", "text": "function setCookie(cname, cvalue, exdays) {\n let date = new Date();\n date.setTime(date.getTime() + exdays * 24 * 60 * 60 * 1000);\n let expires = \"expires=\" + date.toUTCString();\n document.cookie = cname + \"=\" + cvalue + \";\" + expires + \";path=/\";\n }", "title": "" }, { "docid": "f2b80a032d43d64dd8756a01a43d517f", "score": "0.63537425", "text": "function setCookie(cname, cvalue, exdays) {\n var d = new Date();\n d.setTime(d.getTime() + (exdays*24*60*60*1000));\n var expires = \"expires=\"+ d.toUTCString();\n document.cookie = cname + \"=\" + cvalue + \";\" + expires + \";path=/\";\n}", "title": "" }, { "docid": "f2b80a032d43d64dd8756a01a43d517f", "score": "0.63537425", "text": "function setCookie(cname, cvalue, exdays) {\n var d = new Date();\n d.setTime(d.getTime() + (exdays*24*60*60*1000));\n var expires = \"expires=\"+ d.toUTCString();\n document.cookie = cname + \"=\" + cvalue + \";\" + expires + \";path=/\";\n}", "title": "" }, { "docid": "bf795308c1a9e7d5e2502b5fd59a0e3a", "score": "0.63425666", "text": "function OUT () {\n const nickname = getCookie()\n const login = false\n const now = new Date()\n now.setDate(now.getDate() + 0)\n setCookie(nickname, login, now)\n window.parent.location = 'index.html'\n}", "title": "" }, { "docid": "c41e807abe15ef2a3da9337395e1f2fd", "score": "0.6335684", "text": "function SetCookie(cname, cvalue, exdays)\n{\n\tvar d = new Date();\n\td.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));\n\tvar expires = \"expires=\" + d.toUTCString();\n\tdocument.cookie = cname + \"=\" + cvalue + \";\" + expires + \";path=/\";\n}", "title": "" }, { "docid": "4031818846092c6afc743224c8e09966", "score": "0.633558", "text": "function logOut()\n{\n\t// same as startUp\n\tstartUp();\n\t// reset values\n\tjavascript:location.reload(true);\n}", "title": "" }, { "docid": "73dadd144c9abe3ff162ea5a2dad2184", "score": "0.63298714", "text": "function updateCookie(e){\n e.preventDefault();\n\n CookieManager.set( 'demoCookie', 'cookie modified', 60 );\n}", "title": "" }, { "docid": "b002db7e8b5dd446759a497ed7e24991", "score": "0.63262504", "text": "function setCookie(cname, cvalue, exdays) {\n exdays = exdays || 1;\n var d = new Date();\n d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));\n var expires = \"expires=\"+d.toUTCString();\n document.cookie = cname + \"=\" + cvalue + \";\" + expires + \";path=/\";\n}", "title": "" }, { "docid": "8d4a6c30168f73c294bcf9d5297f58d5", "score": "0.63110083", "text": "function setCookie(cname,cvalue,exdays) \n\t{\n\t\tremoveCookie(cname);\n\t\tvar d = new Date();\n\t\td.setTime(d.getTime() + (exdays*60*60*1000));\n\t\tvar expires = \"expires=\" + d.toGMTString();\n\t\tdocument.cookie = cname+\"=\"+cvalue+\"; \"+expires;\n\t}", "title": "" }, { "docid": "f333aea12f3578af75104ac05cc9f08b", "score": "0.62979865", "text": "function writeCookie(name,value,days) {\n var date, expires;\n if (days) {\n date = new Date();\n date.setTime(date.getTime()+(days*24*60*60*1000));\n expires = \"; expires=\" + date.toGMTString();\n } \n else {\n expires = \"\";\n }\n document.cookie = name + \"=\" + value + expires + \"; path=/\";\n}", "title": "" }, { "docid": "135eeb699eaba78185c6206a6b2dd7fa", "score": "0.6297651", "text": "function setCookie(cookiename,value){\r\n var exp = new Date();\r\n exp.setTime(exp.getTime() + 3*60*60*1000);\r\n document.cookie = cookiename + \"=\"+ escape (value) + \"; path=/; expires=\" + exp.toGMTString();\r\n }", "title": "" }, { "docid": "695eb09e35c12403aeb1aeacdeb8e9ed", "score": "0.6296629", "text": "function setCookie(cname, cvalue, days) {\n var dt, expires;\n if (days) {\n dt = new Date();\n dt.setTime(dt.getTime() + (days*24*60*60*1000));\n expires = \"; expires = \" + dt.toGMTString();\n }\n else {\n expires = '';\n }\n\n document.cookie = cname + \"=\" + cvalue + \"; path=/\" + expires;\n}", "title": "" } ]
a3900e9b649a79b1c2671d4b205f2789
FUNCTIONS Clear All the data in the input fields when this function is called
[ { "docid": "08253366c9e66f56c3995651f717c936", "score": "0.0", "text": "function clear(form,sub){\r\n $(form +\" :input\").each(function () {\r\n $(this).val(\"\");\r\n $(sub).val(\"Appeal\");\r\n }); \r\n}", "title": "" } ]
[ { "docid": "db5268aba6f7eb3dad2e605a602b0cb3", "score": "0.8551637", "text": "function clearFields() {\n input.value = \"\";\n}", "title": "" }, { "docid": "401d2b76fb98910af704a4fe1846f107", "score": "0.8190909", "text": "function clearInputs() {\n productName.value = \"\";\n productCategory.value = \"\";\n productPrice.value = \"\";\n productDesc.value = \"\";\n}", "title": "" }, { "docid": "c0bfe8136a4f8849991ab600e95714e0", "score": "0.81817126", "text": "function clearfields() {\n nameField.value = \"\";\n phoneField.value = \"\";\n emailField.value = \"\";\n textField.value = \"\";\n}", "title": "" }, { "docid": "c44077296dfd48acfbe7a79e50a0d7ab", "score": "0.8166858", "text": "function clear(){\nnameInput.value=\"\"; \npriceInput.value=\"\";\ncateInput.value=\"\"; \ndescInput.value=\"\"; \n}", "title": "" }, { "docid": "91535f9a817afbbd3f2acf40d3878b1b", "score": "0.81597865", "text": "function clearAllInputValues()\n\t{\n\t\tsetInputBusinessUnitValue(\"\");\n\t\tsetInputFarmValue(\"\");\n\t\tsetInputProductValue(\"\");\n\t\tsetInputCropValue(\"\");\n\t\tsetInputOptionTypeValue(\"\");\n\t\tsetInputPersentageValue(\"\");\n\t\tsetInputLandNumberValue(\"\");\n\t\tsetInputCultivarValue(\"\");\n\t\tsetInputAreaValue(\"\");\n\t\tsetInputYieldValue(\"\");\n\t\tsetInputPriceValue(\"\");\n\n\t\tallValuesEntered = false;\n\t}", "title": "" }, { "docid": "c5fb847d7556724b4a6e644c3aa3e213", "score": "0.8141976", "text": "function clearInputs() {\n cardioNameInput.value = \"\";\n nameInput.value = \"\";\n setsInput.value = \"\";\n distanceInput.value = \"\";\n durationInput.value = \"\";\n repsInput.value = \"\";\n resistanceDurationInput.value = \"\";\n weightInput.value = \"\";\n}", "title": "" }, { "docid": "4ae1fc1752a25c91062541fe8ee2743f", "score": "0.81141955", "text": "function clearInputFields() {\r\n $(\"#trainName\").val(\"\");\r\n $(\"#destination\").val(\"\");\r\n $(\"#firstTrain\").val(\"\");\r\n $(\"#frequencyMins\").val(\"\");\r\n}", "title": "" }, { "docid": "1f1c4ba64e0fdb57e07d75234f3b070f", "score": "0.8106151", "text": "function clearInputs() {\n\tdisplayName.value = \"\";\n\temail.value = \"\";\n\tphone.value = \"\";\n\tzipcode.value = \"\";\n\tpassword.value = \"\";\n\tpasswordConfirmation.value = \"\";\n}", "title": "" }, { "docid": "7c4dfcf1582cd13cae3f91c854aa2f41", "score": "0.80848503", "text": "function ClearFields() { }", "title": "" }, { "docid": "bf27e86114283b822ed59c26bbe2392c", "score": "0.8060022", "text": "static clearFields() {\n document.getElementById(\"title\").value = \"\";\n document.getElementById(\"author\").value = \"\";\n document.getElementById(\"isbn\").value = \"\";\n document.getElementById(\"date\").value = \"\";\n }", "title": "" }, { "docid": "f59e23337cdd3eab9f4aa084279fa94a", "score": "0.8057337", "text": "function clear() {\n inputForm.forEach((input) => {\n input.value = '';\n });\n}", "title": "" }, { "docid": "4e8a6ac73a30a3d583d9febac31349bb", "score": "0.7991533", "text": "clearFields() {\n // Ja tinhamos recuperado os campos nessas propriedades\n Form.description.value = \"\";\n Form.amount.value = \"\";\n Form.date.value = \"\";\n }", "title": "" }, { "docid": "fc46e98707272133c0ce847aa93f1e25", "score": "0.79768753", "text": "function clearInput() {\n $(\"#train-name-input\").val(\"\");\n $(\"#destination-input\").val(\"\");\n $(\"#first-train-input\").val(\"\");\n $(\"#frequency-input\").val(\"\");\n }", "title": "" }, { "docid": "6e708502ca02834d7687e51e1bb6c36d", "score": "0.79729474", "text": "function ClearFields() {\n $(':input').each(function () {\n\n if (this.type == 'text' || this.type == 'textarea' || this.type == 'file' || this.type == 'hidden') {\n this.value = '';\n }\n else if (this.type == 'radio' || this.type == 'checkbox') {\n this.checked = false;\n }\n else if (this.type == 'select-one' || this.type == 'select-multiple') {\n this.value = '-1';\n }\n });\n\n}", "title": "" }, { "docid": "3225eebf4bd686cfaa80ca331d36c0e7", "score": "0.79626477", "text": "function clearInputs(){\n $('input').val('');\n}", "title": "" }, { "docid": "35fbf225751e344da36fe293f280ebe4", "score": "0.7939805", "text": "function clearFields() {\n $('#inputFirstName').val('');\n $('#inputLastName').val('');\n $('#inputPhoneNumber').val('');\n $('#inputStreet').val('');\n $('#inputCity').val('');\n $('#inputState').val('');\n $('#inputPhoneNumber2').val('');\n $('#inputStreet2').val('');\n $('#inputCity2').val('');\n $('#inputState2').val('');\n $('#phone2').remove();\n $('#address2').remove();\n phoneAddressFields[0] = 1;\n phoneAddressFields[1] = 1;\n }", "title": "" }, { "docid": "ff41d6930584a8b960455f11ae5d3e70", "score": "0.79350525", "text": "function clearField(input) {\n input.value = '';\n}", "title": "" }, { "docid": "746ea135ad1702f35a710b78bfc3de6f", "score": "0.7934188", "text": "function clearFormInput() {\n document.getElementById(\"trainName-input\").value = \"\";\n document.getElementById(\"destination-input\").value = \"\";\n document.getElementById(\"firstTime-input\").value = \"\";\n document.getElementById(\"frequency-input\").value = \"\";\n }", "title": "" }, { "docid": "88285047ae4241704efb899f2e3118b8", "score": "0.7914175", "text": "function clearForm() {\n IDs.nameID.value = null;\n IDs.emailID.value = null;\n IDs.phoneID.value = null;\n IDs.messageID.value = null;\n }", "title": "" }, { "docid": "7f90343f8e4656064af884216bacda34", "score": "0.7913889", "text": "function clearInputs () {\n $('#fNameInput').val('');\n $('#lNameInput').val('');\n $('#idInput').val('');\n $('#titleInput').val('');\n $('#salaryInput').val('');\n}", "title": "" }, { "docid": "cf162edb23e0b07cbeb018118da936fe", "score": "0.789773", "text": "function clearInputs() {\n for (var i = 0; i < arguments.length; i++) {\n arguments[i].val(\"\");\n }\n }", "title": "" }, { "docid": "b3db587c6bc0c387faa81be594d7dfe1", "score": "0.7896689", "text": "function clear(){\n for (var i = 0; i < inputs.length; i++) {\n inputs[i].value='';\n }\n}", "title": "" }, { "docid": "61fe93325390c72cbd3cc39e7a6d3309", "score": "0.7894469", "text": "function clearFields(){\n $(\".form-control\").val(\"\");\n }", "title": "" }, { "docid": "8b1ca1a066188da7ea2576baf79af873", "score": "0.78906584", "text": "static clearfield()\r\n {\r\n document.querySelector('#title').value='';\r\n document.querySelector('#author').value='';\r\n document.querySelector('#isbn').value='';\r\n }", "title": "" }, { "docid": "d2425af2450e99823e28d62fd76590f2", "score": "0.7889211", "text": "function clearFields()\n\t{\n\tclearInputs();\n\tclearOutputs();\n\n\t}", "title": "" }, { "docid": "68750324c6e911a019fdd29440a76f58", "score": "0.7887145", "text": "clearFields(){\n this.titleInput.value = '';\n this.bodyInput.value = '';\n this.idInput.value = '';\n }", "title": "" }, { "docid": "05a372e7d821dd5695385c7c9d7f8eeb", "score": "0.7880658", "text": "static clearFields(){\n document.querySelector(`#title`).value = '';\n document.querySelector(`#author`).value = '';\n document.querySelector(`#isbn`).value = '';\n }", "title": "" }, { "docid": "3300dceaaae9fc770be39cf8fa00fa11", "score": "0.7867685", "text": "function ClearFields() {\r\n self.model.code = \"\";\r\n self.model.name = \"\";\r\n self.model.address = \"\";\r\n }", "title": "" }, { "docid": "9125cffd03f9e7bf4a9d5fbc88e0dab0", "score": "0.78629863", "text": "function clearInput() {\n // Resets validation and removes any error messages. \n $(\"#frm\").validate().resetForm();\n $(\"#userInfo\").html(\"\");\n\n // Clears all text fields. \n for (var i = 0; i < names.length; i++) {\n frm[names[i] + \"Int\"].value = \"\";\n }\n}", "title": "" }, { "docid": "3174b0ade4d9d910531071d7980313a3", "score": "0.7849657", "text": "function clearInput() {\n resetHintTextboxes();\n if(getCurrentPane() == \"input\") {\n var form = document.forms[\"inputform\"];\n form.src_date.value = todayString();\n form.src_date.focus();\n form.src_apid.value = 0;\n form.dst_apid.value = 0;\n form.dst_days.value = \"\";\n clearTimes();\n $('duration').value = \"\";\n $('duration').style.color = \"#000\";\n $('distance').value = \"\";\n $('distance').style.color = \"#000\";\n form.number.value = \"\";\n form.airlineid.value = 0;\n form.seat.value = \"\";\n form.seat_type.selectedIndex = 0;\n form.mode.selectedIndex = 0;\n changeMode(\"F\");\n form.plane_id.value = \"\";\n form.registration.value = \"\";\n form.note.value = \"\";\n if(form.trips) form.trips.selectedIndex = 0;\n } else {\n var form = document.forms[\"multiinputform\"];\n for(i = 0; i < multiinput_ids.length; i++) {\n $(multiinput_ids[i]).value = 0;\n }\n form.src_date1.value = todayString();\n form.src_ap1.focus();\n form.src_ap1.style.color = '#000000';\n }\n unmarkAirports();\n setCommitAllowed(false);\n}", "title": "" }, { "docid": "0125989ea436ac73041d29ad8613df31", "score": "0.78345805", "text": "function clearInput(){\n\n $(\"#name-input\").val(\"\");\n $(\"#email-input\").val(\"\");\n $(\"#zipcode-input\").val(\"\");\n $(\"#interests-input\").val(\"\");\n\n}", "title": "" }, { "docid": "e0486c40c7aabbab71b17bcc5a9f336b", "score": "0.7833406", "text": "function clearFields() {\n document.getElementById('make').value = '';\n document.getElementById('model').value = '';\n document.getElementById('caliber').value = '';\n document.getElementById('price').value = '';\n document.getElementById('color').value = '';\n document.getElementById('newGun').checked = false;\n document.getElementById('purchased').checked = false;\n document.getElementById('owner').value = '';\n}", "title": "" }, { "docid": "360e09b11ab4b8961c42d7afa040b95f", "score": "0.7832314", "text": "function clearInput() {\n $('#actionItemIn').val(''),\n $('#levelOfImportanceIn').val(''),\n $('#deadlineIn').val(''),\n $('#completeIn').val(''),\n $('#additionalNotesIn').val('')\n}", "title": "" }, { "docid": "e7032bab479d06fc2f432e93d2c60fb9", "score": "0.78287446", "text": "function clearInputs(){\r\n document.getElementById(\"petName\").value=\"\";\r\n document.getElementById(\"petAge\").value=\"\";\r\n document.getElementById(\"petGender\").value=\"\";\r\n document.getElementById(\"petBreed\").value=\"\";\r\n document.getElementById(\"petService\").value=\"\";\r\n document.getElementById(\"ownerName\").value=\"\";\r\n document.getElementById(\"contactPhone\").value=\"\";\r\n \r\n}", "title": "" }, { "docid": "627dcb2505097047490bcc0d0bc67e68", "score": "0.7827685", "text": "function clearInputs() {\n $('#in-first-name').val('');\n $('#in-last-name').val('');\n $('#in-id-num').val('');\n $('#in-job-title').val('');\n $('#in-salary').val('');\n}// end clearInputs", "title": "" }, { "docid": "628720a5ff6518c0ba78cac116b087ee", "score": "0.7812378", "text": "function clearAll() {\n document.querySelector('#name').value = ''\n document.querySelector('#price').value = ''\n document.querySelector('#desc').value = ''\n document.querySelector('#color').value = ''\n document.querySelector('#url').value = ''\n}", "title": "" }, { "docid": "f4c6e0618e13caa8511c39927442545c", "score": "0.78053033", "text": "function clearFields() {\n\t//$(\"output\").html(\"\");\n\t$(\"plotSpace\").html(\"\");\n\tvar f = document.forms[\"whiskey\"];\n\tf.elements[\"Cost\"].value=\"\";\n\tf.elements[\"Name\"].value=\"\";\n\tf.elements[\"Brand\"].value=\"\";\n\tf.elements[\"Vintage\"].value=\"\";\n\tf.elements[\"Type\"].value=\"\";\n\tf.elements[\"Country\"].value=\"\";\n\tf.elements[\"BottleNumber\"].value=\"\";\n\n}", "title": "" }, { "docid": "58ad82d161c7911d295f982a54a05477", "score": "0.7800585", "text": "function clearFields(){\n\telByID(\"title\").value = \"\";\n\telByID(\"description\").value = \"\";\n\telByID(\"meetingDate\").value = \"\";\n\telByID(\"startTime\").value = \"\";\n\telByID(\"endTime\").value = \"\";\n}", "title": "" }, { "docid": "888ac324a3c10502b548d634d3b190a5", "score": "0.7798192", "text": "function clearValue(){\n inputField.value = \"\"\n}", "title": "" }, { "docid": "a1f7b94c545ebf69a155a9a933a9c531", "score": "0.778979", "text": "function clearInput() {\n $('.js-first-name').val('');\n $('.js-last-name').val('');\n $('.js-id-number').val('');\n $('.js-title').val('');\n $('.js-salary').val('');\n} // end clearInput function", "title": "" }, { "docid": "cf132314f20b31d84001216db8d600ff", "score": "0.77671725", "text": "function clearForm(){\n for(var i=0;i<inputs.length;i++){\n inputs[i].value=\"\"\n }\n \n }", "title": "" }, { "docid": "d7392721c92daa98fe3cfde97628a82b", "score": "0.77632093", "text": "function clearFeildValues() {\n\t$('#lead-title').val('');\n\t$('#lead-propertyInfo').val('');\n \t$('#lead-category').val('');\n \t$('#lead-type').val('');\n}", "title": "" }, { "docid": "627be2aa3ba28b9dc308541075f22ffc", "score": "0.77539927", "text": "function clearFields(){\n firstNumber.value = \"\";\n secondNumber.value = \"\";\n}", "title": "" }, { "docid": "1053316f185d6a9eb543ec4f0bd50a3b", "score": "0.77489805", "text": "function clear_form_data() {\n $(\"#account_uuid\").val(\"\");\n $(\"#account_owner\").val(\"\");\n $(\"#account_account_type\").val(\"\");\n $(\"#account_institution_id\").val(\"\");\n $(\"#account_balance\").val(\"\");\n $(\"#account_status\").val(\"\");\n }", "title": "" }, { "docid": "a56a7f13627bdf08da2c63aae07d4ce7", "score": "0.7743633", "text": "function clearInput() {\n firstName.value = \"\";\n lastName.value = \"\";\n email.value = \"\";\n password.value = \"\";\n}", "title": "" }, { "docid": "5750605080da181ee4a1a0ba9602aa64", "score": "0.7739799", "text": "function clearFields()\n{\n document.getElementById('cityName').value = \"\";\n document.getElementById('stateName').value = \"\";\n}", "title": "" }, { "docid": "75f446e1c8819d9475d114dc52c4c19c", "score": "0.7736324", "text": "clearFields() {\n this.titleInput.value = \"\";\n this.bodyInput.value = \"\";\n }", "title": "" }, { "docid": "7492a955de278ad0393cadea11f6f0a4", "score": "0.77307177", "text": "function clearInputs() {\n $('.inputs input').val('');\n}", "title": "" }, { "docid": "1674713c86bc3c53c515d2faa6b1c997", "score": "0.7727729", "text": "function clearInputs () {\n document.getElementById('nm').value = \"\"\n document.getElementById('pr').value = \"\"\n document.getElementById('em').value = \"\"\n document.getElementById('ad').value = \"\"\n document.getElementById('ph').value = \"\"\n document.getElementById('ps').value = \"\"\n document.getElementById('gender').value = \"\"\n document.getElementById('br').value = \"\"\n }", "title": "" }, { "docid": "e35a0e5f1f16316ea1dee9b673b46d55", "score": "0.7726777", "text": "function clearFields(){\n document.querySelector(\"#title\").value = \"\";\n document.querySelector(\"#author\").value = \"\";\n document.querySelector(\"#isbn\").value = \"\";\n}", "title": "" }, { "docid": "7dba42572c071af5e96ead8ba0c9d287", "score": "0.7719605", "text": "function clearContents() {\n nameInputOne.value = '', nameInputTwo.value = '', guessInputOne.value = '', guessInputTwo.value = '', clearButton.disabled = true, submitButton.disabled = true;\n}", "title": "" }, { "docid": "bb5dafb104e2af575048fa687e80e6b2", "score": "0.7718932", "text": "clear() {\n this._fields.get('name').value = '';\n this._fields.get('email').value = '';\n this._fields.get('newPassword').value = '';\n this._fields.get('newPasswordRepeat').value = '';\n this._fields.get('currentPassword').value = '';\n }", "title": "" }, { "docid": "490e897a0b543bdb7cb51dbcf2073327", "score": "0.77143276", "text": "function clearFields() {\n vendorNameText.val(\"\");\n }", "title": "" }, { "docid": "1a97dd832d8c296e4c32d496211e0080", "score": "0.77111894", "text": "function clearAll() {\n form.ans.value = '';\n}", "title": "" }, { "docid": "37bd82d5f83353a97a29b9820f237f2b", "score": "0.7709875", "text": "function clearForm() {\n const blankState = Object.fromEntries(Object.entries(inputs).map(([key, value]) => [key, '']));\n return setInputs(blankState);\n }", "title": "" }, { "docid": "c1a37c79f353022d1ffb9b897fab9515", "score": "0.77093834", "text": "function limparInputs(){\n\t$(\"input\").val(\"\");\n}", "title": "" }, { "docid": "ab3205c8e9d124da6682f781cf6ac13d", "score": "0.7706001", "text": "function resetAllInputs() {\n nameInput.value = '';\n carInput.value = '';\n phoneInput.value = '';\n cnicInput.value = '';\n}", "title": "" }, { "docid": "d99fdbe1a0093f929113400150152973", "score": "0.77057654", "text": "static clearFields(){\n document.getElementById(`title`).value = ``;\n document.getElementById(`instructor`).value = ``;\n document.getElementById(`price`).value = ``;\n document.getElementById(`description`).value = ``;\n }", "title": "" }, { "docid": "0bfb8f61edd7acdc7a449895125028ac", "score": "0.76830715", "text": "function clearText()\n {\n $(\"#input-train-name\").val(\"\");\n $(\"#input-train-destination\").val(\"\");\n $(\"#input-first-train\").val(\"\"); \n $(\"#input-frequency\").val(\"\");\n\n }", "title": "" }, { "docid": "e40f7ce8f7637f17a23d6e05a22024e7", "score": "0.7675415", "text": "function clearField(){\n inputSearchLocation.value = '';\n}", "title": "" }, { "docid": "1bbc7afbcd20ee0b623ad15424c8e177", "score": "0.76727074", "text": "function clearInputs()\n\t{\n\t$(\"#search_string\").val('');\n\t$(\"#maxItems\").val('');\n\t}", "title": "" }, { "docid": "ab0ba919027df642b7e1b03b02f86f0c", "score": "0.7665033", "text": "function clear() {\r\n document.getElementById(\"input\").value = null;\r\n }", "title": "" }, { "docid": "5300364595a00853b3ee87f7f964756f", "score": "0.7663984", "text": "function ClearData() {\n $('#WarehouseId').val('0');\n $('#txtName').val('');\n $('#txtDescription').val('');\n $('#txtNotes').val('');\n $('#txtAddress').val('');\n $('#txtCity').val('');\n $('#txtPostCode').val('');\n $('#txtContactNo').val('');\n\n //$.uniform.update(\n // $('#chkIsActive').attr(\"checked\", true)\n // );\n $('#btnSave').val('Save');\n }", "title": "" }, { "docid": "236524cbdd0593fb663b0352d57ddd1d", "score": "0.7662647", "text": "function clearField() {\n document.querySelector(\"#isbn\").value = '';\n document.querySelector(\"#bookTitle\").value = '';\n document.querySelector(\"#overdueFee\").value = '';\n document.querySelector(\"#publisher\").value = '';\n document.querySelector(\"#dateOfPublished\").value = '';\n}", "title": "" }, { "docid": "968488b0717cb9e1acc94369d8563822", "score": "0.76615536", "text": "function clearData() {\n\tvar input_tags = $('input');\n\tfor(i=0; i<input_tags.length; i++) {\n\t\t$(input_tags)[i].value = '';\n\t}\n\t$('#product-display-image').prop('src', '/~jadrn035/proj1/images/default-product.png');\n\t$('textarea').val('');\n\t$('label[for=\"product-image\"]').text('Choose Product Image');\n\t$('#category option:eq(0)').prop('selected', true);\n\t$('#vendor option:eq(0)').prop('selected', true);\n\t$('#desc-char-count').text('Character limit: 300');\n\t$('#feat-char-count').text('Character limit: 700');\n\tclearErrors();\n\tdisableSubmit();\n}", "title": "" }, { "docid": "51ccfd1bd6ad79d7d9af273d8802a25e", "score": "0.7654186", "text": "static clearFields() {\n document.querySelector('#task').value = '';\n document.querySelector('#description').value = '';\n document.querySelector('#status').value = '';\n document.querySelector('#date-started').value = '';\n document.querySelector('#date-ended').value = '';\n }", "title": "" }, { "docid": "a2c5879d7208f8a347779d755e2c8cfc", "score": "0.7653423", "text": "function clearField() {\r\n document.querySelector(\"#isbn\").value = '';\r\n document.querySelector(\"#bookTitle\").value = '';\r\n document.querySelector(\"#overdueFee\").value = '';\r\n document.querySelector(\"#publisher\").value = '';\r\n document.querySelector(\"#dateOfPublished\").value = '';\r\n}", "title": "" }, { "docid": "07e628181c3b7ef92341c24a57feb9b7", "score": "0.7652505", "text": "function clearFom(){\r\n var frm = document.querySelectorAll(\".entryfields\");\r\n for (var i in frm){\r\n frm[i].value = '';\r\n }\r\n }", "title": "" }, { "docid": "ffc5f52773e08f217111e3123924c8c9", "score": "0.7652041", "text": "function clearValues(){\n document.getElementById('name').value = '';\n document.getElementById('author').value = '';\n document.getElementById('pages').value = '';\n}", "title": "" }, { "docid": "5ee2b07be8813be5aeb88c87c0c3c790", "score": "0.76478356", "text": "function clearData(){\n $('.inputNumbers').text(\"\");\n\n }", "title": "" }, { "docid": "ce6bb1c898edea917a9d9e97b6b36400", "score": "0.7647734", "text": "clearElements(){\n document.getElementById('title').value = '',\n document.getElementById('author').value = '',\n document.getElementById('isbn').value = '';\n }", "title": "" }, { "docid": "81fe1185ec7d3308b35ed8dad439221b", "score": "0.76470524", "text": "function clearForm() {\n\t\t$('input').val('');\n\t}", "title": "" }, { "docid": "25ea6df7d236b83fcb1be143781728df", "score": "0.76403135", "text": "function clearInputs() {\n fname.value = ''\n lname.value = ''\n studentId.value = ''\n studentSelected.checked = false\n}", "title": "" }, { "docid": "0dffec3d81c94feed9fc05ac5f64548d", "score": "0.7634374", "text": "function clearAll () {\n disabledInp.value = inp.value = '';\n}", "title": "" }, { "docid": "eeeb304a16748cad13b5af28317d52f6", "score": "0.76289475", "text": "function cleanInput() {\n inputPredios.value = \"\";\n inputLocais.value = \"\";\n}", "title": "" }, { "docid": "3f0819b155999a72906377d232518dce", "score": "0.7612398", "text": "clearFields() {\n\t\tdocument.querySelector('textarea[name=actionItem]').value = \"\";\n\t\tif (document.querySelector('input[type=checkbox][name=imp]:checked')) { document.querySelector('input[type=checkbox][name=imp]:checked').checked = false }\n\t\tif (document.querySelector('input[type=checkbox][name=urg]:checked')) { document.querySelector('input[type=checkbox][name=urg]:checked').checked = false; }\n\t\tdocument.getElementById('deadline').value = \"\"\n\t}", "title": "" }, { "docid": "bf5084ccdc58795bccdad9daf54591cc", "score": "0.7608039", "text": "function clear(){\n document.getElementById(\"txtCod\").value = \"\";\n document.getElementById(\"txtNom\").value = \"\";\n document.getElementById(\"txtApe\").value = \"\";\n document.getElementById(\"txtMate\").value = \"\";\n document.getElementById(\"txtNota\").value = \"\";\n\n}", "title": "" }, { "docid": "23794d082fbb9925abff40921ad31e96", "score": "0.7595965", "text": "function clearInputs() {\n\t\t$wordcontent.val('').focus();\n\t\t$translation.val('');\n\t\t$context.val('');\n\t}", "title": "" }, { "docid": "512e9a2e4d3b36772b7dfa5b217d0773", "score": "0.75904804", "text": "_resetInput() {\n let items = document.getElementsByClassName('inputValue_input');\n Array.prototype.forEach.call(items, function(i) {i.value = ''});\n }", "title": "" }, { "docid": "cc33cc4f36a1f457054e86993e8f9a16", "score": "0.7590439", "text": "clearFields() {\n document.getElementById(\"firstName\").value = \"\";\n document.getElementById(\"lastName\").value = \"\";\n document.getElementById(\"email\").value = \"\";\n }", "title": "" }, { "docid": "d4ae5a36334159c1f4657ded590317b8", "score": "0.75903744", "text": "function clearInputs(){\n $(\"#hashtagOne\").val('');\n $(\"#hashtagTwo\").val('');\n $(\"#hashtagThree\").val('');\n }", "title": "" }, { "docid": "d4ae5a36334159c1f4657ded590317b8", "score": "0.75903744", "text": "function clearInputs(){\n $(\"#hashtagOne\").val('');\n $(\"#hashtagTwo\").val('');\n $(\"#hashtagThree\").val('');\n }", "title": "" }, { "docid": "bbe898f22e9f7336f4fecce1a9031342", "score": "0.75865", "text": "function clearInputs() {\n $('#new-name').val('');\n $('#new-password').val('');\n $('#new-password-confirm').val('');\n $('#new-personnal-manager').prop('checked', false);\n $('#new-email').val('');\n }", "title": "" }, { "docid": "986a3d2e8999157bc643b61d1d4b2d34", "score": "0.7576685", "text": "function clearForm() {\n formDate.value = \"\";\n formConcept.value = \"\";\n formJournal.value = \"\";\n formMood.value = \"\";\n formEntryId.value = \"\";\n}", "title": "" }, { "docid": "959876dc084164e440554109ccbbf968", "score": "0.75759876", "text": "function clear() {\n document.getElementById('story').value = \"\";\n document.getElementById('Email').value = \"\";\n document.getElementById('to-name').value = \"\";\n document.getElementById('subject').value = \"\";\n }", "title": "" }, { "docid": "26f24c742d93aa0fff244e9757809a21", "score": "0.7575905", "text": "function clearTextBoxForm() {\n inputMarca = document.getElementById('marca');\n inputModelo = document.getElementById('modelo');\n inputPrecio = document.getElementById('precio');\n inputMarca.value = \"\";\n inputModelo.value = \"\";\n inputPrecio.value = \"\";\n }", "title": "" }, { "docid": "49b2a94feb7584b3a2501bc5340f59ad", "score": "0.75750136", "text": "function reset(){\n $('#input-title').val('');\n $('#input-description').val('');\n $('#ml-version').val('');\n $('#os-version').val('');\n $('#device-name').val('');\n }", "title": "" }, { "docid": "3a074c8f114a4355f919564f436b6cc7", "score": "0.7574189", "text": "clearInputs() {\n this.orderForm.customerPhone.value = '';\n this.orderForm.customerEmail.value = '';\n this.orderForm.customerName.value = '';\n }", "title": "" }, { "docid": "489fd170a1fc4e392f094046d6ef3fdd", "score": "0.75693995", "text": "function clear() {\n $(\"#valueOne\").val(\"\");\n $(\"#valueTwo\").val(\"\");\n resultOutput.empty();\n }", "title": "" }, { "docid": "957110fd72839a6e3269f91e650a5d5d", "score": "0.75646496", "text": "function clearSearchAreaTextBoxes() {\n searchAreaWkt.value = \"\";\n searchAreaJson.value = \"\";\n areaText.value = \"\";\n costText.value = \"\";\n}", "title": "" }, { "docid": "c33fb6b4a083192d7272a147cca3ac90", "score": "0.75628114", "text": "function clearInputs() {\n $(\"#title\").val(\"\");\n $(\"#description\").val(\"\");\n $(\"#category\").val(\"Choose one...\");\n $(\"#keyword1\").val(\"\");\n $(\"#keyword2\").val(\"\");\n $(\"#keyword3\").val(\"\");\n $(\"#videoLink\").val(\"\");\n }", "title": "" }, { "docid": "ccf99827633df7f74655ad74a32ef4b9", "score": "0.75626284", "text": "function clear(){\n input.value = \"\";\n}", "title": "" }, { "docid": "47aec8d38db4333239f4ff4850a6727b", "score": "0.75567746", "text": "function clearFields() {\n //delete the inputted files\n deleteFile()\n\n //reset the answer field to empty\n document.getElementById('ans').value = \"\";\n //set the topic dropdown to the default\n document.getElementById('select').value = 'General';\n\n //Grab all the questions to loop through \n let listOfQuestions = document.getElementsByClassName('questionInput')\n\n //loop through all the questions on the field\n for (let i = 0; i < listOfQuestions.length; i++) {\n if (i == 0) {\n //set the first question field to empty string\n listOfQuestions[i].value = \"\"\n } else {\n //set all the alternative questions to null\n listOfQuestions[i].value = null;\n }\n\n //only remove if theres more than one\n if (listOfQuestions.length != 1) {\n //remove the extra question fields\n removeQuestionField(listOfQuestions);\n }\n }\n }", "title": "" }, { "docid": "3fcfb09a9985c2b1e38dc8e38337d824", "score": "0.7556643", "text": "function clearInputs(){\n $(\"#tardy\").val(\"\");\n $(\"#onTime\").val(\"\");\n}", "title": "" }, { "docid": "7165f2d4ffd9480a9609845094af91a7", "score": "0.7554939", "text": "function clearInput () {\n document.querySelectorAll('input').forEach(inpt => {\n inpt.value = '';\n });\n}", "title": "" }, { "docid": "8ff9097b6a8c40222022907f0418ca71", "score": "0.755376", "text": "function clearForm() {\n\t$(\"#_point\").val(\"\");\n\t$(\"#_id\").val(\"\");\n\t$(\"#_name\").val(\"\");\n\t$(\"#_description\").val(\"\");\n}", "title": "" }, { "docid": "baf717522d56fd4b7085c2bc66530d7a", "score": "0.7546354", "text": "function clearForm() {\n $(\"#text-input\").val(\"\");\n $(\"#email-input\").val(\"\");\n $(\"#tel-input\").val(\"\");\n $(\"#date-input\").val(\"\");\n $(\"#time-input\").val(\"\");\n}", "title": "" }, { "docid": "967c7d686cc9f1b6117e9e9df8eab665", "score": "0.7538051", "text": "function clear_form_data() {\n $(\"#pet_name\").val(\"\");\n $(\"#pet_category\").val(\"\");\n $(\"#pet_available\").val(\"\");\n }", "title": "" }, { "docid": "7a1f8b4d55523a225309b872fb3bc1ab", "score": "0.75354904", "text": "function clear_form_data() {\n $(\"#inventory_item_sku\").val(\"\");\n $(\"#inventory_item_count\").val(\"\");\n $(\"#inventory_item_condition\").val(\"\");\n $(\"#inventory_item_restock_level\").val(\"\");\n $(\"#inventory_item_restock_amount\").val(\"\");\n $(\"#inventory_item_in_stock\").val(\"\");\n\n $(\"#flash_message\").empty();\n }", "title": "" }, { "docid": "541974b027398a4e4e8ab79543fe8af9", "score": "0.7535386", "text": "function acc_type_edit_clear()\n{\n document.getElementById('ass_bnk_type_code_ed').value=\"\";\n document.getElementById('bnk_acc_type_ed').value=\"\";\n document.getElementById('ban_acc_typ_desc_ed').value=\"\";\n \n \n}", "title": "" }, { "docid": "1c05245bc7883ef3c385e63ad1dd5e70", "score": "0.75295436", "text": "function clear() {\n let input = document.querySelectorAll('.form-group input');\n input.forEach(input => input.value = '');\n}", "title": "" } ]
1c430d0ab6bf7b1c7b2f2902d55285a5
update(inventory); save inventory to localStorage convert data type from array to string
[ { "docid": "4f5232c559bb88dbada0181f50748a22", "score": "0.7498497", "text": "function toStorage() {\n 'use strict';\n var i;\n invList = inventory.slice();\n for (i = 0; i < invList.length; i += 1) {\n invList[i] = invList[i].join('|');\n }\n invList = invList.join('\\n');\n\n localStorage.setItem(\"invList\", invList);\n storage = localStorage.getItem(\"invList\");\n return storage;\n}", "title": "" } ]
[ { "docid": "57427085acc6b770a3960d89b5990b9f", "score": "0.74898785", "text": "function getInventory()\r\n{\r\n let storage;\r\n let inventory;\r\n storage = localStorage.getItem('invList') || ''; \r\n if (storage.length > 0)\r\n {\r\n inventory = storage.split('|');//looks for | and reverses the join so makes it back to array\r\n for (i in inventory) \r\n {\r\n inventory[i] = inventory[i].split(',');//converted the nested strings back into 5 arrays\r\n }\r\n for (i in inventory)\r\n {\r\n inventory[i][0] = Number(inventory[i][0]);//converts strings with numbers into Number not a String\r\n inventory[i][2] = Number(inventory[i][2]);\r\n inventory[i][3] = Number(inventory[i][3]);\r\n }\r\n console.log(inventory);\r\n } \r\n else\r\n {\r\n inventory = [\r\n [123, 'collar', 1, 5.99],\r\n [456, 'leash', 2, 6.99], \r\n [789, 'bowl', 4, 3.99], \r\n [321, 'toy', 6, 1.99],\r\n [654, 'bone', 8, 2.99]\r\n ];\r\n }\r\n return inventory;\r\n}", "title": "" }, { "docid": "737d67f76805462ed96cf7568d014121", "score": "0.7047292", "text": "function updateStorage() {\n // convert our array of objects into a JSON string\n var jsonString = JSON.stringify(Product.allProducts);\n // add our converted array onto local storage\n localStorage.setItem('product', jsonString);\n}", "title": "" }, { "docid": "12989b83b77e6bb9f83b3f7ea961c85f", "score": "0.68962955", "text": "function saveItems() {\n if (localStorage) {\n //lijst omzetten naar json\n var oldItemsString = JSON.stringify(items);\n //json opslaan\n localStorage.setItem(localStorageKey, oldItemsString);\n }\n}", "title": "" }, { "docid": "d596ee1703e6e11bf11c0df92c93ecfc", "score": "0.68776745", "text": "function _updateLocalStorage() {\n localStorage[\"shoppingCart\"] = JSON.stringify(items);\n }", "title": "" }, { "docid": "73bc3eb3de0d039ed1a54969253b8c78", "score": "0.68414277", "text": "function stringyLocal() {\n let stringProducts = JSON.stringify(allProducts);\n localStorage.setItem('products', stringProducts);\n}", "title": "" }, { "docid": "ebd7f08242aad2461db1479ef1352974", "score": "0.6811488", "text": "function saveCartToLocalStorage() {\n localStorage.setItem('selections', JSON.stringify(CartItem.arrCartItem));\n}", "title": "" }, { "docid": "3eead638faf381c3bf4ba0311623b493", "score": "0.6786407", "text": "function PlayerSaveAllInventory() {\n\tPlayerSavedInventory = PlayerInventory.slice();\n}", "title": "" }, { "docid": "408b540d29a0050d0ad8fbf22752503c", "score": "0.676693", "text": "async cUpdate(){\r\n let eCart = JSON.stringify(cart.items);\r\n await localStorage.setItem(cart.ID, eCart);\r\n }", "title": "" }, { "docid": "935766635173aaf37b4d96a6a6d1dd35", "score": "0.672034", "text": "function putItemsInStorage (){\n let stringifiedArray = JSON.stringify(Product.allProducts);\n localStorage.setItem('product', stringifiedArray);\n}", "title": "" }, { "docid": "825c8e63146f0380cded9af8a66fa2eb", "score": "0.6718045", "text": "persistData() {\n localStorage.setItem('items', JSON.stringify(this.items)); // Convert 'items' array into a string as localStorage method needs to save as a string.\n }", "title": "" }, { "docid": "05a8d6122575305404c75e72bf073b23", "score": "0.67123", "text": "function writeToLS() {\n const newData = [];\n for (let item of items) {\n newData.push(item.toJSON());\n }\n localStorage.setItem(\"items\", JSON.stringify(newData));\n }", "title": "" }, { "docid": "acdd98081c9cbdc2c25658509a5a93d7", "score": "0.6694562", "text": "static saveProducts(products){\n localStorage .setItem(\"products\", JSON.stringify(products) ); //Accessing local storage. store(localStorage.setItem) \"products\" array as a string\n }", "title": "" }, { "docid": "ce6aae06cb0b6bc9a7d4d15bd9fbdb1a", "score": "0.66389966", "text": "function updatelocalstorage() {\r\n localStorage.setItem('transactions', JSON.stringify(transactions));\r\n}", "title": "" }, { "docid": "6dce66ff53c261d0b6a2919434096cc5", "score": "0.6605876", "text": "saveToLocalStorage() {\n\t\t\tvar json = JSON.stringify(angular.copy(this.items));\n\t\t\tlocalStorage.setItem(\"cart\", json);\n\t\t}", "title": "" }, { "docid": "a23478d2f813a6fdb557ae6738ad91aa", "score": "0.65838295", "text": "function updateLocalStorage() {\n localStorage.setItem('transactions', JSON.stringify(transactions));\n}", "title": "" }, { "docid": "f5657c099af09e6a838f944443885ed9", "score": "0.6571503", "text": "function updateLocalStorage() {\n localStorage.setItem(\"transactions\", JSON.stringify(transactions));\n}", "title": "" }, { "docid": "f5657c099af09e6a838f944443885ed9", "score": "0.6571503", "text": "function updateLocalStorage() {\n localStorage.setItem(\"transactions\", JSON.stringify(transactions));\n}", "title": "" }, { "docid": "b399e72363ed4310c5e0f7928a10341b", "score": "0.6565018", "text": "function storeProductLs(){\n var stringProducts = JSON.stringify(allProducts);\n localStorage.setItem('products', stringProducts);\n}", "title": "" }, { "docid": "82d00e0f1a899dd1401c9c23cf6342bc", "score": "0.6562332", "text": "function updateLocalCart(){\n localStorage.setItem('cartProducts', JSON.stringify(productsInCart))\n loadProducts();\n}", "title": "" }, { "docid": "62fe341a5d8c734674111d2dc9275406", "score": "0.65403974", "text": "function saveprodToLocalStorage() {//save the total number\n let stringObj = JSON.stringify(arrProd);\n localStorage.setItem('prod', stringObj);\n}", "title": "" }, { "docid": "6dffe851e8fa5db72b67682e739b5a7d", "score": "0.650939", "text": "function SavebetSlip(data) {\n if (localStorage.getItem('bets')) {\n local = JSON.parse(localStorage.getItem('bets'));\n local.push(data);\n } else {\n local = [data];\n }\n\n localStorage.setItem(\"bets\", JSON.stringify(local));\n ///console.log(local);\n return local;\n }", "title": "" }, { "docid": "c45531a49a30e4eac286e69f01c24217", "score": "0.64995486", "text": "function saveDataToLocal() {\r\n storage.setItem(\"fallList\", JSON.stringify(fallList));\r\n storage.setItem(\"winterList\", JSON.stringify(winterList));\r\n storage.setItem(\"springList\", JSON.stringify(springList));\r\n storage.setItem(\"summerList\", JSON.stringify(summerList));\r\n storage.setItem(\"isStorage\", \"1\");\r\n storage.setItem(\"fallTable\", JSON.stringify(fallTable));\r\n storage.setItem(\"winterTable\", JSON.stringify(winterTable));\r\n storage.setItem(\"springTable\", JSON.stringify(springTable));\r\n storage.setItem(\"summerTable\", JSON.stringify(summerTable));\r\n\r\n}", "title": "" }, { "docid": "62722b72acb9912e2084f554bf3c6f53", "score": "0.6488458", "text": "updateToLocalStorage() {\n let dataStringForm = JSON.stringify(this.eventArray);\n localStorage.setItem(\"data\", dataStringForm);\n }", "title": "" }, { "docid": "ebc1007cf9d602a18678b372d816cf98", "score": "0.6475867", "text": "function saveDataOnLocalStorage() {\r\n var packages = JSON.stringify(packageList);\r\n localStorage.localPackageList = packages;\r\n}", "title": "" }, { "docid": "0dec7c45ad48a196efb101161e97b314", "score": "0.6472112", "text": "function save_units() {\n\t/*var villagesArray = [];\n\n\t$(\"table#villagesTable tr\").not(\":first-child,:last-child\").each(function() {\n\t\tvar arrayOfThisRow = [];\n\t\tvar tableData = $(this).find('td').not(\":last-child\");\n\t\tif (tableData.length > 0) {\n\t\t\tarrayOfThisRow = {\n\t\t\t\tname: $(tableData[0]).children().text(), // access input of isAbandoned\n\t\t\t\tisAbandoned: $(tableData[1]).children().is(\":checked\"), // access input of isAbandoned\n\t\t\t\tcoords:[parseInt($(tableData[2]).text()), parseInt($(tableData[3]).text())]\n\t\t\t};\n\t\t\t//arrayOfThisRow['isAbandoned'] = $(tableData[0]).children().is(\":checked\"); // access input of isAbandoned\n\t\t\t//arrayOfThisRow['coords'] = [parseInt($(tableData[1]).text()), parseInt($(tableData[2]).text())];\n\t\t\tconsole.log(arrayOfThisRow);\n\t\t\tvillagesArray.push(arrayOfThisRow);\n\t\t}\n\t});\n\tconsole.log(villagesArray);*/\n\n\tvar unitsArray = [];\n\n\t$(\"table#unitsTable tr\").not(\":first-child,:last-child\").each(function() {\n\t\tvar arrayOfThisRow = [];\n\t\tvar tableData = $(this).find('td').not(\":first-child,:last-child\");\n\t\tconsole.log(tableData);\n\t\tif (tableData.length > 0) {\n\t\t\ttableData.each(function() { arrayOfThisRow.push(parseInt($(this).text())); });\n\t\t\tunitsArray.push(arrayOfThisRow);\n\t\t}\n\t});\n\n\tchrome.storage.sync.set({\n\t\t/*villagesArray: villagesArray,*/\n\t\tunitsArray: unitsArray\n\t}, showSuccessStatus());\n}", "title": "" }, { "docid": "afb0417f1a8179add76d7ddce82f6d00", "score": "0.6469363", "text": "function saveProductsLS() {\n const allInput = document.querySelectorAll('.product-item');\n allInput.forEach((item, i) => {\n itemValue[i] = item.value;\n });\n localStorage.setItem('products', productList.innerHTML);\n localStorage.setItem('productValue', itemValue);\n localStorage.setItem('position', itemPosition);\n localStorage.setItem('sound', btnSoundAndClear.innerHTML);\n }", "title": "" }, { "docid": "3a712f3de2263bdc0cb5ba1b161af04c", "score": "0.64673454", "text": "function updateLocalStorage() {\n localStorage.setItem('transactions',JSON.stringify(transactions))\n }", "title": "" }, { "docid": "0bab8ca762fa9296d064907a24bd327c", "score": "0.64649975", "text": "function setItemsILS() {\n\tlet stringedItems = JSON.stringify(itemsList)\n\tlocalStorage.setItem(\"items-list\", stringedItems)\n}", "title": "" }, { "docid": "a6eea63ef6b46034185f4a76c5d68888", "score": "0.6462617", "text": "function localStorData() {\n var userData = JSON.stringify(Product.all);\n localStorage.setItem('newData', userData);\n}", "title": "" }, { "docid": "442eb5e79c8e9ec23f715d724a581897", "score": "0.64571786", "text": "function setItemToLS(text) {\r\n items=getItemsFromLS();\r\n items.push(text);\r\n localStorage.setItem('items',JSON.stringify(items));\r\n}", "title": "" }, { "docid": "990cf24ba04561887c1cb6024a55e6bc", "score": "0.6453486", "text": "function storedVotes (){\nlet votesLocalstorge = JSON.stringify(arrayProduct);\nlocalStorage.setItem('localStoreVotes' , votesLocalstorge);\nconsole.log(votesLocalstorge);\n}", "title": "" }, { "docid": "568c27908e8948c8618c6ed416741415", "score": "0.6452228", "text": "function setLocalStore_Games() {\n localStorage.setItem('items', JSON.stringify(games));\n}", "title": "" }, { "docid": "f48dce677ce108614525484fe5ebd472", "score": "0.64411765", "text": "function fromStorage() {\n 'use strict';\n var i, j;\n invStorage = storage.split(',\\n').map(function (e) {\n return e.split('|');\n });\n\n for (i = 0; i < 5; i += 1) {\n for (j = 0; j < 4; j += 1) {\n if (isNaN(parseFloat(invStorage[i][j]))) {\n invStorage[i][j] = invStorage[i][j];\n } else {\n invStorage[i][j] = Number(invStorage[i][j]);\n }\n }\n }\n inventory = invStorage;\n return inventory;\n}", "title": "" }, { "docid": "11203b254663f7dcf32c56e8173dd7b8", "score": "0.6439326", "text": "function update_cart_storage(item) {\n chrome.storage.local.get([\"CartItem\"], function(ret){\n // Get the local version\n temp_arr = ret.CartItem\n // Append the item we want to add\n temp_arr.push(item)\n // Save it back\n chrome.storage.local.set({CartItem: temp_arr}, function(){})\n })\n \n}", "title": "" }, { "docid": "71eb6412c9c98bb9447caef61d94b7d7", "score": "0.6421416", "text": "function storeShipList()\n{\n let string = JSON.stringify(localList);\n\tlocalStorage.setItem(\"shipkey\", string);\n}", "title": "" }, { "docid": "bdc8d8100a1ce0ed1a3e24c984d475f4", "score": "0.64180773", "text": "updateStorage() {\n localStorage.setItem('productIds', JSON.stringify(this._productIds));\n localStorage.setItem('cart-date', new Date().toString());\n }", "title": "" }, { "docid": "3e599350f47d00df12b8ef4c78cd8c90", "score": "0.6411399", "text": "function storePlantInLocal(){\n\t\t\t\tif(localStorageService.isSupported) {\n\t\t\t\t\tconsole.log(\"SVC storePlantInLocal, _itemArray:\", _itemArray)\n\t\t\t\t\tlocalStorageService.set('localPlantStorage', _itemArray);\n\t\t\t\t}else{\n\t\t\t\t\talert(\"Sorry, local storage not supported!\");\n\t\t\t\t}\n\t\t }", "title": "" }, { "docid": "6588030489c4470ac8fc5b08f57bf569", "score": "0.64087874", "text": "function saveCart() {\n localStorage.setItem(\"shoppingCart\", JSON.stringify(cart)); //JSON converts cart from 'objects' IN list to a JSON 'string'\n }", "title": "" }, { "docid": "210f6f9542f0bcd2487a7e31cdaf2b7b", "score": "0.64057374", "text": "function saveGame(){\n\n\tlocalStorage.setItem(\"storeRoomNum\",roomNumber);\n\tlocalStorage.setItem(\"storeInventory\",JSON.stringify(inventory));\n\tlocalStorage.setItem(\"storeRooms\",JSON.stringify(map));\n\t\n}", "title": "" }, { "docid": "076bcf4d39b232e6dcdde8b0c1118bae", "score": "0.63966644", "text": "function saveLocalStorage() {\n var savedProducts = JSON.stringify(productsArray);\n localStorage.setItem('Products', savedProducts);\n}", "title": "" }, { "docid": "d2a7addb265b5f5232fec89d360ce941", "score": "0.63941246", "text": "save() {\n LocalStorage.set(STORAGE_KEY, this.items);\n }", "title": "" }, { "docid": "a8d4749fd5c797dea0bdef2d4ed3edd8", "score": "0.637306", "text": "function saveToLocalStore () {\n // serialize \n let orderInfo = [{ 'gb': gb}, {'cc': cc}, {'sugar': sugar}, {'totalCookies': totalCookies}];\n let serializedOrderInfo = JSON.stringify(orderInfo);\n\n // save \n localStorage.setItem('orderInfo', serializedOrderInfo)\n \n}", "title": "" }, { "docid": "64b4932cde6e4f84dc689d68273228c4", "score": "0.6367029", "text": "static setLocalStorage(item) {\n const books = this.getBooks();\n books.push(item);\n\n localStorage.setItem('newBooks', JSON.stringify(books));\n }", "title": "" }, { "docid": "ba3c69552c518e7b51d5be7b1994896f", "score": "0.6366834", "text": "function saveToLocalStorage() {\n let stringArray = JSON.stringify(FoodLove.allfoods);\n localStorage.setItem('Foods', stringArray);\n}", "title": "" }, { "docid": "e95ceb7e47e55e5e2f56fa9c947e0232", "score": "0.6335143", "text": "function setItemToLocalStorage(text) {\n items = getItemsFromLocalStorage();\n items.push(text);\n localStorage.setItem('items', JSON.stringify(items));\n}", "title": "" }, { "docid": "b61b22631ac38056d1a5f9071638d3c1", "score": "0.63256395", "text": "function updateinventory(){\n\tfor (var k = 0; k < listlength; k++){\n\t\tif(localStorage.getItem(gameinventory[k]) == 'true'){\n\t\t\tdocument.getElementById(invidhash[gameinventory[k]]).style.visibility = \"visible\";\n\t\t}\n\t}\n}", "title": "" }, { "docid": "631bce7d747c1800ad1f9feba9842b01", "score": "0.63249886", "text": "function saveToLocalStorage() {\n localStorage.setItem('products', JSON.stringify(products));\n}", "title": "" }, { "docid": "df6594a4ae3f6bf6fda365ea277a00e4", "score": "0.6319111", "text": "function saveCart() {\n //set item is method native to local storage\n localStorage.setItem('cart', JSON.stringify(cart));\n}", "title": "" }, { "docid": "738ee638c8028b0f14cecad3d4dcb449", "score": "0.6305872", "text": "static saveCart(cart){\n localStorage.setItem(\"cart\", JSON.stringify(cart)); // Saves \"cart\" ARRAY and its items to local storage\n }", "title": "" }, { "docid": "90b46ec2c515e58fa4b184b81a38b8e7", "score": "0.630513", "text": "function addToLocal() {\n localStorage.setItem(\"allProducts\", JSON.stringify(productList));\n}", "title": "" }, { "docid": "97c6f4eab18ddd70ebbb2b7085b4de1d", "score": "0.6289708", "text": "function update(inventory) {\n 'use strict';\n var sku, x, newQuantity;\n sku = parseInt(window.prompt('Enter a sku number:'), 10);\n x = skuNums.indexOf(sku);\n\n // validate if the user enters a valid sku# \n if (x > -1) { // if sku# valid, update a new stock quantity\n newQuantity = parseInt(window.prompt('Enter a new stock quantity:'), 10);\n inventory[x][2] = newQuantity;\n\n window.console.log('You just updated the quantity of product with sku number of ' + sku + ' to: ' + inventory[x][2]);\n window.console.log('');\n\n //toStorage(inventory);\n\n } else { // if sku# invalid\n window.alert('Invalid sku number!');\n }\n}", "title": "" }, { "docid": "15e0986ca5ff772502fa0c82bc9c7356", "score": "0.62866277", "text": "function setItemsToLS(item){\n item.amount = 1;\n items = getItemsFromLS();\n let n=0;\n if(items.length > 0){\n items.forEach(function(i){ \n if(i.id != item.id){\n n++;\n if(n == items.length){\n items.push(item);\n console.log(items);\n localStorage.setItem('items', JSON.stringify(items));\n }\n } else{\n i['amount'] = i['amount'] + 1;\n localStorage.setItem('items', JSON.stringify(items));\n }\n })\n } else {\n items.push(item);\n localStorage.setItem('items', JSON.stringify(items));\n }\n}", "title": "" }, { "docid": "cf54b1ceb1659c310ac778870f9b64fe", "score": "0.62857825", "text": "function StoreData()\n{\n var Order = JSON.stringify(AllItemsImages);\n localStorage.setItem('Rounds',Order);\n}", "title": "" }, { "docid": "2b20ba54042d2986a5cfbd9139cc29e0", "score": "0.62833774", "text": "function saveItems() {\n if (localStorage != null && JSON != null) {\n localStorage.setItem(keyStorage, JSON.stringify($scope.items));\n }\n }", "title": "" }, { "docid": "5af19ce0b7b1a2547afb991636cb4ab8", "score": "0.6277325", "text": "function save() {\n // Create a JSON string of the tasks\n const tasksJson = JSON.stringify(items);\n\n // Store the JSON string in localStorage\n localStorage.setItem(\"items\", tasksJson);\n\n // Convert the currentId to a string;\n const currentId = String(items.Id);\n\n // Store the currentId in localStorage\n localStorage.setItem(\"currentId\", currentId);\n }", "title": "" }, { "docid": "e1f198937930d72024dc4aca454f2c93", "score": "0.62694085", "text": "function save(){\r\n // changes the order to a string array and then saves it in the local storage\r\n localStorage.setItem(\"Favourite-Order\", JSON.stringify(order));\r\n localStorage.setItem(\"Favourite-Order-Total\",total);\r\n\r\n alert(\"Successfully added your current order to favourites order !\");\r\n}", "title": "" }, { "docid": "df75bb264fdfc3c75ce578424043f17a", "score": "0.6262188", "text": "function saveProductsToLocalStorage(productsArray) {\n localStorage.productsArray = JSON.stringify(productsArray);\n console.log('Saved to local storage!');\n}", "title": "" }, { "docid": "ae844fc113863565263b3467fc18709f", "score": "0.62602484", "text": "function addtocart4() {\n\tvar a = JSON.parse(sessionStorage.getItem(\"Catalogue\"));\n\tvar b = JSON.parse(localStorage.getItem(\"Items\"));\n\tvar c = parseInt(localStorage.getItem(\"Amount\"));\n\n\tif (b == null) {\n\t\tb = [a[3]];\n\t} else {\n\t\tb.push(a[3]);\n\t};\n\n\tlocalStorage.setItem(\"Items\", JSON.stringify(b));\n\n\tlocalStorage.setItem(\"Amount\", c += a[3].price);\n\talert(\"The current total of the items is R\" + c);\n}", "title": "" }, { "docid": "0dc1c9796fe425a4e4eb672d3b1f7859", "score": "0.62587047", "text": "function mirrorToLocalStorage() {\n console.info('Saving items to localStorage');\n // Convert objects to string by using JSON.stringify\n localStorage.setItem('items', JSON.stringify(items));\n}", "title": "" }, { "docid": "0ccc1a025eec44ceac8be089e6187f7d", "score": "0.6236922", "text": "function addtocart5() {\n\tvar a = JSON.parse(sessionStorage.getItem(\"Catalogue\"));\n\tvar b = JSON.parse(localStorage.getItem(\"Items\"));\n\tvar c = parseInt(localStorage.getItem(\"Amount\"));\n\n\tif (b == null) {\n\t\tb = [a[4]];\n\t} else {\n\t\tb.push(a[4]);\n\t};\n\n\tlocalStorage.setItem(\"Items\", JSON.stringify(b));\n\n\tlocalStorage.setItem(\"Amount\", c += a[4].price);\n\talert(\"The current total of the items is R\" + c);\n}", "title": "" }, { "docid": "8a959ede142e2e6a4e2ec52dfcbc950b", "score": "0.6234692", "text": "function addtocart3() {\n\tvar a = JSON.parse(sessionStorage.getItem(\"Catalogue\"));\n\tvar b = JSON.parse(localStorage.getItem(\"Items\"));\n\tvar c = parseInt(localStorage.getItem(\"Amount\"));\n\n\tif (b == null) {\n\t\tb = [a[2]];\n\t} else {\n\t\tb.push(a[2]);\n\t};\n\n\tlocalStorage.setItem(\"Items\", JSON.stringify(b));\n\n\tlocalStorage.setItem(\"Amount\", c += a[2].price);\n\talert(\"The current total of the items is R\" + c);\n}", "title": "" }, { "docid": "4248fd529b2b6932a6ec64326160c67e", "score": "0.6231688", "text": "function updateStorage(){\r\nlocalStorage.setItem(\"dataList\", JSON.stringify(dataList));\r\n}", "title": "" }, { "docid": "143b8013089ba59f3b6de462ba5bd800", "score": "0.62255865", "text": "function storeToLocal(key, items){\n\t\t//localStorage[key] = JSON.stringify(items);\n\t\tdb.insertOrUpdate(key, {key: items.key, description: items.description});\n\t\tdb.commit();\n\t}", "title": "" }, { "docid": "65c57df91ce53fa81a81c35ed6da579f", "score": "0.62240744", "text": "function saveToLocal(data) {\r\n localStorage.setItem(\"player-list\", JSON.stringify(data));\r\n}", "title": "" }, { "docid": "5d144487f54d833d52f6fc9129d10776", "score": "0.62226623", "text": "function saveLocalData() {\n localStorage.setItem(\"alliance\", getAlliancePosition(\"alliance\"));\n localStorage.setItem(\"position\", getAlliancePosition(\"position\"));\n localStorage.setItem(\"matchType\", getMatchType());\n localStorage.setItem(\"fieldRotated\", rotated);\n console.log(\"Position saved\");\n}", "title": "" }, { "docid": "3346ceb39d2409029386a8b725d01176", "score": "0.62202513", "text": "function addtocart1() {\n\tvar a = JSON.parse(sessionStorage.getItem(\"Catalogue\"));\n\tvar b = JSON.parse(localStorage.getItem(\"Items\"));\n\tvar c = parseInt(localStorage.getItem(\"Amount\"));\n\n\tif (b == null) {\n\t\tb = [a[0]];\n\t} else {\n\t\tb.push(a[0]);\n\t};\n\n\tlocalStorage.setItem(\"Items\", JSON.stringify(b));\n\n\tlocalStorage.setItem(\"Amount\", c += a[0].price);\n\talert(\"The current total of the items is R\" + c);\n}", "title": "" }, { "docid": "53e2d37714e453428862114f4f03fed0", "score": "0.6202276", "text": "function storeProducts(){\n localStorage.setItem('allProductsString', JSON.stringify(allProducts));\n}", "title": "" }, { "docid": "1faabe18420daf76a2049c5acb3088ac", "score": "0.62018204", "text": "function saveTasks() {\n // Create a variable to store the array of taskItems\n let taskString = JSON.stringify(tItems);\n\n // Add the item to the storage array\n localStorage.setItem(tKey, taskString);\n}// End function saveTasks", "title": "" }, { "docid": "621c4b21cbc5bcaa46f8053d526f16c7", "score": "0.61989796", "text": "function getInventory () {\n try {\n return JSON.parse(window.localStorage.getItem('inventory'))\n } catch (e) {\n console.error('Uh-oh! Inventory in localStorage was not valid JSON')\n return null\n }\n}", "title": "" }, { "docid": "4aa3f60ae3d52bf9311911addc5342cf", "score": "0.61968565", "text": "function saveList() {\n\n // save localStorage\n const stringifiedGroceryList = JSON.stringify(groceryList);\n\n\n // saving list to local storage\n localStorage.setItem('grocery-list', stringifiedGroceryList);\n\n}", "title": "" }, { "docid": "266da072c8094d210fd5ff10c4a403ec", "score": "0.61885774", "text": "function saveBagToLS() {\n localStorage.setItem('bag', JSON.stringify(bag));\n}", "title": "" }, { "docid": "640d4cd4070cb15da11d9c07a2302f41", "score": "0.6187784", "text": "function mirrorToLocalStorage() {\n console.info('Saving items to localstorage'); // if you dont stringfy you just put objects and you need to put string/text to see them\n\n /* \n if you get a number or an array you can just do: string.toString() or array.toString()\n but if you got an object and call object.toString the result will be \"object object\"\n many times as the items inside the object itselt. so if you got an object\n const person = {name: 'ves', age: 100} \n person.JSON.stringify(items) you will get a object with inside each element in a string\n format\n {\"name: 'wes'\", \"age: 100\" }¨\n if you wanna go back to the normal object from a string you can do\n person.JSON.parse(items)\n */\n\n localStorage.setItem('items', JSON.stringify(items));\n}", "title": "" }, { "docid": "320c6a550d3d7d848d0946df28eaf68c", "score": "0.61800146", "text": "function saveItemOnStorage(item){ \n let subTotal = 0; \n item.forEach(element => { \n subTotal = subTotal + element.total; \n }); \n\n finalSubTotal = JSON.stringify(subTotal);\n AsyncStorage.setItem('subTotal', finalSubTotal); \n \n \n let newItem = JSON.stringify(item); \n AsyncStorage.setItem('miOrdersStorage', newItem); \n MyAlert(); \n }", "title": "" }, { "docid": "8b85091dfc5fcd2c64b2f4441ecbcaa2", "score": "0.61785036", "text": "function saveRecipeToLocalStorage(newObject) {\n var dataFromLocalStorage = [];\n // czy localStorage posiada dane\n // jeśli są to z getItem dostaniemy wartość w postaci JSON\n if (localStorage.getItem(\"recipes\") != null){\n // dlatego konwertujemy do obiektu lub tablicy i zapisujemy do zmiennej\n dataFromLocalStorage = JSON.parse(localStorage.getItem(\"recipes\"));\n // dodajemy nowy obiekt\n dataFromLocalStorage.push(newObject);\n // zapisanie do LS w formie stringa\n localStorage.setItem(\"recipes\", JSON.stringify(dataFromLocalStorage));\n } else {\n // jeśli nie ma, to tworzymy nową wartość w localStorage i dodajemy dane\n dataFromLocalStorage.push(newObject);\n localStorage.setItem(\"recipes\", JSON.stringify(dataFromLocalStorage));\n }\n //wyświetlamy komunikat ze przepis zapisany\n alert(\"Zapisałeś swój przepis!\");\n }", "title": "" }, { "docid": "e6a660db15ca0d61276b62b5c228b1d7", "score": "0.6153607", "text": "function storeLocal(){\n localStorage.setItem('busProductLS', JSON.stringify(BusProduct.allProducts));\n}", "title": "" }, { "docid": "0d602f03e183a34a826b701d83424b08", "score": "0.6143413", "text": "function setItemslocal() {\n localStorage.setItem('cookies', JSON.stringify({'score':0}));\n localStorage.setItem('multiplier', JSON.stringify({'price':20, 'level':1}));\n localStorage.setItem('booster', JSON.stringify({'price':50, 'time':15, 'level':0}));\n localStorage.setItem('autoClick', JSON.stringify({'price':30, 'level':0, 'delay': 1000}));\n }", "title": "" }, { "docid": "a1b4bc6d4b22ee05a6162660edc6cb2b", "score": "0.6137335", "text": "function storebus(){\n let stringItem = JSON.stringify(theBus);\n localStorage.setItem('items', stringItem);\n}", "title": "" }, { "docid": "5022648b0b425ca4b26b7d6ded9276ac", "score": "0.61365706", "text": "function addtocart2() {\n\tvar a = JSON.parse(sessionStorage.getItem(\"Catalogue\"));\n\tvar b = JSON.parse(localStorage.getItem(\"Items\"));\n\tvar c = parseInt(localStorage.getItem(\"Amount\"));\n\n\tif (b == null) {\n\t\tb = [a[1]];\n\t} else {\n\t\tb.push(a[1]);\n\t};\n\n\tlocalStorage.setItem(\"Items\", JSON.stringify(b));\n\n\tlocalStorage.setItem(\"Amount\", c += a[1].price);\n\talert(\"The current total of the items is R\" + c);\n}", "title": "" }, { "docid": "c201dc1b686907381e725e9f7f39454e", "score": "0.6133798", "text": "function saveChanges(targetTable, price, itemName) { //drag nd drop\n var tbl = localStorage.getItem(\"tables\");\n var arr = JSON.parse(tbl);\n var flag = 0;\n arr.forEach((element, index) => {\n if (element.name == targetTable) {\n (arr[index].details).forEach((asd, i) => {\n if (arr[index].details[i].item == itemName) {\n flag = 1;\n price = Number(price);\n var oldPrice = arr[index].details[i].price;\n oldPrice = Number(oldPrice);\n var newPrice = oldPrice + price;\n arr[index].details[i].price = newPrice;\n arr[index].details[i].servings += 1;\n }\n\n });\n }\n });\n localStorage.setItem(\"tables\", JSON.stringify(arr));\n if (flag != 1) {\n addNewItem(targetTable, price, itemName);//add new item \n }\n totalPrice(targetTable);\n window.location.reload();\n}", "title": "" }, { "docid": "f4d5ca213800b3fd1efbea75868d9085", "score": "0.61331654", "text": "function RebuildPlayerInventory() {\n ClearPlayerInventory();\n LoadPlayerInventory();\n}", "title": "" }, { "docid": "d8b6c5bc9910b3edc92003625a03e6af", "score": "0.61278486", "text": "function updateStorage() {\n localStorage.setItem('toDos', JSON.stringify(toDos));\n localStorage.setItem('count', JSON.stringify(count));\n}", "title": "" }, { "docid": "913c73eff22b32ff67bf418e024d8e71", "score": "0.61180466", "text": "function salvarLista() {\n localStorage.setItem(\"lista_tarefas\", JSON.stringify(listaDeItens))\n localStorage.setItem(\"item_checked\", JSON.stringify(itemChecked))\n}", "title": "" }, { "docid": "0ca5eb3f1547fc97c3bc0932920ee694", "score": "0.611584", "text": "function save() {\n //new data input from admin\n let name = document.querySelector(\"#product--name\").value;\n let description = document.querySelector(\"#product--description\").value;\n let price = document.querySelector(\"#product--price\").value;\n //to give each card a specific id (random number 0-1)\n let id = Math.random();\n let picture = JSON.parse(localStorage.getItem(\"urls\")); \n\n //storing an array in local storage\n if (localStorage.getItem(\"data\") == null) {\n localStorage.setItem(\"data\", \"[]\");\n }\n //old data input pushed into array so no data is lost\n let old_data = JSON.parse(localStorage.getItem(\"data\"));\n old_data.push({ name, description, price, id, picture });\n\n //storing the array with the new and old data\n localStorage.setItem(\"data\", JSON.stringify(old_data));\n\n formReset();\n}", "title": "" }, { "docid": "ba12ae81bb9f176bc5675f2cbdc71e24", "score": "0.6115445", "text": "function saveData()\n{\n localStorage.minions = JSON.stringify(minions);\n localStorage.setItem('gold', gold);\n localStorage.setItem('score', score);\n localStorage.setItem('next_floor', next_floor);\n localStorage.setItem('floor', floor);\n localStorage.setItem('player_power', player_power);\n localStorage.setItem('next_player_power', next_player_power);\n localStorage.setItem('save', 1);\n}", "title": "" }, { "docid": "98e8510bfcf9b5648474a927efd9588c", "score": "0.61051685", "text": "function saveProductInStorage(item){\n let products = getProductFromStorage();\n products.push(item);\n localStorage.setItem('products', JSON.stringify(products));\n updateCartInfo();\n}", "title": "" }, { "docid": "faefb1e273d6093c706a984c81bdb118", "score": "0.6103515", "text": "static updateInventories() {\n this.resetInventories();\n let inventoryArea = document.getElementById(\"novel-inventory\");\n let hiddenInventoryArea = document.getElementById(\"novel-hidden-inventory\");\n for (let i = 0; i < novelData.novel.inventories[novelData.novel.currentInventory].length; i++) {\n let item = novelData.novel.inventories[novelData.novel.currentInventory][i];\n let targetInventory = hiddenInventoryArea;\n if (!item.hidden || item.hidden === undefined) {\n targetInventory = inventoryArea;\n }\n if (item.value > 0 || isNaN(item.value)) {\n let li = document.createElement(\"li\");\n li.class = \"novel-inventory-item\";\n let innerHTML = LanguageManager.getItemAttribute(item,'displayName') + ' - ' + item.value;\n innerHTML = innerHTML + '<ul class=\"novel-inventory-item-info\">';\n if (item.description) {\n innerHTML = innerHTML + '<li class=\"novel-inventory-item-description\">' + LanguageManager.getItemAttribute(item,'description') + '</li>';\n }\n innerHTML = innerHTML + '</ul>';\n li.innerHTML = innerHTML;\n targetInventory.appendChild(li);\n }\n }\n }", "title": "" }, { "docid": "e899c0557e7e2a848f3ae21512d4654c", "score": "0.610056", "text": "function savedinfo() {\n\n const convertedArr = JSON.stringify(feedbackarray);\n localStorage.setItem('feedbackarray', convertedArr);\n //console.log(convertedArr);\n\n}", "title": "" }, { "docid": "4d91a5f8e5f03312ec7c884df0d7eb26", "score": "0.6099016", "text": "function updateLocalStorage () {\n localStorage.tasks = JSON.stringify(tasks);\n }", "title": "" }, { "docid": "eebafff4ae15d487bb1a74de41fe72ab", "score": "0.6098467", "text": "function addItemToLocalStore(arrayList,favId,localStoreName,imgSrc,price,descp){\n\t\t\n\t\t arrayList.push({\"FavId\":favId,\"img\":imgSrc,\"price\":price,\"desc\":descp,\"date\":Date()});\n\t\t localStorage.setItem(localStoreName, JSON.stringify(arrayList));\t\t \n\t }", "title": "" }, { "docid": "8c94066babf685cb7a16f601121479ed", "score": "0.60961825", "text": "function saveToStorage() {\r\n localStorage.setItem('list_todos', JSON.stringify(todos)); // JSON.stringfy() transform the array into a string\r\n\r\n}", "title": "" }, { "docid": "83ef522379b6bddd9ce485dbe4156aee", "score": "0.609616", "text": "function putInLocalStorage() {\n text = JSON.stringify(movieArray);\n localStorage.setItem(\"movieArray\", text);\n}", "title": "" }, { "docid": "5f138e1498858cc5dd34ada3c6116198", "score": "0.60957944", "text": "function saveToLocal(){\n localStorage.setItem(\"playerResultArray\", JSON.stringify(playerResultArray));\n}", "title": "" }, { "docid": "4fb0aca8bd95f0d004d7b65cffbb817b", "score": "0.6092936", "text": "function saveData()\n{\n localStorage.minions = JSON.stringify(minions);\n localStorage.setItem('gold', gold);\n localStorage.setItem('score', score);\n localStorage.setItem('next_floor', next_floor);\n localStorage.setItem('floor', floor);\n localStorage.setItem('player_power', player_power);\n localStorage.setItem('next_player_power', next_player_power);\n localStorage.setItem('game_time', game_time);\n localStorage.setItem('save', 1);\n}", "title": "" }, { "docid": "78e8639505d4a82f5422ad2c16b70262", "score": "0.60912013", "text": "function updateLocalStorageLib() {\n localStorage.setItem('mylibrary', JSON.stringify(myLibrary)); // Convert array & objects to string.\n}", "title": "" }, { "docid": "3f737e63b2e6e0d6cc4802923b221069", "score": "0.60897356", "text": "function saveToLocalStorage() {\n localStorage.setItem('cart', JSON.stringify(cart.books));\n}", "title": "" }, { "docid": "2eef15f0c423761863b114efb49ade42", "score": "0.60820305", "text": "function updateLocalStorage(data) {\n localStorage.setItem(LOCKER_DATA_KEY, JSON.stringify(data))\n \n}", "title": "" }, { "docid": "ea07ecb0e220a8f92c76dc728128f495", "score": "0.60799116", "text": "loadFromLocalStorage() {\n\t\t\tvar json = localStorage.getItem(\"cart\");\n\t\t\tthis.items = json ? JSON.parse(json) : [];\n\t\t}", "title": "" }, { "docid": "29ebbc9301259aa4735b7ec99e0277c2", "score": "0.60765105", "text": "function updateStorage() {\n localStorage.setItem('rating', JSON.stringify(averageArr));\n}", "title": "" }, { "docid": "0cb078c5b2547b4eeeebef5dff3e7f66", "score": "0.60759884", "text": "function addObjectToCartAndLocalStorage(){\n if (typeof localStorage.getItem(\"bun\") !== \"string\") {\n cart= JSON.parse(localStorage.getItem(\"bun\"));\n }\n if (cart === null || cart.length === 0 ) {\n //place object into array\n cart = [];\n cart.push(newObject());\n console.log (JSON.stringify(cart), \"cart if\");\n //set bun to things in cart and places it in LS\n storeItemIntoCart = localStorage.setItem(\"bun\", JSON.stringify(cart));\n //puts it back into jumbles for LS + stores local storage\n }\n else {\n //pull info from storage\n var unjumbledStorage = JSON.parse(localStorage.getItem(\"bun\"));\n //modify info from storage\n unjumbledStorage = cart.push(newObject());\n storeItemIntoCart = localStorage.setItem(\"bun\", JSON.stringify(cart));\n }\n console.log(cart) //comment this out and your console breaks lmfao what\n cart = JSON.parse(localStorage.getItem(\"bun\"));\n return storeItemIntoCart;\n}", "title": "" }, { "docid": "9f7b8dc75ef4883c108a8f659604d653", "score": "0.6073706", "text": "function updateCart(){\n\t\tlocalStorage.setItem(LS_CART, JSON.stringify(cart));\n\t}", "title": "" } ]
63128abdf516491eb9a178929a354a7b
TODO(cais): When the need arises, uncomment the following lines and implement the queue for time values. private deltaTBatch: number; private deltaTsBatchBegin: Array; private deltaTsBatchEnd: Array; Constructor of CallbackList.
[ { "docid": "03923dba986e0da3bbf7186bd4ea3299", "score": "0.5905786", "text": "constructor(callbacks, queueLength = 10) {\n // TODO(cais): Make use of queueLength when implementing the queue for time\n // values.\n if (callbacks == null) {\n callbacks = [];\n }\n this.callbacks = callbacks;\n this.queueLength = queueLength;\n }", "title": "" } ]
[ { "docid": "3afd623e59ff9450ea08724e5ff7a025", "score": "0.6025663", "text": "constructor(callbacks, queueLength = 10) {\n // TODO(cais): Make use of queueLength when implementing the queue for time\n // values.\n if (callbacks == null) {\n callbacks = [];\n }\n\n this.callbacks = callbacks;\n this.queueLength = queueLength;\n }", "title": "" }, { "docid": "1b923d2ef021adfe706eb98f55547b11", "score": "0.59904945", "text": "function CallbackList(callbacks, queueLength) {\n if (queueLength === void 0) {\n queueLength = 10;\n }\n // TODO(cais): Make use of queueLength when implementing the queue for time\n // values.\n if (callbacks == null) {\n callbacks = [];\n }\n this.callbacks = callbacks;\n this.queueLength = queueLength;\n }", "title": "" }, { "docid": "0f0331a54dc1a57a8d186dee5a9e3de7", "score": "0.589568", "text": "constructor(callbacks, queueLength = 10) {\n // TODO(cais): Make use of queueLength when implementing the queue for time\n // values.\n if (callbacks == null) {\n callbacks = [];\n }\n this.callbacks = callbacks;\n this.queueLength = queueLength;\n }", "title": "" }, { "docid": "4ebeed4c059f860bc6e34680ff2cf646", "score": "0.5839983", "text": "function CallbackList(callbacks, queueLength) {\n if (queueLength === void 0) { queueLength = 10; }\n // TODO(cais): Make use of queueLength when implementing the queue for time\n // values.\n if (callbacks == null) {\n callbacks = [];\n }\n this.callbacks = callbacks;\n this.queueLength = queueLength;\n }", "title": "" }, { "docid": "900f4d0bd14c918e435c28e07621d789", "score": "0.5654854", "text": "function CallbackBuffer(initialListSize)\n{\nvar self = this;\n\nvar callbacks = new Object();\n\nself.pushBack = function(id, object, method)\n\t{\n\tcallbacks[id] = [object, method, Date.now()];\n\t};\n\nself.callMethodAndPop = function(id, error, result)\n\t{\n\tif (callbacks.hasOwnProperty(id))\n\t\t{\n\t\t(callbacks[id][1]).call(callbacks[id][0], error, result, id, Date.now() - callbacks[id][2]);\n\t\tdelete callbacks[id];\n\t\t}\n\telse\n\t\tthrow {error: \"CallbackBuffer::callMethodAndPop(). Callback not found\"};\n\t};\n}", "title": "" }, { "docid": "c3ade190570316e89b39db2bf73edc0b", "score": "0.56428915", "text": "function CallbackQueue(){this._callbacks=null,this._contexts=null}", "title": "" }, { "docid": "5ce023edb3605842face6e2a6609f79c", "score": "0.5468817", "text": "function CallbackQueue(){this._callbacks=null;this._contexts=null;}", "title": "" }, { "docid": "b29b0f45db4552e81399a451484a774b", "score": "0.5348531", "text": "function CallbackQueue() {\n\t this._callbacks = null;\n\t this._contexts = null;\n\t}", "title": "" }, { "docid": "b29b0f45db4552e81399a451484a774b", "score": "0.5348531", "text": "function CallbackQueue() {\n\t this._callbacks = null;\n\t this._contexts = null;\n\t}", "title": "" }, { "docid": "b29b0f45db4552e81399a451484a774b", "score": "0.5348531", "text": "function CallbackQueue() {\n\t this._callbacks = null;\n\t this._contexts = null;\n\t}", "title": "" }, { "docid": "b29b0f45db4552e81399a451484a774b", "score": "0.5348531", "text": "function CallbackQueue() {\n\t this._callbacks = null;\n\t this._contexts = null;\n\t}", "title": "" }, { "docid": "b29b0f45db4552e81399a451484a774b", "score": "0.5348531", "text": "function CallbackQueue() {\n\t this._callbacks = null;\n\t this._contexts = null;\n\t}", "title": "" }, { "docid": "b29b0f45db4552e81399a451484a774b", "score": "0.5348531", "text": "function CallbackQueue() {\n\t this._callbacks = null;\n\t this._contexts = null;\n\t}", "title": "" }, { "docid": "b29b0f45db4552e81399a451484a774b", "score": "0.5348531", "text": "function CallbackQueue() {\n\t this._callbacks = null;\n\t this._contexts = null;\n\t}", "title": "" }, { "docid": "b29b0f45db4552e81399a451484a774b", "score": "0.5348531", "text": "function CallbackQueue() {\n\t this._callbacks = null;\n\t this._contexts = null;\n\t}", "title": "" }, { "docid": "b29b0f45db4552e81399a451484a774b", "score": "0.5348531", "text": "function CallbackQueue() {\n\t this._callbacks = null;\n\t this._contexts = null;\n\t}", "title": "" }, { "docid": "b29b0f45db4552e81399a451484a774b", "score": "0.5348531", "text": "function CallbackQueue() {\n\t this._callbacks = null;\n\t this._contexts = null;\n\t}", "title": "" }, { "docid": "b29b0f45db4552e81399a451484a774b", "score": "0.5348531", "text": "function CallbackQueue() {\n\t this._callbacks = null;\n\t this._contexts = null;\n\t}", "title": "" }, { "docid": "b29b0f45db4552e81399a451484a774b", "score": "0.5348531", "text": "function CallbackQueue() {\n\t this._callbacks = null;\n\t this._contexts = null;\n\t}", "title": "" }, { "docid": "b29b0f45db4552e81399a451484a774b", "score": "0.5348531", "text": "function CallbackQueue() {\n\t this._callbacks = null;\n\t this._contexts = null;\n\t}", "title": "" }, { "docid": "b29b0f45db4552e81399a451484a774b", "score": "0.5348531", "text": "function CallbackQueue() {\n\t this._callbacks = null;\n\t this._contexts = null;\n\t}", "title": "" }, { "docid": "b29b0f45db4552e81399a451484a774b", "score": "0.5348531", "text": "function CallbackQueue() {\n\t this._callbacks = null;\n\t this._contexts = null;\n\t}", "title": "" }, { "docid": "b29b0f45db4552e81399a451484a774b", "score": "0.5348531", "text": "function CallbackQueue() {\n\t this._callbacks = null;\n\t this._contexts = null;\n\t}", "title": "" }, { "docid": "b29b0f45db4552e81399a451484a774b", "score": "0.5348531", "text": "function CallbackQueue() {\n\t this._callbacks = null;\n\t this._contexts = null;\n\t}", "title": "" }, { "docid": "b29b0f45db4552e81399a451484a774b", "score": "0.5348531", "text": "function CallbackQueue() {\n\t this._callbacks = null;\n\t this._contexts = null;\n\t}", "title": "" }, { "docid": "b29b0f45db4552e81399a451484a774b", "score": "0.5348531", "text": "function CallbackQueue() {\n\t this._callbacks = null;\n\t this._contexts = null;\n\t}", "title": "" }, { "docid": "b29b0f45db4552e81399a451484a774b", "score": "0.5348531", "text": "function CallbackQueue() {\n\t this._callbacks = null;\n\t this._contexts = null;\n\t}", "title": "" }, { "docid": "b29b0f45db4552e81399a451484a774b", "score": "0.5348531", "text": "function CallbackQueue() {\n\t this._callbacks = null;\n\t this._contexts = null;\n\t}", "title": "" }, { "docid": "b29b0f45db4552e81399a451484a774b", "score": "0.5348531", "text": "function CallbackQueue() {\n\t this._callbacks = null;\n\t this._contexts = null;\n\t}", "title": "" }, { "docid": "b29b0f45db4552e81399a451484a774b", "score": "0.5348531", "text": "function CallbackQueue() {\n\t this._callbacks = null;\n\t this._contexts = null;\n\t}", "title": "" }, { "docid": "b29b0f45db4552e81399a451484a774b", "score": "0.5348531", "text": "function CallbackQueue() {\n\t this._callbacks = null;\n\t this._contexts = null;\n\t}", "title": "" }, { "docid": "b29b0f45db4552e81399a451484a774b", "score": "0.5348531", "text": "function CallbackQueue() {\n\t this._callbacks = null;\n\t this._contexts = null;\n\t}", "title": "" }, { "docid": "b29b0f45db4552e81399a451484a774b", "score": "0.5348531", "text": "function CallbackQueue() {\n\t this._callbacks = null;\n\t this._contexts = null;\n\t}", "title": "" }, { "docid": "b29b0f45db4552e81399a451484a774b", "score": "0.5348531", "text": "function CallbackQueue() {\n\t this._callbacks = null;\n\t this._contexts = null;\n\t}", "title": "" }, { "docid": "b29b0f45db4552e81399a451484a774b", "score": "0.5348531", "text": "function CallbackQueue() {\n\t this._callbacks = null;\n\t this._contexts = null;\n\t}", "title": "" }, { "docid": "b29b0f45db4552e81399a451484a774b", "score": "0.5348531", "text": "function CallbackQueue() {\n\t this._callbacks = null;\n\t this._contexts = null;\n\t}", "title": "" }, { "docid": "b29b0f45db4552e81399a451484a774b", "score": "0.5348531", "text": "function CallbackQueue() {\n\t this._callbacks = null;\n\t this._contexts = null;\n\t}", "title": "" }, { "docid": "b29b0f45db4552e81399a451484a774b", "score": "0.5348531", "text": "function CallbackQueue() {\n\t this._callbacks = null;\n\t this._contexts = null;\n\t}", "title": "" }, { "docid": "b29b0f45db4552e81399a451484a774b", "score": "0.5348531", "text": "function CallbackQueue() {\n\t this._callbacks = null;\n\t this._contexts = null;\n\t}", "title": "" }, { "docid": "b29b0f45db4552e81399a451484a774b", "score": "0.5348531", "text": "function CallbackQueue() {\n\t this._callbacks = null;\n\t this._contexts = null;\n\t}", "title": "" }, { "docid": "b29b0f45db4552e81399a451484a774b", "score": "0.5348531", "text": "function CallbackQueue() {\n\t this._callbacks = null;\n\t this._contexts = null;\n\t}", "title": "" }, { "docid": "b29b0f45db4552e81399a451484a774b", "score": "0.5348531", "text": "function CallbackQueue() {\n\t this._callbacks = null;\n\t this._contexts = null;\n\t}", "title": "" }, { "docid": "b29b0f45db4552e81399a451484a774b", "score": "0.5348531", "text": "function CallbackQueue() {\n\t this._callbacks = null;\n\t this._contexts = null;\n\t}", "title": "" }, { "docid": "b29b0f45db4552e81399a451484a774b", "score": "0.5348531", "text": "function CallbackQueue() {\n\t this._callbacks = null;\n\t this._contexts = null;\n\t}", "title": "" }, { "docid": "b29b0f45db4552e81399a451484a774b", "score": "0.5348531", "text": "function CallbackQueue() {\n\t this._callbacks = null;\n\t this._contexts = null;\n\t}", "title": "" }, { "docid": "b29b0f45db4552e81399a451484a774b", "score": "0.5348531", "text": "function CallbackQueue() {\n\t this._callbacks = null;\n\t this._contexts = null;\n\t}", "title": "" }, { "docid": "b29b0f45db4552e81399a451484a774b", "score": "0.5348531", "text": "function CallbackQueue() {\n\t this._callbacks = null;\n\t this._contexts = null;\n\t}", "title": "" }, { "docid": "b29b0f45db4552e81399a451484a774b", "score": "0.5348531", "text": "function CallbackQueue() {\n\t this._callbacks = null;\n\t this._contexts = null;\n\t}", "title": "" }, { "docid": "b29b0f45db4552e81399a451484a774b", "score": "0.5348531", "text": "function CallbackQueue() {\n\t this._callbacks = null;\n\t this._contexts = null;\n\t}", "title": "" }, { "docid": "b29b0f45db4552e81399a451484a774b", "score": "0.5348531", "text": "function CallbackQueue() {\n\t this._callbacks = null;\n\t this._contexts = null;\n\t}", "title": "" }, { "docid": "b29b0f45db4552e81399a451484a774b", "score": "0.5348531", "text": "function CallbackQueue() {\n\t this._callbacks = null;\n\t this._contexts = null;\n\t}", "title": "" }, { "docid": "b29b0f45db4552e81399a451484a774b", "score": "0.5348531", "text": "function CallbackQueue() {\n\t this._callbacks = null;\n\t this._contexts = null;\n\t}", "title": "" }, { "docid": "b29b0f45db4552e81399a451484a774b", "score": "0.5348531", "text": "function CallbackQueue() {\n\t this._callbacks = null;\n\t this._contexts = null;\n\t}", "title": "" }, { "docid": "b29b0f45db4552e81399a451484a774b", "score": "0.5348531", "text": "function CallbackQueue() {\n\t this._callbacks = null;\n\t this._contexts = null;\n\t}", "title": "" }, { "docid": "b29b0f45db4552e81399a451484a774b", "score": "0.5348531", "text": "function CallbackQueue() {\n\t this._callbacks = null;\n\t this._contexts = null;\n\t}", "title": "" }, { "docid": "b29b0f45db4552e81399a451484a774b", "score": "0.5348531", "text": "function CallbackQueue() {\n\t this._callbacks = null;\n\t this._contexts = null;\n\t}", "title": "" }, { "docid": "b29b0f45db4552e81399a451484a774b", "score": "0.5348531", "text": "function CallbackQueue() {\n\t this._callbacks = null;\n\t this._contexts = null;\n\t}", "title": "" }, { "docid": "b29b0f45db4552e81399a451484a774b", "score": "0.5348531", "text": "function CallbackQueue() {\n\t this._callbacks = null;\n\t this._contexts = null;\n\t}", "title": "" }, { "docid": "1c123e2e992676badab757eb3c5fc444", "score": "0.5284798", "text": "function MessageQueue() {\n this._instantQueue = [];\n this._sortedQueue = [];\n this._shiftTimer = null;\n this._callbackQueue = [];\n}", "title": "" }, { "docid": "ea1c0eee9c4f25df467cc9280d6a081e", "score": "0.5246714", "text": "function createUpdateQueue(baseState){var queue={baseState:baseState,expirationTime:NoWork,first:null,last:null,callbackList:null,hasForceUpdate:false,isInitialized:false,capturedValues:null};{queue.isProcessing=false;}return queue;}", "title": "" }, { "docid": "ea1c0eee9c4f25df467cc9280d6a081e", "score": "0.5246714", "text": "function createUpdateQueue(baseState){var queue={baseState:baseState,expirationTime:NoWork,first:null,last:null,callbackList:null,hasForceUpdate:false,isInitialized:false,capturedValues:null};{queue.isProcessing=false;}return queue;}", "title": "" }, { "docid": "d38ff44d88cf117af878d01aac8161e2", "score": "0.52200913", "text": "function CallbackQueue() {\n this._callbacks = null;\n this._contexts = null;\n }", "title": "" }, { "docid": "0fd545747cfa97d8d932ba272d2a618c", "score": "0.5209221", "text": "function CallbackQueue() {\n this._callbacks = null;\n this._contexts = null;\n}", "title": "" }, { "docid": "0fd545747cfa97d8d932ba272d2a618c", "score": "0.5209221", "text": "function CallbackQueue() {\n this._callbacks = null;\n this._contexts = null;\n}", "title": "" }, { "docid": "0fd545747cfa97d8d932ba272d2a618c", "score": "0.5209221", "text": "function CallbackQueue() {\n this._callbacks = null;\n this._contexts = null;\n}", "title": "" }, { "docid": "0fd545747cfa97d8d932ba272d2a618c", "score": "0.5209221", "text": "function CallbackQueue() {\n this._callbacks = null;\n this._contexts = null;\n}", "title": "" }, { "docid": "0fd545747cfa97d8d932ba272d2a618c", "score": "0.5209221", "text": "function CallbackQueue() {\n this._callbacks = null;\n this._contexts = null;\n}", "title": "" }, { "docid": "0fd545747cfa97d8d932ba272d2a618c", "score": "0.5209221", "text": "function CallbackQueue() {\n this._callbacks = null;\n this._contexts = null;\n}", "title": "" }, { "docid": "0fd545747cfa97d8d932ba272d2a618c", "score": "0.5209221", "text": "function CallbackQueue() {\n this._callbacks = null;\n this._contexts = null;\n}", "title": "" }, { "docid": "0fd545747cfa97d8d932ba272d2a618c", "score": "0.5209221", "text": "function CallbackQueue() {\n this._callbacks = null;\n this._contexts = null;\n}", "title": "" }, { "docid": "0fd545747cfa97d8d932ba272d2a618c", "score": "0.5209221", "text": "function CallbackQueue() {\n this._callbacks = null;\n this._contexts = null;\n}", "title": "" }, { "docid": "0fd545747cfa97d8d932ba272d2a618c", "score": "0.5209221", "text": "function CallbackQueue() {\n this._callbacks = null;\n this._contexts = null;\n}", "title": "" }, { "docid": "0fd545747cfa97d8d932ba272d2a618c", "score": "0.5209221", "text": "function CallbackQueue() {\n this._callbacks = null;\n this._contexts = null;\n}", "title": "" }, { "docid": "0fd545747cfa97d8d932ba272d2a618c", "score": "0.5209221", "text": "function CallbackQueue() {\n this._callbacks = null;\n this._contexts = null;\n}", "title": "" }, { "docid": "0fd545747cfa97d8d932ba272d2a618c", "score": "0.5209221", "text": "function CallbackQueue() {\n this._callbacks = null;\n this._contexts = null;\n}", "title": "" }, { "docid": "0fd545747cfa97d8d932ba272d2a618c", "score": "0.5209221", "text": "function CallbackQueue() {\n this._callbacks = null;\n this._contexts = null;\n}", "title": "" }, { "docid": "0fd545747cfa97d8d932ba272d2a618c", "score": "0.5209221", "text": "function CallbackQueue() {\n this._callbacks = null;\n this._contexts = null;\n}", "title": "" }, { "docid": "0fd545747cfa97d8d932ba272d2a618c", "score": "0.5209221", "text": "function CallbackQueue() {\n this._callbacks = null;\n this._contexts = null;\n}", "title": "" }, { "docid": "0fd545747cfa97d8d932ba272d2a618c", "score": "0.5209221", "text": "function CallbackQueue() {\n this._callbacks = null;\n this._contexts = null;\n}", "title": "" }, { "docid": "0fd545747cfa97d8d932ba272d2a618c", "score": "0.5209221", "text": "function CallbackQueue() {\n this._callbacks = null;\n this._contexts = null;\n}", "title": "" }, { "docid": "0fd545747cfa97d8d932ba272d2a618c", "score": "0.5209221", "text": "function CallbackQueue() {\n this._callbacks = null;\n this._contexts = null;\n}", "title": "" }, { "docid": "0fd545747cfa97d8d932ba272d2a618c", "score": "0.5209221", "text": "function CallbackQueue() {\n this._callbacks = null;\n this._contexts = null;\n}", "title": "" }, { "docid": "0fd545747cfa97d8d932ba272d2a618c", "score": "0.5209221", "text": "function CallbackQueue() {\n this._callbacks = null;\n this._contexts = null;\n}", "title": "" }, { "docid": "0fd545747cfa97d8d932ba272d2a618c", "score": "0.5209221", "text": "function CallbackQueue() {\n this._callbacks = null;\n this._contexts = null;\n}", "title": "" }, { "docid": "0fd545747cfa97d8d932ba272d2a618c", "score": "0.5209221", "text": "function CallbackQueue() {\n this._callbacks = null;\n this._contexts = null;\n}", "title": "" }, { "docid": "0fd545747cfa97d8d932ba272d2a618c", "score": "0.5209221", "text": "function CallbackQueue() {\n this._callbacks = null;\n this._contexts = null;\n}", "title": "" }, { "docid": "0fd545747cfa97d8d932ba272d2a618c", "score": "0.5209221", "text": "function CallbackQueue() {\n this._callbacks = null;\n this._contexts = null;\n}", "title": "" }, { "docid": "0fd545747cfa97d8d932ba272d2a618c", "score": "0.5209221", "text": "function CallbackQueue() {\n this._callbacks = null;\n this._contexts = null;\n}", "title": "" }, { "docid": "0fd545747cfa97d8d932ba272d2a618c", "score": "0.5209221", "text": "function CallbackQueue() {\n this._callbacks = null;\n this._contexts = null;\n}", "title": "" }, { "docid": "0fd545747cfa97d8d932ba272d2a618c", "score": "0.5209221", "text": "function CallbackQueue() {\n this._callbacks = null;\n this._contexts = null;\n}", "title": "" }, { "docid": "0fd545747cfa97d8d932ba272d2a618c", "score": "0.5209221", "text": "function CallbackQueue() {\n this._callbacks = null;\n this._contexts = null;\n}", "title": "" }, { "docid": "0fd545747cfa97d8d932ba272d2a618c", "score": "0.5209221", "text": "function CallbackQueue() {\n this._callbacks = null;\n this._contexts = null;\n}", "title": "" }, { "docid": "0fd545747cfa97d8d932ba272d2a618c", "score": "0.5209221", "text": "function CallbackQueue() {\n this._callbacks = null;\n this._contexts = null;\n}", "title": "" }, { "docid": "0fd545747cfa97d8d932ba272d2a618c", "score": "0.5209221", "text": "function CallbackQueue() {\n this._callbacks = null;\n this._contexts = null;\n}", "title": "" }, { "docid": "0fd545747cfa97d8d932ba272d2a618c", "score": "0.5209221", "text": "function CallbackQueue() {\n this._callbacks = null;\n this._contexts = null;\n}", "title": "" }, { "docid": "0fd545747cfa97d8d932ba272d2a618c", "score": "0.5209221", "text": "function CallbackQueue() {\n this._callbacks = null;\n this._contexts = null;\n}", "title": "" }, { "docid": "0fd545747cfa97d8d932ba272d2a618c", "score": "0.5209221", "text": "function CallbackQueue() {\n this._callbacks = null;\n this._contexts = null;\n}", "title": "" }, { "docid": "6a3431ecc97cefd9a66745d44b5a972f", "score": "0.51749414", "text": "cs(t) {\n if (0 === this._n.length) \n // As an index this is past the end of the queue\n return 0;\n // Examine the front of the queue to figure out the difference between the\n // batchId and indexes in the array. Note that since the queue is ordered\n // by batchId, if the first batch has a larger batchId then the requested\n // batchId doesn't exist in the queue.\n return t - this._n[0].batchId;\n }", "title": "" }, { "docid": "36fe3bcb54da786c9520aea0fb5b3cd1", "score": "0.51367575", "text": "constructor(updateIntervalMS, onUpdateCallback, onCompleteCallback)\r\n\t{\r\n\t\t// Note: This should be a static, but I can't declare statics inside the class definition, so I wont bother.\r\n\t\tthis.statusList = {none: 0, unstarted: 1, started: 2, paused: 3, stopped: 4};\r\n\r\n\t\tthis.updateInterval = updateIntervalMS;\r\n\t\tthis.updateCallback = onUpdateCallback;\r\n\t\tthis.completeCallback = onCompleteCallback;\r\n\r\n\t\tthis.timerStatus = this.statusList.unstarted;\r\n\r\n\t\tthis.remainingTimeMS = 0;\r\n\t\tthis.storedRemainingTime = 0;\r\n\t\tthis.currentStartTime = Date.now();\r\n\t\tthis.timerInterval = null;\r\n\t\tthis.intervalOffsetMS = 0;\r\n\t}", "title": "" }, { "docid": "6b0977ddfe1a7a3e6392313858c277fd", "score": "0.5130062", "text": "function processBatchDataChangeQueue()\n {\n // Ensure that there are queued changes\n if (queuedBatchDataChanges.length == 0)\n {\n return;\n }\n\n var q = queuedBatchDataChanges;\n var cmc = queuedCollectionModelChanges;\n\n queuedBatchDataChanges = [];\n queuedCollectionModelChanges = {};\n\n // Process the changes\n handleDataChangeImpl(q, cmc);\n }", "title": "" } ]
84fa1dedd477c157deb68cbb4fe6ba90
Validates a number is an integer.
[ { "docid": "862417be667f721ba6f8f196b38ee963", "score": "0.0", "text": "function integer(rule, value, callback, source, options) {\n\t\t var errors = [];\n\t\t var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n\t\t if (validate) {\n\t\t if ((0, _util.isEmptyValue)(value) && !rule.required) {\n\t\t return callback();\n\t\t }\n\t\t _rule2[\"default\"].required(rule, value, source, errors, options);\n\t\t if (value !== undefined) {\n\t\t _rule2[\"default\"].type(rule, value, source, errors, options);\n\t\t _rule2[\"default\"].range(rule, value, source, errors, options);\n\t\t }\n\t\t }\n\t\t callback(errors);\n\t\t}", "title": "" } ]
[ { "docid": "b0639077d48ba8e571d91afca904ba70", "score": "0.78734964", "text": "function isInt(n) {\n var reInt = new RegExp(/^\\d+$/);\n if (!reInt.test(n)) {\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "e262b94265cb51a89b16cc2ed588ecea", "score": "0.78347313", "text": "function is_int(value) { return ((parseFloat(value) == parseInt(value)) && !isNaN(value)) }", "title": "" }, { "docid": "64fa6ea87d57413cb5f3616437150bb5", "score": "0.78035325", "text": "function is_integer(value) {\n return !isNaN(value) && \n parseInt(Number(value)) == value && \n !isNaN(parseInt(value, 10));\n}", "title": "" }, { "docid": "3129beae20f879befc06a6902d2de6ea", "score": "0.779209", "text": "function isInt(num) {\n return !isNaN(num) &&\n parseInt(Number(num)) == num &&\n !isNaN(parseInt(num, 10));\n}", "title": "" }, { "docid": "3fb05a927076d4c4a5035bbc50d29eaa", "score": "0.7751325", "text": "function isInt(value) {\n return !isNaN(value) && parseInt(Number(value)) == value && !isNaN(parseInt(value, 10));\n}", "title": "" }, { "docid": "bc978f8c69c355b693fa0ba1b2701227", "score": "0.77430856", "text": "function isInteger(value) {\n return /^\\d+$/.test(value);\n}", "title": "" }, { "docid": "20499c4c60915c242b6a6a2b6d493dc9", "score": "0.77364993", "text": "function isInteger(value) {\n return /^[0-9]+$/.test(value);\n}", "title": "" }, { "docid": "48f02f685bf959eb3dc3fa7d67d905a2", "score": "0.77276814", "text": "function isInt(value) {\n return !isNaN(value) && \n parseInt(Number(value)) == value && \n !isNaN(parseInt(value, 10));\n}", "title": "" }, { "docid": "133617a181329f81ea7ec46b556ee315", "score": "0.7702812", "text": "function isInt(value)\n{\n return !isNaN(value) &&\n parseInt(Number(value)) == value &&\n !isNaN(parseInt(value,10));\n}", "title": "" }, { "docid": "8e209456738cfe40709a0d89e98f3575", "score": "0.76688427", "text": "function isInt(value) {\n return !isNaN(value) && \n parseInt(Number(value)) == value && \n !isNaN(parseInt(value, 10));\n}", "title": "" }, { "docid": "b34a71321fa2122e4f84c57fb64a9b8e", "score": "0.76467943", "text": "function checkInteger(num) {\n\tlet valid = true;\n\tif (isNaN(num)) {\n\t\tvalid = false;\n\t} else {\n\t\tif (isNaN(parseInt(num))) {\n\t\t\tvalid = false;\n\t\t}\n\t}\n\treturn valid;\n}", "title": "" }, { "docid": "5f5cd9ea1926f17c5caed6748a858283", "score": "0.7627463", "text": "function isInteger(val) {\n return val.match(/^[0-9]$/);\n}", "title": "" }, { "docid": "03f563aca5fe9a7c3d3ef88a9a545888", "score": "0.7586451", "text": "function isInt(value) {\n return !isNaN(parseInt(value,10)) && (parseFloat(value,10) == parseInt(value,10));\n }", "title": "" }, { "docid": "d8111f000005e38f78ec0e2fc77ce21e", "score": "0.7584163", "text": "static vaidateInt(num){\n return Number.isInteger(num);\n }", "title": "" }, { "docid": "97b85cb312dd1d3158034bb5b7754bae", "score": "0.75467384", "text": "function validateInteger(value) {\n\tvar integer = Number.isInteger(parseFloat(value));\n\tvar sign = Math.sign(value)\n\n\tif (integer && (sign === 1)) {\n\t\treturn true\n\t} else {\n\t\treturn 'Please enter a whole non-zero number.'\n\t}\n}", "title": "" }, { "docid": "ef457e1df9c9d609041712deb950e679", "score": "0.7545861", "text": "function is_int(value)\n{ \n return (parseFloat(value) == parseInt(value)) && !isNaN(value)\n}", "title": "" }, { "docid": "4505681db50f4aee4055cb2ddc280166", "score": "0.75336444", "text": "function isInt( something ){\n\treturn !isNaN(parseInt(something)) && isFinite(something);\n}", "title": "" }, { "docid": "7645d6a4d3d3c2782d9a087cce8b6bba", "score": "0.75191927", "text": "function is_int(value){ \n if((parseFloat(value) == parseInt(value)) && !isNaN(value)){\n return true;\n } else { \n return false;\n } \n }", "title": "" }, { "docid": "89ce8465a076e9d773295d8ad34e064e", "score": "0.7412304", "text": "function is_integer(n) {\n return typeof (n) == \"number\" && Math.floor(n) == n;\n}", "title": "" }, { "docid": "0189af2eaa3ee23ab775e697390f555e", "score": "0.7400459", "text": "function isInteger(value){\n return Number.isInteger(value);\n }", "title": "" }, { "docid": "dabddc4f2083e00195864d9f70d33ddb", "score": "0.7391056", "text": "function isInt(val) // {{{\n {\n return val.match(/^-?[0-9]+$/) && true || false;\n }", "title": "" }, { "docid": "9a5e12b1f83a996664ea4ec408e45549", "score": "0.7355908", "text": "function _isInteger( _int ) { \n return parseInt( _int ) === _int; \n}", "title": "" }, { "docid": "3d27272e5edb26c256c346817f7b2638", "score": "0.7349468", "text": "function isInteger(value) {\n if ((parseFloat(value) == parseInt(value)) && !isNaN(value)) {\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "6b8ec943cf897a7d830cd567f141d8da", "score": "0.7346698", "text": "function isInt(n){\n\t\t\t\treturn Math.floor(n) == n;\n\t\t\t}", "title": "" }, { "docid": "3c34257c95a8b4736147be2803bda025", "score": "0.73457545", "text": "function isInt(value) {\n const x = parseFloat(value);\n return !isNaN(value) && (x | 0) === x;\n}", "title": "" }, { "docid": "0273ce1eb17efcc904488cae5a27db0d", "score": "0.7340755", "text": "function isInt(value) {\n var x = parseFloat(value);\n return !isNaN(value) && (x | 0) === x;\n}", "title": "" }, { "docid": "e5e5b8f16ca48d3508109ba767976dbb", "score": "0.7331504", "text": "function isInteger({ unsafe = false, } = {}) {\n return makeValidator({\n test: (value, state) => {\n if (value !== Math.round(value))\n return pushError(state, `Expected to be an integer (got ${value})`);\n if (!unsafe && !Number.isSafeInteger(value))\n return pushError(state, `Expected to be a safe integer (got ${value})`);\n return true;\n },\n });\n}", "title": "" }, { "docid": "b67fe46783bd607589e263570383f874", "score": "0.73281956", "text": "function isInt(value) {\n var x;\n if (isNaN(value)) {\n return false;\n }\n x = parseFloat(value);\n return (x | 0) === x;\n}", "title": "" }, { "docid": "b743fb7b9cdc9d7897eb1f7972c264c1", "score": "0.7292253", "text": "function checkIfInteger(str) { \r\n\treturn (/^\\d+$/).test(str);\r\n}", "title": "" }, { "docid": "48ea31ed2e8d1e7ff7ba3069dd2acf6f", "score": "0.7263891", "text": "function isInteger(value) {\n return typeof value === 'number' && isFinite(value) && Math.floor(value) === value;\n}", "title": "" }, { "docid": "c61f818a2a5eda24ebbfb4732a94628a", "score": "0.72579515", "text": "function isInt(n) {\n return n === Math.floor(n);\n}", "title": "" }, { "docid": "69adf34924d5b4531019cf00dc7c81cf", "score": "0.7254241", "text": "function isInteger(value) {\n return typeof value === 'number' &&\n isFinite(value) &&\n Math.floor(value) === value;\n}", "title": "" }, { "docid": "ee8c1fe56057bff21a6539739f2e5990", "score": "0.7245275", "text": "isInt(userNumberChoice){\n let numberCheck = /^-?[0-9]+$/;\n let intCheck = numberCheck.test(userNumberChoice);\n if (intCheck == true){\n return true;\n }\n else{\n console.log('Please enter a number.');\n return false;\n }\n }", "title": "" }, { "docid": "bcd316049e1b67e6046b56101fbf16fe", "score": "0.72403306", "text": "function isInt(value) {\n if (isNaN(value)) {\n return false;\n }\n const x = parseFloat(value);\n // tslint:disable-next-line:no-bitwise\n return (x | 0) === x;\n}", "title": "" }, { "docid": "bcd316049e1b67e6046b56101fbf16fe", "score": "0.72403306", "text": "function isInt(value) {\n if (isNaN(value)) {\n return false;\n }\n const x = parseFloat(value);\n // tslint:disable-next-line:no-bitwise\n return (x | 0) === x;\n}", "title": "" }, { "docid": "f1fdf9f0f73ad3097758d9b3c9c5c68c", "score": "0.7238692", "text": "function isInteger(value) {\n return typeof value === 'number' && isFinite(value) && Math.floor(value) === value;\n}", "title": "" }, { "docid": "f1fdf9f0f73ad3097758d9b3c9c5c68c", "score": "0.7238692", "text": "function isInteger(value) {\n return typeof value === 'number' && isFinite(value) && Math.floor(value) === value;\n}", "title": "" }, { "docid": "f1fdf9f0f73ad3097758d9b3c9c5c68c", "score": "0.7238692", "text": "function isInteger(value) {\n return typeof value === 'number' && isFinite(value) && Math.floor(value) === value;\n}", "title": "" }, { "docid": "0956f59eca6f6bf1824d1591b7e76d34", "score": "0.7231747", "text": "function isInteger(value) {\n return typeof value === 'number' && parseInt(value.toString(), 10) === value;\n}", "title": "" }, { "docid": "3821a1323ec1b288951db4674df24654", "score": "0.72236145", "text": "function isInteger(value) {\n return Number.isInteger(value);\n}", "title": "" }, { "docid": "eeb3264df8a6c18d1f9952f3b33198ce", "score": "0.7193409", "text": "function isInteger(value) {\n if (isNaN(value)) {\n return false;\n }\n var x = parseFloat(value);\n return (x | 0) === x;\n }", "title": "" }, { "docid": "c5eed6bfd3f44f0ba4855ffa60f7f7e1", "score": "0.7186264", "text": "function isInteger(it){\n return !$.isObject(it) && _isFinite(it) && floor(it) === it;\n }", "title": "" }, { "docid": "80f64b4b5337cbbdce2a2ae5c35e4b0a", "score": "0.71801734", "text": "function isValidNumber(input) {\n return typeof input === \"number\" && isFinite(input);\n }", "title": "" }, { "docid": "80f64b4b5337cbbdce2a2ae5c35e4b0a", "score": "0.71801734", "text": "function isValidNumber(input) {\n return typeof input === \"number\" && isFinite(input);\n }", "title": "" }, { "docid": "de79d29ec99e4d380d36c8074b480644", "score": "0.7177827", "text": "function isValidNumber ( input ) {\n return typeof input === 'number' && isFinite( input );\n }", "title": "" }, { "docid": "de79d29ec99e4d380d36c8074b480644", "score": "0.7177827", "text": "function isValidNumber ( input ) {\n return typeof input === 'number' && isFinite( input );\n }", "title": "" }, { "docid": "8be41aee27c26aebefa55f8615af698d", "score": "0.71702677", "text": "function isIntegerNumber(val) {\n if (val instanceof Number)\n val = val.valueOf();\n // eslint-disable-next-line compat/compat\n if (typeof val === 'number')\n return Number.isInteger ? Number.isInteger(val) : isFinite(val) && Math.floor(val) === val;\n return false;\n}", "title": "" }, { "docid": "39d19da8b56e33465dc029db4ea21423", "score": "0.71689", "text": "function isInt(value) {\n if ((0,is_string/* isString */.H)(value) && (0,is_numeric/* isNumeric */.k)(value)) {\n value = parseFloat(value);\n }\n return typeof value === 'number' && Number.isFinite(value) && !(value % 1);\n}", "title": "" }, { "docid": "eebf33b48cfd5066ce476ac73fd38abc", "score": "0.71609676", "text": "function isValidNumber ( input ) {\n\t\treturn typeof input === 'number' && isFinite( input );\n\t}", "title": "" }, { "docid": "eebf33b48cfd5066ce476ac73fd38abc", "score": "0.71609676", "text": "function isValidNumber ( input ) {\n\t\treturn typeof input === 'number' && isFinite( input );\n\t}", "title": "" }, { "docid": "eebf33b48cfd5066ce476ac73fd38abc", "score": "0.71609676", "text": "function isValidNumber ( input ) {\n\t\treturn typeof input === 'number' && isFinite( input );\n\t}", "title": "" }, { "docid": "eebf33b48cfd5066ce476ac73fd38abc", "score": "0.71609676", "text": "function isValidNumber ( input ) {\n\t\treturn typeof input === 'number' && isFinite( input );\n\t}", "title": "" }, { "docid": "ff9c3b09f3c4776b254507cb82a44ce3", "score": "0.7142806", "text": "function isValidNumber ( input ) {\r\n\t\treturn typeof input === 'number' && isFinite( input );\r\n\t}", "title": "" }, { "docid": "865ee69de8155768f77988d36c98358b", "score": "0.71401113", "text": "function validateInteger(form) {\r\n\t\treturn validateAnyNumber(form, 'Integer', 2147483647);\r\n\t}", "title": "" }, { "docid": "0f69241ab92876310124d4510b273113", "score": "0.713319", "text": "function isInteger(value) {\n return isFinite(value) && Math.floor(value) === value;\n}", "title": "" }, { "docid": "d66feaefdf373c408b4a464e15996e83", "score": "0.7105086", "text": "function isInteger(e) {\n var regular = /^\\+?[1-9][0-9]*$/;\n isNumber(e, regular);\n}", "title": "" }, { "docid": "8a2a27288f90f0024f9b31d8ec36ac6f", "score": "0.70969963", "text": "function looksLikeInt(val) {\n return String(val) === String(parseInt(val));\n}", "title": "" }, { "docid": "a422384fc961a149c2d11921f5f152e2", "score": "0.7062368", "text": "function isInteger(n) { return u.isNumber(n) ? n%1===0 : false }", "title": "" }, { "docid": "edd41ee6c81b4a34bd33424b39d2f40a", "score": "0.70544195", "text": "function isInteger(it) {\n\t return !$.isObject(it) && _isFinite(it) && floor(it) === it;\n\t}", "title": "" }, { "docid": "aef07a725b0c9d6b3f0b7bf91e0c2d55", "score": "0.7028918", "text": "function isInteger(val) {\n return (isNumber(val) &&\n (val % 1 === 0));\n}", "title": "" }, { "docid": "b257ffe0e1733288e3dcc448eb9f285a", "score": "0.7027516", "text": "function numberValidator(number){\n return Number(number) > 0;\n}", "title": "" }, { "docid": "b09c42822df8eaa5bf36c7c69877c319", "score": "0.6967903", "text": "function isInteger(value) {\n return Boolean(String(value).indexOf('.') === -1 && Number.isInteger(Number(value)));\n}", "title": "" }, { "docid": "4dc15f29cd1e77a18423ea359e1039dc", "score": "0.69598645", "text": "function isInteger(value) {\n // +1 done to silence js-lint.\n return value % +1 === 0;\n }", "title": "" }, { "docid": "1519bffb13350fc756e29bf026f87ead", "score": "0.69480693", "text": "function isInteger(x) {\n return x === parseInt(x.toString(), 10);\n}", "title": "" }, { "docid": "aa0de8aba74f4f70693c1caa145ab320", "score": "0.6947756", "text": "function isInteger(value) {\n if (isNaN(value)) {\n return false;\n }\n var floatValue = parseFloat(value);\n return (floatValue | 0) === floatValue;\n}", "title": "" }, { "docid": "780b6b55c0d5bd3ab9ad2bd5113137fd", "score": "0.6945424", "text": "function isInteger(inpString){\r\n\ttry{\r\n\t\tvar intPattern= /[^0-9]/\r\n\t\tif(intPattern.test(inpString) == false){\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}catch(err){\r\n\t\talert(\"error in /js/common.js.isInteger() \"+err.description);\r\n\t}\r\n}", "title": "" }, { "docid": "c21dc86e19d30ca0e797b6d044727c1e", "score": "0.69169235", "text": "function isInt(val){\n // parse value for int and float will be the same if the value is actually an int\n if((parseFloat(val) == parseInt(val)) && !isNaN(val)){\n return true;\n } else { \n return false;\n } \n }", "title": "" }, { "docid": "0475943bf2a766eaee577828a73a8d5f", "score": "0.6914091", "text": "function isInteger(param) {\n return (Math.floor(param) == param && $.isNumeric(param));\n}", "title": "" }, { "docid": "dfa376a4c2686b31734512bee399b268", "score": "0.6908062", "text": "function isInt(n) {\n // http://stackoverflow.com/questions/3885817/how-do-i-check-that-a-number-is-float-or-integer\n return n % 1 === 0;\n}", "title": "" }, { "docid": "5752b15c054f7e83bd1cb7fa69df58b8", "score": "0.69060665", "text": "function fnIsIntNum(strNum)\n{\nvar strCheckNum = strNum + \"\";\nif(strCheckNum.length < 1) //????\nreturn false;\nelse if(strCheckNum.charAt(0)=='0')\nstrCheckNum = strCheckNum.substring(1);\nelse if(isNaN(strCheckNum)) //????\nreturn false;\nelse if(parseInt(strCheckNum,10) < 1) //????\nreturn false; \nelse if(parseFloat(strCheckNum) > parseInt(strCheckNum,10)) //???? \nreturn false;\n\nreturn true;\n}", "title": "" }, { "docid": "c5887885cbeafea4e89fc8df807aecdb", "score": "0.6882214", "text": "function validateNumber(val){\n var re = /^\\d+$/;\n return re.test(val);\n}", "title": "" }, { "docid": "03fd62de504a2d0ceadb3441d04cc732", "score": "0.6869412", "text": "function isInteger (x) {\n\treturn Math.floor(x) === x; \n}", "title": "" }, { "docid": "7defc0d82a469058b5356742ef5c8789", "score": "0.6866287", "text": "function isNum(questionable) {\n return '0' <= questionable && questionable <= '9';\n}", "title": "" }, { "docid": "7ec3a0e0825ef3ef8feda2bb71445b5b", "score": "0.6858428", "text": "function isInteger(val){\n return isNumber_1(val) && (val % 1 === 0);\n }", "title": "" }, { "docid": "c16d7f3bcf066358d431e4180c5dea43", "score": "0.68527794", "text": "function validateInteger(answer) {\n if (answer != '' && !isNaN(parseInt(answer))) { \n return true;\n }\n return false;\n}", "title": "" }, { "docid": "bb9231010d8969abdfbcbe5d69f4971c", "score": "0.68497175", "text": "function isValidNumber(value){\n return typeof(value) === 'number' && !isNaN(value);\n}", "title": "" }, { "docid": "0ab097f43edae07d5fd23881957daa35", "score": "0.68457884", "text": "function isInt(num) {\n return num % 1 === 0;\n }", "title": "" }, { "docid": "383e015a781e6878cf4b6cf60234979f", "score": "0.68229437", "text": "function check_int(val, min, max) {\n assert.ok(typeof(val) == 'number' && val >= min && val <= max && Math.floor(val) === val, \"not a number in the required range\");\n}", "title": "" }, { "docid": "820fc32f172a92dabd3cf46ea93130e3", "score": "0.6805353", "text": "function isInteger(num) {\n if (typeof(Number.isInteger) === \"function\") {\n return Number.isInteger(num);\n }\n return (num ^ 0) === num;\n}", "title": "" }, { "docid": "62dcfab3c7916a3ad107a3384ff57689", "score": "0.6805322", "text": "function isInteger(n) {\n return n === +n && n === (n|0);\n }", "title": "" }, { "docid": "3b42157a4e9fc42857beacbc959a1a84", "score": "0.67909396", "text": "function isInt(num) {\n return num % 1 === 0;\n}", "title": "" }, { "docid": "016ab13b9b091fdda89b9f7c0e953088", "score": "0.6782251", "text": "checkInt(narg) {\n return this.checkNumber(narg);\n }", "title": "" }, { "docid": "4430ae0c306d5cafcccbc563d1c2cb47", "score": "0.677912", "text": "function _isInteger(val) {\n var digits=\"1234567890\";\n for (var i=0; i < val.length; i++) {\n if (digits.indexOf(val.charAt(i))==-1) { return false; }\n }\n return true;\n }", "title": "" }, { "docid": "8f79b2a95834c23bb7cc8287ae1d1c0c", "score": "0.6774072", "text": "function validateInteger(value, allowNull, minimumValue, maximumValue) {\n\n // check for null values\n if (value.trim() === \"\") {\n return allowNull;\n }\n\n // match against a numeric regular expression\n var matches = /^([0-9]{1,6})$/.exec(value);\n if (matches === null) {\n return false;\n }\n\n // check for the minimum and maximum values\n var numericValue = parseInt(matches[0]);\n if (numericValue < minimumValue || numericValue > maximumValue) {\n return false;\n }\n\n // the property is valid\n return true;\n\n}", "title": "" }, { "docid": "e08f8e314a3764ea3e56d62e4fb0b250", "score": "0.677289", "text": "function isInteger(fieldObject){\t\t\n\t var fieldValue= fieldObject.value;\t\n\t var reg = new RegExp(\"^(([0-9]+)?)$\");\t\n\t if (reg.test(fieldValue)){\t\t\t\t\n\t\t\treturn true;\n\t\n\t }else{ \n\t\t\talert(\"Please Enter a valid Number for \"+fieldObject.name);\n\t\t\tfieldObject.focus(); \n\t\t\tfieldObject.value=\"\";\n\t\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "e386f6dd4c3b7a514633d5935a5f9a10", "score": "0.6768692", "text": "function fnIsInteger(input){\n return Number.isInteger(input);\n}", "title": "" }, { "docid": "8607c3115969b0f8882d795bc8f247f6", "score": "0.67639166", "text": "function isInteger(value) {\n if (Number.isInteger) {\n return Number.isInteger(value);\n }\n\n return _isInteger(value);\n}", "title": "" }, { "docid": "f8c255649359801ec05292153e4f85b0", "score": "0.6759738", "text": "function isInt(n) {\n if (+n) {\n return +n == n && !(n % 1) && n > 0;\n }\n return false;\n }", "title": "" }, { "docid": "c71b24456eef0e252a134797ad138c07", "score": "0.67554027", "text": "static isInteger(val) {\n\t\treturn Type.isNumber(val) && (val % 1 === 0);\n\t}", "title": "" }, { "docid": "2d51ce59b26599967e75c9936f5e4403", "score": "0.67492294", "text": "function isNumber() {\n return makeValidator({\n test: (value, state) => {\n var _a;\n if (typeof value !== `number`) {\n if (typeof (state === null || state === void 0 ? void 0 : state.coercions) !== `undefined`) {\n if (typeof (state === null || state === void 0 ? void 0 : state.coercion) === `undefined`)\n return pushError(state, `Unbound coercion result`);\n let coercion;\n if (typeof value === `string`) {\n let val;\n try {\n val = JSON.parse(value);\n }\n catch (_b) { }\n // We check against JSON.stringify that the output is the same to ensure that the number can be safely represented in JS\n if (typeof val === `number`) {\n if (JSON.stringify(val) === value) {\n coercion = val;\n }\n else {\n return pushError(state, `Received a number that can't be safely represented by the runtime (${value})`);\n }\n }\n }\n if (typeof coercion !== `undefined`) {\n state.coercions.push([(_a = state.p) !== null && _a !== void 0 ? _a : `.`, state.coercion.bind(null, coercion)]);\n return true;\n }\n }\n return pushError(state, `Expected a number (got ${getPrintable(value)})`);\n }\n return true;\n },\n });\n}", "title": "" }, { "docid": "533f657fa951f8c5aff99da710d47e60", "score": "0.67465216", "text": "function isInteger(n) {\n return $.isNumeric(n) && n % 1 === 0;\n}", "title": "" }, { "docid": "2891dff6e41f064ed22a8704e62a841d", "score": "0.67431355", "text": "function intCheck(n, min, max, name) {\n if (n < min || n > max || n !== mathfloor(n)) {\n throw Error\n (bignumberError + (name || 'Argument') + (typeof n == 'number'\n ? n < min || n > max ? ' out of range: ' : ' not an integer: '\n : ' not a primitive number: ') + String(n));\n }\n }", "title": "" }, { "docid": "a171c6071aad96a58dce13009e2e1dea", "score": "0.6740149", "text": "function checkIfPositiveInteger(value) {\n if (Math.floor(value) == value && $.isNumeric(value) && value > 0) {\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "210937b2af25df3091bfecfec236d030", "score": "0.6729087", "text": "function typeCheckInteger(param, paramName) {\n if (typeof param !== 'number') {\n throw new error.InvalidParameterError('Paramter: ' + paramName + 'must be an integer.');\n }\n}", "title": "" }, { "docid": "8b04de93849390b4ba9146c24fb1a5a8", "score": "0.67284036", "text": "function validateNum(number){\n var numRe = /^[0-9]+$/;\n return numRe.test(String(number));\n}", "title": "" }, { "docid": "f0a9f3d2b955d4504cbfee66f7b89d4a", "score": "0.6726702", "text": "function intCheck(n, min, max, name) {\n if (n < min || n > max || n !== (n < 0 ? mathceil(n) : mathfloor(n))) {\n throw Error\n (bignumberError + (name || 'Argument') + (typeof n == 'number'\n ? n < min || n > max ? ' out of range: ' : ' not an integer: '\n : ' not a primitive number: ') + n);\n }\n }", "title": "" }, { "docid": "8f5a513b3714523f3c038a8506ce75fe", "score": "0.67150134", "text": "function is_integer(value)\r\n{\r\n\tvar str = value + \"\";\r\n\tif (str.match(/^-?\\d+$/)) {\r\n\t\tvar num = +value;\r\n\t\tif (num >= -32768 && num <= 32767) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}\r\n\treturn false;\r\n}", "title": "" }, { "docid": "f0a8af95eaefcbd36982b12bcdf92d13", "score": "0.67007416", "text": "function intValidatorWithErrors(n,min,max,caller,name){if(n<min||n>max||n!=truncate(n)){raise(caller,(name||'decimal places')+(n<min||n>max?' out of range':' not an integer'),n);}return true;}", "title": "" }, { "docid": "f0a8af95eaefcbd36982b12bcdf92d13", "score": "0.67007416", "text": "function intValidatorWithErrors(n,min,max,caller,name){if(n<min||n>max||n!=truncate(n)){raise(caller,(name||'decimal places')+(n<min||n>max?' out of range':' not an integer'),n);}return true;}", "title": "" }, { "docid": "f0a8af95eaefcbd36982b12bcdf92d13", "score": "0.67007416", "text": "function intValidatorWithErrors(n,min,max,caller,name){if(n<min||n>max||n!=truncate(n)){raise(caller,(name||'decimal places')+(n<min||n>max?' out of range':' not an integer'),n);}return true;}", "title": "" }, { "docid": "f7e290736bbb3ed51f1bf842eb5cf79f", "score": "0.66973615", "text": "function isNumber(num) {\n var reg = new RegExp(\"^[0-9]*$\");\n return reg.test(num);\n}", "title": "" } ]
847e23adc1934edd5e1fc75f1bf1aed0
Plug in your RNG constructor here
[ { "docid": "681bc9a2b8866aaf25fe709a58f7a69c", "score": "0.0", "text": "function prng_newstate() {\n\t\t return new Arcfour();\n\t\t}", "title": "" } ]
[ { "docid": "4908d57b8c61d4ea2af124d20fe4bd29", "score": "0.73984", "text": "function RNG(stream) {\n this._stream = stream;\n}", "title": "" }, { "docid": "67b986b924dcb853982ca2c445403b10", "score": "0.733239", "text": "function rng() {\n return random();\n } // updates generator with a new instance of a seeded pseudo random number generator", "title": "" }, { "docid": "fe5ffd3b2c60aa1602b81da824102725", "score": "0.7138282", "text": "function SeededRandom(){}", "title": "" }, { "docid": "61b07bb00c15029ddccbcf0e817d212c", "score": "0.70892936", "text": "function Random(internalRng) {\r\n this.internalRng = internalRng;\r\n }", "title": "" }, { "docid": "18c05267bd83612defab11ed31e063f7", "score": "0.7059723", "text": "function rng() {\n return random();\n }", "title": "" }, { "docid": "18c05267bd83612defab11ed31e063f7", "score": "0.7059723", "text": "function rng() {\n return random();\n }", "title": "" }, { "docid": "d886bd46d0b1008561caaa6b510eb1aa", "score": "0.6983335", "text": "function rng () {\n return random()\n }", "title": "" }, { "docid": "0d0d1e758a72a810b07df2ae3c06dd6e", "score": "0.6958095", "text": "function RNG(seed) {\n\tthis.mMers = new MersenneTwister(); // a reference to a mersenne twister (see mersenne-twister.js)\n\tthis.SetSeed(seed);\n}", "title": "" }, { "docid": "de9a154878f535b991a3ccf31ac02aa7", "score": "0.6944014", "text": "function rng() {\n return random();\n }", "title": "" }, { "docid": "de9a154878f535b991a3ccf31ac02aa7", "score": "0.6944014", "text": "function rng() {\n return random();\n }", "title": "" }, { "docid": "8123ffd3e669f3fd77a4e52a97aa921d", "score": "0.680501", "text": "function reset() {\n pls = new RandGen(1324);\n // pls = new gen(1324);\n }", "title": "" }, { "docid": "bca6f92f1f9b2fc667affd5eef2f938d", "score": "0.6693145", "text": "init() {\n this.thinking = Math.round(Math.random() * 100 + 1);\n }", "title": "" }, { "docid": "a9c74d09d3326b4ca3f14482e542ba6b", "score": "0.66901046", "text": "reset() {\n this.generator = Math.random\n }", "title": "" }, { "docid": "a3d34857015fe340e7d07dcff8b6d241", "score": "0.66764385", "text": "function rnd() \n{\n\t\t\n rnd.seed = (rnd.seed*9301+49297) % 233280;\n return rnd.seed/(233280.0);\n}", "title": "" }, { "docid": "819e46a52119b1cbbaa049ca8f557440", "score": "0.6615744", "text": "constructor(generator) {\n this.generator = generator;\n }", "title": "" }, { "docid": "e62c14c6f9623f64b8a381dbd49d518a", "score": "0.6582395", "text": "function rng_seed_time() {\r\n rng_seed_int(new Date().getTime());\r\n}", "title": "" }, { "docid": "358e613020ee3e44fedb0d4e586290e7", "score": "0.65425086", "text": "_random() {\n return Math.rnd();\n }", "title": "" }, { "docid": "6a5aef851b7aaf00ce651bf645a25b52", "score": "0.6535012", "text": "function init() {\n const randomNumber = genRandom();\n return number;\n}", "title": "" }, { "docid": "7273697e0e68270a8d6f4fbb99a3d810", "score": "0.65324277", "text": "function Random(seed) {\n\t this._seed = seed % MAX_INT32;\n\t if(this._seed <= 0) {\n\t this._seed += (MAX_INT32 - 1);\n\t }\n\t}", "title": "" }, { "docid": "3ef7f0a446f5164d07f22bafbcae7ade", "score": "0.6515502", "text": "function ToyPrng(seed) {\n // Seed setter.\n this.setSeed = function(seed) {\n // Convert to number, or NaN if not a number (or undefined)\n seed = +seed;\n // Check for invalid seeds. Includes 0 and multiples of pi.\n if (! seed || seed === Infinity || seed === -Infinity ||\n seed === seed/Math.PI === Math.floor(seed/Math.PI)) {\n console.log('Error: Invalid PRNG seed.');\n return false;\n } else {\n this._seed = seed;\n }\n };\n Object.defineProperty(this, 'seed', {\n set: this.setSeed,\n get: function() { return this._seed; },\n });\n // Set the seed on construction\n this.seed = 1;\n if (seed !== undefined) {\n this.seed = seed;\n }\n // Return a random float between 0 and 1 (including 0, not including 1).\n this.random = function() {\n this.seed++;\n var x = Math.sin(this.seed) * 10000;\n return x - Math.floor(x);\n };\n // Return a random integer between 0 and max-1 (inclusive).\n this.randInt = function(max) {\n return Math.floor(this.random() * max);\n };\n // Shuffle an array\n // From https://stackoverflow.com/a/6274381/726773\n this.shuffle = function(arr) {\n var j, x, i = arr.length;\n while (i) {\n j = this.randInt(i);\n x = arr[--i];\n arr[i] = arr[j];\n arr[j] = x;\n }\n return arr;\n };\n}", "title": "" }, { "docid": "39105fe3544befab35567e3e29ae76e4", "score": "0.6482243", "text": "function rng_seed_time() {\n rng_seed_int(new Date().getTime());\n }", "title": "" }, { "docid": "39105fe3544befab35567e3e29ae76e4", "score": "0.6482243", "text": "function rng_seed_time() {\n rng_seed_int(new Date().getTime());\n }", "title": "" }, { "docid": "223ba0d519d469bf53392a38ce85aa6e", "score": "0.6473655", "text": "function rng_seed_time() {\n rng_seed_int(new Date().getTime());\n }", "title": "" }, { "docid": "223ba0d519d469bf53392a38ce85aa6e", "score": "0.6473655", "text": "function rng_seed_time() {\n rng_seed_int(new Date().getTime());\n }", "title": "" }, { "docid": "2361ae0478ec5a1a3816f76fe9f2934a", "score": "0.647263", "text": "constructor( seed ){\n\n this.generation = 1;\n\n this.boardWidth = seed.width;\n this.boardHeight = seed.height;\n this.board = Board.initBoard(seed);\n\n }", "title": "" }, { "docid": "c7d22365d5efd19e2c33ce5f4cabc617", "score": "0.64631796", "text": "function rng_seed_time() {\n rng_seed_int(new Date().getTime());\n}", "title": "" }, { "docid": "c7d22365d5efd19e2c33ce5f4cabc617", "score": "0.64631796", "text": "function rng_seed_time() {\n rng_seed_int(new Date().getTime());\n}", "title": "" }, { "docid": "1f9e580ecd029f33ffbffac32aaa2914", "score": "0.64547926", "text": "getRNG() {\n if (!this.m_RNG) {\n this.m_RNG = seedrandom(this.getSeedString());\n }\n return this.m_RNG;\n }", "title": "" }, { "docid": "67636487863ed3bd497c43292cae2bde", "score": "0.6448152", "text": "function rng_seed_time() {\n rng_seed_int(new Date().getTime());\n }", "title": "" }, { "docid": "46f3e0d3dd833c93139d9bf471e8dec3", "score": "0.6437452", "text": "function rng_seed_time() {\n\t rng_seed_int(new Date().getTime());\n\t}", "title": "" }, { "docid": "46f3e0d3dd833c93139d9bf471e8dec3", "score": "0.6437452", "text": "function rng_seed_time() {\n\t rng_seed_int(new Date().getTime());\n\t}", "title": "" }, { "docid": "46f3e0d3dd833c93139d9bf471e8dec3", "score": "0.6437452", "text": "function rng_seed_time() {\n\t rng_seed_int(new Date().getTime());\n\t}", "title": "" }, { "docid": "46f3e0d3dd833c93139d9bf471e8dec3", "score": "0.6437452", "text": "function rng_seed_time() {\n\t rng_seed_int(new Date().getTime());\n\t}", "title": "" }, { "docid": "46f3e0d3dd833c93139d9bf471e8dec3", "score": "0.6437452", "text": "function rng_seed_time() {\n\t rng_seed_int(new Date().getTime());\n\t}", "title": "" }, { "docid": "46f3e0d3dd833c93139d9bf471e8dec3", "score": "0.6437452", "text": "function rng_seed_time() {\n\t rng_seed_int(new Date().getTime());\n\t}", "title": "" }, { "docid": "46f3e0d3dd833c93139d9bf471e8dec3", "score": "0.6437452", "text": "function rng_seed_time() {\n\t rng_seed_int(new Date().getTime());\n\t}", "title": "" }, { "docid": "46f3e0d3dd833c93139d9bf471e8dec3", "score": "0.6437452", "text": "function rng_seed_time() {\n\t rng_seed_int(new Date().getTime());\n\t}", "title": "" }, { "docid": "46f3e0d3dd833c93139d9bf471e8dec3", "score": "0.6437452", "text": "function rng_seed_time() {\n\t rng_seed_int(new Date().getTime());\n\t}", "title": "" }, { "docid": "46f3e0d3dd833c93139d9bf471e8dec3", "score": "0.6437452", "text": "function rng_seed_time() {\n\t rng_seed_int(new Date().getTime());\n\t}", "title": "" }, { "docid": "46f3e0d3dd833c93139d9bf471e8dec3", "score": "0.6437452", "text": "function rng_seed_time() {\n\t rng_seed_int(new Date().getTime());\n\t}", "title": "" }, { "docid": "46f3e0d3dd833c93139d9bf471e8dec3", "score": "0.6437452", "text": "function rng_seed_time() {\n\t rng_seed_int(new Date().getTime());\n\t}", "title": "" }, { "docid": "46f3e0d3dd833c93139d9bf471e8dec3", "score": "0.6437452", "text": "function rng_seed_time() {\n\t rng_seed_int(new Date().getTime());\n\t}", "title": "" }, { "docid": "46f3e0d3dd833c93139d9bf471e8dec3", "score": "0.6437452", "text": "function rng_seed_time() {\n\t rng_seed_int(new Date().getTime());\n\t}", "title": "" }, { "docid": "46f3e0d3dd833c93139d9bf471e8dec3", "score": "0.6437452", "text": "function rng_seed_time() {\n\t rng_seed_int(new Date().getTime());\n\t}", "title": "" }, { "docid": "46f3e0d3dd833c93139d9bf471e8dec3", "score": "0.6437452", "text": "function rng_seed_time() {\n\t rng_seed_int(new Date().getTime());\n\t}", "title": "" }, { "docid": "46f3e0d3dd833c93139d9bf471e8dec3", "score": "0.6437452", "text": "function rng_seed_time() {\n\t rng_seed_int(new Date().getTime());\n\t}", "title": "" }, { "docid": "46f3e0d3dd833c93139d9bf471e8dec3", "score": "0.6437452", "text": "function rng_seed_time() {\n\t rng_seed_int(new Date().getTime());\n\t}", "title": "" }, { "docid": "46f3e0d3dd833c93139d9bf471e8dec3", "score": "0.6437452", "text": "function rng_seed_time() {\n\t rng_seed_int(new Date().getTime());\n\t}", "title": "" }, { "docid": "46f3e0d3dd833c93139d9bf471e8dec3", "score": "0.6437452", "text": "function rng_seed_time() {\n\t rng_seed_int(new Date().getTime());\n\t}", "title": "" }, { "docid": "fac5a8df92c27d7ca1948c4ff49d3572", "score": "0.64261395", "text": "function rng_seed_time() {\n rng_seed_int(new Date().getTime());\n }", "title": "" }, { "docid": "7d6b5ea03e7e51309ff441a8c7d5c371", "score": "0.6387248", "text": "function PM_PRNG(state) {\r\n\t\tif (state === undefined) { state = 1 }\r\n\t\t// note that the normal range of initialized states is 0-2147483647\r\n\t\t// and the range of states the RNG can evolve to is 1-2147483647\r\n\t\t// the behavior of other initial states should be considered undefined\r\n\t\tthis.state = state;\r\n\r\n\t\tthis.gen = function () {\r\n\t\t\tthis.state = (this.state * 16807) % 2147483647;\r\n\t\t\treturn this.state;\r\n\t\t}\r\n\r\n\t\tthis.nextInt = function () {\r\n\t\t\treturn this.gen();\r\n\t\t}\r\n\r\n\t\tthis.nextIntRange = function(min, max) {\r\n\t\t\tmin -= 0.4999;\r\n\t\t\tmax += 0.4999;\r\n\t\t\treturn Math.round(min + (max - min) * this.nextDouble());\r\n\t\t}\r\n\r\n\t\t// equivalent to Rand.random\r\n\t\tthis.nextDouble = function() {\r\n\t\t\treturn this.gen() / 2147483647;\r\n\t\t}\r\n\r\n\t\t// equivalent to Rand.randRange\r\n\t\tthis.nextDoubleRange = function(min, max) {\r\n\t\t\treturn min + (max - min) * this.nextDouble();\r\n\t\t}\r\n\r\n\t\t// helper function for lightning strike -- from ^T.=D (LightningStrike.onEffect)\r\n\t\t// n is the number of buildings currently possessed, returns the strike tier (0-indexed)\r\n\t\tthis.strikeTier = function(n) {\r\n\t\t\treturn Math.floor(this.nextDoubleRange(0, n));\r\n\t\t}\r\n\r\n\t\t// helper function for green fingers discount -- from 4P.V (Game.onEnterFrame)\r\n\t\t// returns the percent bonus GFD applies to offline production if offline is True\r\n\t\t// returns the factor to multiply production per second by to get its bonus if offline is False\r\n\t\tthis.greenFingers = function(offline) {\r\n\t\t\tif (offline === undefined) { offline = false }\r\n\t\t\treturn offline ? this.nextDoubleRange(1,100) : this.nextDoubleRange(1,1200);\r\n\t\t}\r\n\r\n\t\t// helper function for goblin's greed -- from 1Z.=D (GoblinsGreed.onEffect)\r\n\t\t// it takes the current production per second and gem count and returns [coins, faction coins]\r\n\t\tthis.goblinsGreed = function (prod, gems) {\r\n\t\t\treturn [Math.round(self.nextDoubleRange(prod * 50, prod * 150)),\r\n\t\t\tMath.floor(self.randRange(10 + Math.log(1 + gems), 50 + Math.pow(Math.log(1 + gems), 2.75)))];\r\n\t\t}\r\n\r\n\t\t// helper function for excavations -- from 4P.4V (Game.buyExcavationProgress)\r\n\t\t// returns the possible FC reward of an excavation\r\n\t\tthis.excavationFC = function(n) {\r\n\t\t\treturn Math.floor(2 * Math.pow(Math.log(1 + (5000000 * Math.pow(1.15, n))), 3));\r\n\t\t}\r\n\t\t// helper function for excavations -- from 4P.4V (Game.buyExcavationProgress)\r\n\t\t// returns the actual FC reward based on the RNG state\r\n\t\t// n is the number purchased before, for the first excavation, n = 0\r\n\t\tthis.excavationReward = function(n){\r\n\t\t\treturn this.nextDouble() * 100 <= 35 ? this.excavationFC(n) : 0;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "80c959e886bfb1f8a27930a8a491f681", "score": "0.63852656", "text": "function init_genrand(mt, s) {\n var j, i;\n mt.state[0] = s >>> 0;\n for (j=1; j<N; j++) {\n mt.state[j] = (1812433253 * ((mt.state[j-1] ^ (mt.state[j-1] >> 30) >>> 0)) + j);\n /* See Knuth TAOCP Vol2. 3rd Ed. P.106 for multiplier. */\n /* In the previous versions, MSBs of the seed affect */\n /* only MSBs of the array state[]. */\n /* 2002/01/09 modified by Makoto Matsumoto */\n mt.state[j] &= 0xffffffff; /* for >32 bit machines */\n }\n mt.left = 1;\n mt.next = N;\n }", "title": "" }, { "docid": "b5188ed4b64e8cc48b2b331dda45f02f", "score": "0.63841575", "text": "function rng_seed_time() {\n\t\t rng_seed_int(new Date().getTime());\n\t\t}", "title": "" }, { "docid": "b5188ed4b64e8cc48b2b331dda45f02f", "score": "0.63841575", "text": "function rng_seed_time() {\n\t\t rng_seed_int(new Date().getTime());\n\t\t}", "title": "" }, { "docid": "c1b167c95c4f7f7baee98a00d0723648", "score": "0.63571995", "text": "function RandomStream(seed) {\n\n\n \n //Sets the seed of this random number generator using a single long seed. \n //The general contract of setSeed is that it alters the state of this random number generator object so as to be in exactly the same state as if it had just been created with the argument seed as a seed. \n //The method setSeed is implemented by class Random by atomically updating the seed.\n this.setSeed = function(seed) {\n var splitSeed = splitBits(seed);\n this.currentSeed = (splitSeed.bitwiseXOr(splitBits(0x5DEECE66D))).bitwiseAnd(splitBits(0xffffffffffff));\n };\n\n this.setSeed(seed); // constructor calls setSeed to initialize all attributes\n \n/* The general contract of next is that it returns an int value and if the argument bits is between 1 and 32 (inclusive), \n then that many low-order bits of the returned value will be (approximately) independently chosen bit values, each of which is (approximately) equally likely to be 0 or 1. \n The method next is implemented by class Random by atomically updating the seed. */\n\n //This is a linear congruential pseudorandom number generator, as defined by D. H. Lehmer and described by Donald E. Knuth in The Art of Computer Programming, Volume 3: Seminumerical Algorithms, section 3.2.1. \n this.next = function(bits) {\n this.currentSeed = this.currentSeed.times(splitBits(0x5DEECE66D));\n this.currentSeed = this.currentSeed.plus(splitBits(0xB));\n this.currentSeed = this.currentSeed.bitwiseAnd(splitBits(0xffffffffffff));\n if ((48-bits)<32)\n return this.currentSeed.rightShift(48-bits);\n else\n return null; //this shouldn't happen\n };\n \n //Returns the next pseudorandom, uniformly distributed int value from this random number generator's sequence. \n //The general contract of nextInt is that one int value is pseudorandomly generated and returned. All 2^32 possible int values are produced with (approximately) equal probability.\n this.nextInt = function () { \n return this.next(32).combineBits(); //essentially just calls next with 32 bits\n };\n \n //Returns a pseudorandom, uniformly distributed int value between 0 (inclusive) and the specified value (exclusive), drawn from this random number generator's sequence. \n //The general contract of nextInt is that one int value in the specified range is pseudorandomly generated and returned. All n possible int values are produced with (approximately) equal probability.\n this.nextIntRange = function (n) {\n if (n <= 0)\n return null;\n\t\n var logBase2 = Math.log(n) / Math.log(2);\n if (Math.floor(logBase2) == logBase2)\n return ((splitBits(n).times(this.next(31))).rightShift(31).combineBits());\n \n var bits, val;\n do {\n bits = this.next(31).combineBits();\n val = bits % n;\n } while (bits - val + (n-1) < 0);\n return val;\n };\n\n //Picks a random element from an array of n elements, with each element having probability of being chosen 1/n\n this.pick = function (someArray) {\n if (!someArray.length)\n return null;\n return someArray[this.nextIntRange(someArray.length)];\n }\n \n //Shuffles an array in place, with each possible permutation having equal probability 1/n!\n //This is a Fisher-Yates shuffle (also called a Knuth shuffle), described in The Art of Computer Programming 2, pp. 124-125:\n //From i=n-1 downto 1: choose j from 0 to i inclusive, and swap a[i] with a[j].\n this.shuffle = function (someArray) {\n\t for(var i=someArray.length - 1; i>=1; i--) {\n\t var j = this.nextIntRange(i+1); // nextIntRange's param is \"exclusive\", so we add one\n\t var temp=someArray[i];\n\t someArray[i]=someArray[j];\n\t someArray[j]=temp;\n\t }\n };\n \n}", "title": "" }, { "docid": "f7a39f713176643ed192535453681d9f", "score": "0.63514125", "text": "function NistRandom() {\n this.method = this.ModMethod;\n\n}", "title": "" }, { "docid": "1f5db0115c9d94212beafe0caaae29a7", "score": "0.629329", "text": "constructor(){\n this.x = random(0,width);\n this.y = random(0,height);\n this.r = random(1,8);\n this.xSpeed = random(-2,2);\n this.ySpeed = random(-1,1.5);\n }", "title": "" }, { "docid": "a2df5cdafa4ad6423d661c2592bb6557", "score": "0.6291925", "text": "next_rand() {\n this.jitter_pos *= 10;\n if (this.jitter_pos > 10000000000)\n this.jitter_pos = 10;\n return (this.jitter * this.jitter_pos) % 1;\n }", "title": "" }, { "docid": "ae17306d17f0a89a4ed273e64dc62f15", "score": "0.6270065", "text": "constructor(){\n this.x = random(0,width);\n this.y = random(0,height);\n this.r = random(1,8);\n this.xSpeed = random(-0.5,0.5);\n this.ySpeed = random(-0.1,0.1);\n }", "title": "" }, { "docid": "ebf349ffd854b28ec9fdfa0558d9ea19", "score": "0.62622285", "text": "function randomizer() {\n target = Math.floor(Math.random() * 100) + 19;\n gem1rando = Math.floor(Math.random() * 13) + 2;\n gem2rando = Math.floor(Math.random() * 13) + 2;\n gem3rando = Math.floor(Math.random() * 13) + 2;\n gem4rando = Math.floor(Math.random() * 13) + 2;\n }", "title": "" }, { "docid": "b102cf497d88fa3a23655978f1ab23e0", "score": "0.6253533", "text": "function RNJesus() {\n\tRNG = Math.floor((Math.random() * 10));\n\t//alert(\"RNG = \" + RNG);\n}", "title": "" }, { "docid": "9f88ce7a6a8a6b91c4011029304fbc9e", "score": "0.6246978", "text": "function Generator(){}", "title": "" }, { "docid": "9f88ce7a6a8a6b91c4011029304fbc9e", "score": "0.6246978", "text": "function Generator(){}", "title": "" }, { "docid": "9f88ce7a6a8a6b91c4011029304fbc9e", "score": "0.6246978", "text": "function Generator(){}", "title": "" }, { "docid": "9f88ce7a6a8a6b91c4011029304fbc9e", "score": "0.6246978", "text": "function Generator(){}", "title": "" }, { "docid": "9f88ce7a6a8a6b91c4011029304fbc9e", "score": "0.6246978", "text": "function Generator(){}", "title": "" }, { "docid": "9f88ce7a6a8a6b91c4011029304fbc9e", "score": "0.6246978", "text": "function Generator(){}", "title": "" }, { "docid": "17c944e8ef1ee2669972eb71f08666df", "score": "0.6245018", "text": "function randomGenerator(low, high) {\n if (arguments.length < 2) {\n high = low;\n low = 0;\n }\n this.low = low;\n this.high = high;\n this.reset();\n }", "title": "" }, { "docid": "ff841b985c526775fa66f985af4ddc27", "score": "0.6230205", "text": "next_rand() {\n\t\tthis.jitter_pos *= 10;\n\t\tif (this.jitter_pos > 10000000000)\n\t\t\tthis.jitter_pos = 10;\n\t\treturn (this.jitter * this.jitter_pos) % 1;\n\t}", "title": "" }, { "docid": "7ee62d0884aaf13ef940e234333716fc", "score": "0.62232137", "text": "constructor() {\n this.x = random(0, width);\n this.y = random(0, height);\n this.r = 10;\n this.xSpeed = random(-2, 2);\n this.ySpeed = random(-2, 2);\n }", "title": "" }, { "docid": "869d22b318422d0b4aa17d17b7fdb7c8", "score": "0.61977917", "text": "constructor() {\n this.x = random(0, windowWidth);\n this.y = random(0, windowHeight);\n this.r = random(0, 2.5);\n this.xSpeed = random(-0.1, 0.5);\n this.ySpeed = random(-0.1, 0.5);\n }", "title": "" }, { "docid": "2d49c249c7bdf1abaa478df36c3d2b12", "score": "0.6194104", "text": "function Random(){\n // Load Chance\n var Chance = require('chance');\n var chance = new Chance();\n // Load hat\n var hat = require('hat');\n\n this.getChance = function(){\n return chance;\n };\n\n this.getHat = function(){\n return hat;\n }\n}", "title": "" }, { "docid": "21c141338bdb4086ab1ce07c7d91bb04", "score": "0.6192815", "text": "rando() {\n randomNum = Math.floor(Math.random() * 20);\n }", "title": "" }, { "docid": "9cfa13fd2a5000230988b63b0e008049", "score": "0.6188785", "text": "generateRandomNumber() {\n return this.generateRandom(0, 10);\n }", "title": "" }, { "docid": "ac3bff93fb34f767f4feda4730f80f3d", "score": "0.6163131", "text": "constructor() {\n this.amplitude = Math.random() * (10 - 2) + 2;\n this.checkSin = this.randomBool();\n this.choice = Math.round(Math.random() * (2 - 1)) + 1;\n this.direction1 = this.randomDirection();\n this.direction2 = this.randomDirection();\n // this.length = Math.ceil(Math.random() * 500);\n this.drawnLength = 0;\n this.length = Math.random() * 40;\n }", "title": "" }, { "docid": "087025b5607124428735874e4980c64e", "score": "0.6138844", "text": "function GeneratorClass () {}", "title": "" }, { "docid": "0a071beacecf4c79d6636f369ee913e1", "score": "0.6138509", "text": "function generateRandomSeed(){\n return Math.random() * 0.73 + 0.27;\n}", "title": "" }, { "docid": "da5b3ede416a0ebedeec9a8bd0ba09d5", "score": "0.6133787", "text": "function random() {\n\t\tseed = Math.sin(seed) * 10000;\n\t\treturn seed - Math.floor(seed);\n\t}", "title": "" }, { "docid": "88506bd1436d8a570732bbb8e72e64cf", "score": "0.61182016", "text": "function initialize() {\n\t\t// target number between 19 and 120\n\t\ttargetScore = Math.floor(Math.random() * ((120-19) + 1) + 19);\n\t\t// crystal numbers between 1 and 12\n\t\tcrystalOne = Math.floor(Math.random() * ((12 - 1) + 1) + 1);\n\t\tcrystalTwo = Math.floor(Math.random() * ((12 - 1) + 1) + 1);\n\t\tcrystalThree = Math.floor(Math.random() * ((12 - 1) + 1) + 1);\n\t\tcrystalFour = Math.floor(Math.random() * ((12 - 1) + 1) + 1);\n\t\t// sets user score to 0\n\t\tuserScore = 0;\n\n\t\tconsole.log(targetScore)\n\t\tconsole.log(crystalOne);\n\t\tconsole.log(crystalTwo);\n\t\tconsole.log(crystalThree);\n\t\tconsole.log(crystalFour);\n\n\n\t\trefreshTargetScore();\n\t\trefreshUserScore();\n\t\trefreshWins();\n\t\trefreshLosses();\n\t}", "title": "" }, { "docid": "9a54817e7b5e746064ba8970620bd1ee", "score": "0.61101466", "text": "function SeedablePRNG(seed, useEntropy) {\n\tObject.defineProperties(this, new Math.seedrandom(seed, useEntropy, function (prng, seed) {\n\t\treturn {\n\t\t\t_prng : {\n\t\t\t\tvalue : prng\n\t\t\t},\n\t\t\tseed : {\n\t\t\t\twritable : true,\n\t\t\t\tvalue : seed\n\t\t\t},\n\t\t\tcount : {\n\t\t\t\twritable : true,\n\t\t\t\tvalue : 0\n\t\t\t},\n\t\t\trandom : {\n\t\t\t\tvalue : function () {\n\t\t\t\t\tthis.count++;\n\t\t\t\t\treturn this._prng();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}));\n}", "title": "" }, { "docid": "b50ac6047d162fd3ce2e0cf54bc1bbcf", "score": "0.610951", "text": "newSeed() {\n return [\n Math.floor(this.prng.next() * 0x10000),\n Math.floor(this.prng.next() * 0x10000),\n Math.floor(this.prng.next() * 0x10000),\n Math.floor(this.prng.next() * 0x10000),\n ];\n }", "title": "" }, { "docid": "b50ac6047d162fd3ce2e0cf54bc1bbcf", "score": "0.610951", "text": "newSeed() {\n return [\n Math.floor(this.prng.next() * 0x10000),\n Math.floor(this.prng.next() * 0x10000),\n Math.floor(this.prng.next() * 0x10000),\n Math.floor(this.prng.next() * 0x10000),\n ];\n }", "title": "" }, { "docid": "0fb75543f6142ae288f3f435fcaa28a8", "score": "0.6109427", "text": "constructor(args) {\n super();\n args = args || {}\n this.CONSTRUCTOR_ID = 0xe675a1c1;\n this.SUBCLASS_OF_ID = 0xf1163490;\n\n this.seed = args.seed;\n }", "title": "" }, { "docid": "ab3b010935125ea4ce26299acc9e4f14", "score": "0.6057044", "text": "DNA() {\n // DNA is random floating point values between 0 and 1 (!!)\n genes = new float[len];\n for (int i = 0; i < genes.length; i++) {\n genes[i] = random(0,1);\n }\n }", "title": "" }, { "docid": "7509878178e66bf1d3c74963910a4360", "score": "0.6055552", "text": "constructor() {\n this.position = vector(0, 0),\n this.noise = vector(random(0, 100000), random(0, 100000)),\n this.noiseResolution = 0.01\n }", "title": "" }, { "docid": "5fdb98437ff584a844a2fb261f806d40", "score": "0.6054929", "text": "function rand() {\r\n if(!gnt--) {\r\n prng(); gnt = 255;\r\n }\r\n return r[gnt];\r\n }", "title": "" }, { "docid": "bf5c5c5c2b38664a065029c7a275ad97", "score": "0.60466564", "text": "constructor(seedOrRng, order, lureDifficulty) {\n if (typeof seedOrRng === \"string\" || typeof seedOrRng === \"number\") {\n this.rng = seedrandom(seedOrRng);\n } else {\n this.rng = seedOrRng;\n }\n\n var stimulusSets = [1,2,3,4,5];\n this.setOrder = this.shuffle(stimulusSets, this.rng);\n }", "title": "" }, { "docid": "dcab8b8a099ec59bb9f4c6dd5fb147b8", "score": "0.6042538", "text": "reset() {\n this.rndIndex = 0;\n }", "title": "" }, { "docid": "dcab8b8a099ec59bb9f4c6dd5fb147b8", "score": "0.6042538", "text": "reset() {\n this.rndIndex = 0;\n }", "title": "" }, { "docid": "798786d1c5202fe85fcff39e0beed3f7", "score": "0.6038852", "text": "function Generator() {}", "title": "" }, { "docid": "798786d1c5202fe85fcff39e0beed3f7", "score": "0.6038852", "text": "function Generator() {}", "title": "" }, { "docid": "798786d1c5202fe85fcff39e0beed3f7", "score": "0.6038852", "text": "function Generator() {}", "title": "" }, { "docid": "798786d1c5202fe85fcff39e0beed3f7", "score": "0.6038852", "text": "function Generator() {}", "title": "" }, { "docid": "798786d1c5202fe85fcff39e0beed3f7", "score": "0.6038852", "text": "function Generator() {}", "title": "" }, { "docid": "798786d1c5202fe85fcff39e0beed3f7", "score": "0.6038852", "text": "function Generator() {}", "title": "" }, { "docid": "798786d1c5202fe85fcff39e0beed3f7", "score": "0.6038852", "text": "function Generator() {}", "title": "" }, { "docid": "798786d1c5202fe85fcff39e0beed3f7", "score": "0.6038852", "text": "function Generator() {}", "title": "" }, { "docid": "798786d1c5202fe85fcff39e0beed3f7", "score": "0.6038852", "text": "function Generator() {}", "title": "" }, { "docid": "798786d1c5202fe85fcff39e0beed3f7", "score": "0.6038852", "text": "function Generator() {}", "title": "" }, { "docid": "798786d1c5202fe85fcff39e0beed3f7", "score": "0.6038852", "text": "function Generator() {}", "title": "" }, { "docid": "798786d1c5202fe85fcff39e0beed3f7", "score": "0.6038852", "text": "function Generator() {}", "title": "" } ]
972af61c3d3ea348a5787f55ab40ea3f
Private: Setup the legend from the data
[ { "docid": "23e506ab1b02bb4e666d766419d7ed31", "score": "0.0", "text": "function setup(rows) {\n var s = d3.select(svg)\n var g = s.append(\"g\");\n\n var rect = g.append(\"rect\")\n .attr(\"class\", \"legendouter\")\n\n // Get the largest width and height\n var max = getMaxSize(rows);\n\n space = margin() + padding()\n width = space + max[0];\n height = space + max[1] * rows.length;\n\n var items = g.selectAll(\".legend\")\n .data(rows)\n .enter()\n .append(\"g\")\n .attr(\"class\", \"legend\")\n .attr(\"transform\", function (d, i) { return \"translate(0,\" + (i * max[1]) + \")\"; });\n\n // Add the color swatch\n if (svgImg() != null) { \n d3.xml(svgImg(), \"image/svg+xml\", function(xml) { \n var img = document.importNode(xml.documentElement, true);\n items.append(\"g\")\n .attr(\"transform\", function (d, i) { return \"translate(\" + max[0] + \",\" + max[1] + \")\"; })\n .attr(\"width\", function(d) { return d.Width })\n .attr(\"height\", function(d) { return d.Height; })\n .each( function(d) { return loadImage(this, img, d.Color, d.Width); } ); \n \n finish(g, rect, items, max);\n }); \n } else {\n if (shape() != \"circle\")\n space += padding()\n \n if (shape() == \"line\"){\n createLine(items, max);\n } else {\n items.append(\"path\")\n .attr(\"d\", d3.svg.symbol().type(shape()).size( function(d) { return d.Width; } ))\n .attr(\"transform\", function (d, i) { return \"translate(\" + space + \",\" + max[1] + \")\"; })\n .attr(\"class\", function (d) { return d.Color; }); \n } \n finish(g, rect, items, max);\n }\n }", "title": "" } ]
[ { "docid": "1db88f6b5aa800269ac9e48315f44421", "score": "0.72375894", "text": "function setData() {\n var chart = this;\n chart.currentData = { chartData: chart.data.chartData, dataTable: chart.data.dataTable };\n\n //Set the legend Data to the label from dataTable Keys\n chart.currentData.legendData = [chart.currentData.dataTable.x];\n chart.currentData.xAxisData = chart.getSingleAxisData(chart.currentData.chartData, chart.currentData.dataTable);\n\n if (chart.currentData.dataTable.hasOwnProperty('size')) {\n chart.currentData.zAxisData = chart.getSingleAxisZ(chart.currentData.chartData);\n }\n\n chart.currentData.color = 'red'; //chart.setChartColors (chart._vars.color, chart.data.legendData, colors);\n}", "title": "" }, { "docid": "7fec551144e147d7ac755d606e0d5148", "score": "0.71925354", "text": "function setData() {\n var chart = this;\n chart.data.legendData = setTreeMapLegendData(chart.data);\n //define color object for chartData\n chart.data.color = jvCharts.setChartColors(chart._vars.color, chart.data.legendData, chart.colors);\n}", "title": "" }, { "docid": "87ed639a4c892f8895a2ebeb82aadf63", "score": "0.7163455", "text": "function setData() {\n var chart = this;\n chart.data.legendData = setPackLegendData(chart.data.dataTable);\n //define color object for chartData\n chart.data.color = chart.colors;\n}", "title": "" }, { "docid": "c216f0048fc50598abc03dbc64541f1e", "score": "0.7141132", "text": "function setData() {\n var chart = this;\n chart.data.legendData = setRadialLegendData(chart.data);\n //define color object for chartData\n chart.data.color = jvCharts.setChartColors(chart._vars.color, chart.data.legendData, chart.colors);\n}", "title": "" }, { "docid": "c9fed6f2b8917100fe5f30c4ab9df9f6", "score": "0.71031076", "text": "makeLegend ( ) {\n const legend = this.chart.append( 'g' )\n .attr( 'id', 'legend' );\n legend.selectAll( 'rect' )\n .data( this.color.range( ) )\n .enter( )\n .append( 'rect' )\n .attr( 'class' , 'legend' )\n .attr( 'width' , 50 )\n .attr( 'height', 20 )\n .attr( 'x' , ( d, i ) => i * 50 )\n .attr( 'y' , 30 )\n .attr( 'fill' , d => d );\n\n const start = this.color.domain( )[0];\n const step = ( this.color.domain( )[1] - this.color.domain( )[0] ) / this.color.range( ).length;\n legend.selectAll( 'text' )\n .data( this.color.range( ) )\n .enter( )\n .append( 'text' )\n .attr( 'x' , ( d, i ) => ( i * 50 ) + 50 )\n .attr( 'y' , 70 )\n .text( ( d, i )=> ( start + ( i + 1 ) * step ).toFixed( 1 ) + '%' );\n legend.attr( 'transform', `translate( ${ this.chartWidth / 2 }, 0 )` );\n\n return this;\n }", "title": "" }, { "docid": "106a9914413e8e28defafd7014aa3b9f", "score": "0.7067902", "text": "function createLegends(svg,height,width){\r\nvar colorDomain = [];// initialize th color domain array\r\nvar colorRange = []; // initialize th color range array\r\nvar colorObj = settings.colorArray;\r\nfor (var property in colorObj) {\r\n if (colorObj.hasOwnProperty(property)) {\r\n \tcolorDomain.push(property); // set the values from input data\r\n \tcolorRange.push(colorObj[property]);\r\n \t// do stuff\r\n }\r\n}\r\n\r\nvar colorScale = d3.scale.ordinal()\r\n .domain(colorDomain)\r\n .range(colorRange);\r\n\r\nvar legendRectSize = 12;\r\nvar legendSpacing = 12;\r\n\r\nvar legend = svg.append(\"g\").attr(\"transform\",\"translate(\"+ (width-200) +\",\"+ (height-200) +\")\").selectAll('.legend')\r\n\t\t\t\t.data(colorScale.domain())\r\n\t\t\t\t.enter()\r\n\t\t\t\t.append('g')\r\n\t\t\t\t.attr('class', 'legend')\r\n\t\t\t\t.attr('transform', function(d, i) {\r\n\t\t\t\t var height = legendRectSize + legendSpacing;\r\n\t\t\t\t var offset = height * colorScale.domain().length / 2;\r\n\t\t\t\t var horz = -2 * legendRectSize;\r\n\t\t\t\t var vert = i * height - offset;\r\n\t\t\t\t return 'translate(' + horz + ',' + vert + ')';\r\n\t\t\t\t});\r\nlegend.append('rect')\r\n\t\t.attr('width', legendRectSize)\r\n\t\t.attr('height', legendRectSize)\r\n\t\t.style('fill', colorScale)\r\n\t\t.style('stroke', colorScale);\r\n\t\tlegend.append('text')\r\n\t\t.attr('x', legendRectSize + legendSpacing)\r\n\t\t.attr('y', legendRectSize-2)\r\n\t\t.text(function(d) { return d; });\r\n}", "title": "" }, { "docid": "72070e83feefb32dd7cb157544edbf32", "score": "0.70604575", "text": "function setLegend () {\n var fullVarNames = [\"Daily average\", \"Highest hourly average\",\n \"Lowest hourly average\"]\n\n // Set dimensions for legend\n legendWidth = 210;\n legendHeight = 100;\n\n // Define the size of the color block rectangle\n rectSize = (legendHeight) / (varNames.length * 1.5);\n\n // Append box for legend\n var legend = svg.append('svg')\n .attr('class', 'legend')\n .attr('width', legendWidth)\n .attr('height', legendHeight)\n .attr('transform', 'translate(' + (width + margin.left + margin.right\n - legendWidth) + ',' + 25 + ')');\n\n // Add a g element for every legend item\n var item = legend.selectAll('.legend')\n .data(varNames)\n .enter()\n .append('g')\n .attr('transform', function(d, i) {\n var x = 0;\n var y = (i * rectSize * 1.5);\n return 'translate('+ x + ',' + y + ')'; });\n\n // Add colorbox for legend item and add listeners for interactivity\n item.append('rect')\n .attr('width', rectSize)\n .attr('height', rectSize)\n .attr('transform', 'translate(0,0)')\n .attr('class', function(d, i) { return varNames[i]; })\n .style('fill', function (d, i) { return color(d); });\n\n // Add corresponding text for legend item\n item.append('text')\n .attr('transform', function(d, i) {\n var x = 35;\n var y = rectSize * (3/4);\n return 'translate('+ x + ',' + y + ')'; })\n .text(function(d, i) { return fullVarNames[i]; });\n}", "title": "" }, { "docid": "0733bcf9a93e54ed79577d24133d72db", "score": "0.7048573", "text": "function legend() {\n // add the legend group element to the svg\n var legend = svg.append(\"g\")\n .attr(\"class\", \"mylegend\")\n .attr(\"transform\", \"translate(0,0)\");\n\n // icon values & space between legend elements\n var iconWidth = 35;\n var iconHeight = 10;\n var margin = 10;\n\n // we set these manually because it's not based off of what's in an array/ we can't loop through an array to draw the icons in the legend\n\n var tc = legend.append(\"g\")\n .attr(\"class\", \"legendGroup\");\n\n tc.append(\"rect\")\n .attr(\"height\", iconHeight)\n .attr(\"width\", iconWidth)\n .attr(\"fill\", \"#f1735f\");\n\n var text = tc.append(\"text\")\n .attr(\"x\", iconWidth + 5)\n .attr(\"y\", iconHeight)\n .style(\"text-anchor\", \"start\")\n .attr(\"class\", \"legendLabel\")\n .text(thisCountyDataset.county.name + \" County\");\n\n var oc = legend.append(\"g\")\n .attr(\"class\", \"legendGroup\")\n .attr(\"transform\", function () {\n return \"translate(\" + (tc.node().getBBox().width + margin) + \",0)\" // tc.node().getBBox().width gives us the width of the \"tc\" element (icon and text) we created above. Translate the next element over this much plus the margin\n });\n\n oc.append(\"rect\")\n .attr(\"height\", iconHeight)\n .attr(\"width\", iconWidth)\n .attr(\"fill\", \"#cccccc\");\n\n oc.append(\"text\")\n .attr(\"x\", iconWidth + 5)\n .attr(\"y\", iconHeight)\n .style(\"text-anchor\", \"start\")\n .attr(\"class\", \"legendLabel\")\n .text(\"Other FL Counties\");\n\n\n // var legend = svg.append(\"g\")\n // .attr(\"class\", \"mylegend\")\n // .attr(\"transform\", \"translate(0,0)\");\n // \n // genders.forEach(function (d, i) {\n // \n // var iconWidth = 35;\n // var iconHeight = 15;\n // var margin = 70;\n // var g = legend.append(\"g\")\n // .attr(\"class\", \"legendGroup\")\n // .attr(\"transform\", function () {\n // return \"translate(\" + (iconWidth * i + margin * i) + \",0)\"\n // });\n // \n // g.append(\"rect\")\n // .attr(\"height\", iconHeight)\n // .attr(\"width\", iconWidth)\n // .attr(\"fill\", function () {\n // console.log(\"GENDER\", d);\n // return color(d);\n // });\n // g.append(\"text\")\n // .attr(\"x\", iconWidth + 5)\n // .attr(\"y\", iconHeight)\n // .style(\"text-anchor\", \"start\")\n // .attr(\"class\", \"legendLabel\")\n // .text(uppercase(d));\n // });\n\n }", "title": "" }, { "docid": "0c4eadda264433a0932016e1580b9160", "score": "0.7031331", "text": "function legend(parent, data) {\n parent.className = 'legend';\n var datas = data.hasOwnProperty('datasets') ? data.datasets : data;\n\n // remove possible children of the parent\n while(parent.hasChildNodes()) {\n parent.removeChild(parent.lastChild);\n }\n\n datas.forEach(function(d) {\n var title = document.createElement('span');\n title.className = 'title';\n title.style.borderColor = d.hasOwnProperty('strokeColor') ? d.strokeColor : d.color;\n title.style.borderStyle = 'solid';\n parent.appendChild(title);\n\n var text = document.createTextNode(d.label);\n title.appendChild(text);\n });\n}", "title": "" }, { "docid": "9e7ebd7c7a920fe4f9055d87ccd0cec9", "score": "0.7027919", "text": "function LegendFactory() {}", "title": "" }, { "docid": "cddef2a7a2d3966de03d8bf4ed24ef7c", "score": "0.7004181", "text": "function legend1() {\n $LEGENDDIV = $(\"#legend1\");\n COLORS = palette.blue5;\n BREAKS = [0.2, 0.4, 0.6, 0.8];\n FORMATTER = d3.format(\"%\");\n legend(\"#legend1\")\n}", "title": "" }, { "docid": "d3f6abb5808d717c93fdcc4567b554b0", "score": "0.6955857", "text": "function createLegend() {\n\t// create objects from text, x, y, and colour to put into legendData array\n\tlegendText.forEach(function(t, i) {\n\t\tlegendData.push({text: t,\n\t\t\t\t\t\tx: legendX,\n\t\t\t\t\t\ty: legendY[i]+130, // shift legend height\n\t\t\t\t\t\tcolour: legendColours[i]});\n\t});\n\n\t// display text for legend\n\td3.select(\"#legendgroup\")\n\t\t.selectAll(\"text\")\n\t\t.data(legendData.filter(function(d) {return d.text == legendText[0] || d.text == legendText[1] ||\n\t\t\t\t\t\t\t\t\t\t\td.text == legendText[2] || d.text == legendText[5] ||\n\t\t\t\t\t\t\t\t\t\t\td.text == legendText[7] || d.text == legendText[8] ||\n\t\t\t\t\t\t\t\t\t\t\td.text == legendText[9];}))\n\t\t.enter()\n\t\t.append(\"text\")\n\t\t.html(function(d) {return d.text;})\n\t\t.attr(\"class\", \"legend-text\")\n\t\t.attr(\"x\", function(d) {if (d.text == legendText[0]) {return d.x-40;}\n\t\t\t\t\t\t\t\telse {return d.x;}})\n\t\t.attr(\"y\", function(d) {if (d.text == legendText[1]) {return d.y+20;}\n\t\t\t\t\t\t\t\telse if (d.text == legendText[2]) {return d.y+20;}\n\t\t\t\t\t\t\t\telse if (d.text == legendText[5]) {return d.y-20;}\n\t\t\t\t\t\t\t\telse if (d.text == legendText[7]) {return d.y-20;}\n\t\t\t\t\t\t\t\telse if (d.text == legendText[8]) {return d.y-20;}\n\t\t\t\t\t\t\t\telse {return d.y;}})\n\t\t.attr(\"font-size\", function(d) {if (d.text == legendText[0]) {return 18;}\n\t\t\t\t\t\t\t\telse {return 14;}})\n\t\t.attr(\"fill\", \"black\")\n\t\t.attr(\"dy\", \".35em\");\n\n\t// display symbol for legend\n\td3.select(\"#legendgroup\")\n\t\t.selectAll(\"line\")\n\t\t.data(legendData.filter(function(d) {return d.text != legendText[0];}))\n\t\t.enter()\n\t\t.append(\"line\")\n\t\t.attr(\"x1\", function(d) {return d.x-40;})\n\t\t.attr(\"y1\", function(d) {return d.y;})\n\t\t.attr(\"x2\", function(d) {return d.x-9;})\n\t\t.attr(\"y2\", function(d) {return d.y;})\n\t\t.attr(\"stroke\", function(d) {return d.colour;})\n\t\t.attr(\"stroke-width\", 40);\n}", "title": "" }, { "docid": "7df8eb73a25824bcdafb25e03e0be33e", "score": "0.6876715", "text": "function setData() {\n var chart = this;\n //define color object for chartData\n chart.data.legendData = setBubbleLegendData(chart.data);\n chart.data.color = jvCharts.setChartColors(chart._vars.color, chart.data.legendData, chart.colors);\n}", "title": "" }, { "docid": "006b51003e7e662a47ba8abf05228aee", "score": "0.6853136", "text": "function setData() {\n var chart = this;\n chart.data.legendData = setPieLegendData(chart.data);\n //define color object for chartData\n chart.data.color = jvCharts.setChartColors(chart._vars.color, chart.data.legendData, chart.colors);\n}", "title": "" }, { "docid": "fb13aa03aec219af5f2b2d3fefb81eed", "score": "0.6834017", "text": "function legend(parent, data, chart) {\n parent.className = 'legend';\n var datas = data.hasOwnProperty('datasets') ? data.datasets : data;\n\n // remove possible children of the parent\n while(parent.hasChildNodes()) {\n parent.removeChild(parent.lastChild);\n }\n\n var show = chart ? showTooltip : noop;\n datas.forEach(function(d, i) {\n //span to div: legend appears to all element (color-sample and text-node)\n var title = document.createElement('div');\n title.className = 'title';\n parent.appendChild(title);\n\n var colorSample = document.createElement('div');\n colorSample.className = 'color-sample';\n colorSample.style.backgroundColor = d.hasOwnProperty('strokeColor') ? d.strokeColor : d.color;\n colorSample.style.borderColor = d.hasOwnProperty('fillColor') ? d.fillColor : d.color;\n title.appendChild(colorSample);\n\n var node;\n var text;\n if(d.label.indexOf('<i>')==0){\n node = document.createElement('i');\n text = document.createTextNode(d.label.substring(3,d.label.length - 4));\n text.className = 'text-node';\n node.appendChild(text);\n title.appendChild(node);\n } else {\n var text = document.createTextNode(d.label);\n text.className = 'text-node';\n title.appendChild(text);\n }\n show(chart, title, i);\n });\n }", "title": "" }, { "docid": "410a895ccac1dc9046561b0312b5a789", "score": "0.68337244", "text": "addLegend({ legendLabel } = {}) {\n this.root\n .append(\"div\")\n .attr(\"class\", \"legend\")\n .style(\"margin\", \"auto\")\n .style(\"display\", \"flex\")\n .style(\"width\", \"100%\")\n .style(\"justify-content\", \"space-evenly\")\n .style(\"align-items\", \"flex-start\")\n .selectAll(\"div\")\n .data(this.legend)\n .enter()\n .append(\"div\")\n .style(\"display\", \"flex\")\n .style(\"align-items\", \"baseline\")\n .html(`<i></i><span></span>`);\n\n d3.selectAll(`${this.selector} .legend i`)\n .attr(\"class\", \"legend-icon\")\n .style(\"display\", \"inline-block\")\n .style(\"margin-right\", \"5px\")\n .style(\"width\", \"15px\")\n .style(\"height\", \"15px\")\n .data(this.data)\n .style(\"background-color\", (d, i) => this.legend[i].color);\n\n d3.selectAll(`${this.selector} .legend span`)\n .attr(\"class\", \"legend-label\")\n .data(this.data)\n .text((d, i) => {\n if (!legendLabel) {\n return this.legend[i].indicator;\n } else if (Array.isArray(legendLabel)) {\n return legendLabel[i];\n } else {\n return d[legendLabel];\n }\n });\n return this;\n }", "title": "" }, { "docid": "9c017b6f7e5d36c0a3d9dd3744d38fa0", "score": "0.68332267", "text": "renderData() {\n if(this.doesRenderTitle) {\n let proptext = this.keymodeler.selectedValues.join(' | ');\n this.titleSVG.text(proptext)\n }\n this.legendSVG.selectAll('*').remove(); //clear old legend\n let data = {};\n let datarange = [];\n let stateKeys = Object.keys(this.censusdata);\n stateKeys.forEach( (key)=> {\n let val = this.keymodeler.getPropVal(this.censusdata[key]);\n datarange.push(+val);\n });\n let dataSize = datarange.length-1;\n let minData = d3.min(datarange);\n let maxData = d3.max(datarange);\n let colorScale = d3.scaleSequential()\n .domain([minData,maxData])\n .interpolator(this.scheme)\n //.range(['white','red'])\n let legendWidth = +this.legendSVG.attr('width');\n let legendHeight = +this.legendSVG.attr('height');\n let padLegBottom = legendHeight*0.05;\n let padLegTop = legendHeight*0.95;\n let legendScale = d3.scaleLinear()\n .domain([minData,maxData])\n .range([padLegBottom, padLegTop]);\n let legendRange = d3.ticks(minData,maxData,dataSize)\n let colorLegendWidth = legendWidth/4\n this.legendSVG.selectAll(\"g\")\n .data(legendRange)\n .enter()\n .append('rect')\n .attr('width', 10)\n .attr('height', 10+legendHeight/dataSize)\n .attr('x',0)\n .attr('y', (d)=> legendScale(d))\n .attr('width',colorLegendWidth)\n .attr('fill',(d)=>colorScale(d));\n let legendAxis = d3.axisRight(legendScale)\n .ticks(10)\n this.legendSVG.append(\"g\")\n .attr('transform','translate(+'+colorLegendWidth+','+padLegBottom/2+')')\n .call(legendAxis)\n this.pathGroup.selectAll(\"path\")\n .attr('fill',(d) => {\n let name = d.properties.NAME;\n let obj = this.censusdata[name];\n let val = +this.keymodeler.getPropVal(obj);\n return colorScale(val);\n });\n\n //extrema\n this.extremaDiv.selectAll('*').remove();\n let extremaWidth = parseInt(this.extremaDiv.style('width'));\n let extremaHeight = parseInt(this.extremaDiv.style('height'));\n let minIndex = datarange.indexOf(minData);\n let minState = stateKeys[minIndex];\n let maxIndex = datarange.indexOf(maxData);\n let maxState = stateKeys[maxIndex];\n this.extremaDiv.append('div')\n .attr('id','extrema-min-color')\n .style('width',extremaWidth/6+'px')\n .style('min-height','10px')\n .style('background-color',colorScale(minData));\n this.extremaDiv.append('div')\n .attr('id','extrema-min-state')\n .text(minState);\n this.extremaDiv.append('div')\n .attr('id','extrema-min-val')\n .text((this.guessFormatting) ? this.formatVal(minData) : minData);\n this.extremaDiv.append('div')\n .attr('id','extrema-max-color')\n .style('width',extremaWidth/6+'px')\n .style('min-height','10px')\n .style('background-color',colorScale(maxData));\n this.extremaDiv.append('div')\n .attr('id','extrema-max-state')\n .text(maxState);\n this.extremaDiv.append('div')\n .attr('id','extrema-max-val')\n .text((this.guessFormatting) ? this.formatVal(maxData) :maxData);\n }", "title": "" }, { "docid": "21b42d9a2c6ef5d60ad65c55f3a3a571", "score": "0.6809376", "text": "function makeVoteLegend() {\n\t\t\t\tvar legend = d3.select(this)\n\t\t\t\t\t.attr(\"class\", \"legend\");\n\t\t\t\tvar legendPadding = {top: 12, bottom: 12};\n\t\t\t\tvar defs = legend.append(\"defs\");\n\t\t\t\tvar voteColorGradient = defs.append(\"linearGradient\")\n\t \t\t\t.attr(\"id\", \"voteColor-gradient\")\n\t \t\t\t.attr(\"x1\", \"0%\")\n\t\t\t\t .attr(\"y1\", \"0%\")\n\t\t\t\t .attr(\"x2\", \"100%\")\n\t\t\t\t .attr(\"y2\", \"0%\");\n\t\t\t\tvoteColorGradient.selectAll(\"stop\")\n\t\t\t\t\t.data([\n\t\t\t\t\t\t{offset: \"0%\", color: '#3c5bff'}, \n\t\t\t\t {offset: \"50%\", color: '#e6f0ff'}, \n\t\t\t\t {offset: \"50%\", color: '#f8e5e6'}, \n\t\t\t\t {offset: \"100%\", color: '#dd0035'} \n\t\t\t\t\t\t])\n\t\t\t\t\t.enter().append(\"stop\")\n\t\t\t\t\t.attr(\"offset\", function(d) { return d.offset; }) \n\t \t\t\t.attr(\"stop-color\", function(d) { return d.color; });\n\t \t\tvar voteLegendColorBar = legend.append(\"rect\")\n\t \t\t\t.attr(\"width\", voteLegendBarWidth)\n\t \t\t\t.attr(\"height\", voteLegendBarHeight)\n\t \t\t\t.attr(\"x\", (selBoxWidth/2)-(voteLegendBarWidth/2))\n\t \t\t\t.attr(\"y\", legendPadding.top)\n\t \t\t\t.style(\"fill\", \"url(#voteColor-gradient)\")\n\t \t\tvar voteLegendAxis = legend.append(\"g\")\n\t \t\t\t.attr(\"class\", \"legend\")\n\t \t\t\t.attr(\"id\", \"legendAxis\")\n\t \t\t\t.attr(\"transform\", \"translate(\" + ((selBoxWidth/2)-(voteLegendBarWidth/2)) + \",\" + (voteLegendBarHeight+legendPadding.top) + \")\")\n\t \t\t\t.each(makeLegendLabels);\n\t\t\t\n\t\t\t}", "title": "" }, { "docid": "768dcb61c6de9074e0c7aad2dad97383", "score": "0.6800553", "text": "function createLegend(choiceContainer, infos) {\n // Sort series by name\n var keys = [];\n $.each(infos.data.result.series, function(index, series){\n keys.push(series.label);\n });\n keys.sort(sortAlphaCaseless);\n\n // Create list of series with support of activation/deactivation\n $.each(keys, function(index, key) {\n var id = choiceContainer.attr('id') + index;\n $('<li />')\n .append($('<input id=\"' + id + '\" name=\"' + key + '\" type=\"checkbox\" checked=\"checked\" hidden />'))\n .append($('<label />', { 'text': key , 'for': id }))\n .appendTo(choiceContainer);\n });\n choiceContainer.find(\"label\").click( function(){\n if (this.style.color !== \"rgb(129, 129, 129)\" ){\n this.style.color=\"#818181\";\n }else {\n this.style.color=\"black\";\n }\n $(this).parent().children().children().toggleClass(\"legend-disabled\");\n });\n choiceContainer.find(\"label\").mousedown( function(event){\n event.preventDefault();\n });\n choiceContainer.find(\"label\").mouseenter(function(){\n this.style.cursor=\"pointer\";\n });\n\n // Recreate graphe on series activation toggle\n choiceContainer.find(\"input\").click(function(){\n infos.createGraph();\n });\n}", "title": "" }, { "docid": "768dcb61c6de9074e0c7aad2dad97383", "score": "0.6800553", "text": "function createLegend(choiceContainer, infos) {\n // Sort series by name\n var keys = [];\n $.each(infos.data.result.series, function(index, series){\n keys.push(series.label);\n });\n keys.sort(sortAlphaCaseless);\n\n // Create list of series with support of activation/deactivation\n $.each(keys, function(index, key) {\n var id = choiceContainer.attr('id') + index;\n $('<li />')\n .append($('<input id=\"' + id + '\" name=\"' + key + '\" type=\"checkbox\" checked=\"checked\" hidden />'))\n .append($('<label />', { 'text': key , 'for': id }))\n .appendTo(choiceContainer);\n });\n choiceContainer.find(\"label\").click( function(){\n if (this.style.color !== \"rgb(129, 129, 129)\" ){\n this.style.color=\"#818181\";\n }else {\n this.style.color=\"black\";\n }\n $(this).parent().children().children().toggleClass(\"legend-disabled\");\n });\n choiceContainer.find(\"label\").mousedown( function(event){\n event.preventDefault();\n });\n choiceContainer.find(\"label\").mouseenter(function(){\n this.style.cursor=\"pointer\";\n });\n\n // Recreate graphe on series activation toggle\n choiceContainer.find(\"input\").click(function(){\n infos.createGraph();\n });\n}", "title": "" }, { "docid": "768dcb61c6de9074e0c7aad2dad97383", "score": "0.6800553", "text": "function createLegend(choiceContainer, infos) {\n // Sort series by name\n var keys = [];\n $.each(infos.data.result.series, function(index, series){\n keys.push(series.label);\n });\n keys.sort(sortAlphaCaseless);\n\n // Create list of series with support of activation/deactivation\n $.each(keys, function(index, key) {\n var id = choiceContainer.attr('id') + index;\n $('<li />')\n .append($('<input id=\"' + id + '\" name=\"' + key + '\" type=\"checkbox\" checked=\"checked\" hidden />'))\n .append($('<label />', { 'text': key , 'for': id }))\n .appendTo(choiceContainer);\n });\n choiceContainer.find(\"label\").click( function(){\n if (this.style.color !== \"rgb(129, 129, 129)\" ){\n this.style.color=\"#818181\";\n }else {\n this.style.color=\"black\";\n }\n $(this).parent().children().children().toggleClass(\"legend-disabled\");\n });\n choiceContainer.find(\"label\").mousedown( function(event){\n event.preventDefault();\n });\n choiceContainer.find(\"label\").mouseenter(function(){\n this.style.cursor=\"pointer\";\n });\n\n // Recreate graphe on series activation toggle\n choiceContainer.find(\"input\").click(function(){\n infos.createGraph();\n });\n}", "title": "" }, { "docid": "768dcb61c6de9074e0c7aad2dad97383", "score": "0.6800553", "text": "function createLegend(choiceContainer, infos) {\n // Sort series by name\n var keys = [];\n $.each(infos.data.result.series, function(index, series){\n keys.push(series.label);\n });\n keys.sort(sortAlphaCaseless);\n\n // Create list of series with support of activation/deactivation\n $.each(keys, function(index, key) {\n var id = choiceContainer.attr('id') + index;\n $('<li />')\n .append($('<input id=\"' + id + '\" name=\"' + key + '\" type=\"checkbox\" checked=\"checked\" hidden />'))\n .append($('<label />', { 'text': key , 'for': id }))\n .appendTo(choiceContainer);\n });\n choiceContainer.find(\"label\").click( function(){\n if (this.style.color !== \"rgb(129, 129, 129)\" ){\n this.style.color=\"#818181\";\n }else {\n this.style.color=\"black\";\n }\n $(this).parent().children().children().toggleClass(\"legend-disabled\");\n });\n choiceContainer.find(\"label\").mousedown( function(event){\n event.preventDefault();\n });\n choiceContainer.find(\"label\").mouseenter(function(){\n this.style.cursor=\"pointer\";\n });\n\n // Recreate graphe on series activation toggle\n choiceContainer.find(\"input\").click(function(){\n infos.createGraph();\n });\n}", "title": "" }, { "docid": "768dcb61c6de9074e0c7aad2dad97383", "score": "0.6800553", "text": "function createLegend(choiceContainer, infos) {\n // Sort series by name\n var keys = [];\n $.each(infos.data.result.series, function(index, series){\n keys.push(series.label);\n });\n keys.sort(sortAlphaCaseless);\n\n // Create list of series with support of activation/deactivation\n $.each(keys, function(index, key) {\n var id = choiceContainer.attr('id') + index;\n $('<li />')\n .append($('<input id=\"' + id + '\" name=\"' + key + '\" type=\"checkbox\" checked=\"checked\" hidden />'))\n .append($('<label />', { 'text': key , 'for': id }))\n .appendTo(choiceContainer);\n });\n choiceContainer.find(\"label\").click( function(){\n if (this.style.color !== \"rgb(129, 129, 129)\" ){\n this.style.color=\"#818181\";\n }else {\n this.style.color=\"black\";\n }\n $(this).parent().children().children().toggleClass(\"legend-disabled\");\n });\n choiceContainer.find(\"label\").mousedown( function(event){\n event.preventDefault();\n });\n choiceContainer.find(\"label\").mouseenter(function(){\n this.style.cursor=\"pointer\";\n });\n\n // Recreate graphe on series activation toggle\n choiceContainer.find(\"input\").click(function(){\n infos.createGraph();\n });\n}", "title": "" }, { "docid": "768dcb61c6de9074e0c7aad2dad97383", "score": "0.6800553", "text": "function createLegend(choiceContainer, infos) {\n // Sort series by name\n var keys = [];\n $.each(infos.data.result.series, function(index, series){\n keys.push(series.label);\n });\n keys.sort(sortAlphaCaseless);\n\n // Create list of series with support of activation/deactivation\n $.each(keys, function(index, key) {\n var id = choiceContainer.attr('id') + index;\n $('<li />')\n .append($('<input id=\"' + id + '\" name=\"' + key + '\" type=\"checkbox\" checked=\"checked\" hidden />'))\n .append($('<label />', { 'text': key , 'for': id }))\n .appendTo(choiceContainer);\n });\n choiceContainer.find(\"label\").click( function(){\n if (this.style.color !== \"rgb(129, 129, 129)\" ){\n this.style.color=\"#818181\";\n }else {\n this.style.color=\"black\";\n }\n $(this).parent().children().children().toggleClass(\"legend-disabled\");\n });\n choiceContainer.find(\"label\").mousedown( function(event){\n event.preventDefault();\n });\n choiceContainer.find(\"label\").mouseenter(function(){\n this.style.cursor=\"pointer\";\n });\n\n // Recreate graphe on series activation toggle\n choiceContainer.find(\"input\").click(function(){\n infos.createGraph();\n });\n}", "title": "" }, { "docid": "768dcb61c6de9074e0c7aad2dad97383", "score": "0.6800553", "text": "function createLegend(choiceContainer, infos) {\n // Sort series by name\n var keys = [];\n $.each(infos.data.result.series, function(index, series){\n keys.push(series.label);\n });\n keys.sort(sortAlphaCaseless);\n\n // Create list of series with support of activation/deactivation\n $.each(keys, function(index, key) {\n var id = choiceContainer.attr('id') + index;\n $('<li />')\n .append($('<input id=\"' + id + '\" name=\"' + key + '\" type=\"checkbox\" checked=\"checked\" hidden />'))\n .append($('<label />', { 'text': key , 'for': id }))\n .appendTo(choiceContainer);\n });\n choiceContainer.find(\"label\").click( function(){\n if (this.style.color !== \"rgb(129, 129, 129)\" ){\n this.style.color=\"#818181\";\n }else {\n this.style.color=\"black\";\n }\n $(this).parent().children().children().toggleClass(\"legend-disabled\");\n });\n choiceContainer.find(\"label\").mousedown( function(event){\n event.preventDefault();\n });\n choiceContainer.find(\"label\").mouseenter(function(){\n this.style.cursor=\"pointer\";\n });\n\n // Recreate graphe on series activation toggle\n choiceContainer.find(\"input\").click(function(){\n infos.createGraph();\n });\n}", "title": "" }, { "docid": "768dcb61c6de9074e0c7aad2dad97383", "score": "0.6800553", "text": "function createLegend(choiceContainer, infos) {\n // Sort series by name\n var keys = [];\n $.each(infos.data.result.series, function(index, series){\n keys.push(series.label);\n });\n keys.sort(sortAlphaCaseless);\n\n // Create list of series with support of activation/deactivation\n $.each(keys, function(index, key) {\n var id = choiceContainer.attr('id') + index;\n $('<li />')\n .append($('<input id=\"' + id + '\" name=\"' + key + '\" type=\"checkbox\" checked=\"checked\" hidden />'))\n .append($('<label />', { 'text': key , 'for': id }))\n .appendTo(choiceContainer);\n });\n choiceContainer.find(\"label\").click( function(){\n if (this.style.color !== \"rgb(129, 129, 129)\" ){\n this.style.color=\"#818181\";\n }else {\n this.style.color=\"black\";\n }\n $(this).parent().children().children().toggleClass(\"legend-disabled\");\n });\n choiceContainer.find(\"label\").mousedown( function(event){\n event.preventDefault();\n });\n choiceContainer.find(\"label\").mouseenter(function(){\n this.style.cursor=\"pointer\";\n });\n\n // Recreate graphe on series activation toggle\n choiceContainer.find(\"input\").click(function(){\n infos.createGraph();\n });\n}", "title": "" }, { "docid": "768dcb61c6de9074e0c7aad2dad97383", "score": "0.6800553", "text": "function createLegend(choiceContainer, infos) {\n // Sort series by name\n var keys = [];\n $.each(infos.data.result.series, function(index, series){\n keys.push(series.label);\n });\n keys.sort(sortAlphaCaseless);\n\n // Create list of series with support of activation/deactivation\n $.each(keys, function(index, key) {\n var id = choiceContainer.attr('id') + index;\n $('<li />')\n .append($('<input id=\"' + id + '\" name=\"' + key + '\" type=\"checkbox\" checked=\"checked\" hidden />'))\n .append($('<label />', { 'text': key , 'for': id }))\n .appendTo(choiceContainer);\n });\n choiceContainer.find(\"label\").click( function(){\n if (this.style.color !== \"rgb(129, 129, 129)\" ){\n this.style.color=\"#818181\";\n }else {\n this.style.color=\"black\";\n }\n $(this).parent().children().children().toggleClass(\"legend-disabled\");\n });\n choiceContainer.find(\"label\").mousedown( function(event){\n event.preventDefault();\n });\n choiceContainer.find(\"label\").mouseenter(function(){\n this.style.cursor=\"pointer\";\n });\n\n // Recreate graphe on series activation toggle\n choiceContainer.find(\"input\").click(function(){\n infos.createGraph();\n });\n}", "title": "" }, { "docid": "768dcb61c6de9074e0c7aad2dad97383", "score": "0.6800553", "text": "function createLegend(choiceContainer, infos) {\n // Sort series by name\n var keys = [];\n $.each(infos.data.result.series, function(index, series){\n keys.push(series.label);\n });\n keys.sort(sortAlphaCaseless);\n\n // Create list of series with support of activation/deactivation\n $.each(keys, function(index, key) {\n var id = choiceContainer.attr('id') + index;\n $('<li />')\n .append($('<input id=\"' + id + '\" name=\"' + key + '\" type=\"checkbox\" checked=\"checked\" hidden />'))\n .append($('<label />', { 'text': key , 'for': id }))\n .appendTo(choiceContainer);\n });\n choiceContainer.find(\"label\").click( function(){\n if (this.style.color !== \"rgb(129, 129, 129)\" ){\n this.style.color=\"#818181\";\n }else {\n this.style.color=\"black\";\n }\n $(this).parent().children().children().toggleClass(\"legend-disabled\");\n });\n choiceContainer.find(\"label\").mousedown( function(event){\n event.preventDefault();\n });\n choiceContainer.find(\"label\").mouseenter(function(){\n this.style.cursor=\"pointer\";\n });\n\n // Recreate graphe on series activation toggle\n choiceContainer.find(\"input\").click(function(){\n infos.createGraph();\n });\n}", "title": "" }, { "docid": "768dcb61c6de9074e0c7aad2dad97383", "score": "0.6800553", "text": "function createLegend(choiceContainer, infos) {\n // Sort series by name\n var keys = [];\n $.each(infos.data.result.series, function(index, series){\n keys.push(series.label);\n });\n keys.sort(sortAlphaCaseless);\n\n // Create list of series with support of activation/deactivation\n $.each(keys, function(index, key) {\n var id = choiceContainer.attr('id') + index;\n $('<li />')\n .append($('<input id=\"' + id + '\" name=\"' + key + '\" type=\"checkbox\" checked=\"checked\" hidden />'))\n .append($('<label />', { 'text': key , 'for': id }))\n .appendTo(choiceContainer);\n });\n choiceContainer.find(\"label\").click( function(){\n if (this.style.color !== \"rgb(129, 129, 129)\" ){\n this.style.color=\"#818181\";\n }else {\n this.style.color=\"black\";\n }\n $(this).parent().children().children().toggleClass(\"legend-disabled\");\n });\n choiceContainer.find(\"label\").mousedown( function(event){\n event.preventDefault();\n });\n choiceContainer.find(\"label\").mouseenter(function(){\n this.style.cursor=\"pointer\";\n });\n\n // Recreate graphe on series activation toggle\n choiceContainer.find(\"input\").click(function(){\n infos.createGraph();\n });\n}", "title": "" }, { "docid": "768dcb61c6de9074e0c7aad2dad97383", "score": "0.6800553", "text": "function createLegend(choiceContainer, infos) {\n // Sort series by name\n var keys = [];\n $.each(infos.data.result.series, function(index, series){\n keys.push(series.label);\n });\n keys.sort(sortAlphaCaseless);\n\n // Create list of series with support of activation/deactivation\n $.each(keys, function(index, key) {\n var id = choiceContainer.attr('id') + index;\n $('<li />')\n .append($('<input id=\"' + id + '\" name=\"' + key + '\" type=\"checkbox\" checked=\"checked\" hidden />'))\n .append($('<label />', { 'text': key , 'for': id }))\n .appendTo(choiceContainer);\n });\n choiceContainer.find(\"label\").click( function(){\n if (this.style.color !== \"rgb(129, 129, 129)\" ){\n this.style.color=\"#818181\";\n }else {\n this.style.color=\"black\";\n }\n $(this).parent().children().children().toggleClass(\"legend-disabled\");\n });\n choiceContainer.find(\"label\").mousedown( function(event){\n event.preventDefault();\n });\n choiceContainer.find(\"label\").mouseenter(function(){\n this.style.cursor=\"pointer\";\n });\n\n // Recreate graphe on series activation toggle\n choiceContainer.find(\"input\").click(function(){\n infos.createGraph();\n });\n}", "title": "" }, { "docid": "768dcb61c6de9074e0c7aad2dad97383", "score": "0.6800553", "text": "function createLegend(choiceContainer, infos) {\n // Sort series by name\n var keys = [];\n $.each(infos.data.result.series, function(index, series){\n keys.push(series.label);\n });\n keys.sort(sortAlphaCaseless);\n\n // Create list of series with support of activation/deactivation\n $.each(keys, function(index, key) {\n var id = choiceContainer.attr('id') + index;\n $('<li />')\n .append($('<input id=\"' + id + '\" name=\"' + key + '\" type=\"checkbox\" checked=\"checked\" hidden />'))\n .append($('<label />', { 'text': key , 'for': id }))\n .appendTo(choiceContainer);\n });\n choiceContainer.find(\"label\").click( function(){\n if (this.style.color !== \"rgb(129, 129, 129)\" ){\n this.style.color=\"#818181\";\n }else {\n this.style.color=\"black\";\n }\n $(this).parent().children().children().toggleClass(\"legend-disabled\");\n });\n choiceContainer.find(\"label\").mousedown( function(event){\n event.preventDefault();\n });\n choiceContainer.find(\"label\").mouseenter(function(){\n this.style.cursor=\"pointer\";\n });\n\n // Recreate graphe on series activation toggle\n choiceContainer.find(\"input\").click(function(){\n infos.createGraph();\n });\n}", "title": "" }, { "docid": "768dcb61c6de9074e0c7aad2dad97383", "score": "0.6800553", "text": "function createLegend(choiceContainer, infos) {\n // Sort series by name\n var keys = [];\n $.each(infos.data.result.series, function(index, series){\n keys.push(series.label);\n });\n keys.sort(sortAlphaCaseless);\n\n // Create list of series with support of activation/deactivation\n $.each(keys, function(index, key) {\n var id = choiceContainer.attr('id') + index;\n $('<li />')\n .append($('<input id=\"' + id + '\" name=\"' + key + '\" type=\"checkbox\" checked=\"checked\" hidden />'))\n .append($('<label />', { 'text': key , 'for': id }))\n .appendTo(choiceContainer);\n });\n choiceContainer.find(\"label\").click( function(){\n if (this.style.color !== \"rgb(129, 129, 129)\" ){\n this.style.color=\"#818181\";\n }else {\n this.style.color=\"black\";\n }\n $(this).parent().children().children().toggleClass(\"legend-disabled\");\n });\n choiceContainer.find(\"label\").mousedown( function(event){\n event.preventDefault();\n });\n choiceContainer.find(\"label\").mouseenter(function(){\n this.style.cursor=\"pointer\";\n });\n\n // Recreate graphe on series activation toggle\n choiceContainer.find(\"input\").click(function(){\n infos.createGraph();\n });\n}", "title": "" }, { "docid": "768dcb61c6de9074e0c7aad2dad97383", "score": "0.6800553", "text": "function createLegend(choiceContainer, infos) {\n // Sort series by name\n var keys = [];\n $.each(infos.data.result.series, function(index, series){\n keys.push(series.label);\n });\n keys.sort(sortAlphaCaseless);\n\n // Create list of series with support of activation/deactivation\n $.each(keys, function(index, key) {\n var id = choiceContainer.attr('id') + index;\n $('<li />')\n .append($('<input id=\"' + id + '\" name=\"' + key + '\" type=\"checkbox\" checked=\"checked\" hidden />'))\n .append($('<label />', { 'text': key , 'for': id }))\n .appendTo(choiceContainer);\n });\n choiceContainer.find(\"label\").click( function(){\n if (this.style.color !== \"rgb(129, 129, 129)\" ){\n this.style.color=\"#818181\";\n }else {\n this.style.color=\"black\";\n }\n $(this).parent().children().children().toggleClass(\"legend-disabled\");\n });\n choiceContainer.find(\"label\").mousedown( function(event){\n event.preventDefault();\n });\n choiceContainer.find(\"label\").mouseenter(function(){\n this.style.cursor=\"pointer\";\n });\n\n // Recreate graphe on series activation toggle\n choiceContainer.find(\"input\").click(function(){\n infos.createGraph();\n });\n}", "title": "" }, { "docid": "768dcb61c6de9074e0c7aad2dad97383", "score": "0.6800553", "text": "function createLegend(choiceContainer, infos) {\n // Sort series by name\n var keys = [];\n $.each(infos.data.result.series, function(index, series){\n keys.push(series.label);\n });\n keys.sort(sortAlphaCaseless);\n\n // Create list of series with support of activation/deactivation\n $.each(keys, function(index, key) {\n var id = choiceContainer.attr('id') + index;\n $('<li />')\n .append($('<input id=\"' + id + '\" name=\"' + key + '\" type=\"checkbox\" checked=\"checked\" hidden />'))\n .append($('<label />', { 'text': key , 'for': id }))\n .appendTo(choiceContainer);\n });\n choiceContainer.find(\"label\").click( function(){\n if (this.style.color !== \"rgb(129, 129, 129)\" ){\n this.style.color=\"#818181\";\n }else {\n this.style.color=\"black\";\n }\n $(this).parent().children().children().toggleClass(\"legend-disabled\");\n });\n choiceContainer.find(\"label\").mousedown( function(event){\n event.preventDefault();\n });\n choiceContainer.find(\"label\").mouseenter(function(){\n this.style.cursor=\"pointer\";\n });\n\n // Recreate graphe on series activation toggle\n choiceContainer.find(\"input\").click(function(){\n infos.createGraph();\n });\n}", "title": "" }, { "docid": "768dcb61c6de9074e0c7aad2dad97383", "score": "0.6800553", "text": "function createLegend(choiceContainer, infos) {\n // Sort series by name\n var keys = [];\n $.each(infos.data.result.series, function(index, series){\n keys.push(series.label);\n });\n keys.sort(sortAlphaCaseless);\n\n // Create list of series with support of activation/deactivation\n $.each(keys, function(index, key) {\n var id = choiceContainer.attr('id') + index;\n $('<li />')\n .append($('<input id=\"' + id + '\" name=\"' + key + '\" type=\"checkbox\" checked=\"checked\" hidden />'))\n .append($('<label />', { 'text': key , 'for': id }))\n .appendTo(choiceContainer);\n });\n choiceContainer.find(\"label\").click( function(){\n if (this.style.color !== \"rgb(129, 129, 129)\" ){\n this.style.color=\"#818181\";\n }else {\n this.style.color=\"black\";\n }\n $(this).parent().children().children().toggleClass(\"legend-disabled\");\n });\n choiceContainer.find(\"label\").mousedown( function(event){\n event.preventDefault();\n });\n choiceContainer.find(\"label\").mouseenter(function(){\n this.style.cursor=\"pointer\";\n });\n\n // Recreate graphe on series activation toggle\n choiceContainer.find(\"input\").click(function(){\n infos.createGraph();\n });\n}", "title": "" }, { "docid": "768dcb61c6de9074e0c7aad2dad97383", "score": "0.6800553", "text": "function createLegend(choiceContainer, infos) {\n // Sort series by name\n var keys = [];\n $.each(infos.data.result.series, function(index, series){\n keys.push(series.label);\n });\n keys.sort(sortAlphaCaseless);\n\n // Create list of series with support of activation/deactivation\n $.each(keys, function(index, key) {\n var id = choiceContainer.attr('id') + index;\n $('<li />')\n .append($('<input id=\"' + id + '\" name=\"' + key + '\" type=\"checkbox\" checked=\"checked\" hidden />'))\n .append($('<label />', { 'text': key , 'for': id }))\n .appendTo(choiceContainer);\n });\n choiceContainer.find(\"label\").click( function(){\n if (this.style.color !== \"rgb(129, 129, 129)\" ){\n this.style.color=\"#818181\";\n }else {\n this.style.color=\"black\";\n }\n $(this).parent().children().children().toggleClass(\"legend-disabled\");\n });\n choiceContainer.find(\"label\").mousedown( function(event){\n event.preventDefault();\n });\n choiceContainer.find(\"label\").mouseenter(function(){\n this.style.cursor=\"pointer\";\n });\n\n // Recreate graphe on series activation toggle\n choiceContainer.find(\"input\").click(function(){\n infos.createGraph();\n });\n}", "title": "" }, { "docid": "768dcb61c6de9074e0c7aad2dad97383", "score": "0.6800553", "text": "function createLegend(choiceContainer, infos) {\n // Sort series by name\n var keys = [];\n $.each(infos.data.result.series, function(index, series){\n keys.push(series.label);\n });\n keys.sort(sortAlphaCaseless);\n\n // Create list of series with support of activation/deactivation\n $.each(keys, function(index, key) {\n var id = choiceContainer.attr('id') + index;\n $('<li />')\n .append($('<input id=\"' + id + '\" name=\"' + key + '\" type=\"checkbox\" checked=\"checked\" hidden />'))\n .append($('<label />', { 'text': key , 'for': id }))\n .appendTo(choiceContainer);\n });\n choiceContainer.find(\"label\").click( function(){\n if (this.style.color !== \"rgb(129, 129, 129)\" ){\n this.style.color=\"#818181\";\n }else {\n this.style.color=\"black\";\n }\n $(this).parent().children().children().toggleClass(\"legend-disabled\");\n });\n choiceContainer.find(\"label\").mousedown( function(event){\n event.preventDefault();\n });\n choiceContainer.find(\"label\").mouseenter(function(){\n this.style.cursor=\"pointer\";\n });\n\n // Recreate graphe on series activation toggle\n choiceContainer.find(\"input\").click(function(){\n infos.createGraph();\n });\n}", "title": "" }, { "docid": "768dcb61c6de9074e0c7aad2dad97383", "score": "0.6800553", "text": "function createLegend(choiceContainer, infos) {\n // Sort series by name\n var keys = [];\n $.each(infos.data.result.series, function(index, series){\n keys.push(series.label);\n });\n keys.sort(sortAlphaCaseless);\n\n // Create list of series with support of activation/deactivation\n $.each(keys, function(index, key) {\n var id = choiceContainer.attr('id') + index;\n $('<li />')\n .append($('<input id=\"' + id + '\" name=\"' + key + '\" type=\"checkbox\" checked=\"checked\" hidden />'))\n .append($('<label />', { 'text': key , 'for': id }))\n .appendTo(choiceContainer);\n });\n choiceContainer.find(\"label\").click( function(){\n if (this.style.color !== \"rgb(129, 129, 129)\" ){\n this.style.color=\"#818181\";\n }else {\n this.style.color=\"black\";\n }\n $(this).parent().children().children().toggleClass(\"legend-disabled\");\n });\n choiceContainer.find(\"label\").mousedown( function(event){\n event.preventDefault();\n });\n choiceContainer.find(\"label\").mouseenter(function(){\n this.style.cursor=\"pointer\";\n });\n\n // Recreate graphe on series activation toggle\n choiceContainer.find(\"input\").click(function(){\n infos.createGraph();\n });\n}", "title": "" }, { "docid": "768dcb61c6de9074e0c7aad2dad97383", "score": "0.6800553", "text": "function createLegend(choiceContainer, infos) {\n // Sort series by name\n var keys = [];\n $.each(infos.data.result.series, function(index, series){\n keys.push(series.label);\n });\n keys.sort(sortAlphaCaseless);\n\n // Create list of series with support of activation/deactivation\n $.each(keys, function(index, key) {\n var id = choiceContainer.attr('id') + index;\n $('<li />')\n .append($('<input id=\"' + id + '\" name=\"' + key + '\" type=\"checkbox\" checked=\"checked\" hidden />'))\n .append($('<label />', { 'text': key , 'for': id }))\n .appendTo(choiceContainer);\n });\n choiceContainer.find(\"label\").click( function(){\n if (this.style.color !== \"rgb(129, 129, 129)\" ){\n this.style.color=\"#818181\";\n }else {\n this.style.color=\"black\";\n }\n $(this).parent().children().children().toggleClass(\"legend-disabled\");\n });\n choiceContainer.find(\"label\").mousedown( function(event){\n event.preventDefault();\n });\n choiceContainer.find(\"label\").mouseenter(function(){\n this.style.cursor=\"pointer\";\n });\n\n // Recreate graphe on series activation toggle\n choiceContainer.find(\"input\").click(function(){\n infos.createGraph();\n });\n}", "title": "" }, { "docid": "768dcb61c6de9074e0c7aad2dad97383", "score": "0.6800553", "text": "function createLegend(choiceContainer, infos) {\n // Sort series by name\n var keys = [];\n $.each(infos.data.result.series, function(index, series){\n keys.push(series.label);\n });\n keys.sort(sortAlphaCaseless);\n\n // Create list of series with support of activation/deactivation\n $.each(keys, function(index, key) {\n var id = choiceContainer.attr('id') + index;\n $('<li />')\n .append($('<input id=\"' + id + '\" name=\"' + key + '\" type=\"checkbox\" checked=\"checked\" hidden />'))\n .append($('<label />', { 'text': key , 'for': id }))\n .appendTo(choiceContainer);\n });\n choiceContainer.find(\"label\").click( function(){\n if (this.style.color !== \"rgb(129, 129, 129)\" ){\n this.style.color=\"#818181\";\n }else {\n this.style.color=\"black\";\n }\n $(this).parent().children().children().toggleClass(\"legend-disabled\");\n });\n choiceContainer.find(\"label\").mousedown( function(event){\n event.preventDefault();\n });\n choiceContainer.find(\"label\").mouseenter(function(){\n this.style.cursor=\"pointer\";\n });\n\n // Recreate graphe on series activation toggle\n choiceContainer.find(\"input\").click(function(){\n infos.createGraph();\n });\n}", "title": "" }, { "docid": "768dcb61c6de9074e0c7aad2dad97383", "score": "0.6800553", "text": "function createLegend(choiceContainer, infos) {\n // Sort series by name\n var keys = [];\n $.each(infos.data.result.series, function(index, series){\n keys.push(series.label);\n });\n keys.sort(sortAlphaCaseless);\n\n // Create list of series with support of activation/deactivation\n $.each(keys, function(index, key) {\n var id = choiceContainer.attr('id') + index;\n $('<li />')\n .append($('<input id=\"' + id + '\" name=\"' + key + '\" type=\"checkbox\" checked=\"checked\" hidden />'))\n .append($('<label />', { 'text': key , 'for': id }))\n .appendTo(choiceContainer);\n });\n choiceContainer.find(\"label\").click( function(){\n if (this.style.color !== \"rgb(129, 129, 129)\" ){\n this.style.color=\"#818181\";\n }else {\n this.style.color=\"black\";\n }\n $(this).parent().children().children().toggleClass(\"legend-disabled\");\n });\n choiceContainer.find(\"label\").mousedown( function(event){\n event.preventDefault();\n });\n choiceContainer.find(\"label\").mouseenter(function(){\n this.style.cursor=\"pointer\";\n });\n\n // Recreate graphe on series activation toggle\n choiceContainer.find(\"input\").click(function(){\n infos.createGraph();\n });\n}", "title": "" }, { "docid": "768dcb61c6de9074e0c7aad2dad97383", "score": "0.6800553", "text": "function createLegend(choiceContainer, infos) {\n // Sort series by name\n var keys = [];\n $.each(infos.data.result.series, function(index, series){\n keys.push(series.label);\n });\n keys.sort(sortAlphaCaseless);\n\n // Create list of series with support of activation/deactivation\n $.each(keys, function(index, key) {\n var id = choiceContainer.attr('id') + index;\n $('<li />')\n .append($('<input id=\"' + id + '\" name=\"' + key + '\" type=\"checkbox\" checked=\"checked\" hidden />'))\n .append($('<label />', { 'text': key , 'for': id }))\n .appendTo(choiceContainer);\n });\n choiceContainer.find(\"label\").click( function(){\n if (this.style.color !== \"rgb(129, 129, 129)\" ){\n this.style.color=\"#818181\";\n }else {\n this.style.color=\"black\";\n }\n $(this).parent().children().children().toggleClass(\"legend-disabled\");\n });\n choiceContainer.find(\"label\").mousedown( function(event){\n event.preventDefault();\n });\n choiceContainer.find(\"label\").mouseenter(function(){\n this.style.cursor=\"pointer\";\n });\n\n // Recreate graphe on series activation toggle\n choiceContainer.find(\"input\").click(function(){\n infos.createGraph();\n });\n}", "title": "" }, { "docid": "768dcb61c6de9074e0c7aad2dad97383", "score": "0.6800553", "text": "function createLegend(choiceContainer, infos) {\n // Sort series by name\n var keys = [];\n $.each(infos.data.result.series, function(index, series){\n keys.push(series.label);\n });\n keys.sort(sortAlphaCaseless);\n\n // Create list of series with support of activation/deactivation\n $.each(keys, function(index, key) {\n var id = choiceContainer.attr('id') + index;\n $('<li />')\n .append($('<input id=\"' + id + '\" name=\"' + key + '\" type=\"checkbox\" checked=\"checked\" hidden />'))\n .append($('<label />', { 'text': key , 'for': id }))\n .appendTo(choiceContainer);\n });\n choiceContainer.find(\"label\").click( function(){\n if (this.style.color !== \"rgb(129, 129, 129)\" ){\n this.style.color=\"#818181\";\n }else {\n this.style.color=\"black\";\n }\n $(this).parent().children().children().toggleClass(\"legend-disabled\");\n });\n choiceContainer.find(\"label\").mousedown( function(event){\n event.preventDefault();\n });\n choiceContainer.find(\"label\").mouseenter(function(){\n this.style.cursor=\"pointer\";\n });\n\n // Recreate graphe on series activation toggle\n choiceContainer.find(\"input\").click(function(){\n infos.createGraph();\n });\n}", "title": "" }, { "docid": "c67b14fdfcf56ccde5b307c384684761", "score": "0.6786773", "text": "createLegend() {\n let airQualityData = AirQualityData.getInstance();\n\n legend = L.control({ position: \"bottomleft\" });\n /**\n * Creates the Legend content.\n */\n legend.onAdd = () => {\n const { t } = this.props;\n const div = L.DomUtil.create(\"div\", \"info legend\");\n const num = 10;\n const min = airQualityData.getAverage() - airQualityData.getVariance();\n const grades = [];\n const distance = (airQualityData.getVariance() * 2) / num;\n\n for (var i = 0; i < num; i++) {\n grades[i] = min + i * distance;\n }\n\n let labels = [];\n let pos;\n\n for (let i = grades.length - 1; i >= 0; i--) {\n pos = grades[i];\n\n labels.push(\n '<i style=\"background:' +\n Gradient.interpolate(pos) +\n '\"></i> ' +\n ((i === 0) ? \"<\" : \"\") +\n ((i === (grades.length - 1)) ? \">\" : \"\") +\n pos +\n \" \" +\n airQualityData.getUnitOfMeasurement()\n );\n }\n\n div.innerHTML = `<p class='legendHeader'>${t('legendHeader')}</p>` + labels.join(\"<br>\");\n return div;\n };\n\n const { map } = this.props.leaflet;\n legend.addTo(map);\n }", "title": "" }, { "docid": "777beaddee0252bcafab2a282da97048", "score": "0.67843366", "text": "function createLegend(choiceContainer, infos) {\r\n // Sort series by name\r\n var keys = [];\r\n $.each(infos.data.result.series, function(index, series){\r\n keys.push(series.label);\r\n });\r\n keys.sort(sortAlphaCaseless);\r\n\r\n // Create list of series with support of activation/deactivation\r\n $.each(keys, function(index, key) {\r\n var id = choiceContainer.attr('id') + index;\r\n $('<li />')\r\n .append($('<input id=\"' + id + '\" name=\"' + key + '\" type=\"checkbox\" checked=\"checked\" hidden />'))\r\n .append($('<label />', { 'text': key , 'for': id }))\r\n .appendTo(choiceContainer);\r\n });\r\n choiceContainer.find(\"label\").click( function(){\r\n if (this.style.color !== \"rgb(129, 129, 129)\" ){\r\n this.style.color=\"#818181\";\r\n }else {\r\n this.style.color=\"black\";\r\n }\r\n $(this).parent().children().children().toggleClass(\"legend-disabled\");\r\n });\r\n choiceContainer.find(\"label\").mousedown( function(event){\r\n event.preventDefault();\r\n });\r\n choiceContainer.find(\"label\").mouseenter(function(){\r\n this.style.cursor=\"pointer\";\r\n });\r\n\r\n // Recreate graphe on series activation toggle\r\n choiceContainer.find(\"input\").click(function(){\r\n infos.createGraph();\r\n });\r\n}", "title": "" }, { "docid": "777beaddee0252bcafab2a282da97048", "score": "0.67843366", "text": "function createLegend(choiceContainer, infos) {\r\n // Sort series by name\r\n var keys = [];\r\n $.each(infos.data.result.series, function(index, series){\r\n keys.push(series.label);\r\n });\r\n keys.sort(sortAlphaCaseless);\r\n\r\n // Create list of series with support of activation/deactivation\r\n $.each(keys, function(index, key) {\r\n var id = choiceContainer.attr('id') + index;\r\n $('<li />')\r\n .append($('<input id=\"' + id + '\" name=\"' + key + '\" type=\"checkbox\" checked=\"checked\" hidden />'))\r\n .append($('<label />', { 'text': key , 'for': id }))\r\n .appendTo(choiceContainer);\r\n });\r\n choiceContainer.find(\"label\").click( function(){\r\n if (this.style.color !== \"rgb(129, 129, 129)\" ){\r\n this.style.color=\"#818181\";\r\n }else {\r\n this.style.color=\"black\";\r\n }\r\n $(this).parent().children().children().toggleClass(\"legend-disabled\");\r\n });\r\n choiceContainer.find(\"label\").mousedown( function(event){\r\n event.preventDefault();\r\n });\r\n choiceContainer.find(\"label\").mouseenter(function(){\r\n this.style.cursor=\"pointer\";\r\n });\r\n\r\n // Recreate graphe on series activation toggle\r\n choiceContainer.find(\"input\").click(function(){\r\n infos.createGraph();\r\n });\r\n}", "title": "" }, { "docid": "777beaddee0252bcafab2a282da97048", "score": "0.67843366", "text": "function createLegend(choiceContainer, infos) {\r\n // Sort series by name\r\n var keys = [];\r\n $.each(infos.data.result.series, function(index, series){\r\n keys.push(series.label);\r\n });\r\n keys.sort(sortAlphaCaseless);\r\n\r\n // Create list of series with support of activation/deactivation\r\n $.each(keys, function(index, key) {\r\n var id = choiceContainer.attr('id') + index;\r\n $('<li />')\r\n .append($('<input id=\"' + id + '\" name=\"' + key + '\" type=\"checkbox\" checked=\"checked\" hidden />'))\r\n .append($('<label />', { 'text': key , 'for': id }))\r\n .appendTo(choiceContainer);\r\n });\r\n choiceContainer.find(\"label\").click( function(){\r\n if (this.style.color !== \"rgb(129, 129, 129)\" ){\r\n this.style.color=\"#818181\";\r\n }else {\r\n this.style.color=\"black\";\r\n }\r\n $(this).parent().children().children().toggleClass(\"legend-disabled\");\r\n });\r\n choiceContainer.find(\"label\").mousedown( function(event){\r\n event.preventDefault();\r\n });\r\n choiceContainer.find(\"label\").mouseenter(function(){\r\n this.style.cursor=\"pointer\";\r\n });\r\n\r\n // Recreate graphe on series activation toggle\r\n choiceContainer.find(\"input\").click(function(){\r\n infos.createGraph();\r\n });\r\n}", "title": "" }, { "docid": "777beaddee0252bcafab2a282da97048", "score": "0.67843366", "text": "function createLegend(choiceContainer, infos) {\r\n // Sort series by name\r\n var keys = [];\r\n $.each(infos.data.result.series, function(index, series){\r\n keys.push(series.label);\r\n });\r\n keys.sort(sortAlphaCaseless);\r\n\r\n // Create list of series with support of activation/deactivation\r\n $.each(keys, function(index, key) {\r\n var id = choiceContainer.attr('id') + index;\r\n $('<li />')\r\n .append($('<input id=\"' + id + '\" name=\"' + key + '\" type=\"checkbox\" checked=\"checked\" hidden />'))\r\n .append($('<label />', { 'text': key , 'for': id }))\r\n .appendTo(choiceContainer);\r\n });\r\n choiceContainer.find(\"label\").click( function(){\r\n if (this.style.color !== \"rgb(129, 129, 129)\" ){\r\n this.style.color=\"#818181\";\r\n }else {\r\n this.style.color=\"black\";\r\n }\r\n $(this).parent().children().children().toggleClass(\"legend-disabled\");\r\n });\r\n choiceContainer.find(\"label\").mousedown( function(event){\r\n event.preventDefault();\r\n });\r\n choiceContainer.find(\"label\").mouseenter(function(){\r\n this.style.cursor=\"pointer\";\r\n });\r\n\r\n // Recreate graphe on series activation toggle\r\n choiceContainer.find(\"input\").click(function(){\r\n infos.createGraph();\r\n });\r\n}", "title": "" }, { "docid": "777beaddee0252bcafab2a282da97048", "score": "0.67843366", "text": "function createLegend(choiceContainer, infos) {\r\n // Sort series by name\r\n var keys = [];\r\n $.each(infos.data.result.series, function(index, series){\r\n keys.push(series.label);\r\n });\r\n keys.sort(sortAlphaCaseless);\r\n\r\n // Create list of series with support of activation/deactivation\r\n $.each(keys, function(index, key) {\r\n var id = choiceContainer.attr('id') + index;\r\n $('<li />')\r\n .append($('<input id=\"' + id + '\" name=\"' + key + '\" type=\"checkbox\" checked=\"checked\" hidden />'))\r\n .append($('<label />', { 'text': key , 'for': id }))\r\n .appendTo(choiceContainer);\r\n });\r\n choiceContainer.find(\"label\").click( function(){\r\n if (this.style.color !== \"rgb(129, 129, 129)\" ){\r\n this.style.color=\"#818181\";\r\n }else {\r\n this.style.color=\"black\";\r\n }\r\n $(this).parent().children().children().toggleClass(\"legend-disabled\");\r\n });\r\n choiceContainer.find(\"label\").mousedown( function(event){\r\n event.preventDefault();\r\n });\r\n choiceContainer.find(\"label\").mouseenter(function(){\r\n this.style.cursor=\"pointer\";\r\n });\r\n\r\n // Recreate graphe on series activation toggle\r\n choiceContainer.find(\"input\").click(function(){\r\n infos.createGraph();\r\n });\r\n}", "title": "" }, { "docid": "777beaddee0252bcafab2a282da97048", "score": "0.67843366", "text": "function createLegend(choiceContainer, infos) {\r\n // Sort series by name\r\n var keys = [];\r\n $.each(infos.data.result.series, function(index, series){\r\n keys.push(series.label);\r\n });\r\n keys.sort(sortAlphaCaseless);\r\n\r\n // Create list of series with support of activation/deactivation\r\n $.each(keys, function(index, key) {\r\n var id = choiceContainer.attr('id') + index;\r\n $('<li />')\r\n .append($('<input id=\"' + id + '\" name=\"' + key + '\" type=\"checkbox\" checked=\"checked\" hidden />'))\r\n .append($('<label />', { 'text': key , 'for': id }))\r\n .appendTo(choiceContainer);\r\n });\r\n choiceContainer.find(\"label\").click( function(){\r\n if (this.style.color !== \"rgb(129, 129, 129)\" ){\r\n this.style.color=\"#818181\";\r\n }else {\r\n this.style.color=\"black\";\r\n }\r\n $(this).parent().children().children().toggleClass(\"legend-disabled\");\r\n });\r\n choiceContainer.find(\"label\").mousedown( function(event){\r\n event.preventDefault();\r\n });\r\n choiceContainer.find(\"label\").mouseenter(function(){\r\n this.style.cursor=\"pointer\";\r\n });\r\n\r\n // Recreate graphe on series activation toggle\r\n choiceContainer.find(\"input\").click(function(){\r\n infos.createGraph();\r\n });\r\n}", "title": "" }, { "docid": "777beaddee0252bcafab2a282da97048", "score": "0.67843366", "text": "function createLegend(choiceContainer, infos) {\r\n // Sort series by name\r\n var keys = [];\r\n $.each(infos.data.result.series, function(index, series){\r\n keys.push(series.label);\r\n });\r\n keys.sort(sortAlphaCaseless);\r\n\r\n // Create list of series with support of activation/deactivation\r\n $.each(keys, function(index, key) {\r\n var id = choiceContainer.attr('id') + index;\r\n $('<li />')\r\n .append($('<input id=\"' + id + '\" name=\"' + key + '\" type=\"checkbox\" checked=\"checked\" hidden />'))\r\n .append($('<label />', { 'text': key , 'for': id }))\r\n .appendTo(choiceContainer);\r\n });\r\n choiceContainer.find(\"label\").click( function(){\r\n if (this.style.color !== \"rgb(129, 129, 129)\" ){\r\n this.style.color=\"#818181\";\r\n }else {\r\n this.style.color=\"black\";\r\n }\r\n $(this).parent().children().children().toggleClass(\"legend-disabled\");\r\n });\r\n choiceContainer.find(\"label\").mousedown( function(event){\r\n event.preventDefault();\r\n });\r\n choiceContainer.find(\"label\").mouseenter(function(){\r\n this.style.cursor=\"pointer\";\r\n });\r\n\r\n // Recreate graphe on series activation toggle\r\n choiceContainer.find(\"input\").click(function(){\r\n infos.createGraph();\r\n });\r\n}", "title": "" }, { "docid": "777beaddee0252bcafab2a282da97048", "score": "0.67843366", "text": "function createLegend(choiceContainer, infos) {\r\n // Sort series by name\r\n var keys = [];\r\n $.each(infos.data.result.series, function(index, series){\r\n keys.push(series.label);\r\n });\r\n keys.sort(sortAlphaCaseless);\r\n\r\n // Create list of series with support of activation/deactivation\r\n $.each(keys, function(index, key) {\r\n var id = choiceContainer.attr('id') + index;\r\n $('<li />')\r\n .append($('<input id=\"' + id + '\" name=\"' + key + '\" type=\"checkbox\" checked=\"checked\" hidden />'))\r\n .append($('<label />', { 'text': key , 'for': id }))\r\n .appendTo(choiceContainer);\r\n });\r\n choiceContainer.find(\"label\").click( function(){\r\n if (this.style.color !== \"rgb(129, 129, 129)\" ){\r\n this.style.color=\"#818181\";\r\n }else {\r\n this.style.color=\"black\";\r\n }\r\n $(this).parent().children().children().toggleClass(\"legend-disabled\");\r\n });\r\n choiceContainer.find(\"label\").mousedown( function(event){\r\n event.preventDefault();\r\n });\r\n choiceContainer.find(\"label\").mouseenter(function(){\r\n this.style.cursor=\"pointer\";\r\n });\r\n\r\n // Recreate graphe on series activation toggle\r\n choiceContainer.find(\"input\").click(function(){\r\n infos.createGraph();\r\n });\r\n}", "title": "" }, { "docid": "1751809d0ed6e89f0fe78f49d2df025f", "score": "0.67805797", "text": "function alterLegend(legendData) {\n var nodataLength = $.grep(legendData, function(a) {\n return a == nodata;\n }).length;\n var redLength = $.grep(legendData, function(a) {\n return a == red;\n }).length;\n var orangeLength = $.grep(legendData, function(a) {\n return a == orange;\n }).length;\n var yellowLength = $.grep(legendData, function(a) {\n return a == yellow;\n }).length;\n var lightGreenLength = $.grep(legendData, function(a) {\n return a == lightGreen;\n }).length;\n var darkGreenLength = $.grep(legendData, function(a) {\n return a == darkGreen;\n }).length;\n\n var nodataHeight = 456 * (nodataLength / legendData.length) + 14;\n var redHeight = 456 * (redLength / legendData.length) + 14;\n var orangeHeight = 456 * (orangeLength / legendData.length) + 14;\n var yellowHeight = 456 * (yellowLength / legendData.length) + 14;\n var lightGreenHeight = 456 * (lightGreenLength / legendData.length) + 14;\n var darkGreenHeight = 456 * (darkGreenLength / legendData.length) + 14;\n\n $(\"p#legNa\").animate(\n {\n height: nodataHeight + \"px\"\n },\n 500\n );\n\n $(\"p#leg9\").animate(\n {\n height: redHeight + \"px\"\n },\n 500\n );\n\n $(\"p#leg19\").animate(\n {\n height: orangeHeight + \"px\"\n },\n 500\n );\n\n $(\"p#leg29\").animate(\n {\n height: yellowHeight + \"px\"\n },\n 500\n );\n\n $(\"p#leg39\").animate(\n {\n height: lightGreenHeight + \"px\"\n },\n 500\n );\n\n $(\"p#leg49\").animate(\n {\n height: darkGreenHeight + \"px\"\n },\n 500\n );\n }", "title": "" }, { "docid": "34ff9cdda320c318b1b74c40832e4492", "score": "0.6779117", "text": "function ApexLegend() { }", "title": "" }, { "docid": "d3e2c8227bd2aca7b6a29c57f7359b2d", "score": "0.67640835", "text": "function legend (data) {\n const leg = {}\n\n // create table for legend.\n const legend = d3.select(element)\n .append('table')\n .attr('width', 200)\n .attr('height', 200)\n .attr('class', 'legend')\n .style('margin-bottom', '76px')\n .style('display', 'inline-block')\n .style('border-collapse', 'collapse')\n .style('border-spacing', 0)\n .style('padding', '12px 12px 6px')\n .style('height', 'auto')\n .style('border-radius', '4px')\n .style('border', '1px solid #999')\n .style('box-sizing', 'border-box')\n .style('margin-left', '20')\n\n // create one row per segment.\n const tableRow = legend.append('tbody')\n .selectAll('tr').data(data).enter().append('tr')\n\n legend.select('tr').style('border-bottom', '2px solid grey')\n\n // create the first column for each segment.\n tableRow.append('td').append('svg')\n .attr('width', '10')\n .attr('height', '10')\n .append('rect')\n .attr('width', '10').attr('height', '10')\n .attr('fill', function (d) { return segColor(d.type) })\n\n // create the second column for each segment.\n tableRow.append('td').text(function (d) { return d.type })\n .style('font-size', '13px')\n .style('padding', '6px 5px')\n .style('vertical-align', 'bottom')\n\n // create the third column for each segment.\n tableRow.append('td').attr('class', 'legendFreq')\n .text((d) => { return d3.format(',')(d.freq) + ' bills' })\n .style('font-size', '12.5px')\n .style('align', 'right')\n .style('width', '70px')\n\n // create the fourth column for each segment.\n tableRow.append('td').attr('class', 'legendPerc')\n .text((d) => { return (getLegend(d, data)) + '%' })\n .style('font-size', '13px')\n .style('align', 'center')\n .style('width', '40px')\n\n // Utility function to be used to update the legend.\n leg.update = function (nD) {\n // update the data attached to the row elements.\n const l = legend.select('tbody').selectAll('tr').data(nD)\n\n // update the frequencies.\n l.select('.legendFreq').text((d) => { return d3.format(',')(d.freq) + ' bills' })\n .style('font-size', '12.5px')\n .style('align', 'right')\n .style('width', '70px')\n\n // update the percentage column.\n l.select('.legendPerc')\n .text((d) => { return getLegend(d, nD) + '%' })\n .style('align', 'right')\n .style('width', '40px')\n }\n\n function getLegend (d, aD) { // Utility function to compute percentage.\n let sum = 0\n aD.forEach(element => {\n sum = sum + element.freq\n })\n const fraction = ((d.freq / sum) * 100).toFixed(1)\n return fraction\n }\n\n return leg\n }", "title": "" }, { "docid": "535baf5e5689417a16bf00a78875080a", "score": "0.6741209", "text": "function createLegends() {\n var pathfinder = new Legend(\"Pathfinder\", \"Support\");\n var lifeline = new Legend(\"Lifeline\", \"Support\");\n var bloodhound = new Legend(\"Bloodhound\", \"Tracker\");\n var gibraltar = new Legend(\"Gibraltar\", \"Defense\");\n var wraith = new Legend(\"Wraith\", \"Offense\");\n var bangalore = new Legend(\"Bangalore\", \"Offense\");\n var caustic = new Legend(\"Caustic\", \"Defense\");\n var mirage = new Legend(\"Mirage\", \"Offense\");\n var octane = new Legend(\"Octane\", \"Offense\");\n \n legends.push(pathfinder);\n legends.push(lifeline);\n legends.push(bloodhound);\n legends.push(gibraltar);\n legends.push(wraith);\n legends.push(bangalore);\n legends.push(caustic);\n legends.push(mirage);\n legends.push(octane);\n}", "title": "" }, { "docid": "61dc9f937cf6bc118c19adf5284ecaaa", "score": "0.6730631", "text": "function makeLegend(){\n\n\t// set height and width\n\tvar legendHeight = 230;\n\tvar legendWidth = 300;\n\n\t// set legend properties\n\tvar colorLegend = d3.legend.color()\n\t .scale(paletteScale)\n\t .labelFormat(d3.format(\".0f\"))\n\t .shapePadding(5)\n\t .shapeWidth(50)\n\t .shapeHeight(20)\n\t .labelOffset(12);\n\n\t// add legend\n\tvar svg = d3.select(\"#maplegend\")\n\t\t.append(\"svg\")\n\t\t .attr(\"width\", legendWidth)\n\t\t .attr(\"height\", legendHeight)\n\t\t .append(\"g\")\n\t\t .attr(\"transform\", \"translate(20,20)\")\n\t\t .call(colorLegend);\n}", "title": "" }, { "docid": "0680c1a92bd5647420def86ec02bae15", "score": "0.67243505", "text": "function legend(lD){\n function columns(tr) {\n // create the first column for each segment.\n tr.append(\"td\").append(\"svg\").attr(\"width\", '16').attr(\"height\", '16').append(\"rect\")\n .attr(\"width\", '16').attr(\"height\", '16')\n .attr(\"fill\",function(d){ return segColor(d.type); });\n\n // create the second column for each segment.\n tr.append(\"td\").attr(\"class\",'LegendName')\n .text(function(d){ return d.type;});\n\n // create the third column for each segment.\n tr.append(\"td\").attr(\"class\",'legendFreq')\n .text(function(d){ return d3.format(\",\")(d.freq);});\n\n // create the fourth column for each segment.\n tr.append(\"td\").attr(\"class\",'legendPerc')\n .text(function(d){ return getLegend(d,lD);});\n }\n var leg = {};\n\n // create table for legend.\n var legend = d3.select(\"#tablediv\").append(\"table\").attr('id', 'legenda').attr('class','legend');\n\n // create one row per segment.s\n var tr = legend.append(\"tbody\").selectAll(\"tr\").data(lD).enter().append(\"tr\");\n // create table\n columns(tr)\n\n // Utility function to be used to update the legend.\n leg.update = function(nD, string){\n var Parent = document.getElementById(\"legenda\");\n if (Parent != null) {\n while(Parent.hasChildNodes())\n {\n Parent.removeChild(Parent.firstChild);\n }\n };\n if (string == undefined) {\n // update the data attached to the row elements.\n var tr = legend.append(\"tbody\").selectAll(\"tr\").data(nD).enter().append(\"tr\");\n // create table\n columns(tr)\n\n } else {\n legend.append(\"text\")\n .text(string)\n .style(\"margin-left\", \"40px\")\n .style(\"font-size\", \"20px\")\n .style(\"font-weight\", \"bold\")\n }\n }\n // highlight row of the categorie with color\n leg.highlight = function(categorie, color){\n d3.selectAll(\"tr\").filter(function() {\n return this.innerText.startsWith(categorie)\n })\n .style(\"background-color\", color)\n }\n // Utility function to compute percentage.\n function getLegend(d,aD){\n return d3.format(\"%\")(d.freq/d3.sum(aD.map(function(v){ return v.freq; })));\n }\n return leg;\n }", "title": "" }, { "docid": "d1c91590376870e87c7656a026793de6", "score": "0.6693559", "text": "function initializeLegend() {\n legendDijit = new esri.dijit.Legend({\n map: map\n }, \"legendDiv\");\n legendDijit.startup();\n }", "title": "" }, { "docid": "b08292e08dfac7b88e6bdc8f31d0d2e3", "score": "0.66788733", "text": "function createLegend()\n{\t\n\t// dataset used for creating custom legend for datamap\n var legend_data = [{label : \"unknown\", color : \"#bdbdbd\"}, {label : \"< 1\", color : \"#eff3ff\"}, {label : \"1 - 5\", color : \"#c6dbef\"}, \n {label : \"5 - 15\", color : \"#9ecae1\"}, {label : \"15 - 30\", color : \"#6baed6\"}, {label : \"30 - 60\", color : \"#4292c6\"}, \n {label : \"60 - 100\", color : \"#2171b5\"}, {label : \"> 100\", color : \"#084594\"}];\n\n // append rectangle for every data-object in legend_data array\n\tvar legend = d3.select(\".datamap\").append(\"g\")\n\t\t.attr(\"class\", \"map-legend\")\n\t\t.selectAll(\"rect\")\n\t\t.data(legend_data)\n\t\t.enter()\n\t\t.append(\"g\")\n\n\tlegend.append(\"rect\")\n\t.attr(\"width\", \"20px\")\n\t.attr(\"height\", \"20px\")\n\t.attr(\"x\", 20)\n\t.attr(\"y\", function (d, i) { return 180 + (i * 20); })\n\t.style(\"fill\", function(d) { return d.color; })\n\n\t// also append text for every data-object in legend_data\n\tlegend.append(\"text\")\n\t.attr(\"x\", 45)\n\t.attr(\"y\", function(d, i) { return 195 + (i * 20); })\n\t.text(function(d) { return d.label})\n\n\t// add title to legend\n\tlegend.append(\"text\")\n\t.attr(\"class\", \"legend-title\")\n\t.attr(\"x\", 20)\n\t.attr(\"y\", 360)\n\t.style(\"font-size\", \"11.5px\")\n\t.text(function() { return \"Number of First Time\"; })\n\n\t// add title to legend\n\tlegend.append(\"text\")\n\t.attr(\"class\", \"legend-title\")\n\t.attr(\"x\", 20)\n\t.attr(\"y\", 380)\n\t.style(\"font-size\", \"11.5px\")\n\t.text(function() { return \"Asylum Applicants (x1000)\"; })\n}", "title": "" }, { "docid": "af0f2ba065bc676737ec79bb40db42b9", "score": "0.661476", "text": "function addLegend(layer, data, options) {\n data = data || {};\n if ( !this.options.fills ) {\n return;\n }\n\n var html = '<dl>';\n var label = '';\n if ( data.legendTitle ) {\n html = '<h2>' + data.legendTitle + '</h2>' + html;\n }\n for ( var fillKey in this.options.fills ) {\n\n if ( fillKey === 'defaultFill') {\n if (! data.defaultFillName ) {\n continue;\n }\n label = data.defaultFillName;\n } else {\n if (data.labels && data.labels[fillKey]) {\n label = data.labels[fillKey];\n } else {\n label= fillKey + ': ';\n }\n }\n html += '<dt>' + label + '</dt>';\n html += '<dd style=\"background-color:' + this.options.fills[fillKey] + '\">&nbsp;</dd>';\n }\n html += '</dl>';\n\n var hoverover = d3.select( this.options.element ).append('div')\n .attr('class', 'datamaps-legend')\n .html(html);\n }", "title": "" }, { "docid": "af0f2ba065bc676737ec79bb40db42b9", "score": "0.661476", "text": "function addLegend(layer, data, options) {\n data = data || {};\n if ( !this.options.fills ) {\n return;\n }\n\n var html = '<dl>';\n var label = '';\n if ( data.legendTitle ) {\n html = '<h2>' + data.legendTitle + '</h2>' + html;\n }\n for ( var fillKey in this.options.fills ) {\n\n if ( fillKey === 'defaultFill') {\n if (! data.defaultFillName ) {\n continue;\n }\n label = data.defaultFillName;\n } else {\n if (data.labels && data.labels[fillKey]) {\n label = data.labels[fillKey];\n } else {\n label= fillKey + ': ';\n }\n }\n html += '<dt>' + label + '</dt>';\n html += '<dd style=\"background-color:' + this.options.fills[fillKey] + '\">&nbsp;</dd>';\n }\n html += '</dl>';\n\n var hoverover = d3.select( this.options.element ).append('div')\n .attr('class', 'datamaps-legend')\n .html(html);\n }", "title": "" }, { "docid": "af0f2ba065bc676737ec79bb40db42b9", "score": "0.661476", "text": "function addLegend(layer, data, options) {\n data = data || {};\n if ( !this.options.fills ) {\n return;\n }\n\n var html = '<dl>';\n var label = '';\n if ( data.legendTitle ) {\n html = '<h2>' + data.legendTitle + '</h2>' + html;\n }\n for ( var fillKey in this.options.fills ) {\n\n if ( fillKey === 'defaultFill') {\n if (! data.defaultFillName ) {\n continue;\n }\n label = data.defaultFillName;\n } else {\n if (data.labels && data.labels[fillKey]) {\n label = data.labels[fillKey];\n } else {\n label= fillKey + ': ';\n }\n }\n html += '<dt>' + label + '</dt>';\n html += '<dd style=\"background-color:' + this.options.fills[fillKey] + '\">&nbsp;</dd>';\n }\n html += '</dl>';\n\n var hoverover = d3.select( this.options.element ).append('div')\n .attr('class', 'datamaps-legend')\n .html(html);\n }", "title": "" }, { "docid": "af0f2ba065bc676737ec79bb40db42b9", "score": "0.661476", "text": "function addLegend(layer, data, options) {\n data = data || {};\n if ( !this.options.fills ) {\n return;\n }\n\n var html = '<dl>';\n var label = '';\n if ( data.legendTitle ) {\n html = '<h2>' + data.legendTitle + '</h2>' + html;\n }\n for ( var fillKey in this.options.fills ) {\n\n if ( fillKey === 'defaultFill') {\n if (! data.defaultFillName ) {\n continue;\n }\n label = data.defaultFillName;\n } else {\n if (data.labels && data.labels[fillKey]) {\n label = data.labels[fillKey];\n } else {\n label= fillKey + ': ';\n }\n }\n html += '<dt>' + label + '</dt>';\n html += '<dd style=\"background-color:' + this.options.fills[fillKey] + '\">&nbsp;</dd>';\n }\n html += '</dl>';\n\n var hoverover = d3.select( this.options.element ).append('div')\n .attr('class', 'datamaps-legend')\n .html(html);\n }", "title": "" }, { "docid": "af0f2ba065bc676737ec79bb40db42b9", "score": "0.661476", "text": "function addLegend(layer, data, options) {\n data = data || {};\n if ( !this.options.fills ) {\n return;\n }\n\n var html = '<dl>';\n var label = '';\n if ( data.legendTitle ) {\n html = '<h2>' + data.legendTitle + '</h2>' + html;\n }\n for ( var fillKey in this.options.fills ) {\n\n if ( fillKey === 'defaultFill') {\n if (! data.defaultFillName ) {\n continue;\n }\n label = data.defaultFillName;\n } else {\n if (data.labels && data.labels[fillKey]) {\n label = data.labels[fillKey];\n } else {\n label= fillKey + ': ';\n }\n }\n html += '<dt>' + label + '</dt>';\n html += '<dd style=\"background-color:' + this.options.fills[fillKey] + '\">&nbsp;</dd>';\n }\n html += '</dl>';\n\n var hoverover = d3.select( this.options.element ).append('div')\n .attr('class', 'datamaps-legend')\n .html(html);\n }", "title": "" }, { "docid": "af0f2ba065bc676737ec79bb40db42b9", "score": "0.661476", "text": "function addLegend(layer, data, options) {\n data = data || {};\n if ( !this.options.fills ) {\n return;\n }\n\n var html = '<dl>';\n var label = '';\n if ( data.legendTitle ) {\n html = '<h2>' + data.legendTitle + '</h2>' + html;\n }\n for ( var fillKey in this.options.fills ) {\n\n if ( fillKey === 'defaultFill') {\n if (! data.defaultFillName ) {\n continue;\n }\n label = data.defaultFillName;\n } else {\n if (data.labels && data.labels[fillKey]) {\n label = data.labels[fillKey];\n } else {\n label= fillKey + ': ';\n }\n }\n html += '<dt>' + label + '</dt>';\n html += '<dd style=\"background-color:' + this.options.fills[fillKey] + '\">&nbsp;</dd>';\n }\n html += '</dl>';\n\n var hoverover = d3.select( this.options.element ).append('div')\n .attr('class', 'datamaps-legend')\n .html(html);\n }", "title": "" }, { "docid": "af0f2ba065bc676737ec79bb40db42b9", "score": "0.661476", "text": "function addLegend(layer, data, options) {\n data = data || {};\n if ( !this.options.fills ) {\n return;\n }\n\n var html = '<dl>';\n var label = '';\n if ( data.legendTitle ) {\n html = '<h2>' + data.legendTitle + '</h2>' + html;\n }\n for ( var fillKey in this.options.fills ) {\n\n if ( fillKey === 'defaultFill') {\n if (! data.defaultFillName ) {\n continue;\n }\n label = data.defaultFillName;\n } else {\n if (data.labels && data.labels[fillKey]) {\n label = data.labels[fillKey];\n } else {\n label= fillKey + ': ';\n }\n }\n html += '<dt>' + label + '</dt>';\n html += '<dd style=\"background-color:' + this.options.fills[fillKey] + '\">&nbsp;</dd>';\n }\n html += '</dl>';\n\n var hoverover = d3.select( this.options.element ).append('div')\n .attr('class', 'datamaps-legend')\n .html(html);\n }", "title": "" }, { "docid": "af0f2ba065bc676737ec79bb40db42b9", "score": "0.661476", "text": "function addLegend(layer, data, options) {\n data = data || {};\n if ( !this.options.fills ) {\n return;\n }\n\n var html = '<dl>';\n var label = '';\n if ( data.legendTitle ) {\n html = '<h2>' + data.legendTitle + '</h2>' + html;\n }\n for ( var fillKey in this.options.fills ) {\n\n if ( fillKey === 'defaultFill') {\n if (! data.defaultFillName ) {\n continue;\n }\n label = data.defaultFillName;\n } else {\n if (data.labels && data.labels[fillKey]) {\n label = data.labels[fillKey];\n } else {\n label= fillKey + ': ';\n }\n }\n html += '<dt>' + label + '</dt>';\n html += '<dd style=\"background-color:' + this.options.fills[fillKey] + '\">&nbsp;</dd>';\n }\n html += '</dl>';\n\n var hoverover = d3.select( this.options.element ).append('div')\n .attr('class', 'datamaps-legend')\n .html(html);\n }", "title": "" }, { "docid": "af0f2ba065bc676737ec79bb40db42b9", "score": "0.661476", "text": "function addLegend(layer, data, options) {\n data = data || {};\n if ( !this.options.fills ) {\n return;\n }\n\n var html = '<dl>';\n var label = '';\n if ( data.legendTitle ) {\n html = '<h2>' + data.legendTitle + '</h2>' + html;\n }\n for ( var fillKey in this.options.fills ) {\n\n if ( fillKey === 'defaultFill') {\n if (! data.defaultFillName ) {\n continue;\n }\n label = data.defaultFillName;\n } else {\n if (data.labels && data.labels[fillKey]) {\n label = data.labels[fillKey];\n } else {\n label= fillKey + ': ';\n }\n }\n html += '<dt>' + label + '</dt>';\n html += '<dd style=\"background-color:' + this.options.fills[fillKey] + '\">&nbsp;</dd>';\n }\n html += '</dl>';\n\n var hoverover = d3.select( this.options.element ).append('div')\n .attr('class', 'datamaps-legend')\n .html(html);\n }", "title": "" }, { "docid": "af0f2ba065bc676737ec79bb40db42b9", "score": "0.661476", "text": "function addLegend(layer, data, options) {\n data = data || {};\n if ( !this.options.fills ) {\n return;\n }\n\n var html = '<dl>';\n var label = '';\n if ( data.legendTitle ) {\n html = '<h2>' + data.legendTitle + '</h2>' + html;\n }\n for ( var fillKey in this.options.fills ) {\n\n if ( fillKey === 'defaultFill') {\n if (! data.defaultFillName ) {\n continue;\n }\n label = data.defaultFillName;\n } else {\n if (data.labels && data.labels[fillKey]) {\n label = data.labels[fillKey];\n } else {\n label= fillKey + ': ';\n }\n }\n html += '<dt>' + label + '</dt>';\n html += '<dd style=\"background-color:' + this.options.fills[fillKey] + '\">&nbsp;</dd>';\n }\n html += '</dl>';\n\n var hoverover = d3.select( this.options.element ).append('div')\n .attr('class', 'datamaps-legend')\n .html(html);\n }", "title": "" }, { "docid": "af0f2ba065bc676737ec79bb40db42b9", "score": "0.661476", "text": "function addLegend(layer, data, options) {\n data = data || {};\n if ( !this.options.fills ) {\n return;\n }\n\n var html = '<dl>';\n var label = '';\n if ( data.legendTitle ) {\n html = '<h2>' + data.legendTitle + '</h2>' + html;\n }\n for ( var fillKey in this.options.fills ) {\n\n if ( fillKey === 'defaultFill') {\n if (! data.defaultFillName ) {\n continue;\n }\n label = data.defaultFillName;\n } else {\n if (data.labels && data.labels[fillKey]) {\n label = data.labels[fillKey];\n } else {\n label= fillKey + ': ';\n }\n }\n html += '<dt>' + label + '</dt>';\n html += '<dd style=\"background-color:' + this.options.fills[fillKey] + '\">&nbsp;</dd>';\n }\n html += '</dl>';\n\n var hoverover = d3.select( this.options.element ).append('div')\n .attr('class', 'datamaps-legend')\n .html(html);\n }", "title": "" }, { "docid": "af0f2ba065bc676737ec79bb40db42b9", "score": "0.661476", "text": "function addLegend(layer, data, options) {\n data = data || {};\n if ( !this.options.fills ) {\n return;\n }\n\n var html = '<dl>';\n var label = '';\n if ( data.legendTitle ) {\n html = '<h2>' + data.legendTitle + '</h2>' + html;\n }\n for ( var fillKey in this.options.fills ) {\n\n if ( fillKey === 'defaultFill') {\n if (! data.defaultFillName ) {\n continue;\n }\n label = data.defaultFillName;\n } else {\n if (data.labels && data.labels[fillKey]) {\n label = data.labels[fillKey];\n } else {\n label= fillKey + ': ';\n }\n }\n html += '<dt>' + label + '</dt>';\n html += '<dd style=\"background-color:' + this.options.fills[fillKey] + '\">&nbsp;</dd>';\n }\n html += '</dl>';\n\n var hoverover = d3.select( this.options.element ).append('div')\n .attr('class', 'datamaps-legend')\n .html(html);\n }", "title": "" }, { "docid": "5eb90b23c41c97153429157167757247", "score": "0.6605399", "text": "function addLegend(layer, data, options) {\n\t data = data || {};\n\t if ( !this.options.fills ) {\n\t return;\n\t }\n\n\t var html = '<dl>';\n\t var label = '';\n\t if ( data.legendTitle ) {\n\t html = '<h2>' + data.legendTitle + '</h2>' + html;\n\t }\n\t for ( var fillKey in this.options.fills ) {\n\n\t if ( fillKey === 'defaultFill') {\n\t if (! data.defaultFillName ) {\n\t continue;\n\t }\n\t label = data.defaultFillName;\n\t } else {\n\t if (data.labels && data.labels[fillKey]) {\n\t label = data.labels[fillKey];\n\t } else {\n\t label= fillKey + ': ';\n\t }\n\t }\n\t html += '<dt>' + label + '</dt>';\n\t html += '<dd style=\"background-color:' + this.options.fills[fillKey] + '\">&nbsp;</dd>';\n\t }\n\t html += '</dl>';\n\n\t var hoverover = d3.select( this.options.element ).append('div')\n\t .attr('class', 'datamaps-legend')\n\t .html(html);\n\t }", "title": "" }, { "docid": "e62c8e1ea41932122f71d360a186d71c", "score": "0.65989214", "text": "function makeLegend(){\n\t\t\n\t\n\t\tlegend.onAdd = function(map){\n\t\t\tvar div = L.DomUtil.create ('div', 'info legend');\n\n\t\n\t\t\tdiv.innerHTML += '<p class=\"legendLabel\">Manufacturing Employment Density:<br><b>'+selectedIndustryName+'</b></p>'\n\t\n\t\t\tdiv.innerHTML += '<br><p class=\"lLabel\">High</p><div class=\"k\" height=\"150 px\" width = \"29 px\"</div><p class=\"lLabelBottom\">Low</p>';\n\t\n\t\t\tif (railsExist==true){\n\t\t\t\t\tdiv.innerHTML += '<br><p class=\"legendLabel\">Class 1 Rails<div class=\"background\"><div class=\"rails\"></div></div></p>'\n\t\t\t}if(corridorsExist==true){\n\t\t\t\t\tdiv.innerHTML += '<br><p class=\"legendLabel\">Corridors</p><div class=\"background\"><div class=\"corridors\"></div></div>'\n\t\t\t}if(riversExist==true){\n\t\t\t\t\tdiv.innerHTML += '<br><p class=legendLabel>Rivers</p><div class=\"background\"><div class=\"rivers\"><p class=\"legendLabel\"id=\"riverLabel\">River Name</p></div></div>'\n\t\t\t}if(metrosExist==true){\n\t\t\t\tif(labelsExist==true){\n\t\t\t\t\t\tdiv.innerHTML += '<br><p class=legendLabel>Metros</p><div class=\"background\"><div class=\"metros\"><p class=\"legendLabel\"id=\"metroLabel\">Metro Name</p></div></div>'\n\t\t\t\t\t\t//$('#metroLabel').addClass('white');\n\t\t\t\t}else{\n\t\t\t\t\t\tdiv.innerHTML += '<br><p class=legendL>Metros</p><div class=\"background\"><div class=\"metros\"></div></div>'\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\n\t\t\treturn div;\n\t\t}\n\n\t\n\t\tlegend.addTo(map);\n\t}", "title": "" }, { "docid": "46b7e325e6b4e365392045f2ce5f5d78", "score": "0.6591081", "text": "function addLegend()\n\t{\n\t\tvar legend = svg.append(\"svg\")\n\t\t\t.attr(\"id\", \"legend\")\n\t\t\t.attr(\"height\", 50)\n\t\t\t.attr(\"width\", 400)\n\t\t\t.attr(\"x\", 490)\n\t\t\t.attr(\"y\", 25);\n\n\t\tfor (var i=0; i<12; i++)\n\t\t{\n\t\t\tif (i<9)\n\t\t\t{\n\t\t\t\tlegend.append(\"rect\")\n\t\t\t\t\t.attr(\"id\", \"key\")\n\t\t\t\t\t.attr(\"x\", i*400/12)\n\t\t\t\t\t.attr(\"y\", 0)\n\t\t\t\t\t.style(\"fill\", colorbrewer.Blues[9][8-i])\n\t\t\t\t\t.attr(\"width\", 400/12)\n\t\t\t\t\t.attr(\"height\", 50);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tlegend.append(\"rect\")\n\t\t\t\t.attr(\"id\", \"key\")\n\t\t\t\t.attr(\"x\", i*400/12)\n\t\t\t\t.attr(\"y\", 0)\n\t\t\t\t.style(\"fill\", colorbrewer.OrRd[3][i-9])\n\t\t\t\t.attr(\"width\", 400/12)\n\t\t\t\t.attr(\"height\", 50);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "43ca981e56fde75a2e60ebaf6ac6c0ea", "score": "0.659085", "text": "function setData(chart) {\n chart.data.legendData = setRadialLegendData(chart.data);\n //define color object for chartData\n chart.data.color = jvCharts.setChartColors(chart._vars.color, chart.data.legendData, chart.colors);\n}", "title": "" }, { "docid": "62bb2d65b0172d832b4c0d15c50df418", "score": "0.65841544", "text": "function createLegend() {\n rootEl.append(\n '<div class=\"legend\"><p class=\"legend__title\"></p><div class=\"legend__gradient\"></div><div class=\"legend__gradient-labels\"></div></div>',\n );\n }", "title": "" }, { "docid": "2685b3e959c1bad34d5a7cba3e2c8819", "score": "0.6578912", "text": "constructor(parent,dataObj,legend) {\n var self = this;\n this.data=[];\n this.brush=null;\n this.xLabelHtml=\"\";\n this.yLabelHtml=\"\";\n this.parent = parent;\n this.domains = parent.domains;\n this.expandCallback = parent.expandCallback;\n this.collapseCallback = parent.collapseCallback;\n this.expanded_dimensions = parent.plt.expanded;\n this.initial_dimensions = dataObj.dimensions;\n this.dimensions = PlotUtils.deepCopy(this.initial_dimensions);\n this.legend = legend;\n this.linearScale = true;\n if (this.legend!==null) {\n this.legend.clickCallback = function(){self.redraw();};\n }\n this.content = parent.container.append(\"g\")\n .attr(\"id\",dataObj.container_id)\n .classed(\"dynamic_plot\",true)\n .attr(\"transform\",`translate(${this.dimensions.margins.left},${this.dimensions.margins.top})`);\n this.content.append(\"rect\").classed(\"background\",true)\n .attr(\"width\",this.dimensions.width).attr(\"height\",this.dimensions.height);\n this.clip_id = `clip_${dataObj.container_id}`;\n this.clip = this.parent.container.append(\"defs\").append(\"svg:clipPath\")\n .attr(\"id\", this.clip_id)\n .append(\"svg:rect\")\n .attr(\"width\", this.dimensions.width )\n .attr(\"height\", this.dimensions.height )\n .attr(\"x\", 0)\n .attr(\"y\", 0);\n this.data_files = dataObj.plotSrc;\n }", "title": "" }, { "docid": "6451b7d18c2c6100dd849a3b354fc243", "score": "0.6566411", "text": "function legendClickHandler(d, i) {\n\tsn.runtime.excludeSources.toggle(d.source);\n\tif ( sn.runtime.powerAreaChart !== undefined ) {\n\t\tregenerateChart(\n\t\t\tsn.runtime.powerAreaContainer,\n\t\t\tsn.runtime.powerAreaChart,\n\t\t\tsn.runtime.powerAreaParameters);\n\t}\n\tif ( sn.runtime.energyBarChart !== undefined ) {\n\t\tregenerateChart(\n\t\t\tsn.runtime.energyBarContainer,\n\t\t\tsn.runtime.energyBarChart,\n\t\t\tsn.runtime.energyBarParameters);\n\t}\n\tif ( sn.runtime.overviewAreaChart !== undefined ) {\n\t\tregenerateChart(\n\t\t\tsn.runtime.overviewAreaContainer,\n\t\t\tsn.runtime.overviewAreaChart,\n\t\t\tsn.runtime.overviewAreaParameters);\n\t}\n}", "title": "" }, { "docid": "2fdc764ef6faa3fe31b67f4422d6d5df", "score": "0.6561033", "text": "function initChart() {\n\n // Heres all the data for the chart\n var data = {\n labels: [0],\n datasets: [\n {\n label: 'Response Time (ms) every second',\n fillColor: \"rgba(255,73,71,0.2)\",\n strokeColor: \"rgba(255,73,71,1)\",\n pointColor: \"rgba(255,73,71,1)\",\n pointStrokeColor: \"#fff\",\n pointHighlightFill: \"#fff\",\n pointHighlightStroke: \"rgba(255, 73, 71, 1)\",\n data: [0]\n }\n ]\n };\n\n // Here are the options for the chart\n var options = {};\n\n // With the data draw a line chart\n lineChart = chart.Line(data, options);\n\n // Draw a legend with the data\n legend(document.getElementById(\"legend\"), data);\n}", "title": "" }, { "docid": "eef7ba6783abe6da25442013b149613a", "score": "0.6560866", "text": "function legendClickHandler(d, i) {\n\tsn.runtime.excludeSources.toggle(d.source);\n\tregenerateChart();\n}", "title": "" }, { "docid": "0b93f7af189487d64ad9e5a8260df15f", "score": "0.65548337", "text": "initLegendContainer() {\n let vis = this;\n\n vis.legendContainer = L.control({ position: 'bottomleft' });\n\n vis.legendContainer.onAdd = function () {\n const div = L.DomUtil.create('div', 'info-legend-container');\n const svg = d3.select(div).append('svg');\n vis.legend = svg.append('g').attr('class', 'legend');\n const legendBackground = vis.legend.append('rect');\n legendBackground\n .attr('class', 'legend-background')\n .attr('width', '100%')\n .attr('height', '100%')\n .attr('x', 0)\n .attr('y', 0)\n .attr('rx', 6)\n .attr('ry', 6)\n .attr('fill', 'white')\n .attr('fill-opacity', 0.5);\n\n return div;\n };\n\n vis.legendContainer.addTo(vis.map);\n }", "title": "" }, { "docid": "5b62aaa5120c2cb42b3179db84639473", "score": "0.6543453", "text": "function makeLegend(entries) {\n // var categories = [\"Meat\", \"Protein (non-meat)\", \"Beverage\" ,\"Dairy\",\"Fruits\", \"Vegetables\", \"Grains\"];\n\n // var entries = [{name: \"Meat\", color: \"#e41a1c\", order_index:0, tag: \"MEAT\"},\n // {name: \"Protein (non-meat)\", color: \"#ff7f00\",order_index:1, tag: \"PROTEIN-NONMEAT\"},\n // {name: \"Vegetables\", color:\"#4daf4a\",order_index:2, tag: \"VEGETABLES\"},\n // {name: \"Fruit\", color: \"#f781bf\",order_index:3, tag: \"FRUITS\"},\n // {name: \"Grains\", color: \"#a65628\", order_index: 4, tag: \"GRAINS\"},\n // {name: \"Dairy\", color: \"#377eb8\", order_index: 5, tag: \"DAIRY\"},\n // {name: \"Beverages\", color: \"#DAA520\", order_index: 6, tag: \"BEVERAGE\"},\n // {name: \"All Foods\", color: 'black', order_index: 7, tag: \"ALLFOODS\"},\n // {name: \"My Foods\", color: 'black', order_index: 8, tag: \"DIET\"}];\n\n var legend = g.selectAll('.legend')\n .data(entries, function(d) { return d.name })\n .enter()\n\n console.log('leg')\n\n // g.append('rect')\n // .attr('x', xLeg)\n // .attr('y', yLeg)\n // .attr('height', 100)\n // .attr('width', 100)\n\n legend.append('rect')\n .attr('class', 'legend')\n .attr('x', xLeg)\n .attr('y', function (d) { return yLeg + d.order_index*(legSize+legMarg) })\n .attr('height', legSize)\n .attr('width', legSize)\n .attr('fill', function (d) { return d.color })\n .on(\"click\", function(d){var element = this\n return legendClick(element)})\n\n legend.append('text')\n .attr('class', 'legend')\n .attr('alignment-baseline', 'hanging')\n .attr('x', xLeg + legSize + legMarg)\n .attr('y', function (d) { return yLeg + d.order_index*(legSize+legMarg) })\n .text(function (d) { return d.name })\n .on(\"click\", function(d){var element = this\n return legendClick(element)})\n\n legend.exit().remove()\n // .on(\"click\", function(d){group = filterByGroup(dataSortedByGHGE, d3.select(this).datum().tag)\n // xBarScale.domain(group.map(function(d){ return d.name; }))\n // return addBars(group)})\n\n }", "title": "" }, { "docid": "931815a828977b65ae4c4d3508c660ec", "score": "0.6540434", "text": "function makeLegend(\n\tdataset,\n\tsvg,\n\tlegendColors\n){\n\t//Color Legend\n\tvar variances = dataset.map(function(d){\n\t\treturn d.variance; //returns positive numbers also\n\t});\n\n\t//need '...' because min() does not accept array\n\t//neg number furthest from 0, -6.976\n\tvar minNegVariance = Math.min(...variances);\n\t\n\t//5.228\n\tvar maxPosVariance = Math.max(...variances);\n\n\t//variance scale\n\tvar varianceScale = d3.scaleLinear()\n\t.domain([minNegVariance, maxPosVariance])\n\t.range([50, 250]);\n\n\tvar varianceAxis = d3.axisBottom(varianceScale).tickFormat(d3.format(\"d\"));\n\n\t//group to hold legend scales and labels\n\t//on mouseover and mouseout of legendGroup, because I want line to appear when mouseover\n\t//any part of the legend, not including labels\n\tvar legendGroup = svg.append(\"g\")\n\t.on(\"mouseover\", function(d){\n\t\t//y1 and y2 are contants to make line be at same level\n\t\tvar legendLine = d3.select(\"#lineline\");\n\t\tlegendLine\n\t\t.attr(\"x1\", function(d){return d3.event.pageX + \"px\";})\n\t\t.attr(\"x2\", function(d){return d3.event.pageX + \"px\";})\n\t\t.attr(\"y1\", function(d){\n\t\t\treturn 420 + \"px\";\n\t\t})\n\t\t.attr(\"y2\", function(d){\n\t\t\treturn 490 + \"px\";\n\t\t})\n\t\t.style(\"opacity\", 1);\n\t})\n\t.on(\"mouseout\", function(d){\n\t\tvar legendLine = d3.select(\"#lineline\");\n\t\tlegendLine.style(\"opacity\", 0);\t\t\n\t});\n\n\tlegendGroup.append(\"g\")\n\t.attr(\"transform\", \"translate(100, 420)\")\n\t.call(varianceAxis);\n\n\t//base temp axis\n\tvar baseTempScale = d3.scaleLinear()\n\t.domain([7, 13])\n\t.range([50, 250]);\n\n\tvar baseAxis = d3.axisBottom(baseTempScale).tickFormat(d3.format(\"d\"));\n\t\n\tlegendGroup.append(\"g\")\n\t.attr(\"transform\", \"translate(100, 440)\")\n\t.call(baseAxis);\n\n\t//color scale\n\tvar colorScale = d3.scaleLinear()\n\t.domain([-10, 0, 10])\n\t.range(['red', '#ddd', 'blue'])\n\t.interpolate(d3.interpolateHcl);\n\n\tlegendGroup.selectAll(\"rect\")\n\t.data(legendColors)\n\t.enter()\n\t.append(\"rect\")\n\t.attr(\"width\", 20)\n\t.attr(\"height\", 20)\n\t.attr(\"x\", function(d,i){\n\t\treturn (i * 20)+ 140 + \"px\";\n\t})\n\t.attr(\"y\", 470)\n\t.attr(\"fill\", function(d){return d;})\n\t.on(\"mouseover\", function(d){\n\t\t/*\n\t\tDifficult to do complex CSS selector in D3, use vanilla JS.\n\t\tCSS.escape(d) is the current hex color #00000.\n\t\tGrey out all rects that are not the current color being hovered over.\n\t\t*/\n\t\tvar blackedOut = document.querySelectorAll(\"#allrects :not([fill=\"+CSS.escape(d)+\"])\");\n\t\tblackedOut.forEach(element => element.setAttribute(\"opacity\", .4));\n\t})\n\t.on(\"mouseout\", function(d){\n\t\tvar blackedOut = document.querySelectorAll(\"#allrects :not([fill=\"+CSS.escape(d)+\"])\");\n\t\tblackedOut.forEach(element => element.setAttribute(\"opacity\", 1));\n\t});\n\n\tvar legendScalesLine =\n\tsvg\n\t.append(\"line\")\n\t.attr(\"x1\", 50)\n\t.attr(\"x2\", 50)\n\t.attr(\"y1\", 50)\n\t.attr(\"y2\", 100)\n\t.attr(\"id\", \"lineline\")\n\t.style(\"stroke-width\", 1)\n\t.style(\"stroke\", \"black\")\n\t.style(\"opacity\", 0);\n}", "title": "" }, { "docid": "bd2e9a5690e068198308b4f038fa8990", "score": "0.6538936", "text": "function drawLegend(data, legendPerPage, pageNo, totalPages) {\n var legend = svg.selectAll(\"g.legendg\")\n .data(data)\n .enter().append(\"g\")\n .attr('class', 'legendg')\n .attr(\"transform\", function (d, i) { return \"translate(\" + -(width / 2.3) + \",\" + ((i * (legendWidth + legendSpacing)) - (height / 4)) + \")\"; });\n var legendRect = legend.append(\"rect\")\n .attr(\"x\", 45)\n .attr(\"width\", legendWidth)\n .attr(\"height\", legendWidth)\n .attr(\"class\", \"legend\")\n .style('fill', function (d, i) { return color(d.attributeName); });\n var legendText = legend.append(\"text\")\n .attr(\"x\", 65)\n .attr(\"y\", 6)\n .attr(\"dy\", \".35em\")\n .style(\"text-anchor\", \"start\")\n .text(function (d) {\n // truncate long labels\n var charSpace = (radius - 20) / 5;\n if (d.attributeName.length > charSpace)\n return d.attributeName.substring(0, charSpace) + '...';\n else\n return d.attributeName;\n });\n // title tooltips\n legendRect.append(\"svg:title\").text(function (d) {\n var total = d3.sum(property.data.map(function (d) { return d.count; }));\n return d.attributeName + \" (\" + Math.round(1000 * d.count / total) / 10 + \"%)\";\n });\n legendText.append(\"svg:title\").text(function (d) {\n var total = d3.sum(property.data.map(function (d) { return d.count; }));\n return d.attributeName + \" (\" + Math.round(1000 * d.count / total) / 10 + \"%)\";\n });\n if (totalPages > 1) {\n var pageText = svg.append(\"g\")\n .attr('class', 'pageNo')\n .attr(\"transform\", \"translate(\" + (-10) + \",\" + ((legendPerPage + 1) * (legendWidth + legendSpacing) - (height / 4)) + \")\");\n pageText.append('text').text(pageNo + '/' + totalPages)\n .attr('dx', '.25em');\n var prevtriangle = svg.append(\"g\")\n .attr('class', 'prev')\n .attr(\"transform\", \"translate(\" + (-20) + \",\" + ((legendPerPage + 1.5) * (legendWidth + legendSpacing) - (height / 4)) + \")\")\n .on('click', prevLegend)\n .style('cursor', 'pointer');\n var nexttriangle = svg.append(\"g\")\n .attr('class', 'next')\n .attr(\"transform\", \"translate(\" + (0) + \",\" + ((legendPerPage + 1.5) * (legendWidth + legendSpacing) - (height / 4)) + \")\")\n .on('click', nextLegend)\n .style('cursor', 'pointer');\n nexttriangle.append('polygon')\n .style('stroke', '#000')\n .style('fill', '#000')\n .attr('points', '0,0, 20,0, 10,10');\n prevtriangle.append('polygon')\n .style('stroke', '#000')\n .style('fill', '#000')\n .attr('points', '0,10, 20,10, 10,0');\n if (pageNo == totalPages) {\n nexttriangle.style('opacity', '0.3');\n nexttriangle.on('click', '')\n .style('cursor', '');\n }\n else if (pageNo == 1) {\n prevtriangle.style('opacity', '0.3');\n prevtriangle.on('click', '')\n .style('cursor', '');\n }\n }\n }", "title": "" }, { "docid": "46d79d6d3fb2a2a17ef0003f0c0a492d", "score": "0.65353745", "text": "function showlegend(guid, columns,option) {\n\n guid.selectAll(\"square\").remove();\n guid.selectAll(\"text\").remove();\n\n guid.selectAll(\"myrects\")\n .data(columns)\n .enter()\n .append(\"rect\")\n .attr(\"class\",\"square\")\n .attr(\"x\", function(d,i){ return 280 + i*130; }) // 280 is where the first rect appears. 130 is the distance between rects\n .attr(\"y\", 420) \n .attr(\"height\", 17)\n .attr(\"width\", 17)\n .style(\"stroke\",\"white\")\n .style(\"fill\", function(d){ \n if (option == 0){return 'Orange'}\n if (option == 1){\n if (d == 'cycle1') return \"#ff4c00\";\n if (d == 'cycle2') return \"#008080\";\n if (d == 'cycle3') return \"#800080\"; \n }\n if (option == 2){\n if (d== 'Male') return \"#ff4c00\";\n if (d == 'Female') return \"#008080\"; \n }\n if (option == 3){\n if (d == 'Canadien') return \"#ff4c00\";\n if (d == 'Foreign') return \"#008080\";\n if (d == 'Resident') return \"#800080\";\n }\n if (option == 4){\n if (d == 'PartTime') return \"#ff4c00\";\n if (d == 'FullTime') return \"#008080\"; \n }\n }).attr('opacity', .5);\n \n\n guid.selectAll(\"mylabels\")\n .data(columns)\n .enter()\n .append('text')\n .attr('class','label')\n .attr(\"x\", function(d,i){ return 305 + i*130; }) // 305 is where the first rect appears. 130 is the distance between rects\n .attr(\"y\", 430 ) \n .style(\"fill\", \"black\")\n .text(function(d) { return d; })\n .attr(\"text-anchor\", \"left\")\n .style(\"alignment-baseline\", \"middle\");\n}", "title": "" }, { "docid": "660f245d259418c080c6f7ee84a69a26", "score": "0.6528988", "text": "function initLegends(svg) {\n classLegendGroup = svg.append('g')\n .attr('id', 'class-legend')\n .attr('transform', 'translate(40,40)')\n .style('font-size', '40px');\n\n raceLegendGroup = svg.append('g')\n .attr('id', 'race-legend')\n .attr('transform', 'translate(350, 30)')\n .style('font-size', '20px')\n .style('opacity', 0);\n\n //creating backing rects for the legends so they show better against the nodes\n appendBackingRect(classLegendGroup, 300, 900, -40, -40);\n\n appendBackingRect(raceLegendGroup, 300, 1175, -40, -30);\n\n //creating the actual legends\n classLegend = initColorLegend(classColorScale, classClickEvent, 2000);\n raceLegend = initColorLegend(raceColorScale, raceClickEvent, 1000);\n\n //creating the legends on the page\n svg.select('#class-legend')\n .call(classLegend);\n\n svg.select('#race-legend')\n .call(raceLegend);\n\n //moving the text so so that it is centered\n classLegendGroup.selectAll('text')\n .attr('transform', 'translate(50, 15)')\n .style('cursor', 'pointer');\n\n raceLegendGroup.selectAll('text')\n .attr('transform', 'translate(50, 7)')\n .style('cursor', 'pointer');\n\n //adding black outline to squares so they pop more\n d3.selectAll('.legendCells')\n .selectAll('path')\n .style('stroke', 'black');\n}", "title": "" }, { "docid": "205d4c6787cdfaa5f10b8b6863c14e7b", "score": "0.65173054", "text": "function addLegend(svg,labels,colorScale,options){\n\n // set default values\n let coord = options.coord || {x:0, y:0}\n let rect = options.rect || {size: 15, space: 5}\n let font = options.font || {size: 10}\n \n let legend = svg.append('g')\n .attr('class', 'legends')\n .selectAll('.legend')\n .data(labels)\n .enter()\n .append('g')\n .attr('class', 'legend')\n .attr('transform', function(d, i) {\n let height = rect.size + rect.space\n let vert = coord.y + (i * height) \n return 'translate(' + coord.x + ',' + vert + ')'\n })\n \n legend.append('rect')\n .attr('width', rect.size)\n .attr('height', rect.size)\n .style('fill', d => colorScale(d))\n \n legend.append('text')\n .attr('x', rect.size + rect.space)\n .attr('y', rect.size)\n .attr('dy', -rect.size/4)\n .attr(\"font-size\", font.size)\n .text(d => d)\n}", "title": "" }, { "docid": "79be3d437a0310c8881fdc2eaeb04e35", "score": "0.6513544", "text": "function DataSet(data, labels, settings) {\nthis.data = data;\nthis.labels = labels;\nthis.settings = settings;\nthis.labelXAxis = function(grid, canvas) {\n(function(ds) {\njQuery.each(ds.labels, function(i, label) {\nvar x = grid.x(i);\ncanvas.text(x + ds.settings.xAxisLabelOffset, ds.settings.height - 6, label).attr(ds.settings.xAxisLabelStyle);\n});\n})(this);\n};\nthis.labelYAxis = function(grid, canvas) {\n// Legend\ncanvas.rect(\ngrid.leftEdge - (30 + this.settings.yAxisOffset), //TODO PARAM - Label Colum Width\ngrid.topEdge,\n30, //TODO PARAM - Label Column Width\ngrid.height\n).attr({stroke: this.settings.lineColor, fill: this.settings.lineColor, opacity: 0.3}); //TODO PARAMS - legend border and fill style\nfor (var i = 1, ii = (grid.rows); i < (ii - this.settings.lowerBound/2); i = i + 2) {\nvar value = (ii - i)*2,\ny = grid.y(value) + 4, // TODO: Value of 4 works for default dimensions, expect will need to scale\nx = grid.leftEdge - (6 + this.settings.yAxisOffset);\ncanvas.text(x, y, value).attr(this.settings.yAxisLabelStyle);\n}\nvar caption = canvas.text(\ngrid.leftEdge - (20 + this.settings.yAxisOffset),\n(grid.height/2) + (this.settings.yAxisCaption.length / 2),\nthis.settings.yAxisCaption + \" (\" + this.settings.units + \")\").attr(this.settings.yAxisCaptionStyle).rotate(270);\n// Increase the offset for the next caption (if any)\nthis.settings.yAxisOffset = this.settings.yAxisOffset + 30;\n};\nthis.plot = function(grid, canvas) {\nvar line_path = canvas.path({\nstroke: this.settings.lineColor,\n\"stroke-width\": this.settings.lineWidth,\n\"stroke-linejoin\": this.settings.lineJoin\n});\nvar fill_path = canvas.path({\nstroke: \"none\",\nfill: this.settings.fillColor,\nopacity: this.settings.fillOpacity\n}).moveTo(this.settings.leftGutter, this.settings.height - this.settings.bottomGutter);\nvar bars = canvas.group(),\ndots = canvas.group(),\ncover = canvas.group();\nvar hoverFrame = dots.rect(10, 10, 100, 40, 5).attr({\nfill: \"#fff\", stroke: \"#474747\", \"stroke-width\": 2}).hide(); //TODO PARAM - fill colour, border colour, border width\nvar hoverText = [];\nhoverText[0] = canvas.text(60, 25, \"\").attr(this.settings.hoverValueStyle).hide();\nhoverText[1] = canvas.text(60, 40, \"\").attr(this.settings.hoverLabelStyle).hide();\n// Plot the points\n(function(dataSet) {\njQuery.each(dataSet.data, function(i, value) {\nvar y = grid.y(value),\nx = grid.x(i),\nlabel = dataSet.labels ? dataSet.labels[i] : \" \";\nif (dataSet.settings.drawPoints) {\nvar dot = dots.circle(x, y, dataSet.settings.pointRadius).attr({fill: dataSet.settings.pointColor, stroke: dataSet.settings.pointColor});\n}\nif (dataSet.settings.drawBars) {\nbars.rect(x + dataSet.settings.barOffset, y, dataSet.settings.barWidth, (dataSet.settings.height - dataSet.settings.bottomGutter) - y).attr({fill: dataSet.settings.barColor, stroke: \"none\"});\n}\nif (dataSet.settings.drawLine) {\nline_path[i == 0 ? \"moveTo\" : \"cplineTo\"](x, y, 5);\n}\nif (dataSet.settings.fillUnderLine) {\nfill_path[i == 0 ? \"lineTo\" : \"cplineTo\"](x, y, 5);\n}\nif (dataSet.settings.addHover) {\nvar rect = canvas.rect(x - 50, y - 50, 100, 100).attr({stroke: \"none\", fill: \"#fff\", opacity: 0}); //TODO PARAM - hover target width / height\njQuery(rect[0]).hover( function() {\njQuery.fn.simplegraph.hoverIn(canvas, value, label, x, y, hoverFrame, hoverText, dot, dataSet.settings);\n},\nfunction() {\njQuery.fn.simplegraph.hoverOut(canvas, hoverFrame, hoverText, dot, dataSet.settings);\n});\n}\n});\n})(this);\nif (this.settings.fillUnderLine) {\nfill_path.lineTo(grid.x(this.data.length - 1), this.settings.height - this.settings.bottomGutter).andClose();\n}\nhoverFrame.toFront();\n};\n}", "title": "" }, { "docid": "5d2477dddd76e8d5692436f05d8b46c5", "score": "0.65090376", "text": "drawLegend(min, max) {\n // ******* TODO: PART 2*******\n //This has been done for you but you need to call it in updatePlot()!\n //Draws the circle legend to show size based on health data\n let scale = d3.scaleSqrt().range([3, 20]).domain([min, max]);\n\n let circleData = [min, max];\n\n let svg = d3.select('.circle-legend').select('svg').select('g');\n\n let circleGroup = svg.selectAll('g').data(circleData);\n circleGroup.exit().remove();\n\n let circleEnter = circleGroup.enter().append('g');\n circleEnter.append('circle').classed('neutral', true);\n circleEnter.append('text').classed('circle-size-text', true);\n\n circleGroup = circleEnter.merge(circleGroup);\n\n circleGroup.attr('transform', (d, i) => 'translate(' + ((i * (5 * scale(d))) + 20) + ', 25)');\n\n circleGroup.select('circle').attr('r', (d) => scale(d));\n circleGroup.select('circle').attr('cx', '0');\n circleGroup.select('circle').attr('cy', '0');\n let numText = circleGroup.select('text').text(d => new Intl.NumberFormat().format(d));\n\n numText.attr('transform', (d) => 'translate(' + ((scale(d)) + 10) + ', 0)');\n }", "title": "" }, { "docid": "5d2477dddd76e8d5692436f05d8b46c5", "score": "0.65090376", "text": "drawLegend(min, max) {\n // ******* TODO: PART 2*******\n //This has been done for you but you need to call it in updatePlot()!\n //Draws the circle legend to show size based on health data\n let scale = d3.scaleSqrt().range([3, 20]).domain([min, max]);\n\n let circleData = [min, max];\n\n let svg = d3.select('.circle-legend').select('svg').select('g');\n\n let circleGroup = svg.selectAll('g').data(circleData);\n circleGroup.exit().remove();\n\n let circleEnter = circleGroup.enter().append('g');\n circleEnter.append('circle').classed('neutral', true);\n circleEnter.append('text').classed('circle-size-text', true);\n\n circleGroup = circleEnter.merge(circleGroup);\n\n circleGroup.attr('transform', (d, i) => 'translate(' + ((i * (5 * scale(d))) + 20) + ', 25)');\n\n circleGroup.select('circle').attr('r', (d) => scale(d));\n circleGroup.select('circle').attr('cx', '0');\n circleGroup.select('circle').attr('cy', '0');\n let numText = circleGroup.select('text').text(d => new Intl.NumberFormat().format(d));\n\n numText.attr('transform', (d) => 'translate(' + ((scale(d)) + 10) + ', 0)');\n }", "title": "" }, { "docid": "76a7c60bd81449df2093f8f45443c5b2", "score": "0.6506427", "text": "function drawLegend() {\n\n\ttry {\n\n\t\t// yuck, but, this maintains the 'keys' between the static data.\n\t\tvar legendKey = window.snap.mapUrls[window.snap.state.variable].prefix;\n\t\tif( false === _.isUndefined(window.snap.mapUrls[window.snap.state.variable][window.snap.state.interval]) ) {\n\t\t\tlegendKey += '_'\n\t\t\t+ window.snap.mapUrls[window.snap.state.variable][window.snap.state.interval];\n\t\t}\n\n\t\tif( _.isUndefined(legendKey) ) {\n\t\t\tthrow 'Data set not defined when trying to draw legend.';\n\t\t}\n\t\tvar legend = window.snap.mapLegends[legendKey];\n\n\t\tvar el = $('#legend_wrapper').empty().append(_.template('<h4><%= title %></h4>', legend));\n\t\tvar table = $('<table/>');\n\t\t_.each(legend.colors, function(e, i) {\n\t\t\t$('<tr/>')\n\t\t\t\t.append(_.template(\n\t\t\t\t\t'<td style=\"background-color: <%= color %>\"><img style=\"height: 17px;\" src=\"images/colors/<%= file %>.gif\"/></td>'\n\t\t\t\t\t+ '<td><%= range %></td>'\n\t\t\t\t\t, { color: '#' + e, file: e, range: i }\n\t\t\t\t))\n\t\t\t\t.appendTo(table);\n\t\t});\n\t\tel.append(table).show();\n\n\t} catch(e) {\n\n\t\t$('#legend_wrapper').hide();\n\n\t}\n}", "title": "" }, { "docid": "f951b03373de9dad599e92e83489a49c", "score": "0.6504098", "text": "drawLegend(min, max) {\n // ******* TODO: PART 2*******\n //This has been done for you but you need to call it in updatePlot().\n //Draws the circle legend to show size based on health data\n let scale = d3.scaleSqrt().range([3, 20]).domain([min, max]);\n\n let circleData = [min, max];\n\n let svg = d3.select('.circle-legend').select('svg').select('g');\n\n let circleGroup = svg.selectAll('g').data(circleData);\n circleGroup.exit().remove();\n\n let circleEnter = circleGroup.enter().append('g');\n circleEnter.append('circle').classed('neutral', true);\n circleEnter.append('text').classed('circle-size-text', true);\n\n circleGroup = circleEnter.merge(circleGroup);\n\n circleGroup.attr('transform', (d, i) => 'translate(' + ((i * (5 * scale(d))) + 20) + ', 25)');\n\n circleGroup.select('circle').attr('r', (d) => scale(d));\n circleGroup.select('circle').attr('cx', '0');\n circleGroup.select('circle').attr('cy', '0');\n let numText = circleGroup.select('text').text(d => new Intl.NumberFormat().format(d));\n\n numText.attr('transform', (d) => 'translate(' + ((scale(d)) + 10) + ', 0)');\n }", "title": "" }, { "docid": "76f1b07eac50477c7fe73b3d13eb7511", "score": "0.64972955", "text": "function legend(leg_type) {\r\n \r\n $('body').append('<div id=\"legend-container\"><h3>Legend</h3></div>');\r\n\r\n var $legendContainer = $('#legend-container'),\r\n $legend = $('<div id=\"legend\">').appendTo($legendContainer),\r\n renderLegend = function(colorValuesArray){\r\n $legend.empty();\r\n $.each(colorValuesArray,function(index, val){\r\n \r\n \r\n \r\n \r\n if (leg_type == 'rsrq') {\r\n switch(index) {\r\n case 0:\r\n return true;\r\n break;\r\n case 1:\r\n lgtext = \"0db - -10db\";\r\n break;\r\n case 2:\r\n return true;\r\n break;\r\n case 3:\r\n lgtext = \"-10db - -16db\";\r\n break;\r\n case 4:\r\n lgtext = \"-16db - -30db\";\r\n break; \r\n } \r\n \r\n } else if (leg_type == 'rsrp') {\r\n switch(index) {\r\n case 0:\r\n lgtext = \"-45dbm - -91dbm\";\r\n break;\r\n case 1:\r\n lgtext = \"-91dbm - -97dbm\";\r\n break;\r\n case 2:\r\n lgtext = \"-97dbm - -114dbm\";\r\n break;\r\n case 3:\r\n lgtext = \"-114dbm - -120dbm\";\r\n break;\r\n case 4:\r\n lgtext = \"-120dbm - -130dbm\";\r\n break; \r\n } \r\n \r\n } else if (leg_type == 'traffic') {\r\n switch(index) {\r\n case 0:\r\n lgtext = \"Low\";\r\n break;\r\n case 1:\r\n return true;\r\n break;\r\n case 2:\r\n return true;\r\n break;\r\n case 3:\r\n lgtext = \"Medium\";\r\n break;\r\n case 4:\r\n lgtext = \"High\";\r\n break; \r\n } \r\n \r\n } else if (leg_type == 'TMo_TechLTE_Map') {\r\n switch(index) {\r\n case 0:\r\n lgtext = \"4G LTE\";\r\n break;\r\n case 1:\r\n lgtext = \"4G\";\r\n break;\r\n case 2:\r\n lgtext = \"3G\";\r\n break;\r\n case 3:\r\n lgtext = \"2G\";\r\n break;\r\n case 4:\r\n lgtext = \"Partner\";\r\n break; \r\n } \r\n \r\n } else {\r\n \r\n switch(index) {\r\n case 0:\r\n return true;\r\n break;\r\n case 1:\r\n lgtext = \"Okay\";\r\n break;\r\n case 2:\r\n return true;\r\n break;\r\n case 3:\r\n lgtext = \"Warning\";\r\n break;\r\n case 4:\r\n lgtext = \"Degraded\";\r\n break; \r\n } \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n var $div = $('<div style=\"height:25px;\">').append($('<div class=\"legend-color-box\">').css({\r\n backgroundColor:val,\r\n })).append($(\"<span>\").css(\"lineHeight\",\"23px\").html(lgtext));\r\n\r\n $legend.append($div);\r\n \r\n });\t\r\n }\r\n \r\n //make a legend for the first time\r\n \r\n if (leg_type == 'TMo_TechLTE_Map') {\r\n renderLegend(colorPCC);\r\n \r\n }else {\r\n renderLegend(colorValues); \r\n }\r\n //add the legend to the map\r\n map.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push($legendContainer[0]); \r\n}", "title": "" }, { "docid": "df4cbb04f35a6d6909c710d404b04755", "score": "0.64867157", "text": "function createLegend() {\n var legend = L.control({ position: 'bottomright' });\n\n legend.onAdd = function (map) {\n\n var div = L.DomUtil.create('div', 'info legend');\n var grades = [\"Farms/producers/markets\", \"Food bank/pantry\", \"Organization/business\", \"Restaurant/bakery\", \"Retail\", \"School/childcare\"];\n\n // loop through our prioviders and generate a label with a colored square for each interval\n for (var i = 0; i < grades.length; i++) {\n div.innerHTML +=\n '<i style=\"background:' + getColor(grades[i]) + '\"></i> ' +\n grades[i] + (grades[i] ? '<br>' : '+');\n }\n return div;\n };\n\n legend.addTo(map);\n}", "title": "" }, { "docid": "e3abdd945a4791ddb34d7a99e5dd8f48", "score": "0.6465546", "text": "function addHucLegend() {\n legend = L.control({position: 'bottomright'});\n legend.onAdd = function (map) {\n\n var div = L.DomUtil.create('div', 'info legend'),\n grades = [0, 20, 40, 60, 80, 100],\n labels = [];\n\n // loop through our density intervals and generate a label with a colored square for each interval\n for (var i = 0; i < grades.length; i++) {\n div.innerHTML +=\n '<i style=\"background:' + contributionColor(grades[i] + 1) + '\"></i> ' +\n grades[i] + (grades[i + 1] ? '&ndash;' + grades[i + 1] + '<br>' : '+');\n }\n\n return div;\n };\n\n legend.addTo(map);\n}", "title": "" }, { "docid": "f74e9595e20e21d336283d7072c1b553", "score": "0.6458124", "text": "function scale_legend_fill(d) { if (d) return d3.interpolateBlues((0.06*d)+0.15); }", "title": "" }, { "docid": "181b1b2ee93069f035d5246fab25633e", "score": "0.6456683", "text": "function createLegend(){\n\n var LegendControl = L.Control.extend({\n options: {\n position: 'bottomright'\n },\n\n onAdd: function (leafletMap) {\n // Create a container div to put the legend in\n // Styles specified using 'legend-control-container'\n var container = L.DomUtil.create('div', 'legend-control-container');\n\n// Use span so that year can be specifically targeted by jQuery\n $(container).append('<div id=\"temporal-legend\">Percent Rural Pop. Growth in <span id=\"year\">2008</span></div>');\n\n // Attribute legend is an svg string because symbols are vectors\n var svg = '<svg id=\"attribute-legend\" width=\"180px\" height=\"95px\">';\n\n\n // Create array for exemplar symbols in attribute legend\n var circles = [\"max\", \"mean\", \"min\"];\n // Add the three circles to the svg variable\n for (var i=0; i<circles.length; i++){\n\n // Set the radii and vertical placement of the circles\n var circleRadius = calcPropRadius(dataStats[circles[i]]);\n var cy = 90 - circleRadius;\n\n\n svg += '<circle class=\"legend-circle\" id=\"' + circles[i] + '\" r=\"' + circleRadius + '\"cy=\"' + cy + '\" fill=\"#ffffff\" fill-opacity=\"0.9\" stroke=\"#000000\" cx=\"45px\"/>';\n\n // Evenly space out labels\n var textY = i * 28 + 31;\n\n // Add labels to svg\n svg += '<text id=\"' + circles[i] + '-text\" x=\"87\" y=\"' + textY + '\">' + Math.round(dataStats[circles[i]]*100)/100 + '</text>';\n\n // Add colored circles to legend for positive and negative values\n svg +='<circle class=\"legend-circle\" id=\"Positive\" r=\"5px\"cy=\"20px\" fill=\"#5ab4ac\" fill-opacity=\"1.0\" cx=\"150px\"/>';\n svg +='<circle class=\"legend-circle\" id=\"Negative\" r=\"5px\"cy=\"70px\" fill=\"#d8b365\" fill-opacity=\"1.0\" cx=\"150px\"/>';\n // Add labels to colored circles in attribute legend\n svg +='<text id=\"Pos\" x=\"125\" y=\"40\">Positive</text>';\n svg +='<text id=\"Neg\" x=\"125\" y=\"90\">Negative</text>';\n };\n\n // Close the svg string\n svg += \"</svg>\";\n\n\n // Use jQuery to target the container and add the svg variable to it\n $(container).append(svg);\n\n return container;\n }\n });\n\n leafletMap.addControl(new LegendControl());\n\n if ($(this).attr('id') == 'forward'){\n // Increment\n index++;\n // Make value go around if an end is surpassed\n index = index > 10 ? 0 : index;\n // Conditional statemnt for when reverse button is pressed\n } else if ($(this).attr('id') == 'reverse'){\n // Decrement\n index--;\n index = index < 0 ? 10 : index;\n // // Make proportional symbols reflect\n // // the current value from the attributes array\n };\n\n\n}", "title": "" }, { "docid": "365d2dc8cda7383a95783f887531eaa8", "score": "0.6440103", "text": "function legend(lD){\n leg = {};\n\n // create table for legend.\n var legend = d3.select('#area1').append(\"table\").attr('class','legend');\n var header = legend.append(\"thead\").append(\"tr\");\n header\n .selectAll(\"th\")\n .data([\"Description\",\"Details\"])\n .enter()\n .append(\"th\")\n .text(function(d) { return d; });\n // create one row per segment.\n var tr = legend.append(\"tbody\").selectAll(\"tr\").data(lD).enter().append(\"tr\");\n\n // create the first column for each segment.\n // create the second column for each segment.\n tr.append(\"td\").text(function(d){ return d.type;});\n\n // create the third column for each segment.\n // create the fourth column for each segment.\n tr.append(\"td\").attr(\"class\",'legendPerc')\n .text(function(d){ return getLegend(d,lD);});\n\n // Utility function to be used to update the legend.\n leg.update = function(nD,name){\n // update the data attached to the row elements.\n var tp=Object.values(nD);\n // console.log(tp[1].stats);\n\n //['contrib_auth','end_time','forks','owner_type','project_id','stars','start_time','Duration']\n \n var new_data=['Project Name','Project Id','Owner Type','Stars','Forks','Contributing Authors','Duration(Months)','Start Time','End Time'].map(function(d){ \n return {type:d, stats: \"\"}; \n }); \n var diff = (new Date(tp[1].stats)).getTime() - (new Date(tp[6].stats)).getTime();\n var day = 1000 * 60 * 60 * 24;\n\n var days = Math.floor(diff/day);\n var months = Math.floor(days/31);\n // console.log(months);\n // console.log(nD);\n // console.log(name[0]);\n\n new_data[0].stats=name[0];\n new_data[1].stats=tp[4].stats;\n new_data[2].stats=tp[3].stats;\n new_data[3].stats=tp[5].stats;\n new_data[4].stats=tp[2].stats;\n new_data[5].stats=tp[0].stats;\n new_data[6].stats=months;\n new_data[7].stats=tp[6].stats;\n new_data[8].stats=tp[1].stats;\n \n // console.log(new_data);\n var l = legend.select(\"tbody\").selectAll(\"tr\").data(new_data);\n\n // update the frequencies.\n // l.select(\".legendFreq\").text(function(d){ console.log(d.stats); return d3.format(\",\")(d.stats);});\n\n // update the percentage column.\n l.select(\".legendPerc\").text(function(d){ return getLegend(d,new_data);}); \n }\n\n function getLegend(d,aD){ // Utility function to compute percentage.\n return d.stats;\n }\n\n return leg;\n }", "title": "" }, { "docid": "84d9b33311188bfa7a8b9bfd4859f3f4", "score": "0.6434845", "text": "function initLegendCanvas() {\n legendContext.clearRect(0, 0, legendContext.canvas.width, legendContext.canvas.height);\n drawHeaderText(legendContext, 'Legend');\n}", "title": "" }, { "docid": "143ac05f55b247605c1238adec51d23c", "score": "0.6427535", "text": "function drawLegend(){\n Xshift=-15;\n Yshift=10\n svg.append(\"rect\")\n .attr(\"transform\", \"translate(\"+ (width+42.5+Xshift) +\",\"+(Yshift-2.5)+\")\") // text is drawn off the screen top left, move down and out and rotate\n .attr(\"class\",\"legendBox\")\n .attr(\"width\", 20)\n .attr(\"height\", 30);\n\n svg.append(\"text\")\n .attr(\"text-anchor\", \"center\") // this makes it easy to centre the text as the transform is applied to the anchor\n .attr(\"class\",\"legendText\")\n .attr(\"transform\", \"translate(\"+ (width+70+Xshift) +\",\"+(Yshift+12.5)+\")\") // text is drawn off the screen top left, move down and out and rotate\n .text(\"Correlated Areas\");\n\n svg.append(\"text\")\n .attr(\"text-anchor\", \"center\") // this makes it easy to centre the text as the transform is applied to the anchor\n .attr(\"class\",\"legendSubText\")\n .attr(\"transform\", \"translate(\"+ (width+70+Xshift) +\",\"+(Yshift+22.5)+\")\") // text is drawn off the screen top left, move down and out and rotate\n .text(\"R-Squared > 0.95 (min. 10 observations)\");\n \n svg.append(\"rect\")\n .attr(\"transform\", \"translate(\"+ (width+35+Xshift) +\",\"+(Yshift-7.5)+\")\") // text is drawn off the screen top left, move down and out and rotate\n .attr(\"class\",\"legendOutline\")\n .attr(\"width\", 190)\n .attr(\"height\", 40);\n\n svg.append(\"line\")\n .attr(\"transform\", \"translate(\"+ -20 +\",\"+(primaryHeight1_2+25)+\")\") // text is drawn off the screen top left, move down and out and rotate\n .attr(\"x1\", 0)\n .attr(\"y1\", 0)\n .attr(\"x2\", width+leftGraphSpacing/2)\n .attr(\"y2\", 0) \n .style(\"stroke-dasharray\", \"10,5\") \n .attr(\"stroke-width\", 1)\n .attr(\"stroke\",'#FF9000');\n \n\n svg.append(\"line\")\n .attr(\"transform\", \"translate(\"+ (width+42.5+Xshift) +\",\"+(Yshift+12.5)+\")\") // text is drawn off the screen top left, move down and out and rotate\n .attr(\"x1\", 0)\n .attr(\"y1\", 0)\n .attr(\"x2\", 20)\n .attr(\"y2\", 0) \n .attr(\"stroke-width\", 2)\n .attr(\"stroke\",'#FF9000 ');\n }", "title": "" } ]
0a17888fd5b4294a6b4db8a5f491ea8c
Read all "data" attributes from a node
[ { "docid": "845fe54786191846c96805e656ef5530", "score": "0.7684627", "text": "function attributeData(node) {\r\n var store = {}\r\n $.each(node.attributes || emptyArray, function(i, attr){\r\n if (attr.name.indexOf('data-') == 0)\r\n store[camelize(attr.name.replace('data-', ''))] =\r\n $.zepto.deserializeValue(attr.value)\r\n })\r\n return store\r\n }", "title": "" } ]
[ { "docid": "8f1302417d331aa112dd770d2b28ae56", "score": "0.76507956", "text": "function attributeData(node) {\n var store = {}\n $.each(node.attributes || emptyArray, function(i, attr){\n if (attr.name.indexOf('data-') == 0)\n store[camelize(attr.name.replace('data-', ''))] =\n $.zepto.deserializeValue(attr.value)\n })\n return store\n }", "title": "" }, { "docid": "8f1302417d331aa112dd770d2b28ae56", "score": "0.76507956", "text": "function attributeData(node) {\n var store = {}\n $.each(node.attributes || emptyArray, function(i, attr){\n if (attr.name.indexOf('data-') == 0)\n store[camelize(attr.name.replace('data-', ''))] =\n $.zepto.deserializeValue(attr.value)\n })\n return store\n }", "title": "" }, { "docid": "8f1302417d331aa112dd770d2b28ae56", "score": "0.76507956", "text": "function attributeData(node) {\n var store = {}\n $.each(node.attributes || emptyArray, function(i, attr){\n if (attr.name.indexOf('data-') == 0)\n store[camelize(attr.name.replace('data-', ''))] =\n $.zepto.deserializeValue(attr.value)\n })\n return store\n }", "title": "" }, { "docid": "8f1302417d331aa112dd770d2b28ae56", "score": "0.76507956", "text": "function attributeData(node) {\n var store = {}\n $.each(node.attributes || emptyArray, function(i, attr){\n if (attr.name.indexOf('data-') == 0)\n store[camelize(attr.name.replace('data-', ''))] =\n $.zepto.deserializeValue(attr.value)\n })\n return store\n }", "title": "" }, { "docid": "8f1302417d331aa112dd770d2b28ae56", "score": "0.76507956", "text": "function attributeData(node) {\n var store = {}\n $.each(node.attributes || emptyArray, function(i, attr){\n if (attr.name.indexOf('data-') == 0)\n store[camelize(attr.name.replace('data-', ''))] =\n $.zepto.deserializeValue(attr.value)\n })\n return store\n }", "title": "" }, { "docid": "8f1302417d331aa112dd770d2b28ae56", "score": "0.76507956", "text": "function attributeData(node) {\n var store = {}\n $.each(node.attributes || emptyArray, function(i, attr){\n if (attr.name.indexOf('data-') == 0)\n store[camelize(attr.name.replace('data-', ''))] =\n $.zepto.deserializeValue(attr.value)\n })\n return store\n }", "title": "" }, { "docid": "8f1302417d331aa112dd770d2b28ae56", "score": "0.76507956", "text": "function attributeData(node) {\n var store = {}\n $.each(node.attributes || emptyArray, function(i, attr){\n if (attr.name.indexOf('data-') == 0)\n store[camelize(attr.name.replace('data-', ''))] =\n $.zepto.deserializeValue(attr.value)\n })\n return store\n }", "title": "" }, { "docid": "8f1302417d331aa112dd770d2b28ae56", "score": "0.76507956", "text": "function attributeData(node) {\n var store = {}\n $.each(node.attributes || emptyArray, function(i, attr){\n if (attr.name.indexOf('data-') == 0)\n store[camelize(attr.name.replace('data-', ''))] =\n $.zepto.deserializeValue(attr.value)\n })\n return store\n }", "title": "" }, { "docid": "d3d6aee525d7764d3f27f9ffe30223a3", "score": "0.7625529", "text": "function attributeData(node) {\r\n var store = {}\r\n $.each(node.attributes, function (i, attr) {\r\n if (attr.name.indexOf('data-') == 0)\r\n store[camelize(attr.name.replace('data-', ''))] =\r\n $.zepto.deserializeValue(attr.value)\r\n })\r\n return store\r\n }", "title": "" }, { "docid": "85c00c0004500e90e261d1e11a83dbd1", "score": "0.75781083", "text": "function attributeData(node) {\n var store = {}\n $.each(node.attributes, function(i, attr){\n if (attr.name.indexOf('data-') === 0)\n store[camelize(attr.name.replace('data-', ''))] = attr.value\n })\n return store\n }", "title": "" }, { "docid": "a85d7f5e13bf7b74acb7e5394a22cc28", "score": "0.74395627", "text": "function getData (node) {\r\n var attrs = node.attributes || []\r\n , data = {};\r\n\r\n if (!attrs.length) return data;\r\n\r\n $.each(attrs, function (i, attr) {\r\n if (/^data-in-*/.test(attr.nodeName)) {\r\n data.in = data.in || {};\r\n data.in[attr.nodeName.replace(/data-in-/, '')] = attr.nodeValue;\r\n } else if (/^data-out-*/.test(attr.nodeName)) {\r\n data.out = data.out || {};\r\n data.out[attr.nodeName.replace(/data-out-/, '')] = attr.nodeValue;\r\n } else if (/^data-*/.test(attr.nodeName)) {\r\n data[attr.nodeName] = attr.nodeValue;\r\n }\r\n })\r\n\r\n return data;\r\n }", "title": "" }, { "docid": "3d088dab7abb2f3d977763b614c6d9bc", "score": "0.69689596", "text": "function getData(node) {\n var attrs = node.attributes || []\n , data = {};\n\n if (!attrs.length) return data;\n\n $.each(attrs, function (i, attr) {\n var nodeName = attr.nodeName.replace(/delayscale/, 'delayScale');\n if (/^data-in-*/.test(nodeName)) {\n data.in = data.in || {};\n data.in[nodeName.replace(/data-in-/, '')] = stringToBoolean(attr.nodeValue);\n } else if (/^data-out-*/.test(nodeName)) {\n data.out = data.out || {};\n data.out[nodeName.replace(/data-out-/, '')] = stringToBoolean(attr.nodeValue);\n } else if (/^data-*/.test(nodeName)) {\n data[nodeName.replace(/data-/, '')] = stringToBoolean(attr.nodeValue);\n }\n })\n\n return data;\n }", "title": "" }, { "docid": "e93214dbd2d0f148a2505d946bd753d4", "score": "0.694757", "text": "function getData (node) {\n var attrs = node.attributes || []\n , data = {};\n\n if (!attrs.length) return data;\n\n $.each(attrs, function (i, attr) {\n var nodeName = attr.nodeName.replace(/delayscale/, 'delayScale');\n if (/^data-in-*/.test(nodeName)) {\n data.in = data.in || {};\n data.in[nodeName.replace(/data-in-/, '')] = stringToBoolean(attr.nodeValue);\n } else if (/^data-out-*/.test(nodeName)) {\n data.out = data.out || {};\n data.out[nodeName.replace(/data-out-/, '')] =stringToBoolean(attr.nodeValue);\n } else if (/^data-*/.test(nodeName)) {\n data[nodeName.replace(/data-/, '')] = stringToBoolean(attr.nodeValue);\n }\n })\n\n return data;\n }", "title": "" }, { "docid": "e93214dbd2d0f148a2505d946bd753d4", "score": "0.694757", "text": "function getData (node) {\n var attrs = node.attributes || []\n , data = {};\n\n if (!attrs.length) return data;\n\n $.each(attrs, function (i, attr) {\n var nodeName = attr.nodeName.replace(/delayscale/, 'delayScale');\n if (/^data-in-*/.test(nodeName)) {\n data.in = data.in || {};\n data.in[nodeName.replace(/data-in-/, '')] = stringToBoolean(attr.nodeValue);\n } else if (/^data-out-*/.test(nodeName)) {\n data.out = data.out || {};\n data.out[nodeName.replace(/data-out-/, '')] =stringToBoolean(attr.nodeValue);\n } else if (/^data-*/.test(nodeName)) {\n data[nodeName.replace(/data-/, '')] = stringToBoolean(attr.nodeValue);\n }\n })\n\n return data;\n }", "title": "" }, { "docid": "f85b28e68a2393c7b3267a074c11cf2e", "score": "0.663218", "text": "function extract_data_attr(el) {\n\t\tvar data = {};\n\n\t\tfor (var i=0; i < el.attributes.length; i++) {\n\t\t\tvar attr = el.attributes.item(i);\n\n\t\t\tif ( attr.specified && 0 == attr.name.indexOf('data-') ) {\n\t\t\t\tvar value = attr.value;\n\n\t\t\t\ttry {\n\t\t\t\t\tvalue = jQuery.parseJSON(value);\n\t\t\t\t} catch(e) {}\n\n\t\t\t\tif ( null === value )\n\t\t\t\t\tvalue = '';\n\n\t\t\t\tdata[ attr.name.substr(5) ] = value;\n\t\t\t}\n\t\t}\n\n\t\treturn data;\n\t}", "title": "" }, { "docid": "35c77cb247feeb534d27ddcd321a0f2f", "score": "0.6432303", "text": "function getData(node,name){var id=node[exp],store=id&&data[id];if(name===undefined)return store||setData(node);else{if(store){if(name in store)return store[name];var camelName=camelize(name);if(camelName in store)return store[camelName];}return dataAttr.call($(node),name);}}// Store value under camelized key on node", "title": "" }, { "docid": "826cc59d53d76536aaa8587454b4abef", "score": "0.64013374", "text": "function readData(el, name) {\n let domNames;\n let jsNames;\n let value;\n if (name == null) {\n domNames = Object.keys(el.attribs).filter((attrName) => attrName.startsWith(dataAttrPrefix));\n jsNames = domNames.map((domName) => camelCase(domName.slice(dataAttrPrefix.length)));\n }\n else {\n domNames = [dataAttrPrefix + cssCase(name)];\n jsNames = [name];\n }\n for (let idx = 0; idx < domNames.length; ++idx) {\n const domName = domNames[idx];\n const jsName = jsNames[idx];\n if (hasOwn.call(el.attribs, domName) &&\n !hasOwn.call(el.data, jsName)) {\n value = el.attribs[domName];\n if (hasOwn.call(primitives, value)) {\n value = primitives[value];\n }\n else if (value === String(Number(value))) {\n value = Number(value);\n }\n else if (rbrace.test(value)) {\n try {\n value = JSON.parse(value);\n }\n catch (e) {\n /* Ignore */\n }\n }\n el.data[jsName] = value;\n }\n }\n return name == null ? el.data : value;\n}", "title": "" }, { "docid": "c576e50a564e6d55300ab474c152a44f", "score": "0.6342732", "text": "function ElementData() {}", "title": "" }, { "docid": "c576e50a564e6d55300ab474c152a44f", "score": "0.6342732", "text": "function ElementData() {}", "title": "" }, { "docid": "c576e50a564e6d55300ab474c152a44f", "score": "0.6342732", "text": "function ElementData() {}", "title": "" }, { "docid": "7e9eccef00a6989c2b1f500892de12d7", "score": "0.6337936", "text": "function readData(el, name) {\n var domNames;\n var jsNames;\n var value;\n\n if (name == null) {\n domNames = Object.keys(el.attribs).filter(function (attrName) {\n return attrName.startsWith(dataAttrPrefix);\n });\n jsNames = domNames.map(function (domName) {\n return utils_1.camelCase(domName.slice(dataAttrPrefix.length));\n });\n } else {\n domNames = [dataAttrPrefix + utils_1.cssCase(name)];\n jsNames = [name];\n }\n\n for (var idx = 0; idx < domNames.length; ++idx) {\n var domName = domNames[idx];\n var jsName = jsNames[idx];\n\n if (hasOwn.call(el.attribs, domName) && !hasOwn.call(el.data, jsName)) {\n value = el.attribs[domName];\n\n if (hasOwn.call(primitives, value)) {\n value = primitives[value];\n } else if (value === String(Number(value))) {\n value = Number(value);\n } else if (rbrace.test(value)) {\n try {\n value = JSON.parse(value);\n } catch (e) {\n /* Ignore */\n }\n }\n\n el.data[jsName] = value;\n }\n }\n\n return name == null ? el.data : value;\n}", "title": "" }, { "docid": "97b25a71db1186f38e57ae3610d68eb0", "score": "0.6230724", "text": "function ElementData() { }", "title": "" }, { "docid": "97b25a71db1186f38e57ae3610d68eb0", "score": "0.6230724", "text": "function ElementData() { }", "title": "" }, { "docid": "bebc483b4516b13d9207b15216c00982", "score": "0.61624897", "text": "function getAttributes ( node ) {\nvar i,\n attributeNodes = node.attributes,\n length = attributeNodes.length,\n attrs = {};\n\nfor ( i = 0; i < length; i++ ) attrs[attributeNodes[i].name] = attributeNodes[i].value;\nreturn attrs;\n}", "title": "" }, { "docid": "78c20fab6e9ac7bdad9c8106b3cb4f98", "score": "0.6157806", "text": "function getData(node, name) {\r\n var id = node[exp], store = id && data[id]\r\n if (name === undefined) return store || setData(node)\r\n else {\r\n if (store) {\r\n if (name in store) return store[name]\r\n var camelName = camelize(name)\r\n if (camelName in store) return store[camelName]\r\n }\r\n return dataAttr.call($(node), name)\r\n }\r\n }", "title": "" }, { "docid": "a04a1b966b19a8151f03eb1242e47546", "score": "0.6153966", "text": "function getData(node, name) {\r\n var id = node[exp], store = id && data[id]\r\n if (name === undefined) return store || setData(node)\r\n else {\r\n if (store) {\r\n if (name in store) return store[name]\r\n var camelName = camelize(name)\r\n if (camelName in store) return store[camelName]\r\n }\r\n return dataAttr.call($(node), name)\r\n }\r\n }", "title": "" }, { "docid": "50a0f1c559a98bee398626a477e4acbc", "score": "0.6150563", "text": "function getData(node, name) {\n var id = node[exp], store = id && data[id]\n if (name === undefined) return store || setData(node)\n else {\n if (store) {\n if (name in store) return store[name]\n var camelName = camelize(name)\n if (camelName in store) return store[camelName]\n }\n return dataAttr.call($(node), name)\n }\n }", "title": "" }, { "docid": "50a0f1c559a98bee398626a477e4acbc", "score": "0.6150563", "text": "function getData(node, name) {\n var id = node[exp], store = id && data[id]\n if (name === undefined) return store || setData(node)\n else {\n if (store) {\n if (name in store) return store[name]\n var camelName = camelize(name)\n if (camelName in store) return store[camelName]\n }\n return dataAttr.call($(node), name)\n }\n }", "title": "" }, { "docid": "50a0f1c559a98bee398626a477e4acbc", "score": "0.6150563", "text": "function getData(node, name) {\n var id = node[exp], store = id && data[id]\n if (name === undefined) return store || setData(node)\n else {\n if (store) {\n if (name in store) return store[name]\n var camelName = camelize(name)\n if (camelName in store) return store[camelName]\n }\n return dataAttr.call($(node), name)\n }\n }", "title": "" }, { "docid": "50a0f1c559a98bee398626a477e4acbc", "score": "0.6150563", "text": "function getData(node, name) {\n var id = node[exp], store = id && data[id]\n if (name === undefined) return store || setData(node)\n else {\n if (store) {\n if (name in store) return store[name]\n var camelName = camelize(name)\n if (camelName in store) return store[camelName]\n }\n return dataAttr.call($(node), name)\n }\n }", "title": "" }, { "docid": "50a0f1c559a98bee398626a477e4acbc", "score": "0.6150563", "text": "function getData(node, name) {\n var id = node[exp], store = id && data[id]\n if (name === undefined) return store || setData(node)\n else {\n if (store) {\n if (name in store) return store[name]\n var camelName = camelize(name)\n if (camelName in store) return store[camelName]\n }\n return dataAttr.call($(node), name)\n }\n }", "title": "" }, { "docid": "50a0f1c559a98bee398626a477e4acbc", "score": "0.6150563", "text": "function getData(node, name) {\n var id = node[exp], store = id && data[id]\n if (name === undefined) return store || setData(node)\n else {\n if (store) {\n if (name in store) return store[name]\n var camelName = camelize(name)\n if (camelName in store) return store[camelName]\n }\n return dataAttr.call($(node), name)\n }\n }", "title": "" }, { "docid": "50a0f1c559a98bee398626a477e4acbc", "score": "0.6150563", "text": "function getData(node, name) {\n var id = node[exp], store = id && data[id]\n if (name === undefined) return store || setData(node)\n else {\n if (store) {\n if (name in store) return store[name]\n var camelName = camelize(name)\n if (camelName in store) return store[camelName]\n }\n return dataAttr.call($(node), name)\n }\n }", "title": "" }, { "docid": "50a0f1c559a98bee398626a477e4acbc", "score": "0.6150563", "text": "function getData(node, name) {\n var id = node[exp], store = id && data[id]\n if (name === undefined) return store || setData(node)\n else {\n if (store) {\n if (name in store) return store[name]\n var camelName = camelize(name)\n if (camelName in store) return store[camelName]\n }\n return dataAttr.call($(node), name)\n }\n }", "title": "" }, { "docid": "50a0f1c559a98bee398626a477e4acbc", "score": "0.6150563", "text": "function getData(node, name) {\n var id = node[exp], store = id && data[id]\n if (name === undefined) return store || setData(node)\n else {\n if (store) {\n if (name in store) return store[name]\n var camelName = camelize(name)\n if (camelName in store) return store[camelName]\n }\n return dataAttr.call($(node), name)\n }\n }", "title": "" }, { "docid": "5ede1b60b44374791587c29d0ba04a26", "score": "0.612071", "text": "attributes(node) {\n const elem = mona_dish_1.DQ.byId(node.id.value, true);\n node.byTagName(Const_1.XML_TAG_ATTR).each((item) => {\n elem.attr(item.attr(Const_1.ATTR_NAME).value).value = item.attr(Const_1.ATTR_VALUE).value;\n });\n }", "title": "" }, { "docid": "70246b8d2e30e2f7b77e686aead51f13", "score": "0.5977755", "text": "function processData(data) {\r\n var attributes = [];\r\n var properties = data.features[0].properties;\r\n for (var attribute in properties) {\r\n //only take attributes with population values\r\n if (attribute.indexOf('net') > -1) {\r\n attributes.push(attribute);\r\n }\r\n }\r\n return attributes;\r\n}", "title": "" }, { "docid": "420805aed64d26aa592470ceade806b3", "score": "0.5970942", "text": "function element_data_attrs(element) {\n if (element && element instanceof jQuery) {\n element = element.get().pop();\n }\n if (!element || !element.attributes) {\n console.log(element);\n throw new Error(\"Can not get data attributes from none element parameter\");\n }\n var data = {};\n var attrs = element.attributes;\n if (attrs.length) {\n var attr_blacklist = ['id', 'class', 'name', 'style', 'href', 'src', 'title', 'onclick'];\n for (var i = 0; i < attrs.length; i++) {\n var attr = attrs[i];\n if (attr_blacklist.indexOf(attr.name.toLowerCase()) > -1) continue;\n data[attr.name] = attr.value;\n }\n }\n return data;\n}", "title": "" }, { "docid": "566b8555af43efaa5d97b02035c8a0a6", "score": "0.5964701", "text": "get data() {\n return this.getStringAttribute('data');\n }", "title": "" }, { "docid": "a2cd5d07ffe38704c358f06c6008a6d7", "score": "0.590994", "text": "static get observedAttributes() {\n return ['data'];\n }", "title": "" }, { "docid": "0d4159efd349c45b0d2088854f75e162", "score": "0.58924556", "text": "function ElementData(){}", "title": "" }, { "docid": "98165d01542ae08a078f2cd930af375f", "score": "0.5881388", "text": "function data2Attribs(data)\t{\n\t\t\t\t\t\t\tvar attribs = \" \";\n\t\t\t\t\t\t\tfor(index in data)\t{\n\t\t\t\t\t\t\t\tattribs += index+\"='\"+data[index]+\"' \";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn attribs;\n\t\t\t\t\t\t\t}", "title": "" }, { "docid": "327bad79cfe26221602fbbe45be31575", "score": "0.58199954", "text": "function loadNodeDataFields(jsonData)\n{\n}", "title": "" }, { "docid": "2158d220ec6c2e32b93c7b4daa1cabee", "score": "0.57958865", "text": "function processData(data) {\n\n // empty array to hold attributes\n var attributes = [];\n\n // properties of the first feature in the dataset\n var properties = data.features[0].properties;\n\n // push each attribute name into attributes array\n for (var attribute in properties) {\n\n // only take attributes with acre values\n if (attribute.indexOf(\"20\") > -1) {\n attributes.push(attribute);\n };\n };\n\n return attributes;\n\n}", "title": "" }, { "docid": "f0d1770eabebb35201c645cac39f1a29", "score": "0.5790818", "text": "function getElementDataAttr(element) {\n return element ? element.dataset : {}\n}", "title": "" }, { "docid": "438a40e64e8f44ebba78577a0f2d46b6", "score": "0.5782079", "text": "function processData(data){\n //empty array to hold attributes\n attributes = [];\n\n //properties of the first feature in the dataset\n var properties = data.features[0].properties;\n\n //push each attribute name into attributes array\n for (var attribute in properties){\n //only take attributes with population values\n if (attribute.indexOf(\"Prop\") > -1){\n attributes.push(attribute);\n };\n };\n return attributes;\n}", "title": "" }, { "docid": "ac600c5507a09b137fe60e58f2b4bb2d", "score": "0.57677597", "text": "function processRawData(data){\n //empty array to hold attributes\n rawAttributes = [];\n //properties of the first feature in the dataset\n var properties = data.features[0].properties;\n\n //push each attribute name into attributes array\n for (var rawAttribute in properties){\n //only take attributes with population values\n if (rawAttribute.indexOf(\"Raw\") > -1){\n rawAttributes.push(rawAttribute);\n };\n };\n\n return rawAttributes; \n}", "title": "" }, { "docid": "40a03afd88e9906182ce7469966a226b", "score": "0.5740224", "text": "function get_data() {}", "title": "" }, { "docid": "cacd5ba343319411e4c178d4e3dfa988", "score": "0.5665076", "text": "function assignData(node, data) {\n node.__data__ = data;\n}", "title": "" }, { "docid": "ea10b2f5399b4a8dd2a2ee9210765977", "score": "0.5641504", "text": "function data(name) {\n all(\"body /deep/ [data~=\\\"\" + name + \"\\\"]:not([inert])\").map(invoke);\n }", "title": "" }, { "docid": "41871df2006f670321234b5779944fae", "score": "0.5639195", "text": "function loadDataAttr(el){\n\t\tfor (var key in defaults) {\n\t\t\tif(el.getAttribute('data-'+key))\n\t\t\t\tsettings[key]=el.getAttribute('data-'+key);\n\t\t\telse\n\t\t\t\tsettings[key] = defaults[key];\n\t\t}\n\t}", "title": "" }, { "docid": "88a57aad590ecd46c893e7db05d90ed4", "score": "0.56203395", "text": "static get attributes() {}", "title": "" }, { "docid": "6a9cdf0329842acc3221b46691620356", "score": "0.5577475", "text": "function processDataFromDOM (node) {\n\t// data is array of objects, each object having func = function\n\t// and optional args = [arguments] or data = {data}\n\tvar data = node.innerHTML;\n\n\tcallJSFunctions(data);\n}", "title": "" }, { "docid": "1a7671e0adc6927f2477040c9e7c7e41", "score": "0.5539229", "text": "getAttributes() {}", "title": "" }, { "docid": "41c1f2a099f5d87ec645ded7754dc1be", "score": "0.5530842", "text": "function getAttributeData() {\n var sRes = false;\n var url = \"https://my.zipato.com:443/zipato-web/v2/attributes/full?network=true&device=true&endpoint=true&clusterEndpoint=true&definition=true&config=true&room=true&icons=true&value=true&parent=true&children=true&full=true&type=true\";\n\n\n $.ajax({\n type: \"GET\",\n url: url,\n cache: false,\n async: false,\n success: function (data) {\n attributeData = data; // Store the data from the request in attributeData variable\n sRes = true\n },\n error: function (xhr, ajaxOptions, thrownError) {\n sRes = false;\n }\n });\n\n lastSync = Date.now();\n return sRes;\n}", "title": "" }, { "docid": "3a8358b90d3430ddd6ea2b04978f9f97", "score": "0.5525815", "text": "function processData(data){\n //empty array to hold attributes\n var attributes = [];\n\n //properties of the first feature in the dataset\n var properties = data.features[0].properties;\n\n //push each attribute name into attributes array\n for (var attribute in properties){\n //only take attributes with spruce values\n if (attribute.indexOf(\"yr\") > -1){\n attributes.push(attribute);\n };\n };\n // return attributes as object\n return attributes;\n}", "title": "" }, { "docid": "58fc5618b67ef49a7252210407340914", "score": "0.55144536", "text": "function getCustomAttribute(){\n let attr = document.querySelectorAll('[data-customAttr]')\n for (let i of attr){\n let z = i.getAttribute('data-customAttr')\n console.log(`${z} : ${i}`)\n }\n}", "title": "" }, { "docid": "841d5c2013fb6d2a1c4922f541b9906f", "score": "0.5503113", "text": "function makeJsonFromNode(node){\n\t\treturn {\n\t\t\tverb : node.getAttribute(\"data-verb\"),\n\t\t\teventId : node.getAttribute(\"data-event-id\"),\n\t\t\tid : node.getAttribute(\"data-event-id\"), // Just in case\n\t\t\tstepNumber : node.getAttribute(\"data-step-number\"),\n\t\t\tstart : node.getAttribute(\"data-event-start\"),\n\t\t\tend : node.getAttribute(\"data-event-end\"),\n\t\t\tnotes : node.getAttribute(\"data-notes\"),\n\t\t\tactive : node.getAttribute(\"data-active\"),\n\t\t\tbgColor : node.getAttribute(\"data-bg-color\"),\n\t\t\tlocked : node.getAttribute(\"data-locked\") || true,\n\t\t\tcontainer : false,\n\t\t\tallDay : false,\n\t\t\tlength : (node.getAttribute(\"data-length\") || (new Date(node.getAttribute(\"data-event-end\")).getTime() - \n\t\t\t\t\tnew Date(node.getAttribute(\"data-event-start\")).getTime())/1000)\n\t\t};\n\t}", "title": "" }, { "docid": "c8559ccb9319206611afd5391895c700", "score": "0.548698", "text": "function processData(data){\n //empty array to hold attributes\n //properties of the first feature in the dataset\n var properties = data.features[0].properties;\n //push each attribute name into attributes array\n for (var attribute in properties){\n //only take attributes with a value that includes \"NORM\" (just injury stats)\n if (attribute.indexOf(\"NORM\") > -1){\n attributes.push(attribute);\n }\n }\n return attributes;\n}", "title": "" }, { "docid": "21723c5809671166aa9c87d1d39b100f", "score": "0.5378936", "text": "function parseAttrs(nodes) {\n return nodes.reduce(function(prev, node) {\n var key = _.last(node.key.split('/'));\n\n if (key === 'labels') { // process labels\n prev.labels = node.nodes ? parseLabels(node.nodes) : [];\n }\n else if (key === 'monitor') {\n prev.monitor = node.nodes ? parseMonitors(node.nodes) : [];\n }\n else if (key === 'domain') { // skip domain\n }\n else {\n prev[key] = node.value;\n }\n return prev;\n }, {});\n}", "title": "" }, { "docid": "fbd1298a58907a383147eb944b7c38a7", "score": "0.53487813", "text": "function processData(data, keyword){\n //empty array to hold attributes\n var attributes = [];\n\n //properties of the first feature in the dataset\n var properties = data.features[0].properties;\n\n //push each attribute name into attributes array\n for (var attribute in properties){\n //only take attributes with acres values\n if (attribute.indexOf(keyword) > -1){\n attributes.push(attribute);\n };\n };\n\n return attributes;\n}", "title": "" }, { "docid": "5c16cf17a48c7e65a1350096f4177fd0", "score": "0.5340381", "text": "function getCustomAttribute() {\r\n let elements = document.getElementsByTagName(\"*\"); //(\"[data-customAttr]\");\r\n for (let element of elements)\r\n if (element.hasAttribute(\"data-customAttr\")) {\r\n console.log(element.getAttribute(\"data-customAttr\"));\r\n console.log(element);\r\n console.log(\"--\");\r\n }\r\n}", "title": "" }, { "docid": "17b5207f7714c1ec1718627f20293b46", "score": "0.53370905", "text": "function dataAttr( elem, key, data ) {\n\t// If nothing was found internally, try to fetch any\n\t// data from the HTML5 data-* attribute\n\t// 如果缓存中木有此元素相关缓存数据,则尝试从此元素节点上的 html5 data-* 属性查找数据。\n\tif ( data === undefined && elem.nodeType === 1 ) {\n\n\t\t// 即:\"ABC\" => \"data-a-b-c\"\n\t\tvar name = \"data-\" + key.replace( rmultiDash, \"-$1\" ).toLowerCase();\n\n\t\tdata = elem.getAttribute( name );\n\n\t\t// 如果dom节点上的属性值为字符串,则返回属性值。\n\t\tif ( typeof data === \"string\" ) {\n\t\t\t/*\n\t\t\t\t类型转换,如:\n\t\t\t\t\"true\"=>true,\n\t\t\t\t\"false\"=>false,\n\t\t\t\t\"null\"=>null,\n\t\t\t\t\"567\"=>567,\n\t\t\t\t\"567.0\"=>\"0567.0\",\n\t\t\t\t\"{\"a\":1,\"b\":2}\"=>{\"a\":1,\"b\":2}\n\t\t\t*/\n\t\t\ttry {\n\t\t\t\tdata = data === \"true\" ? true :\n\t\t\t\t\tdata === \"false\" ? false :\n\t\t\t\t\tdata === \"null\" ? null :\n\t\t\t\t\t// Only convert to a number if it doesn't change the string\n\t\t\t\t\t// 将字符串转换为数字。\n\t\t\t\t\t+data + \"\" === data ? +data :\n\t\t\t\t\trbrace.test( data ) ? jQuery.parseJSON( data ) :\n\t\t\t\t\t\tdata;\n\t\t\t} catch( e ) {}\n\n\t\t\t// Make sure we set the data so it isn't changed later\n\t\t\t// 将修改过的数据保存到缓存中。\n\t\t\tjQuery.data( elem, key, data );\n\n\t\t} else {\n\t\t\tdata = undefined;\n\t\t}\n\t}\n\n\treturn data;\n}", "title": "" }, { "docid": "a82d6f76ef5a20423faae34d663c56bd", "score": "0.5313326", "text": "static get observedAttributes () {\n return ['data-values', 'data-color', 'data-display-style'];\n }", "title": "" }, { "docid": "82ff34131e9b72656ab00a5715dddcf2", "score": "0.5301209", "text": "function setData(node, name, value) {\r\n var id = node[exp] || (node[exp] = ++$.uuid),\r\n store = data[id] || (data[id] = attributeData(node))\r\n if (name !== undefined) store[camelize(name)] = value\r\n return store\r\n }", "title": "" }, { "docid": "95b5a390991d66fd49266270881f2f83", "score": "0.5297811", "text": "function setData(node, name, value) {\r\n var id = node[exp] || (node[exp] = ++$.uuid),\r\n store = data[id] || (data[id] = attributeData(node))\r\n if (name !== undefined) store[camelize(name)] = value\r\n return store\r\n }", "title": "" }, { "docid": "f058bf5378da3d3876d72a9578f10740", "score": "0.5281346", "text": "function setData(node, name, value) {\n var id = node[exp] || (node[exp] = ++$.uuid),\n store = data[id] || (data[id] = attributeData(node))\n if (name !== undefined) store[camelize(name)] = value\n return store\n }", "title": "" }, { "docid": "f058bf5378da3d3876d72a9578f10740", "score": "0.5281346", "text": "function setData(node, name, value) {\n var id = node[exp] || (node[exp] = ++$.uuid),\n store = data[id] || (data[id] = attributeData(node))\n if (name !== undefined) store[camelize(name)] = value\n return store\n }", "title": "" }, { "docid": "f058bf5378da3d3876d72a9578f10740", "score": "0.5281346", "text": "function setData(node, name, value) {\n var id = node[exp] || (node[exp] = ++$.uuid),\n store = data[id] || (data[id] = attributeData(node))\n if (name !== undefined) store[camelize(name)] = value\n return store\n }", "title": "" }, { "docid": "f058bf5378da3d3876d72a9578f10740", "score": "0.5281346", "text": "function setData(node, name, value) {\n var id = node[exp] || (node[exp] = ++$.uuid),\n store = data[id] || (data[id] = attributeData(node))\n if (name !== undefined) store[camelize(name)] = value\n return store\n }", "title": "" }, { "docid": "f058bf5378da3d3876d72a9578f10740", "score": "0.5281346", "text": "function setData(node, name, value) {\n var id = node[exp] || (node[exp] = ++$.uuid),\n store = data[id] || (data[id] = attributeData(node))\n if (name !== undefined) store[camelize(name)] = value\n return store\n }", "title": "" }, { "docid": "f058bf5378da3d3876d72a9578f10740", "score": "0.5281346", "text": "function setData(node, name, value) {\n var id = node[exp] || (node[exp] = ++$.uuid),\n store = data[id] || (data[id] = attributeData(node))\n if (name !== undefined) store[camelize(name)] = value\n return store\n }", "title": "" }, { "docid": "f058bf5378da3d3876d72a9578f10740", "score": "0.5281346", "text": "function setData(node, name, value) {\n var id = node[exp] || (node[exp] = ++$.uuid),\n store = data[id] || (data[id] = attributeData(node))\n if (name !== undefined) store[camelize(name)] = value\n return store\n }", "title": "" }, { "docid": "f058bf5378da3d3876d72a9578f10740", "score": "0.5281346", "text": "function setData(node, name, value) {\n var id = node[exp] || (node[exp] = ++$.uuid),\n store = data[id] || (data[id] = attributeData(node))\n if (name !== undefined) store[camelize(name)] = value\n return store\n }", "title": "" }, { "docid": "f058bf5378da3d3876d72a9578f10740", "score": "0.5281346", "text": "function setData(node, name, value) {\n var id = node[exp] || (node[exp] = ++$.uuid),\n store = data[id] || (data[id] = attributeData(node))\n if (name !== undefined) store[camelize(name)] = value\n return store\n }", "title": "" }, { "docid": "dd23470d63462d04d2fa6f2f9c06e945", "score": "0.5271492", "text": "getAllDataAttrKeys() {\n\t\treturn Object.keys(this.attributesObject).filter(field => field.startsWith('data-attr'));\n\t}", "title": "" }, { "docid": "3169dd67d0bd227131b671bd01279ec8", "score": "0.5268087", "text": "function getAttributes(node) {\n var attrs = node.attributes;\n if (node.checked) {\n attrs = Array.prototype.slice.call(attrs);\n attrs.push({name: 'checked', value: node.checked});\n }\n return attrs;\n}", "title": "" }, { "docid": "773aadfc0230ea136cf7da2900ba024e", "score": "0.5266705", "text": "function getCustomAttributes() {\n let allTheStuff = document.getElementsByTagName('*');\n let val = 0;\n let retStr = \"\";\n \n for (let i = 0; i < allTheStuff.length; i++)\n { \n let dataset =allTheStuff[i].dataset.customattr;\n\n if (dataset)\n {\n retStr += 'value: ' + dataset.valueOf() + '\\n';\n retStr += `${allTheStuff[i].tagName} tag containing ${allTheStuff[i].innerHTML}\\n`;\n }\n }\n\n console.log(retStr);\n}", "title": "" }, { "docid": "802f3e488efeff0b60ff6df4ffe3ef16", "score": "0.52635497", "text": "function el_getattributes(node, dict, prefix = false) {\n if (node.nodeType == 1) { // element\n // fetch attributes\n if (node.attributes.length > 0) {\n let tagname = node.nodeName + \"_\";\n for (let i = 0; i < node.attributes.length; i++) {\n let attribute = node.attributes.item(i);\n let nodename = attribute.nodeName;\n if (prefix)\n nodename = tagname + attribute.nodeName;\n dict[nodename.toLowerCase()] = attribute.nodeValue;\n }\n }\n }\n}", "title": "" }, { "docid": "9ad2c8e80e9c679cb86c414d18492ad3", "score": "0.5260589", "text": "function walkTheDOMWithAttributes(node,func,depth,returnedFromParent) {\n\t var root = node || window.document;\n\t returnedFromParent = func(root,depth++,returnedFromParent);\n\t if (root.attributes) {\n\t for(var i=0; i < root.attributes.length; i++) {\n\t walkTheDOMWithAttributes(root.attributes[i],func,depth-1,returnedFromParent);\n\t }\n\t }\n\t if(root.nodeType != ADS.node.ATTRIBUTE_NODE) {\n\t node = root.firstChild;\n\t while(node) {\n\t walkTheDOMWithAttributes(node,func,depth,returnedFromParent);\n\t node = node.nextSibling;\n\t }\n\t }\n\t}", "title": "" }, { "docid": "ba3c21100615d779e6b9a9399f49d4ab", "score": "0.52470356", "text": "function processData(data){\r\n var attributes = [];\r\n var properties = data.features[0].properties;\r\n \r\n for (var attribute in properties){\r\n if(attribute != \"City\"){\r\n attributes.push(attribute);\r\n \r\n }\r\n };\r\n \r\n console.log(attributes);\r\n return attributes;\r\n \r\n}", "title": "" }, { "docid": "a65154e4abfbfd5d0868e60468dd5052", "score": "0.5216237", "text": "function getData(data) {\n dataActivity = data.activity;\n dataType = data.type;\n dataAccessibility = data.accessibility;\n dataPrice = data.price;\n dataParticipants = data.participants;\n}", "title": "" }, { "docid": "4e3c670d6b80adb8e4992e26ddc678ed", "score": "0.52071", "text": "function processData(data){\n\t//empty array to hold attributes\n\tvar attributes = [];\n\t// console.log(data);\n\t//properties of the first feature in the dataset\n\tvar properties = data.features[0].properties;\n\tconsole.log(properties)\n\t//push each attribute name into attributes array\n\tfor (var attribute in properties){\n\t\t//only take attributes with values\n\t\t// decided to up alphabetical search and sort \n\t\tif(attribute.indexOf(\"April\"|\"September\") > -1){\n\t\t\tattributes.push(attribute);\n\t\t};\n\t};\n\t//check result\n\t// console.log(attributes);\n\treturn attributes;\n}", "title": "" }, { "docid": "456e7b1ec076628c2e3e03de9997f020", "score": "0.519222", "text": "setTestData () {\n\t\tthis.data = {};\n\t\tthis.attributes.forEach(attribute => {\n\t\t\tlet value;\n\t\t\tconst type = this.attributeType || 'string';\n\t\t\tswitch (type) {\n\t\t\tdefault:\n\t\t\t\tvalue = RandomString.generate(10);\n\t\t\t\tbreak;\n\t\t\tcase 'object':\n\t\t\t\tvalue = { x: 1, y: 'two' };\n\t\t\t\tbreak;\n\t\t\tcase 'boolean':\n\t\t\t\tvalue = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tthis.data[attribute] = value;\n\t\t});\n\t}", "title": "" }, { "docid": "09cd13190d6d3f2b4a4043725f12b615", "score": "0.5184795", "text": "function getDataAndAria(props) {\n return Object.keys(props).reduce(function (prev, key) {\n if (key.substr(0, 5) === 'data-' || key.substr(0, 5) === 'aria-') {\n prev[key] = props[key];\n }\n\n return prev;\n }, {});\n}", "title": "" }, { "docid": "09cd13190d6d3f2b4a4043725f12b615", "score": "0.5184795", "text": "function getDataAndAria(props) {\n return Object.keys(props).reduce(function (prev, key) {\n if (key.substr(0, 5) === 'data-' || key.substr(0, 5) === 'aria-') {\n prev[key] = props[key];\n }\n\n return prev;\n }, {});\n}", "title": "" }, { "docid": "09cd13190d6d3f2b4a4043725f12b615", "score": "0.5184795", "text": "function getDataAndAria(props) {\n return Object.keys(props).reduce(function (prev, key) {\n if (key.substr(0, 5) === 'data-' || key.substr(0, 5) === 'aria-') {\n prev[key] = props[key];\n }\n\n return prev;\n }, {});\n}", "title": "" }, { "docid": "09cd13190d6d3f2b4a4043725f12b615", "score": "0.5184795", "text": "function getDataAndAria(props) {\n return Object.keys(props).reduce(function (prev, key) {\n if (key.substr(0, 5) === 'data-' || key.substr(0, 5) === 'aria-') {\n prev[key] = props[key];\n }\n\n return prev;\n }, {});\n}", "title": "" }, { "docid": "09cd13190d6d3f2b4a4043725f12b615", "score": "0.5184795", "text": "function getDataAndAria(props) {\n return Object.keys(props).reduce(function (prev, key) {\n if (key.substr(0, 5) === 'data-' || key.substr(0, 5) === 'aria-') {\n prev[key] = props[key];\n }\n\n return prev;\n }, {});\n}", "title": "" }, { "docid": "69a62b0a15c31f52d5a3bb8dfaa4f7b4", "score": "0.5181079", "text": "parseAttributes(node) {\n if (node.type !== 'tag') return\n\n let attributes = node.attributes.trim()\n let result = {}\n let reg = /([^=\\s]+)(?:\\s*=\\s*(?:'([^']*)'|\"([^\"]*)\"|([^\\s]*)))?/g\n let match = reg.exec(attributes)\n\n while (match) {\n let key = match[1]\n let value = match[2] || match[3] || match[4] || ''\n\n if (!Reflect.has(result, key)) {\n result[key] = value\n }\n \n match = reg.exec(attributes)\n }\n\n node.attributes = result\n }", "title": "" }, { "docid": "95f366d1674afb88e47cc148b7cf7bad", "score": "0.51685786", "text": "function parseData(xmldoc) {\r\n updateStatus('parsing Custom node');\r\n var root = xmldoc.getElementsByTagName('root').item(0);\r\n base_url = root.getAttribute('anidb');\r\n var t1 = new Date();\r\n parseCustom(root.getElementsByTagName('custom').item(0));\r\n var parseCustomNode = (new Date()) - t1;\r\n replaceGlobals(document.body);\r\n updateStatus('Processing anime...');\r\n t1 = new Date();\r\n parseAnimes(root.getElementsByTagName('animes'));\r\n var parseAnimeNode = (new Date()) - t1;\r\n updateStatus('Processing user information...');\r\n if (seeTimes) { alert('Processing...'+\r\n '\\n\\tanime: '+parseAnimeNode+'ms'+\r\n '\\n\\tcustom: '+parseCustomNode+' ms'+\r\n '\\nTotal: '+(parseAnimeNode+parseCustomNode)+' ms'); }\r\n updateStatus('');\r\n renderPage();\r\n}", "title": "" }, { "docid": "663378de6ba4a288f86ad78c36b61203", "score": "0.51664484", "text": "getData () {\n }", "title": "" }, { "docid": "8d60d48ecd2b99c98d80bf2422163d93", "score": "0.5165501", "text": "function get_all_count_data(node, all_count_data) {\n\tfor(var p = 0; p < node.counts.length; p++)\n\t\tall_count_data.push(node.counts[p].count);\n\tfor(var c = 0; c < node.children.length; c++)\n\t\tget_all_count_data(node.children[c], all_count_data);\n}", "title": "" }, { "docid": "5bfb13615a387754585008c3d57a133a", "score": "0.5159778", "text": "function processData(data)\n\t{\n\t\t// attributes is an array of an individual industry by year e.g. ['con2008', 'con2009', ....]\n\t\tvar attributes = [];\n\n\t\t// would list all properties associated with the first attribute \n\t\tvar properties = data.features[0].properties;\n\n\n\t\t//push each attribute name into attributes array\n\t\tfor (var attribute in properties)\n\t\t{\n\t\t\tif(attribute.indexOf(ABREVIATION) > -1)\n\t\t\t{\n\t\t\t\tattributes.push(attribute);\n\t\t\t\t//console.log(attribute);\n\t\t\t}\n\t\t}\n\t\treturn attributes;\n\t}", "title": "" }, { "docid": "6852cbab0be2977e9eb73fe46d99d63e", "score": "0.51583624", "text": "function getTagsData(node,tag) {\n var tags = (node.tree.filter(e => e.tag ===tag) || []);\n return tags.map(t=>t.data);\n}", "title": "" }, { "docid": "176d93b81b248cac71cad0de1c51a415", "score": "0.5150338", "text": "get data() { return this._data.value; }", "title": "" }, { "docid": "b84db2250da10548ade071e6802fa737", "score": "0.5135939", "text": "function getAttributes() {\n return ATTRS;\n}", "title": "" }, { "docid": "99de90a0d247a6eba5e8f0d5d4cf13dc", "score": "0.51341534", "text": "function getRaw(node){\n let text = '';\n text += node.name;\n _.each(node.attribs, (value, key) => {\n if (value.length === 0) {\n text += ' ' + key;\n } else {\n text += ' ' +key + '=\"' + value + '\"';\n }\n });\n return text;\n }", "title": "" }, { "docid": "446ca6fafcfdddc755d0a5e1693b464a", "score": "0.5121242", "text": "function index_data(node)\n {\n if (node.id) {\n indexbyid[node.id] = node;\n }\n for (var c=0; node.children && c < node.children.length; c++) {\n index_data(node.children[c]);\n }\n }", "title": "" }, { "docid": "a03f93dad5191f4b4a7509ec5e0f7e6a", "score": "0.51164377", "text": "readAttributes() {\n this._previousValueState.state = this.getAttribute('value-state')\n ? this.getAttribute('value-state')\n : 'None';\n\n // save the original attribute for later usages, we do this, because some components reflect\n Object.keys(this._privilegedAttributes).forEach(attr => {\n this._privilegedAttributes[attr] = this.getAttribute(attr);\n });\n }", "title": "" } ]
9339bf92d21568aa9d218824489e6ade
PARCEL Create table element to put data from db Do action (edit, delete) on data in table
[ { "docid": "4b2667a84ac2afa3ccb8c342fc33abdc", "score": "0.5496259", "text": "function insertContentParcel(parcel) {\r\n \t$.each(parcel, function(){\r\n \t\tvar tr = $('<tr>'),\r\n\t\t\t\ttdId = $('<td>', {class: \"id\"}),\r\n\t\t\t\ttdAddress = $('<td>', {class: \"address\"}),\r\n\t\t\t\ttdName = $('<td>', {class: \"name\"}),\r\n\t\t\t\ttdSize = $('<td>', {class: \"size\"}),\r\n\t\t\t\ttdPrice = $('<td>', {class: \"price\"}),\r\n\t\t\t\ttdAction = $('<td>', {class: \"action\"}),\r\n\t\t\t\t// addressName = $('<p>', {class: \"address_p\"}),\r\n\t\t\t\tactionDelete = $('<button>', {class: \"delete-btn\"}).text('Usuń'),\r\n\t\t\t\tactionEdit = $('<button>', {class: \"edit-btn\"}).text('Edytuj'),\r\n\t\t\t\tactionForm = $('<form>', {class: \"edit-form hide\"}),\r\n\t\t\t\tinputAddress = $('<input>', {name: \"address\", id: \"address\"}),\r\n\t\t\t\tinputName = $('<input>', {name: \"name\", id: \"name\"}),\r\n\t\t\t\tinputSize = $('<input>', {name: \"size\", id: \"size\"}),\r\n\t\t\t\tinputPrice = $('<input>', {name: \"price\", id: \"price\"}),\r\n\t\t\t\tinputSubmit = $('<input>', {type: \"submit\"});\r\n\r\n\t\t\t// Create table element\r\n\t\t\ttr.append(tdId);\r\n\t\t\ttr.append(tdAddress);\r\n\t\t\ttr.append(tdName);\r\n\t\t\ttr.append(tdSize);\r\n\t\t\ttr.append(tdPrice);\r\n\t\t\ttr.append(tdAction);\r\n\t\t\ttdAction.append(actionDelete);\r\n\t\t\ttdAction.append(actionEdit);\r\n\t\t\ttdAction.append(actionForm);\r\n\t\t\tactionForm.append(inputAddress);\r\n\t\t\tactionForm.append(inputName);\r\n\t\t\tactionForm.append(inputSize);\r\n\t\t\tactionForm.append(inputPrice);\r\n\t\t\tactionForm.append(inputSubmit);\r\n\t\t\tviewParcel.append(tr);\r\n\r\n\t\t\t// Insert proper address\r\n\t\t function insertAddress(address) {\r\n\t\t \t$.each(address, function() {\r\n\t\t \t\ttdAddress.text(address.city + ' ' + address.code + ', ' + address.street + ' ' + address.flat);\r\n\t\t \t})\r\n\t\t }\r\n\r\n\t\t\tvar addressId = this.address_id;\r\n\t\t\tvar url = '../../router.php/address/';\r\n\r\n\t\t\t// Show data from database ADDRESS in table\r\n\t\t\t$.ajax({\r\n\t\t\t\ttype: 'GET',\r\n\t\t\t\turl: url + addressId,\r\n\t\t\t\tcontentType: 'application/json',\r\n\t\t\t\tdataType: 'json',\r\n\t\t\t\tsuccess: function(response){\r\n\t\t\t\t\tconsole.log(response);\r\n\t\t\t\t\tinsertAddress(response);\r\n\t\t\t\t},\r\n\t\t\t error: function(error) {\r\n\t \talert( \"Wystąpił błąd\");\r\n\t \tconsole.log(error);\r\n\t }\r\n\t\t\t})\r\n\r\n\t\t\t// Insert proper name\r\n\t\t\tfunction insertName(user) {\r\n\t\t \t$.each(user, function() {\r\n\t\t \t\ttdName.text(user.name + ' ' + user.surname);\r\n\t\t \t})\r\n\t\t }\r\n\r\n\t\t\tvar userId = this.user_id;\r\n\t\t\tvar url = '../../router.php/user/';\r\n\r\n\t\t\t// Show data from database USER in table\r\n\t\t\t$.ajax({\r\n\t\t\t\ttype: 'GET',\r\n\t\t\t\turl: url + userId,\r\n\t\t\t\tcontentType: 'application/json',\r\n\t\t\t\tdataType: 'json',\r\n\t\t\t\tsuccess: function(response){\r\n\t\t\t\t\tinsertName(response);\r\n\t\t\t\t},\r\n\t\t\t error: function(error) {\r\n\t \talert( \"Wystąpił błąd\");\r\n\t \tconsole.log(error);\r\n\t }\r\n\t\t\t})\r\n\r\n\t\t\t// Insert proper size and price\r\n\t\t\tfunction insertSize(size) {\r\n\t\t \t$.each(size, function() {\r\n\t\t \t\ttdSize.text(size.size);\r\n\t\t \t\ttdPrice.text(size.price);\r\n\t\t \t})\r\n\t\t }\r\n\r\n\t\t\tvar sizeId = this.size_id;\r\n\t\t\tvar url = '../../router.php/size/';\r\n\r\n\t\t\t// Show data from database SIZE in table\r\n\t\t\t$.ajax({\r\n\t\t\t\ttype: 'GET',\r\n\t\t\t\turl: url + sizeId,\r\n\t\t\t\tcontentType: 'application/json',\r\n\t\t\t\tdataType: 'json',\r\n\t\t\t\tsuccess: function(response){\r\n\t\t\t\t\tinsertSize(response);\r\n\t\t\t\t},\r\n\t\t\t error: function(error) {\r\n\t \talert( \"Wystąpił błąd\");\r\n\t \tconsole.log(error);\r\n\t }\r\n\t\t\t})\r\n\t\t\ttdId.text(this.id);\r\n \t})\r\n \t// Edit PARCEL data \r\n \t// Doesn't work properly\r\n \tviewParcel.on('click', '.edit-btn', function(){\r\n\t\t\r\n\t\t\tvar editForm = $(this).next('form');\r\n\t\t\tvar edit = $(this).next('form').find('input[type=submit]');\r\n\r\n\t\t\teditForm.toggleClass('hide');\r\n\r\n\t\t\tvar id = $(this).parent().parent().find('td[class=id]').text();\r\n\t\t\tvar addressValue = $(this).parent().parent().find('td[class=address]').text();\r\n\t\t\tvar nameValue = $(this).parent().parent().find('td[class=name]').text();\r\n\t\t\tvar sizeValue = $(this).parent().parent().find('td[class=size]').text();\r\n\t\t\tvar priceValue = $(this).parent().parent().find('td[class=price]').text();\r\n\t\t\t\r\n\t\t\teditForm.children('input[name=address]').val(addressValue);\r\n\t\t\teditForm.children('input[name=name]').val(nameValue);\r\n\t\t\teditForm.children('input[name=size]').val(sizeValue);\r\n\t\t\teditForm.children('input[name=price]').val(priceValue);\r\n\t\t\t\r\n\t\t\tedit.on('click', function(e){\r\n\t\t\t\te.preventDefault();\r\n\r\n\t\t\t\tvar address = $(this).siblings('#address').val();\r\n\t\t\t\tvar name = $(this).siblings('#name').val();\r\n\t\t\t\tvar size = $(this).siblings('#size').val();\r\n\t\t\t\tvar price = $(this).siblings('#price').val();\r\n\r\n\t\t\t\t$.ajax({\r\n\t type: \"PUT\",\r\n\t url: '../../router.php/parcel',\r\n\t // contentType: \"application/json\",\r\n\t data: {\r\n\t \tid: id,\r\n\t\t\t\t\t\taddress_id: address,\r\n\t\t\t\t\t\tname: name,\r\n\t\t\t\t\t\tsize: size,\r\n\t\t\t\t\t\tprice: price,\r\n\r\n\t },\r\n\t success: function(response) {\r\n\t console.log(response);\r\n\t alert('Dane zostaną zaktualizowane');\r\n\t location.reload();\r\n\t },\r\n\t error: function(error) {\r\n \t\talert( \"Wystąpił błąd\");\r\n \t\tconsole.log(error);\r\n \t\t}\r\n\t });\r\n\t\t\t})\r\n\t\t})\r\n\r\n\t\t// Delete PARCEL data\r\n\t\tviewParcel.on('click', '.delete-btn', function(e){\r\n\t\t\te.preventDefault();\r\n\t\t\r\n\t\t\tvar id = $(this).parent().parent().find('td[class=id]').text();\r\n\t\t\t\r\n\t\t\t$.ajax({\r\n type: \"DELETE\",\r\n url: '../../router.php/parcel/',\r\n // contentType: \"application/json\",\r\n data: {\r\n id: id\r\n },\r\n success: function(response) {\r\n console.log(response);\r\n location.reload();\r\n alert('Użytkownik zostanie usunięty');\r\n } \r\n });\r\n\t \r\n\t\t})\r\n }", "title": "" } ]
[ { "docid": "154c8a106ebf949e5242c5c1ebd36c3e", "score": "0.6758562", "text": "function insertNewRecord(data) {\r\n var table = document.getElementById(\"tabela\").getElementsByTagName('tbody')[0];\r\n var newRow = table.insertRow(table.length);\r\n cell1 = newRow.insertCell(0);\r\n cell1.innerHTML = data.nome;\r\n cell2 = newRow.insertCell(1);\r\n cell2.innerHTML = data.devs;\r\n cell3 = newRow.insertCell(2);\r\n cell3.innerHTML = data.tecs;\r\n cell4 = newRow.insertCell(3);\r\n cell4.innerHTML = data.days;\r\n cell5 = newRow.insertCell(4);\r\n cell5.innerHTML = data.valor;\r\n cell6 = newRow.insertCell(5);\r\n cell6.innerHTML = `<a onClick=\"onEdit(this)\">Edit</a> \r\n <a onClick=\"onDelete(this)\">Delete</a>`; // aqui os botoes de editar e excluir chamando suas respectivas funções.\r\n}", "title": "" }, { "docid": "e8269a3a27f8bb9f087cfb1429dcdccf", "score": "0.646136", "text": "function settable(title,fullName,mobile,address,emargancymobile,emargancyperson)\n{\n t.row.add( [\n title,\n fullName,\n mobile,\n address,\n emargancyperson,\n emargancymobile\n ] ).draw( false );\n \n\n}", "title": "" }, { "docid": "4fd62a5c9ede93de748a8d0ee4170e52", "score": "0.6385649", "text": "function intializeTableCRUD() {\n //Setup: Delete row Function\n delete_row();\n\n //Setup: Add row Function\n add_row();\n}", "title": "" }, { "docid": "afad62c2a606b32e723ec5a367ff9243", "score": "0.6194546", "text": "function drawTable() {\r\n\tlet count = 1;\r\n\t// clears existing data\r\n\tclearTable();\r\n\t// Starts the transaction to read the data in the objectStore \"employee\"\r\n\tvar objectStore = db.transaction(\"employee\").objectStore(\"employee\");\r\n\t// opens a cursor to read each entry in the object store\r\n\tobjectStore.openCursor().onsuccess = function(event) {\r\n\t\tvar cursor = event.target.result;\r\n\t\tif (cursor) {\r\n\t\t\t// find the table html element\r\n\t\t\tvar tableDb = document.getElementById(\"tableData\");\r\n\t\t\t// create a new row starting from the top (<tr>)\r\n\t\t\tvar row = tableDb.insertRow(count);\r\n\t\t\t// create cells for each row (<td>)\r\n\t\t\tvar cell1 = row.insertCell(0);\r\n\t\t\tvar cell2 = row.insertCell(1);\r\n\t\t\tvar cell3 = row.insertCell(2);\r\n\t\t\tvar cell4 = row.insertCell(3);\r\n\t\t\t// add text to the new cells\r\n\t\t\tcell1.innerHTML = cursor.key;\r\n\t\t\tcell2.innerHTML = cursor.value.name;\r\n\t\t\tcell3.innerHTML = cursor.value.age;\r\n\t\t\tcell4.innerHTML = cursor.value.email;\r\n\t\t\t// increment count for the next row\t\t\r\n\t\t\tcount++;\r\n\t\t\tcursor.continue();\r\n\t\t}\r\n\t};\r\n}", "title": "" }, { "docid": "2ec150bebbd11214e76729c5200139ce", "score": "0.6178036", "text": "function ad_genTableEntry(_tableInfo, _array, _action, _tableId, _item, _path) {\n console.log('ad_genTableEntry: ');\n\n // Loop thru array of object's data creating cell for entry each\n for (let element of _array) {\n let row = _tableInfo.insertRow();\n // Optionaly create ACTION cell\n if (_action != null && _action != \"\") {\n // add a button control.\n var button = document.createElement('input');\n\n // set the attributes.\n button.setAttribute('type', 'button');\n button.setAttribute('value', 'Delete');\n\n // add button's \"onclick\" event. \n button.addEventListener(\"click\", function() {\n ad_dbDelRec(_tableId, this, _item, _path);\n });\n let cell = row.insertCell();\n cell.appendChild(button);\n }\n\n for (key in element) {\n let cell = row.insertCell();\n let text = document.createTextNode(element[key]);\n cell.appendChild(text);\n }\n }\n}", "title": "" }, { "docid": "5a0e380610c7787c6cdc5ffcced4338b", "score": "0.6154698", "text": "function createTableObject(param) {\n\tvar args = {};\n\tvar IsGrid = (param.objType==\"GRID\")? true : false;\n\t\n //==== Clear Object\n if (param.clear) {\n args = { target: [{ type: param.objType, id: param.objId}] };\n gw_com_module.objClear(args);\n }\n\n //==== Create Object : readonly 일 경우는 editable을 undefined로 설정한다\n //editable: (param.readonly) ? undefined : { multi: true, bind: \"select\", focus: \"input_val1\", validate: true },\n if (param.objId == \"grdData_Sub\") {\n // Check Input Code\n var sInputCode = param.clear ? gw_com_api.getValue(\"frmData_Main\", 1, \"input_cd\", false)\n : v_global.logic.input_cd;\n\n // Get dynamic column's definition\n var sColName, sColTitle, sColEdit, sColRspan = \"0\";\n var dynaCols = [];\tvar Cols = [];\n\n // 동적 Columns 정의\n for ( var i = 1; i <= gw_com_api.getRowCount(\"grdData_Temp1\"); i++ ) {\n var RowData = gw_com_api.getRowData( \"grdData_Temp1\", i );\n var nColSize = gw_com_api.getValue(\"grdData_Temp1\", i, \"col_size\", true);\n var sInputType = gw_com_api.getValue(\"grdData_Temp1\", i, \"input_tp\", true);\n var sEditCode = gw_com_api.getValue(\"grdData_Temp1\", i, \"code_nm\", true);\n var sEditYn = gw_com_api.getValue( \"grdData_Temp1\", i, \"edit_yn\", true );\n var sRowSpan = gw_com_api.getValue( \"grdData_Temp1\", i, \"rspan_yn\", true );\n var sAlign = \"cneter\"; //gw_com_api.getValue( \"grdData_Temp1\", i, \"col_align\", true );\n \n var tempCol = {\n header: gw_com_api.getValue(\"grdData_Temp1\", i, \"col_title\", true), \n name: gw_com_api.getValue(\"grdData_Temp1\", i, \"col_nm\", true), \n width: nColSize * 10, align: sAlign\n };\n \n if (sInputType == \"select\") {\n \ttempCol.format = { type: \"select\", data: { memory: sEditCode} };\n \ttempCol.editable = { type: sInputType, readonly: (sEditYn==\"1\")? false : true\n \t\t\t\t\t, data: { memory: sEditCode, unshift: [ { title: \"-\", value: \"\" } ] } };\n }\n else if (sInputType == \"file\") {\n\t\t\t\ttempCol.editable = { type: \"text\", readonly: true };\n }\n else if (sInputType == \"button\") {\n \ttempCol.format = { type: \"link\", value: \"다운로드\" };\n }\n else {\n\t\t\t\ttempCol.editable = { type: sInputType, readonly: (sEditYn==\"1\")? false : true };\n \t}\t\n dynaCols.push( tempCol );\n }\n\n \tvar checkCols = [\n\t\t\t{ header: \"Action\", name: \"input_val1\", width: 220, align: \"left\" },\n { header: \"Description\", name: \"input_val2\", width: 440, align: \"left\" },\n { header: \"Check\", name: \"input_val3\", width: 120, align: \"center\",\n format: { type: \"select\", data: { memory: \"InputCheck\"} },\n editable: { type: \"select\", data: { memory: \"InputCheck\", unshift: [ { title: \"-\", value: \"\" } ] } }\n }\n \t];\n \t// 동적 Columns 추가\n if (sInputCode == \"CHECK\")\n \tfor (var i = 0; i < checkCols.length; i++) Cols.push( checkCols[i] );\n else if(sInputCode > \" \")\n for (var i = 0; i < dynaCols.length; i++) Cols.push( dynaCols[i] );\n else\n for (var i = 0; i < checkCols.length; i++) Cols.push( checkCols[i] );\n\t\t\n\t\t// 뒤쪽 고정 컬럼 추가\n var lastCols = [\n { header: \"점검자\", name: \"input_user_nm\", width: 100, align: \"center\"\n , mask: \"search\", display: false,\n\t editable: { type: \"text\", validate: { rule: \"required\"} }\n },\n { header: \"점검일자\", name: \"input_dt\", width: 100, align: \"center\"\n , mask: \"date-ymd\",\n editable: { type: \"text\", validate: { rule: \"required\"} }\n },\n\t { header: \"비고\", name: \"input_val6\", width: 400, align: \"left\",\n\t editable: { type: \"text\" }\n\t },\n { name: \"ord_no\", hidden: true, editable: { type: \"hidden\"} },\n { name: \"work_group\", hidden: true, editable: { type: \"hidden\"} },\n { name: \"work_cd\", hidden: true, editable: { type: \"hidden\"} },\n { name: \"input_user\", hidden: true, editable: { type: \"hidden\"} },\n { name: \"check_seq\", hidden: true, editable: { type: \"hidden\" } }\n \t];\n \tfor (var i = 0; i < lastCols.length; i++) Cols.push( lastCols[i] );\n\n\t\t// recreate Grid\n args = { targetid: \"grdData_Sub\", query: \"w_mrp3220_S\", title: \"Check Sheet\",\n caption: true, height: \"100%\", pager: false, show: false, selectable: true, number: true,\n editable: (param.readonly) ? undefined : { multi: true, bind: \"select\", focus: \"input_val1\", validate: true },\n element: Cols\n };\n gw_com_module.gridCreate(args);\n\t}\n\telse if (param.objId == \"frmData_D2\"){\n\t}\n\telse { return; }\n\t\n //==== Set Events\n if (!param.readonly) {\n args = { targetid: param.objId, event: \"itemdblclick\", handler: eventItemDblClick, grid: IsGrid };\n gw_com_module.eventBind(args);\n args = { targetid: param.objId, event: \"itemkeyenter\", handler: eventItemDblClick, grid: IsGrid };\n gw_com_module.eventBind(args);\n args = { targetid: param.objId, event: \"itemchanged\", handler: eventItemChanged, grid: IsGrid };\n gw_com_module.eventBind(args);\n }\n\t//==== Resize Object & Form\n //if (param.clear) {\n\t args = { target: [ { type: param.objType, id: param.objId, offset: 8 } ] };\n gw_com_module.objResize(args);\n //gw_com_module.informSize();\n //}\n}", "title": "" }, { "docid": "de19cded04079d9451d831fc2ff1d984", "score": "0.611538", "text": "function generateTable(tdata) {\n // Get the table.\n let table = document.getElementById(tdata.tableID);\n\n // Add a table header and populate it with the column headers\n let thead = document.createElement(\"thead\");\n let tr = document.createElement(\"tr\");\n for (let headerText of tdata.columnData.headerText) {\n let td = document.createElement(\"td\");\n let headerTextNode = document.createTextNode(headerText);\n td.appendChild(headerTextNode);\n tr.appendChild(td);\n }\n thead.appendChild(tr);\n table.appendChild(thead);\n\n // Add the table body and populate all the rows\n let tbody = document.createElement(\"tbody\");\n for (let [rowIdx, obj] of tdata.tableElementObjects.entries()) {\n // Construct the row based on the type it is\n let fields = tdata.columnData.fieldName;\n let tr = document.createElement(\"tr\");\n for (let [colIdx, type] of tdata.columnData.columnType.entries()) {\n let field = fields[colIdx];\n let cellData = obj[field];\n let td = document.createElement(\"td\");\n if (type == columnTypeEnum.text) {\n let textNode = document.createTextNode(cellData);\n td.appendChild(textNode);\n // implement text option\n } else if (type == columnTypeEnum.editFormLink || type == columnTypeEnum.viewDetailLink) {\n let imgLink = type == columnTypeEnum.editFormLink ? \"./css/images/pencil.png\" : \"./css/images/view.png\";\n let a = document.createElement(\"a\");\n a.href = cellData;\n a.title = \"Edit Row\";\n let img = document.createElement(\"img\");\n img.border = 0;\n img.alt = \"edit\";\n img.src = imgLink;\n img.width = 24;\n img.height = 24;\n a.appendChild(img);\n td.appendChild(a);\n } else if (type == columnTypeEnum.checkboxFunc) {\n let input = document.createElement(\"input\");\n input.type = \"checkbox\";\n input.setAttribute(\"onchange\", \"\" + cellData + \"(this, \" + rowIdx + \", \" + JSON.stringify(obj).replace(/\"/g, \"'\") + \")\");\n if (typeof tdata.checkedDecisionFunc != 'undefined') {\n input.checked = tdata.checkedDecisionFunc(obj)\n }\n td.appendChild(input);\n } else {\n console.error(\"Unknown column type in generateTable: \" + type);\n }\n tr.appendChild(td);\n }\n tbody.appendChild(tr);\n }\n table.appendChild(tbody);\n}", "title": "" }, { "docid": "2119f240731ec6b24ceb1aaf1a908db8", "score": "0.6093879", "text": "async save (object){\n await this.table.row.add(object).draw();\n }", "title": "" }, { "docid": "ab5d4ae4561047115babe39f41bffbc0", "score": "0.5990144", "text": "function setupTable() {}", "title": "" }, { "docid": "a6d7c537df69b20d9617d4afc749e252", "score": "0.597847", "text": "function CreateTblRow(tblName, field_setting, data_dict) {\n //console.log(\"========= CreateTblRow =========\", tblName);\n //console.log(\"data_dict\", data_dict);\n\n const field_names = field_setting.field_names;\n const field_tag = \"div\";\n const field_align = field_setting.field_align;\n const field_width = field_setting.field_width;\n const column_count = field_names.length;\n\n// --- lookup index where this row must be inserted\n const ob1 = (data_dict.examyear_code) ? data_dict.examyear_code.toString() : \"\";\n\n const row_index = b_recursive_tblRow_lookup(tblBody_datatable, setting_dict.user_lang, ob1, null, null, true);\n\n// --- insert tblRow into tblBody at row_index\n const tblRow = tblBody_datatable.insertRow(row_index);\n tblRow.id = data_dict.mapid\n\n// --- add data attributes to tblRow\n tblRow.setAttribute(\"data-pk\", data_dict.id);\n\n// --- add data-sortby attribute to tblRow, for ordering new rows\n tblRow.setAttribute(\"data-ob1\", ob1);\n\n// --- add EventListener to tblRow\n tblRow.addEventListener(\"click\", function() {HandleTblRowClicked(tblRow)}, false);\n\n// +++ insert td's into tblRow\n for (let j = 0; j < column_count; j++) {\n const field_name = field_names[j];\n const class_width = \"tw_\" + field_width[j];\n const class_align = \"ta_\" + field_align[j];\n // --- insert td element,\n const td = tblRow.insertCell(-1);\n\n // --- create element with tag from field_tags\n const el = document.createElement(field_tag);\n\n // --- add data-field attribute\n el.setAttribute(\"data-field\", field_name);\n\n // --- add text_align\n el.classList.add(class_width, class_align);\n\n // --- append element\n td.appendChild(el);\n\n // --- add EventListener to td\n if (j){ // skip first column (margin to select without opening mod)\n if (field_name === \"examyear_code\"){\n td.addEventListener(\"click\", function() {MODEY_Open(td)}, false);\n td.classList.add(\"pointer_show\");\n add_hover(td);\n };\n };\n// --- put value in field\n UpdateField(el, data_dict)\n };\n\n return tblRow\n }", "title": "" }, { "docid": "701cf36e4868265d3118aaf1d7c13ca6", "score": "0.594934", "text": "function settable(sheduleID,doctorName, date,appointmentNumbers, nurse, room)\n{\n t.row.add( [\n sheduleID,\n doctorName,\n date,\n appointmentNumbers,\n nurse,\n room\n \n ] ).draw( false );\n \n\n}", "title": "" }, { "docid": "03494693c4f734aebd6d1c8eb9523fc8", "score": "0.5941222", "text": "updateTable(data) {\n this.tableObj.rows.add(data);\n }", "title": "" }, { "docid": "4544cbc976e40bdf77e2f9c7c66490ac", "score": "0.59267515", "text": "function addTableEntry(jsonData) {\n const tableBody = document.getElementById(\"taskBody\");\n let row = tableBody.insertRow(-1);\n row.id = jsonData[\"_id\"];\n\n let cell0 = row.insertCell(0);\n cell0.className = \"priority\";\n cell0.innerHTML = jsonData.priority + \"<button title=\\\"Edit\\\" class=\\\"edit\\\">Edit</button>\";\n\n let cell1 = row.insertCell(1);\n cell1.className = \"class\";\n cell1.innerHTML = jsonData.class + \"<button title=\\\"Edit\\\" class=\\\"edit\\\">Edit</button>\";\n\n let cell2 = row.insertCell(2);\n cell2.className = \"taskname\";\n cell2.innerHTML = jsonData.taskname + \"<button title=\\\"Edit\\\" class=\\\"edit\\\">Edit</button>\";\n\n let cell3 = row.insertCell(3);\n cell3.className = \"hours\";\n cell3.innerHTML = jsonData.hours + \"<button title=\\\"Edit\\\" class=\\\"edit\\\">Edit</button>\";\n\n row.insertCell(4).innerHTML = \"<button title=\\\"Delete\\\" class=\\\"delete\\\">Delete</button>\";\n}", "title": "" }, { "docid": "5a2441b102e142843a50f4285064d6e7", "score": "0.5924647", "text": "function setup_editable_columns ()\n {\n\n // set up table\n client.get_model(\n {\n mid: mid,\n success: function (result)\n {\n\n // check for editable columns\n if ('artifact:dac-editable-columns' in result)\n {\n\n // load editable columns\n client.get_model_parameter({\n mid: mid,\n aid: \"dac-editable-columns\",\n success: function (result)\n {\n // initialize table with editable columns\n editable_columns = result;\n\n // bookmark editable columns\n bookmarker.updateState ({\"dac-editable-cols-attributes\": editable_columns[\"attributes\"],\n \"dac-editable-cols-categories\": editable_columns[\"categories\"]});\n\n // setup PCA flag\n setup_PCA_comps();\n\n\n },\n error: function () {\n\n // notify user that editable columns exist, but could not be loaded\n dialog.ajax_error('Server error: could not load editable column data.')\n (\"\",\"\",\"\")\n\n // setup PCA flag\n setup_PCA_comps();\n }\n });\n\n } else {\n\n // check for existing bookmark (template)\n var ec_attributes = [];\n var ec_categories = [];\n\n if (\"dac-editable-cols-attributes\" in bookmark)\n {\n\n ec_attributes = bookmark[\"dac-editable-cols-attributes\"];\n ec_categories = bookmark[\"dac-editable-cols-categories\"];\n\n // found non-empty bookmark\n if (ec_attributes.length > 0) {\n\n // get data table meta info\n $.when(request.get_table_metadata(\"dac-datapoints-meta\", mid)).then(\n function (data_table_meta) {\n\n // create new columns from bookmark\n editable_columns[\"num_rows\"] = data_table_meta[\"row-count\"];\n editable_columns[\"attributes\"] = ec_attributes;\n editable_columns[\"categories\"] = ec_categories;\n\n // create empty data\n for (var i = 0; i < editable_columns[\"attributes\"].length; i++) {\n\n // create column\n var col = [];\n for (var j = 0; j < editable_columns[\"num_rows\"]; j++) {\n\n if (editable_columns[\"attributes\"][i].type == \"freetext\") {\n\n // freetext column\n col.push(\"\");\n\n } else {\n\n // categorical column\n col.push(\"No Value\");\n }\n }\n\n // add column to data\n editable_columns[\"data\"].push(col);\n }\n\n // push new columns to server\n client.put_model_parameter ({\n mid: mid,\n aid: \"dac-editable-columns\",\n value: editable_columns,\n success: function () {\n\n // initialize table with templated editable columns\n\n // setup PCA flag\n setup_PCA_comps();\n\n },\n error: function () {\n\n dialog.ajax_error(\"Error creating templated columns.\")(\"\",\"\",\"\");\n\n // initialize table with empty editable columns\n editable_columns = {num_rows: 0,\n attributes: [],\n categories: [],\n data: []};\n\n // setup PCA flag\n setup_PCA_comps();\n\n },\n })},\n function() {\n\n dialog.ajax_error(\"Error creating templated columns.\")(\"\",\"\",\"\");\n\n // initialize table with empty editable columns\n editable_columns = {num_rows: 0,\n attributes: [],\n categories: [],\n data: []};\n\n // setup PCA flag\n setup_PCA_comps();\n });\n\n } else {\n\n // initialize table with no editable columns\n\n // setup PCA flag\n setup_PCA_comps();\n\n }\n\n } else {\n\n // initialize table with no editable columns\n\n // setup PCA flag\n setup_PCA_comps();\n }\n }\n }\n });\n\n }", "title": "" }, { "docid": "4adc43d026c9e2193625bfeab5ecddd5", "score": "0.5920691", "text": "function insertHTMLtable(){\r\n\t//Génération du code source du tableau\r\n\turlTemplate = fileInfos['templatesURL'] + \"parts/t_table.html\";\r\n\tgetAJAX(urlTemplate, (function(sourceTable){\r\n\t\t//Ajout du template\r\n\t\taddTextToCurrentSelection(sourceTable);\r\n\t}));\r\n}", "title": "" }, { "docid": "844351bb3c7008f0b63355fb21c18475", "score": "0.5890867", "text": "function createTable(data) {\n removeTable();\n table.querySelectorAll('td:last-child').forEach(element => element.innerText = data[element.id]);\n form.insertAdjacentElement('afterEnd', table);\n}", "title": "" }, { "docid": "f4edebad7980695e5448d1b8a5d319d6", "score": "0.5889962", "text": "function populateDB(tx) {\n tx.executeSql('DROP TABLE IF EXISTS DEMO');\n tx.executeSql('CREATE TABLE IF NOT EXISTS DEMO (id unique, data)');\n tx.executeSql('INSERT INTO DEMO (id, data) VALUES (1, \"First row\")');\n tx.executeSql('INSERT INTO DEMO (id, data) VALUES (2, \"Second row\")');\n }", "title": "" }, { "docid": "f4edebad7980695e5448d1b8a5d319d6", "score": "0.5889962", "text": "function populateDB(tx) {\n tx.executeSql('DROP TABLE IF EXISTS DEMO');\n tx.executeSql('CREATE TABLE IF NOT EXISTS DEMO (id unique, data)');\n tx.executeSql('INSERT INTO DEMO (id, data) VALUES (1, \"First row\")');\n tx.executeSql('INSERT INTO DEMO (id, data) VALUES (2, \"Second row\")');\n }", "title": "" }, { "docid": "55969247faf27a66eb497d8f1d5bfd88", "score": "0.586323", "text": "function listAll() {\r\n\tvar t=new Table\r\n connection.query('SELECT * FROM products', function (error, results, fields) {\r\n if (error) throw error;\r\n//console.log(results)\r\nresults.forEach ((RowDataPacket)=>{\r\nt.cell('ID',RowDataPacket.id);\r\nt.cell('Product',RowDataPacket.name);\r\nt.cell('Description',RowDataPacket.description);\r\nt.cell('Price',RowDataPacket.price);\r\nt.cell('Category', RowDataPacket.category);\r\nt.cell('Quantity On Hand',RowDataPacket.quantity_on_hand);\r\nt.newRow();\r\n})\r\nconsole.log(t.toString());\r\n});\r\n connection.end();\r\n //mainMenu();\r\n}", "title": "" }, { "docid": "738a404770b665014c77bf73bf7584e7", "score": "0.58632004", "text": "function createTable(data){\n tableData=data;\n table = new Tabulator(\"#example-table\", {\n addRowPos:\"top\", //when adding a new row, add it to the top of the table\n pagination:\"local\", //paginate the data\n paginationSize:5, //allow 7 rows per page of data\n movableColumns:true, //allow column order to be changed\n resizableRows:true, //allow row order to be changed\n height:208, // set height of table (in CSS or here), this enables the Virtual DOM and improves render speed dramatically (can be any valid css height value)\n data:tableData, //assign data to table\n layout:\"fitColumns\", //fit columns to width of table (optional)\n columns:[ //Define Table Columns\n {title:\"Name\", field:\"name\", align:\"center\"},\n {title:\"Start Date\", field:\"start\", sorter:\"date\" , align:\"center\"},\n {title:\"Due Date\", field:\"end\", sorter:\"date\" , align:\"center\"},\n ]\n });\n }", "title": "" }, { "docid": "16ba94767955353ddf382a4c3a6dbf99", "score": "0.5863089", "text": "function CWM_ELP_WTUA_DPL_XXX_editColumnOnASIT(pCapId,pTableName,pColName,pColValue){\r\n var vTname = pTableName;//\"EMPLOYEE INFORMATION\";\r\n var vLoadTable = loadASITable(vTname,pCapId);\r\n logDebug(\"Employee Information Rows: \" + vTname.length);\r\n for (var i = 0; i < vLoadTable.length; i++) {\r\n editASITableRow(vLoadTable, pCapId, vTname, pColName, pColValue,i);\r\n }\r\n}", "title": "" }, { "docid": "6ce9301be39dfed30a2214de328a91ef", "score": "0.58481175", "text": "function addNewRow( event, dataObject ) \n{\n let newCell, newchild;\n let rowCount = tableRef.rows.length;\n \n // Insert a row in the table\n var newRow = tableRef.insertRow(rowCount);\n\n // cell 0: button delete row\n deleteCell = newRow.insertCell(0);\n deleteCell.appendChild( createNewElement( { \"type\" : \"dellButton\" } ));\n \n // celll 1: column option\n columnCell = newRow.insertCell(1);\n columnList = createNewElement( {\"type\" : \"columnList\", \"data\" : selectData } );\n columnCell.appendChild( columnList );\n\n // cell 2 && 3\n operatCell = newRow.insertCell(2);\n valueCell = newRow.insertCell(3);\n\n // w przypadku gdy oddtwarzam tabele z localStorage \n if (dataObject !== undefined ) \n {\n columnValue = dataObject.column;\n operatorValue = dataObject.operator;\n valueValue_1 = dataObject.value_1;\n valueValue_2 = dataObject.value_2;\n\n // cell 1: select - kolumna\n columnList.value = columnValue;\n columnCell.appendChild( columnList );\n \n // cell 2: operator list\n operatorList = createNewOperatorList(columnValue, operatorValue);\n operatCell.appendChild( operatorList );\n \n // cell 3\n createNewValueFields(valueCell, selectData[columnValue], operatorValue, valueValue_1, valueValue_2 );\n }\n}", "title": "" }, { "docid": "835213d97a3f0a76aafa5ef738d648bd", "score": "0.5842604", "text": "function createOPDtable() {\n db.transaction(\n function (tx) {\n tx.executeSql(createOPDtableStatement);\n }\n )\n}", "title": "" }, { "docid": "ba711dc2bc8a8b7007b452b406542555", "score": "0.584062", "text": "function editInfo(id) {\n let info = StorageInfo.getWithId(id);\n let row = document.getElementById(`row_${id}`);\n row.innerHTML = \"\";\n\n let select = document.createElement(\"select\");\n let option1 = document.createElement(\"option\");\n option1.value = \"Prédio 1\";\n option1.innerText = \"Prédio 1\";\n\n let option2 = document.createElement(\"option\");\n option2.value = \"Prédio 2\";\n option2.innerText = \"Prédio 2\";\n\n let option3 = document.createElement(\"option\");\n option3.value = \"Prédio 3\";\n option3.innerText = \"Prédio 3\";\n\n select.add(option1);\n select.add(option2);\n select.add(option3);\n\n select.id = `predio_${id}`;\n select.value = `${info.predio}`;\n\n row.insertCell(0).appendChild(select);\n row.insertCell(1).innerHTML = `<input type=\"text\" id=\"localTrabalho_${id}\" name=\"localTrabalho_${id} value=\"${info.localDeTrabalho}\">`;\n row.insertCell(2).innerHTML = `<i class=\"fas fa-check-circle\" onclick=\"saveEdit(${id})\"></i>\n <i class=\"fas fa-times-circle\" onclick=\"populateTable()\"></i>`;\n \n}", "title": "" }, { "docid": "774e9dea3b23ea947ca8653b4aaa635a", "score": "0.5832214", "text": "function createTable(input) { \n var row = table.insertRow(table.lastIndex);\n var name = row.insertCell(0);\n var studio = row.insertCell(1);\n var genres = row.insertCell(2);\n var hype = row.insertCell(3)\n var date = row.insertCell(4);\n name.innerHTML = input.title.text;\n studio.innerHTML = input.studio;\n genres.innerHTML = input.genres;\n hype.innerHTML = input.hype;\n date.innerHTML = input.start_date;\n }", "title": "" }, { "docid": "f294bc087ca72441947aa3c7aff39340", "score": "0.58303404", "text": "function createRowInTable(){\n\tvar instance = sovTable.handsontable('getInstance');\n\tinstance.alter('insert_row', null, 1);\n}", "title": "" }, { "docid": "ef98aa0689f7db028505996012cc2ac9", "score": "0.5826145", "text": "function add_row_updates() {\n var new_libary = document.getElementById(\"new_libary\").value;\n var new_object = document.getElementById(\"new_object\").value;\n var new_comment = document.getElementById(\"new_comment\").value;\n\n var table = document.getElementById(\"data_table\");\n var table_len = (table.rows.length) - 1;\n var row = table.insertRow(table_len).outerHTML = \"<tr id='row\" + table_len + \"'><td id='libary\" + table_len + \"'>\" + new_libary + \"</td><td id='object\" + table_len + \"'>\" + new_object + \"</td><td id='commentObj\" + table_len + \"'>\" + new_comment + \"</td><td><input type='button' id='edit_button\" + table_len + \"' value='Edit' class='edit' onclick='edit_row_Object(\" + table_len + \")'> <input type='button' id='save_button\" + table_len + \"' value='Save' class='save' onclick='save_row_Object(\" + table_len + \")'> </td></tr> \";//<input type='button' value='Delete' class='delete' onclick='delete_row_Object(\" + table_len + \")'>\n\n document.getElementById(\"new_libary\").value = \"\";\n document.getElementById(\"new_object\").value = \"\";\n document.getElementById(\"new_comment\").value = \"\";\n}", "title": "" }, { "docid": "7bfa51c366794fb627cb5107853f4666", "score": "0.5801013", "text": "function fill_table(par) {\n console.log('Paso 3 ', par);\n let largo = $('#tblExchanges tbody tr td').html();\n largo == 'Ningún dato disponible en esta tabla' ? $('#tblExchanges tbody tr').remove() : '';\n par = JSON.parse(par);\n\n let tabla = $('#tblExchanges').DataTable();\n\n tabla.row\n .add({\n editable: `<i class=\"fas fa-times-circle kill\"></i>`,\n prod_sku:`<span class=\"hide-support\" id=\"SKU-${par[0].prdSku}\"></span>${par[0].prdSku.slice(0, 10)}-${par[0].prdSku.slice(10, 13)}`,\n prodname: par[0].prdName,\n price: par[0].price,\n subprice: par[0].subprice,\n //skuserie: par[0].skuSerie, \n skuserie:'<input class=\"serie_name fieldIn\" type=\"text\" id=\"PS-\" value=\"' + par[0].noSerie + '\">',\n strtdate: par[0].startDate,\n enddate: par[0].endDate,\n store: par[0].nameStore,\n collectionTime: par[0].collectionTime,\n deliveryTime: par[0].deliveryTime,\n location: par[0].location,\n staff: par[0].staff,\n staffCtt: par[0].staffCtt,\n category: par[0].nameCategoria,\n subcategory: par[0].nameSubCategoria,\n supplier: par[0].suppliernm,\n //proyect: par[0].proyectName,\n comments: `<div>${par[0].comment}</div>`\n })\n .draw();\n\n $(`#SKU-${par[0].prdSku}`).parent().parent().attr('data-content', par[0].support);\n\n btn_apply_appears();\n\n $('.edit')\n .unbind('click')\n .on('click', function () {\n tabla.row($(this).parent('tr')).remove().draw();\n btn_apply_appears();\n });\n}", "title": "" }, { "docid": "718bdb85bafea9dec2f35a5070477a08", "score": "0.5800144", "text": "function createTable(resp, table_id){\n var table = document.getElementById(table_id);\n table.id = \"oldTable\";\n //create new table, using response data for values and replace the current table on the page\n var newTable = document.createElement('table');\n newTable.id = table_id;\n newTable.className = \"table table-bordered table-hover table-dark\";\n table.parentNode.replaceChild(newTable, table); \n document.getElementById('table_legend').innerText = \"Open Orders:\"\n //create table head with column headers\n var thead = addElement(newTable, 'thead', 'light-green');\n var th = addElement(thead, 'th', undefined, undefined, 'Order #');\n th.scope = \"col\";\n var th = addElement(thead, 'th', undefined, undefined, 'Name');\n th.scope = \"col\";\n var th = addElement(thead, 'th', undefined, undefined, 'Drug');\n th.scope = \"col\";\n var th = addElement(thead, 'th', undefined, undefined, 'Time');\n th.scope = \"col\";\n var th = addElement(thead, 'th', undefined, undefined, 'Price');\n th.scope = \"col\";\n //create table body with each row\n var tbody = addElement(newTable, 'tbody');\n for (var row of resp.results) { //create a row for each entry\n if (row.id != '') {\n var newRow = addElement(tbody, 'tr');\n //loop through each cell and label it accordingly\n var cell = addElement(newRow, 'td', undefined, undefined, row.id);\n var cell = addElement(newRow, 'td', undefined, undefined, (row.fname + \" \" + row.lname));\n var cell = addElement(newRow, 'td', undefined, undefined, row.name);\n var cell = addElement(newRow, 'td', undefined, undefined, row.time);\n var cell = addElement(newRow, 'td', undefined, undefined, row.price);\n }\n }\n}", "title": "" }, { "docid": "c4c9d5db5dde6ffa9b5df3795084d798", "score": "0.5773388", "text": "function insertTableData(list, tBody)\n{\n let row1 = tBody.insertRow(0);\n let cell1Name = row1.insertCell(0);\n let cell2Name = row1.insertCell(1);\n cell1Name.innerHTML = \"Name\";\n cell2Name.innerHTML = list.name;\n\n let row2 = tBody.insertRow(1)\n let cell3Elevation = row2.insertCell(0);\n let cell4Elevation = row2.insertCell(1);\n cell3Elevation.innerHTML = \"Elevation\";\n cell4Elevation.innerHTML = list.elevation;\n\n let row3 = tBody.insertRow(2)\n let cell5Elevation = row3.insertCell(0);\n let cell6Elevation = row3.insertCell(1);\n cell5Elevation.innerHTML = \"Effort\";\n cell6Elevation.innerHTML = list.effort;\n\n let cell4 = row.insertCell(3);\n cell4.innerHTML = list.img;\n\n let cell5 = row.insertCell(4);\n cell5.innerHTML = list.desc;\n\n let cell6 = row.insertCell(5);\n cell6.innerHTML = \"Latitude: \" + list.coords.lat + \"\\nLongitude: \" + list.coords.lng;\n}", "title": "" }, { "docid": "2194f0699cbac695cf3038355c02448a", "score": "0.5765628", "text": "function viewt(table){\n let tx=dbAccess.transaction(\"trains\",\"readonly\");\n let trainObjectStore=tx.objectStore(\"trains\");\n let req = trainObjectStore.openCursor();\n req.addEventListener(\"success\" , function(){\n let cursor = req.result;\n if(cursor){\n let tr = document.createElement(\"tr\");\n let v0 = cursor.value.v0;\n let v1 = cursor.value.v1;\n let v2 = cursor.value.v2;\n let v3 = cursor.value.v3;\n let v4 = cursor.value.v4;\n let v5 = cursor.value.v5;\n for(let i=0; i<6; i++){\n let td = document.createElement(\"td\");\n td.classList.add(\"cll1\");\n if(i == 0){\n td.innerHTML = v0;\n td.classList.add(\"inew\");\n if(td.innerText == \"Fast\"){\n td.style.background = \"red\"; \n }\n else if(td.innerText == \"Medium\"){\n td.style.background = \"orange\"; \n }\n else if(td.innerText == \"Slow\"){\n td.style.background = \"yellow\"; \n }\n }\n else if(i == 1){\n td.innerHTML = v1;\n td.classList.add(\"cllll\");\n }\n else if(i == 2){\n td.innerHTML = v2;\n }\n else if(i == 3){\n td.innerHTML = v3;\n }\n else if(i == 4){\n td.innerHTML = v4;\n }\n else if(i == 5){\n td.innerHTML = v5;\n }\n tr.appendChild(td);\n }\n table.appendChild(tr);\n //tr.setAttribute(\"class\",\"del\");\n tr.addEventListener(\"click\",function(e){\n if(tr.classList.contains(\"active\")){\n tr.classList.remove(\"active\");\n tr.style.background = \"none\";\n }\n else{\n tr.classList.add(\"active\");\n tr.style.background = \"orange\";\n }\n })\n cursor.continue();\n }\n })\n}", "title": "" }, { "docid": "91a8adf11a2ab7c8c0f64727db9ed5f2", "score": "0.5765276", "text": "function insert(obj)\r\n{\r\n var row = table.insertRow();\r\n for (key in obj)\r\n {\r\n var cell = row.insertCell();\r\n cell.innerHTML = obj[key];\r\n }\r\n \r\n}", "title": "" }, { "docid": "bb6f1a41f24a2e619b1b6eaf7a0a4e28", "score": "0.5761145", "text": "function toAddRowiteminTable(rowdata) {\n\n\n let rowitem = tableElement.insertRow(-1);\n let cell1 = rowitem.insertCell(0);\n let cell2 = rowitem.insertCell(1);\n let cell3 = rowitem.insertCell(2);\n let cell4 = rowitem.insertCell(3);\n let cell5 = rowitem.insertCell(4);\n let cell6 = rowitem.insertCell(5);\n cell1.innerHTML = rowdata.name;\n cell2.innerHTML = rowdata.bestBid;\n cell3.innerHTML = rowdata.bestAsk;\n cell4.innerHTML = rowdata.lastChangeAsk;\n cell5.innerHTML = rowdata.lastChangeBid;\n cell6.innerHTML = '<span id=\"' + rowdata.name + '\"></span>';\n\n\n getSparkElement(rowdata.name, rowdata.mid);\n\n\n}", "title": "" }, { "docid": "fc4c7f202215b5f7872a994af0a0ce57", "score": "0.5751942", "text": "function insertNewRecord(data){\r\n\tvar table = document.getElementById(\"userList\").getElementsByTagName('tbody')[0];\r\n\tvar newRow = table.insertRow(table.length);\r\n\tcell1 = newRow.insertCell(0);\r\n\tcell1.innerHTML = data.username;\r\n\tcell2 = newRow.insertCell(1);\r\n\tcell2.innerHTML = data.email;\r\n\tcell3 = newRow.insertCell(2);\r\n\tcell3.innerHTML = data.password;\r\n}", "title": "" }, { "docid": "c1bdc70d203be6ae96e50c5e87a43d45", "score": "0.57371056", "text": "function updateTable(table, data) {\n let row = table.insertRow();\n for (i in data) {\n let cell = row.insertCell();\n let cellContents = document.createTextNode(data[i]);\n cell.appendChild(cellContents);\n }\n}", "title": "" }, { "docid": "5ac7ee540ef96dad6ffd3318b5161e7c", "score": "0.5713281", "text": "MUTSETDATA(state, data) {\n // llena los campos que contiene la entidad para ser buscada puede ser rowid si es oracle\n //console.log( \"respuesta de DATA JSON \",data);\n state.DataCMS = data;\n\n }", "title": "" }, { "docid": "f80041fafa609d07bfbbabfecc96a0b7", "score": "0.5701212", "text": "function addDentistToTable(dentist) {\n var tableElement = document.getElementById('dentistTable')\n var rowElement = tableElement.insertRow(-1)\n rowElement.setAttribute('dentistId', dentist.dentistId)\n var cell1 = rowElement.insertCell(0);\n cell1.innerHTML = dentist.dentistId\n var cell2 = rowElement.insertCell(1);\n cell2.innerHTML = dentist.dentistName\n var cell3 = rowElement.insertCell(2);\n cell3.innerHTML = dentist.position\n var cell4 = rowElement.insertCell(3);\n cell4.innerHTML = dentist.regNumber\n var cell5 = rowElement.insertCell(4);\n cell5.innerHTML = '<button onclick=\"showUpdate(this)\">Update</button>'\n var cell6 = rowElement.insertCell(5);\n cell6.innerHTML = '<button class=\"delete-back\" onclick=doDelete(this)>Delete</button>'\n}", "title": "" }, { "docid": "6ec65965e6ccc2478a1f33599247c5e1", "score": "0.57009345", "text": "function NewTable(tableData) {\n // Clear existing data\n tbody.html(\"\");\n // Loop and append rows and cells \n tableData.forEach((dataRow) => {\n var row = tbody.append(\"tr\");\n Object.entries(dataRow).forEach(([key, value]) => {\n var cell = row.append(\"td\");\n cell.html(value);\n });\n });\n}", "title": "" }, { "docid": "1910d510d813cb35e5ca1b91da436d3e", "score": "0.5699611", "text": "constructor( table, data, index ) {\n\t\tthis._table = table;\n\t\tthis._data = data;\n\t\tthis._dirty = false;\n\t\tthis._index = index;\n\t}", "title": "" }, { "docid": "20780d14dbb27416bc63c97fd3329c08", "score": "0.56906354", "text": "function clickedOK()\r\n{\r\n var conn = _ConnectionName.getValue();\r\n var table = _TableName.getValue();\r\n var redirectURL = (_GoToURL.value)?_GoToURL.value:\"\";\r\n var nRows, i, currRowInfoObj, fieldInfoObj; \r\n var sqlObj = new SQLStatement(\"\");\r\n var columnInfoList = new Array(), columnInfoNode, ElementStrArr = new Array();\r\n var hiddenFieldNamesArr = new Array(), hiddenFieldValuesArr = new Array();\r\n \r\n rs = _RecordsetName.getValue();\r\n col = _UniqueKeyColumn.getValue();\r\n rowInfoArr = _ColumnNames.valueList;\r\n nRows = rowInfoArr.length;\r\n \r\n // check for error conditions\r\n var errMsgStr = \"\";\r\n if (!conn) \r\n {\r\n errMsgStr = MM.MSG_NoConnection;\r\n } \r\n else if (!table) \r\n {\r\n errMsgStr = MM.MSG_NoTables;\r\n }\r\n else if (!nRows)\r\n {\r\n errMsgStr = MM.Msg_NoColumnsInTable;\r\n } \r\n else if (!rs)\r\n {\r\n errMsgStr = MM.MSG_NoRecordset;\r\n }\r\n else if (!col) \r\n {\r\n errMsgStr = MM.MSG_NoColumn;\r\n }\r\n \r\n if (!errMsgStr) \r\n {\r\n var colList = dwscripts.getFieldNames(rs);\r\n // check that the selected column exists in the recordset\r\n var j, found=true;\r\n for (j=0, found=false; !found && j < colList.length; j++)\r\n {\r\n found = (colList[j].toLowerCase() == col.toLowerCase());\r\n } \r\n if (!found) errMsgStr = MM.MSG_NoColumnInRS;\r\n }\r\n \r\n // if error condition, alert it and return\r\n if (errMsgStr)\r\n {\r\n alert (errMsgStr);\r\n return;\r\n }\r\n \r\n // if no error conditions, build the edits to apply to the document\r\n MM.setBusyCursor();\r\n \r\n // create parameter object used to provide variables for this edit op\r\n // server behavior\r\n var paramObj = new Object(); \r\n\r\n paramObj.TableAlign = \"center\";\r\n // Get a unique form name...\r\n var formName = dwscripts.getUniqueNameForTag(\"FORM\",\"form\");\r\n paramObj.FormName = formName; \r\n \r\n var addedPrimary = false;\r\n \r\n for (i = 0; i < nRows; i++)\r\n {\r\n currRowInfoObj = rowInfoArr[i];\r\n fieldInfoObj = currRowInfoObj.displayAs; \r\n fieldInfoObj.fieldName = currRowInfoObj.fieldName;\r\n var columnName = currRowInfoObj.column;\r\n \r\n if (columnName)\r\n {\r\n columnInfoNode = dwscripts.getColumnValueNode(); // get platform specific ColumnValueNode\r\n columnInfoNode.setColumnName(columnName); \r\n columnInfoNode.setColumnType(fieldInfoObj.type); \r\n columnInfoNode.setVariableName(getVarNameFromFormField(fieldInfoObj.fieldName)); \r\n \r\n // Check if this field is the unique primary key field, if so\r\n // push another node for the primary key...\r\n if (columnName == col)\r\n {\r\n addedPrimary = true;\r\n columnInfoNode.setIsPrimaryKey(true);\r\n // Select between submit as strings for a text primary key or numeric primary key.\r\n columnInfoNode.setSubmitAs(_IsNumeric.getCheckedState() ? SUBMIT_AS_NUMERIC_KEY \r\n : SUBMIT_AS_TEXT_KEY);\r\n }\r\n else\r\n { \r\n columnInfoNode.setSubmitAs(currRowInfoObj.submitAs); \r\n } \r\n columnInfoList.push(columnInfoNode); \r\n }\r\n \r\n // handle the hidden fields\r\n if (fieldInfoObj.type == \"hiddenField\")\r\n {\r\n hiddenFieldNamesArr.push(fieldInfoObj.fieldName);\r\n hiddenFieldValuesArr.push(fieldInfoObj.value);\r\n } \r\n } \r\n \r\n // Also push the Update and Primary Key column hidden fields into the array...\r\n hiddenFieldNamesArr.push(\"MM_update\");\r\n hiddenFieldValuesArr.push(formName);\r\n \r\n // TODO: the following code is platform specific, how can we remove this?\r\n hiddenFieldNamesArr.push(col);\r\n var primaryKeyValue = \"<?php echo $row_\" + rs + \"['\" + col + \"']; ?>\";\r\n hiddenFieldValuesArr.push(primaryKeyValue);\r\n \r\n if (!addedPrimary)\r\n {\r\n // add primary key columnInfoNode\r\n columnInfoNode = dwscripts.getColumnValueNode(); // get platform specific ColumnValueNode\r\n columnInfoNode.setColumnName(col);\r\n columnInfoNode.setColumnType(\"\");\r\n columnInfoNode.setVariableName(getVarNameFromFormField(col)); \r\n columnInfoNode.setIsPrimaryKey(true);\r\n // Select between submit as strings for a text primary key or numeric primary key.\r\n columnInfoNode.setSubmitAs(_IsNumeric.getCheckedState() ? SUBMIT_AS_NUMERIC_KEY \r\n : SUBMIT_AS_TEXT_KEY);\r\n columnInfoList.push(columnInfoNode);\r\n }\r\n \r\n paramObj.HiddenFieldName = hiddenFieldNamesArr;\r\n paramObj.HiddenFieldValue = hiddenFieldValuesArr;\r\n \r\n // this will go through all the form elements and returns a string array...\r\n ElementStrArr = createFormElementStrings(rowInfoArr);\r\n \r\n paramObj.ElementString = ElementStrArr;\r\n paramObj.ButtonText = MM.BTN_UpdateRecord;\r\n \r\n paramObj.Redirect_url = redirectURL;\r\n paramObj.ConnectionName = conn;\r\n paramObj.COnnectionPath = dwscripts.getConnectionURL(conn);\r\n \r\n paramObj.RecordsetName = rs;\r\n paramObj.PrimaryKeyColumn = col; \r\n \r\n var sqlVarList = sqlObj.createUpdateStatement(table, columnInfoList); \r\n var sqlString = sqlObj.getStatement(true); // strip line breaks\r\n paramObj.SQLStatement = sqlString;\r\n paramObj.SQLVariableList = sqlVarList.join(\",\\n \");\r\n \r\n // correct the selection\r\n checkThatCursorIsNotInsideOfAForm();\r\n dwscripts.setCursorOutsideParagraph();\r\n dwscripts.fixUpSelection(dw.getDocumentDOM(), false, true);\r\n \r\n dwscripts.applyGroup(\"RecordUpdateForm\", paramObj);\r\n\r\n MM.clearBusyCursor();\r\n window.close();\r\n}", "title": "" }, { "docid": "2cd4ee88363ceecf358bbfe4470b781a", "score": "0.56864595", "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": "4c84cbc8d2fd9d22fcb97c29302646b8", "score": "0.56693435", "text": "onEditObject(i) {\n let obj = this.dataObjects[i];\n for (j = 0; j < this.parameterList.length; j++) {\n //console.log(this.parameterList[j]);\n obj[this.parameterList[j]] = document.getElementById(this.parameterList[j]).value;\n }\n //console.log(obj);\n refreshObjectTable();\n document.getElementById(\"objCreateOrEdit\").style.visibility = \"hidden\";\n }", "title": "" }, { "docid": "a632b4dea6740ad8dcdec7b75f947157", "score": "0.56612474", "text": "function createTable(table, data) {\n\t\t var tr, td, prop;\n\t\t if (!data.length) {\n\t\t\t var arr = [];\n\t\t\t arr.push(data);\n\t\t\t data = arr;\n\t\t }\n\t\t for (var i = 0, length = data.length; i < length; i++) {\n\t\t\t tr = document.createElement(\"tr\");\n\t\t\t for (prop in data[i]){\n\t\t\t\t td = document.createElement(\"td\");\n\t\t\t\t td.innerText = data[i][prop];\n\t\t\t\t tr.appendChild(td);\n\t\t\t }\n\t\t\t td = document.createElement(\"td\");\n\t\t\t td.innerHTML = '<a href=\"#\" class=\"deleteBtn\">Удалить</a> | <a href=\"#\" class=\"editBtn\">Редактировать</a>';\n tr.appendChild(td);\n\t\t\t table.appendChild(tr);\n\t\t }\n\t}", "title": "" }, { "docid": "07a87d1f6a15813222ec794fe77977b9", "score": "0.5651354", "text": "function insertTableData(list, tBody)\n{\n let row1 = tBody.insertRow(-1);\n\n let cell1Name = row1.insertCell(0);\n let cell2Address = row1.insertCell(1);\n let cell3Phone = row1.insertCell(2);\n let cell4Fax = row1.insertCell(3);\n let cell5Visit = row1.insertCell(4);\n let cell6LatLong = row1.insertCell(5);\n\n cell1Name.innerHTML = list.LocationName; \n cell2Address.innerHTML = list.City + \", \" + list.State;\n if (list.Phone == 0 )\n {\n cell3Phone.innerHTML = \"&nbsp;\";\n }\n else\n {\n cell3Phone.innerHTML = list.Phone;\n } \n \n if (list.Fax == 0)\n {\n cell4Fax.innerHTML = \"&nbsp;\"; \n }\n else\n {\n cell4Fax.innerHTML = list.Fax;\n } \n \n if (list.Visit != undefined)\n {\n cell5Visit.innerHTML = list.Visit;\n }\n else\n {\n cell5Visit.innerHTML = \"&nbsp;\";\n } \n cell6LatLong.innerHTML = \"Latitude: \" + list.Latitude + \"\\nLongitude: \" + list.Longitude;\n}", "title": "" }, { "docid": "f5035fe49a246073f1c605bf204d5144", "score": "0.5649334", "text": "createOrUpdateRow($table) {\n \tvar $row = $('#' + this.getRowIdentifer())\n \tif ($row.length != 0) {\n \t\tconsole.log('updating table row ' + this.id)\n \t\t$row.empty()\n \t} else {\n \t\tconsole.log('creating new table row ' + this.id)\n \t\t$row = $('<tr>')\n \t\t$row.attr('id', this.getRowIdentifer())\n \t\t$table.append($row)\n \t}\n \t\n\t\tvar columStyle = 'w3-col m3'\n\t\t\n\t\tvar $id = $('<td>')\n\t\t$id.text(shorten(this.id))\n\t\t\n\t\tvar $name = $('<td>')\n\t\t$name.text(this.name)\n\n\t\tvar $category = $('<td>')\n\t\t$category.text(this.category)\n\n\t\tvar $state = $('<td>')\n\t\t$state.text(this.state)\n\t\t$state.addClass(stateColors[this.state])\n\n\t\tvar $eta = $('<td>')\n\t\tvar startTime = this.startTime\n\t\tvar expectedDuration = this.expectedDuration\n\t\tvar endTime = startTime + expectedDuration\n\t\tvar currentTime = new Date().getTime()\n\t\tvar remainingTime = (endTime - currentTime)/1000;\n\t\tif (this.state == 'RUNNING') {\n\t\t\t$eta.text(remainingTime + ' s')\n\t\t\tif (remainingTime < 0) {\n\t\t\t\t$eta.addClass('w3-text-red')\n\t\t\t} \n\t\t}\n\t\t\n\t\tvar $action = $('<td>')\n\t\t$action.addClass(columStyle)\n\t\tif (this.state == 'DONE') {\n\t\t\t$action.text('view')\n\t\t\t$action.addClass('w3-text-blue')\n\t\t\t$action.data('task', this)\n\t\t\t$action.data('url', 'task/result/' + this.id)\n\t\t\t$action.on('click', fetchTaskResult);\n\t\t} else if (this.state == 'RUNNING') {\n\t\t\t$action.text('cancel')\n\t\t\t$action.addClass('w3-text-red')\n\t\t\t$action.data('task', this)\n\t\t\t$action.data('url', 'task/cancel/' + this.id)\n\t\t\t$action.on('click', cancelTask);\n\t\t}\n\t\t$row.append($state, $eta, $category, $name, $action)\n\t\t\n\t\treturn $row\n\t}", "title": "" }, { "docid": "b226976fdb4fbb349191581499fddb2a", "score": "0.5634717", "text": "function insertTable(id, name, data) {\n data.unshift(name);\n document.querySelector(`#${id}`).innerHTML = data.map((e) => `<td>${e}</td>`).join('');\n }", "title": "" }, { "docid": "a377aa1262c62cd82d465be22e99dcfd", "score": "0.5633869", "text": "create(ifNot) {\n const columnBuilders = this.getColumns();\n const columns = columnBuilders.map((col) => col.toSQL());\n const columnTypes = this.getColumnTypes(columns);\n if (this.createAlterTableMethods) {\n this.alterTableForCreate(columnTypes);\n }\n this.createQuery(columnTypes, ifNot);\n this.columnQueries(columns);\n delete this.single.comment;\n this.alterTable();\n }", "title": "" }, { "docid": "7e3303e8d71dcd969778dcdbda61529a", "score": "0.56322575", "text": "function insertTableData(list, tBody)\n{\n let row1 = tBody.insertRow(0);\n let cell1Name = row1.insertCell(0);\n let cell2Name = row1.insertCell(1);\n cell1Name.innerHTML = \"Name\";\n cell2Name.innerHTML = list.name;\n\n let row2 = tBody.insertRow(1)\n let cell3Elevation = row2.insertCell(0);\n let cell4Elevation = row2.insertCell(1);\n cell3Elevation.innerHTML = \"Elevation\";\n cell4Elevation.innerHTML = list.elevation.toLocaleString() + \" ft.\";\n\n let row3 = tBody.insertRow(2)\n let cell5Effort = row3.insertCell(0);\n let cell6Effort = row3.insertCell(1);\n cell5Effort.innerHTML = \"Effort\";\n cell6Effort.innerHTML = list.effort;\n\n //inserting image into file\n let mtnImage = document.createElement(\"img\");\n mtnImage.src = \"images/\" + list.img;\n mtnImage.alt = list.name;\n \n let row4 = tBody.insertRow(3)\n let cell7Image = row4.insertCell(0);\n let cell8Image = row4.insertCell(1);\n cell7Image.innerHTML = \"Picture\";\n cell8Image.appendChild(mtnImage);\n\n let row5 = tBody.insertRow(4)\n let cell9Desc = row5.insertCell(0);\n let cell10Desc = row5.insertCell(1);\n cell9Desc.innerHTML = \"Description\";\n cell10Desc.innerHTML = list.desc;\n\n let row6 = tBody.insertRow(5)\n let cell11LatLong = row6.insertCell(0);\n let cell12LatLong = row6.insertCell(1);\n cell11LatLong.innerHTML = \"Latitude and Longitude\";\n cell12LatLong.innerHTML = \"Latitude: \" + list.coords.lat + \", Longitude: \" + list.coords.lng;\n}", "title": "" }, { "docid": "532569ee6accb9245a4598a0bcda5fc8", "score": "0.56217545", "text": "function tableWrite(id,table,key,value){\n\t\t$.ajax({\n\t\t\ttype: \"POST\",\n\t\t\turl: '../php/tableWrite.php', //This is the current doc\n\t\t\tdata:{\n\t\t\t\t'id': id,\n\t\t\t\t'table': table,\n\t\t\t\t'key': key,\n\t\t\t\t'value': value\n\t\t\t},\n\t\t\tsuccess: function(data){\n\t\t\t\tconsole.log(data);\t\n\t\t\t}\n\t\t});\n\t}", "title": "" }, { "docid": "f1634dce272cbde660ce6543bc8cb542", "score": "0.5614535", "text": "function ImportPurchaseOrderData() {\n BindOrReloadPurchaseOrderTable('Export');\n}", "title": "" }, { "docid": "83cea4cd51d6c1c293cca0f95e6dff7e", "score": "0.56127805", "text": "function MENVLAB_CreateTblRow(tblBody, data_dict, is_table_selected, just_linked_unlinked_pk) {\n //console.log(\"===== MENVLAB_CreateTblRow ===== \");\n //console.log(\" data_dict\", data_dict);\n //console.log(\" just_linked_unlinked_pk\", just_linked_unlinked_pk);\n\n//--- get info from data_dict\n const pk_int = (data_dict.picklist_pk) ? data_dict.picklist_pk : null;\n const caption = (data_dict.sortby) ? data_dict.sortby : \"---\";\n\n const is_just_linked = (pk_int === just_linked_unlinked_pk);\n\n// --- lookup index where this row must be inserted\n // available items are sorted by name (sortby), selected items are sorted by sequence\n const ob1 = (data_dict.selected && data_dict.uniontable_sequence) ? (\"0000\" + data_dict.uniontable_sequence).slice(-4) : \"0000\";\n const ob2 = (caption) ? caption.toLowerCase() : \"\";\n const row_index = b_recursive_tblRow_lookup(tblBody, loc.user_lang, ob1, ob2);\n\n//--------- insert tblBody row at row_index\n const tblRow = tblBody.insertRow(row_index);\n tblRow.setAttribute(\"data-pk\", pk_int);\n\n// --- add data-sortby attribute to tblRow, for ordering new rows\n tblRow.setAttribute(\"data-ob1\", ob1);\n tblRow.setAttribute(\"data-ob2\", ob2);\n\n//- add hover to select row\n add_hover(tblRow)\n\n// --- add td to tblRow.\n let td = null, el_div = null;\n// --- add td to tblRow.\n const tw = (data_dict.selected) ? \"tw_240\" : \"tw_360\";\n td = tblRow.insertCell(-1);\n el_div = document.createElement(\"div\");\n el_div.classList.add(\"pointer_show\");\n el_div.innerText = caption;\n el_div.classList.add(\"tw_240\", \"px-1\");\n if (!mod_MENV_dict.is_bundle){\n el_div.title = [\n data_dict.content_nl, \" \" + data_dict.instruction_nl,\n data_dict.content_en, \" \" + data_dict.instruction_en,\n data_dict.content_pa, \" \" + data_dict.instruction_pa\n ].join(\"\\n\");\n };\n\n td.appendChild(el_div);\n td.addEventListener(\"click\", function() {MENVLAB_SelectItem(tblRow)}, false);\n\n //td.classList.add(cls_bc_transparent);\n\n if (data_dict.selected){\n\n// --- add black triangle up tblRow when selected table\n // &#9650 black triangle up symbol\n // &#9651 outline black triangle up symbol\n td = tblRow.insertCell(-1);\n el_div = document.createElement(\"div\");\n el_div.classList.add(\"tw_020\")\n el_div.innerHTML = \"&#9651;\"\n el_div.title = loc.Click_to_move_item_up;\n td.appendChild(el_div);\n td.addEventListener(\"click\", function() {MENVLAB_UpDown(\"up\", tblRow)}, false);\n td = tblRow.insertCell(-1);\n el_div = document.createElement(\"div\");\n el_div.classList.add(\"tw_020\")\n el_div.innerHTML = \"&#9661;\"\n el_div.title = loc.Click_to_move_item_down;\n td.appendChild(el_div);\n td.addEventListener(\"click\", function() {MENVLAB_UpDown(\"down\", tblRow)}, false);\n };\n\n // --- if new appended row or position has changed: highlight row for 1 second\n if (is_just_linked) {\n let cell = tblRow.cells[0];\n tblRow.classList.add(\"tsa_td_unlinked_selected\");\n setTimeout(function (){ tblRow.classList.remove(\"tsa_td_unlinked_selected\") }, 1000);\n };\n }", "title": "" }, { "docid": "87d665c017f2708a51d59534df86c8a7", "score": "0.55945206", "text": "function addRow() { table.addRow({}) }", "title": "" }, { "docid": "2f0a1c0bed5afb74fc737e00e8ecba8b", "score": "0.55939454", "text": "function populate() {\n //Arrow function populates each column of table using data.js\n tableData.map(data => {\n // append new row to table \n var new_row = tbody.append(\"tr\");\n \n // populate cells in new row: datetime, city, state, country, shape, duration, and comment\n new_row.append('td').text(data.datetime);\n new_row.append('td').text(data.city);\n new_row.append('td').text(data.state);\n new_row.append('td').text(data.country);\n new_row.append('td').text(data.shape);\n new_row.append('td').text(data.durationMinutes);\n new_row.append('td').text(data.comments);\n })\n}", "title": "" }, { "docid": "596a07e3fee0cb8edc800adacf9472ff", "score": "0.5590052", "text": "function addNewProductToTable(id,code,name,e_name,unit,e_unit,price,o_price,storage){\n\t\n\tvar table=document.getElementById(\"productsTable\").getElementsByTagName('tbody')[0];\n\t\n\tvar row=table.insertRow(0);\n\trow.className = \"productTableRow\";\n\trow.setAttribute(\"id\",\"productRow\"+id);\n\t\n\tvar cell1=row.insertCell(0);\n\tvar cell2=row.insertCell(1);\n\tvar cell3=row.insertCell(2);\n\tvar cell4=row.insertCell(3);\n\tvar cell5=row.insertCell(4);\n\tvar cell6=row.insertCell(5);\n\t\n\t// CELL code\n\tcell1.innerHTML=code;\n\tcell1.className = \"productCodeTd tableBorderRight productRowClickable\";\n\t\n\t// CELL name\n\tcell2.innerHTML=\"\" +\n\t\t\"<div class='productEstonianDiv'>\"+name+\"</div>\" +\n\t\t\"<div class='hidden productEnglishDiv'>\"+e_name+\"</div>\";\n\tcell2.className = \"productNameTd tableBorderRight productRowClickable\";\n\t\n\t// CELL price\n\tcell3.innerHTML=\"\" +\n\t\t\"<div class='productEstonianDiv'>\"+parseFloat(price).toFixed(2)+\"</div>\" +\n\t\t\"<div class='hidden productEnglishDiv'>\"+parseFloat(o_price).toFixed(2)+\"</div>\";\n\tcell3.className = \"productPriceTd tableBorderRight productRowClickable alignRightTd\";\n\n\t// CELL unit\n\tcell4.innerHTML=\"\" +\n\t\t\"<div class='productEstonianDiv'>\"+unit+\"</div>\" +\n\t\t\"<div class='hidden productEnglishDiv'>\"+e_unit+\"</div>\";\n\tcell4.className = \"productUnitTd tableBorderRight productRowClickable\";\n\n\t// CELL storage\n\tcell5.innerHTML=\"\" +\n\t\t\"<div>\"+parseFloat(storage).toFixed(3)+\"</div>\";\n\tcell5.className = \"storageTd tableBorderRight productRowClickable alignRightTd\";\n\n\t// CELL delete\n\tcell6.innerHTML=\"\" +\n\t\t\"<label class='productsDeleteLabel'><input type='checkbox' class='productDeleteCheckbox' /></label>\";\n\tcell6.className = \"productDeleteTd\";\n\t\n}", "title": "" }, { "docid": "990903562d6c20d00be4d98e42b2da87", "score": "0.5587227", "text": "function showTeil(teilData) {\n\n let table = document.getElementById(\"lager\");\n clearTable(table);\n\n $.each(teilData, function (uuid, teil) {\n if (teil.title) {\n let row = table.insertRow(-1);\n let cell = row.insertCell(-1);\n cell.innerHTML = teil.title;\n\n cell = row.insertCell(-1);\n cell.innerHTML = teil.author;\n\n cell = row.insertCell(-1);\n cell.innerHTML = teil.publisher.publisher;\n\n cell = row.insertCell(-1);\n cell.innerHTML = teil.price;\n\n cell = row.insertCell(-1);\n cell.innerHTML = teil.isbn;\n\n cell = row.insertCell(-1);\n cell.innerHTML = \"<a href='./lageredit.html?uuid=\" + uuid + \"'>Bearbeiten</a>\";\n\n cell = row.insertCell(-1);\n cell.innerHTML = \"<button type='button' id='delete_\" + uuid + \"' value='\" + uuid + \"'>Löschen</button>\";\n\n\n }\n });\n}", "title": "" }, { "docid": "4b08ec8a514ab4785fabca48bdabd387", "score": "0.5584", "text": "createRow ({\n commit\n }, row) {\n commit('addRow', row)\n }", "title": "" }, { "docid": "865e768dac93b263e37dcbbf79d1659f", "score": "0.5582231", "text": "function updateTable() {\n table.api().draw();\n }", "title": "" }, { "docid": "1cdc72717e6b6eed7f50e8569d993e57", "score": "0.5581632", "text": "function GenerateTable() {\n \n\t// Initializing table data into variables\n\tvar Name = document.getElementById(\"empname\");\n\tvar Id = document.getElementById(\"empid\");\n\tvar FatherName = document.getElementById(\"fathername\");\n\tvar Address = document.getElementById(\"address\");\n\tvar City = document.getElementById(\"city\");\n\tvar District = document.getElementById(\"district\");\n\tvar State = document.getElementById(\"state\");\n\tvar Pincode =document.getElementById(\"pincode\");\n\tvar Sex = document.getElementById(\"sex\");\n\tvar Qualification = document.getElementById(\"qualification\");\n\tvar Emailid =document.getElementById(\"emailid\");\n\tvar Dob = document.getElementById(\"dob\");\n\tvar MobileNo = document.getElementById(\"mobileno\");\n\tvar Department = document.getElementById(\"department\");\n\tvar Position = document.getElementById(\"position\");\n\t\n\tvar table = document.getElementById(\"tabledata\");\n\tvar rowCount = table.rows.length;\n\tvar row = table.insertRow(rowCount);\n\t\n\t//insert data into table\n\trow.insertCell(0).innerHTML = Name.value;\n\trow.insertCell(1).innerHTML = Id.value;\n\trow.insertCell(2).innerHTML = FatherName.value;\n\trow.insertCell(3).innerHTML = Address.value;\n\trow.insertCell(4).innerHTML = City.value;\n\trow.insertCell(5).innerHTML = District.value;\n\trow.insertCell(6).innerHTML = State.value;\n\trow.insertCell(7).innerHTML = Pincode.value;\n\trow.insertCell(8).innerHTML = Sex.value;\n\trow.insertCell(9).innerHTML = Qualification.value;\n\trow.insertCell(10).innerHTML = Emailid.value;\n\trow.insertCell(11).innerHTML = Dob.value;\n\trow.insertCell(12).innerHTML = MobileNo.value;\n\trow.insertCell(13).innerHTML = Department.value;\n\trow.insertCell(14).innerHTML = Position.value;\t\n\t\n\t//Editing and Deleting Data using Buttons\n\trow.insertCell(15).innerHTML = '<input type=\"button\" class=\"btn btn-success\" id=\"Edit\" value=\"Edit\" onclick=\"editRow(this)\" /><br/>';\n\trow.insertCell(16).innerHTML = '<input type=\"button\" class=\"btn btn-danger\" id=\"Delete\" value=\"Delete\" onclick=\"deleteRow(this)\" />';\n\n}", "title": "" }, { "docid": "56df09ac7671988a4b82c0110a8ba394", "score": "0.5580275", "text": "function exec_insertRow(item,type,file,last,info,exec,status,color) {\n var row = document.createElement(\"TR\");\n row.setAttribute(\"bgcolor\",color);\n var td;\n // make TYPE column\n td=document.createElement(\"TD\");\n td.innerHTML=type;\n td.setAttribute(\"title\",\"Schedule type.\");\n row.appendChild(td);\n // make select-TYPE column\n td=document.createElement(\"TD\");\n td.setAttribute(\"style\",\"min-width:25px;width:25px\");\n row.appendChild(td);\n // make FILE NAME column\n td=document.createElement(\"TD\");\n td.innerHTML=file;\n if (type == \"model\") {\n\ttd.setAttribute(\"title\",\"Maintain <model file index>.\");\n } else if (type == \"obs\") {\n\ttd.setAttribute(\"title\",\"Maintain <observation file index>.\");\n } else if (type == \"coloc\") {\n\ttd.setAttribute(\"title\",\"Create <colocation xml> for debugging.\");\n } else if (type == \"table\") {\n\ttd.setAttribute(\"title\",\"Create <table file>.\");\n } else if (type == \"join\") {\n\ttd.setAttribute(\"title\",\"Join <table file> into new <table file>.\");\n } else if (type == \"plot\") {\n\ttd.setAttribute(\"title\",\"Run plotting script using data in <table file>.\");\n } else if (type == \"rerun\") {\n\ttd.setAttribute(\"title\",\"Rerun a sub-set of jobs.\");\n } else if (type == \"clean\") {\n\ttd.setAttribute(\"title\",\"Clean a sub-set of jobs.\");\n } else {\n };\n row.appendChild(td);\n //console.log(\"Row file name=\",file);\n // make select-FILE NAME column\n td=document.createElement(\"TD\");\n td.setAttribute(\"style\",\"min-width:25px;width:25px\");\n row.appendChild(td);\n // make EXEC checkbox column\n td=document.createElement(\"TD\");\n td.setAttribute(\"title\",\"Repetition interval.\");\n td.innerHTML=exec;\n row.appendChild(td);\n // make select-TYPE column\n td=document.createElement(\"TD\");\n td.setAttribute(\"style\",\"min-width:25px;width:25px\");\n row.appendChild(td);\n // make manual column\n td=document.createElement(\"TD\");\n td.setAttribute(\"style\",\"min-width:75px;width:75px\");\n td.setAttribute(\"align\",\"center\");\n btn=document.createElement(\"BUTTON\");\n btn.setAttribute(\"onclick\",\"exec_testNow('','\"+type+\"','\"+file+\"',this.parentNode.parentNode)\");\n btn.setAttribute(\"class\",\"test\");\n btn.setAttribute(\"title\",\"Test now, stop processing as soon as some output has been produced.\");\n btn.setAttribute(\"width\",\"100%\");\n //var t=document.createTextNode();\n //btn.appendChild(t);\n if (type == \"coloc\") {\n\tbtn.innerHTML=\"&#9661\"\n\ttd.appendChild(btn);\n } else if (type == \"clean\") {\n\t//btn.innerHTML=\"&#9661\"\n\t//td.appendChild(btn);\n } else {\n\tbtn.innerHTML=\"&#9655\"\n\ttd.appendChild(btn);\n }\n td.setAttribute(\"style\",\"min-width:25px;width:25px\");\n td.setAttribute(\"align\",\"center\");\n row.appendChild(td);\n // make RUN NOW column\n td=document.createElement(\"TD\");\n btn=document.createElement(\"BUTTON\");\n btn.setAttribute(\"onclick\",\"exec_runNow('','\"+type+\"','\"+file+\"',this.parentNode.parentNode)\");\n btn.setAttribute(\"class\",\"run\");\n btn.setAttribute(\"title\",\"Run now, process all data completely.\");\n btn.setAttribute(\"width\",\"100%\");\n //var t=document.createTextNode();\n //btn.appendChild(t);\n if (type == \"coloc\") {\n\tbtn.innerHTML=\"&#9661\"\n\ttd.appendChild(btn);\n } else if (type == \"clean\") {\n\tbtn.innerHTML=\"&#9661\"\n\ttd.appendChild(btn);\n } else {\n\tbtn.innerHTML=\"&#9654\"\n\ttd.appendChild(btn);\n }\n td.setAttribute(\"style\",\"min-width:25px;width:25px\");\n td.setAttribute(\"align\",\"center\");\n row.appendChild(td);\n // make STOP column\n td=document.createElement(\"TD\");\n btn=document.createElement(\"BUTTON\");\n btn.setAttribute(\"onclick\",\"exec_stopNow('','\"+type+\"','\"+file+\"',this.parentNode.parentNode)\");\n btn.setAttribute(\"class\",\"stop\");\n btn.setAttribute(\"title\",\"Stop process.\");\n btn.setAttribute(\"width\",\"100%\");\n //var t=document.createTextNode();\n //btn.appendChild(t);\n if (type == \"coloc\") {\n\tbtn.innerHTML=\"&#9661\"\n\ttd.appendChild(btn);\n } else if (type == \"clean\") {\n\t//btn.innerHTML=\"&#9661\"\n\t//td.appendChild(btn);\n } else {\n\tbtn.innerHTML=\"&#9632\"\n\ttd.appendChild(btn);\n }\n td.setAttribute(\"style\",\"min-width:25px;width:25px\");\n td.setAttribute(\"align\",\"center\");\n row.appendChild(td);\n // make LAST column\n row.appendChild(td);\n td=document.createElement(\"TD\");\n if (status !== \"\") {\n\ttd.setAttribute(\"style\",\"color:blue\");\n }\n var a = document.createElement('a');\n var linkText = document.createTextNode(last);\n a.appendChild(linkText);\n a.title = \"View last log-file and error-file\";\n a.href = \"cgi-bin/fark_log.pl?type=\"+type+\"&file=\"+file;\n a.target =\"_blank\";\n td.appendChild(a);\n row.appendChild(td);\n // make INFO column\n td=document.createElement(\"TD\");\n if (type ==\"model\") {\n\ttd.title = \"Show status of the model-index-file.\";\n } else if (type ==\"obs\") {\n\ttd.title = \"Show status of the observation-index-file.\";\n } else if (type ==\"table\") {\n\ttd.title = \"Show status of the table-file.\";\n } else if (type ==\"join\") {\n\ttd.title = \"Show status of the joined table-file.\";\n } else if (type ==\"plot\") {\n\ttd.title = \"Show status of the plot files.\";\n } else if (type ==\"rerun\") {\n\ttd.title = \"Show status of the rerun files.\";\n } else if (type ==\"clean\") {\n\ttd.title = \"Show status of the clean files.\";\n } else {\n\ttd.title = \"Show status.\";\n };\n td.innerHTML=info;\n row.appendChild(td);\n // make \"-\" column\n td=document.createElement(\"TD\");\n td.setAttribute(\"style\",\"min-width:25px;width:25px;\");\n var btn=document.createElement(\"BUTTON\");\n btn.setAttribute(\"onclick\",\"exec_removeFile(this.parentNode.parentNode,'\"+type+\"','\"+file+\"')\");\n btn.setAttribute(\"style\",\"width:100%\");\n btn.setAttribute(\"title\",\"Remove scheduled job\");\n var t=document.createTextNode(\"-\");\n btn.appendChild(t);\n td.appendChild(btn);\n row.appendChild(td);\n // make add row to table\n item.parentNode.insertBefore(row,item);\n return row;\n}", "title": "" }, { "docid": "b0ac598180a3bf69eda95b2198318f42", "score": "0.55789363", "text": "static insertNew(to,t,p,cb){\n\t\tquery.execute(conn, 'echec','insert data {:cell'+to+' rdf:type :'+t+' . :cell'+to+' rdf:type :'+p+'}',\n\t\t'application/sparql-results+json', {\n\t\t\toffset:0,\n\t\t\treasoning: true\n\t\t}).then(res =>{\n\t\t\tinit.run(cb);\n\t\t}).catch(e=> {console.log(e);});\n\t}", "title": "" }, { "docid": "c6151f8f397cd0d491f10777faf4bfb0", "score": "0.55774397", "text": "function CreateTblRow(tblName, field_setting, col_hidden, data_dict) {\n //console.log(\"========= CreateTblRow =========\", tblName);\n //console.log(\"tblName\", tblName);\n //console.log(\"data_dict\", data_dict);\n\n const field_names = field_setting.field_names;\n const field_tags = field_setting.field_tags;\n const filter_tags = field_setting.filter_tags;\n const field_align = field_setting.field_align;\n const field_width = field_setting.field_width;\n const column_count = field_names.length;\n\n// --- lookup index where this row must be inserted\n const ob1 = (tblName === \"orderlist\") ? (data_dict.schbase_code) ? data_dict.schbase_code : \"\" :\n (tblName === \"envelopsubject\") ? (data_dict.subjbase_code) ? data_dict.subjbase_code : \"\" :\n (tblName === \"envelopbundle\") ? (data_dict.name) ? data_dict.name : \"\" :\n (tblName === \"enveloplabel\") ? (data_dict.name) ? data_dict.name : \"\" :\n (tblName === \"envelopitem\") ? (data_dict.content_nl) ? data_dict.content_nl : \"\" : \"\";\n\n const ob2 = (tblName === \"envelopsubject\") ? (data_dict.depbase_code) ? data_dict.depbase_code : \"\" :\n (tblName === \"envelopitem\") ? (data_dict.instruction_nl) ? data_dict.instruction_nl : \"\" : \"\";\n\n const ob3 = (tblName === \"envelopsubject\") ? (data_dict.lvl_abbrev) ? data_dict.lvl_abbrev : \"\" : \"\";\n\n const row_index = b_recursive_tblRow_lookup(tblBody_datatable, setting_dict.user_lang, ob1, ob2, ob3);\n\n// --- insert tblRow into tblBody at row_index\n let tblRow = tblBody_datatable.insertRow(row_index);\n if (data_dict.mapid) {tblRow.id = data_dict.mapid};\n\n// --- add data attributes to tblRow\n tblRow.setAttribute(\"data-table\", tblName);\n tblRow.setAttribute(\"data-pk\", data_dict.id);\n\n// --- add data-sortby attribute to tblRow, for ordering new rows\n tblRow.setAttribute(\"data-ob1\", ob1);\n tblRow.setAttribute(\"data-ob2\", ob2);\n tblRow.setAttribute(\"data-ob3\", ob3);\n\n// --- add EventListener to tblRow\n tblRow.addEventListener(\"click\", function() {HandleTblRowClicked(tblRow)}, false);\n\n// +++ insert td's into tblRow\n for (let j = 0; j < column_count; j++) {\n const field_name = field_names[j];\n\n// skip columns if in columns_hidden\n if (!col_hidden.includes(field_name)){\n const field_tag = field_tags[j];\n const filter_tag = filter_tags[j];\n const class_width = \"tw_\" + field_width[j];\n const class_align = \"ta_\" + field_align[j];\n\n // --- insert td element,\n let td = tblRow.insertCell(-1);\n\n // --- create element with tag from field_tags\n let el = document.createElement(field_tag);\n\n // --- add data-field attribute\n el.setAttribute(\"data-field\", field_name);\n\n // --- add width, text_align, right padding in examnumber\n // not necessary: td.classList.add(class_width, class_align);\n el.classList.add(class_width, class_align);\n\n if(filter_tag === \"number\"){el.classList.add(\"pr-3\")}\n td.appendChild(el);\n\n // --- add EventListener to td\n if ([\"firstdate\", \"lastdate\", \"starttime\", \"endtime\"].includes(field_name)){\n const el_type = ([\"firstdate\", \"lastdate\"].includes(field_name)) ? \"date\" : \"text\";\n\n el.setAttribute(\"type\", el_type)\n el.setAttribute(\"autocomplete\", \"off\");\n el.setAttribute(\"ondragstart\", \"return false;\");\n el.setAttribute(\"ondrop\", \"return false;\");\n el.classList.add(\"input_text\");\n\n el.addEventListener(\"change\", function() {UploadInputChange(tblName, el)}, false);\n //el.addEventListener(\"keydown\", function(event){HandleArrowEvent(el, event)});\n\n } else if ([\"has_errata\", \"secret_exam\"].includes(field_name)){\n td.addEventListener(\"click\", function() {UploadInputToggle(el)}, false);\n td.classList.add(\"pointer_show\");\n add_hover(td);\n\n } else if ([\"content_nl\", \"instruction_nl\"].includes(field_name)){\n td.addEventListener(\"click\", function() {MENVIT_Open(el)}, false)\n td.classList.add(\"pointer_show\");\n add_hover(td);\n\n } else if ([\"name\", \"is_variablenumber\", \"numberofenvelops\", \"numberinenvelop\", \"is_errata\"].includes(field_name)){\n td.addEventListener(\"click\", function() {MENVLAB_Open(tblName, el)}, false)\n td.classList.add(\"pointer_show\");\n add_hover(td);\n\n } else if (field_name === \"bundle_name\"){\n td.addEventListener(\"click\", function() {ModSelEnvBundle_Open(td)}, false)\n td.classList.add(\"pointer_show\");\n add_hover(td);\n\n } else if (field_name === \"download\"){\n td.addEventListener(\"click\", function() {ModConfirmOpen(\"download\", tblRow)}, false)\n td.classList.add(\"pointer_show\");\n add_hover(td);\n } else if (field_name === \"url\"){\n el.innerHTML = \"&emsp;&emsp;&emsp;&emsp;&#8681;&emsp;&emsp;&emsp;&emsp;\";\n };\n\n// --- put value in field\n UpdateField(el, data_dict)\n } // if (columns_hidden[field_name])\n } // for (let j = 0; j < 8; j++)\n\n return tblRow\n }", "title": "" }, { "docid": "6def7283de8f851f6318a03825deb73f", "score": "0.55758184", "text": "onModelEvent(event, data) {\n // Even ADD, DELETE, UPDATE sent by AuthorRegistry not used\n // Table in author.html\n var table = $('#author').DataTable();\n table.rows().remove(); // Remove everything\n table.rows.add(data).draw(); // Add everything\n\n }", "title": "" }, { "docid": "c3d1ef85fbe168ab7cb6fe85ef6f39d8", "score": "0.5562463", "text": "function insertContentParcel(parcel) {\n $.each(parcel, function(){\n var tr = $('<tr>'),\n tdId = $('<td>', {class: \"id\"}),\n tdAddress = $('<td>', {class: \"address\"}),\n tdName = $('<td>', {class: \"name\"}),\n tdSize = $('<td>', {class: \"size\"}),\n tdPrice = $('<td>', {class: \"price\"}),\n tdAction = $('<td>', {class: \"action\"}),\n actionDelete = $('<button>', {class: \"delete-btn\"}).text('Usuń');\n// actionForm = $('<form>', {class: \"edit-form hide\"}),\n// inputAddress = $('<input>', {name: \"address\", id: \"address\"}),\n// inputName = $('<input>', {name: \"name\", id: \"name\"}),\n// inputSize = $('<input>', {name: \"size\", id: \"size\"}),\n// inputPrice = $('<input>', {name: \"price\", id: \"price\"}),\n// inputSubmit = $('<input>', {type: \"submit\"});\n\n // Create table element\n tr.append(tdId, tdAddress, tdName, tdSize, tdPrice, tdAction);\n tdAction.append(actionDelete);\n// actionForm.append(inputAddress, inputName, inputSize, inputPrice, inputSubmit);\n viewParcel.append(tr);\n\n // Insert proper address\n function insertAddress(address) {\n $.each(address, function() {\n tdAddress.text(this.city + ' ' + this.code + ', ' + this.street + ' ' + this.flat);\n }); \n }\n\n var addressId = this.address_id;\n var url = '../../router.php/address/';\n\n // Show data from database ADDRESS in table\n $.ajax({\n type: 'GET',\n url: url + addressId,\n contentType: 'application/json',\n dataType: 'json'\n }).done(function (response) {\n insertAddress(response);\n }).fail(function (response) {\n alert( \"Wystąpił błąd\");\n });\n\n // Insert proper name\n function insertName(user) {\n $.each(user, function() {\n tdName.text(this.name + ' ' + this.surname);\n });\n }\n\n var userId = this.user_id;\n var url = '../../router.php/user/';\n\n // Show data from database USER in table\n $.ajax({\n type: 'GET',\n url: url + userId,\n contentType: 'application/json',\n dataType: 'json'\n }).done(function (response) {\n insertName(response);\n }).fail(function (response) {\n alert( \"Wystąpił błąd\");\n });\n\n // Insert proper size and price\n function insertSize(size) {\n $.each(size, function() {\n tdSize.text(this.size);\n tdPrice.text(this.price);\n })\n }\n\n var sizeId = this.size_id;\n var url = '../../router.php/size/';\n\n // Show data from database SIZE in table\n $.ajax({\n type: 'GET',\n url: url + sizeId,\n contentType: 'application/json',\n dataType: 'json'\n }).done(function (response) {\n insertSize(response);\n }).fail(function (response) {\n alert( \"Wystąpił błąd\");\n });\n tdId.text(this.id);\n });\n\n // Delete PARCEL data\n viewParcel.on('click', '.delete-btn', function(e){\n e.preventDefault();\n \n var id = $(this).parent().parent().find('td[class=id]').text();\n $.ajax({\n type: \"DELETE\",\n url: url,\n data: {\n id: id\n },\n dataType: 'json'\n }).done(function (response) {\n location.reload();\n alert('Użytkownik został usunięty');\n }).fail(function (response) {\n alert( \"Wystąpił błąd\");\n });\n });\n }", "title": "" }, { "docid": "44477622550d8bcade85933278be93e3", "score": "0.5561447", "text": "function editASITableRow(tableArr, tableCapId, tableName, editName, editValue,r) {\r\n if (tableArr) {\r\n logDebug(\" Editing row \" + r);\r\n var tssmResult = aa.appSpecificTableScript.removeAppSpecificTableInfos(tableName, tableCapId, currentUserID);\r\n var rowArr = new Array();\r\n var tempArr = new Array();\r\n for (var col in tableArr[r]) {\r\n if (tableArr[r][col].columnName.toString() == editName) {\r\n var tVal = tableArr[r][col];\r\n tVal.fieldValue = editValue;\r\n tableArr[r][col] = tVal;\r\n } else {\r\n var tVal = tableArr[r][col];\r\n }\r\n }\r\n addASITable(tableName, tableArr, tableCapId);\r\n }\r\n} //end loop", "title": "" }, { "docid": "f030f78698aa39b984c1dba806d76671", "score": "0.5558316", "text": "refreshObjectTable() {\n let i, j;\n let objText = \"\";\n objText += \"<h3> Object Properties\";\n objText += \"<form>\";\n objText += \"<table>\";\n // make the header\n objText += \"<tr>\";\n for (j = 0; j < this.parameterList.length; j++) {\n objText += '<td class=\"param-title\">';\n objText += this.parameterList[j];\n objText += \"</td>\";\n }\n objText += \"</tr>\";\n\n // make the table of editable object this.dataObjects fields\n for (i = 0; i < this.dataObjects.length; i++) { // for each object\n if (_selectedElement && _selectedID == i) objText += '<tr style=\"background-color: red;\">';\n else objText += \"<tr>\";\n for (j = 0; j < this.parameterList.length; j++) { // for each value in the this.parameterList\n objText += \"<td>\";\n var value = this.dataObjects[i][this.parameterList[j]];\n var itemValue = i + \"?\" + this.parameterList[j];\n objText += '<input type=\"text\" onchange=\"onEditValue(this.name, this.value)\" name=\"' + itemValue + '\" value=\"' + value + '\">';\n objText += \"</td>\";\n }\n\n if (this.editButton) objText += '<td><button type=\"button\" onclick=\"showEditTable(this.name, false)\" name=\"' + i + '\" > <img style=\"height:25px\" src=\"static/assets/img/edit.png\"> </td>';\n if (this.addButton) objText += '<td><button type=\"button\" onclick=\"showEditTable(this.name, true)\" name=\"' + i + '\" > <img style=\"height:25px\" src=\"static/assets/img/add.png\"> </td>';\n objText += '<td><button type=\"button\" onclick=\"onDeleteObject(this.name)\" name=\"' + i + '\" > <img style=\"height:15px\" src=\"assets/img/delete.png\"> </td>';\n objText += \"</tr>\";\n }\n objText += \"</table><br>\";\n // create new and edit don't make sense here. If they do, uncomment the next 2 lines.\n objText += \"</form>\";\n this.DOMobject.innerHTML = objText;\n }", "title": "" }, { "docid": "b590720c4455503d63ebf9c634a37249", "score": "0.55494344", "text": "create(tabPos, uuid) {\n // Banana.console.debug(\"--------create-------- uuid: \" + uuid + \" \" + JSON.stringify(tabPos));\n var pain001CH = new Pain001Switzerland(this.banDocument);\n if (!pain001CH.verifyBananaVersion())\n return null;\n\n var paymentObj = pain001CH.initPaymObject();\n\n var row = null;\n var table = this.banDocument.table(tabPos.tableName);\n if (tabPos.rowNr < table.rowCount && tabPos.tableName === \"Transactions\") {\n row = table.row(tabPos.rowNr);\n }\n\n //load creditor id and amount if data is syncronized with transaction row\n if (row) {\n this._rowGetAccount(paymentObj, row);\n this._rowGetAmount(paymentObj, row);\n this._rowGetDoc(paymentObj, row);\n if (!paymentObj[\"transactionDate\"] || paymentObj[\"transactionDate\"].length <= 0)\n paymentObj[\"transactionDate\"] = pain001CH.currentDate();\n }\n\n var dialogTitle = 'Payment data';\n var pageAnchor = 'dlgPaymentData';\n var editorData = pain001CH.convertPaymData(paymentObj);\n // Open dialog\n paymentObj = pain001CH.openEditor(dialogTitle, editorData, pageAnchor);\n if (!paymentObj)\n return null;\n\n paymentObj[\"@uuid\"] = uuid;\n // Banana.console.debug(\"create, columnName \" + tabPos.columnName + \" uuid\" + paymentObj[\"@uuid\"] );\n\n //verify all data\n paymentObj = pain001CH.verifyPaymObject(paymentObj);\n\n var changedRowFields = {};\n changedRowFields[\"PaymentData\"] = { \"paymentdata_json\": JSON.stringify(paymentObj) };\n\n // Create docChange\n var docChange = new DocumentChange();\n if (tabPos.rowNr == -1)\n docChange.addOperationRowAdd(tabPos.tableName, changedRowFields);\n else\n docChange.addOperationRowModify(tabPos.tableName, tabPos.rowNr, changedRowFields);\n return docChange.getDocChange();\n }", "title": "" }, { "docid": "f33aa6c73c23cdbce277587b9c81177f", "score": "0.55465513", "text": "function create_table(data) {\n const name = document.getElementById('table_comments')\n for(var i = 0; i < data.length; i++)\n {\n var newRow = name.insertRow(name.length);\n for(var j = 0; j < data[i].length; j++) {\n var cell = newRow.insertCell(j);\n cell.innerHTML = data[i][j]\n }\n }\n}", "title": "" }, { "docid": "19ef80bdde57c854d7a432f133c97382", "score": "0.5543642", "text": "function apt_datatable_create(arg_view_name, arg_html_table_id, arg_model_name, arg_columns_def, options)\n{\n\tvar table_id = '#' + arg_html_table_id;\n\t\n\tvar form_create_modal_id = \"#\" + arg_view_name + \"_create_form_modal\";\n\tvar form_delete_modal_id = \"#\" + arg_view_name + \"_delete_form_modal\";\n\tvar form_update_modal_id = \"#\" + arg_view_name + \"_update_form_modal\";\n\t\n\tvar arg_can_reload = ( typeof(options['can_reload']) == \"undefined\" ) ? false : (options['can_reload'] == \"true\");\n\tvar arg_can_create = ( typeof(options['can_create']) == \"undefined\" ) ? false : (options['can_create'] == \"true\");\n\tvar arg_can_delete = ( typeof(options['can_delete']) == \"undefined\" ) ? false : (options['can_delete'] == \"true\");\n\tvar arg_can_update = ( typeof(options['can_update']) == \"undefined\" ) ? false : (options['can_update'] == \"true\");\n\tvar arg_can_export = ( typeof(options['can_export']) == \"undefined\" ) ? false : (options['can_export'] == \"true\");\n\t\n\t// CREATE DATATABLES OPTIONS\n\tvar datables_options = apt_datatables_init_options(arg_view_name, arg_model_name, arg_columns_def, arg_can_reload, arg_can_create, arg_can_delete, arg_can_update, arg_can_export);\n\t\n\t// CREATE DATATABLES OBJECT\n\tvar oTable = $(table_id).dataTable(datables_options);\n\t\n\t// INIT COLUMN FOOTER FILTERS\n\tapt_datatables_init_input_filters(oTable);\n//\tapt_datatables_init_select_filters(oTable);\n}", "title": "" }, { "docid": "8ab09874f3513f2fbeef29fcf334a5c3", "score": "0.5540072", "text": "function adminAddData(tableName) {\n\n\tif (tableName === 'users') {\n\t\t$('#admAddUser2').click(function() {\n\t\t\tcreateObject(tableName, '#admUserTable', userTableRow, createUserContainer());\n\t\t});\n\t} else if (tableName === 'products') {\n\t\t$('#admProdAdd').click(function() {\n\t\t\tcreateObject(tableName, '#admProdsTable', prodTableRow, createProdContainer());\n\t\t});\n\t} else if (tableName === 'services') {\n\t\t$('#admServAdd').click(function() {\n\t\t\tcreateObject(tableName, '#admServsTable', servTableRow, createServContainer());\n\t\t});\n\t}\n}", "title": "" }, { "docid": "963f873ee9fd46c977944eba782688b4", "score": "0.5539129", "text": "async function storeTable({project_id, table, data, ...rest}) {\n \n await d({project_id, table});\n // save other additional information like indexColumn as supplementary\n // data.\n await c({project_id, table, ...rest, ___DIGEST: true});\n\n // finally store the data.\n return await c({project_id, table}, data, {flatten: true});\n}", "title": "" }, { "docid": "547e74d5bc2fdb8bcefa70c2ae4873b2", "score": "0.5523084", "text": "function generateTable(table,data){\n for(let element of data){\n let row = table.insertRow();\n for(key in element){\n let cell = row.insertCell();\n let text = document.createTextNode(element[key]);\n cell.appendChild(text);\n }\n }\n}", "title": "" }, { "docid": "b08a40add4edf535ff9afb692f093ee1", "score": "0.5522635", "text": "function run() {\n var html = createTable(data);\n\n insertHTML(\"floor\", html);\n}", "title": "" }, { "docid": "d2c1891316a2fc2435b5bd21ef8b5f37", "score": "0.5522043", "text": "function populateTable(data, tableCd) {\n if (!acc_rej) {\n $('#contractTable').empty();\n }\n var tbl = $('#contractTable');\n\n var btn = document.createElement(\"BUTTON\");\n var comments = document.createElement(\"BUTTON\");\n var t = document.createTextNode(\"View\");\n data = queryToObject(data);\n sData = JSON.stringify(data);\n // throw new Error(\"Stopping Execution... Check Output\");\n var companyReturn = makeRows(data);\n\n // buttons and checkboxes are declared. will be made into columns later.\n var buttons = [\"comments\", \"full_info\"];\n var checkboxes = [\"accept\", \"reject\"];\n tbl.append('<thead><tr></tr></thead>');\n colNames = textfield.concat(buttons).concat(checkboxes);\n\n\n // based on the column type (checkboxes), the column is populated.\n $thead = $('#contractTable > thead > tr:first');\n if ((acc_rej && !acc_done) || !acc_rej) {\n for (var i = 0, len = colNames.length; i < len; i++) {\n if (colNames[i].includes('_')) colNames[i] = colNames[i].replace('_', ' ');\n if (i === len - 2) $thead.append('<th id =\"accept\">' + colNames[i] + '</th>');\n else if (i === len - 1) $thead.append('<th class=\"acc_rej\">' + colNames[i] + '</th>');\n else if (textfield[i] != 'id') $thead.append('<th>' + colNames[i] + '</th>');\n\n }\n acc_done = true;\n }\n\n // for each row, each column is made.\n $.each(companyReturn, function(company) {\n var tr = $('<tr/>').appendTo(tbl);\n tr.attr('align', 'center');\n var companyDetails = companyReturn[company];\n companyDetails.comments = comments;\n companyDetails.full_info = btn;\n companyDetails.accept = 'hired';\n companyDetails.reject = 'nothired';\n\n // for each propertyName, the column is made.\n for (var propertyName in companyDetails) {\n var td;\n // if it is a textfield , the object is appended to the column in that row.\n if (textfield.includes(propertyName)) {\n td = $('<td/>').appendTo(tr);\n var x = (propertyName == 'expertise') ? td.append(companyDetails[propertyName].join(', ')) : td.append(companyDetails[propertyName]);\n\n // if the column is a checkbox or a button, it is made.\n } else if (buttons.concat(checkboxes).includes(propertyName)) {\n td = $('<td/>').appendTo(tr);\n if (propertyName == 'reject') td.addClass('acc_rej');\n if (propertyName == 'full_info' || propertyName == 'comments') {\n btn = document.createElement(\"a\");\n btn.setAttribute(\"class\", \"all-info btn btn-success\");\n if (propertyName == 'full_info') {\n t = document.createTextNode(\"View\");\n btn.appendChild(t);\n btn.setAttribute(\"onclick\", \"openWin(\" + \"'allinfo.cfm?id=\" + companyDetails.id + \"',\" + \"'All Info', 'width=1000,height=500,toolbar=0,location=0,directories=0,status=0,menuBar=0,scrollBars=1,resizable=1' ); newWindow.focus();\");\n } else {\n t = document.createElement(\"i\");\n // t.setAttribute(\"class\", \"fa fa-list-alt\");\n t.setAttribute(\"class\", \"fa fa-comment-o\");\n t.setAttribute(\"aria-hidden\", \"true\");\n btn.setAttribute(\"onclick\", \"openWin(\" + \"'comments.cfm?id=\" + companyDetails.id + \"',\" + \"'Comments', 'width=500,height=800,toolbar=0,location=0,directories=0,status=0,menuBar=0,scrollBars=1,resizable=1' ); newWindow.focus();\");\n if (companyDetails.numComments > 0) t.setAttribute(\"class\", \"fa fa-comment\");\n btn.appendChild(t);\n\n\n }\n // button is assigned to the column\n td.append(btn);\n\n } else if (!acc_rej && (checkboxes.includes(propertyName))) {\n var check = make_checkboxes(companyDetails[propertyName], companyDetails.id, companyDetails.name);\n td.append(check);\n\n } else {\n $('.acc_rej').remove();\n $('#accept').text(\"Type\");\n td.append(document.createTextNode(tableType(tableCd)));\n }\n\n }\n\n }\n assignCheck(companyDetails.prequalstatus, tr, companyDetails.id);\n\n });\n\n checkHandler();\n // throw new Error(\"Stopping Execution... Check Output\");\n\n}", "title": "" }, { "docid": "679f80e51ac67f2dc66e92c84c7cf2a8", "score": "0.55203116", "text": "function tableSection() {\n var tableColumns = ['id', 'name', 'document', 'documentType', 'actions'];\n var dataTableColumns = [];\n\n tableColumns.forEach(column => {\n dataTableColumns.push({ data: column });\n });\n\n var requestOptions = {\n requestUrl: 'Back/' + moduleName + '/data_table',\n moduleName: moduleName,\n requestType: 'all',\n requestContentType: 'application/x-www-form-urlencoded',\n fillTable: true,\n tableColumns: dataTableColumns\n }\n\n requestTableData(requestOptions);\n}", "title": "" }, { "docid": "cd5540c6aab290f1ffa8e08ce675f8a2", "score": "0.5512943", "text": "function populateTable(infos = \"\") {\n StorageInfo.emptyArray();\n\n if (infos == \"\") {\n infos = StorageInfo.getArray();\n }\n\n let table_info = document.getElementById(\"table_info\");\n table_info.innerHTML = \"\";\n\n infos.forEach(function (info, id) {\n let row = table_info.insertRow();\n\n row.id = `row_${id}`;\n row.insertCell(0).innerHTML = info.predio;\n row.insertCell(1).innerHTML = info.localDeTrabalho;\n row.insertCell(2).innerHTML = `<i class=\"fas fa-pen\" onClick=\"editInfo(${id})\"> </i> \n <i class=\"fas fa-trash\" onClick=\"deleteInfo(${id})\"> </i>`;\n });\n}", "title": "" }, { "docid": "14a9e1928cf1ad44712b364a2f1fa797", "score": "0.5510734", "text": "function writeData(db, idTable) {\n db.collection(\"emprendedores\").get().then((querySnapshot) => {\n querySnapshot.forEach((doc) => {\n const emprendedor = doc.data();\n idTable.innerHTML += `\n <tr>\n <td>${emprendedor.id_emp}</td>\n <td>${emprendedor.name_e}</td>\n <td>${emprendedor.lugar}</td>\n <td>${emprendedor.uid_user}</td>\n <td>\n <a type=\"buttom\" class=\"fas fa-edit\" data-toggle=\"modal\" data-target=\"#editProductoModal\"\n data-id = \"${doc.id}\"\n data-ide = \"${emprendedor.id_emp}\"\n data-name = \"${emprendedor.name_e}\"\n data-lugar = \"${emprendedor.lugar}\"\n data-iduser = \"${emprendedor.uid_user}\"></a>\n </td>\n <td>\n <a type=\"buttom\" class=\"fas fa-trash-alt\" data-toggle=\"modal\" data-target=\"#deleteModal\" data-id=\"${doc.id}\"></a>\n </td>\n </tr> \n `;\n });\n });\n}", "title": "" }, { "docid": "22c57f4c937a76fe752e3c2eace5d38d", "score": "0.5508243", "text": "function update_details(data, $table) {\n // alert(JSON.stringify(data));\n $table.api().clear().draw();\n $table.api().rows.add(data);\n $table.api().columns.adjust().draw();\n}", "title": "" }, { "docid": "cd4341a66755d5076dda354bddd73ce3", "score": "0.5507605", "text": "function createTable(id) {\n {\n const node = data.querySelectorAll('[id=\"' + id + '\"]');\n //First check what type of action has been performed on the element (i.e. create, modify, delete)\n let action = node[0].parentNode.parentNode.getAttribute('type');//Check if action is \"modify\", \"delete\" or \"null\"\n if (!action) action = \"create\";//The xml data structure is different for \"create\" nodes, thus action will be \"null\" in the line above\n // console.log(action);\n\n //Create header with element info\n let tableHtml = `<span class=\"${action} capitalize\">${action}</span> ${node[0].nodeName} <a href=\"https://www.openstreetmap.org/${node[0].nodeName}/${node[0].getAttribute(\"id\")}\" target=\"_blank\" rel=\"noopener noreferrer\">${node[0].getAttribute(\"id\")}</a> <a href=\"http://osmlab.github.io/osm-deep-history/#/${node[0].nodeName}/${node[0].getAttribute(\"id\")}\" title=\"Get complete history of element in 'OSM Deep History'\" target=\"_blank\" rel=\"noopener noreferrer\"><svg class=\"clock-with-circular-arrow-symbol\"><use href=\"img/icons.svg#clock-with-circular-arrow\"></use></svg></a>`;\n\n //Variables\n tableHtml += `<table class=\"table-container\">`;\n\n //Object with all key-value pairs for new and old and relevant meta tags for table\n const keyvalues = { old: { meta: {}, tags: {} }, new: { meta: {}, tags: {} } };\n\n //1 CREATE\n if (action === \"create\") {\n //Copy meta tags\n const keysNew = node[0].querySelectorAll(\"tag\");\n\n //Create table\n tableHtml += `\n <thead>\n <tr>\n <th>Tag</th>\n <th>New</th>\n </tr>\n </thead>\n <tbody>\n <tr class=\"metatags\">\n <td>version</td>\n <td>${node[0].getAttribute(\"version\")}</td>\n </tr>\n <tr class=\"metatags\">\n <td>timestamp</td>\n <td>${node[0].getAttribute(\"timestamp\")}</td>\n </tr>\n <tr class=\"metatags\">\n <td>user</td>\n <td>${node[0].getAttribute(\"user\")}</td>\n </tr>\n `;\n\n for (let i = 0; i < keysNew.length; i++) {\n tableHtml += `\n <tr class=\"create\">\n <td>${keysNew[i].getAttribute('k')}</td>\n <td>${keysNew[i].getAttribute('v')}</td>\n </tr>\n `\n }\n }\n\n //2 MODIFY/DELETE\n else {\n //Create Set with all unique key-values from old and new\n const uniqueKeysSet = new Set();\n //Start with old\n //Copy meta tags\n keyvalues.old.meta[\"version\"] = node[0].getAttribute(\"version\");\n keyvalues.old.meta[\"timestamp\"] = moment(node[0].getAttribute(\"timestamp\")).fromNow();\n keyvalues.old.meta[\"user\"] = node[0].getAttribute(\"user\");\n const keysOld = node[0].querySelectorAll(\"tag\");\n for (let i = 0; i < keysOld.length; i++) {\n keyvalues.old.tags[keysOld[i].getAttribute('k')] = keysOld[i].getAttribute('v');\n uniqueKeysSet.add(keysOld[i].getAttribute('k'));\n }\n //Continue with new\n //Copy meta tags\n keyvalues.new.meta[\"version\"] = node[1].getAttribute(\"version\");\n keyvalues.new.meta[\"timestamp\"] = moment(node[1].getAttribute(\"timestamp\")).fromNow();\n keyvalues.new.meta[\"user\"] = node[1].getAttribute(\"user\");\n const keysNew = node[1].querySelectorAll(\"tag\");\n for (let i = 0; i < keysNew.length; i++) {\n keyvalues.new.tags[keysNew[i].getAttribute('k')] = keysNew[i].getAttribute('v');\n uniqueKeysSet.add(keysNew[i].getAttribute('k'));\n }\n // console.log(keyvalues);\n //Create array in which all keys are ordered alphabetically\n const uniqueKeysArr = Array.from(uniqueKeysSet).sort();\n // console.log(uniqueKeysArr);\n\n //Create table\n tableHtml += `\n <thead>\n <tr>\n <th>Tag</th>\n <th>Old</th>\n <th>New</th>\n </tr>\n </thead>\n <tbody>\n <tr class=\"metatags\">\n <td>version</td>\n <td>${keyvalues.old.meta[\"version\"]}</td>\n <td>${keyvalues.new.meta[\"version\"]}</td>\n </tr>\n <tr class=\"metatags\">\n <td>timestamp</td>\n <td>${keyvalues.old.meta[\"timestamp\"]}</td>\n <td>${keyvalues.new.meta[\"timestamp\"]}</td>\n </tr>\n <tr class=\"metatags\">\n <td><div>user</td>\n <td>${keyvalues.old.meta[\"user\"]}</td>\n <td>${keyvalues.new.meta[\"user\"]}</td>\n </tr>\n `;\n\n //Traverse uniqueKeysArray and check in object which value this key has in new and old\n for (let i = 0; i < uniqueKeysArr.length; i++) {\n let oldTag = keyvalues.old.tags[uniqueKeysArr[i]];\n let newTag = keyvalues.new.tags[uniqueKeysArr[i]];\n let cssClass;\n //Case 1: Tag deleted in new --> Background color red, change from \"undefined\" to \"\"\n if (!newTag) {\n cssClass = \"delete\";\n newTag = \"\";\n }\n //Case 2: Tag created in new --> Background color create, change from \"undefined\" to \"\"\n else if (!oldTag) {\n cssClass = \"create\";\n oldTag = \"\";\n }\n //Case 3: Tag different in new --> Background color yellow\n else if (oldTag !== newTag) cssClass = \"modify\";\n\n //Case 4: Tags similar --> Don't display this key-value pair\n else cssClass = \"'unchanged'\";\n // else continue;\n // Better option: Add a class \"unchanged\", hide them and add a button to show similar tags\n // Table height needs to update see https://leafletjs.com/reference.html#divoverlay-contentupdate\n // table rows can be animated https://stackoverflow.com/a/37376274/5263954\n\n tableHtml += `\n <tr ${(cssClass ? 'class=' + cssClass : '')}>\n <td>${uniqueKeysArr[i]}</td>\n <td>${oldTag}</td>\n <td>${newTag}</td>\n </tr>\n `\n }\n }\n\n tableHtml += `\n </tbody>\n </table>\n `;\n\n //Create link to edit geometry in iD editor (only if element has not been deleted - deleted elements cannot be edited)\n if (action !== \"delete\") {\n tableHtml += `<a href=\"https://www.openstreetmap.org/edit?${node[0].nodeName}=${node[0].getAttribute(\"id\")}\" target=\"_blank\" rel=\"noopener noreferrer\">Edit in iD</a>`;\n }\n\n return tableHtml;\n }\n }", "title": "" }, { "docid": "7026ce1a01d5605e9cc260b2032dacee", "score": "0.54991645", "text": "async createRecord(tableName, data) {\n const { cols, values } = getColValues(data);\n const colList = `(${cols.join(\",\")})`;\n const valList = `(${values.join(\", \")})`;\n const insert = `INSERT INTO ${tableName} ${colList} VALUES ${valList}`;\n return this.run(insert);\n }", "title": "" }, { "docid": "341a6ba51535102c19e91b3af0a93d8b", "score": "0.54908735", "text": "function addRow(tableID, itemName, itemQnt, itemPrice) {\n // Get a reference to the table\n var tableRef = document.getElementById(tableID);\n // Insert a row in the table at row index 0\n var newRow = tableRef.insertRow(0);\n //store.set('COUNTER', store.get('COUNTER')++);\n // Insert a cell in the row at index 0\n var newCell = newRow.insertCell(0);\n // Append a text node to the cell\n var newText = document.createTextNode(itemName);\n newCell.appendChild(newText);\n\n// ----------------------------------------------------------------\n // Insert a cell in the row at index 0\n var newCell = newRow.insertCell(1);\n var clone = document.getElementById(\"minus-button\").cloneNode(true),\n timestamp = Date.now();\n clone.id+='_'+timestamp;\n newCell.appendChild(clone);\n\n // Append a text node to the cell\n var clone = document.getElementById(\"qnt\").cloneNode(true);\n clone.text = itemQnt;\n //var newText = document.createTextNode(itemQnt);\n newCell.appendChild(clone);\n\n var clone = document.getElementById(\"plus-button\").cloneNode(true),\n timestamp = Date.now();\n clone.id+='_'+timestamp;\n newCell.appendChild(clone);\n// ----------------------------------------------------------------\n// ----------------------------------------------------------------\n // Insert a cell in the row at index 0\n var newCell = newRow.insertCell(2);\n // Append a text node to the cell\n itemPrice = parseFloat(Math.round(itemPrice * 100) / 100).toFixed(2);\n var newText = document.createTextNode(\"€ \"+itemPrice);\n newCell.appendChild(newText);\n// ----------------------------------------------------------------\n// -------------------------------------------------------\n\n// ----------------------------------------------------------------\n // Insert a cell in the row at index 0\n var newCell = newRow.insertCell(3);\n // Append a text node to the celL\n\n var clone = document.getElementById(\"trash-button\").cloneNode(true),\n timestamp = Date.now();\n clone.id+='_'+timestamp;\n\n newCell.appendChild(clone);\n\n// -------------------------------------------------------\n}", "title": "" }, { "docid": "e10bfe0396dd4ed4cc838dfcfa397402", "score": "0.54886097", "text": "function tableCreate(width, height) {\n const table = document.getElementById('game-table');\n while (table.hasChildNodes()) {\n table.removeChild(table.firstChild)\n }\n\n for (let row_index = 0; row_index < height; row_index++) {\n const row = table.insertRow(row_index);\n for (let col_index = 0; col_index < height; col_index++) {\n const col = row.insertCell(col_index);\n col.id = 'cell-row-' + row_index + '-col-' + col_index;\n col.classList.add('game-table-field');\n // col.addEventListener(\"click\", ()= > console.log('Clicked r:' + row_index + ' c:' + col_index))\n col.addEventListener(\"click\", () => requestJSON(\"/spielebrett/\" + name + \"/set-mark/\" + row_index + \"/\" + col_index, checkForUpdate))\n }\n }\n}", "title": "" }, { "docid": "91e09a9e55505003f1dc1e4c7bf09ac0", "score": "0.5486116", "text": "function createTable() {\n $tbody.innerHTML = \"\";\n\n //iterate through dataset\n for (var i = 0; i < 350; i++) {\n var sighting = dataset[i];\n\n // pull out the sightings\n var fields = Object.keys(sighting);\n\n // create a new row\n var $row = $tbody.insertRow(i);\n\n // iterate through individual data values and put them into cells\n for (var j = 0; j < fields.length; j++) {\n var field = fields[j];\n\n var $cell = $row.insertCell(j);\n $cell.innerHTML = sighting[field];\n }\n }\n}", "title": "" }, { "docid": "2beae98ac3c971f1497ef3049208861e", "score": "0.5483148", "text": "function CreateEmployeeTable() {\r\n const headerHTML = \"<tr><th></th><th>Name</th><th>Gender</th><th>Department</th><th>Salary</th><th>Start Date</th><th>Actions</th></tr>\"\r\n let innerHTML = `${headerHTML}`;\r\n for (const employeePayrollData of employeePayrollList) {\r\n innerHTML = `${innerHTML} \r\n <tr>\r\n <td><img alt = \"\" src=\"${employeePayrollData._profilePic}\"></td>\r\n <td>${employeePayrollData._name}</td>\r\n <td>${employeePayrollData._gender}</td>\r\n <td>${GetDepartment(employeePayrollData._department)}</td>\r\n <td>${employeePayrollData._salary}</td>\r\n <td>${GetDate(employeePayrollData._startDate)}</td>\r\n <td>\r\n <img class=\"action-label\" id=\"${employeePayrollData._id}\" onclick=\"remove(this)\" alt=\"delete\" src=\"Assert/delete.svg\">\r\n <img class=\"action-label\" id=\"${employeePayrollData._id}\" onclick=\"update(this)\" alt=\"edit\" src=\"Assert/create.svg\">\r\n </td>\r\n </tr>`;\r\n }\r\n document.querySelector('#table-display').innerHTML = innerHTML;\r\n}", "title": "" }, { "docid": "36995af91d6aed5fd55ebd63d3f10d06", "score": "0.5478719", "text": "add_item(item) {\n\n //create new table row in dom\n const tr = document.createElement(\"tr\")\n tr.innerHTML = `<td>${item.id}</td>\n <td>${item.name}</td>\n <td>$ ${item.price_p_day}</td>\n <td>$ ${item.price_p_week}</td>\n <td>${item.quantity}</td>\n <td>${item.quantity}</td>\n <td>${item.quantity}</td>\n <td>\n <a href=\"#\" data-id=\"${item.id}\"><i class=\"fa fa-edit\"></i></a>\n <a href=\"#\" data-id=\"${item.id}\"><i class=\"fa fa-eye\"></i></a>\n <a href=\"#\" data-id=\"${item.id}\"><i class=\"fa fa-trash\"></i></a>\n </td>`\n //appned item in list \n this.table_item.firstElementChild.lastElementChild.appendChild(tr)\n\n }", "title": "" }, { "docid": "93223e4947d0ed5814cf874c70b2d812", "score": "0.5477267", "text": "create(cols, vals, cb) {\n orm.create(\"jobs\", cols, vals, (res) => {\n cb(res);\n });\n }", "title": "" }, { "docid": "406d56e7d00aed788c1e691ca3ff09c1", "score": "0.5477257", "text": "function ListDBValues() {\n $('#product_id').html('');\n var db = openDatabase('mydb-test', '1.0', 'sqllite test database', 2 * 1024 * 1024);\n db.transaction(function (transaction) {\n transaction.executeSql('SELECT * FROM Product;', [],\n function (transaction, result) {\n if (result != null && result.rows != null) {\n console.log(result.rows)\n for (var i = 0; i < result.rows.length; i++) {\n var row = result.rows.item(i);\n console.log(row.Name)\n $('#product_id').append(\"<tr>\" + \"\\n\" + \"<td>\" + row.Id + \"</td>\" + \"\\n\" + \"<td>\" + row.product_name + \"</td>\" +\n \"\\n\" + \"<td>\" + row.product_price + \"</td>\" + \"\\n\" + \"<td>\" + row.product_code + \"</td>\" + \"\\n\" + \"<td>\" + \"<button class='btn btn-primary' id='del' value=\" + row.Id + \"> Delete</button>\" + \"</td>\" + \"\\n\" + \"</tr>\");\n }\n }\n }, errorHandler);\n }, errorHandler, nullHandler);\n\n return;\n}", "title": "" }, { "docid": "8f4ba4e321e84cd944b9665701b8fb93", "score": "0.54743487", "text": "function createtable(opt,isExport) {\r\n\r\n\tvar tableId = opt.tableId,\r\n\t\tcolumns = opt.columns;\r\n\t\r\n\tvar url = getURL(opt,isExport);\r\n\tvar modalURL = \"\";\r\n\t$.ajax(url,{\r\n\t\ttype:\"get\",\r\n\t\tsuccess:function(data) {\r\n\t\t\tvar dataList=eval(\"(\"+data+\")\"),\r\n\t\t\tdataListLen=dataList.length,\r\n\t\t\tcolumnArr=columns.split(\";\"),\r\n\t\t\ttbHtml=\"\",\r\n\t\t\tclicks=0;\r\n\r\n\t\t\tfor (var i=0; i<dataListLen; i++) {\r\n\t\t\t\ttbHtml+=\"<tr>\";\r\n\t\t\t\tfor (var j=0; j<columnArr.length; j++) {\r\n\t\t\t\t\t\r\n\t\t\t\t\t// 如果有值,往表格 td 中添加对应内容 \r\n\t\t\t\t\tif (dataList[i][columnArr[j]]) {\r\n\r\n\t\t\t\t\t\t// 如果是物料报告, 要对广告物料预览进行特殊处理\r\n\t\t\t\t\t\t// 给 columnArr 的列都加上 class 为 origin-data\r\n\t\t\t\t\t\t// 便于通过 filter(.td.origin-data) 操作进行筛选\r\n\t\t\t\t\t\tif (tableId == \"materiel\") {\r\n\t\t\t\t\t\t\t// 给点击量的 td 添加 a 标签 => 点击数字弹出模态框\r\n\t\t\t\t\t\t\tif (columnArr[j]==\"hitnum\") {\r\n\t\t\t\t\t\t\t\ttbHtml+=\"<td class=\\\"origin-data numeric text-center\\\"><a href=\\\"javascript:void(0);\\\">\"+dataList[i][columnArr[j]]+\"</a></td>\";\r\n\t\t\t\t\t\t\t} else if (columnArr[j] == \"am_img_position\" || columnArr[j] == \"am_font_content\" || columnArr[j] == \"am_type\") {\r\n\r\n\t\t\t\t\t\t\t\t// “图片链接地址”项 , “文字说明” 项 和 “类型id”项 不展示在页面中 \r\n\t\t\t\t\t\t\t\t// 通过样式(.materiel-hidden)设置 display: none\r\n\t\t\t\t\t\t\t\t// 这样处理的优势: 该列不显示在 table 中, 但是可以通过 dom 操作获取到。\r\n\t\t\t\t\t\t\t\tif (columnArr[j] != \"am_type\") {\r\n\t\t\t\t\t\t\t\t\ttbHtml+=\"<td class=\\\"origin-data materiel-hidden\\\">\"+dataList[i][columnArr[j]]+\"</td>\";\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\ttbHtml+=\"<td class=\\\"origin-data materiel-hidden\\\">\"+dataList[i][columnArr[j]]+\"</td>\";\r\n\r\n\t\t\t\t\t\t\t\t\t// 增加物料预览列,由于此列非 columnArr 里直接数据(此列只是用于页面展示),故不加 class “origin-data”\r\n\t\t\t\t\t\t\t\t\t// 如果是类型id, 要分情况展示 1: 文字; 2:图片; 3:文字 + 图片\r\n\t\t\t\t\t\t\t\t\tif (dataList[i].am_type == 1) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t// 类型为文字: 展示文字说明 am_font_content\r\n\t\t\t\t\t\t\t\t\t\ttbHtml+=\"<td class=\\\"numeric text-center\\\">\"+dataList[i].am_font_content+\"</td>\";\r\n\t\t\t\t\t\t\t\t\t} else if (dataList[i].am_type == 2) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t// 类型为图片: 展示图片 am_img_position 放置在 img 标签中\r\n\t\t\t\t\t\t\t\t\t\t// 图片未找到\r\n\t\t\t\t\t\t\t\t\t\ttbHtml+=\"<td class=\\\"numeric text-center\\\"><img class=\\\"materiel-img\\\" src=\\\"\"+picUrl+dataList[i].am_img_position+\"\\\"></td>\";\r\n\t\t\t\t\t\t\t\t\t\t// tbHtml+=\"<td class=\\\"numeric text-center\\\"><img src=\\\"http://img.mukewang.com/5704a68f0001e20206000338-240-135.jpg\\\"></td>\";\r\n\r\n\t\t\t\t\t\t\t\t\t} else if (dataList[i].am_type == 3) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t// 类型为文字 + 图片: 二者均展示\r\n\t\t\t\t\t\t\t\t\t\ttbHtml+=\"<td class=\\\"numeric text-center\\\"><img class=\\\"materiel-img\\\" src=\\\"\"+picUrl+dataList[i].am_img_position+\"\\\"></br>\"+dataList[i].am_font_content+\"</td>\";\r\n\t\t\t\t\t\t\t\t\t\t// tbHtml+=\"<td class=\\\"numeric text-center\\\"><img src=\\\"http://img.mukewang.com/5704a68f0001e20206000338-240-135.jpg\\\"></br>\"+dataList[i].am_font_content+\"</td>\";\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\ttbHtml+=\"<td class=\\\"origin-data numeric text-center\\\">\"+dataList[i][columnArr[j]]+\"</td>\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\r\n\t\t\t\t\t\t\t// 如果不是物料报告,给点击量的 td 添加 a 标签(除了整体报告外都可点击弹出模态框)\r\n\t\t\t\t\t\t\tif (columnArr[j]==\"hitnum\" && tableId!=\"resultList\") {\r\n\t\t\t\t\t\t\t\ttbHtml+=\"<td class=\\\"numeric text-center\\\"><a href=\\\"javascript:void(0);\\\">\"+dataList[i][columnArr[j]]+\"</a></td>\";\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\ttbHtml+=\"<td class=\\\"numeric text-center\\\">\"+dataList[i][columnArr[j]]+\"</td>\";\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t// 如果无值, td 内容为空\r\n\t\t\t\t\t\tif (columnArr[j] == \"am_img_position\" || columnArr[j] == \"am_font_content\") {\r\n\t\t\t\t\t\t\ttbHtml+=\"<td class=\\\"origin-data materiel-hidden\\\">\"+dataList[i][columnArr[j]]+\"</td>\";\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\ttbHtml+=\"<td class=\\\"numeric text-center\\\">&nbsp;</td>\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t};\r\n\t\t\t\t\tif (columnArr[j]==\"hitnum\") {\r\n\t\t\t\t\t\tclicks+=Number(dataList[i][columnArr[j]]);\r\n\t\t\t\t\t};\r\n\t\t\t\t};\r\n\t\t\t\ttbHtml+=\"</tr>\";\r\n\t\t\t};\r\n\r\n\t\t\t$(\"#\"+tableId+\" table tbody\").html(tbHtml);\r\n\t\t\t$(\"#\"+tableId+\" .f20 span\").text(clicks);\r\n\t\t\t\r\n\t\t\t// datatables using\r\n\r\n\t\t\twageNowTable = $(\"#\"+tableId+\" table\").dataTable({\r\n\t\t\t\tlanguage:{\r\n\t\t\t\t\temptyTable: '表格无数据'\r\n\t\t\t\t},\r\n\t\t\t\tinfo: false,\r\n\t\t\t\tsearching: false,\r\n\t\t\t\tpaging: false,\r\n\t\t\t\tordering: true,\r\n\t\t\t\tlengthChange: false,\r\n\t\t\t\tdestroy: true,\r\n\t\t\t\tretrieve: true,\r\n\t\t\t\tbDestroy: true\r\n\t\t\t})\r\n\t\t\r\n\t\t\tcancelLoading();\r\n\t\t}\r\n\t});\r\n}", "title": "" }, { "docid": "e0eb9f222055bd4843ff3a20c253ec85", "score": "0.54668677", "text": "function loopRow(data) {\n let resultEl = document.getElementById(\"result\"),\n tr = document.createElement(\"tr\");\n\n if (data && data.idnum) {\n data.edit = \"Edit-\" + data.idnum;\n data.delete = \"Delete-\" + data.idnum;\n }\n\n Object.values(data).forEach((val, i) => {\n let td = document.createElement(\"td\"),\n cellText = document.createTextNode(val);\n\n if (typeof val === \"string\") {\n if (val.includes(\"Edit\")) {\n cellText = crudButton(td, val, \"Edit\");\n }\n if (val.includes(\"Delete\")) {\n cellText = crudButton(td, val, \"Delete\");\n }\n }\n td.appendChild(cellText);\n tr.appendChild(td);\n });\n\n resultEl.appendChild(tr);\n}", "title": "" }, { "docid": "832dcca3f6dac98cb0b492fcd3d94da4", "score": "0.5465581", "text": "function displayTable(aPet){\r\n var tableBody=document.getElementById(\"rowPet\");\r\n var row = `\r\n <tr id=\"${aPet.id}\">\r\n <td> ${aPet.name} </td>\r\n <td> ${aPet.age} </td>\r\n <td> ${aPet.gender} </td>\r\n <td> ${aPet.breed} </td>\r\n <td> ${aPet.service} </td>\r\n <td> ${aPet.ownerName} </td>\r\n <td> ${aPet.contactPhone} </td>\r\n <td> <button onclick='deletePet(\"${aPet.id}\")'> Delete </button> </td>\r\n \r\n </tr>`;\r\n tableBody.innerHTML+=row;\r\n\r\n}", "title": "" }, { "docid": "21ec651b91b6ce6cf60dd0208a422155", "score": "0.5463419", "text": "function CargaDb() {\n var active = dataBase.result;\n var data = active.transaction([\"clientes\"], \"readonly\");\n var object = data.objectStore(\"clientes\");\n var elements = [];\n object.openCursor().onsuccess = function (e) {\n var result = e.target.result;\n if (result === null) {\n return;\n }\n elements.push(result.value);\n result.continue();\n };\n data.oncomplete = function () {\n var outerHTML = '';\n for (var key in elements) {\n outerHTML += '\\n\\\n <tr>\\n\\\n <td>' + elements[key].id + '</td>\\n\\\n <td>' + elements[key].nombre + '</td>\\n\\\n <td>' + elements[key].apellido + '</td>\\n\\\n <td>' + elements[key].cedula + '</td>\\n\\\n <td>' + elements[key].edad + '</td>\\n\\\n <td>' + elements[key].sexo + '</td>\\n\\\n <td>' + elements[key].direccion + '</td>\\n\\\n <td>' + elements[key].correo + '</td>\\n\\\n <td>' + elements[key].telefono + '</td>\\n\\\n <td>\\n\\<button type=\"button\" onclick=\"recuperar(' + elements[key].id + ')\" class=\"boton\"><i class=\"\tfa fa-cog\"> &nbsp;</i>Editar</button>\\n\\\n <td>\\n\\<button type=\"button\" onclick=\"deletedate(' + elements[key].id + ')\" class=\"boton\"><i class=\"fas fa-trash-alt\"> &nbsp;</i>Eliminar</button>\\n\\\n </tr>';\n }\n \n var outerHTML2 = \"<tr><td colspan='9'>No hay elementos que mostrar..</td></tr>\"\n \n if (elements.length !== 0) {\n elements = [];\n document.querySelector(\"#elementsList\").innerHTML = outerHTML;\n } else {\n document.querySelector(\"#elementsList\").innerHTML = outerHTML2;\n }\n \n };\n}", "title": "" }, { "docid": "7274521782b6f486aa4fa5f6aa96c2ab", "score": "0.5462419", "text": "function CreateRecord(usu_id, usu_app, usu_apm, usu_nom, usu_gru, usu_cor) {\n const record = document.querySelector('#table_profesores');\n let tr = document.createElement('tr');\n tr.id = usu_id;\n\n let td_usu_app = document.createElement('td');\n td_usu_app.textContent = usu_app;\n\n let td_usu_apm = document.createElement('td');\n td_usu_apm.textContent = usu_apm;\n\n let td_usu_nom = document.createElement('td');\n td_usu_nom.textContent = usu_nom;\n\n let td_usu_gru = document.createElement('td');\n td_usu_gru.id = usu_gru;\n td_usu_gru.textContent = usu_gru;\n\n let td_usu_cor = document.createElement('td');\n td_usu_cor.textContent = usu_cor;\n\n let td_btn = document.createElement('td');\n\n let btn_information = document.createElement('button');\n btn_information.textContent = \"Editar información \";\n btn_information.id = `${usu_id}BTN`;\n btn_information.className = \"consultar\";\n\n btn_information.addEventListener('click', information);\n\n let span_img = document.createElement('span');\n span_img.className = \"las la-question-circle\";\n\n btn_information.appendChild(span_img);\n\n td_btn.appendChild(btn_information);\n\n tr.appendChild(td_usu_app);\n tr.appendChild(td_usu_apm);\n tr.appendChild(td_usu_nom);\n tr.appendChild(td_usu_gru);\n tr.appendChild(td_usu_cor);\n tr.appendChild(td_btn);\n\n record.appendChild(tr);\n}", "title": "" }, { "docid": "ed733f0b2195597a92dd88aee7c00b73", "score": "0.5461211", "text": "static showHtml(id,name,email,mobile){\n const trEl= document.createElement('tr');\n trEl.innerHTML=`\n <tr role='row'>\n <td>${name} </td>\n <td>${email}</td>\n <td>${mobile}</td>\n <td>\n <button class=\"btn btn-info edit\" data-id=\"${id}\">Edit</button>\n <button class=\"btn btn-danger delete\" data-id=\"${id}\">Delete</button>\n </td>\n </tr>\n `;\n tableBody.appendChild(trEl);\n }", "title": "" }, { "docid": "8b895fe5ec9b558e5b7bc34deb5af129", "score": "0.54608446", "text": "function tableeditor() {\n $('#book_table').Tabledit({\n url: '/bookedit',\n columns: {\n identifier: [0, 'bookid'],\n editable: [\n [1, 'googleId'],\n [2, 'title'],\n [3, 'isbn'],\n [4, 'publisher'],\n [5, 'publishedDate'],\n //[6, 'description'],\n [7, 'pageCount'],\n [8, 'rating'],\n [9, 'price'],\n [10, 'quantityAvailable'],\n [11, 'authors']\n ]\n },\n\n editButton: true,\n deleteButton: true,\n buttons: {\n edit: {\n class: 'btn btn-sm btn-primary',\n html: 'EDIT',\n action: 'edit'\n },\n delete: {\n class: 'btn btn-sm btn-danger',\n html: 'DELETE',\n action: 'delete'\n },\n save: {\n class: 'btn btn-sm btn-success',\n html: 'Save'\n },\n restore: {\n class: 'btn btn-sm btn-warning',\n html: 'Restore',\n action: 'restore'\n },\n confirm: {\n class: 'btn btn-sm btn-warning',\n html: 'Confirm'\n }\n },\n\n onSuccess: function (data, textStatus, jqXHR) {\n $('#book_table')\n .DataTable()\n .destroy()\n createbookTable()\n }\n\n })\n}", "title": "" }, { "docid": "f9362d25f930b58655285a670b145580", "score": "0.5458878", "text": "function cargarTablaDetalle() {\n var $modal = $('#tableDetalleGuia'),\n $editor = $('#tableDetalleGuia'),\n $editorTitle = $('#tableDetalleGuia');\n\n \n ft = FooTable.init('#tableDetalleGuia', {\n editing: {\n enabled: true,\n addRow: function () {\n if (confirm(MENSAJE_CANCELAR_EDICION)) {\n location.reload();\n }\n },\n editRow: function (row) {\n var values = row.val();\n var idProducto = values.idProducto;\n alert(idProducto);\n },\n deleteRow: function (row) {\n var values = row.val();\n var idProducto = values.idProducto;\n row.delete();\n }\n }\n });\n \n }", "title": "" }, { "docid": "2476da425ab58164e5438dfccf641c0a", "score": "0.5456443", "text": "createTableRow (contract) {\n return(\n <tr key={contract.unique_id}>\n <td>{ contract.id }</td>\n <td>{ contract.status }</td>\n <td>{ contract.company }</td>\n <td>{ contract.startDate }</td>\n <td>{ contract.endDate }</td>\n <td>{ contract.description }</td>\n <td>{ contract.contactEmail }</td>\n <td>{ contract.contactPhone }</td>\n <td><Button color=\"danger\" onClick={() => this.props.onDeleteContract(contract.unique_id) }>Delete</Button></td>\n </tr>\n )\n }", "title": "" }, { "docid": "3f166efb4f86075d237b5816311c0297", "score": "0.54509425", "text": "function funcionParaInsertarDatos(data) {\n //For each 'element' in the dataset (in this case, calle 'data'), the function\n // will push the data into a row of the table (created before), but careful!\n // you have to specify that you want that information 'appended' in the table row \n // abbreviated here as 'tr'.\n data.forEach(element => {\n var row = tableQuique.append('tr');\n Object.entries(element).forEach(([key, value]) => {\n var cell = row.append('td');\n cell.text(value);\n });\n });\n \n}", "title": "" }, { "docid": "f5f109765dafd6557face5f2ed214d2e", "score": "0.54494774", "text": "function generateUfoData(table, proof) {\n table.html(\"\") // Clear any existing data from the html.. \n // Proof is empty but will represent tableData object values:\n for (let element of proof) {\n let row = table.append(\"tr\");\n for (key in element) {\n let cell = row.append(\"td\");\n cell.text(element[key])\n\n }\n }\n }", "title": "" }, { "docid": "563f148e336524e707a0eaa47d75a433", "score": "0.54479575", "text": "function addARow() {\n var empTab = document.getElementById('empTable');\n // console.log(material_bc);\n var rowCnt = empTab.rows.length; // table row count.\n // var rowCnt = rowNum;// on every emit we commnunite the total number of row..\n var tr = empTab.insertRow(rowCnt); // the table row.\n tr = empTab.insertRow(rowCnt);\n\n for (var c = 0; c < arrHead.length; c++) {\n var td = document.createElement('td'); // table definition.\n td = tr.insertCell(c);\n\n if (c == 0) { // the first column.\n // add a button in every new row in the first column.\n var button = document.createElement('input');\n // set input attributes.\n button.setAttribute('type', 'button');\n button.setAttribute('value', 'remove');\n button.setAttribute('id','rmbtm');\n button.setAttribute('class', 'comp');\n // button.\n // add button's 'onclick' event.\n button.setAttribute('onclick', 'removeRow(this)');\n td.appendChild(button);\n }\n if (c == 1) { // the second column.\n\n // add materials as dropdown options - later\n var ele = document.createElement('input');\n ele.setAttribute('type', 'text');\n ele.setAttribute('id','comp');\n ele.setAttribute('value', '');\n ele.setAttribute('class', 'comp');\n td.appendChild(ele); \n }\n if (c == 2) { // the third column.\n // add materials as dropdown options\n var ele = document.createElement('input');\n ele.setAttribute('type', 'text');\n ele.setAttribute('id','desc');\n // run a for loop at material_bc ? for description ?\n // ele.setAttribute('value', '');\n ele.setAttribute('class', 'comp');\n td.appendChild(ele);\n }\n\n if (c == 3) { // the third column.\n // add materials as dropdown options\n var ele = document.createElement('input');\n ele.setAttribute('type', 'text');\n ele.setAttribute('id','qty');\n ele.setAttribute('value', '');\n ele.setAttribute('class', 'comp');\n td.appendChild(ele);\n }\n\n if (c == 4) { // the second column.\n // add materials as dropdown options\n var ele = document.createElement('input');\n ele.setAttribute('type', 'text');\n ele.setAttribute('id','unit');\n ele.setAttribute('value', 'EA');\n ele.setAttribute('class', 'comp');\n td.appendChild(ele);\n }\n\n }\n }", "title": "" }, { "docid": "4db59484d60540b049bc1401f5950892", "score": "0.54462606", "text": "function createTable(tableData) {\n var container = document.createElement(\"section\");\n container.classList.add(\"table-container\");\n container.id = \"tbl-part\";\n var title = document.createElement(\"h2\");\n var titletext = document.createTextNode(\"登録する情報を確認してください。\");\n title.appendChild(titletext);\n var table = document.createElement(\"table\");\n table.id = \"tbl\";\n var tableBody = document.createElement(\"tbody\");\n\n tableData.forEach(function (rowData, i) {\n if (i <= 10) {\n var row = document.createElement(\"tr\");\n\n rowData.forEach(function (cellData) {\n var cell = document.createElement(\"td\");\n cell.appendChild(document.createTextNode(cellData));\n row.appendChild(cell);\n });\n\n tableBody.appendChild(row);\n }\n });\n\n container.appendChild(table);\n table.appendChild(tableBody);\n document.body.appendChild(container);\n\n var getbl = document.getElementById(\"tbl-part\");\n var getbl2 = document.getElementById(\"tbl\");\n getbl.insertBefore(title, getbl2);\n}", "title": "" }, { "docid": "920016f7f9dbd71f690ed2d51c4e3c06", "score": "0.54427624", "text": "function fillInTable(data){\n for (index = 0; index < data.length; ++index) {\n addRowToTable(data[index]);\n }\n\n }", "title": "" } ]
8daca464c1f294486688fd63df1037e6
I move the cached source into the live source.
[ { "docid": "b7e97df7d94e8c6ff1f2f77f2e622ab2", "score": "0.0", "text": "function render() {\n\n isRendered = true;\n\n renderSource();\n\n }", "title": "" } ]
[ { "docid": "ea63327770d289b0d238c13928ca9f92", "score": "0.6284561", "text": "function updateSource() {\n var path = window.location.hash;\n if (path) {\n $frame.attr('src', path.substr(1));\n }\n }", "title": "" }, { "docid": "702a3c285937e299a6b46a0a4704bb16", "score": "0.62414014", "text": "function resetSourceMapCache() {\n sourceMapCache = {};\n }", "title": "" }, { "docid": "f5f8b1accb1d6fc38d1890805c42f4dd", "score": "0.5895229", "text": "function _source(src) {\n if (typeof src === 'undefined') {\n return src;\n }\n\n player.src = props.src = src;\n\n // reset progress\n progress = { start: 0, end: 0 };\n }", "title": "" }, { "docid": "3517bebb19d1837db97758744779fd68", "score": "0.5890147", "text": "function moveOutputToCache( itcb ) {\n var\n cacheFilePath = Y.doccirrus.media.getCacheDir() + cacheFile;\n\n if( config.compileOnly && -1 !== cacheFile.indexOf( '/' ) ) {\n // rename as requested\n cacheFilePath = cacheFile;\n }\n\n //cacheFile = Y.doccirrus.media.getCacheFileName( cacheMedia, true );\n\n Y.log( `Moving concatenated PDF to the media cache: ${cacheFilePath}`, 'debug', NAME );\n fs.rename( outFile, cacheFilePath, onCopiedToCache );\n\n function onCopiedToCache( err ) {\n if( err ) {\n Y.log( `Could not copy compiled PDF to cache directory: ${JSON.stringify( err )}`, 'warn', NAME );\n return itcb( err );\n }\n Y.log( `Compiled PDF copied to cache as: ${cacheFile}`, 'debug', NAME );\n itcb( null );\n }\n }", "title": "" }, { "docid": "d499b5fc2ff90cbde5d2eac0f0e6a32c", "score": "0.5723036", "text": "function SourcesCache() {\n this.sources = {};\n}", "title": "" }, { "docid": "e0d1957c56a5a2b8a0f0414dd53114fd", "score": "0.56643945", "text": "function _updateSource(source) {\n if (typeof source === 'undefined' || !('sources' in source) || !source.sources.length) {\n _log('Invalid source format', true);\n return;\n }\n\n // Pause playback\n _pause();\n\n // Update seek range and progress\n _updateSeekDisplay();\n\n // Reset buffer progress\n _setProgress();\n\n // Cancel current network requests\n _cancelRequests();\n\n // Clean up YouTube stuff\n if (plyr.type === 'youtube') {\n // Destroy the embed instance\n plyr.embed.destroy();\n\n // Clear timer\n window.clearInterval(plyr.timer.buffering);\n window.clearInterval(plyr.timer.playing);\n }\n // HTML5 Video\n else if (plyr.type === 'video' && plyr.videoContainer) {\n // Remove video wrapper\n _remove(plyr.videoContainer);\n }\n\n // Remove embed object\n plyr.embed = null;\n\n // Remove the old media\n _remove(plyr.media);\n\n // Set the type\n if ('type' in source) {\n plyr.type = source.type;\n\n // Get child type for video (it might be an embed)\n if (plyr.type === 'video') {\n var firstSource = source.sources[0];\n\n if ('type' in firstSource && _inArray(config.types.embed, firstSource.type)) {\n plyr.type = firstSource.type;\n }\n }\n }\n\n // Check for support\n plyr.supported = supported(plyr.type);\n\n // Create new markup\n switch(plyr.type) {\n case 'video':\n plyr.media = document.createElement('video');\n break;\n\n case 'audio':\n plyr.media = document.createElement('audio');\n break;\n\n case 'youtube':\n case 'vimeo':\n case 'soundcloud':\n plyr.media = document.createElement('div');\n plyr.embedId = source.sources[0].src;\n break;\n }\n\n // Inject the new element\n _prependChild(plyr.container, plyr.media);\n\n // Autoplay the new source?\n if (typeof source.autoplay !== 'undefined') {\n config.autoplay = source.autoplay;\n }\n\n // Set attributes for audio video\n if (_inArray(config.types.html5, plyr.type)) {\n if (config.crossorigin) {\n plyr.media.setAttribute('crossorigin', '');\n }\n if (config.autoplay) {\n plyr.media.setAttribute('autoplay', '');\n }\n if ('poster' in source) {\n plyr.media.setAttribute('poster', source.poster);\n }\n if (config.loop) {\n plyr.media.setAttribute('loop', '');\n }\n }\n\n // Classname reset\n plyr.container.className = plyr.originalClassName;\n\n // Restore class hooks\n _toggleClass(plyr.container, config.classes.fullscreen.active, plyr.isFullscreen);\n _toggleClass(plyr.container, config.classes.captions.active, plyr.captionsEnabled);\n _toggleStyleHook();\n\n // Set new sources for html5\n if (_inArray(config.types.html5, plyr.type)) {\n _insertChildElements('source', source.sources);\n }\n\n // Set up from scratch\n _setupMedia();\n\n // HTML5 stuff\n if (_inArray(config.types.html5, plyr.type)) {\n // Setup captions\n if ('tracks' in source) {\n _insertChildElements('track', source.tracks);\n }\n\n // Load HTML5 sources\n plyr.media.load();\n\n // Setup interface\n _setupInterface();\n\n // Display duration if available\n _displayDuration();\n }\n\n // Set aria title and iframe title\n config.title = source.title;\n _setTitle();\n\n // Reset media objects\n plyr.container.plyr.media = plyr.media;\n }", "title": "" }, { "docid": "7d31c620913b419472e37cf60331d742", "score": "0.5632063", "text": "function changeSource(src)\n{\n\telem.classList.remove('vjs-seeking'); //in case we were on a loading screen (will come back if actualy loading still needs to be done)\n\tplayer.src(src);\n}", "title": "" }, { "docid": "76f9f33c4fb937d3f4c1a26bd97685fa", "score": "0.56266356", "text": "cache () {\n this.cached = merge({}, this.staged)\n }", "title": "" }, { "docid": "26446745842cddc7dcd645778501818d", "score": "0.5626169", "text": "function refreshSrc(img, src) {\n\t\t$(img).attr('src','uploads/default/files/'+src+\"?\"+Math.floor(Math.random()*10000)); // Refresh the source\n\t}", "title": "" }, { "docid": "c49bf7dd6246ecb0fc0cbaa66fba5fdf", "score": "0.56218326", "text": "function refreshCache() {}", "title": "" }, { "docid": "9a006dc313472c726a3fc4446deb1e7c", "score": "0.56140345", "text": "function cache_buster_replace() {\n return src('dist/*.html')\n .pipe(replace('/main.css', css_replace))\n .pipe(dest('dist/'))\n}", "title": "" }, { "docid": "a49b430140c68b071ea83ec21ab2945b", "score": "0.56030256", "text": "static modifySource(codeChunkData, result, filePath) {\n return __awaiter(this, void 0, void 0, function* () {\n if (MODIFY_SOURCE) {\n yield MODIFY_SOURCE(codeChunkData, result, filePath);\n }\n else {\n // TODO: directly modify the local file.\n }\n codeChunkData.running = false;\n return result;\n });\n }", "title": "" }, { "docid": "5d28ad92aa06f1066197641bbfa2ce6c", "score": "0.5544052", "text": "static modifySource(codeChunkData, result, filePath) {\n return __awaiter(this, void 0, void 0, function* () {\n if (MODIFY_SOURCE) {\n yield MODIFY_SOURCE(codeChunkData, result, filePath);\n }\n else {\n // TODO: direcly modify the local file.\n }\n codeChunkData.running = false;\n return result;\n });\n }", "title": "" }, { "docid": "6e6d361ec3d89dedb2c75e568822be37", "score": "0.5512566", "text": "function moveToCache( itcb ) {\n Y.log( `Moving temp image to cache: ${tempImage}`, 'debug', NAME );\n tempImage._id = document._id;\n if( -1 === widthPx && -1 === heightPx ) {\n // extracted page at PDF resolution\n tempImage.transform = `pdfpage${pageNo}`;\n } else {\n // requested a document thumbnail at a specific size\n tempImage.transform = `${widthPx}x${heightPx}`;\n }\n Y.doccirrus.media.cacheStore( tempImage, itcb );\n }", "title": "" }, { "docid": "91406b262ea58927feb4b31bbf201985", "score": "0.54397655", "text": "function cacheBustTask() {\n return src('index.html')\n .pipe(\n cachebust({\n type: 'timestamp',\n })\n )\n .pipe(dest('.')); // put in the same place\n}", "title": "" }, { "docid": "16efbe78546be2a004f36e0542c3a85b", "score": "0.5437005", "text": "function updateCache() {\n\tvar cache = document.getElementById(\"cache\");\n\twhile (cache.firstChild) {\n\t\tcache.removeChild(cache.firstChild);\n\t}\n\tfor (var i = 0; i < CACHE_PRELOAD_SIZE; i++) {\n\t\tvar img = document.createElement('img');\n\t\timg.setAttribute(\"src\", getJson(slideIndex + i + 1).file.url);\n\t\tcache.appendChild(img);\n\t}\n\tfor (var i = 0; i < CACHE_POSTLOAD_SIZE; i++) {\n\t\tvar json = getJson(slideIndex - i - 1);\n\t\tif (json != 0) {\n\t\t\tvar img = document.createElement('img');\n\t\t\timg.setAttribute(\"src\", json.file.url);\n\t\t\tcache.appendChild(img);\n\t\t}\n\t}\n}", "title": "" }, { "docid": "ccc1b619f75b92f0197a09d3c2b00b05", "score": "0.54297066", "text": "function changeSource() { \n\n var state = $(this).attr(\"data-state\");\n var animateImage = $(this).attr(\"data-animate\");\n var stillImage = $(this).attr(\"data-still\");\n\n if(state == \"still\") {\n $(this).attr(\"src\", $(this).attr(\"data-animate\"));\n $(this).attr(\"data-state\", \"animate\");\n }\n\n else if(state == \"animate\") {\n $(this).attr(\"src\", $(this).attr('data-still'));\n $(this).attr(\"data-state\", \"still\");\n }\n}", "title": "" }, { "docid": "afd9e82d385a6826a0a8e27d1d513c09", "score": "0.54090494", "text": "function preCache() {\n var options = expiry.options\n , dir = Array.isArray(options.dir) ? options.dir : [options.dir]\n , callback = (typeof options.loadCache === 'object' && \n typeof options.loadCache.callback !== 'function') ? \n options.loadCache.callback : false;\n\n dir.forEach(function (dir) {\n findit.sync(dir, {}, function(file, stat) {\n if (stat.isFile() && (!callback || callback(file, stat))) {\n var urlCacheKey = file.substr(dir.length);\n if (!expiry.urlCache[urlCacheKey]) {\n expiry.urlCache[urlCacheKey] = fingerprintAssetUrl(urlCacheKey);\n }\n }\n });\n });\n}", "title": "" }, { "docid": "cc5cb8d492cbc1c159aeea091ef7b489", "score": "0.5398495", "text": "function lazyLoad(destiny){\r\n var destiny = getSlideOrSection(destiny);\r\n\r\n destiny.find('img[data-src], source[data-src], audio[data-src], iframe[data-src]').each(function(){\r\n $(this).attr('src', $(this).data('src'));\r\n $(this).removeAttr('data-src');\r\n\r\n if($(this).is('source')){\r\n $(this).closest('video').get(0).load();\r\n }\r\n });\r\n }", "title": "" }, { "docid": "c4fcd8ee68aeee567cfe9cdbe461c2f5", "score": "0.5362348", "text": "static onModifySource(cb) {\n MODIFY_SOURCE = cb;\n }", "title": "" }, { "docid": "4d429f50221aa619ac55c8c9c9aa617a", "score": "0.53602016", "text": "function lazyLoad(destiny){\n var destiny = getSlideOrSection(destiny);\n\n destiny.find('img[data-src], source[data-src], audio[data-src], iframe[data-src]').each(function(){\n $(this).attr('src', $(this).data('src'));\n $(this).removeAttr('data-src');\n\n if($(this).is('source')){\n $(this).closest('video').get(0).load();\n }\n });\n }", "title": "" }, { "docid": "db98cb72496c6b70cee694921fc8949e", "score": "0.5359555", "text": "function $importNoCache(src){\n var ms = new Date().getTime().toString();\n var seed = \"?\" + ms;\n \n $import(src + seed);\n}", "title": "" }, { "docid": "641ab0ca1edc5adcd3fc6fd7804648bf", "score": "0.5358157", "text": "static onModifySource(cb) {\n MODIFY_SOURCE = cb;\n }", "title": "" }, { "docid": "fb5e3615ac6fca59b48f1f417bfcd93f", "score": "0.5345758", "text": "function refreshSource(objHtmlImg) {\n\tif (objHtmlImg) {\n\t\tif (objHtmlImg.src) {\n\t\t\tobjHtmlImg.src = objHtmlImg.src;\n\t\t}\n\t}\n}", "title": "" }, { "docid": "0923c68e9dba168e1b29276277979300", "score": "0.5315468", "text": "async [$updateSource]() {\n const updateSourceProgress = this[$progressTracker].beginActivity();\n const source = this.src;\n try {\n this[$canvas].classList.add('show');\n await this[$scene].setModelSource(source, (progress) => updateSourceProgress(progress * 0.9));\n }\n catch (error) {\n this[$canvas].classList.remove('show');\n this.dispatchEvent(new CustomEvent('error', { detail: error }));\n }\n finally {\n updateSourceProgress(1.0);\n }\n }", "title": "" }, { "docid": "9e23cb5b0cb932e2b5560c0511b1849d", "score": "0.5286631", "text": "function cacheBuster(src) {\n var shasum = crypto.createHash('sha1');\n shasum.update(src);\n return shasum.digest('hex');\n}", "title": "" }, { "docid": "ca0c96230531dcdecf868f3a2d204be9", "score": "0.5277586", "text": "function reloadPlayer() {\r\n\tif (isVideoIcon()) return;\r\n\tvar playerParent = player.parentNode, playerNextSibling = player.nextSibling;\r\n\tplayerParent.removeChild(player);\r\n\tplayerParent.insertBefore(player, playerNextSibling);\r\n}", "title": "" }, { "docid": "3cae90f4a1110d3f7305252851176e77", "score": "0.52741617", "text": "function rekeySourceMap(cjsModuleInstance, newInstance) {\n const sourceMap = cjsSourceMapCache.get(cjsModuleInstance);\n if (sourceMap) {\n cjsSourceMapCache.set(newInstance, sourceMap);\n }\n}", "title": "" }, { "docid": "55e3b05052cfac38439447c4cc63c67e", "score": "0.5266354", "text": "function resetSource(){\n ctrl.image = queue[index].url + user.token;\n ctrl.title = queue[index].title\n }", "title": "" }, { "docid": "48751f9238c8175c7d4057c96ef02e71", "score": "0.52608", "text": "function buildCache(source, v) {\n for (var prop in source) {\n var obj = source[prop]\n , fpath = obj.__path\n , opath\n\n if (!fpath) {\n continue\n }\n\n if (!~fpath.indexOf(self.targetDir) && v) {\n opath = fpath\n fpath = fpath.replace(self.sourceDir, path.join(self.targetDir, v))\n }\n\n if (~fpath.indexOf('.js')) {\n try {\n // Since the filepath may not exist in the current version, use the \n // original filepath, cache the virtual module in require for later use\n require.cache[fpath] = Multiverse.requireVirtual(opath || fpath, null, obj)\n source[prop] = require.cache[fpath].exports\n } catch (e) { \n debug('error loading %s', fpath) \n }\n } else if (utils.isObject(obj)) {\n buildCache(obj, v || prop)\n }\n }\n }", "title": "" }, { "docid": "68a3a72b918398d698144988b242a5e9", "score": "0.5259618", "text": "initializeSources() {\n\t\tthis.sources.clear();\n\t\tfor ( let token of canvas.tokens.placeables ) {\n\t\t\ttoken.updateSource({defer: true});\n\t\t}\n\t}", "title": "" }, { "docid": "5afd189dcd21822e982ab66d13097cd9", "score": "0.524751", "text": "function precache() {\n var langPath = node.player.lang.path;\n W.lockScreen('Loading...');\n console.log('pre-caching...');\n W.preCache([\n 'languageSelection.html', // no text here.\n langPath + node.game.instructionsPage,\n langPath +'instructionsModule1.html'\n ], function() {\n console.log('Precache done.');\n // Pre-Caching done; proceed to the next stage.\n node.done();\n });\n}", "title": "" }, { "docid": "3e863f648d1c0b57cd32e85fe1d53bc0", "score": "0.52375126", "text": "function setSource( newSource ) {\n source = newSource;\n if ( isRendered ) {\n renderSource();\n }\n }", "title": "" }, { "docid": "c2c471a44e54e0a6c1dd214e658ee156", "score": "0.523058", "text": "function domContentSourceRevert() {\n\n\t\t\tvar fid = settings.frameIdent;\n\t\t\tvar elPlaceholder = $('[lbph=' + fid + ']');\n\t\t\tvar contentObj = contentStorage[fid];\n\t\t\tvar contentEl = (contentObj && contentObj.el) ? contentObj.el : null;\n\n\t\t\tdelete contentStorage[fid];\n\n\t\t\tif (contentEl) {\n\n\t\t\t\t//Reverting original display mode\n\t\t\t\tcontentEl.css('display', contentObj.display);\n\n\t\t\t\t// Returning content element\n\t\t\t\telPlaceholder.append(contentEl);\n\n\t\t\t\t// Removing placeholding wrapper\n\t\t\t\tcontentEl.unwrap();\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "03a6a4420e7060dbac26664b4b7f4512", "score": "0.5227814", "text": "reset(_source) {\n // Do nothing\n }", "title": "" }, { "docid": "871a1a0ea5bcc7a245333bcae4f761b2", "score": "0.52165854", "text": "_onSourcePlay()\n {\n cancelAnimationFrame(this._updateLoop);\n this._videoUpdateLoop();\n }", "title": "" }, { "docid": "2ad4389108da649896a38c6b2337b639", "score": "0.51938754", "text": "function use(src, cb) {\n\t\tvar existCr = store.get('credits/' + src);\n\n\t\t\t//if ava <1 - should initiate a refresh..first...? \n\t\tif (existCr && existCr.ava>0) {\n\t\t\t//rc.ava--;(?)\n\t\t\texistCr--;\n\t\t\tsave(exsistCr);\n\t\t\treturn cb(null);\n\t\t} else {\n\t\t\t//refresh.. (also two level of refresh!)\n\t\t\t//this could possibly lead to infinite loops! (if ava=0 but somehow use is initiated)\n\t\t\t\t//to avoid this best way is to do client check(?) first?\n\t\t\t\t\n\t\t\t//if to use this then a redesign of flow is require \n\t\t\t\t//complete client side pre check is needed \n\t\t\t\t//refresh is needed if necessary before calling server \n\t\t\t\t//otherwise could fetch a updated rec and stuck in the loop forever \n\t\t\trefresh(src, function(err) {\n\t\t\t\tif (err) return cb(err);\n\t\t\t\treturn use(src, cb)\n\t\t\t})\n\t\t}\t\t\n\t}", "title": "" }, { "docid": "5817eb32aabe616b523dd8f403a6f540", "score": "0.5186204", "text": "function setSource( newSource ) {\n\n source = newSource;\n\n if ( isRendered ) {\n\n renderSource();\n\n }\n\n }", "title": "" }, { "docid": "3d5d38047a1341eb79734376bef7b346", "score": "0.51851165", "text": "step() {\n const data = this.internal.entries.shift();\n if (data) {\n this.internal.updating = true;\n sourceBuffer.appendBuffer(data);\n }\n }", "title": "" }, { "docid": "2da42af23537c74f7fc6a01adda58237", "score": "0.51842356", "text": "function boom(){\n if(this.src.search('_s') !== -1){\n var changedSrc = this.src.replace('_s','');\n console.log(changedSrc);\n this.setAttribute('src', changedSrc);\n \n } else{\n var pattern = /[0-9]{3}(?=\\.gif)/;\n var found = this.src.match(pattern);\n var changedSrc = this.src.replace(found[0], found[0].concat('_s'));\n this.setAttribute('src', changedSrc);\n }\n }", "title": "" }, { "docid": "74264494fccff22f6398a0e04f90904c", "score": "0.51687443", "text": "function renderSource() {\n element[ 0 ].src = source;\n }", "title": "" }, { "docid": "a968fbb2cf5962ce69945028c42c6d38", "score": "0.51639146", "text": "function setSource(newSource) {\n\n source = newSource;\n\n if (isRendered) {\n\n renderSource();\n\n }\n\n }", "title": "" }, { "docid": "72bfe9edc9dd3d164987f9447794170f", "score": "0.5145776", "text": "function syncViews(){\n\n return gulp.src(\"src/views/*.html\")\n .pipe(gulp.dest(\"dist/views\"));\n\n}", "title": "" }, { "docid": "d122718504a0b073d9984c6dac36bb2b", "score": "0.51390046", "text": "cacheLoaded() {}", "title": "" }, { "docid": "d122718504a0b073d9984c6dac36bb2b", "score": "0.51390046", "text": "cacheLoaded() {}", "title": "" }, { "docid": "c4910d60069b07db4dcec62e9ec3b246", "score": "0.5134952", "text": "moveSource(state, { payload }) {\n state.canvas[xyToIndex(state.source, state.resolution)] = Data.White;\n if (typeof payload === \"object\") {\n state.canvas[xyToIndex(payload)] = Data.Source;\n state.source = payload;\n } else {\n state.canvas[payload] = Data.Source;\n state.source = indexToXy(payload, state.resolution);\n }\n state.canvasChanged = true;\n }", "title": "" }, { "docid": "87e940573bd00f2757cd33b08082d7f7", "score": "0.51238567", "text": "set src(source) {\n mockFn(source);\n }", "title": "" }, { "docid": "bc6e4c5c9bacb8642541f5de3da91d84", "score": "0.51111233", "text": "function renderSource() {\n\n element[0].src = source;\n\n }", "title": "" }, { "docid": "afa20059ddc1835b1bca4f1146bda0d1", "score": "0.5097007", "text": "clearCache() {}", "title": "" }, { "docid": "86bbe36841c901ca2312d336142178b1", "score": "0.50881004", "text": "_reloadTech() {\n var player = this.player,\n currentTime = player.currentTime(),\n wasPaused = player.paused(),\n sources = player.currentSources();\n\n // Reload the current source(s) to re-lookup and use the currently available Tech.\n // The chromecast Tech gets used if `ChromecastSessionManager.isChromecastConnected`\n // is true (effectively, if a chromecast session is currently in progress),\n // otherwise Video.js continues to search through the Tech list for other eligible\n // Tech to use, such as the HTML5 player.\n player.src(sources);\n\n player.ready(function() {\n if (wasPaused) {\n player.pause();\n } else {\n player.play();\n }\n player.currentTime(currentTime || 0);\n });\n }", "title": "" }, { "docid": "0e9424f334c3e5214ce3567a04ca9214", "score": "0.5087744", "text": "function renderSource() {\n\n element[ 0 ].src = source;\n\n }", "title": "" }, { "docid": "e02d1d23ca6cfcbe7d86afe76259bdba", "score": "0.50842404", "text": "function restoreFromCache() {\n if (window.localStorage.getItem(\"cache\")) {\n restoreCache = JSON.parse(window.localStorage.getItem(\"cache\"));\n htmleditor.setValue(restoreCache.html);\n jseditor.setValue(restoreCache.js);\n csseditor.setValue(restoreCache.css);\n\n $(\"#libjs\").val(restoreCache.extJS);\n $(\"#libcss\").val(restoreCache.extCSS);\n }\n }", "title": "" }, { "docid": "3bbc2bed704f3c5ee28de369d2bfead3", "score": "0.508332", "text": "_setResource(resource) {\n // If resource already set, throw a warning and abort\n if (this.origin.resource) {\n console.log(\"Warning: trying to replace resource for \"+this.origin.content+\"; several host copies of the same file? Ignoring new resource.\");\n return Abort;\n }\n // Remove the instruction('s origin) from the list\n let idx = _instructionsToPreload.indexOf(this.origin);\n if (idx >= 0)\n _instructionsToPreload.splice(idx, 1);\n // Set the resource\n this.origin.resource = resource;\n }", "title": "" }, { "docid": "7c7fd700f510108ee591b36604efaf67", "score": "0.5077976", "text": "setSources(){}", "title": "" }, { "docid": "27357d9d83195a487bef000c3467edcd", "score": "0.5045818", "text": "function move_source(destination){\n\n var source = scriptPath + '/../source/Foundry.zip',\n data = fs.ReadStream(source);\n\n // copy to current location\n var dest = cwd+destination;\n\n // reading archives\n var zip = new AdmZip(source);\n\n zip.extractAllTo(/*target path*/dest, /*overwrite*/true);\n\n // ncp(dest+'/Foundry', dest, function (err) {\n // if (err) {\n // return console.error(err);\n // }\n\n // // rimraf(dest+'/Foundry', function(){\n // // // console.log('delete Foundry');\n // // });\n\n // // rimraf(dest+'/__MACOSX', function(){\n // // // console.log('delete __MACOSX');\n // // });\n // });\n }", "title": "" }, { "docid": "83c424cb57e9920444a5e712ef6675a6", "score": "0.50219476", "text": "function actionUpdateSources (sources) {\n\t\tObject.keys(sources).forEach(key => allSources.set(key, sources[key]));\n\n\t\t$sources.innerHTML = '';\n\t\tallSources.forEach((source, key) => $sources.appendChild(buildSourceItem(source, key)));\n\n\t\tif (allSources.size < 1) {\n\t\t\t$sources.appendChild(emptyHTML);\n\t\t}\n\t}", "title": "" }, { "docid": "ee19170aed5bb7868fa6f23c73042c8c", "score": "0.5021325", "text": "function replaceSource(object, canvas) {\n if (object.get(\"typeThing\") == \"video\") {\n var vidObj = document.createElement(\"video\");\n var vidSrc = document.createElement(\"source\");\n vidSrc.src = object.get(\"source\");\n vidObj.appendChild(vidSrc);\n vidObj.addEventListener(\"loadeddata\", function(){\n vidObj.width = this.videoWidth;\n vidObj.height = this.videoHeight;\n vidObj.currentTime = 0;\n vidObj.muted = true;\n vidObj.autoplay = true;\n vidObj.loop = true;\n function waitLoad() {\n if (vidObj.readyState >= 3) {\n newMockup(vidObj, \"video\", object.get(\"source\"), canvasrecord);\n } else {\n window.setTimeout(function(){\n waitLoad()\n },100)\n }\n }\n window.setTimeout(function(){\n waitLoad()\n },100)\n });\n vidObj.currentTime = 0;\n } else if (object.get(\"typeThing\") == \"image\") {\n var img = new Image();\n img.onload = function(){\n object.setElement(img);\n canvas.renderAll();\n if (object.get(\"id\") == \"screen\") {\n canvasrecord.remove(\"mockup\");\n newMockup(img, \"image\", object.get(\"source\"), canvasrecord);\n }\n }\n img.src = object.get(\"source\");\n }\n }", "title": "" }, { "docid": "b9d69248d44438fed4b7b74ad2a94e8c", "score": "0.50134814", "text": "load() {\n if (this.state == TileState.IDLE) {\n this.state = TileState.LOADING;\n this.changed();\n\n let leftToLoad = 0;\n\n this.sourcesListenerKeys_ = [];\n this.sourceTiles_.forEach((tile) => {\n const state = tile.getState();\n if (state == TileState.IDLE || state == TileState.LOADING) {\n leftToLoad++;\n\n const sourceListenKey = listen(\n tile,\n EventType.CHANGE,\n function (e) {\n const state = tile.getState();\n if (\n state == TileState.LOADED ||\n state == TileState.ERROR ||\n state == TileState.EMPTY\n ) {\n unlistenByKey(sourceListenKey);\n leftToLoad--;\n if (leftToLoad === 0) {\n this.unlistenSources_();\n this.reproject_();\n }\n }\n },\n this\n );\n this.sourcesListenerKeys_.push(sourceListenKey);\n }\n });\n\n if (leftToLoad === 0) {\n setTimeout(this.reproject_.bind(this), 0);\n } else {\n this.sourceTiles_.forEach(function (tile, i, arr) {\n const state = tile.getState();\n if (state == TileState.IDLE) {\n tile.load();\n }\n });\n }\n }\n }", "title": "" }, { "docid": "4dc077dae33fad7d77a2fb6df5784e9a", "score": "0.5009678", "text": "async invalidateCache() {\n // we simple remove all entries from the node cache that fall below the build or src directory\n Object.keys(require.cache).forEach((file) => {\n if (this.isModulePath(file)) {\n delete require.cache[file];\n this.log.debug(`evicted ${path.relative(this._cwd, file)}`);\n }\n });\n await this._templateResolver.init();\n if (this.liveReload) {\n this.liveReload.changed(['/']);\n }\n }", "title": "" }, { "docid": "ce96a36007f00c6cc57e4d69471d6c3b", "score": "0.49989697", "text": "function changeSourceAll() {\n var images = document.getElementsByTagName('img');\n for (var i = 0; i < images.length; i++) {\n if (images[i].src.indexOf('https://vignette.wikia.nocookie.net/pokepediabr/images/8/89/Wiki-wordmark.png/revision/latest?cb=20160210054103&path-prefix=pt-br') !== -1) {\n images[i].src = images[i].src.replace(\"https://vignette.wikia.nocookie.net/plants-vs-zombies-fan-fiction/images/8/89/Wiki-wordmark.png/revision/latest?cb=20150403031006\", \"https://vignette.wikia.nocookie.net/plants-vs-zombies-fan-fiction/images/7/72/750x195logo.png\");\n }\n }\n}", "title": "" }, { "docid": "13f86748900321001e7e174d44a813e2", "score": "0.4992139", "text": "function videoSrcTransfer() {\n let dataVidSrc = $('#main .main-bottom .center .owl-item-child').attr('data-video-src');\n let fullDataVidSrc = dataVidSrc.replace('watch?v=', 'embed/');\n $('.popUpVidSrc iframe').attr('src', fullDataVidSrc);\n }", "title": "" }, { "docid": "3be31a44666509f75ae7d69afd62872d", "score": "0.49851662", "text": "updateTransform(){\n this.clearCache();\n }", "title": "" }, { "docid": "8946e54fa26fccfd5ae51a60653b0b16", "score": "0.4981339", "text": "function replaceImage(index, img) {\n var $img = $(img);\n var src = $img.attr('src');\n cache.get(src, loadImage).then(function(url) {\n $img.attr({src: url, src_: src});\n });\n }", "title": "" }, { "docid": "deb1c7043157b77157141ad077f1e631", "score": "0.49798042", "text": "function setCache(new_cache) {\n\t\t_cached_data = new_cache;\n\t}", "title": "" }, { "docid": "f0570fd36861c15874caf604b4a22344", "score": "0.49742776", "text": "function srcPullHandler(push, next, src) {\n return function (err, x) {\n if (err) {\n push(err);\n srcsNeedPull.push(src);\n }\n else if (x === nil) {\n srcs = srcs.filter(function (s) {\n return s !== src;\n });\n }\n else {\n if (src === self) {\n srcs.push(x);\n srcsNeedPull.push(x);\n srcsNeedPull.unshift(self);\n }\n else {\n push(null, x);\n srcsNeedPull.push(src);\n }\n }\n\n if (async) {\n async = false;\n next();\n }\n };\n }", "title": "" }, { "docid": "7547c30471e0aeab49b2bbbaa5a647f0", "score": "0.49736392", "text": "function over_out(a,b,c){\nif(a.src.indexOf(b)==-1){a.src=c}\nreturn true}", "title": "" }, { "docid": "c605c82fa72c95b8532f565d45e9b270", "score": "0.4971985", "text": "function addCacheBuster(uri, src) {\n return uri + '?' + cacheBuster(src);\n}", "title": "" }, { "docid": "752a25016c2400e65561c0a7d6691a9e", "score": "0.49607575", "text": "function MM_swapImage() { //v3.0\n var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)\n if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}\n}", "title": "" }, { "docid": "605e963710022c216f90e2a9bf7703a2", "score": "0.49579573", "text": "function moveLocalFile (src, dirName, newName) {\n return $q(function (resolve, reject) {\n window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, function(fs) {\n move(fs, src, dirName);\n }, err);\n function move(fs, src, dirName) {\n window.resolveLocalFileSystemURL(src, function(fileEntry) {\n fs.root.getDirectory(dirName, {}, function(dirEntry) {\n resolve(fileEntry.moveTo(dirEntry, newName));\n }, err);\n },err);\n }\n function err (error) {\n reject(JSON.stringify(error));\n }\n });\n }", "title": "" }, { "docid": "bd55adcdc5ad98e432cd2bc01fe39af7", "score": "0.49541312", "text": "function makeItMove() {\n let urlGif = $(this).attr('data-move');\n\n $(this).attr('src', urlGif);\n}", "title": "" }, { "docid": "59d67990fbea6739ebc33ae69aa0bb83", "score": "0.49523956", "text": "promote_working_path_to_cache(workingPath, extension, callback) {\n // need to omit the extension before the untagging process\n let normalizedFile = extension ? workingPath.replace(new RegExp('\\\\' + extension + '$'), '') : workingPath;\n // untag the file so we get the normalized name that is consistent with how we store it in the cache\n normalizedFile = untag(path.basename(normalizedFile));\n this.get_cached_path(normalizedFile, function (dest, exists) {\n if (exists) {\n log.warn('Renaming working file over existing cache file: ' + dest);\n }\n // We need full target dir path in place before our atomic rename.\n fs.mkdir(path.dirname(dest), {recursive: true}, function (err) {\n if (err) {\n callback(new ServerError('unable to create cache directory', err));\n return;\n }\n // Atomically replace cache file with working file.\n fs.rename(workingPath, dest, function (err) {\n if (err) {\n callback(new ServerError('unable to rename cache file', err));\n return;\n }\n callback(null, dest);\n });\n });\n });\n }", "title": "" }, { "docid": "80d9ef44dd54db931903cb77da2b69ca", "score": "0.4934063", "text": "function reloadPlayer() {\r\n\tvar playerParent = player.parentNode, playerNextSibling = player.nextSibling;\r\n\tplayerParent.removeChild(player);\r\n\tplayerParent.insertBefore(player, playerNextSibling);\r\n}", "title": "" }, { "docid": "3ea06d163f6315abbe5681de355ee61a", "score": "0.4926486", "text": "[_tarballFromCache] () {\n return cacache.get.stream.byDigest(this.cache, this.integrity, this.opts)\n }", "title": "" }, { "docid": "1b6674398ae9c2c6676dcb2b9435ed9b", "score": "0.49034086", "text": "function setupVideoCache() {\n videoStore = localforage.createInstance({\n name: 'videoStore',\n description: 'Stores cached videos.'\n });\n\n videoStore.keys().then(function(keys) {\n for (var i = 0; i < keys.length; i++) {\n if (keys[i].substring(0,4) == \"http\") {\n updateVideoState(keys[i], VideoState.AVAILABLE);\n }\n }\n });\n}", "title": "" }, { "docid": "516ed012b60b513ea01af1fe1f4bb40e", "score": "0.4893085", "text": "function moveFile (src, dirName) {\n return $q(function (resolve, reject) {\n window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, function(fs) {\n move(fs, src, dirName);\n }, err);\n function move(fs, src, dirName) {\n fs.root.getFile(src, {}, function(fileEntry) {\n fs.root.getDirectory(dirName, {}, function(dirEntry) {\n resolve(fileEntry.moveTo(dirEntry));\n }, err);\n },err);\n }\n function err (error) {\n reject(JSON.stringify(error));\n }\n });\n }", "title": "" }, { "docid": "3c5a6a8707ebc54f93ce3d2324771221", "score": "0.48910597", "text": "function swapGif() {\n var moveGif = $(this).attr('playsrc');\n console.log(moveGif);\n\n var stopImage = $(this).attr('stopsrc');\n\n console.log(stopImage);\n\n if ($(this).attr('playsrc') == $(this).attr('src')) {\n $(this).attr('src', stopImage);\n }\n\n else {\n $(this).attr('src', moveGif);\n }\n}", "title": "" }, { "docid": "b1599b5875d2e0324770dbd2bfb5a820", "score": "0.4890015", "text": "function original() {\n\tdocument.velociraptor.src = image.src;\n\treturn true;\n}", "title": "" }, { "docid": "a6eb5d3a33ba4ae2b56a9669e7a1b14c", "score": "0.4881918", "text": "function updateSite(event) {\n window.applicationCache.swapCache();\n}", "title": "" }, { "docid": "889aac9b2cba3ef7028728579d2259ac", "score": "0.48779494", "text": "function swap() {\n 'use strict';\n image.src = \"images/logo2.png\";\n}", "title": "" }, { "docid": "2acf4cb4ad5ee863dd076e01b178f452", "score": "0.4877805", "text": "function copyNewer(from, to) {\n return gulp\n .src(from)\n .pipe(newer(to))\n .pipe(gulp.dest(to))\n .on('end', reload);\n}", "title": "" }, { "docid": "a4009f730c4fb9ffa3a40d3aadff9736", "score": "0.48721343", "text": "requestSourceCode(id) {\n const cache = this._sourceCodeStore.get(id);\n if (cache) {\n this.update({sourceCode: cache});\n return;\n }\n id && fetch('https://searchcode.com/api/result/' + id + '/')\n .then(res => res.json())\n .then(data => {\n this._sourceCodeStore.save(id, data.code);\n this.update({sourceCode: data.code});\n });\n }", "title": "" }, { "docid": "7c28b5ad21ac1e07b797857b2d369b9c", "score": "0.4867447", "text": "function fixSources(sourceMap) {\n sourceMap.sources = sourceMap.sources.map(function (source) { return source.replace(/.*\\//, ''); });\n return sourceMap;\n }", "title": "" }, { "docid": "4fe797e12358fde6942c82ff08b5b07a", "score": "0.48622072", "text": "function resetSource() {\n\t\t\n\t\t$('#source').find('.type').text('');\n\t\t$('#source').find('.name').text('');\n\t\t$('#source').find('.size').text('');\n\t\t$('#result-cols ul').html('');\n\t\t$('#result-rows .total').html('');\n\t\t$('#result-rows .count').html('');\n\t\t$('#result-rows ul').html('');\n\t\t\n\t\t$('.source-show').hide();\n\t\t$('.source-hide').slideDown('fast');\n\t}", "title": "" }, { "docid": "a006f4c684fab57920059bd945739f07", "score": "0.48602048", "text": "function renameSources() {\n console.log('---------------RENAMING SOURCES---------------');\n return src('build/*.html')\n .pipe(htmlreplace({\n 'js': [\n 'assets/js/vendors/jquery-3.5.1.min.js',\n 'assets/js/vendors/popper.min.js',\n 'assets/js/vendors/bootstrap.min.js',\n 'assets/js/vendors/jquery.magnific-popup.min.js',\n 'assets/js/vendors/jquery.easing.min.js',\n 'assets/js/vendors/mixitup.min.js',\n 'assets/js/vendors/headroom.min.js',\n 'assets/js/vendors/smooth-scroll.min.js',\n 'assets/js/vendors/wow.min.js',\n 'assets/js/vendors/owl.carousel.min.js',\n 'assets/js/vendors/jquery.waypoints.min.js',\n 'assets/js/vendors/countUp.min.js',\n 'assets/js/vendors/jquery.jquery.countdown.min.js',\n 'assets/js/vendors/validator.min.js',\n 'assets/js/app.min.js',\n ],\n 'css': 'assets/css/main.min.css'\n }))\n .pipe(dest('build/'));\n}", "title": "" }, { "docid": "964f3a7317f249137c81af17b1c96ca0", "score": "0.4858937", "text": "_addSource(source) {\n if (!source.done) {\n this._sources.push(source);\n source._destination = this;\n source.on('error', destinationEmitError);\n source.on('readable', destinationFillBuffer);\n source.on('end', destinationRemoveEmptySources);\n }\n }", "title": "" }, { "docid": "8a474c4cd239e0f0f09f479481e49fd4", "score": "0.4855053", "text": "function copyDataTask() {\n\treturn gulp.src(config.paths.src.data + \"/**\")\n\t\t.pipe(gulp.dest(config.paths.build.data))\n\t\t.pipe(reload({ stream: true }));\n}", "title": "" }, { "docid": "5178f5759d787013bc63141414f24609", "score": "0.48544967", "text": "updateImgSrc(imgSrc) {\n this.img.src = imgSrc;\n this.oImg.src = this.img.src;\n }", "title": "" }, { "docid": "c00aafc6cf472e5c3862f68cab4e028f", "score": "0.48542103", "text": "remakeCache(){\n this.column_length = false;\n this.showAlert = true;\n this.post(this.root + 'actions/reload_table_cache', {\n id_option: this.source.res.id_option,\n id_project: this.source.id_project\n }, d => {\n if (d.success) {\n if (!!d.data) {\n let diff = d.data.total - this.source.res.total;\n this.source.res.languages = d.data.languages;\n this.source.res.strings = d.data.strings;\n this.source.res.total = d.data.total;\n if (diff > 0) {\n appui.warning(bbn._('%d new string(s) found in %s', diff, this.source.res.path));\n }\n else if (diff < 0) {\n appui.warning(bbn._('%d string(s) deleted from %s files', Math.abs(diff), this.source.res.path));\n }\n else if (diff = 0) {\n appui.warning(bbn._('There are no changes in data'));\n }\n this.$nextTick(() => {\n this.showAlert = false;\n this.column_length = true;\n });\n }\n else {\n appui.error();\n }\n if (!!d.widget) {\n this.updateWidget(this.source.res.id_option, d.widget);\n }\n }\n else {\n appui.error();\n }\n });\n }", "title": "" }, { "docid": "e9fb3fd6f6e42eedfb910f613ccc898d", "score": "0.48540944", "text": "function rsyncRepoToLiveSite() {\n const globArray = new Array();\n\n Object.keys(config.pathMap).forEach(function (rsyncKey) {\n globArray.push(repoDir + rsyncKey);\n });\n\n return src(globArray)\n .pipe(flatmap(function(stream, Vinyl) {\n return src(Vinyl.base)\n // rsync -arz\n .pipe(rsync({\n root: Vinyl.base + '/',\n destination: getDestDirFromBase(Vinyl.base),\n recursive: true,\n archive: true,\n silent: true,\n compress: true,\n delete: true,\n emptyDirectories: true,\n chown: config.chown\n }))\n .on('error', function() { log(colors.red('Error in rsyncing. Source:\\n' + Vinyl.path + '\\nDestination:\\n' + getDestDirFromBase(Vinyl.base) )); })\n .on('end', function() { log(colors.green('Rsyncing: ' + Vinyl.base)); });\n }))\n}", "title": "" }, { "docid": "ff6da5b29c0aa02612516de06299ce60", "score": "0.4852428", "text": "function addToCache( itcb ) {\n Y.doccirrus.media.cacheStore( rasterImageObj, itcb );\n }", "title": "" }, { "docid": "f38f9bea16897c022be962b6054d9c77", "score": "0.4849043", "text": "_clearCache() {\n this.walking = false;\n this.lastDir = null;\n\n clearInterval(this._repeater);\n }", "title": "" }, { "docid": "d8b80152237617651e96806b46c009b2", "score": "0.48472604", "text": "async patchSourcemap(src, dest) {\n try {\n const data = this.readJson(src);\n if (data.version !== 3) {\n throw new Error(`Unsupported sourcemap version: ${data.version}`);\n }\n data.sourceRoot = path.dirname(src).replace(/\\\\/g, '/');\n await writeFileAsync(dest, JSON.stringify(data));\n this.log.debug(`Patched ${dest} from ${src}`);\n }\n catch (error) {\n this.log.warn(`Couldn't patch ${dest}: ${error}`);\n }\n }", "title": "" }, { "docid": "a4ae891eae3de9520dd60f582a411e8e", "score": "0.48431018", "text": "function fileMoved(file) {\n // localhost serves files from both steroids.app.userFilesPath and steroids.app.path\n localStorage[\"gallery.pic.1\"] = \"http://localhost/\" + file.name;\n }", "title": "" }, { "docid": "9e70a6fbc906cf7626960ae15a1940ea", "score": "0.4842924", "text": "function saveSource(source, obj){\n\t\t$(obj).addClass('no-pointer').prop(\"readonly\",\"true\");\n\t\t$(source).remove();\n\t}", "title": "" }, { "docid": "16ab922744503e0671ecc27495c0199d", "score": "0.484222", "text": "function startStop() {\n var currentSRC = $(this).attr(\"src\");\n var active = $(this).attr(\"active\");\n var still = $(this).attr(\"still\");\n if (currentSRC == still) {\n $(this).attr(\"src\", active);\n } else {\n $(this).attr(\"src\", still);\n }\n }", "title": "" }, { "docid": "7e422eec37779df421cdebd839d7736a", "score": "0.48420057", "text": "function cleanSourceBuffer() {\n\tlogINFO('cleaning sourceBuffer');\n\tkillInterval();\n\tlast_fetched_index = -1;\n\tlast_fetched_seg_n = -1;\n\n\tif (sourceBuffer.updating) {\n\t\tsourceBuffer.addEventListener('updateend', function () {\n\t\t\tcleanSourceBuffer();\n\t\t}, {\n\t\t\tonce: true\n\t\t});\n\t\tlogINFO('sourceBuffer is updating, cleanup will commence when the update is over');\n\t\treturn;\n\t}\n\n\tif (sourceBuffer.buffered.end(0) < p.v.currentTime) { //if the early source buffer ends before the current time\n\t\tif (last_removed_timerage === sourceBuffer.buffered.end(0)) { //check that we did not get into a loophole (usually when the diff is less than the dur of a frame)\n\t\t\tresetSourceBuffer();\n\t\t\treturn;\n\t\t}\n\t\tlast_removed_timerage = sourceBuffer.buffered.end(0);\n\t\tsourceBuffer.remove(sourceBuffer.buffered.start(0), sourceBuffer.buffered.end(0));\n\t} else if (sourceBuffer.buffered.start(1) > p.v.currentTime && ((sourceBuffer.buffered.end(0) + globalSetIndex[0].mpd.representations[0].frameRate / 1000) < sourceBuffer.buffered.start(1))) { //or the late start after the current time\n\t\tif (last_removed_timerage === sourceBuffer.buffered.start(1)) { //check that we did not get into a loophole (usually when the diff is less than the dur of a frame)\n\t\t\tresetSourceBuffer();\n\t\t\treturn;\n\t\t}\n\t\tlast_removed_timerage = sourceBuffer.buffered.start(1);\n\t\tsourceBuffer.remove(sourceBuffer.buffered.start(1), sourceBuffer.buffered.end(1));\n\t} else {\n\t\tlogWARN(\"cleanSourceBuffer FAILED, check buffer contents (printBufferStatus())\");\n\t}\n\tstartInterval();\n}", "title": "" }, { "docid": "5f9a4906c84d4937d07e3b127522db2d", "score": "0.48400375", "text": "invalidateEpicCache() {\n\t}", "title": "" }, { "docid": "5f9a4906c84d4937d07e3b127522db2d", "score": "0.48400375", "text": "invalidateEpicCache() {\n\t}", "title": "" }, { "docid": "e40db131880875977bd9e34bd47f6433", "score": "0.48383608", "text": "function changeSrc() {\n // change question audio source\n qPlayer.attr('src', qPlayerSrcArr[qCounter]);\n // change response audio source\n if (typeof respPlayerSrcArr[qCounter] == 'string') {\n respPlayer.attr('src', respPlayerSrcArr[qCounter]);\n } else {\n respPlayer.attr('src', '#');\n }\n }", "title": "" }, { "docid": "3c65246f36f8cb1b4b6ab8840e8421c7", "score": "0.48374647", "text": "_loadSources() {\n // Obtain sources iterator\n const sources = this._pending.sources;\n delete this._pending.sources;\n // Close immediately if done\n if (sources.done) {\n delete this._pending;\n this.close();\n }\n // Otherwise, set up source reading\n else {\n sources.on('data', source => {\n this._addSource(source);\n this._fillBufferAsync();\n });\n sources.on('end', () => {\n delete this._pending;\n this._fillBuffer();\n });\n }\n }", "title": "" }, { "docid": "fb8013c44260ff92f27c0b97f10687a4", "score": "0.48370454", "text": "function ui5cacheBust() {\n try {\n // update spinner state\n spinner.text = 'Run cache buster...'\n\n if (BUILD.cacheBuster === false) {\n return Promise.resolve('Cache buster is deactivated.')\n }\n\n // console.log('paths.htmlEntries.src', paths.htmlEntries.src)\n return paths.htmlEntries.src.length === 0\n ? Promise.resolve()\n : gulp\n .src(paths.htmlEntries.src)\n .pipe(plumber(buildErrorHandler))\n // rename UI5 module (app component) paths and update index.html\n .pipe(tap(oFile => ui5Bust(oFile)))\n .pipe(gulp.dest(DIST))\n } catch (error) {\n spinner.fail(error)\n }\n}", "title": "" } ]
3ab212d67275632838c26facaff8cace
Removes all keyvalue entries from the map.
[ { "docid": "672ea007e2d060269c981bf9332269c5", "score": "0.0", "text": "function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n hash: new Hash(),\n map: new (Map || ListCache)(),\n string: new Hash()\n };\n }", "title": "" } ]
[ { "docid": "633172b04674f7d1a88db79a9adb1021", "score": "0.6949329", "text": "function flushMap(map) {\n var values = map.v;\n var keys = map.k;\n\n for (var ndx = values.length; --ndx >= 0; ) {\n if (flushMap(values[ndx])) {\n // remove map\n var v = values.pop();\n var k = keys.pop();\n if (ndx < values.length) {\n values[ndx] = v;\n keys[ndx] = k;\n }\n }\n }\n\n if (map.fresh) {\n map.fresh = false;\n return false;\n }\n if ('value' in map) {\n // remove entry\n if (map.onflush) {\n map.onflush();\n map.onflush = null;\n }\n delete map.value;\n }\n return !values.length;\n }", "title": "" }, { "docid": "e71b42c04935573c2b61630766d569e8", "score": "0.6652174", "text": "function _cleanupKeys()\n {\n if (this._count == this._keys.length) {\n return;\n }\n var srcIndex = 0;\n var destIndex = 0;\n var seen = {};\n while (srcIndex < this._keys.length) {\n var key = this._keys[srcIndex];\n if (_hasKey(this._map, key)\n && !_hasKey(seen, key)\n ) {\n this._keys[destIndex++] = key;\n seen[key] = true;\n }\n srcIndex++;\n }\n this._keys.length = destIndex;\n }", "title": "" }, { "docid": "a77e4b9f1adb726c9d5e9feec6bd73c6", "score": "0.6538058", "text": "clear()\n {\n this._map.clear();\n }", "title": "" }, { "docid": "d10b06c05170bd5106461b87ccee01b7", "score": "0.64991426", "text": "clear() {\n this._map.values().forEach((item) => {\n item.dispose();\n });\n this._map.clear();\n }", "title": "" }, { "docid": "85e47774260af2454ea9819ac7f8740f", "score": "0.64677405", "text": "clear() {\n this.hashMap.clear();\n }", "title": "" }, { "docid": "fbf52c87dedd403d11cd58b2eea2ed94", "score": "0.6409948", "text": "clearKeys(){\n this.keyList.clearKeys();\n }", "title": "" }, { "docid": "a3440e18022018657bd95d6e71e2a40e", "score": "0.6407228", "text": "remove(key, value) {\r\n let list = this.map_[key];\r\n if (list) {\r\n for (let i = 0; i < list.length; ++i) {\r\n if (list[i] == value) {\r\n list.splice(i, 1);\r\n --i;\r\n }\r\n }\r\n }\r\n }", "title": "" }, { "docid": "a3440e18022018657bd95d6e71e2a40e", "score": "0.6407228", "text": "remove(key, value) {\r\n let list = this.map_[key];\r\n if (list) {\r\n for (let i = 0; i < list.length; ++i) {\r\n if (list[i] == value) {\r\n list.splice(i, 1);\r\n --i;\r\n }\r\n }\r\n }\r\n }", "title": "" }, { "docid": "54dcd4a97cad7661066cada716c0c579", "score": "0.64032316", "text": "clear() {\n this._map.clear();\n }", "title": "" }, { "docid": "4d924e97d3212a8c4209608af2765a55", "score": "0.62924784", "text": "deleteMap() {\n\t\tfor(var i in this.map.items) {\n\t\t\tthis.map.getItem(i).remove();\n\t\t}\n\t\tthis.map = null;\n\t}", "title": "" }, { "docid": "0823da5f5447d731c6d3f7c013ae5822", "score": "0.62922126", "text": "clear() {\n this._map.clear();\n }", "title": "" }, { "docid": "973bd300857fd4cb111eff1b0547b6af", "score": "0.6284955", "text": "clear() {\n this.map = {};\n }", "title": "" }, { "docid": "9886d34fa0cf1d5cf22ca824ed637a60", "score": "0.6225579", "text": "function clear()\n {\n var k = keys();\n _store.clear();\n for(var i = 0; i < k.length; ++i)\n {\n triggerEvent(\"remove_\" + k[i]);\n triggerEvent(\"remove\", k[i]);\n }\n triggerEvent(\"clear\");\n }", "title": "" }, { "docid": "7679f75ed5acd17f219de3416e0a02b6", "score": "0.6203594", "text": "function mapClear() {\n this.__data__ = {\n 'hash': new Hash(),\n 'map': Map ? new Map() : [],\n 'string': new Hash()\n };\n }", "title": "" }, { "docid": "83d39db8a96ccdd291ed589e111ad336", "score": "0.6193841", "text": "clearMap(){\n\t\tvar map = this[_mapArr];\n\t\tfor (var i = 0; i < map.length; i++) {\n\t\t\tfor (var j = 0; j < map.length; j++) {\n\t\t\t\tmap[i][j] = null;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "5009edd161fca6726caf92268f708f31", "score": "0.617115", "text": "function mapClear() {\n this.__data__ = { 'hash': new Hash, 'map': Map ? new Map : [], 'string': new Hash };\n }", "title": "" }, { "docid": "5009edd161fca6726caf92268f708f31", "score": "0.617115", "text": "function mapClear() {\n this.__data__ = { 'hash': new Hash, 'map': Map ? new Map : [], 'string': new Hash };\n }", "title": "" }, { "docid": "3608b575d5617142faefd31f6f9fa1bc", "score": "0.6166302", "text": "function mapClear() {\n\t this.__data__ = {\n\t 'hash': new Hash,\n\t 'map': Map ? new Map : [],\n\t 'string': new Hash\n\t };\n\t }", "title": "" }, { "docid": "3608b575d5617142faefd31f6f9fa1bc", "score": "0.6166302", "text": "function mapClear() {\n\t this.__data__ = {\n\t 'hash': new Hash,\n\t 'map': Map ? new Map : [],\n\t 'string': new Hash\n\t };\n\t }", "title": "" }, { "docid": "3608b575d5617142faefd31f6f9fa1bc", "score": "0.6166302", "text": "function mapClear() {\n\t this.__data__ = {\n\t 'hash': new Hash,\n\t 'map': Map ? new Map : [],\n\t 'string': new Hash\n\t };\n\t }", "title": "" }, { "docid": "0fb2e4272ed8fd4a92b30e0915e9da18", "score": "0.6163354", "text": "function removeAt(map, key, value) {\n // if (!map.has(key)) return\n var set = map.get(key);\n\n var index = set.indexOf(value);\n /*if (index > -1) */\n set.splice(index, 1);\n\n // if the set is empty, remove it from the WeakMap\n if (!set.length) map.delete(key)\n\n }", "title": "" }, { "docid": "5c616e8538914701f6970daaf8de8021", "score": "0.6161068", "text": "function mapClear() {\n\t this.__data__ = { 'hash': new Hash, 'map': Map ? new Map : [], 'string': new Hash };\n\t }", "title": "" }, { "docid": "4d5c2a4635390609e98faafdc516474d", "score": "0.614778", "text": "function mapClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': Map ? new Map : [],\n 'string': new Hash\n };\n }", "title": "" }, { "docid": "4d5c2a4635390609e98faafdc516474d", "score": "0.614778", "text": "function mapClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': Map ? new Map : [],\n 'string': new Hash\n };\n }", "title": "" }, { "docid": "4d5c2a4635390609e98faafdc516474d", "score": "0.614778", "text": "function mapClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': Map ? new Map : [],\n 'string': new Hash\n };\n }", "title": "" }, { "docid": "4d5c2a4635390609e98faafdc516474d", "score": "0.614778", "text": "function mapClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': Map ? new Map : [],\n 'string': new Hash\n };\n }", "title": "" }, { "docid": "4d5c2a4635390609e98faafdc516474d", "score": "0.614778", "text": "function mapClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': Map ? new Map : [],\n 'string': new Hash\n };\n }", "title": "" }, { "docid": "4d5c2a4635390609e98faafdc516474d", "score": "0.614778", "text": "function mapClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': Map ? new Map : [],\n 'string': new Hash\n };\n }", "title": "" }, { "docid": "4d5c2a4635390609e98faafdc516474d", "score": "0.614778", "text": "function mapClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': Map ? new Map : [],\n 'string': new Hash\n };\n }", "title": "" }, { "docid": "4d5c2a4635390609e98faafdc516474d", "score": "0.614778", "text": "function mapClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': Map ? new Map : [],\n 'string': new Hash\n };\n }", "title": "" }, { "docid": "4d5c2a4635390609e98faafdc516474d", "score": "0.614778", "text": "function mapClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': Map ? new Map : [],\n 'string': new Hash\n };\n }", "title": "" }, { "docid": "dedd85306df649255cff3a048c5af09b", "score": "0.61187667", "text": "function removeAll() {\n for (var prop in kml) {\n if (kml[prop].obj) {\n kml[prop].obj.setMap(null);\n delete kml[prop].obj;\n }\n\n }\n}", "title": "" }, { "docid": "8e8912e831d066b3c1ca1d6b56135467", "score": "0.61087006", "text": "remove(value) {\n if (!this.valueExists(value)) return;\n\n delete this.map[value];\n\n this.set = this.set.filter((setVal) => setVal !== value);\n }", "title": "" }, { "docid": "3eea86690b18488117e6437f5f4a53e3", "score": "0.6107819", "text": "function mapClear() {\n\t this.__data__ = { 'hash': new Hash, 'map': Map ? new Map : [], 'string': new Hash };\n\t}", "title": "" }, { "docid": "3eea86690b18488117e6437f5f4a53e3", "score": "0.6107819", "text": "function mapClear() {\n\t this.__data__ = { 'hash': new Hash, 'map': Map ? new Map : [], 'string': new Hash };\n\t}", "title": "" }, { "docid": "2ffb2927052dfe95c334271bdac0fec2", "score": "0.61020905", "text": "function mapClear() {\n\t this.__data__ = {\n\t 'hash': new Hash,\n\t 'map': Map ? new Map : [],\n\t 'string': new Hash\n\t };\n\t}", "title": "" }, { "docid": "2ffb2927052dfe95c334271bdac0fec2", "score": "0.61020905", "text": "function mapClear() {\n\t this.__data__ = {\n\t 'hash': new Hash,\n\t 'map': Map ? new Map : [],\n\t 'string': new Hash\n\t };\n\t}", "title": "" }, { "docid": "2ffb2927052dfe95c334271bdac0fec2", "score": "0.61020905", "text": "function mapClear() {\n\t this.__data__ = {\n\t 'hash': new Hash,\n\t 'map': Map ? new Map : [],\n\t 'string': new Hash\n\t };\n\t}", "title": "" }, { "docid": "f166acc9545874497b6d88a90150597d", "score": "0.6082073", "text": "function mapClear() {\n\t\t this.__data__ = {\n\t\t 'hash': new Hash,\n\t\t 'map': Map ? new Map : [],\n\t\t 'string': new Hash\n\t\t };\n\t\t }", "title": "" }, { "docid": "83c7e7b35b6f37e30252cf7260393933", "score": "0.60264283", "text": "function mapClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': Map ? new Map : [],\n 'string': new Hash\n };\n}", "title": "" }, { "docid": "83c7e7b35b6f37e30252cf7260393933", "score": "0.60264283", "text": "function mapClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': Map ? new Map : [],\n 'string': new Hash\n };\n}", "title": "" }, { "docid": "83c7e7b35b6f37e30252cf7260393933", "score": "0.60264283", "text": "function mapClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': Map ? new Map : [],\n 'string': new Hash\n };\n}", "title": "" }, { "docid": "9a6b4c86e3db5c4bc931cc8ed7169794", "score": "0.6007952", "text": "removeAllMarkers(){\r\n\r\n for(var value of this.markers.entries()){\r\n this.removeMarkerFromMap(value[1]);\r\n }\r\n this.markers.clear();\r\n }", "title": "" }, { "docid": "3eff9a0d4bf1274e24df7401aec110d0", "score": "0.599794", "text": "clear() {\r\n this.map_ = {};\r\n }", "title": "" }, { "docid": "3eff9a0d4bf1274e24df7401aec110d0", "score": "0.599794", "text": "clear() {\r\n this.map_ = {};\r\n }", "title": "" }, { "docid": "40430abd85993462fffd930206349266", "score": "0.5965358", "text": "clear() {\n this.logger.trace(\"Clearing cache entries created by MSAL\"); // read inMemoryCache\n\n const cacheKeys = this.getKeys(); // delete each element\n\n cacheKeys.forEach(key => {\n this.removeItem(key);\n });\n this.emitChange();\n }", "title": "" }, { "docid": "45df8cc5edf704a8bf6d89db8b458d19", "score": "0.59289485", "text": "async clear() {\n this.keys = {};\n }", "title": "" }, { "docid": "7eeac64787edf12ccc04a09e5fda8c43", "score": "0.5908003", "text": "function clearAllData( exclusions=[] )\n{\n $.each( GM_listValues(),\n function( ndx, key )\n {\n if( !exclusions.includes( key ) )\n {\n GM_deleteValue( key );\n }\n });\n\n}", "title": "" }, { "docid": "6155297a8028864ea28e786f8025b4f1", "score": "0.59073925", "text": "function mapCacheClear(){this.__data__ = {'hash':new Hash(),'map':new (Map || ListCache)(),'string':new Hash()};}", "title": "" }, { "docid": "88bee1500a6206babdc16d094c057186", "score": "0.5903689", "text": "remove(key) {\n var item = this.map[key];\n if (!item) return;\n this._removeItem(item);\n }", "title": "" }, { "docid": "676caf4729828e7ec2aacb0ecd70d147", "score": "0.5847903", "text": "function mapCacheClear(){this.__data__={'hash':new Hash(),'map':new(Map||ListCache)(),'string':new Hash()};}", "title": "" }, { "docid": "676caf4729828e7ec2aacb0ecd70d147", "score": "0.5847903", "text": "function mapCacheClear(){this.__data__={'hash':new Hash(),'map':new(Map||ListCache)(),'string':new Hash()};}", "title": "" }, { "docid": "676caf4729828e7ec2aacb0ecd70d147", "score": "0.5847903", "text": "function mapCacheClear(){this.__data__={'hash':new Hash(),'map':new(Map||ListCache)(),'string':new Hash()};}", "title": "" }, { "docid": "676caf4729828e7ec2aacb0ecd70d147", "score": "0.5847903", "text": "function mapCacheClear(){this.__data__={'hash':new Hash(),'map':new(Map||ListCache)(),'string':new Hash()};}", "title": "" }, { "docid": "676caf4729828e7ec2aacb0ecd70d147", "score": "0.5847903", "text": "function mapCacheClear(){this.__data__={'hash':new Hash(),'map':new(Map||ListCache)(),'string':new Hash()};}", "title": "" }, { "docid": "b016fa4a9fee2b48be436a493b6df26c", "score": "0.5796948", "text": "ensureCapacity() {\n if (this.cacheMap.size > this.maxEntries) {\n // delete first item\n for (const [key, value] of this.cacheMap) {\n this.cacheMap.delete(key);\n break;\n }\n }\n }", "title": "" }, { "docid": "dc729dd40ad34a1f975e7e4cdf44e19b", "score": "0.5784642", "text": "function remove(key) {\n if(data[key]) {\n delete data[key];\n } else {\n console.log('HashMap.remove invoked with invalid key: '+\n key);\n }\n }", "title": "" }, { "docid": "9172e0fd50e44021efb2a1c14d62da16", "score": "0.5756484", "text": "function eraseMap() {\n document.body.removeChild(map);\n }", "title": "" }, { "docid": "bb16313b79244a8b484682d966fca5a5", "score": "0.5723219", "text": "function mapCacheClear(){this.size=0;this.__data__={'hash':new Hash(),'map':new(Map||ListCache)(),'string':new Hash()};}", "title": "" }, { "docid": "bb16313b79244a8b484682d966fca5a5", "score": "0.5723219", "text": "function mapCacheClear(){this.size=0;this.__data__={'hash':new Hash(),'map':new(Map||ListCache)(),'string':new Hash()};}", "title": "" }, { "docid": "bb16313b79244a8b484682d966fca5a5", "score": "0.5723219", "text": "function mapCacheClear(){this.size=0;this.__data__={'hash':new Hash(),'map':new(Map||ListCache)(),'string':new Hash()};}", "title": "" }, { "docid": "bb16313b79244a8b484682d966fca5a5", "score": "0.5723219", "text": "function mapCacheClear(){this.size=0;this.__data__={'hash':new Hash(),'map':new(Map||ListCache)(),'string':new Hash()};}", "title": "" }, { "docid": "bb16313b79244a8b484682d966fca5a5", "score": "0.5723219", "text": "function mapCacheClear(){this.size=0;this.__data__={'hash':new Hash(),'map':new(Map||ListCache)(),'string':new Hash()};}", "title": "" }, { "docid": "bb16313b79244a8b484682d966fca5a5", "score": "0.5723219", "text": "function mapCacheClear(){this.size=0;this.__data__={'hash':new Hash(),'map':new(Map||ListCache)(),'string':new Hash()};}", "title": "" }, { "docid": "bb16313b79244a8b484682d966fca5a5", "score": "0.5723219", "text": "function mapCacheClear(){this.size=0;this.__data__={'hash':new Hash(),'map':new(Map||ListCache)(),'string':new Hash()};}", "title": "" }, { "docid": "bb16313b79244a8b484682d966fca5a5", "score": "0.5723219", "text": "function mapCacheClear(){this.size=0;this.__data__={'hash':new Hash(),'map':new(Map||ListCache)(),'string':new Hash()};}", "title": "" }, { "docid": "bb16313b79244a8b484682d966fca5a5", "score": "0.5723219", "text": "function mapCacheClear(){this.size=0;this.__data__={'hash':new Hash(),'map':new(Map||ListCache)(),'string':new Hash()};}", "title": "" }, { "docid": "bb16313b79244a8b484682d966fca5a5", "score": "0.5723219", "text": "function mapCacheClear(){this.size=0;this.__data__={'hash':new Hash(),'map':new(Map||ListCache)(),'string':new Hash()};}", "title": "" }, { "docid": "bb16313b79244a8b484682d966fca5a5", "score": "0.5723219", "text": "function mapCacheClear(){this.size=0;this.__data__={'hash':new Hash(),'map':new(Map||ListCache)(),'string':new Hash()};}", "title": "" }, { "docid": "bb16313b79244a8b484682d966fca5a5", "score": "0.5723219", "text": "function mapCacheClear(){this.size=0;this.__data__={'hash':new Hash(),'map':new(Map||ListCache)(),'string':new Hash()};}", "title": "" }, { "docid": "bb16313b79244a8b484682d966fca5a5", "score": "0.5723219", "text": "function mapCacheClear(){this.size=0;this.__data__={'hash':new Hash(),'map':new(Map||ListCache)(),'string':new Hash()};}", "title": "" }, { "docid": "bb16313b79244a8b484682d966fca5a5", "score": "0.5723219", "text": "function mapCacheClear(){this.size=0;this.__data__={'hash':new Hash(),'map':new(Map||ListCache)(),'string':new Hash()};}", "title": "" }, { "docid": "bb16313b79244a8b484682d966fca5a5", "score": "0.5723219", "text": "function mapCacheClear(){this.size=0;this.__data__={'hash':new Hash(),'map':new(Map||ListCache)(),'string':new Hash()};}", "title": "" }, { "docid": "bb16313b79244a8b484682d966fca5a5", "score": "0.5723219", "text": "function mapCacheClear(){this.size=0;this.__data__={'hash':new Hash(),'map':new(Map||ListCache)(),'string':new Hash()};}", "title": "" }, { "docid": "dbec72fe79d124437cafa02f3bb2b5fc", "score": "0.57225937", "text": "clear () {\n if (this.objectMap.size <= 0) {\n // There is nothing to clear, exit early\n return\n }\n\n this.objectMap.forEach((key, value) => {\n // Remove the model from the grid\n this.grid.remove(key)\n // Remove the object from the scene\n this.scene.remove(value)\n })\n }", "title": "" }, { "docid": "5b61ba704f48bc95ce96c80c24ed89de", "score": "0.5708831", "text": "unwatch () {\n if (this.watchSubscription != null) {\n this.watchSubscription.close()\n this.watchSubscription = null\n }\n\n for (let [key, entry] of this.entries) {\n entry.destroy()\n this.entries.delete(key)\n }\n }", "title": "" }, { "docid": "9315d4b174dcbeffb03e5bf67e56b213", "score": "0.57040244", "text": "function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new _Hash,\n 'map': new (_Map || _ListCache),\n 'string': new _Hash\n };\n }", "title": "" }, { "docid": "dc3eaffc8c22cccb66c39f7f3096955b", "score": "0.5700771", "text": "erase(key) {\n if (this.currentProcess) {\n if (key != null && this.currentProcess.dict.has(key)) {\n this.currentProcess.dict.delete(key);\n }\n else {\n this.currentProcess.dict = new Map();\n }\n }\n }", "title": "" }, { "docid": "96dbd6871f2d1622b7b01ba8f7ac8d1c", "score": "0.56992704", "text": "function mapCacheClear() {\n this.__data__ = {\n 'hash': new Hash(),\n 'map': new (Map$1 || ListCache)(),\n 'string': new Hash()\n };\n }", "title": "" }, { "docid": "6fe2edc38d5224eea162762f8a4fb657", "score": "0.5694321", "text": "function clearMap() {\n for (var i = map.entities.getLength() - 1; i >= 0; i--) {\n var pushpin = map.entities.get(i);\n if (pushpin instanceof Microsoft.Maps.Pushpin)\n map.entities.removeAt(i);\n }\n}", "title": "" }, { "docid": "32a9961e480604db2a24b675d2b38471", "score": "0.5689804", "text": "function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new _Hash(),\n 'map': new (_Map || _ListCache)(),\n 'string': new _Hash()\n };\n }", "title": "" }, { "docid": "6bba6076e91982e5e733e9402516cf91", "score": "0.5679663", "text": "function removeAll() {\n _children.forEach(function (map) {\n map.setParentCollection(null);\n });\n\n _children = [];\n dispatchChange(_id, 'remove_map');\n }", "title": "" }, { "docid": "25c6ffd5e6575053d4fbf43bf70a0561", "score": "0.5677067", "text": "_clearMap() {\n for (let i = 0; i < this._traceroutesMarkers.length; i++) {\n this._removeMarkersList(this._traceroutesMarkers[i]);\n }\n\n this._usersMarkers = [];\n this._endpointsMarkers = [];\n this._traceroutesMarkers = [];\n this._colors = {};\n }", "title": "" }, { "docid": "f0ea66cfd6cb02bfe37b2060af46aea8", "score": "0.56711197", "text": "function mapCacheClear() {\n\tthis.size = 0;\n\tthis.__data__ = {\n\t\thash: new _Hash(),\n\t\tmap: new (_Map || _ListCache)(),\n\t\tstring: new _Hash()\n\t};\n}", "title": "" }, { "docid": "da321de0dc2aeb798eadb5a96500f307", "score": "0.56701773", "text": "function mapCacheClear() {\n\t this.__data__ = {\n\t 'hash': new Hash,\n\t 'map': new (Map$2 || ListCache),\n\t 'string': new Hash\n\t };\n\t}", "title": "" }, { "docid": "883dfc49ba819592f39405f0898a1847", "score": "0.56691486", "text": "clearKeys() {\n this.keys = {};\n }", "title": "" }, { "docid": "883dfc49ba819592f39405f0898a1847", "score": "0.56691486", "text": "clearKeys() {\n this.keys = {};\n }", "title": "" }, { "docid": "0891d9a206ea4f917628649e1cf29bcb", "score": "0.5669008", "text": "function mapCacheClear() {\n\t this.__data__ = {\n\t 'hash': new Hash,\n\t 'map': new (Map$1 || ListCache),\n\t 'string': new Hash\n\t };\n\t}", "title": "" }, { "docid": "0891d9a206ea4f917628649e1cf29bcb", "score": "0.5669008", "text": "function mapCacheClear() {\n\t this.__data__ = {\n\t 'hash': new Hash,\n\t 'map': new (Map$1 || ListCache),\n\t 'string': new Hash\n\t };\n\t}", "title": "" }, { "docid": "0891d9a206ea4f917628649e1cf29bcb", "score": "0.5669008", "text": "function mapCacheClear() {\n\t this.__data__ = {\n\t 'hash': new Hash,\n\t 'map': new (Map$1 || ListCache),\n\t 'string': new Hash\n\t };\n\t}", "title": "" }, { "docid": "7390261772898beaf5df2586321c0709", "score": "0.5659265", "text": "function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash(),\n 'map': new (Map || ListCache)(),\n 'string': new Hash()\n };\n }", "title": "" }, { "docid": "7e88e6fbd71cb40d63d32e7f17090f77", "score": "0.5656721", "text": "function removeAll() {\n _children.forEach(function(map) {\n map.setParentCollection(null);\n });\n\n _children = [];\n dispatchChange(_id, 'remove_map');\n }", "title": "" }, { "docid": "52c87104e35da88f2b20fc9ed344feae", "score": "0.5655427", "text": "function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new _Hash,\n 'map': new (_Map || _ListCache),\n 'string': new _Hash\n };\n }", "title": "" }, { "docid": "c28a90dfad83ee7095f008fb9c8a2bed", "score": "0.5646518", "text": "function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map$1 || ListCache),\n 'string': new Hash\n };\n }", "title": "" }, { "docid": "83fd0a87e4f60f22ec46107e4f3704e8", "score": "0.5641935", "text": "function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n }", "title": "" }, { "docid": "23bb0c39f46ee3c5dab955a95fb9ffc4", "score": "0.5633904", "text": "function clear() {\n var items = registry.getAll();\n for (var i = items.length - 1; i >= 0; i--) {\n removeItem(items[i]);\n };\n}", "title": "" }, { "docid": "931a8c4bc72a2ee7e0021e8dd2a102c5", "score": "0.5630361", "text": "function mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash(),\n 'map': new (Map || ListCache)(),\n 'string': new Hash()\n };\n }", "title": "" }, { "docid": "8fe83ae5e4200c98d60099bf3bfb1638", "score": "0.5630148", "text": "async clear() {\n for (const keyStore of this.keyStores) {\n await keyStore.clear();\n }\n }", "title": "" }, { "docid": "8fe83ae5e4200c98d60099bf3bfb1638", "score": "0.5630148", "text": "async clear() {\n for (const keyStore of this.keyStores) {\n await keyStore.clear();\n }\n }", "title": "" }, { "docid": "f3e079301bcb3bed73adeb6c8d5bb2e4", "score": "0.5623075", "text": "function mapCacheClear() {\n\t this.size = 0;\n\t this.__data__ = {\n\t 'hash': new Hash,\n\t 'map': new (Map$1 || ListCache),\n\t 'string': new Hash\n\t };\n\t}", "title": "" }, { "docid": "d0e0ccdabc5187c6d8ae224251ecf71e", "score": "0.5622434", "text": "function mapCacheClear() {\n\t this.size = 0;\n\t this.__data__ = {\n\t 'hash': new Hash,\n\t 'map': new (Map$2 || ListCache),\n\t 'string': new Hash\n\t };\n\t}", "title": "" } ]
3edb006fbb6ed57aa61538ab508cc6e6
return number of 1 bits in x
[ { "docid": "91ce526f731586b510e54f1728cb6adc", "score": "0.0", "text": "function cbit(x) {\nvar r = 0;\nwhile(x != 0) { x &= x-1; ++r; }\nreturn r;\n}", "title": "" } ]
[ { "docid": "81276d830a8c326c6f34de6a78bba2e4", "score": "0.8348761", "text": "countOnes(x) {\n x = x - ((x >> 1) & 0x55555555);\n x = (x & 0x33333333) + ((x >> 2) & 0x33333333);\n x = (x + (x >> 4)) & 0x0F0F0F0F;\n x = x + (x >> 8);\n x = x + (x >> 16);\n return (x & 0x0000003F);\n }", "title": "" }, { "docid": "f1ee04085fd7232f4ac131674a875eb7", "score": "0.83194274", "text": "function bitLength(x) {\n if (x == 0) return 1;\n var ans = 0;\n while (x > 0) {\n x >>= 1;\n ans++;\n }\n return ans;\n }", "title": "" }, { "docid": "0e8b4520d60f1f5f225b2be0dbf2e8aa", "score": "0.7876636", "text": "function nbits(x) {\n var n = 1,\n t;\n if ((t = x >>> 16) != 0) {\n x = t;\n n += 16;\n }\n if ((t = x >> 8) != 0) {\n x = t;\n n += 8;\n }\n if ((t = x >> 4) != 0) {\n x = t;\n n += 4;\n }\n if ((t = x >> 2) != 0) {\n x = t;\n n += 2;\n }\n if ((t = x >> 1) != 0) {\n x = t;\n n += 1;\n }\n return n;\n}", "title": "" }, { "docid": "ebe405c34ec69e6d7f293fdbb46db5c3", "score": "0.7834097", "text": "function nbits(x) {\n\t \tvar n = 1, t;\n\t \tif ((t = x >>> 16) != 0) {\n\t \t\tx = t;\n\t \t\tn += 16;\n\t \t}\n\t \tif ((t = x >> 8) != 0) {\n\t \t\tx = t;\n\t \t\tn += 8;\n\t \t}\n\t \tif ((t = x >> 4) != 0) {\n\t \t\tx = t;\n\t \t\tn += 4;\n\t \t}\n\t \tif ((t = x >> 2) != 0) {\n\t \t\tx = t;\n\t \t\tn += 2;\n\t \t}\n\t \tif ((t = x >> 1) != 0) {\n\t \t\tx = t;\n\t \t\tn += 1;\n\t \t}\n\t \treturn n;\n\t }", "title": "" }, { "docid": "ebe405c34ec69e6d7f293fdbb46db5c3", "score": "0.7834097", "text": "function nbits(x) {\n\t \tvar n = 1, t;\n\t \tif ((t = x >>> 16) != 0) {\n\t \t\tx = t;\n\t \t\tn += 16;\n\t \t}\n\t \tif ((t = x >> 8) != 0) {\n\t \t\tx = t;\n\t \t\tn += 8;\n\t \t}\n\t \tif ((t = x >> 4) != 0) {\n\t \t\tx = t;\n\t \t\tn += 4;\n\t \t}\n\t \tif ((t = x >> 2) != 0) {\n\t \t\tx = t;\n\t \t\tn += 2;\n\t \t}\n\t \tif ((t = x >> 1) != 0) {\n\t \t\tx = t;\n\t \t\tn += 1;\n\t \t}\n\t \treturn n;\n\t }", "title": "" }, { "docid": "21ac73e97aa24703d20caa2c38554085", "score": "0.78164846", "text": "function bitSize(x) {\n var j, z, w;\n for (j = x.length - 1; (x[j] === 0) && (j > 0); j--);\n for (z = 0, w = x[j]; w; (w >>= 1), z++);\n z += bpe * j;\n return z;\n }", "title": "" }, { "docid": "c18e4776d3d45dfaba9fc79a2df3b1d7", "score": "0.77732164", "text": "function nbits(x) {\n var n = 1, t;\n if((t=x>>>16) != 0) { x = t; n += 16; }\n if((t=x>>8) != 0) { x = t; n += 8; }\n if((t=x>>4) != 0) { x = t; n += 4; }\n if((t=x>>2) != 0) { x = t; n += 2; }\n if((t=x>>1) != 0) { x = t; n += 1; }\n return n;\n}", "title": "" }, { "docid": "905e7541c83a40208e208797a65f1df9", "score": "0.775645", "text": "function bitSize(x) {\n var j, z, w;\n for (j = x.length - 1; x[j] == 0 && j > 0; j--) {}\n for (z = 0, w = x[j]; w; w >>= 1, z++) {}\n z += bpe * j;\n return z;\n}", "title": "" }, { "docid": "b97773c2d6a630ddbf65073b4b756f66", "score": "0.7687634", "text": "function nbits(x) {\n\t\t\tvar r = 1,\n\t\t\tt;\n\t\t\tif ((t = x >>> 16) != 0) {\n\t\t\t\tx = t;\n\t\t\t\tr += 16;\n\t\t\t}\n\t\t\tif ((t = x >> 8) != 0) {\n\t\t\t\tx = t;\n\t\t\t\tr += 8;\n\t\t\t}\n\t\t\tif ((t = x >> 4) != 0) {\n\t\t\t\tx = t;\n\t\t\t\tr += 4;\n\t\t\t}\n\t\t\tif ((t = x >> 2) != 0) {\n\t\t\t\tx = t;\n\t\t\t\tr += 2;\n\t\t\t}\n\t\t\tif ((t = x >> 1) != 0) {\n\t\t\t\tx = t;\n\t\t\t\tr += 1;\n\t\t\t}\n\t\t\treturn r;\n\t\t}", "title": "" }, { "docid": "82a9226d0e7fc1dfb16cff20f1346002", "score": "0.76866406", "text": "function nbits(x) {\n var r = 1,\n t;\n if ((t = x >>> 16) != 0) {\n x = t;r += 16;\n }\n if ((t = x >> 8) != 0) {\n x = t;r += 8;\n }\n if ((t = x >> 4) != 0) {\n x = t;r += 4;\n }\n if ((t = x >> 2) != 0) {\n x = t;r += 2;\n }\n if ((t = x >> 1) != 0) {\n x = t;r += 1;\n }\n return r;\n }", "title": "" }, { "docid": "82a9226d0e7fc1dfb16cff20f1346002", "score": "0.76866406", "text": "function nbits(x) {\n var r = 1,\n t;\n if ((t = x >>> 16) != 0) {\n x = t;r += 16;\n }\n if ((t = x >> 8) != 0) {\n x = t;r += 8;\n }\n if ((t = x >> 4) != 0) {\n x = t;r += 4;\n }\n if ((t = x >> 2) != 0) {\n x = t;r += 2;\n }\n if ((t = x >> 1) != 0) {\n x = t;r += 1;\n }\n return r;\n }", "title": "" }, { "docid": "d7867ae292b113b42cd00b07f915a599", "score": "0.76747066", "text": "function nbits(x)\n {\n var r = 1,\n t;\n if ((t = x >>> 16) != 0)\n {\n x = t;\n r += 16;\n }\n if ((t = x >> 8) != 0)\n {\n x = t;\n r += 8;\n }\n if ((t = x >> 4) != 0)\n {\n x = t;\n r += 4;\n }\n if ((t = x >> 2) != 0)\n {\n x = t;\n r += 2;\n }\n if ((t = x >> 1) != 0)\n {\n x = t;\n r += 1;\n }\n return r;\n }", "title": "" }, { "docid": "d7867ae292b113b42cd00b07f915a599", "score": "0.76747066", "text": "function nbits(x)\n {\n var r = 1,\n t;\n if ((t = x >>> 16) != 0)\n {\n x = t;\n r += 16;\n }\n if ((t = x >> 8) != 0)\n {\n x = t;\n r += 8;\n }\n if ((t = x >> 4) != 0)\n {\n x = t;\n r += 4;\n }\n if ((t = x >> 2) != 0)\n {\n x = t;\n r += 2;\n }\n if ((t = x >> 1) != 0)\n {\n x = t;\n r += 1;\n }\n return r;\n }", "title": "" }, { "docid": "77d2e23e979ae157a55d7d1194e151db", "score": "0.76723063", "text": "function nbits(x) {\n var r = 1,\n t;\n if ((t = x >>> 16) != 0) {\n x = t;\n r += 16;\n }\n if ((t = x >> 8) != 0) {\n x = t;\n r += 8;\n }\n if ((t = x >> 4) != 0) {\n x = t;\n r += 4;\n }\n if ((t = x >> 2) != 0) {\n x = t;\n r += 2;\n }\n if ((t = x >> 1) != 0) {\n x = t;\n r += 1;\n }\n return r;\n }", "title": "" }, { "docid": "c43d6f541fc7e774e2f10999a7938a77", "score": "0.76681733", "text": "function nbits(x) {\n var r = 1, t;\n if ((t = x >>> 16) != 0) {\n x = t;\n r += 16;\n }\n if ((t = x >> 8) != 0) {\n x = t;\n r += 8;\n }\n if ((t = x >> 4) != 0) {\n x = t;\n r += 4;\n }\n if ((t = x >> 2) != 0) {\n x = t;\n r += 2;\n }\n if ((t = x >> 1) != 0) {\n x = t;\n r += 1;\n }\n return r;\n }", "title": "" }, { "docid": "067253dbc605d215d350928e82868d51", "score": "0.76594096", "text": "function nbits(x) {\n var r = 1,\n t;\n if ((t = x >>> 16) != 0) {\n x = t;\n r += 16;\n }\n if ((t = x >> 8) != 0) {\n x = t;\n r += 8;\n }\n if ((t = x >> 4) != 0) {\n x = t;\n r += 4;\n }\n if ((t = x >> 2) != 0) {\n x = t;\n r += 2;\n }\n if ((t = x >> 1) != 0) {\n x = t;\n r += 1;\n }\n return r;\n }", "title": "" }, { "docid": "88d4aba0f76cee00137af1a924793302", "score": "0.76518756", "text": "function nbits(x) {\n var r = 1,\n t;\n if ((t = x >>> 16) != 0) {\n x = t;\n r += 16;\n }\n if ((t = x >> 8) != 0) {\n x = t;\n r += 8;\n }\n if ((t = x >> 4) != 0) {\n x = t;\n r += 4;\n }\n if ((t = x >> 2) != 0) {\n x = t;\n r += 2;\n }\n if ((t = x >> 1) != 0) {\n x = t;\n r += 1;\n }\n return r;\n }", "title": "" }, { "docid": "a44597b7af5c4ab7aa655ce9a1cadffd", "score": "0.7644577", "text": "function nbits(x) {\r\n var r = 1,\r\n t;\r\n if ((t = x >>> 16) != 0) {\r\n x = t;\r\n r += 16;\r\n }\r\n if ((t = x >> 8) != 0) {\r\n x = t;\r\n r += 8;\r\n }\r\n if ((t = x >> 4) != 0) {\r\n x = t;\r\n r += 4;\r\n }\r\n if ((t = x >> 2) != 0) {\r\n x = t;\r\n r += 2;\r\n }\r\n if ((t = x >> 1) != 0) {\r\n x = t;\r\n r += 1;\r\n }\r\n return r;\r\n}", "title": "" }, { "docid": "c13e70be1f49f51bb94499eb1e5d41d2", "score": "0.76348", "text": "function nbits(x) {\n var r = 1;\n var t;\n if ((t = x >>> 16) != 0) {\n x = t;\n r += 16;\n }\n if ((t = x >> 8) != 0) {\n x = t;\n r += 8;\n }\n if ((t = x >> 4) != 0) {\n x = t;\n r += 4;\n }\n if ((t = x >> 2) != 0) {\n x = t;\n r += 2;\n }\n if ((t = x >> 1) != 0) {\n x = t;\n r += 1;\n }\n return r;\n }", "title": "" }, { "docid": "f4c00a70c8a64019ed61d125582e6038", "score": "0.76300514", "text": "function nbits(x) {\r\n var r = 1;\r\n var t;\r\n if ((t = x >>> 16) != 0) {\r\n x = t;\r\n r += 16;\r\n }\r\n if ((t = x >> 8) != 0) {\r\n x = t;\r\n r += 8;\r\n }\r\n if ((t = x >> 4) != 0) {\r\n x = t;\r\n r += 4;\r\n }\r\n if ((t = x >> 2) != 0) {\r\n x = t;\r\n r += 2;\r\n }\r\n if ((t = x >> 1) != 0) {\r\n x = t;\r\n r += 1;\r\n }\r\n return r;\r\n }", "title": "" }, { "docid": "4288d1548c4767627480ac8eb9a41f6d", "score": "0.7612852", "text": "function nbits(x) {\n var r = 1,\n t;\n if ((t = x >>> 16) != 0) {\n x = t;\n r += 16;\n }\n if ((t = x >> 8) != 0) {\n x = t;\n r += 8;\n }\n if ((t = x >> 4) != 0) {\n x = t;\n r += 4;\n }\n if ((t = x >> 2) != 0) {\n x = t;\n r += 2;\n }\n if ((t = x >> 1) != 0) {\n x = t;\n r += 1;\n }\n return r;\n}", "title": "" }, { "docid": "263e3d28b86acf80240efd26d390d589", "score": "0.7612454", "text": "function nbits(x) {\n var r = 1, t;\n if ((t = x >>> 16) != 0) {\n x = t;\n r += 16;\n }\n\n if ((t = x >> 8) != 0) {\n x = t;\n r += 8;\n }\n\n if ((t = x >> 4) != 0) {\n x = t;\n r += 4;\n }\n\n if ((t = x >> 2) != 0) {\n x = t;\n r += 2;\n }\n\n if ((t = x >> 1) != 0) {\n x = t;\n r += 1;\n }\n return r;\n}", "title": "" }, { "docid": "193eb5b788832dc00180d060dcdd0516", "score": "0.76101774", "text": "function nbits(x) {\n var r = 1,\n t;\n if ((t = x >>> 16) != 0) {\n x = t;\n r += 16;\n }\n if ((t = x >> 8) != 0) {\n x = t;\n r += 8;\n }\n if ((t = x >> 4) != 0) {\n x = t;\n r += 4;\n }\n if ((t = x >> 2) != 0) {\n x = t;\n r += 2;\n }\n if ((t = x >> 1) != 0) {\n x = t;\n r += 1;\n }\n return r;\n}", "title": "" }, { "docid": "9b1c0e37f1dc9ac6e71e1d814b59d7a6", "score": "0.7603298", "text": "function nbits(x) {\n var r = 1,\n t;\n if ((t = x >>> 16) != 0) {\n x = t;\n r += 16;\n }\n if ((t = x >> 8) != 0) {\n x = t;\n r += 8;\n }\n if ((t = x >> 4) != 0) {\n x = t;\n r += 4;\n }\n if ((t = x >> 2) != 0) {\n x = t;\n r += 2;\n }\n if ((t = x >> 1) != 0) {\n x = t;\n r += 1;\n }\n return r;\n}", "title": "" }, { "docid": "9b1c0e37f1dc9ac6e71e1d814b59d7a6", "score": "0.7603298", "text": "function nbits(x) {\n var r = 1,\n t;\n if ((t = x >>> 16) != 0) {\n x = t;\n r += 16;\n }\n if ((t = x >> 8) != 0) {\n x = t;\n r += 8;\n }\n if ((t = x >> 4) != 0) {\n x = t;\n r += 4;\n }\n if ((t = x >> 2) != 0) {\n x = t;\n r += 2;\n }\n if ((t = x >> 1) != 0) {\n x = t;\n r += 1;\n }\n return r;\n}", "title": "" }, { "docid": "a65d2eaa329e62692595757bbc297d2d", "score": "0.75948954", "text": "function nbits(x) {\n\t var r = 1, t;\n\t if((t=x>>>16) != 0) { x = t; r += 16; }\n\t if((t=x>>8) != 0) { x = t; r += 8; }\n\t if((t=x>>4) != 0) { x = t; r += 4; }\n\t if((t=x>>2) != 0) { x = t; r += 2; }\n\t if((t=x>>1) != 0) { x = t; r += 1; }\n\t return r;\n\t }", "title": "" }, { "docid": "a65d2eaa329e62692595757bbc297d2d", "score": "0.75948954", "text": "function nbits(x) {\n\t var r = 1, t;\n\t if((t=x>>>16) != 0) { x = t; r += 16; }\n\t if((t=x>>8) != 0) { x = t; r += 8; }\n\t if((t=x>>4) != 0) { x = t; r += 4; }\n\t if((t=x>>2) != 0) { x = t; r += 2; }\n\t if((t=x>>1) != 0) { x = t; r += 1; }\n\t return r;\n\t }", "title": "" }, { "docid": "8f91efc2823f7b4064bd56e7f6036e25", "score": "0.7589331", "text": "function nbits(x) {\n var r = 1, t;\n if ((t = x >>> 16) != 0) {\n x = t;\n r += 16;\n }\n if ((t = x >> 8) != 0) {\n x = t;\n r += 8;\n }\n if ((t = x >> 4) != 0) {\n x = t;\n r += 4;\n }\n if ((t = x >> 2) != 0) {\n x = t;\n r += 2;\n }\n if ((t = x >> 1) != 0) {\n x = t;\n r += 1;\n }\n return r;\n}", "title": "" }, { "docid": "ce2be76bcbb1a2e4d2b4a4dc642a2a9a", "score": "0.7583842", "text": "function nbits(x) {\n var r = 1,\n t\n if ((t = x >>> 16) != 0) {\n x = t\n r += 16\n }\n if ((t = x >> 8) != 0) {\n x = t\n r += 8\n }\n if ((t = x >> 4) != 0) {\n x = t\n r += 4\n }\n if ((t = x >> 2) != 0) {\n x = t\n r += 2\n }\n if ((t = x >> 1) != 0) {\n x = t\n r += 1\n }\n return r\n}", "title": "" }, { "docid": "ce2be76bcbb1a2e4d2b4a4dc642a2a9a", "score": "0.7583842", "text": "function nbits(x) {\n var r = 1,\n t\n if ((t = x >>> 16) != 0) {\n x = t\n r += 16\n }\n if ((t = x >> 8) != 0) {\n x = t\n r += 8\n }\n if ((t = x >> 4) != 0) {\n x = t\n r += 4\n }\n if ((t = x >> 2) != 0) {\n x = t\n r += 2\n }\n if ((t = x >> 1) != 0) {\n x = t\n r += 1\n }\n return r\n}", "title": "" }, { "docid": "ce2be76bcbb1a2e4d2b4a4dc642a2a9a", "score": "0.7583842", "text": "function nbits(x) {\n var r = 1,\n t\n if ((t = x >>> 16) != 0) {\n x = t\n r += 16\n }\n if ((t = x >> 8) != 0) {\n x = t\n r += 8\n }\n if ((t = x >> 4) != 0) {\n x = t\n r += 4\n }\n if ((t = x >> 2) != 0) {\n x = t\n r += 2\n }\n if ((t = x >> 1) != 0) {\n x = t\n r += 1\n }\n return r\n}", "title": "" }, { "docid": "ce2be76bcbb1a2e4d2b4a4dc642a2a9a", "score": "0.7583842", "text": "function nbits(x) {\n var r = 1,\n t\n if ((t = x >>> 16) != 0) {\n x = t\n r += 16\n }\n if ((t = x >> 8) != 0) {\n x = t\n r += 8\n }\n if ((t = x >> 4) != 0) {\n x = t\n r += 4\n }\n if ((t = x >> 2) != 0) {\n x = t\n r += 2\n }\n if ((t = x >> 1) != 0) {\n x = t\n r += 1\n }\n return r\n}", "title": "" }, { "docid": "ce2be76bcbb1a2e4d2b4a4dc642a2a9a", "score": "0.7583842", "text": "function nbits(x) {\n var r = 1,\n t\n if ((t = x >>> 16) != 0) {\n x = t\n r += 16\n }\n if ((t = x >> 8) != 0) {\n x = t\n r += 8\n }\n if ((t = x >> 4) != 0) {\n x = t\n r += 4\n }\n if ((t = x >> 2) != 0) {\n x = t\n r += 2\n }\n if ((t = x >> 1) != 0) {\n x = t\n r += 1\n }\n return r\n}", "title": "" }, { "docid": "ce2be76bcbb1a2e4d2b4a4dc642a2a9a", "score": "0.7583842", "text": "function nbits(x) {\n var r = 1,\n t\n if ((t = x >>> 16) != 0) {\n x = t\n r += 16\n }\n if ((t = x >> 8) != 0) {\n x = t\n r += 8\n }\n if ((t = x >> 4) != 0) {\n x = t\n r += 4\n }\n if ((t = x >> 2) != 0) {\n x = t\n r += 2\n }\n if ((t = x >> 1) != 0) {\n x = t\n r += 1\n }\n return r\n}", "title": "" }, { "docid": "ce2be76bcbb1a2e4d2b4a4dc642a2a9a", "score": "0.7583842", "text": "function nbits(x) {\n var r = 1,\n t\n if ((t = x >>> 16) != 0) {\n x = t\n r += 16\n }\n if ((t = x >> 8) != 0) {\n x = t\n r += 8\n }\n if ((t = x >> 4) != 0) {\n x = t\n r += 4\n }\n if ((t = x >> 2) != 0) {\n x = t\n r += 2\n }\n if ((t = x >> 1) != 0) {\n x = t\n r += 1\n }\n return r\n}", "title": "" }, { "docid": "ce2be76bcbb1a2e4d2b4a4dc642a2a9a", "score": "0.7583842", "text": "function nbits(x) {\n var r = 1,\n t\n if ((t = x >>> 16) != 0) {\n x = t\n r += 16\n }\n if ((t = x >> 8) != 0) {\n x = t\n r += 8\n }\n if ((t = x >> 4) != 0) {\n x = t\n r += 4\n }\n if ((t = x >> 2) != 0) {\n x = t\n r += 2\n }\n if ((t = x >> 1) != 0) {\n x = t\n r += 1\n }\n return r\n}", "title": "" }, { "docid": "ce2be76bcbb1a2e4d2b4a4dc642a2a9a", "score": "0.7583842", "text": "function nbits(x) {\n var r = 1,\n t\n if ((t = x >>> 16) != 0) {\n x = t\n r += 16\n }\n if ((t = x >> 8) != 0) {\n x = t\n r += 8\n }\n if ((t = x >> 4) != 0) {\n x = t\n r += 4\n }\n if ((t = x >> 2) != 0) {\n x = t\n r += 2\n }\n if ((t = x >> 1) != 0) {\n x = t\n r += 1\n }\n return r\n}", "title": "" }, { "docid": "ce2be76bcbb1a2e4d2b4a4dc642a2a9a", "score": "0.7583842", "text": "function nbits(x) {\n var r = 1,\n t\n if ((t = x >>> 16) != 0) {\n x = t\n r += 16\n }\n if ((t = x >> 8) != 0) {\n x = t\n r += 8\n }\n if ((t = x >> 4) != 0) {\n x = t\n r += 4\n }\n if ((t = x >> 2) != 0) {\n x = t\n r += 2\n }\n if ((t = x >> 1) != 0) {\n x = t\n r += 1\n }\n return r\n}", "title": "" }, { "docid": "ec2f2556d0bcc4121fe3428c9c2bba32", "score": "0.7579898", "text": "function nbits (x) {\n var r = 1\n\n var t\n if ((t = x >>> 16) != 0) {\n x = t\n r += 16\n }\n if ((t = x >> 8) != 0) {\n x = t\n r += 8\n }\n if ((t = x >> 4) != 0) {\n x = t\n r += 4\n }\n if ((t = x >> 2) != 0) {\n x = t\n r += 2\n }\n if ((t = x >> 1) != 0) {\n x = t\n r += 1\n }\n return r\n}", "title": "" }, { "docid": "fffdb798903652376ee652572efca6de", "score": "0.7575008", "text": "function nbits(x) {\n\t\t var r = 1, t;\n\t\t if ((t = x >>> 16) != 0) {\n\t\t x = t;\n\t\t r += 16;\n\t\t }\n\t\t if ((t = x >> 8) != 0) {\n\t\t x = t;\n\t\t r += 8;\n\t\t }\n\t\t if ((t = x >> 4) != 0) {\n\t\t x = t;\n\t\t r += 4;\n\t\t }\n\t\t if ((t = x >> 2) != 0) {\n\t\t x = t;\n\t\t r += 2;\n\t\t }\n\t\t if ((t = x >> 1) != 0) {\n\t\t x = t;\n\t\t r += 1;\n\t\t }\n\t\t return r;\n\t\t}", "title": "" }, { "docid": "ee5af0ce8f612b6db5123254de889d98", "score": "0.7569758", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "ee5af0ce8f612b6db5123254de889d98", "score": "0.7569758", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "ee5af0ce8f612b6db5123254de889d98", "score": "0.7569758", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "ee5af0ce8f612b6db5123254de889d98", "score": "0.7569758", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "ee5af0ce8f612b6db5123254de889d98", "score": "0.7569758", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "ee5af0ce8f612b6db5123254de889d98", "score": "0.7569758", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "ee5af0ce8f612b6db5123254de889d98", "score": "0.7569758", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "ee5af0ce8f612b6db5123254de889d98", "score": "0.7569758", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "ee5af0ce8f612b6db5123254de889d98", "score": "0.7569758", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "ee5af0ce8f612b6db5123254de889d98", "score": "0.7569758", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "ee5af0ce8f612b6db5123254de889d98", "score": "0.7569758", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "ee5af0ce8f612b6db5123254de889d98", "score": "0.7569758", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "ee5af0ce8f612b6db5123254de889d98", "score": "0.7569758", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "ee5af0ce8f612b6db5123254de889d98", "score": "0.7569758", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "af025a620ae7b9bece9e7f1b12c41ab5", "score": "0.7567935", "text": "function nbits(x) {\r\n var r = 1, t;\r\n if((t=x>>>16) != 0) { x = t; r += 16; }\r\n if((t=x>>8) != 0) { x = t; r += 8; }\r\n if((t=x>>4) != 0) { x = t; r += 4; }\r\n if((t=x>>2) != 0) { x = t; r += 2; }\r\n if((t=x>>1) != 0) { x = t; r += 1; }\r\n return r;\r\n }", "title": "" }, { "docid": "b7e0e7cd9a3cee99e6fcf10a44fcf9a8", "score": "0.75645727", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "b7e0e7cd9a3cee99e6fcf10a44fcf9a8", "score": "0.75645727", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "b7e0e7cd9a3cee99e6fcf10a44fcf9a8", "score": "0.75645727", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "b7e0e7cd9a3cee99e6fcf10a44fcf9a8", "score": "0.75645727", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "b7e0e7cd9a3cee99e6fcf10a44fcf9a8", "score": "0.75645727", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "b7e0e7cd9a3cee99e6fcf10a44fcf9a8", "score": "0.75645727", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "b7e0e7cd9a3cee99e6fcf10a44fcf9a8", "score": "0.75645727", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "b7e0e7cd9a3cee99e6fcf10a44fcf9a8", "score": "0.75645727", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "b7e0e7cd9a3cee99e6fcf10a44fcf9a8", "score": "0.75645727", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "b7e0e7cd9a3cee99e6fcf10a44fcf9a8", "score": "0.75645727", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "b7e0e7cd9a3cee99e6fcf10a44fcf9a8", "score": "0.75645727", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "b7e0e7cd9a3cee99e6fcf10a44fcf9a8", "score": "0.75645727", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "b7e0e7cd9a3cee99e6fcf10a44fcf9a8", "score": "0.75645727", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "b7e0e7cd9a3cee99e6fcf10a44fcf9a8", "score": "0.75645727", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "b7e0e7cd9a3cee99e6fcf10a44fcf9a8", "score": "0.75645727", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "b7e0e7cd9a3cee99e6fcf10a44fcf9a8", "score": "0.75645727", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "b7e0e7cd9a3cee99e6fcf10a44fcf9a8", "score": "0.75645727", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "b7e0e7cd9a3cee99e6fcf10a44fcf9a8", "score": "0.75645727", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "b7e0e7cd9a3cee99e6fcf10a44fcf9a8", "score": "0.75645727", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "b7e0e7cd9a3cee99e6fcf10a44fcf9a8", "score": "0.75645727", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "b7e0e7cd9a3cee99e6fcf10a44fcf9a8", "score": "0.75645727", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "b7e0e7cd9a3cee99e6fcf10a44fcf9a8", "score": "0.75645727", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "b7e0e7cd9a3cee99e6fcf10a44fcf9a8", "score": "0.75645727", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "b7e0e7cd9a3cee99e6fcf10a44fcf9a8", "score": "0.75645727", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "b7e0e7cd9a3cee99e6fcf10a44fcf9a8", "score": "0.75645727", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "b7e0e7cd9a3cee99e6fcf10a44fcf9a8", "score": "0.75645727", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "b7e0e7cd9a3cee99e6fcf10a44fcf9a8", "score": "0.75645727", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "b7e0e7cd9a3cee99e6fcf10a44fcf9a8", "score": "0.75645727", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n }", "title": "" }, { "docid": "3a9a58b77a3ea288555fc8259abca812", "score": "0.7555777", "text": "function nbits(x) {\n \t\tvar r = 1, t;\n \t\tif((t=x>>>16) != 0) { x = t; r += 16; }\n \t\tif((t=x>>8) != 0) { x = t; r += 8; }\n \t\tif((t=x>>4) != 0) { x = t; r += 4; }\n \t\tif((t=x>>2) != 0) { x = t; r += 2; }\n \t\tif((t=x>>1) != 0) { x = t; r += 1; }\n \t\treturn r;\n\t}", "title": "" }, { "docid": "3a9a58b77a3ea288555fc8259abca812", "score": "0.7555777", "text": "function nbits(x) {\n \t\tvar r = 1, t;\n \t\tif((t=x>>>16) != 0) { x = t; r += 16; }\n \t\tif((t=x>>8) != 0) { x = t; r += 8; }\n \t\tif((t=x>>4) != 0) { x = t; r += 4; }\n \t\tif((t=x>>2) != 0) { x = t; r += 2; }\n \t\tif((t=x>>1) != 0) { x = t; r += 1; }\n \t\treturn r;\n\t}", "title": "" }, { "docid": "3a9a58b77a3ea288555fc8259abca812", "score": "0.7555777", "text": "function nbits(x) {\n \t\tvar r = 1, t;\n \t\tif((t=x>>>16) != 0) { x = t; r += 16; }\n \t\tif((t=x>>8) != 0) { x = t; r += 8; }\n \t\tif((t=x>>4) != 0) { x = t; r += 4; }\n \t\tif((t=x>>2) != 0) { x = t; r += 2; }\n \t\tif((t=x>>1) != 0) { x = t; r += 1; }\n \t\treturn r;\n\t}", "title": "" }, { "docid": "2468d205f3a5f044eb5147fdb9fbb0da", "score": "0.7536949", "text": "function nbits(x){var r=1,t;if((t=x>>>16)!=0){x=t;r+=16}if((t=x>>8)!=0){x=t;r+=8}if((t=x>>4)!=0){x=t;r+=4}if((t=x>>2)!=0){x=t;r+=2}if((t=x>>1)!=0){x=t;r+=1}return r}", "title": "" }, { "docid": "2e3c0915fb37c1ddecdab9f9803614b1", "score": "0.7530924", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n}", "title": "" }, { "docid": "2e3c0915fb37c1ddecdab9f9803614b1", "score": "0.7530924", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n}", "title": "" }, { "docid": "2e3c0915fb37c1ddecdab9f9803614b1", "score": "0.7530924", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n}", "title": "" }, { "docid": "2e3c0915fb37c1ddecdab9f9803614b1", "score": "0.7530924", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n}", "title": "" }, { "docid": "2e3c0915fb37c1ddecdab9f9803614b1", "score": "0.7530924", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n}", "title": "" }, { "docid": "2e3c0915fb37c1ddecdab9f9803614b1", "score": "0.7530924", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n}", "title": "" }, { "docid": "2e3c0915fb37c1ddecdab9f9803614b1", "score": "0.7530924", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n}", "title": "" }, { "docid": "2e3c0915fb37c1ddecdab9f9803614b1", "score": "0.7530924", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n}", "title": "" }, { "docid": "2e3c0915fb37c1ddecdab9f9803614b1", "score": "0.7530924", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n}", "title": "" }, { "docid": "2e3c0915fb37c1ddecdab9f9803614b1", "score": "0.7530924", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n}", "title": "" }, { "docid": "2e3c0915fb37c1ddecdab9f9803614b1", "score": "0.7530924", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n}", "title": "" }, { "docid": "2e3c0915fb37c1ddecdab9f9803614b1", "score": "0.7530924", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n}", "title": "" }, { "docid": "2e3c0915fb37c1ddecdab9f9803614b1", "score": "0.7530924", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n}", "title": "" }, { "docid": "2e3c0915fb37c1ddecdab9f9803614b1", "score": "0.7530924", "text": "function nbits(x) {\n var r = 1, t;\n if((t=x>>>16) != 0) { x = t; r += 16; }\n if((t=x>>8) != 0) { x = t; r += 8; }\n if((t=x>>4) != 0) { x = t; r += 4; }\n if((t=x>>2) != 0) { x = t; r += 2; }\n if((t=x>>1) != 0) { x = t; r += 1; }\n return r;\n}", "title": "" } ]
b2ef3d30172a169939b41eab34578327
Iteration 2: Steven Spielberg. The best? How many drama movies did STEVEN SPIELBERG direct?
[ { "docid": "38ad8aaffda7aaaa99aca96de330a23a", "score": "0.0", "text": "function howManyMovies(peliculas) {\n return peliculas.filter(pelicula => (pelicula.director === \"Steven Spielberg\" && pelicula.genre.indexOf(\"Drama\") > -1)).length\n}", "title": "" } ]
[ { "docid": "6b166a39171e50b4110d2d6e6cde3636", "score": "0.66156626", "text": "function howManyMovies(movies){\n if (movies == 0){}\n else {\n var dramaFilms = [];\n for (var i = 0; i < movies.length; i++){\n for (var j = 0; j < movies[i].genre.length; j++){\n if (movies[i].genre[j] === 'Drama'){\n dramaFilms.push(movies[i])\n }\n }\n}\n var stevenFilms = dramaFilms.filter(function(elm){\n return elm.director == 'Steven Spielberg';\n });\n return 'Steven Spielberg directed ' + stevenFilms.length + ' drama movies!'\n}\n}", "title": "" }, { "docid": "1ca1de07b8e31ac8111ffab5260a8ec5", "score": "0.6434832", "text": "function howManyMovies(movies) {\n if (movies.length === 0) {\n return;\n }\n\n var spielbergFilms = movies.filter(function(oneMovie) {\n return oneMovie.director === \"Steven Spielberg\";\n });\n\n var dramas = dramaOnly(spielbergFilms);\n\n return \"Steven Spielberg directed \" + dramas.length + \" drama movies!\";\n}", "title": "" }, { "docid": "80d7e03875c3cbc1b76cc29d08eeeb0b", "score": "0.6394221", "text": "function main(total, numReqs, movies) {\r\n\r\n var output = \"9 19 29 31 13 72 58 73 10 7 64 69 83 73 33 79 28 0 66 65 77 18 12 39 0 66 55 15 26 55 73 67 38 65 29 47 80 69 27 82 53 55 47 31 31 62 51 29 15 83 43 44 0 28 80 0 76 11 3 79 59 33 83 29 11 20 8 83 52 49 61 69 66 32 17 41 2 57 21 45 10 3 18 77 79 27 76 43 7 5 81 57 11 28 74 60 64 38 72 55 22 1 82 42 28 41 27 14 83 39 70 43 6 67 69 76 7 12 76 11 37 10 2 70 1 77 51 59 21 80 46 21 52 22 74 15 12 32 57 16 40 81 2 5 61 44 14 66 1 56 40 6 49 82 31 56 27 38 6 42 35 51 36 40 82 36 67 69 16 73 20 42 53 0 2 66 26 29 8 17 33 12 54 0 67 8 56 67 6 24 77 81 21 37 28 16 21 45 68 16 74 13 51 73 16 21 78 72 56 12 71 50 46 82 37 32 61 50 13 76 48 79 21 6 10 34 68 63 72 43 65 28 51 36 17 12 56 11 11 78 17 35 58 47 65 81 24 68 68 47 0 73 23 48 82 77 40 79 66 30 49 15 10 44 37 65 67 62 25 45 29 22 26 60 18 3 72 31 45 30 57 67 45 76 55 70 73 24 59 53 66 21 49 59 12 61 25 71 78 26 2 32 59 80 56 77 78 41 74 9 74 44 56 31 43 43 41 37 10 13 74 65 36 25 56 19 12 24 4 81 18 75 81 10 14 68 25 55 26 42 69 56 24 73 56 62 43 10 51 38 26 55 31 23 71 2 64 14 2 0 40 42 24 33 78 8 22 32 6 39 54 51 74 22 39 17 42 46 76 31 29 42 19 7 71 71 5 50 76 22 77 71 39 28 44 13 75 66 69 12 26 39 23 52 34 7 81 41 17 71 60 15 45 0 64 11 54 72 49 25 16 72 38 73 42 22 82 35 47 25 10 42 22 38 82 38 50 49 44 57 53 22 35 7 24 82 82 2 56 41 58 17 24 7 60 47 55 70 10 30 55 25 8 8 3 8 52 39 65 72 20 32 45 70 34 2 72 19 67 62 65 4 8 72 16 78 24 71 0 1 36 8 50 78 12 76 37 50 18 80 21 15 79 83 35 3 32 41 47 37 6 4 62 69 42 82 72 72 10 39 47 25 7 59 79 0 35 23 14 57 5 58 35 70 59 26 47 7 75 42 26 7 36 79 48 55 47 49 24 65 40 56 18 83 56 60 21 26 16 35 0 50 6 33 19 74 23 11 4 67 66 46 54 47 75 77 5 62 49 61 33 41 56 21 23 2 72 5 27 5 10 4 21 2 13 29 8 10 40 63 23 12 55 79 5 82 42 5 83 83 56 39 54 45 29 29 33 2 12 83 72 12 77 69 61 66 79 51 33 12 20 74 75 81 67 24 57 63 24 6 45 70 14 39 51 74 70 21 66 78 62 31 83 54 55 15 29 20 5 58 29 79 69 32 17 17 25 26 51 33 34 54 83 43 52 62 10 7 31 17 75 47 75 36 67 63 60 81 38 31 48 40 47 67 71 25 7 23 32 38 76 42 45 50 3 70 16 33 1 78 1 35 30 59 31 10 53 78 19 0 25 80 42 76 15 71 31 0 9 13 5 50 20 63 82 49 41 37 27 24 70 77 24 28 69 35 82 17 7 13 8 34 38 79 34 31 35 47 13 42 35 38 4 35 39 77 10 5 27 37 82 29 7 16 20 43 70 4 58 82 54 13 62 66 70 35 46 75 49 18 71 4 10 62 56 24 78 35 13 6 18 16 44 79 78 11 13 15 5 60 75 13 83 9 48 66 53 63 79 27 80 74 47 30 8 5 29 61 6 38 61 66 56 51 47 33 20 27 53 83 36 31 67 48 21 27 47 29 55 35 62 2 56 61 31 16 65 50 23 78 30 51 28 58 5 22 71 5 44 3 4 73 37 33 78 10 33 13 75 11 47 4 49 64 6 27 36\";\r\n var fs = require('fs');\r\n var _ = require('lodash');\r\n var moviesArr = getMovies(total);\r\n var requests = movies.split(' ');\r\n var result = [];\r\n\r\n for (var i = 0; i < requests.length; i++) {\r\n var cnt = 0;\r\n //fs.writeFileSync(\"log\" + requests[i] + \".json\", JSON.stringify(moviesArr));\r\n for (var j = 0; j < moviesArr.length; j++) {\r\n\r\n if (moviesArr[j].value === parseInt(requests[i])) {\r\n // console.log(moviesArr[j].index);\r\n for (var k = 0; k < moviesArr.length; k++) {\r\n\r\n if (moviesArr[k].index < moviesArr[j].index) {\r\n moviesArr[k].index++;\r\n } else if (moviesArr[k].index === moviesArr[j].index) {\r\n // console.log(moviesArr[k]);\r\n cnt = moviesArr[k].index - 1;\r\n moviesArr[k].index = 1;\r\n moviesArr = _.orderBy(moviesArr, 'index');\r\n break;\r\n }\r\n }\r\n break;\r\n }\r\n else {\r\n // cnt++;\r\n }\r\n\r\n }\r\n\r\n\r\n result.push(cnt);\r\n }\r\n\r\n console.log(result.join(' ') === output);\r\n return result.join(' ');\r\n}", "title": "" }, { "docid": "14f1d40c8bad0925d3119414b0890e06", "score": "0.6371687", "text": "function howManyMovies(movies)\n{\n if (movies.length==0) return;\n var moviesSpielberg = movies.filter(function(movie){\n return (movie.genre.indexOf('Drama')!=-1 && movie.director === 'Steven Spielberg');\n });\n return \"Steven Spielberg directed \" + moviesSpielberg.length + \" drama movies!\";\n}", "title": "" }, { "docid": "ecccde8ee7289f125c9ef71d49827c16", "score": "0.6357179", "text": "function howManyMovies(array){\n var spielbergDrama =\n array.filter(function(oneMovie){\n return oneMovie.director == \"Steven Spielberg\" && oneMovie.genre.includes(\"Drama\");\n });\n // if(spielbergDrama.length < 1){\n // return \"Steven Spielberg directed 0 drama movies!\";\n // // return undefined;\n // }\n return \"Steven Spielberg directed \" + spielbergDrama.length + \" drama movies!\";\n}", "title": "" }, { "docid": "99ed702afaca20205068cfedbf8e03a4", "score": "0.63473773", "text": "function countSpielbergDramaMovies(steve) {\n let moviesBySteven = steve.filter((movie) => {\n for (let i = 0; i < movie.genre.length; i++)\n if (movie.genre[i].toLowerCase() === 'drama'){\n return true\n }});\n\n const steveActual = moviesBySteven.filter((movie => movie.director === 'Steven Spielberg'));\n\n return steveActual.length;\n }", "title": "" }, { "docid": "55953970d5dc03e4deba84be2298e257", "score": "0.6327606", "text": "function howManyMovies(movies) {\n let movieString = \"\";\n let spielbergMovies = movies.filter(movie => movie.director === 'Steven Spielberg' && movie.genre.includes('Drama'))\n let total = movieString += spielbergMovies.length\n if (total === 0) return undefined\n return `Steven Spielberg directed ${total} drama movies!`\n }", "title": "" }, { "docid": "664404cc81ad95853f498ef629034c89", "score": "0.63105273", "text": "function dramaMoviesRate(movies){\n const dramaMovie = movies.filter (function(movie)}\n return movie.genre.indexOf(\"Drama\")\n})", "title": "" }, { "docid": "3439b586c19f043d7da44a5ddd135229", "score": "0.6302542", "text": "function howManyMovies(movies) {\n var sortedSteven = movies.filter(function(oneMovie) {\n return (\n oneMovie.director === \"Steven Spielberg\" &&\n oneMovie.genre.indexOf(\"Drama\") !== -1\n );\n });\n if (sortedSteven.length === 0) {\n return undefined;\n } else {\n return (\n \"Steven Spielberg directed \" + sortedSteven.length + \" drama movies!\"\n );\n }\n}", "title": "" }, { "docid": "6e0aecf7dcd5da07ce3aeee7e7f2294a", "score": "0.6272771", "text": "function howManyMovies(movies){\n\n if (moviesSpielberg.length == 0){\n return undefined\n }\n\n let moviesSpielberg = movies.filter(elm => {\n \n\n return elm.director == 'Steven Spielberg' && elm.genre.includes('Drama')\n })\n\n return `Steven Spielberg directed ${moviesSpielberg.length} drama movies`\n\n console.log(moviesSpielberg)\n}", "title": "" }, { "docid": "cc31164118957d708d815928dff12e2f", "score": "0.6258949", "text": "function howManyMovies(movies) {\n if(movies.length === 0){\n return undefined;\n }\n var spielbergMovies = movies.filter(function(movie) {\n var filterGenres = movie.genre.filter(function(genre) {\n return genre === \"Drama\"; \n })\n if(filterGenres.length > 0 && movie.director === \"Steven Spielberg\"){\n return true;\n }else {\n return false;\n }\n });\n return `Steven Spielberg directed ${spielbergMovies.length} drama movies!`;\n}", "title": "" }, { "docid": "7161ee6784d32fb03eebf29bc0d791b5", "score": "0.6218979", "text": "function howManyMovies(movies) {\n if(movies.length === 0) {\n return undefined;\n }\n\n var dramasBySpielberg = movies.filter(function(movie) {\n if(movie.director === 'Steven Spielberg' && movie.genre.indexOf('Drama') !== -1) {\n return movie;\n }\n });\n\n return 'Steven Spielberg directed ' + dramasBySpielberg.length + ' drama movies!';;\n}", "title": "" }, { "docid": "18ced0c887a381d28a2e182b3f21ac2a", "score": "0.62149805", "text": "function dramaMoviesScore(movies) {\n dramaMovies = movies.filter(i => i.genre.includes('Drama'))\n return (dramaMovies.reduce((acc, item)=> acc + (item.score || 0), 0) / dramaMovies.length).toFixed(2) * 1 || 0\n}", "title": "" }, { "docid": "a47198d611e678a3eeebc9dbc8f4da9c", "score": "0.6191351", "text": "function howManyMovies(moviesArray) {\n let dramaMoviesBySpielberg = moviesArray.filter(movie => (movie.genre.includes('Drama')) && (movie.director.includes('Steven Spielberg')))\n if (moviesArray.length == 0) { return undefined }\n return `Steven Spielberg directed ${dramaMoviesBySpielberg.length} drama movies!`\n\n}", "title": "" }, { "docid": "3d3710fa151ba7bfd65d5fc6a1a4126b", "score": "0.6176934", "text": "function howManyMovies(array){\n if (array.length === 0){\n return undefined;\n }\n counter = 0;\n for (var i = 0; i < array.length; i++){\n if ((array[i].director === 'Steven Spielberg') \n /* && (movie.genre.indexOf(\"Drama\") !== -1 *//* || movie.genre === \"Drama\") */){\n counter += 1;\n };\n }\n return (\"Steven Spielberg directed \" + counter + \" drama movies!\")\n\n /* var newMovies = \n array.filter(function(movie){\n return (movie.director === 'Steven Spielberg') && (movie.genre.indexOf(\"Drama\") !== -1 || movie.genre === \"Drama\")\n });\n return newMovies; */\n}", "title": "" }, { "docid": "8ff140d2d5829d57591820c4b75a1f49", "score": "0.6157767", "text": "function howManyMovies(movies){\n if (movies.length === 0){\n return undefined\n }\n let movisDrama = movies.filter(movie => movie.genre.includes(`Drama`))\n let moviesSpilber = movisDrama.filter(movie =>movie.director.includes('Steven Spielberg'))\n \n return (`Steven Spielberg directed ${moviesSpilber.length} drama movies!`)\n }", "title": "" }, { "docid": "1e516bd368766227373c0505a135c791", "score": "0.61345434", "text": "function bestYearForCinema(movies) {}", "title": "" }, { "docid": "040988daab5a955223ee80d425535df1", "score": "0.6132566", "text": "function howManyMovies(someArray) {\n let stevenMovies = 0;\n \n someArray.forEach(eachMovie => {\n if ((eachMovie.director === \"Steven Spielberg\") && (eachMovie.genre.includes('Drama'))) {\n stevenMovies ++\n }\n });\n \n return stevenMovies; \n}", "title": "" }, { "docid": "363f55395bccd8edf93684aa03959219", "score": "0.6110308", "text": "function howManyMovies(movies) {\n const stevenDrama = movies.filter(elm => elm.director === \"Steven Spielberg\" && elm.genre.includes(\"Drama\"))\n return stevenDrama.length\n}", "title": "" }, { "docid": "cb1ea9dd09f889d7702ed0c71340d45c", "score": "0.6109561", "text": "function howManyMovies (movies) {\n const moviesSpielberg = movies.filter(aMovie => aMovie.director === \"Steven Spielberg\")\n const moviesSpielbergDrama = moviesSpielberg.filter(aMovie => aMovie.genre.includes(\"Drama\"))\n \n if (moviesSpielbergDrama.length == 0) {\n return 0;\n } \n else {\n return moviesSpielbergDrama.length;\n }\n }", "title": "" }, { "docid": "e6f6df10b6c23ec8bb8b2f0933ed9783", "score": "0.6104261", "text": "function howManyMovies(movies) {\n if (movies.length == 0) return;\n\n var dramaMovies = filterDrama(movies);\n\n var result = dramaMovies.filter(function(movie) {\n return movie.director == \"Steven Spielberg\";\n }).length;\n\n return `Steven Spielberg directed ${result} drama movies!`;\n}", "title": "" }, { "docid": "b6408ef1a43a593c814ccbc2a0aa2bc4", "score": "0.60953003", "text": "function howManyMovies(moviesArray) {\n if(moviesArray.length === 0){return undefined;}\n let stevenDramaMovies = moviesArray.filter((eachMovie)=>{\n return (eachMovie.genre.includes(\"Drama\")) && (eachMovie.director === 'Steven Spielberg');\n });\n\n return `Steven Spielberg directed ${stevenDramaMovies.length} drama movies!`;\n}", "title": "" }, { "docid": "4c5fc237c7335294dc80c56c2a019f6a", "score": "0.60912436", "text": "function howManyMovies(movies) {\n const spielbergDrama = movies.filter(movie => movie.director === \"Steven Spielberg\" && movie.genre.includes(\"Drama\"))\n return spielbergDrama.length\n }", "title": "" }, { "docid": "4c9621ef8b75bfa727be6292bc0e5850", "score": "0.60874885", "text": "function howManyMovies(aArray){\n var dramaMovies = aArray.filter(function(item){\n return (item.genre.indexOf('Drama')>-1);\n });\n var dramaMoviesOfstevenSpielberg = dramaMovies.filter(function(item){\n return item.director==='Steven Spielberg';\n });\n if (dramaMovies!=0)\n return 'Steven Spielberg directed '+dramaMoviesOfstevenSpielberg.length+' drama movies!';\n}", "title": "" }, { "docid": "7ee54aa4a5b38a1ef3b38291012c1ae0", "score": "0.60849625", "text": "function howManyMovies(arrayOfMovieObjects){\n if(arrayOfMovieObjects.length ===0){return}//this is the same as return undefined\n let dramasBySteven = arrayOfMovieObjects.filter((eachMovie)=>{\n return eachMovie.director === \"Steven Spielberg\" && eachMovie.genre.includes('Drama');\n })\n return `Steven Spielberg directed ${dramasBySteven.length} drama movies!`; \n}", "title": "" }, { "docid": "102f71b825f8c0698c4891bb0843efb4", "score": "0.60691667", "text": "function howManyMovies(array) {\n if (array.length === 0) {\n return undefined\n }\n else {\n const dramaBySpielberg = array.filter(element => element.genre.includes('Drama') && element.director === 'Steven Spielberg')\n return `Steven Spielberg directed ${dramaBySpielberg.length} drama movies!`\n }\n}", "title": "" }, { "docid": "79ed8b435c86b13f5e43caa106faff47", "score": "0.60372436", "text": "function howManyMovies(movies) {\n\tif (movies.length == 0) {\n\t\treturn undefined;\n\t}\n\tvar dramaMovies = movies.filter(function(movie) {\n\t\treturn movie.director.includes('Steven Spielberg') && movie.genre.includes('Drama');\n\t});\n\tif (dramaMovies.length >= 0) {\n\t\treturn `Steven Spielberg directed ${dramaMovies.length} drama movies!`;\n\t}\n}", "title": "" }, { "docid": "ded82d9ac9095a07917064a8c8233b30", "score": "0.6030565", "text": "function howManyMovies(movies) {\n const stevenDrama = movies.filter(function (e, i) {\n return (e.director === 'Steven Spielberg' && e.genre.includes('Drama'));\n });\n return stevenDrama.length;\n}", "title": "" }, { "docid": "8d7ce3f2729b2c69500863101f23ad6d", "score": "0.60248303", "text": "function dramaMoviesRate(movies){\n // filter out the drama movies\n const dramas = movies.filter(function (movie))\n\n}", "title": "" }, { "docid": "5d53f6e145d83972315245233c4b1874", "score": "0.6020753", "text": "function howManyMovies(movies) {\n const dramaSpielberg = movies.filter(elm => elm.director === \"Steven Spielberg\" && elm.genre.includes(\"Drama\"))\n return dramaSpielberg.length\n}", "title": "" }, { "docid": "62584494a0415678e2637756ead72e1e", "score": "0.60105324", "text": "function dramaMoviesScore(movielist) {\n let drama = movielist.filter(function(movie){\n return (movie.genre.includes('Drama'));\n })\n\n let total = 0\n let result = drama.map(x => total += x.score);\n return total/drama.length\n}", "title": "" }, { "docid": "d34de9a0c200ba94f474acd5bf1b9186", "score": "0.5983912", "text": "function howManyMovies(movies) {\n let madeBySpielberg = movies.filter(\n element =>\n element.director === \"Steven Spielberg\" && element.genre.includes(\"Drama\")\n );\n return madeBySpielberg.length;\n}", "title": "" }, { "docid": "a238c2b128a61f68e65d9d0c49cd1699", "score": "0.5980375", "text": "function howManyMovies(moviesArray) {\n if (moviesArray == \"\") {\n return;\n }\n\n var dramaSpielberg = moviesArray.filter(function (movie) {\n return (\n movie.genre.includes(\"Drama\") && movie.director == \"Steven Spielberg\"\n );\n });\n\n if (dramaSpielberg.length == 0) {\n return \"Steven Spielberg directed 0 drama movies!\";\n }\n\n return (\n \"Steven Spielberg directed \" + dramaSpielberg.length + \" drama movies!\"\n );\n}", "title": "" }, { "docid": "355c99707da960fb5cefa0c7fcc5a696", "score": "0.59802574", "text": "function howManyMovies(arr) {\n const dramaSpielbergMovies = arr.reduce((acc, movie) => {\n if (\n movie.director === 'Steven Spielberg' &&\n movie.genre.includes('Drama')\n ) {\n return acc + 1;\n } else {\n return acc;\n }\n }, 0);\n return dramaSpielbergMovies;\n}", "title": "" }, { "docid": "4a6449fb07dbe959d543532e1ed7b26e", "score": "0.5976586", "text": "function dramaMoviesScore(movies) {\n let dramaMovies = movies.filter(movie => movie.genre.includes('Drama'))\n let scores = dramaMovies.map(movie => movie.score)\n let totalScore = scores.reduce(function (result, score){\n return result + score\n })\n return Number((totalScore / scores.length).toFixed(2))\n }", "title": "" }, { "docid": "3aff8813d5e986e2f299c8fe1b94f7d8", "score": "0.5974892", "text": "function dramaMoviesRate() {\n\n}", "title": "" }, { "docid": "d7f02578df3e17ab3e252b33b49c6ade", "score": "0.59729934", "text": "function howManyMovies (movies) {\n \n}", "title": "" }, { "docid": "adb5152831dcb353b75a93881391ec9e", "score": "0.5967451", "text": "function dramaMoviesRate(movies){\n var dramaFilms = []\nfor (var i = 0; i < movies.length; i++){\n for (var j = 0; j < movies[i].genre.length; j++){\n if (movies[i].genre[j] === 'Drama'){\n dramaFilms.push(movies[i])\n }\n }\n}\nif (dramaFilms == 0){} else {return ratesAverage(dramaFilms);}\n}", "title": "" }, { "docid": "9e92960d5b6c3506e8fc08e06ec71d37", "score": "0.59587646", "text": "function dramaMoviesRate(movies){\n var moviesDrama = movies.filter(function(a){\nif (a.genre.includes(\"Drama\"))\n{\n return true;\n}\n});\n if (!moviesDrama.length)\n {\n return 0;\n }\n\n // llamo al metodo de la iteracion 4 para no generar mas codigo pero ahora le paso el includes de la variable moviesDrama retornando true. \n var avarage = ratesAverage(moviesDrama);\n return avarage;\n}", "title": "" }, { "docid": "f3be39db811e9d50048fc5592833e352", "score": "0.5958696", "text": "function dramaMoviesRate(movies) {\n const dramaMov = movies.filter(elm => elm.genre.includes(\"Drama\"))\n if (dramaMov < 1) return 0\n let dramaRate = dramaMov.filter(elm => elm.rate).reduce((acc, elm) => acc + elm.rate, 0)\n let finalRate = dramaRate / dramaMov.length\n return +finalRate.toFixed(2)\n}", "title": "" }, { "docid": "c825c8157a54cc391c08c73582afcc1b", "score": "0.595768", "text": "function dramaMoviesRate(movies){\n var onlyDrama = movies.filter(function(movie){\n return movie.genre.includes(\"Drama\");\n });\n var totalDrama = onlyDrama.reduce(function(sum,rating){\n return sum + rating.rate;\n }, 0);\nreturn totalDrama / onlyDrama.length;\n}", "title": "" }, { "docid": "178f27cecd196a0292b9b8add1548517", "score": "0.5954122", "text": "function howManyMovies(moviesArray) {\n if (moviesArray.length === 0) {\n return undefined;\n }\n var directorSpiel = moviesArray.filter(function (elemento) {\n return elemento.director === 'Steven Spielberg' && elemento.genre.indexOf('Drama') !=-1;\n });\n return 'Steven Spielberg directed ' + directorSpiel.length + ' drama movies!';\n }", "title": "" }, { "docid": "cdca05e5546937c4524041b510980a10", "score": "0.5938694", "text": "function howManyMovies(sumMovies) {\n if (sumMovies.length == 0) {\n return undefined;\n }\n\n var onlySteven = sumMovies.filter(function (movie) {\n return movie.director.includes(\"Steven Spielberg\");\n });\n const onlyDramaSteven = onlySteven.filter(function (movie) {\n return movie.genre.includes(\"Drama\");\n });\n\n return (\n \"Steven Spielberg directed \" + onlyDramaSteven.length + \" drama movies!\"\n );\n}", "title": "" }, { "docid": "c40a0de5904c7325440fcfce625fcaa9", "score": "0.5937019", "text": "function howManyMovies(oldarr) {\r\n if (oldarr.length > 0) {\r\n let mitjaDrama = oldarr.filter((e) => {\r\n if ((e.genre.indexOf('Drama') !== -1) && (e.director.indexOf('Steven Spielberg') !== -1))\r\n return e\r\n });\r\n if (mitjaDrama.length >= 0) { return `Steven Spielberg directed ${mitjaDrama.length} drama movies!`; }\r\n } else return undefined;\r\n}", "title": "" }, { "docid": "c34b2babe7b9fb137765495cad8add07", "score": "0.59350866", "text": "function howManyMovies(arrayDramaMovies) {\nvar ssDramaMovies = arrayDramaMovies.fliter (function(directorname){\n return directorname.director.includes(\"Steven Spielberg\");\n});\n}", "title": "" }, { "docid": "a4bcf0f8b49bb1a6b31b6de86e537553", "score": "0.5927386", "text": "function howManyMovies (listMovies) {\n\n if (listMovies.length === 0){\n return undefined;\n }\n else{\n var dramaSp= \n listMovies.filter (function (array){\n return array.genre.includes('Drama') && array.director.includes ('Steven Spielberg')\n });\n\n } \n return \"Steven Spielberg directed \"+ dramaSp.length + \" drama movies!\";\n\n}", "title": "" }, { "docid": "77f4251e49f82bdb8c66b4aa97592b8f", "score": "0.5923215", "text": "function howManyMovies(movies) {\n const spielberg = movies.filter (function(movie) { \n if(movie.director === 'Steven Spielberg' && movie.genre.includes('Drama')) \n return movie\n })\n return spielberg.length\n}", "title": "" }, { "docid": "b21d671a3e8b02fe56598ada3a7f0be7", "score": "0.5914034", "text": "function howManyMovies(e){\n var arr = e.filter(e => e.director.includes('Steven')); \n arr = arr.filter(e => e.genre.includes('Drama'));\n return \"Steven Spielberg directed \" +arr.length +\" drama movies!\" \n}", "title": "" }, { "docid": "10260642f157abde86cd544b79b24398", "score": "0.58899075", "text": "function bestYearAvg(movies){\n movies.sort((a,b) => {\n if (a.year < b.year) {return -1}\n if (a.year > b.year) {return 1}\n return 0;\n });\n let bestAvg = 0;\n let year = 0, \n sum = 0,\n count = 0;\n\n for(let i =0; i.movies.length; i++) { \n if (movies[i].year = year){\n if(bestAvg < sum / count){\n bestAvg = (sum / count)\n beatYear = movies[i].year;\n }\n }\n sum +=Number(movies[i].rate)\n count += 1;\n console.log(Number)\n } \n\n return\n}", "title": "" }, { "docid": "5e4c6ff86139cfc1ed1b05e3b59e8ecf", "score": "0.58869934", "text": "function howManyMovies(arr) {\n let spielbergMovies = [...arr].filter(movie => movie.director === \"Steven Spielberg\");\n let spilbergDramaMovies = spielbergMovies.filter(movie => movie.genre.includes(\"Drama\"));\n return spilbergDramaMovies.length;\n }", "title": "" }, { "docid": "ab9025841e372fadeb7ed9770efbdeae", "score": "0.58843875", "text": "function howManyMovies(sS) {\n if (!sS) return undefined;\n\n const drama = sS.filter(function(movie) {\n if (movie.genre === \"Drama\");\n {\n return movie.genre.includes(\"Drama\");\n }\n });\n\n const filteredDrama = drama.filter(function(film) {\n if (!drama) {\n return \"Steven Spielbierg directed 0 drama movies!\";\n }\n return film.director.includes(\"Steven Spielberg\");\n });\n if (filteredDrama) {\n return `Steven Spielberg directed ${filteredDrama.length} drama movies!`;\n }\n}", "title": "" }, { "docid": "2b64c69302b2ce3d86fca15304294826", "score": "0.5879141", "text": "function howManyMovies(arr) {\n if (!arr || arr.length === 0) {\n return undefined;\n }\n var spielbergMovies = arr.filter(function(movie) {\n return (\n movie.director === \"Steven Spielberg\" &&\n movie.genre.indexOf(\"Drama\") !== -1\n );\n });\n\n return (\n \"Steven Spielberg directed \" + spielbergMovies.length + \" drama movies!\"\n );\n}", "title": "" }, { "docid": "839ab61822fd00b9c4390e5219d4b0df", "score": "0.5877804", "text": "function bonus1() { \n count = {}\n highestCounter = 0\n for(i=0; i < morseCode.length; i++){\n currentCounter = 0\n for (j=0; j < morseCode.length; j++){\n if(morseCode[i] === morseCode[j]){\n currentCounter++\n }\n }\n if(currentCounter > highestCounter){\n highestCounter = currentCounter\n console.log(highestCounter)\n }\n }\n\n highest = 0\n repeated = ''\n\n for(prop in count) {\n if(count[prop] > highest) {\n highest = count[prop];\n repeated = prop.toString()\n console.log(\"Repeated:\" + repeated + \"Highest Count: \" + highest)\n }\n }\n repeatArray = []\n\n for(i=0; i < morseCode.length; i++){\n if(repeated === morseCode[i]){\n repeatArray.push(wordList[i])\n }\n }\n console.log(repeated + ' is repeated ' + highest + ' times.')\n console.log('Words: ' + repeatArray.join(', '))\n}", "title": "" }, { "docid": "5fae873f22fcaffcd296a291cbc4eca0", "score": "0.58755815", "text": "function howManyMovies(arr) {\n const stevensDramaMovies = arr.filter(movie => {\n return (\n movie.director === \"Steven Spielberg\" && movie.genre.includes(\"Drama\")\n );\n });\n return stevensDramaMovies.length;\n }", "title": "" }, { "docid": "c7c3089770fe6a2e2935541bfd8f90b2", "score": "0.58724093", "text": "function howManyMovies(arr){\n var dramaSteveFilms = arr.filter(function(obj){\n return (obj.genre.includes('Drama') && obj.director==='Steven Spielberg');\n })\n//'Steven Spielberg directed 0 drama movies!'\n if(dramaSteveFilms.length === 0) {\n return undefined;\n }\n\n return 'Steven Spielberg directed ' + dramaSteveFilms.length + ' drama movies!';\n}", "title": "" }, { "docid": "2776f23ccbc46d72d4cb94293c99b1d9", "score": "0.5856251", "text": "function howManyMovies(movies){\n if (movies.length==0) return undefined;\n var moviesCount=movies.filter(function(movie){\n return movie.genre.indexOf(\"Drama\")!=-1 && movie.director==\"Steven Spielberg\";\n }).length;\n return `Steven Spielberg directed ${moviesCount} drama movies!`;\n}", "title": "" }, { "docid": "41ce2a3d37045b39a7a66fc42d8bb275", "score": "0.5838248", "text": "function findBestMatch() {\n bestMatch = songMatches[0];\n for (let i = 1; i < songMatches.length; ++i) {\n if ( songMatches[i].popularity > bestMatch.popularity ) {\n bestMatch = songMatches[i];\n }\n }\n}", "title": "" }, { "docid": "a6abab3cff784de2e6fd056f5ce6e17c", "score": "0.5832105", "text": "function howManyMovies(movies) {\n return movies.reduce(function(acc, val) {\n if (val.director === \"Steven Spielberg\" && val.genre.includes(\"Drama\")) {\n acc += 1;\n }\n return acc;\n }, 0);\n}", "title": "" }, { "docid": "b14f0b69a1b7c71d2e1f6e28eb84c549", "score": "0.5831957", "text": "function bestYearAvg(arrayOfMovies){\n if(arrayOfMovies.length ===0){return}\n let trackerThing = {};\n arrayOfMovies.forEach((eachMovie)=>{\n if(trackerThing[eachMovie.year]){\n trackerThing[eachMovie.year].number +=1;\n trackerThing[eachMovie.year].totalRate += Number(eachMovie.rate);\n } else{\n trackerThing[eachMovie.year] = {number: 1, totalRate: Number(eachMovie.rate)};\n }\n\n })\n\n let biggest = 0;\n let year = \"\";\n\n for(let yearKey in trackerThing){\n if(trackerThing[yearKey].totalRate / trackerThing[yearKey].number > biggest){\n biggest = trackerThing[yearKey].totalRate / trackerThing[yearKey].number\n year = yearKey;\n }\n }\n console.log(trackerThing);\n return `The best year was ${year} with an average rate of ${biggest}`\n}", "title": "" }, { "docid": "dc9976f5164ecb1e9f0db8460e5f53f4", "score": "0.5825589", "text": "function dramaMoviesRate(movies) {\n const dramaMovies = movies.filter(function(item){\n const isDrama = item.genre.indexOf('Drama') >= 0;\n return isDrama;\n })\n return ratesAverage (dramaMovies);\n \n}", "title": "" }, { "docid": "776fd376aadde644eb62668a21b4e139", "score": "0.5823603", "text": "function highestRating(movieList){\r\n //first find out which video has the higest rating, then check to see if there are any other videos with that rating.\r\n //push all videos with highest rating into var topVideos array.\r\n //access movieLists[0].videos[0].rating\r\n //access movieLists[0].videos[0].title\r\n //use a forEach loop to check every rating.\r\n var highestRating = 0;\r\n var topMovies = [];\r\n movieList.forEach(genre => {\r\n genre.videos.forEach(video => {\r\n if(video.rating > highestRating){\r\n highestRating = video.rating;\r\n }\r\n });\r\n });\r\n \r\n movieList.forEach(genre => {\r\n genre.videos.forEach(video => {\r\n if(video.rating === highestRating){\r\n topMovies.push(video.title);\r\n }\r\n });\r\n });\r\n return topMovies;\r\n}", "title": "" }, { "docid": "495adcf287a6d66d2dab99cfbcb61e63", "score": "0.58172613", "text": "function dramaMoviesRate(movies) {\n let drama = movies.filter(function(elem){\n return elem.genre.includes('drama')\n })\n\n let avg = drama.reduce(function(sum, elem){\n return sum + elem.rate;\n }, 0) \n \n / drama.length;\n}", "title": "" }, { "docid": "2c6012293524097a8f54e2afe95c037c", "score": "0.58077496", "text": "function howManyMovies (movieArray) {\n if (movieArray.length===0) return undefined;\n var dramaMovies=movieArray.filter(function(elem){\n //if (elem.genre.indexOf(\"Drama\")>=0) console.log(elem.genre);\n return elem.genre.includes(\"Drama\") && elem.director.includes(\"Steven Spielberg\") ;\n });\n //console.log(dramaMovies.length);\n return \"Steven Spielberg directed \"+ dramaMovies.length+\" drama movies!\";\n}", "title": "" }, { "docid": "cc7309d9e9c5c46dbaed360665eafaa5", "score": "0.5806965", "text": "function dramaMoviesRate(array) {\n\n}", "title": "" }, { "docid": "342ba596b30a7fecdb3a040d5b82a984", "score": "0.5803869", "text": "function howManyMovies(movies) {\n let dramaMoviesSteven = movies.filter(function(movie) {\n return (\n movie.director === \"Steven Spielberg\" && movie.genre.includes(\"Drama\")\n );\n });\n return dramaMoviesSteven.length;\n}", "title": "" }, { "docid": "7336c0f121d07a541a0f21f4bb82784d", "score": "0.579687", "text": "function howManyMovies(arr){\n let filter = arr.filter(function(value){\n return value.director === 'Steven Spielberg';\n });\n return `Steven Spielberg directed ${filter.length} drama movies!`\n }", "title": "" }, { "docid": "e30218bf5e73c321955540e274571154", "score": "0.57943857", "text": "function dramaMoviesRate(array) {\n const drama = array.filter(elm => elm.genre.includes(\"Drama\"))\n sumRating = drama.reduce((acc, elm) => {\n return acc + elm.rate\n }, 0)\n\n div = 0\n drama.forEach((elm, index) => {\n div++\n if (elm.rate == undefined) div--\n })\n let result = sumRating / div\n if (drama.length == 0) return 0\n return +result.toFixed(2)\n\n}", "title": "" }, { "docid": "396580416b10b64f43ed0f3deeb30dff", "score": "0.5783498", "text": "function getDramas(){\n const dramaMovies = movies.filter(function(movies){\n return movies.genre == \"Drama\"\n })\n dramaRatings = []\n\n for (let i = 0; i<dramaMovies.length; i+=1){\n dramaRatings.push(dramaMovies[i].rate)\n }\n avgDramaRating(dramaRatings)\n }", "title": "" }, { "docid": "8cd961801b44f0303c10262931ca9edc", "score": "0.5778593", "text": "function howManyMovies(arr) {\n if (arr.length === 0){\n return undefined;\n }\n let filteredArray = arr.filter(movie => {\n return movie.genre.indexOf(\"Drama\") !== -1;\n });\n let spielbergMovies = filteredArray.filter(movie => {\n return movie.director.indexOf(\"Steven Spielberg\") !== -1;\n }).length;\n return `Steven Spielberg directed ${spielbergMovies} drama movies!`\n}", "title": "" }, { "docid": "ecee9529bc5343832ff630449f588ca6", "score": "0.5774534", "text": "evaluate() {\n let highest = 0.0;\n let index = 0;\n for (let i = 0; i < this.population.length; i++) {\n if (this.population[i].fitness > highest) {\n index = i;\n highest = this.population[i].fitness;\n }\n }\n\n this.best = this.population[index].getPhrase();\n if (highest === this.perfectScore) {\n this.finished = true;\n }\n }", "title": "" }, { "docid": "38323f90530a5b049aae0f78a8fb6302", "score": "0.57722324", "text": "function dramaMoviesRate(arr){\n\nlet dramaMovie = 0;\nlet dramaRate = 0;\n\narr.forEach(function(a){\nif(a.genre.includes('Drama')){\n dramaMovie++;\n dramaRate += a.rate\n};\n}); if (dramaMovie === 0){\n return undefined;\n} \n return parseFloat((dramaRate / dramaMovie).toFixed(2));\n}", "title": "" }, { "docid": "98be5d7043ba6d4dc932261dfbd52b96", "score": "0.57709396", "text": "function howManyMovies(arrayMovies) {\n var movies = [];\n if (arrayMovies.length > 0) {\n movies = arrayMovies.filter(function (element) {\n return element.genre.indexOf('Drama') > -1 && element.director === 'Steven Spielberg';\n });\n return ('Steven Spielberg directed ' + movies.length + ' drama movies!');\n } else return undefined;\n}", "title": "" }, { "docid": "d66a7090b89af0f44b75b54dcce0570f", "score": "0.57694364", "text": "function directorMovies(){\nconst director = movies.filter(function(movies){\n return movies.director == \"Steven Spielberg\"\n})\n\nspielBergMovies = []\n\nfor (let i = 0; i<director.length; i+=1){\n spielBergMovies.push(director[i].title)\n}\nconsole.log(\"Steven Spielberg movies has \"+ spielBergMovies.length+ \" movies: \"+ spielBergMovies )\n}", "title": "" }, { "docid": "c57a47e9014f1a43f69c75091188b638", "score": "0.5767639", "text": "function dramaMoviesRate(movies) {\n var drama = movies.filter((movie) => movie.genre.includes(\"Drama\"));\n return ratesAverage(drama)\n\n}", "title": "" }, { "docid": "2a315870cac7bb790e1ff274d53f9669", "score": "0.5766329", "text": "function howManyMovies(array){\n \n const stevenDrama = array.filter(function(movie){\n return movie.director === \"Steven Spielberg\" && movie.genre.includes(\"Drama\")\n \n })\n return stevenDrama.length\n }", "title": "" }, { "docid": "bfb24b9fd206f84a1ac8a9c35033bfa0", "score": "0.5765183", "text": "function howManyMovies (array) {\n\treturn array.filter (dramaMovies => dramaMovies.director === \"Steven Spielberg\" && dramaMovies.genre.includes (\"Drama\")).length\n}", "title": "" }, { "docid": "289430e43586dc3077770e0a1ca7e858", "score": "0.57645684", "text": "function dramaMoviesScore(movies) {\n const dramaMovies = movies.filter(function(movie){\n if (movie.genre.includes('Drama')) return movie\n })\n\n if (movies.length >= 1) {\n return scoresAverage(dramaMovies)\n }\n}", "title": "" }, { "docid": "da6f6ca59dbe2d24950cdf465e3909f7", "score": "0.57622385", "text": "function howManyMovies(movies) {\n let drama = movies.filter(function(movie) {\n return movie.genre.includes(\"Drama\") && movie.director === \"Steven Spielberg\"\n })\n return drama.length\n}", "title": "" }, { "docid": "9b864022b5e55d37cb58617f2c6b5bbf", "score": "0.57568264", "text": "function howManyMovies (movies) {\n let stevenMovies = movies.filter (function (movie) {\n return movie.director === 'Steven Spielberg' && movie.genre.includes('Drama') \n\n });\n\n return stevenMovies.length\n}", "title": "" }, { "docid": "d60ebd4c12bc0a1bdacd2d2b73d46f47", "score": "0.5754559", "text": "function howManyMovies(moviesArray, SearchDirector) {\n if (moviesArray != \"undefined\") {\n var dramaMovies = moviesArray.filter(function (movie) {\n return movie.genre.indexOf(\"Drama\") != -1\n });\n var directorMoviesArray = dramaMovies.filter(function (movie) {\n return movie.director == \"Steven Spielberg\";\n })\n console.log(directorMoviesArray);\n if (directorMoviesArray.length >= 0) {\n return \"Steven Spielberg directed \" + directorMoviesArray.length + \" drama movies!\";\n }\n }\n}", "title": "" }, { "docid": "562347827643cbad222c43046b577812", "score": "0.57538956", "text": "function howManyMovies (movies){\n var drama = movies.filter(function(movie){\n return movie.genre.includes(\"Drama\") && (movie.director === \"Steven Spielberg\")\n });\n \n return drama.length\n }", "title": "" }, { "docid": "ab3f2e2514f2e977b12ee7624fc78703", "score": "0.5741543", "text": "function dramaMoviesRate(movies){\n let titles = movies.filter((movie) => movie.genre.includes(\"Drama\"));\n titles = titles.map(movie => movie.rate);\n return titles.reduce((ac, cu) => {\n return ac + cu\n });\n console.log(titles);\n}", "title": "" }, { "docid": "2442c9bca6d053af6256b536546b079d", "score": "0.57370687", "text": "function howManyMovies(arr){\n // directedMovies = 0;\n // for(i = 0; i < arr.directed){\n // if(directedMovies = direct )\n // }\n\n let newArray = arr.filter(function(d){\n \n if(d.director === 'Steven Spielberg' && d.genre.includes('Drama')){\n return d\n } \n });\n\n // newArray.forEach(oneMovie => {\n // if(oneMovie.genre.includes('Drama')){\n // directedMovies += 1;\n // }\n // })\n if(arr.length === 0) {\n return undefined;\n }\n\n return `Steven Spielberg directed ${newArray.length} drama movies!`\n}", "title": "" }, { "docid": "5a2d97b33b50516d7c472ae9356973a7", "score": "0.57341087", "text": "function howManyMovies(movies) {\n const dramaMovies = []\n movies.map(function(movie){\n if (movie.director === 'Steven Spielberg') {\n movie.genre.filter(function(genre){\n if (genre === 'Drama') {\n dramaMovies.push(movie)\n }\n })\n }\n })\n \n return dramaMovies.length\n}", "title": "" }, { "docid": "12952c17245791ff3b59e5293f5f1acf", "score": "0.57304823", "text": "function dramaMoviesRate (movies) {\n var dramaMovie = movies.filter(function(film){\n return film.genre.indexOf('Drama') !== -1;\n });\n if (dramaMovie .length<1){\n return undefined;\n }\n return ratesAverage(dramaMovie);\n}", "title": "" }, { "docid": "a11bacfbb988c36da6053a45d279a59a", "score": "0.572409", "text": "function dramaMoviesRate(movies) {\n\n var arrayDramaMovies = movies.filter (function(genredrama){\n return genredrama.genre.includes(\"drama\")\n }); \n\n var totalDramaRates = arrayDramaMovies.reduce (function(accumulator,dramaMovies) {\n return accumulator + Number(dramaMovies.rate);\n },0);\n console.log (\"The average of dramam movies is \" + dramaMoviesRate(movies));\n return (totalDramaRates/arrayDraMaMovies.length)\n}", "title": "" }, { "docid": "d852fca13b24c8cfef1c935d8f7b2c9c", "score": "0.57201654", "text": "function howManyMovies(array) {\n const splilbergDrama = array.filter(elm => elm.director == \"Steven Spielberg\" && elm.genre.includes(\"Drama\"))\n return splilbergDrama.length\n\n}", "title": "" }, { "docid": "2517fb8dcb2113410bf3a4b0dcc14889", "score": "0.57172203", "text": "function howManyMovies (array) {\n let stevenSpiel = array.filter(movie => movie.genre.includes('Drama') && movie.director === 'Steven Spielberg')\n return stevenSpiel.length\n}", "title": "" }, { "docid": "e4c67ce5e3d450fbc631dc30d05f12c4", "score": "0.5704731", "text": "function howManyMovies(movies){\n\n}", "title": "" }, { "docid": "8713908aab4ba3680406ebb436e393d9", "score": "0.5693526", "text": "function dramaMoviesScore(moviesArray) {\n const dramaMovies = moviesArray.filter(function(movie){\n if (movie.genre.indexOf('Drama') !== -1) {\n return movie;\n } \n }); \n if (dramaMovies.length === 0) {\n return 0;\n };\n const averageDramaMovies = dramaMovies.reduce(function (sum, movie){\n return sum + movie.score; \n }, 0); return Math.round((averageDramaMovies / dramaMovies.length) * 100) /100\n}", "title": "" }, { "docid": "e42d6d611a6bd94eea8a23af176bc3cb", "score": "0.5687629", "text": "function howManyMovies(movieList) {\n let howMany = 0;\n movieList.filter(function(drama) {\n if (\n drama.director === \"Steven Spielberg\" &&\n drama.genre.includes(\"Drama\")\n ) {\n return howMany++;\n } else if (drama.director !== \"Steven Spielberg\") {\n return 0;\n } else {\n return 0;\n }\n });\n return howMany;\n}", "title": "" }, { "docid": "dceb5c8bc03a3179d01a6aa9caee46e6", "score": "0.56848156", "text": "function dramaMoviesRate (movies) {\n if (movies.length === 0) return 0 \n const result = movies.filter (movie => movie.genre.includes('Drama'))\n return ratesAverage(result)\n}", "title": "" }, { "docid": "24b4f157025a8889d46b76b29af90803", "score": "0.5682384", "text": "function howManyMovies(movies) {\n if (movies.length === 0) {\n return 0\n } \n let moviesStevenDra = movies.filter(function(item, index) {\n if (item.genre.includes(\"Drama\") && item.director === \"Steven Spielberg\") {\n return true\n } else {\n return false\n }\n }) \n return moviesStevenDra.length\n}", "title": "" }, { "docid": "c0525156e936a2856e9b22be87f241d5", "score": "0.5680532", "text": "function howManyMovies(array) {\n return array.reduce(function(prevVal, elem) {\n if (elem.director === \"Steven Spielberg\" && elem.genre.indexOf(\"Drama\") >= 0) return prevVal + 1;\n return prevVal;\n }, 0);\n}", "title": "" }, { "docid": "ccfb2d9772375f8df5706ed462a47268", "score": "0.56802225", "text": "recursiveGetMovie(movies, i, numVotes, SciFiInstance, web3) {\n return SciFiInstance.votes(i).then((result)=>{\n\n const amount = result[1].c[0],\n hexname = result[2],\n retracted = result[3];\n\n if(!retracted) {\n // check if movie exists\n if(movies.find((movie)=>{ return movie.name === web3.toAscii(hexname) })){\n // adjust movie\n const objIndex = movies.findIndex((movie)=>{ return movie.name === web3.toAscii(hexname)})\n movies[objIndex].amount += amount/10000\n\n } else {\n // new movie\n movies = [...movies, {\n name : web3.toAscii(hexname),\n amount : parseFloat(amount/10000)}\n ]\n }\n }\n\n // get the next movie if we're not finished, otherwise: return the movies\n if (i === numVotes) {\n return movies;\n } else {\n return this.recursiveGetMovie(movies, i+1, numVotes, SciFiInstance, web3);\n }\n })\n }", "title": "" }, { "docid": "86a4913041592ec69ffd3acbabab7a5c", "score": "0.56753266", "text": "function dramaMoviesRate(movies) {\n var drama = movies.filter(movie => movie.genre.includes(\"Drama\"));\n if (drama.length === 0) {\n return 0;\n }\n return ratesAverage(drama);\n }", "title": "" }, { "docid": "782b3f792fd819a62a8d0ebf707cbcc6", "score": "0.56717193", "text": "function howManyMovies(moviesArray) {\n let spielbergArray = moviesArray.filter(\n (movie) =>\n movie.director === \"Steven Spielberg\" && movie.genre.includes(\"Drama\")\n );\n return spielbergArray.length;\n}", "title": "" }, { "docid": "6ac7e625ba2173883acfe43a18378c2a", "score": "0.56670386", "text": "function dramaMoviesRate(movies) {\n const drama = movies.filter(elm => elm.genre.includes(\"Drama\"))\n if(drama.length === 0) {\n return 0\n } else {\n const avgDramaRates = drama.reduce((acc, elm) => {\n if(elm.rate) {\n return acc + elm.rate\n } else {\n return acc\n }\n }, 0) / drama.length\n let avgDramaFixed = Math.round(avgDramaRates * 100) / 100\n return avgDramaFixed\n }\n}", "title": "" }, { "docid": "4cae6fca986fe4c05bc69695a7ff90ec", "score": "0.56636953", "text": "function howManyMovies(collection){\n var filterMovies;\n if(collection === undefined || collection.length === 0){\n return undefined;\n }\n else{\n filterMovies = collection.filter(function(movie){\n return (movie.genre.includes(\"Drama\") && movie.director.includes(\"Steven Spielberg\"));\n });\n var numberOfMovies;\n if (filterMovies.length === 0){\n numberOfMovies = 0;\n }\n else{\n numberOfMovies = filterMovies.length;\n }\n var msg = \"Steven Spielberg directed \"+ numberOfMovies +\" drama movies!\"\n return msg;\n }\n}", "title": "" }, { "docid": "088f6cda045c15f8e14e48cdd8220225", "score": "0.5661521", "text": "function howManyMovies(movies) {\n\n const dramaGenre = movies.map(\n movie => { if(movie.genre.includes('Drama')) return movie })\n .filter(movie => movie !== undefined)\n .filter(movie => movie.director === 'Steven Spielberg');\n \n return dramaGenre.length;\n}", "title": "" }, { "docid": "11f797e5b3a87cdb068fbefdc7dfcc79", "score": "0.5654863", "text": "function dramaMoviesScore(movies) {\n let dramaMoviesArr = movies.filter(function(eachMovie){\n return eachMovie.genre.includes('Drama')\n })\n return scoresAverage(dramaMoviesArr)\n}", "title": "" } ]
ae691c20a3f2f56bc0fa3d137c25d9d8
Check for duplicate in database
[ { "docid": "ca068a7bf92dd195c7e0ec08a77ea188", "score": "0.58561295", "text": "function Check_Duplicates(usern, req, res)\n{\n\tUser.findOne({username:usern}, function(error, result){\n\t\tif (error)\n\t\t{\n\t\t\treturn res.status(500).send();\n\t\t}\n\n\t\tif (result)\n\t\t{\n\t\t\treturn res.status(300).send(\"This nickname is already taken, try another\");\n\t\t}\n\t})\n}", "title": "" } ]
[ { "docid": "929c32d18460e4642fcbe45abed8bcf2", "score": "0.6851694", "text": "async function hasDuplicates(data) {\r\n\t\tconst result = await Quote.findOne({\r\n\t\t\tQuote: data.quote,\r\n\t\t\tText_source: data.source,\r\n\t\t\tAuthor: data.author,\r\n\t\t\tUser: data.user,\r\n\t\t\tDate: data.date,\r\n\t\t\tKeywords: data.keywords\r\n\t\t})\r\n\t\tif (result == null) {\r\n\t\t\treturn false\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn true\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "d2d1f18e2f32b1ebd9a871a08f1959b4", "score": "0.6640113", "text": "async function getDuplicateAsync(value) {\n const sql = `select * from users where id = '${value}' or username = '${value}'`\n const result = await dal.executeAsync(sql)\n if(result.length === 0){\n return false\n }\n else return true\n \n}", "title": "" }, { "docid": "9af07886a3554c7f6facb381ecc3e98c", "score": "0.6543333", "text": "checkDuplicates(email) {\n this.props.firebase.emailList(encode(email)).once(\"value\", object => {\n if (object.val() !== null) {\n return true;\n }\n return false;\n })\n }", "title": "" }, { "docid": "9c5cadda222231b81b88d393f6426589", "score": "0.65374863", "text": "async function checkDuplicates(funcParams) {\n try {\n //check if the hash already in db\n let document = await getDocumentById(\n `proccessedfile::${funcParams.dataSource}::${funcParams.hashKey}`\n );\n\n if (document !== null) {\n Logger.info(\n STEP,\n `Duplicated Detected at job id : ${funcParams.jobId} for file : ${funcParams.dataSource}::${funcParams.nodeId}::${funcParams.fileId}.`,\n funcParams\n );\n\n return true;\n }\n\n await executeQueryWithRetry({\n queryType: queryTypes.Upsert,\n key: `proccessedfile::${funcParams.dataSource}::${funcParams.hashKey}`,\n value: {}\n });\n\n return false;\n } catch (error) {\n Logger.error(\n STEP,\n JSON.stringify({ error: error.message, stack: error.stack }),\n funcParams\n );\n throw error;\n }\n}", "title": "" }, { "docid": "ca677157ca41089504a9b2c2389c67ed", "score": "0.6511272", "text": "function check_duplicate(researchs, research) {\r\n\r\n for (let i = 0; i < researchs.length; i++) {\r\n if (Store.check_equal(research, researchs[i])) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n\r\n}", "title": "" }, { "docid": "a335843668a16a0e0588f5b661232089", "score": "0.6398432", "text": "function checkForDups_(values, taleoId) {\n Logger.log('Checking for previous submissions.');\n var numOfRows = values.getNumRows();\n var response = values.getValues();\n var count = 0;\n //Loop through Taleo IDs to check for a match\n for(var i = 0; i < numOfRows; i++) {\n var existingTaleoId = response[i][1];\n if(taleoId == existingTaleoId) {\n count++;\n if(count > 1) {\n Logger.log('Previous submission FOUND.');\n return true;\n }\n }\n }\n Logger.log('Previous submission NOT FOUND.');\n return false;\n}", "title": "" }, { "docid": "e35259574d6dd9041d978d17290f9d2f", "score": "0.63266206", "text": "function _check_if_exist_change(){\n try{\n var is_make_changed = false;\n var db = Titanium.Database.open(self.get_db_name());\n var rows = db.execute('SELECT * FROM my_'+_type+' WHERE id=?',_selected_job_id);\n if((rows.getRowCount() > 0) && (rows.isValidRow())){\n if(_order_reference_number != rows.fieldByName('order_reference')){\n is_make_changed = true;\n }\n }\n rows.close();\n db.close(); \n return is_make_changed;\n }catch(err){\n self.process_simple_error_message(err,window_source+' - _check_if_exist_change');\n return false; \n } \n }", "title": "" }, { "docid": "eed8c35628f102f901aecaacce4b12ea", "score": "0.6308724", "text": "function IsDuplicateEntry(bpgId,bpInfo)\n{\n for(i=0;i<localStorage.length;i++) {\n var key=localStorage.key(i);\n if(key.startsWith('BPINFO')) {\n var val=localStorage.getItem(key);\n var trueKey=key.replace('BPINFO','');\n var BPGID=localStorage.getItem('BPGID'+trueKey);\n if(val===bpInfo && BPGID===bpgId){\n return trueKey;\n }\n }\n }\n return false;\n}", "title": "" }, { "docid": "c38c5e7347cda4ac377ced8a3147961e", "score": "0.6274764", "text": "function checkdup() {\r\n\t\tvar dupResult = false;\r\n\r\n\t\t$.ajax({\r\n\t\t\ttype: 'POST',\r\n\t\t\turl: 'checkDup',\r\n\t\t\tasync : false,\r\n\t\t\tdata: JSON.stringify({\r\n\t\t\t\"member_id\":id.value\r\n\t\t}),\r\n\t\t\tdateType: 'json',\r\n\t\t\tcontentType: 'application/json; charset=UTF-8',\r\n\t\t\tsuccess: function(data) {\r\n\t\t\t\tif (data > 0) {\r\n\t\t\t\t\terror[0].innerHTML = \"아이디 중복입니다.\";\r\n\t\t\t\t\terror[0].style.color = \"#ff0000\";\r\n\t\t\t\t\terror[0].style.display = \"block\";\r\n\t\t\t\t\tdupResult = false;\r\n\t\t\t\t} else {\r\n\t\t\t\t\terror[0].innerHTML = \"사용 가능한 아이디입니다.\";\r\n\t\t\t\t\terror[0].style.color = \"#08A600\";\r\n\t\t\t\t\terror[0].style.display = \"block\";\r\n\t\t\t\t\tdupResult = true;\r\n\t\t\t\t\t}\r\n\t\t\t},error:function(){\r\n\t\t\t\tdupResult = false;\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t});\r\n\t\treturn dupResult;\r\n\t}", "title": "" }, { "docid": "92e8d3cb72e5b69d3dd620e86a7880a6", "score": "0.6264455", "text": "function isDuplicateDrop() {\n // alert(\"trying to find dupe key \" + key);\n\n if (!myDiagramPallete) return false;\n if (!myDiagramPallete.selection) return false;\n\n var newnode = myDiagramPallete.selection.first();\n if (!newnode) return false;\n\n var key = newnode.data.key;\n var nodes = myDiagramPallete.nodes;\n while (nodes.next()) {\n var n = nodes.value;\n var nd = n.data;\n var id = nd.key;\n if (id === key)\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "305673f1a6eaec265a0fa9fc59e467cc", "score": "0.6248423", "text": "function isUnique(gen_id){\n conn.query(\"SELECT * FROM chatrooms WHERE room_id=$1\", [gen_id], function (err, row) {\n if (err) console.log(err);\n else {\n if (row.rowCount > 0) {\n console.log('Not Unique - generating new Chatroom ID');\n isUnique(generateRoomIdentifier());\n } else {\n conn.query('INSERT INTO chatrooms VALUES($1);', [gen_id], function (err, row) {\n if (err) console.error(err);\n });\n return true;\n }\n }\n });\n }", "title": "" }, { "docid": "415de2294285ad7fceaffb682344ebca", "score": "0.6231595", "text": "function testUniques(db)\r\n{\r\n db.exec(\"INSERT INTO test VALUES (1001,'test1','test','test')\");\r\n db.exec(\"INSERT INTO test VALUES (1002,'test1','test','test')\");\r\n var results = db.exec(\"SELECT DISTINCT category FROM test\");\r\n\r\n for(var i = 0;i < results[0][\"values\"][0].length;i++)\r\n {\r\n for(var j = 0;j < results[0][\"values\"][0].length;j++)\r\n {\r\n if((results[0][\"values\"][0][i] == results[0][\"values\"][0][j]) && (i != j))\r\n {\r\n alert(\"WARNING: Uniqueness test for in game database failed. Attempt to retrieve only unique data failed.\");\r\n }\r\n }\r\n }\r\n}", "title": "" }, { "docid": "f9d640e46f72a004715f13776cfb12f9", "score": "0.6224804", "text": "function check_savegame_duplicate(new_savename)\n{\n var savegames = simpleStorage.get(\"savegames\");\n if (savegames == null) return false;\n for (var i = 0; i < savegames.length; i++) {\n var savename = savegames[i]['title'];\n if (savename == new_savename) return true;\n }\n return false;\n}", "title": "" }, { "docid": "2296567a8f8d0ba12abc86aad4086833", "score": "0.6135", "text": "checkExisting(obj) {\n let bool = true;\n this.state.tableData.forEach(dataObj => {\n if (dataObj.item_id === obj.item_id) {\n bool = false;\n this.removeNew(obj.id);\n this.props.alert.error(\"Item exists. Change the quantity\");\n }\n });\n return bool;\n }", "title": "" }, { "docid": "f443f97fcb87b562b7f847754ef0242e", "score": "0.61315167", "text": "function checkDuplicateUser(username, email) {\n let isUsername = database.find((element) => element.userName == username);\n let isEmail = database.find((element) => element.email == email);\n\n if (isUsername) {\n document.getElementById(\"error\").innerHTML = \"Username has been taken!\";\n } else if (isEmail) {\n document.getElementById(\"error\").innerHTML = \"Email has been taken!\";\n } else {\n database.push(newUser);\n currentUser.push(newUser);\n\n // updating local storage\n localStorage.setItem(\"database\", JSON.stringify(database));\n localStorage.setItem(\"currentUser\", JSON.stringify(currentUser));\n // redirect user to dashboard\n location.assign(\"../dashboard.html\");\n }\n}", "title": "" }, { "docid": "30035e942479b90be4196a48ea859008", "score": "0.6125239", "text": "_checkDuplicate(directory, card, lcEmailAddress, currentResults) {\n let existingResult = currentResults._collectedValues.get(lcEmailAddress);\n if (!existingResult) {\n return false;\n }\n\n let popIndex = this._getPopularityIndex(directory, card);\n // It's a duplicate, is the new one more popular?\n if (popIndex > existingResult.popularity) {\n // Yes it is, so delete this element, return false and allow\n // _addToResult to sort the new element into the correct place.\n currentResults._collectedValues.delete(lcEmailAddress);\n return false;\n }\n // Not more popular, but still a duplicate. Return true and _addToResult\n // will just forget about it.\n return true;\n }", "title": "" }, { "docid": "83d49481c6ddcb521fea1af4a7b6f226", "score": "0.61144584", "text": "function dup(id, callback) {\n db.findOne({id: id}, {}, function(err, post) {\n if (err) {\n console.log(err);\n } else {\n if (!post) callback();\n }\n });\n}", "title": "" }, { "docid": "66285f7128390e112f7f983207eda1ac", "score": "0.60970956", "text": "function isDupUrl(url) {\n return UrlEntry    \n .findOne({\n original: url\n })    \n .then(doc => { \n return doc ? doc.shortCode : 0;    \n });\n}", "title": "" }, { "docid": "86cb24f1d3679936aaeb02187431489b", "score": "0.6084877", "text": "function checkDuplicate() {\n\t$.ajax({\n\t type: \"POST\",\n\t async: false,\n\t dataType: 'JSON',\n\t data :{\n\t \t'vo.comID' : $(\"#comid\").val(),\n\t \t'vo.poiID' : $.trim($(\"#poiid\").val()),\n\t \t'vo.caption' : $.trim($(\"#caption\").val())\n\t },\n\t url : basePath + \"system/poi-conf!checkDuplicate\",\n\t success : function(d) {\n\t\t\tif(\"pass\" != d.result){\n\t\t\t\talert(\"The POI name already exists!\");\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\tdocument.poiForm.submit();\n\t\t\t}\n\t },\n\t error : function(d) {\n\t\t\talert(\"ERROR!\");\n\t\t\twindow.history.back();\n\t }\n\t});\n}", "title": "" }, { "docid": "379e99bd80ada925052d796e89520d85", "score": "0.6059997", "text": "is_err_duplicate_key(err) {\n return err && err.code === '23505';\n }", "title": "" }, { "docid": "ed3fa3bf1b5ae5c76fc7519436bcba69", "score": "0.6023586", "text": "function isExisted(url) {\r\n var flag;\r\n mydb.transaction(function (tx) {\r\n var flag = tx.executeSql('SELECT * FROM tracks1 WHERE url = ?', [url], function (tx, results) {\r\n if (results.rows.length == 0) {\r\n console.log(\"I know there is no such url\");\r\n return false;\r\n }\r\n else {\r\n console.log(\"Yeah the url exists!\");\r\n return true;\r\n }\r\n }, null);\r\n });\r\n return flag;\r\n}", "title": "" }, { "docid": "9dee42e9c03d08cc60f08c096b4f121e", "score": "0.60129803", "text": "function isDuplicateKeyInTable() {\n try {\n \tvar duplicateKey = {\n \t\tflag\t: \tfalse,\n \t\tindex\t: \tnull,\n \t\tval\t\t: \tnull,\n \t};\n\n \tvar arrSuppliersCd = [];\n \t$('#table-purchase-price tbody tr').each(function (index, element) {\n \t\tvar obj = {\n \t\t\t'index'\t: \tindex + 1,\n \t\t\t'val' \t: \t$(element).find('.TXT_purchaser_order_cd').val()\n \t\t};\n \t\tarrSuppliersCd.push(obj);\n \t});\n\n \tvar sorted_arr = arrSuppliersCd.sort(function (a, b) {\n \t\treturn (a.val > b.val) ? 1 : ((b.val > a.val) ? -1 : 0);\n \t});\n\n \tfor (var i = 0; i < sorted_arr.length - 1; i++) {\n\t\t if (sorted_arr[i + 1].val == sorted_arr[i].val) {\n\t\t\t\tduplicateKey.flag = true;\n\t\t\t\tduplicateKey.index = sorted_arr[i + 1].index;\n\t\t\t\tduplicateKey.val = sorted_arr[i + 1].val;\n\t\t return duplicateKey;\n\t\t }\n\t\t}\n\n \treturn duplicateKey;\n } catch (e) {\n alert('isDuplicateKeyInTable: ' + e.message);\n }\n}", "title": "" }, { "docid": "b789ab2edb4eca72e0ec654390a6a037", "score": "0.597814", "text": "function checkDuplicate(search){\n\t\tvar sNum = JSON.parse(localStorage.getItem('searchNum'));\n\t\tif(sNum == null){\n\t\t\treturn false;\n\t\t}\n\t\telse{\n\t\t\t//loop for number of searches (1 behind current number of searches)\n\t\t\tfor(var i=1; i<=sNum.num; i++){\n\t\t\t\tvar kvName = String('historyObject'+i);\n\t\t\t\tvar historyObject = JSON.parse(localStorage.getItem(kvName));\n\t\t\t\tconsole.log(historyObject)\n\t\t\t\t//check if the current search is the same as any previous, return true\n\t\t\t\tif(historyObject.firstName == search.firstName && historyObject.lastName == search.lastName){\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t//console.log(historyString);\n\t\t\t}\n\t\t}\n\t\t//no matching previous searches\n\t\treturn false;\n\t}", "title": "" }, { "docid": "1ded38ba965878452e2345c44b45a35c", "score": "0.5958108", "text": "function checkDuplicateID(id) {\n\tfor (var i = 0; i < players.length; i++) {\n\t\tif (players[i].id == id) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}", "title": "" }, { "docid": "967258810e4635eef6a36fb4ed2f4cfa", "score": "0.59503305", "text": "checkForDuplicateEntity(entityId) {\n var shortEntityId = entityId.substring(0, 15);\n var duplicate = false;\n\n this.caseEntities.data.forEach(function(entity) {\n if (entity.sId.substring(0, 15) === shortEntityId) {\n duplicate = true;\n }\n });\n \n return duplicate;\n }", "title": "" }, { "docid": "d7e3820eabe7f11051fff56a059981b7", "score": "0.5946047", "text": "checkDuplicateRecord(email, mobile, accountType) {\n return new Promise(function (resolve, reject) {\n myPool.query(`SELECT c.contact_id, c.email, c.mobile FROM applicant a,contact c WHERE a.account_type='${accountType}'\n AND c.applicant_id = a.applicant_id AND (c.email='${email}'\n OR c.mobile =${mobile})`).then(res => {\n resolve(res);\n }).catch(err => {\n console.log(err);\n reject(`${err}`);\n })\n })\n }", "title": "" }, { "docid": "8689938788d07629e072fe3450aba1b5", "score": "0.5942403", "text": "function validateDuplicates($s) {\n //Pick data of useful properties only\n var chipsCopy = _.map($s.selectedChips, function (ele) { return _.pick(ele, ['key', 'value', 'wmImgSrc', 'fullValue']); });\n _.forEach(chipsCopy, function (chip, index) {\n //If only one entry exists or if it is first occurance\n if ((_.findIndex(chipsCopy, chip) === _.findLastIndex(chipsCopy, chip)) || (_.findIndex(chipsCopy, chip) === index)) {\n $s.selectedChips[index].isDuplicate = false;\n } else {\n $s.selectedChips[index].isDuplicate = true;\n }\n });\n }", "title": "" }, { "docid": "e72bc3a8159b6baaf862b6de82c2e3ee", "score": "0.5932259", "text": "checkIfInInsertAlready(singleProductAlsoBoughtInsert,element,toAddProduct){\n var seenAlready = {};\n for(var j = 0; j < singleProductAlsoBoughtInsert.length; ++j) {\n if(singleProductAlsoBoughtInsert[j].productID == element.product_id && singleProductAlsoBoughtInsert[j].forProduct == toAddProduct.productID){\n seenAlready.seen = true;\n seenAlready.atIndex = j;\n return seenAlready;\n }\n }\n seenAlready.seen = false;\n seenAlready.atIndex = -1;\n return seenAlready;\n }", "title": "" }, { "docid": "7ddf99c473d719aa568e7d6340d06655", "score": "0.59236", "text": "function isDuplicate($s, newItemObject) {\n return _.findIndex($s.selectedChips, newItemObject) > -1;\n }", "title": "" }, { "docid": "4b46e9c1c16f19d170981c1fcee33dc9", "score": "0.5914671", "text": "function isDuplicate(nome,sobrenome){ \n\tvar isduplicate=false; \n\tfor(var i=0;i<addresslist.length; i++){ \n\t\tif(addresslist[i].nome.toLowerCase()==nome.toLowerCase() \n\t\t&& addresslist[i].sobrenome.toLowerCase()==sobrenome.toLowerCase()){ \n\t\t\tisduplicate=true; \n\t\t} \n\t} \n\treturn isduplicate; \n}", "title": "" }, { "docid": "6792052ce9accc08f544cc584af26c53", "score": "0.59116", "text": "function checkForDuplicate(id) {\n if (userInSession.deckBuilder.deckArr.indexOf(id) >= 0) {\n return true\n }\n return false\n}", "title": "" }, { "docid": "5653592f4fa0dfd45964fda362afe8ad", "score": "0.58969766", "text": "function verifyDuplicateRow(listOfRate) {\n let dupeResult = {\n isDupe: false,\n index: -1\n }\n const dataLength = listOfRate.length;\n for (let i = 0; i < dataLength; i++) {\n const item = listOfRate[i]\n const arrayToCheck = chopArray(listOfRate, i + 1, dataLength - (i + 1));\n const includeResult = includes(arrayToCheck, item);\n if (includeResult != -1) {\n dupeResult.isDupe = true;\n dupeResult.index = i;\n break;\n }\n }\n return dupeResult;\n}", "title": "" }, { "docid": "772d839bf2b4592e04cf9eff44414fb8", "score": "0.58952874", "text": "function isDuplicate(name) {\n return _.some(listTodos, function (todo) {\n return todo.name === name;\n });\n }", "title": "" }, { "docid": "20fc2c2d468d5fd91dabb4eaa81a350b", "score": "0.5876195", "text": "function checkDuplicateMobile( mobileInput ){\r\n\t\r\n\tif(update == false ){\r\n\t\tfor(var i=1; i<counter; i++){\r\n\t\t\tvar x = document.getElementById(\"empTab\").rows[i].cells;\r\n\r\n\t\t\tif( mobileInput == x[4].innerHTML){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\telse{\r\n\t\tfor(var i=1; i<counter; i++){\r\n\t\t\tvar x = document.getElementById(\"empTab\").rows[i].cells;\r\n\r\n\t\t\tif( mobileInput == x[4].innerHTML && i!=rowUpdateNo){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\t\r\n\t}\r\n\treturn false;\r\n\t\r\n}", "title": "" }, { "docid": "e3a2870072f51bc67a92ac85c0a93f42", "score": "0.58356166", "text": "function checkUniqueUsername(name) {\n var isUnique = true;\n var i;\n\n for (i=0; i<connections.length; i++) {\n if (connections[i].username === name) {\n isUnique = false;\n break;\n }\n }\n return isUnique;\n}", "title": "" }, { "docid": "ba96acd081b287dd5d8bb635f699bc83", "score": "0.5828607", "text": "function checkDuplicateEmail( emailInput){\r\n\tif(update == false){\r\n\t\tfor(var i=1; i<counter; i++){\r\n\t\t\tvar x = document.getElementById(\"empTab\").rows[i].cells;\r\n\r\n\t\t\tif( emailInput == x[3].innerHTML){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\telse{\r\n\t\t\r\n\t\tfor(var i=1; i<counter; i++){\r\n\t\t\tvar x = document.getElementById(\"empTab\").rows[i].cells;\r\n\r\n\t\t\tif( emailInput == x[3].innerHTML && i!=rowUpdateNo){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}\r\n\treturn false;\r\n\t\r\n\t\r\n}", "title": "" }, { "docid": "94a201f6744a85bb4ec4a778ca9ebdc8", "score": "0.5797919", "text": "function checkDuplicatePizzaNames() {\n let duplicateErrorMessage =\n \" name already exists. Please choose other pizza name.\";\n let duplicated = false;\n let allNames = getpizzaNamesInLocalStorage();\n if (allNames.includes(pizzaNameInput.value)) {\n document.getElementById(\"pizza-name-validity-msg\").innerHTML =\n pizzaNameInput.value + duplicateErrorMessage;\n duplicated = true;\n }\n return duplicated;\n}", "title": "" }, { "docid": "479becba37ef6cca60cfa84716c34f69", "score": "0.5782205", "text": "function isDuplicatedItem(itemList, name) { \n return _.some(itemList.todos, function(item) { \n return item.name === name;\n });\n }", "title": "" }, { "docid": "8d307892e62aa30208f21270832032f7", "score": "0.57596684", "text": "function checkForDedup(item) {\n const changeCount = historyByType.merge(item)\n if (changeCount === 0) {\n log.verbose('Item not deduped', {\n changeCount,\n item\n })\n const msg = `* Item Not deduped: ${changeCount} ${item}`\n throw new Error(msg)\n }\n }", "title": "" }, { "docid": "361dcbf6604dbd4a08319f97e74394ad", "score": "0.5751414", "text": "function shortIsUnique(uniqueIdentifier, callback){\n databaseAccess(dbFind, {\"short\": uniqueIdentifier}, function(results){\n if(results.length === 0){\n callback(true);\n }\n else{\n callback(false);\n }\n });\n}", "title": "" }, { "docid": "18d843ea2ec22553a54a411b4191ec6e", "score": "0.5747553", "text": "function CR_Name_Duplicate_Entry(Projectnameentry, crnameentry) {\n var requestUri = _spPageContextInfo.webAbsoluteUrl + \"/_api/web/lists/getByTitle('CR')/items?$filter=Project/Id%20eq%20\" + Projectnameentry + \"&$select=Title,ID,Project/Id,Project/Title&$expand=Project\";\n var bool_CRName = \"0\";\n\n jQuery.ajax({\n url: requestUri,\n type: \"GET\",\n async: false,\n headers: { \"accept\": \"application/json;odata=verbose\" },\n success: function (data) {\n if (data.d.results != null) {\n if (data.d.results.length > 0) {\n for (d = 0; d < data.d.results.length; d++) {\n if (crnameentry == data.d.results[d].Title) {\n bool_CRName = \"1\";\n return bool_CRName;\n }\n }\n }\n }\n },\n error: function (err) {\n\n alert(\"Duplicate Error Occured:\" + JSON.stringify(err));\n\n }\n\n });\n return bool_CRName;\n }", "title": "" }, { "docid": "7eef6ad6405f8951f9048dce5e689fca", "score": "0.574645", "text": "isUnique(value, next) {\n Page.findOne({where: {location: value}}).then((page)=>{\n if(page){\n return next('Location not already taken.');\n }\n return next();\n }).catch((err)=>{\n return next(err);\n });\n\n }", "title": "" }, { "docid": "a76a22844686a2cdceadd3bb872d96d2", "score": "0.57455194", "text": "function areThereDuplicatesNew() {\n let counter = {};\n for(let val in arguments){\n counter[arguments[val]] = (counter[arguments[val]] || 0) + 1\n }\n for (let key in counter) {\n if (counter[key] > 1) return true\n }\n return false\n}", "title": "" }, { "docid": "e297db36deaa14a92f75d0f01c8b55a1", "score": "0.5743572", "text": "function checkUniqueFieldValue (model, field, value, exceptId) {\n const condition = exceptId ? {_id :{\"$ne\": ObjectId(exceptId)}} : {}\n let partial = findOnePartial(model, condition)\n return partial(field, value)\n .then(res => {\n if(res){ //\n throw new Error(`An item with value \"${value}\" as \"${field}\" already exists in ${model.collection.name}.`)\n }\n\n return true\n })\n .catch(error => {throw new Error(error.message)})\n}", "title": "" }, { "docid": "91ed9ac2e0499d5fec0ffd0f3a3fb5e5", "score": "0.5731618", "text": "createSubreddit(subreddit){\n return this.conn.query('INSERT INTO subreddits (name,description,createdAt,updatedAt) VALUES (?,?,NOW(),NOW())',\n [subreddit.name,subreddit.description]\n ).then(result => {\n return result.insertId;\n }).catch(error => {\n if(error.code === 'ER_DUP_ENTRY'){\n throw new Error('A subreddit with this name already exists');\n }\n else{\n throw error;\n }\n });\n }", "title": "" }, { "docid": "812d6d4c921127c5c8e6dde14ec71b6f", "score": "0.5730719", "text": "function checkForDuplicates(params) {\n\n // Promise callback\n var promise_cb = function(resolve, reject) {\n\n // Itterate over the array of content documents\n params.listOfDocs.forEach(function(contentDoc) {\n\n // Check if the document with that shortenUrl already exist in the 'contents' field\n if(contentDoc.shortenUrl === params.contentParams.shortenUrl) {\n\n // Construct a friendly warning\n var documentAlreadyExist_warning = {\n date : datter().time + \" \" + datter().date,\n message : \"Document with that link already exists.\"\n };\n\n // Resolve the promise with an error\n return resolve({\n warning : documentAlreadyExist_warning\n });\n\n // Document (with that shortenUrl value [unique index]) does not exist\n }\n\n // Return the content parameters\n return resolve({\n contentParams : params.contentParams,\n user : params.user\n });\n\n });\n\n };\n\n\n // Return a promise\n return new Promise(promise_cb);\n\n }", "title": "" }, { "docid": "de4aca5ad609c4585a573e6454669228", "score": "0.5728153", "text": "async function checkDupes(crc32)\n {\n return new Promise((resolve, reject) => {\n // Check for duplicate CRC32 hash\n db.all(\n 'SELECT id FROM projects WHERE crc32 == ?;',\n [crc32],\n function (err, rows)\n {\n if (err)\n return reject('duplicate check failed');\n\n // Prevent insertion of duplicates\n if (rows.length > 0)\n return reject('duplicate project');\n\n resolve();\n }\n );\n });\n }", "title": "" }, { "docid": "bc0c172d7ec6bdbdd2706a495cccdd74", "score": "0.57094646", "text": "function isUsernameUnique(name) {\n var isUnique = true;\n var i;\n\n for (i=0; i<connectionArray.length; i++) {\n if (connectionArray[i].username === name) {\n isUnique = false;\n break;\n }\n }\n return isUnique;\n}", "title": "" }, { "docid": "2951d767dd6959df0d4909523f8a6213", "score": "0.5689799", "text": "isNewRecord(recordID: DataID): boolean {\n return !!this._created[recordID];\n }", "title": "" }, { "docid": "95402679f7c9fdb397dd771e3328d897", "score": "0.56825614", "text": "function isDuplicateDocument(newDocument, existingDocuments) {\n return newDocument.id !== null && existingDocuments.some(doc => newDocument.id === doc.id);\n}", "title": "" }, { "docid": "2ba8d05465b2feba05156418d8e21ec7", "score": "0.56747043", "text": "function _check_if_exist_change(){\n try{\n var is_make_changed = false;\n for(var i=0,j=self.table_view.data[0].rows.length-1;i<j;i++){\n if(self.table_view.data[0].rows[i].hasCheck){ \n is_make_changed = true;\n break;\n }\n } \n return is_make_changed;\n }catch(err){\n self.process_simple_error_message(err,window_source+' - _check_if_exist_change');\n return false; \n } \n }", "title": "" }, { "docid": "86151a8b5dc277ff863ed7c2b624d8a2", "score": "0.5661488", "text": "_handleUserDuplicatesTx(t, userId, userLogin) {\n return t.manyOrNone(\"\\\n select id, trim(login) as login \\\n from malrec_users \\\n where id = $(id) or login = $(login) \\\n for update \\\n \", {\n id: userId,\n login: userLogin,\n }).then((rows) => {\n if (!rows.length) {\n return t.query(\"\\\n insert into malrec_users(id, login) \\\n values ($(id), $(login)) \\\n \", {\n id: userId,\n login: userLogin,\n });\n } else {\n let alreadyUserByLogin = rows\n .filter((row) => (row.login == userLogin));\n let alreadyUserById = rows.filter((row) => (row.id == userId));\n alreadyUserByLogin = alreadyUserByLogin.length ? alreadyUserByLogin[0] : null;\n alreadyUserById = alreadyUserById.length ? alreadyUserById[0] : null;\n if (alreadyUserById && alreadyUserById.login != userLogin) {\n //Login changed. It happens rarely, but can happen\n let batch = [];\n if (alreadyUserByLogin) {\n //Logins swap. Can happen!\n console.warn(\"Logins swap for #\"+userId+\" : \" \n + alreadyUserById.login + \" -> \" + userLogin+\". \" + \n \"#\"+alreadyUserByLogin.id+\" already had login \"+userLogin \n + \", need to recheck that id and old login\");\n batch.push(t.query(\"\\\n update malrec_users \\\n set login = $(tempDummyLogin), need_to_check_list = true \\\n where id = $(id) \\\n \", {\n id: alreadyUserByLogin.id,\n tempDummyLogin: '?????_'+userLogin+'_'+new Date().getTime(),\n }));\n if (alreadyUserByLogin.id > 0) {\n this.redis.sadd(\"mal.recheckUserIds\", alreadyUserByLogin.id);\n } else {\n batch.push(t.query(\"\\\n update malrec_users \\\n set is_deleted = true, need_to_check_list = false \\\n where id = $(id) \\\n \", {\n id: alreadyUserByLogin.id,\n }));\n }\n } else {\n console.warn(\"Login change for #\"+userId+\" : \"\n + alreadyUserById.login + \" -> \" + userLogin + \", need to recheck old login\");\n }\n batch.push(t.query(\"\\\n update malrec_users \\\n set login = $(login), need_to_check_list = true \\\n where id = $(id) \\\n \", {\n id: userId,\n login: userLogin,\n }));\n if (alreadyUserById.login && alreadyUserById.login.indexOf('?????_') == -1\n && alreadyUserById.login.toLowerCase() != userLogin.toLowerCase() )\n this.redis.sadd(\"mal.recheckUserLogins\", alreadyUserById.login);\n return t.batch(batch);\n } else if(alreadyUserByLogin && alreadyUserByLogin.id != userId \n && alreadyUserByLogin.id > 0) {\n //Previous id was temp => just update it to real one\n return t.query(\"\\\n update malrec_users \\\n set id = $(id) \\\n where login = $(login) \\\n \", {\n id: userId,\n login: userLogin,\n });\n } else if(alreadyUserByLogin && alreadyUserByLogin.id != userId) {\n //Logins swap\n console.warn(\"Logins swap for #\"+userId+\" \"+userLogin+\" : \" + \n \"#\"+alreadyUserByLogin.id+\" already had login \"+userLogin\n +\", need to recheck that id\");\n this.redis.sadd(\"mal.recheckUserIds\", alreadyUserByLogin.id);\n let pr1 = t.query(\"\\\n update malrec_users \\\n set login = $(tempDummyLogin), need_to_check_list = true \\\n where id = $(id) \\\n \", {\n id: alreadyUserByLogin.id,\n tempDummyLogin: '?????_'+userLogin+'_'+new Date().getTime(),\n });\n let pr2 = t.query(\"\\\n insert into malrec_users(id, login) \\\n values ($(id), $(login)) \\\n \", {\n id: userId,\n login: userLogin,\n });\n return t.batch([pr1, pr2]);\n }\n }\n }).then(() => {\n this.redis.srem(\"mal.recheckUserIds\", userId);\n this.redis.srem(\"mal.recheckUserLogins\", userLogin);\n });\n }", "title": "" }, { "docid": "b0d509c807f84341dc63046997dc4f2d", "score": "0.56604797", "text": "async function checkUniquenessForPrimaryKeys(req) {\n const record = req.data;\n const affectedRows = await fetchExistingRates(CurrencyExchangeRates, record, req);\n checkForDuplicateRates(affectedRows, req.data, req.event);\n }", "title": "" }, { "docid": "27ec4af57df1e889e85284620a363864", "score": "0.56333846", "text": "function isUsernameUnique(name) {\n var isUnique = true;\n var i;\n\n for (i = 0; i < connectionArray.length; i++) {\n if (connectionArray[i].username === name) {\n isUnique = false;\n break;\n }\n }\n return isUnique;\n}", "title": "" }, { "docid": "ef388f7dddebbf6733f8bdf70e6957b0", "score": "0.56327736", "text": "async function already_exists(tag_name) {\n var tag_pls = await Hierarchy.findOne({name: tag_name});\n if (tag_pls != null) {\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "faf13840c6ead07e6732510f71028346", "score": "0.56324255", "text": "function is_repeated(new_input, input){\n\t if(new_input == input){\n\t \tset_error_msg(\"<i>Links already saved with TubeTrack key <u>\" + key + \"</u></i>\"); \n\t return true;\n\t }\n\t return false;\n\t}", "title": "" }, { "docid": "21c5f5482fe578bbb99927c227749330", "score": "0.56247663", "text": "function findDuplicate(collection) {\n var len = collection.length;\n var currItem;\n\n var dups = [];\n\n var result = {};\n\n for(var i=0; i<len; i++){\n\n if(result.hasOwnProperty[collection[i]){\n\n }\n }\n\n// for (var i = 0; i < len; i++) {\n// currItem = collection[i];\n\n// for (var j = 0; j < len; j++) {\n// if (j !== i) {\n// if (currItem === collection[j]) {\n// return true;\n// dups.push(currItem)\n// }\n// }\n// }\n// }\n// return false;\n}", "title": "" }, { "docid": "34d10fc26eadca41b701a619a4398356", "score": "0.56195575", "text": "function _check_if_exist_change(){\n try{\n var is_make_changed = false;\n if(_is_make_changed){\n is_make_changed = true;\n }else{\n var db = Titanium.Database.open(self.get_db_name());\n var rows = db.execute('SELECT * FROM my_'+_type+'_assigned_user WHERE id=?',_selected_job_assigned_user_id);\n if((rows != null) && (rows.isValidRow())){\n if(_selected_job_assigned_user_code != rows.fieldByName('job_assigned_user_code')){\n is_make_changed = true;\n }\n if((!is_make_changed)&&(_selected_manager_user_id != rows.fieldByName('manager_user_id'))){\n is_make_changed = true;\n }\n if((!is_make_changed)&&(_selected_assigned_from != rows.fieldByName('assigned_from'))){\n is_make_changed = true;\n }\n if((!is_make_changed)&&(_selected_assigned_to != rows.fieldByName('assigned_to'))){\n is_make_changed = true;\n }\n }\n if(rows != null){\n rows.close();\n }\n db.close();\n }\n return is_make_changed;\n }catch(err){\n self.process_simple_error_message(err,window_source+' - _check_if_exist_change');\n return false; \n } \n }", "title": "" }, { "docid": "30034595f3620f0ccacd8d710481ad75", "score": "0.5603735", "text": "async check(name) {\n const snapshot = await this.db.TemplatesRef.where(\"name\", \"==\", name).get();\n return snapshot.size === 1;\n }", "title": "" }, { "docid": "d032f490d144cad07128db8b52d29bed", "score": "0.55993456", "text": "isExists(){\n return DB.isUserExist(this.id);\n }", "title": "" }, { "docid": "17e3aad0e073863a6070d31005dc2e97", "score": "0.55976224", "text": "function checkIfTipNameIsUnique(worker, tip_name, tip_type, tip_expr)\n{\n\tvar dbOpenRequest = indexedDB.open(\"trustmarkDB\", 2);\n\n dbOpenRequest.onsuccess = function(event)\n {\n db = event.target.result;\n\t\tvar tipObjectStore = db.transaction(\"tip\").objectStore(\"tip\");\n\t\tvar tipRequest = tipObjectStore.openCursor();\n var overallFailed = false;\n\n \ttipRequest.onsuccess = function(event)\n {\n var cursor = event.target.result;\n\n\t\t\t //Iterate through all tips\n if(cursor)\n {\n\t\t\t\t//Check if tip name has been already used\n \tvar tip = cursor.value;\n\t\t\t\tif(tip.nickname === tip_name)\n\t\t\t\t{\n\t\t\t\t\t//If yes, then trigger the duplicatetipname event and stop iterating\n\t\t\t\t\tworker.port.emit(\"duplicatetipname\");\t\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//If no, move on to the next record\n\t\t\t\t\tcursor.continue();\n\t\t\t\t}\t\t\t\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t\t//If no matched records found, trigger the uniquetipname event\n\t\t\t\tworker.port.emit(\"uniquetipname\", tip_name, tip_type, tip_expr);\n\t\t\t }\t\n\t\t}\n\t}\n\t\t\t\n}", "title": "" }, { "docid": "ceaaae764052be273b334ae16b92019d", "score": "0.55867904", "text": "function checkForDuplicateUN(result) {\n\t\tfor ( i = 0; i < results.length; i++) {\n\t\t\tcomp_result = results[i];\n\t\t\tif (result == comp_result) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (result.from_user == comp_result.from_user && !comp_result.geo_info.exact) {\n\t\t\t\tresult.geo_info = comp_result.geo_info;\n\t\t\t\t//probably meaningless, but could apply to super-fast call on super-slow computer\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "86c86a4ee2b0571df1d1b71d68a1c991", "score": "0.5584049", "text": "function checkKey() {\n if (localStorage.studentsInfo && localStorage['formInfo']) {\n LS=JSON.parse(localStorage['formInfo']);\n for (var i = 0; i < studentsArray.length; i++) {\n if(LS[\"cin\"] === studentsArray[i].cin || LS[\"email\"] === studentsArray[i].email){\n console.log(\"already exist\");\n var htmlll= '<p> Cin or Email already exist </p>';\n $(\"#pp\").html(htmlll);\n return true;\n }\n }\n }\n return false;\n}", "title": "" }, { "docid": "1a3e51b4d6f82534b903115a69caa89a", "score": "0.55790186", "text": "unsafeValidateUnique(fields, message = 'has already been taken') {\n return async (val, context) => {\n const query = app.locals.bookshelf.knex(this.tableName);\n\n if (context && context.transacting) {\n query.transacting(context.transacting);\n }\n\n const conditions = fields.reduce((obj, field) => {\n obj[field] = this.attributes[field];\n return obj;\n }, {});\n\n let resp;\n if (this.isNew()) {\n resp = await query.where(conditions);\n } else {\n resp = await query.where(conditions).where('id', '<>', this.id);\n }\n\n if (resp.length > 0) {\n throw new Checkit.ValidationError(message);\n }\n };\n }", "title": "" }, { "docid": "79f9bfe80599cccd055d2b5936e7470e", "score": "0.55757165", "text": "function checkDuplicate(analyzerResult) {\n let date = new Date(analyzerResult.beginDate);\n date = DateTimeUtil.toUTC(date);\n date = DateTimeUtil.toISO(date);\n let gte = date + 'T00:00:00Z';\n let lte = date + 'T23:59:59Z';\n\n return AnalyzerResultModel.find({ accessionNumber: analyzerResult.accessionNumber, test: analyzerResult.test, beginDate: { $gte: gte, $lte: lte } })\n .populate({\n path: 'test',\n match: { testId: analyzerResult.test.testId }\n })\n .populate({\n path: 'result',\n populate: {\n path: 'type'\n }\n })\n .exec()\n .then(function(result) {\n if (result.length !== 0) {\n return Promise.reject(analyzerResult);\n }\n return analyzerResult;\n });\n\n}", "title": "" }, { "docid": "1c35d94cac99a23bb1a624e2bf7b0427", "score": "0.5574932", "text": "existsLink(link) {\n return (this.store.findOneBy(this.links, {u1 : link.u1, u2 : link.u2}) != undefined) || (this.store.findOneBy(this.links, {u1 : link.u2, u2 : link.u1}) != undefined);\n }", "title": "" }, { "docid": "7d15d61e07b750be9fc16df1174b0b7a", "score": "0.5574488", "text": "inserted() {\n return this.recordId > 0;\n }", "title": "" }, { "docid": "3cd91da8384651b1fa3b5691dc0188ba", "score": "0.5570112", "text": "function isDuplicateError (type, err) {\n return err.code === 11000 && err.message.includes(type)\n}", "title": "" }, { "docid": "777df3b5dc994dd00a39cc6074c16c8d", "score": "0.5552619", "text": "async function checkUser(email) {\n\n const queryText = \"SELECT * FROM users WHERE email = $1\";\n const params = [email];\n let alreadyExists = true;\n\n \n const client = await db.connect()\n try {\n const result = await client.query(queryText, params)\n result.rowCount > 0 ? alreadyExists = true : alreadyExists = false;\n console.log('alreadyExists: ', alreadyExists);\n console.log('This many rows were affected: ' + result.rowCount);\n } catch(err) {\n console.log('Error with checkUser() query: ', err.stack);\n } finally {\n client.release()\n }\n\n return alreadyExists;\n}", "title": "" }, { "docid": "e62491f050170f0d06dd5ffc6f5e3fd5", "score": "0.55294037", "text": "function areThereDuplicatesMyTry() {\n return false;\n}", "title": "" }, { "docid": "f0c0679da61017f79044710b072144c6", "score": "0.5526813", "text": "function doesNodeAlreadyExist(name) {\n var i;\n for (i = 0; i < betterDataNodes.length; i++) {\n if (betterDataNodes[i].name == name) {\n return betterDataNodes[i].id;\n } //if\n } //for\n return -1;\n}", "title": "" }, { "docid": "05c9b514b81116ad42f25bb2e0fa9b66", "score": "0.5524551", "text": "function checkDup(input){\n for (var i=0; i<allGuesses.length; i++){\n if (input === allGuesses[i]){ \n return true;\n }\n }\n return false; \n}", "title": "" }, { "docid": "c868eef6968da8f03c84a745fd668ac3", "score": "0.55134", "text": "function rowIsUnique(rows, name) {\n for (let i = 0; i < rows.length; i += 1) {\n if (name === rows[i].innerText.split('\\t')[0]) {\n alert(`You've already selected '${name}'`);\n return false;\n }\n }\n return true;\n}", "title": "" }, { "docid": "7b3468e8cebb896faa3328e6cd6b15be", "score": "0.5508402", "text": "_check(owmCityId) {\n var self = this;\n return new Promise(function(resolve, reject) {\n self.cardsRef.orderByChild('owmCityId').equalTo(owmCityId).once('value', (snapshot) => {\n if (!snapshot.val()) {\n // no existing card for this owmCityId\n resolve();\n } else {\n // card already exists for this owmCityId\n reject('card for this ID (' + owmCityId + ') already exists');\n }\n });\n });\n }", "title": "" }, { "docid": "987d10818ce0cd20212e20fbde3d6f36", "score": "0.5507439", "text": "function duplicate_validate(duplicate_value, duplicate_field) {\n var requestUri = _spPageContextInfo.webAbsoluteUrl + \"/_api/web/lists/getByTitle('\" + Effort_listDisplayName + \"')/items?$select=Project/Id,Project/Title&$expand=Project&$filter=\" + duplicate_field + \"/Id%20eq%20'\" + duplicate_value + \"'\";\n //\" + duplicate_value + \"'\";\n var bool_duplicate = true;\n console.log(requestUri);\n jQuery.ajax({\n url: requestUri,\n type: \"GET\",\n async: false,\n headers: { \"accept\": \"application/json;odata=verbose\" },\n success: function (data) {\n if (data.d.results.length > 0) {\n console.log(data.d);\n\n bool_duplicate = false;\n }\n\n },\n error: function (err) {\n\n alert(\"Error Occured:\" + JSON.stringify(err));\n\n }\n\n });\n return bool_duplicate;\n }", "title": "" }, { "docid": "b5badee4e99ec5bb6474ac9a0f4d59cf", "score": "0.5501482", "text": "function hasDuplicates() {\n let valuesSoFar = [];\n for (var i = 0; i < section.contentmeta.length; ++i) {\n if (!section.contentmeta[i].id) { return true }\n let value = section.contentmeta[i].id;\n // Check if value is in valuesSoFar array\n if (valuesSoFar.indexOf(value) > -1) {\n return true;\n }\n valuesSoFar.push(value);\n }\n return false;\n }", "title": "" }, { "docid": "d9d13c2d2c55f0da3d273905852d626e", "score": "0.550054", "text": "static async alreadyExists(username, email){\n const result = await db.query(`SELECT * FROM users WHERE username=$1 AND email=$2`, [username, email]);\n return result.rows[0];\n }", "title": "" }, { "docid": "d56b5e694a209c799567e06d41f729eb", "score": "0.549235", "text": "function areThereDuplicates() {\n let collection = {}\n for(let val in arguments){\n collection[arguments[val]] = (collection[arguments[val]] || 0) + 1\n }\n for(let key in collection){\n if(collection[key] > 1) return true\n }\n return false;\n}", "title": "" }, { "docid": "2a5ad753b555d419fcf18a99a03a9021", "score": "0.5484939", "text": "function areThereDuplicates() {\n let collection = {};\n for (let val in arguments) {\n collection[arguments[val]] = (collection[arguments[val]] || 0) + 1;\n }\n for (let key in collection) {\n if (collection[key] > 1) return true;\n }\n return false;\n}", "title": "" }, { "docid": "2089f5982d0cce3cf53c43fa2b22dffb", "score": "0.54847544", "text": "function isDuplicate(element, index, array){\n return ((element.title != testTitle) || (element.album != testAlbum) || (element.artist != testArtist));\n}", "title": "" }, { "docid": "69c19204a5de43cf2eea64918a0a833d", "score": "0.5471342", "text": "function checkDuplicateEmail(email) {\n var didFindDuplicate = false;\n for (var user in users) {\n if (users[user].email === email) {\n didFindDuplicate = true;\n break;\n }\n }\n return didFindDuplicate;\n}", "title": "" }, { "docid": "6820cad7a0c00ef48b9813076b63a55b", "score": "0.5470341", "text": "function checkDatabase() {\n \n // open a transaction and access pending object store\n const transaction = db.transaction([\"pending\"], \"readwrite\");\n const store = transaction.objectStore(\"pending\");\n\n // get all records from store\n const records = store.getAll();\n\n // if at least one record exists in pending store, post it at our mongodb database\n getAll.onsuccess = function () {\n if (getAll.result.length > 0) {\n fetch(\"/api/transaction/bulk\", {\n method: \"POST\",\n body: JSON.stringify(getAll.result),\n headers: {\n Accept: \"application/json, text/plain, */*\",\n \"Content-Type\": \"application/json\"\n }\n })\n .then(response => response.json())\n .then(() => {\n // delete records if successful\n const transaction = db.transaction([\"pending\"], \"readwrite\");\n const store = transaction.objectStore(\"pending\");\n store.clear();\n });\n }\n };\n}", "title": "" }, { "docid": "4ffcde5d06b40e1f65aafc8a8b33d86f", "score": "0.5467977", "text": "function areThereDuplicates() {\n let collection = {};\n for (let val in arguments) {\n collection[arguments[val]] = (collection[arguments[val]] || 0) + 1;\n }\n for (let key in collection) {\n if (collection[key] > 1) return true;\n }\n return false;\n}", "title": "" }, { "docid": "ce86d78d79e5cf21ff4eb7315f222ae6", "score": "0.5458569", "text": "async checkUniqueness (exception_mode = false, ignore_null = false) {\n for (const fields of this.constructor.UNIQUE_KEYS) {\n if (!await this.isUnique(fields, ignore_null)) {\n if (exception_mode) {\n const ex = new ValidationException('Object is not unique')\n for (const field of fields) {\n ex.info[field] = 'Part of the unique key'\n }\n throw ex\n }\n return false\n }\n }\n return true\n }", "title": "" }, { "docid": "0a9325c9f54b3f476b0ab0cbca836e6e", "score": "0.54363173", "text": "function is_exist_unsaved() {\n if ($('.ui_detail_area').find('.ui_new_detail').length > 0) {\n show_error_dialog('Please save the unsaved data !');\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "07f90c68818ed817b49f6692d2833093", "score": "0.54129755", "text": "function isDuplicate(names, phone) {\n\tvar isduplicate = false;\n\tfor (var i = 0; i < addresslist.length; i++) {\n\t\tif (addresslist[i].names.toLowerCase() == names.toLowerCase() && addresslist[i].phone.toLowerCase() == phone.toLowerCase()) {\n\t\t\tisduplicate = true;\n\t\t}\n\t}\n\treturn isduplicate;\n}", "title": "" }, { "docid": "ad65052245c3203a2feacd11a5e2963c", "score": "0.5393974", "text": "async function addAddress(dbo, id, pass, seed, info, finalAddress) {\n\n try {\n var result = await dbo.collection(seed).findOne({ ID: id });\n // console.log(result);\n if(result == null){\n var myobj = {\n _id: finalAddress,\n ID: id,\n PASSWORD: pass,\n SEED: seed,\n Profile: info,\n ADDRESS: finalAddress,\n streamRoot: null,\n };\n \n await dbo.collection(seed).insertOne(myobj);\n return true;\n }\n else\n return [false, \"Same ID exists\"];\n\n } catch (err) {\n return false;\n }\n}", "title": "" }, { "docid": "c64209b091f53bca05a0ac6245766d3d", "score": "0.53915817", "text": "exists(username) {\n return (this.db.has(username)) ? true : false;\n }", "title": "" }, { "docid": "8a01c11583040bae87efc1eddd376827", "score": "0.53915584", "text": "function checkDuplicateDefinition(array, resource, type) {\n if (array.find(e => e.name === resource.name)) {\n utils_1.logger.error(`Encountered ${type} with a duplicate name, ${resource.name}, which GoFSH cannot make unique. Fix the source file to resolve this error or update the resulting FSH definition.`);\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "e87544c73c668d11fa89da29fe4397b6", "score": "0.5385774", "text": "function addTicker (ticker) {\n\n var regname = ticker;\n var db = cloudant.use(stockcollection);\n if (db) {\n // check for duplicated stock\n var query={};\n query[stockname]=regname;\n db.find({selector:query}, function(er, result) {\n if(!!er) {\n throw er;\n }\n if(result.docs.length>0){\n var a= { error: 'this stock is already being saved!' };\n return a;\n }else{\n query={};\n // query[\"valid\"]=1;\n query[stockname]=regname;\n db.insert(query);\n }\n });\n }else{\n console.log('db is not running');\n }\n }", "title": "" }, { "docid": "f5e77191f289bf86becb5631639af38b", "score": "0.5384643", "text": "function findDuplicates(thisTable, col1, col2, allChar) {\n var isDuplicate = false; Toclear = true;\n $(\"#\" + thisTable).find(\".\" + col1).each(function (i, el1) {\n var Toclear = true;\n var current_valCol1 = $.trim($(el1).val()).toUpperCase();\n if (col2 != null) {\n var current_valCol2 = $.trim($($(el1).closest(\"tr\")).find(\".\" + col2).val()).toUpperCase();\n }\n var indexI = i;\n if (current_valCol1 != \"\") {\n if (col2 == null || (col2 != null && current_valCol2 != \"\")) {\n if ($.trim(current_valCol2).length > 2 && col2 != \"cPartCode\" && !allChar)\n current_valCol2 = current_valCol2.substring(0, 2);\n $(\"#\" + thisTable).find(\".\" + col1).each(function (i, el2) {\n if (col2 == null) {\n if ($.trim($(el2).val()).toUpperCase() == current_valCol1 && indexI != i) {\n isDuplicate = true;\n Toclear = false;\n HighlightError(el2, true);\n HighlightError(el1, true);\n return false;\n }\n }\n else {\n var current_valCol2El2 = $.trim($($(el2).closest(\"tr\")).find(\".\" + col2).val()).toUpperCase();\n if ($.trim(current_valCol2El2).length > 2 && col2 != \"cPartCode\" && !allChar)\n current_valCol2El2 = current_valCol2El2.substring(0, 2);\n if (($.trim($(el2).val()).toUpperCase() == current_valCol1 && current_valCol2El2 == current_valCol2) && indexI != i) {\n isDuplicate = true;\n Toclear = false;\n HighlightError(el2, true);\n HighlightError(el1, true);\n return false;\n }\n }\n });\n\n if (Toclear) {\n HighlightError(el1, false);\n }\n }\n }\n });\n return isDuplicate;\n}", "title": "" }, { "docid": "ba84644ecb967aadb1d7ffb6240cfb0a", "score": "0.5382981", "text": "validateNonExistenceOnUpdate(collName, obj, validations, cb) {\n let id;\n try {\n id = this.db.ObjectId(obj._id);\n }\n catch (err) {\n return cb(\"Invalid Id\");\n }\n if (!Array.isArray(validations)) {\n validations = [validations];\n }\n let dbOperations = 0;\n sh_async.autoInject({\n getExistingObj: (cb1) => {\n this.db.collection(collName).findOne({\n _id: id\n }, cb1);\n },\n compareWithNewObj: (getExistingObj, cb1) => {\n if (getExistingObj) {\n sh_async.each(validations, (field, cb2) => {\n if (getExistingObj[field.name] != obj[field.name]) {\n dbOperations += 1;\n let mongoQuery = {};\n mongoQuery[field.name] = obj[field.name]; // default mongoQuery\n if (field.query) {\n mongoQuery = field.query;\n }\n this.db.collection(collName).findOne(mongoQuery, {\n _id: 1\n }, function (err, result) {\n if (result) {\n cb2(field.errMsg ? field.errMsg : \"Duplicate \" + field.name);\n }\n else {\n cb2(err, !result);\n }\n });\n }\n else {\n cb2(null, true);\n }\n }, cb1);\n }\n else {\n cb1(\"Non Existing _id\");\n }\n }\n }, function (err, results) {\n cb(err, dbOperations);\n });\n }", "title": "" }, { "docid": "82720d9386f121ef0643997c102f09d9", "score": "0.53746384", "text": "function testInsertion(db)\r\n{\r\n var countBefore = db.exec(\"SELECT COUNT(*) FROM test\")[0][\"values\"][0][0];\r\n db.exec(\"INSERT INTO test VALUES (1000,'color','mahogany','test')\");\r\n var countAfter = db.exec(\"SELECT COUNT(*) FROM test\")[0][\"values\"][0][0];\r\n\r\n if((countAfter - countBefore) != 1)\r\n {\r\n alert(\"WARNING: Insertion test for in game database failed. Data was not inserted correctly\");\r\n }\r\n\r\n}", "title": "" }, { "docid": "3c42ca330f742218918981bffffa184a", "score": "0.53698367", "text": "function isUnique(obj) {\n\tvar username = $('#invited').find('tr');\n\n\tfor (var i = 0; i < username.length; i++) {\n\t\tif ($(username[i]).children(':last').text().trim() == $(obj).children(\n\t\t\t\t':last').text().trim()) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn true;\n}", "title": "" }, { "docid": "b21331eae9b709c7e084816cdd28e1cd", "score": "0.53623116", "text": "userExists (userID) {\n const q = this.db.prepare('SELECT EXISTS(SELECT 1 FROM user WHERE userID = ?) AS result');\n return q.get(userID).result === 1;\n }", "title": "" }, { "docid": "d00a7f6dc2b2a850cd956fd6e6014528", "score": "0.53611964", "text": "function dupilicate(req,res,next){\n var email=req.body.email;\n var dup=sign.findOne({email:email});\n dup.exec(function(err,data){\n if(err) throw err;\n if(data){\n return res.render('signup',{msg:\"Duplicate\"});\n }\n next();\n })\n}", "title": "" }, { "docid": "5c8d1732404d371171d7c1af6c5c96e0", "score": "0.5347946", "text": "function isDayDuplicated(availability) {\n\tlet isDuplicated = false;\n\t// we assume availability is not empty\n\tavailability.forEach(function (dayToCheck, index) {\n\t\tlet duplicated = 0;\n\t\tavailability.forEach(function (day) {\n\t\t\tif (day === dayToCheck) {\n\t\t\t\tduplicated++;\n\t\t\t}\n\t\t});\n\t\t// we already expect it contains itself :)\n\t\tif (duplicated > 1) {\n\t\t\tisDuplicated = true;\n\t\t}\n\t});\n\treturn isDuplicated;\n}", "title": "" }, { "docid": "52e2bd35ea8bb6d36b29ee81c45b212f", "score": "0.5338806", "text": "function areDups(arr){\r\n\r\n // ---------- Your Code Here ----------\r\n\r\n var duplicate = {};\r\n\r\n for (var i = 0 ; i < arr.length ; i ++){\r\n var elem = arr[i];\r\n if (!(elem in duplicate)){\r\n duplicate [elem] = false;\r\n } else {\r\n duplicate [elem] = true;\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n\r\n\r\n // ---------- End of Code Area ----------\r\n\r\n}", "title": "" }, { "docid": "22235ce3c6d8e6e296da631007949dcc", "score": "0.53324527", "text": "function duplicated(emails, email) {\n if (isEmpty(emails)) {\n return false;\n }\n \n var temp = emails.split(',');\n for (var i=0; i < temp.length; i++) {\n if (email == temp[i]) {\n return true;\n }\n }\n \n return false;\n}", "title": "" }, { "docid": "a6625eced8f215688f78e276a1b7e336", "score": "0.5328509", "text": "function isAlreadyAdded(song, favorites) {\n for (let i = 0; i < favorites.length; i++) {\n if (favorites[i].id === song.id) {\n return true;\n }\n }\n return false\n }", "title": "" } ]
fddefcea85777095256e75743d9c739e
Registered to the dispatcher. This should act when a remote file is stored locally.
[ { "docid": "5fb7ee6de6e090933303523e5f76f1ad", "score": "0.57191837", "text": "function _mapStoredFile(payload){\n\n\t\tif(payload.type !== OfflSync.Constants.ActionTypes.FILE_LOCAL_STORE) return;\n\n\t\t_filesMapped++;\n\n\t\t_fileMapping[payload.file.id].localURL = payload.url;\n\n\t\tif(_filesMapped === Object.keys(_fileMapping).length){\n\t\t\t_storeMappingLocally();\n\t\t} \n\n\t}", "title": "" } ]
[ { "docid": "2900624d34b66ab1920cb5d3a4bf435a", "score": "0.57255733", "text": "function _storeMappingLocally(){\n\n\t\tOfflSync.FileSystem.saveFile(\n\n\t\t\t// Filename of the file mapping file\n\t\t\tOfflSync.Settings.mappingFileName, \n\n\t\t\t// Create a blob from the file mapping as a string\n\t\t\tnew Blob([JSON.stringify(_fileMapping)]),\n\n\t\t\t// Success callback\n\t\t\tfunction(){\n\t\t\t\tOfflSync.Dispatcher.dispatch({ type: OfflSync.Constants.ActionTypes.FILES_MAPPED });\n\t\t\t\tOfflSync.Logger.msg('OfflSync.FileList._storeMappingLocally', 'All remote files are stored locally and the file mapping i stored locally');\n\t\t\t},\n\n\t\t\t// Error callback, not much we can do. Error is logged in OfflSync.FileSystem._writeToFile\n\t\t\tfunction(error){\n\n\t\t\t}\n\n\t\t);\n\n\t}", "title": "" }, { "docid": "69213879f97c97ddf3f5f79fec74b05e", "score": "0.56316674", "text": "onUrlExists() {\n this.importFile();\n }", "title": "" }, { "docid": "213daa076cdb55c6ebef6719991d44d9", "score": "0.5619179", "text": "LISTEN_FOR_SAVE({ state }) {\n ipcRenderer.on('AGANI::ask-file-save', () => {\n ipcRenderer.send('AGANI::response-file-save', state.currentFile)\n })\n }", "title": "" }, { "docid": "f2b71ac86fcc21336320b0516c832e28", "score": "0.56145686", "text": "on_sync(remote){\n if(this.remote === null){\n this.remote = remote;\n }\n }", "title": "" }, { "docid": "d9f58f5ff183021e265248297d7b135b", "score": "0.5593719", "text": "[emitRemoteEvent](event, dirent, data) {\n const payload = { event, data };\n\n if (event === 'update') {\n payload.type = 'file';\n payload.path = dirent;\n } else if (dirent) {\n payload.type = dirent.isFile() ? 'file' : 'dir';\n payload.path = dirent.name;\n }\n\n this[kConnections].forEach(connection => {\n if (connection.sync && payload.path.includes(connection.dir))\n connection.send(payload);\n });\n }", "title": "" }, { "docid": "42a06f19b77417641bd3d3c97da8c4cb", "score": "0.5453656", "text": "function UploadRemoteFile() {\n\tvar url = $(\"#urlUploadRemoteFile\").val();\n\n\tvar GetPrameterStartIdx = url.lastIndexOf('?');\n\tif (0 < GetPrameterStartIdx)\n\t\tvar filename = url.substring(url.lastIndexOf('/') + 1, GetPrameterStartIdx);\n\telse\n\t\tvar filename = url.substring(url.lastIndexOf('/') + 1);\n\n\tvar data = {strURL: url}\n\n\t$.ajax({\n\t\turl: action_url + 'UploadRemoteFile/' + UserId,\n\t\ttype: \"POST\",\n\t\tcontentType: \"application/json; charset=utf-8\",\n\t\tdata: JSON.stringify(data),\n\t\tsuccess: function (TempId) {\n\t\t\tImport(TempId, filename);\n\t\t}\n\t});\n}", "title": "" }, { "docid": "458f9fa5b13ce1fb3b9606a65b97e555", "score": "0.5411329", "text": "onNewFile() {\n if (this.dirtyCheck_()) {\n return;\n }\n\n ga('send', 'event', 'file', 'newFile');\n this.studioState_.new();\n }", "title": "" }, { "docid": "6c1673d2cb40ae25b29097071a35e1ef", "score": "0.5359481", "text": "function RemoteFile( path ) {\n\tthis.path = path;\n\tthis.state = RemoteFile.State.closed;\n\tthis.rfid = RemoteFile.nextRfid++;\n\t\n\tthis.type = FileType.guessFromPath( path );\n}", "title": "" }, { "docid": "62ef9eae17e89060aab2246079ec0bab", "score": "0.5358082", "text": "function onServeFile(request, response, pathname) {\n var localFile = path.join(watchPath, pathname);\n\n if (!path.existsSync(localFile)) {\n response.writeHead(404);\n response.end();\n return;\n }\n\n fs.readFile(localFile, function(error, content) {\n \t\tif (error) {\n \t\t\tresponse.writeHead(500);\n \t\t\tresponse.end();\n\n \t\t} else {\n \t\t // Chameleon is currently only designed to support css.\n \t\t\tresponse.writeHead(200, { 'Content-Type': 'text/css' });\n \t\t\tresponse.end(content, 'utf-8');\n \t\t}\n \t});\n }", "title": "" }, { "docid": "29bf9e901ad2a1404f754b947c2caca8", "score": "0.5284017", "text": "async function onChange(e) {\r\n const file = e.target.files[0];\r\n try {\r\n const added = await client.add(\r\n file,\r\n {\r\n progress: (prog) => console.log(`received: ${prog}`)\r\n }\r\n )\r\n const url = `https://ipfs.infura.io/ipfs/${added.path}`\r\n setFileUrl(url)\r\n } catch (error) {\r\n console.log('Error uploading file: ', error)\r\n } \r\n }", "title": "" }, { "docid": "7e6a88c8a2aa715f956bcbf1a5c739e4", "score": "0.52573955", "text": "static save(localPath, remotePath, callback){\n var key = config.aws.fileStoragePrefix + remotePath,\n saveUrl = config.aws.s3Endpoint + \"/\" + key;\n this.getS3().upload({\n Key: key, \n Body: fs.createReadStream(localPath)\n }).send(Meteor.bindEnvironment(function(err, res){\n callback(err, saveUrl);\n }));\n return saveUrl; \n }", "title": "" }, { "docid": "3f903f8971e678a04ece8d666d99b3ed", "score": "0.52210957", "text": "function onSnippetUpdate(filename) {\n console.log('Snippet Update', filename);\n\n // Send the socket client the newest content\n var files = filename ? [filename] : null;\n socket.emit('fileUpdate', channel.repr(files));\n \n }", "title": "" }, { "docid": "21351a190517787604bad1676e3d493e", "score": "0.51965785", "text": "async registerFile(ctx, filename, owner, type, price, available, hash) {\n try{\n const user = await new FabUser().getUser(ctx, owner);\n }\n catch(error){\n throw new Error(`Owner ${owner} does not exist`);\n }\n\n const file = {\n docType: \"file\",\n filename,\n owner,\n type,\n price,\n available,\n hash\n };\n\n await ctx.stub.putState(this.getFileCompositeKey(ctx, filename), Buffer.from(JSON.stringify(file)));\n }", "title": "" }, { "docid": "83b2dc71d16e779551c6c46872d4d4f5", "score": "0.5183993", "text": "function onFileTransferEvent() {\n console.log(this.readyState);\n if (this.readyState === \"transferred\") {\n console.log(\"transferred successfully\");\n // delete local.txt file as data is now trasnferred\n fs.unlinkSync(\"local.txt\");\n storageLabel.text = ``;\n }\n if (this.readyState === \"error\") {\n console.log(\"WARNING: ERROR IN FILE TRANSFER\");\n storageLabel.text = `Error`;\n }\n //console.log(`onFileTransferEvent(): name=${this.name} readyState=${this.readyState};${Date.now()};`);\n}", "title": "" }, { "docid": "cf9faf0fa7caeacd358f3f297fb7a1a1", "score": "0.51699924", "text": "onNewFile(filePath) {\n if (!this.isScriptFile(filePath)) {\n debug('new file added \"%s\"', filePath);\n this.emit('add', filePath);\n return;\n }\n debug('new source file added \"%s\"', filePath);\n this.emit('source:add', filePath);\n }", "title": "" }, { "docid": "dde8860bcfb9087148f20b6103219a5d", "score": "0.516771", "text": "function OnGetFile(fileEntry) {\n fileEntry.file(OnFileEntry, fail);\n }", "title": "" }, { "docid": "dde8860bcfb9087148f20b6103219a5d", "score": "0.516771", "text": "function OnGetFile(fileEntry) {\n fileEntry.file(OnFileEntry, fail);\n }", "title": "" }, { "docid": "d33308378f6a0b613665b15d40f91903", "score": "0.514847", "text": "function handleFileLoad(event) {\n assets[event.item.id] = event.result;\n\t}", "title": "" }, { "docid": "af4e34051af0f35f6f9deaf1c4df5058", "score": "0.514609", "text": "loadLocalFile(event) {\n this.loadROMIntoCores(event.target.files[0], event.target.files[0].name);\n sendAnalyticsEvent('load_local_rom');\n }", "title": "" }, { "docid": "415e43efb12ba89183942f9a332de8b4", "score": "0.5143259", "text": "async function onChange(e) {\n const file = e.target.files[0] // Take the first item of the array\n\n try {\n // Ipload the file to IPFS\n // We track the process of the uploading with the callback function progress: ...\n const added = await client.add(file, {\n progress: (prog) => console.log(`received: ${prog}`),\n })\n\n // When is uploaded, we can access to the added url\n const url = `https://ipfs.infura.io/ipfs/${added.path}`\n\n // We save the url yo our state variable\n setFileUrl(url)\n } catch (error) {\n console.log('Error uploading file: ', error)\n }\n }", "title": "" }, { "docid": "6f7f47047a2f36153ae28426a658ebd2", "score": "0.51323533", "text": "function RemoteFile(url) {\n _classCallCheck(this, RemoteFile);\n\n _get(Object.getPrototypeOf(RemoteFile.prototype), 'constructor', this).call(this);\n this.url = url;\n this.fileLength = -1; // unknown\n this.chunks = [];\n this.numNetworkRequests = 0;\n }", "title": "" }, { "docid": "13d53f748a271685071f3f6dba78c105", "score": "0.5111638", "text": "function setWatcher(client) {\n var localClient = client;\n localClient.window['_fs_ready'] = function localFSLoad() {\n localClient.nowLoaded();\n };\n}", "title": "" }, { "docid": "8efe1f34a9aca16e32d36092c77aad05", "score": "0.5101072", "text": "async function addFile(){\n\t\trouter.push(`/files/${filetype}/create${filetype}/${fileFolderID}`)\n\t}", "title": "" }, { "docid": "1092bf0fea7588ebed644626de641cc9", "score": "0.50937766", "text": "function postFile(fileLocation) {\n var redisProducer = redis.createClient();\n\n redisProducer.lpush(queueName, JSON.stringify({\n 'dat': 'keydddd',\n 'fileLocation': fileLocation\n }), function(err, res) {\n if (err) {\n console.log(\"ERROR: \");\n console.log(err);\n }\n else {\n console.log(\"Added event: \");\n console.log(res);\n }\n });\n}", "title": "" }, { "docid": "7351c5ef50f74ba3d3af8554a936c258", "score": "0.5091107", "text": "addFile (file, isCheckbox = false) {\n const tagFile = {\n source: this.id,\n data: this.getItemData(file),\n name: this.getItemName(file),\n // type: this.getMimeType(file),\n preview: this.getItemThumbnailUrl(file),\n isRemote: true,\n body: {\n fileId: this.getItemId(file)\n },\n remote: {\n host: this.opts.host,\n url: '',\n body: {\n fileId: this.getItemId(file)\n }\n }\n }\n\n this.uppy.log('Adding remote file')\n this.uppy.addFile(tagFile)\n\n if (!isCheckbox) {\n this.view.donePicking()\n }\n\n setTimeout((tagFile) => {\n // need this hack to skip setting the FTP files on \"paused upload\"\n // (i.e. adding them in the waitingFileIDs collection in Core.js upload() function)\n let fileId = Utils.generateFileID(tagFile)\n let updatedFile = this.setFileRemoteStatusToFalse(fileId)\n\n // the actual upload is done elsewhere in backend, we only simulate here\n this.uppy.emitter.emit('upload-success', fileId, updatedFile, '')\n }, 1500, tagFile)\n }", "title": "" }, { "docid": "f0514b8d7355b1ecf2f7db12422e1173", "score": "0.5090246", "text": "async function onChange(e) {\n const file = e.target.files[0]\n try {\n //+-\"IPFSclient.add(***)\" Import a file or data into I.P.F.S:_\n const added = await IPFSclient.add(\n file,\n {\n progress: (prog) => console.log(`received: ${prog}`)\n }\n )\n const url = `https://ipfs.infura.io/ipfs/${added.path}`\n setFileUrl(url)\n } catch (error) {\n console.log('Error uploading file: ', error)\n } \n }", "title": "" }, { "docid": "26cf07987679ec92271df76901a8f78b", "score": "0.5088149", "text": "function registerResource(path, mimetype, alias) {\n alias = alias || path;\n cc.jah.resources[alias] = {data: path, mimetype: mimetype, remote:true};\n director.preloader().addToQueue(path);\n }", "title": "" }, { "docid": "db2b2fa10e74315c8767be24596ff759", "score": "0.50765747", "text": "receiveFile(payload) {\n let fileName = payload.fileName\n let fileContent = new Buffer(payload.fileContent)\n this.writeFile(`./${HOSTED_DIR}/${fileName}`, fileContent, (err) => {\n if (err) {\n console.log(\"Error!\");\n throw err;\n }\n });\n }", "title": "" }, { "docid": "e97d2ab622226dfb775d6053d5d202e6", "score": "0.5070697", "text": "function handler (request, response) {\n\tfileServer.serve(request, response); // this will return the correct file\n}", "title": "" }, { "docid": "c0d882af0524bfbcfd7f5d9def5bf506", "score": "0.5063673", "text": "function getFileHandler() {\n\treturn fileHandler;\n}", "title": "" }, { "docid": "6f993a207b5f0ff89105eb13f686e181", "score": "0.50599235", "text": "initialize() {\n FileStorage.getInstance().getFile(this.options['url']).addCallbacks(this.onFileReady, this.handleError_, this);\n }", "title": "" }, { "docid": "be33fd33045632820378368baaf2d669", "score": "0.50426394", "text": "registerURL(transformedFilePath, sourceMapUrl) {\n const d = 'data:';\n\n if (\n sourceMapUrl.length > d.length &&\n sourceMapUrl.substring(0, d.length) === d\n ) {\n const b64 = 'base64,';\n const pos = sourceMapUrl.indexOf(b64);\n if (pos > 0) {\n this.data[transformedFilePath] = {\n type: 'encoded',\n data: sourceMapUrl.substring(pos + b64.length)\n };\n } else {\n debug(`Unable to interpret source map URL: ${sourceMapUrl}`);\n }\n\n return;\n }\n\n const dir = path.dirname(path.resolve(transformedFilePath));\n const file = path.resolve(dir, sourceMapUrl);\n this.data[transformedFilePath] = { type: 'file', data: file };\n }", "title": "" }, { "docid": "e5e80e58be545f1df55b868f29e5a6d4", "score": "0.5042206", "text": "onFileExists() {\n this.importFile();\n }", "title": "" }, { "docid": "058adc32e37511d80e2735990f8eb930", "score": "0.50266594", "text": "async listRemoteFiles () {\n debug('listRemoteFiles()')\n const files = await session.connection.hosting.listFiles(this.name)\n return Promise.all(files.map(async file => {\n // TODO: Maybe it should be somehow done in the library not here\n file.path = this.decodePath(file.path)\n\n const hostingFile = new HostingFile(file)\n return hostingFile.loadRemote(file)\n }))\n }", "title": "" }, { "docid": "6bc8d4670f619e1bf7005557b325774c", "score": "0.502635", "text": "onSuccess(file, filePath) {\n const {\n filename,\n mimetype,\n size,\n key,\n container,\n source,\n originalPath,\n } = file;\n const {\n setFileName,\n setFilestackData,\n challengeId,\n } = this.props;\n // container doesn't seem to get echoed from Drag and Drop\n const cont = container || config.FILESTACK.SUBMISSION_CONTAINER;\n // In case of url we need to submit the original url not the S3\n const fileUrl = source === 'url' ? originalPath : `https://s3.amazonaws.com/${cont}/${filePath}`;\n\n setFileName(filename);\n\n setFilestackData({\n filename,\n challengeId,\n fileUrl,\n mimetype,\n size,\n key,\n container: cont,\n });\n }", "title": "" }, { "docid": "267dd2d68a217f757cfce8156f834800", "score": "0.5004329", "text": "async addExternal (path, content, url) {\n if (url) this.addNormalizedName(path, url)\n return await this.set(path, content)\n }", "title": "" }, { "docid": "91086b0632118695583b741531a86a05", "score": "0.49819896", "text": "function upload(id, contentType, content, remoteFileName) {\n syncWorker.postMessage({ id: id, contentType: contentType, content: content, remoteFileName: remoteFileName });\n}", "title": "" }, { "docid": "4b548bd4d7a595a3e20ef3b1c990db8c", "score": "0.49747086", "text": "async getFilesToUpload (file, remoteFiles) {\n debug('getFilesToUpload')\n const fileToUpdate = _.find(remoteFiles, { path: file.path })\n const payload = new FormData()\n payload.append('file', fs.createReadStream(file.localPath))\n payload.append('path', this.encodePath(file.path))\n\n let singleFile = null\n\n if (fileToUpdate) {\n const remoteChecksum = fileToUpdate.checksum\n const localChecksum = file.checksum\n\n // Check if checksum of the local file is the same as remote one\n if (remoteChecksum === localChecksum) {\n try {\n echo(6)(`${format.green('✓')} File skipped: ${format.dim(file.path)}`)\n } catch (err) {\n error(err)\n }\n } else {\n try {\n singleFile = await session.connection.hosting.updateFile(this.name, fileToUpdate.id, payload)\n echo(6)(`${format.green('✓')} File updated: ${format.dim(file.path)}`)\n } catch (err) {\n echo(`Error while syncing (updating) ${file.path}`)\n debug(err.response.data)\n }\n }\n } else {\n // Adding (first upload) file\n try {\n singleFile = await session.connection.hosting.uploadFile(this.name, payload)\n echo(6)(`${format.green('✓')} File added: ${format.dim(file.path)}`)\n } catch (err) {\n echo(`Error while syncing (creating) ${file.path}`)\n debug(err.response.data)\n }\n }\n\n return singleFile\n }", "title": "" }, { "docid": "e2dfe2e47650f78338811285274dac86", "score": "0.4961242", "text": "function onAfterAddingFile(fileItem) {\r\n // if ($window.FileReader) {\r\n // var fileReader = new FileReader();\r\n // fileReader.readAsDataURL(fileItem._file);\r\n\r\n // fileReader.onload = function (fileReaderEvent) {\r\n // $timeout(function() {\r\n // vm.dataset.datasetURL = fileReaderEvent.target.result;\r\n // }, 0);\r\n // };\r\n // }\r\n }", "title": "" }, { "docid": "9b95a15167b5825a05455743844fb944", "score": "0.4942618", "text": "get remote() {\n return /^(?:http|https):\\/\\//g.test(this.songFolder);\n }", "title": "" }, { "docid": "503566f0204443838cb86824c06a6ca7", "score": "0.49292135", "text": "addFile(file) {\n console.log(\"File added, sending to all peers\", file);\n this.files.push(file);\n this.peerComm.sendToAllConnectedPeers(this.getDataForPeer(this.files));\n this.notifyUpdatedFiles(this.files);\n }", "title": "" }, { "docid": "49e554a05eb1c9a70338f3c17afdff40", "score": "0.49269718", "text": "function remoteStreamCallback(e) \n {\n scope.remoteStream = e.stream;\n if(scope.onRemoteStream)\n {\n scope.onRemoteStream(scope.remoteStream);\n }\n }", "title": "" }, { "docid": "90f1ea51cdb2847458ef12f55ae57869", "score": "0.4921008", "text": "async function handleLocalFile() {\n let fileLocation = course.info.bannerDashboardImagesFileLocation;\n\n if (!fileLocation) {\n course.error('fileLocation property of bannerDashboardImages property is not set');\n return;\n }\n\n let data = await retrieveCourse(course.info.canvasOU);\n\n if (TESTING) data[0].course_code = 'McGrath 101';\n\n let results = await uploader.beginUpload(data, false, true, fileLocation);\n\n course.log('Dashboard and homeImage Banner Child Module', {\n type: 'local',\n course_name: course.info.courseName,\n success: (results.badCourses.length < 1 ? true : false)\n });\n }", "title": "" }, { "docid": "a455f2b49f17dc8e22319ffaf7d10758", "score": "0.49015608", "text": "function serveRemotizeFile(req, res, next) {\n bodyParserJson(req, res, () => {\n if (req.body && req.body.file && req.body.file.id && typeof req.body.file.id === 'number' && req.body.file.name && typeof req.body.file.name === 'string') {\n const id = String(req.body.file.id);\n const rs = fs.createReadStream(path.join(fsPath, id));\n rs.on('error', err => {\n res.status(500);\n res.json({\n error: err.stack,\n });\n });\n const proxyReq = https.request({\n method: 'PUT',\n host: 'my-site.zeovr.io',\n path: `/files/${id}`,\n });\n proxyReq.on('error', err => {\n res.status(500);\n res.json({\n error: err.stack,\n });\n });\n proxyReq.on('finish', () => {\n res.json({});\n });\n rs.pipe(proxyReq);\n } else {\n res.status(400);\n res.json({\n error: new Error('invalid arguments').stack,\n });\n }\n });\n }", "title": "" }, { "docid": "d87c3165f801d079b741f3c9cb619eeb", "score": "0.48983172", "text": "function onAfterAddingFile(fileItem) {\n if ($window.FileReader) {\n var fileReader = new FileReader();\n fileReader.readAsDataURL(fileItem._file);\n\n fileReader.onload = function (fileReaderEvent) {\n $timeout(function () {\n vm.imageURL = fileReaderEvent.target.result;\n }, 0);\n };\n }\n }", "title": "" }, { "docid": "d87c3165f801d079b741f3c9cb619eeb", "score": "0.48983172", "text": "function onAfterAddingFile(fileItem) {\n if ($window.FileReader) {\n var fileReader = new FileReader();\n fileReader.readAsDataURL(fileItem._file);\n\n fileReader.onload = function (fileReaderEvent) {\n $timeout(function () {\n vm.imageURL = fileReaderEvent.target.result;\n }, 0);\n };\n }\n }", "title": "" }, { "docid": "a0aedc84c84380eb3d5a90cbc1ef9d0c", "score": "0.48678306", "text": "function serveFile(filePath){\n\t\tvar baseName,\n\t\t\tresourcePath;\n\n\t\t// Skip if this if the file is already a capable of being served by a browser\n\t\tif(~filePath.indexOf('://')) return filePath;\n\t\t\n\t\tfilePath = path.resolve(filePath);\n\t\tresourcePath = \"s\"+ (uid++) + \"_\" + path.basename(filePath);\n\t\tgroupResources[resourcePath] = filePath;\n\t\tself.debug('[HTTP Server] Serving ' + filePath + \" as \" + resourcePath + \"\\n\");\n\n\t\treturn groupUrl + resourcePath;\n\t}", "title": "" }, { "docid": "47c74e437123230a622bae72c5dadd0d", "score": "0.4860621", "text": "function addToCache(file)\n{\n var path = __dirname + '/public/' + file;\n fs.readFile( path,\n function( err, data ) {\n if( err ) {\n throw err;\n }\n\n if (!cache['/'+file])\n {\n fs.watch(path, function(e) {\n if (e === 'change') {\n console.log(\"Reloading file \", path);\n addToCache(file);\n }\n });\n }\n\n cache['/'+file] = { data: data, type: mime.lookup(path) };\n });\n}", "title": "" }, { "docid": "ae5a557d5b0b0ae30d9beb800b06243d", "score": "0.48595318", "text": "static remoteUpload(url, process){\n console.log(\"Remote downloading\", url, process);\n \n if (!/^https?:/.test(url)){\n throw new Meteor.Error(\"Wrong url!\");\n }\n\n var originalName = url.replace(/.*\\//, '').replace(/\\?.*/, '') || process,\n extension = /\\./.test(originalName) ? originalName.replace(/.*\\./, '') : 'jpg',\n hash = md5(url),\n fileName = hash + '.' + extension,\n filePath = '/' + fileName,\n realFilePath = config.media.uploadPath + filePath;\n\n var existingFile = UploadedFile.findOne({_id: hash});\n if (existingFile) {\n return existingFile;\n }\n FileStorage.download(url, realFilePath);\n var stats = fs.statSync(realFilePath);\n var file = {\n _id: hash,\n name: fileName,\n originalName: originalName,\n path: filePath,\n size: stats.size,\n type: mime.lookup(realFilePath),\n baseUrl: Meteor.absoluteUrl() + 'upload/',\n url: Meteor.absoluteUrl() + 'upload/' + fileName\n };\n\n UploadedFile.insert(file);\n\n MediaConverter.process(file, process);\n\n return file;\n }", "title": "" }, { "docid": "59624ad4d867672c7f05eee4b20eb54b", "score": "0.4850834", "text": "function fileAdded(file) {\n // Prepare the temp file data for media list\n var uploadingFile = {\n id : file.uniqueIdentifier,\n file: file,\n type: 'uploading'\n };\n\n // Append it to the media list\n vm.images.unshift(uploadingFile);\n }", "title": "" }, { "docid": "c1358c67ad6160e39e276ca12b75b954", "score": "0.485055", "text": "function handleLocalFile(filename) {\n updateStatus(\"Loading Asset Files...\");\n if (fileIndex == fileCount - 1) {\n updateStatus(\"Test Assets Loaded\");\n filesLoaded = true;\n }\n // Remove unexpected newline characters (i.e. Windows)\n var filePath = filename.replace(/\\r?\\n|\\r/g,\"\");\n console.log(\"Loading local file: \" + filePath);\n var localFileURL = chrome.extension.getURL(filePath);\n // Create file only if it doesn't already exist\n fileSystem.root.getFile(filePath, { create: false },\n function () {\n // File already exists so do nothing\n console.log(\"File already exists\");\n // Increment index and proceed onto next file\n fileIndex = fileIndex + 1\n if (fileIndex < fileCount) {\n handleLocalFile(fileList[fileIndex]);\n } else {\n // All files have been loaded\n updateStatus(\"Test Assets Loaded\");\n filesLoaded = true;\n }\n }, function () {\n // Download and save the file to filePath\n downloadFile(localFileURL, function (blob) {\n console.log(\"File download successful\");\n saveFile(blob, filePath);\n });\n });\n}", "title": "" }, { "docid": "da946ae671268c50f013472b77a43d72", "score": "0.48401934", "text": "function onFinishLoad() {\n var path = app.getDataPath();\n winston.info(\"sending path to client\", path);\n mainWindow.webContents.send('config-file-location', path);\n}", "title": "" }, { "docid": "ad87e0b0ce3eaa08ad114fb80d25542a", "score": "0.4832246", "text": "static setFileDest(dest) {\n if (!Server.locked) {\n serverDebugger('Setting a new destination for files: %s', dest);\n server_container_1.ServerContainer.get().fileDest = dest;\n }\n }", "title": "" }, { "docid": "60f97f51026b80566d0fec120b1f7bf5", "score": "0.48025924", "text": "function NodeFsHandler() {}", "title": "" }, { "docid": "60f97f51026b80566d0fec120b1f7bf5", "score": "0.48025924", "text": "function NodeFsHandler() {}", "title": "" }, { "docid": "00dd89953750312828baad553824f324", "score": "0.47940356", "text": "getRemoteData(file, template, presentation) {\n var xhr = new XMLHttpRequest();\n \n xhr.responseType = \"text\";\n \n xhr.addEventListener(\"load\", function() {\n this.presentation = presentation;\n this._jsonLoaded(xhr.responseText, template);\n }.bind(this), false);\n \n xhr.open(\"GET\", file, true);\n xhr.send();\n }", "title": "" }, { "docid": "2312b32033125c5a45a8588e61856c1f", "score": "0.47887385", "text": "_finalizeFileUpload(upload, file) {\n fetch(\"/uploads/\" + upload.id, {\n credentials: 'same-origin',\n method: 'put',\n headers: {\n 'Accept': 'application/json',\n 'X-CSRF-Token': window._csrf.token\n },\n body: JSON.stringify({ finished: true })\n }).then((response) => {\n response.json().then((json) => {\n if (!response.ok) {\n this.options.onError(new AssetUploaderError(json.error));\n } else {\n // Yay! File all uploaded and ready to show :)\n this.options.onAssetUploaded(file, json.url);\n }\n });\n });\n }", "title": "" }, { "docid": "2081ab055cb6177940fe67e558b15dc0", "score": "0.47873804", "text": "function handleUpload(event) {\n setFile(event.target.files[0]);\n \n // Add code here to upload file to server\n // ...\n }", "title": "" }, { "docid": "943ff41b63ea3f52d5f5aa8d8856782b", "score": "0.478046", "text": "function onRemoteStreamAdded(event) {\n console.log('Added remote stream')\n remoteVideo.src = window.webkitURL.createObjectURL(event.stream)\n }", "title": "" }, { "docid": "7c3eecc29fd7a3531a6b15aa5f249278", "score": "0.47798744", "text": "uploadResource (itemId, owner, file, filename, replace = false, portalOpts) {\n let action = this.addResource.bind(this);\n if (replace) {\n action = this.updateResource.bind(this);\n }\n return action(itemId, owner, filename, file, portalOpts);\n }", "title": "" }, { "docid": "d55b86f66432bea8780e50430f473115", "score": "0.47790718", "text": "_initTransfersWatcher() {\n const _fileTransfersWatcher = Looper.create({\n immediate: true,\n interval: SLOW_POLLING_TIME,\n });\n this.set('_fileTransfersWatcher', _fileTransfersWatcher);\n _fileTransfersWatcher.on('tick', () => {\n safeExec(this, '_updateFileTransfers');\n });\n }", "title": "" }, { "docid": "19161ab343ef766fa16546aee0eaf39c", "score": "0.4772509", "text": "function onResolveSuccess(dir) {\n console.log(filename + \" fileEntry.name \", dir); \n dir.getFile(filename, { create: true }, function (file) {\n console.log(\"got the file\", file);\n logOb = file; \n writeLog(logOb, content, logcallback);\n }, fail);\n\n }", "title": "" }, { "docid": "5a48a5f63ff7f383e9e1dca594d6d389", "score": "0.47682917", "text": "function onDrain() {\n\t\t\tdebug( 'Loading a file...' );\n\t\t\trepl.load( fpath, clbk );\n\t\t}", "title": "" }, { "docid": "292a413ae85c3b37c48ac757ef361eb8", "score": "0.47678268", "text": "set setOriginFileType(originFileType) {\n this.originFileType = originFileType\n }", "title": "" }, { "docid": "db18c55059a86c237913f03985c06e86", "score": "0.4763747", "text": "function onFileCopied(err, storedFile) {\n\n if (err) {\n return doneCopyingFile(err);\n }\n\n doneCopyingFile(null, storedFile);\n }", "title": "" }, { "docid": "ef5338bacb7f20a22e28eef459fc2393", "score": "0.47521883", "text": "function notifyLivereload(event) {\n\n // `gulp.watch()` events provide an absolute path\n // so we need to make it relative to the server root\n var fileName = path.relative(SERVER_ROOT, event.path);\n\n lr.changed({\n body: {\n files: [fileName]\n }\n });\n}", "title": "" }, { "docid": "4b74ae7ab01009d43b7e5df479b71956", "score": "0.47514457", "text": "function file_serve (req, res) {\n var file_handle = req.params.filename;\n if (typeof file_handle !== 'undefined' && file_handle !== null) {\n res.contentType(content_types[file_handle.split('.')[1]]);\n if (req.path.match(/\\/images\\//)) {\n file_handle = 'images/' + file_handle;\n }\n res.sendfile(file_handle);\n console.log('Serving: ' + file_handle);\n } else {\n console.log('Error: no filename specified.');\n res.send(400);\n }\n}", "title": "" }, { "docid": "c2b55d2b1a4c7dfe2f0e5406d3b630e1", "score": "0.47493646", "text": "function syncWithServer(){\n \n}", "title": "" }, { "docid": "1dc4045bced96ba119665f28c6eba9ee", "score": "0.47477242", "text": "register() {\n this.observer.add(this.handler);\n }", "title": "" }, { "docid": "ae84a65c0848bcac6fbe9c21a9db8a30", "score": "0.47415447", "text": "_createWatcher() {\n const _watcher = Looper.create({\n immediate: true,\n });\n _watcher.on('tick', () => safeExec(this, 'fetch'));\n\n this.set('_watcher', _watcher);\n }", "title": "" }, { "docid": "a29c137716066ea8a7b77710bef29ac6", "score": "0.4739431", "text": "function OnFileEntry(file) {\n var reader = new FileReader();\n reader.onloadend = function (evt) {\n\n var image = evt.target.result;\n d.resolve(image)\n\n };\n reader.readAsDataURL(file);\n }", "title": "" }, { "docid": "3b6a80fa880c78415a0779fd61252cd3", "score": "0.47383732", "text": "async init() {\n // Early Exit: User opted out of this plugin\n if (!replaceExternalLinkProtocol.enabled) return;\n // Early Exit: File type not allowed\n const allowed = Util.isAllowedType(this.opts);\n if (!allowed) return;\n \n // START LOGGING\n this.startLog();\n\n // Destructure options\n const { file } = this;\n\n // Make source traversable with JSDOM\n let dom = Util.jsdom.dom({src: file.src});\n\n // Find <a>, <link>, and <script> tags\n const $link = dom.window.document.querySelectorAll('link');\n const $links = dom.window.document.querySelectorAll('a');\n const $script = dom.window.document.querySelectorAll('script');\n\n // Add `http://` to qualifying a tags\n // Replace leading `//` to qualifying tags\n if ($link) $link.forEach(el => this.replaceMissingProtocol({file, el}));\n if ($links) $links.forEach(el => this.replaceMissingProtocol({file, el}));\n if ($script) $script.forEach(el => this.replaceMissingProtocol({file, el}));\n \n // Store updated file source\n this.file.src = Util.setSrc({dom});\n\n // END LOGGING\n this.endLog();\n }", "title": "" }, { "docid": "e55ffae42ee367c2d786fdf1fce89b95", "score": "0.47370556", "text": "SOCKET_ONOPEN(state, event) {\n this.commit('downloads/downloadTaskOnOpen', event);\n }", "title": "" }, { "docid": "5eeaadc113b3d0643c29a85d3b55cb92", "score": "0.4735428", "text": "function FileSystem(base_url){\n\tEventEmitter.call(this);\n\tthis.base_url = base_url;\n}", "title": "" }, { "docid": "020bb0b9258de9a6c65f9f14f3dbd404", "score": "0.4727692", "text": "updatedFromServer() {}", "title": "" }, { "docid": "a9908e9530b34b3ee3fd9b5219db8060", "score": "0.47245926", "text": "constructor () {\n super()\n this.replaceSrc = function (src) {\n if (wfTorrent[path.basename(src)]) {\n this.wfSrc = wfTorrent[path.basename(src)]\n console.log('SUCCESSFUL RESET')\n } else {\n this.wfSrc = src\n console.log('UNSUCCESSFUL')\n }\n }\n }", "title": "" }, { "docid": "c0b92c894311a028fb27914ae50fcf82", "score": "0.4720258", "text": "store(filepath) {\n return new Promise((resolve) => {\n const url = `${CONFIG.ApiHost}api/image/upload`\n\n const resData = HTTP.file(url, filepath)\n\n resData.then((res) => {\n console.log(`store++${res}`)\n resolve(JSON.parse(res))\n })\n\n resData.catch((err) => {\n console.log(`store++${err}`)\n resolve(false)\n })\n })\n }", "title": "" }, { "docid": "0121032271164161f83f789838c5e1f2", "score": "0.47196934", "text": "_publishReady() {\n var fileURI = this.provenanceServer + this.runid + '_' + this.dataname\n var params = { exec: fileURI, endpoint: this.endpointFuseki };\n this.$.getRemoteURL.params = params\n this.$.getRemoteURL.generateRequest();\n }", "title": "" }, { "docid": "fa0a5f4f036836ef3e3aefcd9f195b29", "score": "0.47066823", "text": "onAddStream(event) {\n if (!event) {\n return;\n }\n this.source.remote = URL.createObjectURL(event.stream);\n }", "title": "" }, { "docid": "0b6552f6776034c3e149d591e96c0f4f", "score": "0.47022462", "text": "set(file) {\n this.cache.set(file.path, file);\n }", "title": "" }, { "docid": "a4f59053e579109d8beeb5ad44b44b6c", "score": "0.47012964", "text": "function emitAddFileReq(){\n var id = \"#cmInputAddFile\";\n var action = \"file\";\n if (!isDriver || cmActionLocks[action] || !cmNameValidation(id)) return;\n cmActionLocks[action] = true; //lock the action\n\n socket.emit('context_menu_clicked',\n {\n key: action,\n relPath: cmRelPath,\n user: username,\n room: roomname,\n name: $(id).val(),\n text: editor.getSession().getValue(),\n activePath: getActiveFolderPath()\n });\n}", "title": "" }, { "docid": "501daaa177b301b5bc7135195ba6b66e", "score": "0.46988592", "text": "function fetch(filename, weak) {\n filename = getBundledFileName(filename) || filename;\n\n // Skip if already loaded / attempted\n if (self.files.indexOf(filename) > -1)\n return;\n self.files.push(filename);\n\n // Shortcut bundled definitions\n if (filename in common) {\n if (sync)\n process(filename, common[filename]);\n else {\n ++queued;\n setTimeout(function() {\n --queued;\n process(filename, common[filename]);\n });\n }\n return;\n }\n\n // Otherwise fetch from disk or network\n if (sync) {\n var source;\n try {\n source = util.fs.readFileSync(filename).toString(\"utf8\");\n } catch (err) {\n if (!weak)\n finish(err);\n return;\n }\n process(filename, source);\n } else {\n ++queued;\n self.fetch(filename, function(err, source) {\n --queued;\n /* istanbul ignore if */\n if (!callback)\n return; // terminated meanwhile\n if (err) {\n /* istanbul ignore else */\n if (!weak)\n finish(err);\n else if (!queued) // can't be covered reliably\n finish(null, self);\n return;\n }\n process(filename, source);\n });\n }\n }", "title": "" }, { "docid": "9f671e796d56f6721a8e64c37f1ea188", "score": "0.4698648", "text": "function initRemoteData() {\n setupRemoteWatches();\n $rootScope.$on('oTable::filtering', self.fetch);\n // $rootScope.$on('oTable::sorting', self.fetch);\n }", "title": "" }, { "docid": "b090db861e2848fa0352954010aeb547", "score": "0.4698626", "text": "function registerPath(path) {\n socket.emit(\"registerPath\", path);\n} // Unregister the former path", "title": "" }, { "docid": "80ed0cf8b694b41c7797719cfdf4b3f0", "score": "0.46956226", "text": "function handleUpload(event) {\n setFile({file:event.target.files[0], confirmUpload: false});\n // Add code here to upload file to server\n // ...\n }", "title": "" }, { "docid": "6e71bc0581f80408e9be73ffbee290de", "score": "0.4694933", "text": "function refresh() {\n browse($('div#filemanager').data('path'));\n}", "title": "" }, { "docid": "25bd039a894d43d6a1cd20177c1cf3c6", "score": "0.4679765", "text": "onMyFilesTap_() {\n this.browserProxy_.openMyFiles();\n }", "title": "" }, { "docid": "e79ab65e83715b3e2094928d02d966fd", "score": "0.46795753", "text": "function onRealRead(err, contents) {\n if (!err && cacheLifetime) {\n requestCache[filename] = contents;\n setTimeout(function () {\n delete requestCache[filename];\n }, cacheLifetime);\n }\n callback(err, contents);\n }", "title": "" }, { "docid": "76dd055f0d5e9332d969bbe2a6e3c5fe", "score": "0.4679147", "text": "function fetch(filename, weak) {\r\n\r\n // Strip path if this file references a bundled definition\r\n var idx = filename.lastIndexOf(\"google/protobuf/\");\r\n if (idx > -1) {\r\n var altname = filename.substring(idx);\r\n if (altname in common)\r\n filename = altname;\r\n }\r\n\r\n // Skip if already loaded / attempted\r\n if (self.files.indexOf(filename) > -1)\r\n return;\r\n self.files.push(filename);\r\n\r\n // Shortcut bundled definitions\r\n if (filename in common) {\r\n if (sync)\r\n process(filename, common[filename]);\r\n else {\r\n ++queued;\r\n setTimeout(function() {\r\n --queued;\r\n process(filename, common[filename]);\r\n });\r\n }\r\n return;\r\n }\r\n\r\n // Otherwise fetch from disk or network\r\n if (sync) {\r\n var source;\r\n try {\r\n source = util.fs.readFileSync(filename).toString(\"utf8\");\r\n } catch (err) {\r\n if (!weak)\r\n finish(err);\r\n return;\r\n }\r\n process(filename, source);\r\n } else {\r\n ++queued;\r\n util.fetch(filename, function(err, source) {\r\n --queued;\r\n /* istanbul ignore if */\r\n if (!callback)\r\n return; // terminated meanwhile\r\n if (err) {\r\n /* istanbul ignore else */\r\n if (!weak)\r\n finish(err);\r\n else if (!queued) // can't be covered reliably\r\n finish(null, self);\r\n return;\r\n }\r\n process(filename, source);\r\n });\r\n }\r\n }", "title": "" }, { "docid": "76dd055f0d5e9332d969bbe2a6e3c5fe", "score": "0.4679147", "text": "function fetch(filename, weak) {\r\n\r\n // Strip path if this file references a bundled definition\r\n var idx = filename.lastIndexOf(\"google/protobuf/\");\r\n if (idx > -1) {\r\n var altname = filename.substring(idx);\r\n if (altname in common)\r\n filename = altname;\r\n }\r\n\r\n // Skip if already loaded / attempted\r\n if (self.files.indexOf(filename) > -1)\r\n return;\r\n self.files.push(filename);\r\n\r\n // Shortcut bundled definitions\r\n if (filename in common) {\r\n if (sync)\r\n process(filename, common[filename]);\r\n else {\r\n ++queued;\r\n setTimeout(function() {\r\n --queued;\r\n process(filename, common[filename]);\r\n });\r\n }\r\n return;\r\n }\r\n\r\n // Otherwise fetch from disk or network\r\n if (sync) {\r\n var source;\r\n try {\r\n source = util.fs.readFileSync(filename).toString(\"utf8\");\r\n } catch (err) {\r\n if (!weak)\r\n finish(err);\r\n return;\r\n }\r\n process(filename, source);\r\n } else {\r\n ++queued;\r\n util.fetch(filename, function(err, source) {\r\n --queued;\r\n /* istanbul ignore if */\r\n if (!callback)\r\n return; // terminated meanwhile\r\n if (err) {\r\n /* istanbul ignore else */\r\n if (!weak)\r\n finish(err);\r\n else if (!queued) // can't be covered reliably\r\n finish(null, self);\r\n return;\r\n }\r\n process(filename, source);\r\n });\r\n }\r\n }", "title": "" }, { "docid": "76dd055f0d5e9332d969bbe2a6e3c5fe", "score": "0.4679147", "text": "function fetch(filename, weak) {\r\n\r\n // Strip path if this file references a bundled definition\r\n var idx = filename.lastIndexOf(\"google/protobuf/\");\r\n if (idx > -1) {\r\n var altname = filename.substring(idx);\r\n if (altname in common)\r\n filename = altname;\r\n }\r\n\r\n // Skip if already loaded / attempted\r\n if (self.files.indexOf(filename) > -1)\r\n return;\r\n self.files.push(filename);\r\n\r\n // Shortcut bundled definitions\r\n if (filename in common) {\r\n if (sync)\r\n process(filename, common[filename]);\r\n else {\r\n ++queued;\r\n setTimeout(function() {\r\n --queued;\r\n process(filename, common[filename]);\r\n });\r\n }\r\n return;\r\n }\r\n\r\n // Otherwise fetch from disk or network\r\n if (sync) {\r\n var source;\r\n try {\r\n source = util.fs.readFileSync(filename).toString(\"utf8\");\r\n } catch (err) {\r\n if (!weak)\r\n finish(err);\r\n return;\r\n }\r\n process(filename, source);\r\n } else {\r\n ++queued;\r\n util.fetch(filename, function(err, source) {\r\n --queued;\r\n /* istanbul ignore if */\r\n if (!callback)\r\n return; // terminated meanwhile\r\n if (err) {\r\n /* istanbul ignore else */\r\n if (!weak)\r\n finish(err);\r\n else if (!queued) // can't be covered reliably\r\n finish(null, self);\r\n return;\r\n }\r\n process(filename, source);\r\n });\r\n }\r\n }", "title": "" }, { "docid": "76dd055f0d5e9332d969bbe2a6e3c5fe", "score": "0.4679147", "text": "function fetch(filename, weak) {\r\n\r\n // Strip path if this file references a bundled definition\r\n var idx = filename.lastIndexOf(\"google/protobuf/\");\r\n if (idx > -1) {\r\n var altname = filename.substring(idx);\r\n if (altname in common)\r\n filename = altname;\r\n }\r\n\r\n // Skip if already loaded / attempted\r\n if (self.files.indexOf(filename) > -1)\r\n return;\r\n self.files.push(filename);\r\n\r\n // Shortcut bundled definitions\r\n if (filename in common) {\r\n if (sync)\r\n process(filename, common[filename]);\r\n else {\r\n ++queued;\r\n setTimeout(function() {\r\n --queued;\r\n process(filename, common[filename]);\r\n });\r\n }\r\n return;\r\n }\r\n\r\n // Otherwise fetch from disk or network\r\n if (sync) {\r\n var source;\r\n try {\r\n source = util.fs.readFileSync(filename).toString(\"utf8\");\r\n } catch (err) {\r\n if (!weak)\r\n finish(err);\r\n return;\r\n }\r\n process(filename, source);\r\n } else {\r\n ++queued;\r\n util.fetch(filename, function(err, source) {\r\n --queued;\r\n /* istanbul ignore if */\r\n if (!callback)\r\n return; // terminated meanwhile\r\n if (err) {\r\n /* istanbul ignore else */\r\n if (!weak)\r\n finish(err);\r\n else if (!queued) // can't be covered reliably\r\n finish(null, self);\r\n return;\r\n }\r\n process(filename, source);\r\n });\r\n }\r\n }", "title": "" }, { "docid": "21311f437bf7f6f3377fdf5842991bc9", "score": "0.46787265", "text": "loadFromStorage() {\n let targetChannel = this.storageManager.get(\"target.channel\"),\n listenChannel = this.storageManager.get(\"target.listen\");\n\n if(targetChannel) {\n this.setTargetChannel(targetChannel, false, false);\n }\n\n if(listenChannel) {\n this.setListenChannel(listenChannel, false, false);\n }\n }", "title": "" }, { "docid": "e0ec76a32ea2cc5083b428f729c68d52", "score": "0.46722817", "text": "function onRemoteStreamAdded(event) {\n console.log(\"Added remote stream\");\n remotevid.src = window.URL.createObjectURL(event.stream);\n }", "title": "" }, { "docid": "017a4cff94d7911b425d6a78f0387e47", "score": "0.46674025", "text": "_initRequest() {\n const xhr = (this.xhr = new XMLHttpRequest());\n\n xhr.open('POST', md.global.FileStoreConfig.uploadHost, true);\n }", "title": "" }, { "docid": "0db3d874d3b17e96e17298017b6b19b1", "score": "0.46611354", "text": "onUpload() {\n // Assessing the image file and src\n if (this.myImage == '' || this.image == '') {\n alert(\"Please enter a photo\");\n return;\n }\n let townName = this.$route.params.name;\n let userName = this.$root.user.username\n let type = \"image\";\n\n //Using the FormData object to store the file data into our request\n let formData = new FormData();\n \n //Calling the module \n let image = new window.exports.Image(-1, townName, type, userName);\n let json = JSON.parse(image.toJSON());\n\n formData.append('file', this.myImage);\n\n //Appending image data object to the other useful data \n formData.append('data', JSON.stringify(json));\n\n fetch('/addImage/' + townName, {\n method: 'POST',\n headers: new Headers({\n 'Accept': 'application/json, */*'\n }),\n body: formData\n })\n .then(res => {\n //Redisplay the data accordingly\n this.showImages();\n this.setUpEvents();\n formData = '';\n this.image = '';\n this.myImage = '';\n return res.json();\n })\n .catch(err => console.log(\"Error: \" + err));\n }", "title": "" }, { "docid": "44af4db04298f1961db7b2cee392964b", "score": "0.46609476", "text": "fileAdded(file, parentId) {\n if (!this.get('locked')) {\n // Ember.run is used because this fun is invoked from ResumableJS event\n Ember.run(() => this.set('locked', true));\n }\n Ember.run(() => {\n parentId = parentId || this.get('lockedDir.id');\n this.addUploadingFileInfo(file, parentId);\n this.get('resumable').upload();\n });\n }", "title": "" }, { "docid": "9ba15ee68983d64f43a6b4645be33163", "score": "0.46592093", "text": "updateRemoteFile(fileContents) {\n this.sendRequest('updateRemoteFile', {\n contents: fileContents\n })\n .then((updateResp) => {\n return {\n ok: true,\n }\n })\n .catch((err) => {\n return {\n ok: false,\n }\n });\n }", "title": "" }, { "docid": "fc26735b2af38bf2861d9090b86113f0", "score": "0.46589097", "text": "function setupFileListener() {\n //setup drop zone for receiving dropped icons\n var dropZone = document.getElementById('drop_zone');\n dropZone.addEventListener('dragover', cancelEvent, false);\n dropZone.addEventListener('dragenter', handleDragEnter, false);\n dropZone.addEventListener('dragleave', handleDragExit, false);\n dropZone.addEventListener('drop', handleFileSelect, false);\n \n //when a file is uploaded, handle it\n document.getElementById('files').addEventListener('change', handleFileSelect, false);\n}", "title": "" }, { "docid": "d38dc6ba0c69acec807fd35f90182dbb", "score": "0.46562928", "text": "function loadHandler(theFile) {\n\n\t\treturn function(e) {\n\t\t\tvar newFile = document.createElement('div');\n\t\t\tvar picture = document.createElement('picture');\n\t\t\tvar img = document.createElement('div');\n\t\t\timg.style.backgroundImage = 'url(' + e.target.result + ')';\n\t\t\timg.title = escape(theFile.name);\n\t\t\timg.className = 'thumb';\n\n\t\t\tpicture.appendChild(img);\n\t\t\tnewFile.appendChild(picture);\n\t\t\tnewFile.className = 'file';\n\n\t\t\toutputTag.insertBefore(newFile, null);\n\t\t}\n\t}", "title": "" } ]
ecc2e02853e6defdad06edc4399ca44b
REGISTERD USERS GET REQUEST
[ { "docid": "c228636bc43111171864e3952b054b76", "score": "0.6858012", "text": "function registeredUser() {\n axios.get('https://virtserver.swaggerhub.com/v1b3m/Pelard-N/1.0.0/user/register?_limit=5',{ headers: {\"Authorization\" : `Bearer ${JWTToken}`}})\n .then(res=>showOutput(res.data))\n .catch(err=>console.log(err));\n}", "title": "" } ]
[ { "docid": "8ed019a152baedd9aa79069813bc6c82", "score": "0.7069633", "text": "function registerUser() {\n\t\t$http.post('http://localhost:3000/register', self.registerUserInfo)\n\t\t\t.then(function(response){\n\t\t\tcurr_user = response;\n\t\t\tconsole.log(response);\n\t\t\tgetUsers();\n\t\t});\n\t\tself.registerUserInfo = {};\n\t}", "title": "" }, { "docid": "6c94e7f7a16cbbe3e06f263a41dfb5f3", "score": "0.6830653", "text": "userRegistration(){\n let regUserName = document.querySelector(\"#regUserName\").value\n let regEmail = document.querySelector(\"#regEmail\").value\n let regPassword = document.querySelector(\"#regPassword\").value\n // let regConfirmPassword = document.querySelector(\"#regUserName\").value\n\n nomadData.connectToData({\n\n \"dataSet\" : \"users\",\n \"fetchType\" : \"POST\",\n \"dataBaseObject\" : {\n \"userName\": regUserName,\n \"email\": regEmail,\n \"password\": regPassword\n }\n }).then(\n nomadData.connectToData({\n \"dataSet\" : \"users\",\n \"fetchType\" : \"GET\",\n \"embedItem\" : `?userName=${regUserName}`\n }).then(user =>{\n console.log(user)\n user.forEach( x =>{\n sessionStorage.setItem(\"userId\", x.id)\n\n //hides NOMAD heading\n $(\".t-border\").hide()\n //hides the form\n $(\".form\").hide()\n //displays navigatin bar\n dashboard.createNavBar()\n let userId = sessionStorage.getItem(\"userId\")\n //console.log verifying that credentials match and user is logged in\n console.log(\"logged in as\" + \" \" + x.userName)\n console.log(\"your user ID is: \" + userId)\n })\n }))\n }", "title": "" }, { "docid": "ab67ffdf5790213e28cfbcba1d1a4d4b", "score": "0.6674904", "text": "async register(userData) {\n return server.post(\"/users/register\", userData).then(function (response) {\n return response;\n\n }).catch(function (error) {\n return error.response;\n })\n }", "title": "" }, { "docid": "8a5f555e65d82000f351292932bd6546", "score": "0.6671655", "text": "function user_register(response, postData, cookies, query){\n console.log('User registration page');\n var mysql_driver = new sql_driver();\n\n if(postData == '' ){\n //GET Request\n var form_arr = Array();\n mysql_driver.adm_insert('1415_members', Array('id'),'/user/register',function(err, resp){\n var gen = new blazingnode.render('/modules/common/user', response);\n gen.newPage('/modules/common/header');\n gen.addVar('res_name', cookies['res_name']);\n gen.newPage('/modules/common/user');\n gen.addVar('user_content', '%b% /modules/common/user-register %b%');\n gen.newPage('/modules/common/user-register');\n gen.addVar('form_res_new', resp);\n gen.generate();\n });\n }\n else{\n //POST Request\n //Login Request\n var postObj = querystring.parse(postData);\n //Check for the fields\n mysql_driver.validate_form('1415_members', Array('id'), postObj, function(err, resp){\n var msg = 'Request recieved';\n if(err!=null){\n console.log(err);\n msg = err;\n }else{\n //Insert the new user\n mysql_driver.insert(\n postObj\n ,'1415_members'\n ,function(err, resp){\n if(err){ msg = err}else{msg='user successfuly added';}\n \n var gen = new blazingnode.render('/modules/common/user', response);\n gen.newPage('/modules/common/header');\n gen.addVar('res_name', cookies['res_name']);\n gen.newPage('/modules/common/user');\n gen.addVar('user_content', '%b% /modules/common/user-register %b%');\n gen.newPage('/modules/common/user-register');\n gen.addVar('form_res_new', '%b% /modules/common/user-register-success %b%');\n gen.generate();\n });\n \n }\n \n var gen = new blazingnode.render('/modules/common/user', response);\n gen.newPage('/modules/common/header');\n gen.addVar('res_name', cookies['res_name']);\n gen.newPage('/modules/common/user');\n gen.addVar('user_content', '%b% /modules/common/user-register %b%');\n gen.newPage('/modules/common/user-register');\n gen.addVar('form_res_new', msg);\n gen.generate();\n \n });\n }\n}", "title": "" }, { "docid": "9be9bcd984fab2f95fc66f6a66bc9ba3", "score": "0.6625104", "text": "function regnewuser(){\n\n\t\t\t\tvar dataset = {\n\t\t\t\t\t\"fbid\":\tmyinfo.fbid,\n\t\t\t\t\t\"fname\": myinfo.fname,\n\t\t\t\t\t\"lname\": myinfo.lname,\n\t\t\t\t\t\"add1\": myinfo.add1,\n\t\t\t\t\t\"city\": myinfo.city,\n\t\t\t\t\t\"state\": myinfo.state,\t\n\t\t\t\t\t\"zip\": myinfo.zip,\n\t\t\t\t\t\"workadd1\": myinfo.workadd1,\n\t\t\t\t\t\"workcity\": myinfo.workcity,\n\t\t\t\t\t\"workstate\": myinfo.workstate,\t\n\t\t\t\t\t\"workzip\": myinfo.workzip,\n\t\t\t\t\t\"email\": myinfo.email,\n\t\t\t\t\t\"homelatlong\": myinfo.homelatlong,\n\t\t\t\t\t\"worklatlong\": myinfo.worklatlong,\n\t\t\t\t\t\"profileblob\": myinfo.profileblob,\n\t\t\t\t\t\"company\": myinfo.company,\n\t\t\t\t\t\"timezone\": \"PDT\",\n\t\t\t\t\t\"preference\": \"EMAIL\",\n\t\t\t\t\t\"leavetime\": \"09:00:00\",\n\t\t\t\t\t\"hometime\": \"17:00:00\",\n\t\t\t\t\t\"notificationmethod\": \"EMAIL\",\n\t\t\t\t\t\"ridereminders\": \"1\",\n\t\t\t\t\t\"referer\":referrer,\n\t\t\t\t\t\"campaign\": info.camp\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\tvar jsondataset = JSON.stringify(dataset);\n\t\t\turl = \"/ridezu/api/v/1/users\";\n\t\t var request=$.ajax({\n url: url,\n type: \"POST\",\n dataType: \"json\",\n data: jsondataset,\n success: function() {\n \t},\n error: function() {\n \treporterror(url);\n \talert(\"It looks like you are already registered. Please Login.\");\n \tlocalStorage.removeItem('fbid');\n \tlocalStorage.removeItem('seckey');\n \tdocument.location.reload(true);\n \t},\n beforeSend: setHeader\n \t}); \n \t\n request.done(function(msg) {\n \t\t\t\tlocalStorage.seckey=msg.seckey;\n \t\t\t\tlocalStorage.fbid=msg.fbid;\n\n\t\t\t\tmyinfo=msg;\n\t\t\t\t\n\t\t\t\t//update miles & co2 if possible\n\t\t\t\tif(myinfo.destlatlong && myinfo.originlatlong){\n\t\t\t\t\tcalculateDistance();\n\t\t\t\t\t}\n\t\t\t //window.optimizely.push(['trackEvent', 'reguser']);\n\t\t\t\twelcome(\"newuser\");\n\t\t\t\t}); \t \t\n \t\t}", "title": "" }, { "docid": "2659ad94b67e4e1b983060a4111fc6af", "score": "0.66202503", "text": "async register({ request, response }) {\n\n const { username, staffid, password, department, branch, mobile, email } = request.all()\n Logger.info(request.ip(), request.url(), request.all())\n const DLOG = new LoggerDaily\n const mess = []\n DLOG.handle({\n in: [\n {\n IP: request.ip(),\n datetime: Date.now()\n },\n request.all()\n ],\n do: [\n\n ],\n out: [\n\n ]\n })\n try {\n const res = await USERMAST.create({\n USER_ID: username,\n USER_NAME: username,\n US_PASSWORD: password,\n USER_STAFF_ID: staffid,\n USER_DEPT: department,\n USER_BRANCH: branch,\n MOBILE: mobile,\n EMAIL_ADDR: email\n })\n\n return response.json(res)\n } catch (e) {\n return response.json(e)\n }\n\n\n }", "title": "" }, { "docid": "7d6a25a95c8a924d2eb509c7a197b3f2", "score": "0.66141105", "text": "function sendAPIreq(){\r\n var xmlhttp = new XMLHttpRequest();\r\n xmlhttp.open('GET', 'https://api.scratch.mit.edu/users/' + username, true);\r\n xmlhttp.send();\r\n xmlhttp.onreadystatechange = function() {\r\n if (xmlhttp.readyState === 4 && xmlhttp.status === 200) {\r\n var response = xmlhttp.responseText;\r\n getIcon(response);\r\n getID(response);\r\n followers(response);\r\n getJoinDate(response);\r\n }\r\n if (xmlhttp.readyState === 4 && xmlhttp.status === 404) {\r\n newUser();\r\n }\r\n };\r\n}", "title": "" }, { "docid": "5d93be9af495c980d7d1c4426aaf0262", "score": "0.6602644", "text": "function sendAPIreq(){\r\n var xmlhttp = new XMLHttpRequest();\r\n xmlhttp.open('GET', 'https://cors.io/?https://api.scratch.mit.edu/users/' + username + \"?\" + Math.floor(Date.now() / 1000), true);\r\n xmlhttp.send();\r\n xmlhttp.onreadystatechange = function() {\r\n if (xmlhttp.readyState === 4 && xmlhttp.status === 200) {\r\n var response = xmlhttp.responseText;\r\n getIcon(response);\r\n getID(response);\r\n getJoinDate(response);\r\n getCountryFlag(response);\r\n }\r\n if (xmlhttp.readyState === 4 && xmlhttp.status === 404) {\r\n newUser();\r\n }\r\n };\r\n}", "title": "" }, { "docid": "beacebcca94b27d575015afdcff72073", "score": "0.64918244", "text": "function requestUserMatch() {\n\n\t \t$.ajax({\n\t \t\ttype: 'GET',\n\t \t\turl: '/api/users',\n\t \t\tcontentType:\"application/json\",\n\t \t\tsuccess: successDataUser\n\t \t});\n\t }", "title": "" }, { "docid": "ab5639a11424e2c8341bf337a95419e8", "score": "0.6488659", "text": "function registerUser(access_token) {\n // Get user info\n console.log(\"access token \", access_token);\n request(\n {\n headers: { \"content-type\": \"application/x-www-form-urlencoded\" },\n url: \"https://api.spotify.com/v1/me\",\n method: \"GET\",\n headers: {\n Authorization: \"Bearer \" + access_token\n }\n },\n (err, res, body) => {\n if (err) {\n console.log(\"Response error\");\n } else {\n const info = JSON.parse(body);\n // console.log('Response ', info);\n // Get current date and time\n const now = new Date();\n users.push(\n new User(\n nextUserId,\n info.display_name,\n info.id,\n users\n .map(user => {\n return user.role;\n })\n .includes(\"host\")\n ? \"guest\"\n : \"host\",\n now\n )\n );\n nextUserId++;\n // console.log('Current users', users);\n }\n }\n );\n}", "title": "" }, { "docid": "f8a33603631894bf16dc8e74bedd6e23", "score": "0.64679295", "text": "function requestUsersData() {\n\t\tvar request = new XMLHttpRequest();\n\t\trequest.open('GET', 'https://jsonplaceholder.typicode.com/users', true);\n\t\trequest.onreadystatechange = requestUsersDataCompleted;\n\t\trequest.send();\n\t}", "title": "" }, { "docid": "a840f3eda9cf0d7e7593400d8038fe06", "score": "0.6450256", "text": "function userRegister(req) {\n return userService.userRegister(req).then(result => {\n if (result === 1) {\n return userMapper.errorUserRegister()\n } else if (result) {\n return userMapper.successUserRegister(result);\n } else {\n return userMapper.errorUserRegister();\n }\n });\n}", "title": "" }, { "docid": "740768a785fcb7f97710b8184be74452", "score": "0.64356804", "text": "function getUser(){var e,t=new XMLHttpRequest;return t.open(\"POST\",path+\"getUser\",!1),t.setRequestHeader(\"X-Requested-With\",\"XMLHttpRequest\"),t.onload=function(){e=t.status>=200&&t.status<400?t.responseText:\"Exception\"},t.onerror=function(){e=\"Exception\"},t.send(null),e}", "title": "" }, { "docid": "b89d2dabd8cc65e156dbeb1008b9eb76", "score": "0.6434114", "text": "register(){\n const chemin = this.path + \"/register\";\n return this.postDataToServer(chemin);\n }", "title": "" }, { "docid": "61409f63de05851de8166e35421d99b1", "score": "0.64185774", "text": "function _checkRegistration() {\n\t \tprofileService.getUser().then(\n\t function (result) {\n\t _afterFetch(result);\n\t }\n\t );\n\t }", "title": "" }, { "docid": "04719a01df2ff880f7b59e90b713c0b6", "score": "0.64171016", "text": "function register() {\n var username = document.getElementById(\"usernameReg\").value;\n var password = document.getElementById(\"passwordReg\").value;\n var email = document.getElementById(\"emailReg\").value;\n var params = {\n \"username\": username,\n \"password\": md5(password),\n \"email\": email\n }\n\n var request = new XMLHttpRequest();\n request.open('POST', 'http://pure-brushlands-81405.herokuapp.com/users', true);\n request.setRequestHeader(\"Content-Type\", \"application/json;charset=UTF-8\");\n request.onload = function() {\n // Begin accessing JSON data here\n var data = JSON.parse(this.response)\n if (request.status >= 200 && request.status < 400) {\n $('#login').modal(\"hide\");\n $('#register').modal(\"hide\");\n var request2 = new XMLHttpRequest()\n request2.open('GET', 'http://pure-brushlands-81405.herokuapp.com/users/login/' + username + \",\" + md5(password), true)\n request2.onload = function() {\n var data = JSON.parse(this.response);\n if (request2.status >= 200 && request2.status < 400) {\n //we keep the user to know who is connected (and like that we can use it in the scoreboard)\n localStorage.setItem(\"user\", data.username);\n document.getElementById(\"loginBtn\").style.display = 'none';\n document.getElementById(\"logoutBtn\").style.display = 'block';\n } else {\n alert(\"Not right combination\");\n const errorMessage = document.createElement('marquee')\n errorMessage.textContent = `Gah, it's not working!`\n }\n }\n request2.send();\n } else {\n const errorMessage = document.createElement('marquee')\n errorMessage.textContent = `Gah, it's not working!`\n }\n }\n request.send(JSON.stringify(params));\n}", "title": "" }, { "docid": "405fa6d819e65fc732a9c3ca7ac19902", "score": "0.6385402", "text": "function doRegister() {\r\n let username = $(`[data-id=\"newUsername\"]`).val();\r\n let password = $(`[data-id=\"newPassword\"]`).val();\r\n let method = \"POST\";\r\n let url = baseurl + config.server.endpoints.register;\r\n\r\n let registrationParameters = {\r\n method,\r\n url,\r\n data: {\r\n username,\r\n password,\r\n },\r\n caller: \"doRegister\",\r\n }\r\n\r\n pingServer(registrationParameters);\r\n }", "title": "" }, { "docid": "af5319807a783af12be3a892f8be8580", "score": "0.6382524", "text": "static register(user_params) {\n return new Promise(async (resolve, reject) => {\n let res;\n try {\n res = await fetch(`${API_ROOT}/users`, {\n method: 'POST',\n headers: {\n Accept: 'application/json',\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify(user_params)\n });\n } catch (err) {\n return reject(err);\n }\n\n const token_json = await res.json();\n if (res.ok) {\n localStorage.setItem('floratoken', token_json.token);\n return resolve(true);\n }\n return reject(token_json.message);\n });\n }", "title": "" }, { "docid": "8be5acbc0ae0ee20953e3c0fbbfcc76a", "score": "0.6382522", "text": "function register (request, response){\n const name = request.body.name;\n const streetName = request.body.streetName;\n const streetNumber = request.body.streetNumber;\n const postalCode = request.body.postalCode;\n const city = request.body.city;\n const phone = request.body.phone;\n const email = request.body.email;\n var password = request.body.password;\n console.log(name, streetName, streetNumber, postalCode, city, phone, email, password);\n\n\n //Making sure that it is not possible to register the same email or phone number\n var form_valid = true;\n var responseText = \"\";\n pool.query(`SELECT * FROM users WHERE phone = $1`, [phone], function (error, results, fields) {\n if (results.rows.length > 0) {\n form_valid = false;\n responseText+='Mobilnummeret er allerede registreret\\n';\n }\n pool.query(`SELECT * FROM users WHERE email = $1`, [email], function (error, results, fields) {\n if (results.rows.length > 0) {\n form_valid = false;\n responseText+='Email-addressen er allerede registreret';\n }\n if(form_valid === false) {\n response.send(JSON.stringify(responseText));\n }\n\n //Creating a new customer by inserting into users table\n if (form_valid === true) {\n var userTypeId = 2;\n pool.query(`INSERT INTO users(\n usertypeid,\n userName, \n streetName,\n streetNumber,\n postalCode,\n city,\n phone,\n email,\n password)\n VALUES(\n $1, $2, $3, $4, $5, $6, $7, $8, crypt($9, gen_salt('bf')));\n `, [userTypeId, name, streetName, streetNumber, postalCode, city, phone, email, password]);\n request.body.ok = true;\n response.send(request.body);\n }\n });\n console.log(form_valid);\n });\n}", "title": "" }, { "docid": "8651a068b3f9927dbf76424152a72c71", "score": "0.6370346", "text": "function get_users() {\n document.body.className = 'vbox viewport waiting';\n\t var data = {};\n\t data[\"token\"] = localStorage.token;\n\t appserver_send(APP_ELOADUSERS, data, users_callback);\n }", "title": "" }, { "docid": "1f63ea5ea4f7b81c9a110d0d28e85aa1", "score": "0.6358529", "text": "async function addUser() { //register new user with unique name \n username = document.getElementById('username').value;\n let password = document.getElementById('pass').value;\n const res = await fetch('/players'); //get all the taken usernames\n const data = await res.json();\n let taken_usernames = Object.keys(data);\n if (taken_usernames.includes(username)) { //prevent same usernames\n alert('Username already exists');\n document.getElementById('public_msg').innerHTML = 'Choose another username!';\n } else {\n fetch(`/register/${username}`, { //post if username is unique\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({ content: password })\n })\n .then(res => res.text())\n .then(txt => alert(txt))\n\t\t\t.catch(err=>{console.log(err)})\n\t\tlogin();\n }\n}", "title": "" }, { "docid": "a3ef9c2a5e4aefb0640e97c3e153e398", "score": "0.6353527", "text": "doRegistration() {\n return this.fetchJSON(\n 'POST',\n '/auth/register',\n this.snakeCaseOAuthData({\n redirectURI: this.oauthOptions.redirectURI,\n clientName: this.oauthOptions.clientName,\n softwareID: this.oauthOptions.softwareID,\n clientKind: this.oauthOptions.clientKind,\n clientURI: this.oauthOptions.clientURI,\n logoURI: this.oauthOptions.logoURI,\n policyURI: this.oauthOptions.policyURI,\n softwareVersion: this.oauthOptions.softwareVersion,\n notificationPlatform: this.oauthOptions.notificationPlatform,\n notificationDeviceToken: this.oauthOptions.notificationDeviceToken\n })\n )\n }", "title": "" }, { "docid": "56673e3c90c18232756e30d73b841782", "score": "0.6341536", "text": "function userRegister(){\n var name = document.getElementById('id_regname');\n var apellidos = document.getElementById('id_reg2name');\n var mail = document.getElementById('id_regmail');\n var pass = document.getElementById('id_regpass');\n var pass2 = document.getElementById('id_regpass2');\n // if(validateRegister(name.value, apellidos.value, mail.value, pass.value, pass2.value)){\n var req = new XMLHttpRequest();\n req.open('POST', \"api/usuarios\", false);\n req.setRequestHeader(\"Content-type\",\"application/json\");\n req.onreadystatechange = callbackRegister(req);\n var json = {\n login: mail.value,\n password: pass2.value,\n nombre: name.value,\n apellidos: apellidos.value\n }\n var jsonString = JSON.stringify(json);\n req.send(jsonString);\n //}\n}", "title": "" }, { "docid": "db501c67cb49a16e16ff6591772d2e59", "score": "0.62872183", "text": "static async getUsers () {\n const url = 'accounts/all_users';\n\n try {\n const {result, resbody} = await getResponse_get(url)\n return {result, resbody}\n\n }catch(err){\n if (err) console.log('login error', err)\n }\n }", "title": "" }, { "docid": "9fada9745ca449ce7e375fb4c35a7572", "score": "0.6279356", "text": "doRegistration(user) {\n return this.http.post(\"http://localhost:8080/create\", user, { responseType: 'text' });\n }", "title": "" }, { "docid": "dc2bdf7f151c764596ad4938fa3e6152", "score": "0.6271078", "text": "function registerUser(){\n //take credentials from text boxes\n var username = document.getElementById(\"u_username\").value;\n var name = document.getElementById(\"u_name\").value;\n var email = document.getElementById(\"u_email\").value;\n var pass = document.getElementById(\"u_pass\").value;\n var serverResponseJSON;\n var id;\n \n //to avoid any error due to database not null violation\n if(username==''||name==''||email==''||pass==''){\n alert(\"All fields are required!\");\n return;\n }\n //make sign up API request\n var request = new XMLHttpRequest();\n request.onreadystatechange = function(){\n if(request.readyState === XMLHttpRequest.DONE){\n if(request.status === 200){\n serverResponseJSON = JSON.parse(request.responseText);\n id = serverResponseJSON.hasura_id;\n }else if(request.status === 400){\n alert('Enter valid email/ password > 10 character!');\n }else if(request.status === 409){\n alert('username already exist!');\n }else if(request.status === 500){\n alert('something went wrong on the server!');\n }\n }\n };\n request.open('POST', 'http://auth.satyamsingh.hasura.me/signup',false);\n request.setRequestHeader('Content-Type', 'application/json');\n request.send(JSON.stringify({username: username, password: pass,email: email}));\n\n //update the id and name in User_Details table\n var request2 = new XMLHttpRequest();\n request2.onreadystatechange = function(){\n if(request2.readyState === XMLHttpRequest.DONE){\n if(request2.status === 200){\n alert('Registered Successfully!');\n //redirect to login page on successful signup\n window.location.href= \"/login\";\n }else if(request2.status === 500){\n alert('something went wrong on the server!');\n }\n }\n };\n request2.open('POST', 'http://data.satyamsingh.hasura.me/v1/query',false);\n request2.setRequestHeader('Content-Type', 'application/json');\n request2.send(JSON.stringify({type: \"insert\",args: {table: \"User_Details\", objects: [{User_ID: id,Name: name}]}}));\n}", "title": "" }, { "docid": "50f413e33858be89792e4a8fce86e3d8", "score": "0.6264165", "text": "function controller_by_user(){\n\t\ttry {\n\t\t\t\n\n $scope.user_data = {username:\"\",user_pass:\"\",email:\"\"};\n $scope.submitRegister = function(){\n \n // animation loading \n \t$ionicLoading.show({\n \t\ttemplate: '<div class=\"loader\"><svg class=\"circular\"><circle class=\"path\" cx=\"50\" cy=\"50\" r=\"20\" fill=\"none\" stroke-width=\"2\" stroke-miterlimit=\"10\"/></svg></div>'\n \t}); \n \n var nonce_url = \"http://goblackdiamond.com//api/get_nonce/?controller=user&method=register&callback=JSON_CALLBACK\";\n $sce.trustAsResourceUrl(nonce_url);\n \n $http.jsonp(nonce_url).success(function(resp_nonce, status, headers, config){\n console.log(\"resp_nonce\",resp_nonce);\n \n var http_params = $scope.user_data ;\n http_params.nonce = resp_nonce.nonce;\n var http_header = {params: http_params};\n \n var register_url = \"http://goblackdiamond.com//api/user/register/?insecure=cool&callback=JSON_CALLBACK\";\n $sce.trustAsResourceUrl(register_url);\n $http.jsonp(register_url,http_header).success(function(resp_register, status, headers, config){\n console.log(\"resp_register\",resp_register);\n\n if(resp_register.user_id){ \n $ionicLoading.hide();\n $ionicPopup.show({\n title: \"Congratulations\",\n template: \"Your account has been created successfully. Please login.\",\n buttons: [{\n text: \"OK\", \n onTap: function(e){\n \n $ionicHistory.nextViewOptions({\n disableAnimate: true,\n disableBack: true\n });\n \n $ionicHistory.clearHistory();\n $ionicHistory.clearCache();\n $state.go(\"goblackdiamond.user_login\");\n \t\t\t\t },\n }]\n })\n }else{\n \n $ionicLoading.hide();\n $ionicPopup.show({\n title: resp_register.status,\n template: resp_register.error,\n buttons: [{\n text: \"Retry\"\n }]\n })\n \n }\n }).error(function (err_register, status, headers, config) {\n console.log(\"err_register\",err_register);\n }); \n \n }).error(function (err_nonce, status, headers, config) {\n console.log(\"err_nonce\",err_nonce);\n });\n \n } \n\t\t\t\n\t\t} catch(e){\n\t\t\tconsole.log(\"%cerror: %cPage: `user_register` and field: `Custom Controller`\",\"color:blue;font-size:18px\",\"color:red;font-size:18px\");\n\t\t\tconsole.dir(e);\n\t\t}\n\t}", "title": "" }, { "docid": "8f7bc27686522be18b189294953e04e6", "score": "0.62613744", "text": "registerNewUser() {\n let newRegisterButton = document.querySelector(\".newUser__button\")\n let newRegisterEnter = document.querySelector(\"#registration__wrapper\")\n newRegisterEnter.addEventListener(\"keypress\", enterEvent => {\n if(enterEvent.key === \"Enter\"){\n let email = document.querySelector(\"#email__input\").value\n let username = document.querySelector(\"#username__input\").value\n let password = document.querySelector(\"#password__input\").value\n let passwordConfirm = document.querySelector(\"#password__confirm__input\").value\n let usernameCheck = true\n let emailCheck = true\n API.getUsers().then((response) => {\n for(let user of response) {\n if(user.username === username) {\n usernameCheck = false\n }\n if(user.email === email){\n emailCheck = false\n }\n }\n if(emailCheck === true){\n if(usernameCheck === true){\n if(email.includes(\"@\")) {\n if(password === passwordConfirm){\n let newUser = registrationFactory(email, username, password)\n API.addUser(newUser).then(() => {\n API.getUsers().then((response) => {\n for(let user of response) {\n if(user.username === username) {\n window.sessionStorage.setItem(\"activeUser\", user.id )\n document.querySelector(\".top-sec-container\").innerHTML = \"\"\n setFields().then(() => {\n TopSectionTemplate();\n FriendTemplate(data.friends)\n TaskCardGenerator(data.tasks);\n NewsTemplate(data.news.sort((a,b)=>b.time-a.time));\n EventListeners.setStandard();\n \n })\n \n \n }\n }\n })\n })\n }else{\n window.alert(\"Passwords do not match\")\n }\n }else{\n \n window.alert(\"Invalid Email\")\n }\n \n \n \n \n }else{\n window.alert(\"Username is already in taken\")\n }\n }else{\n window.alert(\"Email already in use\")\n }\n \n })\n }\n \n \n })\n // upon clicking register it sets the active user, pushes the user object into the user API, and renders the Dashboard to the dom\n // and checks for incorrect username/email, password, and password confirmation inputs\n newRegisterButton.addEventListener(\"click\", clickEvent => {\n let email = document.querySelector(\"#email__input\").value\n let username = document.querySelector(\"#username__input\").value\n let password = document.querySelector(\"#password__input\").value\n let passwordConfirm = document.querySelector(\"#password__confirm__input\").value\n let usernameCheck = true\n let emailCheck = true\n API.getUsers().then((response) => {\n for(let user of response) {\n if(user.username === username) {\n usernameCheck = false\n }\n if(user.email === email){\n emailCheck = false\n }\n }\n if(emailCheck === true){\n if(usernameCheck === true){\n if(email.includes(\"@\")) {\n if(password === passwordConfirm){\n let newUser = registrationFactory(email, username, password)\n API.addUser(newUser).then(() => {\n API.getUsers().then((response) => {\n for(let user of response) {\n if(user.username === username) {\n window.sessionStorage.setItem(\"activeUser\", user.id )\n document.querySelector(\".top-sec-container\").innerHTML = \"\"\n setFields().then(() => {\n TopSectionTemplate();\n FriendTemplate(data.friends)\n TaskCardGenerator(data.tasks);\n NewsTemplate(data.news.sort((a,b)=>b.time-a.time));\n EventListeners.setStandard();\n \n })\n \n \n \n }\n }\n })\n })\n }else{\n window.alert(\"Passwords do not match\")\n }\n }else{\n \n window.alert(\"Invalid Email\")\n }\n \n }else{\n window.alert(\"Username is already in taken\")\n }\n }else{\n window.alert(\"Email already in use\")\n }\n })\n \n })\n }", "title": "" }, { "docid": "03f19d4f7e0827d0534ddbd20eb860a8", "score": "0.6259742", "text": "register(){ Konekti.client[this.server].register(this.vc('email').value, this.vc('password').value) }", "title": "" }, { "docid": "d3c467116b7c86682cfdce7a42cd7076", "score": "0.6255042", "text": "function registerUser(){\n // request to handle register user\n fetch('http://localhost:3800/users/register', {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n firstName:firstNameNode.value,\n lastName: lastNameNode.value,\n email: emialNode.value,\n contact:contactNumberNode.value,\n password: passwordNode.value,\n userType: userType,\n profileImage: profileImage,\n })\n })\n .then(data => {\n return data.json();\n })\n .then(json => {\n if (json.status === 'success') {\n alert('registered successfully');\n window.location.href ='../views/';\n } \n else if(json.status == 'exists'){\n alert('user already exists');\n }\n else {\n alert('fail');\n }\n })\n .catch(error => {\n console.log(error);\n }); \n}", "title": "" }, { "docid": "f371a44280995f3c9f0d2186a28ff421", "score": "0.62477714", "text": "function getUsers(request, response) {\n let id = request.params.id;\n let httpResponse;\n\n if(id==null){\n response.send(usersList.users);\n }\n else{\n for(let i=0; i<usersList.users.length; i++){\n if(usersList.users[i].userId==id){\n httpResponse=usersList.users[i];\n break;\n }\n else{\n httpResponse={error:\"The UserId introduced doesn't belong to an existing user\"};\n }\n }\n response.send(httpResponse);\n }\n}", "title": "" }, { "docid": "95636858b6cc21e7fe2031cc5551e62f", "score": "0.62466115", "text": "function register() {\n\tvar name = document.getElementById(\"name\").value;\n\tvar username = document.getElementById(\"username\").value;\n\tvar password = document.getElementById(\"password\").value;\n\tvar street = document.getElementById(\"street\").value;\n\tvar province = document.getElementById(\"province\").value;\n\tvar country = document.getElementById(\"country\").value;\n\tvar zip = document.getElementById(\"zip\").value;\n\n\tvar request = new XMLHttpRequest();\n\tvar data ='';\n\t\n\t// create the query string\n\tdata += \"name=\" + name +\n\t\t\t\"&username=\" + username + \n\t\t\t\"&password=\" + password +\n\t\t\t\"&street=\" + street +\n\t\t\t\"&province=\" + province +\n\t\t\t\"&country=\" + country +\n\t\t\t\"&zip=\" + zip;\n\t\t\t\n\trequest.open(\"GET\", (\"rest/user/add\" + \"?\" + data), true);\n\trequest.onreadystatechange = () => {\n\t\tif ((request.readyState == 4) && (request.status == 200)){\n\t\t\tconsole.log(\"Account Created\");\n\t\t\twindow.location.href = \"./payment?username=\" + username;\n\t\t}\n\t\t\n\t};\n\trequest.send();\n\n}", "title": "" }, { "docid": "3748ed55729cf624251557cbbc611eae", "score": "0.6240386", "text": "async getInfo(payload, rootState) {\n const res = await get('api/user/register', payload)\n console.log(res)\n if(res.code === 0) {\n this.saveToken(res.data)\n // saveInfo('token', res.data)\n }\n \n }", "title": "" }, { "docid": "da0a68707f36405294805b9d66d324f4", "score": "0.6231178", "text": "async function doRegister(req, res) {\n let userInfo = req.body;\n\n var response = await authService.registerUser(userInfo);\n controllerHelper.handleResponse(res, response, controllerHelper.getCreateResponse, controllerHelper.getErrorResponse);\n }", "title": "" }, { "docid": "39f30bbbf74601dd59b6f5258ae52969", "score": "0.622139", "text": "async register() {\n if(1<=this.state.username.length && this.state.username.length<9){\n if(0<this.state.password.length && this.state.password.length<33) {\n if (this.state.confirmation === this.state.password) {\n try {\n const requestBody = JSON.stringify({\n username: this.state.username,\n password: this.state.password,\n avatar: this.state.avatar\n });\n await api.post('/register', requestBody);\n\n /* // Get the returned user and update a new object.\n const user = new User(response.data);\n\n // Store the token into the local storage.\n localStorage.setItem('userToken', user.userToken);*/\n\n this.props.history.push(`/login`);\n } catch (error) {\n alert(`Something went wrong during the sign up: \\n${handleError(error)}`);\n }\n } else {\n alert(\"Your passwords aren't identical.\");\n }\n }else{\n alert(\"Please set a password of length 1-32.\");\n }\n }else{\n alert(\"Your username has to be min 1 and max 8 characters\");\n }\n }", "title": "" }, { "docid": "72304d1ede060a86569b1f25363fc2d9", "score": "0.622129", "text": "function registerUser(req, res) {\r\r const user = {\r\r username: req.body.username,\r\r firstname: req.body.firstname,\r\r lastname: req.body.lastname,\r\r password: bcrypt.hashSync(req.body.password),\r\r birthdate: `${req.body.year}-${req.body.month}-${req.body.day}`\r\r };\r\r let ok = true;\r\r for (let prop in user) {\r\r if (user[prop].length === 0) {\r\r ok = false;\r\r }\r\r }\r\r\r\r if (!ok) {\r\r showPages.showLogInScreen(req, res, \"Gelieve alle velden in te vullen.\");\r\r }\r\r else {\r\r connection.query(Q.SELECT_USER, [user.username], function (err, result) {\r\r if (result != null && result.length === 0) {\r\r connection.query(Q.INSERT_USER, [user.username, user.firstname, user.lastname, user.birthdate, user.password, 0], function (err, result) {\r\r if (err != null) {\r\r console.log(err);\r\r showPages.showLogInScreen(req, res, \"Er heeft zich een onbekende fout voorgedaan.\");\r\r } else {\r\r user.id = result.insertId;\r\r connection.query(Q.SET_USER_GEBRUIKER, [user.id], function (err, result) {\r\r if (err == null) {\r\r req.session.userLoggedIn = user;\r\r req.session.username = bcrypt.hashSync(req.session.userLoggedIn.username);\r\r req.session.isUserLoggedIn = true;\r\r res.redirect(\"/\");\r\r } else {\r\r connection.query(\"Delete from users where idusers = ?\", [user.id], function (err, result) {\r\r showPages.showLogInScreen(req, res, \"Er heeft zich een onbekende fout voorgedaan. (2)\");\r\r })\r\r\r\r }\r\r })\r\r\r\r }\r\r })\r\r } else {\r\r showPages.showLogInScreen(req, res, \"username bestaat reeds\");\r\r }\r\r });\r\r }\r\r}", "title": "" }, { "docid": "2a79420b247079f788a314bc8cd6c800", "score": "0.62212425", "text": "function getUsers() {\n var httpRequest = new XMLHttpRequest();\n httpRequest.onreadystatechange = function() {\n if (httpRequest.readyState === 4 \n && httpRequest.status === 200) {\n var json = JSON.parse(httpRequest.responseText);\n createBtns(json.users);\n listenOnBtns();\n }\n }\n\n httpRequest.open('GET', 'http://' + window.location.hostname + ':8080/api/users', true);\n httpRequest.send(null);\n }", "title": "" }, { "docid": "260db49ea54ee29eac746d656cad5f2e", "score": "0.61809105", "text": "function registerUser(user_id, user_fn, user_ln, user_email, user_password, birthday) {\n var ajaxRequest = new XMLHttpRequest();\n ajaxRequest.onreadystatechange = function () {\n if (this.readyState == 4 && this.status == 200 ) {\n document.getElementById(\"confirmation\").innerHTML = this.responseText;\n }\n }\n ajaxRequest.open(\"GET\", \"register_user.php?user_id=\" + user_id + \"&user_fn=\" + user_fn + \"&user_ln=\" + user_ln +\n \"&user_email=\" + user_email + \"&user_password=\" + user_password + \"&birthday=\" + birthday, true);\n ajaxRequest.send();\n}", "title": "" }, { "docid": "b2e1f23c28b05588da0680748fbfb312", "score": "0.6175994", "text": "function createNewUser()\n {\n //Make AJAX request\n let obj = userRequest();\n console.log(obj);\n }", "title": "" }, { "docid": "9bba91d0d9a54d7ab5d80c6cda85712e", "score": "0.61727846", "text": "async function registerFunction({ email, password, firstName, lastName }) {\n async function getUser() {\n const result = await axios.post(\"http://localhost:3001/user/register\", {\n email: email,\n password: password,\n firstName: firstName,\n lastName: lastName,\n });\n return result;\n }\n const result = await getUser();\n if (result.data.hasOwnProperty(\"error\")) {\n return \"error\";\n } else {\n setUser(result.data.success);\n return result.data.success;\n }\n }", "title": "" }, { "docid": "5ae9bf2bdb305d532681ae52c9929c3d", "score": "0.61686575", "text": "function getUserReg(req, res, next) {\n \n db(\"users\")\n .then(data => {\n if (data.length > 0) {\n const idArray = data.map((item)=>item.id);\n console.log(\"idArray\",idArray);\n let userId = Math.max.apply(Math, idArray);\n console.log(\"userId\", userId);\n req.body.userId = userId;\n next();\n } else {\n res.status(404).json({ message: \"does not exist\" });\n }\n })\n .catch(serverErrorGetId(res));\n }", "title": "" }, { "docid": "3f299a593f432b09fc0a4627da3a3a1e", "score": "0.6153224", "text": "function requestAwaitedUsers() {\n var req = {\n method: 'GET',\n url: 'users/awaitedRequestsForCurrentUser',\n header: {\n 'Content-Type': 'application/x-www-form-urlencoded'\n },\n data: {\n }\n };\n $http(req).then(function success(response) {\n console.log(response.data);\n if (!response.data.signed) {\n window.location.href = '/vacebook/public/homepage.html';\n } else {\n if (response.data.succeeded) {\n $scope.awaitedRequests = response.data.requests;\n }\n }\n }, function error(response) {\n console.log(\"Coudn't get pending requests!\");\n });\n }", "title": "" }, { "docid": "e3dfb4bf3aca2f6cabe7404456b06e1f", "score": "0.6151497", "text": "function register(payload){\n\t\t\tvar user = new User();\n\t\t\tusername = payload.username;\n\t\t\tuser.registerUser(payload).then(user.loginUser(payload)).then(displayResponse).then(goHome);\n\t}", "title": "" }, { "docid": "b4779b2ef8d95af29bf137478ca9d693", "score": "0.61485845", "text": "registerUser() {\n this.props.actions.auth\n .register(this.props.auth.registerForm.fields)\n .then(user => this.onUserRegistered(user));\n }", "title": "" }, { "docid": "c8d55e93e3fa9ebdec0b83243f100574", "score": "0.6141616", "text": "async get(request) {\n debug(formatWithOptions({colors: true}, '[USERS][GET] Request: %O', request));\n\n const userData = await _data.read('users', request.token.phone);\n delete userData.hashedPassword;\n\n debug(formatWithOptions({colors: true}, '[USERS][GET] Response: %O', userData));\n return {status: 200, payload: userData, contentType: 'application/json'};\n }", "title": "" }, { "docid": "e34432137418a81b241e319f5022a8f9", "score": "0.61398816", "text": "register() {\n this.form.loading = true;\n const user = accountTransformer.send(this.form.data());\n userService.store(user)\n .then(() => {\n this.showModalCreate = false;\n this.form.resetFields();\n this.all(1, 50);\n this.loading = false;\n })\n .catch((errors) => {\n this.form.loading = true;\n this.form.recordErrors(errors);\n });\n }", "title": "" }, { "docid": "207d5a0dc0888143717280aa84e9a929", "score": "0.613499", "text": "function api_getuser(ctx)\n{\n\tapi_req([{ a : 'ug' }],ctx);\n}", "title": "" }, { "docid": "2c89f06b71f976afd3ec2ebd472d1068", "score": "0.61334556", "text": "register(user) {\n return guestClient.post(\"/register\", user);\n }", "title": "" }, { "docid": "8ebbd996a59642045e9ad5bbafa9fef7", "score": "0.61105204", "text": "register(username, email, password) {\n return this.request('post', 'user/register', { username, email, password })\n .then(response => {\n\n Session.session = response.data.session;\n \n return response;\n })\n .catch(err => {\n throw err.response.data;\n });\n }", "title": "" }, { "docid": "3bba636da725859103f5934835ffeb8e", "score": "0.6103956", "text": "function handleUsernameRegistered(){\n const username= agent.parameters.username;\n let ref = database.ref(\"users\");\n return ref.once(\"value\").then((snapshot) =>{\n var passw =snapshot.child(`${username}/password`).val();\n if(passw !=null){\n agent.add(`El usuario ${username} ya existe. Prueba a introducir otro usuario`);\n agent.setContext({ \"name\": \"not_registered_followup\",\"lifespan\":1});\n }else {\n agent.add(new Card({title: \"Contraseña\",text: \"Adelante, introduce una contraseña\"}));\n agent.setContext({ \"name\": \"get_username_followup\",\"lifespan\":1,\"parameters\":{\"username\":username}});\n }\n });\n }", "title": "" }, { "docid": "6aedcdd66c3590ad251e4cfcccb07715", "score": "0.60870135", "text": "function registerRequest(e) {\n /// prevent submit form\n e.preventDefault();\n\n // clear error\n clearErrorMessage(modalRegisterForm);\n\n /// check is empty password\n if (rePassword.value.length == 0) {\n Object.assign(registerErrorMessage.style, {\n color: \"#842029\",\n display: \"block\",\n backgroundColor: \"#f8d7da\",\n });\n registerErrorMessage.innerHTML = \"Password should not be empty\";\n return;\n }\n\n /// confirm password\n var isConfirm = rePassword.value !== confirmPassword.value;\n if (isConfirm) {\n Object.assign(registerErrorMessage.style, {\n color: \"#842029\",\n display: \"block\",\n backgroundColor: \"#f8d7da\",\n });\n registerErrorMessage.innerHTML = \"Your confirm password is incorrect\";\n return;\n }\n\n /// Get value form input registerForm\n inputRegisterForm.forEach((input) => {\n if (input.name !== \"confirmPassword\") dataRegisterForm[input.name] = input.value.trim();\n });\n\n /// Request data to register\n requestData(\"http://localhost:3001/account/register\", \"POST\", {\n ...dataRegisterForm,\n gender: reGender.value,\n })\n .then((result) => {\n Object.assign(registerErrorMessage.style, {\n color: \"#155724\",\n display: \"block\",\n backgroundColor: \"#d1e7dd\",\n });\n modalRegisterForm.closest(\".registerFormParent\").reset();\n registerErrorMessage.innerHTML = result.data.message;\n })\n /// error form server\n .catch((error) => {\n /// check if isError\n showErrorMessage(error, modalRegisterForm, registerErrorMessage);\n });\n}", "title": "" }, { "docid": "b8f2396a47b1f4c9bfc3566191f2a868", "score": "0.6086725", "text": "function getActiveUsersRequest() {\n\tactiveUsers = [];\n\tio.emit('get active users');\n}", "title": "" }, { "docid": "306055ad97739ce9c68e92f0cda276e7", "score": "0.6082011", "text": "function register(userInfo) {\n var form = document.querySelector(\"form\");\n Babble.register(userInfo);\n sendRequestToServer('GET', 'login', null,\n function(e) {\n var userId = e.id;\n document.querySelector('.modal-popup').style.visibility = 'hidden';\n }, function() {\n register(userInfo);\n });\n}", "title": "" }, { "docid": "c2e81a746fc77a4745421115ac7e828c", "score": "0.6078507", "text": "function getUsers(onload, query) {\r\n callAPI(\"GET\", \"/api/v1/users?\" + queryToString(query), onload);\r\n}", "title": "" }, { "docid": "8cbed9a784b629e5310ddd4e4ea5cc1c", "score": "0.6071135", "text": "register(name, surname, email, password, birthday, gender, phone) {\n validate([\n { key: 'name', value: name, type: String },\n { key: 'surname', value: surname, type: String },\n { key: 'email', value: email, type: String },\n { key: 'password', value: password, type: String },\n { key: 'birthday', value: birthday, type: String },\n { key: 'gender', value: gender, type: String, optional: true },\n { key: 'phone', value: phone, type: String, optional: true }\n ])\n\n return fetch(`${this.url}/users`, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json; charset=utf-8'\n },\n body: JSON.stringify({ name, surname, email, password, birthday, gender, phone })\n })\n .then(res => res.json())\n .then(res => {\n if (res.error) throw Error(res.error)\n })\n }", "title": "" }, { "docid": "777f60c4b084efe67bd8d0fe53880d3d", "score": "0.60672134", "text": "getUser(username) {}", "title": "" }, { "docid": "39db47397343cde22c6984bc2fe6da98", "score": "0.60639864", "text": "getAllUsers(){\n //get user from user server\n return axios.get(USER_SERVER+\"/users\");\n }", "title": "" }, { "docid": "f2e07f8d561a10e4b48e78a75e7a24d1", "score": "0.6062553", "text": "function serverRequestRegister(params, async){\n g.request.open(\"POST\", \"registerUser.php\", async);\n g.request.setRequestHeader(\"Content-type\", \"application/x-www-form-urlencoded\");\n g.request.onreadystatechange = processServerDataRegister;\n g.request.send(params);\n}", "title": "" }, { "docid": "ce6d1de39d47551c57940d954179f384", "score": "0.6054123", "text": "function userRegistration (req, res, next) {\n db.task(t => {\n return t.any('SELECT DISTINCT username FROM users WHERE username = $1', [req.body.username])\n .then((users) => {\n users = normaliseDataByUsername(users);\n if (users.hasOwnProperty(req.body.username)) {\n throw {code: 422, message: 'USERNAME EXISTS!'};\n } return;\n })\n .then(() => {\n return t.one('INSERT INTO users (username) VALUES ($1) RETURNING id', \n [req.body.username]);\n })\n .then((user) => {\n res.status(201).send({\n user_id: user.id,\n });\n })\n .catch(error => {\n next(error);\n });\n });\n}", "title": "" }, { "docid": "a71a3247882706ff11ddea65b457044c", "score": "0.60481447", "text": "register(creds, setUserStatus, drawButtons, drawForm) {\n auth.post('/register', creds)\n .then(res => {\n setState('user', res.data)\n setUserStatus(true)\n drawButtons()\n drawForm()\n })\n .catch(err => console.log(err))\n }", "title": "" }, { "docid": "93ab81af3c5fa0f1d1a7bf971ab9f363", "score": "0.60409987", "text": "function getUser(request,response){\n\n //VALIDATE INPUT\n request.checkParams(\"id\", \"ID is wrong\").isInt();\n var errors = request.validationErrors();\n if (errors) {response.status(400).send(errors);return;}\n\n var client = requestJson.createClient(url);\n const queryName='q={\"id\":'+request.params.id+'}&';\n client.get(config.mlab_collection_user+'?'+queryName+config.mlab_key, function(err, res, body) {\n var respuesta=body[0];\n if(undefined==respuesta)\n response.status(404).send({message:\"Usuario no Existe\"});\n else\n response.send(respuesta);\n });\n}", "title": "" }, { "docid": "1c30cff0cd42b79d7f13d09fa7d14e38", "score": "0.6038212", "text": "function registerUser(fname, lname, email, pswd) {\n $.getJSON(\"\" + config.url.api + \"?callback=?\" + \"&store=1&service=createuser&firstname=\" + fname + \"&lastname=\" + lname + \"&email=\" + email + \"&password=\" + pswd + \"\",\n function(response) {\n try {\n var status = response[\"status\"];\n if (response && status != 0) {\n var customerid = response[\"id\"];\n if (config.app.platform == 'ios' || config.app.platform == 'android') {\n navigator.notification.alert(locale.message.alert[\"register_successfully_message\"], function() {}, config.app.name, locale.message.button[\"close\"]);\n } else {\n alert(locale.message.alert[\"register_successfully_message\"]);\n }\n return customerid;\n } else {\n return -1;\n }\n } catch (ex) {\n return -1;\n }\n });\n}", "title": "" }, { "docid": "e679763f504827a344d20de71f86e597", "score": "0.60326153", "text": "async register(request, response) {\n const { name, email, password, cnpj, city, daily_rate } = request.body;\n try {\n const user = await connection('user')\n .insert({\n email: email,\n password: password,\n type: 'hotel',\n }).catch(function (error) {\n console.error(error);\n return response.status(403).json({ error: error });\n });\n await connection('hotel')\n .insert({\n id_user: user[0],\n name: name,\n cnpj: cnpj,\n city: city,\n daily_rate: daily_rate\n }).catch(function (error) {\n console.error(error);\n return response.status(403).json({ error: error });\n });\n return response.status(204).send();\n } catch (error) {\n return response.status(500).json({ error: error });\n }\n }", "title": "" }, { "docid": "daf563fa117ead7228608da24c078d3b", "score": "0.6023112", "text": "getByUsername(userName,password, name, contactEmail, contactNumber)\n {\n \n return Axios.get(`http://localhost:8080/api/register/findUserByName/${userName}/${password}/${name}/${contactEmail}/${contactNumber}`);\n }", "title": "" }, { "docid": "6ce9b6288c8e9350519e7e5641ec16cc", "score": "0.6021764", "text": "async function register(req, res) {\n logger.verbose(\"/user/register\");\n\n try {\n let reqAccount = req.body.account || {};\n if (req.user.userid !== reqAccount.userid)\n throw new StorageError(401, \"invalid userid/password\");\n\n // try to recall account\n let results = await accounts.recall(reqAccount.userid);\n if (results.status !== 404)\n throw new StorageError(409, \"account already exists\");\n\n if (req.user.password !== reqAccount.password) {\n // both should be plain text and equal for new user request\n throw new StorageError(401, \"invalid userid/password\");\n }\n\n // store new user account\n let newAccount = new Account(reqAccount.userid);\n newAccount.update(reqAccount);\n newAccount.password = Account.hashPwd(reqAccount.password);\n newAccount.roles = [ Roles.User ]; // should be Guest until user verifies email address\n newAccount.dateCreated = new Date().toISOString();\n newAccount.dateUpdated = new Date().toISOString();\n newAccount.lastLogin = new Date().toISOString();\n\n let results2 = await accounts.store(newAccount);\n\n // return user's record\n results2.type = \"map\";\n results2.data[newAccount.userid] = newAccount.sanitize();\n res.status(results2.status || 201).set(\"Cache-Control\", \"no-store\").jsonp(results2);\n }\n catch(error) {\n if (error?.status === 409)\n logger.warn(error.message);\n else\n logger.error(error.message);\n res.status(error.status || 500).set('Content-Type', 'text/plain').send(error.message);\n }\n}", "title": "" }, { "docid": "24479311c07db6afe62396853bfb3df6", "score": "0.60174686", "text": "async requestUser() {\n\t\tconst urlUser = this.props.location.pathname.split('/').pop();\n\t\tlet url = this.props.user\n\t\t\t? '/user/' + urlUser + '?userId=' + this.props.user.id\n\t\t\t: '/user/' + urlUser;\n\t\tconst res = await fetch(url, {\n\t\t\tmethod: 'get',\n\t\t\theaders: {\n\t\t\t\t'Content-Type': 'application/json',\n\t\t\t},\n\t\t});\n\t\tif (res.status >= 400 && res.status < 500) {\n\t\t\treturn this.props.history.push('/login');\n\t\t}\n\t\tif (res.status === 200) {\n\t\t\tconst data = await res.json();\n\t\t\tthis.setState({ ...data });\n\t\t}\n\t}", "title": "" }, { "docid": "2c8cc330a3499f24781275c7d92c39fd", "score": "0.6011894", "text": "function signup() {\r\n //recupero i valori del form\r\n getFormValues();\r\n //invio la richiesta al server\r\n window.console.log(\"signup - Sending user => \" + JSON.stringify(json_signup_user));\r\n sendRequest(\"signup\", \"signup\", json_signup_user, signupCallback, false);\r\n}", "title": "" }, { "docid": "97191c81771d0b8003b4b8f748b24455", "score": "0.6009651", "text": "function register() {\n var data = {}\n if (form.email.value) data.email = form.email.value\n if (form.password.value) data.password = form.password.value\n if (form.name.value) data.name = form.name.value\n if (form.personality.value) data.personality = form.personality.value\n \n if (!data.email) return displayError('Must provide email')\n if (!data.password) return displayError('Must provide password')\n if (data.password !== form.confirm.value) return displayError('Passwords do not match')\n if (!data.name) return displayError('Must provide name')\n if (!data.personality) return displayError('Must provide 4-letter Myers-Briggs personality type')\n\n fetch('/register', {\n headers: {\n 'Content-Type': 'application/json',\n 'x-access-token': localStorage.token\n },\n method: 'POST',\n body: JSON.stringify(data)\n }).then(function(res) {\n console.log(res)\n if (!res.ok) {\n res.text().then(function(message) {\n alert(message)\n })\n }\n res.json()\n .then(function(user) {\n localStorage._id = data.userId\n localStorage.token = data.token\n console.log(localStorage._id)\n window.location = '/login'\n })\n }).catch(function(err) {\n console.error(err)\n })\n console.log(data)\n\n}", "title": "" }, { "docid": "e4e08a91e11a8147d4fe59d59927fa99", "score": "0.60095906", "text": "userGet(req, options) {\r\n return this.client.exec('Auth', 'userGet', req, options);\r\n }", "title": "" }, { "docid": "abccc01bd2b6e1949d39ff8b3a32d33a", "score": "0.60083497", "text": "function google_response(request, token, refreshToken, profile, done) {\n console.log(profile); // the secret trick to finding out what fields you can use \n if (!request.user) {\n // find the user in the database based on their google id\n User.findOne({\n 'google.id': profile.id\n }, function (err, user) {\n if (err) return done(err); // db error so stop\n if (user) {\n // if there is a user id already but no token (user was linked at one point and then removed) add our token and profile information\n if (!user.google.token) {\n registerUser(user, profile, token, done);\n }\n return done(null, user); // user found, return that user\n } else {\n // if the user isnt in our database, create a new user\n var newUser = new User();\n registerUser(newUser, profile, token, done);\n }\n });\n } else {\n // user already exists and is logged in, we have to link accounts\n var user = request.user; // pull the user out of the session\n registerUser(user, profile, token, done);\n }\n // });\n }", "title": "" }, { "docid": "b38bcb279c348e8f11e9c8f29cfc152b", "score": "0.6006127", "text": "function callbackContinueRegistration(data){\n setVerify(false);\n setContinueRegistration(true);\n store.set(\"user\",data.response.user);\n document.location.href=Config.ConfigAppUrl+\"Auth/clientRegister4\"\n }", "title": "" }, { "docid": "0f2c8071c0182455e445258b47886987", "score": "0.6004573", "text": "function registerUser() {\n usersJson.push({\n name: name,\n title: title,\n email: email,\n avatar: `resources/avatar_${avatar}.png`,\n score: score,\n }\n );\n loadStorage(usersJson, 'users');\n}", "title": "" }, { "docid": "36bf9a7617b4e6d123002dd9327bfb39", "score": "0.6002242", "text": "function registration() {\n const data = JSON.stringify({\n fullName: document.getElementById('input-fullName-r').value.toString(),\n email: document.getElementById('input-email-r').value.toString(),\n nickname: document.getElementById('input-ncknm-r').value.toString(),\n password: document.getElementById('input-pswrd-r').value.toString()\n })\n\n fetch('http://192.168.43.162:3443/chat/authorization/' + urls[\"registration\"], {\n method: 'POST',\n body: data,\n })\n .then(response => response.json())\n .then(response => {\n console.log(`User with nickname ${data.nickname} successfully authorization`)\n console.log(`You can start communication`)\n exposeBlock('.user-info', ['.main-window', '.authorization', '.registration'])\n document.getElementById('nick').innerHTML = response.nickname\n\n if (response.role === roles['admin']){\n document.querySelector('.btn-check-your-msg').style.display = 'flex'\n document.querySelector('.check-user-messages').style.display = 'flex'\n } else{\n document.querySelector('.btn-check-your-msg').style.display = 'flex'\n document.querySelector('.check-user-messages').style.display = 'none'\n }\n document.getElementById('send-msg').style.display = 'flex'\n })\n}", "title": "" }, { "docid": "bb5a96e820517ac4f8738097d4db6814", "score": "0.59990054", "text": "function requestUserJson() {\n return {\n type: REQUEST_USER_JSON\n };\n}", "title": "" }, { "docid": "ed52bf99bdc19c0389310239b6688bec", "score": "0.5998792", "text": "async function getRegisteredUser (req,res) {\n try{\n res.json(res.paginationResults);\n }catch (err) {\n res.json({ message : err});\n }\n}", "title": "" }, { "docid": "737c95a4bee5a586dd7a5b035a6eb10c", "score": "0.59967333", "text": "function register(cb) {\n var data = {};\n data.userName = email;\n data.password = encrypt(password);\n data.publicKey = pubkey.mod;\n data.channel = 0;\n\n var regurl = regservice + '/user/register';\n\n console.log('registering user: ' + email);\n\n req(\n {\n url: regurl,\n method: 'POST',\n timeout: 30000,\n json: data // does JSON.stringify(data), also will set header content-type\n },\n function(err, response, body) {\n cb(err, response, body);\n }\n );\n}", "title": "" }, { "docid": "791ded0f8b00942f6f706786ad8952b3", "score": "0.5993988", "text": "function fetchRequest(){\n return{\n type: FETCH_USERS_REQUEST\n }\n}", "title": "" }, { "docid": "9d0943b121f08294aa271d1fc87140cb", "score": "0.59907633", "text": "User(e){\n if(this.state.FirstName === null || this.state.LastName === null || this.state.Email === null || this.state.Password === null){\n this.setState({\n status : \"Sorry due to missing field you are not able to sign up. Try again\"\n })\n }else{\n const user = {\n FirstName :this.state.FirstName,\n LastName : this.state.LastName,\n email : this.state.Email,\n password : this.state.Password\n }\n const reg = {\n email : this.state.Email,\n password : this.state.Password\n }\n\n//this well send data to the reqres i have read there documentation they dont save our data so the register will work only on there dataset.\n axios.put(\"https://reqres.in/api/users\" , user)\n .then(response => {\n console.log(response);\n })\n .catch(error => {\n console.log(error);\n })\n//this will help to get the data store in reqres\n axios.get(\"https://reqres.in/api/users?page=2\")\n .then(response => {\n console.log(response);\n })\n .catch(error =>{\n console.log(error)\n })\n\n //this will help to get the register status\n axios.post(\"https://reqres.in/api/register\",reg)\n .then(response => {\n console.log(response);\n })\n .catch(error =>{\n console.log(error)\n })\n\n this.setState({\n status : this.state.FirstName + \" you are succesfully registered\"\n })\n }\n }", "title": "" }, { "docid": "688083d7800f65ce4cc50bf21b6401c3", "score": "0.59888136", "text": "getData() {\n\n const request = this.getUsers();\n }", "title": "" }, { "docid": "e98b1d6dde61a694c94d62a7f09389ae", "score": "0.59880245", "text": "static async addUser(data) {\n let res = await this.request('users', data, 'post');\n return res.user;\n }", "title": "" }, { "docid": "03d5faad65ea81238e2577d0a86c619b", "score": "0.5987323", "text": "function getUsersRest(req, response) {\r\n\t//var filter = req.query.filter;\r\n\t\r\n\tgetMethods.getUsers(req.query, function(result) {\r\n\t\tresponse.status(200).json(result);\r\n\t\treturn;\r\n\t},\r\n\t function() {\r\n\t\tresponse.status(500).send('Error\\n');\r\n\t\treturn;\r\n\t})\r\n\t;\r\n\t\r\n}", "title": "" }, { "docid": "02cdefb428dd946573de7e59c56c18fe", "score": "0.59854114", "text": "function GetNewData(req, res) {\n\tres.send('This is not implemented');\n\t//return UserRequestHandler.Create();\n\treturn null;\n}", "title": "" }, { "docid": "32f7e9df62875ff75920011ddab880b6", "score": "0.5978779", "text": "async function getUsers()\n{\n let result_get = await (users_model.getUsers())\n if (result_get != false) {\n format_request.code = 200\n format_request.status = 'success'\n format_request.message = result_get\n } else {\n format_request.code = 400\n format_request.status = 'error'\n format_request.message = 'No hay usuarios registrados en la base de datos'\n }\n return format_request\n}", "title": "" }, { "docid": "77476a343241d3e67d97d102b76cddfa", "score": "0.59777206", "text": "function register () {\n const regText = document.getElementById('regtext')\n jsonGet('/api/register_request')\n .then(registerRequest => {\n // registerRequest.attestation = 'direct'\n console.log('[register] received authRequest', registerRequest)\n // alert(\"Press your key\")\n regText.innerHTML = 'Press U2F Key!'\n return new Promise((resolve) => {\n return u2f.register(APP_ID, [registerRequest], [], resolve)\n })\n })\n .then(res => {\n regText.innerHTML = ''\n const res2 = {...res}\n if (res2.clientData) res2.clientData = JSON.parse(window.atob(res2.clientData))\n document.getElementById('dRegisterRequest').innerHTML = JSON.stringify(res2, null, 4)\n // console.log('[register] requesting /api/register')\n return jsonPost('/api/register', res)\n })\n .then(res => {\n if (res.certificate) res.certificate.data = '[...]'\n document.getElementById('dRegister').innerHTML = JSON.stringify(res, null, 4)\n if (res.successful === true) {\n regText.innerHTML = 'Key registered! You are ready to <a href=\"auth\" id=\"authLink\">Authenticate</a>'\n document.getElementById('authLink').focus()\n } else {\n regText.innerHTML = JSON.stringify(res)\n }\n })\n .catch(err => {\n console.error(err)\n })\n}", "title": "" }, { "docid": "b350a6c98e9b8e623d17326992a20796", "score": "0.59738755", "text": "function getUsers(request, response) {\n var connection = mysql.createConnection(options);\n var query = \"SELECT id, username, password, profile_pic_url, user_type_id FROM user\";\n connection.query(query, function (err, rows) {\n if (err) {\n response.json({ \"message\": \"error\" });\n } else {\n response.json({ \"message\": \"ok\", \"users\": rows });\n }\n });\n connection.end();\n}", "title": "" }, { "docid": "e44da571b563cfbdaae80ba18eb52fa0", "score": "0.59701157", "text": "function request(user) { return { type: LOGIN_REQUEST, user }}", "title": "" }, { "docid": "de25f1b8ff5eb71c6a9a378632231b02", "score": "0.5966303", "text": "async register(parent, {registerInput: {username, email, password, confirmPassword}}, context, info) {\n // validate user data\n const {validationErrors, isValid} = validateRegisterInput(username, email, password, confirmPassword);\n if (!isValid) {\n throw new UserInputError('Errors', {validationErrors});\n }\n\n\n // make sure user doesn't already exist\n const _user = await user.findOne({username});\n if (_user) {\n throw new UserInputError('Username already exists!', {\n // use this for frontend display\n errors: {\n username: 'This username already exists!'\n }\n })\n }\n \n // make sure email is not already registered\n const _email = await user.findOne({email});\n if(_email) {\n throw new UserInputError('Email is already registered!', {\n errors: { \n email: 'This email is already registered!' \n }\n })\n }\n\n\n // auth token is created but not used in data base\n\n // function to crypt password is asynchronous, meaning it needs to wait until response is returned\n\n password = await bcrypt.hash(password, 12);\n\n // create new user with the data\n const newUser = new user({\n email,\n username, \n password,\n dateCreated: new Date().toISOString()\n });\n\n // save new user to database\n const res = await newUser.save();\n\n // create auth token\n const tkn = generateToken(res);\n console.log(tkn);\n const tokenStr = tkn.toString(); \n\n return {\n token: tokenStr,\n ...res._doc,\n id: res.id,\n }; \n \n }", "title": "" }, { "docid": "228b294009f0c54e11d14310c009c42a", "score": "0.59584045", "text": "function requestPendingUsers() {\n var req = {\n method: 'GET',\n url: 'users/pendingRequestsForCurrentUser',\n header: {\n 'Content-Type': 'application/x-www-form-urlencoded'\n },\n data: {\n }\n };\n $http(req).then(function success(response) {\n console.log(response.data);\n if (!response.data.signed) {\n window.location.href = '/vacebook/public/homepage.html';\n } else {\n if (response.data.succeeded) {\n $scope.pendingRequests = response.data.requests;\n }\n }\n }, function error(response) {\n console.log(\"Coudn't get pending requests!\");\n });\n }", "title": "" }, { "docid": "5803cc77b6755c7676cf02ce71c90580", "score": "0.59562826", "text": "function handleRegistration(request, response) {\n debugLog('## handleRegistration header(s)' + JSON.stringify(request.headers), LOG_OPS);\n var method = request.method;\n var UrlObject = new Object();\n\n // check to see if cookie corresponds to instanceID and url is well-formed\n if (!getUrlFieldsCookieAndCheck(request, UrlObject, 4, true, response))\n return 0;\n\n var instanceID = UrlObject.fields[2];\n var username = UrlObject.fields[3];\n var appname = UrlObject.fields[4];\n\n // authenticate app credentials supplied in header\n var options = userAuthOptions;\n\n if (request.headers.cookie!=undefined)\n options.headers.cookie = request.headers.cookie;\n else\n options.headers.cookie = '';\n\n if (request.headers.authorization!=undefined)\n options.headers.authorization = request.headers.authorization;\n else\n options.headers.authorization = '';\n\n var authReq = configParsed.protocol.request(options,\n function(authRes) {\n authRes.on('data', function (chunk) {\n debugLog('## userAuth received: ' + chunk);\n });\n authRes.setEncoding('utf8');\n authRes.on('end', function() {\n if (authRes.statusCode==204) {\n // find the token associated with this instanceID and appname\n if (request.headers.authorization==undefined || username==getNameFromCredentials(request)) {\n client.smembers('reg:' + instanceID, function(err, reply) {\n var tokApp;\n\n if (reply==undefined || reply==null)\n var lim = 0;\n else\n var lim = reply.length;\n\n for (var i=0; i<lim; i++) {\n tokApp = JSON.parse(reply[i]);\n if (tokApp.appname==appname) {\n break;\n }\n }\n\n if (i<lim) {\n var token = tokApp.token;\n\n if (method=='GET' || method=='PUT') {\n debugLog('## Found registration for instanceID-appname', LOG_ALL);\n debugLog('## instanceID ' + instanceID + ' appname ' + appname, LOG_ALL);\n // ATOMIC operation\n var multi = client.multi();\n multi.expire('cnt:' + instanceID, expirationInterval);\n multi.expire('reg:' + instanceID, expirationInterval);\n multi.expire('tok:' + token, expirationInterval);\n multi.expire('col:' + instanceID, expirationInterval);\n multi.expire('que:' + instanceID, expirationInterval);\n multi.exec(function (err, replies) {\n debugLog(\"## Multi reply to update expire times \" + replies, LOG_ALL);\n logStateOfMappings(instanceID, token);\n });\n // END ATOMIC\n\n if (method=='GET')\n response.writeHead(200, {'Content-Type': 'application/json'});\n else\n response.writeHead(201, {'Content-Type': 'application/json'});\n\n response.end(JSON.stringify({ token: token }), 'utf8');\n }\n else {\n // this is a delete registration operation\n if (lim==1) {\n // this token is the only one registered with this instanceID, so\n // delete the *:instanceID keys\n debugLog('## This is the only registration - deleting instance', LOG_OPS, LOG_ALL);\n debugLog('## InstanceID ' + instanceID, LOG_ALL);\n // ATOMIC operation\n var multi = client.multi();\n multi.del('cnt:' + instanceID);\n multi.del('reg:' + instanceID);\n multi.del('col:' + instanceID);\n multi.del('que:' + instanceID);\n multi.del('tok:' + token);\n multi.exec(function (err, replies) {\n debugLog(\"## Multi reply to delete last registration \" + replies, LOG_ALL);\n response.writeHead(204); response.end();\n logStateOfMappings(instanceID, token);\n });\n // END ATOMIC\n var oldConnection = responseObject[instanceID];\n if(oldConnection) {\n debugLog(\"## Closing existing connections on delete.\", LOG_ALL);\n oldConnection.writeHead(410);\n oldConnection.end();\n }\n delete responseObject[instanceID];\n delete timerHandle[instanceID];\n }\n else {\n // this token is one of several registered with this instanceID, so\n // delete it's entry in the registration list and on the tok:token list\n // ATOMIC operation\n var multi = client.multi();\n multi.del('tok:' + token);\n var regString = JSON.stringify({ token: token, appname: appname });\n multi.srem('reg:' + instanceID, regString);\n multi.exec(function (err, replies) {\n debugLog(\"## Multi reply to delete a registration \" + replies, LOG_ALL);\n response.writeHead(204); response.end();\n logStateOfMappings(instanceID, token);\n });\n\n // now remove any messages on queue that belong to this app, which is now deregistered\n debugLog('## About to remove messages from the queue which belong to deleted token', LOG_ALL);\n client.zrange('col:' + instanceID, 0, -1, function(err, reply) {\n for (var i = reply.length-1; i>=0; i--) {\n value = reply[i].split(':');\n // if this element belongs to the app being deregistered, then delete this\n // element and its corresponding element in the que list\n // need to remove elements starting at the top, so that indices of lower\n // elements are not affected\n if (value[1]==appname) {\n debugLog('## About to remove element ' + i + ' from queue', LOG_ALL);\n var multi = client.multi();\n multi.zremrangebyrank('col:' + instanceID, i, i);\n multi.zremrangebyrank('que:' + instanceID, i, i);\n multi.exec(function (err, replies) {\n debugLog(\"## Multi reply to delete a message from message queue \" + replies, LOG_ALL);\n });\n }\n }\n });\n\n // END ATOMIC\n debugLog('## Removed registration:' + regString, LOG_ALL);\n }\n }\n }\n else {\n if (method=='GET' || method=='DELETE') {\n debugLog('InstanceID-appname registration not found', LOG_ALL);\n debugLog('instanceID ' + instanceID + ' appname ' + appname, LOG_ALL);\n response.writeHead(404);\n response.end();\n }\n else {\n // this is a create registration operation\n debugLog('## InstanceID-appname registration not found - generating new token', LOG_ALL);\n debugLog('## instanceID ' + instanceID + ' appname ' + appname, LOG_ALL);\n var token = generateToken(appname);\n // create message counter for this instance and token->instanceID map\n // ATOMIC operation\n var multi = client.multi();\n multi.set('cnt:' + instanceID, 0);\n multi.sadd('reg:' + instanceID, JSON.stringify({ token: token, appname: appname }));\n multi.set('tok:' + token, instanceID);\n\n multi.expire('cnt:' + instanceID, expirationInterval);\n multi.expire('reg:' + instanceID, expirationInterval);\n multi.expire('tok:' + token, expirationInterval);\n multi.exec(function (err, replies) {\n debugLog(\"## Multi reply to create a registration \" + replies, LOG_ALL);\n responseObject[instanceID] = null;\n timerHandle[instanceID] = null;\n\n debugLog('## Created registration for instanceID ' + instanceID + ' and token ' + token, LOG_ALL);\n response.writeHead(201, {'Content-Type': 'application/json'});\n response.end(JSON.stringify({ token: token }), 'utf8');\n logStateOfMappings(instanceID, token);\n });\n // END ATOMIC\n }\n }\n });\n }\n else {\n debugLog('Username in url does not match username in authentication credentials', LOG_ERR);\n debugLog('URL username ' + username + ' Auth username ' + getNameFromCredentials(request), LOG_ERR);\n response.writeHead(401);\n response.end();\n }\n }\n else {\n debugLog('Invalid authentication credentials', LOG_ERR);\n debugLog('Credentials ' + request.headers.authorization, LOG_ERR);\n response.writeHead(401);\n response.end();\n }\n });\n }\n );\n authReq.on('error', function() {\n debugLog('User authorization sever unavailable', LOG_ERR);\n response.writeHead(503);\n response.end();\n });\n\n authReq.end();\n return 1;\n}", "title": "" }, { "docid": "e61bcc8888f121f59b019bdb7be0f879", "score": "0.5954367", "text": "register() {\n\t\t\tconst id = \"reg_error\";\n\t\t\tvar u = Ember.$(\"#reg_new_username\")[0].value;\n\t\t\tvar p = Ember.$(\"#reg_new_password\")[0].value;\n\t\t\tvar self = this;\n\t\t\tif (u === \"\") {\n\t\t\t\tthis.send(\"showMessage\", id, \"The username field must be filled.\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t//Ember.$.ajax(\"http://localhost:5000/p/register\", {\n\t\t\tEmber.$.ajax(\"https://liugues-api.herokuapp.com/p/register\", {\n\t\t\t\tmethod: \"POST\",\n\t\t\t\tdata: {\n\t\t\t\t\tusername: u,\n\t\t\t\t\tpassword: p\n\t\t\t\t},\n\t\t\t\tsuccess: function(data) {\n\t\t\t\t\tif (!data.error) {\n\t\t\t\t\t\tself.send(\"showMessage\", \"reg_success\", data.data);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconsole.log(data);\n\t\t\t\t\t\tself.send(\"showMessage\", id, data.data);\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\terror: function() {\n\t\t\t\t\tself.send(\"showMessage\", id, \"An error occurred when connecting to the database\");\n\t\t\t\t}\n\t\t\t});\n\t\t}", "title": "" }, { "docid": "117460ea9c1384b6b19d2cc28857b9f4", "score": "0.5953964", "text": "function requestUsername() {\n console.log('request');\n // expects a response from the background script with task='usernamerequest'\n chrome.runtime.sendMessage({task: \"getUser\"}, function(response) {});\n}", "title": "" }, { "docid": "8b3138cbf10dd12cb0b68812b58041cb", "score": "0.59502995", "text": "function register(response){\t\r\n\r\n\tvar message = response.message;\r\n\tvar user = response.user;\r\n\tvar lat = response.lat;\r\n\tvar lon = response.lon;\r\n\r\n\tconsole.log(response.message);\r\n\t\r\n\r\n\tif (!localStorage[\"user\"]){\r\n\t\tlocalStorage[\"user\"] = user;//save our name\t\r\n\t\t//lets paint basic map wutih our pos\r\n\t\tinitOurMap(lat, lon);\t\r\n\t}\r\n\t\r\n\talert(message);\r\n\r\n\t/*if( response.start = \"true\"){//server detects more than 1 user\t\t\r\n\t\talert(\"other user has entered\");*/\r\n\t\tstream();\r\n\t//}\r\n\r\n }", "title": "" }, { "docid": "6a89220b89504bd6afdbe9f731845dfa", "score": "0.5949952", "text": "function getAllUsers(request, respond)\n{\n usersDB.getAllUsers(function (error, result)\n {\n if (error)\n {\n respond.json(error);\n } \n else\n {\n respond.json(result);\n }\n });\n}", "title": "" }, { "docid": "86bf0ff70a5b46fad8393a9ee490d057", "score": "0.5948618", "text": "function userRegistrationInBase(data, status) {\n\n\n if (status == 'success' ) {\n for (var i = 0; i < data.length; i++) {\n \n $(\"#username\").val(data[i].UserName);\n $(\"#mailREG\").val(data[i].UserName.toString() + \"@mail\");\n $(\"#loz1REG\").val(data[i].Password);\n $(\"#loz2REG\").val(data[i].Password);\n var username = $(\"#username\").val();\n var email = $(\"#mailREG\").val();\n var loz1 = $(\"#loz1REG\").val();\n var loz2 = $(\"#loz2REG\").val();\n var sendData = {\n \"UserName\": username,\n \"Email\": email,\n \"Password\": loz1,\n \"ConfirmPassword\": loz2\n };\n \n $.ajax({\n type: \"POST\",\n url: 'https://' + host + \"/api/Account/Register\",\n data: sendData\n }).done(function (data) {\n refreshRegistracion();\n }).fail(function (data) {\n refreshRegistracion();\n return;\n });\n }\n }\n }", "title": "" }, { "docid": "13979927924dc3279d8550e70cb31b61", "score": "0.5946711", "text": "function register(frmData) {\r\n\tlet url = 'php/registerUser.php';\r\n\tfetch(url, {\r\n\t\t\tmethod: 'POST',\r\n\t\t\tbody: frmData\r\n\t\t})\r\n\t\t.then(response => {\r\n\t\t\treturn response.json(); // convert the RESPONSE to JSON data\r\n\t\t})\r\n\t\t.then(myJson => { // take the JSON data\r\n\t\t\t// check RESPONSE\r\n\t\t\tlet msg = \"\";\r\n\t\t\tif (myJson.err < 0) { // errors!\r\n\t\t\t\tmsg = myJson.msg;\r\n\t\t\t} else { // id of new record can be retrieve via myJson.newID;\r\n\t\t\t\tmsg = \"User Account Created!\";\r\n\t\t\t}\r\n\t\t\tdisplayMsg( msg ); // display Message\r\n\t\t})\r\n\t\t.catch(error => console.error('Error:', error));\r\n\treturn false;\r\n}", "title": "" }, { "docid": "a1557817ff77f6670ba22f60bb274539", "score": "0.59460086", "text": "function registerUser(myData) {\n let myURL = \"registration\";\n ajaxPostService(myURL, myData, \"Registration success...\", \"Registration failed...\");\n}", "title": "" }, { "docid": "c969c979bcac75e588239b0e32152226", "score": "0.5942883", "text": "Register(){\n return fetch(\"http://10.0.2.2:3333/api/v0.0.5/user\",\n {\n method: 'POST',\n headers:{\n Accept:'application/json',\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n given_name: this.state.givenName,\n family_name: this.state.familyName,\n email: this.state.email,\n password: this.state.password\n })\n })\n .then((response) => {\n console.log(response);\n if(response.ok){\n this.props.navigation.navigate('Login')\n }\n })\n .catch((error) => {\n console.error(error);\n });\n }", "title": "" }, { "docid": "63339bdbf391f1ee5820dc62179b465b", "score": "0.59419256", "text": "async register(context) {\n console.log('executing register');\n try {\n if (!context.request.body) {\n return;\n }\n context.response.body = await userService.create(context.request.body);\n } catch (error) {\n console.log(error);\n console.log(context);\n context.body = error.message;\n context.throw(error);\n }\n }", "title": "" }, { "docid": "2b15f6432cafdd65f911c98288d96135", "score": "0.5937785", "text": "async function register(user, context) {\n var api = utils.createHttp();\n await api.post('/register', user)\n .then(response => {\n if(response.status == 200){\n context.$toast.success(\"Successful Registration\", { position: \"bottom\"})\n router.push(\"/login\")\n }})\n .catch(error => {\n if(error.response == undefined){\n router.push({name: \"error\", params: {msg : \"404 - Server side error\"}})\n }\n else if(error.response.status == 403){\n context.$toast.error(\"Email already exists\", { position: \"bottom\"} )\n }\n else{\n router.push({name: \"error\", params: {msg : error.response}})\n }\n });\n}", "title": "" }, { "docid": "970460c878cfefaaba743f98e9f9d542", "score": "0.5930054", "text": "addUser() {\n if (this.state.uname.length < 8 || this.state.code.length < 8 || this.state.uname.length > 50 || this.state.code.length > 50) {\n this.setState({\n message: 'Username and code must be between 8 and 50 characters.',\n hasMessage: true\n })\n return\n }\n var admin = 0\n if (this.state.isAdmin) {\n admin = 1\n }\n var toSend = `{\"username\" : \"${this.state.uname}\", \"regkey\" : \"${this.state.code}\", \"admin\" : ${admin}}`\n var request = new XMLHttpRequest()\n request.open(\"POST\", \"/createuser\", true)\n request.setRequestHeader('Content-Type', 'application/json')\n request.send(toSend)\n request.onload = function () {\n if (request.status != 200) {\n let theMessage = 'Error performing action.'\n if (request.status === 418) {\n theMessage = 'That username already exists.'\n }\n this.setState({\n message: theMessage,\n hasMessage: true\n })\n }\n else {\n this.search()\n this.setState({\n hasMessage: false,\n uname: '',\n code: ''\n })\n }\n }.bind(this)\n request.onerror = function () {\n this.setState({\n message: 'Error performing action.',\n hasMessage: true\n })\n }.bind(this)\n }", "title": "" } ]
29358e844f4baf3ba2dc72e7cd6d8b20
Integer / Boolean vectors or arrays thereof (always flat arrays)
[ { "docid": "2933bc1f84298bebee741bb545408a72", "score": "0.0", "text": "function setValue2iv( gl, v ) { gl.uniform2iv( this.addr, v ); }", "title": "" } ]
[ { "docid": "a5757305b18f7c8d81b12fd44cc9abc8", "score": "0.6455608", "text": "function i(t){return Array.isArray(t)}", "title": "" }, { "docid": "dcf1f2f9a4f8c52ec395ab8fcf29e96b", "score": "0.64220434", "text": "function ArrayBoolean() {\n if ([] && [1]) { /* truthy && truthy */\n return [true, true];\n } else if ([] && ![1]) { /* truthy && falsey */\n return [true, false];\n } else if (![] && [1]) { /* falsey && truthy */\n return [false, true];\n } else {\n return [false, false];\n }\n}", "title": "" }, { "docid": "14e96dd83cabef3649025c029dbb1f7a", "score": "0.6084791", "text": "function Int32Array() {}", "title": "" }, { "docid": "6b46a5a1143b62840b1b9712fc9d002f", "score": "0.59901816", "text": "function array (x) { return isArray(x) ? x : [x] }", "title": "" }, { "docid": "b5faf1a19bd4fe6ddcf7640e1a30684c", "score": "0.5924647", "text": "function _t(A){return\"[object Array]\"===Vt.call(A)}", "title": "" }, { "docid": "672993c1a8ea2fad68f58d441bfeb43d", "score": "0.59142876", "text": "function array_booleano(longitud,valor){\n\tvar array = new Array(longitud);\n\tfor(var i = 0; i < array.length;i++){\n\t\tarray[i] =valor;\n\t}\n\treturn array;\n}", "title": "" }, { "docid": "81e1296abcbeead9bf7bd4c35d4a7979", "score": "0.5865091", "text": "function isIntArray(arr) {\n return false;\n}", "title": "" }, { "docid": "0375bdb1073612ab2d80c73ba1776dce", "score": "0.5857492", "text": "function BooleanArrGen(){\r\n\tvar booleanArr = new Array();\r\n\tfor(var i=0;i<9;i++){\r\n\t\tbooleanArr[i]=new Array();\r\n\t\tfor(var j=0;j<9;j++){\r\n\t\t\tbooleanArr[i][j]=true;\r\n\t\t}\r\n\t}\r\n\treturn booleanArr;\r\n}", "title": "" }, { "docid": "2aca619035b74de6c2a9cd87b2d3e013", "score": "0.5838197", "text": "function forceArray(v) {\r\n if (null === v) {\r\n return [];\r\n }\r\n switch (typeof v) {\r\n case 'number':\r\n case 'string':\r\n case 'boolean':\r\n return [v];\r\n case 'object':\r\n return v;\r\n case 'undefined':\r\n return [];\r\n break;\r\n }\r\n}", "title": "" }, { "docid": "647d4adc94b9da4294c36dcc5a9cc688", "score": "0.5756933", "text": "function _isArray(v) {\n return Array.isArray(v);\n}", "title": "" }, { "docid": "647d4adc94b9da4294c36dcc5a9cc688", "score": "0.5756933", "text": "function _isArray(v) {\n return Array.isArray(v);\n}", "title": "" }, { "docid": "647d4adc94b9da4294c36dcc5a9cc688", "score": "0.5756933", "text": "function _isArray(v) {\n return Array.isArray(v);\n}", "title": "" }, { "docid": "070295b3c8cf8e6f6c4d2f7bafaad5d1", "score": "0.57387924", "text": "function array (data) {\n return Array.isArray(data);\n }", "title": "" }, { "docid": "56abfbe3d527e78e34182ae901af1246", "score": "0.5701443", "text": "isArray()\n {\n return InputArgument.IS_ARRAY === (InputArgument.IS_ARRAY & this.mode);\n }", "title": "" }, { "docid": "3b243a3c7248880f57db62b2f7b1cf58", "score": "0.5687286", "text": "function toVector(arr) {\n return concat.apply([], arr);\n}", "title": "" }, { "docid": "3b243a3c7248880f57db62b2f7b1cf58", "score": "0.5687286", "text": "function toVector(arr) {\n return concat.apply([], arr);\n}", "title": "" }, { "docid": "3b243a3c7248880f57db62b2f7b1cf58", "score": "0.5687286", "text": "function toVector(arr) {\n return concat.apply([], arr);\n}", "title": "" }, { "docid": "c020ea4b909069b708451ba9c1285aaa", "score": "0.5632621", "text": "function isArray(ar){return Array.isArray(ar);}", "title": "" }, { "docid": "c020ea4b909069b708451ba9c1285aaa", "score": "0.5632621", "text": "function isArray(ar){return Array.isArray(ar);}", "title": "" }, { "docid": "c020ea4b909069b708451ba9c1285aaa", "score": "0.5632621", "text": "function isArray(ar){return Array.isArray(ar);}", "title": "" }, { "docid": "c020ea4b909069b708451ba9c1285aaa", "score": "0.5632621", "text": "function isArray(ar){return Array.isArray(ar);}", "title": "" }, { "docid": "d6d738cee9434fea5fbb757f0c4bff7d", "score": "0.5606776", "text": "function isArray1D(a) {\n return !isArrayOrTypedArray(a[0]);\n }", "title": "" }, { "docid": "50eb1e830b7053d16d31f37df0c36e26", "score": "0.5589659", "text": "toArrays () {\n return this.value.map( x => Array.from(x) )\n }", "title": "" }, { "docid": "f5115f14ca9d4c95576db70e43657770", "score": "0.55667776", "text": "function T_irregular(MatrixA){\nvar i, j, transposed_matrix = [];\n var originalWidth, originalHeight;\n for (i=0; i<vec1.length; ++i){\n transposed_matrix.push([])\n if (vec1[i].constructor === Array){\n //pass\n }\n else{\n //pass\n }\n }\n}", "title": "" }, { "docid": "f4ed984ecf7a5ef8b4c77d79e48d990e", "score": "0.5552428", "text": "function c(a){return p(a)?\"array\":typeof a}", "title": "" }, { "docid": "36e918e41dc9675bf5d45ad0bfb12c1c", "score": "0.5542426", "text": "function isDataArray(x) {\n return Array.isArray(x);\n}", "title": "" }, { "docid": "4fab182b8695ce7194cae26d315473fb", "score": "0.55266505", "text": "function isDataArray(x) {\n return Array.isArray(x);\n}", "title": "" }, { "docid": "21e4e74a2336ccaae77bbc13e8bb385b", "score": "0.5526437", "text": "function BitVector() {\n}", "title": "" }, { "docid": "b799eae3fd49bc8f443af7470a6abdec", "score": "0.5519844", "text": "function TypeArray () {}", "title": "" }, { "docid": "c452325f03fd0db396d24946b5d88f94", "score": "0.5514588", "text": "function isArray1D(a) {\n return !isArrayOrTypedArray(a[0]);\n}", "title": "" }, { "docid": "c2d5a76fb8efd7a066e95c7e0ae23ccc", "score": "0.5512585", "text": "function arrayWrap(val) {\r\n\t return predicates_1.isArray(val) ? val : (predicates_1.isDefined(val) ? [val] : []);\r\n\t }", "title": "" }, { "docid": "e78a1ed3c23f754b2094f2766d76b70b", "score": "0.5496806", "text": "static identity () {\n return [\n 1, 0, 0, 0,\n 0, 1, 0, 0,\n 0, 0, 1, 0,\n 0, 0, 0, 1\n ];\n }", "title": "" }, { "docid": "4076354894171544cfe422907f688368", "score": "0.5492621", "text": "function t(e){return Array.isArray(e)}", "title": "" }, { "docid": "4076354894171544cfe422907f688368", "score": "0.5492621", "text": "function t(e){return Array.isArray(e)}", "title": "" }, { "docid": "f80b02d54f15de594cc84d76d12c128b", "score": "0.5489421", "text": "function getTrueIndices(valueArray, boolArray) {\n var trueValues = [];\n for (var i = 0; i < boolArray.length; i++) {\n if (boolArray[i]) {\n trueValues.push(valueArray[i]);\n }\n }\n return trueValues;\n}", "title": "" }, { "docid": "a3528716c4b763462b22e1760aa79045", "score": "0.5478142", "text": "function isArray(data_input) {\n return Array.isArray(data_input) \n }", "title": "" }, { "docid": "e84d764d31d5962167e9f0cc6da20cc8", "score": "0.5469504", "text": "function Int16Array() {}", "title": "" }, { "docid": "e491dcabf6c43a7a2eef9f31d9f141bd", "score": "0.5465363", "text": "function isArray(value) {\n return Array.isArray(value) || ArrayBuffer.isView(value);\n}", "title": "" }, { "docid": "33eb3c0a248876f334a253eefbb98ed8", "score": "0.5453405", "text": "function is_array(inp){\r\n res = Array.isArray(inp);\r\n return res;\r\n}", "title": "" }, { "docid": "0185ff971dacbaac7b34e51d52331b6c", "score": "0.5400142", "text": "function typedArraySupport(){try{var arr=new Uint8Array(1);return arr.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},arr.foo()===42&&typeof arr.subarray==\"function\"&&arr.subarray(1,1).byteLength===0}catch(e){return!1}}", "title": "" }, { "docid": "9c3d0cc614fedacf7e08f64152522d6d", "score": "0.5393246", "text": "function isArray(val) {\n return val instanceof Array;\n }", "title": "" }, { "docid": "824a3400cb76637c447f0e73af7abd11", "score": "0.538517", "text": "function g(a){return Array.isArray(a)?a:[a]}", "title": "" }, { "docid": "491502268ad9a57287e7cb3bd219f83c", "score": "0.538393", "text": "function fnIsArray(input){\n return Array.isArray(input);\n}", "title": "" }, { "docid": "25bf4adb5072eb1a09dfebe52e154877", "score": "0.538351", "text": "function array(items) {\n return _concat(_serializeNumber(4 /* Array */, items.length), ...items);\n}", "title": "" }, { "docid": "663f1d060f66789ec5e4fc4eb26215db", "score": "0.5381824", "text": "static isArray(arg) {\n return Array.isArray(arg);\n }", "title": "" }, { "docid": "6153ebc29ae2f2cdfeea2f26ff0d8319", "score": "0.53782326", "text": "function areValuesArrays(arr) {\n for (let elem of arr) {\n if (Array.isArray(elem) === false) {\n return false;\n }\n }\n return true;\n}", "title": "" }, { "docid": "ad9860bbe45635cffa524cc6aab9cb5d", "score": "0.5373283", "text": "function _toConsumableArray(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t<e.length;t++)i[t]=e[t];return i}return Array.from(e)}", "title": "" }, { "docid": "ad9860bbe45635cffa524cc6aab9cb5d", "score": "0.5373283", "text": "function _toConsumableArray(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t<e.length;t++)i[t]=e[t];return i}return Array.from(e)}", "title": "" }, { "docid": "ad9860bbe45635cffa524cc6aab9cb5d", "score": "0.5373283", "text": "function _toConsumableArray(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t<e.length;t++)i[t]=e[t];return i}return Array.from(e)}", "title": "" }, { "docid": "ad9860bbe45635cffa524cc6aab9cb5d", "score": "0.5373283", "text": "function _toConsumableArray(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t<e.length;t++)i[t]=e[t];return i}return Array.from(e)}", "title": "" }, { "docid": "0fbd8d640dc50ae77cf9faad3b6c67bd", "score": "0.5358581", "text": "function isArray(input) {\n return Array.isArray(input);\n}", "title": "" }, { "docid": "68171003aa095d9fa872affb7cfa5e44", "score": "0.5354536", "text": "function isArray(xs) {\n return toString.call(xs) === '[object Array]';\n}", "title": "" }, { "docid": "68171003aa095d9fa872affb7cfa5e44", "score": "0.5354536", "text": "function isArray(xs) {\n return toString.call(xs) === '[object Array]';\n}", "title": "" }, { "docid": "68171003aa095d9fa872affb7cfa5e44", "score": "0.5354536", "text": "function isArray(xs) {\n return toString.call(xs) === '[object Array]';\n}", "title": "" }, { "docid": "68171003aa095d9fa872affb7cfa5e44", "score": "0.5354536", "text": "function isArray(xs) {\n return toString.call(xs) === '[object Array]';\n}", "title": "" }, { "docid": "68171003aa095d9fa872affb7cfa5e44", "score": "0.5354536", "text": "function isArray(xs) {\n return toString.call(xs) === '[object Array]';\n}", "title": "" }, { "docid": "68171003aa095d9fa872affb7cfa5e44", "score": "0.5354536", "text": "function isArray(xs) {\n return toString.call(xs) === '[object Array]';\n}", "title": "" }, { "docid": "68171003aa095d9fa872affb7cfa5e44", "score": "0.5354536", "text": "function isArray(xs) {\n return toString.call(xs) === '[object Array]';\n}", "title": "" }, { "docid": "68171003aa095d9fa872affb7cfa5e44", "score": "0.5354536", "text": "function isArray(xs) {\n return toString.call(xs) === '[object Array]';\n}", "title": "" }, { "docid": "68171003aa095d9fa872affb7cfa5e44", "score": "0.5354536", "text": "function isArray(xs) {\n return toString.call(xs) === '[object Array]';\n}", "title": "" }, { "docid": "68171003aa095d9fa872affb7cfa5e44", "score": "0.5354536", "text": "function isArray(xs) {\n return toString.call(xs) === '[object Array]';\n}", "title": "" }, { "docid": "68171003aa095d9fa872affb7cfa5e44", "score": "0.5354536", "text": "function isArray(xs) {\n return toString.call(xs) === '[object Array]';\n}", "title": "" }, { "docid": "68171003aa095d9fa872affb7cfa5e44", "score": "0.5354536", "text": "function isArray(xs) {\n return toString.call(xs) === '[object Array]';\n}", "title": "" }, { "docid": "68171003aa095d9fa872affb7cfa5e44", "score": "0.5354536", "text": "function isArray(xs) {\n return toString.call(xs) === '[object Array]';\n}", "title": "" }, { "docid": "68171003aa095d9fa872affb7cfa5e44", "score": "0.5354536", "text": "function isArray(xs) {\n return toString.call(xs) === '[object Array]';\n}", "title": "" }, { "docid": "05c256b8a1da4ab5fb044ad819735b3a", "score": "0.5341613", "text": "function isArray(val) {\n return Array.isArray(val);\n}", "title": "" }, { "docid": "05c256b8a1da4ab5fb044ad819735b3a", "score": "0.5341613", "text": "function isArray(val) {\n return Array.isArray(val);\n}", "title": "" }, { "docid": "05c256b8a1da4ab5fb044ad819735b3a", "score": "0.5341613", "text": "function isArray(val) {\n return Array.isArray(val);\n}", "title": "" }, { "docid": "05c256b8a1da4ab5fb044ad819735b3a", "score": "0.5341613", "text": "function isArray(val) {\n return Array.isArray(val);\n}", "title": "" }, { "docid": "05c256b8a1da4ab5fb044ad819735b3a", "score": "0.5341613", "text": "function isArray(val) {\n return Array.isArray(val);\n}", "title": "" }, { "docid": "1ffe1b9f0f5750fdb49df4e039d77452", "score": "0.5339739", "text": "function arrayLike (data) {\n return assigned(data) && number(data.length);\n }", "title": "" }, { "docid": "a6a75472c4b3798197c80bac71bdcddc", "score": "0.53365105", "text": "function getUnionOrEvolvingArrayType(types,subtypeReduction){return isEvolvingArrayTypeList(types)?getEvolvingArrayType(getUnionType(ts.map(types,getElementTypeOfEvolvingArrayType))):getUnionType(ts.sameMap(types,finalizeEvolvingArrayType),subtypeReduction);}// Return true if the given node is 'x' in an 'x.length', x.push(value)', 'x.unshift(value)' or", "title": "" }, { "docid": "12c3823cd256744b931f834e394bb762", "score": "0.5322407", "text": "function isArray$1(arr) {\n\t return Array.isArray(arr);\n\t}", "title": "" }, { "docid": "c2d13e0bf0a293df0efff72ea4e89900", "score": "0.53210086", "text": "function vectorAsArray(vectorObj) {\n return [\n vectorObj.x,\n vectorObj.y,\n vectorObj.z\n ];\n}", "title": "" }, { "docid": "ceb086bc7659a2d037d4aa02f370ac13", "score": "0.530706", "text": "function isArray(a) {\n return Array.isArray(a);\n}", "title": "" }, { "docid": "8d7a49de0a1e93fb8f8ee3b14988e6be", "score": "0.530436", "text": "function n$J(){return new Float32Array(2)}", "title": "" }, { "docid": "925431e64f1c6fcbb9be4e336856a823", "score": "0.53042626", "text": "function arrayWrap(val) { return isArray(val) ? val : (isDefined(val) ? [ val ] : []); }", "title": "" }, { "docid": "925431e64f1c6fcbb9be4e336856a823", "score": "0.53042626", "text": "function arrayWrap(val) { return isArray(val) ? val : (isDefined(val) ? [ val ] : []); }", "title": "" }, { "docid": "925431e64f1c6fcbb9be4e336856a823", "score": "0.53042626", "text": "function arrayWrap(val) { return isArray(val) ? val : (isDefined(val) ? [ val ] : []); }", "title": "" }, { "docid": "925431e64f1c6fcbb9be4e336856a823", "score": "0.53042626", "text": "function arrayWrap(val) { return isArray(val) ? val : (isDefined(val) ? [ val ] : []); }", "title": "" }, { "docid": "925431e64f1c6fcbb9be4e336856a823", "score": "0.53042626", "text": "function arrayWrap(val) { return isArray(val) ? val : (isDefined(val) ? [ val ] : []); }", "title": "" }, { "docid": "925431e64f1c6fcbb9be4e336856a823", "score": "0.53042626", "text": "function arrayWrap(val) { return isArray(val) ? val : (isDefined(val) ? [ val ] : []); }", "title": "" }, { "docid": "925431e64f1c6fcbb9be4e336856a823", "score": "0.53042626", "text": "function arrayWrap(val) { return isArray(val) ? val : (isDefined(val) ? [ val ] : []); }", "title": "" }, { "docid": "925431e64f1c6fcbb9be4e336856a823", "score": "0.53042626", "text": "function arrayWrap(val) { return isArray(val) ? val : (isDefined(val) ? [ val ] : []); }", "title": "" }, { "docid": "925431e64f1c6fcbb9be4e336856a823", "score": "0.53042626", "text": "function arrayWrap(val) { return isArray(val) ? val : (isDefined(val) ? [ val ] : []); }", "title": "" }, { "docid": "925431e64f1c6fcbb9be4e336856a823", "score": "0.53042626", "text": "function arrayWrap(val) { return isArray(val) ? val : (isDefined(val) ? [ val ] : []); }", "title": "" }, { "docid": "925431e64f1c6fcbb9be4e336856a823", "score": "0.53042626", "text": "function arrayWrap(val) { return isArray(val) ? val : (isDefined(val) ? [ val ] : []); }", "title": "" }, { "docid": "925431e64f1c6fcbb9be4e336856a823", "score": "0.53042626", "text": "function arrayWrap(val) { return isArray(val) ? val : (isDefined(val) ? [ val ] : []); }", "title": "" }, { "docid": "925431e64f1c6fcbb9be4e336856a823", "score": "0.53042626", "text": "function arrayWrap(val) { return isArray(val) ? val : (isDefined(val) ? [ val ] : []); }", "title": "" }, { "docid": "925431e64f1c6fcbb9be4e336856a823", "score": "0.53042626", "text": "function arrayWrap(val) { return isArray(val) ? val : (isDefined(val) ? [ val ] : []); }", "title": "" }, { "docid": "925431e64f1c6fcbb9be4e336856a823", "score": "0.53042626", "text": "function arrayWrap(val) { return isArray(val) ? val : (isDefined(val) ? [ val ] : []); }", "title": "" }, { "docid": "925431e64f1c6fcbb9be4e336856a823", "score": "0.53042626", "text": "function arrayWrap(val) { return isArray(val) ? val : (isDefined(val) ? [ val ] : []); }", "title": "" }, { "docid": "925431e64f1c6fcbb9be4e336856a823", "score": "0.53042626", "text": "function arrayWrap(val) { return isArray(val) ? val : (isDefined(val) ? [ val ] : []); }", "title": "" }, { "docid": "925431e64f1c6fcbb9be4e336856a823", "score": "0.53042626", "text": "function arrayWrap(val) { return isArray(val) ? val : (isDefined(val) ? [ val ] : []); }", "title": "" }, { "docid": "925431e64f1c6fcbb9be4e336856a823", "score": "0.53042626", "text": "function arrayWrap(val) { return isArray(val) ? val : (isDefined(val) ? [ val ] : []); }", "title": "" }, { "docid": "925431e64f1c6fcbb9be4e336856a823", "score": "0.53042626", "text": "function arrayWrap(val) { return isArray(val) ? val : (isDefined(val) ? [ val ] : []); }", "title": "" }, { "docid": "925431e64f1c6fcbb9be4e336856a823", "score": "0.53042626", "text": "function arrayWrap(val) { return isArray(val) ? val : (isDefined(val) ? [ val ] : []); }", "title": "" }, { "docid": "925431e64f1c6fcbb9be4e336856a823", "score": "0.53042626", "text": "function arrayWrap(val) { return isArray(val) ? val : (isDefined(val) ? [ val ] : []); }", "title": "" }, { "docid": "925431e64f1c6fcbb9be4e336856a823", "score": "0.53042626", "text": "function arrayWrap(val) { return isArray(val) ? val : (isDefined(val) ? [ val ] : []); }", "title": "" }, { "docid": "925431e64f1c6fcbb9be4e336856a823", "score": "0.53042626", "text": "function arrayWrap(val) { return isArray(val) ? val : (isDefined(val) ? [ val ] : []); }", "title": "" }, { "docid": "925431e64f1c6fcbb9be4e336856a823", "score": "0.53042626", "text": "function arrayWrap(val) { return isArray(val) ? val : (isDefined(val) ? [ val ] : []); }", "title": "" } ]
f22ebb16d7ff8755351d274f136757e9
add custom buttons for the zoomin/zoomout on the map
[ { "docid": "74cce3622e522364fe3277623cd15f6d", "score": "0.72547483", "text": "function CustomZoomControl(controlDiv, map) {\n\t\t//grap the zoom elements from the DOM and insert them in the map \n\t \tvar controlUIzoomIn= document.getElementById('cd-zoom-in'),\n\t \t\tcontrolUIzoomOut= document.getElementById('cd-zoom-out');\n\t \tcontrolDiv.appendChild(controlUIzoomIn);\n\t \tcontrolDiv.appendChild(controlUIzoomOut);\n\n\t\t// Setup the click event listeners and zoom-in or out according to the clicked element\n\t\tgoogle.maps.event.addDomListener(controlUIzoomIn, 'click', function() {\n\t\t map.setZoom(map.getZoom()+1)\n\t\t});\n\t\tgoogle.maps.event.addDomListener(controlUIzoomOut, 'click', function() {\n\t\t map.setZoom(map.getZoom()-1)\n\t\t});\n\t}", "title": "" } ]
[ { "docid": "2e4249ca456890c7dcb88609d35ebe8b", "score": "0.78491664", "text": "function mapZoomControl() {\n}", "title": "" }, { "docid": "fe8b5c6dd07ecf221cf009a3d0a037c3", "score": "0.7481496", "text": "function zoom() {\n // redraw the map with a new image, using the new zoom settings\n drawMap();\n // disable buttons depending on zoom number\n if(defaults.zoom == 0) {\n $(\"#minus\").animate({ \n opacity: 0.5,\n }, defaults.speed);\n } else {\n $(\"#minus\").animate({ \n opacity: 1,\n }, defaults.speed);\n }\n if(defaults.zoom == defaults.zoom_sizes.length - 1) {\n $(\"#plus\").animate({ \n opacity: 0.5,\n }, defaults.speed);\n } else {\n $(\"#plus\").animate({ \n opacity: 1,\n }, defaults.speed);\n }\n }", "title": "" }, { "docid": "6e0398ed75a5288b175645db06ffd8f8", "score": "0.74390334", "text": "bindZoomButtons() {\n this.zoomInButton.addEventListener(\"click\", function() {\n return fg.mindmap.zoomIn();\n });\n return this.zoomOutButton.addEventListener(\"click\", function() {\n return fg.mindmap.zoomOut();\n });\n }", "title": "" }, { "docid": "8c0aea575a3afba06c772c80c86f95b8", "score": "0.73970413", "text": "function customZoomControl() {\n}", "title": "" }, { "docid": "6d9fa898970c03f8ffd75c8b24c64373", "score": "0.73513407", "text": "function CustomZoomControl(controlDiv, map) {\n\t\t\t//grap the zoom elements from the DOM and insert them in the map \n\t\t\tvar controlUIzoomIn= document.getElementById('cd-zoom-in'),\n\t\t\t\tcontrolUIzoomOut= document.getElementById('cd-zoom-out');\n\t\t\tcontrolDiv.appendChild(controlUIzoomIn);\n\t\t\tcontrolDiv.appendChild(controlUIzoomOut);\n\n\t\t\t// Setup the click event listeners and zoom-in or out according to the clicked element\n\t\t\tgoogle.maps.event.addDomListener(controlUIzoomIn, 'click', function() {\n\t\t\t\tmap.setZoom(map.getZoom()+1)\n\t\t\t});\n\t\t\tgoogle.maps.event.addDomListener(controlUIzoomOut, 'click', function() {\n\t\t\t\tmap.setZoom(map.getZoom()-1)\n\t\t\t});\n\t\t}", "title": "" }, { "docid": "5a230520105d81292dbf6d22f88b8cac", "score": "0.73013896", "text": "function CustomZoomControl(controlDiv, map) {\n //grap the zoom elements from the DOM and insert them in the map\n var controlUIzoomIn = document.getElementById('zoom-in'),\n controlUIzoomOut = document.getElementById('zoom-out');\n controlDiv.appendChild(controlUIzoomIn);\n controlDiv.appendChild(controlUIzoomOut);\n\n // Setup the click event listeners and zoom-in or out according to the clicked element\n google.maps.event.addDomListener(controlUIzoomIn, 'click', function () {\n map.setZoom(map.getZoom() + 1)\n });\n google.maps.event.addDomListener(controlUIzoomOut, 'click', function () {\n map.setZoom(map.getZoom() - 1)\n });\n }", "title": "" }, { "docid": "b3612deaf6102d5179fac9146670ee66", "score": "0.7288453", "text": "function CustomZoomControl(controlDiv, map) {\n //grap the zoom elements from the DOM and insert them in the map \n var controlUIzoomIn = document.getElementById('cd-zoom-in'),\n controlUIzoomOut = document.getElementById('cd-zoom-out');\n controlDiv.appendChild(controlUIzoomIn);\n controlDiv.appendChild(controlUIzoomOut);\n\n // Setup the click event listeners and zoom-in or out according to the clicked element\n google.maps.event.addDomListener(controlUIzoomIn, 'click', function() {\n map.setZoom(map.getZoom() + 1)\n });\n google.maps.event.addDomListener(controlUIzoomOut, 'click', function() {\n map.setZoom(map.getZoom() - 1)\n });\n }", "title": "" }, { "docid": "e7ba1930a7f2b74c462acc313a9df348", "score": "0.7266055", "text": "function CustomZoomControl(controlDiv, map) {\r\n\t\t\t//grap the zoom elements from the DOM and insert them in the map \r\n\t\t\tvar controlUIzoomIn= document.getElementById('cd-zoom-in'),\r\n\t\t\t\tcontrolUIzoomOut= document.getElementById('cd-zoom-out');\r\n\t\t\tcontrolDiv.appendChild(controlUIzoomIn);\r\n\t\t\tcontrolDiv.appendChild(controlUIzoomOut);\r\n\r\n\t\t\t// Setup the click event listeners and zoom-in or out according to the clicked element\r\n\t\t\tgoogle.maps.event.addDomListener(controlUIzoomIn, 'click', function() {\r\n\t\t\t\tmap.setZoom(map.getZoom()+1)\r\n\t\t\t});\r\n\t\t\tgoogle.maps.event.addDomListener(controlUIzoomOut, 'click', function() {\r\n\t\t\t\tmap.setZoom(map.getZoom()-1)\r\n\t\t\t});\r\n\t\t}", "title": "" }, { "docid": "a63294883c6844f9ac409cb98bdfeeee", "score": "0.72468734", "text": "function HomeControl(controlDiv, map) {\n google.maps.event.addDomListener(zoomout, 'click', function() {\n var currentZoomLevel = map.getZoom();\n if(currentZoomLevel != 0){\n map.setZoom(currentZoomLevel - 1);} \n });\n\n google.maps.event.addDomListener(zoomin, 'click', function() {\n var currentZoomLevel = map.getZoom();\n if(currentZoomLevel != 21){\n map.setZoom(currentZoomLevel + 1);}\n });\n\n}", "title": "" }, { "docid": "4899e283afd122cd953a5421b325a2e2", "score": "0.7242411", "text": "function CustomZoomControl(controlDiv, map) {\n\t\t//grap the zoom elements from the DOM and insert them in the map \n\t \tvar controlUIzoomIn= document.getElementById('cd-zoom-in'),\n\t \tcontrolUIzoomOut= document.getElementById('cd-zoom-out');\n\n\t}", "title": "" }, { "docid": "f1fb2d15a6ccfa6492f22a4e0bc94547", "score": "0.72265255", "text": "function CustomZoomControl(controlDiv, map) {\n\t\t\t\t\t//grap the zoom elements from the DOM and insert them in the map \n\t\t\t\t \tvar controlUIzoomIn= document.getElementById('cd-zoom-in'),\n\t\t\t\t \t\tcontrolUIzoomOut= document.getElementById('cd-zoom-out');\n\t\t\t\t \tcontrolDiv.appendChild(controlUIzoomIn);\n\t\t\t\t \tcontrolDiv.appendChild(controlUIzoomOut);\n\n\t\t\t\t\t// Setup the click event listeners and zoom-in or out according to the clicked element\n\t\t\t\t\tgoogle.maps.event.addDomListener(controlUIzoomIn, 'click', function() {\n\t\t\t\t\t map.setZoom(map.getZoom()+1);\n\t\t\t\t\t});\n\t\t\t\t\tgoogle.maps.event.addDomListener(controlUIzoomOut, 'click', function() {\n\t\t\t\t\t map.setZoom(map.getZoom()-1);\n\t\t\t\t\t});\n\t\t\t\t}", "title": "" }, { "docid": "ce6556f61bb7829568e6a998a6505d45", "score": "0.7199728", "text": "function CustomZoomControl(controlDiv, map) {\r\n\t\t//grap the zoom elements from the DOM and insert them in the map \r\n\t \tvar controlUIzoomIn= document.getElementById('cd-zoom-in'),\r\n\t \t\tcontrolUIzoomOut= document.getElementById('cd-zoom-out');\r\n\t \tcontrolDiv.appendChild(controlUIzoomIn);\r\n\t \tcontrolDiv.appendChild(controlUIzoomOut);\r\n\r\n\t\t// Setup the click event listeners and zoom-in or out according to the clicked element\r\n\t\tgoogle.maps.event.addDomListener(controlUIzoomIn, 'click', function() {\r\n\t\t map.setZoom(map.getZoom()+1)\r\n\t\t});\r\n\t\tgoogle.maps.event.addDomListener(controlUIzoomOut, 'click', function() {\r\n\t\t map.setZoom(map.getZoom()-1)\r\n\t\t});\r\n\t}", "title": "" }, { "docid": "ce6556f61bb7829568e6a998a6505d45", "score": "0.7199728", "text": "function CustomZoomControl(controlDiv, map) {\r\n\t\t//grap the zoom elements from the DOM and insert them in the map \r\n\t \tvar controlUIzoomIn= document.getElementById('cd-zoom-in'),\r\n\t \t\tcontrolUIzoomOut= document.getElementById('cd-zoom-out');\r\n\t \tcontrolDiv.appendChild(controlUIzoomIn);\r\n\t \tcontrolDiv.appendChild(controlUIzoomOut);\r\n\r\n\t\t// Setup the click event listeners and zoom-in or out according to the clicked element\r\n\t\tgoogle.maps.event.addDomListener(controlUIzoomIn, 'click', function() {\r\n\t\t map.setZoom(map.getZoom()+1)\r\n\t\t});\r\n\t\tgoogle.maps.event.addDomListener(controlUIzoomOut, 'click', function() {\r\n\t\t map.setZoom(map.getZoom()-1)\r\n\t\t});\r\n\t}", "title": "" }, { "docid": "c4a85f76aadfab8fd11e23ebdb9dfd92", "score": "0.7186751", "text": "function CustomZoomControl(controlDiv, map) {\n\t\t//grap the zoom elements from the DOM and insert them in the map\n\t \tvar controlUIzoomIn= document.getElementById('cd-zoom-in'),\n\t \t\tcontrolUIzoomOut= document.getElementById('cd-zoom-out');\n\t \tcontrolDiv.appendChild(controlUIzoomIn);\n\t \tcontrolDiv.appendChild(controlUIzoomOut);\n\n\t\t// Setup the click event listeners and zoom-in or out according to the clicked element\n\t\tgoogle.maps.event.addDomListener(controlUIzoomIn, 'click', function() {\n\t\t map.setZoom(map.getZoom()+1)\n\t\t});\n\t\tgoogle.maps.event.addDomListener(controlUIzoomOut, 'click', function() {\n\t\t map.setZoom(map.getZoom()-1)\n\t\t});\n\t}", "title": "" }, { "docid": "fa709971ab98311464c90509c04182e7", "score": "0.7065769", "text": "function plus() {\n zoomOnClick = true;\n}", "title": "" }, { "docid": "c8f5ecdc1f8962a6de26c5b71aceb091", "score": "0.70338964", "text": "function zoomWithButtons(aZoomOut) {\n var zoom = document.getElementById(\"zoom-menulist\");\n if (aZoomOut && zoom.selectedIndex < 4) {\n zoom.selectedIndex++;\n } else if (!aZoomOut && zoom.selectedIndex > 0) {\n zoom.selectedIndex--;\n }\n setZoomFactor(parseInt(zoom.value));\n}", "title": "" }, { "docid": "177b775ae4c9fe97b5286b9dd62493b9", "score": "0.68695533", "text": "toggleZoom() { }", "title": "" }, { "docid": "58572902a420b8a995243cd78be6e56d", "score": "0.6782267", "text": "function ZoomControls (props) {\n const { map } = props\n\n let mouseDownTime\n\n let mouseDownTimeout\n\n let repeatTimeout\n const zoom = direction => {\n const delta = direction === 'ZOOM_IN' ? 0.1 : -0.1\n\n zoomDelta(map, delta, 350)\n }\n const repeatZoom = direction => {\n zoom(direction)\n repeatTimeout = setTimeout(() => repeatZoom(direction), 350)\n }\n const handleMouseDown = direction => {\n mouseDownTime = Date.now()\n zoom(direction)\n mouseDownTimeout = setTimeout(() => {\n repeatZoom(direction)\n }, 200)\n }\n const stopZoom = direction => {\n if (Date.now() - mouseDownTime < 150) {\n zoom(direction)\n clearTimeout(mouseDownTimeout)\n }\n clearTimeout(repeatTimeout)\n }\n\n return (\n <IconsContainer>\n <Icon\n id='_ol_kit_zoom_in'\n onMouseDown={() => handleMouseDown('ZOOM_IN')}\n onMouseOut={() => stopZoom('ZOOM_IN')}\n onMouseUp={() => stopZoom('ZOOM_IN')}>\n <PLUS />\n </Icon>\n <IconSeparator />\n <Icon\n id='_ol_kit_zoom_out'\n onMouseDown={() => handleMouseDown('ZOOM_OUT')}\n onMouseOut={() => stopZoom('ZOOM_OUT')}\n onMouseUp={() => stopZoom('ZOOM_OUT')}>\n <MINUS />\n </Icon>\n </IconsContainer>\n )\n}", "title": "" }, { "docid": "3f220be7dc7135a927d989a20658e30a", "score": "0.6665468", "text": "function set_zoom_level_in_toolbar() {\n // Set zoom out to disabled / enabled\n if (CURRENT_SCALE == MIN_SCALE) {\n ELEMENT_ZOOM_OUT.className = \"opt disabled\";\n } else {\n ELEMENT_ZOOM_OUT.className = \"opt\";\n }\n\n // Set zoom in to disabled / enabled\n if (CURRENT_SCALE == MAX_SCALE) {\n ELEMENT_ZOOM_IN.className = \"opt disabled\";\n } else {\n ELEMENT_ZOOM_IN.className = \"opt\";\n }\n}", "title": "" }, { "docid": "e49cd010c106aadf41b378d3ec3e6de9", "score": "0.6629576", "text": "function addLocateMeButton(map, maxZoom, maxAge) {\n var locateOptions = {\n position: 'bottomright',\n metric: false,\n drawCircle: false,\n showPopup: false,\n follow: false,\n markerClass: L.marker,\n markerStyle: {\n opacity: 0.0,\n clickable: false,\n keyboard: false\n },\n locateOptions: {\n maxZoom: maxZoom,\n // Cache location response, in ms\n maximumAge: maxAge\n },\n strings: {\n title: 'Zoom to your location.'\n }\n };\n\n L.control.locate(locateOptions).addTo(map);\n}", "title": "" }, { "docid": "6529ba865ef751b2e02cf9555ea8a13a", "score": "0.6566275", "text": "function addMapControl(map, onClick) {\n var buttonId = 'center-button';\n var title = 'My location';\n var centerButton = document.getElementById(buttonId);\n if (map && !centerButton) {\n var controlUI = document.createElement('button');\n controlUI.id = buttonId;\n controlUI.className = 'button button-calm icon ion-android-radio-button-on';\n controlUI.index = 1;\n controlUI.title = title;\n controlUI.style.marginTop = '15px';\n controlUI.addEventListener('click', onClick);\n map.controls[google.maps.ControlPosition.TOP_CENTER].push(controlUI);\n }\n }", "title": "" }, { "docid": "9412ce4de24b83e7a325374eb6b541e5", "score": "0.6520296", "text": "function addMapButtons() {\n // Add button for user location\n var locationButton = document.createElement(\"button\");\n locationButton.setAttribute(\n \"style\",\n \"background: #fff; border:none; outline:none; width:30px; height:30px; border-radius:2px; box-shadow:0 1px 4px rgba(0,0,0,0.3); cursor:pointer; margin-right:10px; padding:0px;\"\n );\n var locationIcon = document.createElement(\"span\");\n locationIcon.setAttribute(\"class\", \"oi oi-target\");\n locationButton.appendChild(locationIcon);\n //locationButton.innerHTML = \"<img src='../logos/location-icon.jpg' height='20px' width='20px' margin='5px'>\";\n map.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(locationButton);\n google.maps.event.addDomListener(locationButton, \"click\", function () {\n getUserLocation();\n });\n var toggletHeatMapButton = document.createElement(\"button\");\n toggletHeatMapButton.setAttribute(\n \"style\",\n \"height: 20px; width: 120px; margin: 5px; border: 1px solid; padding: 1px 12px; font: bold 11px Roboto, Arial, sans-serif; color: #000000; background-color: #b1ffff; cursor: pointer;\"\n );\n toggletHeatMapButton.innerHTML = \"Toggle Heatmap\";\n map.controls[google.maps.ControlPosition.BOTTOM_CENTER].push(\n toggletHeatMapButton\n );\n google.maps.event.addDomListener(toggletHeatMapButton, \"click\", function () {\n toggleHeatmap();\n // heatmap.setMap(heatmap.getMap() ? null : map);\n });\n var drawButton = document.createElement(\"button\");\n drawButton.setAttribute(\n \"style\",\n \"border: none; border-radius: 50%; height: 32px; width: 32px; margin-right: 10px; padding: 0px; border: 1px solid; background-color: #808080; color: #000000; cursor: pointer;\"\n );\n drawButton.setAttribute(\"id\", \"drawButton\");\n var icon = document.createElement(\"span\");\n icon.setAttribute(\n \"style\",\n \"width: 16px; height: 16px; position: absolute; top: 50%; left: 50%; height: 50%; transform: translate(-50%, -50%); margin-right: 20px;\"\n );\n icon.setAttribute(\"class\", \"oi oi-pencil\");\n drawButton.appendChild(icon);\n map.controls[google.maps.ControlPosition.RIGHT_TOP].push(drawButton);\n google.maps.event.addDomListener(drawButton, \"click\", function () {\n if (!canDraw) {\n canDraw = true;\n this.style.background = \"#b1ffff\";\n polylinePaths = [];\n directionsRenderer.setMap(null);\n directionsRenderer.setPanel(null);\n getBikeStops();\n } else {\n canDraw = false;\n this.style.background = \"#808080\";\n getBikeStops();\n }\n });\n var resestMapButton = document.createElement(\"button\");\n resestMapButton.setAttribute(\n \"style\",\n \"height: 20px; width: 120px; margin: 5px; border: 1px solid; padding: 1px 12px; font: bold 11px Roboto, Arial, sans-serif; color: #000000; background-color: #b1ffff; cursor: pointer;\"\n );\n resestMapButton.innerHTML = \"Reset Map\";\n map.controls[google.maps.ControlPosition.BOTTOM_CENTER].push(resestMapButton);\n google.maps.event.addDomListener(resestMapButton, \"click\", function () {\n resetMap();\n });\n}", "title": "" }, { "docid": "aa283e29702c02165f3daa0d8f578a5d", "score": "0.6519878", "text": "function setZoom(){\n\t var pos = map.getCenter();\n\t zoomMarker = new google.maps.Marker({\n\t position: pos,\n\t icon:zoomin,\n\t title: \"Zoom inn - for mange resultater\"\n\t });\n\n\t google.maps.event.addListener(zoomMarker,\"click\",function(event) {\n\t\t zoomClick();\n\t });\n\t zoomMarker.setMap(map); \n\t\n}", "title": "" }, { "docid": "f0cd96dd90dc5abcadb6fa8641340016", "score": "0.64597607", "text": "function drawStart() { \n map.hideZoomSlider(); // because draw button press turns off\n $(\"#map-full-extent-button, #map-previous-extent-button, #map-next-extent-button, #map-zoom-in-button, #map-zoom-out-button\").hide(); \n}", "title": "" }, { "docid": "0efcfc0abcbf545d9819cf7c89ac6748", "score": "0.64569914", "text": "function _addExtraControls() {\n _app.on(\"ready\", function() {\n var treeTbar, fgridBbar;\n var map = _app.mapPanel.map;\n\n treeTbar = Ext.getCmp('tree').getTopToolbar();\n treeTbar.addButton({\n id: 'btn-metadatos',\n text: 'Metadatos',\n tooltip: 'Vea más información acerca de la capa seleccionada (fechas, ' +\n 'responsable, info. de contacto, escalas, SRS, etc.)',\n icon: './theme/info-new-window.png',\n disabled: true\n });\n treeTbar.doLayout();\n\n fgridBbar = Ext.getCmp('featuregrid').getBottomToolbar();\n fgridBbar.addButton({\n iconCls: \"gxp-icon-zoom-to\",\n ref: \"../zoomToPageButton\",\n text: \"Zoom a resultados\",\n tooltip: \"Acercar mapa a los resultados\",\n handler: function() {\n map.zoomToExtent(\n Ext.getCmp('featuregrid').store.layer.getDataExtent()\n );\n }\n });\n\n //boton Mostrar en mapa: on\n fgridBbar.items.items[1].toggle();\n });\n }", "title": "" }, { "docid": "8891824bd07d17ca4832a5141a34fe89", "score": "0.64512175", "text": "function customMapToolbarHandler(btn, evt) {\n// // Check if the button is pressed or unpressed\n// if (btn.id == \"TESTBUTTON\") {\n// if (btn.pressed) {\n// alert ( \"You clicked on Test Button!\" );\n// openlayersClickEvent.activate();\n// }\n// else\n// {\n// alert ( \"TEST button is toggled up!\" );\n// openlayersClickEvent.deactivate();\n// }\n// }\n\t\t//Export\n\t\tif (btn.id == \"ExportMap\") {\n\t\tif (btn.pressed) {\n\t\t\texportWindow.show();\n\t\t\tif (printExtent.initialized == false) {\n\t\t\t\tprintExtent.addPage();\n\t\t\t\tprintExtent.page.lastScale = Math.round(printExtent.page.scale.data.value);\n\t\t\t\tprintExtent.page.on('change', function (page, modifications) {\n\t\t\t\t\tif (page.scale.data.value != printExtent.page.lastScale) {\n\t\t\t\t\t\t//Ext.getCmp('ExportScaleCombobox').setValue(page.scale.data.value);\n\t\t\t\t\t\tprintExtent.page.lastScale = page.scale.data.value;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tprintExtent.initialized = true;\n\t\t\t}\n\n\t\t\tprintExtent.page.fit(geoExtMap, {\n\t\t\t\t'mode': 'screen'\n\t\t\t});\n\t\t\tprintExtent.show();\n\t\t\tmainStatusText.setText('Export');\n\t\t} else {\n\t\t\texportWindow.hide();\n\t\t\tprintExtent.hide();\n\t\t\tmainStatusText.setText(modeNavigationString[lang]);\n\t\t}\n\t}\n\t//end Export\n}", "title": "" }, { "docid": "9c7ef3ee03c1ce2c66bfffbc23b95bce", "score": "0.64184576", "text": "function TextualZoomControl() {\n}", "title": "" }, { "docid": "9c7ef3ee03c1ce2c66bfffbc23b95bce", "score": "0.64184576", "text": "function TextualZoomControl() {\n}", "title": "" }, { "docid": "c363869ceb30f52f889c4edb65858b8e", "score": "0.64049095", "text": "function EmogeoControls(inMapType) {\n mapType = inMapType;\n emogeosControlElement = $document[0].createElement('div');\n emogeosControlElement.className = 'emogeo-controls ol-unselectable';\n if (mapType === 'strat-section') emogeosThisMap = emogeos['sed'];\n _.each(emogeosThisMap, function (fields, sectionKey) {\n if (sectionKey !== 'structures') {\n _.each(fields, function (choices, field) {\n createEmogeoButton(emogeosControlElement, field, choices[0]);\n });\n }\n });\n\n ol.control.Control.call(this, {\n 'element': emogeosControlElement\n });\n emogeosControlElement.style.display = 'none';\n }", "title": "" }, { "docid": "0e5e56f8d595801582755581b88a664d", "score": "0.63933194", "text": "function addMapControls(map) {\r\n //addMapLayerControl(map);\r\n addMapNavControl(map)\r\n addMapCopyright(map);\r\n addMapTitle(map);\r\n //addMapLegend(map);\r\n addMapScale(map);\r\n addToolBar(map);\r\n}", "title": "" }, { "docid": "b06a5eb87c48ec24a8622c98191898e9", "score": "0.63458556", "text": "function MarkerSelectControl(controlDiv, map) {\n\n controlDiv.style.paddingTop = '6px';\n\n // Set CSS for the control border.\n var clearbutton = document.createElement('button');\n clearbutton.className = 'btn-warning';\n clearbutton.style.Height = '25px !important';\n clearbutton.style.verticalAlign = 'middle';\n clearbutton.title = 'Click to delete the shape';\n clearbutton.innerHTML = 'Clear';\n clearbutton.style.fontSize = '15px';\n controlDiv.appendChild(clearbutton);\n\n google.maps.event.addDomListener(clearbutton, 'click', deleteSelectedShape);\n\n var viewbutton = document.createElement('button');\n viewbutton.className = 'btn-success';\n viewbutton.id = 'viewbutton';\n viewbutton.style.height = '25px !important';\n viewbutton.style.verticalAlign = 'middle';\n viewbutton.title = 'Click to view selected sample data in a table';\n viewbutton.innerHTML = 'View Samples';\n viewbutton.style.fontSize = '15px';\n controlDiv.appendChild(viewbutton);\n\n google.maps.event.addDomListener(viewbutton, 'click', getCoordinates);\n\n}", "title": "" }, { "docid": "21194ab155a16eb0cf304e18a15dd133", "score": "0.6304259", "text": "function zoomInDiagram() {\n $('#DMapWrap img[usemap]').zoomable({ method: 'zoomIn' });\n}", "title": "" }, { "docid": "af189b6fbff04a07104617fd10d44c60", "score": "0.62724394", "text": "function setButtonEvents() {\n sectionNode.on(\"click\", \"button.details\", function () {\n var buttonNode = $(this),\n layerId = buttonNode.data(layerIdField),\n oid = buttonNode.data(featureOidField);\n\n highlightRow.focusedButton = \"button.details\";\n\n if (highlightRow.isActive() && highlightRow.isEqual(layerId, oid)) {\n DatagridClickHandler.onDetailDeselect(datagridMode);\n } else {\n var fData = getFDataFromButton(buttonNode),\n graphic = getGraphicFromFData(fData);\n\n DatagridClickHandler.onDetailSelect(buttonNode, fData, graphic, datagridMode);\n }\n });\n\n // Event handling for \"Zoom To\" button\n sectionNode.on(\"click\", \"button.zoomto\", function (evt) {\n var zoomNode = $(this),\n fData = getFDataFromButton(zoomNode);\n\n zoomlightRow.focusedButton = \"button.zoomto\";\n\n // Zoom To\n if (zoomNode.text() === i18n.t(\"datagrid.zoomTo\")) {\n handleGridEvent(evt, function () {\n zoomToGraphic = getGraphicFromFData(fData);\n\n //store the current extent, then zoom to point.\n lastExtent = RampMap.getMap().extent.clone();\n\n DatagridClickHandler.onZoomTo(RampMap.getMap().extent.clone(), fData, zoomToGraphic);\n\n // Update \"zoom back\" text after the extent change, if we update it\n // before the extent change, it won't work since the datagrid gets\n // repopulated after an extent change\n utilMisc.subscribe(EventManager.Datagrid.EXTENT_FILTER_END, function () {\n // Find the first node with the same oid, layerId\n var newNode = $(String.format(\"button.zoomto[data-{0}='{1}'][data-{2}='{3}']:eq(0)\",\n featureOidField, GraphicExtension.getFDataOid(fData),\n layerIdField, fData.parent.layerId));\n // Change node's text to Zoom Back\n newNode.text(i18n.t(\"datagrid.zoomBack\"));\n });\n });\n } else { // Zoom back\n DatagridClickHandler.onZoomBack();\n // Reset focus back to \"Zoom To\" link after map extent change\n utilMisc.subscribe(EventManager.Datagrid.EXTENT_FILTER_END, function () {\n var newNode = $(String.format(\"button.zoomto[data-{0}='{1}'][data-{2}='{3}']:eq(0)\",\n featureOidField, GraphicExtension.getFDataOid(fData),\n layerIdField, fData.parent.layerId));\n // Change node's text back to Zoom To\n newNode.text(i18n.t(\"datagrid.zoomTo\"));\n newNode.focus();\n });\n zoomNode.text(i18n.t(\"datagrid.zoomTo\"));\n }\n });\n\n sectionNode.on(\"click\", \"button.global-button\", function () {\n var buttonNode = $(this);\n\n if (currentSortingMode === \"asc\") {\n buttonNode.addClass(\"state-expanded\");\n currentSortingMode = \"desc\";\n } else {\n buttonNode.removeClass(\"state-expanded\");\n currentSortingMode = \"asc\";\n }\n\n jqgrid.DataTable().order([0, currentSortingMode]).draw();\n });\n\n //Adds an event trigger for the expansion of the datagrid control\n sectionNode.on(\"click\", \"button.expand\", function () {\n var d = new Deferred();\n console.log(\"grid expanded!\");\n\n datagridMode = datagridMode === GRID_MODE_SUMMARY ? GRID_MODE_FULL : GRID_MODE_SUMMARY;\n\n d.then(function () {\n initScrollListeners();\n });\n\n refreshPanel(d);\n\n topic.publish(EventManager.GUI.DATAGRID_EXPAND);\n });\n\n sectionNode.on(\"change\", \"#datasetSelector\", function () {\n var controlNode = $(this),\n optionSelected = controlNode.find(\"option:selected\"),\n state = (optionSelected[0].value === selectedDatasetId);\n\n updateDatasetSelectorState(state, true);\n });\n\n sectionNode.on(\"click\", \"#datasetSelectorSubmitButton\", function () {\n var optionSelected = datasetSelector.find(\"option:selected\");\n\n if (optionSelected.length > 0) {\n selectedDatasetId = optionSelected[0].value;\n } else {\n selectedDatasetId = \"\";\n }\n\n refreshTable();\n });\n\n popupManager.registerPopup(sectionNode, \"hover, focus\",\n function (d) {\n this.target.removeClass(\"wb-invisible\");\n d.resolve();\n },\n {\n handleSelector: \"tr\",\n\n targetSelector: \".record-controls\",\n\n closeHandler: function (d) {\n this.target.addClass(\"wb-invisible\");\n\n d.resolve();\n },\n\n activeClass: \"bg-very-light\",\n useAria: false\n }\n );\n\n popupManager.registerPopup(sectionNode, \"hover, focus\",\n function (d) {\n d.resolve();\n },\n {\n handleSelector: \".full-table #jqgrid tbody tr\",\n activeClass: \"bg-very-light\",\n useAria: false\n }\n );\n\n popupManager.registerPopup(sectionNode, \"dblclick\",\n function (d) {\n var //oldHandles = jqgrid.find(\".expand-cell\"),\n extraPadding = (this.handle.outerHeight() - this.target.height()) / 2;\n\n TweenLite.set(\".expand-cell\", { clearProps: \"padding\", className: \"-=expand-cell\" });\n //TweenLite.set(\".expand-cell\", { className: \"-=expand-cell\" });\n TweenLite.set(this.handle, { padding: extraPadding });\n\n window.getSelection().removeAllRanges();\n\n d.resolve();\n },\n {\n handleSelector: \"td\",\n\n targetSelector: \".title-span\",\n\n closeHandler: function (d) {\n TweenLite.set(this.handle, { clearProps: \"padding\" });\n TweenLite.set(this.handle, { className: \"-=expand-cell\" });\n\n d.resolve();\n },\n\n activeClass: \"expand-cell\",\n useAria: false\n }\n );\n\n // handle clicks on notices\n popupManager.registerPopup(sectionNode, \"click\",\n function (d) {\n this.target.toggle();\n\n this.handle\n .find(\".separator i\")\n .removeClass(\"fa-angle-down\")\n .addClass(\"fa-angle-up\");\n\n d.resolve();\n },\n {\n closeHandler: function (d) {\n this.target.toggle();\n\n this.handle\n .find(\".separator i\")\n .removeClass(\"fa-angle-up\")\n .addClass(\"fa-angle-down\");\n\n d.resolve();\n },\n\n handleSelector: \".info-notice-button\",\n containerSelector: \".datagrid-info-notice\",\n targetSelector: \".notice-details\"\n }\n );\n }", "title": "" }, { "docid": "40c1c8bfc53224f99295bf31c1176742", "score": "0.62612027", "text": "function zoomIn() {\n map.getView().animate({zoom: map.getView().getZoom() + parseFloat(configHashTable[\"zoomChange\"]),\n duration: parseInt(configHashTable[\"animationDuration\"])});\n}", "title": "" }, { "docid": "0e89c425ffda4a3e907ee9b1e65ccff3", "score": "0.6256549", "text": "function GAdminMapControl() {\n}", "title": "" }, { "docid": "e8953522d3f6cf68d9691db1200f0ee8", "score": "0.6236682", "text": "function createButtons(lat,lng,title,zoom){\n const newButton = document.createElement(\"button\"); // adds a new button\n newButton.id = \"button\"+title; // gives the button a unique id\n newButton.innerHTML = title; // gives the button a title\n newButton.setAttribute(\"lat\",lat); // sets the latitude \n newButton.setAttribute(\"lng\",lng); // sets the longitude \n newButton.addEventListener('mouseover', function(){\n myMap.flyTo([lat,lng],zoom); \n })\n document.body.appendChild(newButton); //this adds the button to our page.\n}", "title": "" }, { "docid": "0b9cef8b43ba42b45508c8d88363bcc1", "score": "0.6210671", "text": "function markerSelector(controlDiv, map, markerSelection){\n\n // Set CSS for the control border.\n const controlUI = document.createElement(\"div\");\n controlUI.style.backgroundColor = \"#fff\";\n controlUI.style.border = \"2px solid #fff\";\n controlUI.style.borderRadius = \"3px\";\n controlUI.style.boxShadow = \"0 2px 6px rgba(0,0,0,.3)\";\n controlUI.style.cursor = \"pointer\";\n controlUI.style.marginTop = \"8px\";\n controlUI.style.marginLeft = \"8px\";\n controlUI.style.marginBottom = \"22px\";\n controlUI.style.textAlign = \"center\";\n controlUI.title = \"Click to recenter the map\";\n controlDiv.appendChild(controlUI);\n\n // Create bike colour markers button\n infoWindow = new google.maps.InfoWindow();\n const bikesButton = document.createElement(\"button\");\n bikesButton.setAttribute(\"id\", \"bikesButton\");\n bikesButton.textContent = \"Bikes\";\n bikesButton.classList.add(\"custom-map-control-button\");\n bikesButton.addEventListener(\"click\", () => {\n\n document.getElementById(\"map\").innerHTML = \"Loading map with bike colour markers...\"\n initMap(\"bikes\");\n\n });\n\n // Create stand colour markers button\n infoWindow = new google.maps.InfoWindow();\n const standsButton = document.createElement(\"button\");\n standsButton.setAttribute(\"id\", \"standsButton\");\n standsButton.textContent = \"Stands\";\n standsButton.classList.add(\"custom-map-control-button\");\n standsButton.addEventListener(\"click\", () => {\n\n document.getElementById(\"map\").innerHTML = \"Loading map with stand colour markers...\"\n initMap(\"stands\");\n\n });\n\n // Add styling for selected button\n if (markerSelection === \"bikes\") {\n bikesButton.style.backgroundColor= \"black\";\n bikesButton.style.color= \"white\";\n } else {\n standsButton.style.backgroundColor= \"black\";\n standsButton.style.color= \"white\";\n }\n\n // Add buttons\n controlUI.appendChild(bikesButton);\n controlUI.appendChild(standsButton);\n\n}", "title": "" }, { "docid": "df0ba8f2a587670ffcf794a0f8e0d7ae", "score": "0.62050223", "text": "function zoomOutDiagram() {\n $('#DMapWrap img[usemap]').zoomable({ method: 'zoomOut' });\n}", "title": "" }, { "docid": "802d89dba56faa10300acde37c6b07bd", "score": "0.6202466", "text": "zoomIn(amount) { this.renderer.zoomIn(amount); }", "title": "" }, { "docid": "72f47dda67a487639ae4c06d149f776e", "score": "0.6199486", "text": "function updateCustomMarkers(event) {\n // get map object\n var map = event.chart;\n\n // go through all of the images\n for (var x in map.dataProvider.images) {\n // get MapImage object\n var image = map.dataProvider.images[x];\n\n // check if it has corresponding HTML element\n if ('undefined' == typeof image.externalElement)\n image.externalElement = createCustomMarker(image);\n\n // reposition the element accoridng to coordinates\n var xy = map.coordinatesToStageXY(image.longitude, image.latitude);\n image.externalElement.style.top = xy.y + 'px';\n image.externalElement.style.left = xy.x + 'px';\n }\n }", "title": "" }, { "docid": "f1baf94c1f41fce79e302fab4f213bfd", "score": "0.6193888", "text": "zoomInAndOut() {\n /**\n * Yes I am zooming in then zooming out. But leaflets tiles\n * do not setup with fully with a dynamic map container (set to 100% height.)\n * and the overlays are offset with intial draw. This zoom in zoom out\n * forces leaflet to Render everything correctly\n */\n this.map.zoomOut(1);\n this.map.zoomIn(1);\n return true;\n }", "title": "" }, { "docid": "3e37885ad5154beeebd63aebdbad32f0", "score": "0.6185041", "text": "function ZoomIn()\n {\n var zoomLevel = map.getZoom() + 1;\n map.setView({ zoom: zoomLevel });\n }", "title": "" }, { "docid": "b49c74e8c6b1f4aa4da0d7bc7466d02c", "score": "0.6181549", "text": "function addMapRefreshButton() {\n if (!mapRefreshButton) {\n mapRefreshButton = L.easyButton({\n states: [{\n stateName: 'refresh',\n icon: 'fa-undo',\n title: 'Reload all orbits',\n onClick: function(control) {\n renderMapData();\n }\n }]\n }).addTo(ops.surface.map);\n }\n}", "title": "" }, { "docid": "3a086428d08783dd692986247ad888f1", "score": "0.61795956", "text": "handleChangeZoomMap(e) {\n this.props.onZoomMapChange(e.target.checked);\n }", "title": "" }, { "docid": "25284f50515101894b8c535b96670573", "score": "0.61690694", "text": "function zoomIn() {\r\n zoomOutButton.disabled = false;\r\n currentZoomFactor += zoomDelta;\r\n wavesurfer.zoom(currentZoomFactor);\r\n}", "title": "" }, { "docid": "ee6eb0d9f0e25a1f88117c8d8b1476bb", "score": "0.61567026", "text": "function updateCustomMarkers(event) {\n // get map object\n var map = event.chart;\n\n // go through all of the images\n for (var x in map.dataProvider.images) {\n // get MapImage object\n var image = map.dataProvider.images[x];\n\n // check if it has corresponding HTML element\n if ('undefined' == typeof image.externalElement)\n image.externalElement = createCustomMarker(image);\n\n // reposition the element accoridng to coordinates\n var xy = map.coordinatesToStageXY(image.longitude, image.latitude);\n image.externalElement.style.top = xy.y + 'px';\n image.externalElement.style.left = xy.x + 'px';\n }\n}", "title": "" }, { "docid": "70098bf0865e34a97d2d5183f8233b5f", "score": "0.61554086", "text": "function zoomOutMap() {\n viewer.scene.scaleX *= (1 / 1.1);\n viewer.scene.scaleY *= (1 / 1.1);\n zoomSteps += -1;\n}", "title": "" }, { "docid": "386804468abd4158dbb079692adcd835", "score": "0.6147182", "text": "addButtons() {\n this.addButton(this.viewerConfig.zoomInButton, \"fa-plus-circle\", \"Zoom in\");\n this.addButton(this.viewerConfig.zoomOutButton, \"fa-minus-circle\", \"Zoom out\");\n this.addButton(this.viewerConfig.homeButton, \"fa-refresh\", \"Reset Zoom\");\n this.addButton(this.viewerConfig.fullPageButton, \"fa-expand\", \"Fullscreen\");\n\n if (this.viewerConfig.selectionEnabled) {\n this.addButton(this.viewerConfig.selectionConfig.toggleButton, \"fa-toggle-off\", \"Toggle selection\");\n }\n\n this.addButton(this.viewerConfig.helpButton, \"fa-question-circle\", \"Help\");\n this.addButton(this.viewerConfig.infoButton, \"fa-info-circle\", \"Item Details\");\n }", "title": "" }, { "docid": "aeb9d49178b02b26231eb547001b0e3e", "score": "0.6139418", "text": "function onMapClick(e) {\r\n console.log(\"You clicked the map at \" + e.latlng);\r\n\r\n //Adds click to print zoom level to console\r\n console.log('The Zoom Level is:' + mymap.getZoom());\r\n}", "title": "" }, { "docid": "a2ec84b2a7b7a1008d13666f31142ea9", "score": "0.6135881", "text": "function HomeControl2(homeControlDiv, homeControlDiv4, map) {\r\n // Setup the click event listeners\r\n google.maps.event.addDomListener(homeControlDiv, 'click', function() {\r\n\t//change\r\n resizeMapDiv();\r\n var latlng = new google.maps.LatLng(centreLat, centreLon);\r\n var myOptions = {\r\n zoom: initialZoom,\r\n minZoom: 2,\r\n maxZoom: 3,\r\n center: latlng,\r\n panControl: true,\r\n zoomControl: true,\r\n mapTypeControl: false,\r\n scaleControl: false,\r\n streetViewControl: false,\r\n overviewMapControl: false,\r\n mapTypeControlOptions: { mapTypeIds: [\"ImageCutter\"] },\r\n\t mapTypeId: \"ImageCutter\"\r\n }\r\n map = new google.maps.Map(document.getElementById(\"map\"), myOptions);\r\n\tgmicMapType = new GMICMapType();\r\n map.mapTypes.set(\"ImageCutter\",gmicMapType);\r\n \tsetMarkers(map, beaches);\t\t\r\n\t\t//add buttons\r\ndocument.getElementById('map-legend').style.visibility = 'visible';\r\n var homeControl = new HomeControl(homeControlDiv, homeControlDiv4, map);\r\n homeControlDiv.index = 1;\r\n map.controls[google.maps.ControlPosition.TOP_RIGHT].push(homeControlDiv);\r\n homeControlDiv4.index = 1;\r\n map.controls[google.maps.ControlPosition.TOP_RIGHT].push(homeControlDiv4);\r\n// Bounds for Go Metro Map\r\n var allowedBounds = new google.maps.LatLngBounds(\r\n new google.maps.LatLng(-75, -85), \r\n new google.maps.LatLng(83, 85));\r\n// Listen for the bounds_changes event\r\n google.maps.event.addListener(map, 'bounds_changed', function() {\r\n if (allowedBounds.contains(map.getCenter())) return;\r\n// Out of bounds - Move the map back within the bounds\r\n var c = map.getCenter(),\r\n x = c.lng(),\r\n y = c.lat(),\r\n maxX = allowedBounds.getNorthEast().lng(),\r\n maxY = allowedBounds.getNorthEast().lat(),\r\n minX = allowedBounds.getSouthWest().lng(),\r\n minY = allowedBounds.getSouthWest().lat();\r\n if (x < minX) x = minX;\r\n if (x > maxX) x = maxX;\r\n if (y < minY) y = minY;\r\n if (y > maxY) y = maxY;\r\n map.setCenter(new google.maps.LatLng(y, x));\r\n });\r\n });\r\n}", "title": "" }, { "docid": "e32cd714276163069926920e5c472363", "score": "0.61341166", "text": "createButtonScaleToPoints() {\n const btn = this.createBtnHelper()\n let text = document.createTextNode('Zoom to selected')\n btn.appendChild(text)\n btn.setAttribute('width', '120px')\n btn.style.display = 'none'\n this.dom.appendChild(btn)\n return btn\n }", "title": "" }, { "docid": "516e528b3a1b516b0cda16f5e66af27a", "score": "0.6116258", "text": "function getFeatureInfo( e ) { \n //Show the button to add plot if the zoom is right\n if( zoom > zoomPlots ) { \n //Show the marker\n showPosition( e );\n }\n }", "title": "" }, { "docid": "25e950f3b8d474aab30360cdb295dc12", "score": "0.61155653", "text": "function CustomControl(controlDiv, map, loc) {\n\n // Set CSS for the control border.\n var controlUI = document.createElement('div');\n controlUI.style.backgroundColor = '#fff';\n controlUI.style.border = '2px solid #fff';\n controlUI.style.borderRadius = '3px';\n controlUI.style.boxShadow = '0 2px 6px rgba(0,0,0,.3)';\n controlUI.style.cursor = 'pointer';\n controlUI.style.marginBottom = '22px';\n controlUI.style.textAlign = 'center';\n controlUI.title = loc.label;\n controlDiv.appendChild(controlUI);\n\n // Set CSS for the control interior.\n var controlText = document.createElement('div');\n controlText.style.color = 'rgb(25,25,25)';\n controlText.style.fontFamily = 'Roboto,Arial,sans-serif';\n controlText.style.fontSize = '16px';\n controlText.style.lineHeight = '20px';\n controlText.style.paddingLeft = '5px';\n controlText.style.paddingRight = '5px';\n controlText.innerHTML = loc.label;\n controlUI.appendChild(controlText);\n\n // university control object will have coord set - set click listener to center map\n if ('coord' in loc) {\n controlUI.addEventListener('click', function() {\n map.setCenter(loc.coord);\n map.setZoom(15);\n });\n }\n\n // righthand toggle button - set click behavior\n else {\n controlUI.addEventListener('click', function() {\n\n // if school controls/univ layer hidden, show them\n if(!schools_vis) {\n\n // add school controls to map\n for (i = 0; i < schoolcontroldivs.length; i++) {\n map.controls[google.maps.ControlPosition.LEFT_BOTTOM].push(schoolcontroldivs[i]);\n }\n\n // show university features\n map.setOptions({styles: styles.concat(ustyle)});\n\n schools_vis = true;\n\n // if school controls/univ layer showing, hide them\n } else {\n\n // clear left-hand displays\n map.controls[google.maps.ControlPosition.LEFT_BOTTOM].clear();\n\n // revert to base map style\n map.setOptions({styles: styles});\n\n schools_vis = false;\n }\n });\n }\n}", "title": "" }, { "docid": "3e93a8a209e26e4b4b8f167b8ddc63d2", "score": "0.6107625", "text": "showMap(){\n this._uiComponents.modal.style.display = \"none\";\n this._uiComponents.optionButtonBt.style.display = \"initial\";\n document.title = \"The Map. (\" + this._mapManager.getMapZoom() + \")\";\n }", "title": "" }, { "docid": "d057b2d642c864dad2840f03606e99da", "score": "0.6102358", "text": "function alberoAnalogViewerClickOnMap(e, loc)\r\n{\r\n\tif(alberoToolbox.showHoverQuad)\r\n\t{\r\n\t\t// add the selected region rectangle\r\n\t\t$.each(Maps, function( i, m ) {\r\n\t\t\tAddSelectedRegion(m, loc);\r\n\t\t});\r\n\r\n\t\talberoDisplayAnalogViewer(loc.latitude, loc.longitude, albero_selected_range);\r\n\t}\r\n}", "title": "" }, { "docid": "877e29b47b31702d2de0819a2aac1aeb", "score": "0.60816175", "text": "function ZoomOut()\n {\n var zoomLevel = map.getZoom() - 1;\n map.setView({ zoom: zoomLevel });\n }", "title": "" }, { "docid": "5f98a8824a83a72f42ceba1d6629a3ed", "score": "0.6063888", "text": "function UserGeneratedMarkersControl() {\n UserGeneratedMarkersControl.prototype.onAdd = function(map) {\n this._map = map;\n this._container = document.createElement('div');\n var button = document.createElement('button');\n button.className = 'icon fa fa-users';\n button.id = 'communityLocations';\n button.title = 'Display community locations';\n button.onclick = function () {\n toggleCommunityLocations();\n };\n this._container.className = 'mapboxgl-ctrl mapboxgl-ctrl-group';\n this._container.appendChild(button);\n return this._container;\n };\n\n UserGeneratedMarkersControl.prototype.onRemove = function() {\n this._container.parentNode.removeChild(this._container);\n this._map = undefined;\n };\n}", "title": "" }, { "docid": "9e1b7e091a90eb3e202e586218bf30c3", "score": "0.6055912", "text": "function updateCustomMarkers(event) {\n // get map object\n var map = event.chart;\n\n // go through all of the images\n for (var x in map.dataProvider.images) {\n var image = map.dataProvider.images[x];\n\n // check if it has corresponding HTML element\n if ('undefined' == typeof image.externalElement)\n image.externalElement = createCustomMarker(image);\n else {\n image.chart.chartDiv.appendChild(image.externalElement);\n }\n // reposition the element accoridng to coordinates\n image.externalElement.style.top = map.latitudeToY(image.latitude) + 'px';\n image.externalElement.style.left = map.longitudeToX(image.longitude) + 'px';\n }\n }", "title": "" }, { "docid": "d81de4cb18a27ca478ff3effeb7ea093", "score": "0.6055289", "text": "function initMap() {\n map = new google.maps.Map(document.getElementById('map'), {\n zoom: 12,\n center: new google.maps.LatLng(lat, lng),\n mapTypeId: 'roadmap',\n });\n console.log('Latitud= ' + lat + ', Longitud= ' + lng);\n\n infoWindow = new google.maps.InfoWindow();\n const locationButton = document.createElement('button');\n locationButton.textContent = 'Centrar en tu ubicación';\n locationButton.classList.add('custom-map-control-button');\n map.controls[google.maps.ControlPosition.TOP_CENTER].push(locationButton);\n locationButton.addEventListener('click', () => {\n centrarMapa();\n });\n}", "title": "" }, { "docid": "bf246da8ea0a0c2fe433851617ddcc4f", "score": "0.6047474", "text": "function zoomInMap() {\n viewer.scene.scaleX *= 1.1\n viewer.scene.scaleY *= 1.1\n zoomSteps += 1\n}", "title": "" }, { "docid": "29657bdc9d459d718e67f67e111a629c", "score": "0.6046815", "text": "function osmap_addEventListener() {\n\n /** get the center coordinates **/\n let controlCenter = osmap_map.getView().getCenter();\n\n /** add listener to center button **/\n var osmap_centerButton = document.getElementById('osmap_controlcenter');\n osmap_centerButton.addEventListener('click', function() {\n /** console.log(controlCenter); **/\n osmap_map.getView().setCenter(controlCenter);\n osmap_map.getView().setZoom(osmap_initialZoom);\n });\n}", "title": "" }, { "docid": "24924591f668eae75d0a5709e7047bea", "score": "0.6044603", "text": "changeZoomLevel(event) {\n const newZoomLevel = (event.target.id === 'zoom_up')\n ? this.map.getZoom() + 1\n : this.map.getZoom() - 1;\n\n this.map.setZoom(newZoomLevel);\n this.updateTrackLayer();\n }", "title": "" }, { "docid": "3960567cd386581fabce82532e393cb8", "score": "0.603696", "text": "function secMapStart() {\n console.log(\"Map start\");\n\n var myMapPlace = document.getElementById(\"section-map\"),\n pointData = $(myMapPlace).data(\"point\") || \"\",\n mapCenter = new google.maps.LatLng( pointData.lat, pointData.lng );\n\n var mapOptions = {\n disableDefaultUI: true,\n scrollwheel: false,\n zoom: 17,\n center: mapCenter,\n mapTypeId: google.maps.MapTypeId.ROADMAP,\n styles: mapStyles\n };\n\n var map = new google.maps.Map(myMapPlace, mapOptions);\n\n // Create and to map marker\n var pointLabel = new google.maps.MarkerImage('/assets/img/map_point.png',\n new google.maps.Size(50,68),\n new google.maps.Point(0,0),\n new google.maps.Point(25,68)\n );\n var pointMarker = new google.maps.Marker({\n position: new google.maps.LatLng( pointData.lat, pointData.lng ),\n map: map,\n icon: pointLabel,\n title: pointData.name\n });\n\n // Custom zoom create\n var controlWrapper = document.createElement('div'),\n zoomInButton = document.createElement('div'),\n zoomOutButton = document.createElement('div');\n\n controlWrapper.appendChild(zoomInButton);\n controlWrapper.appendChild(zoomOutButton);\n\n controlWrapper.index = 1;\n zoomInButton.className = \"map-zoom__more\";\n zoomOutButton.className = \"map-zoom__less\";\n\n // Setup the click event listener - zoomIn\n google.maps.event.addDomListener(zoomInButton, 'click', function() {\n map.setZoom(map.getZoom() + 1);\n });\n // Setup the click event listener - zoomOut\n google.maps.event.addDomListener(zoomOutButton, 'click', function() {\n map.setZoom(map.getZoom() - 1);\n });\n // Add on map\n map.controls[google.maps.ControlPosition.LEFT_CENTER].push(controlWrapper);\n}", "title": "" }, { "docid": "e5c616ea0279311186f0db23fab83bbc", "score": "0.60328513", "text": "function addZoom(com)\n {\n window.panZoomTiger = svgPanZoom(com,{\n zoomEnabled: true,\n controlIconsEnabled: true,\n fit: true,\n center: true\n });\n\n }", "title": "" }, { "docid": "4588ff578d4f3c53d180eedfe6bdc5ed", "score": "0.6032758", "text": "handleZoom() {\n\t\tswitch(this.mapzoom) {\n\t\t\tcase 11:\n\t\t\tcase 12:\n\t\t\t\t// NOT VISIBLE: buildingMarkers, busStopMarkersB, busStopMarkersC, parkCameraMarkersB\n\t\t\t\tif (this.mymap.hasLayer(this.buildingMarkers)) {\n\t\t\t\t\tthis.mymap.removeLayer(this.buildingMarkers);\n\t\t\t\t}\n\t\t\t\tif (this.mymap.hasLayer(this.busStopMarkersB)) {\n\t\t\t\t\tthis.mymap.removeLayer(this.busStopMarkersB);\n\t\t\t\t}\n\t\t\t\tif (this.mymap.hasLayer(this.busStopMarkersC)) {\n\t\t\t\t\tthis.mymap.removeLayer(this.busStopMarkersC);\n\t\t\t\t}\n\t\t\t\tif (this.mymap.hasLayer(this.parkCameraMarkersB)) {\n\t\t\t\t\tthis.mymap.removeLayer(this.parkCameraMarkersB);\n\t\t\t\t}\n\t\t\t\t// VISIBLE: busStopMarkersA, parkCameraMarkersA\n\t\t\t\tif (!this.mymap.hasLayer(this.busStopMarkersA)) {\n\t\t\t\t\tthis.mymap.addLayer(this.busStopMarkersA);\n\t\t\t\t}\n\t\t\t\tif (!this.mymap.hasLayer(this.parkCameraMarkersA)) {\n\t\t\t\t\tthis.mymap.addLayer(this.parkCameraMarkersA);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 13:\n\t\t\t\t// NOT VISIBLE: buildingMarkers, busStopMarkersA, busStopMarkersC, parkCameraMarkersB\n\t\t\t\tif (this.mymap.hasLayer(this.buildingMarkers)) {\n\t\t\t\t\tthis.mymap.removeLayer(this.buildingMarkers);\n\t\t\t\t}\n\t\t\t\tif (this.mymap.hasLayer(this.busStopMarkersA)) {\n\t\t\t\t\tthis.mymap.removeLayer(this.busStopMarkersA);\n\t\t\t\t}\n\t\t\t\tif (this.mymap.hasLayer(this.busStopMarkersC)) {\n\t\t\t\t\tthis.mymap.removeLayer(this.busStopMarkersC);\n\t\t\t\t}\n\t\t\t\tif (this.mymap.hasLayer(this.parkCameraMarkersB)) {\n\t\t\t\t\tthis.mymap.removeLayer(this.parkCameraMarkersB);\n\t\t\t\t}\n\t\t\t\t// VISIBLE: busStopMarkersB, parkCameraMarkersA\n\t\t\t\tif (!this.mymap.hasLayer(this.busStopMarkersB)) {\n\t\t\t\t\tthis.mymap.addLayer(this.busStopMarkersB);\n\t\t\t\t}\n\t\t\t\tif (!this.mymap.hasLayer(this.parkCameraMarkersA)) {\n\t\t\t\t\tthis.mymap.addLayer(this.parkCameraMarkersA);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 14:\n\t\t\t\t// NOT VISIBLE: busStopMarkersA, busStopMarkersC, parkCameraMarkersB\n\t\t\t\tif (this.mymap.hasLayer(this.busStopMarkersA)) {\n\t\t\t\t\tthis.mymap.removeLayer(this.busStopMarkersA);\n\t\t\t\t}\n\t\t\t\tif (this.mymap.hasLayer(this.busStopMarkersC)) {\n\t\t\t\t\tthis.mymap.removeLayer(this.busStopMarkersC);\n\t\t\t\t}\n\t\t\t\tif (this.mymap.hasLayer(this.parkCameraMarkersB)) {\n\t\t\t\t\tthis.mymap.removeLayer(this.parkCameraMarkersB);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// VISIBLE: buildingMarkers, busStopMarkersB, parkCameraMarkersA\n\t\t\t\tif (!this.mymap.hasLayer(this.buildingMarkers)) {\n\t\t\t\t\tthis.mymap.addLayer(this.buildingMarkers);\n\t\t\t\t}\n\t\t\t\tif (!this.mymap.hasLayer(this.busStopMarkersB)) {\n\t\t\t\t\tthis.mymap.addLayer(this.busStopMarkersB);\n\t\t\t\t}\n\t\t\t\tif (!this.mymap.hasLayer(this.parkCameraMarkersA)) {\n\t\t\t\t\tthis.mymap.addLayer(this.parkCameraMarkersA);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 15:\n\t\t\tcase 16:\n\t\t\tcase 17:\n\t\t\tcase 18:\n\t\t\t\t// NOT VISIBLE: busStopMarkersA, busStopMarkersB, parkCameraMarkersA\n\t\t\t\tif (this.mymap.hasLayer(this.busStopMarkersA)) {\n\t\t\t\t\tthis.mymap.removeLayer(this.busStopMarkersA);\n\t\t\t\t}\n\t\t\t\tif (this.mymap.hasLayer(this.busStopMarkersB)) {\n\t\t\t\t\tthis.mymap.removeLayer(this.busStopMarkersB);\n\t\t\t\t}\n\t\t\t\tif (this.mymap.hasLayer(this.parkCameraMarkersA)) {\n\t\t\t\t\tthis.mymap.removeLayer(this.parkCameraMarkersA);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// VISIBLE: buildingMarkers, busStopMarkersC, parkCameraMarkersB\n\t\t\t\tif (!this.mymap.hasLayer(this.buildingMarkers)) {\n\t\t\t\t\tthis.mymap.addLayer(this.buildingMarkers);\n\t\t\t\t}\n\t\t\t\tif (!this.mymap.hasLayer(this.busStopMarkersC)) {\n\t\t\t\t\tthis.mymap.addLayer(this.busStopMarkersC);\n\t\t\t\t}\n\t\t\t\tif (!this.mymap.hasLayer(this.parkCameraMarkersB)) {\n\t\t\t\t\tthis.mymap.addLayer(this.parkCameraMarkersB);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t}", "title": "" }, { "docid": "ec98ece889ba57dfde5c42cecb7ea0a0", "score": "0.60199803", "text": "appendMarkerButtonToOverlay() {\n this.getPanes().overlayMouseTarget.appendChild(this.markerButton);\n }", "title": "" }, { "docid": "e1ce8aa64af82da8289b707e099525a9", "score": "0.6019233", "text": "function initCustomControlls( map, params ){\n\n var controls = params.customControls;\n\n for ( var c in controls ) {\n\n switch ( c ){\n case 'ctrlCombo':\n map.controls[controls[c].pos]\n .push( $('#'+controls[c].id)[0] );\n break;\n\n case 'fullscreenButton':\n google.maps.event.addDomListener($('#'+controls[c].id )[0], \"click\", function() {\n if( params.fullscreen ){\n document.cookie = \"forceFullScreenMap=off;\"; //remember user decision in cookie\n if($.urlParam('calledFromPt') == 1) {\n window.location = \"powerTrail.php?ptAction=showSerie&ptrail=\"+$.urlParam('pt');\n } else {\n window.location = \"cachemap3.php\"+getMapParamsToUrl(map, params);\n }\n }else{\n document.cookie = \"forceFullScreenMap=on;\";\n window.location = \"cachemap-full.php\"+getMapParamsToUrl(map, params);\n }\n });\n break;\n\n case 'refreshButton':\n $('#'+controls[c].id ).css(\"display\", \"block\");\n\n //add onlick function to refresh button\n $('#'+controls[c].id ).click(function(){\n\n //generate 'temporary' uniq string and save it for use in mapper url build process\n t = new Date();\n params.__random = \"r\" + t.getHours() + t.getMinutes() + t.getSeconds();\n\n //reload the map\n params.__reloadMap();\n });\n break;\n\n case 'gpsPositionButton':\n var button = $('#'+controls[c].id);\n if ((\"geolocation\" in navigator)){\n\n //geolocation present in browser\n button.css('display','block'); //show position button\n var geolocationObj = new GeolocationOnMap(map);\n google.maps.event.addDomListener(button[0], \"click\", function() {\n geolocationObj.getCurrentPosition();\n });\n } else {\n //geolocation not supported\n button.css('display','none'); //hide position button\n }\n break;\n\n case 'ocFilters':\n\n // check if map has a filter button (as fullscreen map)\n\n if( controls[c].hasOwnProperty('buttonId') ){\n var button = $('#'+controls[c].buttonId )[0];\n google.maps.event.addDomListener( button, \"click\", function() {\n if ( filters_div.css('display') == 'none' ) {\n filters_div.css('display','block');\n }else{\n filters_div.css('display','none');\n }\n });\n }\n\n var filters_div = $('#'+controls[c].boxId );\n\n // add dim to checked input in filters box\n var checkbox_changed = function() {\n var $related = $(\".\" + $(this).attr('name'));\n if ($(this).is(':checked'))\n $related.addClass('dim');\n else\n $related.removeClass('dim');\n };\n\n // attach checkbox_changed as callback to all inputs\n // in opt_table to changed event\n $('#'+ controls[c].boxId +' input')\n .each(checkbox_changed)\n .change(checkbox_changed);\n\n break;\n case 'search':\n\n var placeSearchText = document.getElementById(controls[c].input_id);\n var geocoder = new google.maps.Geocoder();\n\n var doSearchHandler = function() {\n geocoder.geocode({ address: placeSearchText.value }, function(results, status) {\n if (status === google.maps.GeocoderStatus.OK) {\n map.fitBounds(results[0].geometry.viewport);\n placeSearchText.value = results[0].address_components[0].short_name;\n placeSearchText.style.backgroundColor = \"#FFFFFF\";\n } else if (status === google.maps.GeocoderStatus.OVER_QUERY_LIMIT) {\n // Google Maps API limit reached\n placeSearchText.style.backgroundColor = \"#FFFF99\";\n } else {\n // Other geocoding error (e.g. wrong location/address)\n placeSearchText.style.backgroundColor = \"#FFCCCC\";\n }\n });\n };\n\n\n google.maps.event.addDomListener(placeSearchText, \"keydown\", function(ev) {\n if (ev.keyCode === 13) { //on enter...\n doSearchHandler();\n }\n });\n\n if( controls[c].but_id !== null ){ //handle search button\n var placeSearchButton = document.getElementById(controls[c].but_id);\n google.maps.event.addDomListener(placeSearchButton, \"click\", doSearchHandler);\n }\n\n break;\n\n case 'zoom_display':\n //zoom control - displays current zoom\n var zoomId = controls[c].id;\n document.getElementById( zoomId ).value = map.getZoom();\n google.maps.event.addListener(map, \"zoom_changed\", function() {\n document.getElementById( zoomId ).value = map.getZoom();\n });\n break;\n\n case 'coordsUnderCursor':\n\n //display current coords on map\n if( controls[c].hasOwnProperty('pos')){ //if pos not set skip it\n var showCoords = new ShowCoordsControl(map, controls[c].pos);\n google.maps.event.addListener(map, \"mousemove\", function(event) {\n showCoords.setCoords(event.latLng);\n });\n }\n break;\n\n default:\n console.error(\"Unknown control key: \"+c);\n }\n }\n}", "title": "" }, { "docid": "88358ab042ea17ffbce4f7468169575a", "score": "0.60174173", "text": "setModeZoomAndPan() {\n\n this.isZoomAndPanActive = true;\n\n this.chart.options.plugins.zoom.zoom.wheel.enabled = true;\n this.chart.options.plugins.zoom.zoom.pinch.enabled = true;\n this.chart.options.plugins.zoom.pan.enabled = true;\n\n this.chart.update(0);\n\n // update buttons\n const chartButtonModeHover = document.getElementById(\"chartButtonModeHover\");\n chartButtonModeHover.classList.add(\"chart-toolbar-button-disabled\");\n\n const chartButtonModeZoomAndPan = document.getElementById(\"chartButtonModeZoomAndPan\");\n chartButtonModeZoomAndPan.classList.remove(\"chart-toolbar-button-disabled\");\n }", "title": "" }, { "docid": "a924ca5417f8e5c716af4549ac28851c", "score": "0.6012183", "text": "function setupLayerControl(overlayMaps) {\n // control as var\n let layerControl = L.control.layers(bmGroup,overlayMaps, {\n position: 'topleft',\n collapsed: false,\n });\n\n // add custom icon button for layer control that acts as toggle\n L.easyButton({\n basin:[\n {\n basinName: 'closed',\n icon: 'fa-layer-group',\n title: 'Layer Control',\n onClick: function (btn, map) {\n // add basemap control\n layerControl.addTo(map);\n this.basin('open');\n }\n },\n {\n basinName: 'open',\n icon: 'fa-layer-group text-primary',\n title: 'Layer Control',\n onClick: function (btn, map) {\n map.removeControl(layerControl);\n this.basin('closed');\n }\n }\n ]\n }).addTo(map);\n }", "title": "" }, { "docid": "e77daf25c0ff42d5e9a19512db6bf68c", "score": "0.6008337", "text": "function addZoom(region){\r\n\t\t\t\t$('<img />').addClass(settings.zoomClass)\r\n\t\t\t\t\t.attr({\r\n\t\t\t\t\t\tsrc: settings.blankImage,\r\n\t\t\t\t\t\tid: region.id\r\n\t\t\t\t\t}).css({\r\n\t\t\t\t\t\tposition: 'absolute',\r\n\t\t\t\t\t\twidth: addpx(region.area_width),\r\n\t\t\t\t\t\theight: addpx(region.area_height),\r\n\t\t\t\t\t\ttop: addpx(region.top),\r\n\t\t\t\t\t\tleft: addpx(region.left),\r\n\t\t\t\t\t\tcursor: 'pointer'\r\n\t\t\t\t\t}).appendTo(map).click(function(){\r\n\t\t\t\t\t\t//hide neighboring bullets and zoomables\r\n\t\t\t\t\t\t$(this).siblings().fadeOut();\r\n\t\t\t\t\t\t$(this).hide()\r\n\t\t\t\t\t\t\t .attr('src', region.image).load(function(){\r\n\t\t\t\t\t\t\t\t\t$(this).fadeIn('slow')\r\n\t\t\t\t\t\t\t\t\t\t .animate({\r\n\t\t\t\t\t\t\t\t\t\t\t\twidth: addpx(region.width),\r\n\t\t\t\t\t\t\t\t\t\t\t\theight: addpx(region.height),\r\n\t\t\t\t\t\t\t\t\t\t\t\ttop: addpx(((settings.height-region.height)/2)),\r\n\t\t\t\t\t\t\t\t\t\t\t\tleft: addpx(((settings.width-region.width)/2))\r\n\t\t\t\t\t\t\t\t\t\t\t}, settings.zoomDuration, '', function(){\r\n\t\t\t\t\t\t\t\t\t\t\t\tdisplayMap(region);\r\n\t\t\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t});\r\n\t\t\t}", "title": "" }, { "docid": "c92ae4b5648b05ea4fbd4d9ea9f054f9", "score": "0.60077965", "text": "onAdd() {\n this.div_ = document.createElement(\"div\");\n this.div_.className = 'aqiMapMarkerOuter'\n this.div_.style.boxSizing = 'border-box';\n this.div_.style.borderStyle = \"solid\";\n this.div_.style.borderWidth = \"3px\";\n this.div_.style.transform = 'translate(-50%, -50%)';\n this.div_.style.borderRadius = \"50%\";\n this.div_.style.borderColor = data.props.color;\n this.div_.style.minHeight = '40px';\n this.div_.style.minWidth = '40px';\n this.div_.style.position = \"absolute\";\n\n let divInner = document.createElement(\"div\");\n divInner.style.backgroundColor = data.props.color;\n divInner.className = \"aqiMapMarkerInner\";\n // Create the img element and attach it to the div.\n const img = document.createElement(\"img\");\n img.src = this.image_;\n\n // w30px - h19.3126px\n // w25px - 16.0938px\n img.style.width = \"25px\";\n img.style.height = \"16.0938px\";\n img.style.left = '50%';\n img.style.top = '50%';\n\n img.style.transform = \"translate(-50%, -50%)\";\n img.style.position = \"absolute\";\n divInner.appendChild(img);\n this.div_.appendChild(divInner);\n // Add the element to the \"overlayLayer\" pane.\n const panes = this.getPanes();\n panes.overlayMouseTarget.appendChild(this.div_);\n // Adding Listener on div_\n let me = this;\n window.google.maps.event.addDomListener(this.div_, 'click', function(e){\n e.preventDefault();\n \n window.google.maps.event.trigger(me, 'click');\n })\n\n\n }", "title": "" }, { "docid": "a86ccfb47e16e45da2a0b60908601b29", "score": "0.60040325", "text": "function zoom(newRegion, map, layers){\n //remove every layer in map but basemap\n removeLayers(map);\n\n //gets the id the element just clicked\n region = newRegion;\n let layer = layers[region];\n layer.addTo(map);\n //get the extent and bounds of the new layer and zoom to it\n let extent = layer.getBounds()\n let neLat = extent._northEast.lat;\n let neLng = extent._northEast.lng\n let swLat = extent._southWest.lat;\n let swLng = extent._southWest.lng\n map.fitBounds([\n [neLat,neLng], [swLat,swLng]\n ]);\n //update map colors\n updateChoropleth(map, current);\n }", "title": "" }, { "docid": "080bdfc963957d4a2b15ffe10ef434ed", "score": "0.59873", "text": "function sbvcgmap_render_map( $this ) {\r\n\t \r\n\t\tvar $markers = $this.find('.sbvcgmap-marker');\r\n\t\tvar map_id = $this.attr('map-id');\r\n\t\tvar zoom = parseInt($this.attr('zoom'));\r\n\t\tvar maptypeid = sbvcgmap_get_map_type($this.attr('maptype'));\r\n\t\t\r\n\t\tpanorama_view = false;\r\n\t\tif($this.attr('maptype') == 'STREETVIEW') {\r\n\t\t\tpanorama_view = true;\r\n\t\t}\r\n\t\t\r\n\t\tvar panoramatogglebutton = sbvcgmap_check_bool($this.attr('panoramatogglebutton'));\r\n\t\tvar pancontrol = sbvcgmap_check_bool($this.attr('pancontrol'));\r\n\t\tvar pancontrol_position = sbvcgmap_get_map_control_position($this.attr('pancontrol_position'));\r\n\t\tvar zoomcontrol = sbvcgmap_check_bool($this.attr('zoomcontrol'));\r\n\t\tvar zoomcontrol_position = sbvcgmap_get_map_control_position($this.attr('zoomcontrol_position'));\r\n\t\tvar zoomcontrolstyle = sbvcgmap_get_zoom_control_style($this.attr('zoomcontrolstyle'));\r\n\t\tvar maptypecontrol = sbvcgmap_check_bool($this.attr('maptypecontrol'));\r\n\t\tvar maptypecontrol_position = sbvcgmap_get_map_control_position($this.attr('maptypecontrol_position'));\r\n\t\tvar streetviewcontrol = sbvcgmap_check_bool($this.attr('streetviewcontrol'));\r\n\t\tvar streetviewcontrol_position = sbvcgmap_get_map_control_position($this.attr('streetviewcontrol_position'));\r\n\t\tvar overviewmapcontrol = sbvcgmap_check_bool($this.attr('overviewmapcontrol'));\r\n\t\tvar overviewmapcontrolvisible = sbvcgmap_check_bool($this.attr('overviewmapcontrolvisible'));\r\n\t\tvar maptypecontrolstyle = sbvcgmap_get_map_type_control_style($this.attr('maptypecontrolstyle'));\r\n\t\tvar mapstyle = sbvcgmap_get_map_style($this.attr('mapstyle'));\r\n\t\tvar weather = sbvcgmap_check_bool($this.attr('weather'));\r\n\t\tvar traffic = sbvcgmap_check_bool($this.attr('traffic'));\r\n\t\tvar transit = sbvcgmap_check_bool($this.attr('transit'));\r\n\t\tvar bicycle = sbvcgmap_check_bool($this.attr('bicycle'));\r\n\t\tvar panoramio = sbvcgmap_check_bool($this.attr('panoramio'));\r\n\t\tvar draggable = sbvcgmap_check_bool($this.attr('draggable'));\r\n\t\tvar scrollwheel = sbvcgmap_check_bool($this.attr('scrollwheel'));\r\n\t\tvar cplatitude = $this.attr('cplatitude');\r\n\t\tvar cplongitude = $this.attr('cplongitude');\r\n\t\tvar scalecontrol = sbvcgmap_check_bool($this.attr('scalecontrol'));\r\n\t\tvar searchtype = $this.attr('searchtype').toLowerCase();\r\n\t\tvar searchradius = parseInt($this.attr('searchradius'));\r\n\t\tvar searchiconanimation = sbvcgmap_get_marker_animation($this.attr('searchiconanimation'));\r\n\t\tvar searchdirectiontext = $this.attr('searchdirectiontext');\r\n\t\tvar reloadonresize = sbvcgmap_check_bool($this.attr('reloadonresize'));\r\n\t\tvar clustering = sbvcgmap_check_bool($this.attr('clustering'));\r\n\t\t\r\n\t\t// vars\r\n\t\tvar args = {\r\n\t\t\tzoom\t\t\t\t: zoom,\r\n\t\t\tcenter\t\t\t\t: new google.maps.LatLng(cplatitude, cplongitude),\r\n\t\t\tmapTypeId\t\t\t: maptypeid,\r\n\t\t\tpanControl\t\t\t: pancontrol,\r\n\t\t\tpanControlOptions: {\r\n\t\t\t\tposition: pancontrol_position\r\n\t\t\t},\r\n\t\t\tzoomControl\t\t\t: zoomcontrol,\r\n\t\t\tzoomControlOptions: {\r\n\t\t\t\tposition: zoomcontrol_position,\r\n\t\t\t\tstyle: zoomcontrolstyle\r\n\t\t\t},\r\n\t\t\tscrollwheel\t\t\t: scrollwheel,\r\n\t\t\tdraggable\t\t\t: draggable,\r\n\t\t\tmapTypeControl\t\t: maptypecontrol,\r\n\t\t\tmapTypeControlOptions\t\t: {\r\n\t\t\t\tposition: maptypecontrol_position,\r\n\t\t\t\tstyle: maptypecontrolstyle\r\n\t\t\t},\r\n\t\t\tscaleControl\t\t: scalecontrol,\r\n\t\t\tstreetViewControl\t: streetviewcontrol,\r\n\t\t\tstreetViewControlOptions: {\r\n\t\t\t\tposition: streetviewcontrol_position\r\n\t\t\t},\r\n\t\t\toverviewMapControl\t: overviewmapcontrol,\r\n\t\t\toverviewMapControlOptions:{\r\n\t\t\t\topened: overviewmapcontrolvisible\r\n\t\t\t},\r\n\t\t\tstyles: mapstyle\r\n\t\r\n\t\t};\r\n\r\n\t\t// create map\t \t\r\n\t\tmap = new google.maps.Map( $this[0], args);\r\n\t\t\r\n\t\tif(weather) {\r\n\t\t\tvar weatherLayer = new google.maps.weather.WeatherLayer({\r\n\t\t\t\ttemperatureUnits: google.maps.weather.TemperatureUnit.FAHRENHEIT\r\n\t\t\t});\r\n\t\t\tweatherLayer.setMap(map);\r\n\t\t}\r\n\t\t\r\n\t\tif(traffic) {\r\n\t\t\tvar trafficLayer = new google.maps.TrafficLayer();\r\n\t\t\ttrafficLayer.setMap(map);\r\n\t\t}\r\n\t\t\r\n\t\tif(transit) {\r\n\t\t\tvar transitLayer = new google.maps.TransitLayer();\r\n\t\t\ttransitLayer.setMap(map);\r\n\t\t}\r\n\t\t\r\n\t\tif(bicycle) {\r\n\t\t\tvar bikeLayer = new google.maps.BicyclingLayer();\r\n\t\t\tbikeLayer.setMap(map);\r\n\t\t}\r\n\t\t\r\n\t\tif(panoramio) {\r\n\t\t\tvar panoramioLayer = new google.maps.panoramio.PanoramioLayer();\r\n\t\t\tpanoramioLayer.setMap(map);\r\n\t\t}\r\n\t\r\n\t\t// add a markers reference\r\n\t\tmap.markers = [];\r\n\t\r\n\t\t// add markers\r\n\t\t$markers.each(function(){\r\n\t\t\tsbvcgmap_add_marker( $(this), map, map_id );\r\n\t\t});\r\n\t\t\r\n\t\tif(clustering)\r\n\t\t\tvar markerCluster = new MarkerClusterer(map, map.markers, {\r\n\t\t\t\timagePath: 'https://rawgit.com/googlemaps/js-marker-clusterer/gh-pages/images/m'\r\n\t\t\t});\r\n\t \r\n\t\t// center map\r\n\t\tif(cplatitude == 0 || cplongitude == 0)\r\n\t\t\tsbvcgmap_center_map( map );\r\n\t\t\r\n\t\t//Add nearest places functionality\r\n\t\tif(searchtype != 'disabled' && searchtype != '') {\r\n\t\t\tvar searchrequest = {\r\n\t\t\t\tlocation: map.getCenter(),\r\n\t\t\t\tradius: searchradius,\r\n\t\t\t\ttypes: [searchtype]\r\n\t\t\t};\r\n\t\t\t\r\n\t\t\tvar service = new google.maps.places.PlacesService(map);\r\n\t\t\tservice.nearbySearch(searchrequest, function(results, status) {\r\n\t\t\t\tif (status == google.maps.places.PlacesServiceStatus.OK) {\r\n\t\t\t\t\tfor (var i = 0; i < results.length; i++) {\r\n\t\t\t\t\t\tsbvcgmap_create_place_marker(results[i], searchiconanimation, searchdirectiontext);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tif(reloadonresize) {\r\n\t\t\t$(window).bind('resize',function() {\r\n\t\t\t\tsbvcgmap_center_map(map);\r\n\t\t\t});\r\n\t\t}\r\n\t\t\r\n\t\tsbvcgmap_maps[map_id] = map;\r\n\t\t\r\n\t\t//Code to make fullscreen map\r\n\t\tif($this.prev('.sbvcgmap-toggle-screen').length) {\r\n\t\t\t$this.prev('.sbvcgmap-toggle-screen').css('margin-left',-(parseInt($this.prev('.sbvcgmap-toggle-screen').outerWidth())/2))\r\n\t\t\t$this.prev('.sbvcgmap-toggle-screen').css('display', 'block');\r\n\t\t\t$this.prev('.sbvcgmap-toggle-screen').bind('click', function() {\r\n\t\t\t\tvar do_screen_mode = $(this).attr('data-do-screen-mode');\r\n\t\t\t\t$(this).children('span').hide();\r\n\t\t\t\t$(this).children('.sbvcgmap-'+do_screen_mode+'-text').show();\r\n\t\t\t\tif(do_screen_mode == 'expand') {\r\n\t\t\t\t\t$(this).closest('.sbvcgmap-map-wrapper').addClass('sbvcgmap-fullscreen');\r\n\t\t\t\t\t$(this).attr('data-do-screen-mode', 'collapse');\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$(this).closest('.sbvcgmap-map-wrapper').removeClass('sbvcgmap-fullscreen');\r\n\t\t\t\t\t$(this).attr('data-do-screen-mode', 'expand');\r\n\t\t\t\t}\r\n\t\t\t\t$(this).css('margin-left',-(parseInt($(this).outerWidth())/2));\r\n\t\t\t\tgoogle.maps.event.trigger(sbvcgmap_maps[map_id], 'resize');\r\n\t\t\t\tsbvcgmap_center_map(sbvcgmap_maps[map_id]);\r\n\t\t\t});\r\n\t\t}\r\n\t\t\r\n\t\t//Street View\r\n\t\tif(panorama_view || panoramatogglebutton) {\r\n\t\t\tvar panorama_center = new google.maps.LatLng(cplatitude, cplongitude);\r\n\t\t\tsbvcgmap_panorama[map_id] = map.getStreetView();\r\n\t\t\tsbvcgmap_panorama[map_id].set('enableCloseButton', false);\r\n\t\t\tsbvcgmap_panorama[map_id].setPosition(panorama_center);\r\n\t\t\tsbvcgmap_panorama[map_id].setPov(({\r\n\t\t\t\theading: 265,\r\n\t\t\t\tpitch: 0\r\n\t\t\t}));\r\n\t\t}\r\n\t\tif(panorama_view) {\r\n\t\t\tsb_toggle_street_view(sbvcgmap_panorama[map_id]);\r\n\t\t}\r\n\t\tif(panoramatogglebutton) {\r\n\t\t\tif($this.closest('.sbvcgmap-map-wrapper').children('.sbvcgmap-toggle-panorama').length) {\r\n\t\t\t\t$this.closest('.sbvcgmap-map-wrapper').children('.sbvcgmap-toggle-panorama').bind('click', function() {\r\n\t\t\t\t\tsb_toggle_street_view(sbvcgmap_panorama[map_id]);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "f9adb1ba5c9edfccc1a60e20bd967615", "score": "0.5982943", "text": "function onMapClicked() {\n\t\tprint(\"map clicked\\n\");\n\t\tselectionClear();\n\t}", "title": "" }, { "docid": "fbed560ae2a51df735b3b886ed8a71af", "score": "0.5981752", "text": "handleZoomChange(self, event) {\n // alert(self.map.zoom);\n for (let i = 0; i < self.infoMarkers.length; i++) {\n if (self.map.zoom < 16) {\n // TODO:NW figure out why array has weird other members\n if (self.infoMarkers[i].setMap)\n self.infoMarkers[i].setMap(null);\n }\n else {\n if (self.infoMarkers[i].setMap)\n self.infoMarkers[i].setMap(self.map);\n }\n }\n for (let i = 0; i < self.pointMarkers.length; i++) {\n if (self.map.zoom < 16) {\n // TODO:NW figure out why array has weird other members\n if (self.pointMarkers[i].setMap)\n self.pointMarkers[i].setMap(null);\n }\n else {\n if (self.pointMarkers[i].setMap)\n self.pointMarkers[i].setMap(self.map);\n }\n }\n }", "title": "" }, { "docid": "cabcc3d3eb8879d544381319e222f7b4", "score": "0.5979907", "text": "zoomOut(amount) { this.renderer.zoomOut(amount); }", "title": "" }, { "docid": "66de85a5b36a745f3d3529177df687d7", "score": "0.5964081", "text": "function map_toggle_zoom(m_region) {\n\t\t$('body').toggleClass('zoomed');\n\n\t\tvar obj = '.zoom_box';\n\t\tif ($('body').hasClass('zoomed')) {\n\t\t\t$(obj).addClass('zoom_' + m_region);\n\t\t} else {\n\t\t\tfor (r in map_regions) {\n\t\t\t\t$(obj).removeClass('zoom_' + map_regions[r]);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "95533bfd76dfa985a251d54be6653f27", "score": "0.5962002", "text": "function initializeButtons(){\n\tvar buttonToggle = function(){\n\t\tvar jqSelf = $(this);\n\t\tjqSelf.parents(\"td\").find(\"button\").removeClass(\"btn-success\").addClass(\"btn-default\");\n\t\tjqSelf.removeClass(\"btn-default\").addClass(\"btn-success\");\n\t};\n\n\t// show area that event active is true.\n\tvar buttons = Object.keys(areaMetaMap)\n\t\t.filter(function(key){\n\t\t\treturn areaMetaMap[key].eventActive;\n\t\t})\n\t\t.map(function(key){\n\t\t\tvar item = areaMetaMap[key];\n\t\t\tvar bounds = item.bounds;\n\t\t\treturn { \n\t\t\t\ttext: item.showText || key,\n\t\t\t\tstart_lat: bounds[2],\n\t\t\t\tend_lat: bounds[3],\n\t\t\t\tstart_lon: bounds[0],\n\t\t\t\tend_lon: bounds[1]\n\t\t\t};\n\t\t});\n\n\tbuttons.forEach(function(item, idx){\n\t\t\n\t\tvar b = document.createElement(\"button\");\n\n\t\t$(b).text(item.text)\n\t\t\t.addClass(\"btn btn-default\")\n\t\t\t.click(\n\t\t\t\t(function(it){\n\t\t\t\t\treturn function(){\n\t\t\t\t\t\tbuttonToggle.call(this);\n\n\t\t\t\t\t\tfromChooseMapEvent = false;\n\t\t\t\t\t\t\n\t\t\t\t\t\tpassToMap.start_lat = it.start_lat;\n\t\t\t\t\t\tpassToMap.end_lat = it.end_lat;\n\t\t\t\t\t\tpassToMap.start_lon = it.start_lon;\n\t\t\t\t\t\tpassToMap.end_lon = it.end_lon;\n\n\t\t\t\t\t\t$(\"#chooseMapText\").text(\"\");\n\t\t\t\t\t};\n\t\t\t\t})(item)\n\t\t\t);\n\n\t\t$(\"#panButtons\").append(b);\n\t});\n\n\t// generate choose from map\n\t$(\"#confirmLocation\").click(function(){\n\t\tbuttonToggle.call( $(\"#chooseMapButton\") );\n\t\tvar leafletPoints = mainMap.getCenter();\n\n\t\tif ( mainMap.getZoom() < minPassZoom ) {\n\t\t\tmainMap.setZoom(minPassZoom);\n\t\t}\n\n\t\tfromChooseMapEvent = true;\n\n\t\t$(\"#chooseMapText\").text( \"您選擇了地圖中心點:\" + [leafletPoints.lat,leafletPoints.lng].join(',') );\n\t});\n}", "title": "" }, { "docid": "93a92b7f614eb186f44659ba2e4eee0a", "score": "0.5961889", "text": "onAdd() {\n // If the marker button hasn't already been created,\n // then create it and add it to the overlay image pane\n if (!this.markerButton) {\n this.createMarkerHTML();\n this.appendMarkerButtonToOverlay();\n }\n }", "title": "" }, { "docid": "8875763bbf679c3770431915c938f055", "score": "0.59417593", "text": "function kmap(map) {\n\n //Overlays \n this.addOverlay = function (obj) {\n this.overlays.push(obj);\n if (typeof(obj.init) == \"function\") {\n obj.init(this);\n }\n this.renderOverlay(obj);\n }\n this.renderOverlay = function (obj) {\n obj.render();\n }\n this.renderOverlays = function () {\n this.overlayDiv.style.display = \"\";\n //if(!this.internetExplorer){\n this.svg.style.display = \"\";\n //}\n var that = this;\n var i=0;\n for (obj in this.overlays) {\n if(i==0){\n try{\n this.overlays[obj].clear(that);\n }catch(e){};\n i++;\n }\n try{\n this.overlays[obj].render(that);\n }catch(e){};\n }\n }\n this.hideOverlays = function () {\n for (obj in this.overlays) {\n try{\n this.overlays[obj].clear(that);\n }catch(e){};\n }\n }\n\n this.removeOverlays = function () {\n while (this.overlays.length > 0) {\n var overlay = this.overlays.pop();\n overlay.clear();\n }\n }\n\n this.removeOverlay = function (ov) {\n for (var i = 0; i < this.overlays.length; i++) {\n var overlay = this.overlays[i];\n if (ov == overlay) {\n ov.clear();\n this.overlays.splice(i ,1);\n break;\n }\n }\n }\n\n\n //\n // every change (lat,lng,zoom) will call a user defined function\n //\n\n this.callbackFunctions = new Array();\n this.addCallbackFunction = function (func) {\n if (typeof(func) == \"function\") {\n this.callbackFunctions.push(func);\n }\n }\n this.executeCallbackFunctions = function () {\n for (var i = 0; i < this.callbackFunctions.length; i++) {\n this.callbackFunctions[i].call();\n }\n }\n\n //\n // A simple distance measuring\n //\n this.startDistance = function () {\n this.distanceMeasuring = \"yes\";\n }\n\n this.endDistance = function () {\n this.distanceMeasuring = \"no\";\n }\n\n /*==================================================\n //\n // Touchscreen and Mouse EVENTS\n //\n ===================================================*/\n\n //\n // Touchscreen\n // Here also the multitouch zoom is done\n //\n\n this.oldMoveX=0;\n this.oldMoveY=0;\n\n \n\n this.start = function (evt) {\n \t\n \t\n \n if (evt.preventDefault) {\n evt.preventDefault(); // The W3C DOM way\n } else {\n evt.returnValue = false; // The IE way\n }\n this.moveAnimationBlocked = true;\n //this.hideOverlays();\n if (evt.touches.length == 1) {\n this.startMoveX = this.moveX - evt.touches[0].pageX / this.faktor / this.sc;\n this.startMoveY = this.moveY - evt.touches[0].pageY / this.faktor / this.sc;\n if (this.mousedownTime != null) {\n var now = (new Date()).getTime();\n if (now - this.mousedownTime < this.doubleclickTime) { \n //var zoomD = Math.ceil(0.01 + this.getZoom() - this.intZoom);\n //this.autoZoomIn(evt.touches[0].pageX, evt.touches[0].pageY, zoomD);\n }\n }\n this.mousedownTime = (new Date()).getTime();\n var that = this;\n clearTimeout(this.zoomOutInterval);\n var tempFunction = function () {\n //KHTML: Please no zoom on hold!\n //that.autoZoomOut()\n };\n this.zoomOutInterval = window.setInterval(tempFunction, 20);\n }\n\n if (evt.touches.length == 2) {\n window.clearInterval(this.zoomOutInterval);\n this.moveok = false;\n var X1 = evt.touches[0].pageX;\n var Y1 = evt.touches[0].pageY;\n var X2 = evt.touches[1].pageX;\n var Y2 = evt.touches[1].pageY;\n this.startDistance = Math.sqrt(Math.pow((X2 - X1), 2) + Math.pow((Y2 - Y1), 2));\n this.startZZ = this.zoom;\n var x = (X1 + X2) / 2 / this.faktor / this.sc;\n var y = (Y1 + Y2) / 2 / this.faktor / this.sc;\n this.startMoveX = this.moveX - x;\n this.startMoveY = this.moveY - y;\n }\n this.oldMoveX=this.moveX;\n this.oldMoveY=this.moveY;\n }\n\n this.moveok=true;\n this.move = function (evt) {\n if (evt.preventDefault) {\n evt.preventDefault(); // The W3C DOM way\n } else {\n evt.returnValue = false; // The IE way\n }\n\n // this.mousedownTime=null;\n if (evt.touches.length == 1) {\n if (this.moveok) {\n this.lastMoveX = this.moveX;\n this.lastMoveY = this.moveY;\n this.moveX = evt.touches[0].pageX / this.faktor / this.sc + this.startMoveX;\n this.moveY = evt.touches[0].pageY / this.faktor / this.sc + this.startMoveY;\n if (!this.zoomOutStarted) {\n if ((Math.abs(this.moveX - this.oldMoveX) > 5) || (Math.abs(this.moveY - this.oldMoveY) > 5)) {\n //alert(this.moveX+\":\"+this.moveY);\n window.clearInterval(this.zoomOutInterval);\n this.zoomOutSpeed = 0.01;\n this.mousedownTime = null;\n }\n var center = new kPoint(this.lat, this.lng);\n this.setCenter2(center, this.zoom);\n this.moveAnimationBlocked = false;\n }\n if ((Math.abs(this.moveX - this.oldMoveX) > 5) || (Math.abs(this.moveY - this.oldMoveY) >5)) {\n // alert(this.moveX+\":\"+this.moveX);\n //alert(99);\n this.mousedownTime = null; //prevents doubleclick if map is moved already\n }\n } else {\n //alert(\"no move\");\n }\n }\n\n if (evt.touches.length == 2) {\n this.mousedownTime = null;\n var X1 = evt.touches[0].pageX;\n var Y1 = evt.touches[0].pageY;\n var X2 = evt.touches[1].pageX;\n var Y2 = evt.touches[1].pageY;\n var Distance = Math.sqrt(Math.pow((X2 - X1), 2) + Math.pow((Y2 - Y1), 2));\n var zoomDelta = (Distance / this.startDistance);\n var zz = this.startZZ + zoomDelta - 1;\n if (zz < 1) {\n zz = 1;\n }\n if (zz > 18) {\n zz = 18;\n zoomDelta = 1;\n }\n var x = (X1 + X2) / 2;\n var y = (Y1 + Y2) / 2;\n\n faktor = Math.pow(2, zz);\n var zoomCenterDeltaX = x / faktor - this.width / 2;\n var zoomCenterDeltaY = y / faktor - this.height / 2;\n var f = Math.pow(2, zoomDelta - 1);\n var dx = zoomCenterDeltaX - zoomCenterDeltaX * f;\n var dy = zoomCenterDeltaY - zoomCenterDeltaY * f;\n\n this.moveX = (x + dx) / faktor + this.startMoveX;\n this.moveY = (y + dy) / faktor + this.startMoveY;\n\n var center = new kPoint(this.lat, this.lng);\n this.setCenter2(center, zz);\n }\n }\n\n this.end = function (evt) {\n if (evt.preventDefault) {\n evt.preventDefault(); // The W3C DOM way\n } else {\n evt.returnValue = false; // The IE way\n }\n window.clearInterval(this.zoomOutInterval);\n this.zoomOutStarted = false;\n this.zoomOutSpeed = 0.01;\n\n if (evt.touches.length == 0) {\n this.moveok = true;\n if (this.moveAnimationMobile) {\n if (this.moveAnimationBlocked == false) {\n var speedX = this.lastMoveX - this.moveX;\n var speedY = this.lastMoveY - this.moveY;\n clearTimeout(this.animateMoveTimeout);\n this.animateMove(speedX, speedY);\n }\n }\n /*\n var that=this;\n var tempFunction=function () {that.moveAnimationBlocked=false};\n setTimeout(tempFunction,this.doubleclickTime);\n */\n }\n //this.renderOverlays();\n }\n\n //\n // mouse events\n //\n //ie sucks\n this.pageX = function (evt) {\n try {\n if (evt.pageX === undefined) {\n var px = evt.clientX + document.body.scrollLeft;\n } else {\n var px = evt.pageX;\n }\n return px - this.mapLeft;\n } catch (e) {\n return this.lastMouseX;\n //return this.width/2 + this.mapLeft;\n }\n }\n this.pageY = function (evt) {\n try {\n if (evt.pageY === undefined) {\n var py = evt.clientY + document.body.scrollTop;\n } else {\n var py = evt.pageY;\n }\n return py - this.mapTop;\n } catch (e) {\n return this.lastMouseY;\n //return this.height/2 +this.mapTop;\n }\n }\n\n this.doubleclick = function (evt) {\n var zoom = this.getZoom();\n var zoomD = Math.ceil(0.0001 + this.getZoom()) - zoom;\n this.autoZoomIn(this.pageX(evt), this.pageY(evt), zoomD);\n }\n\n this.mousedown = function (evt) {\n this.mapParent.focus();\n if (evt.preventDefault) {\n evt.preventDefault(); // The W3C DOM way\n } else {\n window.event.returnValue = false; // The IE way\n }\n\n this.lastMouseX = this.pageX(evt);\n this.lastMouseY = this.pageY(evt);\n this.moveAnimationBlocked = true;\n if (this.mousedownTime2 != null) {\n var now = (new Date()).getTime();\n if (now - this.mousedownTime2 < this.doubleclickTime2) {\n this.doubleclick(evt);\n }\n }\n this.mousedownTime2 = (new Date()).getTime();\n\n if (this.distanceMeasuring == \"yes\") {\n //this.normalize();\n this.distanceStartpoint = this.XYTolatlng(this.moveX + this.pageX(evt), this.moveY + this.pageY(evt));\n var img = document.createElement(\"img\");\n img.setAttribute(\"src\", \"images/dot_green.png\");\n img.style.position = \"absolute\";\n img.style.top = \"-3px\"; //<--- flag\n img.style.left = \"-4px\"; //<--- flag\n img.style.width = \"8px\"; //<--- flag\n img.style.height = \"8px\";\n\n var marker = new kMarker(this.distanceStartpoint, img);\n this.addOverlay(marker);\n var img2 = img.cloneNode(img);\n this.moveMarker = new kMarker(this.distanceStartpoint, img2);\n\n var points = new Array();\n var style = new kStyle();\n style.addStyle(\"stroke-width\", 1);\n style.addStyle(\"stroke\", \"green\");\n style.addStyle(\"stroked\", \"green\");\n this.measureLine = new kPolyline(points, style);\n this.addOverlay(this.measureLine);\n\n return;\n }\n\n\n if (evt.shiftKey) {\n this.selectRectLeft = this.pageX(evt);\n this.selectRectTop = this.pageY(evt);\n\n // this.distanceStartpoint=this.XYTolatlng( this.pageX(evt), this.pageY(evt));\n this.selectRect = document.createElement(\"div\");\n this.selectRect.style.left = this.selectRectLeft + \"px\";\n this.selectRect.style.top = this.selectRectTop + \"px\";\n this.selectRect.style.border = \"1px solid gray\";\n if (!this.internetExplorer) {\n this.selectRect.style.opacity = 0.5;\n this.selectRect.style.backgroundColor = \"white\";\n }\n this.selectRect.style.position = \"absolute\";\n this.map.parentNode.appendChild(this.selectRect);\n } else {\n //this.hideOverlays();\n this.startMoveX = this.moveX - (this.pageX(evt)) / this.faktor / this.sc;\n this.startMoveY = this.moveY - (this.pageY(evt)) / this.faktor / this.sc;\n this.movestarted = true;\n }\n return false;\n }\n\n this.mousemove = function (evt) {\n if (evt.preventDefault) {\n evt.preventDefault(); // The W3C DOM way\n } else {\n window.event.returnValue = false; // The IE way\n }\n //this.mousedownTime2=0; //if it's moved it's not a doubleclick\n this.lastMouseX = this.pageX(evt);\n this.lastMouseY = this.pageY(evt);\n if (this.distanceMeasuring) {\n if (this.moveMarker) {\n //this.normalize();\n var movePoint = this.XYTolatlng(this.pageX(evt), this.pageY(evt));\n this.moveMarker.moveTo(movePoint);\n this.addOverlay(this.moveMarker);\n //add line\n var points = new Array();\n if (this.distanceStartpoint.getLng() < movePoint.getLng()) {\n points.push(this.distanceStartpoint);\n points.push(movePoint);\n } else {\n points.push(movePoint);\n points.push(this.distanceStartpoint);\n }\n\n this.measureLine.setPoints(points);\n var mbr = new kBounds(movePoint, this.distanceStartpoint);\n var d = mbr.getDistanceText();\n\n var style2 = new kStyle();\n style2.addStyle(\"fill\", \"black\");\n style2.addStyle(\"stroke\", \"white\");\n style2.addStyle(\"stroke-width\", 0.5);\n style2.addStyle(\"font-size\", \"18px\");\n if (navigator.userAgent.indexOf(\"Opera\") != -1) {\n style2.addStyle(\"font-size\", \"15px\");\n } else {\n style2.addStyle(\"font-weight\", \"bold\");\n }\n style2.addStyle(\"text-anchor\", \"middle\");\n style2.addStyle(\"dy\", \"-2\");\n this.measureLine.setText(d, style2);\n var that = this;\n this.measureLine.render(that);\n return;\n }\n }\n if (evt.shiftKey) {\n if (this.selectRect) {\n this.selectRect.style.width = Math.abs(this.pageX(evt) - this.selectRectLeft) + \"px\";\n this.selectRect.style.height = Math.abs(this.pageY(evt) - this.selectRectTop) + \"px\";\n if (this.pageX(evt) < this.selectRectLeft) {\n this.selectRect.style.left = this.pageX(evt);\n }\n if (this.pageY(evt) < this.selectRectTop) {\n this.selectRect.style.top = this.pageY(evt);\n }\n }\n } else {\n if (this.movestarted) {\n this.lastMoveX = this.moveX;\n this.lastMoveY = this.moveY;\n this.lastMoveTime = new Date();\n this.moveX = (this.pageX(evt)) / this.faktor / this.sc + this.startMoveX;\n this.moveY = (this.pageY(evt)) / this.faktor / this.sc + this.startMoveY;\n\n var center = new kPoint(this.lat, this.lng);\n //alert(evt.pageX);\n this.setCenter2(center, this.zoom);\n this.moveAnimationBlocked = false;\n }\n }\n return false;\n }\n this.mouseup = function (evt) {\n if (evt.preventDefault) {\n evt.preventDefault(); // The W3C DOM way\n } else {\n evt.returnValue = false; // The IE way\n }\n this.lastMouseX = this.pageX(evt);\n this.lastMouseY = this.pageY(evt);\n if (this.moveMarker) {\n this.moveMarker = null;\n }\n if (this.selectRect) {\n //this.normalize();\n var p1 = this.XYTolatlng(this.selectRect.offsetLeft, this.selectRect.offsetTop + this.selectRect.offsetHeight);\n var p2 = this.XYTolatlng(this.selectRect.offsetLeft + this.selectRect.offsetWidth, this.selectRect.offsetTop );\n\n var bounds = new kBounds(p1, p2);\n this.setBounds(bounds);\n this.selectRect.parentNode.removeChild(this.selectRect);\n this.selectRect = null;\n }\n\n //using this normalize some things are working better, others not so goot. \n //delelte it will solve some problems but bring other problems\n //this.normalize();\n var now=new Date(); \n var timeDelta=now - this.lastMoveTime; \n if (this.wheelSpeedConfig[\"moveAnimateDesktop\"] &&timeDelta !=0) {\n if (this.movestarted) {\n if (this.moveAnimationBlocked == false) {\n var speedX = (this.lastMoveX - this.moveX) / timeDelta ;\n var speedY = (this.lastMoveY - this.moveY) / timeDelta ;\n var maxSpeed=5;\n if(speedX >maxSpeed)speedX=maxSpeed;\n if(speedY >maxSpeed)speedY=maxSpeed;\n if(speedX < -maxSpeed)speedX=-maxSpeed;\n if(speedY < -maxSpeed)speedY=-maxSpeed;\n \n if(Math.abs(speedX) > this.wheelSpeedConfig[\"animateMinSpeed\"] || Math.abs(speedY) > this.wheelSpeedConfig[\"animateMinSpeed\"]){\n this.animateMove(speedX, speedY);\n }else{\n //this.renderOverlays();\n }\n }\n }\n } else {\n //this.renderOverlays();\n }\n var that=this;\n var tempFunction=function(){\n that.movestarted = false;\n }\n setTimeout(tempFunction,1); \n }\n\n //\n // this function should draw the map and remove any moveX,moveY\n // Maybe buggy\n //\n/*\n this.normalize=function(){\n //normalize after move speed trick\n if(!isNaN(this.movedLat)){\n if(!isNaN(this.movedLng)){\n var lat=this.movedLat;\n var lng=this.movedLng;\n var center=new kPoint(lat,lng);\n var zoom=this.getZoom();\n //this.moveX=0;\n //this.moveY=0;\n //this.setCenterNoLog(center,zoom);\n //end normalize (maybe this.stop needs the same)\n }\n }\n }\n */\n\n //\n // mouse wheel zoom\n // the mousewheel speed depends on browser and os\n // to optimize this could improve the map a lot.\n // todo: wheelspeed\n //\n\n this.zoomAccelerate = 0;\n this.lastWheelDelta=0; //workaround for spontan wheel dircetion change (mac firefox, safari windows)\n this.mousewheel = function (evt) {\n if (evt.preventDefault) {\n evt.preventDefault(); // The W3C DOM way\n } else {\n evt.returnValue = false; // The IE way\n }\n this.mapParent.focus();\n\n this.wheelEventCounter++;\n var that = this;\n var tempFunction = function () {\n that.wheelEventCounter--\n };\n window.setTimeout(tempFunction, 1000);\n\n delta = null;\n if (!evt) /* For IE. */\n evt = window.event;\n if (evt.wheelDelta) { /* IE/Opera/Chrom. */\n delta = evt.wheelDelta / 60;\n if (window.opera) {\n delta = delta ;\n }\n } else if (evt.detail) { /** Mozilla case. */\n delta = -evt.detail / 3;\n if(this.lastWheelDelta * delta <0){\n // console.log(this.lastWheelDelta * delta);\n if(!this.wheelSpeedConfig[\"digizoom\"]){\n delta=0;\n }\n }\n this.lastWheelDelta=-evt.detail/3;\n }\n if (navigator.userAgent.indexOf(\"Chrome\") != -1) {\n if (navigator.userAgent.indexOf(\"Linux\") != -1) {\n delta = evt.wheelDelta / 120;\n }\n }\n// document.getElementById(\"debug\").textContent=delta;\n// console.log(evt.detail);\n\n if(this.wheelSpeedConfig[\"digizoom\"]){\n this.digizoom(this.pageX(evt), this.pageY(evt), delta);\n return;\n }\n\n var dzoom = delta * this.wheelSpeedConfig[\"acceleration\"] * 0.03;\n\n if (dzoom > 0 && this.zoomAccelerate < 0) this.zoomAccelerate = 0;\n if (dzoom < 0 && this.zoomAccelerate > 0) this.zoomAccelerate = 0;\n\n if (!isNaN(dzoom)) {\n this.zoomAccelerate = this.zoomAccelerate + dzoom;\n } else {\n alert(\"hopala\");\n this.zoomAccelerate = 0;\n }\n\n var that = this;\n\n var tempFunction = function () {\n that.zooming(that.pageX(evt), that.pageY(evt))\n };\n if (this.wheelZoomTimeout) {\n window.clearTimeout(this.wheelZoomTimeout);\n }\n window.setTimeout(tempFunction, 20);\n }\n\n this.digizoomblocked=false\n this.digizoom=function(mousex,mousey,delta){\n var that=this; \n if(this.digizoomblocked){\n return;\n }\n that.digizoomblocked = true;\n var func = function () {\n that.digizoomblocked = false;\n };\n setTimeout(func,300);\n\n if(delta >0){\n var zoomD = Math.ceil(0.01+ this.getZoom() - this.getIntZoom());\n }else{\n var zoomD = Math.ceil( this.getZoom() - this.getIntZoom())-0.98;\n }\n this.autoZoomIn(mousex, mousey, zoomD);\n\n }\n\n this.wheelZoomTimeout = null;\n this.zooming = function (pageX, pageY) {\n var ttt = this.zoomAccelerate;\n\n if (this.wheelZoomTimeout) {\n clearTimeout(this.wheelZoomTimeout);\n }\n if (Math.abs(this.zoomAccelerate) > this.wheelSpeedConfig[\"zoomAnimationSlowdown\"] * 2) {\n if (this.wheelSpeedConfig[\"animate\"]) {\n var that = this;\n var tempFunction = function () {\n that.zooming(pageX, pageY)\n };\n var time = 1 / this.wheelSpeedConfig[\"animationFPS\"] * 1000;\n this.wheelZoomTimeout = window.setTimeout(tempFunction, time);\n } else {\n //alert(\"gut\");\n }\n }\n\n if (this.zoomAccelerate > this.wheelSpeedConfig[\"maxSpeed\"] / 10) this.zoomAccelerate = this.wheelSpeedConfig[\"maxSpeed\"] / 10;\n if (this.zoomAccelerate < -this.wheelSpeedConfig[\"maxSpeed\"] / 10) this.zoomAccelerate = -this.wheelSpeedConfig[\"maxSpeed\"] / 10;\n var oldzoom = this.zoom;\n this.zoom = this.zoom + this.zoomAccelerate *8 /(4 +this.getZoom()); // * this.wheelSpeedConfig[\"speed\"]; \n if (this.zoom <= 1) {\n this.zoom = 1;\n }\n if (this.zoom >= 18) {\n this.zoom = 18;\n }\n\n faktor = Math.pow(2, this.zoom);\n var zoomCenterDeltaX = (pageX) - this.width / 2;\n var zoomCenterDeltaY = (pageY) - this.height / 2;\n\n var dzoom = this.zoom - oldzoom;\n var f = Math.pow(2, dzoom);\n\n var dx = zoomCenterDeltaX - zoomCenterDeltaX * f;\n var dy = zoomCenterDeltaY - zoomCenterDeltaY * f;\n\n this.moveX = this.moveX + dx / faktor;\n this.moveY = this.moveY + dy / faktor;\n\n if (this.zoomAccelerate > 0) {\n this.zoomAccelerate = this.zoomAccelerate - this.wheelSpeedConfig[\"zoomAnimationSlowdown\"];\n }\n if (this.zoomAccelerate < 0) {\n this.zoomAccelerate = this.zoomAccelerate + this.wheelSpeedConfig[\"zoomAnimationSlowdown\"];\n }\n\n this.setCenter2(this.center, this.zoom);\n //this.renderOverlays();\n\n if (Math.abs(this.zoomAccelerate) < this.wheelSpeedConfig[\"zoomAnimationSlowdown\"] * 2) {\n this.zoomAccelerate = 0;\n }\n }\n\n //\n // Map continues moving after mouse up\n //\n\n this.animateMove = function (speedX, speedY) {\n clearTimeout(this.animateMoveTimeout);\n if (Math.abs(speedX) <= 0.00001 && Math.abs(speedY) <= 0.00001) {\n //this.renderOverlays();\n return;\n }\n this.moveX = -speedX + this.moveX;\n this.moveY = -speedY + this.moveY;\n\n var that = this;\n var tempFunction = function () {\n that.animateMove(speedX * that.wheelSpeedConfig[\"moveAnimationSlowdown\"], speedY * that.wheelSpeedConfig[\"moveAnimationSlowdown\"]);\n }\n this.animateMoveTimeout = window.setTimeout(tempFunction, 20);\n this.setCenter2(this.center, this.zoom);\n }\n\n //\n // zoom in animation\n //\n\n this.autoZoomInTimeout = null;\n this.autoZoomIn = function (x, y, z) {\n //console.log(z);\n if (this.autoZoomInTimeout) {\n window.clearTimeout(this.autoZoomInTimeout);\n }\n var stepwidth = 0.10;\n if (z < 0) {\n stepwidth = -stepwidth\n }\n zoomGap = false;\n if (Math.abs(z) <= stepwidth) {\n zoomGap = true;\n }\n //this.hideOverlays();\n var dzoom = stepwidth;\n var zoom = this.zoom + dzoom;\n if (zoomGap) {\n zoom = Math.round(zoom);\n //dzoom = z;\n dzoom = zoom - this.zoom ;\n //console.log(\"gap: \"+dzoom+\" : \"+zoom);\n }\n\n faktor = Math.pow(2, zoom);\n var zoomCenterDeltaX = x - this.width / 2;\n var zoomCenterDeltaY = y - this.height / 2;\n var f = Math.pow(2, dzoom);\n\n var dx = zoomCenterDeltaX - zoomCenterDeltaX * f;\n var dy = zoomCenterDeltaY - zoomCenterDeltaY * f;\n\n if(zoom >=1){\n this.moveX = this.moveX + dx / faktor;\n this.moveY = this.moveY + dy / faktor;\n }\n\n\n var center = new kPoint(this.lat, this.lng);\n if (zoom > 18) zoom = 18;\n if (zoom < 1){\n zoom = 1;\n }\n zoom = Math.round(zoom * 1000) / 1000;\n this.setCenter2(center, zoom);\n var newz = z - dzoom;\n var that = this;\n if (!zoomGap) {\n var tempFunction = function () {\n that.autoZoomIn(x, y, newz)\n };\n this.autoZoomInTimeout = window.setTimeout(tempFunction, 10);\n } else {\n //this.renderOverlays();\n }\n\n }\n\n //\n // zoom out animation\n //\n this.autoZoomOut = function () {\n if (this.mousedownTime != null) {\n var now = (new Date()).getTime();\n if (now - this.mousedownTime > this.zoomOutTime) {\n this.zoomOutStarted = true;\n //var center=new kPoint(this.lat,this.lng);\n var center = this.getCenter();\n var zoom = this.zoom - this.zoomOutSpeed;\n if (zoom < 1) zoom = 1;\n this.setCenter(center, zoom);\n this.zoomOutSpeed = this.zoomOutSpeed * 1.01;\n }\n }\n }\n\n //\n // Set the map coordinates and zoom\n //\n\n this.setCenter = function (center, zoom) {\n this.moveX = 0;\n this.moveY = 0;\n this.record();\n this.setCenterNoLog(center, zoom);\n }\n this.setCenter3 = function (center, zoom) {\n this.moveX = 0;\n this.moveY = 0;\n this.setCenterNoLog(center, zoom);\n }\n\n // same as setCenter but moveX,moveY are not reset (for internal use)\n this.setCenter2 = function (center, zoom) {\n this.record();\n this.setCenterNoLog(center, zoom);\n }\n\n\n //\n // same as setCenter but no history item is generated (for undo, redo)\n //\n\n this.setCenterNoLog = function (center, zoom) {\n this.center = center;\n this.lat = center.getLat();\n this.lng = center.getLng();\n\n var zoom = parseFloat(zoom);\n this.center = center;\n this.zoom = zoom;\n\n this.layer(this.map, this.lat, this.lng, this.moveX, this.moveY, zoom);\n this.executeCallbackFunctions();\n }\n\n //\n // For good speed many frames are dropped. If the frames must not be dropped, this medthod can be used\n // \n\n this.forceSetCenter = function (center, zoom) {\n var zoom = parseFloat(zoom);\n this.center = center;\n this.zoom = zoom;\n this.lat = center.getLat();\n this.lng = center.getLng();\n this.moveX = 0;\n this.moveY = 0;\n\n this.layer(this.map, this.lat, this.lng, this.moveX, this.moveY, zoom);\n }\n\n\n\n //\n // read the map center (no zoom value)\n //\n\n this.getCenter = function () {\n if (this.moveX != 0 || this.moveY != 0) {\n var center = new kPoint(this.movedLat, this.movedLng);\n } else {\n if (!this.center) {\n/*\n this.setCenterNoLog(new kPoint(0,0),2);\n var center=this.center;\n */\n } else {\n var center = this.center;\n }\n }\n return center;\n }\n\n\n //\n // read bounds. The Coordinates at corners of the map div sw, ne would be better (change it!)\n //\n\n this.getBounds = function () {\n var sw = this.XYTolatlng(0, this.height);\n var ne = this.XYTolatlng(this.width, 0);\n var bounds = new kBounds(sw, ne);\n // alert(p1.getLat()+\":\"+p1.getLng()+\":\"+p2.getLat()+\":\"+p2.getLng());\n return bounds;\n }\n\n //\n // like setCenter but with two gps points\n //\n\n this.setBounds = function (b) {\n //this.normalize();\n //the setbounds should be a mathematical formula and not guessing around.\n //if you know this formula pease add it here.\n //this.getSize();\n var p1 = b.getSW();\n var p2 = b.getNE();\n\n var minlat = p1.getLat();\n var maxlat = p2.getLat();\n var minlng = p1.getLng();\n var maxlng = p2.getLng();\n\n var minlat360 = lat2y(minlat);\n var maxlat360 = lat2y(maxlat);\n var centerLng = (minlng + maxlng) / 2;\n var centerLat360 = (minlat360 + maxlat360) / 2;\n var centerLat = y2lat(centerLat360);\n var center = new kPoint(centerLat, centerLng);\n var extendY = Math.abs(maxlat360 - minlat360);\n var extendX = Math.abs(maxlng - minlng);\n if (extendX / this.width > extendY / this.height) {\n var extend = extendX;\n var screensize = this.width;\n } else {\n var extend = extendY;\n var screensize = this.height;\n }\n //zoomlevel 1: 512 pixel\n //zoomlevel 2: 1024 pixel\n //...\n //extend = 360 > zoomlevel 1 , at 512px screen\n //extend = 360 > zoomlevel 2 , at 1024px screen\n //extend at zoomlevel1: extend/360 * 512px \n var scalarZoom = 360 / extend;\n var screenfaktor = 512 / screensize;\n\n var zoom = (Math.log(scalarZoom / screenfaktor)) / (Math.log(2)) + 1;\n\n if (zoom > 18) {\n zoom = 18;\n }\n if (zoom < 1) {\n zoom = 1;\n }\n if (this.center) {\n if (this.wheelSpeedConfig[\"rectShiftAnimate\"]) {\n this.animatedGoto(center, zoom, this.wheelSpeedConfig[\"rectShiftAnimationTime\"]);\n } else {\n this.setCenter(center, zoom );\n }\n } else {\n this.setCenter(center, zoom);\n }\n }\n\n this.animatedGotoStep = null;\n this.animatedGotoTimeout=new Array();\n this.animatedGoto = function (newCenter, newZoom, time) {\n //this.hideOverlays();\n var zoomSteps = time / 10;\n var oldCenter = this.getCenter();\n var newLat = newCenter.getLat();\n var newLng = newCenter.getLng();\n var oldLat = oldCenter.getLat();\n var oldLng = oldCenter.getLng();\n var oldZoom = this.getZoom();\n var dLat = (newLat - oldLat) / zoomSteps;\n var dLng = (newLng - oldLng) / zoomSteps;\n var dZoom = (newZoom - oldZoom) / zoomSteps;\n var dMoveX = this.moveX / zoomSteps;\n var dMoveY = this.moveY / zoomSteps;\n var oldMoveX = this.moveX;\n var oldMoveY = this.moveY;\n this.animatedGotoStep = 0;\n var that = this;\n while(timeout= this.animatedGotoTimeout.pop()){\n clearTimeout(timeout);\n }\n \n for (var i = 0; i < zoomSteps; i++) {\n var lat = oldLat + dLat * i;\n var lng = oldLng + dLng * i;\n var zoom = oldZoom + dZoom * i;\n\n var tempFunction = function () {\n that.animatedGotoExec(oldLat, oldLng, oldZoom, dLat, dLng, dZoom, oldMoveX, oldMoveY, dMoveX, dMoveY)\n }\n this.animatedGotoTimeout[i]=window.setTimeout(tempFunction, 10 * i);\n }\n/*\n var tempFunction=function(){ that.setCenter2(new kPoint(newLat,newLng),newZoom);that.renderOverlays()}\n window.setTimeout(tempFunction,time+200);\n */\n\n }\n this.animatedGotoExec = function (oldLat, oldLng, oldZoom, dLat, dLng, dZoom, oldMoveX, oldMoveY, dMoveX, dMoveY) {\n this.moveX = -dMoveX;\n this.moveY = -dMoveY;\n var lat = oldLat + dLat * this.animatedGotoStep;\n var lng = oldLng + dLng * this.animatedGotoStep;\n var zoom = oldZoom + dZoom * this.animatedGotoStep;\n this.animatedGotoStep++;\n\n this.setCenter(new kPoint(lat, lng), zoom);\n\n }\n\n this.getZoom = function () {\n return this.zoom;\n }\n this.getIntZoom = function () {\n return this.intZoom;\n }\n\n //\n // WGS84 to x,y at the layer calculation\n // This method is uses when 3D CSS is used.\n // For Vector graphics also the 3D CSS is used.\n //\n\n this.latlngToXYlayer = function (point) {\n //if you use this function be warned that it only works for the SVG Layer an css3d\n var zoom = this.map.intZoom;\n var lat = point.getLat();\n var lng = point.getLng();\n\n var tileTest = getTileNumber(lat, lng, zoom);\n var worldCenter = this.getCenter();\n var tileCenter = getTileNumber(worldCenter.getLat(), worldCenter.getLng(), zoom);\n\n var faktor = Math.pow(2, this.intZoom);\n var x = (tileCenter[0] - tileTest[0]) * this.tileW * faktor;\n var y = (tileCenter[1] - tileTest[1]) * this.tileW * faktor;\n\n if (x > 1000000) {\n alert(\"grosser wert\");\n }\n\n var dx = this.layers[this.intZoom][\"dx\"];\n var dy = this.layers[this.intZoom][\"dy\"];\n var point = new Array();\n/*\n point[\"x\"]=-x +this.svgWidth/2 ;\n point[\"y\"]=-y +this.svgHeight/2 ;\n var rand=Math.random();\n if(rand > 1.2){\n point[\"x\"]=0;\n point[\"y\"]=0;\n }\n */\n\n point[\"x\"] = -x + this.width / 2;\n point[\"y\"] = -y + this.height / 2;\n return (point);\n\n }\n\n //\n // WGS84 to x,y at the div calculation\n //\n this.latlngToXY = function (point) {\n var lat = point.getLat();\n var lng = point.getLng();\n var intZoom = this.getIntZoom();\n tileTest = getTileNumber(lat, lng, intZoom);\n var worldCenter = this.getCenter();\n\n var tileCenter = getTileNumber(worldCenter.getLat(), worldCenter.getLng(), intZoom);\n var x = (tileCenter[0] - tileTest[0]) * this.tileW * this.sc - this.width / 2;\n var y = (tileCenter[1] - tileTest[1]) * this.tileW * this.sc - this.height / 2;\n\n var point = new Array();\n point[\"x\"] = -x;\n point[\"y\"] = -y;\n return (point);\n\n }\n\n\n //\n // screen (map div) coordinates to lat,lng \n //\n this.XYTolatlng = function (x, y) {\n var center = this.getCenter();\n if (!center) {\n return\n };\n var faktor = Math.pow(2, this.intZoom)\n var centerLat = center.getLat();\n var centerLng = center.getLng();\n\n var xypoint = getTileNumber(centerLat, centerLng, this.intZoom);\n var dx = x - this.width / 2;\n var dy = y -this.height / 2; //das style\n var lng = (xypoint[0] + dx / this.tileW / this.sc) / faktor * 360 - 180;\n var lat360 = (xypoint[1] + dy / this.tileH / this.sc) / faktor * 360 - 180;\n\n var lat = -y2lat(lat360) + 0;\n var p = new kPoint(lat, lng);\n return p;\n }\n\n this.mouseToLatLng=function(evt){\n var x=this.pageX(evt); \n var y=this.pageY(evt); \n var p=this.XYTolatlng(x,y);\n return p;\n }\n\n\n //\n // for iPhone to make page fullscreen (maybe not working)\n //\n this.reSize = function () {\n var that = this;\n //setTimeout(\"window.scrollTo(0,1)\",500);\n var tempFunction = function () {\n that.getSize(that)\n };\n window.setTimeout(tempFunction, 1050);\n\n }\n\n //\n // read the size of the DIV that will contain the map\n // this method is buggy - no good\n //\n\n this.getSize = function () {\n this.width = this.map.parentNode.offsetWidth;\n this.height = this.map.parentNode.offsetHeight;\n var obj = this.map\n var left = 0;\n var top = 0;\n do {\n left += obj.offsetLeft;\n top += obj.offsetTop;\n obj = obj.offsetParent;\n } while (obj.offsetParent);\n/*\n this.map.style.left=this.width/2+\"px\"; //not very good programming style\n this.map.style.top=this.height/2+\"px\"; //not very good programming style\n */\n this.mapTop = top;\n this.mapLeft = left;\n\n }\n\n\n //for undo,redo\n this.recordArray = new Array();\n this.record = function () {\n var center = this.getCenter();\n if (center) {\n var lat = center.getLat();\n var lng = center.getLng();\n var zoom = this.getZoom();\n var item = new Array(lat, lng, zoom);\n this.recordArray.push(item);\n }\n }\n this.play = function (i) {\n if (i < 1) return;\n if (i > (this.recordArray.length - 1)) return;\n var item = this.recordArray[i];\n var center = new kPoint(item[0], item[1]);\n //undo,redo must not generate history items\n this.moveX = 0;\n this.moveY = 0;\n this.setCenter3(center, item[2]);\n }\n\n\n\n/*================== LAYERMANAGER (which layer is visible) =====================\n Description: This method desides with layer is visible at the moment. \n It has the same parameters as the \"draw\" method, but no \"intZoom\"\n ========================================================================= */\n\n\n this.layerDrawLastFrame = null;\n this.doTheOverlayes=true;\n this.finalDraw=false;\n this.lastZoom=null;\n this.layer = function (map, lat, lng, moveX, moveY, zoom) {\n if(!zoom){\n var zoom=this.getZoom();\n }\n //if (!this.css3d) {\n if (this.layerDrawLastFrame) {\n window.clearTimeout(this.layerDrawLastFrame);\n this.layerDrawLastFrame = null;\n }\n if (this.blocked ||this.finalDraw==false) {\n\n //the last frames must be drawn to have good result\n var that = this;\n var tempFunction = function () {\n that.finalDraw=true;\n that.layer(map, lat, lng, moveX, moveY, zoom);\n };\n this.layerDrawLastFrame = window.setTimeout(tempFunction, 100);\n\n if (this.blocked){\n return;\n }\n }\n this.blocked = true;\n \n //}\n\n //hide all zoomlayers\n //this.layers[this.visibleZoom][\"layerDiv\"].style.visibility;\n for(var i=0; i < 22;i++){\n if(this.layers[i]){\n this.layers[i][\"layerDiv\"].style.visibility=\"hidden\";\n }\n }\n\n\n /*\n if(this.lastZoom!=this.getZoom()){\n if(this.finalDraw){\n var intZoom = Math.round(zoom );\n this.lastZoom=this.getZoom();\n }else{\n if(this.lastZoom > this.getZoom()){\n var intZoom = Math.round(zoom );\n }else{\n var intZoom = Math.round(zoom );\n }\n }\n if (intZoom > this.maxIntZoom) {\n intZoom = 18;\n }\n this.intZoom = intZoom;\n }else{\n intZoom=this.getIntZoom();\n }\n */\n if(this.wheelSpeedConfig[\"digizoom\"]){\n var intZoom = Math.floor(zoom );\n }else{\n var intZoom = Math.round(zoom );\n }\n this.intZoom=intZoom;\n if (intZoom > this.maxIntZoom) {\n intZoom = 18;\n }\n if (!this.visibleZoom) {\n this.visibleZoom = intZoom;\n this.oldIntZoom = intZoom;\n }\n this.faktor = Math.pow(2, intZoom); //????????\n var zoomDelta = zoom - intZoom;\n this.sc = Math.pow(2, zoomDelta);\n\n //Calculate the next displayed layer\n this.loadingZoomLevel=intZoom;\n if(this.visibleZoom < intZoom){\n if(Math.abs(this.visibleZoom - intZoom) < 4){\n this.loadingZoomLevel=parseInt(this.visibleZoom) +1;\n }\n\n }\n //draw the layer with current zoomlevel\n this.draw(this.map, lat, lng, moveX, moveY, this.loadingZoomLevel, zoom);\n this.layers[this.loadingZoomLevel][\"layerDiv\"].style.visibility = \"\";\n\n\n //if the current zoomlevel is not loaded completly, there must be a second layer displayed\n if (intZoom != this.visibleZoom) {\n if(this.visibleZoom < intZoom+2){\n this.draw(this.map, lat, lng, moveX, moveY, this.visibleZoom, zoom);\n this.layers[this.visibleZoom][\"layerDiv\"].style.visibility = \"\";\n }else{\n this.layers[this.visibleZoom][\"layerDiv\"].style.visibility = \"hidden\";\n }\n\n }\n\n if (this.layers[this.loadingZoomLevel][\"loadComplete\"]) {\n if (this.visibleLayer != intZoom) {\n this.layers[this.loadingZoomLevel][\"loadComplete\"]=false;\n this.hideLayer(this.visibleZoom);\n //this.layers[this.visibleZoom][\"layerDiv\"].style.visibility = \"hidden\";\n this.visibleZoom = this.loadingZoomLevel;\n //this.layers[this.visibleZoom][\"layerDiv\"].style.visibility = \"\";\n }\n }\n if(this.quadtreeTimeout){\n clearTimeout(this.quadtreeTimeout);\n }\n if (this.loadingZoomLevel != intZoom ) {\n //load the level again\n //console.log(\"again:\"+this.visibleZoom+\":\"+this.loadingZoomLevel+\":\"+intZoom);\n\n //this.layer(map, lat, lng, moveX, moveY, zoom) \n var that = this;\n var tempFunction = function () {\n that.layer(map, lat, lng, moveX, moveY);\n //console.log(\"again:\"+that.visibleZoom+\":\"+that.loadingZoomLevel+\":\"+intZoom+\":\"+that.getZoom()+\":\"+zoom);\n };\n /*\n if(this.quadtreeTimeout){\n clearTimeout(this.quadtreeTimeout);\n }\n */\n this.quadtreeTimeout = window.setTimeout(tempFunction, 200);\n }\n \n if (this.oldIntZoom != this.intZoom) {\n if (this.oldIntZoom != this.visibleZoom) {\n this.hideLayer(this.oldIntZoom);\n }\n }\n this.oldIntZoom = intZoom;\n\n if(this.delayedOverlay){\n window.clearTimeout(this.delayedOverlay);\n }\n if(this.doTheOverlayes){\n var startTime=new Date();\n this.renderOverlays();\n var duration=(new Date() - startTime);\n if(duration > 50){\n this.doTheOverlayes=false;\n }else{\n this.doTheOverlayes=true;\n }\n }else{\n this.hideOverlays();\n var that = this;\n var func = function () {\n //console.log(\"render o\");\n //that.doTheOverlayes=true;\n that.renderOverlays();\n };\n this.delayedOverlay=window.setTimeout(func, 200);\n\n }\n\n\n //firefox cheats a little bit and needs a time penalty\n // if (!this.css3d) {\n var that = this;\n var func = function () {\n that.blocked = false;\n };\n window.setTimeout(func, 20);\n // }\n this.finalDraw=false;\n }\n\n/* ==================== DRAW (speed optimized!!!)===============================\n \n This function draws one layer. It is highly opimized for iPhone. \n Please DO NOT CHANGE things except you want to increase speed!\n For opimization you need a benchmark test.\n\n How it works:\n The position of the images is fixed.\n The layer (not the images) is moved because of better performance\n Even zooming does not change position of the images, if 3D CSS is active (webkit).\n\n this method uses \"this.layers\" , \"this.oldIntZoom\", \"this.width\", \"this.height\";\n \n ===================================================================================*/\n\n this.draw = function (map, lat, lng, moveX, moveY, intZoom, zoom) {\n\n this.framesCounter++;\n var that = this;\n var tempFunction = function () {\n that.framesCounter--\n };\n window.setTimeout(tempFunction, 1000);\n\n //console.log(\"draw\");\n var faktor = Math.pow(2, intZoom);\n\n //create new layer\n if (!this.layers[intZoom]) {\n var tile = getTileNumber(lat, lng, intZoom);\n this.layers[intZoom] = new Array();\n this.layers[intZoom][\"startTileX\"] = tile[0];\n this.layers[intZoom][\"startTileY\"] = tile[1];\n this.layers[intZoom][\"startLat\"] = lat2y(lat);\n this.layers[intZoom][\"startLng\"] = lng;\n this.layers[intZoom][\"images\"] = new Object();\n var layerDiv = document.createElement(\"div\");\n layerDiv.setAttribute(\"zoomlevel\", intZoom);\n layerDiv.style.position = \"absolute\";\n\n //svg layer for scalable things\n if (this.css3dvector) {\n var svg = document.createElement(\"div\");\n svg.style.top = -this.svgHeight / 2;\n svg.style.left = -this.svgWidth / 2;\n svg.style.zIndex = 1;\n svg.style.position = \"absolute\";\n this.layers[intZoom][\"svg\"] = svg;\n layerDiv.appendChild(svg);\n }\n\n\n\n //higher zoomlevels are places in front of lower zoomleves.\n //no z-index in use. z-index could give unwanted side effects to you application if you use this lib.\n var layers = map.childNodes;\n var appended = false;\n for (var i = layers.length - 1; i >= 0; i--) {\n var l = layers.item(i);\n if (l.getAttribute(\"zoomlevel\") < intZoom) {\n this.map.insertBefore(layerDiv, l);\n appended = true;\n //break;\n }\n }\n if (!appended) {\n //the new layer has the highest zoomlevel\n this.map.appendChild(layerDiv);\n }\n\n //for faster access, a referenz to this div is in an array \n this.layers[intZoom][\"layerDiv\"] = layerDiv;\n var latDelta = 0;\n var lngDelta = 0;\n } else {\n //The layer with this zoomlevel already exists. If there are new lat,lng value, the lat,lng Delta is calculated\n var layerDiv = this.layers[intZoom][\"layerDiv\"];\n var latDelta = lat2y(lat) - this.layers[intZoom][\"startLat\"];\n var lngDelta = lng - this.layers[intZoom][\"startLng\"];\n }\n layerDiv.style.visibility = \"hidden\";\n\n //if the map is moved with drag/drop, the moveX,moveY gives the movement in Pixel (not degree as lat/lng)\n //here the real values of lat, lng are caculated\n this.movedLng = (this.layers[intZoom][\"startTileX\"] / faktor - moveX / this.tileW) * 360 - 180 + lngDelta;\n var movedLat360 = (this.layers[intZoom][\"startTileY\"] / faktor - moveY / this.tileH) * 360 - 180 - latDelta;\n this.movedLat = -y2lat(movedLat360); // -latDelta; //the bug\n //calculate real x,y\n var tile = getTileNumber(this.movedLat, this.movedLng, intZoom);\n var x = tile[0];\n var y = tile[1];\n\n var intX = Math.floor(x);\n var intY = Math.floor(y);\n\n\n var startX = this.layers[intZoom][\"startTileX\"];\n var startY = this.layers[intZoom][\"startTileY\"];\n\n\n var startIntX = Math.floor(startX);\n var startIntY = Math.floor(startY);\n\n var startDeltaX = -startX + startIntX;\n var startDeltaY = -startY + startIntY;\n\n var dx = x - startX;\n var dy = y - startY;\n\n var dxInt = Math.floor(dx - startDeltaX);\n var dyInt = Math.floor(dy - startDeltaY);\n var dxDelta = dx - startDeltaX;\n var dyDelta = dy - startDeltaY;\n\n\n //work in progress\n if (this.css3dvector) {\n if (!this.layers[intZoom][\"dx\"]) {\n this.layers[intZoom][\"dx\"] = +dxDelta * this.tileW - this.svgWidth / 2;\n this.layers[intZoom][\"svg\"].style.left = this.layers[intZoom][\"dx\"] + \"px\";\n\n }\n if (!this.layers[intZoom][\"dy\"]) {\n this.layers[intZoom][\"dy\"] = +dyDelta * this.tileH - this.svgHeight / 2;\n this.layers[intZoom][\"svg\"].style.top = this.layers[intZoom][\"dy\"] + \"px\";\n }\n }\n \n\n //set all images to hidden (only in Array) - the values are used later in this function\n for (var vimg in this.layers[intZoom][\"images\"]) {\n this.layers[intZoom][\"images\"][vimg][\"visibility\"] = false;\n }\n\n //for debug only\n var width = this.width;\n var height = this.height;\n\n var zoomDelta = zoom - intZoom;\n sc = Math.pow(2, zoomDelta);\n\n// if (sc < 1) sc = 1;\n if (sc < 0.5) sc = 0.5;\n //here the bounds of the map are calculated.\n //there is NO preload of images. Preload makes everything slow\n minX = Math.floor((-width / 2 / sc) / this.tileW + dxDelta);\n maxX = Math.ceil((width / 2 / sc) / this.tileW + dxDelta);\n minY = Math.floor((-height / 2 / sc) / this.tileH + dyDelta);\n maxY = Math.ceil((height / 2 / sc) / this.tileH + dyDelta);\n\n //now the images are placed on to the layer\n for (var i = minX; i < maxX; i++) {\n for (var j = minY; j < maxY; j++) {\n var xxx = Math.floor(startX + i);\n var yyy = Math.floor(startY + j);\n\n //The world is recursive. West of America is Asia.\n var xx = xxx % faktor;\n //var yy=yyy % faktor;\n var yy = yyy;\n if (xx < 0) xx = xx + faktor; //modulo function gives negative value for negative numbers\n if (yy < 0) continue;\n if (yy >= faktor) continue;\n\n var src = this.getTileSrc(xx, yy, intZoom);\n var id = src + \"-\" + xxx + \"-\" + yyy;\n\n/*\n //Calculate the tile server. Use of a,b,c should increase speed but should not influence cache.\n var hashval=(xx + yy) %3;\n switch(hashval){\n case 0:var server=\"a\";break;\n case 1:var server=\"b\";break;\n case 2:var server=\"c\";break;\n default: var server=\"f\";\n }\n \n var src=\"http://\"+server+\".tile.openstreetmap.org/\"+intZoom+\"/\"+xx+\"/\"+yy+\".png\";\n// var src=\"/iphonemapproxy/imgproxy.php?url=http://\"+server+\".tile.openstreetmap.org/\"+intZoom+\"/\"+xx+\"/\"+yy+\".png\";\n //see imageproxy.php for offline map usage\n\n //bing tiles\n //var n=mkbin(intZoom,xxx,yyy);\n //var src=\"http://ecn.t0.tiles.virtualearth.net/tiles/a\"+n+\".jpeg?g=367&mkt=de-de\";\n //var src=\"http://maps3.yimg.com/ae/ximg?v=1.9&t=a&s=256&.intl=de&x=\"+xx+\"&y=\"+(yy)+\"&z=\"+intZoom+\"&r=1\";\n //end bing tiles\n\n //\n var id=\"http://\"+server+\".tile.openstreetmap.org/\"+intZoom+\"/\"+xxx+\"/\"+yyy+\".png\";\n */\n\n //draw images only if they don't exist on the layer \n if (this.layers[intZoom][\"images\"][id] == null) {\n\n var img = document.createElement(\"img\");\n img.style.visibility = \"hidden\";\n img.style.position = \"absolute\";\n img.setAttribute(\"src\", src);\n img.style.left = i * this.tileW + \"px\";\n //console.log(i,i*this.tileW);\n img.style.top = j * this.tileH + \"px\";\n img.style.width = this.tileW + \"px\";\n img.style.height = this.tileH + \"px\";\n\n //if the images are loaded, they will get visible in the imgLoad function\n Event.attach(img, \"load\", this.imgLoaded, this, false);\n Event.attach(img, \"error\", this.imgError, this, false);\n\n //add img before SVG, SVG will be visible \n if (layerDiv.childNodes.length > 0) {\n layerDiv.insertBefore(img, layerDiv.childNodes.item(0));\n } else {\n layerDiv.appendChild(img);\n }\n\n //To increase performance all references are in an array\n this.layers[intZoom][\"images\"][id] = new Object();\n this.layers[intZoom][\"images\"][id][\"img\"] = img;\n this.layers[intZoom][\"loadComplete\"] = false;\n //} \n } else {\n }\n\n if (!this.css3d) {\n var sc = Math.pow(2, zoomDelta);\n var ddX = (tile[0] - intX) + Math.floor(dxDelta);\n var ddY = (tile[1] - intY) + Math.floor(dyDelta);\n\n var tileW = Math.round(this.tileW * sc);\n var tileH = Math.round(this.tileH * sc);\n\n var left = Math.floor((-ddX) * tileW + i * tileW);\n var top = Math.floor(-ddY * tileH + j * tileH);\n var right = Math.floor((-ddX) * tileW + (i + 1) * tileW);\n var bottom = Math.floor(-ddY * tileH + (j + 1) * tileH);\n var img = this.layers[intZoom][\"images\"][id][\"img\"];\n img.style.left = left + \"px\";\n img.style.top = top + \"px\";\n img.style.height = (right - left) + \"px\";\n img.style.width = (bottom - top) + \"px\";\n }\n\n //set all images that should be visible at the current view to visible (only in the layer);\n this.layers[intZoom][\"images\"][id][\"visibility\"] = true;\n\n }\n }\n\n //remove all images that are not loaded and are not visible in current view.\n //if the images is out of the current view, there is no reason to load it. \n //Think about fast moving maps. Moving is faster than loading. \n //If you started in London and are already in Peking, you don't care\n //about images that show vienna for example\n //this code is useless for webkit browsers (march 2010) because of bug:\n //https://bugs.webkit.org/show_bug.cgi?id=6656\n for (var vimg in this.layers[intZoom][\"images\"]) {\n if (this.layers[intZoom][\"images\"][vimg][\"visibility\"]) {\n if (this.layers[intZoom][\"images\"][vimg][\"img\"].getAttribute(\"loaded\") == \"yes\") {\n this.layers[intZoom][\"images\"][vimg][\"img\"].style.visibility = \"\";\n }\n } else {\n this.layers[intZoom][\"images\"][vimg][\"img\"].style.visibility = \"hidden\";\n //delete img if not loaded and not needed at the moment\n if (this.layers[intZoom][\"images\"][vimg][\"img\"].getAttribute(\"loaded\") != \"yes\") {\n layerDiv.removeChild(this.layers[intZoom][\"images\"][vimg][\"img\"]);\n delete this.layers[intZoom][\"images\"][vimg][\"img\"];\n delete this.layers[intZoom][\"images\"][vimg];\n }\n }\n }\n\n //move and zoom the layer\n //The 3D CSS is used to increase speed. 3D CSS is using hardware accelerated methods to zoom and move the layer.\n //every layer is moved independently - maybe not the best approach, but maybe the only working solution\n var zoomDelta = zoom - intZoom;\n var sc = Math.pow(2, zoomDelta);\n var left = -dxDelta * this.tileW;\n var top = -dyDelta * this.tileH;\n\n if (this.css3d) {\n //document.getElementById(\"debug\").textContent=zoomDelta+\": \"+sc+\": \"+left+\": \"+top;\n var scale = \" scale3d(\" + sc + \",\" + sc + \",1) \";\n/* \n var zx=this.zoomCenterDeltaX; \n var zy=this.zoomCenterDeltaY; \n left=left-zx*sc;\n top=top-zx*sc;\n */\n\n layerDiv.style['-webkit-transform-origin'] = (-1 * left) + \"px \" + (-1 * top) + \"px\";\n var transform = 'translate3d(' + left + 'px,' + top + 'px,0px) ' + scale;\n layerDiv.style.webkitTransform = transform;\n } else {\n //layerDiv.style.left=left+\"px\";\n //layerDiv.style.top+\"px\";\n }\n\n //set the visibleZoom to visible\n layerDiv.style.visibility = \"\";\n\n //not needed images are removed now. Lets check if all needed images are loaded already\n var notLoaded=0; \n var total=0; \n for (var vimg in this.layers[this.loadingZoomLevel][\"images\"]) {\n total++;\n var img=this.layers[this.loadingZoomLevel][\"images\"][vimg][\"img\"];\n if(!(img.getAttribute(\"loaded\")==\"yes\")){\n notLoaded++;\n }\n }\n if(notLoaded < 1){\n this.layers[this.loadingZoomLevel][\"loadComplete\"]=true;\n }\n if(this.loadingZoomLevel==intZoom){\n this.imgLoadInfo(total,notLoaded);\n }\n\n\n }\n // ====== END OF DRAW ====== \n\n\n\n\n this.getTileSrc = function (x, y, z) {\n //Calculate the tile server. Use of a,b,c should increase speed but should not influence cache.\n var hashval = (x + y) % 3;\n switch (hashval) {\n case 0:\n var server = \"a\";\n break;\n case 1:\n var server = \"b\";\n break;\n case 2:\n var server = \"c\";\n break;\n default:\n var server = \"f\";\n }\n\n var src = \"http://tile.brws.in:8000/bw/\" + z + \"/\" + x + \"/\" + y + \".png\";\n // var src=\"http://khm1.google.com/kh/v=58&x=\"+x+\"&s=&y=\"+y+\"&z=\"+z+\"&s=Gal\";\n return src;\n }\n\n //\n // this function was for BING tiles. It's not in use but I don't want to dump it.\n //\n\n function mkbin(z, x, y) {\n var nn = parseInt(x.toString(2)) + parseInt(y.toString(2)) * 2;\n n = \"\";\n for (var i = 0; i < 30; i++) {\n var restX = parseInt(x / 2);\n var restY = parseInt(y / 2);\n var xx = (x / 2 - restX) * 2;\n var yy = (y / 2 - restY) * 2;\n x = restX;\n y = restY;\n s = Math.round(xx + yy * 2);\n n = s + n;\n if (x == 0 && y == 0) break;\n }\n return n;\n }\n\n //\n //this function trys to remove images if they are not needed at the moment.\n //For webkit it's a bit useless because of bug\n //https://bugs.webkit.org/show_bug.cgi?id=6656\n //For Firefox it really brings speed\n // \n this.hideLayer = function (zoomlevel) {\n if (this.intZoom != zoomlevel) {\n if (this.layers[zoomlevel]) {\n this.layers[zoomlevel][\"layerDiv\"].style.visibility = \"hidden\";\n }\n }\n\n //delete img if not loaded and not needed at the moment\n //for(var layer in this.layers){\n //var zoomlevel=layer;\n //for(var vimg in this.layers[zoomlevel][\"images\"]){\n if(!this.layers[zoomlevel]){\n return;\n }\n\n for (var vimg in this.layers[zoomlevel][\"images\"]) {\n if (this.layers[zoomlevel][\"images\"][vimg]) {\n if (this.layers[zoomlevel][\"images\"][vimg][\"img\"]) {\n if (this.layers[zoomlevel][\"images\"][vimg][\"img\"].getAttribute(\"loaded\") != \"yes\") {\n if (zoomlevel != this.intZoom) {\n //this.layers[zoomlevel][\"images\"][vimg][\"img\"].setAttribute(\"src\", \"#\");\n try{\n this.layers[zoomlevel][\"layerDiv\"].removeChild(this.layers[zoomlevel][\"images\"][vimg][\"img\"]);\n }catch(e){}\n delete this.layers[zoomlevel][\"images\"][vimg][\"img\"];\n delete this.layers[zoomlevel][\"images\"][vimg];\n }\n } else {\n\n }\n }\n }\n }\n\n /*\n //not needed images are removed now. Lets check if all needed images are loaded already\n for (var vimg in this.layers[zoomlevel][\"images\"]) {\n var img=this.layers[zoomlevel][\"images\"][vimg][\"img\"];\n //console.log(img.getAttribute(\"loaded\"));\n if(!(img.getAttribute(\"loaded\")==\"yes\")){\n console.log(\"here: \"+img.getAttribute(\"src\"));\n }\n }\n */\n \n\n }\n\n //\n // method is called if an image has finished loading (onload event)\n //\n this.imgLoaded = function (evt) {\n if (evt.target) {\n var img = evt.target;\n } else {\n var img = evt.srcElement;\n }\n var loadComplete = true;\n img.style.visibility = \"\";\n img.setAttribute(\"loaded\", \"yes\");\n if (!img.parentNode) return;\n var notLoaded=0;\n var total=0;\n var zoomlevel = img.parentNode.getAttribute(\"zoomlevel\");\n for (var i = 0; i < img.parentNode.getElementsByTagName(\"img\").length; i++) {\n total++;\n if (img.parentNode.getElementsByTagName(\"img\").item(i).getAttribute(\"loaded\") != \"yes\") {\n notLoaded++;\n loadComplete = false;\n }\n }\n if(this.loadingZoomLevel==zoomlevel){\n this.imgLoadInfo(total,notLoaded);\n }\n\n this.layers[zoomlevel][\"loadComplete\"] = loadComplete;\n if (loadComplete) {\n if (this.loadingZoomLevel == zoomlevel) {\n //if(Math.abs(this.intZoom - zoomlevel) < Math.abs(this.intZoom - this.visibleZoom)){\n //this.layers[this.visibleZoom][\"layerDiv\"].style.visibility=\"hidden\";\n this.hideLayer(this.visibleZoom);\n this.hideLayer(this.visibleZoom +1); //no idea why\n this.visibleZoom = zoomlevel;\n //this.layers[this.visibleZoom][\"layerDiv\"].style.visibility = \"\";\n /*\n if(this.loadingZoomLevel!=this.intZoom){\n //alert(\"genau da\");\n this.setCenter(this.getCenter(),this.getZoom());\n }\n */\n }\n }\n }\n //\n // Image load error\n //\n this.imgError = function (evt) {\n if (evt.target) {\n var img = evt.target;\n } else {\n var img = evt.srcElement;\n }\n if (!img.parentNode) return;\n img.parentNode.removeChild(img);\n //evt.target.style.backgroundColor=\"lightgrey\";\n this.imgLoaded(evt);\n }\n\n //next function is from wiki.openstreetmap.org\n var getTileNumber = function (lat, lon, zoom) {\n var xtile = ((lon + 180) / 360 * (1 << zoom));\n var ytile = ((1 - Math.log(Math.tan(lat * Math.PI / 180) + 1 / Math.cos(lat * Math.PI / 180)) / Math.PI) / 2 * (1 << zoom));\n var returnArray = new Array(xtile, ytile);\n return returnArray;\n }\n\n //map is positioned absolute and is an a clone of the original map div.\n //on window resize it must be positioned again\n this.setMapPosition = function () {\n //this.getSize();\n var obj = this.mapParent;\n\n this.width = obj.offsetWidth;\n this.height = obj.offsetHeight;\n //var d = document.getElementById(\"debug\");\n // this.clone.style.width=obj.offsetWidth+\"px\";\n // this.clone.style.height=obj.offsetHeight+\"px\";\n var relativeleft = 0;\n var relativetop = 0;\n do {\n if(window.getComputedStyle(obj,null).getPropertyValue(\"position\")==\"absolute\"){\n //if(obj.style.position==\"absolute\"){\n break;\n }\n relativeleft += obj.offsetLeft;\n relativetop += obj.offsetTop;\n if(obj.offsetParent){\n obj = obj.offsetParent;\n }\n } while (obj.offsetParent);\n\n var left = 0;\n var top = 0;\n obj = this.mapParent;\n\n do {\n left += obj.offsetLeft;\n top += obj.offsetTop;\n if(!obj.offsetParent) break;\n obj = obj.offsetParent;\n } while (obj.offsetParent);\n\n\n\n\n // this.width=obj.offsetWidth;\n // this.height=obj.offsetHeight;\n this.mapTop = top;\n this.mapLeft = left;\n if (this.mapParent.style.position == \"absolute\") {\n top = 0;\n left = 0;\n }\n this.clone.style.top = relativetop + \"px\";\n this.clone.style.left = relativeleft + \"px\";\n this.clone.style.width = this.width + \"px\";\n this.clone.style.height = this.height + \"px\";\n\n this.clone.style.position = \"absolute\";\n this.clone.style.overflow = \"hidden\";\n\n this.map.style.left = this.width / 2 + \"px\";\n this.map.style.top = this.height / 2 + \"px\";\n //this.mapParent.appendChild(this.clone);\n var center = this.getCenter();\n var zoom = this.getZoom();\n if (zoom) {\n this.setCenter(this.getCenter(), this.getZoom());\n }\n }\n\n //functions from wiki gps2xy \n var lat2y = function (a) {\n return 180 / Math.PI * Math.log(Math.tan(Math.PI / 4 + a * (Math.PI / 180) / 2));\n }\n var y2lat = function (a) {\n return 180 / Math.PI * (2 * Math.atan(Math.exp(a * Math.PI / 180)) - Math.PI / 2);\n }\n\n\n this.imgLoadInfo=function(total,missing){\n if(!this.loadInfoDiv){\n this.loadInfoDiv=document.createElement(\"div\");\n this.loadInfoDiv.style.position=\"absolute\";\n this.loadInfoDiv.style.top=\"0px\";\n this.loadInfoDiv.style.right=\"0px\";\n this.loadInfoDiv.style.backgroundColor=\"white\";\n this.loadInfoDiv.style.border=\"1px solid gray\";\n this.loadInfoDiv.style.fontSize=\"10px\";\n this.map.parentNode.appendChild(this.loadInfoDiv);\n }\n if(missing==0){\n this.loadInfoDiv.style.display=\"none\"; \n }else{\n this.loadInfoDiv.style.display=\"\"; \n this.loadInfoDiv.innerHTML=\"Images to load: \"+missing; //+\"/\"+total; //for ie an innerHTML\n }\n }\n\n\n //\n //\n // INIT kmap\n //\n //\n\n this.internetExplorer = false;\n this.svgSupport = true;\n if (navigator.userAgent.indexOf(\"MSIE\") != -1) {\n this.internetExplorer = true;\n this.svgSupport = false;\n //alert(\"Sorry, Internet Explorer does not support this map, please use a good Browser like chrome, safari, opera.\");\n }\n if (navigator.userAgent.indexOf(\"Android\") != -1) {\n //this.internetExplorer=true;\n this.svgSupport = false;\n //wordaround for Android - Android is not a good browser, remembers me to IE 5.5\n var that=this;\n var tempFunction=function () {that.blocked=false};\n setInterval(tempFunction,300);\n\n }\n this.maxIntZoom = 18;\n\n this.wheelSpeedConfig = new Array();\n this.wheelSpeedConfig[\"acceleration\"] = 2;\n this.wheelSpeedConfig[\"maxSpeed\"] = 2;\n // alert(navigator.userAgent);\n this.wheelSpeedConfig[\"animate\"] = false;\n if (navigator.userAgent.indexOf(\"AppleWebKit\") != -1) {\n this.wheelSpeedConfig[\"animate\"] = true;\n }\n if (navigator.userAgent.indexOf(\"Opera\") != -1) {\n this.wheelSpeedConfig[\"animate\"] = false;\n }\n this.wheelSpeedConfig[\"animate\"] = false;\n this.wheelSpeedConfig[\"digizoom\"] = false;\n this.wheelSpeedConfig[\"zoomAnimationSlowdown\"] = 0.02;\n this.wheelSpeedConfig[\"animationFPS\"] = 50;\n this.wheelSpeedConfig[\"moveAnimateDesktop\"] = true;\n this.wheelSpeedConfig[\"moveAnimationSlowdown\"] = 0.9;\n this.wheelSpeedConfig[\"rectShiftAnimate\"] = false;\n this.wheelSpeedConfig[\"rectShiftAnimationTime\"] = 500;\n this.wheelSpeedConfig[\"animateMinSpeed\"]=0.001;\n\n //variables for performance check\n this.wheelEventCounter = 0;\n this.framesCounter = 0;\n\n this.mapParent = map;\n // mapInit=map;\n this.clone = map.cloneNode(true); //clone is the same as the map div, but absolute positioned\n this.clone.removeAttribute(\"id\");\n this.clone.style.overflow = \"hidden\";\n if (map.firstChild) {\n map.insertBefore(this.clone, map.firstChild);\n } else {\n map.appendChild(this.clone);\n }\n\n //this.setMapPosition();\n this.map = document.createElement(\"div\"); //this is the div that holds the layers, but no marker and svg overlayes\n this.map.style.position = \"absolute\";\n this.clone.appendChild(this.map);\n //this.getSize();\n this.clone.style.overflow = \"hidden\";\n this.setMapPosition();\n\n if (this.svgSupport) {\n this.svg = document.createElementNS(\"http://www.w3.org/2000/svg\", \"svg\");\n } else {\n this.svg = document.createElement(\"div\");\n }\n //container for Vector graphics (SVG, VML, and maybe Canvas for Android)\n this.svg.style.width = \"100%\";\n this.svg.style.height = \"100%\";\n this.svg.style.position = \"absolute\";\n this.clone.appendChild(this.svg);\n\n\n //div for markers\n this.overlayDiv = document.createElement(\"div\");\n this.overlayDiv.style.width = \"100%\";\n this.overlayDiv.style.height = \"100%\";\n this.overlayDiv.style.position = \"absolute\";\n this.overlayDiv.style.overflow = \"hidden\";\n this.clone.appendChild(this.overlayDiv);\n\n //should be bigger than screen\n this.svgWidth = 100000;\n this.svgHeight = 100000;\n\n //distance tool\n this.distanceMeasuring = \"no\";\n this.moveMarker = null;\n this.measureLine = null;\n this.moveAnimationMobile = true;\n this.moveAnimationDesktop = false;\n this.moveAnimationBlocked = false;\n\n this.lastMouseX = this.width / 2;\n this.lastMouseY = this.height / 2;\n\n this.layers = new Array();\n this.overlays = new Array();\n this.visibleZoom = null;\n this.oldVisibleZoom = null;\n this.intZoom = null;\n\n this.moveX = 0;\n this.moveY = 0;\n\n this.lastMoveX = 0;\n this.lastMoveY = 0;\n this.lastMoveTime = 0;\n\n this.startMoveX = 0;\n this.startMoveY = 0;\n this.sc = 1;\n this.blocked = false;\n\n this.tileW = 256;\n this.tileH = 256;\n this.zoom = 1;\n this.movestarted = false;\n\n //touchscreen\n this.mousedownTime = null;\n this.doubleclickTime = 400;\n //mouse\n this.mousedownTime2 = null;\n this.doubleclickTime2 = 500;\n\n this.zoomOutTime = 1000;\n this.zoomOutSpeed = 0.01;\n this.zoomOutInterval = null;\n this.zoomOutStarted = false;\n\n this.zoomSpeedTimer = null;\n this.zoomAcceleration = 1;\n\n this.css3d = false;\n this.css3dvector = false;\n if (navigator.userAgent.indexOf(\"iPhone OS\") != -1) {\n this.css3d = true;\n }\n if (navigator.userAgent.indexOf(\"iPad\") != -1) {\n this.css3d = true;\n }\n if (navigator.userAgent.indexOf(\"Safari\") != -1) {\n if (navigator.userAgent.indexOf(\"Mac\") != -1) {\n this.css3d = false; //errors in chrome 5 - but speed is ok\n }else{\n this.css3d = true; //linux for example is ok\n }\n }\n if (navigator.userAgent.indexOf(\"Android\") != -1) {\n this.css3d = false;\n }\n \n\n if (this.internetExplorer) {\n var w = map;\n } else {\n var w = window;\n // how to do that in ie?\n Event.attach(window, \"resize\", this.setMapPosition, this, false);\n }\n if (navigator.userAgent.indexOf(\"Konqueror\") != -1) {\n var w = map;\n }\n \n\n\n Event.attach(map, \"touchstart\", this.start, this, false);\n Event.attach(map, \"touchmove\", this.move, this, false);\n Event.attach(map, \"touchend\", this.end, this, false);\n Event.attach(w, \"mousemove\", this.mousemove, this, false);\n Event.attach(map, \"mousedown\", this.mousedown, this, false);\n Event.attach(w, \"mouseup\", this.mouseup, this, false);\n Event.attach(w, \"orientationchange\", this.reSize, this, false);\n Event.attach(map, \"DOMMouseScroll\", this.mousewheel, this, false);\n Event.attach(map, \"dblclick\", this.doubleclick, this, false);\n}", "title": "" }, { "docid": "8ea0b41a32bbd1623728893b61f94e8a", "score": "0.5941647", "text": "function onMapClick(e) {\r\n\t\tswitch (toolFunction) {\r\n\t\t\tcase 'marker':\r\n\t\t\tplaceMarker (e.latlng);\r\n\t\t\tbreak;\r\n\t\t\tcase 'measure':\r\n\t\t\t\tplaceMeasurePolyline(e.latlng);\r\n\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\t//No default\r\n\t\t\t}\r\n\t}", "title": "" }, { "docid": "f3554b38742de53a78c91d42d0fa825b", "score": "0.5936515", "text": "updateZoom(zoom) {\n this.getMenuItem(\"zoom\").value = zoom;\n this.render();\n }", "title": "" }, { "docid": "cc8d4636981872e307dea0dfbf4b7629", "score": "0.59351003", "text": "function onZoomIn(){\r\n\t\t\t\t\t\tzoom(360);\r\n\t\t\t\t\t}", "title": "" }, { "docid": "829d5c1595e777bd2999d654a56febf4", "score": "0.59275115", "text": "function doAction(evt) {\r\n if (gui_active_button != NO_BTN) {\r\n // use the calcCoord from the Carto:Net mapApp script to\r\n // get XY in coords of the map:\r\n myMap = GUIdoc.getElementById(\"theMap\"); // (re)get svg root of map\r\n clickPoint = myMapApp.calcCoord(evt, myMap);\r\n // undo SVG Y-axis negation:\r\n clickPoint.y = -clickPoint.y;\r\n\r\n if (gui_active_button == ZOOM_IN_BTN) { // zoomInButton\r\n // now zoom in:\r\n myWMSdata.width = myWMSdata.width * zoomFactor;\r\n myWMSdata.height = myWMSdata.width / myWMSdata.aspectRatio;\r\n // force ratio to be maintained;\r\n changeView();\r\n }\r\n if (gui_active_button == ZOOM_OUT_BTN) { // zoomOutButton\r\n // now zoom out:\r\n myWMSdata.width = myWMSdata.width / zoomFactor;\r\n myWMSdata.height = myWMSdata.width / myWMSdata.aspectRatio;\r\n // force ratio to be maintained;\r\n changeView();\r\n }\r\n if (gui_active_button == PAN_BTN) { // panButton\r\n changeView();\r\n }\r\n if (gui_active_button == INFO_BTN) { // infoButton\r\n showInfo(evt.target);\r\n } \r\n // other buttons require no map action...\r\n }\r\n} // doAction()", "title": "" }, { "docid": "37126df71ef8dc61673dbf524869d00a", "score": "0.5914226", "text": "function updateCustomMarkers( event ) {\n \n // go through all of the images\n imageSeries.mapImages.each(function(image) {\n // check if it has corresponding HTML element\n if (!image.dummyData || !image.dummyData.externalElement) {\n // create onex\n image.dummyData = {\n externalElement: createCustomMarker(image)\n };\n }\n\n // reposition the element accoridng to coordinates\n var xy = chart.geoPointToSVG( { longitude: image.longitude, latitude: image.latitude } );\n image.dummyData.externalElement.style.top = xy.y + 'px';\n image.dummyData.externalElement.style.left = xy.x + 'px';\n });\n\n}", "title": "" }, { "docid": "e02b4d9ded798ecd21f0681ae55f2b57", "score": "0.5913409", "text": "function mapMoveControl() {\n}", "title": "" }, { "docid": "1290b2397fc985f3d5672a5327edb54b", "score": "0.5911255", "text": "showMarkers() {\n this.setMapOnAll(map);\n }", "title": "" }, { "docid": "9192653f5249dd8b805f8a7108afbc97", "score": "0.5910279", "text": "function MapStyleControl() {\n MapStyleControl.prototype.onAdd = function(map){\n this._map = map;\n this._container = document.createElement('div');\n var button = document.createElement('button');\n button.className = 'icon fa fa-map';\n button.title = 'Toggle background';\n button.onclick = function () {\n if (currentStyleIndex < 3){\n currentStyleIndex++;\n }\n else {\n currentStyleIndex = 0;\n }\n changeBackgroundStyle(currentStyleIndex);\n };\n this._container.className = 'mapboxgl-ctrl mapboxgl-ctrl-group';\n //this._container.textContent = 'Background';\n this._container.appendChild(button);\n return this._container;\n };\n\n MapStyleControl.prototype.onRemove = function() {\n this._container.parentNode.removeChild(this._container);\n this._map = undefined;\n };\n}", "title": "" }, { "docid": "e574d9683a2c1367126b5d84acd0224a", "score": "0.5899452", "text": "function CustomControl(controlDiv, map) {\n\n // Set CSS for the control border\n var saveKmlUI = document.createElement('div');\n saveKmlUI.id = 'saveKmlUI';\n saveKmlUI.title = 'Save polygon as KML';\n controlDiv.appendChild(saveKmlUI);\n\n // Set CSS for the control interior\n var saveKmlText = document.createElement('div');\n saveKmlText.id = 'saveKmlText';\n //saveKmlText.innerHTML = ' S ';\n saveKmlText.innerHTML = '<span><img src=\"../static/img/save.png\" width=\"24px\" height=\"24px\"></img></span>';\n saveKmlUI.appendChild(saveKmlText);\n\n // Set CSS for the setCenter control border\n var loadKmlUI = document.createElement('div');\n loadKmlUI.id = 'loadKmlUI';\n loadKmlUI.title = 'Load KML polygon';\n controlDiv.appendChild(loadKmlUI);\n\n // Set CSS for the control interior\n var loadKmlText = document.createElement('div');\n loadKmlText.id = 'loadKmlText';\n loadKmlText.innerHTML = '<span><img src=\"../static/img/load.png\" width=\"24px\" height=\"24px\"></img></span>';\n loadKmlUI.appendChild(loadKmlText);\n\n\n // Setup the click event listeners\n google.maps.event.addDomListener(saveKmlUI, 'click', function () {\n saveKMLFile();\n });\n\n google.maps.event.addDomListener(loadKmlUI, 'click', function () {\n $('#fileOpen').click();\n });\n}", "title": "" }, { "docid": "9446e8b59bbaa7b81b079d9c112e402a", "score": "0.58966124", "text": "function ctrl_zoom() {\n //Use ctrl + scroll to zoom the map\n map.scrollWheelZoom.disable();\n\n // $(\"#mapid\").bind('mousewheel DOMMouseScroll', function (event) {\n $(map_id).bind('mousewheel DOMMouseScroll', function (event) {\n event.stopPropagation();\n if (event.ctrlKey == true) {\n event.preventDefault();\n map.scrollWheelZoom.enable();\n setTimeout(function () {\n map.scrollWheelZoom.disable();\n }, 1000);\n } else {\n map.scrollWheelZoom.disable();\n }\n\n });\n }", "title": "" }, { "docid": "bb0dd6b22e811da68ac5b2c707bf9f82", "score": "0.5888251", "text": "function addButtons() {\n var buttonData = [];\n for (var i = 0; i < loadedMaps.length; i++) {\n var map = po.basemaps[loadedMaps[i]];\n buttonData.push({ t: map.source.desc,\n f: map.switchTo });\n }\n buttonData.push({ t: \"&nbsp;\",\n c: \"spacer\" });\n buttonData.push({ t: \"Toggle graticules\", \n f: toggleGraticules });\n\n // Create some clickable buttons for the baselayers\n d3.selectAll(\"#buttonbox\").selectAll(\"div\").remove();\n d3.selectAll(\"#buttonbox\")\n .selectAll(\"div\")\n .data(buttonData, function(d) { return d.t; })\n .enter()\n .append(\"div\")\n .html(function(d) { return d.t })\n .attr(\"class\", function(d) { if (d.c) { return d.c; } })\n .on(\"click\", function(d) { if (d.f) { return d.f(); } });\n\n // Allow the button box to be hidden\n var buttonBoxHidden = false;\n d3.select(\"#button-control\").on(\"click\", function(d) {\n buttonBoxHidden = !buttonBoxHidden;\n d3.select(\"#buttonbox\").style(\"display\", buttonBoxHidden ? \"none\" : null); });\n}", "title": "" }, { "docid": "5c583dde437032ac35848d0000d7a771", "score": "0.5879253", "text": "function init() {\n var myOptions = {\n zoom: 13,\n center: new google.maps.LatLng(0.0, 0.0),\n\t\tscaleControl: true,\n mapTypeId: google.maps.MapTypeId.ROADMAP\n };\n map = new google.maps.Map(document.getElementById(\"map\"), myOptions);\n\tgeocoder = new google.maps.Geocoder();\n map.enableKeyDragZoom({\n visualEnabled: false,\n visualPosition: google.maps.ControlPosition.LEFT,\n visualPositionOffset: new google.maps.Size(35, 0),\n visualPositionIndex: null,\n visualSprite: \"http://maps.gstatic.com/mapfiles/ftr/controls/dragzoom_btn.png\",\n visualSize: new google.maps.Size(20, 20),\n visualTips: {\n off: \"Turn on\",\n on: \"Turn off\"\n }\n });\n curposMarker = new google.maps.Marker({ title: 'none', 'map': map, draggable: false, icon: curposIcon, position: map.getCenter(), flat: true, visible: false });\n\n\t//panToBounds\n\n\tupdateGeocaches(gcList);\n\tupdateWaypoints(wpList);\n\tupdateCircels(circList);\n}", "title": "" }, { "docid": "79f381fdff2392bd08e2d6fdf17946a8", "score": "0.5873777", "text": "function BasemapToggler(id,render_to,map)\n{\n var self = this;\n var gallery = new esri.dijit.BasemapGallery({map:map, showArcGISBasemaps: true});\n var jq_id = null;\n var current = 0;\n var extra = [\n// {\n// url: \"http://services.arcgisonline.com/ArcGIS/rest/services/USA_Topo_Maps/MapServer/\",\n// title:\"Put a title here\",\n// thumbnailUrl:\"http://www.arcgis.com/sharing/rest/content/items/5d2bfa736f8448b3a1708e1f6be23eed/info/thumbnail/temposm.jpg\"\n// }\n ];\n this.constructor = function()\n {\n addElements();\n gallery.on(\"load\",function(){\n addExtraBasemaps();\n initThumbnail(current++);\n });\n \n jq_id.on(\"click\",function(){setThumbnail(current++);});\n };\n \n function addElements()\n {\n $(\"#\"+render_to).append('<div id=\"'+id+'\"><div id=\"basemap_thumbnail\"></div><div id=\"basemap_label\"></div></div>');\n jq_id = $(\"#\"+id);\n jq_id.css({\n \"position\": \"absolute\",\n \n \"min-width\": \"75px\",\n \"max-width\": \"100px\",\n \"padding\": \"3px\",\n \"background-color\": \"#ffffff\",\n \"bottom\":\"30px\",\n \"left\": \"30px\",\n \"z-index\": \"50\",\n \"border\":\"1px solid\",\n \"border-radius\":\"3px\",\n \"font-size\": \"10px\"\n });\n \n $(\"#basemap_thumbnail\").css({\n \"width\": \"100%\",\n \"height\": \"50px\"\n });\n $(\"#basemap_label\").css({\n \"text-align\":\"center\"\n });\n };\n \n function addExtraBasemaps ()\n {\n for (var i=0; i<extra.length; i++)\n {\n var newlyr = extra[i];\n var layer = new esri.dijit.BasemapLayer({\n url: newlyr.url\n });\n\n var basemap = new esri.dijit.Basemap({\n layers:[layer],\n title:newlyr.title,\n thumbnailUrl:newlyr.thumbnailUrl\n });\n gallery.add(basemap);\n }\n }\n function initThumbnail(current){\n var next = gallery.basemaps[(current+1)%gallery.basemaps.length];\n $(\"#basemap_thumbnail\").css({\n \"background-image\" : \"url('\"+next.thumbnailUrl+\"')\",\n \"background-position\" : \"center\"\n });\n $(\"#basemap_label\").html(next.title);\n }\n function setThumbnail(current){\n var curr = gallery.basemaps[current%gallery.basemaps.length];\n var next = gallery.basemaps[(current+1)%gallery.basemaps.length];\n gallery.select(curr.id);\n $(\"#basemap_thumbnail\").css({\n \"background-image\" : \"url('\"+next.thumbnailUrl+\"')\",\n \"background-position\" : \"center\"\n });\n \n $(\"#basemap_label\").html(next.title);\n }\n \n this.constructor();\n}", "title": "" }, { "docid": "13c40cab85f1b423ee9d4b81cb5e9302", "score": "0.58733493", "text": "function showMarkers() {\n setMapOnAll(map);\n }", "title": "" }, { "docid": "2fa3273d376cf310afde010d0aba8f3f", "score": "0.58719414", "text": "function MyLocationControl(controlDiv, map) {\n\t\t\n\t\t// control border.\n\t\tvar controlUI = document.createElement('div');\n\t\tcontrolDiv.style.padding = '0px 10px 0px 0px';\n\t\tcontrolDiv.appendChild(controlUI);\n\t\t\n\t\t// control interior.\n\t\tvar controlButton = document.createElement('button');\n\t\tcontrolButton.draggable = false;\n\t\tcontrolButton.title = 'My location';\n\t\tcontrolButton.type = 'button';\n\t\tcontrolButton.style.background = 'none'; \n\t\tcontrolButton.style.display = 'block'; \n\t\tcontrolButton.style.border = '0px'; \n\t\tcontrolButton.style.margin = '0px'; \n\t\tcontrolButton.style.padding = '0px'; \n\t\tcontrolButton.style.position = 'relative'; \n\t\tcontrolButton.style.cursor = 'pointer'; \n\t\tcontrolButton.style.width = '28px'; \n\t\tcontrolButton.style.height = '27px'; \n\t\tcontrolButton.style.top = '0px'; \n\t\tcontrolButton.style.left = '0px';\n\t\tcontrolUI.appendChild(controlButton);\n\t\t\n\t\t// button image\n\t\tvar controlImage = document.createElement('img');\n\t\tcontrolImage.src = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB0AAAAdCAYAAABWk2cPAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4gUKCh8KEB0dawAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAC3klEQVRIx+2WMUhjWRSGv/d8xMSs2ShKQCvTaLGkfo1phFRWgr2FCBKIkMbGUgi2gWhjIykFm7XKahEeDGm2W0hsAoEYJsXgy2bju3nJy9liNtkZcDbJoG4zf3k59/wczv//92q3pU+y+cvPhIIzvDX+7HhYf7TQWu2ehH4yeC+0/uqhiYjwztD5H/CDdCyUUiil3p5UROj3+wDk83ny+TwA/X6fafRoTEOoaRqG8flKp9P5t8k/Z8OacZjIMsNmjuNQKBQolUo0m00AIpEIpmmSSCQIBAITEY8lHTZpNBpcXFzQbDbZ3NxkY2MDgEqlgmVZRCIRDg8PWVlZGUs80aSdTofT01MCgQCpVIpwOMzj4yMAq6ur2LZNNpvFcRxOTk4IBoPfP2m/32dmZoabmxsKhQJnZ2copbi8vKRarQIQjUbZ39/H7/dzfHxMIpFgZ2cHz/NGu55KvYZhoGkalmURj8cJh8Pkcjnq9fqopl6vk8vlCIfDxONxLMv6SnBTqbfb7XJ1dYVSilarRSwWo1ar0Wg0EJGRRVzXpdFoUKvViMVi3N3dkc1m8fv97O3t4fP5pvfpYDAYicLzvBf9KCJ4nvd5X5o21rPfnHR2dpaDgwMAUqkUlUqF3d1dFhcXabfbuK47WkEoFCIajXJ9fU0wGOTo6Oj7E6nX6yEimKZJsVjEcRySySTLy8vouo6u6ywtLZFMJnEch2KxiGmaiAi9Xu8/ffhNDAYDERGxbVvS6bRkMhlRSomISLlclnK5LCIiSinJZDKSTqfFtu2v7r6EicOhWq1yfn6O67psbW2xvr4OwMPDA/f39/h8PpLJJGtra68TDsMmT09P3N7eUiqVeH5+BmBubg7TNNne3mZhYeF1YvBLFeu6PgqNbDY7EtnQk1/WvMoro+v6yJ+GYTA/Pz9S79BWkxBONelL4TG01rT48Rt8W1Lleu9KaLe76L9+qGO3u+9G+NvvH/kbcivTqDjxm1kAAAAASUVORK5CYII=';\n\t\tcontrolImage.draggable = false; \n\t\tcontrolImage.style.position = 'absolute'; \n\t\tcontrolImage.style.left = '0px'; \n\t\tcontrolImage.style.top = '0px'; \n\t\tcontrolImage.style.border = '0px'; \n\t\tcontrolImage.style.padding = '0px'; \n\t\tcontrolImage.style.margin = '0px'; \n\t\tcontrolButton.appendChild(controlImage);\n\t\t\n\t\t// Setup the click event listeners\n\t\tcontrolUI.addEventListener('click', function() {\n\t\t\tif (navigator.geolocation) { \n\t\t\t\tnavigator.geolocation.getCurrentPosition(function(pos) {\n\t\t\t\t\tvar me = new google.maps.LatLng(pos.coords.latitude, pos.coords.longitude);\n\t\t\t\t\tmap.setCenter(me);\n\t\t\t\t\tmap.setZoom(14);\n\t\t\t\t}, function(error) {\n\t\t\t\t\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\t\n\t}", "title": "" }, { "docid": "e5a373930750185437a50089c2ae9253", "score": "0.58668417", "text": "function set_zoom(clicked, attributes) {\n\t$(clicked).prepend('<div class=\"zoom\"></div>');\n\t$('.zoom').css({\n\t\t'color' : attributes['text_color'],\n\t\t'background-color' : attributes['background_color'],\n\t\t'text-shadow' : attributes['text_shadow'] + ', ' + attributes['text_shadow'].replace('1px 1px', '2px 2px') + ', ' + attributes['text_shadow'].replace('1px 1px', '3px 3px'),\n\t\t'width' : Math.ceil($('.table-list > li')[0].getBoundingClientRect().width) + 'px',\n\t\t'height' : Math.ceil($('.table-list > li')[0].getBoundingClientRect().height) + 'px'\n\t});\n}", "title": "" }, { "docid": "b34f4c30a36a1eb9d33c56e1f5460feb", "score": "0.5863463", "text": "function showMarkers() {\r\n setMapOnAll(map);\r\n}", "title": "" }, { "docid": "11ba0c25bc69a1a3049d28cfeff76c4b", "score": "0.58623856", "text": "function kaRubberZoom( oKaMap) {\n kaTool.apply( this, [oKaMap] );\n this.name = 'kaRubberZoom';\n this.cursor = 'help';\n \n //this is the HTML element that is visible\n this.domObj = document.createElement( 'div' );\n var x = document.createElement('div');\n this.domObj.appendChild(x); \n this.domObj.style.position = 'absolute';\n this.domObj.style.top = '0px';\n this.domObj.style.left = '0px';\n this.domObj.style.width = '1px';\n this.domObj.style.height = '1px';\n this.domObj.style.zIndex = 100;\n this.domObj.style.visibility = 'hidden';\n this.domObj.style.border = '2px dotted red';\n x.style.width = x.style.height = '100%'; \n x.style.backgroundColor = 'yellow';\n x.style.opacity = 0.20;\n x.style.mozOpacity = 0.20;\n x.style.filter = 'Alpha(opacity=20)';\n this.kaMap.theInsideLayer.appendChild( this.domObj );\n\n this.startx = null;\n this.starty = null;\n this.endx = null;\n this.endy = null;\n this.bMouseDown = false;\n \n \n for (var p in kaTool.prototype) {\n if (!kaRubberZoom.prototype[p])\n kaRubberZoom.prototype[p]= kaTool.prototype[p];\n }\n}", "title": "" }, { "docid": "da6ee3ba6a57eb9491bc6a5dd80ece12", "score": "0.58574706", "text": "function showMarkers() {\r\n setAllMap(map);\r\n}", "title": "" }, { "docid": "79b570a824e0bb1f37aaf1eeb85def43", "score": "0.58547944", "text": "function onZoomOut(){\r\n\t\t\t\t\t\tzoom(-360);\r\n\t\t\t\t\t}", "title": "" } ]
d94ebfa4de0530c48752cfbb0ddd1126
Figure out where to place the tooltip based on d3 mouse event.
[ { "docid": "8e5ba690cc2ec46624ec165d61aefb82", "score": "0.0", "text": "function updatePosition(event) {\n var xOffset = 20;\n var yOffset = 10;\n\n var ttw = tt.style('width');\n var tth = tt.style('height');\n\n var wscrY = window.scrollY;\n var wscrX = window.scrollX;\n\n var curX = (document.all) ? event.clientX + wscrX : event.pageX;\n var curY = (document.all) ? event.clientY + wscrY : event.pageY;\n\n var ttleft = ((curX - wscrX + xOffset * 2 + ttw) > window.innerWidth) ?\n curX - ttw - xOffset * 2 : curX + xOffset;\n\n if (ttleft < wscrX + xOffset) {\n ttleft = wscrX + xOffset;\n }\n\n var tttop = ((curY - wscrY + yOffset * 2 + tth) > window.innerHeight) ?\n curY - tth - yOffset * 2 : curY + yOffset;\n\n if (tttop < wscrY + yOffset) {\n tttop = curY + yOffset;\n }\n\n tt.style(\"top\", tttop +\"px\")\n tt.style(\"left\", ttleft + \"px\");\n }", "title": "" } ]
[ { "docid": "1a9a18b7371c49456895473808b9790c", "score": "0.7951572", "text": "function tooltip_travel() {\n //position tooltip\n //XXX where does offset of 10 come from?\n var top = (d3.event.pageY-10)+'px';\n var left = (d3.event.pageX+10)+'px';\n tooltip.style('top', top).style('left', left);\n}", "title": "" }, { "docid": "3d4c4c83d05f911eee5ecdaebe3de36c", "score": "0.77586544", "text": "setTooltipPosition(self, tooltip) {\r\n tooltip.style(\"left\", (d3.event.pageX - 120) + \"px\")\r\n .style(\"top\", (d3.event.pageY - self.padding.top -10) + \"px\");\r\n }", "title": "" }, { "docid": "da402e3ed13613eba79e61ab83d4c0eb", "score": "0.7598492", "text": "function onTooltipMoveHandler(tooltip){\n\treturn tooltip.style(\"top\", (d3.event.pageY-40)+\"px\").style(\"left\",(d3.event.pageX+25)+\"px\");\n}", "title": "" }, { "docid": "4ff1e2c9476cb0ead7bcc8332860971a", "score": "0.751391", "text": "function moveTooltip() {\n tooltip.style(\"top\",(d3.event.pageY+tooltipOffset.y)+\"px\")\n .style(\"left\",(d3.event.pageX+tooltipOffset.x)+\"px\");\n}", "title": "" }, { "docid": "4ff1e2c9476cb0ead7bcc8332860971a", "score": "0.751391", "text": "function moveTooltip() {\n tooltip.style(\"top\",(d3.event.pageY+tooltipOffset.y)+\"px\")\n .style(\"left\",(d3.event.pageX+tooltipOffset.x)+\"px\");\n}", "title": "" }, { "docid": "e9d74a1d1055d556f6a4cd810a4b4a37", "score": "0.7395786", "text": "function updatePosition(event, options) {\n // determine x and y offsets, defaults are 10px\n var offsetX = 10;\n var offsetY = 10;\n if (options && options.offset && (options.offset.x !== undefined) && (options.offset.x !== null)) {\n offsetX = options.offset.x;\n }\n if (options && options.offset && (options.offset.y !== undefined) && (options.offset.y !== null)) {\n offsetY = options.offset.y;\n }\n //TODO: use the correct d3 type\n d3_selection_1.select(\"#vis-tooltip\")\n .style(\"top\", function () {\n // by default: put tooltip 10px below cursor\n // if tooltip is close to the bottom of the window, put tooltip 10px above cursor\n var tooltipHeight = this.getBoundingClientRect().height;\n if (event.clientY + tooltipHeight + offsetY < window.innerHeight) {\n return \"\" + (event.clientY + offsetY) + \"px\";\n }\n else {\n return \"\" + (event.clientY - tooltipHeight - offsetY) + \"px\";\n }\n })\n .style(\"left\", function () {\n // by default: put tooltip 10px to the right of cursor\n // if tooltip is close to the right edge of the window, put tooltip 10 px to the left of cursor\n var tooltipWidth = this.getBoundingClientRect().width;\n if (event.clientX + tooltipWidth + offsetX < window.innerWidth) {\n return \"\" + (event.clientX + offsetX) + \"px\";\n }\n else {\n return \"\" + (event.clientX - tooltipWidth - offsetX) + \"px\";\n }\n });\n}", "title": "" }, { "docid": "bbcdaf02f7f10c66823592b0f422ce0c", "score": "0.7319503", "text": "function moveTooltip() {\n tooltip.style(\"top\",(d3.event.pageY+tooltipOffset.y)+\"px\")\n .style(\"left\",(d3.event.pageX+tooltipOffset.x)+\"px\");\n }", "title": "" }, { "docid": "3fe8d1851268a6601a7f1c91687ffff5", "score": "0.73088205", "text": "function tooltipOn(d) {\r\n d3.event.preventDefault();\r\n tooltip\r\n .style(\"left\", `${d3.event.x + 10}px`)\r\n .style(\"top\", `${d3.event.y}px`)\r\n .style(\"opacity\", \"0.95\").html(`\r\n <p>Year:&nbsp&nbsp${d.year}</p>\r\n <p>Month:&nbsp&nbsp${months[d.month - 1]}</p>\r\n <p>Variance:&nbsp&nbsp${d.variance}</p>\r\n `);\r\n }", "title": "" }, { "docid": "ea6fae7a8b980a4b751529500a048662", "score": "0.7280406", "text": "showMouseTooltip(e) {\n // This allows to find the closest X index of the mouse:\n const bisect = d3.bisector(function(d) { return d.x; }).left;\n const x0 = this.xScale.invert(e.pageX-this.element.getBoundingClientRect().x-this.margin.left);\n d3.selectAll('.tooltip-line')\n .attr('x1', e.pageX-this.element.getBoundingClientRect().x-this.margin.left)\n .attr('x2', e.pageX-this.element.getBoundingClientRect().x-this.margin.left);\n\n this.data.forEach((course) => {\n const tooltip = this.tooltips[course.courseID];\n const i = bisect(course.points, x0, 1);\n if(typeof (course.points[i]) === 'undefined'){\n return\n }\n tooltip.style('opacity', 0.9);\n\n tooltip.html(`[${parseFloat(course.points[i].x).toFixed(2)};\n ${parseFloat(course.points[i].y).toFixed(2)}]`)\n .style('left', (this.xScale(course.points[i].x) + 10 + this.element.getBoundingClientRect().x) + \"px\")\n .style('top', (this.yScale(course.points[i].y)+ 10 + this.element.getBoundingClientRect().y) + \"px\")\n .style('background-color', course.color)\n .style('border-color', course.color);\n });\n }", "title": "" }, { "docid": "dd1c98de37071a2b40fd284532a672c9", "score": "0.7270796", "text": "function handleMouseOver(d) { // Add interactivity\n tooltip.transition()\n .duration(200)\n .style(\"opacity\", .9);\n tooltip.html(\"(\" + d.x + \", \" + d.y + \")\")\n .style(\"left\", (d3.event.pageX + 5) + \"px\")\n .style(\"top\", (d3.event.pageY - 28) + \"px\");\n }", "title": "" }, { "docid": "0cd18d68bec639599a301282087a18f0", "score": "0.7259775", "text": "function moveTooltip() {\n var offset = {x: 5, y: -25}\n var bbox = tooltip.node().getBoundingClientRect();\n var svg_width = get_width(d3.select(\"#container svg\"));\n var svg_height = get_height(d3.select(\"#container svg\"));\n\n if (d3.event.pageX > (svg_width - bbox.width) - 5) {\n offset.x = -bbox.width - 5;\n }\n if (d3.event.pageY > (svg_height - bbox.height)) {\n\n offset.y = -bbox.height - 5;\n }\n\n tooltip.style(\"top\",(d3.event.pageY+offset.y)+\"px\")\n .style(\"left\",(d3.event.pageX+offset.x)+\"px\");\n}", "title": "" }, { "docid": "3cd3c87e87d4309763c37be63a402aa0", "score": "0.71957356", "text": "function onMousemove(d) {\n var tooltipWidth = d3\n .select(\".js-chart-tooltip\")\n .node()\n .getBoundingClientRect().width;\n\n // Get position of right edge of chart.\n // A bit nasty - we're assuming here that the first .js-chart on the page\n // has the same right position as whatever chart the cursor is currently\n // over. Not sure how else to know which chart it is.\n var chartRight = d3\n .select(\".js-chart\")\n .node()\n .getBoundingClientRect().right;\n\n // Default, slightly to right of cursor:\n var tooltipLeft = event.pageX + 15;\n\n if (chartRight - event.pageX < tooltipWidth) {\n // Close to right edge of chart; put tooltip to left of cursor:\n tooltipLeft = event.pageX - tooltipWidth - 10;\n }\n\n tooltip\n .style(\"top\", event.pageY - 10 + \"px\")\n .style(\"left\", tooltipLeft + \"px\");\n }", "title": "" }, { "docid": "573925bc3704c7cd001ad42c57abef1d", "score": "0.7181222", "text": "function attachTooltip(selection){\n selection\n .on('mouseenter',function(d){\n console.log(d.item);\n console.log(d.year);\n console.log(d.value);\n\n var tooltip = d3.select('.custom-tooltip');\n tooltip\n .transition()\n .style('opacity',1);\n\n tooltip.select('#type').html(d.item);\n tooltip.select('#year').html(d.year);\n tooltip.select('#value').html(d.value);\n })\n\n .on('mousemove',function(d){\n var xy = d3.mouse(document.getElementById('plot'));\n var left = xy[0], top = xy[1];\n //console.log(xy);\n\n var tooltip = d3.select('.custom-tooltip'); //tooltip needs to be defined here again because of scope\n\n tooltip\n .style('left',left+50+'px')\n .style('top',top+50+'px')\n })\n\n .on('mouseleave',function(d){\n var tooltip = d3.select('.custom-tooltip')\n .transition()\n .style('opacity',0);\n })\n}", "title": "" }, { "docid": "5e9ccf725859bf348001f126ae73f8cb", "score": "0.7181217", "text": "tooltipMove(event, d) {\n let vis = this; \n\n d3.select('#barchart-tooltip')\n .style('left', () => {\n if (event.pageX > 1650)\n return event.pageX - vis.tooltipWidth - vis.config.tooltipPadding + 30 + 'px';\n return event.pageX + vis.config.tooltipPadding + 'px'\n })\n .style('top', (event.pageY + vis.config.tooltipPadding) + 'px')\n }", "title": "" }, { "docid": "0e302eead9064c5b57d9d143c759af2a", "score": "0.71742207", "text": "function tooltip_in(d){\n //show the tooltip\n div.transition()\t\t\n .duration(200)\t\t\n .style(\"opacity\", .9);\t\t\n div.html(d)\t\n .style(\"left\", (d3.event.pageX + 20) + \"px\")\t\t\n .style(\"top\", (d3.event.pageY - 50) + \"px\");\n}", "title": "" }, { "docid": "2010e599a6aa15e0708b87f8fcbeebad", "score": "0.71052706", "text": "function mousemove(event) {\n\n\t \t// Use scale.invert function to get the actual value from the mousex value\n\t let x0 = x.invert(d3.pointer(event)[0]);\n\t console.log(d3.pointer(event)[0], x0, event)\n\n\t // Call the previsously declared bisector function to get the index of the value in the dataset\n let i = bisectDate(data, x0, 1);\n\n // Find the closest date and population combination to the current cursor position\n let d0 = data[i - 1];\n let d1 = data[i];\n\t let d = x0 - d0.date > d1.date - x0 ? d1 : d0;\n\t \n\t // let d= data[i];\n\n \t// Shift the whole tooltip group on the x-axis\n\t\t// focus.attr(\"transform\", \"translate(\" + x(d.date) + \",0)\");\n\t\t\n\t\tfocus.attr(\"transform\", \"translate(\" + d3.pointer(event)[0] + \",0)\");\n\n\t // Update the tooltip text properties\n\t focus.select(\".focus-date\").text(formatDate(d.date));\n\t focus.select(\".focus-population\").text(d3.format(',')(d.population));\n\t }", "title": "" }, { "docid": "d4473585333b57caaabdb32eccf66f53", "score": "0.7053078", "text": "function show_tooltip(svg, node, xmin, xmax, d) {\n var tooltip = tooltipTemplate(d);\n\n window.tooltip\n .transition()\n .style('opacity', .9);\n window.tooltip\n .html(tooltip)\n .style(\"left\", (d3.event.pageX + 20) + \"px\") \n .style(\"top\", (d3.event.pageY - 28) + \"px\");\n}", "title": "" }, { "docid": "407a8680988218af3ed73fa00edf9670", "score": "0.7049733", "text": "function mouseMove() {\n return tooltip\n .style('top', event.pageY - 10 + 'px')\n .style('left', event.pageX + 10 + 'px')\n}", "title": "" }, { "docid": "8b4a4b2b5183b0598dafa96a174215f9", "score": "0.70458925", "text": "function moveToolTip() {\n const top = d3.event.clientY - tooltip.box.height - 5;\n let left = d3.event.clientX - tooltip.box.width / 2;\n if (left < 0) {\n left = 0;\n } else if (left + tooltip.box.width > window.innerWidth) {\n left = window.innerWidth - tooltip.box.width;\n }\n tooltip.style(\"left\", left + \"px\").style(\"top\", top + \"px\");\n }", "title": "" }, { "docid": "949ab2a3f98c2cb4eba8b6bbc1c8019c", "score": "0.6973937", "text": "function updatePosition(event, options) {\n // determine x and y offsets, defaults are 10px\n var offsetX = 10;\n var offsetY = 10;\n if (options && options.offset && (options.offset.x !== undefined) && (options.offset.x !== null)) {\n offsetX = options.offset.x;\n }\n if (options && options.offset && (options.offset.y !== undefined) && (options.offset.y !== null)) {\n offsetY = options.offset.y;\n }\n\n d3.select(\"#vis-tooltip\")\n .style(\"top\", function() {\n // by default: put tooltip 10px below cursor\n // if tooltip is close to the bottom of the window, put tooltip 10px above cursor\n var tooltipHeight = this.getBoundingClientRect().height;\n if (event.clientY + tooltipHeight + offsetY < window.innerHeight) {\n return \"\" + (event.clientY + offsetY) + \"px\";\n } else {\n return \"\" + (event.clientY - tooltipHeight - offsetY) + \"px\";\n }\n })\n .style(\"left\", function() {\n // by default: put tooltip 10px to the right of cursor\n // if tooltip is close to the right edge of the window, put tooltip 10 px to the left of cursor\n var tooltipWidth = this.getBoundingClientRect().width;\n if (event.clientX + tooltipWidth + offsetX < window.innerWidth) {\n return \"\" + (event.clientX + offsetX) + \"px\";\n } else {\n return \"\" + (event.clientX - tooltipWidth - offsetX) + \"px\";\n }\n });\n }", "title": "" }, { "docid": "18a9e4c87699a7e28f9dfbf209eb43af", "score": "0.6930026", "text": "function handleMouseOver(d) {\n var xPosition = d3.mouse(this)[0];\n var yPosition = d3.mouse(this)[1] + 20;\n\n d3.select('body').append('div').attr('id', 'tooltip').html('<b>' + d.properties.name + '</b><br/><u> U.S. Military Bases </u><br/>Unconfirmed: ' + d.properties.unconfirmed + '<br/>Confirmed: ' + d.properties.total + '<br/>Others: ' + d.properties.lily).style('opacity', 0.8).style('top', yPosition + 'px').style('left', xPosition + 'px');\n d3.select(this);\n }", "title": "" }, { "docid": "9f282c1d640debb9e4c2371fa59bcb5c", "score": "0.6922949", "text": "function onMouseOver(e){\n e.target.setOpacity(1.);\n var size = 40;\n var point = map.latLngToContainerPoint(e.latlng);\n var tooltip = d3.select(map.getContainer())\n .append(\"div\")\n .attr(\"class\", \"tooltip\")\n .style({ left: point.x - 19 + \"px\", top: point.y - 20 - 60 + \"px\" })\n .node();\n displayExpo(tooltip, e.target.options, size);\n\n var tooltip2 = d3.select(map.getContainer())\n .append(\"div\")\n .attr(\"class\", \"tooltip\")\n .style({ left: point.x - 19 - 40+ \"px\", top: point.y - 30 + \"px\" })\n .node();\n\n displayDead(tooltip2, e.target.options, size);\n\n var tooltip3 = d3.select(map.getContainer())\n .append(\"div\")\n .attr(\"class\", \"tooltip\")\n .style({ left: point.x - 19 + 40+ \"px\", top: point.y - 30 + \"px\" })\n .node();\n\n displayInclination(tooltip3, e.target.options, size);\n}", "title": "" }, { "docid": "1da65939664f849eb71f15ce1e31eb1f", "score": "0.692225", "text": "function onMouseMove(e) {\n // console.log(\"In\");\n // we have location problem here.. how do we know -->d3.mouse()!! Deprec use now d3.pointer(e) return x,y coords of the mouse event.\n const mousePosition = d3.pointer(e);\n\n //console.log(mousePosition);\n\n /* what data we're hovering over\n * how do we convert an x position into a date--\n * earlier we've used scale to convert from data space to pixel space */\n\n const hoveredDate = xScale.invert(mousePosition[0]);\n //console.log(hoveredDate); // GREAZ\n\n /* Now.. find the closest data point.\n *** where a variable will fit in a sorted list-> use scan(array, comparator) see: https://www.geeksforgeeks.org/d3-js-d3-scan-function/\n */\n /* function to find the distance btw the hovered point and a datapoint */\n const getDistanceFromHoveredDate = (d) =>\n Math.abs(xAccessor(d) - hoveredDate);\n\n /* function to compare the two data points in the scan() =>this will create an array\n * of distances from the hovered point , and get the index of the closest data point to the hovered date.\n */\n const closestIndex = d3.scan(\n dataset,\n (a, b) => getDistanceFromHoveredDate(a) - getDistanceFromHoveredDate(b)\n );\n /* grab the data point at the index */\n const closestDataPoint = dataset[closestIndex];\n //console.table(closestDataPoint); //hover on the left and see dates close to the beginning of the data set.\n /* grab the closest x and y values using the accessor func. */\n const closestXValue = xAccessor(closestDataPoint);\n const closestYValue = yAccessor(closestDataPoint);\n /* use the closestXValue to set the date in the tooltip */\n const formatDate = d3.timeFormat(\"%B %A %-d, %Y\");\n tooltip.select(\"#date\").text(formatDate(closestXValue));\n /* set the temperature value in the tooltip */\n const fomatTemperature = (d) => `${d3.format(\".1f\")(d)}°F`;\n tooltip.select(\"#temperature\").text(fomatTemperature(closestYValue));\n\n /* LASTLY, grab the x and y position of the closest point,\n * shift the tooltip\n * hide/show the tooltip appropriately\n */\n\n const x = xScale(closestXValue) + dimensions.margin.left;\n const y = yScale(closestYValue) + dimensions.margin.top;\n\n tooltip.style(\n \"transform\",\n `translate(` + `calc( -50% + ${x}px),` + `calc(-100% + ${y}px)` + `)`\n );\n\n tooltip.style(\"opacity\", 1);\n /* For the extra section */\n tooltipCircle\n .attr(\"cx\", xScale(closestXValue))\n .attr(\"cy\", yScale(closestYValue))\n .style(\"opacity\", 1);\n /* extra sec. ends here */\n }", "title": "" }, { "docid": "cfc0acfd3eceba9e0a1e2f4784b2df81", "score": "0.6918608", "text": "function showTooltip(mouse_position, datum, index) {\n if(selectedDatums_tt.length > 2){\n let avgDist = null;\n let avgRad = null;\n let avgTemp = null;\n let avgInclination = null;\n let avgRA = null;\n let avgDec = null;\n\n for(var i = 0; i < selectedDatums_tt.length; i++){\n avgDist += selectedDatums_tt[i].st_dist\n avgRad += selectedDatums_tt[i].pl_radj;\n avgTemp += selectedDatums_tt[i].st_teff;\n avgInclination += selectedDatums_tt[i].pl_orbincl;\n avgRA += selectedDatums_tt[i].ra;\n avgDec += selectedDatums_tt[i].dec;\n }\n avgDist = avgDist/selectedDatums_tt.length;\n avgRad = avgRad/selectedDatums_tt.length;\n avgTemp = avgTemp/selectedDatums_tt.length;\n avgInclination = avgInclination/selectedDatums_tt.length;\n avgRA = avgRA/selectedDatums_tt.length;\n avgDec = avgDec/selectedDatums_tt.length;\n \n tooltip_state.name = datum.pl_name;\n tooltip_state.discovery = datum.pl_discmethod;\n tooltip_state.distance = avgDist\n tooltip_state.radius = avgRad\n tooltip_state.temp = avgTemp\n tooltip_state.inclination = avgInclination\n tooltip_state.ra = avgRA\n tooltip_state.dec = avgDec\n }\n else{\n tooltip_state.name = datum.pl_name;\n tooltip_state.discovery = datum.pl_discmethod;\n tooltip_state.distance = datum.st_dist;\n tooltip_state.radius = datum.pl_radj;\n tooltip_state.temp = datum.st_teff;\n tooltip_state.inclination = datum.pl_orbincl;\n tooltip_state.ra = datum.ra;\n tooltip_state.dec = datum.dec;\n // tooltip_state.cart = cartesianCoords[index];\n }\n\n let tooltip_width = 120;\n let x_offset = -tooltip_width/2;\n let y_offset = 30;\n\n tooltip_state.display = \"block\";\n tooltip_state.left = mouse_position[0] + x_offset + 60;\n tooltip_state.top = mouse_position[1] + y_offset - 32;\n \n \n updateTooltip();\n}", "title": "" }, { "docid": "427c47fcd6f0bf7d0924c36471e5b7e6", "score": "0.69084644", "text": "function mousemove(){\n \n var x = transform.invertX(d3.event.x);\n var y = transform.invertY(d3.event.y);\n\n for(var i = 0; i < links.length; i++){\n var link = links[i];\n res = getHoveredLink(link, {x: x, y: y});\n if(res){\n d3.select(\"#tooltip\").style(\"opacity\", 0.9).html(getLinkText(link)).style(\"left\", d3.event.x+\"px\").style(\"top\", (d3.event.y-28) +\"px\")\n break;\n }else{\n d3.select(\"#tooltip\").style(\"opacity\", 0.0);\n }\n }\n}", "title": "" }, { "docid": "61bb2d29be0c042d1911c9c32c4e24a0", "score": "0.6883987", "text": "function createTooltip()\r\n {\r\n tooltip = d3.select(\"body\")\r\n .append(\"div\")\r\n \r\n // .style(\"vertical-align\", \"middle\")\r\n .classed(\"myTip\", true)\r\n .html(\"Canadá\");\r\n hookTooltip(); // Creates the hooks for the tooltips\r\n }", "title": "" }, { "docid": "bef822ea94cd40f26d505c05f930d8f4", "score": "0.68806887", "text": "function handleMouseOver(d) {\n var xPosition = d3.mouse(this)[0];\n var yPosition = d3.mouse(this)[1] + 20;\n\n d3.select('body').append('div').attr('id', 'tooltip').html('<b>' + d.properties.name + '</b>' + '<b><br/> Percentage of population under Forced Labor</b>: ' + d.properties.slavery / 100 + '%').style('opacity', 0.8).style('top', yPosition + 'px').style('left', xPosition + 'px');\n\n d3.select(this).style('fill', '#ffffff');\n }", "title": "" }, { "docid": "6dec0afe0b118dc0a404e072bcb8968d", "score": "0.6847514", "text": "function positionTooltipNode(tooltip) {\n var twidth = 19; // padding + border + 5\n var theight = 19; // padding + border + 5\n\n var index = tooltip.style(\"width\").indexOf(\"px\");\n if (index != -1) twidth += +tooltip.style(\"width\").substr(0, index);\n\n index = tooltip.style(\"height\").indexOf(\"px\");\n if (index != -1) theight += +tooltip.style(\"height\").substr(0, index);\n\n var top = d3.event.pageY - 100 < 0 ? d3.event.pageY + 23 : d3.event.pageY - theight;\n var left = d3.event.pageX + 250 < window.innerWidth ? d3.event.pageX + 5 : d3.event.pageX - twidth;\n\n return tooltip.style(\"top\", top + \"px\").style(\"left\", left + \"px\");\n }", "title": "" }, { "docid": "6dec0afe0b118dc0a404e072bcb8968d", "score": "0.6847514", "text": "function positionTooltipNode(tooltip) {\n var twidth = 19; // padding + border + 5\n var theight = 19; // padding + border + 5\n\n var index = tooltip.style(\"width\").indexOf(\"px\");\n if (index != -1) twidth += +tooltip.style(\"width\").substr(0, index);\n\n index = tooltip.style(\"height\").indexOf(\"px\");\n if (index != -1) theight += +tooltip.style(\"height\").substr(0, index);\n\n var top = d3.event.pageY - 100 < 0 ? d3.event.pageY + 23 : d3.event.pageY - theight;\n var left = d3.event.pageX + 250 < window.innerWidth ? d3.event.pageX + 5 : d3.event.pageX - twidth;\n\n return tooltip.style(\"top\", top + \"px\").style(\"left\", left + \"px\");\n }", "title": "" }, { "docid": "c4a72e96ed7149fe9b89fec648b1dbbd", "score": "0.6839511", "text": "function addTooltip() {\n //tip = d3.tip()\n tip = d3tip()\n .offset([-15,0])\n .attr(\"class\", 'd3-tip ' + options.type)\n .attr('id', 'd3-tip')\n .style('background',options.hash[options.type])\n .style('white-space', 'pre')\n .style('text-align', 'center')\n .html(function(d) {\n if(d.y || d.y === 0)\n return \"<span>\"+formatGraphDate(d.x)+\"</span>\"+\"<br><br>\"+\"<span style='font-size: 25px'>\"+ d.y+\"</span>\";\n else\n return \"<span>\"+formatGraphDate(d.x)+\"</span>\";\n });\n //.html(function(d) { return d.y +'\\n'+ formatGraphDate(d.x); });\n\n //console.log(\"THE ALL DATA IS: \", d);\n\n d3.select('.d3-tip').select('::after').style('background',options.hash[options.type]);\n svg.call(tip);\n }", "title": "" }, { "docid": "a180980e7379e25f798a8592eb816a72", "score": "0.6823866", "text": "function createHover(points) {\n let tooltip = d3.select(\"body\").append(\"div\")\n .attr(\"class\", \"tooltip\")\n .style(\"opacity\", 0);\n points\n .on(\"mouseover\", (content) => {\n tooltip.transition()\n .duration(200)\n .style(\"opacity\", 1)\n tooltip.html(\"<p>\" + content.Name + \"<br />\" + \n content[\"Type 1\"] + \"<br />\" + \n content[\"Type 2\"] + \"</p>\")\n .style(\"left\", (d3.event.pageX) + \"px\")\t\t\n .style(\"top\", (d3.event.pageY - 28) + \"px\");\t\n })\n .on(\"mouseout\", () => {\n tooltip.transition()\n .duration(200)\n .style(\"opacity\", 0)\n });\n}", "title": "" }, { "docid": "873123665ad09811c4c8b3a5fd3db2bc", "score": "0.67689806", "text": "onMouseOver(e){\n if(!this.isDragging){\n var pos = e.data.getLocalPosition(this.parent);\n this.tooltip.x = pos.x - this.x + this.data.tooltip.offset.x;\n this.tooltip.y = pos.y - this.y + this.data.tooltip.offset.y;\n this.tooltip.visible = true;\n }\n }", "title": "" }, { "docid": "e29833da38209b67e7e3169a2f3411aa", "score": "0.67503333", "text": "function mouseAbove() {\n \tvar point = d3.mouse(this);\n \tvar node;\n \tvar minDepth = -Infinity;\n \tcircles.forEach(function(d) {\n \t\tvar dx = ((d.x-view[0])*scale)+x - point[0];\n \t\tvar dy = ((d.y-view[1])*scale)+y - point[1];\n \t\tvar distance = Math.sqrt((dx * dx) + (dy * dy));\n \t\tif (d.opacity==1 && d.depth >minDepth && distance < d.r*scale) {\n \t\t\tminDistance = d.depth;\n \t\t\tnode = d;\n \t\t}\n \t});\n if(node && focus.children) {\n const [xMouse, yMouse] = d3.mouse(this);\n if(node.children){\n d3.select('#tooltip')\n \t\t\t\t\t.style('opacity', 0.8)\n .style('top', (d3.event.layerY+5) + 'px')\n\t\t\t\t\t.style('left', (d3.event.layerX+5) + 'px')\n \t\t\t\t\t.html(\"Term name: \"+dictionary[node.data.id].name);}\n else{\n d3.select('#tooltip')\n .style('top', (d3.event.layerY+5) + 'px')\n\t\t\t\t\t.style('left', (d3.event.layerX+5) + 'px')\n \t\t\t\t\t.style('opacity', 0.8)\n// .style('left',(xMouse)+ 'px')\n// .style('top', (yMouse) + 'px')\n \t\t\t\t\t.html(\"ID: \"+node.data.id);\n////console.log(node);\n }\n \t\t\t\t\t//if (focus !== node) {mousefocus = node;} else if(node!==root){mousefocus = node.parent;};\n \t\t\t\t}else if(node && !focus.children){\n\n \t\t\t\t// Hide the tooltip when there our mouse doesn't find nodeData\n var rectnode;\n focus.rectnodes.forEach(function(d){\n d3.select('#tooltip')\n .style('opacity', 0);\n if(d.posX<point[0]&& point[0]<(d.posX+d.w) && d.posY<point[1]&&point[1]<(d.posY+d.h)){\n rectnode = d;\n }\n });\n if(rectnode){\n const [xMouse, yMouse] = d3.mouse(this);\n // console.log(d3.event.PageY + \" \" + d3.event.PageX +\" \" + point);\n d3.select('#tooltip')\n .style('opacity', 0.8)\n .style('top', (d3.event.layerY+5) + 'px')\n\t\t\t\t\t.style('left', (d3.event.layerX+5) + 'px')\n .html(\"Term name: \"+rectnode.name+\"</br>IC: \"+Math.floor(rectnode.IC*100)/100);\n }else{\n //console.log(\"hola\");\n d3.select('#tooltip')\n .style('opacity', 0);\n }\n\n \t\t\t}\n else if(node===undefined){\n d3.select('#tooltip')\n .style('opacity', 0);\n }\n }", "title": "" }, { "docid": "0c7e1da4351e3a87a6a5ec36b2539321", "score": "0.6746226", "text": "function floatingTooltip(tooltipId, width) {\n // Local variable to hold tooltip div for\n // manipulation in other functions.\n var tt = d3.select('body')\n .append('div')\n .attr('class', 'tooltip')\n .attr('id', tooltipId)\n .style('pointer-events', 'none');\n\n // Set a width if it is provided.\n if (width) {\n tt.style('width', width);\n }\n\n // Initially it is hidden.\n hideTooltip();\n\n /*\n * Display tooltip with provided content.\n *\n * content is expected to be HTML string.\n *\n * event is d3.event for positioning.\n */\n function showTooltip(content, event) {\n tt.style('opacity', 1.0)\n .html(content);\n\n updatePosition(event);\n }\n\n /*\n * Hide the tooltip div.\n */\n function hideTooltip() {\n tt.style('opacity', 0.0);\n tt.style('animation','none')\n }\n\n /*\n * Figure out where to place the tooltip\n * based on d3 mouse event.\n */\n function updatePosition(event) {\n var xOffset = 20;\n var yOffset = 10;\n\n var ttw = tt.style('width');\n var tth = tt.style('height');\n\n var wscrY = window.scrollY;\n var wscrX = window.scrollX;\n\n var curX = (document.all) ? event.clientX + wscrX : event.pageX;\n var curY = (document.all) ? event.clientY + wscrY : event.pageY;\n var ttleft = ((curX - wscrX + xOffset * 2 + ttw) > window.innerWidth) ?\n curX - ttw - xOffset * 2 : curX + xOffset;\n\n if (ttleft < wscrX + xOffset) {\n ttleft = wscrX + xOffset;\n }\n\n var tttop = ((curY - wscrY + yOffset * 2 + tth) > window.innerHeight) ?\n curY - tth - yOffset * 2 : curY + yOffset;\n\n if (tttop < wscrY + yOffset) {\n tttop = curY + yOffset;\n }\n\n tt.style({ top: tttop + 'px', left: ttleft + 'px' });\n }\n\n return {\n showTooltip: showTooltip,\n hideTooltip: hideTooltip,\n updatePosition: updatePosition\n };\n}", "title": "" }, { "docid": "0e4d39474eaaff0ad7038b3e86fe156e", "score": "0.6739172", "text": "function floatingTooltip(tooltipId, width) {\n // Local variable to hold tooltip div for\n // manipulation in other functions.\n var tt = d3.select('body')\n .append('div')\n .attr('class', 'bubbleTooltip')\n .attr('id', tooltipId)\n .style('pointer-events', 'none');\n\n // Set a width if it is provided.\n if (width) {\n tt.style('width', width);\n }\n\n // Initially it is hidden.\n hideTooltip();\n\n /*\n * Display tooltip with provided content.\n *\n * content is expected to be HTML string.\n *\n * event is d3.event for positioning.\n */\n function showTooltip(content, event) {\n tt.style('opacity', 1.0)\n .html(content);\n\n updatePosition(event);\n }\n\n /*\n * Hide the tooltip div.\n */\n function hideTooltip() {\n tt.style('opacity', 0.0);\n }\n\n /*\n * Figure out where to place the tooltip\n * based on d3 mouse event.\n */\n function updatePosition(event) {\n var xOffset = 20;\n var yOffset = 10;\n\n var ttw = tt.style('width');\n var tth = tt.style('height');\n\n var wscrY = window.scrollY;\n var wscrX = window.scrollX;\n\n var curX = (document.all) ? event.clientX + wscrX : event.pageX;\n var curY = (document.all) ? event.clientY + wscrY : event.pageY;\n var ttleft = ((curX - wscrX + xOffset * 2 + ttw) > window.innerWidth) ?\n curX - ttw - xOffset * 2 : curX + xOffset;\n\n if (ttleft < wscrX + xOffset) {\n ttleft = wscrX + xOffset;\n }\n\n var tttop = ((curY - wscrY + yOffset * 2 + tth) > window.innerHeight) ?\n curY - tth - yOffset * 2 : curY + yOffset;\n\n if (tttop < wscrY + yOffset) {\n tttop = curY + yOffset;\n }\n\n tt\n .style('top', tttop + 'px')\n .style('left', ttleft + 'px');\n }\n\n return {\n showTooltip: showTooltip,\n hideTooltip: hideTooltip,\n updatePosition: updatePosition\n };\n }", "title": "" }, { "docid": "a46beec71c8c2ec56114a778da26f83d", "score": "0.6717617", "text": "function toolTip(selection) {\n // add tooltip (svg circle element) when mouse enters label or slice\n selection.on('mouseenter', function (data) {\n console.log(\"datamouse\",data.data.values);\n svg.append('circle')\n .attr('class', 'toolCircle')\n .attr('r', radius * 0.55) // radius of tooltip circle\n .style('fill', color(data.data.key)) // color based on category mouse is over\n .style('fill-opacity', 0.35);\n svg.append('text')\n .attr('class', 'toolCircle')\n .attr('dy', -15) // hard-coded. can adjust this to adjust text vertical alignment in tooltip\n .html(toolTipHTML(data)) // add text to the circle.\n .style('font-size', '1.2em')\n .style (\"stroke\", 'white')\n .style(\"fill\",\"white\")\n .style(\"white-space\",\"initial\")\n .style(\"text-overflow\",\"initial\")\n .style('text-anchor', 'middle'); // centres text in tooltip\n\n });\n // remove the tooltip when mouse leaves the slice/label\n selection.on('mouseout', function () {\n d3.selectAll('.toolCircle').remove();\n });\n }", "title": "" }, { "docid": "9d21b79f3bc18d0ab2a3708566c145ab", "score": "0.67167705", "text": "addTooltip (tooltip, html, direction = 'right') {\r\n this.selection\r\n .on('mouseover', () => { tooltip.hidden = false })\r\n .on('mouseout', () => { tooltip.hidden = true })\r\n .on('mousemove', function () {\r\n tooltip.render(html)\r\n tt.moveTooltip(tooltip, d3.select(this), direction)\r\n })\r\n }", "title": "" }, { "docid": "52c54b0d9aaa0056b81dac29f9c28b4a", "score": "0.67074865", "text": "function initTooltip() {\n if (!tooltip) {\n var container = chartContainer ? chartContainer : document.body;\n\n // Create new tooltip div if it doesn't exist on DOM.\n tooltip = d3.select(container).append(\"div\")\n .attr(\"class\", \"nvtooltip \" + (classes ? classes : \"xy-tooltip\"))\n .attr(\"id\", id);\n tooltip.style(\"top\", 0).style(\"left\", 0);\n tooltip.style('opacity', 0);\n tooltip.style('position', 'fixed');\n tooltip.selectAll(\"div, table, td, tr\").classed(nvPointerEventsClass, true);\n tooltip.classed(nvPointerEventsClass, true);\n }\n }", "title": "" }, { "docid": "77704661faaad22bdabadb158a6e7ca5", "score": "0.6684566", "text": "onMouseOverPublisherEventHandler(context, self, publisher, tooltip) {\r\n // Change cursor\r\n d3.select(context).style(\"cursor\", \"pointer\");\r\n\r\n // Set tooltip's text and position\r\n tooltip.html(publisher[0]);\r\n self.setTooltipPosition(self, tooltip);\r\n\r\n // Set tooltip transition\r\n tooltip.transition()\r\n .duration(400)\r\n .style(\"opacity\", 0.7)\r\n .style(\"width\", \"100px\");\r\n }", "title": "" }, { "docid": "f8983f1f9b1a375b1e69fb04cdb631a7", "score": "0.667732", "text": "function mouseover3(d,loc) {\n let html;\n if (loc==='node') { html = `${d.id}`; } //actor name for node\n else { html = `${d.source.id} - ${d.target.id}`; } //both actors for link\n console.log(html);\n\n //update tooltip based on the mouse location\n tooltip3.html(html)\n .style(\"left\", `${(d3.event.pageX)-110}px`)\n .style(\"top\", `${(d3.event.pageY)-40}px`)\n .style(\"box-shadow\", `1px 1px 5px`)\n .style(\"opacity\", 0.95);\n}", "title": "" }, { "docid": "e4bb49f2146e281928d4aca119da5cc0", "score": "0.6644682", "text": "function addTooltip() {\n tip = d3tip()\n .offset([-15,0])\n .attr('class', 'd3-tip ' + options.type)\n .attr('id', 'd3-tip')\n .style('background',options.hash[options.type])\n .style('white-space', 'pre')\n .style('text-align', 'center')\n .html(function(d) {\n if(d.y)\n return \"<span>\"+formatGraphDate(d.x)+\"</span>\"+\"<br><br>\"+\"<span style='font-size: 25px'>\"+ d.y+\" \"+\"<div style='font-size: 15px'>\"+d.type+\"</div>\"+\"</span>\";\n else\n return \"<span>\"+formatGraphDate(d.x)+\"</span>\";\n });\n //.html(function(d) { return d.y +'\\n'+ formatGraphDate(d.x); });\n\n //console.log(\"THE ALL DATA IS: \", d);\n\n d3.select('.d3-tip').select('::after').style('background',options.hash[options.type]);\n svg.call(tip);\n }", "title": "" }, { "docid": "7717fb547c2fa636670ec912c3e8f17d", "score": "0.663996", "text": "function showTooltip(d) {\r\n var mouse = d3.mouse(svg.node()).map(function (d) {\r\n return parseInt(d);\r\n });\r\n if (tooltip_point.classed(\"hidden\")) {\r\n tooltip.classed('hidden', false)\r\n .html(\"<span id='close' onclick='hideTooltipPoint()'>x</span>\" +\r\n \"<div class='inner_tooltip'>\" +\r\n \"<p>\" + d.university_name + \"</p>\" +\r\n \"</div><div>\" + \"</div>\")\r\n .attr('style', 'left:' + (mouse[0] + 15) + 'px; top:' + (mouse[1] - 25) + 'px')\r\n };\r\n }", "title": "" }, { "docid": "7ab71ecdc7b0ba4725c8167380d95426", "score": "0.6629138", "text": "function mouseover(d) {\n\n tooltip.style(\"visibility\", \"visible\")\n .text(d3.select(this).attr(\"text\"))\n .style(\"top\", event.pageY+\"px\")\n .style(\"left\", event.pageX+\"px\");\n // when mouseover occurs, update curModal\n curModal = d3.select(this).attr(\"curModal\");\n}", "title": "" }, { "docid": "bb4a0c88bcae41e9ff16a9e5e766f986", "score": "0.6627492", "text": "function displayGraphTooltip() { \n\tvar _div_factor; /** Variable to store the dividing value for finding x position */\n bacterial_growth_stage.on(\"stagemousemove\", function(event) { \n if ( mouse_over_graph ) { /** If the mouse is over the grid */\n\t\t\tgraph_tooltip_text.alpha = 1;\n\t\t\tbacterial_growth_stage.addChild(graph_tooltip_text); /** Adding tooltip component to the stage*/\n /** Finding the x and y values of graph and display it on the text area */\n\t\t\tswitch ( selected_index ) {\n\t\t\t\t/** To display the tool tip x,y values if the selected item is Staphylococcus aureus */\n\t\t\t\tcase \"0\": _div_factor = 2;\n\t\t\t\t\t\t /** Differences = Highest Y value in each division / Distance between the selected point and the base point */\n\t\t\t\t\t\t calculateFn(DIFFERENCE1,DIFFERENCE2,DIFFERENCE3,DIFFERENCE4,event.stageX,event.stageY,_div_factor)\n\t\t\t\t\t\t break;\t\n\t\t\t\t/** To display the tool tip x,y values if the selected item is Escherichia coli */\n\t\t\t\tcase \"1\": _div_factor = 3;\n\t\t\t\t\t\t /** Differences = Highest Y value in each division / Distance between the selected point and the base point */\n\t\t\t\t\t\t calculateFn(DIFFERENCE1/10,DIFFERENCE2/10,DIFFERENCE3/10,DIFFERENCE4/10,event.stageX,event.stageY,_div_factor)\n\t\t\t\t\t break;\n\t\t\t} \n\t\t\tgraph_tooltip_text.x = event.stageX + 3 ;\n\t\t\tgraph_tooltip_text.y = event.stageY - 25;\n\t } else { /** Else its out of the grid */\n\t\t\tgraph_tooltip_text.alpha = 0; /** To hide the tooltip box */\n }\n\t\tbacterial_growth_stage.update(); /** Updating the stage */\t\t\n });\n}", "title": "" }, { "docid": "e213c7eae5c5e10308149f4cd7f80192", "score": "0.6627378", "text": "function tooltipTypeAShow(d) {\n\tvar leftPosition = d3.event.pageX;\n\tif(that.width - leftPosition < 190){\n\t\tleftPosition = leftPosition - 90;\n\t\tthat.tooltip.classed('rightPointer',true);\n\t\tthat.tooltip.classed('leftPointer',false);\n\t}else if(leftPosition < 190){\n\t\tleftPosition = leftPosition + 90;\n\t\tthat.tooltip.classed('rightPointer',false);\n\t\tthat.tooltip.classed('leftPointer',true);\n\t}else{\n\t\tthat.tooltip.classed('rightPointer',false);\n\t\tthat.tooltip.classed('leftPointer',false);\n\n\t}\n\n\tif(d.callout){\n\t\tthat.tooltip.html(d.text)\n\t}else{\n\t if(that.item && that.item.type.indexOf('pie') > -1){\n\t\t that.tooltip.html(d.data.key + \", <b>\" + d.data.value+ \"% </b>\" );\n\t }else if(that.item && that.item.type.indexOf('verticalbars') > -1){\n\t \tthat.tooltip.html(d)\n\n\t }else if(that.item && that.item.type.indexOf('line:dualaxis') > -1){\n\t \tif(typeof d[that.item.config.yl] !== 'undefined'){\n\t\t\t that.tooltip.html(\"<b>\" + Math.round(d[that.item.config.yl]) + \"</b> \" +that.item.config.yl +' in ' + that.item.config.x + \" <b>\" + d[that.item.config.x] + \"</b>\" );\n\t \t}else{\n\t\t\t that.tooltip.html(\"<b>\" + Math.round(d[that.item.config.yr]) + \"</b> \" +that.item.config.yr +' in ' + that.item.config.x + \" <b>\" + d[that.item.config.x] + \"</b>\" );\n\t \t}\n\t }else{\n\t\t that.tooltip.html(that.item.config.y + \" is <b>\" + formatLabel(d[that.item.config.y],that.item.config) + \"</b> in \" +that.item.config.x + \" <b>\" + d[that.item.config.x] + \"</b>\" );\n\t }\n\t}\n\t//Position the tooltip and display it\n that.tooltip\n .style(\"opacity\", 0.95)\n\t .style(\"left\",(leftPosition) + \"px\")\n\t .style(\"top\", (d3.event.pageY - 16) + \"px\");\n\n //For auto hide feature\n window.clearTimeout(that.tooltipTimer);\n that.tooltipTimer = window.setTimeout(function(){\n \t that.tooltip.transition()\n .duration(500)\n .style(\"opacity\", 0);\n },4000)\n}", "title": "" }, { "docid": "41cca08004a11ae9b9505636c82da30b", "score": "0.66120934", "text": "function creatToolTips() {\n self.axisTip = d3.tip()\n .attr(\"class\", \"d3-tip\")\n .direction(\"n\")\n .html(function(d) {\n return d.attr + \": \" + d.val;\n });\n\n self.centerTip = d3.tip()\n .attr(\"class\", \"d3-tip\")\n .direction(\"n\")\n .html(function(d) {\n return d.attr + \": \" + d.val;\n });\n }", "title": "" }, { "docid": "40f6455a21e4df788399a2c18f98afe2", "score": "0.6584441", "text": "function tooltip(e) {\n\te.stopPropagation();\n\n\tconst elt = e.target;\n\tconst message = elt.getAttribute(\"data-irtooltip\");\n\tif (!message) return;\n\n\tconst initalPosition = elt.getAttribute(\"data-irtooltip-position\") || defaultPosition;\n\n\t// Get the tooltip and set the message\n\tlet tooltipElt = getOrCreateTooltip();\n\ttooltipElt.firstChild.innerText = message;\n\n\t// Get element coordinates and update the coordinates\n\tconst coordElt = elt.getBoundingClientRect();\n\ttooltipElt.className = \"irtooltip\";\n\ttooltipElt.style.top = coordElt.top + \"px\";\n\ttooltipElt.style.left = coordElt.left + \"px\";\n\ttooltipElt.style.marginLeft = 0;\n\ttooltipElt.style.marginTop = 0;\n\ttooltipElt.style.display = \"block\";\n\ttooltipElt.style.whiteSpace = \"nowrap\";\n\n\t// Calculate the coordinates of the tooltip\n\tconst coordTooltip = tooltipElt.getBoundingClientRect();\n\n\t// Create the position list\n\tlet positionList = [\"e\", \"s\", \"w\", \"n\"];\n\tif (positionSequences[initalPosition]) {\n\t\tpositionList = positionSequences[initalPosition].slice();\n\t}\n\telse if (initalPosition.indexOf(\",\") !== -1) {\n\t\tpositionList = initalPosition.split(\",\");\n\t}\n\n\tdo {\n\t\tlet position = positionList.shift();\n\n\t\tswitch (position) {\n\t\tcase \"e\":\n\t\t\ttooltipElt.style.marginLeft = coordElt.width + \"px\";\n\t\t\ttooltipElt.style.marginTop = ((coordElt.height - coordTooltip.height)/2) + \"px\";\n\t\t\ttooltipElt.className = \"irtooltip irtooltip-e\";\n\t\t\tbreak;\n\t\tcase \"s\":\n\t\t\ttooltipElt.style.marginLeft = ((coordElt.width - coordTooltip.width)/2) + \"px\";\n\t\t\ttooltipElt.style.marginTop = coordElt.height + \"px\";\n\t\t\ttooltipElt.className = \"irtooltip irtooltip-s\";\n\t\t\tbreak;\n\t\tcase \"w\":\n\t\t\ttooltipElt.style.marginLeft = -coordTooltip.width + \"px\";\n\t\t\ttooltipElt.style.marginTop = ((coordElt.height - coordTooltip.height)/2) + \"px\";\n\t\t\ttooltipElt.className = \"irtooltip irtooltip-w\";\n\t\t\tbreak;\n\t\tcase \"n\":\n\t\t\ttooltipElt.style.marginLeft = ((coordElt.width - coordTooltip.width)/2) + \"px\";\n\t\t\ttooltipElt.style.marginTop = -coordTooltip.height + \"px\";\n\t\t\ttooltipElt.className = \"irtooltip irtooltip-n\";\n\t\t\tbreak;\n\t\t}\n\n\t} while (eltOutOfScreen(tooltipElt) && positionList.length);\n\n\t// Set the watcher on this element\n\tsetWatcher(elt);\n}", "title": "" }, { "docid": "634237f31618d3314c0354d4af024f0f", "score": "0.6578195", "text": "function showToolTip(d) {\n d3.select(\".tooltip\")\n .style(\"opacity\", 1)\n .style(\"top\", (d3.event.y - 5) + \"px\")\n .style(\"left\", (d3.event.x + 10)+ \"px\")\n .html(`${d.state}: ${d.total}`);\n}", "title": "" }, { "docid": "bcdd9ce5f900a6ab2ddaf150a51693c5", "score": "0.6577088", "text": "function hookTooltip()\r\n {\r\n var svg = d3.select(\".states\").selectAll(\"path\")\r\n \r\n .on(\"mouseover\", function(d){\r\n var tip = d3.select(\"div.myTip\");\r\n var k;\r\n var nAthletes = rateById.get(d.properties.ID_1);\r\n/*\r\n * English name - French name (or only name if VARNAME_1 == \"\") and #of Athletes\r\n */\r\n k = d.properties.NAME_1+(d.properties.VARNAME_1 != \"\" ? \"<br>\" + d.properties.VARNAME_1 : \"\") +\r\n (nAthletes > 0 ? \"<br>Athletes/Athètes: \"+ rateById.get(d.properties.ID_1).toLocaleString() : \"\");\r\n tip.html(k);\r\n/*\r\n * Hightlight provice borders\r\n */\r\n d3.selectAll(\"path\").filter(function(dd) {\r\n return dd.properties.ID_1 == d.properties.ID_1;\r\n }).style(\"stroke-width\", BorderStrong);\r\n/*\r\n * Makes sure that tooltip is visible\r\n */\r\n return tooltip.style(\"visibility\", \"visible\");})\r\n \r\n .on(\"mousemove\", function(){\r\n/*\r\n * Hovers the tooltip ~20px higher and 25px left of the mouse.\r\n */\r\n return tooltip.style(\"top\", (d3.event.pageY-20)+\"px\")\r\n .style(\"left\",(d3.event.pageX+25)+\"px\");})\r\n \r\n .on(\"mouseout\", function(d){\r\n/*\r\n * Provice borders back to normal\r\n */\r\n d3.selectAll(\"path\").filter(function(dd) {\r\n return dd.properties.ID_1 == d.properties.ID_1;\r\n }).style(\"stroke-width\", BorderNormal);\r\n/*\r\n * and hides the tooltip\r\n */\r\n return tooltip.style(\"visibility\", \"hidden\");}) // Hides the tooltip when finished\r\n/*\r\n * Nothing to do on click at this moment\r\n */\r\n .on(\"click\", function(d){\r\n return;\r\n });\r\n }", "title": "" }, { "docid": "c926ca2ecdeca77df2b18b336fc20458", "score": "0.6565569", "text": "function initTooltip() {\n if (!tooltip) {\n var body;\n if (chartContainer) {\n body = chartContainer;\n } else {\n body = document.body;\n }\n //Create new tooltip div if it doesn't exist on DOM.\n tooltip = d3.select(body).append(\"div\")\n .attr(\"class\", \"nvtooltip \" + (classes ? classes : \"xy-tooltip\"))\n .attr(\"id\", id);\n tooltip.style(\"top\", 0).style(\"left\", 0);\n tooltip.style('opacity', 0);\n tooltip.selectAll(\"div, table, td, tr\").classed(nvPointerEventsClass, true);\n tooltip.classed(nvPointerEventsClass, true);\n tooltipElem = tooltip.node();\n }\n }", "title": "" }, { "docid": "7e56f8737380816410a2ce373fc62434", "score": "0.6549274", "text": "function tooltipItem(){\n\t $( '.header' ).tooltip({\n\tposition: {\n\t\tmy: \"left+24 bottom-7\",\n\t\tat: \"left top\"\n\t\t}\n\t});\n}", "title": "" }, { "docid": "abd7761d8a1245d2a8f66234982b2eb3", "score": "0.6522089", "text": "tooltipShow(event, d, vis) {\n // create and show tooltip\n d3.select('#barchart-tooltip')\n .style('display', 'block')\n .style('left', () => {\n if (event.pageX > 1650)\n return event.pageX - vis.tooltipWidth - vis.config.tooltipPadding + 'px';\n return event.pageX + vis.config.tooltipPadding + 'px';\n })\n .style('top', (event.pageY + vis.config.tooltipPadding) + 'px')\n .html(`\n <div class='tooltip-title'>${this.countryIndex.get(d.key)}</div>\n <div class='tooltip-subtitle'>${numberWithDecimals(d.value)} tonnes of carbon dioxide per capita </div>\n `);\n }", "title": "" }, { "docid": "f2dbef5ec4ac66be619369182060a640", "score": "0.65175575", "text": "function showTooltipPoint(d) {\r\n var mouse = d3.mouse(svg.node()).map(function (d) {\r\n return parseInt(d);\r\n });\r\n\r\n tooltip_point.classed('hidden', false)\r\n .html(`<span id='close' onclick='hideTooltipPoint()'>x</span>\r\n <div class='inner_tooltip'>\r\n <small><b>${d.university_name}</b></small>\r\n </div><hr><div class='details'> <small> World Ranking: </small> ${d.world_rank}\r\n </div> <div class='details'> <small> Number of Student: </small> ${d.num_students}\r\n </div> <div class='details'> <small> International Students: </small> ${d.international_students} </div>\r\n <div class='details'> <small> Cost of Living: </small>$${d.cost_of_living}</div>\r\n </div>`)\r\n .attr('style', 'left:' + (mouse[0] + 15) + 'px; top:' + (mouse[1] - 35) + 'px')\r\n }", "title": "" }, { "docid": "466cc994ff3ebad32f3a99e694b954fb", "score": "0.6515653", "text": "function eventOnMouseOver(d, tooltip, htmlContent = undefined) {\n\n tooltip.transition()\n .duration(100)\n .style(\"visibility\", \"visible\")\n .style(\"opacity\", 0.9)\n .style(\"background\", \"black\");\n\n if (htmlContent == undefined) {\n tooltip.html(tooltipHTML(d))\n .style(\"left\", (d3.event.pageX + 15) + \"px\")\n .style(\"top\", (d3.event.pageY - 50) + \"px\");\n } else {\n tooltip.html(htmlContent)\n .style(\"left\", (d3.event.pageX + 15) + \"px\")\n .style(\"top\", (d3.event.pageY - 50) + \"px\");\n }\n\n}", "title": "" }, { "docid": "177b5bee64ce197c5bb691748b1c613b", "score": "0.65094745", "text": "function initTooltip() {\n\t if (!tooltip || !tooltip.node()) {\n\t // Create new tooltip div if it doesn't exist on DOM.\n\t\n\t var data = [1];\n\t tooltip = d3.select(document.body).selectAll('.nvtooltip').data(data);\n\t\n\t tooltip.enter().append('div')\n\t .attr(\"class\", \"nvtooltip \" + (classes ? classes : \"xy-tooltip\"))\n\t .attr(\"id\", id)\n\t .style(\"top\", 0).style(\"left\", 0)\n\t .style('opacity', 0)\n\t .style('position', 'fixed')\n\t .selectAll(\"div, table, td, tr\").classed(nvPointerEventsClass, true)\n\t .classed(nvPointerEventsClass, true);\n\t\n\t tooltip.exit().remove()\n\t }\n\t }", "title": "" }, { "docid": "d7103ef1d13e6ceb391a273bea7ff089", "score": "0.6502612", "text": "function man_tooltip_track(e){\n\n\n if (man_isTooltipVisible() && man_tooltip_staticFlag){\n return;\n }\n if (!e){\n e = window.event;\n }\n\n var xyScrollOffset =man_getScrollXY();\n\n // Update global position of the mouse\n\n man_tooltip_xM = e.clientX + xyScrollOffset[0];\n man_tooltip_yM = e.clientY + xyScrollOffset[1];\n\n // update position of tooltip.\n var tp= document.getElementById(tooltipID);\n tp.style.top=(man_tooltip_yM + man_tooltip_yoffset) + \"px\";\n tp.style.left=(man_tooltip_xM + man_tooltip_xoffset) + \"px\";\n if (debug){\n window.status = man_tooltip_xM + \",\" +man_tooltip_yM + \",\" +\n man_tooltip_xoffset + \",\" + man_tooltip_yoffset;\n }\n }", "title": "" }, { "docid": "b8afde65f62c759e51ddd4606ad2b3a4", "score": "0.6497402", "text": "function hoverTooltip(selection, makeText) {\n\tselection.on('mouseover', function (d) {\n tooltip.transition()\n .style('opacity', .9);\n tooltip.html(makeText(d))\n .style('left', `${d3.event.pageX - 15}px`)\n\t\t\t\t.style('top', `${d3.event.pageY - 35}px`);\n d3.select(this)\n .style('opacity', .5)\n .style('fill', 'yellow');\n })\n .on('mouseout', function (d, i) {\n d3.select(this)\n .style('opacity', 1)\n .style('fill', colors(d.timestamp));\n\t\t\ttooltip.transition()\n\t\t\t\t.style('opacity', 0)\n });\n}", "title": "" }, { "docid": "b2f504ff5d7da894461a43f9e8f09fdd", "score": "0.6489147", "text": "function initTooltip() {\n if (!tooltip || !tooltip.node()) {\n // Create new tooltip div if it doesn't exist on DOM.\n\n var data = [1];\n tooltip = d3.select(document.body).select('#'+id).data(data);\n\n tooltip.enter().append('div')\n .attr(\"class\", \"nvtooltip \" + (classes ? classes : \"xy-tooltip\"))\n .attr(\"id\", id)\n .style(\"top\", 0).style(\"left\", 0)\n .style('opacity', 0)\n .style('position', 'fixed')\n .selectAll(\"div, table, td, tr\").classed(nvPointerEventsClass, true)\n .classed(nvPointerEventsClass, true);\n\n tooltip.exit().remove()\n }\n }", "title": "" }, { "docid": "ae4bb7e0b8e124e751a0061a0b0ad89b", "score": "0.64875174", "text": "addTooltips() {\n this.tooltip = d3.select(this.el)\n .append(\"div\")\n .classed(\"d3act-tooltip\", true)\n .style(\"position\", \"absolute\")\n .style(\"z-index\", \"10\")\n .style(\"visibility\", \"hidden\")\n .style(\"border\", \"1px solid grey\")\n .style(\"border-radius\", \"3px\")\n .style(\"text-align\", \"center\")\n .style(\"padding\", \"8px 0\")\n .style(\"width\", \"100px\")\n .style(\"background-color\", \"#000\")\n .style(\"color\", \"#FFF\");\n }", "title": "" }, { "docid": "007c512fcbf65f6b8426ce51eceefba8", "score": "0.648284", "text": "function mousemove(d) { \n var matrix = this.getScreenCTM()\n .translate(+ this.getAttribute(\"cx\"), + this.getAttribute(\"cy\")); \n\n var radius = this.getAttribute(\"r\");\n\n tooltip\n .html(\"<p><strong>\" + d.count + \"</strong></p>\") \n .style(\"left\", (window.pageXOffset + matrix.e - $(\"#tooltip\").outerWidth() / 2) + \"px\")\n .style(\"top\", (window.pageYOffset + matrix.f + parseInt(radius) + 3) + \"px\")\n .style(\"opacity\", 1)\n }", "title": "" }, { "docid": "9c7bfbfc87494e11aacfdab7e1d7f232", "score": "0.6469594", "text": "function mouseMoveHandler() {\n // get the current mouse position\n const [mx, my] = mouse(this);\n const QuadtreeRadius = 100;\n // use the new diagram.find() function to find the Voronoi site\n // closest to the mouse, limited by max distance voronoiRadius\n const closest = state._voronoi.find(mx, my, QuadtreeRadius);\n\n if (closest) {\n tooltip\n .html(tooltipMarkup(closest.data.data, state))\n .transition()\n .duration(_options.animation.duration.tooltip)\n .style('left', mx + _options.tooltip.offset[0] + 'px')\n .style('top', my + _options.tooltip.offset[1] + 'px')\n .style('opacity', 1);\n\n drawCanvas(_frontContext, finalState);\n highlightNode(_frontContext, closest.data);\n } else {\n tooltip\n .transition()\n .duration(_options.animation.duration.tooltip)\n .style('opacity', 0);\n\n drawCanvas(_frontContext, finalState);\n }\n }", "title": "" }, { "docid": "f36e78c7ca7ca6bef59b9fe9878bc181", "score": "0.64512074", "text": "function showTooltip2(mouse_position, datum, index) {\n let tooltip_width = 120;\n let x_offset = -tooltip_width/2;\n let y_offset = 30;\n tooltip_state2.display = \"block\";\n tooltip_state2.left = mouse_position[0] + x_offset + 60;\n tooltip_state2.top = mouse_position[1] + y_offset + 185;\n tooltip_state2.name = datum.pl_name;\n // tooltip_state.group = datum.group;\n tooltip_state2.discovery = datum.pl_discmethod;\n tooltip_state2.distance = datum.st_dist;\n tooltip_state2.radius = datum.pl_radj;\n tooltip_state2.temp = datum.st_teff;\n tooltip_state2.inclination = datum.pl_orbincl;\n tooltip_state2.ra = datum.ra;\n tooltip_state2.dec = datum.dec;\n updateTooltip2();\n}", "title": "" }, { "docid": "3946410d876bbbb9eb295e877e64f0c3", "score": "0.6449248", "text": "function mousemove(){\n\t\tvar ary = d3.mouse(this);\n\t\tpos.attr(\"x\", ary[0] + 2)\n\t\t\t.attr(\"y\", ary[1] + 2)\n\t\t\t//.attr(\"x\", 100)\n\t\t\t//.attr(\"y\", 100)\n\t\t\t.text(Math.round(ary[0]) + \", \" + Math.round(ary[1]))\n\t}", "title": "" }, { "docid": "af192fcc4e352a5b991be73626493977", "score": "0.6434094", "text": "function showToolTip(properties, coords) {\n //event screen coordinates\n var x = coords[0];\n var y = coords[1];\n //parse the date\n var date = new Date(properties.time).toString();\n date = date.split('GMT')\n date = date[0] + \"UTC\"\n //style the tooltip and add nested html content \n d3.select(\"#tooltip\")\n .style(\"display\", \"block\")\n .style(\"top\", y + 'px')\n .style(\"left\", x + 'px')\n .html(`<h3>${properties.name}</h3>` +\n `<b>GDP: </b>${properties.gdp_md_est}</br>` +\n `<b>Population: </b>${properties.pop_est}`)\n\n}", "title": "" }, { "docid": "d9dffd21d830f451dd6711da4fb1d1bd", "score": "0.643394", "text": "function appear(data) {\n var x0 = x.invert(d3.mouse(d3.event.currentTarget)[0]),\n i = bisectXhat(data, x0),\n d0 = data[i - 1],\n d1 = data[i],\n d = x0 - d0.xhat > d1.xhat - x0 ? d1 : d0;\n\n tool_tip.show(d);\n }", "title": "" }, { "docid": "1f84bc36a3c326a3ad44fdb646cb998e", "score": "0.64269847", "text": "function showToolTip(d, i) {\n tooltip.style({\n height: \"150px\",\n width: \"200px\",\n opacity: 0.9\n });\n var circle = d3.event.target;\n var tippadding = 5,\n tipsize = {\n dx: parseInt(tooltip.style(\"width\")),\n dy: parseInt(tooltip.style(\"height\"))\n };\n\n tooltip\n .style({\n top: d3.event.pageY - tipsize.dy - 5 + \"px\",\n left: d3.event.pageX - tipsize.dx - 5 + \"px\"\n })\n .html(\n \"<span><b>\" +\n d.Name +\n \": \" +\n d.Nationality +\n \"<br/>\" +\n \"Place: \" +\n d.Place +\n \" | Time: \" +\n d.Time +\n \"<br/>\" +\n \"Year: \" +\n d.Year +\n \"<br/><br/>\" +\n \"Doping: \" +\n d.Doping +\n \"</b></span>\"\n );\n }", "title": "" }, { "docid": "19204ecb28f9c3349103090636070c1c", "score": "0.6412685", "text": "onMouseEnter(evt) {\n\t\tconst coordinates = evt.target.getBoundingClientRect();\n\t\tthis.setState({\n\t\t\ttoolTip: {\n\t\t\t\tdisplay: 'block',\n\t\t\t\tleft: (parseInt(coordinates.left)+parseInt(coordinates.right))/2-20,\n\t\t\t\ttop: parseInt(coordinates.top) + 20,\n\t\t\t},\n\t\t});\n\t}", "title": "" }, { "docid": "db2afd60db68a56353b2c3887fee6715", "score": "0.6411857", "text": "function toolTip(selection) {\n\n // add tooltip (svg circle element) when mouse enters label or slice\n selection.on('mouseenter', function (data) {\n\n svg.append('text')\n .attr('class', 'toolCircle')\n .attr('dy', -15) // hard-coded. can adjust this to adjust text vertical alignment in tooltip\n .html(toolTipHTML(data)) // add text to the circle.\n .style('font-size', '.9em')\n .style('text-anchor', 'middle'); // centres text in tooltip\n\n svg.append('circle')\n .attr('class', 'toolCircle')\n .attr('r', radius * 0.55) // radius of tooltip circle\n .style('fill', colour(data.data[category])) // colour based on category mouse is over\n .style('fill-opacity', 0.35);\n\n });\n\n // remove the tooltip when mouse leaves the slice/label\n selection.on('mouseout', function () {\n d3.selectAll('.toolCircle').remove();\n });\n }", "title": "" }, { "docid": "747a2ee45dea2d2e403c517dd8b8fa55", "score": "0.6398472", "text": "function tooltip(selection, scale){\n return selection\n .on('mouseover', function(d) {\n let posX = sentScale(d.sentiment)\n let posY = scale(d.speaker)\n\n d3.select('.tooltip')\n .style('left', posX - ttwidth/2 + 500)\n .style('top', posY+15)\n .style('width', ttwidth)\n .classed('hidden', false)\n .text(`SEASON: ${d.season}`)\n\n d3.select(this)\n .transition().duration(400)\n .attr('r', 14)\n .attr('stroke', 'black')\n .attr('stroke-width', '2')\n })\n .on('mouseout', function(d){\n d3.select('.tooltip')\n .classed('hidden', true)\n d3.select(this)\n .transition()\n .attr('r', 9)\n .attr('stroke-width', '0')\n })\n }", "title": "" }, { "docid": "0f3b740d880c646b5baf75ef1654ec2c", "score": "0.63861555", "text": "function mouseOver_topgenre(d) {\n d3.select(\"#tooltip\")\n .attr(\"class\", \"toolTip\")\n .transition().duration(300)\n .style(\"opacity\", 0.8)\n .style(\"left\", (d3.event.pageX - 345) + \"px\")\n .style(\"top\", (d3.event.pageY - 120) + \"px\");\n\n var top_genre = \"\"\n if (d.properties.value) {\n d3.select(this).style(\"opacity\", 1)\n top_genre = GENRES[d.properties.value][\"label\"];\n\n d3.select(\"#tooltip\").html(\n \"<h4>\" + d.properties.name + \" (\" + d.properties.abbr + \")\" + \"</h4>\" +\n \"<table><tr><td> Top Genre:</td><td class='titleCase'>\" + top_genre + \"</td></tr>\" +\n \"<tr><th class='center'>Genre</th><th class='center'>No. of shows</th></tr>\" +\n \"<tr><td class='left'><div class='legend-color pop'></div>Pop</td><td>\" + d.properties.num.pop + \"</td></tr>\" +\n \"<tr><td class='left'><div class='legend-color rock'></div>Rock</td><td>\" + d.properties.num.rock + \"</td></tr>\" +\n \"<tr><td class='left'><div class='legend-color hip-hop'></div>Hip Hop</td><td>\" + d.properties.num.hip_hop + \"</td></tr>\" +\n \"<tr><td class='left'><div class='legend-color rnb'></div>R&B</td><td>\" + d.properties.num.rnb + \"</td></tr>\" +\n \"<tr><td class='left'><div class='legend-color classical_jazz'></div>Classical & Jazz</td><td>\" + d.properties.num.classical_and_jazz + \"</td></tr>\" +\n \"<tr><td class='left'><div class='legend-color electronic'></div>Electronic</td><td>\" + d.properties.num.electronic + \"</td></tr>\" +\n \"<tr><td class='left'><div class='legend-color country_folk'></div>Country & Folk</td><td>\" + d.properties.num.country_and_folk + \"</td></tr>\" +\n \"</table>\" +\n \"<small>(click to zoom)</small>\")\n\n } else {\n d3.select(\"#tooltip\").html(\n \"<h4>\" + d.properties.name + \" (\" + d.properties.abbr + \")\" + \"</h4>\" +\n \"<table><tr><td> No upcoming shows </td></tr></table>\");\n }\n }", "title": "" }, { "docid": "307108058b7b4ffb74a4b468f56aaa80", "score": "0.63734055", "text": "function tipMouseOut() {\n tooltip\n .transition()\n .duration(500) // ms\n .style(\"opacity\", 0); // don't care about position!\n //d3.select(this).attr(\"r\", 5);\n }", "title": "" }, { "docid": "2f2e1d080c1dabae002bf12a2883aa2b", "score": "0.63715976", "text": "function mouseMoveHandler() {\n // get the current mouse position\n const [mx, my] = mouse(this);\n const QuadtreeRadius = 100;\n // use the new diagram.find() function to find the Voronoi site\n // closest to the mouse, limited by max distance voronoiRadius\n const closest = state._voronoi.find(mx, my, QuadtreeRadius);\n if (closest) {\n closest.data.data[getMetric(state).accessor] =\n closest.data.data[closest.data.key];\n\n tooltip\n .html(tooltipMarkup(closest.data.data, state))\n .transition()\n .duration(_options.animation.duration.tooltip)\n .style('left', mx + _options.tooltip.offset[0] + 'px')\n .style('top', my + _options.tooltip.offset[1] + 'px')\n .style('opacity', 1);\n\n highlightLine(_frontContext, res, _options, closest.data);\n highlightNode(\n _frontContext,\n _options,\n closest.data.c,\n closest[0],\n closest[1]\n );\n } else {\n tooltip\n .transition()\n .duration(_options.animation.duration.tooltip)\n .style('opacity', 0);\n\n drawCanvas(_frontContext, res, _options);\n }\n }", "title": "" }, { "docid": "e5cc990c647d58eb441df37ee03c0062", "score": "0.6368691", "text": "function mousemove(){\n\t\tvar ary = d3.mouse(this);\n\t\tpos\n\t\t\t.attr(\"x\", ary[0] + 10)\n\t\t\t.attr(\"y\", ary[1] + 10)\n\t\t\t// .attr(\"x\", 20)\n\t\t\t// .attr(\"y\", 20)\n\t\t\t.text(Math.round(ary[0]) + \", \" + Math.round(ary[1]))\n\t}", "title": "" }, { "docid": "ca519e994cfa5fe8a664140a57f55284", "score": "0.6362287", "text": "function mouseover(d) {\n d3.select(this)\n .attr('opacity', 0.5)\n document.getElementById('tip').innerHTML = \"<strong>Country: </strong> \\\n <span class='tiptext'>\" + d.properties.name + '<br></span> \\\n ' + \"<strong>HPI: </strong><span class='tiptext'>\" + countryHpi[d.properties.name] +\n '</span>'\n var xPos = parseFloat(d3.event.pageX) + 10;\n var yPos = parseFloat(d3.event.pageY) - 10;\n d3.select('#tip')\n .style('left', xPos + 'px')\n .style('top', yPos + 'px')\n d3.select('#tip').classed('hidden', false)\n }", "title": "" }, { "docid": "6e998647243b581f2739a5a058276c39", "score": "0.6356152", "text": "function mouseOver(data) {\n let nombre = data.properties.name;\n let score = data.properties.score;\n let rank = data.properties.rank;\n if (data.properties.score) {\n tooltip.html(\"<big><b><ins>\" + nombre + \"</ins></b></big>\"\n + \"<br>Score: \" + score\n + \"<br>Rank: \" + rank);\n } else {\n tooltip.html(\"<big><b><ins>\" + nombre + \"</ins></b></big>\"\n + \"<br>Score: NA <br>Rank: NA\");\n }\n\n tooltip.style(\"top\", (d3.event.pageY + 10) + \"px\")\n tooltip.style(\"left\", (d3.event.pageX - 10) + \"px\")\n tooltip.style(\"background-color\", \"white\");\n tooltip.style(\"visibility\", \"visible\");\n d3.select(this).style(\"stroke\", \"red\");\n}", "title": "" }, { "docid": "7ca39e971f4c6786de316ac113a63776", "score": "0.635503", "text": "function mouseOver_genre(d) {\n d3.select(this).style(\"opacity\", 1)\n d3.select(\"#tooltip\")\n .attr(\"class\", \"toolTip\")\n .transition().duration(300)\n .style(\"opacity\", 0.8)\n .style(\"left\", (d3.event.pageX - 345) + \"px\")\n .style(\"top\", (d3.event.pageY - 120) + \"px\");\n\n if (d.properties.value) {\n d3.select(\"#tooltip\").html(\n \"<h4 class='state-head'>\" + d.properties.name + \" (\" + d.properties.abbr + \")</h4>\" +\n \"<table><tr><th>Rank:</th><td>\" + (d.properties.value) + \" out of \"+ max + \"</td></tr>\" +\n \"<th>Number of upcoming \" + GENRES[genre].label + \" shows</th><td>\" + d.properties.num + \"</td></table>\" +\n \"<small>(click to zoom)</small>\")\n } else {\n d3.select(\"#tooltip\").html(\n \"<h4>\" + d.properties.name + \" (\" + d.properties.abbr + \")\" + \"</h4>\" +\n \"<table><tr><td> No upcoming shows </td></tr></table>\");\n }\n }", "title": "" }, { "docid": "8885cc9e66178cd3f8b393fe1ce3c9b0", "score": "0.6349583", "text": "function nvtooltip() {\n if (!enabled) return;\n if (!dataSeriesExists(data)) return;\n\n convertViewBoxRatio();\n\n var left = position.left;\n var top = (fixedTop != null) ? fixedTop : position.top;\n var container = getTooltipContainer(contentGenerator(data));\n tooltipElem = container;\n if (chartContainer) {\n var svgComp = chartContainer.getElementsByTagName(\"svg\")[0];\n var boundRect = (svgComp) ? svgComp.getBoundingClientRect() : chartContainer.getBoundingClientRect();\n var svgOffset = {left:0,top:0};\n if (svgComp) {\n var svgBound = svgComp.getBoundingClientRect();\n var chartBound = chartContainer.getBoundingClientRect();\n var svgBoundTop = svgBound.top;\n \n //Defensive code. Sometimes, svgBoundTop can be a really negative\n // number, like -134254. That's a bug. \n // If such a number is found, use zero instead. FireFox bug only\n if (svgBoundTop < 0) {\n var containerBound = chartContainer.getBoundingClientRect();\n svgBoundTop = (Math.abs(svgBoundTop) > containerBound.height) ? 0 : svgBoundTop;\n } \n svgOffset.top = Math.abs(svgBoundTop - chartBound.top);\n svgOffset.left = Math.abs(svgBound.left - chartBound.left);\n }\n //If the parent container is an overflow <div> with scrollbars, subtract the scroll offsets.\n //You need to also add any offset between the <svg> element and its containing <div>\n //Finally, add any offset of the containing <div> on the whole page.\n left += chartContainer.offsetLeft + svgOffset.left - 2*chartContainer.scrollLeft;\n top += chartContainer.offsetTop + svgOffset.top - 2*chartContainer.scrollTop;\n }\n\n if (snapDistance && snapDistance > 0) {\n top = Math.floor(top/snapDistance) * snapDistance;\n }\n\n nv.tooltip.calcTooltipPosition([left,top], gravity, distance, container);\n return nvtooltip;\n }", "title": "" }, { "docid": "8885cc9e66178cd3f8b393fe1ce3c9b0", "score": "0.6349583", "text": "function nvtooltip() {\n if (!enabled) return;\n if (!dataSeriesExists(data)) return;\n\n convertViewBoxRatio();\n\n var left = position.left;\n var top = (fixedTop != null) ? fixedTop : position.top;\n var container = getTooltipContainer(contentGenerator(data));\n tooltipElem = container;\n if (chartContainer) {\n var svgComp = chartContainer.getElementsByTagName(\"svg\")[0];\n var boundRect = (svgComp) ? svgComp.getBoundingClientRect() : chartContainer.getBoundingClientRect();\n var svgOffset = {left:0,top:0};\n if (svgComp) {\n var svgBound = svgComp.getBoundingClientRect();\n var chartBound = chartContainer.getBoundingClientRect();\n var svgBoundTop = svgBound.top;\n \n //Defensive code. Sometimes, svgBoundTop can be a really negative\n // number, like -134254. That's a bug. \n // If such a number is found, use zero instead. FireFox bug only\n if (svgBoundTop < 0) {\n var containerBound = chartContainer.getBoundingClientRect();\n svgBoundTop = (Math.abs(svgBoundTop) > containerBound.height) ? 0 : svgBoundTop;\n } \n svgOffset.top = Math.abs(svgBoundTop - chartBound.top);\n svgOffset.left = Math.abs(svgBound.left - chartBound.left);\n }\n //If the parent container is an overflow <div> with scrollbars, subtract the scroll offsets.\n //You need to also add any offset between the <svg> element and its containing <div>\n //Finally, add any offset of the containing <div> on the whole page.\n left += chartContainer.offsetLeft + svgOffset.left - 2*chartContainer.scrollLeft;\n top += chartContainer.offsetTop + svgOffset.top - 2*chartContainer.scrollTop;\n }\n\n if (snapDistance && snapDistance > 0) {\n top = Math.floor(top/snapDistance) * snapDistance;\n }\n\n nv.tooltip.calcTooltipPosition([left,top], gravity, distance, container);\n return nvtooltip;\n }", "title": "" }, { "docid": "8885cc9e66178cd3f8b393fe1ce3c9b0", "score": "0.6349583", "text": "function nvtooltip() {\n if (!enabled) return;\n if (!dataSeriesExists(data)) return;\n\n convertViewBoxRatio();\n\n var left = position.left;\n var top = (fixedTop != null) ? fixedTop : position.top;\n var container = getTooltipContainer(contentGenerator(data));\n tooltipElem = container;\n if (chartContainer) {\n var svgComp = chartContainer.getElementsByTagName(\"svg\")[0];\n var boundRect = (svgComp) ? svgComp.getBoundingClientRect() : chartContainer.getBoundingClientRect();\n var svgOffset = {left:0,top:0};\n if (svgComp) {\n var svgBound = svgComp.getBoundingClientRect();\n var chartBound = chartContainer.getBoundingClientRect();\n var svgBoundTop = svgBound.top;\n \n //Defensive code. Sometimes, svgBoundTop can be a really negative\n // number, like -134254. That's a bug. \n // If such a number is found, use zero instead. FireFox bug only\n if (svgBoundTop < 0) {\n var containerBound = chartContainer.getBoundingClientRect();\n svgBoundTop = (Math.abs(svgBoundTop) > containerBound.height) ? 0 : svgBoundTop;\n } \n svgOffset.top = Math.abs(svgBoundTop - chartBound.top);\n svgOffset.left = Math.abs(svgBound.left - chartBound.left);\n }\n //If the parent container is an overflow <div> with scrollbars, subtract the scroll offsets.\n //You need to also add any offset between the <svg> element and its containing <div>\n //Finally, add any offset of the containing <div> on the whole page.\n left += chartContainer.offsetLeft + svgOffset.left - 2*chartContainer.scrollLeft;\n top += chartContainer.offsetTop + svgOffset.top - 2*chartContainer.scrollTop;\n }\n\n if (snapDistance && snapDistance > 0) {\n top = Math.floor(top/snapDistance) * snapDistance;\n }\n\n nv.tooltip.calcTooltipPosition([left,top], gravity, distance, container);\n return nvtooltip;\n }", "title": "" }, { "docid": "8885cc9e66178cd3f8b393fe1ce3c9b0", "score": "0.6349583", "text": "function nvtooltip() {\n if (!enabled) return;\n if (!dataSeriesExists(data)) return;\n\n convertViewBoxRatio();\n\n var left = position.left;\n var top = (fixedTop != null) ? fixedTop : position.top;\n var container = getTooltipContainer(contentGenerator(data));\n tooltipElem = container;\n if (chartContainer) {\n var svgComp = chartContainer.getElementsByTagName(\"svg\")[0];\n var boundRect = (svgComp) ? svgComp.getBoundingClientRect() : chartContainer.getBoundingClientRect();\n var svgOffset = {left:0,top:0};\n if (svgComp) {\n var svgBound = svgComp.getBoundingClientRect();\n var chartBound = chartContainer.getBoundingClientRect();\n var svgBoundTop = svgBound.top;\n \n //Defensive code. Sometimes, svgBoundTop can be a really negative\n // number, like -134254. That's a bug. \n // If such a number is found, use zero instead. FireFox bug only\n if (svgBoundTop < 0) {\n var containerBound = chartContainer.getBoundingClientRect();\n svgBoundTop = (Math.abs(svgBoundTop) > containerBound.height) ? 0 : svgBoundTop;\n } \n svgOffset.top = Math.abs(svgBoundTop - chartBound.top);\n svgOffset.left = Math.abs(svgBound.left - chartBound.left);\n }\n //If the parent container is an overflow <div> with scrollbars, subtract the scroll offsets.\n //You need to also add any offset between the <svg> element and its containing <div>\n //Finally, add any offset of the containing <div> on the whole page.\n left += chartContainer.offsetLeft + svgOffset.left - 2*chartContainer.scrollLeft;\n top += chartContainer.offsetTop + svgOffset.top - 2*chartContainer.scrollTop;\n }\n\n if (snapDistance && snapDistance > 0) {\n top = Math.floor(top/snapDistance) * snapDistance;\n }\n\n nv.tooltip.calcTooltipPosition([left,top], gravity, distance, container);\n return nvtooltip;\n }", "title": "" }, { "docid": "008f16ae6d2aa055747792ba0e3144c0", "score": "0.63306814", "text": "function updateToolTip(chosenYAxis,chosenXAxis, StatecirclesGroup, StateTextGroup) {\nvar toolTip = d3.tip()\n .attr('class','d3-tip')\n // .offset([80, -60])\n .html( d => {\n \tif(chosenXAxis === \"poverty\")\n\t return (`${d.state}<br>${chosenYAxis}:${d[chosenYAxis]}% \n\t \t\t<br>${chosenXAxis}:${d[chosenXAxis]}%`)\n \telse if (chosenXAxis === \"income\")\n\t return (`${d.state}<br>${chosenYAxis}:${d[chosenYAxis]}% \n\t \t\t<br>${chosenXAxis}:$${d[chosenXAxis]}`)\n\t else\n\t \treturn (`${d.state}<br>${chosenYAxis}:${d[chosenYAxis]}% \n\t \t\t<br>${chosenXAxis}:${d[chosenXAxis]}`)\n\t });\n\n \n\tStatecirclesGroup.call(toolTip);\n\tStatecirclesGroup.on('mouseover', toolTip.show).on('mouseout', toolTip.hide);\n\n\td3.selectAll('.StateTextGroup').call(toolTip);\n\td3.selectAll('.StateTextGroup').on('mouseover', toolTip.show).on('mouseout', toolTip.hide);\n\n\treturn StatecirclesGroup;\n\treturn StateTextGroup;\n}", "title": "" }, { "docid": "5a97aa44c1e63e6c8e043c0f9bdb2217", "score": "0.6327731", "text": "function toolTip(selection) {\n\n // add tooltip (svg circle element) when mouse enters label or slice\n selection.on('mouseenter', function (d) {\n\n svg.append('text')\n .attr('class', 'toolCircle')\n .attr('dy', -15) // hard-coded. can adjust this to adjust text vertical alignment in tooltip\n .html(toolTipHTML(d)) // add text to the circle.\n .style('font-size', '.9em')\n .style('text-anchor', 'middle'); // centres text in tooltip\n\n svg.append('circle')\n .attr('class', 'toolCircle')\n .attr('r', radius * 0.55) // radius of tooltip circle\n .style('fill', colour(d.data['status'])) // colour based on category mouse is over\n .style('fill-opacity', 0.35);\n\n });\n\n // remove the tooltip when mouse leaves the slice/label\n selection.on('mouseout', function () {\n d3.selectAll('.toolCircle').remove();\n });\n }", "title": "" }, { "docid": "bc9b8814bcdb7f7692d2e6cc67b65cba", "score": "0.6321717", "text": "function nvtooltip() {\n if (!enabled) return;\n if (!dataSeriesExists(data)) return;\n\n convertViewBoxRatio();\n\n var left = position.left;\n var top = (fixedTop != null) ? fixedTop : position.top;\n var container = getTooltipContainer(contentGenerator(data));\n tooltipElem = container;\n if (chartContainer) {\n var svgComp = chartContainer.getElementsByTagName(\"svg\")[0];\n var boundRect = (svgComp) ? svgComp.getBoundingClientRect() : chartContainer.getBoundingClientRect();\n var svgOffset = {left:0,top:0};\n if (svgComp) {\n var svgBound = svgComp.getBoundingClientRect();\n var chartBound = chartContainer.getBoundingClientRect();\n var svgBoundTop = svgBound.top;\n\n //Defensive code. Sometimes, svgBoundTop can be a really negative\n // number, like -134254. That's a bug.\n // If such a number is found, use zero instead. FireFox bug only\n if (svgBoundTop < 0) {\n var containerBound = chartContainer.getBoundingClientRect();\n svgBoundTop = (Math.abs(svgBoundTop) > containerBound.height) ? 0 : svgBoundTop;\n }\n svgOffset.top = Math.abs(svgBoundTop - chartBound.top);\n svgOffset.left = Math.abs(svgBound.left - chartBound.left);\n }\n //If the parent container is an overflow <div> with scrollbars, subtract the scroll offsets.\n //You need to also add any offset between the <svg> element and its containing <div>\n //Finally, add any offset of the containing <div> on the whole page.\n left += chartContainer.offsetLeft + svgOffset.left - 2*chartContainer.scrollLeft;\n top += chartContainer.offsetTop + svgOffset.top - 2*chartContainer.scrollTop;\n }\n\n if (snapDistance && snapDistance > 0) {\n top = Math.floor(top/snapDistance) * snapDistance;\n }\n\n nv.tooltip.calcTooltipPosition([left,top], gravity, distance, container);\n return nvtooltip;\n }", "title": "" }, { "docid": "bc9b8814bcdb7f7692d2e6cc67b65cba", "score": "0.6321717", "text": "function nvtooltip() {\n if (!enabled) return;\n if (!dataSeriesExists(data)) return;\n\n convertViewBoxRatio();\n\n var left = position.left;\n var top = (fixedTop != null) ? fixedTop : position.top;\n var container = getTooltipContainer(contentGenerator(data));\n tooltipElem = container;\n if (chartContainer) {\n var svgComp = chartContainer.getElementsByTagName(\"svg\")[0];\n var boundRect = (svgComp) ? svgComp.getBoundingClientRect() : chartContainer.getBoundingClientRect();\n var svgOffset = {left:0,top:0};\n if (svgComp) {\n var svgBound = svgComp.getBoundingClientRect();\n var chartBound = chartContainer.getBoundingClientRect();\n var svgBoundTop = svgBound.top;\n\n //Defensive code. Sometimes, svgBoundTop can be a really negative\n // number, like -134254. That's a bug.\n // If such a number is found, use zero instead. FireFox bug only\n if (svgBoundTop < 0) {\n var containerBound = chartContainer.getBoundingClientRect();\n svgBoundTop = (Math.abs(svgBoundTop) > containerBound.height) ? 0 : svgBoundTop;\n }\n svgOffset.top = Math.abs(svgBoundTop - chartBound.top);\n svgOffset.left = Math.abs(svgBound.left - chartBound.left);\n }\n //If the parent container is an overflow <div> with scrollbars, subtract the scroll offsets.\n //You need to also add any offset between the <svg> element and its containing <div>\n //Finally, add any offset of the containing <div> on the whole page.\n left += chartContainer.offsetLeft + svgOffset.left - 2*chartContainer.scrollLeft;\n top += chartContainer.offsetTop + svgOffset.top - 2*chartContainer.scrollTop;\n }\n\n if (snapDistance && snapDistance > 0) {\n top = Math.floor(top/snapDistance) * snapDistance;\n }\n\n nv.tooltip.calcTooltipPosition([left,top], gravity, distance, container);\n return nvtooltip;\n }", "title": "" }, { "docid": "6afb6c9ae57543fa62dac2b3229419a6", "score": "0.63130623", "text": "function determineAlignment(tooltip,size){var model=tooltip._model;var chart=tooltip._chart;var chartArea=tooltip._chart.chartArea;var xAlign='center';var yAlign='center';if(model.y<size.height){yAlign='top';}else if(model.y>chart.height-size.height){yAlign='bottom';}var lf,rf;// functions to determine left, right alignment\nvar olf,orf;// functions to determine if left/right alignment causes tooltip to go outside chart\nvar yf;// function to get the y alignment if the tooltip goes outside of the left or right edges\nvar midX=(chartArea.left+chartArea.right)/2;var midY=(chartArea.top+chartArea.bottom)/2;if(yAlign==='center'){lf=function lf(x){return x<=midX;};rf=function rf(x){return x>midX;};}else{lf=function lf(x){return x<=size.width/2;};rf=function rf(x){return x>=chart.width-size.width/2;};}olf=function olf(x){return x+size.width+model.caretSize+model.caretPadding>chart.width;};orf=function orf(x){return x-size.width-model.caretSize-model.caretPadding<0;};yf=function yf(y){return y<=midY?'top':'bottom';};if(lf(model.x)){xAlign='left';// Is tooltip too wide and goes over the right side of the chart.?\nif(olf(model.x)){xAlign='center';yAlign=yf(model.y);}}else if(rf(model.x)){xAlign='right';// Is tooltip too wide and goes outside left edge of canvas?\nif(orf(model.x)){xAlign='center';yAlign=yf(model.y);}}var opts=tooltip._options;return{xAlign:opts.xAlign?opts.xAlign:xAlign,yAlign:opts.yAlign?opts.yAlign:yAlign};}", "title": "" }, { "docid": "9d82e2569c6307d8fd1745428209858c", "score": "0.6307933", "text": "function determineAlignment(tooltip,size){var model=tooltip._model;var chart=tooltip._chart;var chartArea=tooltip._chart.chartArea;var xAlign='center';var yAlign='center';if(model.y<size.height){yAlign='top';}else if(model.y>chart.height-size.height){yAlign='bottom';}var lf,rf;// functions to determine left, right alignment\nvar olf,orf;// functions to determine if left/right alignment causes tooltip to go outside chart\nvar yf;// function to get the y alignment if the tooltip goes outside of the left or right edges\nvar midX=(chartArea.left+chartArea.right)/2;var midY=(chartArea.top+chartArea.bottom)/2;if(yAlign==='center'){lf=function(x){return x<=midX;};rf=function(x){return x>midX;};}else{lf=function(x){return x<=size.width/2;};rf=function(x){return x>=chart.width-size.width/2;};}olf=function(x){return x+size.width+model.caretSize+model.caretPadding>chart.width;};orf=function(x){return x-size.width-model.caretSize-model.caretPadding<0;};yf=function(y){return y<=midY?'top':'bottom';};if(lf(model.x)){xAlign='left';// Is tooltip too wide and goes over the right side of the chart.?\nif(olf(model.x)){xAlign='center';yAlign=yf(model.y);}}else if(rf(model.x)){xAlign='right';// Is tooltip too wide and goes outside left edge of canvas?\nif(orf(model.x)){xAlign='center';yAlign=yf(model.y);}}var opts=tooltip._options;return{xAlign:opts.xAlign?opts.xAlign:xAlign,yAlign:opts.yAlign?opts.yAlign:yAlign};}", "title": "" }, { "docid": "c208a41573addba0dfa05b8b4e938abe", "score": "0.62966824", "text": "updateTooltip () {\n // Make sure that the tooltip has been initialized and that it has a valid country connected to it\n if (typeof this.tooltip !== 'undefined' && typeof this.tooltipCurrentID !== 'undefined') {\n var data = this.ctrl.data[this.tooltipCurrentID.toLowerCase()];\n var html;\n\n // Make sure that the country has data\n if (typeof data !== 'undefined') {\n var curr = data.cur;\n var commonMinMax;\n\n // If a timelapse is in progress, get the value from that instead\n if (this.ctrl.timelapseHandler.isAnimating) {\n curr = data.all[this.ctrl.timelapseHandler.getCurrent()];\n }\n\n // If the option individualMaxValue is false, find a common min and max value\n if (!this.ctrl.panel.individualMaxValue) {\n commonMinMax = this.findCommonMinMaxValue();\n }\n\n html = '<div class = \\'d3tooltip-title\\'>' + this.tooltipCurrentNAME + '</div>';\n html += '<div class = \\'d3tooltip-info\\'><div class = \\'d3tooltip-left\\'>Percent: </div><div class = \\'d3tooltip-right\\'>' + Math.floor(this.getCountryPercentage(this.tooltipCurrentID, commonMinMax)) + '%</div><div class = \\'d3tooltip-clear\\'></div></div>';\n html += '<div class = \\'d3tooltip-info\\'><div class = \\'d3tooltip-left\\'>Current: </div><div class = \\'d3tooltip-right\\'>' + curr + '</div><div class = \\'d3tooltip-clear\\'></div></div>';\n\n if (this.ctrl.panel.individualMaxValue) {\n html += '<div class = \\'d3tooltip-info\\'><div class = \\'d3tooltip-left\\'>Min: </div><div class = \\'d3tooltip-right\\'>' + data.min + '</div><div class = \\'d3tooltip-clear\\'></div></div>';\n html += '<div class = \\'d3tooltip-info\\'><div class = \\'d3tooltip-left\\'>Max: </div><div class = \\'d3tooltip-right\\'>' + data.max + '</div><div class = \\'d3tooltip-clear\\'></div></div>';\n html += '<div class = \\'d3tooltip-info\\'><div class = \\'d3tooltip-left\\'>Trend: </div><div class = \\'d3tooltip-right\\'>' + data.trend + '%</div><div class = \\'d3tooltip-clear\\'></div></div>';\n } else {\n html += '<div class = \\'d3tooltip-info\\'><div class = \\'d3tooltip-left\\'>Common min: </div><div class = \\'d3tooltip-right\\'>' + commonMinMax.min + '</div><div class = \\'d3tooltip-clear\\'></div></div>';\n html += '<div class = \\'d3tooltip-info\\'><div class = \\'d3tooltip-left\\'>Common max: </div><div class = \\'d3tooltip-right\\'>' + commonMinMax.max + '</div><div class = \\'d3tooltip-clear\\'></div></div>';\n }\n\n } else {\n html = '<div class = \\'d3tooltip-title\\'>' + this.tooltipCurrentNAME + '</div>';\n html += '<div class = \\'d3tooltip-undefined\\'>No available data</div>';\n }\n\n this.tooltip.html(html);\n }\n }", "title": "" }, { "docid": "c4d59174673024bf85f502c8645f1fdf", "score": "0.6294766", "text": "function showCoordinates() {\n // Get HTML element to display mouse position in plot\n var hoverInfo = $(\"#hover-info\");\n hoverInfo.text(\"D: | X: | S: | QX: \");\n\n // Get margins\n var xAxis = plotDiv._fullLayout.xaxis;\n var yAxis1 = plotDiv._fullLayout.yaxis;\n var yAxis2 = plotDiv._fullLayout.yaxis2;\n var yAxis3 = plotDiv._fullLayout.yaxis3;\n var l = plotDiv._fullLayout.margin.l;\n var t = plotDiv._fullLayout.margin.t;\n\n // Make array to store axis coordinates for later display\n\n plotDiv.addEventListener(\"mousemove\", function (evt) {\n\n var xAxisCoord = xAxis.p2c(evt.offsetX - l);\n var yAxis1Coord = yAxis1.p2c(evt.offsetY - t);\n var yAxis2Coord = yAxis2.p2c(evt.offsetY - t);\n var yAxis3Coord = yAxis3.p2c(evt.offsetY - t);\n\n xAxisCoord = xAxisCoord.toFixed(3);\n yAxis1Coord = yAxis1Coord.toFixed(3);\n yAxis2Coord = yAxis2Coord.toFixed(3);\n yAxis3Coord = yAxis3Coord.toFixed(3);\n\n if (xAxisCoord >= 0 && yAxis1Coord >= 0 && yAxis2Coord >= 0 && yAxis3Coord >= 0) {\n hoverInfo.text(\n \"D: \" + xAxisCoord + \" | X: \" + yAxis1Coord + \" | S: \" + yAxis2Coord + \" | QX: \" + yAxis3Coord\n );\n }\n });\n\n plotDiv.addEventListener(\"mouseout\", function (evt) {\n hoverInfo.text(\"D: | X: | S: | QX: \");\n });\n}", "title": "" }, { "docid": "f7d22aee2e5017272fce9932b1a89578", "score": "0.62855303", "text": "function updateToolTip(someX, someY, circlesGroup) {\n\n // let label;\n \n if (someX === \"poverty\") {\n labelX = \"Poverty (%): \";\n }\n else {\n labelX = \"Median Age: \";\n }\n if (someY === 'healthcare') {\n labelY = \"Lacking Healthcare (%): \"\n }\n else {\n labelY = \"Smokes (%): \"\n }\n\n let toolTip = d3.tip()\n .attr(\"class\", \"tooltip\")\n .offset([20, -60])\n .html(function(d) {\n return (`<h5><strong>${d.state}<strong><h5><hr><h6>${labelX}${d[someX]}<h6>${labelY} ${d[someY]}<h6>`);\n });\n // <hr>${label} ${d[someX]}\n \n circlesGroup.call(toolTip);\n // do i need 'this'\n circlesGroup.on(\"mouseover\", function(data) {\n toolTip.show(data)\n .style(\"display\", \"block\")\n .style(\"left\", d3.event.pageX + 'px')\n .style(\"top\", d3.event.pageY + \"px\");\n })\n // onmouseout event\n .on(\"mouseout\", function(data) {\n toolTip.hide(data);\n });\n \n return circlesGroup;\n }", "title": "" }, { "docid": "0a069dc4a07d466224063c64823dc451", "score": "0.6278878", "text": "function updateToolTip(chooseX, chooseY, circlesGroup) {\n\n let label = \"\";\n \n if (chooseX == \"poverty\") {\n label = \"In Poverty(%)\";\n }else if(chooseX == \"age\"){\n label = \"Age (Median)\"\n }else if(chooseX == \"income\"){\n label = \"Household Income (Median)\";\n }else{\n label = \"X Error\"\n } \n\n if (chooseY == \"healthcare\") {\n label = label + \" vs Lacks Healthcare (%)\";\n } \n else if(chooseY == \"obesity\"){\n label = label + \" vs Obesity (%)\"\n }\n else if(chooseY == \"smokes\"){\n label = label + \" vs Smokes (%)\";\n }else{\n label = label + \"Y Error\"\n }\n \n // console.log(label)\n let toolTip = d3.tip()\n .attr(\"class\", \"tooltip\")\n .offset([80, -60])\n .html(function(d) {\n console.log(d.abbr,d[chooseX],d[chooseY]) \n return (`${d.state}<br>${label} <br> ${chooseX}: ${d[chooseX]} <br> ${chooseY}: ${d[chooseY]}`);\n });\n \n circlesGroup.call(toolTip)\n\n circlesGroup.selectAll(\"circle\")\n .on(\"mouseover\", data => toolTip.show(data))\n .on(\"mouseout\", data => toolTip.hide(data));\n // circlesGroup.selectAll(\"text\").on(\"mouseover\", function(data) {\n // toolTip.show(data);\n // }).on(\"mouseout\", function(data) {\n // toolTip.hide(data);\n // });\n \n return circlesGroup;\n }", "title": "" }, { "docid": "c854adc688f9a8b3b97c2dc616293dd8", "score": "0.62771416", "text": "onMouseOverEventHandler(context, self, game, tooltip) {\r\n if (!d3.select(context).classed(\"selected\")) {\r\n // Make the circle swell when the mouse is on it\r\n d3.select(context)\r\n .transition()\r\n .duration(500)\r\n .attr(\"r\", 2 * self.radius)\r\n .style(\"cursor\", \"pointer\");\r\n\r\n // Set tooltip transition\r\n tooltip.transition()\r\n .duration(400)\r\n .style(\"opacity\", 0.8)\r\n .style(\"width\", \"100px\");\r\n\r\n // Set tooltip's text\r\n tooltip.html(game.Name);\r\n self.setTooltipPosition(self, tooltip);\r\n }\r\n }", "title": "" }, { "docid": "c8bd6adb5f1f40691b7b52c7c32a990c", "score": "0.62741166", "text": "function tooltipin(d){\n var id=getiso(d);\n var quota = getquota(id);\n if (quota>0) {\n var online = getsignatures(id,\"online\");\n var paper = getsignatures(id,\"paper\");\n var percentage = Math.floor(((online + paper) / quota) * 100);\n var title = d.properties.name + \" \"+ percentage+ \"%\";\n var body= \n\"<ul><li>Total: \" + online +\n\"</li><li>Threshold: \" + quota + \"</li><ul>\";\n } else {\n var title = d.properties.name;\n var body = \"Not in EU\";\n } \n \n\tdiv.transition() \n .duration(200) \n .style(\"opacity\", .9); \n div .html(\"<h2>\"+ title + \"</h2><div class='body'>\" +body +\"</div>\") \n .style(\"left\", (d3.event.pageX + 20) + \"px\") \n .style(\"top\", (d3.event.pageY - 28) + \"px\"); \t\n}", "title": "" }, { "docid": "d141b3238243b7019ee91fb6555afe07", "score": "0.6273478", "text": "function handleMouseOver(d) {\n\td3.select(this).style(\"opacity\", \".3\");\n\ttooltip.text(\"$\" + d.value);\n\treturn tooltip.style(\"visibility\", \"visible\");\n}", "title": "" }, { "docid": "29a0e1e3c54845de704f1b660bcfa51e", "score": "0.62628007", "text": "function toolTip(selection) {\n\n // add tooltip (svg circle element) when mouse enters label or slice\n selection.on('mouseenter', function (data) {\n\n pieChartSVG.append('text')\n .attr('class', 'toolCircle')\n .attr('dy', -15) // hard-coded. can adjust this to adjust text vertical alignment in tooltip\n .html(toolTipHTML(data)) // add text to the circle.\n .style('font-size', '.9em')\n .style('text-anchor', 'middle'); // centres text in tooltip\n\n pieChartSVG.append('circle')\n .attr('class', 'toolCircle')\n .attr('r', radius * 0.55) // radius of tooltip circle\n .style('fill', colour(data.data[category])) // colour based on category mouse is over\n .style('fill-opacity', 0.35);\n\n });\n\n // remove the tooltip when mouse leaves the slice/label\n selection.on('mouseout', function () {\n d3.selectAll('.toolCircle').remove();\n });\n }", "title": "" }, { "docid": "99034fc208aecd3ca8a4c25a4bbfb549", "score": "0.6257597", "text": "function mouseEntered(e) {\n var target = e.target;\n if (target.nodeName == \"path\") {\n target.style.opacity = 0.6;\n var details = e.target.attributes;\n\n // Follow cursor\n toolTip.style.transform = `translate(${e.offsetX}px, ${e.offsetY}px)`;\n\n // Tooltip data\n toolTip.innerHTML = `\n <ul>\n <li><b>Province: ${details.name.value}</b></li>\n <li>Local name: ${details.gn_name.value}</li>\n <li>Country: ${details.admin.value}</li>\n <li>Postal: ${details.postal.value}</li>\n </ul>`;\n }\n }", "title": "" }, { "docid": "6bb3fb620b80977107a15c0210173263", "score": "0.62571144", "text": "function drawTooltip() {\r\n return d3.select(\"body\").append(\"div\")\r\n .attr(\"class\", \"tooltip\")\r\n .style(\"opacity\", 0);\r\n}", "title": "" }, { "docid": "3201eaa820d739572a6841acfaea5f17", "score": "0.6253323", "text": "function handleMouseOverMap(d){\n let tooltip = MapG.append('g').attr('id', \"tooltip\");\n \n let mouseX = d3.mouse(this)[0];\n let mouseY = d3.mouse(this)[1]\n \n tooltip.append('rect')\n .attr('x', mouseX)\n .attr('y', mouseY)\n .attr('width', '200px')\n .attr('height', '50px')\n .attr('rx', '10px')\n .attr('ry', '10px')\n .attr('fill', '#292825')\n \n tooltip.append('text')\n .attr('x', mouseX + 20)\n .attr('y', mouseY + 20)\n .attr('fill', 'oldlace')\n .attr('font-size', \"20px\")\n .text(`Country: ${d.properties.name}`);\n \n tooltip.append('text')\n .attr('x', mouseX + 20)\n .attr('y', mouseY + 40)\n .attr('fill', 'oldlace')\n .attr('font-size', \"20px\")\n .text(`Number of Wines: ${d.properties.amount}`)\n}", "title": "" }, { "docid": "dd321efbf11bdffde8e5b4617851f251", "score": "0.6251948", "text": "function onMouseover(d) {\n // Get the name of the group this rect is in:\n var groupKey = d3.select(this.parentNode).datum().key;\n tooltip.html(tooltipFormat(d, groupKey));\n tooltip.style(\"visibility\", \"visible\");\n }", "title": "" }, { "docid": "9918c9dce97da4ec479b54b6b0b42f92", "score": "0.62492454", "text": "function tipMouseover(d) {\n this.setAttribute(\"class\", \"circle-hover\"); // add hover class to emphasize\n\n var color = colorScale(d.route_type);\n var text_to_write = \"<span style='color:\" + color + \";'>\" + d.station_name + \"</span><br/>\" +\n \"Count: \" + d.number_of_transport;\n const coords = projection4([d.longitude, d.latitude])\n tooltip4.html(text_to_write);\n tooltip4.attr(\"text-anchor\", \"middle\")\n .style(\"left\", (coords[0] + 20) + \"px\")\n .style(\"top\", (coords[1] -50) + \"px\");\n tooltip4.transition()\n .duration(500) // ms\n .style(\"opacity\", .9)\n }", "title": "" }, { "docid": "0bd8a72eb3b230b3b12d9c99b398f4a9", "score": "0.62351435", "text": "getAnchor(points, mouseEvent) {\n const chart = this.chart, pointer = chart.pointer, inverted = chart.inverted, plotTop = chart.plotTop, plotLeft = chart.plotLeft;\n let ret;\n points = splat(points);\n // If reversedStacks are false the tooltip position should be taken from\n // the last point (#17948)\n if (points[0].series &&\n points[0].series.yAxis &&\n !points[0].series.yAxis.options.reversedStacks) {\n points = points.slice().reverse();\n }\n // When tooltip follows mouse, relate the position to the mouse\n if (this.followPointer && mouseEvent) {\n if (typeof mouseEvent.chartX === 'undefined') {\n mouseEvent = pointer.normalize(mouseEvent);\n }\n ret = [\n mouseEvent.chartX - plotLeft,\n mouseEvent.chartY - plotTop\n ];\n // Some series types use a specificly calculated tooltip position for\n // each point\n }\n else if (points[0].tooltipPos) {\n ret = points[0].tooltipPos;\n // Calculate the average position and adjust for axis positions\n }\n else {\n let chartX = 0, chartY = 0;\n points.forEach(function (point) {\n const pos = point.pos(true);\n if (pos) {\n chartX += pos[0];\n chartY += pos[1];\n }\n });\n chartX /= points.length;\n chartY /= points.length;\n // When shared, place the tooltip next to the mouse (#424)\n if (this.shared && points.length > 1 && mouseEvent) {\n if (inverted) {\n chartX = mouseEvent.chartX;\n }\n else {\n chartY = mouseEvent.chartY;\n }\n }\n // Use the average position for multiple points\n ret = [chartX - plotLeft, chartY - plotTop];\n }\n return ret.map(Math.round);\n }", "title": "" }, { "docid": "1f48ec2a420c06c3adba64bad700d93f", "score": "0.6233968", "text": "setTooltipPosition() {\n // initial top and left offset from trigger element to parent\n let offsetParent = this.dom.trigger.offsetParent;\n let topOffset = this.dom.trigger.offsetTop;\n let leftOffset = this.dom.trigger.offsetLeft;\n\n // increase offset distance as needed when traversing through trigger's parent elements,\n // until the tooltip wrapper is reached\n while (offsetParent && !offsetParent.classList.contains('mf-tooltip')) {\n let newParent = offsetParent.offsetParent;\n topOffset += offsetParent.offsetTop;\n leftOffset += offsetParent.leftOffset;\n offsetParent = newParent;\n }\n\n // to help calculate middle alignment - vertical and horizontal - of trigger and tooltip,\n // calculate difference in size between them\n const widthsDiff = this.dom.tooltip.offsetWidth > this.dom.trigger.offsetWidth\n ? this.dom.tooltip.offsetWidth - this.dom.trigger.offsetWidth\n : this.dom.trigger.offsetWidth - this.dom.tooltip.offsetWidth;\n const heightsDiff = this.dom.tooltip.offsetHeight > this.dom.trigger.offsetHeight\n ? this.dom.tooltip.offsetHeight - this.dom.trigger.offsetHeight\n : this.dom.trigger.offsetHeight - this.dom.tooltip.offsetHeight;\n\n // set top and left positions, for each possible tooltip position: top, bottom, left, and right\n this.positions = {\n top: {\n top: topOffset - this.dom.tooltip.offsetHeight - 8,\n left: leftOffset - (widthsDiff / 2)\n },\n bottom: {\n top: topOffset + this.dom.tooltip.offsetHeight,\n left: leftOffset - (widthsDiff / 2)\n },\n left: {\n top: topOffset - (heightsDiff / 2),\n left: leftOffset - this.dom.tooltip.offsetWidth - 12\n },\n right: {\n top: topOffset - (heightsDiff / 2),\n left: leftOffset + this.dom.trigger.offsetWidth + 12\n }\n };\n\n // update top and left style of tooltip element\n this.dom.tooltip.style.top = `${this.positions[this.position].top}px`;\n this.dom.tooltip.style.left = `${this.positions[this.position].left}px`;\n }", "title": "" } ]
1635351f03955b207178d48d66dd2054
Manage parameters This method can get parameters from cli as arguments or from a .env file
[ { "docid": "0e6b33e7c4f6a506786ac39ac58ca604", "score": "0.6568345", "text": "getParameters() {\n let options = {};\n const requestDelayDefaultValue = 400;\n consola_1.default.debug({\n badge: true,\n message: 'Getting parameters.',\n });\n try {\n // try to get options from arguments\n const args = new builders_1.ArgumentsBuilder()\n .withVersion('1.0.0')\n .withOption({\n alias: 't',\n command: 'token',\n description: 'Slack token.',\n required: true,\n })\n .withOption({\n alias: 'c',\n command: 'channel',\n description: 'Slack channel ID.',\n required: true,\n })\n .withOption({\n alias: 'd',\n command: 'delay',\n description: 'Delay for the requests.',\n defaultValue: requestDelayDefaultValue,\n })\n .withOption({\n alias: 'u',\n command: 'user',\n description: 'Delete messages for this username',\n required: true,\n })\n .parse(process.argv);\n options = args.getOpts();\n }\n catch (err) {\n const { SLACK_CHANNEL, SLACK_USER, SLACK_TOKEN, SLACK_REQUEST_DELAY = requestDelayDefaultValue, } = process.env;\n if (err.message.startsWith('Missing required parameter:') &&\n (SLACK_CHANNEL && SLACK_USER && SLACK_TOKEN)) {\n // try to get options from .env file\n options.channel = SLACK_CHANNEL;\n options.user = SLACK_USER;\n options.token = SLACK_TOKEN;\n options.delay = SLACK_REQUEST_DELAY;\n }\n else {\n throw err;\n }\n }\n return options;\n }", "title": "" } ]
[ { "docid": "fa1c0adc3ac398d99122a1c12a8b7fc0", "score": "0.6534151", "text": "function readArguments() {\n //system.args[0] is for file name which is being executed\n\n if (system.args.length < 4 || system.args.length > 5) {\n console.log(constants.invalidArgumentsError);\n phantom.exit();\n }\n\n yelpObject.account['username'] = system.args[1];\n yelpObject.account['password'] = system.args[2];\n yelpObject.account['biz_id'] = system.args[3];\n reviewsObject.business_id = system.args[3];\n\n //Check for user-agent, if yes then set to the page settings\n if (system.args[4]) {\n yelpObject.userAgent = system.args[4];\n page.settings.userAgent = yelpObject.userAgent;\n }\n}", "title": "" }, { "docid": "301ec50aa7d5537857963a77e0c432ab", "score": "0.6480205", "text": "function getParameters(args) {\n\tif(args.indexOf('-h') >= 0 || args.indexOf('-help') >= 0) {\n\t\tconst usageMessage = fs.readFileSync(__dirname+'/usageMessage.txt', 'utf8');\n\t\tconsole.log(usageMessage);\n\t\tprocess.exit(0); // not an error\n\t}\n\n\t// Converting args to a map\n\tconst map = new Map();\n\n\t// reading all arguments one by one\n\tlet arg;\n\twhile(arg = args.shift()) {\n\t\tif(arg.startsWith('-')) {\n\t\t\t// remove '-' at begining of option name\n\t\t\targ = arg.slice(1);\n\n\t\t\t// get option arguments, and pushing into map\n\t\t\tmap.set(arg, (args.length < 1 || args[0].startsWith('-')) ? '' : args.shift());\n\t\t} else {\n\t\t\t// argument wasn't starting with '-', certainly an error. Push it to map, will print error for this argument\n\t\t\tmap.set(arg, '');\n\t\t}\n\t}\n\n\t// loading arguments\n\tlet errNb = 0;\n\tlet params;\n\t{\n\t\tlet hasErrors = false;\n\t\t[params, hasErrors] = loadArgs(map);\n\t\t\tconsole.log(\"Loaded config from command line\");\n\t\tif(hasErrors)\n\t\t\terrNb++;\n\t}\n\n\t// checking arguments validity\n\t// MetersNumber\n\tif(params.metersNumber === null) {\n\t\tconsole.error('ERROR: metersNumber need to be specified');\n\t\terrNb++;\n\t\tparams.metersNumber = null;\n\t} else if(params.metersNumber === '') {\n\t\tconsole.error('ERROR: metersNumber need an argument');\n\t\terrNb++;\n\t\tparams.metersNumber = null;\n\t} else {\n\t\tconst nb_meters = params.metersNumber|0;\n\t\tif(nb_meters <= 0) {\n\t\t\tconsole.error('ERROR: Number of meters should be more than 0 (was \"'+params.metersNumber+'\")');\n\t\t\terrNb++;\n\t\t\tparams.metersNumber = null;\n\t\t} else {\n\t\t\tparams.metersNumber = nb_meters;\n\t\t}\n\t}\n\n\t// Date\n\tif(params.firstDate === null || params.lastDate === null) {\n\t\tconsole.error('ERROR: firstDate and lastDate need to be specified');\n\t\terrNb++;\n\t} else if(params.firstDate === '' || params.lastDate === '') {\n\t\tconsole.error('ERROR: firstDate and lastDate need an argument each');\n\t\terrNb++;\n\t} else if(!moment(params.firstDate, INPUT_DATE_FORMAT, true).isValid() || !moment(params.lastDate, INPUT_DATE_FORMAT, true).isValid()) {\n\t\tconsole.error('ERROR: Check your firstDate and lastDate, should be in format '+INPUT_DATE_FORMAT+' (was firstDate:\"'+params.firstDate+'\", lastDate:\"'+params.lastDate+'\")');\n\t\terrNb++;\n\t} else {\n\t\tconst firstDate = moment(params.firstDate, INPUT_DATE_FORMAT);\n\t\tconst lastDate = moment(params.lastDate, INPUT_DATE_FORMAT);\n\n\t\tif(lastDate < firstDate) {\n\t\t\tconsole.error('ERROR: lastDate should be same or after firstDate (was firstDate:\"'+params.firstDate+'\", lastDate:\"'+params.lastDate+'\")');\n\t\t\terrNb++;\n\t\t} else {\n\t\t\tparams.firstDate = firstDate;\n\t\t\tparams.lastDate = lastDate;\n\t\t}\n\t}\n\n\t// Interval\n\tif(params.interval === null) {\n\t\tconsole.error('ERROR: interval need to be specified');\n\t\terrNb++;\n\t} else {\n\t\tconst interval = params.interval|0;\n\t\tif(interval <= 0 || interval > 999999) {\n\t\t\tconsole.error('ERROR: interval should be 1 at minimum (was \"'+params.interval+'\")');\n\t\t\terrNb++;\n\t\t} else {\n\t\t\tparams.interval = interval;\n\t\t}\n\t}\n\n\t// Max File Size\n\tif(params.maxFileSize === null || params.maxFileSize === false || params.maxFileSize === 'false') {\n\t\tparams.maxFileSize = null;\n\t} else if(params.maxFileSize === '') {\n\t\tconsole.error('ERROR: maxFileSize need an argument (put false to disable a config setting)');\n\t\terrNb++;\n\t} else {\n\t\tlet maxFileSize = parseInt(params.maxFileSize); // not working with |0 to get integer\n\n\t\tif(isNaN(maxFileSize) || maxFileSize <= 0) {\n\t\t\tconsole.error(\"ERROR: maxFileSize need an argument as integer > 0 followed by 'k', 'M' or 'G' (was \\\"\"+params.maxFileSize+'\")');\n\t\t\terrNb++;\n\t\t} else {\n\t\t\tswitch(params.maxFileSize[params.maxFileSize.length-1]) {\n\t\t\t\tcase 'G': maxFileSize*=1024; /* falls through */\n\t\t\t\tcase 'M': maxFileSize*=1024; /* falls through */\n\t\t\t\tcase 'k': maxFileSize*=1024;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tconsole.error(\"ERROR: maxFileSize need an argument as integer > 0 followed by 'k', 'M' or 'G' (was \\\"\"+params.maxFileSize+'\")');\n\t\t\t\t\terrNb++;\n\t\t\t}\n\t\t\tparams.maxFileSize = maxFileSize;\n\t\t}\n\t}\n\n\t// StartID\n\tif(params.firstID === null) {\n\t\tparams.firstID = 0;\n\t} else {\n\t\tlet firstID = params.firstID|0;\n\t\tif(firstID < 0 || (params.metersNumber && firstID >= params.metersNumber)) {\n\t\t\tconsole.error('ERROR: firstID should be an integer between 0 and (meters number -1) (was \"'+params.firstID+'\")');\n\t\t\terrNb++;\n\t\t\tparams.firstID = 0;\n\t\t} else {\n\t\t\tparams.firstID = firstID;\n\t\t}\n\t}\n\n\t// LastID\n\tif(params.lastID === null) {\n\t\tparams.lastID = params.metersNumber;\n\t} else {\n\t\tlet lastID = params.lastID|0;\n\t\tif(lastID <= 0 || (params.metersNumber && lastID > params.metersNumber)) {\n\t\t\tconsole.error('ERROR: lastID should be an integer between 1 and (meters number) (was \"'+params.lastID+'\")');\n\t\t\terrNb++;\n\t\t\tparams.lastID = params.metersNumber;\n\t\t} else {\n\t\t\tparams.lastID = lastID;\n\t\t}\n\t}\n\n\t// StartID LastID\n\tif(params.lastID <= params.firstID) {\n\t\tconsole.error('ERROR: firstID should be less than lastID (was firstID:\"'+params.firstID+'\", lastID:\"'+params.lastID+'\")');\n\t\terrNb++;\n\t}\n\n\t// Meter types\n\tif(params.metersType === null || params.metersType.startsWith('mix')) {\n\t\tparams.metersType = 'mix';\n\t} else if(params.metersType.startsWith('elec')) {\n\t\tparams.metersType = 'elec';\n\t} else if(params.metersType !== 'gas') {\n\t\tconsole.error(\"ERROR: metersType should be 'elec', 'gas' or 'mixed' (was \\\"\"+params.metersType+'\")');\n\t\terrNb++;\n\t}\n\n\t// Temperature\n\tif(params.temp === null || params.temp === false || params.temp === 'false') {\n\t\tparams.temp = false;\n\t} else if(params.temp === '' || params.temp === true || params.temp === 'true') {\n\t\tparams.temp = true;\n\t} else {\n\t\tconsole.error('ERROR: temp need a boolean (was \"'+params.temp+'\")');\n\t\tparams.temp = null;\n\t\terrNb++;\n\t}\n\n\t// Location\n\tif(params.location === null || params.location === false || params.location === 'false') {\n\t\tparams.location = false;\n\t} else if(params.location === '' || params.location === true || params.location === 'true') {\n\t\tparams.location = true;\n\t} else {\n\t\tconsole.error('ERROR: location need a boolean (was \"'+params.temp+'\")');\n\t\tparams.location = null;\n\t\terrNb++;\n\t}\n\n\t// Out file\n\tif(params.out === null) {\n\t\tparams.out = './%Y-%M-%D_%N.csv';\n\t} else if (params.out === '') {\n\t\tconsole.error('ERROR: out need an argument (templatable file path (with arguments %Y %y %M %D %h %m %N) like \"./%Y-%M-%D/%h-%m.csv\")');\n\t\terrNb++;\n\t} else if (params.maxFileSize && params.out.indexOf('%N')<0) {\n\t\tconsole.error('ERROR: with maxFileSize, out path need to contains \"%N\" (that will be replaced by file number during execution)');\n\t\terrNb++;\n\t} else if(params.out.endsWith('/')) {\n\t\tparams.out += '%Y-%M-%D_%N.csv';\n\t} // else: keep as it is\n\n\tif(!params.climatFile) {\n\t\tconsole.error('ERROR: climatFile need to be specified');\n\t\terrNb++;\n\t}\n\n\tif(!params.consumptionsFile) {\n\t\tconsole.error('ERROR: consumptionsFile need to be specified');\n\t\terrNb++;\n\t}\n\n\tif(!params.locationsFile) {\n\t\tconsole.error('ERROR: locationsFile need to be specified');\n\t\terrNb++;\n\t}\n\n\tif(!params.meteoFile && params.temp) {\n\t\tconsole.error('ERROR: when option -temp, meteoFile need to be specified');\n\t\terrNb++;\n\t}\n\n\tif(errNb > 0) {\n\t\tconsole.error('\\nType meter_gen -h to see how to use');\n\t\tprocess.exit(-2); // Argument or Initialisation error\n\t}\n\n\treturn params;\n}", "title": "" }, { "docid": "db08d45f6237f7fee91fbf05a01991ca", "score": "0.63880146", "text": "function readArguments() {\n\t//system.args[0] is for file name which is being executed\n\tif (system.args.length < 3 || system.args.length > 4) {\n\t\tconsole.log(constants.invalidArgumentsError);\n\t\tphantom.exit();\n\t}\n\tyelpObject.account['username'] = system.args[1];\n\tyelpObject.account['password'] = system.args[2];\n \n //Check for user-agent, if yes then set to the page settings\n\tif (system.args[3]) {\n\t\tyelpObject.userAgent = system.args[3];\n\t\tpage.settings.userAgent = yelpObject.userAgent;\n\t}\n}", "title": "" }, { "docid": "c8eec6f8b2ee5768dcb42a0d0aff8e11", "score": "0.62346995", "text": "function readArguments() {\n\t//system.args[0] is for file name which is being executed\n\n\tif (system.args.length < 6 || system.args.length > 8) {\n\t\tconsole.log(utils.invalidArgumentsError);\n\t\tphantom.exit();\n\t}\n\n\tyelpObject.account['username'] = system.args[1];\n\tyelpObject.account['password'] = system.args[2];\n\teditPhoto.business_id = system.args[3];\n\teditPhoto.photo_id = system.args[4];\n\teditPhoto.action = system.args[5];\n\n\tif (editPhoto.action.indexOf('caption') > -1 || editPhoto.action == 'flag') {\n\t\t//Action is related to captionso read it\n\t\teditPhoto.content = system.args[6];\n\t}\n\n\t//Check for user-agent, if yes then set to the page settings\n\tif (system.args[7]) {\n\t\tyelpObject.userAgent = system.args[7];\n\t\tpage.settings.userAgent = yelpObject.userAgent;\n\t}\n}", "title": "" }, { "docid": "4ab9c58c24115af7365d4ca4eeba83f9", "score": "0.58962697", "text": "function readArguments() {\n //system.args[0] is for file name which is being executed\n\n if (system.args.length < 7 || system.args.length > 9) {\n console.log(constants.invalidArgumentsError);\n utils.phantomExit();\n }\n\n yelpObject.account['username'] = system.args[1];\n yelpObject.account['password'] = system.args[2];\n yelpObject.account['biz_id'] = system.args[3];\n \n yelpObject.reviewID = system.args[4];\n\n if (system.args[5] == \"public\" || system.args[5] == \"private\") {\n yelpObject.responseType = system.args[5];\n } else if (system.args[5] == \"flag\") {\n yelpObject.responseType = system.args[5];\n yelpObject.flagReason = system.args[7];\n } else {\n utils.log('Wrong reponse type. Please choose from \"public\",\"private\" or \"flag\".');\n utils.phantomExit();\n }\n\n yelpObject.message = system.args[6];\n if (yelpObject.message.length <= 0) {\n console.log(constants.blankReplyContentError);\n utils.phantomExit();\n }\n\n //Check for user-agent, if yes then set to the page settings\n if (system.args[5] == \"flag\" && system.args[8]) {\n yelpObject.userAgent = system.args[8];\n page.settings.userAgent = yelpObject.userAgent;\n } else if (system.args[7]) {\n yelpObject.userAgent = system.args[7];\n page.settings.userAgent = yelpObject.userAgent;\n }\n}", "title": "" }, { "docid": "9cd7552fa0fd2ae9df007a55adeafbb9", "score": "0.5722929", "text": "function configArgs(processArgs) {\n const params = [];\n params[1] = processArgs[1] || 10;\n if (processArgs[0] === 'csv') {\n params[0] = 'csv';\n params[2] = processArgs[2] || 'seed/data/data';\n params[3] = getRestaurantCsv;\n } else {\n params[0] = 'json';\n params[2] = processArgs[2] || 'seed/data/data';\n params[3] = getRestaurantJson;\n }\n return params;\n}", "title": "" }, { "docid": "f54a80e79817b0e468f10d9ebb034873", "score": "0.56905025", "text": "function getParams() {\n var params = {};\n var keys = Object.keys(process.env);\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n if (key.lastIndexOf('P_', 0) === 0) {\n var value = process.env[key];\n params[key.substr(2)] = value;\n }\n }\n return params;\n}", "title": "" }, { "docid": "9b36824c5ca4fc9a589fa6ad249bb40f", "score": "0.5675931", "text": "function readParametersFromProcessIcon() \n{\n if (global.do_not_read_settings) {\n console.writeln(\"Use default settings, do not read parameter values from process icon\");\n return;\n }\n console.writeln(\"readParametersFromProcessIcon\");\n for (let x in par) {\n var param = par[x];\n var name = util.mapBadChars(param.name);\n if (Parameters.has(name)) {\n switch (param.type) {\n case 'S':\n param.val = Parameters.getString(name);\n console.writeln(name + \"=\" + param.val);\n break;\n case 'B':\n param.val = Parameters.getBoolean(name);\n console.writeln(name + \"=\" + param.val);\n break;\n case 'I':\n param.val = Parameters.getInteger(name);\n console.writeln(name + \"=\" + param.val);\n break;\n case 'R':\n param.val = Parameters.getReal(name);\n console.writeln(name + \"=\" + param.val);\n break;\n default:\n util.throwFatalError(\"Unknown type '\" + param.type + '\" for parameter ' + name);\n break;\n }\n }\n }\n}", "title": "" }, { "docid": "9957bdf1eabd8c303e32c75f33c5a690", "score": "0.56406945", "text": "constructor() {\n /**\n * Gets and returns the value of the requested environment variable\n * as the given type.\n *\n * @param varName - the name of the environment variable to get\n * @param typeName - tye name of the type to return the value as (string | number)\n */\n this.getVar = (varName, typeName) => {\n const val = process.env[varName];\n // first see if the variable was found - if not, let's blow this sucker up\n if (val === undefined) {\n this.doError(`getVar(${varName}, ${typeName})`, 'Configuration Error', `Environment variable not set: ${varName}`);\n }\n // we have a value - log the good news\n log.info(__filename, `getVar(${varName}, ${typeName})`, `${varName}=${val}`);\n // convert to expect type and return\n switch (typeName) {\n case 'string': {\n return val;\n }\n case 'number': {\n return parseInt(val + '', 10); // this could blow up, but that's ok since we'd want it to\n }\n default: {\n // we only want numbers or strings...\n this.doError(`getVar(${varName}, ${typeName})`, 'Argument Error', `Invalid variable type name: ${typeName}. Try 'string' or 'number' instead.`);\n }\n }\n };\n this.LOG_LEVEL = this.getVar('LOG_LEVEL', 'number');\n log.LogLevel = this.LOG_LEVEL;\n this.BASE_URL_GAME = this.getVar('BASE_URL_GAME', 'string');\n this.EXT_URL_GAME = this.getVar('EXT_URL_GAME', 'string');\n this.HTTP_PORT_GAME = this.getVar('HTTP_PORT_GAME', 'number');\n this.AUTH_CACHE_CHECK_INTERVAL = this.getVar('AUTH_CACHE_CHECK_INTERVAL', 'number');\n this.AUTH_CACHE_LIFESPAN = this.getVar('AUTH_CACHE_LIFESPAN', 'number');\n this.CACHE_SIZE_MAZES = this.getVar('CACHE_SIZE_MAZES', 'number');\n this.CACHE_SIZE_GAMES = this.getVar('CACHE_SIZE_GAMES', 'number');\n this.CACHE_SIZE_SCORES = this.getVar('CACHE_SIZE_SCORES', 'number');\n this.CACHE_SIZE_TEAMS = this.getVar('CACHE_SIZE_TEAMS', 'number');\n this.CACHE_SIZE_TROPHIES = this.getVar('CACHE_SIZE_TROPHIES', 'number');\n this.CACHE_LOAD_MAX_FAIL_PERCENT = this.getVar('CACHE_LOAD_MAX_FAIL_PERCENT', 'number');\n this.CACHE_FREE_TARGET_PERCENT = this.getVar('CACHE_FREE_TARGET_PERCENT', 'number');\n this.CACHE_PRUNE_TRIGGER_PERCENT = this.getVar('CACHE_PRUNE_TRIGGER_PERCENT', 'number');\n this.SERVICE_MAZE = this.getVar('SERVICE_MAZE', 'string');\n this.SERVICE_SCORE = this.getVar('SERVICE_SCORE', 'string');\n this.SERVICE_TEAM = this.getVar('SERVICE_TEAM', 'string');\n this.SERVICE_TROPHY = this.getVar('SERVICE_TROPHY', 'string');\n this.PRIMARY_SERVICE_ACCOUNT = this.getVar('PRIMARY_SERVICE_ACCOUNT', 'string');\n }", "title": "" }, { "docid": "fd770143b6e967fb5fbb538b61c68d4a", "score": "0.5619038", "text": "function getArgs() {\n // attempt to parse and validate args if they are empty\n if (mp3Dir === '' || playlistId === '') {\n parseArgs();\n readDir();\n validateArgs();\n }\n }", "title": "" }, { "docid": "64fa28d2da5313ee6c2f1db8b9122240", "score": "0.5581363", "text": "check() {\n\t\tif (arguments[0] != this.name) return false;\n\t\tlet params = {};\n\t\tlet cache_param;\n\t\tlet cache_args = [];\n\t\tfor (let i = 1; i < arguments.length; i++) {\n\t\t\tlet arg = arguments[i];\n\t\t\t/* when it's a param and it's not in the list return false */\n\t\t\tif (arg.startsWith(\"-\") && !(arg in this.par_desc_map)) {\n\t\t\t\tthrow new err.Find(\n\t\t\t\t\targ,\n\t\t\t\t\t`command parameter list for command ${this.name}`\n\t\t\t\t);\n\t\t\t} else if (arg.startsWith(\"-\") && arg in this.par_desc_map) {\n\t\t\t\t/* check the cache_args vor validity using the lambda (length) */\n\t\t\t\tif (cache_param) {\n\t\t\t\t\tparams[cache_param] = cache_args;\n\t\t\t\t\tcache_args = [];\n\t\t\t\t}\n\t\t\t\tcache_param = arg;\n\t\t\t\tcontinue;\n\t\t\t} else {\n\t\t\t\tcache_args.push(arg);\n\t\t\t}\n\t\t}\n\t\t/* add the last param and it's arguments to the param dict */\n\t\tif (cache_param) {\n\t\t\tparams[cache_param] = cache_args;\n\t\t}\n\t\tparams = this.checkParams(params);\n\t\t/* check for required parameters for this command */\n\t\tfor (let param_name in this.par_desc_map) {\n\t\t\tlet param = this.par_desc_map[param_name];\n\t\t\tif (param.type == \"required\" && !(param_name in params)) {\n\t\t\t\tif (param.default_construct == true) {\n\t\t\t\t\tparams[param_name] = param.default_args;\n\t\t\t\t\tparams = this.checkParams(params);\n\t\t\t\t} else {\n\t\t\t\t\tthrow new err.ParameterRequired(this.name, param_name);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn params;\n\t}", "title": "" }, { "docid": "8c516e8277cbe61600981973e2e2d44c", "score": "0.5568343", "text": "function processParam(param, depth) {\n\n var paramArray = param.split(\"=\");\n\n // Run command - must always come after the app\n if (parseInt(i) === 2) {\n appLauncher.command = param;\n }\n\n // Server.port\n if (paramArray[0] === \"port\" && paramArray[1] !== undefined) {\n appLauncher.server.port = paramArray[1];\n }\n\n //\n if ((appLauncher.command === \"g\" || appLauncher.command === \"script\" || appLauncher.command === \"test\") && parseInt(i) === 3) {\n appLauncher.script.name = param;console.log(param);\n }\n\n // Script params\n if ((appLauncher.command === 'g' || appLauncher.command === 'script') && parseInt(i) > 3) {\n appLauncher.script.params.push(param);\n }\n}", "title": "" }, { "docid": "3a4acceed6b229868a6ff8a13e8eb41c", "score": "0.5550172", "text": "function get_vars() {\n // your local port\n port = process.env.PORT\n\n // local https port\n sport = process.env.SECURE_PORT\n\n // your local ip address of your server\n ip = process.env.IP\n\n // your space name url\n su = process.env.SPACE_URL\n\n // your project key\n pk = process.env.PROJECT_KEY\n\n // your api token\n at = process.env.API_TOKEN\n\n // your sip dial string\n sd = process.env.SIP_DIAL\n\n // you sip failover string\n sf = process.env.SIP_FAILOVER\n\n // your node js base url and port\n nodeurl = process.env.NODE_URL\n\n // your SW trunk numbers which are forwarded to your nodejs server:port URL\n sw_number_1 = process.env.SW_NUMBER_1\n sw_number_2 = process.env.SW_NUMBER_2\n\n // your sip dialstrings\n sip_dialstring_1 = process.env.SIP_DIALSTRING_1\n sip_dialstring_2 = process.env.SIP_DIALSTRING_2\n}", "title": "" }, { "docid": "86d9ae2436c8f015de416c13aee85af5", "score": "0.55082107", "text": "params() {\n const userSettings = window.FrontendMonsterSettings || {};\n const settings = {};\n for (const key in userSettings) {\n if (userSettings.hasOwnProperty(key)) {\n settings[key] = userSettings[key];\n }\n }\n this.settings = settings;\n }", "title": "" }, { "docid": "1209cd94ba55a50e59cc5fa92e952adb", "score": "0.5459992", "text": "function readArguments() {\n let folderPath = process.argv[2];\n distFolderPath = folderPath + '/' + DIST_FOLDER;\n notesPath = folderPath + '/' + NOTES_FOLDER;\n if (!folderPath)\n throw 'No folder given';\n else\n processFolder(folderPath);\n}", "title": "" }, { "docid": "90ca8804a53d5507b33c8291ba86c03c", "score": "0.54526246", "text": "buildProgramArguments() {\n\n\t\tconst compose = this.commander\n\t\t\t.command('compose [projectPath]')\n\t\t\t.description('Build products for a Maestro project')\n\t\t\t.option(\n\t\t\t\t'--all',\n\t\t\t\t`Build all output types: ${this.composeOutputTypes.map((a) => a.option).join(', ')}`,\n\t\t\t\tnull\n\t\t\t);\n\n\t\tfor (const ot of this.composeOutputTypes) {\n\t\t\tcompose.option(`--${ot.option}`, ot.desc, null);\n\t\t}\n\n\t\tcompose.action((projectPath, options) => {\n\t\t\tthis.prepComposeArguments(projectPath, options);\n\t\t\tthis.validateProgramArguments();\n\t\t\tthis.doCompose();\n\t\t});\n\n\t\tthis.commander\n\t\t\t.command('conduct [projectPath]')\n\t\t\t.description('Serve Maestro web app')\n\t\t\t.option('-p, --port <num>', 'specify port on which to serve', 8000)\n\t\t\t.action((projectPath, options) => {\n\t\t\t\tthis.serveMaestroWeb(projectPath, options);\n\t\t\t});\n\n\t}", "title": "" }, { "docid": "680de6393e0beee9c8ac9a7df33348d6", "score": "0.5447415", "text": "async function readParams() {\n return new Promise( (resolve,reject) => {\n if( fs.existsSync('config.json') ) {\n let result = JSON.parse(fs.readFileSync('config.json', 'utf8'));\n return resolve(result);\n }\n prompt.start()\n prompt.get(prompt_attrs, (err, result) => {\n if( err ) throw(err);\n params.showNightmare = params.showNightmare === \"yes\";\n params.searchInterval = parseInt(params.searchInterval);\n return resolve(result);\n })\n });\n}", "title": "" }, { "docid": "ecc1f86bf950cb10a92294abe5d6eacc", "score": "0.54449636", "text": "function ReadParametersFromPersistentModuleSettings()\n{\n if (global.do_not_read_settings) {\n console.writeln(\"Use default settings, do not read parameter values from persistent module settings\");\n return;\n }\n if (!global.ai_use_persistent_module_settings) {\n console.writeln(\"skip ReadParametersFromPersistentModuleSettings\");\n return;\n }\n console.writeln(\"ReadParametersFromPersistentModuleSettings\");\n for (let x in par) {\n var param = par[x];\n var name = SETTINGSKEY + '/' + util.mapBadChars(param.name);\n switch (param.type) {\n case 'S':\n var tempSetting = Settings.read(name, DataType_String);\n break;\n case 'B':\n var tempSetting = Settings.read(name, DataType_Boolean);\n break;\n case 'I':\n var tempSetting = Settings.read(name, DataType_Int32);\n break;\n case 'R':\n var tempSetting = Settings.read(name, DataType_Real32);\n break;\n default:\n util.throwFatalError(\"Unknown type '\" + param.type + '\" for parameter ' + name);\n break;\n }\n if (Settings.lastReadOK) {\n console.writeln(\"AutoIntegrate: read from settings \" + name + \"=\" + tempSetting);\n param.val = tempSetting;\n }\n }\n}", "title": "" }, { "docid": "b22f33719eaa2b8a57afcd03c4574867", "score": "0.5441538", "text": "function getCommandlineConfig() {\n var optimist = require('optimist')\n .usage('Usage: $0 build|serve --docs=[path] --images=[path] --output=[path]')\n .options('docs', {\n alias: 'd',\n default: './docs',\n description: 'Documents path'\n })\n .options('images', {\n alias: 'i',\n default: './docs/img',\n description: 'Images path'\n })\n .options('output', {\n alias: 'o',\n default: './site',\n description: 'Output path'\n })\n .options('host', {\n alias: 'h',\n default: '0.0.0.0',\n description: 'Built-in server host'\n })\n .options('port', {\n alias: 'p',\n default: '4000',\n description: 'Built-in server port'\n })\n .options('log_level', {\n default: 'info',\n description: 'Severity of messages to put into log'\n });\n\n var argv = optimist.argv;\n var build = argv._.indexOf('build') != -1;\n var serve = argv._.indexOf('serve') != -1;\n\n if(!build && !serve) {\n optimist.showHelp();\n console.log('Action required: build|serve');\n process.exit(1);\n }\n\n //apply options\n config.set('log_level', argv.log_level);\n config.set('docs', argv.docs);\n config.set('img', argv.images);\n config.set('output', argv.output);\n config.set('server:host', argv.host);\n config.set('server:port', argv.port);\n config.set('action:build', build);\n config.set('action:serve', serve);\n}", "title": "" }, { "docid": "2054f81cfafe99d5511bed07fecd62b4", "score": "0.5408611", "text": "function optsFromCLI() {\n const opts = args([\n { name: 'rows', alias: 'r', type: parseInt, defaultValue: 30, },\n { name: 'cols', alias: 'c', type: parseInt, defaultValue: 30, },\n { name: 'width', alias: 'w', type: parseInt, defaultValue: null, },\n { name: 'height', alias: 'h', type: parseInt, defaultValue: null, },\n ]);\n //console.log(opts);\n return opts;\n}", "title": "" }, { "docid": "3d291f803793182e5ce97fa8055c022d", "score": "0.53994834", "text": "function get_vars() {\n // your local port\n port = process.env.PORT\n\n // local https port\n sport = process.env.SECURE_PORT\n\n // your local ip address of your server\n //ip=lip.ens18[0].address; // for numbers proxmox\n //ip=lip.enp4s0[0].address; // for ezra baremetal\n ip = process.env.IP\n\n // your space name url\n su = process.env.SPACE_URL\n\n // your project key\n pk = process.env.PROJECT_KEY\n\n // your api token\n at = process.env.API_TOKEN\n\n // your signalwire phone number\n pn = process.env.PHONE_NUMBER\n\n // your cellphone number\n cn = process.env.CELL_NUMBER\n\n // body of sms message\n sms = process.env.SMS_BODY\n\n // specify paths to your certs\n privkey = process.env.PRIVKEY\n cert = process.env.CERT\n fullchain = process.env.FULLCHAIN\n\n\n // then the Relay vars\n port2 = process.env.RELAY_PORT\n sport2 = process.env.RELAY_SECURE_SPORT\n\n}", "title": "" }, { "docid": "cb2ba419f3a02d87cd0b80fc980c78e3", "score": "0.53979087", "text": "params() {\n const userSettings = window.MonsterBemSettings || {};\n const settings = {};\n Object.keys(userSettings).forEach(key => {\n settings[key] = userSettings[key];\n });\n this.settings = settings;\n }", "title": "" }, { "docid": "f8bcda886b35b614f74b1c8bad0ec156", "score": "0.53825927", "text": "get args()\n {\n return new helpers.args(this.url); \n }", "title": "" }, { "docid": "2bba7c6eccdaecb9e6cbfe8f9b21cce1", "score": "0.5382412", "text": "constructor() {\n // set current Arguments.\n this.currentArgs = process.argv.slice(2);\n }", "title": "" }, { "docid": "8521e4e1023e6ba30b612861b5c66cc2", "score": "0.536031", "text": "function commandLineOptions(){\n\tconst optionDefinitions = [\n\t\t{name: \"firstYear\", alias: \"f\", type:Number}, \n\t\t{name: \"lastYear\", alias:\"l\", type: Number}, \n\t\t{name: \"employees\", alias:\"p\", type: Number}\n\t];\n\tconst options = commandLineArgs(optionDefinitions); \n\tif (!((options.firstYear) && (options.lastYear))){\n\t\tconsole.log(\"Please enter both first year and last year values\"); \n\t\tprocess.exit(); \n\t}\n\treturn options; \n}", "title": "" }, { "docid": "577aa315f52ff2d9a5654310af53f1a1", "score": "0.5349196", "text": "function handleParameters()\n\t{\n\t\t// Handle page parameters\n\t\tlet siteConfigParams = siteConfig.queryParams;\n\t\tif (siteConfigParams['env'] === 'dev'\n\t\t\t\t|| (siteConfig.name === 'YX-WebThemeKit' && siteConfigParams['_ijt'] !== ''))\n\t\t{\n\t\t\t// Intellij IDEA\n\t\t\tlet replacedPath = 'https://gyx8899.github.io/',\n\t\t\t\t\tnewPath = '../../../';\n\t\t\tif ((location.hostname === '127.0.0.1' || location.hostname === 'localhost') && !siteConfigParams['_ijt'])\n\t\t\t{\n\t\t\t\tif (location.hostname === 'localhost')\n\t\t\t\t{\n\t\t\t\t\treplacedPath += 'YX-WebThemeKit';\n\t\t\t\t}\n\t\t\t\tnewPath = location.origin + '/';\n\t\t\t\tsiteConfig.customConfig.headerFooter = true;\n\t\t\t\tsiteConfig.customConfig.serviceWorker = true;\n\t\t\t}\n\t\t\tObject.keys(configUrl).forEach(function (key) {\n\t\t\t\tif (configUrl[key].url)\n\t\t\t\t{\n\t\t\t\t\tconfigUrl[key].url = configUrl[key].url.replace(replacedPath, newPath).replace('.min.js', '.js');\n\t\t\t\t\tif (siteConfigParams['min'] === 'false')\n\t\t\t\t\t{\n\t\t\t\t\t\tconfigUrl[key].url = configUrl[key].url.replace('.min.js', '.js')\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tdocument.onreadystatechange = () => {\n\t\t\tif (document.readyState === 'interactive')\n\t\t\t{\n\t\t\t\t// Note: Use double quotes, not single quotes;\n\t\t\t\t// Handle ?assign=true&aaa=123&bbb=\"234\"&ccc=true&ddd=[\"a\", 2, true]&&eee={\"ab\": true}\n\t\t\t\tlet isAssignEnabled = siteConfigParams['assign'];\n\t\t\t\tif (isAssignEnabled === 'true')\n\t\t\t\t{\n\t\t\t\t\tlet params = siteConfigParams;\n\t\t\t\t\tfor (let key in params)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (window[key] !== undefined && params.hasOwnProperty(key))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\twindow[key] = JSON.parse(params[key]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Note: Use double quotes, not single quotes;\n\t\t\t\t// Handle ?apply=initState(1, \"abc\", {\"a\": true})\n\t\t\t\tlet paramsApply = siteConfigParams['apply'];\n\t\t\t\tif (paramsApply !== undefined)\n\t\t\t\t{\n\t\t\t\t\tlet funcName = paramsApply.split('(')[0],\n\t\t\t\t\t\t\tparams = JSON.parse('[' + paramsApply.substring(funcName.length + 1, paramsApply.length - 1) + ']');\n\t\t\t\t\twindow[funcName](...params);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t// Handle theme config parameters\n\t\tlet themeConfigParams = YX.Util.url.getUrlQueryParams(getScriptName());\n\t\tif (themeConfigParams['config'])\n\t\t{\n\t\t\tthemeConfigParams['config'].split(',').forEach(themeName => {\n\t\t\t\tsiteConfig.customConfig[themeName] = true;\n\t\t\t})\n\t\t}\n\t\tif (themeConfigParams['ignore'])\n\t\t{\n\t\t\tthemeConfigParams['ignore'].split(',').forEach(themeName => {\n\t\t\t\tsiteConfig.customConfig[themeName] = false;\n\t\t\t})\n\t\t}\n\n\t\t// Handle site config parameters\n\t\tif (siteConfigParams['config'])\n\t\t{\n\t\t\tsiteConfigParams['config'].split(',').forEach(themeName => {\n\t\t\t\tsiteConfig.customConfig[themeName] = true;\n\t\t\t})\n\t\t}\n\t\tif (siteConfigParams['ignore'])\n\t\t{\n\t\t\tsiteConfigParams['ignore'].split(',').forEach(themeName => {\n\t\t\t\tsiteConfig.customConfig[themeName] = false;\n\t\t\t})\n\t\t}\n\t}", "title": "" }, { "docid": "88c2b854622192f2b1da7f4680124d08", "score": "0.53460455", "text": "function getArguments(){\n return process.argv[2];\n}", "title": "" }, { "docid": "216f0bf3cf54c4e009aa2f772c4eb18c", "score": "0.53365254", "text": "function setupCommander(){\n\tprogram\n\t.version('1.1.1')\n\t//.option('-p, --peppers', 'Add peppers')\n\t.option('--csv <csv file>', 'Read passwords from a .csv file', './Chrome Passwords.csv')\n\t.option('-s, --safe', 'Display safe passwords', false)\n\t.parse(process.argv);\n\t\n\tif(program.csv){\n\t\tconst csvparser = require('./csvparser');\n\t\tcsvparser.parsefile(program.csv, checkpasswords);\n\t}\n}", "title": "" }, { "docid": "1aca2e19d8670867900a5d2a2ec1bd1f", "score": "0.53318375", "text": "function checkParameters(parms)\n{\n var msh = _MSH();\n if (parms.getParameter('description', null) == null && msh.description != null) { parms.push('--description=\"' + msh.description + '\"'); }\n if (parms.getParameter('displayName', null) == null && msh.displayName != null) { parms.push('--displayName=\"' + msh.displayName + '\"'); }\n if (parms.getParameter('companyName', null) == null && msh.companyName != null) { parms.push('--companyName=\"' + msh.companyName + '\"'); }\n\n if (msh.fileName != null)\n {\n // This converts the --fileName parameter of the installer, to the --target=XXX format required by service-manager.js\n var i = parms.getParameterIndex('fileName');\n if(i>=0)\n {\n parms.splice(i, 1);\n }\n parms.push('--target=\"' + msh.fileName + '\"');\n }\n\n if (parms.getParameter('meshServiceName', null) == null)\n {\n if(msh.meshServiceName != null)\n {\n // This adds the specified service name, to be consumed by service-manager.js\n parms.push('--meshServiceName=\"' + msh.meshServiceName + '\"');\n }\n else\n {\n // Still no meshServiceName specified... Let's also check installed services...\n var tmp = process.platform == 'win32' ? 'Mesh Agent' : 'meshagent';\n try\n {\n tmp = require('_agentNodeId').serviceName();\n }\n catch(xx)\n {\n }\n\n // The default is 'Mesh Agent' for Windows, and 'meshagent' for everything else...\n if(tmp != (process.platform == 'win32' ? 'Mesh Agent' : 'meshagent'))\n {\n parms.push('--meshServiceName=\"' + tmp + '\"');\n }\n }\n }\n}", "title": "" }, { "docid": "4574a503364a6c5d97e2d90ecb747df0", "score": "0.53227997", "text": "function run(context) {\n\n \"use strict\";\n\n if (adsk.debug === true) {\n /*jslint debug: true*/\n debugger;\n /*jslint debug: false*/\n }\n\n var PARAM_OPERATION = {\n LOOP_ONLY: 0,\n EXPORT_FUSION: 1,\n EXPORT_IGES: 2,\n EXPORT_SAT: 3,\n EXPORT_SMT: 4,\n EXPORT_STEP: 5,\n EXPORT_STL: 6,\n LAST: 6\n };\n\n var appTitle = 'ParaParam';\n\n var app = adsk.core.Application.get(), ui;\n if (app) {\n ui = app.userInterface;\n if (!ui) {\n adsk.terminate();\n return;\n }\n }\n\n var design = adsk.fusion.Design(app.activeProduct);\n if (!design) {\n ui.messageBox('No active design', appTitle);\n adsk.terminate();\n return;\n }\n\n var progressDialog = null;\n\n // What to do after each update (export, etc)\n var paramOperation = null;\n\n // This is the parameter info to update. The format is:\n // ParamName, StartValue, EndValue, StepValue\n var paramsInfo = [];\n\n // Get the current user parameters\n var userParamsList = design.userParameters;\n\n var paramGroupInput = null; // Group input control in dialog\n\n // Create the command definition.\n var createCommandDefinition = function() {\n var commandDefinitions = ui.commandDefinitions;\n\n // Be fault tolerant in case the command is already added...\n var cmDef = commandDefinitions.itemById('ParaParam');\n if (!cmDef) {\n cmDef = commandDefinitions.addButtonDefinition('ParaParam',\n 'ParaParam',\n 'Parametrically drives user parameters.',\n './resources'); // relative resource file path is specified\n }\n return cmDef;\n };\n\n // CommandCreated event handler.\n var onCommandCreated = function(args) {\n try {\n var command = args.command;\n\n // Connect to the events.\n command.execute.add(onCommandExecuted);\n command.inputChanged.add(onInputChangedHandler);\n\n // Terminate the script when the command is destroyed\n command.destroy.add(function () { adsk.terminate(); });\n\n // Define the inputs.\n var inputs = command.commandInputs;\n\n var paramInput = inputs.addDropDownCommandInput('param', 'Which Parameter', adsk.core.DropDownStyles.TextListDropDownStyle );\n\n // The first item indicates a CSV file for param info should be selected and used\n paramInput.listItems.add(\"Use Param CSV File\", true);\n\n // Add the user parameter names\n for (var iParam = 0; iParam < userParamsList.count; ++iParam) {\n paramInput.listItems.add(userParamsList.item(iParam).name, false);\n }\n\n // Create group to hold single param inputs (non CSV)\n var groupInput = inputs.addGroupCommandInput(\"groupinput\", \"Single Parameter\");\n groupInput.isExpanded = true;\n groupInput.isEnabled = true;\n\n paramGroupInput = groupInput; // HACK: Save off so changed handler can ref\n\n var valueStart = adsk.core.ValueInput.createByReal(1.0);\n groupInput.children.addValueInput('valueStart', 'Start Value', 'cm' , valueStart);\n\n var valueEnd = adsk.core.ValueInput.createByReal(10.0);\n groupInput.children.addValueInput('valueEnd', 'End Value', 'cm' , valueEnd);\n\n var valueStep = adsk.core.ValueInput.createByReal(1.0);\n groupInput.children.addValueInput('valueStep', 'Increment Value', 'cm' , valueStep);\n\n // Operation section\n\n var operInput = inputs.addDropDownCommandInput('operation', 'Operation', adsk.core.DropDownStyles.TextListDropDownStyle );\n operInput.listItems.add('Value Only',true);\n operInput.listItems.add('Export to Fusion',false);\n operInput.listItems.add('Export to IGES',false);\n operInput.listItems.add('Export to SAT',false);\n operInput.listItems.add('Export to SMT',false);\n operInput.listItems.add('Export to STEP',false);\n operInput.listItems.add('Export to STL',false);\n\n var exportSTLPerBody = inputs.addBoolValueInput('exportSTLPerBody', 'Export STL for each body', true);\n exportSTLPerBody.value = false;\n\n var restoreValues = inputs.addBoolValueInput('restoreValues', 'Restore Values On Finish', true);\n restoreValues.value = false;\n }\n catch (e) {\n ui.messageBox('Failed to create command : ' + (e.message ? e.message : e));\n }\n };\n\n // Event handler for the inputChanged event.\n var onInputChangedHandler = function(args) {\n eventArgs = adsk.core.InputChangedEventArgs(args);\n\n var cmdInput = eventArgs.input;\n if (cmdInput != null)\n {\n if (cmdInput.id == \"param\") {\n var paramInput = adsk.core.DropDownCommandInput(cmdInput);\n\n var iParam = paramInput.selectedItem.index;\n if (paramGroupInput) {\n var enable = (iParam > 0); // Enable/Disable group\n //paramGroupInput.isEnabled = enable;\n paramGroupInput.isExpanded = enable;\n }\n }\n /** TODO: Enable/Disable checkbox depending on operation\n else if (cmdInput.id == \"operation\") {\n //var exportInput = adsk.core.BoolValueCommandInput(cmdInput);\n var operationInput = adsk.core.DropDownCommandInput(cmdInput);\n var paramOperation = operationInput.selectedItem.index;\n val bEnableBoolInput = (paramOperation == PARAM_OPERATION.EXPORT_STL);\n }\n */\n }\n };\n\n var Uint8ToString = function(u8Arr) {\n var CHUNK_SIZE = 0x8000; //arbitrary number\n var index = 0;\n var length = u8Arr.length;\n var result = '';\n var slice;\n while (index < length) {\n slice = u8Arr.subarray(index, Math.min(index + CHUNK_SIZE, length));\n result += String.fromCharCode.apply(null, slice);\n index += CHUNK_SIZE;\n }\n return result; //btoa(result);\n };\n\n var decode_utf8 = function(s)\n {\n return decodeURIComponent(escape(s));\n }\n\n var LoadParamsCSVFile = function() {\n\n // prompt for the filename\n var dlg = ui.createFileDialog();\n dlg.title = 'Select Parameters CSV File';\n dlg.filter = 'CSV Files (*.csv);;All Files (*.*)';\n\n if (dlg.showOpen() != adsk.core.DialogResults.DialogOK)\n return false;\n\n var csvFilename = dlg.filename;\n\n // Read the csv file.\n var cnt = 0;\n var arrayBuffer = adsk.readFile(csvFilename);\n var allLines = decode_utf8(Uint8ToString(new Uint8Array(arrayBuffer)));\n\n var linesCSV = allLines.split(/\\r?\\n/);\n\n var linesCSVCount = linesCSV.length;\n for (var i = 0; i < linesCSVCount; ++i) {\n\n var line = linesCSV[i].trim();\n\n // Is this line empty?\n if (line === \"\") {\n\n // Skip over multiple blank lines (treat as one)\n for (++i ; line === \"\" && i < linesCSVCount; ++i) {\n line = linesCSV[i].trim();\n }\n\n if (i == linesCSVCount) {\n break; // No more lines\n }\n }\n\n // Get the values from the csv line.\n // Format:\n // ParamName, StartValue, EndValue, Step\n var pieces = line.split(',');\n\n if ( pieces.length != 4 ) {\n ui.messageBox(\"Invalid line: \" + cnt + \" - CSV file: \" + csvFilename);\n adsk.terminate();\n }\n\n if (isNaN(pieces[1]) || isNaN(pieces[2]) || isNaN(pieces[3])) {\n ui.messageBox(\"Invalid param value at line: \" + cnt + \" - CSV file: \" + csvFilename);\n adsk.terminate();\n }\n\n var paramName = pieces[0];\n var paramStart = Number(pieces[1]);\n var paramEnd = Number(pieces[2]);\n var paramStep = Number(pieces[3]);\n\n paramsInfo.push({name: paramName, valueStart: paramStart, valueEnd: paramEnd, valueStep: paramStep});\n\n cnt += 1;\n }\n\n return true;\n };\n\n // Now begin the param updates. This is a recursive function which will\n // iterate over each param and update.\n var UpdateParams = function(whichParam, paramValues, exportFilenamePrefix, exportSTLPerBody) {\n\n var curParam = paramsInfo[whichParam];\n\n // Validate loop params\n if (curParam.valueStep <= 0) {\n ui.messageBox(\"Value increment must be greater than zero\");\n return false;\n }\n\n if (curParam.valueStart > curParam.valueEnd) {\n curParam.valueStep = -curParam.valueStep;\n }\n else if (curParam.valueStart == curParam.valueEnd) {\n ui.messageBox(\"Start value must not equal End value\");\n return false;\n }\n\n // Get the actual parameter to modify\n var userParam = userParamsList.itemByName(curParam.name);\n if (!userParam) {\n return false;\n }\n\n var resExport = 0;\n\n // Loop from valueStart to valueEnd incrementing by valueStep\n for (var val = curParam.valueStart;\n (curParam.valueStep > 0) ? val <= curParam.valueEnd : val >= curParam.valueEnd;\n val += curParam.valueStep) {\n\n // note - setting the 'value' property does not change the value. Must set expression.\n // REVIEW: Handle unit conversion\n userParam.expression = '' + val; // + ' cm';\n\n // TODO: dialog not hiding at end\n //progressDialog.message = \"Updating parameter '\" + curParam.name + \"' to \" + userParam.expression;\n\n // Track in running values\n paramValues[curParam.name] = userParam.expression;\n\n // If exporting then we need to build the name for this iteration\n var exportFilename = \"\";\n if (exportFilenamePrefix && exportFilenamePrefix !== \"\") {\n // TODO: Better name based on all params\n exportFilename = exportFilenamePrefix + '_' + curParam.name + '_' + val;\n }\n\n // Is this a leaf node?\n if ( whichParam == paramsInfo.length - 1 ) {\n\n // Yes, so perform the operation specified.\n var exportMgr = design.exportManager;\n\n switch (paramOperation)\n {\n case PARAM_OPERATION.LOOP_ONLY:\n // Nothing\n break;\n\n case PARAM_OPERATION.EXPORT_FUSION:\n var fusionArchiveOptions = exportMgr.createFusionArchiveExportOptions(exportFilename+'.f3d');\n resExport = exportMgr.execute(fusionArchiveOptions);\n break;\n\n case PARAM_OPERATION.EXPORT_IGES:\n var igesOptions = exportMgr.createIGESExportOptions(exportFilename+'.igs');\n resExport = exportMgr.execute(igesOptions);\n break;\n\n case PARAM_OPERATION.EXPORT_SAT:\n var satOptions = exportMgr.createSATExportOptions(exportFilename+'.sat');\n resExport = exportMgr.execute(satOptions);\n break;\n\n case PARAM_OPERATION.EXPORT_SMT:\n var smtOptions = exportMgr.createSMTExportOptions(exportFilename+'.smt');\n resExport = exportMgr.execute(smtOptions);\n break;\n\n case PARAM_OPERATION.EXPORT_STEP:\n var stepOptions = exportMgr.createSTEPExportOptions(exportFilename+'.step');\n resExport = exportMgr.execute(stepOptions);\n break;\n\n case PARAM_OPERATION.EXPORT_STL:\n\n if ( exportSTLPerBody ) {\n var bodies = design.rootComponent.bRepBodies;\n for (var iBodies=0; iBodies < bodies.count; iBodies++)\n {\n var body = bodies.item(iBodies);\n var name = body.name;\n console.log(\"STL Export Body '\"+body+\"' : Name '\"+name+\"'\");\n\n // Create a clean filename\n var exportFilename = exportFilenamePrefix + '_' + name + '_' + curParam.name + '_' + val + '.stl';\n\n var stlOptions = exportMgr.createSTLExportOptions(body, exportFilename);\n\n //stlOptions.isBinaryFormat = true;\n //stlOptions.isBinaryFormat = true;\n //stlOptions.meshRefinement = adsk.fusion.MeshRefinementSettings.MeshRefinementHigh;\n resExport = exportMgr.execute(stlOptions);\n }\n }\n else {\n var stlOptions = exportMgr.createSTLExportOptions(design.rootComponent, exportFilename+'.stl');\n //stlOptions.isBinaryFormat = true;\n //stlOptions.meshRefinement = adsk.fusion.MeshRefinementSettings.MeshRefinementHigh;\n resExport = exportMgr.execute(stlOptions);\n }\n\n break;\n }\n }\n else { // Not a leaf node so iterate downward\n\n for (var iParam = whichParam+1; iParam < paramsInfo.length; ++iParam) {\n UpdateParams(iParam, paramValues, exportFilename, false);\n }\n }\n }\n };\n\n // CommandExecuted event handler.\n var onCommandExecuted = function(args) {\n try {\n\n // Extract input values\n var unitsMgr = app.activeProduct.unitsManager;\n var command = adsk.core.Command(args.firingEvent.sender);\n var inputs = command.commandInputs;\n\n var paramInput, valueStartInput, valueEndInput, valueStepInput, operationInput, exportSTLPerBodyInput, restoreValuesInput;\n\n // REVIEW: Problem with a problem - the inputs are empty at this point. We\n // need access to the inputs within a command during the execute.\n for (var n = 0; n < inputs.count; n++) {\n var input = inputs.item(n);\n if (input.id === 'param') {\n paramInput = adsk.core.DropDownCommandInput(input);\n }\n else if (input.id === 'valueStart') {\n valueStartInput = adsk.core.ValueCommandInput(input);\n }\n else if (input.id === 'valueEnd') {\n valueEndInput = adsk.core.ValueCommandInput(input);\n }\n else if (input.id === 'valueStep') {\n valueStepInput = adsk.core.ValueCommandInput(input);\n }\n else if (input.id === 'operation') {\n operationInput = adsk.core.DropDownCommandInput(input);\n }\n else if (input.id === 'exportSTLPerBody') {\n exportSTLPerBodyInput = adsk.core.BoolValueCommandInput(input);\n }\n else if (input.id === 'restoreValues') {\n restoreValuesInput = adsk.core.BoolValueCommandInput(input);\n }\n }\n\n if (!paramInput || !valueStartInput || !valueEndInput || !valueStepInput || !operationInput || !exportSTLPerBodyInput || !restoreValuesInput) {\n ui.messageBox(\"One of the inputs does not exist.\");\n return;\n }\n\n // What param to use or param CSV file?\n var iParam = paramInput.selectedItem.index;\n if (iParam < 0) {\n ui.messageBox(\"No parameter selected\");\n return false;\n }\n\n // Use param CSV file?\n if (iParam == 0) {\n // Prompt for then load param info from file.\n if (!LoadParamsCSVFile()) {\n return false;\n }\n }\n else {\n // Add single param info to the list.\n paramsInfo.push({\n name: userParamsList.item(iParam-1).name, // Note, subtract 1 since iParam == 0 is CSV file entry\n valueStart: unitsMgr.evaluateExpression(valueStartInput.expression),\n valueEnd: unitsMgr.evaluateExpression(valueEndInput.expression),\n valueStep: unitsMgr.evaluateExpression(valueStepInput.expression)\n });\n }\n\n // What to do after each param update?\n paramOperation = operationInput.selectedItem.index;\n if (paramOperation < 0 || paramOperation > PARAM_OPERATION.LAST) {\n ui.messageBox(\"Invalid operation\");\n return false;\n }\n\n // If operation is an export then prompt for folder location.\n var exportFilenamePrefix = \"\";\n var isExporting = (paramOperation >= PARAM_OPERATION.EXPORT_FUSION && paramOperation <= PARAM_OPERATION.EXPORT_STL);\n if (isExporting) {\n\n // Prompt for the base filename to use for the exports. This will\n // be appended with a counter or step value.\n var dlg = ui.createFileDialog();\n dlg.title = 'Select Export Filename Prefix';\n dlg.filter = 'All Files (*.*)';\n if (dlg.showSave() !== adsk.core.DialogResults.DialogOK) {\n return false;\n }\n\n // Strip extension\n var filename = dlg.filename;\n var extIdx = filename.lastIndexOf('.');\n if (extIdx >= 0) {\n filename = filename.substring(0, extIdx);\n }\n\n if (filename === '') {\n ui.messageBox('Invalid export filename');\n return false;\n }\n\n // TESTING\n //var tmpDir = adsk.tempDirectory();\n //exportFilenamePrefix = tmpDir + \"test\";\n // \"/var/folders/hx/nckzmpbd78xgd90krgjrwq940000gn/T/com.autodesk.mas.fusion360/test_Width_1\"\n\n exportFilenamePrefix = filename;\n }\n\n // Before doing the potential long param update operations, display a progress dialog\n // TODO: dialog not hiding at end\n //progressDialog = ui.createProgressDialog();\n //progressDialog.cancelButtonText = 'Cancel';\n //progressDialog.isBackgroundTranslucent = false;\n //progressDialog.isCancelButtonShown = true;\n\n // Show dialog\n //progressDialog.show('ParaParam Progress', 'Generating parameters...', 0, paramsInfo.length);\n\n // How many params are we changing?\n var paramsCount = paramsInfo.length;\n\n // Track current param value (expression) while iterating over all\n var paramValues = {};\n\n // Save off the original param values so we can restore later\n var userParamValuesOriginal = [];\n for (var iParam = 0; iParam < paramsCount; ++iParam) {\n\n // Get the custom param info\n var curParam = paramsInfo[iParam];\n\n // Get the actual parameter to modify\n var userParam = userParamsList.itemByName(curParam.name);\n if (!userParam) {\n break;\n }\n\n userParamValuesOriginal[curParam.name] = userParam.expression;\n\n paramValues[curParam.name] = userParam.expression;\n }\n\n // Now begin the param updates. This is a recursive function which will\n // iterate over each param and update. It's really just a way of doing\n // the following but for an arbitrary number of params:\n // for (i = 0; i < iCount; ++i)\n // for (j = 0; j < jCount; ++j)\n // for (k = 0; k < kCount; ++k)\n // print value(i,j,k)\n UpdateParams(0, paramValues, exportFilenamePrefix, exportSTLPerBodyInput.value);\n\n // Restore original param values on finish?\n if ( restoreValuesInput.value ) {\n for (var paramName in userParamValuesOriginal) {\n if (userParamValuesOriginal.hasOwnProperty(paramName)) {\n // Get the actual parameter to modify\n var userParam = userParamsList.itemByName(paramName);\n userParam.expression = userParamValuesOriginal[paramName];\n }\n }\n }\n }\n catch (e) {\n ui.messageBox('Failed to execute command : ' + (e.description ? e.description : e));\n }\n\n // Make sure this is gone. Sometimes hangs around!\n // TODO: dialog not hiding at end\n //if (progressDialog) {\n // progressDialog.hide();\n // progressDialog = null;\n //}\n };\n\n // Create and run command\n\ttry {\n var command = createCommandDefinition();\n var commandCreatedEvent = command.commandCreated;\n commandCreatedEvent.add(onCommandCreated);\n\n command.execute();\n }\n catch (e) {\n ui.messageBox('Script Failed : ' + (e.message ? e.message : e));\n adsk.terminate();\n }\n}", "title": "" }, { "docid": "686f50af9d52a7827d0b2c137d24f9ca", "score": "0.53057235", "text": "function createArguments() {\n var cli = commandLineArgs([{\n name: 'file',\n alias: 'f',\n type: String,\n defaultValue: \"\",\n description: \"Full path to the credentials file.\",\n required: true\n }, {\n name: 'section',\n alias: 's',\n type: String,\n defaultValue: \"default\",\n description: \"Title of the section that will be added to the .edgerc file.\"\n }, {\n name: 'path',\n alias: 'p',\n type: String,\n defaultValue: os.homedir() + \"/.edgerc\",\n description: \"Full path to the .edgerc file.\"\n }, {\n name: 'help',\n alias: 'h',\n description: \"Display help and usage information.\"\n }]);\n\n return cli;\n}", "title": "" }, { "docid": "1202931cfacaece272bacf1b2ce02c28", "score": "0.52852", "text": "constructor(args, opts) {\n // Calling the super constructor is important so our generator is correctly set up\n super(args, opts);\n\n this.argument('appname', { type: String, required: true });\n this.argument('version', { type: String, required: false });\n this.argument('description', { type: String, required: false });\n this.argument('username', { type: String, required: false });\n \n // And you can then access it later; e.g.\n this.log(this.options.appname);\n // Next, add your custom code\n //this.option('babel'); // This method adds support for a `--babel` flag\n\n }", "title": "" }, { "docid": "907cd4bedd60901f9a6c9578b9db8b48", "score": "0.5281574", "text": "function config()\n{\n\tif(!Process.env.AutoscalerMetalCloudEndpoint)\n\t{\n\t\tthrow new Error(\n\t\t\t'The AutoscalerMetalCloudEndpoint environment variable must be set.'\n\t\t);\n\t}\n\tif(!Process.env.AutoscalerMetalCloudAPIKey)\n\t{\n\t\tthrow new Error(\n\t\t\t'The AutoscalerMetalCloudAPIKey environment variable must be set.'\n\t\t);\n\t}\n\tif(!Process.env.AutoscalerClusterID)\n\t{\n\t\tthrow new Error(\n\t\t\t'The AutoscalerClusterID environment variable must be set.'\n\t\t);\n\t}\n\tif(!Process.env.AutoscalerUserID)\n\t{\n\t\tthrow new Error(\n\t\t\t'The AutoscalerUserID environment variable must be set.'\n\t\t);\n\t}\n\n\treturn {\n\t\t'strEndpointURL': Process.env.AutoscalerMetalCloudEndpoint,\n\t\t'strAPIKey': Process.env.AutoscalerMetalCloudAPIKey,\n\t\t'nClusterID': Process.env.AutoscalerClusterID,\n\t\t'nUserID': Process.env.AutoscalerUserID,\n\t};\n}", "title": "" }, { "docid": "9dda67a342b81d2d240b74ce062dd4a4", "score": "0.5266983", "text": "get commandArguments() {\n return this.body.trim().split(' ').slice(1);\n }", "title": "" }, { "docid": "bafa6396d4ecad1468ff74d7957c8f05", "score": "0.5263696", "text": "enterParameters(ctx) {\n\t}", "title": "" }, { "docid": "c8bfc1983569d471f1d56f8fc7467bbb", "score": "0.52512795", "text": "SetParams() {}", "title": "" }, { "docid": "477b7e0b7f216d106db3360c05b5e57e", "score": "0.5247701", "text": "function parseArgument() {\n const [ _a, _b, arg ] = process.argv;\n if (arg === \"--version\" || arg === \"-v\")\n printAndExit(version);\n\n if (arg === undefined)\n return loadConfig(\"genserver.json\");\n\n if (arg.endsWith(\".json\"))\n return loadConfig(arg);\n\n printAndExit(\"Usage: genserver [genserverconfig.json]\");\n}", "title": "" }, { "docid": "b92ad91997741a41474ff4243c228510", "score": "0.52386224", "text": "get parameters() { return []; }", "title": "" }, { "docid": "d96da4435c07dfc55bd64fc58b3adaf0", "score": "0.5233921", "text": "function checkParameters()\n{\n\tlanguage = getURLParameter(\"lang\");\n\tprojectId = getURLParameter(\"proj\");\n\t\n\tif(language != \"fr\" && language !=\"en\")\n\t\tlanguage = defaultLang;\n}", "title": "" }, { "docid": "48ef5a0e63b20040c73786011cb47d33", "score": "0.52268505", "text": "invocationParams() {\n return {\n stream: this.streaming,\n user_id: this.userId,\n temperature: this.temperature,\n top_p: this.topP,\n penalty_score: this.penaltyScore,\n };\n }", "title": "" }, { "docid": "4152f46b3290a793b7126ee37706070c", "score": "0.5224521", "text": "constructor(args, opts) {\n super(args, opts);\n\n // This makes `appname` a required argument.\n this.argument(\"appname\", { type: String, required: true });\n\n // And you can then access it later; e.g.\n this.log(this.options.appname);\n \n }", "title": "" }, { "docid": "f0ea31c3af6280a0150bb0c0ad24465a", "score": "0.5180977", "text": "async function runOnCommand() {\n //first two args are app path and node command. So we slice them.\n let args = process.argv.slice(2);\n // console.log(\"args.length >>>>>>>>>>>>\",args.length)\n //If args length equals 0, it means called in a function\n if (args.length == 0) {\n console.log('Internal Call For Verify OTP !!!')\n } else if (args.length == 10) {\n //Get otp function requires 5 parameters.\n let result = await getstyles(args[0], args[1], args[2], args[3], args[4], args[5], args[6], args[7], args[8], args[9]);\n console.log(result);\n } else {\n console.error('Args count must be 10. Debug, Base Url, User Type, Country Code and Mobile Number !!!');\n }\n}", "title": "" }, { "docid": "b965fd8bda45062170a411257aec3090", "score": "0.5176856", "text": "function process_args () {\r\n\tvar a = {};\r\n\tfor (var i = 2; i < process.argv.length; i++) {\r\n\t\tvar string = process.argv[i];\r\n\t\tvar kv = string.split('=');\r\n\t\ta[kv[0]] = kv[1];\r\n\t}\r\n\treturn a;\r\n}", "title": "" }, { "docid": "26ff98831d775aeb47d6812de6559914", "score": "0.516319", "text": "constructor(name,parameters,commandBuilder,description) {\n //all properties are readonly\n Object.defineProperty(this, \"name\", {value: name, writable: false});\n Object.defineProperty(this, \"parameters\", {value: parameters, writable: false});\n Object.defineProperty(this, \"commandBuilder\", {value: commandBuilder, writable: false});\n Object.defineProperty(this, \"description\", {value: description, writable: false});\n }", "title": "" }, { "docid": "ecb6668d1666c53be93fb873bd44dcbb", "score": "0.5157375", "text": "function setGlobalParameters() {\n globals.idPath = unwrap(parameters.idPath) || 'id';\n globals.namePath = unwrap(parameters.namePath) || globals.idPath;\n globals.childrenPath = unwrap(parameters.childrenPath) || 'children';\n globals.areaPath = unwrap(parameters.areaPath) || 'area';\n globals.colorPath = unwrap(parameters.colorPath) || 'color';\n globals.colorPalette = unwrap(parameters.colorPalette) || 'PuBu';\n globals.fontSize = unwrap(parameters.fontSize) || 11;\n globals.fontFamily = unwrap(parameters.fontFamily) || \"Times New Roman\";\n globals.fontColor = unwrap(parameters.fontColor) || \"#000\";\n\n // Set global colorPalette (array, undefined or string) parameters:\n if (globals.colorPalette instanceof Array) {\n if (globals.colorPalette.length === 1) globals.colorPalette[1] = globals.colorPalette[0];\n } else {\n globals.colorPalette = colorbrewer[globals.colorPalette][3];\n }\n }", "title": "" }, { "docid": "99a6c102b9f8f169065bba7d6325ba92", "score": "0.5130664", "text": "async function ReadArgumentsAndConfig(configFile)\n{\n\tvar confab = new Confabulous();\n\tconfab.add(config => { return loaders.args() });\n\tif (configFile != undefined)\n\t{\n\t\tconfab.add(config => { return loaders.require({ path: configFile }) });\n\t}\n\tvar confab_end = promisify(confab.end);\n\treturn confab_end()\n\t.then((data => \n\t{\n\t\tif (configFile === undefined && data['config-file'] != undefined)\n\t\t{\n\t\t\treturn ReadArgumentsAndConfig(data['config-file']);\n\t\t}\n\t\tconfig = data;\n\t\t// Set the default value for the active flag in case it is not specified\n\t\tif (config.active === undefined && config.toggle === undefined)\n\t\t{\n\t\t\tconfig.active = true;\n\t\t}\n\t\treturn ValidateConfig();\n\t}));\n}", "title": "" }, { "docid": "37424afef1721d1acdadbd31a632a8fe", "score": "0.5120963", "text": "get(parameter){switch(parameter){case'realm':return this._configuration.realm;case'ha1':return this._configuration.ha1;default:debugerror('get() | cannot get \"%s\" parameter in runtime',parameter);return undefined;}}", "title": "" }, { "docid": "460503799b41e9d6fd117d46757019d3", "score": "0.5111393", "text": "invocationParams(options) {\n return {\n model: this.modelName,\n temperature: this.temperature,\n top_k: this.topK,\n top_p: this.topP,\n stop_sequences: options?.stop?.concat(DEFAULT_STOP_SEQUENCES) ??\n this.stopSequences ??\n DEFAULT_STOP_SEQUENCES,\n max_tokens_to_sample: this.maxTokensToSample,\n stream: this.streaming,\n ...this.invocationKwargs,\n };\n }", "title": "" }, { "docid": "261d4ab9b69db9e65d9521de4c83c973", "score": "0.51102465", "text": "function getParameterDefinitions() {\n\n return [{\n name: 'resolution',\n type: 'choice',\n values: [0, 1, 2, 3, 4],\n captions: ['very low (6,16)', 'low (8,24)', 'normal (12,32)', 'high (24,64)', 'very high (48,128)'],\n initial: 2,\n caption: 'Resolution:'\n }, {\n name: 'part',\n type: 'choice',\n values: ['top', 'bottom', 'assembled'],\n captions: ['top', 'bottom', 'assembled'],\n initial: 'assembled',\n caption: 'Part:'\n }, {\n name: 'thickness',\n type: 'float',\n initial: 2.0,\n caption: 'Thickness:'\n }, {\n name: 'gpio',\n type: 'checkbox',\n checked: true,\n caption: 'GPIO:'\n }, {\n name: 'camera',\n type: 'checkbox',\n checked: true,\n caption: 'Camera:'\n }, {\n name: 'display',\n type: 'checkbox',\n checked: true,\n caption: 'Display:'\n }, {\n name: 'text',\n type: 'text',\n initial: 'RPi',\n caption: 'Text:'\n }];\n}", "title": "" }, { "docid": "b4a865b5ffc0891cbc426092c55b03c1", "score": "0.51091725", "text": "function parseArgs() {\n script.arguments('<dir> <url>')\n .action(function (dir, playlistUrl) {\n // set vars\n mp3Dir = dir;\n playlistId = url.parse(playlistUrl, true).query.list;\n })\n .parse(process.argv);\n }", "title": "" }, { "docid": "125c6baedfb0daf9cb9ed4949f3ff453", "score": "0.5097965", "text": "function processCommandLineArgs() {\n var nsCommandLine = window.arguments[0];\n nsCommandLine = nsCommandLine.QueryInterface(Components.interfaces.nsICommandLine);\n port = getCommandLineArg(nsCommandLine, 'port', port);\n}", "title": "" }, { "docid": "7ae8ee88b6c535b838af69a92f60449e", "score": "0.50879055", "text": "function getConfig() {\n // read command line options\n commander\n .version(version)\n .option('--config [file]', 'Reads these options from a config JSON file')\n .option('--listen [value]', 'Listen on port or socket [3001]', '3001')\n .option('--api-url [value]', 'The URL of the web API', 'http://localhost:3000')\n .parse(process.argv);\n \n // check if a config file was specified\n if (commander.config) {\n let config = JSON.parse(fs.readFileSync(commander.config));\n return _.extend(config, commander);\n } else {\n return commander;\n }\n}", "title": "" }, { "docid": "e6638c9c04c51e5c012517c2e41c4655", "score": "0.50857985", "text": "function getPorcentagem(){\n return process.arg[3]\n}", "title": "" }, { "docid": "52070b8da173159dba4e7050e4d270f1", "score": "0.50756484", "text": "function getValorReal(){\n return process.arg[2];\n}", "title": "" }, { "docid": "b75664b10887e0def33d21a6ed330b08", "score": "0.50747544", "text": "async __bootstrapArgv() {\n var title = \"qooxdoo command line interface\";\n title = \"\\n\" + title + \"\\n\" + \"=\".repeat(title.length);\n\n title += `\nVersion: v${await qx.tool.config.Utils.getQxVersion()}\n`;\n title += \"\\n\";\n title += `Typical usage:\n qx <commands> [options]\n\n Type qx <command> --help for options and subcommands.`;\n let yargs = this.__createYargs().usage(title);\n this.argv = yargs.argv;\n // Logging - needs to be unified..\n if (this.argv.debug) {\n qx.log.Logger.setLevel(\"debug\");\n } else if (this.argv.quiet) {\n qx.log.Logger.setLevel(\"error\");\n } else {\n qx.log.Logger.setLevel(\"info\");\n }\n // use node console log appender with colors\n qx.log.appender.NodeConsole.setUseColors(this.argv.colorize);\n }", "title": "" }, { "docid": "e1452e6f30db6f67237c2ba54c1b53b9", "score": "0.50703794", "text": "function readInputs(program, clientKey, clientSecret, token, tokenSecret){\n\tthis.program = program;\n\tthis.clientkey = clientKey;\n\tthis.clientSecret = clientSecret;\n\tthis.token = token;\n\tthis.tokenSecret = tokenSecret;\n}", "title": "" }, { "docid": "5e1009e44926fee5818d796c8d7d4c2d", "score": "0.50608623", "text": "setupVariables(){\n let onesyncFlag = (this.config.onesync)? '+set onesync_enabled 1' : '';\n let infinityFlag = (this.config.infinity) ? '+set onesync_enableInfinity 1' : '';\n if(globals.config.osType === 'Linux'){\n this.spawnVariables = {\n shell: '/bin/sh',\n cmdArgs: [`${this.config.buildPath}/run.sh`, `${onesyncFlag} ${infinityFlag} +exec \"${this.tmpExecFile}\"`]\n };\n }else if(globals.config.osType === 'Windows_NT'){\n this.spawnVariables = {\n shell: 'cmd.exe',\n cmdArgs: ['/c', `${this.config.buildPath}/run.cmd ${onesyncFlag} ${infinityFlag} +exec \"${this.tmpExecFile}\"`]\n };\n }else{\n logError(`OS type not supported: ${globals.config.osType}`, context);\n process.exit();\n }\n }", "title": "" }, { "docid": "2f51440415ac768096893b458ebc3ff5", "score": "0.505589", "text": "function get_cli_data_args()\n{\n var arr = [];\n for (var i=2, stop=process.argv.length; i<stop; ++i)\n arr.push(process.argv[i]);\n\n return arr;\n}", "title": "" }, { "docid": "568c6ba3fc2871fda44fd9de6faf2b77", "score": "0.5053181", "text": "function createArgumentsDict() {\n\tlet argumentsDict = {};\n\tlet argumentspassed = process.argv.slice(2,);\n\targumentspassed.forEach((eachArgument, index) => {\n\t\tif (eachArgument.slice(0,2) === '--') {\n\t\t\targumentsDict[eachArgument.slice(2,)] = argumentspassed[index + 1];\n\t\t}\n\t});\n\treturn argumentsDict;\n}", "title": "" }, { "docid": "f3836968d4ee2bdf048fef7c7f37a3b1", "score": "0.5052257", "text": "initGeneralOptions() {\n prompt.get([\"input\"], this.processGeneralOptions)\n }", "title": "" }, { "docid": "a34d7e51428f59a0f8d26f9fcd265c3a", "score": "0.50426275", "text": "function getParamFromCliArgs () {\n const filteredArgs = process.argv.filter(arg => !arg.includes('--'))\n\n if (filteredArgs.length > 2) {\n return filteredArgs[2]\n }\n\n return null\n}", "title": "" }, { "docid": "99d485ede5f95fd0930a0a20b5d34440", "score": "0.50399727", "text": "function setConfig(args)\n {\n getConfig = function()\n {\n return args;\n };\n }", "title": "" }, { "docid": "9136e7d0702a5c218fa0792ff8008c31", "score": "0.50178677", "text": "function argumentData() {\n var title = element.find('.title textarea').val();\n var premises = element.find('.premise textarea').map(function(){ return $(this).val() });\n var conclusion = element.find('.conclusion textarea').val();\n return { title: title, premises: premises, conclusion: conclusion };\n }", "title": "" }, { "docid": "6c51248570715a15d684a00fca738128", "score": "0.50107914", "text": "function getCommandLineVariables(){\n\t\tvar array = process.argv.slice(2);\n\t\tarray = array.map(function(num){\n\t\t\treturn parseInt(num);\n\t\t});\n\t\treturn array;\n\t}", "title": "" }, { "docid": "7d2173dfc70208ddecefd9a8c8c5728e", "score": "0.5010086", "text": "async __fullArgv() {\n let yargs = this.__createYargs()\n .help(true)\n .option(\"set\", {\n describe: \"sets an environment value for the compiler\",\n nargs: 1,\n requiresArg: true,\n type: \"string\",\n array: true\n })\n .option(\"set-env\", {\n describe: \"sets an environment value for the application\",\n nargs: 1,\n requiresArg: true,\n type: \"string\",\n array: true\n })\n .check(argv => {\n // validate that \"set-env\" is not set or if it is\n // set it's items are strings in the form of key=value\n const regexp = /^[^=\\s]+=.+$/;\n const setEnv = argv[\"set-env\"];\n\n if (\n !(setEnv === undefined || !setEnv.some(item => !regexp.test(item)))\n ) {\n throw new Error(\n \"Argument check failed: --set-env must be a key=value pair.\"\n );\n }\n return true;\n });\n\n qx.tool.cli.Cli.addYargsCommands(\n yargs,\n [\n \"Add\",\n \"Clean\",\n \"Compile\",\n \"Config\",\n \"Deploy\",\n \"Es6ify\",\n \"ExportGlyphs\",\n \"Package\",\n \"Pkg\", // alias for Package\n \"Create\",\n \"Lint\",\n \"Run\",\n \"Test\",\n \"Serve\",\n \"Migrate\"\n ],\n\n \"qx.tool.cli.commands\"\n );\n\n this.argv = await yargs.demandCommand().strict().argv;\n await this.__notifyLibraries();\n }", "title": "" }, { "docid": "6196c23ba0ad3c6e303d0744fb2a1e0c", "score": "0.49676082", "text": "start() {\n this.cliLog('Preparing....');\n\n this._getLocation();\n this._checkVersion();\n this._checkVariableInYML();\n\n }", "title": "" }, { "docid": "0c4f8221608109916077a6e47c649a7a", "score": "0.49627557", "text": "function loadParams() {\n const p = localStorage.getItem(\"params\");\n if (p) {\n console.log(\"Importing Settings\");\n console.log(JSON.parse(p));\n pane.importPreset(JSON.parse(p));\n }\n}", "title": "" }, { "docid": "88bda8c81c655d8a664db80c536a5e47", "score": "0.49486047", "text": "function loadConfig(){\n\tvar data = fs.readFileSync('params.js').toString().split('\\n')\n\n for (var line in data) {\n\n var ln = data[line].split(':');\n\n if (ln[0] == 'LOG_LEVEL')\n {winston.level = ln[1].replace(/ /g,\"\").replace(/\\t/g,\"\").replace(/'/g,\"\")}\n\n if (ln[0] == 'SOURCE_ACCOUNT_ID')\n {sourceAccountId = ln[1].replace(/ /g,\"\").replace(/\\t/g,\"\").replace(/'/g,\"\")}\n\n if (ln[0] == 'DESTINATION_ACCOUNT_ID')\n {destinationAccountId = ln[1].replace(/ /g,\"\").replace(/\\t/g,\"\").replace(/'/g,\"\")}\n\n if (ln[0] == 'SOURCE_QUERY_API_KEY')\n {sourceQueryApiKey = ln[1].replace(/ /g,\"\").replace(/\\t/g,\"\").replace(/'/g,\"\")}\n\n if (ln[0] == 'DESTINATION_INSERT_API_KEY')\n {destinationInsertApiKey = ln[1].replace(/ /g,\"\").replace(/\\t/g,\"\").replace(/'/g,\"\")}\n\n if (ln[0] == 'QUERY')\n {query = ln[1].replace(/'/g,\"\")}\n\n if (ln[0] == 'EVENT_TYPE')\n {eventType = ln[1].replace(/ /g,\"\").replace(/\\t/g,\"\").replace(/'/g,\"\")} \n\n }\n}", "title": "" }, { "docid": "0ebdf30df67608a4c373e353b6ae0226", "score": "0.49432155", "text": "function getParameterDefinitions() {\n return [\n { name: 'disk', type: 'float', initial: 77, caption: \"disk diameter:\" },\n { name: 'hub', type: 'float', initial: 3, caption: \"hub diameter:\" },\n { name: 'slots', type: 'int', initial: 80, caption: \"number of slots:\" },\n { name: 'slotd', type: 'float', initial: 11, caption: \"slots inset:\" },\n { name: 'slotlength', type: 'float', initial: 3.5, caption: \"slot length:\" },\n { name: 'mask', type: 'float', initial: 0.1, caption: \"slot mask adj:\" },\n { name: 'cutfudge', type: 'float', initial: 0.4, caption: \"laser cut width or<br> (-) filament spread:\" },\n { name: 'thick', type: 'float', initial: 3, caption: \"material thickness:\" },\n { name: 'othick', type: 'float', initial: 0.4, caption: \"opaque thickness:\" },\n{ name: 'output', type: 'choice', caption: 'Output:', values: [0, 1], captions: [\"Assembly\", \"Parts\"], initial: 0 } ];\n}", "title": "" }, { "docid": "09b8b5436786920a83d10c49db8e4f0b", "score": "0.4939469", "text": "function Param(){\n\t\t// description:\n\t\t//\t\tIt represents a single GPTask parameter and the attached progressive number,\n\t\t//\t\tused to sort all the input parameters\n\t\tvar dataType;\n\t\tvar name;\n\t\tvar parName;\n\t\tvar direction;\n\t\tvar paramType;\n\t\tvar description;\n\t\tvar defValue;\n\t\tvar choiceList;\n\t\tvar progressiveNum;\n\t}", "title": "" }, { "docid": "313cc028e88efc632182d920d0c0d293", "score": "0.4928335", "text": "function Parameters() {\n Object.defineProperty(this, CACHE, {\n writable: true,\n value: {}\n });\n}", "title": "" }, { "docid": "6a3c0e77efd75cbdad6358813b474ec1", "score": "0.49278516", "text": "function Parameters() {\n Object.defineProperty(this, CACHE, {\n writable: true,\n value: {}\n });\n }", "title": "" }, { "docid": "6aa94c233d168d8d3e126c48cac9873e", "score": "0.4922503", "text": "function parseParameters(parameters) {\n\n // Numeric & boolean values\n if (parameters.mode === \"default\") {\n scope.sizeX = parameters.sizeX || BUILDING_DEFAULT_SIZE_X;\n scope.sizeZ = parameters.sizeZ || BUILDING_DEFAULT_SIZE_Y;\n scope.windowRepetition = parameters.windowRepetition || BUILDING_DEFAULT_WINDOW_REPETITION;\n scope.probabilityNextFloorDifferentShape = parameters.probabilityNextFloorDifferentShape || BUILDING_DEFAULT_PROBABILITY_NEXT_FLOOR_DIFFERENT_SHAPE;\n scope.posX = parameters.posX || BUILDING_DEFAULT_POS_X;\n scope.posZ = parameters.posZ || BUILDING_DEFAULT_POS_Y;\n scope.height = parameters.height || BUILDING_DEFAULT_HEIGHT;\n scope.floorHeight = parameters.floorHeight || BUILDING_DEFAULT_FLOOR_HEIGHT;\n scope.windowsSeparation = parameters.windowsSeparation || BUILDING_DEFAULT_WINDOWS_SEPARATION;\n minSolidWidth = parameters.minSolidWidth || BUILDING_DEFAULT_MIN_SOLID_WIDTH;\n maxSolidWidth = parameters.maxSolidWidth || BUILDING_DEFAULT_MAX_SOLID_WIDTH;\n scope.textureWall = parameters.textureWall || DEFAULT_BUILDING_WALL_TEXTURE_PATH;\n scope.textureRoof = parameters.textureRoof || DEFAULT_BUILDING_ROOF_TEXTURE_PATH;\n } else {\n scope.sizeX = parameters.sizeX || THREE.BuildingUtils.randomBetween(25, 250);\n scope.sizeZ = parameters.sizeZ || THREE.BuildingUtils.randomBetween(25, 250);\n // Even in random mode we want the default value for Window Repetition. This is because the default value is \"random\"\n scope.windowRepetition = parameters.windowRepetition || BUILDING_DEFAULT_WINDOW_REPETITION;\n scope.probabilityNextFloorDifferentShape = parameters.probabilityNextFloorDifferentShape || THREE.BuildingUtils.randomBetween(.05, .25);\n scope.posX = parameters.posX || BUILDING_DEFAULT_POS_X;\n scope.posZ = parameters.posZ || BUILDING_DEFAULT_POS_Y;\n scope.floorHeight = parameters.floorHeight || THREE.BuildingUtils.randomBetween(7, 13);\n scope.height = parameters.height || scope.floorHeight * THREE.BuildingUtils.randomBetween(1, 15);\n scope.windowsSeparation = parameters.windowsSeparation || THREE.BuildingUtils.randomBetween(4, 8);\n minSolidWidth = parameters.minSolidWidth || BUILDING_DEFAULT_MIN_SOLID_WIDTH;\n maxSolidWidth = parameters.maxSolidWidth || BUILDING_DEFAULT_MAX_SOLID_WIDTH;\n scope.textureWall = parameters.textureWall || getRandomBuildingWallTexture();\n scope.textureRoof = parameters.textureRoof || getRandomBuildingRoofTexture();\n\n if (parameters.windowsGroup !== undefined) {\n scope.windowsGroup = parameters.windowsGroup;\n } else {\n scope.windowsGroup = (Math.random() < .5) ? \"pairs\" : \"normal\";\n }\n }\n\n // Roof\n // Set and empty array to make the following code more simple\n if (parameters.roof === undefined) {\n parameters.roof = [];\n }\n\n if (parameters.roof.wallHeightProportion !== undefined)\n scope.roofWallProportion = parameters.roof.wallHeightProportion;\n else {\n if (parameters.mode === \"default\") {\n scope.roofWallProportion = BUILDING_DEFAULT_ROOF_WALL_PROPORTION;\n } else {\n scope.roofWallProportion = THREE.BuildingUtils.randomBetween(.2, .6);\n }\n }\n\n if (parameters.roof.objects === undefined) {\n if (parameters.mode === \"default\") parameters.roof.objects = BUILDING_DEFAULT_ROOF_ELEMENTS;\n else parameters.roof.objects = getRandomRoofObjects();\n }\n\n\n // Windows\n if (parameters.windows === undefined) {\n parameters.windows = [];\n }\n\n if (parameters.windows.length === 0) {\n if (parameters.mode === \"default\") parameters.windows = BUILDING_DEFAULT_WINDOWS;\n else parameters.windows = getRandomWindows();\n }\n\n\n // Floors\n if (parameters.floors === undefined) {\n if (parameters.mode === \"default\") {\n parameters.floors = new Array({\n \"windows\": BUILDING_DEFAULT_FIRST_FLOOR_WINDOWS\n });\n } else {\n parameters.floors = new Array({\n \"windows\": getRandomFirstFloorWindows()\n });\n }\n }\n if (parameters.floors[0].floorHeight === undefined) {\n if (parameters.mode === \"default\") parameters.floors[0].floorHeight = BUILDING_DEFAULT_FLOOR_HEIGHT;\n else parameters.floors[0].floorHeight = THREE.BuildingUtils.randomBetween(scope.floorHeight, scope.floorHeight * 1.5);\n }\n if (parameters.floors[0].windowsSeparation === undefined) {\n if (parameters.mode === \"default\") parameters.floors[0].windowsSeparation = BUILDING_DEFAULT_WINDOWS_SEPARATION;\n else parameters.floors[0].windowsSeparation = THREE.BuildingUtils.randomBetween(scope.windowsSeparation, scope.windowsSeparation * 2);\n }\n parameters.floors[0].windowsGroup = \"normal\";\n }", "title": "" }, { "docid": "ada7b2f186fcad2d00497fa1a7bf8485", "score": "0.49216977", "text": "constructor() { \n \n Parameter.initialize(this);\n }", "title": "" }, { "docid": "0c405bad2837025efdd0776f830ff779", "score": "0.49113774", "text": "function Parameters() {\n Object.defineProperty(this, CACHE, {writable:true, value: {}});\n}", "title": "" }, { "docid": "0c405bad2837025efdd0776f830ff779", "score": "0.49113774", "text": "function Parameters() {\n Object.defineProperty(this, CACHE, {writable:true, value: {}});\n}", "title": "" }, { "docid": "d8089b9bbd3eb593cbec576697e88974", "score": "0.49103823", "text": "function parseArgs(args) {\n if (args.length < 2) {\n throw new Error('Error! Too few arguments passed to env-url.');\n }\n var url = args[0], command = args[1], commandArgs = args.slice(2);\n return {\n url: url,\n command: command,\n commandArgs: commandArgs\n };\n}", "title": "" }, { "docid": "0dd475f1de56b94412c745e9b023f425", "score": "0.49077028", "text": "constructor() {\n Parameters.initialize(this);\n }", "title": "" }, { "docid": "db6e48bf8c2dc98277013fcf65f54305", "score": "0.49035773", "text": "constructor(args, opts) {\n super(args, opts);\n\n // This makes `appname` a required argument.\n this.argument(\"entityName\", {type: String, required: true});\n this.appName = this.config.get('appName');\n this.dbType = this.config.get('dbType');\n if (!this.appName) {\n throw new Error(\"Folder is Not recognized as a valid Flare Project.\")\n }\n // And you can then access it later; e.g.\n this.entityName = this.options.entityName;\n const entityNameCapitalized = _.upperFirst(this.entityName);\n const entityConfigBasePath = this.destinationPath() + \"/\" + entityConfigBase;\n if (!fileSystem.existsSync(entityConfigBasePath)) {\n fileSystem.mkdirSync(entityConfigBasePath);\n }\n this.entityConfigBasePath = entityConfigBasePath + '/' + entityNameCapitalized + '.json';\n this.useConfigurationFile = fileSystem.existsSync(this.entityConfigBasePath);\n\n }", "title": "" }, { "docid": "bed4d54340f6d0ccce0542a734731d56", "score": "0.48956144", "text": "function ParameterService() {\n var svc = this;\n\n // Check to see if there are any parameters, if not put a default\n if (page.pipeline.parameters.length === 0) {\n page.pipeline.parameters.push({\n id: \"no_parameters\",\n label: \"\",\n parameters: []\n });\n }\n\n /**\n * Duplicated copy of the original set of parameters on the page\n * so that we can quickly roll back to default values for any\n * parameter set.\n */\n var originalSettings = page.pipeline.parameters.map(function(params) {\n return {\n currentSettings: ng.copy(params),\n defaultSettings: ng.copy(params)\n };\n });\n\n var selectedParameters = originalSettings[0];\n\n /**\n * Get the settings that the page currently has.\n */\n svc.getOriginalSettings = function() {\n return originalSettings;\n };\n\n /**\n * Add customized parameters to the drop-down, we'll duplicate\n * the values in here so that we can go back to defaults.\n *\n * @param settingsToAdd the settings to add to the current set of settings.\n */\n svc.addSettingsToFront = function(settingsToAdd) {\n var savedParameters = {\n currentSettings: ng.copy(settingsToAdd),\n defaultSettings: ng.copy(settingsToAdd)\n };\n originalSettings.unshift(savedParameters);\n selectedParameters = originalSettings[0];\n };\n\n /**\n * Get the currently selected parameters from the page.\n */\n svc.getSelectedParameters = function() {\n return selectedParameters;\n };\n\n /**\n * Set the current set of parameters on the page.\n *\n * @param currentSelection the parameters that are currently selected\n */\n svc.setSelectedParameters = function(currentSelection) {\n selectedParameters = currentSelection;\n };\n\n /**\n * Reset one of the values in the currently selected\n * parameters back to its default value.\n * @param index the index of the parameter to reset.\n */\n svc.resetCurrentSelectionIndex = function(index) {\n selectedParameters.currentSettings.parameters[index] = ng.copy(\n selectedParameters.defaultSettings.parameters[index]\n );\n };\n\n /**\n * Completely reset the current settings back to the set of default values.\n */\n svc.resetCurrentSelection = function() {\n selectedParameters.currentSettings = ng.copy(\n selectedParameters.defaultSettings\n );\n };\n }", "title": "" }, { "docid": "92f4c6b0da0fc5ce8d11c0e69e29df11", "score": "0.48910806", "text": "function argumentsAvailable(par1){\n console.log(\"this is the par - \", par1);\n console.log(\"This are the arbitrary args : \")\n console.log(arguments);\n console.log(\"See how U can see the args at the log. It doesn't know what is arbitrary and what not \")\n}", "title": "" }, { "docid": "74e11bc95ad1812f8624a016e6b976eb", "score": "0.48827907", "text": "_prepareUserArgs(argv, parseOptions) {\n if (argv !== undefined && !Array.isArray(argv)) {\n throw new Error('first parameter to parse must be array or undefined');\n }\n parseOptions = parseOptions || {};\n\n // Default to using process.argv\n if (argv === undefined) {\n argv = process.argv;\n // @ts-ignore: unknown property\n if (process.versions && process.versions.electron) {\n parseOptions.from = 'electron';\n }\n }\n this.rawArgs = argv.slice();\n\n // make it a little easier for callers by supporting various argv conventions\n let userArgs;\n switch (parseOptions.from) {\n case undefined:\n case 'node':\n this._scriptPath = argv[1];\n userArgs = argv.slice(2);\n break;\n case 'electron':\n // @ts-ignore: unknown property\n if (process.defaultApp) {\n this._scriptPath = argv[1];\n userArgs = argv.slice(2);\n } else {\n userArgs = argv.slice(1);\n }\n break;\n case 'user':\n userArgs = argv.slice(0);\n break;\n default:\n throw new Error(`unexpected parse option { from: '${parseOptions.from}' }`);\n }\n if (!this._scriptPath && require.main) {\n this._scriptPath = require.main.filename;\n }\n\n // Guess name, used in usage in help.\n this._name = this._name || (this._scriptPath && path.basename(this._scriptPath, path.extname(this._scriptPath)));\n\n return userArgs;\n }", "title": "" }, { "docid": "2446a3f594af3e77b16687ef628b04f1", "score": "0.48824167", "text": "get prepare() {\n const { command, args, transform, color, ...rest } = this.options;\n const { uid, gid, env, cwd } = this.spawnmon.options;\n const _env = { ...process.env, ...env };\n const options = { uid, gid, env: _env, cwd, ...rest };\n return [command, args, options];\n }", "title": "" }, { "docid": "0589eb5a456e87553c6075e1fdda24dc", "score": "0.4881479", "text": "function getOptions() {\n const o = {};\n input.forEach(i => {\n if(i.slice(0,2) !== '--') return; // we don't deal with unknown params\n const [option,value] = i.slice(2).split('=');\n o[option] = value || true;\n });\n return o;\n}", "title": "" }, { "docid": "46912260d838383775ff1d2b6bdad077", "score": "0.48791698", "text": "processServiceEnv(){\n var serviceDefaults = {\n ID: process.env.SERVICE_ID,\n Name: process.env.SERVICE_NAME,\n Address: process.env.SERVICE_ADDRESS,\n Port: process.env.SERVICE_PORT || -1,\n Tags: process.env.SERVICE_TAGS ? process.env.SERVICE_TAGS.split(',') : [],\n EnableTagOverride: process.env.SERVICE_EnableTagOverride? true: false\n };\n return serviceDefaults;\n }", "title": "" }, { "docid": "07408817e7532647d52734e178d402f7", "score": "0.48749045", "text": "updateParams() {\n const {\n storageaccounttype,\n kind,\n out = {}\n } = this;\n\n if (storageaccounttype) {\n out['storageaccounttype'] = storageaccounttype;\n }\n if (kind) {\n out['kind'] = kind;\n }\n\n set(this, 'parameters', out);\n }", "title": "" }, { "docid": "70f761f35cf9adbd8a086f517a09d2ca", "score": "0.48745608", "text": "function ArgumentProcessor() {\n\n this.argSpec = require('optimist')\n .usage('Usage: $0 [payment gateway module] -c [credit*|debit] -t [visa*|mastercard|amex] -a [y*|n] --modules')\n .alias('c', 'card')\n .alias('t', 'type')\n .alias('a', 'auth')\n .alias('a', 'authorises')\n .alias('modules', 'help')\n .alias('modules', 'module')\n .default('c', 'credit')\n .default('t', 'visa')\n .default('a', 'y')\n .default('modules', false)\n\n const args = this.argSpec.argv\n\n this.args = process.argv\n this.showModulesList = args.modules\n this.paymentGateway = args._[0] !== undefined && args._[0].toLowerCase !== undefined \n ? args._[0].toLowerCase() : undefined\n this.cardType = args.c !== undefined && args.c.toLowerCase !== undefined \n ? args.c.toLowerCase() : 'credit'\n this.provider = args.t !== undefined && args.t.toLowerCase !== undefined \n ? args.t.toLowerCase() : 'visa'\n this.auth = args.a !== undefined && args.a.toLowerCase !== undefined && args.a.toLowerCase() === 'n' \n ? false : true\n this.validationErrors = []\n\n /**\n * Checks that the arguments provided are valid.\n *\n * @returns A flag, to indicate the success or failiure of validation.\n */\n this.isValid = function() {\n\n if (this.paymentGateway === undefined) {\n this.validationErrors.push('The payment gateway module has not been provided.')\n } else if (!supportedModules.includes(this.paymentGateway)) {\n this.validationErrors.push(`The requested payment gateway '${this.paymentGateway}' is not a supported payment gateway module.`)\n }\n\n if (this.cardType !== 'credit' && this.cardType !== 'debit') {\n this.validationErrors.push(`The requested card type '${this.cardType}' is not a valid type (credit or debit).`)\n }\n\n if (this.provider !== 'visa' && this.provider !== 'mastercard' && this.provider !== 'amex') {\n this.validationErrors.push(`The requested card provider '${this.provider}' is not valid (visa, mastercard or amex).`)\n }\n\n return this.validationErrors.length < 1;\n }\n\n /**\n * Shows the help info\n */\n this.showHelp = function() {\n console.log('FakePay supports the following payment gateway modules...')\n supportedModules.map((mod) => console.log(`- ${mod}`))\n console.log('Feel free to clone an existing module, build your own and add it to the project!')\n console.log('-----------------------------')\n this.argSpec.showHelp()\n }\n}", "title": "" }, { "docid": "513a1f0c1bb612e40a31535d7f9f408f", "score": "0.4874535", "text": "function ParametersReader(options, element) {\n\n\t\tthis.options = options;\n\t\tthis.e = element;\n\t\tthis.$e = $(element);\n\n\t\tthis.fetch = function(param) {\n\t\t\treturn this.$e.attr(param)\n\t\t}\n\n\t\tthis.read = function() {\n\t\t\tthis.options.setTitle(this.fetch(\"data-title\"));\n\t\t\tthis.options.setDisplayColumns(this.fetch(\"data-displayColumns\"));\n\t\t\tthis.options.setUnits(this.fetch(\"data-providedBy\"));\n\t\t\tthis.options.setEligibilities(this.fetch(\"data-eligibility\"));\n\t\t\tthis.options.setResearchMethod(this.fetch(\"data-researchMethod\"));\n\t\t\tthis.options.setSkill(this.fetch(\"data-skill\"));\n\t\t\tthis.options.setShowWithoutDatesLink(this.fetch(\"data-showWithoutDatesLink\"));\n\t\t\tthis.options.setDefaultDatesView(this.fetch(\"data-defaultDatesView\"));\n\n\t\t\tthis.options.setStartingFilters(\n\t\t\t\tthis.fetch(\"data-startingBefore\"),\n\t\t\t\tthis.fetch(\"data-startingAfter\")\n\t\t\t);\n\n\t\t\treturn options;\n\t\t}\n\n\t}", "title": "" }, { "docid": "0cdb92d9519e51d415d64df22535e296", "score": "0.48739275", "text": "_setEnviromentVariables() {\n process.env.DATASTORE_EMULATOR_HOST = `${this._options.host}:${this._options.port}`;\n\n if (!process.env.DATASTORE_PROJECT_ID && this._options.project) {\n process.env.DATASTORE_PROJECT_ID = this._options.project\n }\n }", "title": "" }, { "docid": "41139f4a572663848c38e6327eae7717", "score": "0.4868609", "text": "arguments(desc) {\n return this._parseExpectedArgs(desc.split(/ +/));\n }", "title": "" }, { "docid": "41139f4a572663848c38e6327eae7717", "score": "0.4868609", "text": "arguments(desc) {\n return this._parseExpectedArgs(desc.split(/ +/));\n }", "title": "" }, { "docid": "41e23f8847ea49567f8fa6170923c493", "score": "0.4865644", "text": "get args() {\n return this.options.args || [];\n }", "title": "" }, { "docid": "244453dca95bcd379603230b4c17519e", "score": "0.48652208", "text": "function getParameterDefinitions() {\n return [\n {\n name: 'quality', \n type: 'choice',\n caption: 'Quality',\n values: [0, 1],\n captions: [\"Draft\",\"High\"], \n default: 0,\n }, \n { name: 'beam_width', caption: 'spacing between holes', type: 'float', default: 10 },\n { name: 'hole_radius', caption: 'radius of holes', type: 'float', default: 2.4 },\n { name: 'length', caption: 'beam length', type: 'int', default: 10 }\n ];\n}", "title": "" }, { "docid": "f5ebd04d2fa1c50f2a8a8650ba5870d3", "score": "0.48641235", "text": "function getMainBuildParams () {\n return [\n 'BuildCookRun',\n '-project=\"' + config.projectFile[1] + '\"',\n '-noP4',\n '-clientconfig=' + config.buildConfig[1],\n '-serverconfig=' + config.buildConfig[1],\n '-nocompile',\n '-nocompileeditor',\n '-installed',\n '-ue4exe=UE4Editor-Cmd.exe',\n '-utf8output',\n '-platform=' + config.targetPlatform[1],\n '-targetplatform=' + config.targetPlatform[1],\n '-build',\n '-cook',\n '-map=',\n '-pak',\n '-createreleaseversion=1.0',\n '-compressed',\n '-stage',\n '-package'\n ]\n}", "title": "" }, { "docid": "1a281d35f1c15f68abbc5472d130bb6e", "score": "0.48630533", "text": "function testeParametros() {\n\tconsole.log(arguments);\n\treturn true;\n}", "title": "" }, { "docid": "a833cd57e3c237eca6546d6f5ad2f8d1", "score": "0.48625335", "text": "constructor(args) {\n this._name = _.get(args, 'name', '');\n this._id = _.get(args, 'id', '');\n this._fullPackageName = _.get(args, 'packageName', '');\n this._actions = _.get(args, 'actions', []);\n this._fields = _.get(args, 'fields', []);\n }", "title": "" }, { "docid": "fad9c4f3564b89d1aa26dba12238593f", "score": "0.48590994", "text": "constructor(args, opts) {\n // Calling the super constructor is important so our generator is correctly set up\n super(args, opts);\n\n // Next, add your custom code\n // This makes `appname` a required argument.\n //this.argument('name', { type: String, required: true });\n }", "title": "" }, { "docid": "332b6831b76e22573b6db9afb26140b0", "score": "0.48586798", "text": "function Parameters() {\n Object.defineProperty(this, CACHE, { writable: true, value: {} });\n}", "title": "" }, { "docid": "304f58d4f754c52aa09aadd943d27f8d", "score": "0.4848698", "text": "function processArgs() {\n return require('optimist')\n .usage('Launch Real Time Analytics Server\\nUsage: $0') \n .describe('c', 'Number of CPUs')\n .alias('c', 'cpu')\n .default('c', require('os').cpus().length) \n .argv;\n}", "title": "" }, { "docid": "9587c46ed2e017e38a19ee93ff29f936", "score": "0.48462844", "text": "function panggilParameter2(kota1, kota2, kota3) {\n console.log(kota1);\n console.log(kota2);\n console.log(kota3);\n }", "title": "" } ]
0331f13e6d1071a475ddebd0f2ad30e9
citySelectionChange / This function changes the content of the page after the selected city has been changed
[ { "docid": "52ffb3809f9675443a48bdd8f14075ce", "score": "0.75777596", "text": "function citySelectionChange() {\t\n\tvar index = $('#citiesList').prop(\"selectedIndex\");\n\tvar citySumm = citiesList[index].summary;\n\tvar cityWeather = citiesList[index].weather;\n\t$('#info').html(cityWeather + \"<br>\" + citySumm.slice(0, 200) + \"...\");\n}", "title": "" } ]
[ { "docid": "73a4074ac4ca0f43da2286fc04329d40", "score": "0.75682074", "text": "function _citySelected() {\n var options = {\n mode: 'kinofilm',\n data: {cat: 'kinofilm', ort: this.cities.val()}\n };\n this.processRequest(options);\n }", "title": "" }, { "docid": "764e471c18262ed659e1f3ecdfaf1cb9", "score": "0.7284342", "text": "function updateCitySelected(newSelection) {\n citySelected = newSelection;\n localStorage.setItem(\"citySelected\", newSelection);\n}", "title": "" }, { "docid": "3662111b6a66f51c67696658b2d3c402", "score": "0.7235348", "text": "function changeCity(city) {\n $.ajax({\n url: 'http://gd.geobytes.com/GetCityDetails?callback=?&fqcn=' + city,\n dataType: 'json',\n success: function(data) {\n $city = data.geobytescity + ',' + data.geobytesinternet +\n ',' + data.geobytesregionlocationcode.substring(2,5);\n $('#icon').empty();\n $('.icons').empty();\n $('#week-days').empty();\n \n setCurrent($city);\n setForecast($city);\n }\n });\n}", "title": "" }, { "docid": "4b5a38b6995376bc641d7160724908e8", "score": "0.7199781", "text": "function changeCity( box ) \n{\n\t\n\tlist = lists[box.options[box.selectedIndex].value];\n\temptyList( box.form.city );\n\tfillList( box.form.city, list );\n}", "title": "" }, { "docid": "391c7de1bd6974bf3033485c51d4638b", "score": "0.7154605", "text": "function selectCity(){\n if(!visibleSelect) setVisibleSelect(true)\n else setVisibleSelect(false)\n }", "title": "" }, { "docid": "0d2034a0de581b5ec3e2f568b1f3c26e", "score": "0.713387", "text": "function changeCity(city) {\n clearTimeout(changeTimeoutId);\n changeTimeoutId = setTimeout(function() {\n getResults();\n }, 1000);\n }", "title": "" }, { "docid": "cfd4d7adfb2e1e2a1f297055fa13c2d6", "score": "0.70929384", "text": "function changeCity() {\n const city = document.getElementById('search').value;\n resetPage();\n getWeather(city);\n}", "title": "" }, { "docid": "656b5b0215996a95b40fc854359a86f7", "score": "0.7021864", "text": "function cityClicked(id)\n{\n$(\"#cities li\").removeClass(\"selected\"); //remove all list items from the class \"selected, thus clearing previous selection\n\n// Find the selected city (i.e. list item) and add the class \"selected\" to it.\n// This will highlight it according to the \"selected\" class.\n$(\"#\"+id).addClass(\"selected\");\n\n//retrieve city coordinates from city service\nvar url=baseURL+\"/city/\"+id;\t\t//URL of service, notice that ID is part of URL path\n\n//use jQuery shorthand Ajax function to get JSON data\n$.getJSON(\turl,\t\t\t\t\t//URL of service\n\t\t\tfunction(jsonData)\t//successful callback function\n\t\t\t{\n\t\t\tlongitude=jsonData[\"longitude\"];\t\t\t//get longitude from JSON data\n\t\t\tlatitude=jsonData[\"latitude\"];\t\t\t//get latitude from JSON data\n\t\t\t// *** Add JS code to update h1 on page to show city name\n\t\t\t//alert(\"Add JS to show city name on page.\\nThere is a h1 inside the section of weather details.\");\n\t\t\t$(\"#cityWeather h1\").html(jsonData[\"name\"]+\" Weather\");\n\t\t\tshowCityWeather(longitude,latitude);\n\t\t\t}\n\t\t);\n} //end function", "title": "" }, { "docid": "a237c00b6e931df83116ecb143dcbdba", "score": "0.69182867", "text": "function TerresCityChange()\n{\n if(GE('SelectCity').value != -1)\n {\n document.getElementById('Stations').style.display = 'inline';\n document.getElementById('Stations').innerHTML = \"<table><tr><td style='padding-left:20px;padding-bottom:10px'>Loading Stations...</td></tr></table>\";\n document.location='/radio/tuner/Default.aspx?it=-5&State=' + GE('SelectState').value + '&City=' + GE('SelectCity').value;\n }\n}", "title": "" }, { "docid": "cf57e1cd4a4e9285f66ca29322ddede8", "score": "0.6888359", "text": "function changeCity() {\n\tlet inputValue = document.getElementById('new-location').value;\n\tshowWeather(inputValue);\n}", "title": "" }, { "docid": "e8a85d3afdba2bdbc2a2aea082df3b06", "score": "0.68833345", "text": "selectCity(city) {\n\t\tthis.data.city = city.id;\n\t\tthis.data.districts = _map(city.district, (district) => district.id);\n\t\tthis.currentCity = city;\n\t\tthis.districtList = this.PreloadService.cities[this.currentCity.id-1].district;\n\t\tthis.refreshMapLocation();\n\t}", "title": "" }, { "docid": "78da5d7b467f5817f7f0600823c45de8", "score": "0.68636346", "text": "function _chooseCity(el){\n\tvar chooseEN = $(el).find('.en-word ul li').text();\n\tvar _Fshow = $(el).find('.local-city b');\n\t$(el).find('.num-rank ul li').click(function(){\n\t\t$(el).find('.city-list .content ul li').removeClass('select');\n\t\tvar text = $(this).text();\n\t\t$(this).addClass('select');\n\t\t_Fshow.html(text);\n\t});\n\t$(el).find('.country ul li').click(function(){\n\t\tvar text = $(this).text();\n\t\t_Fshow.html(text);\n\t});\n\t$(el).find('.en-word ul li').click(function(){\n\t\tvar word = $(this).text();\n\t\tword = word.toLowerCase();\n\t\tvar _current = $(el).find('.city-list .' + word).position();\n\t\tif(_current == null){\n\t\t\talert('该字母中没有所包含的城市!');\n\t\t\treturn false;\n\t\t}\n\t\telse{\n\t\t\tvar _top = _current.top;\n\t\t\t$(el).find('.city-list').scrollTop(_top);\n\t\t}\t\t\n\t});\n\t$(el).find('.search-city .btn').click(function(){\n\t\t$(el).find('.city-list .content div ul li').removeClass('select');\n\t\tvar cityName = $(el).find('.search-city input').val();\n\t\tvar allCity = $(el).find('.city-list .content div ul li').html();\n\t\tvar judge = 0;\n\t\t$(el).find('.city-list .content div ul li').each(function(){\n\t\t\tvar obj = $(this).text();\n\t\t\tif(del_b(obj) == del_b(cityName)){\n\t\t\t\tjudge = 1;\n\t\t\t\t$(this).addClass('select');\n\t\t\t\tvar _current = $(this).position();\n\t\t\t\tvar _top = _current.top;\n\t\t\t\t$(el).find('.city-list').scrollTop(_top);\n\t\t\t\t_Fshow.html(obj);\n\t\t\t}\t\n\t\t});\n\t\tif(judge == 0){\n\t\t\talert('所查找的城市不存在');\n\t\t}\n\t});\n}", "title": "" }, { "docid": "ac98807ef4bb28ced1d342c303322a06", "score": "0.6851091", "text": "function changeData() {\n\tselect = document.getElementsByTagName(\"select\")[0];\n var city = select.options[select.selectedIndex].value;\n\tswitch ( city ) {\n\t\tcase 'nyc':\n\t\t\tsetUpNyc()\n\t\t\tbreak;\n\t\tcase 'sf':\n\t\t\tsetUpSf()\n\t\t\tbreak;\n\t\tdefault :\n\t\t\tsetUpBoston();\n\t}\n}", "title": "" }, { "docid": "adbf9e657620673ca6b40663131f3dc2", "score": "0.6798883", "text": "function selectCity(e){\n citySelection = e.target.textContent;\n document.getElementById('city-input').value = citySelection;\n deleteDropdown();\n\n //find the weather info from openweather API using {city},{country} (london,gb)\n //find the lat long info from openweather API and zoom google map to the location\n let xhttp = new XMLHttpRequest();\n xhttp.onreadystatechange = function(){\n if(this.readyState == 4 && this.status == 200){\n let response = JSON.parse(xhttp.responseText);\n //console.log(response); \n if(forecast.classList.contains('inactive')){\n currentWeather(response);\n } else {\n forecastWeather(response);\n }\n }\n };\n if(forecast.classList.contains('inactive')){\n xhttp.open('GET', `https://api.openweathermap.org/data/2.5/weather?q=${citySelection}&appid=bfacc96b28036034f428cbe9a5293b1b`);\n } else {\n xhttp.open('GET', `https://api.openweathermap.org/data/2.5/forecast?q=${citySelection}&appid=bfacc96b28036034f428cbe9a5293b1b`);\n }\n xhttp.send();\n document.getElementById('city-input').value = \"\";\n}", "title": "" }, { "docid": "d7515e391f2fb4eef80be954baa1057f", "score": "0.6771625", "text": "function setSelectedCity(selectedCity) {\n setLocalStorage(\"selectedCity\", selectedCity);\n}", "title": "" }, { "docid": "7296169f28096388b01ab3629e61a72e", "score": "0.669273", "text": "function changeCity(event){\n\t\t// Apply preventDefault within function\n\t\tevent.preventDefault();\n\n\t\t// Pull user information from the text-field \n\t\t// Use \".toLowerCase()\" to make site more user friendly\n\t\t\tcity = $(\"#city-type\").val().toLowerCase();\n\t\t\n\t\t// Apply conditionals\n\t\t\tif(city === \"nyc\" || city === \"new york\" || city === \"new york city\"){\n\t\t\t\t$('body').attr('class' , 'nyc');\n\t\t\t}\n\t\t\telse if(city === \"san francisco\" || city === \"sf\" || city === \"bay area\"){\n\t\t\t\t// alert(\"SF has been written\");\n\t\t\t\t$('body').attr('class' , 'sf');\n\t\t\t}\n\t\t\telse if(city === \"los angeles\" || city === \"la\" || city === \"lax\"){\n\t\t\t\t// alert(\"SF has been written\");\n\t\t\t\t$('body').attr('class' , 'la');\n\t\t\t}\n\t\t\telse if(city === \"austin\" || city === \"atx\"){\n\t\t\t\t// alert(\"SF has been written\");\n\t\t\t\t$('body').attr('class' , 'austin');\n\t\t\t}\n\t\t\telse if(city === \"sydney\" || city === \"syd\"){\n\t\t\t\t// alert(\"SF has been written\");\n\t\t\t\t$('body').attr('class' , 'sydney');\n\t\t\t}\n\t\t\telse{\n\t\t\t\talert(\"Sorry your city has not yet been added!\")\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "37a74a93153792f8493e3fa3d1d49f80", "score": "0.6684069", "text": "function selectCity (selected) {\n this.localAddress.city = selected.city\n }", "title": "" }, { "docid": "48ef960d3570c55b3083992d6abb52bd", "score": "0.66771233", "text": "async function cityClicked(city) {\n app.selected = city.name\n \n c = await getCargo(city.name)\n if(c != null) {\n city.cargo = c\n } \n app.selectedType=\"city\"\n}", "title": "" }, { "docid": "0a313fa443e562be241db4502980cc60", "score": "0.6652874", "text": "function updateCity () {\n var $city = $('a.city');\n\n $city.on('click', function() {\n loadCity($(this).html());\n // $('#temp').\n });\n}", "title": "" }, { "docid": "b9a95c884ca585451ca112ebd4b3fbfb", "score": "0.6652489", "text": "function changeCity(event) {\n event.preventDefault();\n let currentCityHeader = document.querySelector(\"#curr-city\");\n let cityVal = document.querySelector(\"#city-val\");\n currentCityHeader.innerHTML = cityVal.value;\n let currCity = cityVal.value;\n\n //Adjusting the weather based on the input city\n let apiKey = \"58998f2f1d96bf70dbdd7f7a20868eb4\";\n let weatherUrl = `https://api.openweathermap.org/data/2.5/weather?q=${currCity}&appid=${apiKey}&&units=metric`;\n axios.get(weatherUrl).then(displayWeather);\n}", "title": "" }, { "docid": "f697810d853711e957b939ee73404737", "score": "0.6647581", "text": "function changeNameCity(city) {\n\t$('#namecity').empty();\n\t$('#namecity').html(city + \" <b class='caret'></b>\");\n}", "title": "" }, { "docid": "82b27f00b2b8dead945353f34cb1355a", "score": "0.6615461", "text": "function findCity() {\n\t\tdocument.getElementById(\"errors\").innerHTML = \"\";\n\t\tdocument.getElementById(\"nodata\").style.display = \"none\";\n\t\tdocument.getElementById(\"resultsarea\").style.display = \"block\";\n\t\tloaders(true);\n\t\tchangeVisible(false);\n\t\tvar city = document.getElementById(\"citiesinput\").value;\n\t\tajaxCall(\"oneday\", city);\n\t\tajaxCall(\"week\", city);\n\t}", "title": "" }, { "docid": "43846e08ad77d11f1aeb125e265e08ce", "score": "0.6572429", "text": "citySelect(city) {\n\t\t //console.log(\"Selected city is: \" + city.title);\n\t\t this.setState({ cityResult: [] });\n\t\t this.setState({ term: city.title });\n\t\t this.setState({ cityResultVisible: false });\n\t\t //this.setState({ chosenCity: city })\n\t\t this.props.callbackGetDepartCity(city);\n\t\t //this.setState({ chosenCityError: false });\n\t\t //this.props.updateDepartureCityErrorMsgAction(false);\n }", "title": "" }, { "docid": "8fe276de0bcfc8f18584753aef0d0e51", "score": "0.65488493", "text": "function handleCityChange(event) {\n setCity(event.currentTarget.value);\n }", "title": "" }, { "docid": "062c325df920e98eb8405ceb58f5fead", "score": "0.64780253", "text": "function changeState(e) {\n ui.HideStateAndCity();\n api.getCity(e.value, country.value).then((data) => ui.ShowCity(data));\n}", "title": "" }, { "docid": "42879f7bef432b0a7539579bb2bd6640", "score": "0.6444124", "text": "function updateCity(event) {\n event.preventDefault();\n newCity = searchInput.value;\n searchInput.value = \"\";\n currentCity.innerHTML = newCity;\n fetchCurrentWeather();\n}", "title": "" }, { "docid": "9ad47bd2fed712712926ac2597c4e3b2", "score": "0.642936", "text": "function handleCityChange(event) {\n event.preventDefault();\n setCity(event.target.value);\n }", "title": "" }, { "docid": "cf4df5599826255c5bb64ec7d4c04cba", "score": "0.6378532", "text": "function populate_city(city_residence_selected)\n{\n\tif(docF.country_residence.value != \"\")\n\t{\n\t\tvar city_value,city_label;\n\t\tvar city_arr = new Array();\n\t\tvar pop_city_array = new Array();\n\n\t\tvar country_drop = docF.country_residence;\n\t\t\n\t\t\n\t\tvar country_val_arr = country_drop.value.split(\"|X|\");\n\t\tif(!country_val_arr[1])\n\t\t{\n\t\t\tdID(\"city_res_show_hide\").style.display='none';\n\t\t\tdID(\"city_residence_submit_err\").style.display='none';\n\t\t\treturn 1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdID(\"city_res_show_hide\").style.display='inline';\n\t\t}\n\t\tvar city_label_value_arr = country_val_arr[1].split(\"#\");\n\t\tvar j=1;\n\t\tvar i1 = city_label_value_arr.length;\n\n\t\tpop_city_array.push(\"<select class=\\\"sel1 fl\\\" size=\\\"1\\\" name=\\\"city_residence\\\" id=\\\"city_residence\\\" style=\\\"width:204px\\\" onchange=\\\"fetch_code('CITY',this.value);\\\" onfocus=\\\"change_div_class(this);\\\" onblur=\\\"validate(this);\\\">\");\n\t\tpop_city_array.push(\"<option value=\\\"\");\n\t\tpop_city_array.push(country_drop.options[0].value);\n\t\tpop_city_array.push(\"\\\">\");\n\t\tpop_city_array.push(country_drop.options[0].text);\n\t\tpop_city_array.push(\"</option>\");\n\n\t\tfor(var i=0;i<i1;i++)\n\t\t{\n\t\t\tcity_arr = city_label_value_arr[i].split(\"$\");\n\t\t\tcity_value = city_arr[0];\n\t\t\tcity_label = city_arr[1];\n\t\t\t\n\t\t\tif(city_label==\" \")\n\t\t\t\tpop_city_array.push(\"<optgroup label=\\\"&nbsp;\\\"></optgroup>\");\n\t\t\telse\n\t\t\t{\n\t\t\t\tpop_city_array.push(\"<option value=\\\"\");\n\t\t\t\tpop_city_array.push(city_value);\n\t\t\t\tpop_city_array.push(\"\\\"\");\n\t\t\t\tif(city_residence_selected)\n\t\t\t\tif(city_value.indexOf(city_residence_selected)!=-1)\n\t\t\t\t\tpop_city_array.push(\"selected=\\\"yes\\\"\");\n\n\t\t\t\tpop_city_array.push(\">\");\n\t\t\t\tpop_city_array.push(city_label);\n\t\t\t\tpop_city_array.push(\"</option>\");\n\t\t\t}\n\t\t}\n\t\tpop_city_array.push(\"</select>\");\n\n\t\tdID(\"city_india_visible\").innerHTML = pop_city_array.join('');\n\t}\n}", "title": "" }, { "docid": "45a9dc8e1680a6fc45ebfa15a1f6bab5", "score": "0.6335677", "text": "function loadCity (city) {\n $('#location').html(city);\n\n if (city.toLowerCase() == 'current location') {\n if ( navigator.geolocation ) {\n navigator.geolocation.getCurrentPosition(loadWeather, loadDefaultCity);\n } else {\n loadDefaultCity();\n }\n } else {\n loadWeather(cities[city.toLowerCase()]);\n }\n}", "title": "" }, { "docid": "c84a8c51bbf216aa772b1763ac095635", "score": "0.6310564", "text": "function city_redirect() {\n if ($('#selected_city_id').val() != '') // to check if user selected a city\n window.location.hash = '#!/city/' + $('#selected_city_id').val();\n}", "title": "" }, { "docid": "d39ab3e34d12b3c18405a1e817879ad0", "score": "0.6304138", "text": "function selectedCityFunction(cityName) {\n let cityIcon = document.querySelector(\".cityIcon\");\n\n if (cityName === \"\") {\n cityIcon.src =\"assets/General Images & Icons/warning.svg\";\n } else {\n cityIcon.src =\"assets/Icons for cities/\" + cityName.toLowerCase() + \".svg\";\n timeZone = selectedCityJsonData.timeZone;\n setDateTime();\n\n document.querySelector(\".c\").innerHTML = selectedCityJsonData.getCelcius();\n document.querySelector(\".f\").innerHTML = selectedCityJsonData.getFarenheit();\n\n document.querySelector(\".humidity\").innerHTML =\n parseInt(selectedCityJsonData.humidity) +\n '<span style=\"color:#777;\">%</span>';\n document.querySelector(\".precipitation\").innerHTML =\n parseInt(selectedCityJsonData.precipitation) +\n '<span style=\"color:#777;\">%</span>';\n \n updateForecast(meridien, currHour);\n }\n }", "title": "" }, { "docid": "3d7971de0474792be96b0ed71cdb291b", "score": "0.63016385", "text": "function onStatechange() {\r\n //console.log('Country change dd called');\r\n selectValue = d3.select('#selectstate').property(\"value\").trim();\r\n //console.log(\"selected value\" + selectValue);\r\n tbody.html(\"\");\r\n var filteredByState = filterDataByState(selectValue);\r\n //console.log(filteredByTeam);\r\n console.log(filteredByState)\r\n SetCityDropDownToEmpty()\r\n generateCityList(filteredByState);\r\n\r\n}", "title": "" }, { "docid": "901e3c69d86819b3ff26da4fe5c33f12", "score": "0.6300332", "text": "function getCurrentCity(event) {\n setCityInput(event.target.value);\n }", "title": "" }, { "docid": "5b4431457830557d7612b8c365a519f1", "score": "0.6285901", "text": "function searchCity(event) {\n event.preventDefault();\n let searchInput = document.querySelector(\"#search-bar\");\n let currentCity = document.querySelector(\"#current-city\");\n currentCity.innerHTML = ` ${searchInput.value}`;\n\n showCurrent();\n}", "title": "" }, { "docid": "6e8d24303414c5ed4ffac18b5329bec7", "score": "0.62816083", "text": "function changeCityList() {\n var cityList = {};\n cityList['AP'] = ['-----select-------','Amaravati','Anantapuram','Bhimavaram','Chilakaluripet','Chirala','Chittoor','Dharmavaram','Eluru','Gudivada',\n 'Guntakal','Guntur','Hindupur','Kadapa','Kakinada','Kurnool','Machilipatnam','Madanapalle','Mangalagiri','Nandyal',\n 'Narasaraopet','Nellore','Ongole','Proddatur','Rajamahendravaram','Srikakulam','Tadepalligudem','Tadipatri',\n 'Tenali','Tirupati','Vijayawada','Visakhapatnam','Vizianagaram'];\n cityList['AR'] = ['Anjaw','Changlang','East Siang','Kurung Kumey','Lohit','Lower Dibang Valley','Lower Subansiri',\n 'Papum Pare','Tawang','Tirap','Dibang Valley','Upper Siang','Upper Subansiri','West Kameng',\n 'West Siang'];\n cityList['AS'] = ['Baksa','Barpeta','Bongaigaon','Cachar','Chirang','Darrang','Dhemaji','Dima Hasao','Dhubri','Dibrugarh',\n 'Goalpara','Golaghat','Hailakandi','Jorhat','Kamrup','Kamrup Metropolitan','Karbi Anglong',\n 'Karimganj','Kokrajhar','Lakhimpur','Marigaon','Nagaon','Nalbari','Sibsagar','Sonitpur','Tinsukia',\n 'Udalguri'];\n cityList['BI'] =['Araria','Arwal','Aurangabad','Banka','Begusarai','Bhagalpur','Bhojpur','Buxar','Darbhanga','East Champaran',\n 'Gaya','Gopalganj', 'Jamui', 'Jehanabad', 'Kaimur', 'Katihar', 'Khagaria', 'Kishanganj', 'Lakhisarai',\n 'Madhepura', 'Madhubani', 'Munger', 'Muzaffarpur', 'Nalanda', 'Nawada', 'Patna', 'Purnia', 'Rohtas', \n 'Saharsa', 'Samastipur', 'Saran', 'Sheikhpura', 'Sheohar', 'Sitamarhi', 'Siwan', 'Supaul', 'Vaishali',\n 'West Champaran', 'Chandigarh'];\n cityList['CH'] =['Bastar', 'Bijapur', 'Bilaspur', 'Dantewada', 'Dhamtari', 'Durg', 'Jashpur', 'Janjgir-Champa', 'Korba',\n 'Koriya', 'Kanker', 'Kabirdham (Kawardha)', 'Mahasamund', 'Narayanpur', 'Raigarh', 'Rajnandgaon', \n 'Raipur','Surguja'];\n \n cityList['DL'] =['Central Delhi', 'East Delhi', 'New Delhi', 'North Delhi', 'North East Delhi', 'North West Delhi', \n 'South Delhi', 'South West Delhi', 'West Delhi'];\n cityList['GO'] =['North Goa','South Goa'];\n cityList['GU'] =['Ahmedabad', 'Amreli district', 'Anand', 'Banaskantha', 'Bharuch', 'Bhavnagar', 'Dahod', 'The Dangs', \n 'Gandhinagar', 'Jamnagar', 'Junagadh', 'Kutch', 'Kheda', 'Mehsana', 'Narmada', 'Navsari', 'Patan', 'Panchmahal', \n 'Porbandar', 'Rajkot', 'Sabarkantha', 'Surendranagar', 'Surat', 'Vyara', 'Vadodara', 'Valsad',];\n cityList['HA'] =['Ambala', 'Bhiwani', 'Faridabad', 'Fatehabad', 'Gurgaon', 'Hissar', 'Jhajjar', 'Jind', 'Karnal', \n 'Kaithal', 'Kurukshetra', 'Mahendragarh', 'Mewat', 'Palwal', 'Panchkula', 'Panipat', 'Rewari', \n 'Rohtak', 'Sirsa','Sonipat', 'Yamuna Nagar'];\n cityList['HI'] =['Bilaspur', 'Chamba', 'Hamirpur', 'Kangra', 'Kinnaur', 'Kullu', 'Lahaul and Spiti', 'Mandi',\n 'Shimla', 'Sirmaur', 'Solan', 'Una'];\n cityList['JH'] =['Bokaro', 'Chatra', 'Deoghar', 'Dhanbad', 'Dumka', 'East Singhbhum', 'Garhwa', 'Giridih', 'Godda',\n 'Gumla', 'Hazaribag', 'Jamtara', 'Khunti', 'Koderma', 'Latehar', 'Lohardaga', 'Pakur',\n 'Palamu', 'Ramgarh','Ranchi', 'Sahibganj', 'Seraikela Kharsawan', 'Simdega', 'West Singhbhum',];\n cityList['JK'] =['Anantnag', 'Badgam', 'Bandipora', 'Baramulla', 'Doda', 'Ganderbal', 'Jammu', 'Kargil', 'Kathua',\n 'Kishtwar', 'Kupwara', 'Kulgam', 'Leh', 'Poonch', 'Pulwama', 'Rajauri', 'Ramban', 'Reasi',\n 'Samba', 'Shopian','Srinagar', 'Udhampur'];\n cityList['KA'] =['Bagalkot', 'Bangalore Rural', 'Bangalore Urban', 'Belgaum', 'Bellary', 'Bidar', 'Bijapur',\n 'Chamarajnagar', 'Chikkamagaluru', 'Chikkaballapur', 'Chitradurga', 'Davanagere', 'Dharwad', 'Dakshina Kannada',\n 'Gadag', 'Gulbarga', 'Hassan', 'Haveri district', 'Kodagu', 'Kolar', 'Koppal', 'Mandya', 'Mysore', 'Raichur', \n 'Shimoga', 'Tumkur', 'Udupi', 'Uttara Kannada', 'Ramanagara', 'Yadgir'];\n cityList['KE'] =['Alappuzha', 'Ernakulam', 'Idukki', 'Kannur', 'Kasaragod', 'Kollam', 'Kottayam', 'Kozhikode', 'Malappuram', 'Palakkad', \n 'Pathanamthitta', 'Thrissur', 'Thiruvananthapuram', 'Wayanad'];\n cityList['MP'] =['Alirajpur', 'Anuppur', 'Ashok Nagar', 'Balaghat', 'Barwani', 'Betul', 'Bhind', 'Bhopal', 'Burhanpur',\n 'Chhatarpur', 'Chhindwara', 'Damoh', 'Datia', 'Dewas', 'Dhar', 'Dindori', 'Guna', 'Gwalior', 'Harda', 'Hoshangabad', \n 'Indore', 'Jabalpur', 'Jhabua', 'Katni', 'Khandwa (East Nimar)', 'Khargone (West Nimar)', 'Mandla', 'Mandsaur', \n 'Morena', 'Narsinghpur', 'Neemuch', 'Panna', 'Rewa', 'Rajgarh', 'Ratlam', 'Raisen', 'Sagar', 'Satna', 'Sehore', \n 'Seoni', 'Shahdol', 'Shajapur', 'Sheopur', 'Shivpuri', 'Sidhi', 'Singrauli', 'Tikamgarh', 'Ujjain', 'Umaria', \n 'Vidisha'];\n cityList['MH'] =['Ahmednagar', 'Akola', 'Amravati', 'Aurangabad', 'Bhandara', 'Beed', 'Buldhana', 'Chandrapur', 'Dhule', 'Gadchiroli',\n 'Gondia', 'Hingoli', 'Jalgaon', 'Jalna', 'Kolhapur', 'Latur', 'Mumbai City', 'Mumbai suburban', 'Nandurbar', 'Nanded', \n 'Nagpur', 'Nashik', 'Osmanabad', 'Parbhani', 'Pune', 'Raigad', 'Ratnagiri', 'Sindhudurg', 'Sangli', 'Solapur', \n 'Satara', 'Thane', 'Wardha', 'Washim', 'Yavatmal'];\n cityList['MN'] =['Bishnupur', 'Churachandpur', 'Chandel', 'Imphal East', 'Senapati', 'Tamenglong', 'Thoubal', 'Ukhrul', \n 'Imphal West'];\n cityList['MG'] =['East Garo Hills', 'East Khasi Hills', 'Jaintia Hills', 'Ri Bhoi', 'South Garo Hills', 'West Garo Hills',\n 'West Khasi Hills'];\n cityList['MZ'] =['Aizawl', 'Champhai', 'Kolasib', 'Lawngtlai', 'Lunglei', 'Mamit', 'Saiha', 'Serchhip'];\n cityList['NL'] =['Dimapur', 'Kohima', 'Mokokchung', 'Mon', 'Phek', 'Tuensang', 'Wokha', 'Zunheboto'];\n cityList['OD'] =['Angul', 'Boudh (Bauda)', 'Bhadrak', 'Balangir', 'Bargarh (Baragarh)', 'Balasore', \n 'Cuttack', 'Debagarh (Deogarh)', 'Dhenkanal', 'Ganjam', 'Gajapati', 'Jharsuguda', 'Jajpur', 'Jagatsinghpur', \n 'Khordha', 'Kendujhar (Keonjhar)', 'Kalahandi', 'Kandhamal', 'Koraput', 'Kendrapara', 'Malkangiri', 'Mayurbhanj',\n 'Nabarangpur', 'Nuapada', 'Nayagarh', 'Puri', 'Rayagada', 'Sambalpur', 'Subarnapur (Sonepur)', 'Sundergarh'];\n cityList['PN'] =['Amritsar', 'Barnala', 'Bathinda', 'Firozpur', 'Faridkot', 'Fatehgarh Sahib', 'Fazilka', 'Gurdaspur', 'Hoshiarpur',\n 'Jalandhar', 'Kapurthala', 'Ludhiana', 'Mansa', 'Moga', 'Sri Muktsar Sahib', 'Pathankot', 'Patiala', 'Rupnagar', \n 'Ajitgarh (Mohali)', 'Sangrur', 'Nawanshahr', 'Tarn Taran'];\n cityList['RJ'] =['Ajmer', 'Alwar', 'Bikaner', 'Barmer', 'Banswara', 'Bharatpur', 'Baran', 'Bundi', 'Bhilwara', 'Churu', 'Chittorgarh',\n 'Dausa', 'Dholpur', 'Dungapur', 'Ganganagar', 'Hanumangarh', 'Jhunjhunu', 'Jalore', 'Jodhpur', 'Jaipur', 'Jaisalmer', \n 'Jhalawar', 'Karauli', 'Kota', 'Nagaur', 'Pali', 'Pratapgarh', 'Rajsamand', 'Sikar', 'Sawai Madhopur', 'Sirohi', 'Tonk', 'Udaipur'];\n cityList['SK'] =['East Sikkim', 'North Sikkim','South Sikkim','West Sikkim'];\n cityList['TM'] =['Ariyalur', 'Chennai', 'Coimbatore', 'Cuddalore', 'Dharmapuri', 'Dindigul', 'Erode', 'Kanchipuram', 'Kanyakumari', 'Karur', 'Madurai', \n 'Nagapattinam', 'Nilgiris', 'Namakkal', 'Perambalur', 'Pudukkottai', 'Ramanathapuram', 'Salem', 'Sivaganga', 'Tirupur', 'Tiruchirappalli', 'Theni', 'Tirunelveli', \n 'Thanjavur', 'Thoothukudi', 'Tiruvallur', 'Tiruvarur', 'Tiruvannamalai', 'Vellore', 'Viluppuram', 'Virudhunagar'];\n cityList['TN'] =['Adilabad', 'Hyderabad', 'Karimnagar', 'Khammam','Mahbubnagar', 'Medak', 'Nalgonda','Nizamabad', 'Warangal'];\n cityList['TR'] =['Dhalai','North Tripura','South Tripura','Khowai','West Tripura'];\n cityList['UK'] =['Almora', 'Bageshwar', 'Chamoli', 'Champawat', 'Dehradun', 'Haridwar',\n 'Nainital', 'Pauri Garhwal', 'Pithoragarh', 'Rudraprayag', 'Tehri Garhwal', 'Udham Singh Nagar', 'Uttarkashi'];\n cityList['UP'] =['Agra', 'Allahabad', 'Aligarh', 'Ambedkar Nagar', 'Auraiya', 'Azamgarh', 'Barabanki', 'Budaun', 'Bagpat', 'Bahraich', \n 'Bijnor', 'Ballia', 'Banda', 'Balrampur', 'Bareilly', 'Basti', 'Bulandshahr', 'Chandauli', 'Chhatrapati Shahuji Maharaj Nagar', \n 'Chitrakoot', 'Deoria', 'Etah', 'Kanshi Ram Nagar', 'Etawah', 'Firozabad', 'Farrukhabad', 'Fatehpur', 'Faizabad',\n 'Gautam Buddh Nagar', 'Gonda', 'Ghazipur', 'Gorakhpur', 'Ghaziabad', 'Hamirpur', 'Hardoi', 'Mahamaya Nagar', 'Jhansi',\n 'Jalaun', 'Jyotiba Phule Nagar', 'Jaunpur district', 'Ramabai Nagar (Kanpur Dehat)', 'Kannauj', 'Kanpur', 'Kaushambi', \n 'Kushinagar', 'Lalitpur', 'Lakhimpur Kheri', 'Lucknow', 'Mau', 'Meerut', 'Maharajganj', 'Mahoba', 'Mirzapur',\n 'Moradabad', 'Mainpuri', 'Mathura', 'Muzaffarnagar', 'Panchsheel Nagar district (Hapur)', 'Pilibhit', 'Shamli',\n 'Pratapgarh', 'Rampur', 'Raebareli', 'Saharanpur', 'Sitapur', 'Shahjahanpur', 'Sant Kabir Nagar', 'Siddharthnagar',\n 'Sonbhadra', 'Sant Ravidas Nagar', 'Sultanpur', 'Shravasti', 'Unnao', 'Varanasi'];\n cityList['WB'] =['Birbhum', 'Bankura', 'Bardhaman', 'Darjeeling', 'Dakshin Dinajpur', 'Hooghly', 'Howrah', 'Jalpaiguri', 'Cooch Behar', \n 'Kolkata', 'Maldah', 'Paschim Medinipur', 'Purba Medinipur', 'Murshidabad', 'Nadia', 'North 24 Parganas', \n 'South 24 Parganas', 'Purulia', 'Uttar Dinajpur'];\n \n\n \n /*Script logic to develop dynamic list of cities based on selected State in permanent address*/\n var stateOption = document.getElementById(\"myState\");\n var cityOption = document.getElementById(\"cities\");\n var selectedState = stateOption.options[stateOption.selectedIndex].value;\n while (cityOption.options.length) {\n cityOption.remove(0);\n }\n var newCityList=cityList[selectedState];\n if (newCityList) {\n var i;\n for (i = 0; i < newCityList.length; i++) {\n var city = new Option(newCityList[i],i);\n cityOption.options.add(city);\n }\n }\n }", "title": "" }, { "docid": "814fe89f020ee15f17c25cd56fd2d9fb", "score": "0.6279683", "text": "function NearByupdatePage() {\n if (xmlHttp2.readyState == 4) {\n var response = xmlHttp2.responseText;\n document.getElementById(\"city_change\").innerHTML = response;\n }\n}", "title": "" }, { "docid": "455e980d517a2acceee113b798131b79", "score": "0.6267595", "text": "function clickedMarker(e) {\n city.selectedIndex = e.target.options.index;\n fetchWeatherApi(city.options[city.selectedIndex].value);\n}", "title": "" }, { "docid": "26368fb4386ae69e2679564d3f5b2315", "score": "0.62482405", "text": "function getInput() {\n\tevent.preventDefault();\n\tvar input_city = $(\"select\").val();\n\tchangeBackground(input_city);\n\t$(\"#city-type\").val(\"\");\n\t// console.log(city);\n}", "title": "" }, { "docid": "86f3d3ec06cb67ec9c373b3c7eb31d22", "score": "0.62440276", "text": "function selectCityFromList(city) {\r\n clearFeatures();\r\n var feature = vectorSource.getFeatures().filter(function (item) {\r\n return item.getProperties().title == city;\r\n })[0];\r\n activateFeature(feature);\r\n}", "title": "" }, { "docid": "08bd7decc3b8489cd4783fdccb35c0c6", "score": "0.62374836", "text": "function stateChange(){\r\n\r\n\tvar state = (dijit.byId('stateSelect').attr('value'));\r\n\r\n\tif(state == 'DC'){\r\n\t\t\t$.ajax({\r\n\t\turl:'dpStatus',\r\n\t\tdata: $('#queryParams').serialize(),\r\n\t\tdataType:'json',\r\n\t\tsuccess:function(dpStatusReply){\r\n\t\t\tif(dpStatusReply != null){\r\n\t\t\t\tdijit.byId('dpStatus').removeOption(dijit.byId('dpStatus').getOptions());\r\n\t\t\t\t//append the entires in dpStatusReply as options to the citydrop down\r\n\t\t\t\tdijit.byId(\"dpStatus\").addOption({label: 'Select DP_STATUS',selected:true,value:\"\",name:'DP_STATUS'});\r\n\t\t\t\tfor(i=0; i < dpStatusReply.length; i++){\t\r\n\t\t\t\t\tdijit.byId(\"dpStatus\").addOption({label: dpStatusReply[i],value:dpStatusReply[i], name:'DP_STATUS'});\r\n\t\t\t\t\t}\r\n\t\t\t\t$( \"#progress\" ).hide();\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t});\r\n\t\t\t$.ajax({\r\n\t\t\t\turl:'iTvaldesc',\r\n\t\t\t\tdata: $('#queryParams').serialize(),\r\n\t\t\t\tdataType:'json',\r\n\t\t\t\tsuccess:function(iTvaldescReply){\r\n\t\t\t\t\tif(iTvaldescReply != null){\r\n\t\t\t\t\t\tdijit.byId('itValdesc').removeOption(dijit.byId('itValdesc').getOptions());\r\n\t\t\t\t\t\t//append the entires in iTvaldescReply as options to the citydrop down\r\n\t\t\t\t\t\tdijit.byId(\"itValdesc\").addOption({label: 'SelectIT_VALDESC',selected:true,value:\"\",name:'IT_VALDESC'});\r\n\t\t\t\t\t\tfor(i=0; i < iTvaldescReply.length; i++){\t\r\n\t\t\t\t\t\t\t//$('<option />', {value: iTvaldescReply[i], text: iTvaldescReply[i]}).appendTo(document.getElementById(\"city\"));\r\n\t\t\t\t\t\t\tdijit.byId(\"itValdesc\").addOption({label: iTvaldescReply[i],value:iTvaldescReply[i], name:'IT_VALDESC'});\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$( \"#progress\" ).hide();\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t}\r\n\r\n\r\n\r\n\r\n\t//\r\n\t// When you change a state clear all pre exisiting Kml layers for now\r\n\t//\r\n\tremoveAllFeatures();\r\n\r\n\t//\r\n\t// load coressponding layers:\r\n\t// 1. clear box: StateWideLayers and countyLayersBox (its inside the CountyLayersDiv but doesnt include Wetlands so that button always stays there)\r\n\t\r\n\t//if we were using jquery\r\n\t//$(\"stateWideLayers\").empty();\r\n\t//$(\"countyLayersBox\").empty();\r\n\r\n\t//since the buttons are using dojo\r\n\tdojo.query('#stateWideLayers').empty(); \r\n\tdojo.query('#countyLayersBox').empty(); \r\n\t\r\n\t//document.getElementById(\"stateWideLayers\").empty();\r\n\t//document.getElementById(\"countyLayersBox\").empty();\r\n\t\r\n\t//2. Load the counties drop down and the layers\t\r\n\t//3. Fill a dropdown in the layers div to let the user load any additional parcels layers in the state\r\n\r\n\trequire([\"dojo/ready\", \"dojo/dom-style\", \"dijit/registry\"], function(ready, domStyle, registry){\r\n\t\tready(function(){\r\n\t\t\tvar state = (dijit.byId('stateSelect').attr('value'));\r\n\t\t\t\r\n\t\t\t//\r\n\t\t\t//countyDropdown(state) can be found in countySelection.js\r\n\t\t\tcountyDropdown(state);\r\n\t\t\t\r\n\t\t\t// stateLayers() can be found in stateLayers.js\r\n\t\t\tstateLayers(state);\r\n\r\n\t\t\t});\r\n\t});\t\r\n}", "title": "" }, { "docid": "2619cc9db5b159f5d34ba96b544c0b09", "score": "0.62290406", "text": "function changeCity(event) {\n event.preventDefault();\n let cityPlace = document.querySelector(\"h1\");\n let cityValue = document.querySelector(\"#city-value\");\n cityPlace.innerHTML = cityValue.value;\n let city = cityValue.value;\n let apiKey = \"dcb6b71d0331f2cd4602b0cedf3d0f48\";\n let apiUrl = `https://api.openweathermap.org/data/2.5/weather?q=${city}&appid=${apiKey}&units=metric`;\n\n axios.get(`${apiUrl}`).then(displayTemp);\n}", "title": "" }, { "docid": "fd022fde2201c3697d743ef48712e51b", "score": "0.6216258", "text": "function handleInternationalCitySelectionChanged(controlName, targetControlName, updateTarget) {\n // Get a reference to the control\n var controlObject = document.getElementById(controlName);\n var targetControlObject = null;\n \n // If the target control is supplied, deal with that\n if (targetControlName != \"\") {\n targetControlObject = document.getElementById(targetControlName);\n \n if ((updateTarget == true) && (targetControlObject)) {\n updateDestinationControl(controlObject, targetControlObject);\n } \n }\n}", "title": "" }, { "docid": "c6ede7f4190f98fa1c12f07b9a419df9", "score": "0.62088066", "text": "function changeCountry(e) {\n //Reset State And City Based on Country Change\n ui.resetState();\n api.getState(e.value).then((data) => {\n if (data.length > 0) ui.ShowState(data);\n else {\n data.push({\n id: 0,\n name: 'Search By City States Not Available ',\n iso2: 'None',\n });\n ui.ShowState(data);\n }\n });\n}", "title": "" }, { "docid": "b2148118e9026d90be18b1e2165f7865", "score": "0.6207849", "text": "function setupCityMenu() {\n dropdown = createSelect();\n dropdown.position(width-350, 300);\n dropdown.size(125,35)\n dropdown.option('Saskatoon');\n dropdown.option('Toronto');\n dropdown.option('Regina');\n dropdown.option('Calgary');\n dropdown.option('Vancouver');\n dropdown.option('Montreal');\n dropdown.option('Los Angeles');\n dropdown.option('New York (JFK)');\n dropdown.option('Chicago');\n dropdown.option('London');\n dropdown.option('Paris');\n dropdown.option('Dubai');\n dropdown.option('Sydney');\n\n dropdown.changed(mySelectEvent);\n}", "title": "" }, { "docid": "046d3c1241c44382ab861b75904c0313", "score": "0.6203447", "text": "function getCities(state) {\n\t$.jStorage.set(\"laststate\", state);\n\t$('#namecity').html(\"- <b class='caret'></b>\");\n\t$(\"#listcities\").empty();\n\tif (firstLoad == false) {\n\tliveSearch('country', state);\n\t}\n\t$\n\t\t\t.getJSON(\n\t\t\t\t\t\"getcities.php?state=\" + state,\n\t\t\t\t\tfunction(data) {\n\n\t\t\t\t\t\tfor ( var i = 0; i < data.length; i++) {\n\n\t\t\t\t\t\t\t$(\"#listcities\")\n\t\t\t\t\t\t\t\t\t.append(\n\t\t\t\t\t\t\t\t\t\t\t\"<li><a href='#' onClick='liveSearch(\\\"city\\\",\\\"\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ data[i].ville\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ \"\\\");changeNameCity(\\\"\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ data[i].ville\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ \"\\\");$(\\\".nav-collapse\\\").collapse(\\\"toggle\\\");'>\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ data[i].ville + \"</li>\");\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n}", "title": "" }, { "docid": "56ca8d2e3a2eb79890411f5fdf415aa0", "score": "0.61963844", "text": "function changeText() {\n let elem = document.getElementById('cityText');\n let str = elem.value;\n elem.value = cities(str);\n}", "title": "" }, { "docid": "5ce7bda972fc38de9f040938fb186d1e", "score": "0.61732686", "text": "function changeCity() {\n city = input.value();\n input.value('');\n // make amount of clouds relative to cloud cover\n cloudAmount = map(cloudCover, 0, 100, 0, 30);\n // refill arrays so animations change\n for (var i = 0; i < rainAmount; i++) {\n rainArray[i] = makeRain(random(170, 313), random(0, 315));\n }\n for (var i = 0; i < snowAmount; i++) {\n snowArray[i] = makeSnow(random(175, 305), random(0, 315));\n }\n for (var i = 0; i < cloudAmount; i++) {\n cloudArray[i] = makeCloud(random(-75, width + 75), random(320, height),\n random(100, 170), 175);\n }\n // reload weather data\n weatherUrl = 'http://api.apixu.com/v1/current.json?key=8f4b2cd0980d46aba2e201006182511&q=' + city;\n loadJSON(weatherUrl, getWeather);\n}", "title": "" }, { "docid": "6002acf0dc41f7155da0f865ff7ac427", "score": "0.6172726", "text": "function changeprovince(value, type, valuedit='')\n{\n if (value) {\n if (type == 'domicile') {\n var select2 = document.getElementById('cmpb_city_dd');\n var comboboxid = 'cmpb_city_dd';\n }else if (type == 'operational') {\n var select2 = document.getElementById('operational_city_dd');\n var comboboxid = 'operational_city_dd';\n }else if (type == 'cabang') {\n var select2 = document.getElementById('cmp_city_dd');\n var comboboxid = 'cmp_city_dd';\n }\n\n var hitungdone = 0;\n $.ajax({\n type: 'GET',\n url: \"/get_city/\"+value,\n dataType: 'json',\n success: function(data) {\n $(\"#\"+comboboxid+\" option\").remove();\n var opt2 = document.createElement('option');\n data.forEach( function (value)\n {\n hitungdone++;\n var opt2 = document.createElement('option');\n opt2.value = value.city;\n opt2.innerHTML = value.city;\n select2.appendChild(opt2);\n // var newState = new Option(value.city, value.city, true, true);\n // $(\"#\"+comboboxid).append(newState);\n\n // if (hitungdone == data.length) {\n // if (valuedit) {\n // // $(\"#\"+comboboxid).val(valuedit).trigger(\"change\");\n // $('#'+comboboxid).val(valuedit);\n // $('#'+comboboxid).change();\n // }\n // }\n });\n }\n })\n }\n}", "title": "" }, { "docid": "e370d493a57ad57399ed96e291bd9f82", "score": "0.6142833", "text": "function submitCity(event) {\n event.preventDefault();\n let changeCity = document.querySelector(\"#select-city\");\n let h1City = document.querySelector(\"#city-name\");\n let h3Country = document.querySelector(\"#country-name\");\n\n if (changeCity.value == \"\") {\n alert(\"Please enter your city!\");\n } else {\n h1City.innerHTML = changeCity.value;\n h3Country.innerHTML = null;\n\n changeTemp(changeCity.value);\n }\n}", "title": "" }, { "docid": "98cf5d4f9293c4bd0fc8e33591940b3b", "score": "0.6138883", "text": "function cityClickHandler(e){\n\n var city = $(e.target).closest('li').attr('data-city');\n if(city){ getDataAndRender(city) }\n \n }", "title": "" }, { "docid": "3e1411d5a721bc64ea59efad575ef7b6", "score": "0.6138698", "text": "function searchCity(event) {\n event.preventDefault();\n let changedCity = document.querySelector(\"#city\");\n getByCity(changedCity.value);\n}", "title": "" }, { "docid": "9f12db2c29a69a3428d4a0f195cc6667", "score": "0.6137004", "text": "function searchCity(e) {\n const newCity = $(\"#searchInput\").val();\n // If the search button is clicked with no text, return\n if (newCity === \"\") {\n return;\n }\n updatePreviousCitiesCalled(newCity);\n console.log(newCity);\n const newURL = createQueryURL(newCity);\n fetchCityData(newURL);\n}", "title": "" }, { "docid": "ee9fec66f868b9300e313dbd85b3afa0", "score": "0.611649", "text": "function changeCityList1() {\n var cityList = {};\n cityList['AP'] = ['-----select-------','Amaravati','Anantapuram','Bhimavaram','Chilakaluripet','Chirala','Chittoor','Dharmavaram','Eluru','Gudivada',\n 'Guntakal','Guntur','Hindupur','Kadapa','Kakinada','Kurnool','Machilipatnam','Madanapalle','Mangalagiri','Nandyal',\n 'Narasaraopet','Nellore','Ongole','Proddatur','Rajamahendravaram','Srikakulam','Tadepalligudem','Tadipatri',\n 'Tenali','Tirupati','Vijayawada','Visakhapatnam','Vizianagaram'];\n cityList['AR'] = ['Anjaw','Changlang','East Siang','Kurung Kumey','Lohit','Lower Dibang Valley','Lower Subansiri',\n 'Papum Pare','Tawang','Tirap','Dibang Valley','Upper Siang','Upper Subansiri','West Kameng',\n 'West Siang'];\n cityList['AS'] = ['Baksa','Barpeta','Bongaigaon','Cachar','Chirang','Darrang','Dhemaji','Dima Hasao','Dhubri','Dibrugarh',\n 'Goalpara','Golaghat','Hailakandi','Jorhat','Kamrup','Kamrup Metropolitan','Karbi Anglong',\n 'Karimganj','Kokrajhar','Lakhimpur','Marigaon','Nagaon','Nalbari','Sibsagar','Sonitpur','Tinsukia',\n 'Udalguri'];\n cityList['BI'] =['Araria','Arwal','Aurangabad','Banka','Begusarai','Bhagalpur','Bhojpur','Buxar','Darbhanga','East Champaran',\n 'Gaya','Gopalganj', 'Jamui', 'Jehanabad', 'Kaimur', 'Katihar', 'Khagaria', 'Kishanganj', 'Lakhisarai',\n 'Madhepura', 'Madhubani', 'Munger', 'Muzaffarpur', 'Nalanda', 'Nawada', 'Patna', 'Purnia', 'Rohtas', \n 'Saharsa', 'Samastipur', 'Saran', 'Sheikhpura', 'Sheohar', 'Sitamarhi', 'Siwan', 'Supaul', 'Vaishali',\n 'West Champaran', 'Chandigarh'];\n cityList['CH'] =['Bastar', 'Bijapur', 'Bilaspur', 'Dantewada', 'Dhamtari', 'Durg', 'Jashpur', 'Janjgir-Champa', 'Korba',\n 'Koriya', 'Kanker', 'Kabirdham (Kawardha)', 'Mahasamund', 'Narayanpur', 'Raigarh', 'Rajnandgaon', \n 'Raipur','Surguja'];\n \n cityList['DL'] =['Central Delhi', 'East Delhi', 'New Delhi', 'North Delhi', 'North East Delhi', 'North West Delhi', \n 'South Delhi', 'South West Delhi', 'West Delhi'];\n cityList['GO'] =['North Goa','South Goa'];\n cityList['GU'] =['Ahmedabad', 'Amreli district', 'Anand', 'Banaskantha', 'Bharuch', 'Bhavnagar', 'Dahod', 'The Dangs', \n 'Gandhinagar', 'Jamnagar', 'Junagadh', 'Kutch', 'Kheda', 'Mehsana', 'Narmada', 'Navsari', 'Patan', 'Panchmahal', \n 'Porbandar', 'Rajkot', 'Sabarkantha', 'Surendranagar', 'Surat', 'Vyara', 'Vadodara', 'Valsad',];\n cityList['HA'] =['Ambala', 'Bhiwani', 'Faridabad', 'Fatehabad', 'Gurgaon', 'Hissar', 'Jhajjar', 'Jind', 'Karnal', \n 'Kaithal', 'Kurukshetra', 'Mahendragarh', 'Mewat', 'Palwal', 'Panchkula', 'Panipat', 'Rewari', \n 'Rohtak', 'Sirsa','Sonipat', 'Yamuna Nagar'];\n cityList['HI'] =['Bilaspur', 'Chamba', 'Hamirpur', 'Kangra', 'Kinnaur', 'Kullu', 'Lahaul and Spiti', 'Mandi',\n 'Shimla', 'Sirmaur', 'Solan', 'Una'];\n cityList['JH'] =['Bokaro', 'Chatra', 'Deoghar', 'Dhanbad', 'Dumka', 'East Singhbhum', 'Garhwa', 'Giridih', 'Godda',\n 'Gumla', 'Hazaribag', 'Jamtara', 'Khunti', 'Koderma', 'Latehar', 'Lohardaga', 'Pakur',\n 'Palamu', 'Ramgarh','Ranchi', 'Sahibganj', 'Seraikela Kharsawan', 'Simdega', 'West Singhbhum',];\n cityList['JK'] =['Anantnag', 'Badgam', 'Bandipora', 'Baramulla', 'Doda', 'Ganderbal', 'Jammu', 'Kargil', 'Kathua',\n 'Kishtwar', 'Kupwara', 'Kulgam', 'Leh', 'Poonch', 'Pulwama', 'Rajauri', 'Ramban', 'Reasi',\n 'Samba', 'Shopian','Srinagar', 'Udhampur'];\n cityList['KA'] =['Bagalkot', 'Bangalore Rural', 'Bangalore Urban', 'Belgaum', 'Bellary', 'Bidar', 'Bijapur',\n 'Chamarajnagar', 'Chikkamagaluru', 'Chikkaballapur', 'Chitradurga', 'Davanagere', 'Dharwad', 'Dakshina Kannada',\n 'Gadag', 'Gulbarga', 'Hassan', 'Haveri district', 'Kodagu', 'Kolar', 'Koppal', 'Mandya', 'Mysore', 'Raichur', \n 'Shimoga', 'Tumkur', 'Udupi', 'Uttara Kannada', 'Ramanagara', 'Yadgir'];\n cityList['KE'] =['Alappuzha', 'Ernakulam', 'Idukki', 'Kannur', 'Kasaragod', 'Kollam', 'Kottayam', 'Kozhikode', 'Malappuram', 'Palakkad', \n 'Pathanamthitta', 'Thrissur', 'Thiruvananthapuram', 'Wayanad'];\n cityList['MP'] =['Alirajpur', 'Anuppur', 'Ashok Nagar', 'Balaghat', 'Barwani', 'Betul', 'Bhind', 'Bhopal', 'Burhanpur',\n 'Chhatarpur', 'Chhindwara', 'Damoh', 'Datia', 'Dewas', 'Dhar', 'Dindori', 'Guna', 'Gwalior', 'Harda', 'Hoshangabad', \n 'Indore', 'Jabalpur', 'Jhabua', 'Katni', 'Khandwa (East Nimar)', 'Khargone (West Nimar)', 'Mandla', 'Mandsaur', \n 'Morena', 'Narsinghpur', 'Neemuch', 'Panna', 'Rewa', 'Rajgarh', 'Ratlam', 'Raisen', 'Sagar', 'Satna', 'Sehore', \n 'Seoni', 'Shahdol', 'Shajapur', 'Sheopur', 'Shivpuri', 'Sidhi', 'Singrauli', 'Tikamgarh', 'Ujjain', 'Umaria', \n 'Vidisha'];\n cityList['MH'] =['Ahmednagar', 'Akola', 'Amravati', 'Aurangabad', 'Bhandara', 'Beed', 'Buldhana', 'Chandrapur', 'Dhule', 'Gadchiroli',\n 'Gondia', 'Hingoli', 'Jalgaon', 'Jalna', 'Kolhapur', 'Latur', 'Mumbai City', 'Mumbai suburban', 'Nandurbar', 'Nanded', \n 'Nagpur', 'Nashik', 'Osmanabad', 'Parbhani', 'Pune', 'Raigad', 'Ratnagiri', 'Sindhudurg', 'Sangli', 'Solapur', \n 'Satara', 'Thane', 'Wardha', 'Washim', 'Yavatmal'];\n cityList['MN'] =['Bishnupur', 'Churachandpur', 'Chandel', 'Imphal East', 'Senapati', 'Tamenglong', 'Thoubal', 'Ukhrul', \n 'Imphal West'];\n cityList['MG'] =['East Garo Hills', 'East Khasi Hills', 'Jaintia Hills', 'Ri Bhoi', 'South Garo Hills', 'West Garo Hills',\n 'West Khasi Hills'];\n cityList['MZ'] =['Aizawl', 'Champhai', 'Kolasib', 'Lawngtlai', 'Lunglei', 'Mamit', 'Saiha', 'Serchhip'];\n cityList['NL'] =['Dimapur', 'Kohima', 'Mokokchung', 'Mon', 'Phek', 'Tuensang', 'Wokha', 'Zunheboto'];\n cityList['OD'] =['Angul', 'Boudh (Bauda)', 'Bhadrak', 'Balangir', 'Bargarh (Baragarh)', 'Balasore', \n 'Cuttack', 'Debagarh (Deogarh)', 'Dhenkanal', 'Ganjam', 'Gajapati', 'Jharsuguda', 'Jajpur', 'Jagatsinghpur', \n 'Khordha', 'Kendujhar (Keonjhar)', 'Kalahandi', 'Kandhamal', 'Koraput', 'Kendrapara', 'Malkangiri', 'Mayurbhanj',\n 'Nabarangpur', 'Nuapada', 'Nayagarh', 'Puri', 'Rayagada', 'Sambalpur', 'Subarnapur (Sonepur)', 'Sundergarh'];\n cityList['PN'] =['Amritsar', 'Barnala', 'Bathinda', 'Firozpur', 'Faridkot', 'Fatehgarh Sahib', 'Fazilka', 'Gurdaspur', 'Hoshiarpur',\n 'Jalandhar', 'Kapurthala', 'Ludhiana', 'Mansa', 'Moga', 'Sri Muktsar Sahib', 'Pathankot', 'Patiala', 'Rupnagar', \n 'Ajitgarh (Mohali)', 'Sangrur', 'Nawanshahr', 'Tarn Taran'];\n cityList['RJ'] =['Ajmer', 'Alwar', 'Bikaner', 'Barmer', 'Banswara', 'Bharatpur', 'Baran', 'Bundi', 'Bhilwara', 'Churu', 'Chittorgarh',\n 'Dausa', 'Dholpur', 'Dungapur', 'Ganganagar', 'Hanumangarh', 'Jhunjhunu', 'Jalore', 'Jodhpur', 'Jaipur', 'Jaisalmer', \n 'Jhalawar', 'Karauli', 'Kota', 'Nagaur', 'Pali', 'Pratapgarh', 'Rajsamand', 'Sikar', 'Sawai Madhopur', 'Sirohi', 'Tonk', 'Udaipur'];\n cityList['SK'] =['East Sikkim', 'North Sikkim','South Sikkim','West Sikkim'];\n cityList['TM'] =['Ariyalur', 'Chennai', 'Coimbatore', 'Cuddalore', 'Dharmapuri', 'Dindigul', 'Erode', 'Kanchipuram', 'Kanyakumari', 'Karur', 'Madurai', \n 'Nagapattinam', 'Nilgiris', 'Namakkal', 'Perambalur', 'Pudukkottai', 'Ramanathapuram', 'Salem', 'Sivaganga', 'Tirupur', 'Tiruchirappalli', 'Theni', 'Tirunelveli', \n 'Thanjavur', 'Thoothukudi', 'Tiruvallur', 'Tiruvarur', 'Tiruvannamalai', 'Vellore', 'Viluppuram', 'Virudhunagar'];\n cityList['TN'] =['Adilabad', 'Hyderabad', 'Karimnagar', 'Khammam','Mahbubnagar', 'Medak', 'Nalgonda','Nizamabad', 'Warangal'];\n cityList['TR'] =['Dhalai','North Tripura','South Tripura','Khowai','West Tripura'];\n cityList['UK'] =['Almora', 'Bageshwar', 'Chamoli', 'Champawat', 'Dehradun', 'Haridwar',\n 'Nainital', 'Pauri Garhwal', 'Pithoragarh', 'Rudraprayag', 'Tehri Garhwal', 'Udham Singh Nagar', 'Uttarkashi'];\n cityList['UP'] =['Agra', 'Allahabad', 'Aligarh', 'Ambedkar Nagar', 'Auraiya', 'Azamgarh', 'Barabanki', 'Budaun', 'Bagpat', 'Bahraich', \n 'Bijnor', 'Ballia', 'Banda', 'Balrampur', 'Bareilly', 'Basti', 'Bulandshahr', 'Chandauli', 'Chhatrapati Shahuji Maharaj Nagar', \n 'Chitrakoot', 'Deoria', 'Etah', 'Kanshi Ram Nagar', 'Etawah', 'Firozabad', 'Farrukhabad', 'Fatehpur', 'Faizabad',\n 'Gautam Buddh Nagar', 'Gonda', 'Ghazipur', 'Gorakhpur', 'Ghaziabad', 'Hamirpur', 'Hardoi', 'Mahamaya Nagar', 'Jhansi',\n 'Jalaun', 'Jyotiba Phule Nagar', 'Jaunpur district', 'Ramabai Nagar (Kanpur Dehat)', 'Kannauj', 'Kanpur', 'Kaushambi', \n 'Kushinagar', 'Lalitpur', 'Lakhimpur Kheri', 'Lucknow', 'Mau', 'Meerut', 'Maharajganj', 'Mahoba', 'Mirzapur',\n 'Moradabad', 'Mainpuri', 'Mathura', 'Muzaffarnagar', 'Panchsheel Nagar district (Hapur)', 'Pilibhit', 'Shamli',\n 'Pratapgarh', 'Rampur', 'Raebareli', 'Saharanpur', 'Sitapur', 'Shahjahanpur', 'Sant Kabir Nagar', 'Siddharthnagar',\n 'Sonbhadra', 'Sant Ravidas Nagar', 'Sultanpur', 'Shravasti', 'Unnao', 'Varanasi'];\n cityList['WB'] =['Birbhum', 'Bankura', 'Bardhaman', 'Darjeeling', 'Dakshin Dinajpur', 'Hooghly', 'Howrah', 'Jalpaiguri', 'Cooch Behar', \n 'Kolkata', 'Maldah', 'Paschim Medinipur', 'Purba Medinipur', 'Murshidabad', 'Nadia', 'North 24 Parganas', \n 'South 24 Parganas', 'Purulia', 'Uttar Dinajpur'];\n /*Script logic to develop dynamic list of cities based on selected State in permanent address*/ \n var stateOption = document.getElementById(\"myState1\");\n var cityOption = document.getElementById(\"cities1\");\n var selectedState = stateOption.options[stateOption.selectedIndex].value;\n while (cityOption.options.length) {\n cityOption.remove(0);\n }\n var newCityList=cityList[selectedState];\n if (newCityList) {\n var i;\n for (i = 0; i < newCityList.length; i++) {\n var city = new Option(newCityList[i],i);\n cityOption.options.add(city);\n }\n }\n }", "title": "" }, { "docid": "54b3e556fcb6813d7cca5b2d9c41aa6e", "score": "0.61115324", "text": "cityNameChanged(event) {\n let cityStr = event.target.value;\n this.cwdcity = cityStr;\n if(this.cwdcity) {\n let finalurl = QUERY_URL + cityStr + QUERY_URL_2;\n this.cwdurl = finalurl;\n this.cwdcityvalue = true;\n } else {\n this.cwdcityvalue = false;\n }\n }", "title": "" }, { "docid": "0778ad311dd7e4d375ff6e6e96056254", "score": "0.61045754", "text": "function onCityChanged() {\n var place = autocomplete.getPlace();\n const lat = place.geometry.location.lat();\n const lng = place.geometry.location.lng();\n getLocationCurrentWeather(lat, lng);\n}", "title": "" }, { "docid": "229ca5c55975c6dec7a7e77cb70676ee", "score": "0.6086327", "text": "function locatedCity(event) {\n event.preventDefault();\n let cityElement = document.querySelector(\"input\");\n city = cityElement.value;\n loadWeatherData();\n}", "title": "" }, { "docid": "6ad0bf3f0335a9e8cf36a824190505eb", "score": "0.60814136", "text": "function displayCity() {\n $(\"#currentCity\").text(city + \", \" + state)//takes city and state global variables and displays them\n}", "title": "" }, { "docid": "7c876f453fba67af3ff1d56ab3ea3282", "score": "0.6077523", "text": "changeLocation(cityName) {\n this.cityName = cityName;\n }", "title": "" }, { "docid": "875cb0277a58a0b07ffc427f7a0cca87", "score": "0.6070043", "text": "function historySelect() {\r\n\r\n cityInput = this.value;\r\n getCurrentWeather();\r\n getWeatherForecast();\r\n\r\n}", "title": "" }, { "docid": "bfff25094d757f0b9c9ecd8e85bf113e", "score": "0.60541034", "text": "function ChangeSelectMenu() {\n slcCountry.selectedIndex = this.id;\n LoadCovidInfo();\n}", "title": "" }, { "docid": "2a533efdb3a6e6db8016885b6e6ad062", "score": "0.6051609", "text": "function enableCity(event){\n const citySelector = document.querySelector(\"select[name=city]\")\n\n const statesInput = document.querySelector(\"input[name=states]\")\n const indexOfSelectedState = event.target.selectedIndex\n statesInput.value = event.target.options[indexOfSelectedState].text\n\n const ufValue = event.target.value\n const url = `https://servicodados.ibge.gov.br/api/v1/localidades/estados/${ufValue}/municipios`\n\n citySelector.innerHTML = \"<option value>Selecione sua cidade</option>\"\n citySelector.disabled = true\n\n fetch(url).then(res => res.json())\n .then(cities => {\n for(let city of cities){\n citySelector.innerHTML += `<option value=\"${city.id}\">${city.nome}</option>`\n }\n citySelector.disabled = false\n })\n}", "title": "" }, { "docid": "0bde3157955f319d91854e7b9a2b80c5", "score": "0.6043833", "text": "function getCities(event) {\n // armazena ambas estruturas do html\n const citySelect = document.querySelector(\"select[name=city]\");\n const stateInput = document.querySelector(\"input[name=state]\");\n\n // uf value é a id do estado selecionado\n const ufValue = event.target.value;\n\n // armazena o index do estado selecionado\n const indexOfSelectedState = event.target.selectedIndex;\n\n // insere o nome do estado no input escondido que sera enviado no form\n stateInput.value = event.target.options[indexOfSelectedState].text;\n\n // monta a url da api do ibge com a id do estado, ela retorna um json com todas as cidades que existem dentro de tal estado\n const url = `https://servicodados.ibge.gov.br/api/v1/localidades/estados/${ufValue}/municipios`\n\n //desativa o select de cidade\n citySelect.disabled = true;\n\n // insere o select padrao \"placeholder\"\n citySelect.innerHTML = \"<option value=''>Selecione a cidade</option>\";\n\n // executa a requisição para a API de IBGE\n fetch(url)\n .then( res => res.json() )\n .then( cities => {\n \n // insere uma opção no select das cidades para cada cidade do json retornado pelo IBGE\n for (city of cities) {\n citySelect.innerHTML += `<option value=${city.nome}>${city.nome}</option>`\n }\n \n // ativa o select\n citySelect.disabled = false;\n });\n}", "title": "" }, { "docid": "d611e28dd6a0a5f59e5b27836cc5e68e", "score": "0.60414714", "text": "function changeBackground() {\n var citySelected = $('#city-type').val();\n if (citySelected == 'NYC') { /* Use ```if/else if/else ``` conditionals to control the flow of your application*/\n $('body').attr('class', 'nyc'); /* Use the ```$.attr()``` function to update html classes*/\n } else if (citySelected == 'SF') {\n $('body').attr('class', 'sf');\n } else if (citySelected == 'LA') {\n $('body').attr('class', 'la');\n } else if (citySelected == 'ATX') {\n $('body').attr('class', 'austin');\n } else if (citySelected == 'SYD') {\n $('body').attr('class', 'sydney');\n } else\n $('body').attr('class', 'cityPixDefault');\n }", "title": "" }, { "docid": "0925f952cd8c2f71280b60f8417a80ce", "score": "0.6041216", "text": "function listCites(crySelected) {\n fetch('https://countriesnow.space/api/v0.1/countries/')\n .then(response => response.json())\n .then(res => {\n let city = res.data.filter(c => {\n return c.country.includes(crySelected);\n })\n for (data of city[0].cities) {\n cities.innerHTML += `<option>${data}</option>`;\n }\n })\n .catch(err => console.warn(err));\n \n // Event on change selected country\n\n cities.addEventListener('change', e => {\n salatList.innerText = '';\n let citySelected = e.target.value;\n prayerTimes(crySelected, citySelected);\n });\n}", "title": "" }, { "docid": "4f361cd34f3d8af639f6e320d08222d5", "score": "0.60364", "text": "function changeSelection() {\n // Gets current country selection\n var curr_selection = d3.select(\"#select-box\").property(\"value\");\n\n curr_data = [];\n data.forEach(function(d) {\n if (d.LOCATION == curr_selection)\n curr_data.push(d);\n });\n var curr_year = d3.select(\"#bubble-year\").property(\"value\");\n\tupdateVisualization(curr_data);\n\tupdateBubbles(curr_year,curr_selection);\n}", "title": "" }, { "docid": "0fe4d947ab03a403d1454a7fc188fcd8", "score": "0.60346323", "text": "function changeCity() {\n\tevent.preventDefault();\n\n\tvar city = $('#city-type').val();\n\n\t//if the city is NYC, change to nyc.jpg\n\t//if the city is SF, chance to sf.jpg\n\t//if the city is LA, change to la.jpg\n\t//if the city is Austin, change to austin.jpg\n\t//if the city is Sydney, change to sydney.jpg\n\n\tif (city == 'NYC'|| city == 'New York City'|| city == 'New York') { \n\t\t$('body').removeClass().addClass('nyc');\n\t} else if (city == 'San Francisco'|| city == 'SF'|| city == 'Bay Area') {\n\t\t$('body').removeClass().addClass('sf');\n\t} else if (city == 'Los Angeles'|| city == 'LA'|| city == 'LAX') {\n\t\t$('body').removeClass().addClass('la');\n\t} else if (city == 'Austin'|| city == 'ATX') {\n\t\t$('body').removeClass().addClass('austin');\n\t} else if (city == 'Sydney'|| city == 'SYD') {\n\t\t$('body').removeClass().addClass('sydney');\n\t} else {\n\t\t$('body').removeClass();\n\t}\n\n\n\n}", "title": "" }, { "docid": "20c87c38c83db89a8e7b431cf12a7e5f", "score": "0.60277116", "text": "function getWeather() {\n\tconsole.log(\"getWeather() starting\")\n\t//console.log(\"getWeather() selectedCity = \" + selectedCity)\n\tdocument.getElementById(\"container\").innerHTML = \"\"\n}", "title": "" }, { "docid": "590a34678e278b78f2f20329c706d075", "score": "0.6022767", "text": "async function dropdown_city() {\n document.getElementById('container_region').classList.remove(\"d-none\");\n document.getElementById('container_country').classList.remove(\"d-none\");\n document.getElementById('location_label').innerHTML = 'Ciudad<span class=\"text-danger\"> *</span>';\n document.getElementById('location_input').value = \"\";\n $('#post_location').attr(\"onclick\", \"btn_post_city()\");\n const regions = await getRegions();\n $('#location_select_region').html(\"\");\n $('#location_select_region').append(`<option value=\"0\">Seleccione una región</option>`);\n regions.forEach(region => {\n const name = region.name;\n const ID = region.ID;\n $('#location_select_region').append(`<option value=\"${ID}\">${name}</option>`);\n });\n document.getElementById(\"location_select_region\").onchange = async function () {\n const region = document.getElementById('location_select_region').value;\n $('#location_select_country').html('');\n $('#location_select_country').append(`<option value=\"0\">Seleccione un país</option>`);\n const countries = await getCountries();\n countries.forEach(country => {\n if (country.region_id == region) {\n const name = country.name;\n const ID = country.ID;\n $('#location_select_country').append(`<option value=\"${ID}\">${name}</option>`) \n }\n });\n }\n}", "title": "" }, { "docid": "940e7047ffd08e1affadb9a50a067b90", "score": "0.6001403", "text": "function setDropdownTitle(currentSelectedCity) {\n if (currentSelectedCity !== \"\") {\n $(\"#dropdown-span\").html(currentSelectedCity);\n hideLoader();\n }\n}", "title": "" }, { "docid": "c02ba1166d74ea481224cd8e3b6dcaac", "score": "0.59921753", "text": "function setCityTags(citiesList){\n removeCities();\n\n citiesList.forEach((element) => {\n const optionTag = document.createElement('option')\n optionTag.value = element.city\n optionTag.textContent = element.city\n cityTag.append(optionTag)\n })\n\n cityTag.addEventListener('change', getSelectedCity)\n\n}", "title": "" }, { "docid": "3bfac13a927b4efe06b3c42e64047592", "score": "0.59882176", "text": "showCity() {\n\t\tthis.stateCity = !this.stateCity;\n\t\tthis.stateDistrict = false;\n\t}", "title": "" }, { "docid": "ad6d88e0a0af91cc0147a03cd685fe97", "score": "0.5984562", "text": "function setCurrent(city) { \n $.ajax({\n url: 'http://api.openweathermap.org/data/2.5/weather?q=' + city + '&APPID=' + apiKey,\n method: 'GET',\n data: {},\n dataType: 'json',\n success: function(data){\n \n // Provide the value for draw function\n draw(data.main.temp);\n \n // Populate city\n $('#city').empty();\n $('#city').append(city.substring(0,city.indexOf(',')));\n $('#temp').empty();\n \n // Provide the icon according the case\n if ($('#icon').is(':empty')) {\n setStatus(data.weather[0].main);\n }\n \n // Provide current temperature\n if ($('#temp').is(':empty')) {\n $('#temp').append(convert(data.main.temp));\n }\n \n // Add Unit to change to the button\n if ($('#change').is(':empty')) {\n $('#change').append('°F');\n }\n }\n });\n}", "title": "" }, { "docid": "48806f87c3ea02d97e652d21f2e8b39b", "score": "0.5974572", "text": "function start() {\n var cityName = [\"Please choose a city\", \"NYC\", \"SF\", \"LA\", \"ATX\", \"SYD\"]; /*Create an array with the following values: \"NYC\", \"SF\", \"LA\", \"ATX\", \"SYD\"; use the array to add values */\n $.each(cityName, function(count, city) { /*using an ```.each``` loop in JavaScript */\n $('#city-type').append($('<option></option>').val(city).html(city)); /* Use $.append() in your iteration on the drop-down menu - Get the value of user input using ```$.val()```*/\n });\n\n $('#city-type').change(changeBackground); /*- Use the ```$.change``` event handler to capture user actions*/\n\n function changeBackground() {\n var citySelected = $('#city-type').val();\n if (citySelected == 'NYC') { /* Use ```if/else if/else ``` conditionals to control the flow of your application*/\n $('body').attr('class', 'nyc'); /* Use the ```$.attr()``` function to update html classes*/\n } else if (citySelected == 'SF') {\n $('body').attr('class', 'sf');\n } else if (citySelected == 'LA') {\n $('body').attr('class', 'la');\n } else if (citySelected == 'ATX') {\n $('body').attr('class', 'austin');\n } else if (citySelected == 'SYD') {\n $('body').attr('class', 'sydney');\n } else\n $('body').attr('class', 'cityPixDefault');\n };\n\n\n\n} //start", "title": "" }, { "docid": "dbfff171976f2fb476a9bb85810768ba", "score": "0.59216964", "text": "function openCity(evt, cityName) {\r\n var i, tabcontent, tablinks;\r\n tabcontent = document.getElementsByClassName(\"tabcontent\");\r\n for (i = 0; i < tabcontent.length; i++) {\r\n tabcontent[i].style.display = \"none\";\r\n }\r\n tablinks = document.getElementsByClassName(\"tablinks\");\r\n for (i = 0; i < tablinks.length; i++) {\r\n tablinks[i].className = tablinks[i].className.replace(\" active\", \"\");\r\n }\r\n document.getElementById(cityName).style.display = \"block\";\r\n evt.currentTarget.className += \" active\";\r\n}", "title": "" }, { "docid": "3e7ee0ee0bf728a005a40548ea2d2b75", "score": "0.5901493", "text": "function fillCitiesList(){\n\t$('#citiesList').empty();\n\tfor (var i = 0; i < citiesList.length; i++) {\n\t\tvar elem = $(\"<option/>\").html(citiesList[i].city);\t\t\n\t\t$('#citiesList').append(elem);\n\t}\n\tbusyIndicator.hide();\n\tcitySelectionChange();\n}", "title": "" }, { "docid": "3d669581f58a9ecddb0a8c186b5d1514", "score": "0.58999795", "text": "function cities(){\r\n country = document.getElementById(\"country\")\r\n var pakistan = [\"Karachi\", \"Islamabad\", \"Lahore\", \"Rawalpindi\"]\r\n var india = [\"Mombai\", \"Delhi\", \"Kolkatta\" , \"Chennai\"]\r\n var bangladesh = [\"Dhaka\" , \"Chatogram\" , \"Khulna\", \"RajShahi\"]\r\n \r\n if(country.value === \"Pakistan\"){\r\n var city = document.getElementById(\"city\")\r\n city.innerHTML = \"\"\r\n for(var i=0; i<pakistan.length; i++){\r\n var node = document.createElement(\"OPTION\"); \r\n var textnode = document.createTextNode(pakistan[i]); \r\n node.appendChild(textnode); \r\n document.getElementById(\"city\").appendChild(node);\r\n } \r\n }\r\n\r\n else if(country.value === \"India\"){\r\n var city = document.getElementById(\"city\")\r\n city.innerHTML = \"\"\r\n for(var i=0; i<india.length; i++){\r\n var node = document.createElement(\"OPTION\"); \r\n var textnode = document.createTextNode(india[i]); \r\n node.appendChild(textnode); \r\n document.getElementById(\"city\").appendChild(node);\r\n } \r\n }\r\n\r\n else if(country.value === \"Bangladesh\"){\r\n var city = document.getElementById(\"city\")\r\n city.innerHTML = \"\"\r\n for(var i=0; i<bangladesh.length; i++){\r\n var node = document.createElement(\"OPTION\"); \r\n var textnode = document.createTextNode(bangladesh[i]); \r\n node.appendChild(textnode); \r\n document.getElementById(\"city\").appendChild(node);\r\n } \r\n }\r\n}", "title": "" }, { "docid": "c05326e0907734738079fd662db981fd", "score": "0.58971256", "text": "function changeBackground(city) {\n\tconsole.log(city);\n\n// conditionals like with assignment #6\n// When user chooses city, change background to selected city\n// If user selects NYC, change background to .nyc\n\tif (city == \"NYC\")\t{\n\t\t$(\"body\").attr(\"class\", \"nyc\");\n\t}\n\t // If user selects SF, change background to .sf\t\n\telse if (city == \"SF\")\t{\n\t\t$(\"body\").attr(\"class\", \"sf\");\n\t}\n\t// If user selects LA, change background to .la\n\telse if (city == \"LA\") {\t\n\t\t$(\"body\").attr(\"class\", \"la\");\n\t}\n\t// If user selects Austin, change background to .austin\n\telse if (city == \"ATX\")\t{\n\t\t$(\"body\").attr(\"class\", \"austin\");\n\t}\n\t// If user selects Sydney, change background to .sydney\n\telse if (city == \"SYD\")\t{\n\t\t$(\"body\").attr(\"class\", \"sydney\");\n\t}\n\n}", "title": "" }, { "docid": "53b9011417487dee3f8e599fb04c2753", "score": "0.5897082", "text": "function getCities(value) {\n var path = \"/Cities\",\n param = \"state=\" + value;\n\n function success(data, status) {\n //console.log(\"cities\",data);\n var opts = \"\",\n error_arr = $(data).find(\"error\");\n if (error_arr.length !== 0) {\n //TODO do something graceful here\n console.error(\"Errors: \", error_arr);\n } else {\n //TODO include a no cities found message.\n opts += \"<option value=''>All Cities</option>\";\n $(\"row\", data).each(function() {\n opts +=\n \"<option value=\" +\n $(\"city\", this).text() +\n \">\" +\n $(\"city\", this).text() +\n \"</option>\";\n });\n $(\"#city\").html(opts);\n }\n }\n\n $.ajax({\n type: \"GET\",\n async: true,\n cache: false,\n url: url,\n data: { path: path + \"?\" + param },\n dataType: \"xml\", //content type of response\n success: success\n });\n }", "title": "" }, { "docid": "2fe4ccc425db7498e709b436d0bef564", "score": "0.58952254", "text": "change() {\n this.$parent.changePage('search')\n if(this.entered){\n this.$parent.getCountries(this.entered)\n }\n if (this.open == false) {\n this.open = true;\n this.current = 0;\n }\n }", "title": "" }, { "docid": "bf73ade4856c6c84acdf58b694f88408", "score": "0.58907866", "text": "function cityTest() {\n\t\tvar cities = this.responseText;\n\t\tvar cityArray = cities.split(\"\\n\");\n\t\tvar cityOptions = document.getElementById(\"cities\");\n\t\tvar options = \"\";\n\t\tfor (var i = 0; i < cityArray.length; i++) {\n\t\t\toptions += \"<option>\" + cityArray[i] + \"</option>\";\n\t\t}\n\t\tcityOptions.innerHTML = options;\n\t}", "title": "" }, { "docid": "b022f9319db65a23fe06b28f0e08444c", "score": "0.58904886", "text": "function checkCities(searchString) {\n // set search\n var lowString = searchString.toLowerCase();\n var regex = new RegExp(\"^\" + lowString + \".*\");\n // escape variables\n myRefreshButton.toggleButton('btn-success', 'btn-warning');\n var myCitiesArray = [];\n var indexCity = -1;\n var aloneCity;\n // iteration on cities list\n for (var city in myCities.list) {\n // set city test\n var lowName = myCities['list'][city]['name'].toLowerCase();\n var foundBool = regex.test(lowName);\n if ((lowName === lowString) || (myCities['list'][city]['name'] === searchString)) {\n indexCity++;\n myCities['match'] = indexCity.toString();\n myRefreshButton.toggleButton('btn-warning', 'btn-success');\n myCitiesArray.push(myCities['list'][city]);\n }\n // matching regex - update cities list\n else if (foundBool) {\n indexCity++;\n aloneCity = indexCity;\n myCitiesArray.push(myCities['list'][city]);\n }\n }\n myCities.list = [];\n myCities.list = myCitiesArray;\n myRefreshButton.setRefreshBadge(myCities.getListLength());\n // list matching cities\n if (myCities.getListLength() <= 30) {\n createDrop(myCities['list']);\n }\n else {\n $('#dropDown').empty();\n }\n // uniq value left\n if (myCities.getListLength() == 1) {\n myRefreshButton.toggleButton('btn-warning', 'btn-success');\n if (myInput.way) {\n myCities['match'] = aloneCity.toString();\n doRefresh();\n }\n }\n else if (myCities.getListLength() == 0) {\n alert('Aucune ville correspondante');\n }\n myRefreshButton.setRefreshBadge(myCities.getListLength());\n }", "title": "" }, { "docid": "3c0ec9d634022cbeeb140c57fcdaadf4", "score": "0.5882946", "text": "function getSelectedCity() {\n //retrieve json data from local storage\n var scaventureData = getScaventureData();\n\n // get cities\n var cities = scaventureData.scaventure.cities;\n\n // get selected city or set selected city if null\n var selectedCity = getLocalStorage(\"selectedCity\");\n if (!selectedCity) {\n selectedCity = cities[0].name; // select the first city\n setSelectedCity(selectedCity);\n }\n return selectedCity;\n}", "title": "" }, { "docid": "89ef00d0402f5ebc81092d2a63d82e4a", "score": "0.5881403", "text": "function getSelectedState(e) {\n e.preventDefault()\n getAllCities()\n return stateTag.value\n}", "title": "" }, { "docid": "b39b3f8077c53cec334c65e564389df2", "score": "0.58797306", "text": "function setCity(city){\n document.cookie = \"city=\"+city+\";path=/\"\n setCityInHeaderFromCookies()\n}", "title": "" }, { "docid": "2a9e906530933f498b5726ef54385cc8", "score": "0.5878944", "text": "function getSelectedCity(e) {\n e.preventDefault()\n form.addEventListener('submit', getPollutionData)\n return cityTag.value\n}", "title": "" }, { "docid": "95ef99806b89ed4c8b203ee4a4744607", "score": "0.5878136", "text": "function checkCitySelected(){\n\tvar cityValue = document.getElementById('city').value\n\tif(cityValue!=-1){\n\t\tdocument.getElementById('cityErrorMessage').innerHTML='';\n\t}\n}", "title": "" }, { "docid": "18e3f22e342a9d4978513d7466f4d6d1", "score": "0.5872129", "text": "function set_combo_city_cls(select, state_id){\n $('.city').html('<option value=\"\">Selecione o estado</option>');\n if(state_id!=''){\n $.ajax({\n type: \"POST\",\n data: \"state_id=\" + state_id,\n dataType: \"json\",\n cache: false,\n url: '/ajax/states/get',\n timeout: 2000,\n error: function() {\n console.log(\"Failed to submit\");\n },\n success: function(data) {\n $(\"select.city option\").remove();\n\n var row = '';\n $.each(data, function(i, j){\n var selected = \"\";\n if(select!= \"\" && (select == j.id || select.toUpperCase() == j.name) ){\n selected = \"selected\";\n }\n row += \"<option value=\\\"\" + j.id + \"\\\" \"+selected+\" >\" + j.name + \"</option>\";\n });\n\n $('.city').html(row);\n }\n });\n }\n }", "title": "" }, { "docid": "fe632b24f0f68074350c21b73f8eb2f2", "score": "0.58689374", "text": "function counrtyChanged(countryName) {\n\n changeCountry(countryName);\n showInfo(countryName);\n \n}", "title": "" }, { "docid": "d9997a552eb316dd5c174e73c3189fcb", "score": "0.5867984", "text": "function updateCity(event) {\n event.preventDefault();\n //recognize value ie city and find image to replace\n var city = $(\"#city-type\").val();\n console.log(city);\n //ND: Nice use of console.log for testing!\n\n\n if (city == \"New York City\" || city == \"NYC\" || city == \"new york\" || city == \"nyc\") {\n $('body').removeClass('bodyimage').addClass('nyc');\n $(\"form\").trigger(\"reset\");\n\n //can't find solution as to why \"New York City\" isn't working, the console shows it is being picked up,a 3word string space prob?\n }\n\n if (city == \"San Francisco\" || city == \"SF\" || city == \"SAN FRAN\" || city == \"Bay Area\") {\n $('body').removeClass('bodyimage').addClass('sf');\n $(\"form\").trigger(\"reset\");\n\n }\n\n if (city == \"Los Angeles\" || city == \"LA\" || city == \"LAX\" || city == \"L.A.\") {\n $('body').removeClass('bodyimage').addClass('la');\n $(\"form\").trigger(\"reset\");\n\n }\n\n if (city == \"Austin\" || city == \"ATX\" || city == \"austin\" || city == \"AUSTIN\") {\n $('body').removeClass('bodyimage').addClass('austin');\n $(\"form\").trigger(\"reset\");\n\n }\n\n if (city == \"Sydney\" || city == \"SYD\" || city == \"sydney\") {\n $('body').removeClass('bodyimage').addClass('sydney');\n $(\"form\").trigger(\"reset\");\n //SIGH. I don't know how to write the function so that when the user enters sydney, it doesn't 'end' and get stuck here\n\n }\n\n }", "title": "" }, { "docid": "236ae18823a285b37203a7e0ac5bbe9e", "score": "0.58636343", "text": "function populateReturnToCity() {\n selectedInd = document.MultiCityFareSearchForm.ReturnToCityList.selectedIndex\n if (selectedInd > 0) {\n //Populate ToCity and h_ToCity fields\n var value = document.MultiCityFareSearchForm.ReturnToCityList.options[selectedInd].value\n //The value are in form \n //ToAirportCode:ToAirportName:ToCityCode:ToCityName:ToCityAltName:ToCountryCode:ToCountryName:ToMinorCityName\n //Set value of h_ToCity\n var colonIndex = value.indexOf(\":\");\n var ToAirportCode = value.substring(0, colonIndex);\n value = value.substring(colonIndex+1);\n colonIndex = value.indexOf(\":\");\n var ToAirportName = value.substring(0, colonIndex);\n value = value.substring(colonIndex+1);\n colonIndex = value.indexOf(\":\");\n var ToCityCode = value.substring(0, colonIndex);\n value = value.substring(colonIndex+1);\n colonIndex = value.indexOf(\":\");\n var ToCityName = value.substring(0, colonIndex);\n value = value.substring(colonIndex+1);\n colonIndex = value.indexOf(\":\");\n var ToCountryCode = value.substring(0, colonIndex);\n var SearchToAirportOnly = value.substring(colonIndex+1);\n \n \tdocument.MultiCityFareSearchForm.h_ReturnToAirportCode.value = ToAirportCode\n \tdocument.MultiCityFareSearchForm.h_ReturnToAirportName.value = ToAirportName\n \tdocument.MultiCityFareSearchForm.h_ReturnToCityCode.value = ToCityCode\n \tdocument.MultiCityFareSearchForm.h_ReturnToCityName.value = ToCityName\n \tdocument.MultiCityFareSearchForm.h_ReturnToCountryCode.value = ToCountryCode\n \tdocument.MultiCityFareSearchForm.h_SearchReturnToAirportOnly.value = SearchToAirportOnly\n \tif (SearchToAirportOnly == 1 ) \n document.MultiCityFareSearchForm.ReturnToCity.value=ToCityName + \"(\"+ToAirportCode+\"-\"+ToAirportName+\")\";\n else \n document.MultiCityFareSearchForm.ReturnToCity.value=ToCityName + \"(All Airports)\";\n }\n }", "title": "" }, { "docid": "b4e34c4741ad5f28cb7d6c0b2fb6f603", "score": "0.5852015", "text": "function SelectionChange() { }", "title": "" }, { "docid": "b4e34c4741ad5f28cb7d6c0b2fb6f603", "score": "0.5852015", "text": "function SelectionChange() { }", "title": "" }, { "docid": "60e1caba978c6466d0381bdc877748a6", "score": "0.5846509", "text": "function displayCurrentCity(response) {\n setCityName(response.data.name);\n showTemperature(response);\n}", "title": "" }, { "docid": "8f938a71beee3e45e2d90f2f5f775183", "score": "0.584597", "text": "function onchangeRegion(){\n\t$(\"#Region\").change(function(){\n\t\tvar reg=$(\"#Region\").val(); //\n\t\tvar SFlag = true; // string flag\n\t\tif(! typeof reg ==\"string\") RFlag =false;\n\t\tvar OFlag =false; // object flag\n\n\t\tif(SFlag){\n\t\t\tvar j=RegionObj.length;\n\t\t\tfor (var i=0;i<j;i++){\n\t\t\t\tif (RegionObj[i] == reg) OFlag= true;\n\t\t\t}\n\t\t}\n\t\t//console.log(\"reg:\"+reg+\" sflag:\"+SFlag+\" OFlag:\"+OFlag);\n\n\n\t\tvar city = document.getElementById(\"City\");\n\t\t\tcity.options.length=0;\n\t\tif (SFlag && OFlag) {\n\t\t\t//var city= $(\"#City\"); //not work by this way\n\t\t\t\tvar Obj= CityObj[reg];\n\t\t\t\tvar j= Obj.length;\n\t\t\t\t\tfor (var i=0;i<j;i++){\n\t\t\t\t\t\tvar option = document.createElement(\"option\");\n\t\t\t\t\t\toption.text = Obj[i];\n\t\t\t\t\t\toption.value = Obj[i];\n\t\t\t\t\t\tcity.add(option);\n\t\t\t\t}\n\t\t\t\tcity.disabled = false; // active the select\n\t\t\t\t$(\"#R_tips\").hide();\n\t\t} else {\n\t\t\t$(\"#R_tips\").show();\n\t\t\tcity.disabled = true;\n\t\t}\n\n\t\t\t//console.log(\"Region:\"+reg.val());\n\t});\n}", "title": "" }, { "docid": "ab1c2499c174643f192cbf3a5e8e4123", "score": "0.5840243", "text": "function getCity(cityName){\n console.log(\"made it to get city\");\n $(\"#enterButton\").on(\"click\",function(){ \n var cityToSearch = $('#citySearch').val(); \n generateCityButton(cityToSearch);\n })\n }", "title": "" }, { "docid": "49e2bd6b3357a2aa7b8c74575a7c3ba7", "score": "0.58318293", "text": "function openCity(evt, cityName) {\n var i, tabcontent, tablinks;\n tabcontent = document.getElementsByClassName(\"tabcontent\");\n for (i = 0; i < tabcontent.length; i++) {\n tabcontent[i].style.display = \"none\";\n }\n tablinks = document.getElementsByClassName(\"tablinks\");\n for (i = 0; i < tablinks.length; i++) {\n tablinks[i].className = tablinks[i].className.replace(\" active\", \"\");\n }\n document.getElementById(cityName).style.display = \"block\";\n evt.currentTarget.className += \" active\"; \n}", "title": "" }, { "docid": "20d85a9381708fada39405b9daf194b0", "score": "0.5829966", "text": "function load_district() {\n\tif ($('select[name=city]').val() > 0) \n\t{\n\t\tvar path = 'loadDistrict/' + $('select[name=city]').val();\n\t\t$.ajax({\n\t\t\turl: path,\n\t\t\ttype: 'GET'\n\t\t})\n\t\t.done(function (response) {\n\t\t\tvar lam = new String(); // khoi tao bien luu pha hien thi len view\n\t\t\t// lam += '<option value=\"0\">Chọn tỉnh quận huyện</option>';\n\t\t\tresponse.forEach(function (data) {\n\t\t\t\tlam += '<option value=\"' + data.id + '\">' + data.district_name +'</option>';\n\t\t\t})\n\t\t\t$('#district').html(lam);\n\t\t\tload_ward();\n\t\t})\n\t}\n\n\t$('select[name=city]').change(function () {\n\t\tvar path = 'loadDistrict/' + $(this).val();\n\t\t$.ajax({\n\t\t\turl: path,\n\t\t\ttype: 'GET'\n\t\t})\n\t\t.done(function (response) {\n\t\t\tvar lam = new String(); // khoi tao bien luu pha hien thi len view\n\t\t\t// lam += '<option value=\"0\">Chọn tỉnh quận huyện</option>';\n\t\t\tresponse.forEach(function (data) {\n\t\t\t\tlam += '<option value=\"' + data.id + '\">' + data.district_name +'</option>';\n\t\t\t})\n\t\t\t$('#district').html(lam);\n\t\t\tload_ward();\n\t\t})\n\t})\n}", "title": "" }, { "docid": "7f6c0b6f237a76737f5be18483559e38", "score": "0.58168036", "text": "function onReady() {\n\n const cityList = [\"NYC\", \"SF\", \"LA\", \"ATX\", \"SYD\"];\n \n cityList.forEach(function(item, index) {\n let node = document.createElement('option');\n let textNode = document.createTextNode(cityList[index]);\n node.appendChild(textNode);\n document.getElementById('city-type').appendChild(node);\n });\n function cityToCheck(event) {\n event.preventDefault();\n // $('#submit-btn').html('quote');\n let cityToTest = $(\"#city-type\").val().toLowerCase();\n if (cityToTest == 'new york' || cityToTest == 'new york city' || cityToTest == 'nyc') {\n $('#city-image').css({'background': 'url(images/nyc.jpg) no-repeat', 'background-size': 'cover'});\n } \n else if (cityToTest == 'san francisco' || cityToTest == 'sf' || cityToTest == 'bay area') {\n $('#city-image').css({'background': 'url(images/sf.jpg) no-repeat', 'background-size': 'cover'});\n }\n else if (cityToTest == 'los angeles' || cityToTest == 'la' || cityToTest == 'lax') {\n $('#city-image').css({'background': 'url(images/la.jpg) no-repeat', 'background-size': 'cover'});\n }\n else if (cityToTest == 'austin' || cityToTest == 'atx') {\n $('#city-image').css({'background': 'url(images/austin.jpg) no-repeat', 'background-size': 'cover'});\n }\n else if (cityToTest == 'sydney' || cityToTest == 'syd') {\n $('#city-image').css({'background': 'url(images/sydney.jpg) no-repeat', 'background-size': 'cover'});\n }\n } \n $(\"#city-search\").change(cityToCheck);\n}", "title": "" }, { "docid": "5fd98939016e38f5feb5de6fd6cdfc0b", "score": "0.5816356", "text": "function getOcity(bcity){\n var state=bcity;\n $.ajax({\n type: \"POST\",\n url: \"../member/dynamiccities\",\n data: {\n state: state\n },\n success: function(result){\n $(\"#operationCity\").html(result);\n $(\"#operationCity\").trigger(\"chosen:updated\");\n //$(\"#customerCity\").resetSS();\n }\n });\n}", "title": "" }, { "docid": "b8e565b20f4cf319e4a73429f891d31b", "score": "0.58120334", "text": "function openCity(evt, cityName) {\n var i, tabcontent, tablinks;\n tabcontent = document.getElementsByClassName(\"tabcontent\");\n for (i = 0; i < tabcontent.length; i++) {\n tabcontent[i].style.display = \"none\";\n }\n tablinks = document.getElementsByClassName(\"tablinks\");\n for (i = 0; i < tablinks.length; i++) {\n tablinks[i].className = tablinks[i].className.replace(\" active\", \"\");\n }\n document.getElementById(cityName).style.display = \"block\";\n evt.currentTarget.className += \" active\";\n }", "title": "" } ]
d285ff4c1e378edbf1e04b8c3bbdd571
Fucntion to Rename the Sheet
[ { "docid": "72825afb969e807303b5442c4524314e", "score": "0.6331906", "text": "function renameSheet() {\n // Get the new sheet name\n let newSheetName = $(\".sheet-modal-input\").val();\n // if newSheetName typed is not empty and the name of the sheet is not in the celldata\n // Traverse on the cell data and ceate a new ccel data to updata the renamed sheet and\n // then point the newCellData to the cellData\n if (newSheetName && !Object.keys(cellData).includes(newSheetName)) {\n save = false;\n let newCellData = {};\n for (let i of Object.keys(cellData)) {\n if (i == selectedSheet) {\n newCellData[newSheetName] = cellData[selectedSheet];\n } else {\n newCellData[i] = cellData[i];\n }\n }\n\n cellData = newCellData;\n selectedSheet = newSheetName;\n // linked list created new node and deleted the old node\n // cellData[selectedSheet] is pointing to a sheet data in cellData\n // A new pointer is creted withe new sheetmane cellData[newSheetName].\n // Now points this pointer to the same referenced cellData[selectedSheet]\n // delete the previous cellData[selectedSheet] pointer\n // and updates the selectedSheet = newSheetName\n // and now deleted\n // cellData[newSheetName] = cellData[selectedSheet];\n // delete cellData[selectedSheet];\n // selectedSheet = newSheetName;\n // updates the entered text to the selected sheet\n $(\".sheet-tab.selected\").text(newSheetName);\n // remove the rename modal on clicking to ok\n $(\".sheet-modal-parent\").remove();\n } else {\n $(\".rename-error\").remove();\n // Give error if sheet name is empty and sheet name already in the sheet data\n $(\".sheet-modal-input-container\").append(`\n <div class=\"rename-error\"> Sheet Name is not valid or Sheet already exists! </div>\n `)\n }\n}", "title": "" } ]
[ { "docid": "d7f21802a14479eaf66ed1ac3084ee8f", "score": "0.6338195", "text": "function newSheet() {\n // Get the active sheet and spreadsheet\n var ss = SpreadsheetApp.getActive();\n var s = ss.getActiveSheet();\n \n // Add a new sheet the the spread sheet based on a template.\n var templateSheet = ss.getSheetByName('templateSheet');\n ss.insertSheet(0, {template: templateSheet});\n \n // Get the list of sheet names.\n var sheets = ss.getSheets();\n \n // Name the new sheet the next year.\n s = ss.getActiveSheet();\n // If the last year is not a number ask for the new sheet name.\n // Else add one to the last year and make that the name.\n if(isNaN(sheets[1].getName())) {\n launchSheetBox();\n } else {\n s.setName(String(Number(sheets[1].getName()) + 1));\n }\n \n // Add title bar protection.\n var range = s.getRange('1:1');\n range.protect().setDescription('Title Bar');\n}", "title": "" }, { "docid": "01d2a45154799d9a6dad80d199530428", "score": "0.62818325", "text": "function excel_define_sheet_name(excel){\n\tvar excel = excel||$JExcel.new();\n\tsheet_name = sheet_name||\"Summary\"\n\tsheet_number = sheet_number||0\n\texcel.set(sheet_number,undefined,undefined,sheet_name); \n\treturn excel \n}", "title": "" }, { "docid": "9c9e9891426b0c7612c46bae487b7a63", "score": "0.62183714", "text": "set worksheetName(value) {\n this._worksheetName = value;\n }", "title": "" }, { "docid": "52c87a54fab897805c015090a23034a9", "score": "0.6059251", "text": "function getNewFormSheetName() { return 'New Staff' }", "title": "" }, { "docid": "9441fb09474690c7d8fc2249e6dc18fa", "score": "0.6025612", "text": "function changeSheet(){\n var newSheet = document.getElementById(\"changeSheet\").value;\n workbook = viz.getWorkbook();\n workbook.activateSheetAsync(newSheet);\n}", "title": "" }, { "docid": "0263c1241064985ba6d9ba59fae3c6dc", "score": "0.5916456", "text": "function generateNameForTemporarySheet (sheets) {\n var coun = 16\n var retVal = 'TempSheetNameSSS' + coun.toString()\n while (sheets.filter(function (val) {\n return retVal === val.properties.title\n }).length !== 0) {\n coun++\n retVal = 'TempSheetNameSSS' + coun.toString()\n }\n return retVal\n}", "title": "" }, { "docid": "e379be9cf55f8b470754cfdadb7d61b0", "score": "0.5897088", "text": "function input_new_tabgroup_name_to_rename() {\r\n event_start();\r\n \r\n refresh_edit_buttons();\r\n \r\n event_end();\r\n}", "title": "" }, { "docid": "528624b812f051b161bfb882fb18ba10", "score": "0.5831658", "text": "function newRequest() {\n\n \n var name = \"labnol\";\n var ss = SpreadsheetApp.getActiveSpreadsheet();\n var sheet = ss.getSheetByName('шаблон').copyTo(ss);\n \n /* Before cloning the sheet, delete any previous copy */\n var old = ss.getSheetByName(name);\n if (old) ss.deleteSheet(old); // or old.setName(new Name);\n \n /* Make up the name of the sheet */\n var current = new Date();\n var year = current.getFullYear().toString().substr(-2);\n var month = ((current.getMonth()+1).toString().length > 1) ? '' : '0';\n month += (current.getMonth() + 1).toString();\n var requestName = \"\" + year + month + \"01\";\n \n counter = 1\n while (ss.getSheetByName(requestName)) {\n counter +=1\n if (counter <=9) {\n requestName = requestName.substring(0, requestName.length - 2) + \"0\" + counter;\n } else {\n requestName = requestName.substring(0, requestName.length - 2) + counter;\n }\n }\n\n \n SpreadsheetApp.flush(); // Utilities.sleep(2000);\n sheet.setName(requestName);\n\n /* Make the new sheet active */\n ss.setActiveSheet(sheet);\n \n /* Move sheet to first position */\n ss.moveActiveSheet(4)\n\n /* Fill in the values in cells */\n ss.getRange('E1').setValue(current);\n ss.getRange('E2').setValue(requestName);\n \n /* Create folder */\n var parentFolder=DriveApp.getFolderById(\"1m3OCnwO0mtjzi1_WHO-U-zco8cmh76Sm\");\n var newFolder=parentFolder.createFolder(requestName);\n\n}", "title": "" }, { "docid": "7e215dce3634cc474420865c3f2d82a7", "score": "0.56806517", "text": "function addSheets()\n {\n \n var source = SpreadsheetApp.openById('188MO4olB_VU8sWh8t_ryXXCB1jhvISpIjYPmNp9SNPo');\n var sourcename = source.getSheetName();\n var sourceSheet=source.getSheets()[0];\n\n var destination = spreadSheet;\n sourceSheet.copyTo(destination);\n var sheet = destination.getSheetByName(\"copy of result1\");\n sheet.setName(\"result_NO\") \n\n }", "title": "" }, { "docid": "d7616cbdbed60fd9f5e7f54169d8a4fd", "score": "0.5641409", "text": "function createIndex() {\n \n // Get all the different sheet IDs\n var ss = SpreadsheetApp.getActiveSpreadsheet();\n var sheets = ss.getSheets();\n \n var namesArray = sheetNamesIds(sheets);\n \n var indexSheetNames = namesArray[0];\n var indexSheetIds = namesArray[1];\n \n // check if sheet called sheet called already exists\n // if no index sheet exists, create one\n if (ss.getSheetByName('содержание') == null) {\n \n var indexSheet = ss.insertSheet('содержание',0);\n \n }\n // if sheet called index does exist, prompt user for a different name or option to cancel\n else {\n \n var indexNewName = Browser.inputBox('The name Index is already being used, please choose a different name:', 'Please choose another name', Browser.Buttons.OK_CANCEL);\n \n if (indexNewName != 'cancel') {\n var indexSheet = ss.insertSheet(indexNewName,0);\n }\n else {\n Browser.msgBox('No index sheet created');\n }\n \n }\n \n // add sheet title, sheet names and hyperlink formulas\n if (indexSheet) {\n \n printIndex(indexSheet,indexSheetNames,indexSheetIds);\n\n }\n \n}", "title": "" }, { "docid": "957b173fbfd8f9d44df2ff2729a3eab9", "score": "0.55882806", "text": "function renameCat() {\n}", "title": "" }, { "docid": "847f1097580a219a4db8464ef13ec9a2", "score": "0.5576693", "text": "get worksheetName() {\n if (this._worksheetName === undefined || this._worksheetName === null) {\n return 'Sheet1';\n }\n return this._worksheetName;\n }", "title": "" }, { "docid": "d5238ecf112834def0b2017e456a0fa6", "score": "0.55732757", "text": "function rename() {\n instructor = 'Louisa';\n // Log C: instructor\n // console.log('C: ' + instructor);\n }", "title": "" }, { "docid": "6ef843dfccea8885e481905182bef4ee", "score": "0.55216414", "text": "function createNewTour(sheetName) {\n // Get Most Recent Tour\n spreadSheet = SpreadsheetApp.getActiveSpreadsheet();\n mostRecentSheet = spreadSheet.getSheets()[NUMBER_OF_STATIC_SHEETS];\n\n // Copy most Recent tour to a new tour in the front of the spreadsheet\n newSheet = mostRecentSheet.copyTo(spreadSheet);\n spreadSheet.setActiveSheet(newSheet);\n spreadSheet.moveActiveSheet(NUMBER_OF_STATIC_SHEETS + 1);\n newSheet.setName(sheetName);\n\n return newSheet;\n}", "title": "" }, { "docid": "1dcf283b1f7b0b7cf9a2e7932fa13e7a", "score": "0.5469961", "text": "function rename(message) {\r\n var name = \"\";\r\n\r\n const args = message.content.slice(prefix.length).split(/ +/);\r\n const command = args.shift();\r\n if (command === `rename`) {\r\n\r\n // if input is blank\r\n if (!args.length) {\r\n return message.channel.send(`Invalid entry: You didn't provide a name.`);\r\n }\r\n\r\n args.forEach(word => {\r\n name += word + \" \";\r\n });\r\n\r\n name.trim();\r\n\r\n // discord has a character limit of 32 characters for a nickname\r\n if (name.length > 32) {\r\n return message.channel.send(`Invalid entry: Name must be less than 32 characters.`)\r\n }\r\n\r\n message.member.setNickname(name);\r\n return message.channel.send(`<@${message.author.id}>, you have been renamed.`);\r\n\r\n }\r\n}", "title": "" }, { "docid": "d399bd09e182bb6dac1b481c292c0bb5", "score": "0.54675376", "text": "function rename() {\n const renamed = dia + \"\" + mes() + \"\" + ano;\n return renamed\n\n}", "title": "" }, { "docid": "40ceb35244c8b370f5f7fb4d9e653803", "score": "0.54537666", "text": "function getTitleFromSheet(sheet) {\n return sheet.getRange(3, 2).getValue().toString();\n}", "title": "" }, { "docid": "8efaa1ed86288933ada5d85885e96094", "score": "0.5437097", "text": "function saveNewTitle(){\n watcher.close();\n document.getElementById(\"titleText\").disabled=\"true\";\n\n var updatedTitle = document.querySelector(\"#titleText\").value;\n\n var oldName = desktopPath + \"/\" + MAIN_DIR + \"/\" + groupName;\n var newName = desktopPath + \"/\" + MAIN_DIR + \"/\" + updatedTitle;\n\n //global.sharedObj.titles[Win_index] = newName;\n\n remote.getGlobal(\"sharedObj\").titles[Win_index] = newName;\n\n fse.rename(oldName, newName, function(err){\n if (err) console.log(\"err: \", err);\n });\n\n groupName = updatedTitle;\n setWatcher();\n}", "title": "" }, { "docid": "272bc9f8e242167d0d9675317206a226", "score": "0.539719", "text": "function createNewSheet(array) {\n var maxColumns = userRankingsSheet.getMaxColumns();\n var stockNames = userRankingsSheet.getRange(1,1,1, maxColumns).getValues();\n\n for (element in array) {\n var testSheet = ss.getSheetByName(array[element]);\n if (testSheet != null) {\n continue;\n }\n else {\n ss.insertSheet().setName(array[element]);\n var sheet = ss.getSheetByName(array[element]);\n sheet.deleteRows(100, 900); //delete rows to save space\n sheet.getRange(1, 2, 1, stockNames[0].length).setValues(stockNames);\n }\n }\n}", "title": "" }, { "docid": "f5c44c680543de4d219e7e486ff87c78", "score": "0.53515923", "text": "function getMasterSheet(testname) {\n \n/*************************************************************************/\n/*************************************************************************/\n/** **/\n/** ONLY MODIFY THIS WITH THE ID OF THIS FILE WHICH **/\n/** YOU WILL NEED TO DO IF YOU MADE A COPY OF THE FILE **/\n/** **/\n var mFID = \"<Google FID Here>\";\n/** **/\n/** **/\n/** **/\n/*************************************************************************/\n/*************************************************************************/\n \n var ss = SpreadsheetApp.openById(mFID);\n var sheetObject = ss.getSheetByName(testname);\n \n return sheetObject;\n}", "title": "" }, { "docid": "3f21cf83c4d2627ea3ac36410e492393", "score": "0.53515756", "text": "function F_Init_Sheet( _sheet_id, _sheetName ){\n return SpreadsheetApp.openById(_sheet_id).insertSheet(_sheetName);\n}", "title": "" }, { "docid": "62964328abb6baae875e1e99f0e20249", "score": "0.53034174", "text": "function cleanUpAllSheets()\n{\n var ss=SpreadsheetApp.getActiveSpreadsheet()\n var sheets=ss.getSheets();\n \n for (var i=0; i<sheets.length; i++)\n {\n \n cleanUpSheet_(sheets[i]);\n \n }\n \n \n\n SpreadsheetApp.getActiveSpreadsheet().copy(SpreadsheetApp.getActiveSpreadsheet().getName()+Utilities.formatDate( new Date(), SpreadsheetApp.getActiveSpreadsheet().getSpreadsheetTimeZone(), \"dd-MMMM-yyyy\"))\n\n\n}", "title": "" }, { "docid": "a90a3c60d69e5637e7dc51b7e46de298", "score": "0.52994883", "text": "function deleteEmpSheet() {\n var ss = SpreadsheetApp.getActiveSpreadsheet();\n // get active sheet\n var sh = ss.getActiveSheet();\n // get active row number\n var row = sh.getActiveRange().getRowIndex();\n var rData = sh.getRange(row, 1, 1, 3).getValues();\n if (row == 1) {\n ss.toast(\"This is the header\"); \n return\n }\n // read employee name to delete that sheet\n var shName = rData[0][0];\n // search sheet by name\n ss.setActiveSheet(ss.getSheetByName(shName));\n // delete sheet\n ss.deleteActiveSheet();\n \n // delete date from that row\n ss.setActiveSheet(ss.getSheets()[0]);\n ss.getRange(\"D\"+(row)).clear(); \n \n}", "title": "" }, { "docid": "f52007598345f631bd3318edb9fdac4c", "score": "0.5298227", "text": "function setName (newName) {\r\n if (this.started && !this.ended) {\r\n let scene = new Scene()\r\n if (scene.title == this.name) {\r\n scene.title = newName\r\n scene.fullscreen = false\r\n scene.save()\r\n }\r\n }\r\n\r\n return newName\r\n}", "title": "" }, { "docid": "4b7cfebf72e037b9a795a72cad96f905", "score": "0.5291443", "text": "function getSpareSheet(name){\n return SpreadsheetApp.openById(getProperty(\"SPREADSHEET_ID\")).getSheetByName(name);\n}", "title": "" }, { "docid": "9b97dbb2e2b9688c73f90258b71c2ec1", "score": "0.5289176", "text": "function createSheetIfNotExists_(ss, name) { \n var ss = ss || SpreadsheetApp.getActiveSpreadsheet();\n try {ss.setActiveSheet(ss.getSheetByName(name));}\n catch (e) {ss.insertSheet(name);} \n \n var sheet = ss.getSheetByName(name);\n return sheet;\n}", "title": "" }, { "docid": "6b04f48e4c786dbf3e048993f8228869", "score": "0.52798533", "text": "function renameTab(tab, newFileNameId) {\n\tlet editor = getEditorLinkedTo(tab);\n\n\ttab.querySelector(\"p\").textContent = getFileNameFromFileId(newFileNameId);\n\ttab.id = formatForTabId(newFileNameId);\n\teditor.id = formatForEditorId(tab.id);\n}", "title": "" }, { "docid": "d11f753625cd92126e201627899bf936", "score": "0.5277688", "text": "function generateSheetEvenIfAlreadyExists(sheetName) {\n var ss = getSpreadSheet();\n if (targetSheet = getSheetIfExists(sheetName)) {\n ss.deleteSheet(targetSheet);\n }\n var sheet = ss.insertSheet(sheetName, 0);\n deleteFallbacksheet();\n return sheet;\n}", "title": "" }, { "docid": "5bc3f22d8f84439061bcef0f6ee1154d", "score": "0.52538866", "text": "function rename(tag) {\n if (hlib.getById(`_${tag}`).value === '') {\n alert('Cannot rename to nothing')\n return\n }\n let fromTag = tag\n let params = {\n user: getUser(),\n max: hlib.getSettings().max,\n tag: fromTag\n } \n hlib.search(params)\n .then( data => { \n processRenameResults(data[0], data[1]) \n })\n}", "title": "" }, { "docid": "dddffd5cbac19e0d9628d233870bcf03", "score": "0.5248648", "text": "function deleteHeatSheets(){\n\n var ss = SpreadsheetApp.getActiveSpreadsheet();\n var shts = ss.getSheets()\n var sheetName = '';\n \n shts.map(function(value){\n var sheetName = value.getSheetName();\n if (sheetName.slice(0, 5) === 'Heat_') {\n ss.deleteSheet(value);\n }\n });\n\n}", "title": "" }, { "docid": "b5db9917adc3e8c3d67d368ca1bca3b3", "score": "0.5214211", "text": "function setName(cell)\n {\n if(cell !== undefined)\n {\n cell.dataset.name = `Cell (${cellCount})`;\n } \n }", "title": "" }, { "docid": "aa83dea839ea8fc5e53a923838f59ba3", "score": "0.5213984", "text": "function renameButton() {\n\tvar active = getActiveItems(\"*\");\n\tif (active.length > 1) {\n\t\tpopupPrompt(\"Please select just one item\", \"50\", \"50\", \"320\", \"24\", true);\n\t\treturn;\n\t}\n\tgetInput(\"Enter the new name for \" + active[0].innerText,\"rename\");\n}", "title": "" }, { "docid": "fb9ce9c33eefc43a42552ec58bcdc626", "score": "0.52045536", "text": "attempRename() {\n\t\tconst folders = __WEBPACK_IMPORTED_MODULE_2__stores_StoreActions__[\"a\" /* default */].getFolders();\n\t\tconst input = this.state.folderNameInput.trim();\n\t\tconst oldName = this.state.renamingFolder;\n\t\tlet newName = input;\n\t\t// Check user input to make sure its at least 1 character\n\t\t// made of string, number or both\n\t\tif (!/^([a-zA-Z0-9\\s]{1,})$/.test(input)) {\n\t\t\t// Do not rename\n\t\t\tconsole.warn('A valid folder name is required. /^([a-zA-Z0-9\\s]{1,})$/');\n\t\t\treturn this.setState({\n\t\t\t\tisNameError: true\n\t\t\t});\n\t\t}\n\t\t// Names must be unique, folders cant share same names\n\t\tif (folders[newName]) {\n\t\t\tlet repeatedFolderIndex = 0;\n\t\t\tdo {\n\t\t\t\trepeatedFolderIndex++;\n\t\t\t} while (Object.keys(folders).includes(newName + \"(\" + repeatedFolderIndex + \")\"));\n\t\t\tnewName = newName + `(${repeatedFolderIndex})`;\n\t\t}\n\n\t\tthis.setState({\n\t\t\tfolderNameInput: \"\",\n\t\t\trenamingFolder: null,\n\t\t\tisNameError: false\n\t\t}, () => {\n\t\t\t__WEBPACK_IMPORTED_MODULE_2__stores_StoreActions__[\"a\" /* default */].renameFolder(oldName, newName);\n\t\t\t// No need for the click listener any more\n\t\t\tthis.removeClickListener();\n\t\t});\n\t}", "title": "" }, { "docid": "6d5b93e60306ce8ebce2bf88523639be", "score": "0.5200182", "text": "function repairTitle() {\n // Get the active sheet and spreadsheet\n var ss = SpreadsheetApp.getActive();\n var s = ss.getActiveSheet();\n \n // Get the range of the title bar\n var range = s.getRange('A1:K1');\n \n // Sets the colour and font to the proper format.\n range.setBackground('#38761d').setFontColor('white').setFontFamily('Arial').setFontWeight('bold').setFontSize(10);\n \n // Sets the correct words\n range.setValues([['Date','Location','Product','Problem Description','RA #','Customer','Phone','Email','SRO #','WO #','Status']]);\n}", "title": "" }, { "docid": "a028e5e5916c0d92d52e1858f2ca58c6", "score": "0.5192263", "text": "function changeSheetType( type ) {\n\t$('#sheet1').removeClass(currentSheetStyle).addClass(type);\n\tcurrentSheetStyle = type;\n\tchangeLevelType( currentLevelStyle );\n}", "title": "" }, { "docid": "7f68b6848338478fa3c392a4054d61e9", "score": "0.5188312", "text": "exitRename_index_partition(ctx) {\n\t}", "title": "" }, { "docid": "044c29d76ab3a568675e976239cbe52c", "score": "0.5170259", "text": "function updateIndex() {\n \n // Get all the different sheet IDs\n var ss = SpreadsheetApp.getActiveSpreadsheet();\n var sheets = ss.getSheets();\n var indexSheet = sheets[0];\n \n var namesArray = sheetNamesIds(sheets);\n \n var indexSheetNames = namesArray[0];\n var indexSheetIds = namesArray[1];\n \n printIndex(indexSheet,indexSheetNames,indexSheetIds);\n}", "title": "" }, { "docid": "49717f0c8107bca49206b734f912782a", "score": "0.5162394", "text": "function oldTitle() {\n document.title = origTitle;\n}", "title": "" }, { "docid": "f4c628d4916553b37c95702973aeb13b", "score": "0.5155198", "text": "function submitNameChange(newName){\n // evt.preventDefault();\n setIsEditing(false);\n setWorkoutName(newName);\n }", "title": "" }, { "docid": "3df041b474db88e9a0aea8a440929261", "score": "0.5154959", "text": "function getSheetByName(name) {\r\n var sheet = getSpreadsheetContext().getSheetByName( name );\r\n \r\n return sheet;\r\n}", "title": "" }, { "docid": "20dbe63402ade65351f98c530a28689c", "score": "0.5148269", "text": "function GetSheetWithName(name) \n{\n var sheet = GetSheet();\n var ret = sheet.getSheetByName(name);\n if (ret != null) {\n return ret;\n }\n Logger.log(\"Invalid name: \", name);\n throw (\"Invalid sheet name: \" + name);\n}", "title": "" }, { "docid": "a73b54294c231facb00714691413e6f8", "score": "0.5147899", "text": "rename() {\n return this._doRename();\n }", "title": "" }, { "docid": "f5f3aa36da2ce98cec722487737cd31b", "score": "0.514393", "text": "enterRename_object(ctx) {\n\t}", "title": "" }, { "docid": "ebd436cafdc493b952b87a596badc337", "score": "0.5142549", "text": "function resetSheets() { \n var ui = SpreadsheetApp.getUi()\n var spread = SpreadsheetApp.openById(settingsArray[6][0])\n \n var result = ui.alert(\n 'Reset Sheets',\n 'The following will clear ALL sheets including custom scores. Are you sure you would like continue?',\n ui.ButtonSet.YES_NO\n )\n \n if (result == ui.Button.YES) {\n \n for (var i = spread.getSheets().length - 1; i > 1; i--){ \n spread.deleteSheet(spread.getSheets()[i])\n }\n }\n}", "title": "" }, { "docid": "dee52de8d7fa12696636b35a47120f9a", "score": "0.51335424", "text": "enterRename_index_partition(ctx) {\n\t}", "title": "" }, { "docid": "ba48ad0970c98bfcfae4747d1db3f032", "score": "0.51291484", "text": "async function copySheet(\n context, \n srcWorksheetName, \n dstWorksheetName,\n worksheetPositionType,\n worksheetVisibility\n ) {\n // copy a sheet\n const activeSheet = context.workbook.worksheets.getItemOrNullObject(srcWorksheetName);\n const copiedSheet = activeSheet.copy(worksheetPositionType);\n // Set the name and visibiliy\n copiedSheet.name = dstWorksheetName;\n copiedSheet.visibility = worksheetVisibility;\n\n console.log(\n `Copied ${srcWorksheetName} to ${dstWorksheetName}\n at position ${worksheetPositionType} and set to ${worksheetVisibility}`\n );\n\n return context.sync();\n}", "title": "" }, { "docid": "1675d685a81ad29f908e8b2462565fc8", "score": "0.51040834", "text": "function completeAllSheets()\n{\n var ss=SpreadsheetApp.getActiveSpreadsheet()\n var sheets=ss.getSheets();\n \n for (var i=0; i<sheets.length; i++)\n {\n \n completeSheet_(sheets[i])\n \n }\n \n \n\n // SpreadsheetApp.getActiveSpreadsheet().copy(SpreadsheetApp.getActiveSpreadsheet().getName()+Utilities.formatDate( new Date(), SpreadsheetApp.getActiveSpreadsheet().getSpreadsheetTimeZone(), \"dd-MMMM-yyyy\"))\n\n\n}", "title": "" }, { "docid": "a15fc750f28a858360bb4adc129b7960", "score": "0.51022696", "text": "exitRename_object(ctx) {\n\t}", "title": "" }, { "docid": "d5d751d38bc0dffbb0bd28d076e583e9", "score": "0.5099608", "text": "function setOldTitle() {\n document.title = origTitle;\n}", "title": "" }, { "docid": "aa3d7ef0757b380706bd5d09f50b19ee", "score": "0.5095021", "text": "function addEmpSheet() {\n //get active worksheet\n var ss = SpreadsheetApp.getActiveSpreadsheet();\n //get active sheet\n var sh = ss.getActiveSheet();\n // get the row number of active cell\n var row = sh.getActiveRange().getRowIndex();\n // get the data of active row\n var rData = sh.getRange(row, 1, 1, 3).getValues();\n \n // check the active row should not be header row\n if (row == 1) {\n ss.toast(\"This is the header\"); \n return\n }\n\n // check for data in active row, if there is no data in first 3 cell end with error msg\n if(rData[0][0] != null || rData[0][1] != null || rData[0][2] != null) {\n try { \n // get template sheet (sheet at index 1)\n var sheet = ss.getSheets()[1];\n // copy template sheet to active workbook\n var sh2 =sheet.copyTo(ss);\n // set new sheet name to first cell in active row i.e, Name of employee\n sh2.setName(rData[0][0]);\n //Browser.msgBox(rData[0][1]);\n \n // logic to add protection in sheet, \n // other employee cannot edit that sheet\n var protection = sh2.protect().setDescription('Sample protected sheet');\n // add current employee mail id as editor of sheet\n protection.addEditor(rData[0][1]);\n \n //ss.insertSheet(rData[i][2]);\n \n // set first sheet as active and update current date in the D column of selected employee\n ss.setActiveSheet(ss.getSheets()[0]);\n sh.getRange(\"D\"+(row)).setValue(new Date());\n } catch(e) {\n throw 'This employee allready has a sheet. Try another sheet name.'+ e; \n }\n }\n}", "title": "" }, { "docid": "9d78dbca32e4fa99781af71ef0364265", "score": "0.50861126", "text": "function switchView(sheetName) {\r\n\tvar workbook =viz.getWorkbook('RockerGroup');\r\n\tworkbook.activateSheetAsync(sheetName);\r\n}", "title": "" }, { "docid": "0e3c27f4aaa93d71b723221c08bc65db", "score": "0.5085723", "text": "function switchView(sheetName) {\r\n\tvar workbook = viz.getWorkbook();\r\n\tworkbook.activateSheetAsync(sheetName);\r\n}", "title": "" }, { "docid": "7d028203ca943b426148346fb604c51a", "score": "0.5078486", "text": "function renameSimulationJobInPanel(panelType, that, e){\n \tvar simulationJobId = PANEL_DATA[panelType].form.jobId;\n \tvar simulationJobTitle = PANEL_DATA[panelType].form.jobTitle;\n \tvar job = currJobs.get(simulationJobId);\n \tjob.title = simulationJobTitle;\n \tsaveSimulationJob(job);\n }", "title": "" }, { "docid": "129fc97fc7ffca57c57b2887b482a952", "score": "0.5077957", "text": "function setBoardTitle(s) {\n window.document.title = s;\n}", "title": "" }, { "docid": "be7682b87633dd1ded659f718ccfab8b", "score": "0.507678", "text": "function renameHeaders(sheetName, headerString) {\n let rows = headerString.split(\"\\n\");\n let headers = rows[0].split(\",\");\n for (let header of headers) {\n if (sheetMappings[sheetName][header])\n headerString = headerString.replace(header, sheetMappings[sheetName][header]);\n }\n return headerString;\n}", "title": "" }, { "docid": "a96074cb2131a89aa9b0e6060e8fa015", "score": "0.50689906", "text": "function createSheet(name, folderId){\n var throughputHeader = [['Date (MM/DD/YYYY)','Cloud Worker','Use Case','Task Type','Tasks Completed','Task Duration',\n 'Notes','Average Task/Hr','Ramp Percentage','Target (Min) (Actual)','Target (Max) (Actual)',\n 'Target (Min) (After Ramp)','Target (Max) (After Ramp)','VC%']];\n var accuracyHeader = [['Date','#Task Reviewed','Task_Url (Optional)','Task Completed By','Task Type',\n '# Review Duration (hours)','Task Reviewed By','Accuracy','Min','Max','VC']];\n var overallThroughputHeader = [['Date','Email Address','Average VC %']];\n var overallAccuracyHeader = [['Date','Email Address','Average VC %']];\n var resource = {\n title : name,\n mimeType : MimeType.GOOGLE_SHEETS,\n parents : [{ id : folderId}]\n };\n var fileJson = Drive.Files.insert(resource);\n var file = SpreadsheetApp.openById(fileJson.id);\n file.getActiveSheet().setName(\"Throughput\");\n file.getActiveSheet().getRange(1, 1, 1, throughputHeader[0].length).setValues(throughputHeader).setFontWeight('bold');\n // file.getActiveSheet().getRange(1, file.getActiveSheet().getLastColumn()+1, 1, file.getActiveSheet().getMaxColumns())\n file.insertSheet().setName(\"Accuracy\");\n file.getActiveSheet().getRange(1, 1, 1, accuracyHeader[0].length).setValues(accuracyHeader).setFontWeight('bold');\n file.insertSheet().setName(\"Overall Throughput\");\n file.getActiveSheet().getRange(1, 1, 1, overallThroughputHeader[0].length).setValues(overallThroughputHeader).setFontWeight('bold');\n file.insertSheet().setName(\"Overall Accuracy\");\n file.getActiveSheet().getRange(1, 1, 1, overallAccuracyHeader[0].length).setValues(overallAccuracyHeader).setFontWeight('bold');\n return file.getUrl();\n}", "title": "" }, { "docid": "7befb15333c380d864011880d14901ef", "score": "0.5059093", "text": "function deleteTabsOtherThanMaster() {\n var sheetNotToDelete ='Master';\n var ss = SpreadsheetApp.getActive();\n \n \n ss.getSheets().forEach(function(sheet){\n if(sheet.getSheetName()!== sheetNotToDelete)\n {\n ss.deleteSheet(sheet);\n }\n });\n\n\n}", "title": "" }, { "docid": "f2d8b4ceccae4a0a11be774f9f0da498", "score": "0.5039553", "text": "renameTable(tableName, to) {\n this.pushQuery('rename table ' +\n this.formatter.wrap(tableName) +\n ' to ' +\n this.formatter.wrap(to));\n }", "title": "" }, { "docid": "e70b93a67cfe7bad3dd38b97471cbcf3", "score": "0.5021247", "text": "function rename(oldName, newName) {\n FS.renameSync(oldName, newName);\n }", "title": "" }, { "docid": "35fb29c22780cbdaecadd5a5dc440088", "score": "0.49875024", "text": "function renameUploadFile(fileName) {\n return documentType + \"-\" + Date.now() + \"-\" + fileName;\n}", "title": "" }, { "docid": "670b62a49eb9fd4b0acd4fabe4a179dd", "score": "0.4981516", "text": "onRenameClicked(evt) {\n evt.preventDefault();\n\n alert('TBD');\n }", "title": "" }, { "docid": "609e176177ea2e22a8a9d6e9dc4773d0", "score": "0.4979472", "text": "function getSheetForName(matrix, name, startIndex) {\n var sheet = getSheetTemplate();\n sheet.properties.title = name;\n var rowData = sheet.data[0].rowData;\n\n // Header\n rowData.push(rowToBoldedSheetRow(matrix, 0));\n\n // CMs\n for (var i = 1; i < startIndex; i++) {\n rowData.push(rowToSheetRow(matrix, i));\n }\n\n // Now, based on venue\n for (var i = startIndex; i < matrix.length; i++) {\n let isBlankRow = matrix[i][0].length === 0;\n let fullLoc = matrix[i][2];\n let loc = fullLoc.split(' - ')[0];\n if (loc === name || isBlankRow) {\n rowData.push(rowToSheetRow(matrix, i));\n }\n }\n\n return sheet;\n}", "title": "" }, { "docid": "7ab378a71eea232f9cd2df09b5fdb225", "score": "0.49760506", "text": "async createTable() {\n if (await this.io.findSheet(this.name)) {\n return; // Already exists\n }\n\n await this.io.createSheet(this.name);\n await this.io.writeCell(this.name, 'A1', 'id');\n }", "title": "" }, { "docid": "966959b6fb5effa47daec39a64767b92", "score": "0.49756435", "text": "function changeName(o, n){\n var newName = o;\n newName.name = n;\n \treturn newName;\n}", "title": "" }, { "docid": "47a7f737efe467b4990e20ba9aefbc69", "score": "0.4967829", "text": "function restoreTitle() {\r\n\tchangeTitle(programName);\r\n}", "title": "" }, { "docid": "df0b1972686353eb96ebae7856ab7fc2", "score": "0.49586275", "text": "function setupMainFolder(){\n var folderName = 'MainFolder';\n var folderTitle = 'CustomerService';\n //check if Folder is already setup\n var folderId = getIdByLinkName('MainFolder');\n if (folderId == 'Not Found'){\n //If Main Folder Id does not exist\n var currentFileId = SpreadsheetApp.getActive().getId();\n var currentFile = DriveApp.getFileById(currentFileId);\n var parentFolders = currentFile.getParents();\n //move the spreadsheet to the new main folder\n var mainFolder = DriveApp.createFolder(folderTitle);\n mainFolder.addFile(currentFile);\n while (parentFolders.hasNext()){\n folder = parentFolders.next();\n folder.removeFile(currentFile);//remove the spreadsheet from other folders\n }\n //rename the spreadsheet to Customer Service\n currentFile.setName(\"Customer Service\");\n var folderUrl = mainFolder.getUrl();\n folderId = mainFolder.getId();\n SDGSettings.index.updateLink(folderName, folderUrl, folderId);\n }\n }", "title": "" }, { "docid": "c417ff82e29a715a454dce38d8d63894", "score": "0.4954978", "text": "function createAndNameAllInputSheets(ssId) {\n\n var resource = {\n \"requests\": [{\n \"addSheet\": {\n \"properties\": {\n \"title\": \"queryASheet-input\",\n \"index\": 1,\n \"tabColor\": {\n \"red\": 0,\n \"green\": 0,\n \"blue\": 1,\n \"alpha\": 1.00\n },\n \"gridProperties\": {\n \"columnCount\": 10,\n \"rowCount\": 25\n }\n }\n }\n },\n {\n \"addSheet\": {\n \"properties\": {\n \"title\": \"Manipulate Disjoint Ranges\",\n \"index\": 1,\n \"tabColor\": {\n \"red\": 0,\n \"green\": 0,\n \"blue\": 1,\n \"alpha\": 1.00\n },\n \"gridProperties\": {\n \"columnCount\": 10,\n \"rowCount\": 25\n }\n }\n }\n },\n {\n \"addSheet\": {\n \"properties\": {\n \"title\": \"Update Multiple Cells\",\n \"index\": 1,\n \"tabColor\": {\n \"red\": 0,\n \"green\": 0,\n \"blue\": 1,\n \"alpha\": 1.00\n },\n \"gridProperties\": {\n \"columnCount\": 10,\n \"rowCount\": 25\n }\n }\n }\n }\n ],\n \"includeSpreadsheetInResponse\": true\n };\n //batch update \n var response = Sheets.Spreadsheets.batchUpdate(resource, ssId);\n SpreadsheetApp.flush();\n } //end createAndNameAllInputSheets()", "title": "" }, { "docid": "578e93e338e09294d270add92846d396", "score": "0.49386978", "text": "function renameScreenshot (specFile, oldFilePath, folderName, fileName) {\n let newName = path.join(folderName, specFile.replace('/', '__') + '__' + fileName);\n fs.renameSync(oldFilePath, newName);\n return newName;\n}", "title": "" }, { "docid": "e12314f282a41b5605d9801a91357828", "score": "0.4923233", "text": "rename(path, newPath) {\n let [drive1, path1] = this._driveForPath(path);\n let [drive2, path2] = this._driveForPath(newPath);\n if (drive1 !== drive2) {\n throw Error('ContentsManager: renaming files must occur within a Drive');\n }\n return drive1.rename(path1, path2).then(contentsModel => {\n return Object.assign({}, contentsModel, { path: this._toGlobalPath(drive1, path2) });\n });\n }", "title": "" }, { "docid": "8ae82a79871772efd3a9fa901b62097c", "score": "0.49155802", "text": "function addTitleCell(sheet, title) {\n\n // create cell\n var cell = new wijmo.xlsx.WorkbookCell();\n cell.value = title;\n cell.style = new wijmo.xlsx.WorkbookStyle();\n cell.style.font = new wijmo.xlsx.WorkbookFont();\n cell.style.font.bold = true;\n\n // create row to hold the cell\n var row = new wijmo.xlsx.WorkbookRow();\n row.cells[0] = cell;\n\n // and add the new row to the sheet\n sheet.rows.splice(0, 0, row);\n}", "title": "" }, { "docid": "6f7050432d7867de61683d5191b68a7a", "score": "0.4914833", "text": "rename(oldPath, newPath) {\n return this.services.contents.rename(oldPath, newPath);\n }", "title": "" }, { "docid": "df6d42a38c99349c079693c4de776235", "score": "0.49086168", "text": "Rename(renameRequest = null) {\n\t\treturn this.RenameMulti([renameRequest]).then(function(responses) {\n\t\t\treturn responses[0]\n\t\t})\n\t}", "title": "" }, { "docid": "fa3385c99f8474d7d2f8b567818a8007", "score": "0.49070102", "text": "declareRename(info, oldParts, newParts) {\n // go down the tree from our new position reserving our name\n this.taintParents(info, oldParts.slice(0, -1), newParts.length - 1);\n }", "title": "" }, { "docid": "4e6056f09dcaf91642a0f3e2888b2b52", "score": "0.49014956", "text": "async function confirmRename() {\n\n var id = $(\"#modal-rename\").attr(\"forid\");\n var oldName = $(\"#rename-input\").attr(\"placeholder\");\n var newName = ($(\"#rename-input\").val() || \"\").trim();\n var ext = $(\"#modal-rename\").attr(\"ext\");\n\n if (!id) {\n handleError(\"[RENAME] Can't rename without an id\");\n hideActiveModal();\n return true;\n }\n\n if (!newName) {\n $(\"#rename-input\").trigger(\"focus\");\n return true;\n }\n\n if (newName === oldName) {\n breadcrumb('[RENAME] Same name, cancelling.');\n hideActiveModal();\n return true;\n }\n\n // glue back the extension. \n // Don't worry, if it's a cryptee document or folder, this is empty.\n if (ext) { newName = newName + \".\" + ext; }\n\n startModalProgress(\"modal-rename\");\n\n var renamed = await renameDocOrFolder(id, newName);\n\n if (!renamed) {\n createPopup(\"Failed to rename. Chances are this is a network problem, or your browser is configured to block access to localStorage / indexedDB. Please disable your content-blockers, check your connection, try again and reach out to our support via our helpdesk if this issue continues.\", \"error\");\n stopModalProgress(\"modal-rename\");\n return false;\n }\n\n stopModalProgress(\"modal-rename\");\n \n hideActiveModal();\n\n return true;\n\n}", "title": "" }, { "docid": "6c782d69a95c9c995d28aa82d34c12ad", "score": "0.49014825", "text": "function CEChangePageTitle (sNewTitle) {\r\n\tif (document.title) {\r\n\t\tdocument.title = sNewTitle;\r\n\t}\r\n}", "title": "" }, { "docid": "cc8509a23bcf3787d914bfa87a96d1f6", "score": "0.4864674", "text": "rename(doc) {\n throw new Error('Unimplemented');\n }", "title": "" }, { "docid": "54b1dae66335e5fd2ed0c4a5d1051c61", "score": "0.48538354", "text": "function fixPageName(){\n\tvar newPageTitle = getElementsByClassName(document, 'span', 'changePageTitle')[0];\n\tif(newPageTitle == null) return;\n\tvar oldPageTitle = getElementsByClassName(document, 'header', 'WikiaPageHeader')[0].getElementsByTagName( \"h1\" )[0];\n\tif(oldPageTitle == null) return;\n\toldPageTitle.innerHTML = newPageTitle.innerHTML;\n}", "title": "" }, { "docid": "8d5fda3a7ce772e0952e1faad2170c9d", "score": "0.4853534", "text": "function fixName(name) {\n return name.replaceAll(\" \", \"-\").replaceAll(\"_\", \"-\").replaceAll(\".\", \"-\");\n}", "title": "" }, { "docid": "13ef31056e3bd6f70f03d91b426a908e", "score": "0.4847634", "text": "function inName(oldName) {\n var finalName = oldName;\n // Your code goes here!\n var array = finalName.split(\" \");\n var first_name = array[0].toLowerCase();\n var last_name = array[1].toUpperCase();\n var first_char = first_name.slice(0, 1).toUpperCase();\n var full_name = first_char.concat(first_name.substr(1, first_name.length - 1), \" \", last_name);\n finalName = full_name;\n\n //var formattedName = HTMLheaderName.replace(\"%data%\", finalName);\n // $(\"#header\").prepend( formattedName );\n document.getElementById(\"name\").innerHTML = finalName;\n}", "title": "" }, { "docid": "49c3792127431bad3ed6f6a9ea8fc49e", "score": "0.4841859", "text": "function getNamedSheet(name,sheet){\n var validationMCV;\n var validationMPC;\n sheet.getSheets().forEach(function(s){\n if(s.getName() === 'Validation-MCV') validationMCV = s;\n if(s.getName() === 'Validation-MPC') validationMPC = s;\n });\n return name === 'MCV'?validationMCV:validationMPC;\n}", "title": "" }, { "docid": "11509119274d1487eec815378bf5ef87", "score": "0.48382464", "text": "function writeToSheet() {\n // writes the current charSheets to ./scripts/storage/tabletop.js/charsheets.json for permanent storage\n fs.writeFile(\"./scripts/storage/\" + fileName + \"/charsheets.json\", JSON.stringify(charSheets, null, 4), function (err) {\n if (err) {\n console.log(err);\n process.exit(-1);\n }\n console.log(\"Wrote contents of charSheets to charsheets.json\");\n });\n}", "title": "" }, { "docid": "db41d013add06ae9c9af5c99a1057168", "score": "0.48220864", "text": "function update_page_title() {\n if ($scope.export.status === 'failed') {\n $window.document.title = 'Export failed';\n } else if ($scope.export.error_message !== '') {\n $window.document.title = 'Results expired';\n } else {\n $window.document.title = Math.round($scope.export.progress) + '% | Exporting results';\n }\n }", "title": "" }, { "docid": "a48d3db780b04e6292ec92fb08d3065f", "score": "0.4815823", "text": "function changeName(name) {\n if (name == ui.name.value && name == database.name) {\n return;\n }\n storage.remove(database.name);\n database.name = name;\n storage.set(name, database.query);\n ui.name.value = name;\n document.title = name;\n}", "title": "" }, { "docid": "08fb994c1c493f34148ca66819699734", "score": "0.48101905", "text": "function adjustTitles(){\r\n //console.log(\"Adjust titles\");\r\n\tvar view = getView();\r\n var server = getServer();\r\n \r\n if(view != \"\")\r\n document.title = server + \" - \" + getView();\r\n else\r\n\t\tdocument.title = document.title.replace(\"Astro Empires - \",server+\" - \");\r\n}", "title": "" }, { "docid": "0fa3afe8ac0b58f21dcc1d663c8f6530", "score": "0.4807345", "text": "function rankString() {\n\n var lastRowNumer = rankingSheet.getLastRow();\n\n for (var i = 2; i < lastRowNumer; i ++) {\n var sheetPosition = i + 1;\n var name = ('=RANK(D'+ sheetPosition + ', D1:D' + lastRowNumer + ')');\n rankingSheet.getRange(sheetPosition, 3).setValue(name);\n }\n\n}", "title": "" }, { "docid": "ce19ae9a441522814948c9519190ee81", "score": "0.48019218", "text": "function adjustTitles(){\r\n\t//console.log(\"Adjust titles\");\r\n\t var view = getView();\r\n\t var server = getServer();\r\n\r\n\t if(view != \"\")\r\n\t\t document.title = server + \" - \" + getView();\r\n\t else\r\n\t\t document.title = document.title.replace(\"Astro Empires - \",server+\" - \");\r\n}", "title": "" }, { "docid": "41bab0fdac4a64387f3c322b4bbca5fa", "score": "0.47877127", "text": "function changeWindowTitle() {\n window.document.title = 'Data Entry #' + getUrlFragment();\n entryHeader = document.getElementById('entry-title').children[0];\n entryHeader.innerHTML = \"Detailansicht ID: \" + getUrlFragment();\n }", "title": "" }, { "docid": "89d1bd7ae906e17b4b67d026876aae0c", "score": "0.47868535", "text": "function wipeArchive(){\n var result = Browser.msgBox(\"Warning!\", \n \"You are about to wipe the Archive sheet\\\\n\\\\nDo you want to continue?\", \n Browser.Buttons.YES_NO);\n // Process the user's response.\n if (result == 'yes') {\n var doc = SpreadsheetApp.getActiveSpreadsheet();\n var sheet = doc.getSheetByName(\"Archive\");\n sheet.deleteRows(2, sheet.getLastRow()-1);\n } \n}", "title": "" }, { "docid": "8ddc683696d4716e4997fa1ee7137f23", "score": "0.47810134", "text": "function translateSheet_sheet_00() { translateSheet(\"sheet_00\", \"ko\", \"en\"); }", "title": "" }, { "docid": "0b5cdcb2e4ef7fd4fb5873005f3f0089", "score": "0.47753733", "text": "function updateLetterTitle(newTitle) {\n return {\n type: UPDATE_LETTER_TITLE,\n payload: { newTitle },\n }\n}", "title": "" }, { "docid": "a52632e04817b71a016a0e145a96cf37", "score": "0.4772772", "text": "function launchSheetBox() {\n var htmlDlg = HtmlService.createHtmlOutputFromFile('newSheetBox')\n .setSandboxMode(HtmlService.SandboxMode.IFRAME)\n .setWidth(400)\n .setHeight(125);\n SpreadsheetApp.getUi()\n .showModalDialog(htmlDlg, 'New Order Sheet Name');\n}", "title": "" }, { "docid": "4d9ee9f1239d10f02453d6712ddc8254", "score": "0.47711673", "text": "changeName(newName){\r\n this.name = newName;\r\n }", "title": "" }, { "docid": "05f4980dcb8a20e98b9189e4a8ee95a6", "score": "0.476688", "text": "getNewName(name) {\n return new Promise((resolve, reject) => {\n this.setState({\n createFolderMode: false,\n renameFileMode: true,\n renameFileData: {\n name: name,\n newName: name,\n }\n });\n this.onGetNewFileName = newName => {\n this.setState({\n renameFileMode: false,\n });\n resolve(newName);\n };\n });\n }", "title": "" }, { "docid": "a36b0ce21d0ce6d145c2391e9c01defc", "score": "0.47638604", "text": "function renameArea(areaID, name){\r\n\tsetValueArea(areaID, \"name\", name);\r\n}", "title": "" }, { "docid": "29e4294fcf27cf394727eb8e8cb2b2c8", "score": "0.4762371", "text": "function newTitle() {\n document.title = 'HELLO WORLD';\n}", "title": "" }, { "docid": "d49a49d70fd67007c9e23ff5f6a86ba7", "score": "0.47593093", "text": "function onEdit(event) {\n var sheet = event.source.getActiveSheet();\n\n if (sheet.getRange(1, 3).getValue() === \"5* Focus\") {\n /* The sheet contains banner information. */\n var cell = sheet.getActiveCell();\n\n if (cell.getColumnIndex() === 1) {\n var nFrozenRows = sheet.getFrozenRows();\n\n sheet.getRange(nFrozenRows + 1, 1, sheet.getMaxRows() - nFrozenRows, 1).sort([{column: 1, ascending: true}]);\n\n if (cell.getRowIndex() === 1) {\n sheet.setName(\"Banner: \" + cell.getValue());\n }\n }\n } else if (false) {\n /* Handle other types of sheets here. */\n }\n}", "title": "" }, { "docid": "ebc0c36ba6822380ab007ae9d8415055", "score": "0.47577605", "text": "function promptRename(sourceHref, callback) {\n log(\"promptRename\", sourceHref);\n var currentName = getFileName(sourceHref);\n var newName = prompt(\"Please enter a new name for \" + currentName, currentName);\n if (newName) {\n newName = newName.trim();\n if (newName.length > 0 && currentName != newName) {\n var currentFolder = getFolderPath(sourceHref);\n var dest = currentFolder;\n if (!dest.endsWith(\"/\")) {\n dest += \"/\";\n }\n dest += newName;\n move(sourceHref, dest, callback);\n }\n }\n}", "title": "" }, { "docid": "f3669b88ff22babc3d549eecc089bafb", "score": "0.4751468", "text": "renameProject(newName) {\n return new Promise((resolve, reject) => {\n if (newName !== \"\" && newName !== this.state.project) {\n this._get(\n \"renameProject?user=\" +\n this.state.owner +\n \"&project=\" +\n this.state.project +\n \"&newName=\" +\n newName\n )\n .then((response) => {\n this.setState({ project: newName });\n this.setSnackBar(response.info);\n resolve(\"Project renamed\");\n })\n .catch((error) => {\n //do something\n });\n }\n });\n }", "title": "" }, { "docid": "3f6de607124cc6941e8c85ae0e807596", "score": "0.4747861", "text": "function changeName() {\n this.setState({editingName: false});\n this.props.changeName(this.state.newDisplayName);\n}", "title": "" }, { "docid": "0d8601234323cb2efc5d08c59840af05", "score": "0.47474808", "text": "function setNewTitle() {\n document.title = \"Thank you for visiting!\";\n}", "title": "" } ]
a6464a30baeb1255085d2c7270469326
Write a function called `isEven` that takes a single value and returns `true` if it is even and `false` if it is odd
[ { "docid": "d70f46acfd827ff6eb66bea519fbd34d", "score": "0.0", "text": "function isEven(num) {\n num = Math.abs(num); \n if (num === 0)\n return true;\n else if (num === 1)\n return false;\n else\n return isEven(num - 2);\n}", "title": "" } ]
[ { "docid": "6353cebcecefb90104559cd9b05b08d2", "score": "0.88208777", "text": "function isEven (num) { return num%2 === 0; }", "title": "" }, { "docid": "22a2d7e7217e3a71c2eec210548d0a99", "score": "0.88078153", "text": "function isEven(x) {return x % 2 === 0}", "title": "" }, { "docid": "08f65bff7c3c7e5a4531d9c90ede5e07", "score": "0.87021035", "text": "function isEven(number) {\n}", "title": "" }, { "docid": "7e30fae6a00132a4c13b8d39b7d8999f", "score": "0.86776376", "text": "function isEven(n) { return n%2==0 }", "title": "" }, { "docid": "7e30fae6a00132a4c13b8d39b7d8999f", "score": "0.86776376", "text": "function isEven(n) { return n%2==0 }", "title": "" }, { "docid": "e7bb79b9c225bc3d9fba69fdc667c407", "score": "0.8667689", "text": "function isEven(value) {\r\n return value % 2 == 0;\r\n}", "title": "" }, { "docid": "ad625b2a048e74114e45277d7ee702db", "score": "0.86580837", "text": "function isEven(value) {\n if (value % 2 == 0) {\n return true;\n }\n else\n return false;\n}", "title": "" }, { "docid": "ad625b2a048e74114e45277d7ee702db", "score": "0.86580837", "text": "function isEven(value) {\n if (value % 2 == 0) {\n return true;\n }\n else\n return false;\n}", "title": "" }, { "docid": "3f79d0f404762a420c4a004fa63a20bb", "score": "0.86404216", "text": "function isEven(num) {\r\n return (num % 2 === 0);\r\n}", "title": "" }, { "docid": "8870fd9759f11d1ea9b59565a18176c6", "score": "0.86363256", "text": "function isEven(num) {\n return num % 2 === 0;\n}", "title": "" }, { "docid": "8870fd9759f11d1ea9b59565a18176c6", "score": "0.86363256", "text": "function isEven(num) {\n return num % 2 === 0;\n}", "title": "" }, { "docid": "8870fd9759f11d1ea9b59565a18176c6", "score": "0.86363256", "text": "function isEven(num) {\n return num % 2 === 0;\n}", "title": "" }, { "docid": "63a0b7dbf2555f0b0c393cddda26ee0e", "score": "0.8625165", "text": "function isEven(value) {\n if (value % 2 === 0) {\n return true;\n }\n else {\n return false;\n }\n}", "title": "" }, { "docid": "63a0b7dbf2555f0b0c393cddda26ee0e", "score": "0.8625165", "text": "function isEven(value) {\n if (value % 2 === 0) {\n return true;\n }\n else {\n return false;\n }\n}", "title": "" }, { "docid": "eddd687a00f9b64abd181bf5d8970637", "score": "0.86155534", "text": "function isEven(number) {\n return (number % 2 === 0)\n}", "title": "" }, { "docid": "a3df7d39905511eebf47ead76ddd195e", "score": "0.8613125", "text": "function isEven(num){\n\treturn num % ===0; // is a boolean\n}", "title": "" }, { "docid": "fbc0c8c30192d3451b0de60c5a3580ba", "score": "0.8612797", "text": "function isEven(num) {\n return num % 2 === 0;\n}", "title": "" }, { "docid": "1b1b0767e8315f3bb2744940506cb1be", "score": "0.8609263", "text": "function isEven(number) {\n return number % 2 === 0;\n}", "title": "" }, { "docid": "308b8dba3f9647f172fdf5f316e485d9", "score": "0.860616", "text": "function isEven(num) {\n if (num % 2 === 0) {\n return true;\n } else {\n return false;\n }\n\n}", "title": "" }, { "docid": "a9697949b86694549e35d24f6f41fbc7", "score": "0.8605689", "text": "function isEven(val) {\n return val % 2 === 0;\n}", "title": "" }, { "docid": "2a9b1935e656f8e007eddc074d94061b", "score": "0.85978395", "text": "function isEven(num) {\n return(num % 2 === 0) === true;\n}", "title": "" }, { "docid": "07fbfeedba0343de267efd693c477f0e", "score": "0.8592693", "text": "function isEven(number) {\n return number % 2 == 0;\n}", "title": "" }, { "docid": "7edaa6d745dea74c75faed6f64559833", "score": "0.85899895", "text": "function isEven (num) {\n return typeof num === 'number' && num % 2 === 0\n}", "title": "" }, { "docid": "c77b716aa8aaf66caea6a0cf50dc7cd6", "score": "0.85859233", "text": "function isEven(number) {\n return number % 2 === 0 \n}", "title": "" }, { "docid": "e8d423705bf226a28b719ed9083ba940", "score": "0.85829306", "text": "function isEven(num) {\n return num % 2 === 0 ? true : false;\n}", "title": "" }, { "docid": "f2e113392885a12eafe477e2e99adbbd", "score": "0.85768515", "text": "function isEven(num) {\r\n}", "title": "" }, { "docid": "752e5e1ccf913c9a25659b5813684215", "score": "0.85759217", "text": "function isEven(number) {\n return number % 2 === 0 ? true : false;\n}", "title": "" }, { "docid": "4e4aeacbaf66f3d7db1373e76b8c7d45", "score": "0.8572278", "text": "function isEven(value) {\n if (value % 2 == 0) {\n return true;\n }\n else\n return false;\n }", "title": "" }, { "docid": "0199fa9286ab9015392e0b77d9f2ba97", "score": "0.85721165", "text": "function isEven(num) {\n if (num % 2 == 0) {\n return true\n }\n return false\n}", "title": "" }, { "docid": "8dd2ac18bf5c8a00235e924474d5be64", "score": "0.8568524", "text": "function isEven(num) {\n // return true if even\n if (num % 2 === 0) {\n return true;\n }\n else {\n return false;\n }\n}", "title": "" }, { "docid": "e732e1a77dc20b9dfa44d4a2119a1815", "score": "0.8564684", "text": "function isEven (num) {\n\n}", "title": "" }, { "docid": "a71221337ada665b8356b14686548a91", "score": "0.8558122", "text": "function isEven(value) {\n if (value % 2 == 0) {\n return true;\n }\n else{\n return false;\n }\n}", "title": "" }, { "docid": "3f482275cd90e8372c99c18024784d96", "score": "0.8552476", "text": "function isEven(num) {\n\treturn num % 2 == 0;\n}", "title": "" }, { "docid": "3f482275cd90e8372c99c18024784d96", "score": "0.8552476", "text": "function isEven(num) {\n\treturn num % 2 == 0;\n}", "title": "" }, { "docid": "3f482275cd90e8372c99c18024784d96", "score": "0.8552476", "text": "function isEven(num) {\n\treturn num % 2 == 0;\n}", "title": "" }, { "docid": "7f7dfb1c33a490dd78838c820893b9a1", "score": "0.8542013", "text": "function isEven(num){\n return num % 2 == 0;\n}", "title": "" }, { "docid": "357510b49b870aeb104afe164a3f12f7", "score": "0.8537274", "text": "function isEven(num) {\n if (num % 2 === 0) {\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "cf9bee7494e858c6a50b84ff1dc7f8f5", "score": "0.8535572", "text": "function isEven(num) {\n //\n if (num % 2 == 0) {\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "c59e194fa0602d4edd00ac13a7fc9a96", "score": "0.8530804", "text": "function isEven(number) {\n return number % 2 === 0;\n }", "title": "" }, { "docid": "3355c2823ef245657e181f6c4ea54d37", "score": "0.85302866", "text": "function isEven(num) {\n if (num % 2 === 0) {\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "61b49d8c9955cffe8fdc705bb462b747", "score": "0.852823", "text": "function isEven(num) {\n return num % 2 === 0;\n\n}", "title": "" }, { "docid": "9149a4d4acb9019973d2654e5cab892d", "score": "0.85232806", "text": "function isEven(v) { return v % 2 == 0; }", "title": "" }, { "docid": "3dd458bef7600dd11b917e35be8d24ec", "score": "0.851822", "text": "function isEven(num) {\n if (num % 2===0){\n return true;\n }\n else {\n return false;\n }\n}", "title": "" }, { "docid": "b49ed1c4ffb5858e08a7db868477ec68", "score": "0.851637", "text": "function isEven(number) {\n if(number % 2 == 0) {\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "1b1b33a67e4259883a37369959db8483", "score": "0.8510959", "text": "function isEven(num) {\n if(num % 2 === 0) {\n return true;\n } \n else {\n return false;\n }\n}", "title": "" }, { "docid": "64e1961599b8bb562469971f03d3412e", "score": "0.8507843", "text": "function isEven(num) {\r\n\tif (num%2 == 0) {\r\n\t\treturn true;\r\n\t}\r\n\treturn false;\r\n}", "title": "" }, { "docid": "a9744dcb4d9c3972a77e68fef4a15f48", "score": "0.85077286", "text": "function isEven(num) {\n if (num%2==0){\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "8976d34ec4dd0921094895979b13181c", "score": "0.8507667", "text": "function isEven(n){\n return n % 2 === 0\n}", "title": "" }, { "docid": "8dd27e52846c72b2c4a9dcd8f9f17c3a", "score": "0.8507471", "text": "function isEven(n) {\n return n % 2 == 0;\n}", "title": "" }, { "docid": "90a8152d497f28d8c013f73cb69129c9", "score": "0.85062265", "text": "function isEven(number) {\n if (number % 2 === 0) {\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "4593f858f322117a4310b5713b9b4ee4", "score": "0.85039556", "text": "function is_even(num) {\n if(num%2==0){\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "1fc337b645bf98cf9aa5fc8fc137e776", "score": "0.85033935", "text": "function isEven(num) {\n if (num % 2 === 0){\n return true;\n }else{\n return false\n }\n}", "title": "" }, { "docid": "f52821b99e89157593e1a2e4eb48a8f1", "score": "0.849324", "text": "function isEven(number){\n if(number%2===0){\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "043aec1cb0a146b46b0d08bf642e9749", "score": "0.8489368", "text": "function isEven(number) {\n if (number % 2 == 0) {\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "043aec1cb0a146b46b0d08bf642e9749", "score": "0.8489368", "text": "function isEven(number) {\n if (number % 2 == 0) {\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "826611694fd42067ea3f96848b9da27d", "score": "0.8486858", "text": "function isEven(value) {\n if (value%2 == 0)\n\t\treturn true;\n\telse\n return false;\n}", "title": "" }, { "docid": "aa7da84c932f9d924d54708487a97493", "score": "0.8486562", "text": "function isEven(n) {\n return n % 2 == 0;\n}", "title": "" }, { "docid": "bed14a76f80a9b02e1b2fbe89c256cec", "score": "0.8485173", "text": "function isEven(n){\n return n % 2 === 0;\n}", "title": "" }, { "docid": "7cb142265c41263fd3221233634868ec", "score": "0.84828734", "text": "function isEven(n) {\n return (n % 2) === 0\n}", "title": "" }, { "docid": "70156014d77f6cc8e7ec9fd0659ed379", "score": "0.8480747", "text": "function isEven(n) {\n return (n % 2) == 0;\n}", "title": "" }, { "docid": "391f5cca45e38ceabad0716fdb9a493d", "score": "0.8478194", "text": "function isEven() {\n \n}", "title": "" }, { "docid": "3ca915d5dd438997f01866b261e14f83", "score": "0.84675723", "text": "function isEven(n){\n return n % 2 == 0;\n}", "title": "" }, { "docid": "c6b94fa5ad00968d3acdcbf2b2aaf025", "score": "0.8464679", "text": "function isEven(num) {\n //your code here\n \n if(num % 2 === 0) {\n return true;\n } else {\n return false\n }\n}", "title": "" }, { "docid": "3b924cddcc1d04fdb10b06c1c9311dfb", "score": "0.8464616", "text": "function isEven(num){\n if(num%2==0){\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "8061dae1f291b329ef20a859657c1db2", "score": "0.8441894", "text": "isEven(number){\n return number % 2 === 0 ? true : false;\n }", "title": "" }, { "docid": "ed0792476312a80933547fbf61e07e36", "score": "0.84406686", "text": "function isEven(val) {\n\treturn val % 2 === 0;\n}", "title": "" }, { "docid": "debbe71272d23da0e7e45f2e2ad2b80e", "score": "0.84404457", "text": "function isEven (n){\n return (n % 2 == 0) ? true : false;\n}", "title": "" }, { "docid": "b3d15d938059602ce804b6a12f0ca09e", "score": "0.8439635", "text": "function isEven(n){\n if (n % 2 == 0){\n return true\n }else{\n return false}\n}", "title": "" }, { "docid": "9a48c9ed8387ac80a68f55cafc17b89b", "score": "0.84359545", "text": "function isEven(val){\r\n return val%2==0?true:false;\r\n }", "title": "" }, { "docid": "b8de97c74fe8b0af2f2254153e0c8906", "score": "0.84309804", "text": "function isEven(x) {\n\treturn x%2==0;\n}", "title": "" }, { "docid": "bfbbb29f474fba448a53d2e818fbadf2", "score": "0.84287125", "text": "function isEven(number){\n return number % 2 ===0;\n \n}", "title": "" }, { "docid": "d97bff4ab6e7cdd9d37b2691efef32cd", "score": "0.84275055", "text": "function isEven(n) {\n return n % 2 && n === 0\n}", "title": "" }, { "docid": "bbbbd166149ccd23e8dc5465c0b4bd98", "score": "0.84240764", "text": "function sc_isEven(x) {\n return (x % 2 === 0);\n}", "title": "" }, { "docid": "bbbbd166149ccd23e8dc5465c0b4bd98", "score": "0.84240764", "text": "function sc_isEven(x) {\n return (x % 2 === 0);\n}", "title": "" }, { "docid": "a20c4b5e29da619efa8b545560b6a8fc", "score": "0.8423807", "text": "function is_even(num){\n if (!(num % 2)){\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "e3f2e7c5ba8d3ddd3ef4739922482e5f", "score": "0.8413872", "text": "function isEven(n){\n if (n % 2 === 0){\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "0e926fc3ae470d1fbb9fa702d8bf0496", "score": "0.84098333", "text": "function IsEven(n) {\n\treturn n % 2 == 0\n}", "title": "" }, { "docid": "e682ceb40c30f84456530c225a839ad1", "score": "0.8404943", "text": "function isEven (number){\n if(number% 2 ==0){\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "f7f1f8711b9fe89666fce5b075ecfa8d", "score": "0.83981943", "text": "function isEven(num) {\n\tif (num%2 === 0) { return true; }\n\telse { return false; }\n}", "title": "" }, { "docid": "4193d0b9e27a5f7364b833d4ab410560", "score": "0.83910435", "text": "function isEven(number) {\n return number % 2 === 0;\n }", "title": "" }, { "docid": "28660c2f8e91fba6b75a9b3b72e235cc", "score": "0.8371233", "text": "function isEven(num){\n return num % 2 ==0; // the == (or others like <=,>= and othersis where the comparison between true and false works\n }", "title": "" }, { "docid": "f17d1c2a64fb07d83060220aa2f500a2", "score": "0.8357762", "text": "isEven(num) {\n if (num % 2 === 0) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "a03b6973dbf68b90b4c495032d7064e1", "score": "0.8350307", "text": "function isEven(n) {\n return parseInt(n) && (n % 2 == 0);\n}", "title": "" }, { "docid": "084a66525923c5ede4bb68ff431c7583", "score": "0.831289", "text": "function is_even_num(x) {\n return x % 2 === 0 ? true : false;\n}", "title": "" }, { "docid": "634e6f870cd58823149a08fb6d7b9461", "score": "0.83049214", "text": "function isEven(n) {\n return n % 2 === 0;\n }", "title": "" }, { "docid": "bd403efa9a6c090e680e4b196cbc18d4", "score": "0.8294204", "text": "function isEven(num) {\r\n return !(num % 2);\r\n}", "title": "" }, { "docid": "fec53b69d9d817f1e505a96fca95090d", "score": "0.82824314", "text": "function checkIfEven(number){\n if(number%2===0){\n return true\n } else {\n return false\n }\n}", "title": "" }, { "docid": "9c9393422c5492af38530e27e7c7c521", "score": "0.8268991", "text": "function isEven(number){\n if(number % 2 == 0){\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "3164783bd7c21f43e83686b194475d68", "score": "0.8263086", "text": "function isEvenOrOdd(num) {}", "title": "" }, { "docid": "784f2d83bb121d2264930f18cbf586b3", "score": "0.8260602", "text": "function isEven(number) {\n var isEven = false;\n if (number % 2 === 0){\n isEven = true;\n }\n return isEven;\n}", "title": "" }, { "docid": "601d8e483cd59a975f1ce4333fc93597", "score": "0.8231937", "text": "function isEven(number) {\n if (verbose) {\n console.log('isEven -> number:', number);\n }\n return number % 2 === 0\n}", "title": "" }, { "docid": "e94bd817bde96700a167a5edeca97e5f", "score": "0.8191599", "text": "function isEven(num) {\n if (typeof num === \"number\") {\n return num % 2 === 0;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "76175ea13de91edc5241438206c9914c", "score": "0.81796426", "text": "function isEven(eveness) {\n if (eveness == 0)\n return true;\n else if (eveness == 1)\n return false;\n\n else if (eveness < 0) // i.e. a negative number\n return isEven(-1* eveness)\n else\n return isEven (eveness-2)\n}", "title": "" }, { "docid": "59ca82e893347119c013255e7a913bd9", "score": "0.8165073", "text": "function isEven(n) {\n n = Number(n);\n return n === 0 || !!(n && !(n % 2));\n}", "title": "" }, { "docid": "0346f86cd8278aa49ccafdbde2e0cc94", "score": "0.8161039", "text": "function testEven(n) {\n return n % 2 === 0;\n}", "title": "" }, { "docid": "58a23a706f6d233ea4b50bab9c0fd990", "score": "0.8158449", "text": "function isEvenOrOdd(number) {\n \n}", "title": "" }, { "docid": "9b73282200e209076815b0b12ffb0a6a", "score": "0.81549144", "text": "function is_even(num) {\r\n\treturn(isFinite(num)&(!(num&1)));\r\n}", "title": "" }, { "docid": "c844d2312045b1bc5d66558dacdf3e4e", "score": "0.8142859", "text": "function isEven(value) {\n\n if (value === 0) {\n return true;\n }\n else if (value === 1) {\n return false\n }\n else if (value > 0) {\n return isEven(value - 2)\n }\n else {\n return isEven(-value)\n }\n return isEven(value / 2)\n}", "title": "" }, { "docid": "d36b940c6cb0839fbe6fefdae8eb0aa5", "score": "0.81349254", "text": "function isEven(n) { // evil version\n return false\n}", "title": "" }, { "docid": "476f1d8f7f7d5c00fec0da92879dfefe", "score": "0.8102099", "text": "function isEven(number) {\n if (number % 2 == 0)\n console.log('the number is even!');\n else \n console.log('the number is odd!');\n}", "title": "" }, { "docid": "f240dfd230d8290cd721fe870da2ffbc", "score": "0.8086632", "text": "function evenNumbers(even) {\n var even = inputyournumber;\n if (inputyournumber % 2 == 0) {\n return true;\n \n } else {\n return false;\n }\n}", "title": "" } ]
8244843d6b6b3f74454a0d604b44a74b
Metodos para crear un nuevo objeto de tipo jugador
[ { "docid": "74f327437beb800b878510444b48b315", "score": "0.5785364", "text": "function CrearJugador() {\n if (validarFormCrear() == true) {\n var existe = false;\n for (var vc = 0; vc < Jugadores.length; vc = vc + 1) {\n var jug = Jugadores[vc].Alias;\n if (jug.localeCompare($(\"#Nick\").val()) == 0) {\n $(\"#Nick\").css(\"border\", \"1px solid red\");\n errorMsg(\"Nick Name ya existente, intenta con uno nuevo\");\n existe = true;\n }\n }\n if (existe == false) {\n newPlayer($(\"#Nombjug\").val(), $(\"#DocID\").val(), $(\"#Direcc\").val(), $(\"#EM\").val(), $(\"#Nick\").val(), $(\"#Pass\").val());\n }\n }\n }", "title": "" } ]
[ { "docid": "6fc81f9f16996c1d14a5ce2946c3924e", "score": "0.6422282", "text": "function Jugada(nombre, gano){\n this.nombre = nombre;\n this.gano = gano;\n}", "title": "" }, { "docid": "1713c1bec661e762ed1fd6ba98f93cde", "score": "0.6392273", "text": "newObj() {\n const newObj = {};\n this.objects[this.count] = {};\n this.objects[this.count].JSobj = newObj; // Store JS object\n this.objects[this.count].DOMelements = {}; // Prepare to store DOM elements\n\n newObj.nodeID = null;\n newObj.id = this.count++;\n newObj.name = \"\";\n newObj.type = \"\";\n newObj.parent = \"null\";\n newObj.children = [];\n newObj.details = [];\n\n newObj.instance = this;\n\n // Remember which node to edit\n this.editNode = newObj.id;\n this.newObject = newObj;\n\n return newObj;\n }", "title": "" }, { "docid": "b6524a2f447e832595ed3c4894be5708", "score": "0.63308936", "text": "function createObject() {\n var className= $.trim($className.val());\n var dbName = $.trim($dbName.val());\n if (className == null || className.length == 0 || dbName == null || dbName.length == 0) {\n alert(\"ERROR:\\nPlease list a Class Name and a Database Name\");\n return;\n }\n\n var num = getInt($container.attr(\"data-num\"));\n num++;\n $container.attr(\"data-num\", num);\n var $newObject = $container.find(\".object:last-child\").clone(true, true);\n\n $newObject.find(\".object-table\").attr(\"data-rows\", \"1\");\n $newObject.find(\".sel-ai-class\").attr(\"data-id\", num);\n $newObject.find(\".sel-pk-class\").attr(\"data-id\", num);\n \n $newObject.attr({\"data-num\": num, \"data-static\": \"0\"});\n \n \n $container.prepend($newObject);\n }", "title": "" }, { "docid": "5866f61476c7e537d83b1eb514a79a1c", "score": "0.6289215", "text": "function NewObj(){}", "title": "" }, { "docid": "d7b23c377a0edb4be63b4aa0c17f7070", "score": "0.60565233", "text": "function NewObj() {}", "title": "" }, { "docid": "12f81a0fe66782d6db28a496da317b4a", "score": "0.60448897", "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": "a6a1dc084a29f8de6fc60c1f436b26a8", "score": "0.60444397", "text": "function Jugador(n){\r\n\tthis.numero = n;\r\n\tthis.vidas = 5;\r\n}", "title": "" }, { "docid": "2f35cc04e9595bd16870dfaca38452ee", "score": "0.599932", "text": "function makeObject(obj){\n\t// console.log(\"ovj=\",obj);\n\t// console.log();\n\ttry{\n\t\tif(obj!=undefined && obj[10]!=undefined && obj[0]!=\"Delete\"){\n\t\t\tvar newObj={};\n\t\t\tnewObj._key=calculate_key(obj);\n\t\t\tnewObj.name=obj[1];\n\t\t\tnewObj.priority=obj[2];\n\t\t\tnewObj.owner_name=obj[3];\n\t\t\tnewObj.owner_number=obj[4];\n\t\t\tnewObj.contact_person=obj[5];\n\t\t\tnewObj.contact_phone=obj[6];\n\t\t\tnewObj.address=obj[7];\n\t\t\tnewObj.location=obj[8];\n\t\t\tnewObj.description=obj[9];\n\t\t\tnewObj.facebookurl=obj[10];\n\t\t\tnewObj.fbid=calculate_key(obj);\n\t\t\tnewObj.genre=obj[11];\n\t\t\tnewObj.profile_type=\"Party Spot\";\n\t\t\tnewObj.time=obj[13];\n\t\t\tnewObj.price=obj[14];\n\t\t\tnewObj.min=obj[14];\n\t\t\tnewObj.max=obj[14];\n\t\t\tnewObj.more=obj[15];\n\t\t\tnewObj.createdat=new Date().getTime();\n\t\t\tnewObj.rsm= {\n\t\t\t\t\"email\": \"[email protected]\",\n\t\t\t\t\"name\": \"Tarun\",\n\t\t\t\t\"phone\": \"+91 97 1197 1244\"\n\t\t\t};\n\n\n\t\t\treturn newObj;\n\t\t}\n\t\treturn undefined;\n\t}\n\tcatch(err){\n\t\tconsole.log(\"eror=\",err);\n\t\treturn undefined;\n\t}\n\treturn undefined;\n}", "title": "" }, { "docid": "9c06e5b9b9abb1ddca003dd6b57c9abc", "score": "0.59889805", "text": "function Mobilmodern(nama,tahun_keluar){\n let mobil = Object.create(methodMobil) //* Terbaca sebagai Prototype di console log, inilah yang akan jadi cikal bakal class pada javascript\n mobil.nama = nama, \n mobil.tahun_keluar = tahun_keluar,\n mobil.bensin = 100\n\n return mobil\n}", "title": "" }, { "docid": "d259b7bf018c1e91219d2795899e11e8", "score": "0.5922475", "text": "constructor(objeto) {\n\t\tthis.posicionamento = new posicionamento(objeto.linha, objeto.coluna);\n\t\tthis.sujo = objeto.sujo;\n\t\tthis.visitado = objeto.visitado;\n\t\tthis.listado = objeto.listado;\n\t}", "title": "" }, { "docid": "a2f527336cf721e304850a31e498d9bb", "score": "0.5910197", "text": "function adicionarNoObjeto(carro, marca, cor) {\n\n return {\n carro,\n marca,\n cor,\n };\n}", "title": "" }, { "docid": "ec77643cb6962b1734e8f3decd6ce6ff", "score": "0.58869", "text": "static fromJSON({id,tarea,completado,creado}){\n const tempTodo = new Todo(tarea);\n tempTodo.id = id;\n tempTodo.completado = completado;\n tempTodo.creado = creado;\n\n return tempTodo; // retornamos la instancia\n }", "title": "" }, { "docid": "8164ecf2fdc71802ed3b982946e97531", "score": "0.5885675", "text": "constructor(id, name, lastName, userName, password, email, suscripcion, tipo, nombre, banco, numero, codDeSeg, fechaDeVencimiento ){\n this.id = id;\n this.name = name;\n this.lastName = lastName;\n this.userName = userName;\n this.password = password;\n this.email = email;\n this.suscripcion = suscripcion;\n this.tarjeta = {\n tipo: tipo,\n nombre: nombre,\n banco: banco,\n numero: numero,\n codDeSeg : codDeSeg,\n fechaDeVencimiento : fechaDeVencimiento,\n }\n \n }", "title": "" }, { "docid": "7b61f54ed2d165b38677aee82441dd15", "score": "0.5872446", "text": "function crearLista(){\n listaJugadores.push({nombre: nombreJugador, puntos: letrasAcertadas});\n }", "title": "" }, { "docid": "38e6b8dd2c3af53e0e4b8a593f04b87a", "score": "0.5859751", "text": "function createJedi(name)\n {\n // this methodology isnt really relevent for this project since there is only 1 object type were making\n // I should also look into how the 'new' keyword really works and object.create but this works for now\n switch(name)\n {\n case \"Obi-Wan Kenobi\":\n return new jedi(\"Obi-Wan Kenobi\", \"Assets/Images/obiwan.jpg\", 125, 12, 23);\n case \"Luke Skywalker\":\n return new jedi(\"Luke Skywalker\", \"Assets/Images/lukeskywalker.jpg\", 145, 11, 21);\n case \"Darth Vader\":\n return new jedi(\"Darth Vader\", \"Assets/Images/darthvader.jpg\", 150, 10, 18);\n case \"Darth Maul\":\n return new jedi(\"Darth Maul\", \"Assets/Images/darthmaul.jpg\", 160, 9, 19);\n // TODO: Make the error louder instead of a silent fail (assert calls?)\n default:\n return \"Error jedi not defined\";\n }\n }", "title": "" }, { "docid": "2e4ba3f60e6991db4ad053845562a861", "score": "0.5852988", "text": "function create_field_obj(index_nummer){\n\treturn {\n\t \"id\":\"field_\"+index_nummer,\n\t \"biom\":get_biom(),\n\t \"haus\":haus.none\n\t}\n}", "title": "" }, { "docid": "f536769a9ea16506937fcb728263ea9f", "score": "0.58261025", "text": "function createPerson()\n{ \n var person = new Object();\n person.name = \"siri\";\n person.age =\"28\";\n person.designation=\"trainer\";\n person.Phno = 9998788667;\n return person;\n}", "title": "" }, { "docid": "8b4e94d3efeed3e38b532cb7f4fec08d", "score": "0.582532", "text": "function newObject(object) {\n switch (object) {\n case 'sketch':\n create(\"canvas\");\n break;\n case 'photo':\n create('img');\n break;\n case 'title':\n create('p');\n break;\n case 'grid':\n grid.openGridSettings();\n break;\n }\n}", "title": "" }, { "docid": "f04cbd5afe6cc09874045cc0931a660d", "score": "0.5811535", "text": "constructor(nombreObjeto, apellido,altura){\n //Atributos\n this.nombre = nombreObjeto\n this.apellido = apellido\n this.altura = altura\n }", "title": "" }, { "docid": "35ba9e798ee3936a88ee952d284b29d1", "score": "0.5806212", "text": "constructur() {}", "title": "" }, { "docid": "6a2ad3900730bae0554d0595c79526c5", "score": "0.57992786", "text": "function criarProduto(nome, modelo, preco) {\n return{\n nome,\n modelo,\n preco,\n desconto: 0.1 // aqui definimos um desconto padrão de 10%\n }\n}", "title": "" }, { "docid": "cf31bda86003bc26a18a9ce27e016f00", "score": "0.57960486", "text": "static create(obj) {\n //spinner(true);\n\n let handle = $(obj).attr(\"referencia\");\n let target = $(obj).attr(\"target\");\n let single = parseInt($(obj).attr(\"single\"));\n\n this.criaModal(handle, target);\n\n if(!(single === 1 && $(obj).find(\".galeria-overlay\").length > 0)){\n this.lista(obj);\n }\n }", "title": "" }, { "docid": "9532bba6c6a7bed63c0f7fb88a71d6f5", "score": "0.57687086", "text": "function Persona(nombre, apellido,altura) {\n this.nombre = nombre;\n this.apellido = apellido;\n this.altura = altura ;\n this.estado = \"vivo\";\n \n //return.this implicitamente regresa el objeto que se esta creando\n}", "title": "" }, { "docid": "9b8a565b5309828fd7313c1d84a79f73", "score": "0.57596326", "text": "function NewObject() {\n\t// returns an object\n}", "title": "" }, { "docid": "e12864e1fc45821aab52be7fa2ee3e0a", "score": "0.57522494", "text": "function createIngredJS(id,name,category){\n var obj = new Object();\n obj.id = id;\n obj.name = name;\n obj.category = category;\n return obj;\n }", "title": "" }, { "docid": "476287fd4290205543289bff53028510", "score": "0.57190776", "text": "function criarPessoa() {\n return {\n nome: 'Th',\n sobrenome: 'Ol'\n }\n}", "title": "" }, { "docid": "a67a6d92d7da82d6b7f1468476d80769", "score": "0.56848603", "text": "function CreateMan(name,age,color){\n\treturn {\n\t\tname,\n\t\tage,\n\t\tcolor,\n\t}\n}", "title": "" }, { "docid": "35079e84ff7ed00cc55f09b0f50ae5c6", "score": "0.56793714", "text": "create() {}", "title": "" }, { "docid": "35079e84ff7ed00cc55f09b0f50ae5c6", "score": "0.56793714", "text": "create() {}", "title": "" }, { "docid": "15a36c76876fe8d18976e684377f935a", "score": "0.56764895", "text": "function jsNewObject() {\n var obj = {};\n return obj;\n}", "title": "" }, { "docid": "533ed48d896956b4fba91a6b9535a83d", "score": "0.5675959", "text": "function CreateIDEObjectType()\r\n{\r\n\treturn new IDEObjectType();\r\n}", "title": "" }, { "docid": "b2add77a98dfc1af3a30491cc4aa41ae", "score": "0.5670115", "text": "crearAlumne(nom = \"\", hores = 0){\n const alumne = new Alumne(nom,hores);\n this.__llista[alumne.id] = alumne;\n }", "title": "" }, { "docid": "da73da7bf84832bd998fd0b59201290a", "score": "0.5647077", "text": "crearNave(ejercito, cantidad, tipo) {\n for (let index = 1; index <= cantidad; index++) {\n let empiezanave;\n switch (tipo) {\n case \"Nave1\":\n empiezanave = new Nave1();\n break;\n case \"Nave2\":\n empiezanave = new Nave2();\n break;\n case \"Nave3\":\n empiezanave = new Nave3();\n break;\n\n default:\n break;\n }\n\n ejercito.anadirNave(empiezanave);\n }\n }", "title": "" }, { "docid": "2bb3a2c62842dfad8d3323f83eb7fff8", "score": "0.5632753", "text": "create () {}", "title": "" }, { "docid": "2bb3a2c62842dfad8d3323f83eb7fff8", "score": "0.5632753", "text": "create () {}", "title": "" }, { "docid": "ef1b7e3c2cb195f7d7cca952c9b95df4", "score": "0.56282777", "text": "constructor(\n parametroNombre,\n parametroApellido,\n parametroDni,\n parametroFechaNacimiento,\n parametroEmail,\n parametroTelefono\n ) {\n //crear las propiedades del objeto\n this.nombre = parametroNombre;\n this.apellido = parametroApellido;\n this.dni = parametroDni;\n this.fechaNacimiento = parametroFechaNacimiento;\n this.email = parametroEmail;\n this.telefono = parametroTelefono;\n }", "title": "" }, { "docid": "891a16ae65c348a3a4a45b4660d53907", "score": "0.56219155", "text": "function creerNouvellePersonne(nom) {\n var obj = {};\n obj.nom = nom;\n obj.salutation = function () {\n alert('Salut ! je m\\'appelle ' + this.nomComplet +'.');\n };\n return obj;\n}", "title": "" }, { "docid": "54069ce712c4cea2ba393cbe1aabed2b", "score": "0.5588552", "text": "function makePerson(name, age) {\r\n\t// add code here\r\n\tlet personObj = Object.create(null);\r\n personObj.name = name;\r\n personObj.age = age;\r\n \r\n return personObj;\r\n\r\n}", "title": "" }, { "docid": "890a9979b5dc9ad449e48cd67fa0e2e8", "score": "0.55797595", "text": "function objeto(i,h,d)\r\n{\r\n\tthis.temp = i;\r\n\tthis.hum = h;\r\n\tthis.fecha = d;\r\n\tthis.selectTemp = false;\r\n\tthis.selectHum = false;\r\n}", "title": "" }, { "docid": "3b11a41f73c5960ae5afc4aa10fc0047", "score": "0.5579153", "text": "static create(params) {\n return {type: `${this.prefix}${this.name}`, _instance: new this(params)}; //eslint-disable-line\n }", "title": "" }, { "docid": "6c72fe16e808e5e0addcdb17c18b29a8", "score": "0.5578274", "text": "constructor(){\n this.ju1 = new Jugador(1, 'X');\n this.ju2 = new Jugador(2, 'O');\n this.actual = this.ju1;\n this.tab = new Juego();\n this.ganador = 0;\n this.liGanad = [[0,1,2],\n [3,4,5],\n [6,7,8],\n [0,3,6],\n [1,4,7],\n [2,5,8],\n [0,4,8],\n [2,4,6]];\n }", "title": "" }, { "docid": "b221bee153058cbb2d77fc769bbaa552", "score": "0.55548924", "text": "create_node(id) {\n let new_node = {\n id : id,\n parent_node : undefined,\n child_list : [],\n type : \"Node\",\n };\n return new_node;\n }", "title": "" }, { "docid": "329cbea663a2907975499d0588e5f601", "score": "0.5551063", "text": "static fromJSON(jsnmphtgt) {\nvar mphtgt;\n//--------\nmphtgt = new MorphTarget();\nmphtgt.setFromJSON(jsnmphtgt);\nreturn mphtgt;\n}", "title": "" }, { "docid": "d4e1fc0edd48fb33b150495a038dddd5", "score": "0.5550414", "text": "function createPerson(name, age) {\n return {\n \"name\": name,\n \"age\": age\n }; \n}", "title": "" }, { "docid": "f2f83ddd790a257d6d79302fca2893c4", "score": "0.5550156", "text": "function createObject(makeNewItem, makeNewPrice) {\n\tthis.name = makeNewItem;\n\tthis.price = makeNewPrice;\n\treturn {name, price};\n}", "title": "" }, { "docid": "5569dbd1cfb36c15b853c06559aa81d2", "score": "0.5549078", "text": "function createPerson(name, age, job) {\n var o = new Object();\n o.name = name;\n o.age = age;\n o.job = job;\n o.sayName = function() {\n return this.name;\n }\n return o;\n}", "title": "" }, { "docid": "d7bdf21183b130d36104b90b5e4322d5", "score": "0.5548723", "text": "function Jj(a) {\n a.g || (a.g = new tg);\n return a.g;\n}", "title": "" }, { "docid": "a962fad5d721c9764abfd757c0e584b4", "score": "0.55309826", "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": "a3fdb50a2c7d6061d3f4fbeee18cee36", "score": "0.55150217", "text": "function createObj(a, b)\n{\n //var newObject = {}; // Not needed ctor function\n this.a = a; //newObject.a = a;\n this.b = b; //newObject.b = b;\n //return newObject; // Not needed for ctor function\n}", "title": "" }, { "docid": "d36dead64f8573374a1987c044583185", "score": "0.55141866", "text": "save(jot, newObj) {\n let newJot;\n realm.write(() => {\n jot.dateModified = new Date();\n\n if (newObj) {\n for (let attr of Object.keys(newObj)) {\n jot[attr] = newObj[attr];\n }\n }\n\n newJot = realm.create('Jot', jot, true);\n });\n\n return newJot;\n }", "title": "" }, { "docid": "ca1127dd0262cabb361aaf29eecd36bc", "score": "0.5512251", "text": "constructor(nome, idade){\n this.nome = nome; //this. esta se referindo ao proprio objeto e nao a uma variavel em especifico\n this.idade = idade;\n }", "title": "" }, { "docid": "2e8d085083f6cda9e59658afef2c032e", "score": "0.5511797", "text": "function CreateIDEObjectType()\n{\n\treturn new IDEObjectType();\n}", "title": "" }, { "docid": "2e8d085083f6cda9e59658afef2c032e", "score": "0.5511797", "text": "function CreateIDEObjectType()\n{\n\treturn new IDEObjectType();\n}", "title": "" }, { "docid": "2e8d085083f6cda9e59658afef2c032e", "score": "0.5511797", "text": "function CreateIDEObjectType()\n{\n\treturn new IDEObjectType();\n}", "title": "" }, { "docid": "2e8d085083f6cda9e59658afef2c032e", "score": "0.5511797", "text": "function CreateIDEObjectType()\n{\n\treturn new IDEObjectType();\n}", "title": "" }, { "docid": "2e8d085083f6cda9e59658afef2c032e", "score": "0.5511797", "text": "function CreateIDEObjectType()\n{\n\treturn new IDEObjectType();\n}", "title": "" }, { "docid": "2e8d085083f6cda9e59658afef2c032e", "score": "0.5511797", "text": "function CreateIDEObjectType()\n{\n\treturn new IDEObjectType();\n}", "title": "" }, { "docid": "2e8d085083f6cda9e59658afef2c032e", "score": "0.5511797", "text": "function CreateIDEObjectType()\n{\n\treturn new IDEObjectType();\n}", "title": "" }, { "docid": "2e8d085083f6cda9e59658afef2c032e", "score": "0.5511797", "text": "function CreateIDEObjectType()\n{\n\treturn new IDEObjectType();\n}", "title": "" }, { "docid": "2e8d085083f6cda9e59658afef2c032e", "score": "0.5511797", "text": "function CreateIDEObjectType()\n{\n\treturn new IDEObjectType();\n}", "title": "" }, { "docid": "2e8d085083f6cda9e59658afef2c032e", "score": "0.5511797", "text": "function CreateIDEObjectType()\n{\n\treturn new IDEObjectType();\n}", "title": "" }, { "docid": "2e8d085083f6cda9e59658afef2c032e", "score": "0.5511797", "text": "function CreateIDEObjectType()\n{\n\treturn new IDEObjectType();\n}", "title": "" }, { "docid": "2e8d085083f6cda9e59658afef2c032e", "score": "0.5511797", "text": "function CreateIDEObjectType()\n{\n\treturn new IDEObjectType();\n}", "title": "" }, { "docid": "2e8d085083f6cda9e59658afef2c032e", "score": "0.5511797", "text": "function CreateIDEObjectType()\n{\n\treturn new IDEObjectType();\n}", "title": "" }, { "docid": "2e8d085083f6cda9e59658afef2c032e", "score": "0.5511797", "text": "function CreateIDEObjectType()\n{\n\treturn new IDEObjectType();\n}", "title": "" }, { "docid": "2e8d085083f6cda9e59658afef2c032e", "score": "0.5511797", "text": "function CreateIDEObjectType()\n{\n\treturn new IDEObjectType();\n}", "title": "" }, { "docid": "2e8d085083f6cda9e59658afef2c032e", "score": "0.5511797", "text": "function CreateIDEObjectType()\n{\n\treturn new IDEObjectType();\n}", "title": "" }, { "docid": "2e8d085083f6cda9e59658afef2c032e", "score": "0.5511797", "text": "function CreateIDEObjectType()\n{\n\treturn new IDEObjectType();\n}", "title": "" }, { "docid": "2e8d085083f6cda9e59658afef2c032e", "score": "0.5511797", "text": "function CreateIDEObjectType()\n{\n\treturn new IDEObjectType();\n}", "title": "" }, { "docid": "2e8d085083f6cda9e59658afef2c032e", "score": "0.5511797", "text": "function CreateIDEObjectType()\n{\n\treturn new IDEObjectType();\n}", "title": "" }, { "docid": "2e8d085083f6cda9e59658afef2c032e", "score": "0.5511797", "text": "function CreateIDEObjectType()\n{\n\treturn new IDEObjectType();\n}", "title": "" }, { "docid": "2e8d085083f6cda9e59658afef2c032e", "score": "0.5511797", "text": "function CreateIDEObjectType()\n{\n\treturn new IDEObjectType();\n}", "title": "" }, { "docid": "2e8d085083f6cda9e59658afef2c032e", "score": "0.5511797", "text": "function CreateIDEObjectType()\n{\n\treturn new IDEObjectType();\n}", "title": "" }, { "docid": "2e8d085083f6cda9e59658afef2c032e", "score": "0.5511797", "text": "function CreateIDEObjectType()\n{\n\treturn new IDEObjectType();\n}", "title": "" }, { "docid": "0669bc484a3562a1d943313cb4b6eb24", "score": "0.5508906", "text": "create() {\n\t}", "title": "" }, { "docid": "1e0c243124e3ea3426e370422a10e45c", "score": "0.55048066", "text": "static new(obj, type = \"type1\") {\n let p = new this(obj);\n p.zombieType = type;\n\n if (p.zombieType == \"type2\") {\n p.life = 15;\n } else if (p.zombieType == \"type1\") {\n p.life = 10;\n }\n\n p.init();\n return p;\n }", "title": "" }, { "docid": "72885ed450b81da15a20dd64899b95ef", "score": "0.549918", "text": "function createObject(titleVal, typeVal, totalVal) {\n var temp = {\n id : generateId() + 1,\n title : titleVal,\n type : typeVal,\n total : totalVal\n }\n return temp;\n}", "title": "" }, { "docid": "7b67af99c7e8cf8e20178b16c39d501a", "score": "0.5448163", "text": "function generObj(obj){\n //gener elArr new pos\n obj.i += gDirec.i;\n obj.j += gDirec.j;\n // insert obj to gArr\n gArr[obj.i][obj.j] = obj.type;;\n}", "title": "" }, { "docid": "85739f8cd4dcb3a3b753831bbdd6b339", "score": "0.5445198", "text": "create(props){\n const obj = {type: this.name};\n\n Object.keys(this.props).forEach((prop) => {\n obj[prop] = props[prop];\n\n // If not primitive type\n // if(this.props[prop].rel !== undefined){\n // types[this.props[prop].type].create(props[prop]);\n // }\n // // Create new instance of type and add relationship\n // this.props[prop].create = (obj) => types[prop.type].create(obj);\n //\n // // Fetch existing instance of type and add relationship\n // this.props[prop].link = (obj) => types[prop.type].link(obj);\n // }\n });\n\n return obj;\n }", "title": "" }, { "docid": "fc6ceb4d47ec24e1cc08502528a35ec0", "score": "0.5435128", "text": "function Persona(nombre, apellido, altura, edad) {\n // Al prototipo o construtor le pasamos como parametros -\n // las key de los atributos que serian nombre, apellido-\n // y para guardarlo dentro de este objeto que se esta-\n // construllendo en la memoria, podemos hacer referencia-\n // a este objeto dentro de esta funcion con this-\n // this va hacer referencia al objeto que se acaba-\n // construir this.nombre = nombre, le asignamos nombre-\n // son dos variables distintas que reciben el nombre-\n // como parametro este mismo this lo repetimos para-\n // los demas parametros del prototipo\n // implicitamente JS retorna this cuando llamamos-\n // a esta funcion con la palabra new, sino utilizamos-\n // la palabra new hay otras formas mas engorrosas-\n // de hacerlo y con new es mas prolifico 🤣🤣🤣\n this.nombre = nombre;\n this.apellido = apellido;\n this.altura = altura;\n this.edad = edad;\n}", "title": "" }, { "docid": "3ecde889cdaf36fbf2fff3375817a115", "score": "0.5427527", "text": "function _newDataClass(oBoss)\r\n{\r\n\tthis.n = 0;\r\n\tthis.o = 0;\r\n\tthis.h = 0;\r\n\tthis.c = 0;\r\n\tthis.l = 0;\r\n\tthis.html = \"xxx\";\r\n\tthis.ui\t\t= null;\r\n}", "title": "" }, { "docid": "371d36646e27cc06dacb898549772e64", "score": "0.54158646", "text": "createUsuario(username) {\n /* Crea un artista y lo agrega a unqfy. */\n this._validarParametros({username:username}, [\"username\"]);\n this._validarDisponibilidadNombreUsuario(username, \"createUsuario\");\n\n const usuarioNuevo = new Usuario(username);\n this._usuarios.push(usuarioNuevo);\n return usuarioNuevo;\n }", "title": "" }, { "docid": "1a2f03d32ae6b6330d5fda9f31894cb4", "score": "0.5399101", "text": "static createInstance(data) {\n\t\tlet obj = new User();\n\n\t\tobj.id = data.objectId;\n\t\tfor(let prop in data) {\n\t\t\tif(data.hasOwnProperty(prop)) {\n\t\t\t\tobj.set(prop, data[prop]);\n\t\t\t}\n\t\t}\n\t\treturn obj;\n\t}", "title": "" }, { "docid": "c6cd1fdbf05c46e1d30005a6a711da0c", "score": "0.53972596", "text": "constructor() {\n this.stage = null//stage c'est l'écran de jeu en gros\n this.objects = [] // je fais une liste vide dans laquelle je vais metre tous les objets du jeu\n this.ids = 0\n }", "title": "" }, { "docid": "8077a08141ab5633d63638a95b81e7dc", "score": "0.5396088", "text": "function creaOggettoStudente(name,surname,age){\n let nuovoStudente = {\n nome: name,\n cognome: surname,\n eta: age\n }\n \n return nuovoStudente;\n}", "title": "" }, { "docid": "4ee361611f5184a022c12b26f116efab", "score": "0.53905284", "text": "function createPerson(name, age) {\n return {\n name: name,\n age: age\n };\n}", "title": "" }, { "docid": "9daaad9f60d421dddb9c1d5de8f27b3e", "score": "0.53805554", "text": "function Mascota(nombre, especie, raza='')//no importa el orden de los datos\n//se pone comillas en la raza para que no te salga undefined por si no lo sabemos\n\n{\n this.nombre = nombre\n this.especie = especie\n this.raza = raza//los parametros de una funcion constructora son parametros y pueden tener valores por defecto\n\n}", "title": "" }, { "docid": "8f4b95cf61630ac752d659f0c045b87b", "score": "0.53788227", "text": "function addObjectType(name, onlyOne, mustExist, sprite, constr){\n\tvar objType = {\n\t\tname: name,\n\t\tonlyOne: onlyOne,\n\t\tmustExist: mustExist,\n\t\tproperties: [],\n\t\tspr: sprite,\n\t\tconstr: constr,\n\t\tconstrName: constr.toString().match(/function (\\w*)/)[1]//Extracts the name of the constructor from the constructor function code text\n\t};\n\t\n\tobjectTypes.push(objType);\n\treturn objType;\n}", "title": "" }, { "docid": "0b7423ba7d3171e8e75de880e5b2e542", "score": "0.5372146", "text": "static create () {}", "title": "" }, { "docid": "f88ac2c64eb48856f7f6d68a6b4c2df2", "score": "0.5368706", "text": "function Osoba(ime, godine, pol) {\n /*this = {}*/\n this.name = ime;\n this.age = godine;\n this.gender = pol;\n this.children = [];\n this.father = null;\n this.mother = null;\n\n this.addChild = function (dete) { //1. metoda\n var dodaj = true;\n this.children.forEach(function (e) {\n if (e === dete) {\n dodaj = false;\n }\n if (dodaj === true) {\n this.children.push(dete)\n dete.addParent(this)\n }\n })\n }\n\n this.addParent = function (roditelj) { //2. metoda\n if (roditelj.gender === \"M\") { //gender jer je property objekta\n this.father = roditelj\n } else {\n this.mother = roditelj;\n }\n roditelj.addChild(this);\n }\n /*return this*/\n}", "title": "" }, { "docid": "54f880a0713666a57d2785ea54e5d3e1", "score": "0.53680843", "text": "function createObject() {\n return {\n files: [],\n name: '',\n dirs: []\n };\n}", "title": "" }, { "docid": "510a7d0a3659c188f77d4ca0f775d6dd", "score": "0.5365813", "text": "function create() {\n\n}", "title": "" }, { "docid": "dcb4befebcaca7cbeef2bd389bbd2083", "score": "0.535975", "text": "makeDottomodachiObj() {\n return {dottomodachi: {\n id: this.id,\n name: this.name,\n hunger_meter: this.hungerMeter,\n happiness_meter: this.happinessMeter,\n weight_meter: this.weightMeter,\n total_points: this.totalPoints,\n stage: this.stage,\n evo_type: this.evoType,\n evolution_countdown: this.evolutionCountdown \n }\n }\n }", "title": "" }, { "docid": "5c434abbce6edb8201cdf41e4bc9adaf", "score": "0.5355882", "text": "function heredaDe(prototipoHijo, prototipoPadre){\n var fn = function () {}\n fn.prototype = prototipoPadre.prototype\n prototipoHijo.prototype = new fn\n //asignamos la funcion constructora de la clase claseHija\n prototipoHijo.prototype.constructor = prototipoHijo\n}", "title": "" }, { "docid": "08ae49abc931383cc0b9c88cbf8f2117", "score": "0.5354125", "text": "static createFromJson(jsonObj)\n\t{\n\t\treturn new ProjectStudent(jsonObj[\"name\"],\n\t\tjsonObj[\"description\"], \n\t\tjsonObj[\"status\"]);\n\t}", "title": "" }, { "docid": "91209094b1b3ce93691415aa3763cbed", "score": "0.53538114", "text": "function todoOBJ(testo,data){\n \n this.testo = testo;\n this.data = data;\n \n}", "title": "" }, { "docid": "dac78decd02320e4a6b51ace8c306f3e", "score": "0.5352136", "text": "function User(name) {\n if(!new.target) { // jei apacioje buvo paleistas konstruktorius (let john = User('john')) be new zodelio, tada sukuria nauja objekta\n return new User(name);\n }\n this.name = name; // o jei jau tas objektas yra, tada perraso jo reiksme\n}", "title": "" }, { "docid": "6ae5c8c83b248b81535af6075c501fd7", "score": "0.5348688", "text": "function insertarNodoP(proceso,nombre, tiempo, quantum,tll, tf, tr, pr,rar,ne,contenido){\r\n\tvar nuevo = new nodo();\r\n\tnuevo.proceso = proceso;\r\n\tnuevo.nombre=nombre;\r\n\tnuevo.tiempo = tiempo;\r\n\tnuevo.quantum = quantum;\r\n\tnuevo.Tllegada=tll;\r\n\tnuevo.Tfinalizacion=tf;\r\n\tnuevo.Turnarround=tr;\r\n\t\r\n\tnuevo.prioridad=pr;\r\n\tnuevo.rafagareal=rar;\r\n\tnuevo.numEjecucion=ne;\r\n\tnuevo.contenido=contenido;\r\n\tnuevo.sig = null;\r\n\t\r\n\tnuevo.sig = null;\r\n\r\n\tif(this.vacia()){\r\n\t\tthis.raiz = nuevo;\r\n this.fondo = nuevo;\r\n\t}else{\r\n\t\tthis.raiz = nuevo;\r\n\t\tthis.raiz.sig = this.fondo;\r\n\t\tthis.fondo = this.raiz;\r\n\t}\r\n}", "title": "" }, { "docid": "aea290812fd8621851b23bfb8b24cbec", "score": "0.53414494", "text": "constructor(i, j, type) {//contructorul e o functie care este executata cand este creat obiectul\n this.i = i;\n this.j = j;\n this.type = type;//x or o\n }", "title": "" }, { "docid": "bb1304c15a56d9b018d0a31d6e9fccf9", "score": "0.53389674", "text": "static create( data ) {\n\t\tlet obj = new ( this )();\n\t\tfor( var key in data ) {\n\t\t\tif( data.hasOwnProperty( key ) ) {\n\t\t\t\tobj[key] = data[key];\n\t\t\t}\n\t\t}\n\t\treturn obj.save();\n\t}", "title": "" } ]
1c6b3601684ff3e15f3ece5b4bf2a857
0 model For this function, we maintain a temporary count and a maximum count. If any element is smaller than the previous element, we count it. Then we compute the maximum each time the count increases.
[ { "docid": "599540c682861b4dd355c48295ac2131", "score": "0.6014216", "text": "function longestFallModel(nums) {\n let counter = 1;\n let maxCounter = 0;\n\n // quick fail case if the array is empty\n if (nums.length === 0) {\n return 0;\n }\n\n for (let i = 1; i < nums.length; i++) {\n // if current number is smaller than the previous number\n if (nums[i] < nums[i - 1]) {\n counter++;\n maxCounter = Math.max(counter, maxCounter);\n } else {\n counter = 1;\n }\n }\n\n // 1 is the default value for a non-empty array\n return maxCounter || 1;\n}", "title": "" } ]
[ { "docid": "3b2617ffaa1fb561acfb2d1df753f3a8", "score": "0.66339695", "text": "function maxCount(arr) {\n return arr.sort((a, b) =>\n arr.filter(v => v === a).length\n - arr.filter(v => v === b).length\n ).pop();\n}", "title": "" }, { "docid": "14b413573dfd060985c7a6155bb5d724", "score": "0.66229016", "text": "function simpleMode(arr) {\n var countList = [];\n for (var i = 0; i < arr.length; i++) {\n var count = 0;\n for (var j = arr.length-1; j > i; j--) {\n if (arr[i] === arr[j]) count++;\n }\n countList.push(count);\n }\n console.log(countList);\n if (countList.reduce(function(prev, curr) {\n return prev + curr;\n }) === 0) return -1;\n return arr[countList.indexOf(Math.max.apply(Math,countList))]; \n}", "title": "" }, { "docid": "11c1c5018438f01d355207bedf037fd2", "score": "0.66003126", "text": "function countMax(arr) {\n value = true;\n let count = 1;\n for (let i = 0; i < arr.length; i++) {\n if (arr[i] != arr[i + 1]) {\n break;\n } else {\n value = false;\n count++;\n }\n\n }\n if (value) {\n return 1;\n } else {\n return count;\n }\n}", "title": "" }, { "docid": "8e05389bba24b9e5d060e02798dbafc0", "score": "0.65115887", "text": "function solution(A) {\n var maxEle=A[0];\n var count =1;\n var size=A.length;\n for(var i=1;i<size;i++){\n if(A[i]>maxEle){\n maxEle=A[i];\n count = 1;\n }\n else if(A[i]==maxEle){\n count++;\n }\n }\n if(size>0){\n return count;\n }\n else{\n return 0;\n }\n \n}", "title": "" }, { "docid": "3c0a5f2022b819de6671d0eccd437804", "score": "0.6345131", "text": "function birthdayCakeCandles(arr) {\n let count = 0;\n let max = arr[0];\n\n arr.map((ele) => {\n max = Math.max(ele,max)\n })\n\n arr.map((ele) => {\n ele === max && count++\n })\n\n return count;\n\n}", "title": "" }, { "docid": "14bc4cf83ffc1010a77bcd063c7e6438", "score": "0.6314543", "text": "function solution(A) {\n // write your code in JavaScript (Node.js 8.9.4)\n var peaks = [];\n var previous_flag_placed;\n var max_global = 0;\n var count = 0;\n for (var i = 1; i < A.length - 1; i++) {\n if (A[i - 1] < A[i] && A[i] > A[i + 1]) peaks.push(i);\n }\n if (peaks.length) {\n for (var i = peaks.length; i > 0; i--) {\n if (max_global < i) {\n var j = 1;\n previous_flag_placed = peaks[0];\n count = 1;\n while (j <= peaks.length) {\n if (peaks[j] - previous_flag_placed >= i) {\n count++;\n previous_flag_placed = peaks[j];\n }\n if (count == i) {\n break;\n }\n j++;\n }\n if (max_global < count) max_global = count;\n } else break;\n }\n }\n return max_global;\n}", "title": "" }, { "docid": "0b2389e824a89d4df1395f7843376c6d", "score": "0.6264687", "text": "countNumberOfPositiveReview(arr) {\n\n const numbers = new Set(arr), counts = {};\n var max = 1;\n for (const num of numbers.values()) {\n // console.log(num)\n let counting = true, next = num + 1;\n numbers.delete(num);\n while(counting) {\n counting = false;\n while (numbers.has(next)) { numbers.delete(next++) }\n if (counts[next]) { counting = numbers.has(next += counts[next]) }\n }\n max = Math.max(counts[num] = next - num, max);\n }\n return max;\n }", "title": "" }, { "docid": "3e2f24c5fe83b915d98fef5e9de43f10", "score": "0.62119305", "text": "function pickingNumbers(a) {\n\n let map = {}\n for(let i = 0; i < a.length; i++){\n if(map[a[i]]){\n map[a[i]]++\n } else {\n map[a[i]] = 1\n }\n }\n console.log(map)\n let maxarr = []\n for(const num in map){\n maxarr.push([num, map[num]])\n }\n if(maxarr.length == 1) return maxarr[0][1]\n// console.log(maxarr)\n let maxCount = Number.NEGATIVE_INFINITY\n for(let j=0; j<maxarr.length - 1; j++){\n if(Number(maxarr[j+1][0]) - Number(maxarr[j][0]) <= 1){\n if(maxarr[j+1][1] + maxarr[j][1] >= maxCount){\n maxCount = maxarr[j+1][1] + maxarr[j][1]\n }\n }\n }\n return maxCount\n}", "title": "" }, { "docid": "805f9890756ef9e0d9f53b1ecd24b69e", "score": "0.6177128", "text": "function mostFrequent(array){\n var max = 0;\n var element;\n for(var i = 0; i < array.length; i++) {\n var next = array[i];\n var nextCount = 1;\n for(var j = i + 1; j < array.length; j++) {\n if(array[j] === next) {\n nextCount++;\n }\n }\n if(nextCount > max){\n max = nextCount;\n element = next;\n\n }\n\n} \nreturn element;\n \n}", "title": "" }, { "docid": "1e68493873ab4a06e1ac3ce396cd62c6", "score": "0.6174606", "text": "function maxOperationPlidrom(array) {\n let i = 0;\n let j = array.length - 1;\n let count = 0;\n while (i <= j) {\n if (array[i] == array[j]) {\n i++;\n j--;\n }\n else if (array[i] > array[j]) {\n j--;\n array[j] = array[j] + array[j + 1];\n count++;\n }\n else {\n i++;\n array[i] = array[i] + array[i - 1];\n count++;\n }\n }\n return count;\n}", "title": "" }, { "docid": "91dc6cd77a754cf5e5446474e32ff26c", "score": "0.61707824", "text": "function solution(A) {\n // write your code in JavaScript (Node.js 8.9.4)\n var len = A.length;\n var max = A[0];\n for (var x = 0; x < len; x++) {\n if (max < A[x])\n max = A[x];\n }\n if (max <= 0)\n return 1;\n var arr = new Array(max + 1).fill(0);\n for (var i = 0; i < len; i++) {\n if (A[i] >= 1) {\n arr[A[i]]++;\n\n }\n }\n //console.log(max);\n for (var i = 1; i < (max + 1); i++) {\n if (arr[i] == 0) {\n // console.log(i);\n return i;\n }\n }\n return max + 1;\n}", "title": "" }, { "docid": "54efb6051681bbfdcc260a34db828541", "score": "0.6061815", "text": "function countingSort(array, max){\n //first we need to setup the array\n //that will hold all the number instances\n let numsToCount = [];\n let sortedArray = [];\n let currentSortIndex = 0;\n\n for(let i = 0; i<max + 1; i++){\n numsToCount[i] = 0;\n }\n\n //now that we have that let's populate it\n array.forEach(num => numsToCount[num] +=1)\n\n// array.forEach(function(num){\n// numsToCount[num] += 1\n// })\n\n //now we need our double iterations\n for(let num = 0; num < numsToCount.length; num++){\n let count = numsToCount[num]\n\n for(let x = 0; x < count; x++){\n sortedArray[currentSortIndex] = num;\n currentSortIndex++\n }\n }\n return sortedArray;\n}", "title": "" }, { "docid": "78de6fe0593eb209577a8f5ee29eae48", "score": "0.60504335", "text": "function countHigh(max, values) {\n return values.reduce(function (highCount, value) { return highCount += (value > max) ? 1 : 0; }, 0);\n}", "title": "" }, { "docid": "df5d9f072e2ad2907fb8a99c9d633247", "score": "0.6050432", "text": "function arrayception (array, currCount, maxCount) {\n\n var currCount = currCount || 0;\n var maxCount = maxCount || 0;\n array.forEach(function(item) {\n if (Array.isArray(item)) {\n maxCount = arrayception(item, currCount+1, maxCount);\n } else {\n currCount += 1;\n maxCount = Math.max(maxCount, currCount);\n currCount -= 1;\n }\n });\n return maxCount;\n}", "title": "" }, { "docid": "05fff4ab5fae14424913637d972fba3a", "score": "0.6009898", "text": "function peak(arr){\n for(var i=0,l=0,r=arr.reduce((a,b)=>a+b,0);i<arr.length;i++){\n r-=arr[i]\n if(l==r) return i\n l+=arr[i]\n }\n return -1\n}", "title": "" }, { "docid": "5b04c8e5503a67ca4b6777e4f8a8a42c", "score": "0.6008235", "text": "function freqCount() {\n const array = [\"a\", \"b\", \"c\", \"d\", \"c\", \"b\", \"b\", \"c\", \"a\", \"e\", \"b\", \"e\"];\n var freqObj = {};\n var count = 1;\n array.sort(); // sort array for easier comparision\n for (var i = 0; i < array.length; i++) {\n if (array[i] == array[i + 1]) {\n count++;\n continue;\n } else {\n freqObj[array[i]] = count; // add element : frequency to object\n count = 1; //reset count\n continue;\n }\n }\n //get keys of the recent object and look for max and min ints\n var keys = Object.keys(freqObj);\n // set default max and min to the key's value, then compare.\n var mostFreq = keys[0];\n var leastFreq = keys[0];\n for (var j = 1; j < keys.length; j++) {\n if (freqObj[keys[j]] > freqObj[mostFreq]) mostFreq = keys[j];\n if (freqObj[keys[j]] < freqObj[leastFreq]) leastFreq = keys[j];\n }\n return (\n \"The most frequent item is: \" +\n mostFreq +\n \". The least frequent item is: \" +\n leastFreq\n );\n}", "title": "" }, { "docid": "f7ad1987b4fefa3388f10f1fbec3ea56", "score": "0.59766996", "text": "function MaxCount(array) {\n let hm = {};\n let maxCount = 1;\n for (let i = 0; i < array.length; i++) {\n if (!hm[array[i]]) {\n hm[array[i]] = 1;\n maxCount = 1;\n }\n else {\n hm[array[i]] = hm[array[i]] + 1;\n if (hm[array[i]] > maxCount) {\n maxCount = hm[array[i]];\n }\n }\n }\n for (let obj in hm) {\n if (hm[obj] === maxCount) {\n console.log(\"19)\", obj);\n }\n }\n}", "title": "" }, { "docid": "9799af1fdd6abb26e10a2443b346195c", "score": "0.5976378", "text": "function migratoryBirds(arr) {\n\nvar s = [0,0,0,0,0], i=0, idx = 0, max = 0;\nfor(i=0;i<arr.length;i++){\n s[arr[i]-1]++;\n}\nfor(i=0;i<s.length;i++){\n if(max < s[i]){\n max = s[i];\n idx = i+1;\n }\n}\nreturn idx;\n}", "title": "" }, { "docid": "084361ffacc7a7f22c34978a2b06a4a5", "score": "0.59653234", "text": "decrease() {\n counts = counts > 3 ? counts - 1 : counts;\n return counts;\n }", "title": "" }, { "docid": "110c4a8ab370d388e37afa8eb23bd0d9", "score": "0.5962323", "text": "function findMaxSequence(arr) {\n temp = [arr[0], 1];\n result = [arr[0], 1];\n for (i = 1, len = arr.length; i < len; i += 1) {\n if (arr[i] === arr[i - 1] + 1){\n temp[1] += 1;\n\n if (temp[1] > result[1]) {\n result = temp;\n }\n } else {\n temp = [arr[i], 1];\n }\n }\n\n console.log('The maximal increasing sequence of equal elements is: ', result);\n\n for (i = 0; i < result[1]; i += 1) {\n console.log(result[0] + i);\n }\n}", "title": "" }, { "docid": "88d8a8901914ca4c8ef62854a3e9c853", "score": "0.5960042", "text": "max() {\n return this.reduce((previous, current) => {\n return current >= previous\n ? current\n : previous;\n });\n }", "title": "" }, { "docid": "2844aef2ddbba3fb56745c9d10de5c0f", "score": "0.59542406", "text": "function maxNumber(arr) {\n var result = arr.reduce(function (index,elemant) {\n if (elemant>index) {\n index=elemant\n }\n return index\n },0)\n return result\n }", "title": "" }, { "docid": "33f0a4c06b1e26f96634b5bfcff7ed02", "score": "0.5934792", "text": "function arrayChange(inputArray) {\n var count = 0;\n var increment;\n for(var i = 0; i < inputArray.length; i++){\n if(inputArray[i + 1] > inputArray[i]){\n continue;\n }else if(inputArray[i] >= inputArray[i + 1]){\n increment = (inputArray[i] - inputArray[i + 1] + 1);\n inputArray[i + 1] = inputArray[i] + 1;\n count += increment;\n }\n }\n return count;\n}", "title": "" }, { "docid": "3deaeb04df958898a7834a0aca21580d", "score": "0.5928377", "text": "function solution(A) {\n var len = A.length;\n var currentMax = 0;\n var max = 0;\n var currenthighestValue = A[0];\n\n for(var i = 0; i < len; i++) {\n currenthighestValue = A[i] > currenthighestValue ? A[i] : currenthighestValue;\n currentMax = Math.max(A[i] + currentMax, 0);\n max = Math.max(currentMax, max);\n\n if(currenthighestValue > max) {\n max = currenthighestValue;\n }\n }\n\n return max === 0 ? currenthighestValue : max;\n}", "title": "" }, { "docid": "137c0a9c9d8cc228e51177d36c72286b", "score": "0.5924698", "text": "function countingSort(arr, max) {\n const result = [];\n const counters = new Array(max + 1).fill(0);\n\n for (let i = 0; i < arr.length; i++) {\n counters[arr[i]]++;\n }\n\n for (let i = 0; i < counters.length; i++) {\n while (counters[i] > 0) {\n result.push(i);\n counters[i]--;\n }\n }\n\n return result;\n}", "title": "" }, { "docid": "c0b0453680d29f3b334913842375476d", "score": "0.5913283", "text": "function incrementToTop(arr) {\n let biggestElem = Math.max(...arr);\n return arr.reduce((a,b) => { return a + (biggestElem - b) },0 );\n}", "title": "" }, { "docid": "73e5095e7a11f3899da1f9f2c906a518", "score": "0.59106237", "text": "function peak(arr){\n \n for(i=0; i < arr.length - 1; i++){\n \n if( arr.slice(0, i + 1).reduce((a,c) => a + c, 0) ===\n \n arr.slice(i + 2).reduce((a,c) => a + c, 0) ) {\n \n return i + 1\n }\n } \n \n return - 1\n \n}", "title": "" }, { "docid": "a582a86517fb8c036d2ded4596ad9538", "score": "0.590841", "text": "function countSort(arr, maxVal) {\n\n // create an array with the number of times a number\n // appears in arr\n const counts = new Array(maxVal + 1).fill(0);\n\n // count each occurrence of a number by looping\n // through the unsorted arr and then incrementing\n // a number in our counts array\n arr.forEach(val => {\n counts[val] ++;\n });\n\n // create our final returned array. This is not\n // an in-place sorting algorithm\n const retr = [];\n\n // loop through backwards between all the\n // possible values of the array so we push the \n // highest value towards the front of the array.\n for(let val = maxVal; val >= 0; val--) {\n\n // number of times this value occurs\n const count = counts[val];\n\n // add this value to the final output array\n // for every time it occurs in the original\n for(let times = 0; times < count; times++) {\n retr.push(val);\n }\n }\n return retr;\n}", "title": "" }, { "docid": "6c7f8c801577b41072c6a485401dce5e", "score": "0.5894059", "text": "function solution(A) {\n // write your code in JavaScript (Node.js 8.9.4)\n // The complexity of my solution is O(N) or O(N * log(N)).\n // First, we check which is the max value of the array. If it is below 0 we immediately return 1.\n // We then fill an array of length max with the number of occurrences of each positive element from the A array.\n // Lastly, we check for the first appearance of 0 in the array of occurrence and return the value we were looking for.\n\n let max = Math.max.apply(null, A);\n if (max < 0) return 1;\n\n let B = new Array(max).fill(0);\n for (let i = 0; i < A.length; i++) {\n if (A[i] > 0) {\n B[A[i] - 1]++;\n }\n }\n let index = B.indexOf(0);\n if (index === -1) {\n return max + 1;\n } else {\n return index + 1;\n }\n}", "title": "" }, { "docid": "62312839086f5e3cf552400b28d0062c", "score": "0.5890787", "text": "function pickingNumbers(a) {\n var b = []\n var b = new Array(a.length).fill(0)\n let max =0\n for(let i=0;i<a.length;i++)\n {\n let hold = a[i]\n b[hold]++\n }\n console.log(b)\n for(let i=0;i<b.length-1;i++)\n {\n if((b[i]+b[i+1]) > max)\n {\n max = b[i]+b[i+1]\n }\n }\n return max\n}", "title": "" }, { "docid": "260bb5727336c91876864a3f28a3d0a4", "score": "0.5886576", "text": "_kadane(arr) {\n let start = 0;\n let maxStart = 0;\n let maxEnd = -1;\n let max = 0;\n let currentMax = 0;\n for (let i = 0; i < arr.length; i++) {\n if (arr[i] + currentMax > 0) {\n currentMax += arr[i];\n } else {\n start = i + 1;\n currentMax = 0;\n }\n if (currentMax > max) {\n max = currentMax\n maxStart = start;\n maxEnd = i;\n }\n }\n return [max, maxStart, maxEnd];\n }", "title": "" }, { "docid": "aa89649e919f68a1066315ec362ab88d", "score": "0.5872236", "text": "function frequent1(arreglo) {\n var counter = 0; // en la primer vuelta counter es 7\n var currCounter = 0; // en la segunda vuelta currCounter es 4\n var itemwithmaxFreq;\n // tomamos el tercer número, 2\n arreglo.forEach((item) => {\n // item = 2\n arreglo.forEach((item2) => {\n // item2 = 3\n if (item === item2) {\n // cada que el numero aparece, aumentamos el curr counter\n currCounter++;\n }\n });\n //\n if (currCounter >= counter) {\n // si currCounter supera a counter (número almacenado)\n // significa que ese número fue mayor que el pasado\n // guardamos ese númeroen variable itemwithmaxFreq\n itemwithmaxFreq = item;\n // counter es el nuevo número a superarse, lo actualizamos\n counter = currCounter;\n }\n // reiniciamos la variable para volver a analizar el sig número\n currCounter = 0;\n });\n console.log(itemwithmaxFreq);\n}", "title": "" }, { "docid": "de4d7123e22a625714ab78828352020a", "score": "0.58659136", "text": "function fun(array){\n var maxNum =1;\n var maxElem;\n var b = array.reduce(function(arr,item){\n if(arr[item]){\n arr[item]++;\n }else{\n arr[item]=1;\n }\n if(arr[item]>maxNum){\n maxElem=item;\n maxNum=arr[item];\n }\n return arr;\n },{})\n return maxElem+'';\n}", "title": "" }, { "docid": "c7d636e1580f059bd2eff1485008bcf8", "score": "0.5864732", "text": "function missingElement(arr) {\n let max = 0;\n let sum = 0;\n arr.forEach((element) => {\n if (element > max) {\n max = element;\n }\n sum += element;\n });\n let missingNumber = (max * (max + 1)) / 2 - sum;\n if (missingNumber === 0) {\n missingNumber = max + 1;\n }\n return missingNumber;\n}", "title": "" }, { "docid": "d12a026305f15851262cdede6905afac", "score": "0.585538", "text": "function findMaxScore(array) {\n\t\t function iter(array, sum) {\n\t\t if (!array.length) {\n\t\t max = Math.max(max, sum);\n\t\t return;\n\t\t }\n\t\t array.forEach((v, i, nums) => \n\t\t iter(\n\t\t array.filter((w, j) => w !== aums[i - 1] && w !== aums[i + 1] && i !== j),\n\t\t sum + v\n\t\t )\n\t\t );\n }\n\n var max = 0;\n iter(\n \tarray.filter(v => Number.isInteger(v) && v > 0), 0\n \t);\n return max;\n}", "title": "" }, { "docid": "85330e76106c31558249126c0f993d13", "score": "0.5845309", "text": "function solution(A) {\n // write your code in JavaScript (Node.js 8.9.4)\n let currentMax = A[0]\n let highestMax = A[0]\n \n for (let i =0; i < A.length-1; i++){\n currentMax = Math.max(currentMax + A[i+1], A[i] + A[i+1])\n currentMax = Math.max(currentMax, A[i+1])\n highestMax = Math.max(currentMax, highestMax)\n }\n \n return highestMax\n}", "title": "" }, { "docid": "fcb41d1839dd3d37a62b99b29274fbea", "score": "0.58425486", "text": "function freq(arr){\n\tfreqArr = {}\n\tlet maxV a=l 0\n\tlet maxKey = -1\n\tfor(let i of arr) {\n\t\tif (freqArr[arr[i]]){\n\t\t\tfreqArr[arr[i]] += 1\n\t\t} else {\n\t\t\tfreqArr[arr[i]] = 1\n\t\t}\n\t}\n\n\tObject.keys(freqArr).forEach(function(key) {\n\t\tlet value = freqArr[key]\n\t\tif (value > maxVal) {\n\t\t\tmaxVal = value\n\t\t\tmaxKey = key\n\t\t}\t\t\n\t})\n\treturn maxKey\n}", "title": "" }, { "docid": "a9f27ab6c20af922551270762aced2ee", "score": "0.582489", "text": "function pickingNumbers(a) {\n var arr = [];\n for(var i=0; i<100; i++) {\n arr[i]=0;\n }\n \n for(var i=0; i<a.length; i++) {\n arr[a[i]]++;\n }\n \n var max=0;\n for(var i=2; i<100; i++) {\n if(arr[i]+arr[i-1]>max){\n max = arr[i]+arr[i-1];\n }\n }\n return max;\n\n\n}", "title": "" }, { "docid": "76de72687a6231e5f79950cc54d6384d", "score": "0.5822861", "text": "function findIndicesOfMax(inp, count) {\n var outp = [];\n for (var i = 0; i < inp.length; i++) {\n outp.push(i); // add index to output array\n if (outp.length > count) {\n outp.sort(function(a, b) {\n return inp[b] - inp[a];\n }); // descending sort the output array\n outp.pop(); // remove the last index (index of smallest element in output array)\n }\n }\n return outp;\n}", "title": "" }, { "docid": "76de72687a6231e5f79950cc54d6384d", "score": "0.5822861", "text": "function findIndicesOfMax(inp, count) {\n var outp = [];\n for (var i = 0; i < inp.length; i++) {\n outp.push(i); // add index to output array\n if (outp.length > count) {\n outp.sort(function(a, b) {\n return inp[b] - inp[a];\n }); // descending sort the output array\n outp.pop(); // remove the last index (index of smallest element in output array)\n }\n }\n return outp;\n}", "title": "" }, { "docid": "ac404c2553fff8cf184eb17938861d8d", "score": "0.58202994", "text": "get countMax() {\n\t\treturn this.__countMax;\n\t}", "title": "" }, { "docid": "a21d0087c977fffe87c31b0941507916", "score": "0.58144915", "text": "findIndicesOfMax(inp, count) {\n var outp = [];\n for (var i = 0; i < inp.length; i++) {\n outp.push(i); // add index to output array\n if (outp.length > count) {\n outp.sort(function (a, b) {\n return inp[b] - inp[a];\n }); // descending sort the output array\n outp.pop(); // remove the last index (index of smallest element in output array)\n }\n }\n return outp;\n }", "title": "" }, { "docid": "3b1a43d004642d64abda0dd7048978c3", "score": "0.58135307", "text": "function mostFrequently(arr) {\n var counter = 0;\n var max = 1;\n var element;\n for(var i=0; i<arr.length; i++) {\n for(var j=i; j<arr.length; j++) {\n if(arr[i] === arr[j]) {\n counter++\n }\n if(counter>=max) {\n max = counter;\n element = arr[i];\n }\n }\n counter = 0;\n }\n return element;\n}", "title": "" }, { "docid": "5cf6ce7bba96d6eb2d22ffba2c1f78fa", "score": "0.5808877", "text": "function solution(A) {\r\n // write your code in JavaScript (Node.js 8.9.4)\r\n\tlet peaks = [];\r\n\tfor (let i = 1; i < A.length - 1; i++) {\r\n\t\tif (A[i] > A[i - 1] && A[i] > A[i + 1]) {\r\n\t\t\tpeaks.push(i);\r\n\t\t}\r\n\t}\r\n\t\r\n\tif (peaks.length <= 2) {\r\n\t\treturn peaks.length;\r\n\t}\r\n\t\r\n\tconst size = peaks.length;\r\n\tconst maxNum = parseInt(Math.sqrt(peaks[size - 1] - peaks[0]) + 1);\r\n\t\r\n\tfor (let i = maxNum; i >= 2; i--) {\r\n\t\tlet count = 1;\r\n\t\tlet curIdx = peaks[0];\r\n\t\tfor (let j = 1; j < size; j++) {\r\n\t\t\tif (curIdx + i <= peaks[j]) {\r\n\t\t\t\tcount++;\r\n\t\t\t\tcurIdx = peaks[j];\r\n\t\t\t}\r\n\t\t}\t\t\t\r\n\t\tif (count >= i) {\r\n\t\t\treturn i;\r\n\t\t}\t\t\r\n\t}\r\n\t\r\n\treturn 2;\r\n}", "title": "" }, { "docid": "5dae76f298257747236046ea4557e12f", "score": "0.58060974", "text": "function lowCount(){\n if(validateCount(getCurrentCount(), \"low\")){\n var count = getCurrentCount() - 1\n counterTag.innerHTML = count\n }\n}", "title": "" }, { "docid": "b83427165e5551e55b8105a3360695c7", "score": "0.5801256", "text": "function main() {\n var n = parseInt(readLine())\n let a = readLine().split(' ')\n a = a.map(Number)\n let max = 0\n\n for (let i in a) {\n let x = [...a].filter(item => item === a[i]).length\n let y = [...a].filter(item => item === a[i] - 1).length\n x = x + y\n if (x > max) max = x\n }\n\n console.log(max)\n}", "title": "" }, { "docid": "e50748b0fe09857a1310ccc12a76951e", "score": "0.5793016", "text": "function GetMaxSinlgeLoopFurthet(a) {\n var index = a[0];\n var max = a[0];\n\n for(i = 1; i < a.length;i++) {\n\n index = a[i] > index + a[i] ? a[i] : index + a[i]; \n max = index > max ? index : max;\n }\n return max;\n}", "title": "" }, { "docid": "0ceb713d7ff7790500775a3cc5e3a6cd", "score": "0.5787328", "text": "function findIndicesOfMax(inp, count) {\n let outp = [];\n for (let i = 0; i < inp.length; i++) {\n outp.push(i); // add index to output array\n if (outp.length > count) {\n outp.sort(function (a, b) {\n return inp[b] - inp[a];\n }); // descending sort the output array\n outp.pop(); // remove the last index (index of smallest element in output array)\n }\n }\n return outp;\n}", "title": "" }, { "docid": "89da8c14e7869c036dd4f38ef647eb25", "score": "0.5783389", "text": "function solution(A) {\n\tvar maxValue = findMax(A);\n\t//var seiveResult = seive(maxValue);\n\t//console.log(seiveResult);\n\tvar result = [];\n\tfor (var i = 0; i < A.length; i++) {\n\t\tvar currentValue = A[i];\n\t\tvar count = 0;\n\t\tfor(var j = 0; j < A.length; j++) {\n\t\t\tif(currentValue % A[j] !== 0) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\t//count--;\n\t\tresult.push(count);\n\n\t}\n\treturn result;\n}", "title": "" }, { "docid": "80c689f784cb25e32d0c795cb6eb4926", "score": "0.5780399", "text": "numGreater(lowerBound) {\n\t\tconst allVals = this.getAllVals();\n\t\treturn allVals.reduce((a,b) => {\n\t\t\tif(b > lowerBound) a++;\n\t\t\treturn a;\n\t\t}, 0)\n }", "title": "" }, { "docid": "d4bfd9b35211ea3cc833bd573c1748f8", "score": "0.57800615", "text": "function max (metric, count) {\n if ((typeof metric === 'string') && (typeof count === 'number')) {\n const oldCount = map.get(metric)\n const newCount = (oldCount == null) ? count : (oldCount < count) ? count : oldCount\n map.set(metric, newCount)\n return newCount\n } else {\n return 0\n }\n }", "title": "" }, { "docid": "ab4bab5c0686866a7029f6f51023d10a", "score": "0.57723105", "text": "function LongestIncreasingSequence(arr) {\n // you have to get the max length at each point in the array, at the first item the length will be 1, also any item will have a min length of 1\n let lens = [];\n\n for (let i = 0; i < arr.length; i++) {\n lens[i] = 1; //set length to 1 which is the min length possible\n\n for (let j = 0; j < i; j++) {\n if (arr[j] < arr[i] && lens[j] + 1 > lens[i]) {\n // if number is greater than the number at i, you can set the length to the length at i , + 1.\n lens[i] = lens[j] + 1;\n }\n }\n }\n return Math.max(...lens);\n}", "title": "" }, { "docid": "866f800fcc0cc2b9a3da6de15d79a787", "score": "0.5749071", "text": "function solution_1 (nums) {\n const history = { 0: -1 };\n let delta = 0;\n let max = 0;\n for (let i = 0; i < nums.length; ++i) {\n delta += nums[i] ? 1 : -1;\n if (delta in history) max = Math.max(max, i - history[delta]);\n else history[delta] = i;\n }\n return max;\n}", "title": "" }, { "docid": "9069020578235f7d1d21f934b820e601", "score": "0.57332414", "text": "function getMajorityElement_moore(arr) {\n var candidate_index = 0;\n var vote = 0;\n for (let i=0; i<arr.length; i++) {\n let item = arr[i];\n\n if (item == arr[candidate_index]) {\n vote += 1;\n } else {\n vote -= 1;\n }\n\n if (vote == 0) {\n candidate_index = i;\n vote = 1;\n }\n }\n\n var candidate_value = arr[candidate_index];\n var count = 0;\n for (let i=0; i<arr.length; i++) {\n let item = arr[i];\n\n if (item == candidate_value) {\n count += 1;\n }\n }\n\n if (count > arr.length / 2) {\n return candidate_value;\n } else {\n return 0;\n }\n}", "title": "" }, { "docid": "4c3896218ad6520b153c59f8f9ce71cd", "score": "0.57303625", "text": "function useIncreseCount(Max){\n // siempre obtenemos el useState que deseamos para despues retornarla\n const [count, setCount] = React.useState(0)\n\n if(count >= Max){\n setCount(0)\n } \n\n return [count, setCount]\n}", "title": "" }, { "docid": "a0872f1e5239c1620144af0986d1c92a", "score": "0.5727145", "text": "function findOuts(arr) {\n let count = 0;\n for(let i = 0; i < arr.length; i++) {\n if(arr[i] > arr[i + 1]) {\n count++;\n arr[i] = arr[i + 1];\n } else if(arr[i] < arr[i - 1]) {\n count++;\n arr[i] = arr[i - 1];\n }\n }\n\n return count;\n}", "title": "" }, { "docid": "ec6bfa731c5f980e87aba9a904736549", "score": "0.57254887", "text": "function equalizeArray(arr) {\n let max = 0;\n let found = new Array(101).fill(0);\n\n for (let i = 0; i < arr.length; i++) {\n found[arr[i]]++;\n if (found[arr[i]] > max) max = found[arr[i]];\n }\n return arr.length - max;\n}", "title": "" }, { "docid": "7280e7803c25960db3f625a108837d74", "score": "0.57196677", "text": "function largestNum(arr) {\n let max=0;\n arr.forEach(num => max = Math.max(max, num))\n let maxAppear = arr.filter(element => element == max).length;\n if(maxAppear > 1){\n return {[max]: maxAppear}\n }\n return max;\n}", "title": "" }, { "docid": "4dc33c2880c19653d17066b58eb44e2c", "score": "0.569904", "text": "function sorted_slice_count(arr) {\n let result = [];\n let len = arr.length;\n let max = [arr[0]]\n let min = arr[len - 1]\n for (let i = 1; i < len; i++) {\n max[i] = Math.max(max[i - 1], arr[i])\n }\n for (let i = len - 2; i > 0; i--) {\n if (max[i] > min) {\n result.push(i)\n }\n min = Math.min(min, arr[i])\n }\n console.log(result)\n debugger;\n return result.length + 1;\n}", "title": "" }, { "docid": "85f77d984bf27c8731960fe031f78dbe", "score": "0.56959015", "text": "function getLargestElement(arr) {\n // your code here\n return arr.reduce(function(acc, element) {\n if (acc === 0 || element < acc) {\n acc = element;\n }\n return acc;\n }, 0);\n}", "title": "" }, { "docid": "2d5aeeb9168609bfabd0b0651baa0767", "score": "0.56933016", "text": "function max(object) {\n const values = Object.values(object);\n //Loop through to get each value in the object\n let currentMax = [0];\n values.forEach(function (n) {\n //If the value is larger than currentMax\n if (n > currentMax) {\n //Update currentMin to be this value\n currentMax = n;\n }\n \n });\n//When the loop is completed return the counter.\nreturn currentMax; // thinking maybe Math.max may have been more elegant!\n}", "title": "" }, { "docid": "0ef98a5d3d7f17f091a68055ca5b54df", "score": "0.5687523", "text": "function birthdayCakeCandles(n, ar) {\n // Complete this function\n let max = -1 / 0;\n let count = 0;\n ar.forEach(el => {\n if (el === max) {\n count++;\n } else if (el > max) {\n max = el;\n count = 1;\n }\n });\n return count;\n}", "title": "" }, { "docid": "e27c37bc658b627a35467197425b03c8", "score": "0.5669081", "text": "function solve(args){\nconst n=+args[0];\nconst arr=args.map(Number);\narr.shift();\nlet count=1;\nlet maxCount=0;\nfor(let i=0;i<n;i+=1){\n if(arr[i]===arr[i+1]){\n count++;\n }\n else{\n if(maxCount<count){\n maxCount=count;\n\n }\n count=1;\n }\n}\nconsole.log(maxCount);\n}", "title": "" }, { "docid": "9473a7f875824adc93e067610295f668", "score": "0.5667965", "text": "extractMax() {\r\n //remove first element and replace with last element\r\n const max = this.values[0];\r\n const end = this.values.pop();\r\n if (this.values.length > 0) {\r\n this.values[0] = end;\r\n this.bubbleDown();\r\n }\r\n return max;\r\n }", "title": "" }, { "docid": "ced3b18e2c85451298eb3fdc26de8eb1", "score": "0.56664467", "text": "getMax() {\r\n let store = null;\r\n let currentNode = this.head;\r\n while (currentNode) {\r\n if (currentNode.value > store) store = currentNode.value;\r\n currentNode = currentNode.next;\r\n }\r\n return store;\r\n }", "title": "" }, { "docid": "a2db72d91aa04c747ac047018c17948c", "score": "0.5662443", "text": "function reduceCount() {\n return reduce(crossfilter_reduceIncrement, crossfilter_reduceDecrement, crossfilter_zero);\n }", "title": "" }, { "docid": "48350c53541c5b904b197a3d376359db", "score": "0.5661604", "text": "function byCountFirst(a, b) {\n //Counts are in reverse order - bigger is better\n const countDiff = counts[b] - counts[a];\n if (countDiff) return countDiff; // If counts don't match return\n return b > a ? -1 : b === a ? 0 : 1;\n }", "title": "" }, { "docid": "90967a40d460d426171d1791790505b7", "score": "0.5661067", "text": "function byCountFirst(a, b) {\n const countDiff = counts[b] - counts[a]\n if (countDiff) return countDiff\n return b > a ? -1 : b === a ? 0 : 1\n }", "title": "" }, { "docid": "58deaa7f7c7e3a138912488cab63b65c", "score": "0.5660908", "text": "function numMax(items) {\r\n let numberArray = items.reduce(\r\n (accumulator, currentValue) => {\r\n return (accumulator < currentValue ? accumulator : currentValue);\r\n }\r\n );\r\n\r\n return numberArray;\r\n}", "title": "" }, { "docid": "469f11e71e10ca5c11351eec0e1bb2a9", "score": "0.5654119", "text": "function pickingNumbers(a) {\n let result = 0;\n let maxTemp = 1;\n let separator = 0;\n\n for (let i = 0; i < a.length - 2; i++) {\n for (let j = i+1; j < a.length - 1; j++) {\n if (Math.abs(a[i] - a[j]) <= 1 && Math.abs(a[j] - a[j+1]) <= 1) {\n maxTemp++; \n }\n else {\n separator++;\n }\n console.log(`${separator} ---> maxTemp: ${maxTemp}` );\n if (separator > 0) {\n if(maxTemp > result) {\n result = maxTemp;\n }\n maxTemp = 1;\n separator = 0;\n } \n } \n }\n\n console.log(result);\n return result\n}", "title": "" }, { "docid": "beab2d97673a411dc7db43cc61da03f6", "score": "0.56528586", "text": "function longestFall(arr) {\n let max = 0;\n let current = 1;\n // for empty array for each will not execute code inside???\n arr.forEach((number, idx, arr) => {\n if (number > arr[idx + 1]) {\n current++;\n //max = Math.max(current, max);\n } else {\n current > max ? ((max = current), (current = 0)) : max;\n }\n // another way to write the above logic\n // number > arr[idx + 1] ? current++ : current > max ? (max = current) : max;\n });\n return max;\n}", "title": "" }, { "docid": "b4b91f0ae3e490ac780a16d69abe513b", "score": "0.5652205", "text": "function checkMaximumFrequency(num, value) {\n\t\tvar tempNumber = num;\n\t\tvar tempValue = value;\n\t\tif (valuesMax.max1value <= tempValue) {\n\t\t\tvaluesMax.max2value = valuesMax.max1value;\n\t\t\tvaluesMax.max1value = tempValue;\n\t\t\tvaluesMax.max2 = valuesMax.max1;\n\t\t\tvaluesMax.max1 = tempNumber;\n\t\t}\n\t\telse if (valuesMax.max2value <= tempValue) {\n\t\t\tvaluesMax.max2value = tempValue;\n\t\t\tvaluesMax.max2=tempNumber;\n\t\t}\n\n\t}", "title": "" }, { "docid": "137ec33a2db99ceeafe041c7e31e0112", "score": "0.56466734", "text": "function countMax(array) {\n const maxNum = Math.max.apply(null, array);\n let maxNumArray = [];\n\n for (let num of array) {\n if (num === maxNum) {\n maxNumArray.push(num);\n }\n }\n return maxNumArray.length;\n}", "title": "" }, { "docid": "ea61cf444a8a1c38718a060a17ce7fe2", "score": "0.56312233", "text": "function reduceCount() {\n return reduce(crossfilter_reduceIncrement, crossfilter_reduceDecrement, crossfilter_zero);\n }", "title": "" }, { "docid": "8ada72f6d6d4ff45a871210ddd2bab3f", "score": "0.56239897", "text": "function solution(numbers) {\n numbers = numbers.sort((a, b) => a - b)\n let count = 0;\n while(!numbers.every((num) => num === numbers[0])){\n for(let i = numbers.length - 1; i >= 0; i--){\n if(i === 0){\n // do the shifty thing up the top\n let j = i;\n while(j < numbers.length - 1){\n if(numbers[j] > numbers[j + 1]){\n let temp = numbers[j];\n numbers[j] = numbers[j + 1];\n numbers[j + 1] = temp;\n j++;\n }else{\n break;\n }\n }\n }else{\n if(numbers[i] > numbers[i - 1]){\n numbers[i] -= numbers[i - 1];\n }\n }\n }\n }\n return numbers.reduce((acc, curr) => {\n return acc + curr\n });\n}", "title": "" }, { "docid": "c49bb31c382017834823ecbea5db89ae", "score": "0.56237185", "text": "function minimumNumberJumps(arr) {\n let numJumps = 0;\n let currentPoint = 0;\n\n while(currentPoint < arr.length) {\n let numPossibleJumps = arr[currentPoint];\n let totalReach = currentPoint + numPossibleJumps;\n\n if (currentPoint === arr.length - 1) {\n return numJumps;\n }\n\n if (totalReach >= arr.length - 1) {\n numJumps++;\n return numJumps;\n }\n\n let currentMax = 0;\n let currentMaxIndex = 0;\n let numPossibleJumpsAdjusted = numPossibleJumps - 1;\n\n for (let j = currentPoint; j <= currentPoint + numPossibleJumps; j++) {\n let newValue = arr[j] - numPossibleJumpsAdjusted;\n if (newValue >= currentMax) {\n currentMax = newValue;\n currentMaxIndex = j;\n }\n numPossibleJumpsAdjusted --;\n }\n\n currentPoint = currentMaxIndex;\n numJumps++;\n }\n\n numJumps++;\n return numJumps;\n}", "title": "" }, { "docid": "d24f34e177a8f656077a4e2d42ed2364", "score": "0.5620253", "text": "function countPositives(arr) {\n var count = 0;\n for (var x=0; x<arr.length; x++) {\n if (arr[x] > 0) {\n count++\n }\n }\n arr[arr.length - 1] = count\n return arr\n}", "title": "" }, { "docid": "f40983e69ff394768f1bf2316aae794c", "score": "0.56195086", "text": "function findIndicesOfMax(inp, count) {\n var outp = [];\n for (var i = 0; i < inp.length; i++) {\n outp.push(i); // add index to output array\n if (outp.length > count) {\n outp.sort(function(a, b) {\n return inp[b].forumresponse.length - inp[a].forumresponse.length;\n }); // descending sort the output array\n outp.pop(); // remove the last index (index of smallest element in output array)\n }\n }\n return outp;\n}", "title": "" }, { "docid": "61a366d83eaae4e080fbed37212db9ee", "score": "0.56165564", "text": "function birthdayCakeCandles(ar) {\n var tallest = Math.max(...ar);\n var count = 0;\n ar.map(n => n === tallest ? count++ : count)\n return count;\n}", "title": "" }, { "docid": "64418c71f592292f87d69d5fed265770", "score": "0.561145", "text": "function currentMaxSum(array) {\n let currentMax = 0;\n let total = 0;\n for (let i = 0; i < array.length; i++) {\n total += array[i];\n if (total > currentMax) {\n currentMax = total;\n }\n }\n return currentMax;\n}", "title": "" }, { "docid": "90e3a4beac257bba5b1ac15c773318f5", "score": "0.5599818", "text": "function breakingRecords(scores) {\n var max = scores[0];\n var min = scores[0];\n var count = [0, 0];\n scores.forEach((score) => {\n if (score > max) {\n max = score;\n count[0] += 1;\n } else if (score < min) {\n min = score;\n count[1] += 1;\n }\n });\n return count;\n}", "title": "" }, { "docid": "5957624e86e934d7de7aee3fe1e77576", "score": "0.5591138", "text": "function incrementToTop(arr) {\n\tlet a = 0;\n\tfor (let i = 0; i < arr.length; i++) {\n\t\tfor (let j = arr[i]; j < Math.max(...arr); j++) {\n\t\t\ta++;\n\t\t}\n\t}\n\treturn a;\n}", "title": "" }, { "docid": "98992f325d5500b95b78b0c676469604", "score": "0.55883527", "text": "function solution(A) {\n // write your code in JavaScript (Node.js 8.9.4)\n \n let current = 0;\n let max;\n \n for (const e of A) {\n //console.log(e);\n current = Math.max(e, current+e);\n max = (max==undefined)?current:Math.max(current, max);\n //console.log(current);\n //console.log(max);\n }\n \n return max;\n}", "title": "" }, { "docid": "fe48a67c0399f5805724c7dc5a616453", "score": "0.5586026", "text": "function findMax(previous, current){\n if(current>previous){\n currentMax = current;\n }\n return currentMax;\n }", "title": "" }, { "docid": "82582c93b0636aed0a176e405e7bfb6e", "score": "0.5585379", "text": "getMax() {\n\t\tlet result = null;\n\t\tlet current = this.head;\n\t\twhile (current) {\n\t\t\tif (current.value > result) result = current.value;\n\t\t\telse current = current.next;\n\t\t}\n\t\treturn result;\n\t}", "title": "" }, { "docid": "14c329d38742b6284b7b79ada0d4c9ed", "score": "0.55832875", "text": "numGreater(lowerBound) {\n // initialize count and empty queue \n let count = 0 \n let queue = [] \n // push root node to the queue \n queue.push(this.root) \n\n while(queue.length) {\n const current = queue.shift() \n if(current) {\n if(current.val > lowerBound) {\n count++ \n }\n for(let child of current.children) {\n queue.push(child)\n }\n }\n }\n return count \n }", "title": "" }, { "docid": "072fb8d40f85825ba4384ef502a85e5d", "score": "0.55780226", "text": "_getMaxes() {\n let maxes = {\n input: [],\n output: []\n };\n for (let i = 0; i < this.data[0].input.length; i++) {\n // input maxes\n maxes.input[i] = this.data[0].input[i];\n for (let data of this.data) {\n if (data.input[i] > maxes.input[i]) {\n maxes.input[i] = data.input[i];\n }\n }\n if (maxes.input[i] < 1) {\n maxes.input[i] = 1;\n }\n }\n for (let i = 0; i < this.data[0].output.length; i++) {\n // output maxes\n maxes.output[i] = this.data[0].output[i];\n for (let data of this.data) {\n if (data.output[i] > maxes.output[i]) {\n maxes.output[i] = data.output[i];\n }\n }\n if (maxes.output[i] < 1) {\n maxes.output[i] = 1;\n }\n }\n return maxes;\n }", "title": "" }, { "docid": "4cf0685e246c02dd5b04efb3a023ae3d", "score": "0.5565093", "text": "function computeMaxValue() {\n let time = 0;\n let value = 0;\n let velocity = options.velocity;\n let maxValue = 0;\n\n while (!(time > 0 && Math.abs(velocity) < options.epsilon)) {\n\n time += options.epsilon;\n\n let k = 0 - options.stiffness;\n let b = 0 - options.damping;\n let F_spring = k * ((value) - 1);\n let F_damper = b * (velocity);\n\n velocity += ((F_spring + F_damper) / options.mass) * options.epsilon;\n value += velocity * options.epsilon;\n\n if (maxValue < value) {\n maxValue = value;\n }\n }\n\n return maxValue;\n \n }", "title": "" }, { "docid": "ddded84e6ac990f047de1fad81f8af82", "score": "0.5562376", "text": "function maxIncreaseSequence(numbers) {\n var counter = 1,\n bestStart = 0,\n result = [],\n bestLength = 0;\n\n for (var i = 0; i < numbers.length - 1; i+=1)\n {\n if (numbers[i] < numbers[i + 1]) {\n counter+=1;\n }\n else if (counter >= bestLength) {\n bestLength = counter;\n bestStart = i - bestLength + 1;\n counter = 1;\n }\n else {\n counter = 1;\n }\n }\n\n if (counter >= bestLength) {\n bestLength = counter;\n bestStart = i - bestLength + 1;\n counter = 1;\n }\n\n for (var j = bestStart; j < bestStart + bestLength; j+=1) {\n result.push(numbers[j]);\n }\n\n return result;\n}", "title": "" }, { "docid": "1f5b75a1c6ffd13bc3daf4f8c4dd5eac", "score": "0.5562259", "text": "function findMax() {\n var max = dog.data[0].count;\n var winner = dog.data[0];\n for (var i = 0; i < dog.data.length; i++) {\n if (dog.data[i].count > max) {\n max = dog.data[i].count\n winner = dog.data[i]\n }\n }\n return winner;\n }", "title": "" }, { "docid": "2550f24544a53ed1ed753f3a8710a85e", "score": "0.55616003", "text": "function calcComp (arr) {\n var mostComp = 41;\n var friendIndex;\n for (var i=0;i<arr.length;i++) {\n if (mostComp > arr[i]) {\n mostComp = arr[i];\n friendIndex = i;\n } \n }\n return friendIndex;\n }", "title": "" }, { "docid": "9b8536954728ef23113e599b55d58fe1", "score": "0.55601513", "text": "function maxVal(arr) {\n\tif(!arr) arr = [1,2,45,235,562];\n\tvar biggest = 0;\n\t\n\tfor (var i = arr.length - 1; i >= 0; i--) {\n\t\tif(arr[i] > arr[i-1]) biggest = arr[i];\n\t}\n\treturn biggest;\n}", "title": "" }, { "docid": "d80c530a3a6c1ddc9c525c5e3ec64269", "score": "0.5559906", "text": "function testRepeat(arr){\n let max = 1;\n let position = 0;\n let value = -1;\n\n let tempNumbers = arr.reduce((acc, curr, index)=>{\n acc[curr] = acc[curr]\n ? {...acc[curr], amount:acc[curr][\"amount\"]+1}\n : {amount:1, index};\n \n let amount = acc[curr].amount;\n let place = acc[curr].index;\n \n if(amount > max || (amount === max && place <= position && amount>1))\n {\n max = amount;\n value = curr;\n position = place;\n }\n\n return acc;\n },{});\n\n return value;\n}", "title": "" }, { "docid": "5979859799e89ac339ee1cfdc7f1b326", "score": "0.5553564", "text": "function prob4(array) {\r\n const numHash = {};\r\n let max = 0;\r\n\r\n array.forEach(num => {\r\n numHash[num] ? numHash[num]++ : numHash[num] = 1;\r\n max = Math.max(max, num);\r\n })\r\n\r\n if (max <= 0) {\r\n return 1;\r\n }\r\n\r\n for (let i = 1; i <= max; i++) {\r\n if (!numHash[i]) return i;\r\n }\r\n return max + 1;\r\n}", "title": "" }, { "docid": "2b2b3fd9a4e4b56e20210779dd3a3578", "score": "0.555341", "text": "function mostFrequentItem(arr) {\n var maxCount = 0;\n var maxChr = \"\";\n var checkedChr = [];\n\n for (var i = 0; i < arr.length; i++) {\n chr = arr[i];\n chrCount = 0;\n\n if (checkedChr.findIndex(element => element === chr) === -1) {\n for (var j = i; j < arr.length; j++) {\n if (chr === arr[j]) {\n chrCount++;\n }\n }\n if (chrCount > maxCount) {\n maxCount = chrCount;\n maxChr = chr;\n }\n\n checkedChr.push(chr);\n }\n }\n return maxChr;\n //return maxChr + \" (\" + maxCount + \" times)\";\n}", "title": "" }, { "docid": "b43a501ae036baf12984262e23cccabe", "score": "0.5548168", "text": "function max_profit_brute_force(arr){ // O(n^2)\n const length = arr.length;\n let max = 0;\n\n for(let j = 0; j < length; j++){\n for(let i = j + 1; i < length; i++){\n let earn = arr[i] - arr[j];\n if(earn > max){\n max = earn;\n //console.log(`${j}, ${i}, ${max}`);\n }\n }\n }\n\n return max;\n}", "title": "" }, { "docid": "e370a2bd68992c5777f1b7ebf80d47f3", "score": "0.5546747", "text": "function mostTripped(a,b) {\n if ( a['count'] < b['count'] ) { return -1; }\n if ( a['count'] > b['count'] ) { return 1; }\n return 0;\n}", "title": "" }, { "docid": "fc4beb8690bc5c2b20b1f634c7dac9b6", "score": "0.55450124", "text": "function getPeakElements(numberOfPeaksToFind){\n \n if(parseInt(numberOfPeaksToFind) <= 0 || isNaN(parseInt(numberOfPeaksToFind)))\n throw new Error(\"Second argument has to be a positive integer\");\n\n while(peaks.length < numberOfPeaksToFind && numberOfMaxValues < elements.length - 1){\n // Find current maximum value\n for(let index = 0; index < values.length; index++){\n if(values[index].value > maxValue && !values[index].wasMax){\n maxValue = values[index].value;\n maxID = values[index].element_id;\n maxIndex = index;\n }\n };\n \n\n // If the current maximum value is below 0, break the execution since\n // the peaks have to be greater than 0, assuming this is a walking tour as mentioned\n // in the assignment description\n if(maxValue < 0)\n break;\n\n // Get maximum value element\n let foundElement = elements[maxID];\n // Get maximum element nodes\n const [node1, node2, node3] = [...foundElement.nodes];\n \n // Get all neighbours\n const allNeighbours = findAllNeighbours(node1, node2, node3,elements, maxID);\n\n // Returns undefined if there are no neighbours with a greater value than the current maximum value\n const greaterThanCurrentMax = allNeighbours.find(element =>{\n return (values[element.id].value > maxValue);\n });\n \n // Always keep a record on the last maximum value so we avoid plateau values\n if(peaks.length > 0){\n lastMaxValue = peaks[peaks.length - 1];\n }\n if(greaterThanCurrentMax === undefined && maxValue !== lastMaxValue.value){\n peaks.push({element_id: maxID, value: maxValue});\n values[maxIndex].wasMax = true;\n lastMaxValue = maxValue;\n }\n \n values[maxIndex].wasMax = true;\n maxValue = Number.NEGATIVE_INFINITY;\n maxID = 0;\n numberOfMaxValues ++;\n }\n if(peaks.length > 0) console.log(peaks);\n}", "title": "" }, { "docid": "afe10cfcbcc1896d209c22c6d890a045", "score": "0.55347097", "text": "function sumMax(previous, current){\n return previous + current;\n }", "title": "" }, { "docid": "e2acd2a3b6ad15f7f6f8db3a8b8fbc1e", "score": "0.5529912", "text": "function solution(N, A) {\n let map = {};\n const counters = [];\n let max = 0;\n let base = 0;\n\n for (let i = 0; i < A.length; i++) {\n let counter = A[i] - 1;\n if (counter >= N) {\n map = {};\n base += max;\n max = 0;\n } else {\n if (map[counter] === undefined) {\n map[counter] = 1;\n } else {\n map[counter]++;\n }\n max = Math.max(max, map[counter]);\n }\n }\n\n for (let i = 0; i < N; i++) {\n counters[i] = base + (map[i] || 0);\n }\n\n return counters;\n}", "title": "" } ]
5de2959ea8ff280d7b9f5f395e8a7c90
Track bikes on the interface
[ { "docid": "b38aff4c2c7752bc7daff2ffea5e1d29", "score": "0.55173117", "text": "function GetTrack() {\n\n // Make REST request using GET protocol to get all the bikes and their status\n $.ajax({\n type: \"GET\",\n dataType: \"json\",\n url: \"/track-bikes/\",\n data: {},\n success: function (response) {\n // Save response data\n var data = response.data;\n // Clean interval if exists - This is for the animations\n clearInterval(moveInterval);\n\n // Clean the markers positions\n for (let j = 0; j < markersList.length; j++) {\n markersList[j].setMap(null);\n }\n markersList = []\n\n // Clean the marker locations\n for (let k = 0; k < markerBallonList.length; k++) {\n markerBallonList[k].setMap(null);\n }\n markerBallonList = []\n\n // Clean the makers bikes\n for (let l = 0; l < markerBikeList.length; l++) {\n markerBikeList[l].setMap(null);\n }\n markerBikeList = []\n\n // Clean the clusters\n if (markerCluster) {\n markerCluster.clearMarkers();\n }\n\n // Get the bikes that are currently moving and remove them from the map\n for (let p = 0; p < markerBikeListMoving.length; p++) {\n markerBikeListMoving[p].setMap(null);\n }\n markerBikeListMoving = []\n markerBikeListMovingNames = []\n\n // Set new center of the map\n var center = new google.maps.LatLng(55.860789, -4.250311);\n\n // Animation of transcition in the map\n window.setTimeout(() => {\n map.panTo(center);\n map.setZoom(12);\n map.setCenter(center);\n }, 30);\n\n // Image marker using a bike icon\n const image = {\n url: imgs + '/bike.png',\n origin: new google.maps.Point(0, 0),\n scaledSize: new google.maps.Size(60, 60),\n };\n\n // These are constant to show bike icon on maps\n var pi = Math.PI\n var degrees = 180;\n var radious = 0.001; //0.0001 - \n var randomess_l1 = 100\n var randomess_l2 = 200\n var listBikesOps = []\n\n // Iterate over the bikes returned by API\n for (let m = 0; m < data.length; m++) {\n // Get current data\n let currentB = data[m]\n let bikeLocation = currentB.location\n\n // Get the latitude of the bike's location\n var longitudeData = bikeLocation.longitude;\n var latitudeData = bikeLocation.latitude;\n\n // The way to display the bike markers on the map was based on the following\n // Mahdi. How to place markers on the outline of a circle in google maps?. \n // On: https://gis.stackexchange.com/questions/37615/how-to-place-markers-on-the-outline-of-a-circle-in-google-maps\n // Accesed on: Feb, 11 2021\n var randomness_degrees = Math.floor(Math.random() * (randomess_l2 - randomess_l1) + randomess_l1);\n var longitudeBike = Math.cos(randomness_degrees * pi / 180) * radious + longitudeData;\n var latitudeBike = Math.sin(randomness_degrees * pi / 180) * radious + latitudeData;\n\n // Create a latitude and longitude object to place the bike\n var myLatLong = new google.maps.LatLng(latitudeBike, longitudeBike);\n\n // Set the new bike marker\n const marker = new google.maps.Marker({\n position: myLatLong,\n title: \"bike_: \" + (currentB.bike_id),\n icon: image,\n label: {\n text: \"No. \" + currentB.bike_id,\n color: \"#ffffff\",\n fontSize: \"20px\",\n fontWeight: \"bold\"\n },\n })\n\n // First get the current rented bikes\n if (currentB.is_available == 0 && currentB.is_defective == 0) {\n const markerMov = new google.maps.Marker({\n position: myLatLong,\n map: map,\n title: \"bike_: \" + (currentB.bike_id),\n icon: image,\n label: {\n text: \"No. \" + currentB.bike_id,\n color: \"#ffffff\",\n fontSize: \"20px\",\n fontWeight: \"bold\"\n },\n })\n // Add marker to the corresponding lists\n markerBikeListMoving.push(markerMov)\n markerBikeListMovingNames.push(currentB)\n }\n // Second get the available bikes to be clustered\n else if (currentB.is_available == 1) {\n //console.log(randomness_degrees)\n ///console.log(bikeLocation.postcode)\n markerBikeList.push(marker)\n }\n // Finally get the list of bike with some extra property (repairing or moving)\n else {\n listBikesOps.push(currentB)\n }\n }\n\n // Create cluster of markers\n markerCluster = new MarkerClusterer(map, markerBikeList, {\n maxZoom: 15,\n imagePath:\n \"https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m\",\n });\n\n // generate text to tell status of bikes under operations (repairs and movements)\n let innerTextOps = \"\"\n for (var u = 0; u < listBikesOps.length; u++) {\n // Get the data\n var cBk = listBikesOps[u]\n\n // If bike is moving\n if (cBk.is_available == 2) { // move\n innerTextOps += \"<p><b>Bike No. \" + cBk.bike_id + \":</b> It's being moved</p>\"\n }\n // If bike is being repaired\n else if (cBk.is_available == 3) { // repairing\n innerTextOps += \"<p><b>Bike No. \" + cBk.bike_id + \":</b> It's under repairment</p>\"\n }\n // error case \n else {\n innerTextOps += \"<p><b>Bike No. \" + cBk.bike_id + \":</b> No idea. Contact admin</p>\"\n }\n }\n // If there is no bike under any extra activity\n if (listBikesOps.length == 0) {\n innerTextOps = \"<b> There is no bike under any activity by operators</b>\"\n }\n\n // List the bikes that are currently rented\n innerTextOps += \"<b>Bikes currently rented: </b>\"\n for (var m = 0; m < markerBikeListMovingNames.length; m++) {\n var cUBk = markerBikeListMovingNames[m]\n innerTextOps += \"<p>Bike No. \" + cUBk.bike_id + \"</p>\"\n }\n\n // Add string html to DOM\n $(\"#TrackCollapseBody\").html(innerTextOps);\n\n // Add animation of bikes rented on the map\n // This is simulated with the routes in the script routes.js\n let counterInterval = 0\n moveInterval = setInterval(function () {\n for (var u = 0; u < markerBikeListMoving.length; u++) {\n var currRoute = routes_map['route' + ((u % 5) + 1)]\n if (counterInterval < currRoute.length) {\n var currCorr = currRoute[counterInterval]\n markerBikeListMoving[u].setPosition(new google.maps.LatLng(currCorr.lat, currCorr.lng));\n }\n }\n counterInterval++\n }, 500);\n }\n });\n}", "title": "" } ]
[ { "docid": "a5405697e62bcbd975b2c93d9c244be3", "score": "0.56056124", "text": "function processBikes(data_) {\n\n //console.log(\"Bike data \\n\");\n data_.forEach(function (d) {\n d.lat = +d.position.lat;\n d.lng = +d.position.lng;\n //add a property to act as key for filtering\n d.type = \"Dublin Bike Station\";\n });\n// console.log(\"Bike Station: \\n\" + JSON.stringify(data_[0].name));\n// console.log(\"# of bike stations is \" + data_.length + \"\\n\"); // +\n updateMapBikes(data_);\n}", "title": "" }, { "docid": "63d063da1ddc95e63827d681147239a5", "score": "0.53549856", "text": "function MIWatch() {\n\tthis.checkpoints = [{msg: \"start point\", t: new Date()}];\n}", "title": "" }, { "docid": "351da76b328feed4c253f4285aaff809", "score": "0.532987", "text": "function onForcedBalls() {\n VLT = machine.GetIp().split('.')[3];\n print(VLT + \" - balls forced\")\n}", "title": "" }, { "docid": "2ce54203808322c4cf45d39c84a6f920", "score": "0.52548605", "text": "async analyze() {\n this.candlesticks = (await this.elasticSearch.getData()).hits.hits;\n this.candlesticks.forEach((candlestick) => {\n if (this.isAwakening(candlestick._source.closePrice)) {\n console.log('AWAKENING');\n console.log(`BUYING AT ${candlestick._source.closePrice}`);\n }\n console.log('--- ');\n this._recordCandlestick(candlestick);\n this.printUpdate();\n });\n }", "title": "" }, { "docid": "fdc7b99a8611bff2be31a6d18ce21950", "score": "0.52486044", "text": "check_trackers(e) {\r\n if (this.options.loose_mouse){\r\n e.loose_mouse = true;\r\n }\r\n //console.log(\"why aren't you slamming the brake? \", this.last_history, this.history.length);\r\n\r\n // record positions of all tracker in the trackers...\r\n // remember to change the rect when resizing TODO\r\n let rgb = this.plate.check_trackers(e, this.rect);\r\n if(this.last_history != -1){\r\n ///console.log(\"stopping this historical nonsense\");\r\n this.history[this.last_history].select = false;\r\n this.history[this.last_history].style.border = \"0px\";\r\n this.last_history = -1;\r\n }\r\n this.clicked_on_tracker = true; // clicked on tracker, then you need to save history. simple as that/\r\n this.control(rgb);\r\n }", "title": "" }, { "docid": "a1136b7bd85e3b59a130d1c62a0370b4", "score": "0.51780576", "text": "function onFootStrike() {\n if(applicationStarted){\n stepTracker();\n }\n}", "title": "" }, { "docid": "f8d04de48689ab41759f0d478b851166", "score": "0.5141684", "text": "function TapWatcher(watchwhat, threshold) {\n EventEmitter.call(this)\n const that = this\n if (mpu) {\n //do the accelerometer thing\n console.log(\"monitoring the accelerometer\");\n var lastVal=0\n setInterval(function () {\n //test for high g reading\n var a = getAccel();\n if ((a-lastVal)> threshold) {\n that.emit('tap',a);\n }\n lastVal=a;\n }, 20)\n } else {\n console.log(\"Unable to access accelerometer\");\n }\n if (button) {\n console.log(\"monitoring the switch\");\n button.on('rise', function () {\n console.log(\"button handler\"); \n that.emit('tap')\n });\n } else {\n console.log(\"Unable to access switch\");\n }\n}", "title": "" }, { "docid": "1f42fa2c0cd12c806f28db8202cec262", "score": "0.51249313", "text": "function C101_KinbakuClub_RopeGroup_CassiLike() {\n\tC101_KinbakuClub_RopeGroup_CassiLikes++;\n\tif (C101_KinbakuClub_RopeGroup_CassiLikes > C101_KinbakuClub_RopeGroup_CassiLikeTreshold) {\n\t\tActorChangeAttitude( 1, 0);\n\t\tC101_KinbakuClub_RopeGroup_CassiLikes = 0;\n\t\tC101_KinbakuClub_RopeGroup_CassiLikeTreshold++;\n\t}\n}", "title": "" }, { "docid": "2fb77dfd6af3b879006600004df967d1", "score": "0.5090413", "text": "function GetGumball() {\n let obtainedGumball = myFavoriteGumballMachine.GetGumball();\n UpdateUI(obtainedGumball);\n}", "title": "" }, { "docid": "7c10ef0cb47aa01b54908f4250048a74", "score": "0.50837255", "text": "function tell(){\n stickyLoadBalancer.tellBalancer(balancer, own);\n}", "title": "" }, { "docid": "d97f70c297247084b9a0cbc092a64e2f", "score": "0.503586", "text": "hitBall(event, countBall = true) {\n // Update faced ball only if specified\n if (countBall) {\n this.bat.balls += 1;\n }\n\n if (event == \"W\") {\n // Wicket\n this.bat.out = true;\n } else {\n // Score runs\n this.bat.runs += event;\n\n if (event == 4) {\n // Boundary count\n this.bat.fours += 1;\n } else if (event == 6) {\n this.bat.sixes += 1;\n }\n }\n\n // Update batter stats in DOM\n const row = document.querySelector(`#${this.name}-bat`).children;\n row[1].innerText = this.bat.runs;\n row[2].innerText = this.bat.balls;\n row[3].innerText = `${this.bat.fours}/${this.bat.sixes}`;\n }", "title": "" }, { "docid": "7ecc8e9585b2ce4ceb51c8b1954bdb26", "score": "0.50245583", "text": "function vbKnob() {\n $('.vb-knob').knob({\n 'change': function(v) {\n console.log(v);\n },\n draw: function() {\n $(this.i).val(this.cv + '%');\n }\n });\n}", "title": "" }, { "docid": "29eed266b893904c6ab23326e5f05279", "score": "0.5013114", "text": "function bufferMyLikes(){\r\n\t\tvar temp = new Array();\r\n\t\tfor(var i = 0; i< that.myLikes.length; i++){\r\n\t\t\tif(that.myLikes[i].refs === undefined){\r\n\t\t\t\tthat.myLikes[i].refs = null;\r\n\t\t\t\t//R.request('getVideoRefs',{FromFbId:that.myLikes[i].FbId,Type:\"findWhoILike\"});\r\n\t\t\t\ttemp.push(that.myLikes[i].FbId);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(temp.length > 0)\r\n\t\t\tR.request('getVideoRefs',{FromFbId:temp,Type:\"findWhoILike\"})\r\n\t}", "title": "" }, { "docid": "7e3703b45185e067a94537c93e6a65c8", "score": "0.5011974", "text": "updateHomekitState() {\n const lightbulbService = this.accessory.getService(Service.Lightbulb);\n if (lightbulbService.getCharacteristic(Characteristic.On) && (lightbulbService.getCharacteristic(Characteristic.On).value !== this.currentState.state)) {\n this.platform.debugLog('Backchannel update for ' + this.accessory.displayName + ': On is updated from ' + lightbulbService.getCharacteristic(Characteristic.On).value + ' to ' + this.currentState.state);\n lightbulbService.getCharacteristic(Characteristic.On)\n .updateValue(this.currentState.state);\n }\n if (lightbulbService.getCharacteristic(Characteristic.Brightness) && (lightbulbService.getCharacteristic(Characteristic.Brightness).value !== this.currentState.level)) {\n this.platform.debugLog('Backchannel update for ' + this.accessory.displayName + ': Brightness is updated from ' + lightbulbService.getCharacteristic(Characteristic.Brightness).value + ' to ' + this.currentState.level);\n lightbulbService.getCharacteristic(Characteristic.Brightness)\n .updateValue(this.currentState.level);\n }\n if (lightbulbService.getCharacteristic(Characteristic.Hue) && (lightbulbService.getCharacteristic(Characteristic.Hue).value !== this.currentState.hue)) {\n this.platform.debugLog('Backchannel update for ' + this.accessory.displayName + ': Hue is updated from ' + lightbulbService.getCharacteristic(Characteristic.Hue).value + ' to ' + this.currentState.hue);\n lightbulbService.getCharacteristic(Characteristic.Hue)\n .updateValue(this.currentState.hue);\n }\n if (lightbulbService.getCharacteristic(Characteristic.Saturation) && (lightbulbService.getCharacteristic(Characteristic.Saturation).value !== this.currentState.saturation)) {\n this.platform.debugLog('Backchannel update for ' + this.accessory.displayName + ': Saturation is updated from ' + lightbulbService.getCharacteristic(Characteristic.Saturation).value + ' to ' + this.currentState.saturation);\n lightbulbService.getCharacteristic(Characteristic.Saturation)\n .updateValue(this.currentState.saturation);\n }\n if (this.platform.rgbcctMode && (lightbulbService.getCharacteristic(Characteristic.ColorTemperature)) && (lightbulbService.getCharacteristic(Characteristic.ColorTemperature).value !== this.currentState.color_temp)) {\n this.platform.debugLog('Backchannel update for ' + this.accessory.displayName + ': ColorTemperature is updated from ' + lightbulbService.getCharacteristic(Characteristic.ColorTemperature).value + ' to ' + this.currentState.color_temp);\n lightbulbService.getCharacteristic(Characteristic.ColorTemperature)\n .updateValue(this.currentState.color_temp);\n }\n }", "title": "" }, { "docid": "19c0b49099c163b9319bc709a81cf28b", "score": "0.5003051", "text": "function Bike(name, tirePressure) {\n this.name = name;\n this.tirePressure = tirePressure;\n this.inflateTyre = function() { // method\n this.tirePressure += 3; //context here wil be an object\n };\n }", "title": "" }, { "docid": "69c3dcb2a7f8249a7a2482caadd508f0", "score": "0.50017446", "text": "function setBlockTracking(value) {\n shouldTrack += value;\n}", "title": "" }, { "docid": "69c3dcb2a7f8249a7a2482caadd508f0", "score": "0.50017446", "text": "function setBlockTracking(value) {\n shouldTrack += value;\n}", "title": "" }, { "docid": "9071d21555d157502be6adee95800066", "score": "0.4998819", "text": "displayBuses(limit = 5) {\r\n console.log(`Buses arriving to stop ${this.stopName}`);\r\n for (let i = 0; i<min(this.buses.length,limit); i++) {\r\n this.buses[i].logBusInfo();\r\n }\r\n }", "title": "" }, { "docid": "1ca2c951b848d76d701f23dc7d1be10d", "score": "0.49836305", "text": "addBall(ball, isOnStrike) {\n this.ballsFaced += 1;\n this.isOut = ball.isOut;\n this.onStike = isOnStrike;\n if (!ball.isOut) {\n this.runsScored += ball.runScored;\n }\n this.ballsFacedHistory.push(ball);\n }", "title": "" }, { "docid": "6e0d582be72d7553c63e7ebf918c2364", "score": "0.49668923", "text": "Track_heartrate(){\n setInterval(() => {this.beat()},1000);\n }", "title": "" }, { "docid": "070936afdc3260480921177727bb4f37", "score": "0.49662286", "text": "function onExtraBallChance() {\n VLT = machine.GetIp().split('.')[3];\n print(VLT + \" - extra ball chance\");\n setInterval('playExtra_' + machine.GetSessionIdx(), 1000, 'playExtra(' + machine.GetSessionIdx() + ');');\n\n}", "title": "" }, { "docid": "35e2fa539569446580a7214151776646", "score": "0.49629202", "text": "seeHuntPressed() {\n console.log('seeHunt pressed');\n this._toHuntDetails()\n }", "title": "" }, { "docid": "5d4936a0351e7591050a1e411a1b4abc", "score": "0.49508098", "text": "function sayCheese() {\n\t\t$(\"#snapping\").show();\n\t\tnum = -1;\n\t\ttimeRef = new Date();\n\t\tsnapInt = setInterval(snapping, 100);\n\t}", "title": "" }, { "docid": "65d8aced0d188b5525df0fe6f12ecfee", "score": "0.49474177", "text": "function changeBaddyImage()\n{\n\tcurrentBaddyImage++;\n\t\n\tif(currentBaddyImage == 2)\n\t\tcurrentBaddyImage = 0;\n\t\n\tif(baddyStatus != BADDY_OFF)\n\t\tsetTimeout(changeBaddyImage, 100);\n\t\n}", "title": "" }, { "docid": "5e9c8de194e870ae448a07eb05ce2915", "score": "0.49468556", "text": "function onPigBoomWon(prize) {\n VLT = machine.GetIp().split('.')[3];\n print(VLT + \" - PigBoom winnings: \" + prize);\n machine.DoInput('space', 1);\n}", "title": "" }, { "docid": "27c52c3175f31cb3658e958627af8c4e", "score": "0.4940695", "text": "function gotBart(bart){\n stationName = bart.root.station[0].name; // pull full station name for reference in draw()\n offset = (width - centerBar.width)/2; // dist between left edge and centerBar\n space = centerBar.width/(qtyPlatforms+1); // space between tracks\n\n background(20); // clear old trains\n\n // draw tracks\n for (i = 0; i < qtyPlatforms; i++){\n stroke(15);\n strokeWeight(10);\n line(space * (i+1) + offset, 0, space * (i+1) + offset, height);\n }\n\n //draw station bar\n bar();\n\n // push train objects into trains array\n for (i = 0; i < bart.root.station[0].etd.length; i++) {\n for (j = 0; j < bart.root.station[0].etd[i].estimate.length; j++){\n var train = bart.root.station[0].etd[i].estimate[j];\n\n trains.push({\n x: (space * parseInt(train.platform) + offset),\n y: (train.minutes * 13) + centerBar.height/2,\n w: pill.width,\n h: pill.height,\n round: pill.round,\n estimate: train.minutes,\n dir: train.direction,\n destination: bart.root.station[0].etd[i].destination,\n hexcolor: train.hexcolor,\n color: train.color,\n });\n }\n }\n\n // draw trains\n for (i = 0; i < trains.length; i++) {\n var train = trains[i];\n\n // mirror behavior for southbound trains\n if (train.dir === \"South\"){\n var flip = -1;\n } else {\n var flip = 1;\n }\n\n push();\n // draw train\n noStroke();\n fill(train.hexcolor);\n translate(0, height/2);\n rect(train.x, train.y * flip, train.w, train.h, train.round);\n\n // draw train text\n if (train.color === \"YELLOW\" || train.color === \"WHITE\"){\n fill(0);\n } else {\n fill(255);\n }\n\n textAlign(CENTER, CENTER);\n textSize(pill.height*0.4);\n textStyle(BOLD);\n text(train.estimate + \" min - \" + train.destination, train.x, train.y * flip);\n pop();\n }\n}", "title": "" }, { "docid": "35cadba9dfa4048a19d8aa9fdf81e4a2", "score": "0.4940532", "text": "function setFrontBrake(isOn) {\n bicycle.frontBrake = true;\n}", "title": "" }, { "docid": "1144912a0a0d9e282cf79f37d8b43e83", "score": "0.4933801", "text": "track_mark(type) { this._track_generic(type, \"mark\") }", "title": "" }, { "docid": "0dd47bec910fe8763babbf1adc5bac55", "score": "0.4928329", "text": "function changeBaddyImage()\n{\n currentBaddyImage++;\n \n if(currentBaddyImage == 2)\n currentBaddyImage = 0;\n \n if(baddyStatus != BADDY_OFF)\n setTimeout(changeBaddyImage, 100);\n \n}", "title": "" }, { "docid": "f9dbc7426afe1a8958a300c52c1bd552", "score": "0.49233398", "text": "function buzz(){\n connectFactory.buzzBuzzTrial(buzzerRound);\n $rootScope.$emit(rootScopeEvents.buzzTriggered);\n }", "title": "" }, { "docid": "e316cfd43ae0435c9016ebf499ca5fde", "score": "0.49107748", "text": "function initHittingBarVis(){\n // clear out the old visualisation if needed\n if (visjsobj != undefined){\n visjsobj.destroy();\n }\n var players = Players.find({});\n var ind = 0;\n // generate an array of items\n // from the songs collection\n // where each item describes a song plus the currently selected\n // feature\n var items = new Array();\n // iterate the songs collection, converting each song into a simple\n // object that the visualiser understands\n players.forEach(function(player){\n if (player.metadata.tags.name != undefined && \n player.metadata.tags.name[0] != undefined ){\n var label = \"ind: \"+ind;\n if (player.metadata.tags.name != undefined){// we have a title\n label = player.metadata.tags.name[0] + \" - \" + \n player.metadata.tags.team[0];\n } \n \n if ((ind+4)/4>9)\n var date = \"03-\"+(ind+4)/4+\"-16\";\n else\n var date = \"03-0\"+(ind+4)/4+\"-16\";\n var ab= player[Session.get(\"feature\")[\"type\"]][\"at-bats\"];\n var h= player[Session.get(\"feature\")[\"type\"]][\"hits\"];\n var bb= player[Session.get(\"feature\")[\"type\"]][\"walks\"];\n var k= player[Session.get(\"feature\")[\"type\"]][\"strikeouts\"];\n console.log(\"hitting stats:\"+ab+h+bb+k+date);\n // here we create the actual objects for the visualiser\n\n items[ind] = { x: date, y: ab+bb, \n label:{content:\"PA\", className:'vis-label', xOffset:-5}, \n };\n ind ++ ;\n \n items[ind] = { x: date, y: bb, \n label:{content:\"BB\", className:'vis-label', xOffset:-5}, \n };\n ind ++ ;\n\n items[ind] = { x: date, y:h +bb, \n label:{content:\"H\", className:'vis-label', xOffset:-5}, \n };\n ind ++ ;\n \n items[ind] = { x: date, y: k+h+bb, \n label:{content:\"K\", className:'vis-label', xOffset:-5}, \n };\n ind ++ ;\n }\n });\n // set up the data plotter\n var options = {\n style:'bar', \n };\n // get the div from the DOM that we are going to \n // put our graph into \n var container = document.getElementById('visjs');\n // create the graph\n visjsobj = new vis.Graph2d(container, items, options);\n // tell the graph to set up its axes so all data points are shown\n visjsobj.fit();\n}", "title": "" }, { "docid": "8bf5a22336ecc4dc161555baeb3893a2", "score": "0.49008092", "text": "bakeVideodetails() \n\t{\n\t\t// Loading Icon\n\t\tthis.prepareLoadingVideoFrame();\n\n\t}", "title": "" }, { "docid": "33092146b096266a4858090de41a8f82", "score": "0.48938578", "text": "function k() {\n\t return track[this.origin.client] - this.barTopLimit - this.bar[this.origin.offset]\n\t }", "title": "" }, { "docid": "56a7031934d9ce6f274e951c81034252", "score": "0.48926774", "text": "function setBSO(strikes, balls, outs) {\n\t\tvar changeInning = false;\n\t\tif(balls == 4) { // if there are 4 balls then the player has been walked, reset the count\n\t\t\tballs = 0;\n\t\t\tstrikes = 0;\n\t\t} else if(balls < 0) // there can be no fewer than zero balls, set to zero instead\n\t\t\tballs = 0;\n\t\tif(strikes == 3) { // if there are 3 strikes then the player is out, reset the count and add an out\n\t\t\tballs = 0;\n\t\t\tstrikes = 0;\n\t\t\touts += 1;\n\t\t} else if(strikes < 0) // there can be no fewer than zero strikes, set to zero instead\n\t\t\tstrikes = 0;\n\t\tif(outs == 3) { // if there are three outs then the inning half is over, reset the count and outs and go to the next inning\n\t\t\tballs = 0;\n\t\t\tstrikes = 0;\n\t\t\touts = 0;\n\t\t\tchangeInning = true;\n\t\t} else if(outs < 0) // there can be no fewer than zero outs, set to zero instead\n\t\t\touts = 0;\n\t\t// if the outs, strikes, or balls has changed, save the changes.\n\t\tif(scoreBoard.outs != outs || scoreBoard.strikes != strikes || scoreBoard.balls != balls) {\n\t\t\tif(changeInning) { // changing the inning will create a snapshot, so only create a snapshot here if not changing the inning\n\t\t\t\tscoreBoard.nextHalfInning();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsnapshotState();\n\t\t\t}\n\t\t\tscoreBoard.outs = outs;\n\t\t\tscoreBoard.strikes = strikes;\n\t\t\tscoreBoard.balls = balls;\n\t\t\tvar update = { balls: balls, strikes: strikes, outs: outs };\n\t\t\tsocket.emit('boardUpdate', update);\n\t\t}\n\t}", "title": "" }, { "docid": "68eb135873e16b2076d12a7293f2a90c", "score": "0.48819816", "text": "likeBark(barkId) {\n let ref = this.barkRef.child(barkId);\n ref.once('value').then(function(snapshot) {\n var newLikes = parseInt(snapshot.val().likes) + 1;\n\n // Update the number of likes on firebase\n\n });\n }", "title": "" }, { "docid": "0dc6bd0e6c55096a66f2f6962c682393", "score": "0.48779127", "text": "liked() {\n this.likes++;\n }", "title": "" }, { "docid": "31b607ede25b87d76fbb75e87291c163", "score": "0.48762935", "text": "detect() { if (this.active) this.signal('proximity'); }", "title": "" }, { "docid": "632ff7c934265764afcf518db5fc0ff2", "score": "0.4870067", "text": "voteBand( id = '' ){\n this.bands = this.bands.map( band => {\n // Buscamos en las bandas y retornamos la banda que acabamos de incrementar el voto\n if ( band.id == id) {\n band.votes++;\n return band;\n } else {\n return band;\n }\n });\n }", "title": "" }, { "docid": "347b81514dc3df92a5e47042f948315f", "score": "0.4861549", "text": "track(batchee) {\n batchee.data.batch = this;\n // we need to track the order requests are added to the batch to ensure we always\n // operate on them in order\n if (typeof batchee.data.batchIndex === \"undefined\" || batchee.data.batchIndex < 0) {\n batchee.data.batchIndex = ++this._index;\n }\n }", "title": "" }, { "docid": "7cd0bce3e71f0e8d1100e684d841f690", "score": "0.48510858", "text": "function k() {\n return track[dir.client] - barTopLimit - bar[dir.offset];\n }", "title": "" }, { "docid": "1eaa983ba9118c0479604fcda9751c11", "score": "0.48403502", "text": "function updateDevouredBurgers() {\n\n }", "title": "" }, { "docid": "69cd4640529f6dd826649d286bb434ab", "score": "0.48397633", "text": "function trailBrake() {\n\n}", "title": "" }, { "docid": "a7cbbeb40a9b926aae6a43a3e78d1977", "score": "0.48388663", "text": "updateThresh() {\n // droop\n const threshDen = this.numSeats + 1;\n // dynamic\n const threshNum = this.p * this.numBallots - this.exhausted[this.round];\n // fractional\n const threshold = Math.floor(threshNum / threshDen) + 1;\n\n this.thresh[this.round] = threshold;\n }", "title": "" }, { "docid": "c7fb6cce9dd14f8e89c4c6f70a099a89", "score": "0.48364794", "text": "bowlGutterGame() {\n this.newGame()\n this.bowlMany(0, 20);\n this.getScore();\n }", "title": "" }, { "docid": "fee24175b4771e2ea5792040d4fc3543", "score": "0.4833658", "text": "setStrike(isOnStrike) {\n this.onStike = isOnStrike;\n }", "title": "" }, { "docid": "3d495a067da325aca2b979c242956019", "score": "0.4811081", "text": "updatePoints(){\n for(var i = 0; i < this.shots.length; i++){\n var shot = this.shots[i]\n //first take care of Strikes\n if(shot.isStrike()){\n shot.points = shot.pins;\n //add next shot\n shot.points += this.shots[i + 1] ? this.shots[i + 1].pins : 0;\n //add second next shot\n shot.points += this.shots[i + 2] ? this.shots[i + 2].pins : 0;\n } else if (i < this.shots.length - 1 && Shot.sameFrame(shot, this.shots[i + 1]) && Shot.isSpare(shot, this.shots[i + 1])) {\n //Bonus points on spares are stored in the first shot of the frame\n shot.points = shot.pins;\n shot.points += this.shots[i + 2] ? this.shots[i + 2].pins : 0;\n } else {\n shot.points = shot.pins;\n }\n }\n }", "title": "" }, { "docid": "177d6c6467651d42f0f7bd3dead771f3", "score": "0.48097622", "text": "addVote() {\n this.votesToSend++;\n this.dispatch.emitEvent('new_tap');\n }", "title": "" }, { "docid": "5adfa8fa6729c53de9dda7d6cff95d91", "score": "0.48064604", "text": "function onExtraBallPlayed(ballNumber, cost, wasInAuto) {\n VLT = machine.GetIp().split('.')[3];\n print(VLT + \" - extra ball played: ball number \" + ballNumber + \", ball cost \" + cost + \", in auto mode \" + wasInAuto)\n}", "title": "" }, { "docid": "95d653a9892363b2b6a4d9353867cc7e", "score": "0.48029608", "text": "function onUserClickedTrack (data,socket) {\n\n var nb = model.getNoiseBox(data.id);\n\n if ( !nb ) { return; }\n\n console.log(\"User '%s' clicked track '%s' in NoiseBox '%s'\",socket.id,data.track,data.id);\n\n nb.addTrack(data.track);\n }", "title": "" }, { "docid": "5ce3a25816a005b841b1dd05bd611126", "score": "0.48023203", "text": "userHearAtrack(track, user){\n user.hearATrack(track);\n }", "title": "" }, { "docid": "a03b24bed27d2f5538efb21395e1a969", "score": "0.4789359", "text": "function pickupHitchkikers() {\n if (checkLoad() == false) {\n if (elevator.travelDirection == 'up' && upQueue.length > 0) {\n var floorsAbove = _.filter(upQueue, function (n) { return n > elevator.currentFloor() });\n floorButtonsQueue = _.union(floorsAbove, floorButtonsQueue);\n sortQueue();\n upQueue = _.difference(floorButtonsQueue, upQueue);\n }\n\n else if (elevator.travelDirection == 'down' && downQueue.length > 0) {\n var floorsBelow = _.filter(downQueue, function (n) { return n < elevator.currentFloor() });\n floorButtonsQueue = _.union(floorsBelow, floorButtonsQueue);\n sortQueue();\n downQueue = _.difference(floorButtonsQueue, downQueue);\n }\n }\n }", "title": "" }, { "docid": "fb31bf8ca694cd469fb680e5c5dee567", "score": "0.478492", "text": "function doKaazingClick() \n{\n // Stop polling \n if( interval != null )\n {\n clearInterval( interval ); \n interval = null;\n }\n \n // Hide plot dot\n // Show sine wave\n comfort.plot.setAttribute( 'opacity', 0 ); \n comfort.chart.setAttribute( 'opacity', 1 ); \n comfort.chart.setAttribute( 'd', 'M0 0' ); \n\n comfort.history = [];\n \n kaazing = true;\n \n // Start polling every one second\n interval = setInterval( queryLatest, 40 ); \n \n // Highlight selected interval\n setSelectedControlButton( '.kaazing' ); \n}", "title": "" }, { "docid": "7fcd3197b49f72742723b50b2adbc2ba", "score": "0.47688013", "text": "function onWildBallPlayed() {\n VLT = machine.GetIp().split('.')[3];\n print(VLT + \" - wild ball chosen\")\n}", "title": "" }, { "docid": "626f7a07d6751cbbd797f5fc6680041e", "score": "0.47675973", "text": "humanHitOrStay() {\n while (this.human.HitOrStay()) {\n\n console.clear();\n this.showMoney();\n this.dealer.nextCard.call(this);\n this.displayHandsWhileHitting();\n\n if (this.human.isBusted()) {\n console.clear();\n break;\n }\n\n }\n }", "title": "" }, { "docid": "d4045a940adf384069c35796246b7bd5", "score": "0.47664696", "text": "TVB() { D.prf.breakPts.toggle(); }", "title": "" }, { "docid": "25394dcec9cad6c65b3893c266670ba6", "score": "0.47664467", "text": "startBraking() {\n if (this._power === 0) return;\n\n const cmd = this._parent.generateOutputCommand(this._index + 1, WeDo2Command.MOTOR_POWER, [127] // 127 = break\n );\n\n this._parent.send(BLECharacteristic.OUTPUT_COMMAND, cmd);\n\n this._isOn = false;\n\n this._setNewTimeout(this.turnOff, WeDo2Motor.BRAKE_TIME_MS);\n }", "title": "" }, { "docid": "56456422e435540838611e0f49db1087", "score": "0.47617167", "text": "selectBandit() {\n this.attemptBandit(0);\n }", "title": "" }, { "docid": "56456422e435540838611e0f49db1087", "score": "0.47617167", "text": "selectBandit() {\n this.attemptBandit(0);\n }", "title": "" }, { "docid": "c049c2779b0aeb2b874f8ace1ff6d0bb", "score": "0.47496292", "text": "function viewCB () {\n\tupdateBrain (viewAll)\n}", "title": "" }, { "docid": "bc73188ff8eb428ba77aa033e96066bd", "score": "0.47406754", "text": "drive() {\n // this will tell you the speed\n // what object is calling this method?\n console.log(`I am travelling at ${this.speed}km/h`)\n }", "title": "" }, { "docid": "acfdf72319d9d88c1a9242c54a7c9f11", "score": "0.4739569", "text": "think() {\n let input = this.createBrainInput();\n let result = this.brain.activate(input);\n super.think(result);\n }", "title": "" }, { "docid": "9937dc0d948ddbc6f74e54941b55ecf9", "score": "0.47380418", "text": "notify_speed_update() {\n this.speed_update = true;\n }", "title": "" }, { "docid": "9937dc0d948ddbc6f74e54941b55ecf9", "score": "0.47380418", "text": "notify_speed_update() {\n this.speed_update = true;\n }", "title": "" }, { "docid": "1dea07323b7d08816386d9c23a8d5d6e", "score": "0.47365353", "text": "function update(grid) {\n\n if (grid.bike1.alive && grid.bike2.alive) {\n\n moveBike(grid.bike1, grid, speed);\n moveBike(grid.bike2, grid, speed);\n\n addTiles(grid.bike1, grid, 3);\n addTiles(grid.bike2, grid, 4);\n }else{\n if(grid.bike1.alive && !grid.bike2.alive){\n alert(\"Player 1 Wins\");\n }else if(grid.bike2.alive && !grid.bike1.alive){\n alert(\"Player 2 Wins\");\n }else{\n alert(\"You tied\");\n }\n resetGame(80);\n goToMenu();\n }\n}", "title": "" }, { "docid": "b8319e366524fda6b259107c90eb7507", "score": "0.47311166", "text": "function onTrack(trackObject) {\n //console.info(`Tracking called for event ${trackObject.eventKey}`);\n}", "title": "" }, { "docid": "642575fe54db0ecdf0fc3d54fae85a91", "score": "0.4730206", "text": "sendBikes5() {\n for (let x = 0; x < this.bikes5.length; x++) {\n if (this.bikes5[x].checked == true) {\n console.log(this.bikes5[x].BikeID);\n document.getElementById('Location5').value = this.FK_Location;\n console.log(this.FK_Location);\n locationService.sendBikes(this.FK_Location, this.bikes5[x].BikeID, () => {});\n }\n this.mounted();\n }\n }", "title": "" }, { "docid": "803799e7f7e1cab533b02f05c078fef0", "score": "0.4717818", "text": "emitBidAwarded(){\n\t\t\tthis.$emit('bid-awarded');\n\t\t}", "title": "" }, { "docid": "56e71131e464ced6a4cb8fc4494b77b6", "score": "0.4714068", "text": "function beatDetect()\n {\n var tmp = getAvgSum(average, 2,0);\n tmp = tmp*tmp*tmp;\n if(timercount == 0)\n {\n console.log(\"RUNNING AVERAGE: \" + runningAverage + \" CURRENT INTENSITY: \" + tmp);\n timercount++;\n }\n else\n timercount= (timercount+1)%21;\n \n if( tmp - 50000 > runningAverage && timercount==0)\n {\n console.log(\"WEVE GOT A BEAT!\");\n return;\n }\n runningAverage += tmp;\n runningAverage /=2;\n //console.log(\"Updating Average\");\n \n \n \n }", "title": "" }, { "docid": "3886510b1ab536ef2d2a9e446ce50eb6", "score": "0.47099438", "text": "handleActiveGif(pic) {\n\t\tthis.setState({\n\t\t\tactive_gif: pic,\n\t\t\tactive_title: this.titleToSearchable(pic),\n\t\t\ttrending_visible: false,\n\t\t});\n\t}", "title": "" }, { "docid": "95ad35c96943a9281154b39349d6a1a6", "score": "0.4707328", "text": "function track(client) {\n clearAll();\n if (client !== null && client.location !== null && !(typeof client.location === 'undefined')) {\n var pos = new google.maps.LatLng(client.location.lat, client.location.lng);\n if (client.manufacturer != null) {\n mfrStr = client.manufacturer + \" \";\n } else {\n mfrStr = \"\";\n }\n if (client.os != null) {\n osStr = \" running \" + client.os;\n } else {\n osStr = \"\";\n }\n if (client.ssid != null) {\n ssidStr = \" with SSID '\" + client.ssid + \"'\";\n } else {\n ssidStr = \"\";\n }\n if (client.floors != null && client.floors !== \"\") {\n floorStr = \" at '\" + client.floors + \"'\"\n } else {\n floorStr = \"\";\n }\n $('#last-mac').text(mfrStr + \"'\" + lastMac + \"'\" + osStr + ssidStr +\n \" last seen on \" + client.seenString + floorStr +\n \" with uncertainty \" + client.location.unc.toFixed(1) + \" meters (reloading every 20 seconds)\");\n map.setCenter(pos);\n clientMarker.setMap(map);\n clientMarker.setPosition(pos);\n clientUncertaintyCircle = new google.maps.Circle({\n map: map,\n center: pos,\n radius: client.location.unc,\n fillColor: 'RoyalBlue',\n fillOpacity: 0.25,\n strokeColor: 'RoyalBlue',\n strokeWeight: 1\n });\n } else {\n $('#last-mac').text(\"Client '\" + lastMac + \"' could not be found\");\n }\n }", "title": "" }, { "docid": "212a54c4f7b63c5f99515e5e3abc6e29", "score": "0.47066337", "text": "function bowties (count, back){\n //assume on left edge pointing up, moving to right\n // routine has invariance\n // back = 0 big end first, =1 small end first\n right( 90)\n for (var i=0; i<count; i++) {\n pendown()\n if (i % 2 == back) {\n downKite()\n } else {\n upKite()\n }\n penup()\n forward( hypoteneuse)\n }\n left(180)\n penup()\n forward( count * hypoteneuse)\n pendown()\n right(90)\n}", "title": "" }, { "docid": "d742af376664a302be4e65bcd1ead1bc", "score": "0.47006932", "text": "function track() {\n let now, elapsed, delta, v;\n //current time\n now = Date.now();\n //time since the last timestamp\n elapsed = now - timestamp;\n //reset timestamp\n timestamp = now;\n\n delta = offset - frame;\n frame = offset;\n //v is equal to \n v = 1000 * delta / (1 + elapsed);\n \n velocity = 0.8 * v + 0.2 * velocity;\n }", "title": "" }, { "docid": "300ef833397f9ff29fda665c689f9dbc", "score": "0.46983615", "text": "scanKings() {}", "title": "" }, { "docid": "c93cf3b611245ff6fcc6183492f79bef", "score": "0.46980277", "text": "function Bike(name, model, color) {\n this.name = name;\n this.model = model;\n this.color = color;\n}", "title": "" }, { "docid": "3d24048a1e32de72697bfcbe929af2b2", "score": "0.4697754", "text": "sendBikes2() {\n for (let x = 0; x < this.bikes2.length; x++) {\n if (this.bikes2[x].checked == true) {\n console.log(this.bikes2[x].BikeID);\n document.getElementById('Location2').value = this.FK_Location;\n console.log(this.FK_Location);\n locationService.sendBikes(this.FK_Location, this.bikes2[x].BikeID, () => {});\n }\n this.mounted();\n }\n }", "title": "" }, { "docid": "c55f1567b27e3a7c393acb5d4f9ba7b2", "score": "0.46960688", "text": "removeBike(bike) {\n //Removes bike from basket\n for (let i of basket) {\n if (bike == i) {\n this.totalPrice -= basket[basket.indexOf(i)].displayPrice;\n basket.splice(basket.indexOf(i), 1);\n shared.basketLength = basket.length;\n this.updateBasket();\n this.calcDiscount();\n }\n }\n\n //Removes all equipment belong to bike with it\n for (var i = 0; equipmentBasket.length > i; i++) {\n if (equipmentBasket[i].bike_id == bike.id) {\n equipmentBasket.splice(i, 1);\n this.totalPrice -= equipmentBasket[i].displayPrice;\n i--;\n }\n }\n }", "title": "" }, { "docid": "faf7378addb1681fcaa9e28bdf78b742", "score": "0.46923733", "text": "hatch() {\n this.setStat(STATS.CORE, 1)\n this.setStat(STATS.SIGHT, 1)\n this.setStat(STATS.TASTE, 1)\n this.setStat(STATS.MEME, 1)\n this.setState(STATES.IDLE)\n this.setBirthday() // get new birthday\n\n this.onHatch(this)\n }", "title": "" }, { "docid": "90b5757a7ee024138b66a23c5c51b7cd", "score": "0.46876636", "text": "countBallots() {\n // Count first place votes\n this.allocateRound();\n this.initialVoteTally();\n this.updateRound();\n this.describeRound();\n\n // Transfer surplus votes or eliminate candidates until done\n while (!this.electionOver()) {\n this.round += 1;\n this.allocateRound();\n\n if (this.isSurplusToTransfer()) this.transferSurplusVotes();\n else this.eliminateCandidates();\n\n this.updateRound();\n this.describeRound();\n }\n\n this.updateCandidateStatus();\n // this.round is zero-based\n this.numRounds = this.round + 1;\n }", "title": "" }, { "docid": "5e07343fa12f0a8ed30a4859ff6f9d19", "score": "0.46870056", "text": "sendBikes4() {\n for (let x = 0; x < this.bikes4.length; x++) {\n if (this.bikes4[x].checked == true) {\n console.log(this.bikes4[x].BikeID);\n document.getElementById('Location4').value = this.FK_Location;\n console.log(this.FK_Location);\n locationService.sendBikes(this.FK_Location, this.bikes4[x].BikeID, () => {});\n }\n this.mounted();\n }\n }", "title": "" }, { "docid": "82d3acd1d00d2473636ceb0265eb769c", "score": "0.46863836", "text": "trackLive_() {\n this.pastSeekEnd_ = this.pastSeekEnd_;\n const seekable = this.player_.seekable();\n\n // skip undefined seekable\n if (!seekable || !seekable.length) {\n return;\n }\n\n const newSeekEnd = this.seekableEnd();\n\n // we can only tell if we are behind live, when seekable changes\n // once we detect that seekable has changed we check the new seek\n // end against current time, with a fudge value of half a second.\n if (newSeekEnd !== this.lastSeekEnd_) {\n if (this.lastSeekEnd_) {\n // we try to get the best fit value for the seeking increment\n // variable from the last 12 values.\n this.seekableIncrementList_ = this.seekableIncrementList_.slice(-11);\n this.seekableIncrementList_.push(Math.abs(newSeekEnd - this.lastSeekEnd_));\n if (this.seekableIncrementList_.length > 3) {\n this.seekableIncrement_ = median(this.seekableIncrementList_);\n }\n }\n\n this.pastSeekEnd_ = 0;\n this.lastSeekEnd_ = newSeekEnd;\n this.trigger('seekableendchange');\n }\n\n // we should reset pastSeekEnd when the value\n // is much higher than seeking increment.\n if (this.pastSeekEnd() > this.seekableIncrement_ * 1.5) {\n this.pastSeekEnd_ = 0;\n } else {\n this.pastSeekEnd_ = this.pastSeekEnd() + 0.03;\n }\n\n if (this.isBehind_() !== this.behindLiveEdge()) {\n this.behindLiveEdge_ = this.isBehind_();\n this.trigger('liveedgechange');\n }\n }", "title": "" }, { "docid": "e92ae0c6bb3ac454b2c22d44c7d6d228", "score": "0.46840423", "text": "static set bounceThreshold(value) {}", "title": "" }, { "docid": "7a20dc67baf4a0f4572c04c4c9daede4", "score": "0.46739268", "text": "function piercingArrowUpdate() {\n for (var i = 0; i < gameScreen.robots.length; i++) {\n var target = gameScreen.robots[i];\n if ((target.type & this.group) && target.pos.distanceSq(this.pos) < 90000) {\n var rel = this.vel.clone().multiply(5, 5).addv(target.pos).subtractv(this.pos);\n if (rel.dot(this.n1) > 0 && rel.dot(this.n2) > 0) {\n if (rel.dot(this.n3) > 0) {\n target.knockback(this.n1.clone().multiply(-PA_KNOCKBACK, -PA_KNOCKBACK));\n }\n else {\n target.knockback(this.n2.clone().multiply(-PA_KNOCKBACK, -PA_KNOCKBACK));\n }\n }\n }\n }\n}", "title": "" }, { "docid": "4c6c7521c735b45aef6e2b4f9df13c36", "score": "0.467391", "text": "function drawBoostMeter(g,id) {\n\tif(!g){\n\t\treturn;\n\t}//game must be initialized\n\tif(id == \"\") {\n\t\treturn;\n\t}//dont bother if we havnt set id yet\n\t//drawing boost meter on same canvas as scoreboard\n\tlet scoreboard_canvas = $(\"scoreboard\");\n\tlet pen = scoreboard_canvas.getContext(\"2d\");\n\tpen.font = \"14px Arial\";\n\tpen.fillStyle = \"red\";\n\tlet h = Math.floor(g.players[id].boost_level);\n\tpen.fillText(\"Boost: (SPACE/SHIFT)\", 10, 380);\n\t//alert(Math.floor(g.players[id].boost_level) + \" was the height\");\n\tpen.fillStyle = \"#ff1c1c\";\n\tpen.fillRect(70,250+(100-h),20,h);\n}", "title": "" }, { "docid": "8098cd24621a8f4d142f3c8833d827b1", "score": "0.4672666", "text": "function InventoryItemMouth2HarnessBallGagDraw() {\n\tInventoryItemMouthBallGagDraw();\n}", "title": "" }, { "docid": "c477838b069eadfb99b819d462b9cffa", "score": "0.4670686", "text": "function konamiIsDetected() {\n console.log(\"yay, do something cool here!\");\n showClosedGuard();\n}", "title": "" }, { "docid": "f3c3d11781e7fa738d9824e6591f126e", "score": "0.4670105", "text": "function onBalls() {\n VLT = machine.GetIp().split('.')[3];\n print(VLT + \" - in initial extraction\")\n}", "title": "" }, { "docid": "fe76671b9def956ec765b25c64c3ad55", "score": "0.46696302", "text": "function harvest(){\n nutrients += nutrientsPerClick;\n updateLabels();\n}", "title": "" }, { "docid": "3d00a3c56a2c14cb528788fe8aba8968", "score": "0.466625", "text": "function barOn() {\n if (gData.barOnCls) {\n if (scroller[dir.client] < scroller[dir.scrollSize]) {\n dom(scroller).addClass(gData.barOnCls);\n } else {\n dom(scroller).removeClass(gData.barOnCls);\n }\n }\n }", "title": "" }, { "docid": "d6f11bcc5c4bcee4612922d6720763ab", "score": "0.46643895", "text": "function gifClicked() {\n largeGifAppears(this);\n automatedSpeech();\n}", "title": "" }, { "docid": "ee9166f6cb564c73aad6d4e8ecaa14fb", "score": "0.46592698", "text": "trackBalances() {\n this.balances.getAllBalances();\n setTimeout(() => {\n this.trackBalances();\n }, 30000);\n }", "title": "" }, { "docid": "0fdb8a544d1daab1dcf57f1afc717b4c", "score": "0.46579123", "text": "function frame() {\n percent++;\n if (percent == 100) {\n brewDisplay.innerHTML = `Drink Up! ${percent}% ready`;\n timer = 'brew';\n clearInterval(brewCount);\n ready();\n } else {\n brewDisplay.innerHTML = `Brewing... ${percent}% ready`;\n }\n }", "title": "" }, { "docid": "dc35369fb1bd20ea9308c59ca82169fb", "score": "0.4656201", "text": "ai(player) {\n if (this.ball.length > 0) {\n if (this.ball[0].y < player.y) {\n player.up();\n }\n if (this.ball[0].y > player.y + player.height) {\n player.down();\n }\n }\n }", "title": "" }, { "docid": "c174ca9de09646ea5cfd6023fcd71141", "score": "0.46560082", "text": "sendBikes1() {\n for (let x = 0; x < this.bikes1.length; x++) {\n if (this.bikes1[x].checked == true) {\n console.log(this.bikes1[x].BikeID);\n document.getElementById('Location1').value = this.FK_Location;\n console.log(this.FK_Location);\n locationService.sendBikes(this.FK_Location, this.bikes1[x].BikeID, () => {});\n }\n this.mounted();\n }\n }", "title": "" }, { "docid": "92a8108958f8bbddf3e0e11f5c55c540", "score": "0.465557", "text": "constructor(){\n // TODO ProxyState.on is watching for a value in the appstate to change and will run a method when that happens\n ProxyState.on(\"cars\", draw)\n this.getCars()\n }", "title": "" }, { "docid": "690beb8ceab529665a5c526d1aa7f621", "score": "0.4654109", "text": "function vibrate() {\n /**\n * It causes the watch to vibrate, and forces the start of the feedback.\n *\n * If there are no questions selected then it blocks the time until a response is given.\n * If there are questions in the flow, then it starts the flow\n */\n\n vibration.start(\"alert\");\n\n //Change main clock face to response screen\n if (flow_views.length === 1) {\n clockblock.style.display = \"inline\";\n } else {\n initiateFeedbackData();\n // Reset currentView to prevent an unattended fitbit from moving through the flow\n currentView = 0;\n // go to first item in the flow\n showFace();\n }\n //Stop vibration after 5 seconds\n setTimeout(function() {\n vibration.stop();\n }, 2000);\n}", "title": "" }, { "docid": "a8ae822ce5737392d8e9f31e15a9916d", "score": "0.46492946", "text": "function driveIt(vehicle) {\n vehicle.start();\n racetrack.push(vehicle);\n}", "title": "" }, { "docid": "31aaebf9ebf7d7497a1ea343113f4047", "score": "0.46439272", "text": "function track() {\n// console.log(\"track: \" + state.track);\n state.track--;\n // Have you lost the IR source?\n if(PT[0].value > trackThresh && PT[1].value > trackThresh && state.track<0) {\n // start searching again\n readPT();\n rotate(CW);\n state.search = steps;\n setTimeout(search, searchTime);\n } else if((PT[0].value-PT[1].value) > turnThresh) {\n readPT();\n rotate(CCW);\n setTimeout(track, trackTime);\n state.track = 10;\n } else if((PT[1].value-PT[0].value) > turnThresh) {\n readPT();\n rotate(CW);\n setTimeout(track, trackTime);\n state.track = 10;\n } else {\n readPT();\n setTimeout(track, trackTime);\n updateState(off);\n state.track = 10;\n }\n}", "title": "" }, { "docid": "fdf17cd9cb720b2964a8a157ca3994af", "score": "0.46410283", "text": "function collectMilkBottle() {\n if (collide(player, milkBottle, 60)) {\n player.sprite = player.withMb;\n milkBottle.hide();\n }\n }", "title": "" }, { "docid": "782acca52865a0dd8e31454fabc87c9f", "score": "0.46347573", "text": "enableBetLinesShow () {\n linesManager.enableMouseOverForLabels();\n }", "title": "" }, { "docid": "63552010e5eba6c0f180b35dd55b2ddb", "score": "0.46324188", "text": "voteBand(id = '') {\n /* El map() recorre el arreglo, y se busca la banda que tenga el id que se ingreso para sumarle\n un voto */\n this.bands = this.bands.map(function (band) {\n if (band.id === id) {\n band.votes++;\n }\n //console.log(band);\n return band;\n });\n }", "title": "" } ]
5b66b5e24d0cbb32e924cf2fff34c0b0
Asserts setRange and getRange.
[ { "docid": "02040c1f77fa821a5e2ff86aab13d87b", "score": "0.5464013", "text": "function s( html, collapsed, startAddress, startOffset, endAddress, endOffset, htmlWithRangeOrCallback ) {\n\t\treturn function() {\n\t\t\tvar range = setRange( playground, html ),\n\t\t\t\tstartContainer, endContainer;\n\n\t\t\t// Get startContainer by address.\n\t\t\tif ( startAddress && startOffset != null )\n\t\t\t\tstartContainer = doc.getByAddress( playgroundAddress.concat( startAddress ) );\n\n\t\t\t// Get endContainer by address.\n\t\t\tif ( collapsed === true ) {\n\t\t\t\tendContainer = startContainer;\n\t\t\t\tendOffset = startOffset;\n\t\t\t} else if ( collapsed === false ) {\n\t\t\t\tendContainer = doc.getByAddress( playgroundAddress.concat( endAddress ) );\n\t\t\t}\n\n\t\t\tif ( startContainer && endContainer ) {\n\t\t\t\tassert.isTrue( startContainer.equals( range.startContainer ), 'startContainer' );\n\t\t\t\tassert.isTrue( endContainer.equals( range.endContainer ), 'endContainer' );\n\t\t\t\tassert.areSame( startOffset, range.startOffset, 'startOffset' );\n\t\t\t\tassert.areSame( endOffset, range.endOffset, 'endOffset' );\n\t\t\t\tassert.areSame( collapsed, range.collapsed, 'collapsed' );\n\t\t\t} else {\n\t\t\t\tassert.isNull( range, 'No ranges returned' );\n\t\t\t}\n\n\t\t\tif ( typeof htmlWithRangeOrCallback == 'function' ) {\n\t\t\t\thtmlWithRangeOrCallback( playground, range );\n\t\t\t} else {\n\t\t\t\tassert.areSame( html.replace( /[\\{\\}\\[\\]]/g, '' ), bender.tools.fixHtml( playground.getHtml(), 1, 1 ), 'Markers cleaned - setRange' );\n\t\t\t\tif ( htmlWithRangeOrCallback == null )\n\t\t\t\t\thtmlWithRangeOrCallback = html;\n\t\t\t\tassert.areSame( htmlWithRangeOrCallback, bender.tools.fixHtml( getRange( playground, range ), 1, 1 ), 'getRange' );\n\t\t\t}\n\t\t};\n\t}", "title": "" } ]
[ { "docid": "4a3ce8fad41544650159b2ea214c29ff", "score": "0.6971111", "text": "set hasRange(value) {}", "title": "" }, { "docid": "2338a64d0e7d923b48f4086768385f54", "score": "0.6542445", "text": "function assertRange(value, min, max, name = '') {\r\n assert(value >= min && value <= max, `${name || 'value'} ${value} should be between ${min} and ${max}`);\r\n}", "title": "" }, { "docid": "2338a64d0e7d923b48f4086768385f54", "score": "0.6542445", "text": "function assertRange(value, min, max, name = '') {\r\n assert(value >= min && value <= max, `${name || 'value'} ${value} should be between ${min} and ${max}`);\r\n}", "title": "" }, { "docid": "4d53df90234dda4afa06b1ceed24679c", "score": "0.6529366", "text": "range(min, max) {\r\n return this.satisfies((value) => value === null || value === undefined || (value >= min && value <= max), { min, max })\r\n .withMessageKey('range');\r\n }", "title": "" }, { "docid": "607cfaa02c79fbf720603d15a4997b53", "score": "0.65268147", "text": "get hasRange() {}", "title": "" }, { "docid": "e46881a575e6b2bd339c68ca9513c622", "score": "0.6520915", "text": "_assertRange(value) {\n if (isDefined(this.maxValue) && isDefined(this.minValue)) {\n assertRange(value, this._fromType(this.minValue), this._fromType(this.maxValue));\n }\n return value;\n }", "title": "" }, { "docid": "e662f75da1e3165208f809c279e6e2f7", "score": "0.617352", "text": "function Range(){this._minimum=this._value=0;this._maximum=100;this._extent=0;this._isChanging=!1}", "title": "" }, { "docid": "d857a9c8e07df86785406160995daee0", "score": "0.5930676", "text": "function setRange(rangeStart, rangeEnd){\n\tglobal.gnApi.setRange(rangeStart, rangeEnd);\n}", "title": "" }, { "docid": "eb57902eca3b7cb3daba4ed07625ca51", "score": "0.59290075", "text": "_setRange({ min, max }) {\n const min2Scale = this._toPixelScale(min || 0);\n const max2Scale = this._toPixelScale(max || 0);\n const minBounds = this._toPixelScale(this.props.min);\n const maxBounds = this._toPixelScale(this.props.max);\n if (min2Scale > max2Scale) {\n throw new Error(`Minimum slider value: ${min} is greater than max value: ${max}`);\n }\n if (min2Scale < minBounds || min2Scale > maxBounds) {\n throw new Error(`Minimum slider value: ${min} exceeds bounds:\n ${this.props.min} - ${this.props.max}`);\n }\n if (max2Scale < minBounds || max2Scale > maxBounds) {\n throw new Error(`Maximum slider value: ${max} exceeds bounds:\n ${this.props.min} - ${this.props.max}`);\n }\n // tslint:disable-next-line:no-console\n console.log(`range => (${min2Scale}, ${max2Scale})`);\n this._range = {\n min: min2Scale,\n max: max2Scale,\n };\n return this._range;\n }", "title": "" }, { "docid": "8767a30bbf73d403c606eaa7d7ab6344", "score": "0.5847656", "text": "_rangeChanged() {\n this._setRangeValue();\n super._rangeChanged();\n }", "title": "" }, { "docid": "ce87ca3ff07fb01611cd4ae032ed0da8", "score": "0.57392615", "text": "static checkRange(num, min, max, errName) {\n if (num === undefined) {\n // some methods will allow blank (=undefined) fields\n return;\n }\n let ok = true &&\n num >= min &&\n (max === undefined || num <= max);\n if ( ! ok) {\n throw Error(\n \"Invalid value \" + num + \" for \" + errName +\n ((max !== undefined) ? \n \", expected integer between \" + min + \" and \" + max :\n \" greater than \" + min));\n } else {\n return num;\n }\n }", "title": "" }, { "docid": "9e25908b3f2aabab75ac5d0e2aba76be", "score": "0.5719251", "text": "function validate_range(charset, range){\n var range_min = document.getElementById('range_min_' + charset);\n var range_max = document.getElementById('range_max_' + charset);\n var min_value = Number(range_min.value);\n var max_value = Number(range_max.value);\n\n // Validate min range control\n if (range == 'min'){\n if (min_value > (max_value-1)){\n range_min.value = max_value - 1;\n }\n }\n // Validate max range control\n else if (range == 'max'){\n if (max_value < (min_value+1)){\n range_max.value = min_value + 1;\n }\n }\n var select = document.getElementById('select_' + charset).value;\n set_label(charset, (select == 'between') ? 'double' : 'single');\n}", "title": "" }, { "docid": "11a1f5a0206e28e87eae14831e81bfc0", "score": "0.56981766", "text": "setSelectionRange(range) {\n throw new Error('Not implemented: setSelectionRange');\n }", "title": "" }, { "docid": "5f8f796b232eb9d2fd8ca4502e40701d", "score": "0.5689415", "text": "function Range(from, to) {\n this.from = from;\n this.to = to;\n}", "title": "" }, { "docid": "5f8f796b232eb9d2fd8ca4502e40701d", "score": "0.5689415", "text": "function Range(from, to) {\n this.from = from;\n this.to = to;\n}", "title": "" }, { "docid": "83ddccdac947a1b57a647d9239838adc", "score": "0.5689048", "text": "function Range(from, to) {\n this.from = from;\n this.to = to;\n}", "title": "" }, { "docid": "b668b127e598807ba49359fe669460a0", "score": "0.56347007", "text": "isRange(value) {\n return Object(__WEBPACK_IMPORTED_MODULE_0_is_plain_object__[\"a\" /* default */])(value) && Point.isPoint(value.anchor) && Point.isPoint(value.focus);\n }", "title": "" }, { "docid": "dfd1a33b8ee0f5af4efd101fc2bf09c6", "score": "0.56299555", "text": "static checkRange(num, min, max, errName) {\n if (num === undefined) {\n // some methods will allow blank (=undefined) fields\n return;\n }\n let ok = true &&\n Number.isInteger(num) &&\n num >= min &&\n (max === undefined || num <= max);\n if ( ! ok) {\n throw Error(\n \"Invalid value \" + num + \" for \" + errName +\n ((max !== undefined) ? \n \", expected integer between \" + min + \" and \" + max :\n \" greater than \" + min));\n } else {\n return num;\n }\n }", "title": "" }, { "docid": "cf14ba8cdbc9824daadee5d6f54067d6", "score": "0.56009835", "text": "clearRange() {\n this.range = {};\n }", "title": "" }, { "docid": "dafe86aff6d75a0e23d91eecb9eccf90", "score": "0.55802244", "text": "setXRange(min, max) {\n if (min >= max) {\n throw new Error(`the minimum must be less than the maximum, but ${min} is greater than or equal to ${max}`);\n }\n this.xMin = min;\n this.xMax = max;\n this._resize();\n }", "title": "" }, { "docid": "83c3a561796035863325258c83180c54", "score": "0.5557024", "text": "function createRange(pos,end){if(end===void 0){end=pos;}ts.Debug.assert(end>=pos||end===-1);return{pos:pos,end:end};}", "title": "" }, { "docid": "7ff47d9b7360f711919389a1976a324d", "score": "0.5555679", "text": "function RangePrototype() {}", "title": "" }, { "docid": "7ff47d9b7360f711919389a1976a324d", "score": "0.5555679", "text": "function RangePrototype() {}", "title": "" }, { "docid": "7ff47d9b7360f711919389a1976a324d", "score": "0.5555679", "text": "function RangePrototype() {}", "title": "" }, { "docid": "7ff47d9b7360f711919389a1976a324d", "score": "0.5555679", "text": "function RangePrototype() {}", "title": "" }, { "docid": "7ff47d9b7360f711919389a1976a324d", "score": "0.5555679", "text": "function RangePrototype() {}", "title": "" }, { "docid": "7ff47d9b7360f711919389a1976a324d", "score": "0.5555679", "text": "function RangePrototype() {}", "title": "" }, { "docid": "7ff47d9b7360f711919389a1976a324d", "score": "0.5555679", "text": "function RangePrototype() {}", "title": "" }, { "docid": "7ff47d9b7360f711919389a1976a324d", "score": "0.5555679", "text": "function RangePrototype() {}", "title": "" }, { "docid": "7ff47d9b7360f711919389a1976a324d", "score": "0.5555679", "text": "function RangePrototype() {}", "title": "" }, { "docid": "7ff47d9b7360f711919389a1976a324d", "score": "0.5555679", "text": "function RangePrototype() {}", "title": "" }, { "docid": "a53b6a2a05c7e819724f7774f788ee1e", "score": "0.55492115", "text": "function testBounds(){\n return true\n}", "title": "" }, { "docid": "93239b823064dae7bfb64e0cbde58725", "score": "0.5518888", "text": "setInRange(array, startIndex = 0, endIndex = array.length, value = 0) {\n startIndex = Math.floor(startIndex * this.SamplingUnit);\n endIndex = Math.ceil(endIndex * this.SamplingUnit);\n if (endIndex < startIndex) {\n throw new Error(\"start index of line is greater then the end index\");\n }\n if (startIndex < 0) {\n startIndex = 0;\n }\n if (endIndex > array.length) {\n endIndex = array.length;\n }\n for (let i = startIndex; i < endIndex; i++) {\n array[i] = value;\n }\n }", "title": "" }, { "docid": "74457aa6bf52a13d0f7068cf2f16de06", "score": "0.5484692", "text": "_rangeValidation(initialDate) {\n const that = this;\n\n if (initialDate.compare(that.min) === -1) {\n return that.min.clone();\n }\n else if (initialDate.compare(that.max) === 1) {\n return that.max.clone();\n }\n else {\n return initialDate;\n }\n }", "title": "" }, { "docid": "0b636635f3693df838ca26d0965f763e", "score": "0.5483603", "text": "function supportRangeBounds() {\n var r, testElement, rangeBounds, rangeHeight, support = false;\n\n if (doc.createRange) {\n r = doc.createRange();\n if (r.getBoundingClientRect) {\n testElement = doc.createElement('boundtest');\n testElement.style.height = \"123px\";\n testElement.style.display = \"block\";\n doc.body.appendChild(testElement);\n\n r.selectNode(testElement);\n rangeBounds = r.getBoundingClientRect();\n rangeHeight = rangeBounds.height;\n\n if (rangeHeight === 123) {\n support = true;\n }\n doc.body.removeChild(testElement);\n }\n }\n\n return support;\n }", "title": "" }, { "docid": "0b636635f3693df838ca26d0965f763e", "score": "0.5483603", "text": "function supportRangeBounds() {\n var r, testElement, rangeBounds, rangeHeight, support = false;\n\n if (doc.createRange) {\n r = doc.createRange();\n if (r.getBoundingClientRect) {\n testElement = doc.createElement('boundtest');\n testElement.style.height = \"123px\";\n testElement.style.display = \"block\";\n doc.body.appendChild(testElement);\n\n r.selectNode(testElement);\n rangeBounds = r.getBoundingClientRect();\n rangeHeight = rangeBounds.height;\n\n if (rangeHeight === 123) {\n support = true;\n }\n doc.body.removeChild(testElement);\n }\n }\n\n return support;\n }", "title": "" }, { "docid": "beb1e76731e064c73319333714850ff0", "score": "0.5483029", "text": "function supportRangeBounds() {\n var r, testElement, rangeBounds, rangeHeight, support = false;\n\n if (doc.createRange) {\n r = doc.createRange();\n if (r.getBoundingClientRect) {\n testElement = doc.createElement('boundtest');\n testElement.style.height = \"123px\";\n testElement.style.display = \"block\";\n doc.body.appendChild(testElement);\n\n r.selectNode(testElement);\n rangeBounds = r.getBoundingClientRect();\n rangeHeight = rangeBounds.height;\n\n if (rangeHeight === 123) {\n support = true;\n }\n doc.body.removeChild(testElement);\n }\n }\n\n return support;\n }", "title": "" }, { "docid": "6b309763a28b7f469da9a690dd85aadd", "score": "0.54802275", "text": "range(min, max) {\r\n return this.fluentRules.range(min, max);\r\n }", "title": "" }, { "docid": "b639e8c47b16db86673085b0260b4880", "score": "0.5463365", "text": "function setRange(ca,he,eo){if(xc_cl(he,eo)){xc_dv(ca,\"du\",\"gp\",[he,eo],0)}}", "title": "" }, { "docid": "825e61f849bad6fa3901ecee5d5ab9d5", "score": "0.5462836", "text": "setRenderedRange(range) {\n if (!rangesEqual(this._renderedRange, range)) {\n if (this.appendOnly) {\n range = { start: 0, end: Math.max(this._renderedRange.end, range.end) };\n }\n this._renderedRangeSubject.next(this._renderedRange = range);\n this._markChangeDetectionNeeded(() => this._scrollStrategy.onContentRendered());\n }\n }", "title": "" }, { "docid": "9b1254dbf7628d0f6cb3f34469365c93", "score": "0.5459202", "text": "function supportRangeBounds() {\n var r, testElement, rangeBounds, rangeHeight, support = false;\n\n if (doc.createRange) {\n r = doc.createRange();\n if (r.getBoundingClientRect) {\n testElement = doc.createElement('boundtest');\n testElement.style.height = \"123px\";\n testElement.style.display = \"block\";\n doc.body.appendChild(testElement);\n\n r.selectNode(testElement);\n rangeBounds = r.getBoundingClientRect();\n rangeHeight = rangeBounds.height;\n\n if (rangeHeight === 123) {\n support = true;\n }\n doc.body.removeChild(testElement);\n }\n }\n\n return support;\n}", "title": "" }, { "docid": "e85f5013cf9f6ee092350378d55c7171", "score": "0.5450112", "text": "rangeOf() {\n return util_1.default.createRange(this.lineBegin, this.columnBegin, this.lineEnd, this.columnEnd);\n }", "title": "" }, { "docid": "c2012e7f5421ff3d00a7d20d987bfd7b", "score": "0.5440407", "text": "function ensureInRange(x, min, max) {\n if (x === undefined || x === null) {\n return x;\n }\n if (x < min) {\n return min;\n }\n if (x > max) {\n return max;\n }\n return x;\n }", "title": "" }, { "docid": "01cf028ccbdab37eb5201fc52ca90940", "score": "0.5408692", "text": "createRange(start, end) {\n const arr = []\n for (var i = start; i < end - 9; i = i + 10) {\n arr.push([i, i + 10, 0])\n }\n this.setState({\n rangeData: arr\n })\n }", "title": "" }, { "docid": "ebef778a4fdfe976c58102e1872800f6", "score": "0.539851", "text": "async checkRange(offset, len = -1) {\n // TODO: kind of hacky how we do in-place updated of the cells\n // array. this part needs a complete refactor\n if (!this.items) {\n return;\n }\n const length = (len === -1)\n ? this.items.length - offset\n : len;\n const cellIndex = findCellIndex(this.cells, offset);\n const cells = calcCells(this.items, this.itemHeight, this.headerFn, this.footerFn, this.approxHeaderHeight, this.approxFooterHeight, this.approxItemHeight, cellIndex, offset, length);\n this.cells = inplaceUpdate(this.cells, cells, cellIndex);\n this.lastItemLen = this.items.length;\n this.indexDirty = Math.max(offset - 1, 0);\n this.scheduleUpdate();\n }", "title": "" }, { "docid": "2ff0ee238e6bd66c4da7174ab3d5097a", "score": "0.53918564", "text": "function YServo_set_range(newval)\n { var rest_val;\n rest_val = String(newval);\n return this._setAttr('range',rest_val);\n }", "title": "" }, { "docid": "f3aafee5496e15e5ab885ce015cdb4c6", "score": "0.5389529", "text": "get range() {\n return this.rangeValidationForm.controls;\n }", "title": "" }, { "docid": "f042053a751d8627841695964fef2bd5", "score": "0.5385233", "text": "ofRange(min, max) {\n const rangeDifference = max - min;\n let a = 0;\n if(rangeDifference != 0) {\n a = 1 / rangeDifference;\n }\n this.A = a;\n this.D = 0 - (a * min);\n return copy(this);\n }", "title": "" }, { "docid": "4c8d50dc93a6ac3d5d7a98dae078ea27", "score": "0.5380236", "text": "set(range, clearLast) {\n this.pm.ensureOperation({readSelection: false, selection: range})\n this.range = range\n if (clearLast !== false) this.lastAnchorNode = null\n }", "title": "" }, { "docid": "043ce27d9304633ac5ed7d03526ea43f", "score": "0.53797686", "text": "between(min, max) {\r\n return this.satisfies((value) => value === null || value === undefined || (value > min && value < max), { min, max })\r\n .withMessageKey('between');\r\n }", "title": "" }, { "docid": "40cdeefba81ab6b510d9ea5787169600", "score": "0.53784", "text": "function range_setTheEnd(range, node, offset) {\n /**\n * 1. If node is a doctype, then throw an \"InvalidNodeTypeError\" DOMException.\n * 2. If offset is greater than node’s length, then throw an \"IndexSizeError\"\n * DOMException.\n * 3. Let bp be the boundary point (node, offset).\n * 4. If these steps were invoked as \"set the end\"\n * 4.1. If bp is before the range’s start, or if range’s root is not equal\n * to node’s root, set range’s start to bp.\n * 4.2. Set range’s end to bp.\n */\n if (util_1.Guard.isDocumentTypeNode(node)) {\n throw new DOMException_1.InvalidNodeTypeError();\n }\n if (offset > TreeAlgorithm_1.tree_nodeLength(node)) {\n throw new DOMException_1.IndexSizeError();\n }\n var bp = [node, offset];\n if (range_root(range) !== TreeAlgorithm_1.tree_rootNode(node) ||\n BoundaryPointAlgorithm_1.boundaryPoint_position(bp, range._start) === interfaces_1.BoundaryPosition.Before) {\n range._start = bp;\n }\n range._end = bp;\n}", "title": "" }, { "docid": "06fc32e8c8fff301daadfa123450741f", "score": "0.5355397", "text": "ensureOffsets() {\n this.offset_ = Math.min(this.offset_, this.document_.length);\n this.end_ = Math.min(this.end_, this.document_.length);\n }", "title": "" }, { "docid": "54c417de689097c9672c62349f37c023", "score": "0.5355325", "text": "function range_warning(lower, upper) {\n return _(\"value_must_be_between\") + \" \" + lower.toString() + \" \" + _(\"and\") + \" \" + upper.toString()\n}", "title": "" }, { "docid": "d44fe9f25d467dc4bba887b286e8fcab", "score": "0.5354635", "text": "function Range(start, end){\n if (!(this instanceof Range)) {\n return new Range(start, end);\n }\n if (arguments.length === 1) {\n return Range.apply(this, start);\n }\n if (start > end) {\n throw new Error(\"Range must start before it ends\");\n }\n if (start === end) {\n if (EMPTY) {\n return EMPTY;\n } else {\n EMPTY = this;\n start = end = 0;\n } \n }\n this.start = start;\n this.end = end;\n Object.defineProperty(this, 'length', {\n get: function() {\n return this.end - this.start;\n }\n });\n if (this.constructor === Range) {\n Object.freeze(this);\n }\n}", "title": "" }, { "docid": "0054cc21fb8c5bcd4e948798ed5df30b", "score": "0.53491175", "text": "function range_setTheEnd(range, node, offset) {\n /**\n * 1. If node is a doctype, then throw an \"InvalidNodeTypeError\" DOMException.\n * 2. If offset is greater than node’s length, then throw an \"IndexSizeError\"\n * DOMException.\n * 3. Let bp be the boundary point (node, offset).\n * 4. If these steps were invoked as \"set the end\"\n * 4.1. If bp is before the range’s start, or if range’s root is not equal\n * to node’s root, set range’s start to bp.\n * 4.2. Set range’s end to bp.\n */\n if (util_1.Guard.isDocumentTypeNode(node)) {\n throw new DOMException_1.InvalidNodeTypeError();\n }\n if (offset > TreeAlgorithm_1.tree_nodeLength(node)) {\n throw new DOMException_1.IndexSizeError();\n }\n const bp = [node, offset];\n if (range_root(range) !== TreeAlgorithm_1.tree_rootNode(node) ||\n BoundaryPointAlgorithm_1.boundaryPoint_position(bp, range._start) === interfaces_1.BoundaryPosition.Before) {\n range._start = bp;\n }\n range._end = bp;\n}", "title": "" }, { "docid": "23ffd0fc2048bfbd1004cdbcf5081cbf", "score": "0.53457326", "text": "checkRange(value, lowerBounds, upperBounds) {\n if (value >= lowerBounds && value <= upperBounds) {\n return value;\n }\n else {\n return !value;\n }\n }", "title": "" }, { "docid": "e03b12634982e093508205ebe5d8216b", "score": "0.5345358", "text": "get SUPPORT_RANGE_BOUNDS() {\n 'use strict';\n\n var value = testRangeBounds(document);\n Object.defineProperty(FEATURES, 'SUPPORT_RANGE_BOUNDS', { value: value });\n return value;\n }", "title": "" }, { "docid": "e03b12634982e093508205ebe5d8216b", "score": "0.5345358", "text": "get SUPPORT_RANGE_BOUNDS() {\n 'use strict';\n\n var value = testRangeBounds(document);\n Object.defineProperty(FEATURES, 'SUPPORT_RANGE_BOUNDS', { value: value });\n return value;\n }", "title": "" }, { "docid": "e03b12634982e093508205ebe5d8216b", "score": "0.5345358", "text": "get SUPPORT_RANGE_BOUNDS() {\n 'use strict';\n\n var value = testRangeBounds(document);\n Object.defineProperty(FEATURES, 'SUPPORT_RANGE_BOUNDS', { value: value });\n return value;\n }", "title": "" }, { "docid": "e03b12634982e093508205ebe5d8216b", "score": "0.5345358", "text": "get SUPPORT_RANGE_BOUNDS() {\n 'use strict';\n\n var value = testRangeBounds(document);\n Object.defineProperty(FEATURES, 'SUPPORT_RANGE_BOUNDS', { value: value });\n return value;\n }", "title": "" }, { "docid": "e03b12634982e093508205ebe5d8216b", "score": "0.5345358", "text": "get SUPPORT_RANGE_BOUNDS() {\n 'use strict';\n\n var value = testRangeBounds(document);\n Object.defineProperty(FEATURES, 'SUPPORT_RANGE_BOUNDS', { value: value });\n return value;\n }", "title": "" }, { "docid": "e03b12634982e093508205ebe5d8216b", "score": "0.5345358", "text": "get SUPPORT_RANGE_BOUNDS() {\n 'use strict';\n\n var value = testRangeBounds(document);\n Object.defineProperty(FEATURES, 'SUPPORT_RANGE_BOUNDS', { value: value });\n return value;\n }", "title": "" }, { "docid": "e03b12634982e093508205ebe5d8216b", "score": "0.5345358", "text": "get SUPPORT_RANGE_BOUNDS() {\n 'use strict';\n\n var value = testRangeBounds(document);\n Object.defineProperty(FEATURES, 'SUPPORT_RANGE_BOUNDS', { value: value });\n return value;\n }", "title": "" }, { "docid": "e03b12634982e093508205ebe5d8216b", "score": "0.5345358", "text": "get SUPPORT_RANGE_BOUNDS() {\n 'use strict';\n\n var value = testRangeBounds(document);\n Object.defineProperty(FEATURES, 'SUPPORT_RANGE_BOUNDS', { value: value });\n return value;\n }", "title": "" }, { "docid": "e03b12634982e093508205ebe5d8216b", "score": "0.5345358", "text": "get SUPPORT_RANGE_BOUNDS() {\n 'use strict';\n\n var value = testRangeBounds(document);\n Object.defineProperty(FEATURES, 'SUPPORT_RANGE_BOUNDS', { value: value });\n return value;\n }", "title": "" }, { "docid": "e03b12634982e093508205ebe5d8216b", "score": "0.5345358", "text": "get SUPPORT_RANGE_BOUNDS() {\n 'use strict';\n\n var value = testRangeBounds(document);\n Object.defineProperty(FEATURES, 'SUPPORT_RANGE_BOUNDS', { value: value });\n return value;\n }", "title": "" }, { "docid": "fc5c63deabe92e1bf6b6d6c50515be5d", "score": "0.5341892", "text": "onRangeChanged (range) {\n this.range = range\n this.render()\n }", "title": "" }, { "docid": "7359f450da83de0a398b2cbecd7551b6", "score": "0.53381234", "text": "get SUPPORT_RANGE_BOUNDS() {\n 'use strict';\n const value = testRangeBounds(document);\n Object.defineProperty(FEATURES, 'SUPPORT_RANGE_BOUNDS', {value});\n return value;\n }", "title": "" }, { "docid": "e0aa96999217ee9e853cd94af8b337e7", "score": "0.53292", "text": "constructor() {\n this.ranges = [];\n }", "title": "" }, { "docid": "1b27832e91f10f2a876c55a0ee0970b1", "score": "0.5325022", "text": "function range(rule,value,source,errors,options){var len=typeof rule.len==='number';var min=typeof rule.min==='number';var max=typeof rule.max==='number';var val=value;var key=null;var num=typeof value==='number';var str=typeof value==='string';var arr=Array.isArray(value);if(num){key='number';}else if(str){key='string';}else if(arr){key='array';}// if the value is not of a supported type for range validation\n// the validation rule rule should use the\n// type property to also test for a particular type\nif(!key){return false;}if(str||arr){val=value.length;}if(len){if(val!==rule.len){errors.push(util.format(options.messages[key].len,rule.fullField,rule.len));}}else if(min&&!max&&val<rule.min){errors.push(util.format(options.messages[key].min,rule.fullField,rule.min));}else if(max&&!min&&val>rule.max){errors.push(util.format(options.messages[key].max,rule.fullField,rule.max));}else if(min&&max&&(val<rule.min||val>rule.max)){errors.push(util.format(options.messages[key].range,rule.fullField,rule.min,rule.max));}}", "title": "" }, { "docid": "e6997a37c88954ef031b14aa8ddd7a4a", "score": "0.53235805", "text": "function range(from, to) {\n var obj = inherit(range.methods);\n obj.from = from;\n obj.to = to;\n return obj;\n}", "title": "" }, { "docid": "a09097b2219ac6822f2ad83d52e2a80d", "score": "0.5322523", "text": "get SUPPORT_RANGE_BOUNDS() {\n 'use strict';\n\n var value = testRangeBounds(document);\n Object.defineProperty(FEATURES, 'SUPPORT_RANGE_BOUNDS', {\n value: value\n });\n return value;\n }", "title": "" }, { "docid": "5e1a03798362bacd2fdf9e9c73b38870", "score": "0.5316972", "text": "function initRange(domain, range) {\n switch (arguments.length) {\n case 0: break;\n case 1: this.range(domain); break;\n default: this.range(range).domain(domain); break;\n }\n return this;\n}", "title": "" }, { "docid": "5e1a03798362bacd2fdf9e9c73b38870", "score": "0.5316972", "text": "function initRange(domain, range) {\n switch (arguments.length) {\n case 0: break;\n case 1: this.range(domain); break;\n default: this.range(range).domain(domain); break;\n }\n return this;\n}", "title": "" }, { "docid": "0fe6cda48a684ea9ca260dccf504142a", "score": "0.53140277", "text": "setRenderedRange(range) {\n if (!rangesEqual(this._renderedRange, range)) {\n this._renderedRangeSubject.next(this._renderedRange = range);\n this._markChangeDetectionNeeded(() => this._scrollStrategy.onContentRendered());\n }\n }", "title": "" }, { "docid": "0fe6cda48a684ea9ca260dccf504142a", "score": "0.53140277", "text": "setRenderedRange(range) {\n if (!rangesEqual(this._renderedRange, range)) {\n this._renderedRangeSubject.next(this._renderedRange = range);\n this._markChangeDetectionNeeded(() => this._scrollStrategy.onContentRendered());\n }\n }", "title": "" }, { "docid": "0fe6cda48a684ea9ca260dccf504142a", "score": "0.53140277", "text": "setRenderedRange(range) {\n if (!rangesEqual(this._renderedRange, range)) {\n this._renderedRangeSubject.next(this._renderedRange = range);\n this._markChangeDetectionNeeded(() => this._scrollStrategy.onContentRendered());\n }\n }", "title": "" }, { "docid": "0fe6cda48a684ea9ca260dccf504142a", "score": "0.53140277", "text": "setRenderedRange(range) {\n if (!rangesEqual(this._renderedRange, range)) {\n this._renderedRangeSubject.next(this._renderedRange = range);\n this._markChangeDetectionNeeded(() => this._scrollStrategy.onContentRendered());\n }\n }", "title": "" }, { "docid": "0fe6cda48a684ea9ca260dccf504142a", "score": "0.53140277", "text": "setRenderedRange(range) {\n if (!rangesEqual(this._renderedRange, range)) {\n this._renderedRangeSubject.next(this._renderedRange = range);\n this._markChangeDetectionNeeded(() => this._scrollStrategy.onContentRendered());\n }\n }", "title": "" }, { "docid": "c7ac16fd61ec88ccda4041baeb4bb5a6", "score": "0.5313563", "text": "setRenderedRange(range) {\n if (!rangesEqual(this._renderedRange, range)) {\n this._renderedRangeSubject.next(this._renderedRange = range);\n this._markChangeDetectionNeeded(() => this._scrollStrategy.onContentRendered());\n }\n }", "title": "" }, { "docid": "50f0e85440899a538f03ec901ebc8413", "score": "0.53122926", "text": "function isRange(obj) {\n return ('type' in obj && obj.type === 'Range');\n}", "title": "" }, { "docid": "206d23b88fc8375d0d6f4388075ae66c", "score": "0.5304535", "text": "function range(lower, upper) {\n var pid = parser_id++;\n if (!cache.range[lower+upper]) cache.range[lower+upper] = [];\n var my_cache = cache.range[lower+upper];\n var rangeparser = rule(\"pc.range(\"+lower+\",\"+upper+\")\",function(state) {\n var savedState = state;\n // var cached = savedState.getCached(pid);\n var cached = my_cache[savedState.index];\n if(cached)\n return cached;\n\n if(state.length < 1)\n cached = false;\n else {\n var ch = state.at(0);\n if(ch >= lower && ch <= upper)\n cached = { remaining: state.from(1,ch), matched: ch, ast: ch };\n else\n cached = false;\n }\n // savedState.putCached(pid, cached);\n my_cache[savedState.index] = cached;\n return cached;\n });\n rangeparser.toString = function() { return \"range(\"+lower+\",\"+upper+\")\"; };\n return rangeparser;\n}", "title": "" }, { "docid": "f441d67875e7619877c0f7994a33a6d0", "score": "0.53007543", "text": "function TStylingRange() { }", "title": "" }, { "docid": "f441d67875e7619877c0f7994a33a6d0", "score": "0.53007543", "text": "function TStylingRange() { }", "title": "" }, { "docid": "c9a7150b95bed0e632fea5a03f42e277", "score": "0.5284753", "text": "function fixRangeCoverage(range, composer) {\n var node,\n start = range.startContainer,\n end = range.endContainer;\n\n // If range has only one childNode and it is end to end the range, extend the range to contain the container element too\n // This ensures the wrapper node is modified and optios added to it\n if (start && start.nodeType === 1 && start === end) {\n if (start.firstChild === start.lastChild && range.endOffset === 1) {\n if (start !== composer.element && start.nodeName !== 'LI' && start.nodeName !== 'TD') {\n range.setStartBefore(start);\n range.setEndAfter(end);\n }\n }\n return;\n }\n\n // If range starts outside of node and ends inside at textrange and covers the whole node visually, extend end to cover the node end too\n if (start && start.nodeType === 1 && end.nodeType === 3) {\n if (start.firstChild === end && range.endOffset === end.data.length) {\n if (start !== composer.element && start.nodeName !== 'LI' && start.nodeName !== 'TD') {\n range.setEndAfter(start);\n }\n }\n return;\n }\n \n // If range ends outside of node and starts inside at textrange and covers the whole node visually, extend start to cover the node start too\n if (end && end.nodeType === 1 && start.nodeType === 3) {\n if (end.firstChild === start && range.startOffset === 0) {\n if (end !== composer.element && end.nodeName !== 'LI' && end.nodeName !== 'TD') {\n range.setStartBefore(end);\n }\n }\n return;\n }\n\n // If range covers a whole textnode and the textnode is the only child of node, extend range to node \n if (start && start.nodeType === 3 && start === end && start.parentNode.childNodes.length === 1) {\n if (range.endOffset == end.data.length && range.startOffset === 0) {\n node = start.parentNode;\n if (node !== composer.element && node.nodeName !== 'LI' && node.nodeName !== 'TD') {\n range.setStartBefore(node);\n range.setEndAfter(node);\n }\n }\n return;\n }\n }", "title": "" }, { "docid": "c9a7150b95bed0e632fea5a03f42e277", "score": "0.5284753", "text": "function fixRangeCoverage(range, composer) {\n var node,\n start = range.startContainer,\n end = range.endContainer;\n\n // If range has only one childNode and it is end to end the range, extend the range to contain the container element too\n // This ensures the wrapper node is modified and optios added to it\n if (start && start.nodeType === 1 && start === end) {\n if (start.firstChild === start.lastChild && range.endOffset === 1) {\n if (start !== composer.element && start.nodeName !== 'LI' && start.nodeName !== 'TD') {\n range.setStartBefore(start);\n range.setEndAfter(end);\n }\n }\n return;\n }\n\n // If range starts outside of node and ends inside at textrange and covers the whole node visually, extend end to cover the node end too\n if (start && start.nodeType === 1 && end.nodeType === 3) {\n if (start.firstChild === end && range.endOffset === end.data.length) {\n if (start !== composer.element && start.nodeName !== 'LI' && start.nodeName !== 'TD') {\n range.setEndAfter(start);\n }\n }\n return;\n }\n \n // If range ends outside of node and starts inside at textrange and covers the whole node visually, extend start to cover the node start too\n if (end && end.nodeType === 1 && start.nodeType === 3) {\n if (end.firstChild === start && range.startOffset === 0) {\n if (end !== composer.element && end.nodeName !== 'LI' && end.nodeName !== 'TD') {\n range.setStartBefore(end);\n }\n }\n return;\n }\n\n // If range covers a whole textnode and the textnode is the only child of node, extend range to node \n if (start && start.nodeType === 3 && start === end && start.parentNode.childNodes.length === 1) {\n if (range.endOffset == end.data.length && range.startOffset === 0) {\n node = start.parentNode;\n if (node !== composer.element && node.nodeName !== 'LI' && node.nodeName !== 'TD') {\n range.setStartBefore(node);\n range.setEndAfter(node);\n }\n }\n return;\n }\n }", "title": "" }, { "docid": "5179bb2eb23728be4ccdfb932f8eb1f9", "score": "0.5275022", "text": "constructor() {\n super(expressionType_1.ExpressionType.IsTimeRange, IsTimeRange.evaluator, returnType_1.ReturnType.Boolean, functionUtils_1.FunctionUtils.validateUnary);\n }", "title": "" }, { "docid": "dac7f013c8607836831a17da4a04b243", "score": "0.52571106", "text": "setRange(newMin, newMax, oldMin = 0, oldMax = 1) {\n const newRangeDifference = newMax - newMin;\n const oldRangeDifference = oldMax - oldMin;\n let a = 0;\n if(oldRangeDifference != 0) {\n a = newRangeDifference / oldRangeDifference;\n }\n this.A = a;\n this.D = newMin - (a * oldMin);\n return copy(this);\n }", "title": "" }, { "docid": "f422846a7151a5269e70524c464e868d", "score": "0.5257054", "text": "unselectRange(range) {\n let a = null;\n let b = -1;\n let c = this._n;\n for (let d = 0; d < this._be.count; d++) {\n let e = this._be.item(d);\n if (e.intersectsWith(range)) {\n if (a == null) {\n a = new List$1(SpreadsheetCellRange.$, 0);\n for (let f = 0; f < d; f++) {\n a.add(this._be.item(f));\n }\n }\n if (range._contains1(e)) {\n continue;\n }\n let g = a.count;\n if (range.firstRow > e.firstRow) {\n a.add(new SpreadsheetCellRange(e.firstRow, e.firstColumn, range.firstRow - 1, e.lastColumn));\n }\n if (range.firstColumn > e.firstColumn) {\n a.add(new SpreadsheetCellRange(Math.max(range.firstRow, e.firstRow), e.firstColumn, Math.min(range.lastRow, e.lastRow), range.firstColumn - 1));\n }\n if (range.lastColumn < e.lastColumn) {\n a.add(new SpreadsheetCellRange(Math.max(range.firstRow, e.firstRow), range.lastColumn + 1, Math.min(range.lastRow, e.lastRow), e.lastColumn));\n }\n if (range.lastRow < e.lastRow) {\n a.add(new SpreadsheetCellRange(range.lastRow + 1, e.firstColumn, e.lastRow, e.lastColumn));\n }\n if (b < 0 && d >= this._bl) {\n if (d > this._bl || range._contains(this._n)) {\n b = g;\n c = a._inner[b]._c;\n }\n else {\n for (let h = g; h < a.count; h++) {\n if (a._inner[h]._contains(this._n)) {\n b = h;\n break;\n }\n }\n }\n }\n }\n else {\n if (b < 0 && d >= this._bl) {\n b = a == null ? d : a.count;\n c = d == this._bl ? this._n : e._c;\n }\n if (a != null) {\n a.add(e);\n }\n }\n }\n if (a != null) {\n if (a.count == 0) {\n a.add(new SpreadsheetCellRange(c.row, c.column));\n }\n if (b < 0) {\n b = 0;\n c = a._inner[0]._c;\n }\n this._resetSelection(a.toArray(), c, b, false);\n }\n }", "title": "" }, { "docid": "6264df2f3091b612572e1daf30c74512", "score": "0.5253243", "text": "setYRange(min, max) {\n if (min >= max) {\n throw new Error(`the minimum must be less than the maximum, but ${min} is greater than or equal to ${max}`);\n }\n this.yMin = min;\n this.yMax = max;\n this._resize();\n }", "title": "" }, { "docid": "19bef487ddeedff10435bb1a1f2f479b", "score": "0.5246359", "text": "_setRanges(selectedValue) {\n if (selectedValue instanceof DateRange) {\n this._rangeStart = this._getCellCompareValue(selectedValue.start);\n this._rangeEnd = this._getCellCompareValue(selectedValue.end);\n this._isRange = true;\n }\n else {\n this._rangeStart = this._rangeEnd = this._getCellCompareValue(selectedValue);\n this._isRange = false;\n }\n this._comparisonRangeStart = this._getCellCompareValue(this.comparisonStart);\n this._comparisonRangeEnd = this._getCellCompareValue(this.comparisonEnd);\n }", "title": "" }, { "docid": "19bef487ddeedff10435bb1a1f2f479b", "score": "0.5246359", "text": "_setRanges(selectedValue) {\n if (selectedValue instanceof DateRange) {\n this._rangeStart = this._getCellCompareValue(selectedValue.start);\n this._rangeEnd = this._getCellCompareValue(selectedValue.end);\n this._isRange = true;\n }\n else {\n this._rangeStart = this._rangeEnd = this._getCellCompareValue(selectedValue);\n this._isRange = false;\n }\n this._comparisonRangeStart = this._getCellCompareValue(this.comparisonStart);\n this._comparisonRangeEnd = this._getCellCompareValue(this.comparisonEnd);\n }", "title": "" }, { "docid": "19bef487ddeedff10435bb1a1f2f479b", "score": "0.5246359", "text": "_setRanges(selectedValue) {\n if (selectedValue instanceof DateRange) {\n this._rangeStart = this._getCellCompareValue(selectedValue.start);\n this._rangeEnd = this._getCellCompareValue(selectedValue.end);\n this._isRange = true;\n }\n else {\n this._rangeStart = this._rangeEnd = this._getCellCompareValue(selectedValue);\n this._isRange = false;\n }\n this._comparisonRangeStart = this._getCellCompareValue(this.comparisonStart);\n this._comparisonRangeEnd = this._getCellCompareValue(this.comparisonEnd);\n }", "title": "" }, { "docid": "19bef487ddeedff10435bb1a1f2f479b", "score": "0.5246359", "text": "_setRanges(selectedValue) {\n if (selectedValue instanceof DateRange) {\n this._rangeStart = this._getCellCompareValue(selectedValue.start);\n this._rangeEnd = this._getCellCompareValue(selectedValue.end);\n this._isRange = true;\n }\n else {\n this._rangeStart = this._rangeEnd = this._getCellCompareValue(selectedValue);\n this._isRange = false;\n }\n this._comparisonRangeStart = this._getCellCompareValue(this.comparisonStart);\n this._comparisonRangeEnd = this._getCellCompareValue(this.comparisonEnd);\n }", "title": "" }, { "docid": "19bef487ddeedff10435bb1a1f2f479b", "score": "0.5246359", "text": "_setRanges(selectedValue) {\n if (selectedValue instanceof DateRange) {\n this._rangeStart = this._getCellCompareValue(selectedValue.start);\n this._rangeEnd = this._getCellCompareValue(selectedValue.end);\n this._isRange = true;\n }\n else {\n this._rangeStart = this._rangeEnd = this._getCellCompareValue(selectedValue);\n this._isRange = false;\n }\n this._comparisonRangeStart = this._getCellCompareValue(this.comparisonStart);\n this._comparisonRangeEnd = this._getCellCompareValue(this.comparisonEnd);\n }", "title": "" }, { "docid": "fd77c1a005c580e2e514f66852f85ae4", "score": "0.52431256", "text": "function RangeObject() {\n this.max = -Infinity;\n this.min = Infinity;\n}", "title": "" }, { "docid": "9b0456d96d2b631b97d4f490e18fe3b9", "score": "0.523716", "text": "function range (start, end) {\n let rangeArr = [];\n\n return start === end ? start : false;\n\n\n }", "title": "" }, { "docid": "2a54057a3d4fe1503935a5aaa16f8056", "score": "0.52247345", "text": "function range(from, to) {\n let r = Object.create(range.methods);\n\n r.from = from;\n r.to = to;\n\n return r;\n}", "title": "" }, { "docid": "df1069b62c22f9513ed3c9121bb02e39", "score": "0.5214332", "text": "equals(range, another) {\n return Point.equals(range.anchor, another.anchor) && Point.equals(range.focus, another.focus);\n }", "title": "" }, { "docid": "32430c2617e53db0ee3a5e28c6c3ea7b", "score": "0.5214247", "text": "function range_setTheStart(range, node, offset) {\n /**\n * 1. If node is a doctype, then throw an \"InvalidNodeTypeError\" DOMException.\n * 2. If offset is greater than node’s length, then throw an \"IndexSizeError\"\n * DOMException.\n * 3. Let bp be the boundary point (node, offset).\n * 4. If these steps were invoked as \"set the start\"\n * 4.1. If bp is after the range’s end, or if range’s root is not equal to\n * node’s root, set range’s end to bp.\n * 4.2. Set range’s start to bp.\n */\n if (util_1.Guard.isDocumentTypeNode(node)) {\n throw new DOMException_1.InvalidNodeTypeError();\n }\n if (offset > TreeAlgorithm_1.tree_nodeLength(node)) {\n throw new DOMException_1.IndexSizeError();\n }\n var bp = [node, offset];\n if (range_root(range) !== TreeAlgorithm_1.tree_rootNode(node) ||\n BoundaryPointAlgorithm_1.boundaryPoint_position(bp, range._end) === interfaces_1.BoundaryPosition.After) {\n range._end = bp;\n }\n range._start = bp;\n}", "title": "" } ]
e5b9a28b52815d3565564d2520663117
SECTION: handle `change` event
[ { "docid": "1246f15d91e5a609badafd32cbef3377", "score": "0.0", "text": "function shouldUseChangeEvent(elem) {\n\t var nodeName = elem.nodeName && elem.nodeName.toLowerCase();\n\t return nodeName === 'select' || nodeName === 'input' && elem.type === 'file';\n\t}", "title": "" } ]
[ { "docid": "e71cf7d105f8988d0d3bae04b2cfa702", "score": "0.7592929", "text": "changeHandler(e) {\n this.trigger('change', e);\n const element = e.target;\n this.validate(element.name);\n }", "title": "" }, { "docid": "900339f4a87580d5e44f16c1eecf4a6c", "score": "0.7568606", "text": "_onchange() {}", "title": "" }, { "docid": "900339f4a87580d5e44f16c1eecf4a6c", "score": "0.7568606", "text": "_onchange() {}", "title": "" }, { "docid": "2b2649bdb234eeb32e230a1f603da0f7", "score": "0.75674653", "text": "_handleChange(e) {\n this.value = e.detail.value;\n this.dispatchEvent(\n new CustomEvent(\"change\", { bubbles: true, detail: this })\n );\n }", "title": "" }, { "docid": "f599561359add6cbb6f32532c520ed61", "score": "0.7560664", "text": "function onChange() {\n\t\tdebug( 'Received a change event.' );\n\t\tself.render();\n\t}", "title": "" }, { "docid": "8e936382b6ca98efd4da741fccb8d507", "score": "0.7553725", "text": "function optionChanged(change){\n getInfo(change);\n}", "title": "" }, { "docid": "f6984776871faeeb268ad41ea4a40d30", "score": "0.7541782", "text": "onchange() {\n\n }", "title": "" }, { "docid": "b13ccd5e4ba4c3c1ca840e3210b9e90b", "score": "0.75410753", "text": "handleChange(event){\n\t\tconsole.log(\"CHANGED\");\n\t}", "title": "" }, { "docid": "15042c14654cfa41db5df836011f0d47", "score": "0.7471845", "text": "changeHandler(e) {\n this.trigger('change', e);\n let element = e.target;\n this.validate(element.name);\n }", "title": "" }, { "docid": "accc76bcd433f09b7504e299c38a4d48", "score": "0.72802746", "text": "handleChange(e) {\n // ignore change events until ready\n if (!this.ready) {\n return;\n }\n\n // change events without detail should be ignored\n if (!e.detail) {\n return;\n }\n\n if (this.isTypeName || this.isTypeAddress || this.isTypeLocation) {\n this.handleCompoundFieldChange(e);\n return;\n }\n\n if (e.detail.checked !== undefined) {\n this.liveValue = e.detail.checked;\n } else if (this.isTypeReference) {\n // multiselect doesn't actually work yet,\n // normalize falsey values\n this.liveValue = e.detail.value[0] ? e.detail.value[0] : '';\n } else {\n this.liveValue = e.detail.value;\n }\n\n if (this.liveValue !== this.originalValue) {\n this.isDirty = true;\n if (this.serverError) {\n this.setCustomValidity();\n this.serverError = false;\n }\n } else {\n this.isDirty = false;\n }\n\n if (this.canBeControllingField) {\n this.dispatchControllerFieldChangeEvent(\n this.fieldName,\n this.liveValue\n );\n }\n }", "title": "" }, { "docid": "57cb104e508a1600ba4f3cb351b9290e", "score": "0.7200315", "text": "function onChange() {\n\t\t\tfield.owner.onFieldChanged(this, field.getValue());\n\t\t}", "title": "" }, { "docid": "e15c97eb80770de41d87fbdb0268489f", "score": "0.71194375", "text": "handleChange(e) {\n // ignore change events until ready\n if (!this.ready) {\n return;\n } // change events without detail should be ignored\n\n\n if (!e.detail) {\n return;\n }\n\n if (this.isTypeName || this.isTypeAddress || this.isTypeLocation) {\n this.handleCompoundFieldChange(e);\n return;\n }\n\n if (e.detail.checked !== undefined) {\n this.internalValue = e.detail.checked;\n } else if (this.isTypeReference) {\n // multiselect doesn't actually work yet,\n // normalize falsey values\n this.internalValue = e.detail.value[0] ? e.detail.value[0] : ''; // ignore reset of value from bubble to interop\n\n this._inChangeCycle = true; // eslint-disable-next-line @lwc/lwc/no-async-operation\n\n setTimeout(() => {\n this._inChangeCycle = false;\n }, 0);\n } else {\n this.internalValue = e.detail.value;\n }\n\n if (this.internalValue !== this.originalValue) {\n this.isDirty = true;\n\n if (this.serverError) {\n this.setCustomValidity();\n this.serverError = false;\n }\n } else {\n this.isDirty = false;\n }\n\n if (this.canBeControllingField) {\n this.dispatchControllerFieldChangeEvent(this.fieldName, this.internalValue);\n }\n }", "title": "" }, { "docid": "f35ca54f9e4fbc5548f16af015a45827", "score": "0.7117648", "text": "handleOnChange() {\n console.log(\"changed\");\n }", "title": "" }, { "docid": "f35ca54f9e4fbc5548f16af015a45827", "score": "0.7117648", "text": "handleOnChange() {\n console.log(\"changed\");\n }", "title": "" }, { "docid": "e371780c996dd8f6eb38006b0850139b", "score": "0.7031178", "text": "function change() {\n \n }", "title": "" }, { "docid": "61835c5357c04ae27b46b508726de681", "score": "0.7027304", "text": "onChange(change) {\n throw new Error('must override');\n }", "title": "" }, { "docid": "597b3a61d107c0e7794742044237e0fe", "score": "0.70207226", "text": "onChange(newValue, oldValue) {}", "title": "" }, { "docid": "835520efb59637d55b199f4e22d78202", "score": "0.6945018", "text": "handleChange(newValue) {\n this.invokeOnChange(this.datavalue, { type: 'change' }, this.ngModel.valid);\n }", "title": "" }, { "docid": "dac6b865e04e7395bec239e4822b7815", "score": "0.6940195", "text": "onChange() {}", "title": "" }, { "docid": "5a14f5d80615988881ace647f90b5698", "score": "0.69247746", "text": "function handleChange(editor, data, value) {\n onChange(value);\n }", "title": "" }, { "docid": "20407566c0086bddf553586b7a020d5b", "score": "0.6873735", "text": "onChange() { /**/ }", "title": "" }, { "docid": "2d00e9a26637a06a2270cb02759f9554", "score": "0.68272203", "text": "change () {}", "title": "" }, { "docid": "5e45f77d2b71aa90579fd03a24890bde", "score": "0.6818512", "text": "on(event, handler) {\r\n this.$form.change(event, handler);\r\n }", "title": "" }, { "docid": "85e079b20fe06dbd016acaa7a9abe0e8", "score": "0.6817747", "text": "onchange() {\n this.updateDependents();\n }", "title": "" }, { "docid": "8d15804af2249b3b5dd66560842f3b63", "score": "0.68003863", "text": "function onChange() {\n\n // update preview considering the changed input value\n updatePreview();\n\n // perform change actions\n self.onchange && self.onchange( self );\n\n }", "title": "" }, { "docid": "419782c0900ab65f0f8ab3d51c54fed1", "score": "0.6779633", "text": "function onChange(value) {\n console.log('changed', value);\n}", "title": "" }, { "docid": "5ce2bd78cee39310f9294761c8aa2a88", "score": "0.67728907", "text": "function onChange(objParam) {\n objParam.addEventListener('change', updateUI);\n}", "title": "" }, { "docid": "f364d95914e3b43d9c60e6d06bbf86a4", "score": "0.6758431", "text": "function optionChanged(newValue){\n\n demographicInfo(newValue);\n buildPlot(newValue);\n //DropDownMenu(newValue);\n\n }", "title": "" }, { "docid": "cef3f84da5a7e675dc444242667fc327", "score": "0.6744746", "text": "handlePicklistProgrammaticChange(event) {\n if (!this.ready) {\n return;\n }\n\n this.internalValue = event.target.value;\n this.dispatchControllerFieldChangeEvent(this.fieldName, this.internalValue);\n }", "title": "" }, { "docid": "558471c580ea9b49361966ae28c4493f", "score": "0.67204165", "text": "function handleFieldChange(name, value) {\n console.log('handle field change', name, value);\n}", "title": "" }, { "docid": "059cfbd05d11cebc176481067c269140", "score": "0.6711972", "text": "function handleChange(event) {\n // console.log('event: ', event)\n // console.log(event.target.value)\n switch (event.target.name) {\n case \"name\":\n setName(event.target.value);\n break;\n case \"plants\":\n setPlants(event.target.value);\n break;\n case \"location\":\n setLocation(event.target.value);\n break;\n case \"phone\":\n setPhone(event.target.value);\n break;\n default:\n break;\n }\n }", "title": "" }, { "docid": "cdda1faae8ccdc524f10dd85d79e7676", "score": "0.6702231", "text": "handleChange() {\n this.$emit(\"change\");\n }", "title": "" }, { "docid": "cdda1faae8ccdc524f10dd85d79e7676", "score": "0.6702231", "text": "handleChange() {\n this.$emit(\"change\");\n }", "title": "" }, { "docid": "cdda1faae8ccdc524f10dd85d79e7676", "score": "0.6702231", "text": "handleChange() {\n this.$emit(\"change\");\n }", "title": "" }, { "docid": "cdda1faae8ccdc524f10dd85d79e7676", "score": "0.6702231", "text": "handleChange() {\n this.$emit(\"change\");\n }", "title": "" }, { "docid": "1605661d9d5861f9f871932661f2ef42", "score": "0.6700194", "text": "dispatchChangeEvent() {\n this.dispatchEvent(new CustomEvent('change', {\n composed: true,\n bubbles: true,\n detail: {\n value: this.internalValue\n }\n }));\n }", "title": "" }, { "docid": "9e414736bdb0c849207489b267782b44", "score": "0.66669816", "text": "onChange(event) {\n const { target } = event;\n const changeEvent = this.getAttribute('change-event');\n const actionEvent = new CustomEvent(changeEvent, {\n bubbles: true,\n detail: Object.assign({}, {\n orginalEvent: event,\n selectedIndex: target.selectedIndex,\n selectedValue: target.selectedOptions[0].value,\n options: target.options,\n }),\n });\n this.dispatchEvent(actionEvent);\n }", "title": "" }, { "docid": "4fbb1f9780f358928bc2f0fc8fda7083", "score": "0.6660732", "text": "handleChange(event) {\n \n this.selectedFields =event.detail.value;\n\n }", "title": "" }, { "docid": "e4ac48f1ca890f5ed535becf1f043c2e", "score": "0.6658704", "text": "changeEvent(event) {\n this.formTarget.dataset.expenseEntryChanged = '1';\n }", "title": "" }, { "docid": "a052c30292e7bfe882335cc3cf0edadb", "score": "0.6621397", "text": "_changed() {\n if (this.onChanged) {\n this.onChanged();\n }\n }", "title": "" }, { "docid": "62cc85eba074147f6467d053a7f624e0", "score": "0.6611353", "text": "_emit() {\n this.dispatchEvent(new CustomEvent(\"change\", { detail: this.value }));\n }", "title": "" }, { "docid": "bdc70f3844aed54019353b5a4f7a6476", "score": "0.65954167", "text": "_onChange() {\n // Dummy\n }", "title": "" }, { "docid": "88ef447c911c076c5a4ee77d23728d8f", "score": "0.65948546", "text": "function handleChange(e){\n setValue(e.target.value);\n inputContent = e.target.value;\n }", "title": "" }, { "docid": "e705197328f90e3802a4ffbaa341c86a", "score": "0.65787584", "text": "function handleChange(e) {\n setValue(e.target.value);\n }", "title": "" }, { "docid": "33a38a89188977c158a0a4142c23144f", "score": "0.65742", "text": "handleChange(e) {\n\t\tthis.props.handleChange(e.target.value);\n\t}", "title": "" }, { "docid": "3750aedb1e3272788e25e183d7064e14", "score": "0.6570578", "text": "function handleChange(e) {\n\t\tupdateCurrentGroup({\n\t\t\t...currentGroup,\n\t\t\ttodos: currentGroup.todos.map((todo) => {\n\t\t\t\tif (todo.id === selectedTodo.getAttribute('id')) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...todo,\n\t\t\t\t\t\ttask: e.target.value\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\treturn todo;\n\t\t\t})\n\t\t});\n\t\tconsole.log(e.target.value);\n\t}", "title": "" }, { "docid": "9e69272a9d232b482a863fa08053c231", "score": "0.6565022", "text": "function onChange(event) {\n setValue(event.target.value);\n }", "title": "" }, { "docid": "67d93448e844b4d8012f4ed2d625b5d5", "score": "0.65584105", "text": "function checkForChange()\r\n{\r\n document.getElementById(\"sizeStatInput\").onchange = function()\r\n {\r\n size = document.getElementById(\"sizeStatInput\").value;\r\n console.log(\"New Size is \" + size);\r\n };\r\n\r\n\r\n document.getElementById(\"alignmentStatInput\").onchange = function()\r\n {\r\n alignment = document.getElementById(\"alignmentStatInput\").value;\r\n console.log(\"New Alignment is \" + alignment);\r\n };\r\n\r\n document.getElementById(\"movementStatInput\").onchange = function()\r\n {\r\n movement = document.getElementById(\"movementStatInput\").value;\r\n console.log(\"New Movement is \" + movement);\r\n };\r\n}", "title": "" }, { "docid": "82780f8ad51eea383d67e917af944c29", "score": "0.6552825", "text": "onchange(e,name){\n let val = e.target.value;\n switch (name){\n case 'port':\n portId=val;\n break;\n case 'goods':\n goodstypeId=val;\n break;\n case 'tree':\n treetypeId=val;\n break;\n case 'length':\n lengthId=val;\n break;\n }\n this.findGet();\n }", "title": "" }, { "docid": "c4807a73c14a5b17fcf469258cdd2510", "score": "0.6522923", "text": "function handleChange(event) {\n var _a = event.target, name = _a.name, value = _a.value;\n setInputs(function (prevState) {\n var _a;\n return (__assign(__assign({}, prevState), (_a = {}, _a[name] = value, _a)));\n });\n handleError(name, value);\n determineIfStepComplete();\n }", "title": "" }, { "docid": "e49900778d721c6af8603f06522cee65", "score": "0.6514924", "text": "function optionChanged(id) {\n \n Change();\n\n Charts(id);\n\n}", "title": "" }, { "docid": "5e804a7484595109b9750401ae12d9c9", "score": "0.65119624", "text": "onChange(callback) {\n this.changeCallback = callback;\n this.controls.addEventListener('change', callback);\n }", "title": "" }, { "docid": "417d3f02267315d632477206e4695e71", "score": "0.6502674", "text": "function handleChange(event) {\n const value = event.target.value;\n setCurrentMsg(value);\n }", "title": "" }, { "docid": "424b6fe5c66d369fd6d1a3703dd97f12", "score": "0.6496724", "text": "function trackChanges(){\n $('.main').on('change', 'input', event=>{\n $('.main').data(\"changed\", true);\n })\n}", "title": "" }, { "docid": "20a0aba1af6d434c450879699d2bd644", "score": "0.6494307", "text": "trackChange(event) {\n\t\tthis.configuration[event.target.name] = this._extractInputValue(event);\n\t\tthis.configUpdated();\n\t}", "title": "" }, { "docid": "1f91b5659964d696d75f44771968c590", "score": "0.6488912", "text": "handleChange(event) {\n this.props.changeBookShelf(this.props.book, event.target.value);\n }", "title": "" }, { "docid": "2c355f0682755149db1024dcf8301fc0", "score": "0.6487489", "text": "handleChange(change) {\n // removed check for isChanged argument to fire the PROJECT_DIRTY event for every change in the form\n // this.props.fireProjectDirty(change)\n this.props.onProjectChange(change)\n }", "title": "" }, { "docid": "be86784daafb5e3c31185fd9999eba1a", "score": "0.6465989", "text": "changeHandler(e) {\n\n /*\n The <select> dropdown sets a value to 'selected month' on the local state.\n This value will be used to filter the array of shows displayed.\n */\n this.setState({selectedMonth: e.target.value})\n }", "title": "" }, { "docid": "71621c1303dd35dc86637be5532db438", "score": "0.6465811", "text": "_onSelectChange() {\n\t\tvar variant = this._getVariantFromOptions();\n\n\t\tthis.container.dispatchEvent(\n\t\t\tnew CustomEvent('variantChange', {\n\t\t\t\tdetail: {\n\t\t\t\t\tvariant: variant\n\t\t\t\t},\n\t\t\t\tbubbles: true,\n\t\t\t\tcancelable: true\n\t\t\t})\n\t\t);\n\n\t\tif (!variant) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._updateMasterSelect(variant);\n\t\tthis._updateImages(variant);\n\t\tthis._updatePrice(variant);\n\t\tthis._updateSKU(variant);\n\t\tthis.currentVariant = variant;\n\n\t\tif (this.enableHistoryState) {\n\t\t\tthis._updateHistoryState(variant);\n\t\t}\n\t}", "title": "" }, { "docid": "a5994dbc8a27f9452b1e9771b582a27c", "score": "0.64599437", "text": "function onChangeValue (val) {\n\tconsole.log('Value changed: ', val);\n}", "title": "" }, { "docid": "c85da6e89a2288fd89c8523e4372f44c", "score": "0.64592916", "text": "handleChange(source, propertyName) {\n super.handleChange(source, propertyName);\n\n if (propertyName === \"value\") {\n this.updateValue();\n }\n }", "title": "" }, { "docid": "558f4620404b488e2047ae0d25f7ddbd", "score": "0.6447646", "text": "function handleChange (id) {\n\tvar value;\n\tvar io;\n\tvar lid, sid;\n\n\t// logEventTime(\"handleChange start\");\n\tif (id == undefined || typeof (id) == \"object\") {\n\t\tif (this.id) {\n\t\t\tid = this.id;\n\t\t} else if (this.name) {\n\t\t\tid = this.name;\n\t\t} else {\n\t\t\tassert(this.event, \"handleChange: bad event: \"+id);\n\t\t\tif (this.event.target) {\n\t\t\t\tid = this.event.target.id;\n\t\t\t} else if (this.event.srcElement) {\n\t\t\t\tid = this.event.srcElement.id;\t\t\t// IE - sigh\n\t\t\t}\n\t\t}\n\t}\n\tvalue = getInputField(id);\n\tlid = gIO.elts[id].link || id;\n\tio = gIO.elts[lid];\t\t// get linked io element\n\tassert(io && io.input, \"handleChange: bad id: \"+lid);\n\tif (value != io.fieldValue) {\n\t\tsetupInput(lid, value);\n\t\tif (io.desc.onchange) {\n\t\t\tevalComp(io.desc.onchange, {id: lid});\t\t// execute target onchange handler (only one)\n\t\t}\n\t\t// compute each linked elements page\n\t\tfor (sid in io.linked) {\n\t\t\tcomputePage(gIO.elts[sid].page);\n\t\t}\n\t\tsaveInput();\n\t\t// Android bug: selected values aren't displayed until refreshed\n\t\tif (gDev.platform == \"Android\" && io.desc.type[0].toLowerCase() == 'o') {\n\t\t\trefreshElt(id);\n\t\t}\n\t}\n\t// logEventTime(\"handleChange complete\");\n\treturn (true);\n}", "title": "" }, { "docid": "7f10e8c835f5290039205d5330feca94", "score": "0.64425534", "text": "function handleChange(e) {//Get a hold of an input value and set it to a new input value\n\t\tconst newInput = e.target.value;\n\t\tsetInputText(newInput);\n }", "title": "" }, { "docid": "989d557e332eaf23522e213e0c2c710f", "score": "0.6436534", "text": "function changed() {\n\t\t\t\t_dispatchEvent(_this, rootEl, 'change', target, el, rootEl, oldIndex, _index(dragEl, options.draggable), evt);\n\t\t\t}", "title": "" }, { "docid": "3e54deaa177e4482f56634aa80ddc443", "score": "0.6431187", "text": "handleChange(event) {\n this.radioSelected.emit({ 'name': event.target.getAttribute('name'), 'value': event.target.getAttribute('value'), 'isChecked': event.target.checked });\n }", "title": "" }, { "docid": "79306f3053dbdffcfe8c894e3da7aad9", "score": "0.6424839", "text": "onEventSelect(e) {\n\t// tell our parent that something changed.\n\tthis.props.onEventChange(e.target.value);\n }", "title": "" }, { "docid": "b4e34c4741ad5f28cb7d6c0b2fb6f603", "score": "0.6424559", "text": "function SelectionChange() { }", "title": "" }, { "docid": "b4e34c4741ad5f28cb7d6c0b2fb6f603", "score": "0.6424559", "text": "function SelectionChange() { }", "title": "" }, { "docid": "dcd071ffe658489b58f4584371d6e19c", "score": "0.64149433", "text": "function shouldUseChangeEvent(elem){var nodeName=elem.nodeName&&elem.nodeName.toLowerCase();return nodeName==='select'||nodeName==='input'&&elem.type==='file';}", "title": "" }, { "docid": "dcd071ffe658489b58f4584371d6e19c", "score": "0.64149433", "text": "function shouldUseChangeEvent(elem){var nodeName=elem.nodeName&&elem.nodeName.toLowerCase();return nodeName==='select'||nodeName==='input'&&elem.type==='file';}", "title": "" }, { "docid": "dcd071ffe658489b58f4584371d6e19c", "score": "0.64149433", "text": "function shouldUseChangeEvent(elem){var nodeName=elem.nodeName&&elem.nodeName.toLowerCase();return nodeName==='select'||nodeName==='input'&&elem.type==='file';}", "title": "" }, { "docid": "dcd071ffe658489b58f4584371d6e19c", "score": "0.64149433", "text": "function shouldUseChangeEvent(elem){var nodeName=elem.nodeName&&elem.nodeName.toLowerCase();return nodeName==='select'||nodeName==='input'&&elem.type==='file';}", "title": "" }, { "docid": "dcd071ffe658489b58f4584371d6e19c", "score": "0.64149433", "text": "function shouldUseChangeEvent(elem){var nodeName=elem.nodeName&&elem.nodeName.toLowerCase();return nodeName==='select'||nodeName==='input'&&elem.type==='file';}", "title": "" }, { "docid": "dcd071ffe658489b58f4584371d6e19c", "score": "0.64149433", "text": "function shouldUseChangeEvent(elem){var nodeName=elem.nodeName&&elem.nodeName.toLowerCase();return nodeName==='select'||nodeName==='input'&&elem.type==='file';}", "title": "" }, { "docid": "dcd071ffe658489b58f4584371d6e19c", "score": "0.64149433", "text": "function shouldUseChangeEvent(elem){var nodeName=elem.nodeName&&elem.nodeName.toLowerCase();return nodeName==='select'||nodeName==='input'&&elem.type==='file';}", "title": "" }, { "docid": "dcd071ffe658489b58f4584371d6e19c", "score": "0.64149433", "text": "function shouldUseChangeEvent(elem){var nodeName=elem.nodeName&&elem.nodeName.toLowerCase();return nodeName==='select'||nodeName==='input'&&elem.type==='file';}", "title": "" }, { "docid": "dcd071ffe658489b58f4584371d6e19c", "score": "0.64149433", "text": "function shouldUseChangeEvent(elem){var nodeName=elem.nodeName&&elem.nodeName.toLowerCase();return nodeName==='select'||nodeName==='input'&&elem.type==='file';}", "title": "" }, { "docid": "dcd071ffe658489b58f4584371d6e19c", "score": "0.64149433", "text": "function shouldUseChangeEvent(elem){var nodeName=elem.nodeName&&elem.nodeName.toLowerCase();return nodeName==='select'||nodeName==='input'&&elem.type==='file';}", "title": "" }, { "docid": "dcd071ffe658489b58f4584371d6e19c", "score": "0.64149433", "text": "function shouldUseChangeEvent(elem){var nodeName=elem.nodeName&&elem.nodeName.toLowerCase();return nodeName==='select'||nodeName==='input'&&elem.type==='file';}", "title": "" }, { "docid": "dcd071ffe658489b58f4584371d6e19c", "score": "0.64149433", "text": "function shouldUseChangeEvent(elem){var nodeName=elem.nodeName&&elem.nodeName.toLowerCase();return nodeName==='select'||nodeName==='input'&&elem.type==='file';}", "title": "" }, { "docid": "dcd071ffe658489b58f4584371d6e19c", "score": "0.64149433", "text": "function shouldUseChangeEvent(elem){var nodeName=elem.nodeName&&elem.nodeName.toLowerCase();return nodeName==='select'||nodeName==='input'&&elem.type==='file';}", "title": "" }, { "docid": "dcd071ffe658489b58f4584371d6e19c", "score": "0.64149433", "text": "function shouldUseChangeEvent(elem){var nodeName=elem.nodeName&&elem.nodeName.toLowerCase();return nodeName==='select'||nodeName==='input'&&elem.type==='file';}", "title": "" }, { "docid": "dcd071ffe658489b58f4584371d6e19c", "score": "0.64149433", "text": "function shouldUseChangeEvent(elem){var nodeName=elem.nodeName&&elem.nodeName.toLowerCase();return nodeName==='select'||nodeName==='input'&&elem.type==='file';}", "title": "" }, { "docid": "8220dce12e13e91bb9dcd7c638fab39a", "score": "0.6414516", "text": "function changeHandler(e) {\n setInput(e.target.value)\n }", "title": "" }, { "docid": "231945fccaf47f27b6ba5a6ca3ad8c5f", "score": "0.6414381", "text": "function optionChanged(name){\n if (name !== '-1') {\n console.log('')\n console.log('---------------------------------')\n console.log('Drop-down list item selected')\n console.log('---------------------------------')\n console.log('01. Drop-down list item selected');\n console.log('02. User selected #' + name + \" [via optionChanged()]\");\n\n // Assign \"selectedName\" - this is what the functions for plotting need as input/filter\n selectedName = name;\n dropDownSelectedEvent(selectedName);\n plotBar(selectedName);\n plotGauge(selectedName);\n plotBubble(selectedName);\n }\n}", "title": "" }, { "docid": "0bee12a84108e65bf392970eac80a872", "score": "0.6405526", "text": "function handleChange(event) {\n setNewTodoValue(event.target.value);\n }", "title": "" }, { "docid": "cb19fcc5969bec4fa3de78496dfafa1f", "score": "0.64015585", "text": "onChangedEvent(event) {\n if (!this.isWritingValue) {\n const element = this.elementRef.nativeElement;\n let changed = false;\n switch (event.type) {\n case 'selected-items-changed':\n case 'selected-item-changed': {\n const property = this.getSelectableProperty(element);\n changed = property === 'selectedItems' || property === 'selectedItem';\n break;\n }\n case 'selected-values-changed':\n case 'selected-changed': {\n const property = this.getSelectableProperty(element);\n changed = property === 'selectedValues' || property === 'selected';\n break;\n }\n default:\n changed = true;\n }\n if (changed) {\n let property;\n if (this.isMultiSelectable(element) || this.isSelectable(element)) {\n // property will be defined if we reach this since changed can only\n // be true if the property is defined for selectable elements\n property = this.getSelectableProperty(element);\n }\n else if (this.isCheckedElement(element)) {\n property = 'checked';\n }\n else {\n property = 'value';\n }\n // Don't use `event.detail.value`, since we cannot assume that all\n // change events will provide that. Additionally, some event details\n // may be splices of an array or object instead of the current value.\n this.onChange(element[property]);\n }\n }\n }", "title": "" }, { "docid": "9276ed65186fe4c2dedd66d6c4be5909", "score": "0.63818854", "text": "function handleChange(e) {\n setText(e.target.value);\n }", "title": "" }, { "docid": "613cd4267e2a8ef3e7b2a49e445d273a", "score": "0.63805735", "text": "function handleOptionChange(e){\n setStatus(e.target.value);\n }", "title": "" }, { "docid": "eb514c38c6834f73a4e76fabcf8388cb", "score": "0.6380313", "text": "function handleChange(_event) {\r\n let target = _event.target;\r\n target.setAttribute(\"value\", target.value);\r\n }", "title": "" }, { "docid": "52ebf6b95b5f9249fbe4b1c02aa118b5", "score": "0.6379507", "text": "_onChange(e) {\n if (e.srcElement === this.$.button)\n this.dispatchEvent(\n new CustomEvent(\"editable-table-setting-changed\", {\n bubbles: true,\n cancelable: true,\n composed: true,\n detail: {\n prop: this.prop,\n value: e.srcElement.checked\n }\n })\n );\n }", "title": "" }, { "docid": "29d100b2fd899e24efc6e483decab758", "score": "0.6373163", "text": "function shouldUseChangeEvent(elem){var nodeName=elem.nodeName && elem.nodeName.toLowerCase();return nodeName === 'select' || nodeName === 'input' && elem.type === 'file';}", "title": "" }, { "docid": "9fc708ae0ace69509436f5fb8ced1976", "score": "0.6369274", "text": "function handleChange(event){\r\n switch (event.target.name) {\r\n case \"createPass\":\r\n setPass(event.target.value)\r\n break;\r\n case \"reEnter\":\r\n setConfPass(event.target.value)\r\n break;\r\n \r\n default:\r\n break;\r\n }\r\n }", "title": "" }, { "docid": "fa4dab622e6c09c79d7da8a0aa928780", "score": "0.6364948", "text": "function handleThisChange(e, value){\n selectedCourses = value\n}", "title": "" }, { "docid": "a4ac30f953cb2cf52e9e6b952d48c23e", "score": "0.6362732", "text": "function changeFunction(event) {\n event.preventDefault();\n event.stopPropagation();\n event.stopImmediatePropagation();\n event.target.parentNode.syncGetters();//iphone sometimes doesn't do a key like with time wheels\n\n GS.triggerEvent(event.target.parentNode, 'change');\n\n return false;\n }", "title": "" }, { "docid": "9e0b204dd9a9478679f42266650ed5a2", "score": "0.63567984", "text": "_onChange(){\n\n // Let the world know\n this._mediator.publish('trigger', {\n toggle: this,\n id: this.getId(),\n active: this._element.value === '',\n targets: this._targets,\n force: true\n });\n\n }", "title": "" }, { "docid": "662a73aa371741c4a9da65db06ebfeda", "score": "0.63558733", "text": "respondChange(e) {\n //target.value refers to the <select> tag\n this.props.ReceiveChange(e.target.value);\n }", "title": "" }, { "docid": "61adae5daa20a8843f3e077c0805110f", "score": "0.63501745", "text": "function optionChanged(newSample) { //\"this.value\" form HTML is \"newSample\" in optionChanged()\r\n // console.log(newSample);\r\n buildMetadata(newSample);\r\n buildCharts(newSample);\r\n\r\n }", "title": "" }, { "docid": "07e63f7c161161037ba0a3d106f0abd1", "score": "0.6348255", "text": "change(event) {\n\t\tvar name = event.target.name;\n\t\tvar value =\n\t\t\tevent.target.type === 'checkbox'\n\t\t\t\t? event.target.checked\n\t\t\t\t: event.target.value;\n\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\t[name]: value\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tconsole.log(this.state);\n\t\t\t\tthis.filteredData();\n\t\t\t}\n\t\t);\n\t}", "title": "" }, { "docid": "fd78b6d16cf806c91bce6e6aa45ee4de", "score": "0.633873", "text": "function changed() {\n\t\t\t\t_dispatchEvent(_this, rootEl, 'change', target, el, rootEl, oldIndex, _index(dragEl), oldDraggableIndex, _index(dragEl, options.draggable), evt);\n\t\t\t}", "title": "" }, { "docid": "96d7c68458e1b85b49f5a54dc70db939", "score": "0.63363934", "text": "changeValue(opt) {\n this.$emit('changeValue', opt);\n }", "title": "" } ]
f4ad2c53671bb6a835051f86c0f83b15
Return the current system time in milliseconds (just used to show the user how long it's been since the last feed update).
[ { "docid": "c45b94f0cc26f76cfd9c075383b26fa4", "score": "0.7125549", "text": "function currentTimeSeconds() { return Math.floor(new Date().getTime() / 1000); }", "title": "" } ]
[ { "docid": "d2f582cf068573d886cbd2428e78c877", "score": "0.82174474", "text": "function getCurrentTime() {\n\treturn Math.round(Date.now() / 1000)\n}", "title": "" }, { "docid": "40bcdfe464d802089887035b8aee587b", "score": "0.8065844", "text": "function system_time() {\r\n return new Date().getTime() / 1000;\r\n }", "title": "" }, { "docid": "0a4811760fe5bc902fc7d42798166241", "score": "0.79062855", "text": "function getCurrentTime() {\r\n\treturn parseInt((new Date()).getTime() / 1000);\r\n}", "title": "" }, { "docid": "0a4811760fe5bc902fc7d42798166241", "score": "0.79062855", "text": "function getCurrentTime() {\r\n\treturn parseInt((new Date()).getTime() / 1000);\r\n}", "title": "" }, { "docid": "5d053d8a08c6a0518c038a915d7dbe76", "score": "0.78280383", "text": "function _get_now_sec(){ return Math.round((new Date()).getTime() / 1000); }", "title": "" }, { "docid": "52feb6adc5abce879f53803d6e1f788f", "score": "0.7827545", "text": "function getCurrentTime()\n {\n return new Date().getTime() / 1000;\n }", "title": "" }, { "docid": "9ac9ee5af58b06c4a5da77db90012114", "score": "0.78227544", "text": "function get_now()\n {\n let start = new Date();\n start.setMilliseconds(0);\n\n return start/1000;\n }", "title": "" }, { "docid": "62d8aca5c74d5696f5494c607064707b", "score": "0.7818345", "text": "function now() {\n const hr = process.hrtime();\n return (hr[0] * 1000 + hr[1] / 1e6) - getTimeOrigin();\n}", "title": "" }, { "docid": "2fed89624fa360ed89b9f8fc407d93ff", "score": "0.77770895", "text": "function now() {\n return parseInt(new Date().getTime() / 1000);\n }", "title": "" }, { "docid": "5e6bea484756385fd38729bbad1f68f0", "score": "0.7722953", "text": "function currentTime() {\n return Math.floor(Date.now()/1000);\n}", "title": "" }, { "docid": "d592a2c95e3e1d0273aa98343052f6ed", "score": "0.7688866", "text": "function now() {\n var d = new Date();\n return Math.round(d.getTime() / 1000);\n}", "title": "" }, { "docid": "65c9cf1a461662ea347756268ad41f76", "score": "0.76788205", "text": "function getTimeMillis(){\n return parseInt(Date.now().toString());\n}", "title": "" }, { "docid": "e346bffce388a5cbb34b79a79b7c045b", "score": "0.7673371", "text": "function now() {\n var d = new Date()\n return Math.round(d.getTime() / 1000).toString()\n}", "title": "" }, { "docid": "6efee68d7d619fbf57e135220cc5926a", "score": "0.76687104", "text": "function now() { return (new Date()).getTime()/1000.0 }", "title": "" }, { "docid": "9fe834ed15f34a5ac494c52c73528f5f", "score": "0.7665283", "text": "function now() {\r\n return Math.floor(Date.now() / 1000)\r\n }", "title": "" }, { "docid": "b812e159dfefd3f368939342ebb28822", "score": "0.76434284", "text": "function time() {\r\n return Math.round((new Date()).getTime() / 1000); \r\n }", "title": "" }, { "docid": "1bb6a5ad042312631a9491d98cac6fc3", "score": "0.7638354", "text": "function now() {\n return Math.round((new Date()).valueOf() / 1000);\n }", "title": "" }, { "docid": "94b9686e53a68683bbdd729c67a623bf", "score": "0.76149803", "text": "function getTime() {\n return Math.floor(new Date().getTime() / 1000);\n }", "title": "" }, { "docid": "f849a51443895c97573e2e0347ed1a17", "score": "0.75933397", "text": "function getCurrentTime() {\r\n return Math.round(new Date().getTime() / 1000 / 60);\r\n }", "title": "" }, { "docid": "6af07bb2f45012d5e4189b0941bceb4e", "score": "0.75808525", "text": "function getCurTimeInMs() {\n return (new Date()).getTime();\n}", "title": "" }, { "docid": "32c1cac63e39031efd3fb3fb1f7d81a3", "score": "0.75473803", "text": "function getCurrentTime()\r\n\t{\r\n\t\treturn Math.round(new Date().getTime() / 1000 / 60);\r\n\t}", "title": "" }, { "docid": "3da87e8351b94aabd44c303604e134bd", "score": "0.7522741", "text": "function curTime() {\n return Date.now();\n}", "title": "" }, { "docid": "24884375e7d56c8b1f6091d22badbf2c", "score": "0.75222486", "text": "function now()\n{\n return ( new Date().getTime() ) / 1000.;\n}", "title": "" }, { "docid": "05596e3db309fe13b985ea5e4f9e466b", "score": "0.7515305", "text": "function getNow() {\n\tvar t = Date.now();\n\tt = Math.floor(t/1000);\n\tnow = t % 10000000\n}", "title": "" }, { "docid": "71d8a89679da14e6998ee39e365b51c6", "score": "0.74517727", "text": "static time(){\n\t\treturn Math.round((new Date()).getTime() / 1000);\n\t}", "title": "" }, { "docid": "bbe6181ee730b70723c54c577b756804", "score": "0.74087846", "text": "function getTime() {\n return (new Date().getTime()/1000);\n}", "title": "" }, { "docid": "a22ab43e12feb1cd1999c5a13e87336c", "score": "0.74035335", "text": "getCurrentTimeMiliSeconds() {\n return new Date().getTime();\n }", "title": "" }, { "docid": "3deefc05d240fa5eeb03be7046447f7e", "score": "0.73862195", "text": "function getTimeStamp() {\n var nowTime = Math.round(new Date().getTime() / 1000);\n return nowTime;\n}", "title": "" }, { "docid": "b555f0853d9ff315865e408ff1e0ffc9", "score": "0.7361043", "text": "function time() {\n return Math.floor(new Date().getTime() / 1000);\n}", "title": "" }, { "docid": "8d5a21f07773dc35864a4dea9d09daf6", "score": "0.7308643", "text": "function getDateNow() {\n return Math.trunc(new Date().getTime() / 1000);\n }", "title": "" }, { "docid": "836394c7a2c46af34448da85ba7add00", "score": "0.7276719", "text": "function getTimestamp() {\n return Math.floor(Date.now() / 1000);\n }", "title": "" }, { "docid": "cca6db418e5ddb7ec78b36f49b65ff4e", "score": "0.7268181", "text": "function getCurrentTimestamp() {\n return Math.floor(Date.now() / 1000);\n}", "title": "" }, { "docid": "769e326e3579bb1ebebebb3309c3cc8f", "score": "0.7254761", "text": "function getCurrentTimestamp() {\n return Math.round((new Date()).getTime() / 1000);\n}", "title": "" }, { "docid": "58d829b72140369a4ffaae56cdc9c177", "score": "0.7240674", "text": "function now() {\n if (global.performance && typeof global.performance.now === 'function') {\n return global.performance.now();\n } else if (typeof Date.now === 'function') {\n return Date.now();\n } else {\n return (new Date()).getTime();\n }\n }", "title": "" }, { "docid": "534ab6555badd49a512382881332fe94", "score": "0.7229872", "text": "function getNow() {\n if (typeof performance !== 'undefined' &&\n performance &&\n typeof performance.now === 'function') {\n return performance.now() | 0; // convert to integer\n }\n else {\n return Date.now();\n }\n}", "title": "" }, { "docid": "3607e60e90430f9895c5142e94eb91f8", "score": "0.72297883", "text": "function curr_time(){\n return Math.floor(Date.now());\n}", "title": "" }, { "docid": "0c58035feb72df30eb484ce27338db11", "score": "0.7214978", "text": "function getTimeStamp() {\n var now = new Date();\n return now.getTime();\n }", "title": "" }, { "docid": "0c58035feb72df30eb484ce27338db11", "score": "0.7214978", "text": "function getTimeStamp() {\n var now = new Date();\n return now.getTime();\n }", "title": "" }, { "docid": "33e1a17a83b1a793d94651f8b3c2caaa", "score": "0.7195825", "text": "function getTimeStamp() {\n\t\t\tvar now = new Date();\n\t\t\treturn now.getTime();\n\t\t}", "title": "" }, { "docid": "f2b29913f920cfdc857fc2bc1e4f9fab", "score": "0.71796584", "text": "function getCurrentTime(){\n return new Date().getTime();\n }", "title": "" }, { "docid": "ae8a2edc77777367e77cf64131fc351b", "score": "0.71749294", "text": "function millis() {\n return new Date().getTime();\n}", "title": "" }, { "docid": "a93407e84e506a362906543d507ba115", "score": "0.7168481", "text": "function getTimeStamp() {\n var now = new Date();\n return now.getTime();\n }", "title": "" }, { "docid": "a93407e84e506a362906543d507ba115", "score": "0.7168481", "text": "function getTimeStamp() {\n var now = new Date();\n return now.getTime();\n }", "title": "" }, { "docid": "a93407e84e506a362906543d507ba115", "score": "0.7168481", "text": "function getTimeStamp() {\n var now = new Date();\n return now.getTime();\n }", "title": "" }, { "docid": "f4f40bab21da59b8941088531a1eaca3", "score": "0.7157813", "text": "function timeInMillis () {\n return (new Date()).getTime();\n}", "title": "" }, { "docid": "3989e546e365a4c91211497607b6ae6c", "score": "0.7157378", "text": "function s_getCurrentUnixTimeStamp() {\n var lt = new Date();\n return Math.round(lt.getTime()/1000);\n}", "title": "" }, { "docid": "23e0f6fe990985e17d29f6b397a43a8e", "score": "0.714008", "text": "function time() {\r\n\tvar foo = new Date; // Generic JS date object\r\n\tvar unixtime_ms = foo.getTime(); // Returns milliseconds since the epoch\r\n\treturn parseInt(unixtime_ms / 1000);\r\n}", "title": "" }, { "docid": "a6dc6286c1502118f50a93d3b2f22278", "score": "0.71387553", "text": "function now() { return new Date().getTime() }", "title": "" }, { "docid": "f2a71170bb8c977bf0f10c9373a7f4ab", "score": "0.7115837", "text": "function curr_time()\n{ \n return (new Date()).getTime();\n}", "title": "" }, { "docid": "2196250d08181e10b46ed7357914485a", "score": "0.7102309", "text": "function _clock() {\n return (new Date().getTime() / 1000.);\n}", "title": "" }, { "docid": "203f7f92f2a104681afcc0b9482cf1ff", "score": "0.7099388", "text": "function now() {\r\n\t if (typeof performance !== 'undefined') {\r\n\t return performance.now();\r\n\t }\r\n\t return Date.now();\r\n\t}", "title": "" }, { "docid": "1c9f4b6f8f7d1ca0885b728d9319ff7a", "score": "0.70820534", "text": "function now() {\n\t\treturn new Date().getTime();\n\t}", "title": "" }, { "docid": "f5c9ed6d2b69c9392590eebcb5a629a3", "score": "0.70630956", "text": "getNow() {\r\n const timeNow = new Date();\r\n const dateNow = timeNow.getTime();\r\n return dateNow;\r\n }", "title": "" }, { "docid": "4bf899059c66838e6524504f290b1830", "score": "0.7052344", "text": "function util_now() {\n var ret = new Date().getTime();\n ret = ret + 0.01;\n if (ret <= _lastNow) {\n ret = _lastNow + 0.01;\n }\n\n /**\n * Strip the returned number to max two decimals.\n * In theory we would not need this but\n * in practice JavaScript has no such good number precision\n * so rounding errors could add another decimal place.\n */\n var twoDecimals = parseFloat(ret.toFixed(2));\n _lastNow = twoDecimals;\n return twoDecimals;\n}", "title": "" }, { "docid": "dffad425aee7f865315c0d5037afd733", "score": "0.7038387", "text": "function getTime() {\n return performance.now()\n}", "title": "" }, { "docid": "dffad425aee7f865315c0d5037afd733", "score": "0.7038387", "text": "function getTime() {\n return performance.now()\n}", "title": "" }, { "docid": "dffad425aee7f865315c0d5037afd733", "score": "0.7038387", "text": "function getTime() {\n return performance.now()\n}", "title": "" }, { "docid": "293cf77dbf7d46e399f944c46492674e", "score": "0.70346195", "text": "function getTimeStamp(){\n return Math.round(new Date().getTime()/1000.0);\n}", "title": "" }, { "docid": "3ca3146da60fae47e810393676398ed4", "score": "0.7031645", "text": "GetCurrentTime() {\n var today = new Date();\n var time = today.getHours() + \":\" + today.getMinutes() + \":\" + today.getSeconds();\n return time;\n }", "title": "" }, { "docid": "238ee1ae3b180982b5251a2364001dde", "score": "0.7012641", "text": "function currentTime() \r\n{\r\n\tvar d = new Date();\r\n\treturn d.getTime() + (Date.remoteOffset || 0);\r\n}", "title": "" }, { "docid": "7f8e3d68a21f4ea971c2fac29a5dc501", "score": "0.7010244", "text": "function now()\r\n{\r\n\treturn typeof window.performance !== 'undefined'\r\n\t\t\t? window.performance.now()\r\n\t\t\t: 0;\r\n}", "title": "" }, { "docid": "1776342618b213c8e33b05253db84dbe", "score": "0.70060736", "text": "function GetMilliseconds()\r\n{\r\n\tvar dt = new Date();\r\n\tvar timestamp = Date.UTC(dt.getFullYear(), dt.getMonth(), dt.getDay(), dt.getHours(), dt.getMinutes(), dt.getSeconds(), dt.getMilliseconds());\r\n\treturn timestamp;\r\n}", "title": "" }, { "docid": "52ad5a471c2557c822f73a36a8136c80", "score": "0.699204", "text": "function timestamp() {\n return window.performance && window.performance.now ? window.performance.now() : new Date().getTime();\n}", "title": "" }, { "docid": "3c583631cc6ee81f0a5e5b209e100035", "score": "0.69788784", "text": "function current_stamp() {\n if (time_start === null) {\n time_start = new Date().getTime();\n return 0;\n } else {\n return new Date().getTime() - time_start;\n }\n}", "title": "" }, { "docid": "05c3d470eefa2c5faebf71bb618dc9fd", "score": "0.69774526", "text": "function getTime() {\n\n let elapsedMil = Date.now() - now;\n let mil = (elapsedMil).toFixed(0) % 100;\n let sec = Math.floor(elapsedMil / 1000) % 60;\n let min = Math.floor(elapsedMil / 60000) % 60;\n\n mil = padTime(mil);\n sec = padTime(sec);\n min = padTime(min);\n\n function padTime(num) {\n if (num < 10) {\n num = '0' + num;\n }\n return num;\n }\n\n let time = min + ':' + sec + ':' + mil;\n return time;\n}", "title": "" }, { "docid": "2c64d22c374e0ec704eacac99bcc5f75", "score": "0.69740766", "text": "timestamp() {\n var now = this.now();\n return now.getTime();\n }", "title": "" }, { "docid": "da97c2a2a017c7b7b8d2c09248318baf", "score": "0.6967916", "text": "function getCurrentTimeSync(){\n\tif (!started){\n\t\treturn 0;\n\t}else{\n\t\treturn Date.now() + offset;\n\t}\n}", "title": "" }, { "docid": "f3ece54d4759cdda66a7b11d21d41e77", "score": "0.6967621", "text": "function getUnixTime() {\n return \"\" + Date.now();\n}", "title": "" }, { "docid": "6512a27ee04a048b125c63c7c6775393", "score": "0.69346493", "text": "function GetCurrentTime(){\n\t\tvar d = new Date();\n\t\tvar hours = d.getHours();\n\t\tvar minutes = d.getMinutes();\n\t\tvar time = hours+ '.' + minutes;\n\t\treturn time;\n\t}", "title": "" }, { "docid": "5250938936eaf798562fc8e9bc62639d", "score": "0.6932278", "text": "function now() {\n return Date.now()\n}", "title": "" }, { "docid": "c67e08e2cd9233229dac628281917d5e", "score": "0.6930044", "text": "function getTime() {\n var d = new Date();\n return d.getTime();\n }", "title": "" }, { "docid": "910dc9ebd768648d9f124827db195a88", "score": "0.69118303", "text": "function getTime () {\n\n\tvar d = new Date();\n\tvar ts = d.getTime();\n\treturn ts;\n\n}", "title": "" }, { "docid": "7871802563cc66f4cd9dd4211223ff44", "score": "0.6898278", "text": "lastUpdateFromNow () {\n if (!this.lastUpdateAt) return 0\n return moment(this.lastUpdateAt).fromNow()\n }", "title": "" }, { "docid": "6fc3f6f5ebd90baf9913bea67d4bbf4f", "score": "0.6896076", "text": "function getTimestamp() {\n\t if (!Date.now) {\n\t // IE8 & below\n\t return new Date().getTime();\n\t }\n\t\n\t return Date.now();\n\t}", "title": "" }, { "docid": "59fab62488d2931e4e54c133869a3bc3", "score": "0.6877759", "text": "function getTimestamp() {\n return Date.now();\n}", "title": "" }, { "docid": "a41781ddd8aadbc2133cdf8d5771800e", "score": "0.68773425", "text": "function getTimeStamp() {\n let ts = Date.now();\n return ts;\n}", "title": "" }, { "docid": "7123a992b66481acbde6edfea8973e72", "score": "0.68768793", "text": "function now() {\n return new Date().getTime();\n}", "title": "" }, { "docid": "65daaaf38849a3b4d98077c83f13a34a", "score": "0.68638", "text": "function time()\r\n{\r\n\treturn parseInt(new Date().getTime().toString().substring(0, 10));\r\n}", "title": "" }, { "docid": "c38ecd55355bfe5eccddc3d768a846d6", "score": "0.6859701", "text": "function time() {\n\tvar now = new Date();\n\treturn (\n\t\t('00' + now.getHours()).slice(-2) + ':' +\n\t\t('00' + now.getMinutes()).slice(-2) + ':' +\n\t\t('00' + now.getSeconds()).slice(-2) + '.' +\n\t\t('000' + now.getMilliseconds()).slice(-4)\n\t);\n}", "title": "" }, { "docid": "c705277059915ba54d7f236a02edb068", "score": "0.68529433", "text": "micros()\n {\n return process.uptime() * 1000 * 1000;\n }", "title": "" }, { "docid": "32fb7f863e9f97a1509fe7cc99500932", "score": "0.6850096", "text": "function getCurrentTimestamp ()\n{\n\treturn new Date().getTime();\n}", "title": "" }, { "docid": "ed2c5f8bc99b64d4f212b3a91b2bb52d", "score": "0.684893", "text": "function getTime () {\n let time = si.time()\n return {\n current: time.current,\n uptime: time.uptime\n }\n}", "title": "" }, { "docid": "52d364e1c8c2e991b33d4fd238923f51", "score": "0.6846411", "text": "function getTime() {\n return (new Date()).getTime();\n}", "title": "" }, { "docid": "67529a1392fa216e9a9fbd6f90d5c44a", "score": "0.68369234", "text": "function getTime() {\n\t\t\tvar now = new Date();\n\t\t\tvar h = now.getHours();\n\t\t\tvar m = now.getMinutes();\n\t\t\tvar s = now.getSeconds();\n\n\t\t\treturn h + (m < 10 ? \":0\" : \":\") + m + (s < 10 ? \":0\" : \":\") + s;\n\t\t}", "title": "" }, { "docid": "d5013f9dd97c4500f93b6bb42bd21737", "score": "0.68314517", "text": "function now() {\n\n var currentTimeArray = new Date().toString().split(' ');\n\n var now = currentTimeArray[1].toString() + \". \" +\n currentTimeArray[2].toString() + \", \" +\n currentTimeArray[3].toString() + \" at \" +\n currentTimeArray[4].toString() + \":\";\n\n return now;\n}", "title": "" }, { "docid": "9687ac663de8e4e902a30ebcc7574a0a", "score": "0.6824886", "text": "function get_time(){\n return new Date().getTime().toString()\n}", "title": "" }, { "docid": "6d7b21208fdabe603aa17168bce17249", "score": "0.6806553", "text": "static get time() { return window.performance.now(); }", "title": "" }, { "docid": "fe202e35fc005a587209dfca60167fab", "score": "0.6795945", "text": "function getCTime(){\n\t return player.getCurrentTime();\n\t }", "title": "" }, { "docid": "fae7a54da55e2b499cfd2cb6822615c0", "score": "0.67926407", "text": "function getDateNow() {\n return Math.trunc(new Date().getTime() / 1000) - (data.medianTimeOffset || constants.WELL_KNOWN_CURRENCIES.g1.medianTimeOffset);\n }", "title": "" }, { "docid": "e2f538b965e131ee81fc535db0716384", "score": "0.6789451", "text": "get time() {}", "title": "" }, { "docid": "e2f538b965e131ee81fc535db0716384", "score": "0.6789451", "text": "get time() {}", "title": "" }, { "docid": "f3f8a7018218153fdf9a3439ca698283", "score": "0.6772579", "text": "function DateNow() {\n return %DateCurrentTime();\n}", "title": "" }, { "docid": "1d689a1caf07820cb01883141370f858", "score": "0.67689824", "text": "function timestamp(){\n return Math.round((new Date()).getTime() / 1000);\n}", "title": "" }, { "docid": "bb255e6d06e3e0023680296ad8e91c95", "score": "0.67553765", "text": "function currentMs () {\n return ctx.currentTime * 1000;\n}", "title": "" }, { "docid": "372e7148de0a44e8ce82113dd91137ea", "score": "0.6752976", "text": "function currentGameTime () {\n return Date.now() - startTime;\n }", "title": "" }, { "docid": "26d7cfd27cd1ffa4bdf7d228416f1963", "score": "0.67213595", "text": "function GetLoggedInTime() {\n var time = GetInternalSaveData(LOGGED_IN_TIME);\n return parseInt(time, 10);\n}", "title": "" }, { "docid": "a66f8569112b53e8aad9addbeb2826f7", "score": "0.6696587", "text": "getNow( ){\n return new Date().toISOString().slice(0, 19).replace('T', ' ');\n }", "title": "" }, { "docid": "f3576a43c92f410b3a282ad535db77b0", "score": "0.6689619", "text": "function getGlobalMonotonicClockMS() {\n return toMS(hrtime());\n}", "title": "" }, { "docid": "40bc9380c6addf7a4009fa5afc0d6fab", "score": "0.6689013", "text": "function timeStamp(){\r\n\t\treturn (new Date()).getTime();\r\n\t}", "title": "" }, { "docid": "306f1d4699aba9b14135546d264039ab", "score": "0.66866434", "text": "function getCurrentTimeInt() {\n let d = Date();\n var h = d.substring(16, 18);\n var m = d.substring(19, 21);\n var s = d.substring(22, 24);\n return 60 * (60 * h + m) + s;\n }", "title": "" } ]
cf9e3def15505d797c4938964355271c
none of these are relevant to the WebRTC aspects of the page
[ { "docid": "13fba5f9bcc2980496de64be383a7678", "score": "0.0", "text": "function showError(message) {\n errorDiv = document.querySelector(\"#error\");\n errorDiv.innerHTML += \"<p>\" + message + \"</p>\";\n}", "title": "" } ]
[ { "docid": "e602ea2f1cff00626026970664506c32", "score": "0.59836596", "text": "function onRemoteStreamAdded(event) {\n var remoteviddiv;\n // alert(type);\n var header;\n if (type == \"user\") {\n remoteviddiv = document.getElementById('webRTC_VideoWrapper');\n remotevid = document.getElementById('webRTC_remoteVideo');\n remotevid.style.display = \"block\";\n header = document.getElementById('webRTC_agentHeader');\n } else {\n remoteviddiv = document.getElementById('remotevidoediv');\n remotevid = document.getElementById('remotevid');\n header = document.getElementById('customerheader');\n }\n\n remotevid.src = URL.createObjectURL(event.stream);\n //remotevid.style.display=\"block\";\n\n remotevid.width = remoteviddiv.offsetWidth;\n remotevid.height = remoteviddiv.offsetHeight - header.offsetHeight;\n //alert(remotevid.height);\n if (type == \"user\") {\n btn = document.getElementById(\"webRTC_custStartCallButton\");\n btn.style.display = \"none\";\n var btn = document.getElementById(\"webRTC_custEndCallButton\");\n btn.style.display = \"block\";\n }\n\n remotevid.autoplay = true;\n if (type == \"user\") {\n var progbar = document.getElementById('webRTC_connectMessage');\n progbar.style.display = \"none\";\n }\n updateState(STATES.CONNECTED);\n if (type == \"user\") {\n var agentheader = document.getElementById('webRTC_agentHeader');\n //agentheader.innerHTML = \"AGENT\" + \" : \"+agentname.toUpperCase(); \n var string = agentheader.innerHTML;\n agentduration('webRTC_agentHeader', agentheader.innerHTML);\n }\n}", "title": "" }, { "docid": "bda84cebad5e39de7545387a524375fe", "score": "0.5876433", "text": "function loadOthersMediaStream(event, peers, peer_id) {\n \n othersMediaStream = event.streams[0];\n\n const videoWrap = document.createElement(\"div\");\n\n // peers name video audio status\n const othersHeader = document.createElement(\"div\");\n const othersInfoImg = document.createElement(\"i\");\n const othersInfo = document.createElement(\"h4\");\n const othersHandStatusIcon = document.createElement(\"button\");\n const othersVideoStatusIcon = document.createElement(\"button\");\n const othersAudioStatusIcon = document.createElement(\"button\");\n const othersPeerKickOut = document.createElement(\"button\");\n const othersVideoImg = document.createElement(\"img\");\n\n // Header\n othersHeader.setAttribute(\"id\", peer_id + \"_othersHeader\");\n othersHeader.className = \"header\";\n // others name \n othersInfoImg.setAttribute(\"id\", peer_id + \"_nameImg\");\n othersInfoImg.className = \"fas fa-user\";\n othersInfo.setAttribute(\"id\", peer_id + \"_name\");\n othersInfo.className = \"videoPeerName\";\n tippy(othersInfo, { content: \"Participant name\", });\n const peerVideoText = document.createTextNode(peers[peer_id][\"peer_name\"]);\n othersInfo.appendChild(peerVideoText);\n // others hand status \n othersHandStatusIcon.setAttribute(\"id\", peer_id + \"_handStatus\");\n othersHandStatusIcon.style.setProperty(\"color\", \"#9477CB\");\n othersHandStatusIcon.className = \"fas fa-hand-paper\";\n tippy(othersHandStatusIcon, { content: \"Participant hand is RAISED\", });\n // others video status\n othersVideoStatusIcon.setAttribute(\"id\", peer_id + \"_videoStatus\");\n othersVideoStatusIcon.className = \"fas fa-video\";\n tippy(othersVideoStatusIcon, { content: \"Participant video is ON\", });\n // others audio status \n othersAudioStatusIcon.setAttribute(\"id\", peer_id + \"_audioStatus\");\n othersAudioStatusIcon.className = \"fas fa-microphone\";\n tippy(othersAudioStatusIcon, { content: \"Participant audio is ON\", });\n // peer kick out\n othersPeerKickOut.setAttribute(\"id\", peer_id + \"_kickOut\");\n othersPeerKickOut.className = \"fas fa-minus-square\";\n tippy(othersPeerKickOut, { content: \"remove\", });\n // my video image\n othersVideoImg.setAttribute(\"id\", peer_id + \"_image\");\n othersVideoImg.className = \"videoImg\";\n\n // add elements to othersHeader div\n othersHeader.appendChild(othersInfoImg);\n othersHeader.appendChild(othersInfo);\n othersHeader.appendChild(othersPeerKickOut);\n othersHeader.appendChild(othersVideoStatusIcon);\n othersHeader.appendChild(othersAudioStatusIcon);\n othersHeader.appendChild(othersHandStatusIcon);\n \n // add elements to videoWrap div\n videoWrap.appendChild(othersHeader);\n videoWrap.appendChild(othersVideoImg);\n\n const othersMedia = document.createElement(\"video\");\n videoWrap.className = \"video\";\n videoWrap.appendChild(othersMedia);\n othersMedia.setAttribute(\"id\", peer_id + \"_video\");\n othersMedia.setAttribute(\"playsinline\", true);\n othersMedia.mediaGroup = \"othersvideo\";\n othersMedia.autoplay = true;\n othersMedia.controls = othersMediaControls;\n mediaElements[peer_id] = othersMedia;\n document.body.appendChild(videoWrap);\n\n attachMediaStream(othersMedia, othersMediaStream);\n setVideos(); \n fullScreenVideoPlayer(peer_id + \"_video\"); // full screen mode\n setPeerKickOutBtn(peer_id); // kick out some peer\n setVideoImgName(peer_id + \"_image\", peers[peer_id][\"peer_name\"]); \n setPeerHandStatus( peer_id, peers[peer_id][\"peer_name\"], peers[peer_id][\"peer_hand\"] ); // refresh remote peers hand icon status and title\n setPeerVideoStatus(peer_id, peers[peer_id][\"peer_video\"]); // refresh remote peers video icon status and title\n setPeerAudioStatus(peer_id, peers[peer_id][\"peer_audio\"]); // refresh remote peers audio icon status and title\n toggleClassElements(\"header\", \"inline\"); // show header\n}", "title": "" }, { "docid": "39def65e8b5151c2b4a701ab0354d486", "score": "0.5808739", "text": "function networkChangeDetector() {\r\n // The API is supported in Chromium browsers and Firefox for Android\r\n if (Browser.isSafariWebRTC()) {\r\n return;\r\n }\r\n if (Browser.isChrome() || (Browser.isFirefox() && Browser.isAndroid())) {\r\n connection = navigator.connection || navigator.mozConnection || navigator.webkitConnection;\r\n if (connection) {\r\n connectionType = connection.type;\r\n if (Browser.isFirefox()) {\r\n connection.ontypechange = onNetworkChange;\r\n } else {\r\n connection.onchange = onNetworkChange;\r\n }\r\n }\r\n }\r\n}", "title": "" }, { "docid": "8f87881dafcbfddcd7c084bcad4ffc3a", "score": "0.5784776", "text": "async function setConnection(connid) //This function is used to set a new webRTC connection between peers\n {\n var connection = new RTCPeerConnection(iceConfiguration);\n\n connection.onnegotiationneeded = async function (event)//This event is fired when a change has occurred which requires session negotiation.\n {\n await setOffer(connid);\n };\n connection.onicecandidate = function (event) //This is called whenever the local ICE agent needs to deliver a message to the other peer through the signaling server\n {\n if (event.candidate) {\n serverProcess(\n JSON.stringify({ icecandidate: event.candidate }),\n connid\n );\n }\n };\n connection.ontrack = function (event) //This is an event handler which specifies a function to be called when the track event occurs, indicating that a track has been added to the RTCPeerConnection\n {\n if (!remote_vid_stream[connid]) {\n remote_vid_stream[connid] = new MediaStream(); //If remote vid stream is not already setup , this function does that\n }\n if (!remote_aud_stream[connid]) {\n remote_aud_stream[connid] = new MediaStream(); //If remote aud stream is not already setup , this function does that\n }\n\n if (event.track.kind == \"video\") //This loads video player tracks of the user\n {\n remote_vid_stream[connid]\n .getVideoTracks()\n .forEach((t) => remote_vid_stream[connid].removeTrack(t));\n remote_vid_stream[connid].addTrack(event.track);\n var remoteVideoPlayer = document.getElementById(\"v_\" + connid);\n remoteVideoPlayer.srcObject = null;\n remoteVideoPlayer.srcObject = remote_vid_stream[connid];\n remoteVideoPlayer.load();\n } else if (event.track.kind == \"audio\") //This loads audio player tracks of the user\n {\n remote_aud_stream[connid]\n .getAudioTracks()\n .forEach((t) => remote_aud_stream[connid].removeTrack(t));\n remote_aud_stream[connid].addTrack(event.track);\n var remoteAudioPlayer = document.getElementById(\"a_\" + connid);\n remoteAudioPlayer.srcObject = null;\n remoteAudioPlayer.srcObject = remote_aud_stream[connid];\n remoteAudioPlayer.load();\n }\n };\n peers_connection_ids[connid] = connid;\n peers_connection[connid] = connection;\n\n if (\n video_st == video_states.Camera ||\n video_st == video_states.ScreenShare\n ) {\n if (videoCamTrack) {\n updateMediaSenders(videoCamTrack, rtp_vid_senders); //Updates Camera state to media senders when the videocamtrack is true\n }\n }\n\n return connection;\n }", "title": "" }, { "docid": "da3c3d1284f79b97f05d7239ef090ee1", "score": "0.57841885", "text": "function WebrtcApi() {\n if (navigator.mozGetUserMedia) {\n console.log('This appears to be Firefox');\n if (!MediaStream.prototype.getVideoTracks || !MediaStream.prototype.getAudioTracks)\n throw new Error('webRTC API missing MediaStream.getXXXTracks');\n if (!mozRTCPeerConnection)\n throw new Error('Your version of Firefox is too old, at lest version 22 for Desktop and version 24 for Andorid is required');\n \n this.peerconnection = mozRTCPeerConnection;\n this.browser = 'firefox';\n this.getUserMedia = navigator.mozGetUserMedia.bind(navigator);\n this.attachMediaStream = function (element, stream) {\n element[0].mozSrcObject = stream;\n element[0].play();\n };\n this.pc_constraints = {};\n\t\tif (MediaStream.prototype.clone)\n this.cloneMediaStream = function(src, what) {return src.clone(); }\n else\n this.cloneMediaStream = function(src, what) {return src; } //no cloning, just returns original stream\n \n this.RTCSessionDescription = mozRTCSessionDescription;\n this.RTCIceCandidate = mozRTCIceCandidate;\n this.MediaStreamTrack = MediaStreamTrack;\n } else if (navigator.webkitGetUserMedia) {\n console.log('This appears to be Chrome');\n this.peerconnection = webkitRTCPeerConnection;\n this.browser = window.opr?'opera':'chrome';\n this.getUserMedia = navigator.webkitGetUserMedia.bind(navigator);\n this.attachMediaStream = function (element, stream) {\n element.attr('src', webkitURL.createObjectURL(stream));\n };\n this.pc_constraints = {'optional': [{'DtlsSrtpKeyAgreement': 'true'}]}; // enable dtls support for compat with Firefox \n\t\tthis.cloneMediaStream = function(src, what) {\n var stream = new webkitMediaStream;\n\t\t\tif (what.audio)\n\t\t\t\tstream.addTrack(src.getAudioTracks()[0]);\n\t\t\tif (what.video)\n\t\t\t\tstream.addTrack(src.getVideoTracks()[0]);\n\t\t\treturn stream;\n\t\t}\n this.RTCSessionDescription = RTCSessionDescription;\n this.RTCIceCandidate = RTCIceCandidate;\n this.MediaStreamTrack = MediaStreamTrack;\n if (!webkitMediaStream.prototype.getVideoTracks) {\n webkitMediaStream.prototype.getVideoTracks = function () {\n return this.videoTracks;\n };\n }\n if (!webkitMediaStream.prototype.getAudioTracks) {\n webkitMediaStream.prototype.getAudioTracks = function () {\n return this.audioTracks;\n };\n }\n } else {\n throw new Error('Browser does not appear to be WebRTC-capable');\n }\n var mst = this.MediaStreamTrack;\n if (mst && mst.getSources) {\n this.getMediaInputTypesFromScan = function(cb) {\n mst.getSources(function(sources) {\n var hasAudio = false;\n var hasVideo = false;\n for (var i=0; i<sources.length; i++) {\n var s = sources[i];\n if (s.kind === 'audio')\n hasAudio = true;\n else if (s.kind === 'video')\n hasVideo = true;\n }\n cb({audio:hasAudio, video:hasVideo});\n });\n }\n this.getMediaInputTypes = this.getMediaInputTypesFromScan;\n } else {\n this.getMediaInputTypesFromStream = function(cb) {\n this.getUserMedia({audio:true, video:true},\n function(stream) {\n var result = {audio: (stream.getAudioTracks().length > 0), video: (stream.getVideoTracks().length > 0)};\n stream = null;\n cb(result);\n },\n function() {\n cb({error: true})\n }\n );\n }\n this.getMediaInputTypes = this.getMediaInputTypesFromStream;\n }\n}", "title": "" }, { "docid": "ad5a3a6a5668041ec1330b07b65c6c9a", "score": "0.5759369", "text": "function gotRemoteStream(event){\n\tconsole.log(event.track.kind);\n\tconsole.log(event.track.id);\n\tvar peerMediaVideo;\n\t// Removing the new temporary div(if made) made during setting up data channel\n\n\t// var peerMediaElements = document.getElementById(\"peer-media-banner\");\n\t// var peerMediaDiv = document.createElement(\"div\");\n\t// peerMediaVideo = document.createElement(\"video\");\n\t// peerMediaVideo.autoplay = true;\n\t// peerMediaVideo.setAttribute(\"class\", \"z-depth-5\");\n\t// peerMediaVideo.setAttribute(\"height\", \"150\");\n\t// peerMediaVideo.id = \"user-media-\"+currentPeer;\n\t// peerMediaDiv.setAttribute(\"class\", \"col s4\");\n\t// peerMediaDiv.appendChild(peerMediaVideo);\n\t// peerMediaElements.appendChild(peerMediaDiv);\n\t// peerMediaVideo.srcObject = event.streams[0];\n\n\tif(event.track.kind == \"audio\"){ // To avoid making two separate elements\n\t\ttry{\n\t\t\tconsole.log(\"removing\");\n\t\t\tpeerMediaVideo = document.getElementById(\"user-media-\"+currentPeer);\n\t\t\tconsole.log(peerMediaVideo);\n\t\t\tvar peerMediaElements = document.getElementById(\"peer-media-banner\");\n\t\t\tpeerMediaVideo.parentNode.parentNode.removeChild(peerMediaVideo.parentNode);\n\t\t}\n\t\tcatch(e){\n\t\t\tconsole.log(e);\n\t\t\tconsole.log(\"No pre existing element\");\n\t\t}\n\t\tvar peerMediaElements = document.getElementById(\"peer-media-banner\");\n\t\tvar peerMediaDiv = document.createElement(\"div\");\n\t\tpeerMediaVideo = document.createElement(\"video\");\n\t\tpeerMediaVideo.autoplay = true;\n\t\tpeerMediaVideo.setAttribute(\"class\", \"z-depth-5\");\n\t\tpeerMediaVideo.setAttribute(\"height\", \"150\");\n\t\tpeerMediaVideo.id = \"user-media-\"+currentPeer;\n\t\tpeerMediaDiv.setAttribute(\"class\", \"col s4\");\n\t\tpeerMediaDiv.appendChild(peerMediaVideo);\n\t\tpeerMediaElements.appendChild(peerMediaDiv);\n\t}else{\n\t\tvar peerMediaVideo = document.getElementById(\"user-media-\"+currentPeer);\n\t\twebcamStreams[currentPeer] = event.streams[0];\n\t\tconsole.log(peerMediaVideo);\n\t\tpeerMediaVideo.autoplay = true;\n\t\tpeerMediaVideo.srcObject = event.streams[0];\n\t}\n}", "title": "" }, { "docid": "07f77b59d4899b4f353e8b9b99a987f1", "score": "0.57500994", "text": "function changeWebRTC(data) {\n var script = document.getElementById(\"webrtc-control\");\n if (script) script.parentNode.removeChild(script);\n var allowedUrls = [\"hangouts.google.com\", \"facebook.com\"];\n var isAllowed = allowedUrls.find((url)=>document.location.host === url);\n if (data.state === \"enabled\" && !isAllowed) {\n try {\n var webrtc = '(' + function () {\n if (typeof navigator.getUserMedia !== \"undefined\") navigator.getUserMedia = undefined;\n if (typeof window.MediaStreamTrack !== \"undefined\") window.MediaStreamTrack = undefined;\n if (typeof window.RTCPeerConnection !== \"undefined\") window.RTCPeerConnection = undefined;\n if (typeof navigator.webkitGetUserMedia !== \"undefined\") navigator.webkitGetUserMedia = undefined;\n if (typeof window.RTCSessionDescription !== \"undefined\") window.RTCSessionDescription = undefined;\n if (typeof window.webkitMediaStreamTrack !== \"undefined\") window.webkitMediaStreamTrack = undefined;\n if (typeof window.webkitRTCPeerConnection !== \"undefined\") window.webkitRTCPeerConnection = undefined;\n if (typeof window.webkitRTCSessionDescription !== \"undefined\") window.webkitRTCSessionDescription = undefined;\n } + ')();';\n /* */\n var script = document.createElement('script');\n script.setAttribute(\"id\", \"webrtc-control\");\n script.textContent = webrtc;\n var head = document.head || document.documentElement;\n if (head) head.appendChild(script);\n }\n catch (e) {}\n } else {\n console.warn(\"currently allowing \", document.location.host);\n }\n}", "title": "" }, { "docid": "ac2f813b0be112a7103c80357b9657b2", "score": "0.5666988", "text": "function enableVideo() {\n\tdocument.getElementById(\"url\").style.display = \"block\";\n\tdocument.getElementById(\"remotes\").style.visibility = \"visible\";\n\tloadSimpleWebRTC();\n}", "title": "" }, { "docid": "dbd1f5097ba7834241318fec73e66089", "score": "0.56267756", "text": "function setupRTC() {\n var RTC = null;\n if (navigator.mozGetUserMedia) {\n console.log('This appears to be Firefox');\n var version = parseInt(navigator.userAgent.match(/Firefox\\/([0-9]+)\\./)[1], 10);\n if (version >= 22) {\n RTC = {\n peerconnection: mozRTCPeerConnection,\n browser: 'firefox',\n getUserMedia: navigator.mozGetUserMedia.bind(navigator),\n attachMediaStream: function (element, stream) {\n element[0].mozSrcObject = stream;\n element[0].play();\n },\n pc_constraints: {},\n getLocalSSRC: function (session, callback) {\n // NOTE(gp) latest FF nightlies seem to provide the local\n // SSRCs in their SDP so there's no longer necessary to\n // take it from the peer connection stats.\n /*session.peerconnection.getStats(function (s) {\n var ssrcs = {};\n s.forEach(function (item) {\n if (item.type == \"outboundrtp\" && !item.isRemote)\n {\n ssrcs[item.id.split('_')[2]] = item.ssrc;\n }\n });\n session.localStreamsSSRC = {\n \"audio\": ssrcs.audio,//for stable 0\n \"video\": ssrcs.video// for stable 1\n };\n callback(session.localStreamsSSRC);\n },\n function () {\n callback(null);\n });*/\n callback(null);\n },\n getStreamID: function (stream) {\n var tracks = stream.getVideoTracks();\n if(!tracks || tracks.length == 0)\n {\n tracks = stream.getAudioTracks();\n }\n return tracks[0].id.replace(/[\\{,\\}]/g,\"\");\n },\n getVideoSrc: function (element) {\n return element.mozSrcObject;\n },\n setVideoSrc: function (element, src) {\n element.mozSrcObject = src;\n }\n };\n if (!MediaStream.prototype.getVideoTracks)\n MediaStream.prototype.getVideoTracks = function () { return []; };\n if (!MediaStream.prototype.getAudioTracks)\n MediaStream.prototype.getAudioTracks = function () { return []; };\n RTCSessionDescription = mozRTCSessionDescription;\n RTCIceCandidate = mozRTCIceCandidate;\n }\n } else if (navigator.webkitGetUserMedia) {\n console.log('This appears to be Chrome');\n RTC = {\n peerconnection: webkitRTCPeerConnection,\n browser: 'chrome',\n getUserMedia: navigator.webkitGetUserMedia.bind(navigator),\n attachMediaStream: function (element, stream) {\n element.attr('src', URL.createObjectURL(stream));\n },\n // DTLS should now be enabled by default but..\n pc_constraints: {'optional': [{'DtlsSrtpKeyAgreement': 'true'}]},\n getLocalSSRC: function (session, callback) {\n callback(null);\n },\n getStreamID: function (stream) {\n // streams from FF endpoints have the characters '{' and '}'\n // that make jQuery choke.\n return stream.id.replace(/[\\{,\\}]/g,\"\");\n },\n getVideoSrc: function (element) {\n return element ? element.getAttribute(\"src\"): null;\n },\n setVideoSrc: function (element, src) {\n element.setAttribute(\"src\", src);\n }\n };\n if (navigator.userAgent.indexOf('Android') != -1) {\n RTC.pc_constraints = {}; // disable DTLS on Android\n }\n if (!webkitMediaStream.prototype.getVideoTracks) {\n webkitMediaStream.prototype.getVideoTracks = function () {\n return this.videoTracks;\n };\n }\n if (!webkitMediaStream.prototype.getAudioTracks) {\n webkitMediaStream.prototype.getAudioTracks = function () {\n return this.audioTracks;\n };\n }\n }\n if (RTC === null) {\n try { console.log('Browser does not appear to be WebRTC-capable'); } catch (e) { }\n }\n return RTC;\n}", "title": "" }, { "docid": "a13d3390dcdbdd307fb03fb4a3c70ec2", "score": "0.56225127", "text": "loadSimpleWebRTC() {\n var webrtc = new SFU({\n localVideoEl: document.getElementById(\"local\"),\n // the id/element dom element that will hold remote videos\n remoteVideosEl: \"\",\n autoRequestMedia: true,\n debug: false,\n detectSpeakingEvents: true,\n autoAdjustMic: false\n });\n\n // Set the publicly available room URL.\n // startButton.onclick = function () {\n webrtc.joinRoom(this.getRoom());\n this.disabled = true;\n // }\n\n // Immediately join room when loaded.\n webrtc.on(\"readyToCall\", function () {\n // webrtc.joinRoom(self.getRoom());\n webrtc.startBroadcast();\n });\n\n // Display the volume meter.\n webrtc.on(\"localStream\", function () {\n var button = document.querySelector(\"form>button\");\n if (button) button.removeAttribute(\"disabled\");\n startButton.disabled = false;\n document.getElementById(\"localVolume\").style.display = \"block\";\n });\n\n // If we didn't get access to the camera, raise an error.\n webrtc.on(\"localMediaError\", function (err) {\n alert(\"This service only works if you allow camera access.Please grant access and refresh the page.\");\n });\n\n // When another person joins the chat room, we'll display their video.\n webrtc.on(\"videoAdded\", function (peer) {\n if (peer.consumer._track.kind == \"audio\") {\n peer.video.srcObject.addTrack(peer.consumer._track);\n return;\n }\n var stream = new MediaStream([peer.consumer._track]);\n helper.setVideoSrc(peer.video, stream);\n console.log(\"user added to chat\", peer);\n });\n\n // If a user disconnects from chat, we need to remove their video feed.\n webrtc.on(\"videoRemoved\", function (id) {\n console.log(\"user removed from chat\", id);\n helper.closeVideo(id);\n return;\n });\n\n // If our volume has changed, update the meter.\n webrtc.on(\"volumeChange\", function (volume, treshold) {\n showVolume(document.getElementById(\"localVolume\"), volume);\n });\n\n // If a remote user's volume has changed, update the meter.\n webrtc.on(\"remoteVolumeChange\", function (peer, volume) {\n showVolume(document.getElementById(\"volume_\" + peer.id), volume);\n });\n\n // If there is a P2P failure, we need to error out.\n webrtc.on(\"iceFailed\", function (peer) {\n var connstate = document.querySelector(\"#container_\" + webrtc.getDomId(peer) + \" .connectionstate\");\n console.log(\"local fail\", connstate);\n if (connstate) {\n connstate.innerText = \"connection failed\";\n fileinput.disabled = \"disabled\";\n }\n });\n\n // remote p2p/ice failure\n webrtc.on(\"connectivityError\", function (peer) {\n var connstate = document.querySelector(\"#container_\" + webrtc.getDomId(peer) + \" .connectionstate\");\n console.log(\"remote fail\", connstate);\n if (connstate) {\n connstate.innerText = \"connection failed\";\n fileinput.disabled = \"disabled\";\n }\n });\n webrtc.init();\n }", "title": "" }, { "docid": "d948f56a33ea529b8079c0165d517c79", "score": "0.56219065", "text": "function preInititiation(){\n\tsignalServer = new WebSocket(signalServerURL); // Set to local websocket for now\n\tsignalServer.binaryType = \"arraybuffer\";\n\n\tvar peerMediaElements = document.getElementById(\"peer-media-banner\");\n\tvar peerMediaDiv = document.createElement(\"div\");\n\tvar peerMediaVideo = document.createElement(\"img\");\n\tpeerMediaVideo.setAttribute(\"class\", \"z-depth-5\");\n\tpeerMediaVideo.setAttribute(\"height\", \"150\");\n\tpeerMediaVideo.src = avatarPath;\n\tpeerMediaVideo.id = \"user-media-\"+peerID;\n\tpeerMediaDiv.setAttribute(\"class\", \"col s4\");\n\tpeerMediaDiv.appendChild(peerMediaVideo);\n\tpeerMediaElements.appendChild(peerMediaDiv);\n\n\t\tif (peerID != senderID){\n\t\t\tcurrentPeer = 0; // Since server ID of the host will always be 0 for a new room\n\t\t\t// addPeer(); // Will resume this function while on the feature of video calling\n\t\t\tconsole.log(\"initiating connection with host peer\")\n\t\t\t// initiatePeerConnection(peerID);\n\t\t}else{\n\t\t\tnavigator.getUserMedia(constraints, function(stream){\n\t\t\t\tlocalStream = stream;\n\t\t\t\tconsole.log(localStream);\n\t\t\t\tgotLocalStream(localStream, currentPeer);\n\t\t\t}, fallbackUserMedia);\n\t\t\tconsole.log(signalServer.readyState);\n\t\t\t// signalServer.send(JSON.stringify({\"addRoom\": true, \"roomID\": peerID}));\n\t\t}\n\t// };\n\t// }, 2000);\n}", "title": "" }, { "docid": "9aaa920240b06077edefbf0d3c7a7c55", "score": "0.5619252", "text": "function makeConnection() {\n // peer connection on each browser\n myPeerConnection = new RTCPeerConnection({\n iceServers: [\n {\n urls: [\n \"stun:stun.l.google.com:19302\",\n \"stun:stun1.l.google.com:19302\",\n \"stun:stun2.l.google.com:19302\",\n \"stun:stun3.l.google.com:19302\",\n \"stun:stun4.l.google.com:19302\",\n ],\n },\n ],\n });\n // step 13: addEventListener with icecandidate\n myPeerConnection.addEventListener(\"icecandidate\", handleIce);\n // step 17 : add addstream event \n myPeerConnection.addEventListener(\"addstream\", handleAddStream);\n // console.log(myStream.getTracks())\n // 각 브라우저에서 카메라, 오디오 데이터 스트림을 받아서 myPeerConnnection안에 집어 넣었다.\n myStream.getTracks().forEach(track => myPeerConnection.addTrack(track, myStream))\n}", "title": "" }, { "docid": "3f67f5c14e8baf8f0be0f1bb4b2b2b8a", "score": "0.5578463", "text": "function webRtcCreateOffer(clientName)\r\n{\r\n\tif (typeof thisPeersName != \"string\") {\r\n\t\tconsole.log(\"Please set peer name before calling this function\");\r\n\t\treturn;\r\n\t}\r\n //based off code from: http://jsfiddle.net/jib1/b6gLnbob/\r\n \r\n //initialize new webRTC objects for this particular client.\r\n webRtcClients[clientName] = {};\r\n \r\n var client = webRtcClients[clientName];\r\n client.clientId = clientName;\r\n client.webRtcDc = null;\r\n client.webRtcSc = null;\r\n client.webRtcPc = new RTCPeerConnection(webRtcConfig)\r\n client.webRtcLive = false;\r\n\tclient.webRtcPc.ondatachannel = function(e) {\r\n\t\tif(client.webRtcDc) {\r\n\t\t\tclient.webRtcSc = e.channel;\r\n\t\t\t//scInit(client);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tclient.webRtcDc = e.channel;\r\n\t\t\twebRtcDcInit(client);\r\n\t\t}\r\n };\r\n //client.webRtcPc.ondatachannel = e => client.webRtcDc? scInit(client.webRtcSc = e.channel) : webRtcDcInit(client.webRtcDc = e.channel);\r\n\r\n client.webRtcNegotiated = false; // work around FF39- not self-firing negotiationneeded\r\n client.webRtcPc.onnegotiationneeded = e => {\r\n client.webRtcNegotiated = true;\r\n client.webRtcPc.createOffer().then(d => client.webRtcPc.setLocalDescription(d)).then(() => {\r\n if (client.webRtcLive) client.webRtcSc.send(JSON.stringify({ \"sdp\": client.webRtcPc.localDescription }));\r\n }).catch(webRtcFailed);\r\n };\r\n \r\n client.webRtcPc.onicecandidate = e => {\r\n if (client.webRtcLive) {\r\n client.webRtcSc.send(JSON.stringify({ \"candidate\": e.candidate }));\r\n } else {\r\n if (e.candidate) return;\r\n var offerValue = client.webRtcPc.localDescription.sdp;\r\n \r\n //send the offer to the web server which will forward it to the client\r\n webRtcSendOffer(clientName, offerValue);\r\n }\r\n };\r\n client.webRtcDc = client.webRtcPc.createDataChannel(\"chat\");\r\n client.webRtcSc = client.webRtcPc.createDataChannel(\"signaling\");\r\n \r\n webRtcDcInit(client);\r\n webRtcScInit(client);\r\n \r\n if (!client.webRtcNegotiated) {\r\n client.webRtcPc.onnegotiationneeded();\r\n }\r\n}", "title": "" }, { "docid": "0e6bf803968298e4605a25acbc4607e3", "score": "0.5508458", "text": "function onVideoChat(){\n setVideochat(true);\n setPeoples(false);\n }", "title": "" }, { "docid": "4c4420e21ac1febb19c9b1ed27fcc129", "score": "0.54623485", "text": "function checkForRtcMessage()\r\n{\t\r\n\tif (typeof thisPeersName != \"string\") {\r\n\t\tconsole.log(\"Please set peer name before calling this function\");\r\n\t\treturn;\r\n\t}\r\n\t\r\n //periodically check the node.js server to see if any HMI is trying to connect via webRTC\r\n //once the handshaking is completed through the web server, webRTC will kick in and provide a direct connection\r\n var xhttp = new XMLHttpRequest();\r\n\txhttp.onreadystatechange = function() {\r\n\t\tif (xhttp.readyState == 4 && xhttp.status == 200) {\r\n \r\n //see if there is a client asking to connect\r\n if (typeof xhttp.responseText == \"string\" && xhttp.responseText.length > 0) {\r\n \r\n var responseObject = JSON.parse(xhttp.responseText);\r\n \r\n if (responseObject.message) {\r\n console.log(\"Received message:\", atob(responseObject.message));\r\n var messageObj = JSON.parse(atob(responseObject.message));\r\n \r\n if (messageObj.messageType == \"requestOffer\") {\r\n webRtcCreateOffer(responseObject.from);\r\n }\r\n \r\n if (messageObj.messageType == \"answer\") {\r\n console.log(\"Answer:\", messageObj.answer);\r\n \r\n //see if it is from a client that we previously sent an offer to. If not then ignore.\r\n var clientId = responseObject.from;\r\n if (typeof webRtcClients[clientId] == \"object\") {\r\n var client = webRtcClients[clientId];\r\n webRtcHaveAnswer(client,messageObj.answer);//window.alert(JSON.stringify(messageObj));\r\n }\r\n }\r\n\r\n if (messageObj.messageType == \"offer\") {\r\n webRtcCreateAnswer(messageObj.offer,responseObject.from);\r\n } \r\n \r\n }\r\n }\r\n \r\n\t\t}\r\n\t};\r\n var full = location.protocol+'//'+location.hostname+(location.port ? ':'+location.port: ''); \r\n \r\n\t//xhttp.open(\"GET\", \"http://\" + window.location.host + \"/ioInterface?command=getOtsValues\", true);\r\n xhttp.open(\"GET\", full + \"/webrtc?command=readMessage&clientName=\" + thisPeersName, true);\r\n\txhttp.send();\t \r\n}", "title": "" }, { "docid": "0eb8936f13e43519eb816423cea074dc", "score": "0.5461513", "text": "function fixNegotiationNeeded(window) {\n const browserDetails = detectBrowser(window);\n wrapPeerConnectionEvent(window, 'negotiationneeded', e => {\n const pc = e.target;\n if (browserDetails.version < 72 || (pc.getConfiguration &&\n pc.getConfiguration().sdpSemantics === 'plan-b')) {\n if (pc.signalingState !== 'stable') {\n return;\n }\n }\n return e;\n });\n}", "title": "" }, { "docid": "5ee467fac86bdc7d22af79f6dfe4ada2", "score": "0.5432118", "text": "initFeaturesList() {\n // http://xmpp.org/extensions/xep-0167.html#support\n // http://xmpp.org/extensions/xep-0176.html#support\n this.caps.addFeature('urn:xmpp:jingle:1');\n this.caps.addFeature('urn:xmpp:jingle:apps:rtp:1');\n this.caps.addFeature('urn:xmpp:jingle:transports:ice-udp:1');\n this.caps.addFeature('urn:xmpp:jingle:apps:dtls:0');\n this.caps.addFeature('urn:xmpp:jingle:transports:dtls-sctp:1');\n this.caps.addFeature('urn:xmpp:jingle:apps:rtp:audio');\n this.caps.addFeature('urn:xmpp:jingle:apps:rtp:video');\n\n if (!this.options.disableRtx && _browser__WEBPACK_IMPORTED_MODULE_6__[\"default\"].supportsRtx()) {\n this.caps.addFeature('urn:ietf:rfc:4588');\n } // this is dealt with by SDP O/A so we don't need to announce this\n // XEP-0293\n // this.caps.addFeature('urn:xmpp:jingle:apps:rtp:rtcp-fb:0');\n // XEP-0294\n // this.caps.addFeature('urn:xmpp:jingle:apps:rtp:rtp-hdrext:0');\n\n\n this.caps.addFeature('urn:ietf:rfc:5761'); // rtcp-mux\n\n this.caps.addFeature('urn:ietf:rfc:5888'); // a=group, e.g. bundle\n // this.caps.addFeature('urn:ietf:rfc:5576'); // a=ssrc\n // Enable Lipsync ?\n\n if (_browser__WEBPACK_IMPORTED_MODULE_6__[\"default\"].isChrome() && this.options.enableLipSync === true) {\n logger.info('Lip-sync enabled !');\n this.caps.addFeature('http://jitsi.org/meet/lipsync');\n }\n\n if (this.connection.rayo) {\n this.caps.addFeature('urn:xmpp:rayo:client:1');\n }\n\n if (_browser__WEBPACK_IMPORTED_MODULE_6__[\"default\"].supportsInsertableStreams()) {\n this.caps.addFeature('https://jitsi.org/meet/e2ee');\n }\n }", "title": "" }, { "docid": "1f12d889bc11f975f99baf87d1c8d656", "score": "0.543082", "text": "function handleLogin(success)\n{\n if (success === false)\n {\n alert(\"Ooops...try a different username\");\n }\n else if(navigator.userAgent.indexOf(\"Firefox\") != -1 )\n {\n loginPage.style.display = \"none\";\n callPage.style.display = \"block\";\n //**********************\n //Starting a peer connection\n //**********************\n \n //getting local video stream\n navigator.mozGetUserMedia({ video: true, audio: true }, function (myStream)\n {\n //displaying local video stream on the page\n localVideo.srcObject = myStream;\n //using Google public stun server\n var ICE_Configuration = {\"iceServers\": [{ \"url\": \"stun:stun2.1.google.com:19302\" }]};\n yourConn = new mozRTCPeerConnection(ICE_Configuration);\n //display your local stream\n yourConn.addStream(myStream);\n //On the Event of call accepted \n yourConn.onicecandidate = function (event)\n {\n if (event.candidate)\n {\n send({type: \"candidate\",candidate: event.candidate});\n }\n };\n //display remote user stream\n yourConn.onaddstream = function (e) {remoteVideo.srcObject = e.stream;};\n\n }, function (error){console.log(error);}\n );//end navigator.mozGetUserMedia\n }//end else statemtn\n else if(navigator.userAgent.indexOf(\"Chrome\") != -1 )\n {\n loginPage.style.display = \"none\";\n callPage.style.display = \"block\";\n //**********************\n //Starting a peer connection\n //**********************\n //getting local video stream\n navigator.webkitGetUserMedia({ video: true }, function (myStream)\n {\n //displaying local video stream on the page\n localVideo.srcObject = myStream;\n //using Google public stun server\n var ICE_Configuration = {\"iceServers\": [{ \"url\": \"stun:stun2.1.google.com:19302\" }]};\n yourConn = new webkitRTCPeerConnection(ICE_Configuration);\n \n //On the Event of call accepted \n yourConn.onicecandidate = function (event)\n {\n if (event.candidate)\n {\n send({type: \"candidate\",candidate: event.candidate});\n }\n };\n yourConn.addStream(myStream);\n //display remote user stream\n yourConn.onaddstream = function (e) {remoteVideo.srcObject = e.stream;};\n }, function (error){console.log(error);}\n );//end navigator.mozGetUserMedia\n }\n}", "title": "" }, { "docid": "8c6974beb94e2dd0e5cdb8f43597f402", "score": "0.5425213", "text": "function vlcOnPageStartLoad()\n{\n //preventMaavaron();\n //skipMaavaron();\n //vlcVideoLinksToProxy();\n}", "title": "" }, { "docid": "942d76b6196fd083628193d9e7a0911f", "score": "0.53904337", "text": "function gotMessageFromServer(message) {\n // if(!currentPeer) start(false);\n // Getting parsed message from handleMessage\n\n currentPeer = parseInt(message.server_id); // server ID\n if (!peerConnection[currentPeer]){ // ice candidate may fire multiple times along with sdp, we want to establish one connection per peer\n peerConnection[currentPeer] = new RTCPeerConnection(serverConfig);\n console.log(\"making element\");\n\t\tvar avatarPath = \"../img/default_avatar.png\";\n\t\tvar peerMediaElements = document.getElementById(\"peer-media-banner\");\n\t\tvar peerMediaDiv = document.createElement(\"div\");\n\t\tvar peerMediaVideo = document.createElement(\"img\");\n\t\tpeerMediaVideo.setAttribute(\"class\", \"z-depth-5\");\n\t\tpeerMediaVideo.autoplay = true;\n\t\tpeerMediaVideo.setAttribute(\"height\", \"150\");\n\t\tpeerMediaVideo.src = avatarPath;\n\t\t// window.localStream = localStream\n\t\tpeerMediaVideo.id = \"user-media-\"+currentPeer;\n\t\tpeerMediaDiv.setAttribute(\"class\", \"col s4\");\n\t\tpeerMediaDiv.appendChild(peerMediaVideo);\n\t\tpeerMediaElements.appendChild(peerMediaDiv);\n\n\t\tpeerConnection[currentPeer].ontrack = function(e){\n\t\t\tconsole.log(\"on track\");\n\t\t\tgotRemoteStream(e);\n\t\t};\n\n\t\tvar peerMediaVideo = document.getElementById(\"user-media-\"+peerID);\n\t\tif(peerMediaVideo.nodeName == \"VIDEO\"){\n\t\t\twindow.localStream.getTracks().forEach(\n\t\t\t\tfunction(track) {\n\t\t\t\t\tconsole.log(\"adding stream to \"+currentPeer);\n\t\t\t\t\tconsole.log(track.id);\n\t\t\t\t\tconsole.log(peerConnection[currentPeer]);\n\t\t\t\t\tpeerConnection[currentPeer].addTrack(\n\t\t\t\t\t\ttrack,\n\t\t\t\t\t\twindow.localStream\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\n console.log(currentPeer);\n console.log(peerConnection[currentPeer]);\n }\n\n if(message.sessionDescriptionProtocol) {\n \t\tconsole.log(message.sessionDescriptionProtocol.type)\n if(message.sessionDescriptionProtocol.type == 'offer') {\n \t\tpeerConnection[currentPeer].setRemoteDescription(message.sessionDescriptionProtocol)\n \t\t.then(function(){\n \t\t return peerConnection[currentPeer].createAnswer();\n \t\t})\n \t\t.then(function(answer){\n \tcreateLocalDescription(answer);\n })\n .catch(logError)\n }else{\n \tconsole.log(currentPeer);\n \tpeerConnection[currentPeer].setRemoteDescription(message.sessionDescriptionProtocol)\n \t.catch(logError);\n }\n\n // });\n } else if(message.candidate) {\n \tconsole.log(\"adding\");\n peerConnection[currentPeer].addIceCandidate(message.candidate);\n \tconsole.log(\"added\");\n }\n\n\n // setupDataChannel(currentPeer);\n\tpeerConnection[currentPeer].ondatachannel = function (event) {\n\t\tconsole.log(\"on data channel\");\n\t\tpeerConnections.push(currentPeer);\n\t\tconsole.log(peerConnections);\n\t\tpeerChannel[currentPeer] = event.channel;\n\t console.log(peerConnection[currentPeer]);\n\t\ttry{\n\t\t\tpeerChannel[currentPeer].send(JSON.stringify({\"aliasList\": aliasList}));\n\t\t\tconsole.log(\"sent\");\n\t\t}\n\t\tcatch(e){\n\t\t\tconsole.log(\"error -> \"+e);\n\t\t}\n\t\tsetupChannel(currentPeer);\n\n\t};\n}", "title": "" }, { "docid": "d734827d6758e356677380212e5e2043", "score": "0.53743476", "text": "enableVideo() {\n this.joined = true;\n this.loadSimpleWebRTC();\n }", "title": "" }, { "docid": "c9ccb539932de1db6c44bede8cbbd130", "score": "0.53686935", "text": "function rfc3261_8_1_3_3(message, ua) {\n if (message.getHeaders('via').length > 1) {\n ua.getLogger('sip.sanitycheck').warn('More than one Via header field present in the response. Dropping the response');\n return false;\n }\n }", "title": "" }, { "docid": "f592ad56412964646dc56dde01a7bc03", "score": "0.5361433", "text": "init() {\n this._onEndpointConnStatusChanged = this.onEndpointConnStatusChanged.bind(this);\n this.rtc.addListener(_service_RTC_RTCEvents__WEBPACK_IMPORTED_MODULE_5___default.a.ENDPOINT_CONN_STATUS_CHANGED, this._onEndpointConnStatusChanged); // Handles P2P status changes\n\n this._onP2PStatus = this.refreshConnectionStatusForAll.bind(this);\n this.conference.on(_JitsiConferenceEvents__WEBPACK_IMPORTED_MODULE_1__[\"P2P_STATUS\"], this._onP2PStatus); // Used to send analytics events for the participant that left the call.\n\n this._onUserLeft = this.onUserLeft.bind(this);\n this.conference.on(_JitsiConferenceEvents__WEBPACK_IMPORTED_MODULE_1__[\"USER_LEFT\"], this._onUserLeft); // On some browsers MediaStreamTrack trigger \"onmute\"/\"onunmute\"\n // events for video type tracks when they stop receiving data which is\n // often a sign that remote user is having connectivity issues\n\n if (_browser__WEBPACK_IMPORTED_MODULE_4__[\"default\"].supportsVideoMuteOnConnInterrupted()) {\n this._onTrackRtcMuted = this.onTrackRtcMuted.bind(this);\n this.rtc.addListener(_service_RTC_RTCEvents__WEBPACK_IMPORTED_MODULE_5___default.a.REMOTE_TRACK_MUTE, this._onTrackRtcMuted);\n this._onTrackRtcUnmuted = this.onTrackRtcUnmuted.bind(this);\n this.rtc.addListener(_service_RTC_RTCEvents__WEBPACK_IMPORTED_MODULE_5___default.a.REMOTE_TRACK_UNMUTE, this._onTrackRtcUnmuted); // Track added/removed listeners are used to bind \"mute\"/\"unmute\"\n // event handlers\n\n this._onRemoteTrackAdded = this.onRemoteTrackAdded.bind(this);\n this.conference.on(_JitsiConferenceEvents__WEBPACK_IMPORTED_MODULE_1__[\"TRACK_ADDED\"], this._onRemoteTrackAdded);\n this._onRemoteTrackRemoved = this.onRemoteTrackRemoved.bind(this);\n this.conference.on(_JitsiConferenceEvents__WEBPACK_IMPORTED_MODULE_1__[\"TRACK_REMOVED\"], this._onRemoteTrackRemoved); // Listened which will be bound to JitsiRemoteTrack to listen for\n // signalling mute/unmute events.\n\n this._onSignallingMuteChanged = this.onSignallingMuteChanged.bind(this); // Used to send an analytics event when the video type changes.\n\n this._onTrackVideoTypeChanged = this.onTrackVideoTypeChanged.bind(this);\n }\n\n this._onLastNChanged = this._onLastNChanged.bind(this);\n this.conference.on(_JitsiConferenceEvents__WEBPACK_IMPORTED_MODULE_1__[\"LAST_N_ENDPOINTS_CHANGED\"], this._onLastNChanged);\n this._onLastNValueChanged = this.refreshConnectionStatusForAll.bind(this);\n this.rtc.on(_service_RTC_RTCEvents__WEBPACK_IMPORTED_MODULE_5___default.a.LASTN_VALUE_CHANGED, this._onLastNValueChanged);\n }", "title": "" }, { "docid": "953c8a5b344975dcb30464882bad175e", "score": "0.5355941", "text": "function onSipEventSession(e /* SIPml.Session.Event */) {\n\n UserEvent.notificationEvent(e.description);\n console.log(\"onSipEventSession------------------\");\n console.log(e.type);\n switch (e.type) {\n case 'connecting':\n case 'connected': {\n var bConnected = (e.type == 'connected');\n if (e.session == oSipSessionRegister) {\n UserEvent.uiOnConnectionEvent(bConnected, !bConnected);\n\n }\n else if (e.session == oSipSessionCall) {\n if (window.btnBFCP) window.btnBFCP.disabled = false;\n\n if (bConnected) {\n stopRingbackTone();\n\n UserEvent.onSipEventSession(e.description);\n if (oNotifICall) {\n oNotifICall.cancel();\n oNotifICall = null;\n }\n }\n\n\n if (SIPml.isWebRtc4AllSupported()) { // IE don't provide stream callback\n /* UserEvent.uiVideoDisplayEvent(false, true);\n UserEvent.uiVideoDisplayEvent(true, true);*/\n }\n }\n break;\n } // 'connecting' | 'connected'\n case 'terminating':\n case 'terminated': {\n if (e.session == oSipSessionRegister) {\n UserEvent.uiOnConnectionEvent(false, false);\n\n oSipSessionRegister = null;\n }\n else if (e.session == oSipSessionCall) {\n if (oNotifICall) {\n oNotifICall.cancel();\n oNotifICall = null;\n }\n UserEvent.uiCallTerminated(e.description);\n }\n oSipSessionCall = null;\n break;\n } // 'terminating' | 'terminated'\n\n case 'm_stream_video_local_added': {\n if (e.session == oSipSessionCall) {\n //UserEvent.uiVideoDisplayEvent(true, true);\n }\n break;\n }\n case 'm_stream_video_local_removed': {\n if (e.session == oSipSessionCall) {\n // UserEvent.uiVideoDisplayEvent(true, false);\n }\n break;\n }\n case 'm_stream_video_remote_added': {\n if (e.session == oSipSessionCall) {\n // UserEvent.uiVideoDisplayEvent(false, true);\n }\n break;\n }\n case 'm_stream_video_remote_removed': {\n if (e.session == oSipSessionCall) {\n // UserEvent.uiVideoDisplayEvent(false, false);\n }\n break;\n }\n\n case 'm_stream_audio_local_added':\n case 'm_stream_audio_local_removed':\n case 'm_stream_audio_remote_added':\n case 'm_stream_audio_remote_removed': {\n break;\n }\n\n case 'i_ect_new_call': {\n oSipSessionTransferCall = e.session;\n break;\n }\n\n case 'i_ao_request': {\n if (e.session == oSipSessionCall) {\n var iSipResponseCode = e.getSipResponseCode();\n if (iSipResponseCode == 180 || iSipResponseCode == 183) {\n UserEvent.onSipEventSession(\"Remote Ringing\");\n startRingbackTone();\n }\n }\n break;\n }\n\n case 'm_early_media': {\n if (e.session == oSipSessionCall) {\n stopRingbackTone();\n\n UserEvent.notificationEvent(\"Early media started\");\n }\n break;\n }\n\n case 'm_local_hold_ok': {\n if (e.session == oSipSessionCall) {\n if (oSipSessionCall.bTransfering) {\n oSipSessionCall.bTransfering = false;\n // this.AVSession.TransferCall(this.transferUri);\n }\n UserEvent.onSipEventSession(\"Call placed on hold\");\n oSipSessionCall.bHeld = true;\n }\n break;\n }\n case 'm_local_hold_nok': {\n if (e.session == oSipSessionCall) {\n oSipSessionCall.bTransfering = false;\n UserEvent.onSipEventSession(\"Failed to place remote party on hold\");\n }\n break;\n }\n case 'm_local_resume_ok': {\n if (e.session == oSipSessionCall) {\n oSipSessionCall.bTransfering = false;\n UserEvent.onSipEventSession(\"Call taken off hold\");\n oSipSessionCall.bHeld = false;\n\n if (SIPml.isWebRtc4AllSupported()) { // IE don't provide stream callback yet\n /* UserEvent.uiVideoDisplayEvent(false, true);\n UserEvent.uiVideoDisplayEvent(true, true);*/\n }\n }\n break;\n }\n case 'm_local_resume_nok': {\n if (e.session == oSipSessionCall) {\n oSipSessionCall.bTransfering = false;\n UserEvent.onSipEventSession(\"Failed to unhold call\");\n }\n break;\n }\n case 'm_remote_hold': {\n if (e.session == oSipSessionCall) {\n UserEvent.onSipEventSession(\"Placed on hold by remote party\");\n }\n break;\n }\n case 'm_remote_resume': {\n if (e.session == oSipSessionCall) {\n UserEvent.onSipEventSession(\"Taken off hold by remote party\");\n }\n break;\n }\n case 'm_bfcp_info': {\n if (e.session == oSipSessionCall) {\n UserEvent.onSipEventSession('BFCP Info: ' + e.description);\n }\n break;\n }\n\n case 'o_ect_trying': {\n if (e.session == oSipSessionCall) {\n UserEvent.onSipEventSession(\"Call transfer in progress\");\n }\n break;\n }\n case 'o_ect_accepted': {\n if (e.session == oSipSessionCall) {\n UserEvent.onSipEventSession(\"Call transfer accepted\");\n }\n break;\n }\n case 'o_ect_completed':\n case 'i_ect_completed': {\n if (e.session == oSipSessionCall) {\n UserEvent.onSipEventSession(\"Call transfer completed\");\n\n if (oSipSessionTransferCall) {\n oSipSessionCall = oSipSessionTransferCall;\n }\n oSipSessionTransferCall = null;\n }\n break;\n }\n case 'o_ect_failed':\n case 'i_ect_failed': {\n if (e.session == oSipSessionCall) {\n UserEvent.onSipEventSession(\"Call transfer failed\");\n }\n break;\n }\n case 'o_ect_notify':\n case 'i_ect_notify': {\n if (e.session == oSipSessionCall) {\n UserEvent.onSipEventSession(\"Call Transfer: \" + e.getSipResponseCode() + \" \" + e.description);\n if (e.getSipResponseCode() >= 300) {\n if (oSipSessionCall.bHeld) {\n oSipSessionCall.resume();\n }\n\n }\n }\n break;\n }\n case 'i_ect_requested': {\n if (e.session == oSipSessionCall) {\n var s_message = \"Do you accept call transfer to [\" + e.getTransferDestinationFriendlyName() + \"]?\";//FIXME\n if (confirm(s_message)) {\n UserEvent.onSipEventSession(\"Call transfer in progress\");\n oSipSessionCall.acceptTransfer();\n break;\n }\n oSipSessionCall.rejectTransfer();\n }\n break;\n }\n case 'transport_error': {\n sipUnRegister();\n //UserEvent.notificationEvent('ReRegistering');\n break;\n }\n }\n}", "title": "" }, { "docid": "b3c880005d0d57d47b22a0903934859e", "score": "0.53539085", "text": "function handleOffer(offer, name) { \n document.getElementById('dv_gotCall').hidden = false;\n document.getElementById('callInitiator').style.display = 'none';\n document.getElementById('callReceiver').style.display = 'block';\n document.getElementById('controlVid').style.display = 'none';\n\n createPeerConnection();\n \n connectedUser = name; \n document.getElementById('callFrom').innerHTML = '來自 ' + name;\n /* Call answer functionality starts */\n answerBtn.addEventListener(\"click\", function () { \n //connectedUser = name; 上移\n yourConn.setRemoteDescription(new RTCSessionDescription(offer)); \n \n //create an answer to an offer \n yourConn.createAnswer(function (answer) { \n yourConn.setLocalDescription(answer); \n \n send({ \n type: \"answer\", \n answer: answer\n });\n \n }, function (error) { \n alert(\"Error when creating an answer\"); \n });\n document.getElementById('remoteImg').hidden = false;\n document.getElementById('remoteImg').src = '' + remoteImgUrl;\n document.getElementById('controlVid').style.display = 'block';\n document.getElementById('callReceiver').style.display = 'none';\n document.getElementById('callOngoing').style.display = 'block';\n });\n /* Call answer functionality ends */\n /* Call decline functionality starts */\n declineBtn.addEventListener(\"click\", function () {\n send({ \n type: \"decline\",\n reqFrom: name\n });\n handleLeave();\n });\n\n/*Call decline functionality ends */\n}", "title": "" }, { "docid": "801bb16a36f8481009e9e00c2bf18ec9", "score": "0.53463525", "text": "function _bindPageEvents() {\n \"use strict\";\n $('#js-start-broadcasting-button').click(function() {\n $(this).prop('disabled', true);\n participant.startBroadcasting($('video').get(0));\n });\n}", "title": "" }, { "docid": "29121272b4062b37fb9137899e4ab0e4", "score": "0.53418887", "text": "wrapRTCPeerConnection () {\n let self = this\n let nativeRTCPeerConnection = this.wrtc.RTCPeerConnection;\n\n ['createDataChannel', 'close'].forEach(function (method) {\n let nativeMethod = nativeRTCPeerConnection.prototype[method]\n if (nativeMethod) {\n nativeRTCPeerConnection.prototype[method] = function () {\n self.addToTimeline({\n event: method,\n tag: method === 'close' ? 'ice' : 'datachannel',\n peerId: this.__rtcStatsId,\n data: arguments\n })\n return nativeMethod.apply(this, arguments)\n }\n }\n });\n\n // DEPRECATED\n // ['addStream', 'removeStream'].forEach(function (method) {\n // var nativeMethod = nativeRTCPeerConnection.prototype[method]\n // if (nativeMethod) {\n // nativeRTCPeerConnection.prototype[method] = function () {\n // self.addToTimeline({\n // event: method,\n // tag: 'stream',\n // peerId: this.__rtcStatsId,\n // stream: arguments[0]\n // })\n // return nativeMethod.apply(this, arguments)\n // }\n // }\n // });\n\n ['addTrack'].forEach(function (method) {\n var nativeMethod = nativeRTCPeerConnection.prototype[method]\n if (nativeMethod) {\n nativeRTCPeerConnection.prototype[method] = function () {\n var track = arguments[0]\n var stream = arguments[1] // [].slice.call(arguments, 1)\n self.addCustomEvent('track', {\n event: method,\n tag: 'track',\n peerId: this.__rtcStatsId,\n data: {\n stream: self.getStreamDetails(stream),\n track: self.getMediaTrackDetails(track)\n }\n })\n return nativeMethod.apply(this, arguments)\n }\n }\n });\n\n ['removeTrack'].forEach(function (method) {\n var nativeMethod = nativeRTCPeerConnection.prototype[method]\n if (nativeMethod) {\n nativeRTCPeerConnection.prototype[method] = function () {\n var track = arguments[0].track\n self.addToTimeline({\n event: method,\n tag: 'track',\n peerId: this.__rtcStatsId,\n track: self.getMediaTrackDetails(track)\n })\n return nativeMethod.apply(this, arguments)\n }\n }\n });\n\n ['createOffer', 'createAnswer'].forEach(function (method) {\n var nativeMethod = nativeRTCPeerConnection.prototype[method]\n if (nativeMethod) {\n nativeRTCPeerConnection.prototype[method] = function () {\n var rtcStatsId = this.__rtcStatsId\n var args = arguments\n var opts\n if (arguments.length === 1 && typeof arguments[0] === 'object') {\n opts = arguments[0]\n } else if (arguments.length === 3 && typeof arguments[2] === 'object') {\n opts = arguments[2]\n }\n self.addToTimeline({\n event: method,\n tag: 'sdp',\n peerId: this.__rtcStatsId,\n data: opts\n })\n\n return nativeMethod.apply(this, opts ? [opts] : undefined)\n .then((description) => {\n self.addToTimeline({\n event: method + 'OnSuccess',\n tag: 'sdp',\n peerId: this.__rtcStatsId,\n data: description\n })\n if (args.length > 0 && typeof args[0] === 'function') {\n args[0].apply(null, [description])\n return undefined\n }\n return description\n }).catch((err) => {\n self.addToTimeline({\n event: method + 'OnFailure',\n tag: 'sdp',\n peerId: rtcStatsId,\n error: err\n })\n if (args.length > 1 && typeof args[1] === 'function') {\n args[1].apply(null, [err])\n return\n }\n throw err\n })\n }\n }\n });\n\n ['setLocalDescription', 'setRemoteDescription', 'addIceCandidate'].forEach(function (method) {\n var nativeMethod = nativeRTCPeerConnection.prototype[method]\n if (nativeMethod) {\n nativeRTCPeerConnection.prototype[method] = function () {\n var rtcStatsId = this.__rtcStatsId\n let tag = method === 'addIceCandidate' ? 'ice' : 'sdp'\n var args = arguments\n self.addToTimeline({\n event: method,\n tag: tag,\n peerId: this.__rtcStatsId,\n data: args[0]\n })\n\n return nativeMethod.apply(this, [args[0]])\n .then(function () {\n self.addToTimeline({\n event: method + 'OnSuccess',\n tag: tag,\n peerId: rtcStatsId\n // data: args[0]\n })\n if (args.length >= 2 && typeof args[1] === 'function') {\n args[1].apply(null, [])\n return undefined\n }\n return undefined\n }).catch(function (err) {\n self.addToTimeline({\n event: method + 'OnFailure',\n tag: tag,\n peerId: rtcStatsId,\n error: err\n // data: args[0]\n })\n if (args.length >= 3 && typeof args[2] === 'function') {\n args[2].apply(null, [err])\n return undefined\n }\n throw err\n })\n }\n }\n })\n }", "title": "" }, { "docid": "df92e243105bf502c24b3bf736b51f94", "score": "0.5320588", "text": "function ofmeetEtherpadClicked()\n{\n console.log(\"ofmeet.etherpadClicked\", OFMEET_CONFIG.bgWin.pade.activeUrl);\n\n if (OFMEET_CONFIG.bgWin.pade.activeUrl)\n {\n if (OFMEET_CONFIG.documentShare)\n {\n if (OFMEET_CONFIG.documentOwner)\n {\n OFMEET_CONFIG.documentShare = false;\n OFMEET_CONFIG.documentOwner = false;\n OFMEET_CONFIG.documentUser = null;\n OFMEET_CONFIG.largeVideoContainer = null;\n\n document.getElementById(\"largeVideoContainer\").innerHTML = OFMEET_CONFIG.largeVideoContainer;\n\n // above code does not work properly\n // brute force solution is to reload\n\n APP.conference._room.sendOfMeet('{\"event\": \"ofmeet.event.url.end\"}');\n window.location.href = \"chrome.index.html?room=\" + OFMEET_CONFIG.room;\n }\n }\n else {\n OFMEET_CONFIG.documentShare = true;\n OFMEET_CONFIG.documentOwner = true;\n\n OFMEET_CONFIG.largeVideoContainer = document.getElementById(\"largeVideoContainer\").innerHTML;\n\n var url = OFMEET_CONFIG.bgWin.pade.activeUrl;\n\n if (OFMEET_CONFIG.bgWin.pade.activeUrl.indexOf(\".pdf\") > -1)\n {\n url = chrome.extension.getURL(\"pdf/index.html?pdf=\" + OFMEET_CONFIG.bgWin.pade.activeUrl);\n }\n\n document.getElementById(\"largeVideoContainer\").innerHTML = OFMEET_CONFIG.iframe(url);\n }\n }\n}", "title": "" }, { "docid": "18c3a6997bde72bf1cb55af25deed83a", "score": "0.5318786", "text": "function rfc3261_8_1_3_3(message, ua) {\n if(message.getHeaders('via').length > 1) {\n ua.getLogger('sip.sanitycheck').warn('More than one Via header field present in the response. Dropping the response');\n return false;\n }\n}", "title": "" }, { "docid": "e1f79c9707ef08d3a76a969e6d06b71f", "score": "0.53128797", "text": "restrictRelayBandwidth() {\n if (!(window.RTCRtpSender &&\n 'getParameters' in window.RTCRtpSender.prototype)) {\n return;\n }\n this.pc.addEventListener('iceconnectionstatechange', () => __awaiter(this, void 0, void 0, function* () {\n if (this.pc.iceConnectionState !== 'completed' &&\n this.pc.iceConnectionState !== 'connected') {\n return;\n }\n if (this._firstTimeConnected) {\n return;\n }\n this._firstTimeConnected = true;\n const stats = yield this.pc.getStats();\n let activeCandidatePair;\n stats.forEach(report => {\n if (report.type === 'transport') {\n activeCandidatePair = stats.get(report.selectedCandidatePairId);\n }\n });\n // Fallback for Firefox.\n if (!activeCandidatePair) {\n stats.forEach(report => {\n if (report.type === 'candidate-pair' && report.selected) {\n activeCandidatePair = report;\n }\n });\n }\n if (activeCandidatePair) {\n let isRelay = false;\n if (activeCandidatePair.remoteCandidateId) {\n const remoteCandidate = stats.get(activeCandidatePair.remoteCandidateId);\n if (remoteCandidate && remoteCandidate.candidateType === 'relay') {\n isRelay = true;\n }\n }\n if (activeCandidatePair.localCandidateId) {\n const localCandidate = stats.get(activeCandidatePair.localCandidateId);\n if (localCandidate && localCandidate.candidateType === 'relay') {\n isRelay = true;\n }\n }\n if (isRelay) {\n this.maximumBitrate = this.maxRelayBandwidth;\n if (this.currentBitrate) {\n this.setMaximumBitrate(Math.min(this.currentBitrate, this.maximumBitrate));\n }\n }\n }\n }));\n }", "title": "" }, { "docid": "f9ae26ac7048261bd6b06590809377c5", "score": "0.5305837", "text": "function createConnection() {\n var pc_config = {'iceServers': [{'url': 'stun:stun.l.google.com:19302'}]};\n\nvar pc_constraints = {'optional': [{'DtlsSrtpKeyAgreement': true}]};\n\n// Set up audio and video regardless of what devices are present.\nvar sdpConstraints = {'mandatory': {\n 'OfferToReceiveAudio':true,\n 'OfferToReceiveVideo':true }};\n \n dataChannelSend.placeholder = '';\n var servers = null;//{'iceServers': [{'url': 'stun:stun.l.google.com:19302'}]};\n pcConstraint = null;//{'optional': [{'DtlsSrtpKeyAgreement': true}]};\n dataConstraint = null;//{reliable: false};\n trace('Using SCTP based data channels');\n // SCTP is supported from Chrome 31 and is supported in FF.\n // No need to pass DTLS constraint as it is on by default in Chrome 31.\n // For SCTP, reliable and ordered is true by default.\n // Add localConnection to global scope to make it visible from the browser console.\n // 1) Alice creates an RTCPeerConnection object.\n window.localConnection = localConnection =\n new RTCPeerConnection(servers, pcConstraint);\n trace('Created local peer connection object localConnection');\n\n sendChannel = localConnection.createDataChannel('sendDataChannel',\n dataConstraint);\n trace('Created send data channel');\n\n localConnection.onicecandidate = iceCallback1;\n sendChannel.onopen = onSendChannelStateChange;\n sendChannel.onclose = onSendChannelStateChange;\n\n // Add remoteConnection to global scope to make it visible from the browser console.\n window.remoteConnection = remoteConnection =\n new RTCPeerConnection(servers, pcConstraint);\n trace('Created remote peer connection object remoteConnection');\n\n remoteConnection.onicecandidate = iceCallback2;\n remoteConnection.ondatachannel = receiveChannelCallback;\n/*\nvoid createOffer(RTCSessionDescriptionCallback successCallback, \n RTCPeerConnectionErrorCallback failureCallback, \n optional MediaConstraints constraints);\n*/\n // 2) Alice creates an offer (an SDP session description) with the RTCPeerConnection createOffer() method.\n localConnection.createOffer(gotDescription1, onCreateSessionDescriptionError);\n startButton.disabled = true;\n closeButton.disabled = false;\n}", "title": "" }, { "docid": "824eb0de4a171503726b7b46f4c20949", "score": "0.52931947", "text": "function InitPeer(type) {\n let peer = new Peer({ initiator: (type == 'init') ? true : false, stream: stream, trickle: false })\n peer.on('stream', function (stream) {\n CreateVideo(stream)\n })\n //This isn't working in chrome; works perfectly in firefox.\n // peer.on('close', function () {\n // document.getElementById(\"peerVideo\").remove();\n // peer.destroy()\n // })\n peer.on('data', function (data) {\n let decodedData = new TextDecoder('utf-8').decode(data)\n let peervideo = document.querySelector('#peerVideo')\n peervideo.style.filter = decodedData\n })\n return peer\n }", "title": "" }, { "docid": "c10201a97322acac1e8c16e35a603f00", "score": "0.5284282", "text": "function handleOffer(offer, name) {\n //********************** \n //Starting a peer connection \n //********************** \n\n //using Google public stun server \n var configuration = {\n \"iceServers\": [{\"url\": \"stun:stun2.1.google.com:19302\"}]\n };\n\n users[contadorOfertas] = name;\n\n yourConn = new RTCPeerConnection(configuration);\n // Setup ice handling\n \n yourConn.connectedUser = name;\n \n yourConn.onicecandidate = function (event) {\n if (event.candidate) {\n send({\n type: \"candidate\",\n candidate: event.candidate,\n name: this.connectedUser\n });\n }\n };\n\n\n yourConn.ondatachannel = function (event) {\n var receiveChannel = event.channel;\n var blob = false;\n var origen = \"\";\n var chat = \"\";\n receiveChannel.onmessage = function (event) { //recibe evento \n if (blob) {\n var blobRecibido = new Blob([event.data], {type: 'audio/wav'});\n makeUrlBlob(blobRecibido);\n nuevaEntradaPlantilla2(origen, chat);\n blob = false;\n chat = \"\";\n } else{\n var info = JSON.parse(event.data);\n\n $('#buttonChat' + (info.chat).substring(5)).attr('class','btn btn-warning');\n\n chat = info.chat;\n if (info.blob) {\n blob = true; \n origen = info.origen;\n } else {\n nuevaEntradaPlantilla(info.origen, info.mensaje, info.chat);\n }\n }\n };\n };\n\n\n //creating data channel \n dataChannel = yourConn.createDataChannel(\"channel1\", {reliable: true});\n dataChannel.binaryType = \"blob\";\n\n dataChannel.onerror = function (error) {\n console.log(\"Ooops...error:\", error);\n };\n\n /* \t\n //when we receive a message from the other peer, display it on the screen \n dataChannel.onmessage = function (event) { \n }; \n */\n dataChannel.onclose = function () {\n\n console.log(\"data channel is closed\");\n };\n\n yourConn.setRemoteDescription(new RTCSessionDescription(offer));\n \n //create an answer to an offer \n yourConn.createAnswer(function (answer) {\n connectionMap.get(users[contadorOfertas]).setLocalDescription(answer);\n send({\n type: \"answer\",\n answer: answer,\n name: users[contadorOfertas]\n });\n contadorOfertas++;\n }, function (error) {\n alert(\"Error when creating an answer\");\n });\n\n\n connectionMap.set(name, yourConn);\n dataChannelMap.set(name, dataChannel);\n\n if (name !== \"admin\"){\n crearChat(name);\n }\n}", "title": "" }, { "docid": "7eea3ae0b08118d5e8c32331714332c6", "score": "0.52827805", "text": "function loadMyMedia(stream) {\n\n console.log(\"Access granted to audio / video\");\n document.body.style.backgroundImage = \"none\";\n getId(\"loadingDiv\").style.display = \"none\";\n\n myMediaStream = stream;\n\n const videoWrap = document.createElement(\"div\");\n\n // my peer name video audio status\n const myHeader = document.createElement(\"div\");\n const myCallTimeImg = document.createElement(\"i\");\n const myCallTime = document.createElement(\"p\");\n const myInfoImg = document.createElement(\"i\");\n const myInfo = document.createElement(\"h4\");\n const myHandStatusIcon = document.createElement(\"button\");\n const myVideoStatusIcon = document.createElement(\"button\");\n const myAudioStatusIcon = document.createElement(\"button\");\n const myVideoImg = document.createElement(\"img\");\n\n // header\n myHeader.setAttribute(\"id\", \"myHeader\");\n myHeader.className = \"header\";\n // time\n myCallTimeImg.setAttribute(\"id\", \"callTimeImg\");\n myCallTimeImg.className = \"fas fa-clock\";\n myCallTime.setAttribute(\"id\", \"callTime\");\n tippy(myCallTime, { content: \"Session Time\", });\n // my name\n myInfoImg.setAttribute(\"id\", \"myInfoImg\");\n myInfoImg.className = \"fas fa-user\";\n myInfo.setAttribute(\"id\", \"myInfo\");\n myInfo.className = \"videoPeerName\";\n tippy(myInfo, { content: \"My name\", });\n // my hand status \n myHandStatusIcon.setAttribute(\"id\", \"myHandStatusIcon\");\n myHandStatusIcon.className = \"fas fa-hand-paper\";\n myHandStatusIcon.style.setProperty(\"color\", \"#9477CB\");\n tippy(myHandStatusIcon, { content: \"Raised\", });\n // my video status \n myVideoStatusIcon.setAttribute(\"id\", \"myVideoStatusIcon\");\n myVideoStatusIcon.className = \"fas fa-video\";\n tippy(myVideoStatusIcon, { content: \"On\", });\n // my audio status \n myAudioStatusIcon.setAttribute(\"id\", \"myAudioStatusIcon\");\n myAudioStatusIcon.className = \"fas fa-microphone\";\n tippy(myAudioStatusIcon, { content: \"On\", });\n // my video image\n myVideoImg.setAttribute(\"id\", \"myVideoImg\");\n myVideoImg.className = \"videoImg\";\n\n // add elements to myHeader div\n myHeader.appendChild(myCallTimeImg);\n myHeader.appendChild(myCallTime);\n myHeader.appendChild(myInfoImg);\n myHeader.appendChild(myInfo);\n myHeader.appendChild(myVideoStatusIcon);\n myHeader.appendChild(myAudioStatusIcon);\n myHeader.appendChild(myHandStatusIcon);\n // add elements to video wrap div\n videoWrap.appendChild(myHeader);\n videoWrap.appendChild(myVideoImg);\n\n // hand display none on default menad is raised == false\n myHandStatusIcon.style.display = \"none\";\n\n const myMedia = document.createElement(\"video\");\n videoWrap.className = \"video\";\n videoWrap.setAttribute(\"id\", \"myVideoWrap\");\n videoWrap.appendChild(myMedia);\n myMedia.setAttribute(\"id\", \"myVideo\");\n myMedia.setAttribute(\"playsinline\", true);\n myMedia.className = \"mirror\";\n myMedia.autoplay = true;\n myMedia.muted = true;\n myMedia.volume = 0;\n myMedia.controls = false;\n document.body.appendChild(videoWrap);\n\n // attachMediaStream is a part of the adapter.js library\n attachMediaStream(myMedia, myMediaStream);\n setVideos();\n setElements();\n setUsersBtn();\n setAudioBtn();\n setVideoBtn();\n setChatRoomBtn();\n setMyHandBtn();\n setMoreBtn();\n setLeaveRoomBtn();\n showBottomButtonsAndHeader();\n onMouseMove();\n setShareRoomBtn();\n setScreenShareBtn();\n setRecordStreamBtn();\n setFileShareBtn();\n setMuteEveryoneBtn();\n setHideEveryoneBtn();\n calculateCallTime();\n fullScreenVideoPlayer(\"myVideo\"); // full screen mode\n}", "title": "" }, { "docid": "34de35bb23c3458f9726cbeadfa572d8", "score": "0.5279412", "text": "function initialize() {\n key = (new URLSearchParams(window.location.search)).get('key') || null;\n // Create own peer object with connection to shared PeerJS server\n peer = new Peer(key, { host: 'obsp2pwebcanstream.herokuapp.com', secure:true, port:443, key: 'peerjs', debug: 3, path: '/peer'});\n //peer = new Peer(key, { });\n console.log(peer);\n\n peer.on('call', call => {\n const startChat = async () => {\n const localStream = await navigator.mediaDevices.getUserMedia(constraints);\n videoLocal.srcObject = localStream;\n call.answer(localStream);\n call.on('stream', remoteStream => {\n videoRemote.srcObject = remoteStream;\n })\n };\n startChat()\n });\n\n peer.on('open', function (id) {\n // Workaround for peer.reconnect deleting previous id\n if (peer.id === null) {\n console.log('Received null id from peer open');\n peer.id = lastPeerId;\n } else {\n lastPeerId = peer.id;\n }\n\n console.log(recvId, 'ID: ' + peer.id);\n recvId.innerHTML = \"ID: \" + peer.id;\n status.innerHTML = \"Awaiting connection...\";\n });\n peer.on('connection', function (c) {\n // Allow only a single connection\n if (conn) {\n c.on('open', function () {\n c.send(\"Already connected to another client\");\n /*setTimeout(function () {\n c.close();\n }, 500);*/\n });\n return;\n }\n\n conn = c;\n console.log(\"Connected to: \" + conn.peer);\n status.innerHTML = \"Connected\"\n ready();\n });\n peer.on('disconnected', function () {\n status.innerHTML = \"Connection lost. Please reconnect\";\n console.log('Connection lost. Please reconnect');\n\n // Workaround for peer.reconnect deleting previous id\n peer.id = lastPeerId;\n peer._lastServerId = lastPeerId;\n peer.reconnect();\n });\n peer.on('close', function () {\n conn = null;\n status.innerHTML = \"Connection destroyed. Please refresh\";\n console.log('Connection destroyed');\n });\n peer.on('error', function (err) {\n console.log(err);\n status.innerHTML = err;\n });\n }", "title": "" }, { "docid": "4932a45c744dc7a1fb6cf55ed0c5a1dd", "score": "0.5279412", "text": "function thisBrowserIsBad() {\n track('streaming', 'not supported');\n alert(facetogif.str.nope);\n }", "title": "" }, { "docid": "f4d54127d7a014c7514ae7e13a65b467", "score": "0.5275594", "text": "function webRtcCreateAnswer(offer,clientName) {\r\n\tif (typeof thisPeersName != \"string\") {\r\n\t\tconsole.log(\"Please set peer name before calling this function\");\r\n\t\treturn;\r\n\t}\r\n\t\r\n console.log(\"webRtcCreateAnswer\", clientName, thisPeersName, webRtcClients);\r\n \r\n webRtcClients[clientName] = {};\r\n \r\n var client = webRtcClients[clientName];\r\n client.clientId = clientName;\r\n client.webRtcDc = null;\r\n client.webRtcSc = null;\r\n client.webRtcPc = new RTCPeerConnection(webRtcConfig)\r\n client.webRtcLive = false;\r\n client.webRtcPc.ondatachannel = function(e) {\r\n\t\tif(client.webRtcDc) {\r\n\t\t\tclient.webRtcSc = e.channel;\r\n\t\t\t//scInit(client);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tclient.webRtcDc = e.channel;\r\n\t\t\twebRtcDcInit(client);\r\n\t\t}\r\n };\r\n\r\n client.webRtcNegotiated = false; // work around FF39- not self-firing negotiationneeded\r\n client.webRtcPc.onnegotiationneeded = e => {\r\n client.webRtcNegotiated = true;\r\n client.webRtcPc.createOffer().then(d => client.webRtcPc.setLocalDescription(d)).then(() => {\r\n if (client.webRtcLive) client.webRtcSc.send(JSON.stringify({ \"sdp\": client.webRtcPc.localDescription }));\r\n }).catch(webRtcFailed);\r\n };\r\n\r\n if (client.webRtcPc.signalingState != \"stable\") return;\r\n //button.disabled = offer.disabled = true;\r\n var obj = { type:\"offer\", sdp:offer };\r\n client.webRtcPc.setRemoteDescription(new RTCSessionDescription(obj))\r\n .then(() => client.webRtcPc.createAnswer()).then(d => client.webRtcPc.setLocalDescription(d))\r\n .catch(webRtcFailed);\r\n client.webRtcPc.onicecandidate = e => {\r\n if (e.candidate) return;\r\n if (!client.webRtcLive) {\r\n //answer.focus();\r\n //answer.value = webRtcPc.localDescription.sdp;\r\n //answer.select();\r\n console.log(\"Answer: \", client.webRtcPc.localDescription.sdp);\r\n var xhttp = new XMLHttpRequest();\r\n xhttp.onreadystatechange = function() {\r\n if (xhttp.readyState == 4 && xhttp.status == 200) {\r\n ;\r\n }\r\n };\r\n var full = location.protocol+'//'+location.hostname+(location.port ? ':'+location.port: ''); \r\n \r\n var messageObj = {messageType: \"answer\", answer: client.webRtcPc.localDescription.sdp};\r\n //xhttp.open(\"GET\", \"http://\" + window.location.host + \"/ioInterface?command=getOtsValues\", true);\r\n console.log(\"send message to: \", clientName);\r\n xhttp.open(\"GET\", full + \"/webrtc?command=writeMessage&clientName=\" + thisPeersName + \"&destinationName=\" + clientName + \"&message=\" + btoa(JSON.stringify(messageObj)), true);\r\n xhttp.send();\t \r\n //send the answer to the engineList\r\n \r\n \r\n } else {\r\n webRtcSc.send(JSON.stringify({ \"candidate\": e.candidate }));\r\n }\r\n };\r\n}", "title": "" }, { "docid": "3d8481486ed7483f5c553a78c7dbae2e", "score": "0.5262342", "text": "function start(isInitiator) {\t\n\tdocument.querySelector('.init_form').style.display = \"none\";\n\tdocument.querySelector(\".chat_form\").style.display = \"block\";\n\t// document.querySelector('.view_form').style.display = \"block\";\n\tcallButton.disabled = true;\n\tpc = new RTCPeerConnection(configuration);\n\n\t// send any ice candidates to the other peer\n\tpc.onicecandidate = function (evt) {\n\t\tif (evt.candidate) {\n\t\t\tvar s = SDP.parse(\"m=application 0 NONE\\r\\na=\" + evt.candidate.candidate + \"\\r\\n\");\n\t\t\tvar candidateDescription = s.mediaDescriptions[0].ice.candidates[0];\n\t\t\tpeer.send(JSON.stringify({\n\t\t\t\t\"candidate\": {\n\t\t\t\t\t\"candidateDescription\": candidateDescription,\n\t\t\t\t\t\"sdpMLineIndex\": evt.candidate.sdpMLineIndex\n\t\t\t\t}\n\t\t\t}, null, 2));\n\t\t\tconsole.log(\"candidate emitted: \" + JSON.stringify(candidateDescription, null, 2));\n\t\t}\n\t};\n\n\tif (isInitiator) {// 채팅을 위한 dataChannel 생성\n\t\tchannel = pc.createDataChannel(\"chat\");\n\t\tsetupChat();\n\t} else { // 생성된 dataChannel 사용\n\t\tpc.ondatachannel = function (evt) {\n\t\t\tchannel = evt.channel;\n\t\t\tsetupChat();\n\t\t};\n\t}\n\n\t// once the remote stream arrives, show it in the remote video element\n\tpc.onaddstream = function (evt) {\n\t\tremoteView.srcObject = evt.stream;\n\t\tif (videoCheckBox.checked)\n\t\t\tremoteView.style.visibility = \"visible\";\n// else if (audioCheckBox.checked && !(chatCheckBox.checked))\n// audioOnlyView.style.visibility = \"visible\";\n\t\tsendOrientationUpdate();\n\t};\n var targetStream;\n\tif (screenCheckBox.checked) {\n\t\t// console.log(\"스크린\");\n\t\tpc.addStream(screenMediaStream);\n\t\ttargetStream = screenMediaStream;\n\t}else{\n\t\t// console.log(\"화상\");\n\t\tpc.addStream(localStream);\n\t\ttargetStream = localStream;\n\t}\n\n\tif (isInitiator)\n\t\tpc.createOffer(localDescCreated, logError);\n\n\t// 화상,음성 on/off\n\tdocument.querySelector('.setting-inline').style.display = \"block\";\n\tdocument.getElementById(\"videoToggleButton\").onclick = function(){\n\t\ttargetStream.getVideoTracks()[0].enabled =\n\t\t\t!(targetStream.getVideoTracks()[0].enabled);\n }\n\tdocument.getElementById(\"audioToggleButton\").onclick = function(){\n\t\ttargetStream.getAudioTracks()[0].enabled =\n\t\t\t!(targetStream.getAudioTracks()[0].enabled);\n }\n\tdocument.getElementById(\"chatToggleButton\").onclick = function(){\n\t\tvar chatToggleButton = document.getElementById(\"chatToggleButton\");\n\t\tchatToggleButton.checked = !chatToggleButton.checked;\n\t\tif(chatToggleButton.checked==true){\n\t\t\tdocument.querySelector('.chat_form').style.display = \"none\";\n\t\t\tdocument.querySelector('.view_form').style.display = \"block\";\n\t\t}else{\n\t\t\tdocument.querySelector('.chat_form').style.display = \"block\";\n\t\t\tdocument.querySelector('.view_form').style.display = \"none\";\n\t\t}\n }\n\tdocument.querySelector(\"#file_share\").style.visibility = \"visible\";\n\tpostChatMessage(\"[상대와 연결되었습니다]\");\n\t\n}", "title": "" }, { "docid": "919f9531783b411c02e1f0532a96a9e1", "score": "0.52564156", "text": "function rfc3261_8_1_3_3() {\n if(message.getHeaders('via').length > 1) {\n logger.warn('More than one Via header field present in the response. Dropping the response');\n return false;\n }\n}", "title": "" }, { "docid": "6293f236b7bcc4a99c2ad9e39bcb2496", "score": "0.52462596", "text": "_playCallback() {\n const type = this.isVideoTrack() ? 'video' : 'audio';\n const now = window.performance.now();\n console.log(`(TIME) Render ${type}:\\t`, now);\n this.conference.getConnectionTimes()[`${type}.render`] = now; // The conference can be started without calling GUM\n // FIXME if there would be a module for connection times this kind\n // of logic (gumDuration or ttfm) should end up there\n\n const gumStart = window.connectionTimes['obtainPermissions.start'];\n const gumEnd = window.connectionTimes['obtainPermissions.end'];\n const gumDuration = !isNaN(gumEnd) && !isNaN(gumStart) ? gumEnd - gumStart : 0; // Subtract the muc.joined-to-session-initiate duration because jicofo\n // waits until there are 2 participants to start Jingle sessions.\n\n const ttfm = now - (this.conference.getConnectionTimes()['session.initiate'] - this.conference.getConnectionTimes()['muc.joined']) - gumDuration;\n this.conference.getConnectionTimes()[`${type}.ttfm`] = ttfm;\n console.log(`(TIME) TTFM ${type}:\\t`, ttfm);\n _statistics_statistics__WEBPACK_IMPORTED_MODULE_3__[\"default\"].sendAnalytics(Object(_service_statistics_AnalyticsEvents__WEBPACK_IMPORTED_MODULE_0__[\"createTtfmEvent\"])({\n 'media_type': type,\n muted: this.hasBeenMuted,\n value: ttfm\n }));\n }", "title": "" }, { "docid": "29112f36baac5771f78321780e00e007", "score": "0.52422374", "text": "initFeaturesList() {\n // http://xmpp.org/extensions/xep-0167.html#support\n // http://xmpp.org/extensions/xep-0176.html#support\n this.caps.addFeature('urn:xmpp:jingle:1');\n this.caps.addFeature('urn:xmpp:jingle:apps:rtp:1');\n this.caps.addFeature('urn:xmpp:jingle:transports:ice-udp:1');\n this.caps.addFeature('urn:xmpp:jingle:apps:dtls:0');\n this.caps.addFeature('urn:xmpp:jingle:transports:dtls-sctp:1');\n this.caps.addFeature('urn:xmpp:jingle:apps:rtp:audio');\n this.caps.addFeature('urn:xmpp:jingle:apps:rtp:video');\n this.caps.addFeature('http://jitsi.org/json-encoded-sources');\n\n if (!(this.options.disableRtx || !browser.supportsRTX())) {\n this.caps.addFeature('urn:ietf:rfc:4588');\n }\n if (this.options.enableOpusRed === true && browser.supportsAudioRed()) {\n this.caps.addFeature('http://jitsi.org/opus-red');\n }\n\n if (typeof this.options.enableRemb === 'undefined' || this.options.enableRemb) {\n this.caps.addFeature('http://jitsi.org/remb');\n }\n\n // Disable TCC on Firefox because of a known issue where BWE is halved on every renegotiation.\n if (!browser.isFirefox() && (typeof this.options.enableTcc === 'undefined' || this.options.enableTcc)) {\n this.caps.addFeature('http://jitsi.org/tcc');\n }\n\n // this is dealt with by SDP O/A so we don't need to announce this\n // XEP-0293\n // this.caps.addFeature('urn:xmpp:jingle:apps:rtp:rtcp-fb:0');\n // XEP-0294\n // this.caps.addFeature('urn:xmpp:jingle:apps:rtp:rtp-hdrext:0');\n\n // this.caps.addFeature('urn:ietf:rfc:5576'); // a=ssrc\n\n // Enable Lipsync ?\n if (browser.isChromiumBased() && this.options.enableLipSync === true) {\n logger.info('Lip-sync enabled !');\n this.caps.addFeature('http://jitsi.org/meet/lipsync');\n }\n\n if (this.connection.rayo) {\n this.caps.addFeature('urn:xmpp:rayo:client:1');\n }\n\n if (E2EEncryption.isSupported(this.options)) {\n this.caps.addFeature(FEATURE_E2EE, false, true);\n }\n\n // Advertise source-name signaling when the endpoint supports it.\n logger.debug('Source-name signaling is enabled');\n this.caps.addFeature('http://jitsi.org/source-name');\n\n logger.debug('Receiving multiple video streams is enabled');\n this.caps.addFeature('http://jitsi.org/receive-multiple-video-streams');\n\n // Advertise support for ssrc-rewriting.\n if (FeatureFlags.isSsrcRewritingSupported()) {\n this.caps.addFeature('http://jitsi.org/ssrc-rewriting-1');\n }\n\n // Use \"-1\" as a version that we can bump later. This should match\n // the version added in moderator.js, this one here is mostly defined\n // for keeping stats, since it is not made available to jocofo at\n // the time of the initial conference-request.\n if (FeatureFlags.isJoinAsVisitorSupported()) {\n this.caps.addFeature('http://jitsi.org/visitors-1');\n }\n }", "title": "" }, { "docid": "1b454b06aa119c5562ffa420ee8249a3", "score": "0.5232083", "text": "constructor(id, name, send_signal, wrtc) {\n super()\n\n this.id = id\n this.name = name\n this.self = (send_signal == undefined)\n this.send_signal = send_signal\n this.queue = []\n\n this.on('connect', () => {\n if (this.connected()) {\n while (this.queue.length > 0) {\n this.send(this.queue.shift())\n }\n }\n })\n\n // we're in electron/browser\n if (typeof window != 'undefined') {\n this.wrtc = {\n RTCPeerConnection: RTCPeerConnection,\n RTCIceCandidate: RTCIceCandidate,\n RTCSessionDescription: RTCSessionDescription\n }\n }\n // byowebrtc <- this is for node and could undoubtedly be better handled\n else if (wrtc) {\n this.wrtc = wrtc\n }\n else {\n console.log(\"wrtc\", wrtc)\n throw new Error(\"wrtc needs to be set in headless mode\")\n }\n \n this.WebRTCConfig = {\n 'iceServers': [\n {url:'stun:stun.l.google.com:19302'},\n {url:'stun:stun1.l.google.com:19302'},\n {url:'stun:stun2.l.google.com:19302'},\n {url:'stun:stun3.l.google.com:19302'},\n {url:'stun:stun4.l.google.com:19302'}\n ]\n }\n\n // I'm not sure this should be here, but we call it literally\n // every time we instantiate a Peer(), so let's leave it here for now\n if(!this.self) this.initializePeerConnection()\n }", "title": "" }, { "docid": "632e33383aee4b7df3ef8e4f431fb0ad", "score": "0.5225926", "text": "isVideoTrack() {\n return this.getType() === _service_RTC_MediaType__WEBPACK_IMPORTED_MODULE_3__[\"VIDEO\"];\n }", "title": "" }, { "docid": "b88d390488e36def86fe397cdf543f26", "score": "0.5224762", "text": "function html5media() {\r\n scanElementsByTagName(\"video\");\r\n scanElementsByTagName(\"audio\");\r\n }", "title": "" }, { "docid": "ebc3dc1be46d3da0715b3827fe24343e", "score": "0.5217323", "text": "function joinCall() { // deze functie word aangeroepen zodra de caller op \"Deelnemen aan gesprek\" klikt\n\nusername = document.getElementById(\"gebruikersnaam-input\").value\n\ndocument.getElementById(\"video-call-div\")\n.style.display = \"inline\" //in deze functie word de sectie video call div aangroepen \n // in deze sectie word de style vernaderd naar inline\n\n navigator.getUserMedia({ //deze functie handelt onder andere de permissions af\n video: {\n frameRate: 24,\n width: {\n min: 480, ideal: 720, max: 1280\n \n },\n aspectRatio: 1.33333\n }, \n \n audio: true\n\n \n }, (stream) => { // de getUserMedia functie return een callback function (als 2e parameter) stream die je uiteindelijk in de local-video element wilt plaatsen\n localstream = stream\n document.getElementById(\"local-video\").srcObject = localstream\n\n let configuration ={\n iceServers: [\n {\n \"urls\":[\"stun:stun.l.google.com:19302\", //meerdere STUN servers aangemaakt vóór het geval een andere server met betere ICE kandidaten komt\n \"stun:stun1.l.google.com:19302\",\n \"stun:stun2.l.google.com:19302\"]\n \n\n \n }\n ]\n }\n peerConn = new RTCPeerConnection(configuration) // deze functie is beschikbaar gemaakt door en voor de webRTC api, aan deze config geven we onze configuratie object mee\n peerConn.addStream(localstream) // hier geven we onze localstream mee aan de RTCpeerconnection\n\n peerConn.onaddstream = (e) => { //zodra de peerConnection verbinding heeft met de andere kant, dan geeft ie een callback function\n document.getElementById(\"remote-video\")\n .srcObject = e.stream // met e.stream kunnen we de stream 'uitpakken', en we willen het dus laten zien in de remote video element\n console.log(\"video van andere partij moet zichtbaar zijn\")\n }\n \n\n peerConn.onicecandidate = ((e) =>{\n if (e.candidate == null)\n return\n \n sendData({\n type:\"send_candidate\",\n candidate: e.candidate\n })\n \n })\n \n sendData({\n type: \"join_call\"\n }) \n\n },(error) => { // als de functie een eroor returned\n console.log(error)\n }\n )\n\n}", "title": "" }, { "docid": "ca3a93db8f78856357a83c1166512b08", "score": "0.5214465", "text": "function html5media() {\n scanElementsByTagName(\"video\");\n scanElementsByTagName(\"audio\");\n }", "title": "" }, { "docid": "e98b3f37b2efda644366f121e528dddd", "score": "0.5207238", "text": "function shimPeerConnection(window) {\n const browserDetails = _utils__WEBPACK_IMPORTED_MODULE_0__[\"detectBrowser\"](window);\n\n if (window.RTCIceGatherer) {\n if (!window.RTCIceCandidate) {\n window.RTCIceCandidate = function RTCIceCandidate(args) {\n return args;\n };\n }\n\n if (!window.RTCSessionDescription) {\n window.RTCSessionDescription = function RTCSessionDescription(args) {\n return args;\n };\n } // this adds an additional event listener to MediaStrackTrack that signals\n // when a tracks enabled property was changed. Workaround for a bug in\n // addStream, see below. No longer required in 15025+\n\n\n if (browserDetails.version < 15025) {\n const origMSTEnabled = Object.getOwnPropertyDescriptor(window.MediaStreamTrack.prototype, 'enabled');\n Object.defineProperty(window.MediaStreamTrack.prototype, 'enabled', {\n set(value) {\n origMSTEnabled.set.call(this, value);\n const ev = new Event('enabled');\n ev.enabled = value;\n this.dispatchEvent(ev);\n }\n\n });\n }\n } // ORTC defines the DTMF sender a bit different.\n // https://github.com/w3c/ortc/issues/714\n\n\n if (window.RTCRtpSender && !('dtmf' in window.RTCRtpSender.prototype)) {\n Object.defineProperty(window.RTCRtpSender.prototype, 'dtmf', {\n get() {\n if (this._dtmf === undefined) {\n if (this.track.kind === 'audio') {\n this._dtmf = new window.RTCDtmfSender(this);\n } else if (this.track.kind === 'video') {\n this._dtmf = null;\n }\n }\n\n return this._dtmf;\n }\n\n });\n } // Edge currently only implements the RTCDtmfSender, not the\n // RTCDTMFSender alias. See http://draft.ortc.org/#rtcdtmfsender2*\n\n\n if (window.RTCDtmfSender && !window.RTCDTMFSender) {\n window.RTCDTMFSender = window.RTCDtmfSender;\n }\n\n const RTCPeerConnectionShim = rtcpeerconnection_shim__WEBPACK_IMPORTED_MODULE_2___default()(window, browserDetails.version);\n\n window.RTCPeerConnection = function RTCPeerConnection(config) {\n if (config && config.iceServers) {\n config.iceServers = Object(_filtericeservers__WEBPACK_IMPORTED_MODULE_1__[\"filterIceServers\"])(config.iceServers, browserDetails.version);\n _utils__WEBPACK_IMPORTED_MODULE_0__[\"log\"]('ICE servers after filtering:', config.iceServers);\n }\n\n return new RTCPeerConnectionShim(config);\n };\n\n window.RTCPeerConnection.prototype = RTCPeerConnectionShim.prototype;\n}", "title": "" }, { "docid": "7f48e0b4493360007e5dcaff2d8c9054", "score": "0.52061194", "text": "function getIsNoVideoOverlay() {\n\t\t\t\treturn !!_.find(scope.playbackOptions, function(option) {\n\t\t\t\t\treturn option.url.lastIndexOf('vbrtsp', 0) === 0 ||\n\t\t\t\t\t\toption.url.lastIndexOf('rtsp', 0) === 0 ||\n\t\t\t\t\t\toption.url.lastIndexOf('rtmp', 0) === 0;\n\t\t\t\t});\n\t\t\t}", "title": "" }, { "docid": "6ce2944ea90581ecee4ed9e1c31fb327", "score": "0.5204155", "text": "async function handleWebrtcSendStart() {\n const router = global.mediasoup.router;\n\n let transport;\n try {\n transport = await router.createWebRtcTransport(\n CONFIG.mediasoup.webrtcTransport\n );\n } catch (err) {\n log.error(\"[handleWebrtcSendStart] ERROR:\", err);\n process.exit(1);\n }\n global.mediasoup.webrtc.sendTransport = transport;\n\n /*\n RTP: [mediasoup --> browser]\n RTCP Feedback (BWE): [browser --> mediasoup]\n RTCP BWE forwarding: [browser --> mediasoup --> Kurento]\n\n The browser receives video from mediasoup, and sends back its own bandwidth\n estimation (BWE) data. Here, we forward this data to the RTP side, i.e.\n the connection between mediasoup and Kurento. This way, the video encoder\n inside Kurento will be able to adapt its output bitrate.\n */\n await transport.enableTraceEvent([\"bwe\"]);\n transport.on(\"trace\", async (trace) => {\n if (trace.type === \"bwe\") {\n const transport = global.mediasoup.rtp.recvTransport;\n if (transport) {\n log.log(\n \"[BWE] Forward to Kurento, availableBitrate:\",\n trace.info.availableBitrate\n );\n await transport.setMaxIncomingBitrate(trace.info.availableBitrate);\n }\n }\n });\n\n log(\"[handleWebrtcSendStart] mediasoup WebRTC SEND transport created\");\n\n const webrtcTransportOptions = {\n id: transport.id,\n iceParameters: transport.iceParameters,\n iceCandidates: transport.iceCandidates,\n dtlsParameters: transport.dtlsParameters,\n sctpParameters: transport.sctpParameters,\n };\n\n log.trace(\n \"[handleWebrtcSendStart] mediasoup WebRTC SEND TransportOptions:\\n%O\",\n webrtcTransportOptions\n );\n\n return webrtcTransportOptions;\n}", "title": "" }, { "docid": "a945fec6ee34a53847b06f51d9a436fb", "score": "0.5182207", "text": "function receiveVideoReadyMessage() {\n window.setTimeout(function refreshPage() {\n history.go(0);\n }, 1000);\n}", "title": "" }, { "docid": "b1bab4143ada95b565cbba01067ba89b", "score": "0.51770145", "text": "function onExistingParticipants(message) {\n // Standard constraints\n var constraints = {\n audio: true,\n video: {\n frameRate: {\n min: 1, ideal: 15, max: 30\n },\n width: {\n min: 32, ideal: 50, max: 320\n },\n height: {\n min: 32, ideal: 50, max: 320\n }\n }\n };\n\n // Temasys constraints\n /*var constraints = {\n audio: true,\n video: {\n mandatory: {\n minWidth: 32,\n maxWidth: 320,\n minHeight: 32,\n maxHeight: 320,\n maxFrameRate: 30,\n minFrameRate: 1\n }\n }\n };*/\n\n console.log(sessionId + \" register in room \" + message.roomName);\n\n // create video for current user to send to server\n var localParticipant = new Participant(sessionId);\n participants[sessionId] = localParticipant;\n localVideo = document.getElementById(\"local_video\");\n var video = localVideo;\n\n // bind function so that calling 'this' in that function will receive the current instance\n var options = {\n localVideo: video,\n mediaConstraints: constraints,\n onicecandidate: localParticipant.onIceCandidate.bind(localParticipant)\n };\n\n\n localParticipant.rtcPeer = new kurentoUtils.WebRtcPeer.WebRtcPeerSendonly(options, function (error) {\n if (error) {\n return console.error(error);\n }\n\n // Set localVideo to new object if on IE/Safari\n localVideo = document.getElementById(\"local_video\");\n\n // initial main video to local first\n localVideoCurrentId = sessionId;\n localVideo.src = localParticipant.rtcPeer.localVideo.src;\n localVideo.muted = true;\n\n console.log(\"local participant id : \" + sessionId);\n this.generateOffer(localParticipant.offerToReceiveVideo.bind(localParticipant));\n });\n\n // get access to video from all the participants\n console.log(message.data);\n for (var i in message.data) {\n receiveVideoFrom(message.data[i]);\n }\n}", "title": "" }, { "docid": "bf5203438e29c1b2892aa9882f71aa40", "score": "0.5173874", "text": "static isVideoPage() {\n if (RoKA.Application.currentMediaService() === Service.YouTube) {\n return (window.location.pathname === \"/watch\")\n }\n else if (RoKA.Application.currentMediaService() === Service.KissAnime) {\n return (window.location.pathname.split('/')[1].toLowerCase() === \"anime\");\n }\n else if (RoKA.Application.currentMediaService() === Service.KissManga) {\n return (window.location.pathname.split('/')[1].toLowerCase() === \"manga\");\n }\n return false;\n }", "title": "" }, { "docid": "2f3561436b22560b6eab74fd348f91e3", "score": "0.5164863", "text": "function can_client_change_view()\n{\n return ((client.conn.playing != null || client_is_observer())\n && (C_S_RUNNING == client_state()\n\t || C_S_OVER == client_state())); \n}", "title": "" }, { "docid": "7e2d68f2609a8e55f59604d07d595622", "score": "0.5155531", "text": "static isVideoPage() {\n return (window.location.pathname === \"watch\" || document.querySelector(\"meta[og:type]\").getAttribute(\"content\") === \"video\");\n }", "title": "" }, { "docid": "86ba0aad632b5cc7177b3ae8e0c6f8f7", "score": "0.515155", "text": "function onMessage(event) {\n logg(\"RECEIVED: \" + event.data);\n\n //console.log(\"received a message\");\n\n var msg = JSON.parse(event.data);\n //alert(JSON.stringify(msg));\n //updating the number of clients connected\n //alert(msg.type);\n if (msg.type == 'transfer_complete') {\n //peerConn.close();\n var chatdiv = document.getElementById('chatdiv');\n chatdiv.style.display = 'none';\n chatwindow.innerHTML = \"\";\n\n endCall();\n var endCallbtn = document.getElementById('agentEndCallButton');\n endCallbtn.style.display = \"none\";\n if (type == \"agent\") {\n fetchAndDisplayAgentList('agent');\n document.getElementById(\"agentrole\").selectedIndex = \"0\";\n }\n\n } else if (msg.type == Call_Events.NOTIFY) {\n\n //alert(\"Status :::::: \" +msg.status);\n if (type == \"agent\") {\n\n var status = msg.status;\n var agentId = msg.id;\n\n var img = document.getElementById('img' + agentId);\n if (img != null) {\n if (status == 'online') {\n img.src = \"./img/available.png\"\n\n } else if (status == 'offline') {\n img.src = \"./img/offline.png\";\n\n } else if (status == 'busy') {\n img.src = \"./img/busy.png\";\n\n }\n }\n }\n }\n else if (msg.type == Call_Events.AGENT_UNAVAILABLE) {\n //alert(\"Agent unavailable\");\n if (type == \"user\") {\n var custalert = document.getElementById('webRTC_connectMessageInfo');\n //alert(\"Agent unavailable\");\n if (msg.custPosInQueue != null) {\n custalert.innerHTML = \"Call is in Queue <br>\" + msg.custPosInQueue;\n } else {\n custalert.innerHTML = \"Agents are not available\";\n }\n\n //var progbar = document.getElementById('progressbar');\n //progbar.style.visibility=\"hidden\";\n //var sourcevid = document.getElementById('sourcevid');\t\n //sourcevid.src=\"\";\n }\n }\n else if (msg.type == 'rejectcall') {\n\n endCall();\n if (type == \"agent\") {\n var endCallbtn = document.getElementById('agentEndCallButton');\n endCallbtn.style.display = \"none\";\n } else {\n customerCall.disableendcall();\n }\n //alert(msg.closetype);\n if (msg.closetype == \"chatclose\") {\n var chatdiv = document.getElementById('chatdiv');\n if (type == \"user\") {\n chatdiv = document.getElementById('webRTC_chatdiv');\n }\n chatdiv.style.display = 'none';\n chatwindow.innerHTML = \"\";\n var chatimg = document.getElementById('openchat');\n if (type == \"user\") {\n chatimg = document.getElementById('webRTC_openchat');\n }\n chatimg.style.display = \"inline-block\";\n isChatEstablished = false;\n }\n\n } else if (msg.type == 'closechat') {\n var chatdiv = document.getElementById('chatdiv');\n chatdiv.style.display = 'none';\n chatwindow.innerHTML = \"\";\n var chatimg = document.getElementById('openchat');\n chatimg.style.display = \"inline-block\";\n isChatEstablished = false;\n if (!isVideoCallEstablished) {\n\n if (type == \"user\") {\n if (peerConn) {\n peerConn.close();\n }\n agtId = \"-1\";\n peerConn = null;\n\n }\n //alert(agtId);\n }\n }\n else if (msg.type == 'client_count') {\n\n\n\n\n }\t//initiating the call\n else if (msg.type == 'will_call') {\n var name = msg.name.trim();\n mediaType = msg.media_type;\n custname = name;\n if (custname == \"\") {\n custname = \"GUEST\";\n }\n var customerheader = document.getElementById('customerheader');\n customerheader.innerHTML = \"CUSTOMER\" + \" : \" + custname;\n custId = msg.id.trim();\n //alert(\"customer Id in Will Call \"+custId);\n }\n else if (msg.type == Call_Events.CALL_CONNECT) {\n if (type == \"user\") {\n\n if (msg.call_type == \"transfer\") {\n showCallTypeInProgress(CALL_TRANSFER);\n } else if (msg.call_type == \"normal\") {\n showCallTypeInProgress(CALL_CONNECTING);\n }\n agentname = msg.name;\n agtId = msg.id;\n //alert(agtId);\n var agentheader = document.getElementById('webRTC_agentHeader');\n agentheader.innerHTML = \"AGENT\" + \" : \" + agentname;\n }\n mediaType = msg.media_type;\n createPeerConnection();\n\n //console.log(\"added stream initiator :\");\n /*if(typeof receiveChannel != 'undefined'){\n receiveChannel.close();\n }\n if(typeof dataChannel != 'undefined'){\n dataChannel.close();\n }*/\n createChatDataChannel();\n //mediaType = msg.media_type;\n //alert(\"Media Type ::: \"+ mediaType);\n\n if (mediaType == \"chat\") {\n isVideoCallEstablished = false;\n peerConn.createOffer(setLocalAndSendMessage, errorCallback, chatConstraints);\n\n } else if (mediaType == \"video\") {\n isVideoCallEstablished = true;\n //alert(\"Local Strem added\");\n peerConn.addStream(localStream);\n peerConn.createOffer(setLocalAndSendMessage, errorCallback, mediaConstraints);\n }\n\n //console.log(\"created offer initiator :\");\n }\n else if (msg.type == 'wait') {\n if (peerConn) {\n peerConn.close();\n }\n agtId = \"-1\";\n peerConn = null;\n remotevid.src = '';\n updateState(STATES.WAITING);\n } else if (msg.type == Call_Events.CUST_OFFER) {\n message = msg;\n if (mediaType == \"video\") {\n var acceptbtn = document.getElementById('acceptCallButton');\n acceptbtn.style.display = \"block\";\n document.getElementById('acceptCallButton');\n var ringing = document.getElementById('ringing');\n ringing.style.display = 'block';\n var ringingimgdiv = document.getElementById('ringingimgdiv');\n ringingimgdiv.style.display = 'block';\n var audioplay = document.getElementById('audioplay');\n audioplay.play();\n audioplay.volume = 0.9;\n }\n //if(peerConn==null){\n createPeerConnection();\n //alert('Peer connection opened again');\n //}\n peerConn.setRemoteDescription(new RTSessionDescription(msg));\n\n //alert(JSON.stringify(msg));\n remotevid = document.getElementById('remotevid');\n remotevid.style.display = \"none\";\n //alert(\"Media Type \"+msg.media_type);\n if (mediaType == \"chat\") {\n peerConn.createAnswer(setLocalAndSendMessage, errorCallback, mediaConstraints);\n }\n } else if (peerConn) {\n if (msg.type == 'answer') {\n peerConn.setRemoteDescription(new RTSessionDescription(msg));\n //console.log(\"set remote initiator :\"+peerConn.iceGatheringState);\n } else if (msg.type == 'candidate') {\n var candidate = new IceCandidate({sdpMLineIndex: msg.sdpMLineIndex, candidate: msg.candidate, sdpMid: msg.sdpMid});\n peerConn.addIceCandidate(candidate);\n //console.log(\"added candidates\");\n }\n }\n}", "title": "" }, { "docid": "e036b2cff8c161779b267376ecaec7cb", "score": "0.5148618", "text": "createHTMLVideo() {\n return null; //TODO!\n }", "title": "" }, { "docid": "66c9ad98a42975761c79cede597bd274", "score": "0.5132218", "text": "function initialize_musician(video_peer, audio_peer){\n var toggle_critique = false;\n\n $(\"#start_session\").on(\"click\", function(snapshot){\n //on first button click, toggle to stop\n var audio = document.getElementById(\"their-audio\");\n if($(\"#start_session\").val() == \"Start recording\") {\n practice_session.child('practice_start').set(new Date().getTime());\n $(\"#start_session\").val(\"End recording\");\n $('#start_session').css({\"background-color\": \"#8A3E55\"});\n $(\"#recording\").fadeTo(\"slow\",1.0);\n $('#practice-container').show();\n $(\".musician_practice_item\").show();\n $(\".memo\").hide();\n $(\"#standby\").hide();\n \n audio.muted = true;\n start_recording();\n } else {\n practice_session.child('practice_end').set(new Date().getTime());\n stop_recording();\n audio.muted = false;\n $(\"#start_session\").fadeOut();\n $(\"#recording\").fadeOut();\n $('#practice-container').hide();\n begin_critique_session();\n } \n });\n \n var peers_logged_in = 0;\n video_peer.on('open', function(peer_id){\n \n practice_session.child(\"musician_video_peer_id\").set(peer_id);\n peers_logged_in += 1;\n\n //await the call from the crtiquer. Just chill out in the window\n video_peer.on('call', function(call){\n if(peers_logged_in == 2){\n $(\"#waiting_response\").hide(); \n $('#playback-container').show(); \n }\n call.answer(window.video_stream);\n call.on('stream', function(stream){\n $(\"#their-video\").prop('src', URL.createObjectURL(stream));\n });\n });\n });\n\n audio_peer.on('open', function(peer_id){\n peers_logged_in += 1;\n practice_session.child(\"musician_audio_peer_id\").set(peer_id);\n\n //await the call from the crtiquer. Just chill out in the window\n audio_peer.on('call', function(call){\n if(peers_logged_in == 2){\n // $(\".memo\").hide();\n $(\"#waiting_response\").hide(); \n $('#playback-container').show(); \n }\n call.answer(window.audio_stream);\n call.on('stream', function(stream){\n $(\"#their-audio\").prop('src', URL.createObjectURL(stream));\n });\n });\n });\n }", "title": "" }, { "docid": "97917cfa3ed495b9a2340b13d6ae24c9", "score": "0.51311165", "text": "setupLocalMedia(){\n navigator.mediaDevices.getUserMedia(self.constraints)\n .then(function(stream){\n \n self.videoPlayer.src = window.URL.createObjectURL(stream);\n self.videoPlayer.muted = 'muted';\n self.stream = stream;\n \n // if peers entered room before the owner,\n // make them a late offer.\n var len = self.waitingPeers.length;\n if(len > 0){\n for(var i = 0; i < len; i++){\n self.makeOffer(self.waitingPeers[i]);\n }\n self.waitingPeers = [];\n }\n \n })\n .catch(self.errorHandler);\n }", "title": "" }, { "docid": "8ad8a603e5faa13a9f3ed1dc83b35a47", "score": "0.51297855", "text": "function startLocalStream(){\n if(localStreamOn){ // check if this setup has already been done\n console.log('local stream already on');\n return;\n } else {\n localStreamOn = true;\n }\n\n var ctrl = window.ctrl = CONTROLLER(phone, get_xirsys_servers);\n ctrl.ready(function(){\n if(!faceTrackerStarted){\n startFaceTracker();\n faceTrackerStarted=true;\n }\n //Here we possibly want to minimise the user's screen\n //ctrl.addLocalStream(video);\n //addLog(\"Logged in as \" + form.username.value);\n });\n ctrl.receive(function(session){\n session.connected(function(session){\n sessionList.push(session);\n var listItem = document.createElement('li');\n listItem.id= \"callee\" +session.number;\n listItem.appendChild(session.video);\n othervideos.appendChild(listItem);\n //video_out.appendChild(session.video);\n var sessionRTCPeerConnection = session.pc;\n invokeGetStats(sessionRTCPeerConnection);\n //Adding button for kicking a session\n //var kickbtn = document.createElement(\"button\");\n //video_out.appendChild(kickbtn);\n //addLog(session.number + \" has joined.\");\n console.log(session.number + \" has joined.\");\n vidCount++; });\n\n session.ended(function(session) {\n var index = sessionList.indexOf(session);\n sessionList.splice(index,1);\n ctrl.getVideoElement(session.number).remove();\n var listItem = document.getElementById('callee'+session.number);\n listItem.outerHTML =\"\";\n delete listItem;\n //addLog(session.number + \" has left.\");\n console.log(session.number + \" has left.\");\n vidCount--;});\n });\n\n ctrl.videoToggled(function(session, isEnabled){\n ctrl.getVideoElement(session.number).toggle(isEnabled);\n //addLog(session.number+\": video enabled - \" + isEnabled);\n console.log(session.number+\": video enabled - \" + isEnabled);\n });\n ctrl.audioToggled(function(session, isEnabled){\n ctrl.getVideoElement(session.number).css(\"opacity\",isEnabled ? 1 : 0.75);\n //addLog(session.number+\": audio enabled - \" + isEnabled);\n console.log(session.number+\": audio enabled - \" + isEnabled);\n });\n\n phone.message(function(session,message){\n //console.log(\"received image\");\n if(message.hasOwnProperty(\"image\")){\n var img = new Image();\n img.src = message.image.data;\n facesReceived[session.number] = img;\n var height = 0\n Object.keys(facesReceived).forEach(function (key) {\n height += 200;\n })\n snap.width = 200;\n snap.height = height;\n var startY = 0;\n img.onload = function(){\n snap_context.clearRect(0, 0, snap.width, snap.height);\n Object.keys(facesReceived).forEach(function (key) {\n console.log(\"drawing face:\" + key);\n var value = facesReceived[key];\n snap_context.drawImage(value,0,startY);\n startY = startY + 200;\n })\n snap_out.innerHTML = \"\";\n var snap_img = new Image();\n snap_img.src = snap.toDataURL(\"image/jpeg\");\n snap_out.appendChild(snap_img);\n }\n }else if(message.hasOwnProperty(\"text\")){\n var friendDiv = document.createElement('div');\n friendDiv.className =\"chat friend\";\n var friendPhoto = document.createElement('div');\n friendPhoto.className =\"photo\";\n var image = document.createElement('img');\n image.src=\"icons/minion2.png\";\n friendPhoto.appendChild(image);\n var text = document.createElement('p');\n text.className=\"message\";\n text.innerHTML=message.text;\n friendDiv.appendChild(friendPhoto);\n friendDiv.appendChild(text);\n chatlogs.appendChild(friendDiv);\n chatlogs.scrollTop=chatlogs.scrollHeight;\n }else if (message.hasOwnProperty(\"toggleBandwidth\")){\n console.log(\"Toggle Bandwidth:\" + message.toggleBandwidth);\n //Code for user to execute when they recieve toggle message \n bandwidth = message.toggleBandwidth;\n if(bandwidth.toLowerCase() == \"high\"){\n if(send_loop_id == null){\n //do nothing\n }else{\n toggle_to_high();\n }\n \n }else if(bandwidth.toLowerCase() == \"low\"){\n if(send_loop_id == null){\n toggle_to_low();\n }else{\n //do nothing\n }\n }else{\n alert(\"Only High or Low accepted not: \" + bandwidth);\n }\n \n }\n });\n return false;\n}", "title": "" }, { "docid": "dbf54e1b9701eb26385ae56252c79833", "score": "0.5121633", "text": "function registerPeerConnectionListeners() {\n peerConnection.addEventListener('icegatheringstatechange', () => {\n console.log(\n `ICE gathering state changed: ${peerConnection.iceGatheringState}`);\n });\n\n peerConnection.addEventListener('connectionstatechange', () => {\n console.log(`Connection state change: ${peerConnection.connectionState}`);\n if (peerConnection.connectionState === 'disconnected') {\n document.querySelector('#remoteVideo').srcObject = null;\n }\n });\n\n peerConnection.addEventListener('signalingstatechange', () => {\n console.log(`Signaling state change: ${peerConnection.signalingState}`);\n });\n\n peerConnection.addEventListener('iceconnectionstatechange ', () => {\n console.log(\n `ICE connection state change: ${peerConnection.iceConnectionState}`);\n });\n}", "title": "" }, { "docid": "2d4a5358240329218ebd2025b1899f35", "score": "0.5111206", "text": "function readPage() {\n\n // Get recipient details\n let recipientId = getUID();\n let myId = getMyID();\n\n let profilePictureWarning = document.getElementById(\"profile-picture-warning\");\n if( recipientId.defaultUser ){\n if(profilePictureWarning) profilePictureWarning.style.display = \"block\";\n } else {\n if(profilePictureWarning) profilePictureWarning.style.display = \"none\";\n }\n\n if( recipientId != currentRecipient) initUI();\n\n if( isCoreUILoaded() ) {\n\n if( recipientId != currentRecipient){\n if( recipientId.userFound && recipientId.isGroup == false && myId.meFound ){\n\n let requestGetActiveKey = {action:\"GET_RECIPIENT_ACTIVE_KEY\", recipient:recipientId.id};\n chrome.runtime.sendMessage( requestGetActiveKey, function(res) {\n if( res && res.key ){\n ACTIVE_RECIPIENT_KEY = res.key;\n document.getElementById(\"pgp-recipient-fingerprint\").innerText = ACTIVE_RECIPIENT_KEY.fingerprint.toUpperCase();\n } else {\n ACTIVE_RECIPIENT_KEY = null;\n }\n\n });\n } else {\n ACTIVE_RECIPIENT_KEY = null;\n }\n\n // Display error if group\n if ( recipientId.userFound && recipientId.isGroup ){\n document.getElementById(\"pgp-group\").style.display = \"block\";\n } else {\n document.getElementById(\"pgp-group\").style.display = \"none\";\n }\n\n }\n currentRecipient = recipientId;\n\n\n\n\n\n // Process messages\n var messagesOut = document.querySelectorAll(\".message-out:not(.pgp-processing)\");\n var messagesIn = document.querySelectorAll(\".message-in:not(.pgp-processing)\");\n\n messagesOut.forEach((msg, i) => {\n let container = msg.querySelector(WHATSAPP_MESSAGE_CONTAINER);\n if( container ){\n msg.classList.add(\"pgp-processing\");\n let text = container.innerText;\n\n if( text.startsWith(\"-----BEGIN PGP PUBLIC KEY BLOCK-----\")){\n\n waitForReadMore( msg, ( fullText, container )=>{\n\n text = fullText;\n\n let fillerUUID = generateUUID();\n container.innerHTML = `<div class='pgp-control-text'>\n <div>You shared a key</div>\n <div id=\"${fillerUUID}\"></div>\n </div>`;\n msg.classList.add(\"pgp-modified\");\n msg.classList.add(\"pgp-modified-control\");\n\n getPubFingerprint(text,(fp)=>{\n document.getElementById(fillerUUID).innerText = fp;\n });\n\n });\n\n } else if ( text.startsWith(\"-----BEGIN PGP MESSAGE-----\")){\n\n decryptMessage(msg);\n\n }\n }\n });\n\n messagesIn.forEach((msg, i) => {\n let container = msg.querySelector(WHATSAPP_MESSAGE_CONTAINER);\n if( container ){\n msg.classList.add(\"pgp-processing\");\n let text = container.innerText;\n\n // READ KEY\n if( text.startsWith(\"-----BEGIN PGP PUBLIC KEY BLOCK-----\")){\n\n waitForReadMore( msg, ( fullText, container )=>{\n\n text = fullText;\n\n // Load Key\n openpgp.key.readArmored(text).then((openkey)=>{\n if( openkey.keys.length == 1 ){\n openkey = openkey.keys[0];\n console.log(openkey);\n\n let fingerprint = openkey.primaryKey.fingerprint;\n let fp = \"\";\n fingerprint.forEach((n, i) => {\n let num = n.toString(16)\n fp += ( num.length == 1 ? \"0\":\"\") + num;\n if( i%2 == 1 ) fp += \" \";\n });\n\n let newKey = {\n uuid:generateUUID(),\n name:\"Newly Received Key\",\n owner: recipientId.id, // PHONE CODE\n pub: text,\n created: `${openkey.primaryKey.created}`,\n saved:`${new Date()}`,\n fingerprint:fp,\n }\n\n console.log(newKey);\n\n keychainLoadKeysByOwner( recipientId.id, (keys)=>{\n let found = false;\n keys.forEach((key, i) => {\n if( key.fingerprint == newKey.fingerprint ){\n found = true;\n }\n });\n\n if( found ){\n let fillerUUID = generateUUID();\n container.innerHTML = `<div class='pgp-control-text'>\n <div>This key is already saved</div>\n <div id=\"${fillerUUID}\"></div>\n </div>`;\n msg.classList.add(\"pgp-modified\");\n msg.classList.add(\"pgp-modified-control\");\n\n getPubFingerprint(text,(fp)=>{\n document.getElementById(fillerUUID).innerText = fp;\n });\n\n } else {\n let actionUUID = generateUUID();\n container.innerHTML = `\n A new key has been sent. Fingerprint: ${fp}.<br/>\n Would you like to save it?<br/>\n <a class='pgp-action' id='pgp-action-save-key-${actionUUID}-yes'>Yes</a><a class='pgp-action' id='pgp-action-save-key-${actionUUID}-no'>No</a>\n `;\n msg.classList.add(\"pgp-modified\");\n msg.classList.add(\"pgp-modified-control\");\n\n document.getElementById(`pgp-action-save-key-${actionUUID}-yes`).addEventListener(\"click\",()=>{\n //keychainSave( newKey );\n\n let request = { action:\"SAVE_NEW_KEY\", newKey: newKey }\n chrome.runtime.sendMessage( request, function(res) {\n console.log(res);\n\n });\n\n container.innerHTML = `\n <div class='pgp-control-text'>Key Saved</div>\n <div class='pgp-control-text'>Fingerprint: ${fp}</div>\n `;\n });\n\n document.getElementById(`pgp-action-save-key-${actionUUID}-no`).addEventListener(\"click\",()=>{\n container.innerHTML = \"<div class='pgp-control-text'>Key not saved</div>\"\n });\n }\n });\n\n\n } else {\n // Error with reading key\n }\n\n });\n });\n\n } else if ( text.startsWith(\"-----BEGIN PGP MESSAGE-----\")){\n decryptMessage(msg);\n }\n\n }\n });\n\n }\n\n setTimeout(readPage,READ_PAGE_INTERVAL);\n}", "title": "" }, { "docid": "ffa7cdf6042b3244cdde197605084b85", "score": "0.5100917", "text": "getPeerConnection(connectionWith){\n \n if (typeof self.peerConnections[connectionWith] !== 'undefined') {\n return self.peerConnections[connectionWith];\n }\n \n var peerConnection = new RTCPeerConnection(self.iceConfig);\n self.peerConnections[connectionWith] = peerConnection;\n peerConnection.onicecandidate = function(ice_event){\n if (ice_event.candidate) {\n var message = {\n type: 'new_ice_candidate',\n from: YAWB.user.uid,\n to: connectionWith,\n candidate: ice_event.candidate\n }\n self.sendMessage(message);\n }\n };\n \n if(!YAWB.user.owner){\n peerConnection.onaddstream = function(event){\n //console.log('adding remote stream of the owner');\n self.videoPlayer.src = window.URL.createObjectURL(event.stream);\n self.videoPlayer.play();\n };\n }else{\n peerConnection.addStream(self.stream);\n }\n \n return peerConnection; \n }", "title": "" }, { "docid": "9619da43808c48c2f3d90aadccd6ed09", "score": "0.50992453", "text": "function adBlockNotDetected() {\n}", "title": "" }, { "docid": "0ac756c65308829d14a3ff783466bcc9", "score": "0.50952846", "text": "function audioVideoVis() {\r\n\t\t\t\t\t\r\n\t\t\t\t\t//unwrap post and protfolio videos\r\n\t\t\t\t\t$('.video-wrap iframe').unwrap();\r\n\t\t\t\t\t$('#sidebar iframe[src]').unwrap();\r\n\t\t\t\t\t\r\n\t\t\t\t\t$('audio')\r\n\t\t\t\t\t\t.attr('width', '100%')\r\n\t\t\t\t\t\t.attr('height', '100%')\r\n\t\t\t\t\t\t.css('visibility', 'visible');\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ($body.hasClass('mobile')) {\r\n\t\t\t\t\t\t$('video').css('visibility', 'hidden');\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$('video').css('visibility', 'visible');\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t$('.wp-video').each(function () {\r\n\t\t\t\t\t\tvar video = $(this).find('video').get(0);\r\n\t\t\t\t\t\tvideo.addEventListener('loadeddata', function () {\r\n\t\t\t\t\t\t\t$window.trigger('resize');\r\n\t\t\t\t\t\t}, false);\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t\t//webkit video back button fix \r\n\t\t\t\t\t$('.main-content iframe[src]').each(function () {\r\n\t\t\t\t\t\t$(this).css({\r\n\t\t\t\t\t\t\t'opacity': '1',\r\n\t\t\t\t\t\t\t'visibility': 'visible'\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t}", "title": "" }, { "docid": "c2b625a7bae5e7b26a19e1141e781b16", "score": "0.50951105", "text": "validNetwork(){\n switch(this.injectedWeb3.version.network){\n case '42':\n return true;\n default:\n return false;\n }\n }", "title": "" }, { "docid": "3349d5419bf2e67f0c6bced6ae7ef198", "score": "0.5094996", "text": "function onExistingParticipants(msg) {\r\n\tuserId = msg.userId;\r\n\tvar iceServers = [\r\n\t\t{\r\n\t\t\turl: 'turn:' + turnUrl,\r\n\t\t\tusername: turnUsername,\r\n\t\t\tcredential: turnCredential\r\n\t\t}\r\n\t];\r\n\tlet videoConstraints = null;\r\n\tif (msg.videoOn === true) {\r\n\t\tif (reduceFramerateKurento===\"true\"){\r\n\t\t\tvideoConstraints = {\r\n\t\t\t\tframeRate: {\r\n\t\t\t\t\tmin: 2, ideal: 15, max: 30\r\n\t\t\t\t},\r\n\t\t\t\twidth: {\r\n\t\t\t\t\tmin: 50, ideal: 250, max: 640\r\n\t\t\t\t},\r\n\t\t\t\theight: {\r\n\t\t\t\t\tmin: 32, ideal: 250, max: 640\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t} else {\r\n\t\tvideoConstraints = false;\r\n\t}\r\n\r\n\tvar constraints = {\r\n\r\n\r\n\t\taudio: msg.audioOn,\r\n\t\tvideo: videoConstraints,\r\n\t\tconfigurations: {\r\n\t\t\ticeServers: iceServers\r\n\t\t}\r\n\r\n\t};\r\n\tconsole.log(userId + \" registered in room \" + roomId);\r\n\tvar participant = new Participant(name, userId, selfStream);\r\n\tparticipants[userId] = participant;\r\n\r\n\tvar options = {\r\n\t\tlocalVideo: selfStream,\r\n\t\tmediaConstraints: constraints,\r\n\t\tonicecandidate: participant.onIceCandidate.bind(participant),\r\n\r\n\r\n\t}\r\n\t//user connects to KMS\r\n\tparticipant.rtcPeer = new kurentoUtils.WebRtcPeer.WebRtcPeerSendonly(options,\r\n\t\tfunction (error) {\r\n\t\t\tif (error) {\r\n\t\t\t\t/*return*/\r\n\t\t\t\tconsole.error(error);\r\n\t\t\t}\r\n\t\t\tthis.generateOffer(participant.offerToReceiveVideo.bind(participant));\r\n\t\t\t//if user decided to turn his media devices off before the call has started\r\n\t\t\tif (audioBeforeEnterTheRoom === false) {\r\n\t\t\t\tremoveMediaTrack('audio');\r\n\t\t\t}\r\n\t\t\tif (videoBeforeEnterTheRoom === false) {\r\n\t\t\t\tremoveMediaTrack('video');\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t//user registers other users in this chat room\r\n\tmsg.data.forEach(receiveVideo);\r\n}", "title": "" }, { "docid": "c220c1dd4ae6b29ab813be826dd8257d", "score": "0.5089086", "text": "function gotStream(stream) {\n // This is just like a video/stream from createCapture(VIDEO)\n otherVideo = stream;\n //otherVideo.id is the unique identifier for this peer\n //otherVideo.hide();\n}", "title": "" }, { "docid": "2a950d59fdc55cae161db8211b5797d6", "score": "0.5085747", "text": "function handleCandidate(candidate) { \n yourConn.addIceCandidate(new RTCIceCandidate(candidate)); \n}", "title": "" }, { "docid": "f8e36c66a415a0ca963dc9ef97e8ef85", "score": "0.5084113", "text": "function rfc3261_8_2_2_1() {\n if(!message.ruri || message.ruri.scheme !== 'sip') {\n reply(416);\n return false;\n }\n}", "title": "" }, { "docid": "270dcfe40c88a430d5a686da39a3428d", "score": "0.50821227", "text": "function _startMultiple(isCaller, gumScreen, gumWebcam) {\n pc = new RTCPeerConnection(configuration);\n\n // send any ice candidates to the other peer\n pc.onicecandidate = function (evt) {\n if (evt.candidate) {\n sendMessage(JSON.stringify({\"candidate\": evt.candidate}));\n }\n };\n\n pc.oniceconnectionstatechange = function (evt) {\n };\n\n // once remote stream arrives, show it in the remote video element\n pc.onaddstream = function (evt) {\n if (!remoteVideo.src) {\n remoteVideo.src = URL.createObjectURL(evt.stream);\n } else if (!screenVideo.src) {\n screenVideo.src = URL.createObjectURL(evt.stream);\n }\n\n console.log('Received remote stream. ULTIMATE SUCCESS!');\n };\n\n // get the local stream, show it in the local video element and send it\n navigator.getUserMedia(gumScreen, function (screenStream) {\n navigator.getUserMedia(gumWebcam, function (webcamStream) {\n localVideo.src = URL.createObjectURL(webcamStream);\n screenVideo.src = URL.createObjectURL(screenStream);\n\n console.log('Adding webcam stream', webcamStream);\n pc.addStream(webcamStream);\n\n console.log('Adding screen stream', screenStream);\n pc.addStream(screenStream);\n\n if (isCaller) {\n pc.createOffer(gotOfferDescription, createOfferFailure);\n }\n else {\n pc.createAnswer(gotAnswerDescription, createAnswerFailure);\n }\n }, gumError);\n }, gumError);\n\n function gumError(err) {\n console.log('gUM error: ', err);\n }\n}", "title": "" }, { "docid": "f93f15e3ba31f947222f18fc54ec8866", "score": "0.508187", "text": "function initWebRtcCall(signal) {\n handlers.dialing(signal.msg);\n peerConn = new PeerConnection(null);\n\n navigator.getUserMedia = navigator.getUserMedia ||\n navigator.webkitGetUserMedia || navigator.mozGetUserMedia;\n\n peerConn.oniceconnectionstatechange = function (event) {\n console.log(event);\n };\n\n peerConn.onicecandidate = function (event) {\n console.log(\"Got Ice Candidate\");\n if (event.candidate) {\n signalChannel.send(JSON.stringify({\"ice-candidate\": event.candidate}));\n } else {\n // Ice gathering finished\n console.log(\"Ice gathering finished\");\n signalChannel.send(JSON.stringify({\"ice-gathering_state\": \"ice_gathering_completed\"}));\n }\n };\n\n peerConn.oniceconnectionstatechange = function (event) {\n console.log(\"oniceconnectionstatechange\");\n };\n\n peerConn.onremovestream = function (event) {\n console.log(\"onremovestream\");\n };\n\n peerConn.onaddstream = function (event) {\n $(\".remote-audio\", state_context.$root).src = URL.createObjectURL(event.stream);\n console.log(\"Remote stream arrived\");\n };\n\n navigator.getUserMedia({\"audio\": true, \"video\": false}, function (stream) {\n peerConn.addStream(stream);\n peerConn.createOffer(sendDescription, function (event) {\n console.log(\"Create Offer Failed\")\n }, null);\n\n function sendDescription(desc) {\n peerConn.setLocalDescription(desc);\n console.log(\"SDP to Send \" + JSON.stringify({\"sdp\": desc}));\n signalChannel.send(JSON.stringify({\"sdp\": desc}));\n }\n }, function (event) {\n console.log(\"Got error in getting user media\");\n });\n }", "title": "" }, { "docid": "f455a3ccf78de032edd6c0f3cff2627a", "score": "0.50810486", "text": "function filterIceServers(iceServers, edgeVersion) {\n var hasTurn = false;\n iceServers = JSON.parse(JSON.stringify(iceServers));\n return iceServers.filter(function (server) {\n if (server && (server.urls || server.url)) {\n var urls = server.urls || server.url;\n\n if (server.url && !server.urls) {\n console.warn('RTCIceServer.url is deprecated! Use urls instead.');\n }\n\n var isString = typeof urls === 'string';\n\n if (isString) {\n urls = [urls];\n }\n\n urls = urls.filter(function (url) {\n var validTurn = url.indexOf('turn:') === 0 && url.indexOf('transport=udp') !== -1 && url.indexOf('turn:[') === -1 && !hasTurn;\n\n if (validTurn) {\n hasTurn = true;\n return true;\n }\n\n return url.indexOf('stun:') === 0 && edgeVersion >= 14393 && url.indexOf('?transport=udp') === -1;\n });\n delete server.url;\n server.urls = isString ? urls[0] : urls;\n return !!urls.length;\n }\n });\n} // Determines the intersection of local and remote capabilities.", "title": "" }, { "docid": "3c0a9b0230bd92b4ea4734fc0c0cf50f", "score": "0.50768286", "text": "function gotRemoteMediaStream(Event)\n{\n\n const mediaStream = event.stream;\n remoteVideo.srcObject = mediaStream;\n remoteStream = mediaStream;\n trace('Remote peer connection received remote stream.');\n\n Android.showToast();\n\n\n}", "title": "" }, { "docid": "fd5d7caa73de9cd86576872041dfea79", "score": "0.5072418", "text": "function addPeer(){\n\tvar peerMediaElements = document.getElementById(\"peer-media-banner\");\n\t// peerNumUpdated = parseInt(peerNum)+1;\n\tvar peerMediaDiv = document.createElement(\"div\");\n\tvar peerMediaVideo = document.createElement(\"video\");\n\tpeerMediaVideo.setAttribute(\"class\", \"z-depth-5\");\n\tvar peerMediaSource = document.createElement(\"source\");\n\tpeerMediaVideo.setAttribute(\"height\", \"150\");\n\t// peerMediaSource.src = \"../bbb-cbr-1300-frag.mp4\"; // to be updated with UserMedia\n\tpeerMediaSource.id = \"user-media-\"+peerID;\n\tpeerMediaVideo.appendChild(peerMediaSource);\n\tpeerMediaDiv.setAttribute(\"class\", \"col s4\");\n\tpeerMediaDiv.appendChild(peerMediaVideo);\n\tpeerMediaElements.appendChild(peerMediaDiv);\n\tpeersInRoom[peerNum].peerID = peerID;\n\tpeerNum = peerNumUpdated;\n}", "title": "" }, { "docid": "b407f142b4a1df0e8f6a1c9423c058df", "score": "0.50717294", "text": "function handleCandidate(candidate)\n{\n yourConn.addIceCandidate(new RTCIceCandidate(candidate));\n}", "title": "" }, { "docid": "3cad3e885957f873c62713b5010208f7", "score": "0.5069599", "text": "postMessageOptions(text) {\n return {\n as_user: false,\n username: this.name,\n icon_url: this.icon,\n text,\n unfurl_links: false,\n unfurl_media: false,\n };\n }", "title": "" }, { "docid": "0ab64b575b0270e9a69482d18658b39a", "score": "0.5064335", "text": "function cleanPreviewElement() {\n if (browser === 'FIREFOX') {\n var iframe = $(\"#streamPreview iframe\");\n $(\"#streamPreview iframe\").on('load', function() {\n $(\"div.player-hover:nth-child(15)\", iframe.contents()).remove();\n $(\"div.player-hover:nth-child(19)\", iframe.contents()).remove();\n $(\"button.player-button:nth-child(19)\", iframe.contents()).remove();\n });\n }\n }", "title": "" }, { "docid": "b47fcd6ba6d6afcfd50168a873c8ffec", "score": "0.5060892", "text": "_sourceIsIframe(source) {\n let type = this.getVideoType(source);\n if (type == \"local\") {\n return false;\n } else {\n return true;\n }\n }", "title": "" }, { "docid": "f8d5ce06154625e2568b93a512fc180f", "score": "0.5056638", "text": "function showHtml5VideoPlayer() {\n isHtml5 = true;\n\n if (trackingEnabled) setupHtml5MediaTracking();\n\n if (options.ageRestricted) {\n showAgeGate();\n }\n else {\n createHtml5Video();\n }\n }", "title": "" }, { "docid": "bfc2daac6e0cee299e0f9def10d10369", "score": "0.50540584", "text": "function run_preflight_checks() {\n\n\t//\n\t// If we're not on a mobile, bring in the GitHub ribbon.\n\t//\n\tif (!util.is_mobile()) {\n\t\tjQuery(\"#github_ribbon\").fadeIn(1000);\n\t}\n\n\tif (!lib.iCanHasGoodCrypto()) {\n\t\tjQuery(\".source .bad_crypto\").clone().hide().fadeIn(800).appendTo(\".message\");\n\t}\n\n}", "title": "" }, { "docid": "08c312656f56bc1eddb2a0befb7976a0", "score": "0.50469494", "text": "firstUpdated(changedProperties) {\n console.log(navigator.onLine);\n //offline video data load if there\n if(!navigator.onLine){\n this.loadOffline();\n }\n }", "title": "" }, { "docid": "6ccb83bb8322a84d283bb81def3fe24e", "score": "0.5045216", "text": "get isVideo(): boolean {\n if (!this.isMessage) return false;\n\n const message: Message = (this.message: any);\n return !!message.video && typeof message.video === 'object';\n }", "title": "" }, { "docid": "4432ebc9f099cf76f8a6e809938b4230", "score": "0.5039996", "text": "function connectToStream(){\n (function (red5prosdk) {\n // Create a new instance of the WebRTC subcriber.\n var subscriber = new red5prosdk.RTCSubscriber();\n // Initialize\n subscriber.init({\n protocol: 'wss',\n port: 443,\n host: 'xprowebinar.com',\n app: 'live',\n streamName: 'adminstream',\n rtcConfiguration: {\n iceServers: [{urls: 'stun:stun2.l.google.com:19302'}],\n iceCandidatePoolSize: 2,\n bundlePolicy: 'max-bundle'\n }, // See https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/RTCPeerConnection#RTCConfiguration_dictionary\n mediaElementId: 'xprowebinar-subscriber',\n subscriptionId: 'adminstream' + Math.floor(Math.random() * 0x10000).toString(16),\n videoEncoding: 'NONE',\n audioEncoding: 'NONE',\n autoLayoutOrientation: true\n })\n .then(function(subscriber) {\n \n return subscriber.subscribe();\n })\n .then(function(subscriber) {\n })\n .catch(function(error) {\n return subscriber.subscribe();\n });\n })(window.red5prosdk);\n\n // Camera Share\n (function (red5prosdk2) { \n var subscriber = new red5prosdk.RTCSubscriber();\n subscriber.init({\n protocol: 'wss',\n port: 443,\n host: 'xprowebinar.com',\n app: 'live',\n streamName: 'xprowebinarscreenshare',\n rtcConfiguration: {\n iceServers: [{urls: 'stun:stun2.l.google.com:19302'}],\n iceCandidatePoolSize: 2,\n bundlePolicy: 'max-bundle'\n },\n mediaElementId: 'xprowebinarSubscriberCamera',\n subscriptionId: 'admincamera' + Math.floor(Math.random() * 0x10000).toString(16),\n videoEncoding: 'NONE',\n audioEncoding: 'NONE',\n autoLayoutOrientation: true\n })\n .then(function(subscriber) {\n return subscriber.subscribe();\n })\n .then(function(subscriber) {\n })\n .catch(function(error) {\n return subscriber.subscribe();\n });\n\n })(window.red5prosdk);\n }", "title": "" }, { "docid": "891269b0cede776d7fdd2b004fd47ea9", "score": "0.5037641", "text": "function onAPILoadReady() {\n console.log('ready: Auth: ', IPCortex.PBX.Auth);\n //IPCortex.PBX.Auth.setHost('https://37.122.196.252');\n IPCortex.PBX.Auth.setHost('https://call.webrtc.nu');\n}", "title": "" }, { "docid": "e04169369e16e6b416cb2557db1306cb", "score": "0.5023817", "text": "function inizializza_video() {\n navigator.getUserMedia( {'audio':true, 'video':true}, \n function(stream) {\n\n video_locale.src = URL.createObjectURL(stream);\n peer = new RTCPeerConnection(peer_config);\n peer.onicecandidate = onIceCandidate;\n peer.onaddstream = function(event){\n video_remoto.src = URL.createObjectURL(event.stream);\n };\n\n peer.addStream(stream);\n if (chiamante)\n peer.createOffer(sdpcreato, null, mediaConstraints);\n }\n );\n}", "title": "" }, { "docid": "eed523da672620adc38967483a39cab8", "score": "0.50201195", "text": "function IsShowPage(name){\n\tif(gDevice.devType == devTypeEnum.DEV_IPC){\n\t\treturn 1;\n\t}\n\t\n\tif(name == \"chn_live\"){\n\t\tfor (var i=0; i<gDevice.loginRsp.ChannelNum; i++){\n\t\t\tif(gDevice.isOnline(i))\t\n\t\t\t\tif(((gDevice.devState[i].Abilities>>AbilityTypeEnum.OSD) & 1) == 1){\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}else if(name == \"chn_sp\"){\n\t\tfor (var i=0; i<gDevice.loginRsp.ChannelNum; i++){\n\t\t\tif(gDevice.isOnline(i))\t\n\t\t\t\tif(((gDevice.devState[i].Abilities>>AbilityTypeEnum.COVER) & 1) == 1){\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}else if(name == \"main_stream_set\"){\n\t\tfor (var i=0; i<gDevice.loginRsp.ChannelNum; i++){\n\t\t\tif(gDevice.isOnline(i) || (gVar.bC0_0305_3120101 && gDevice.isSleep(i))){\t\n\t\t\t\tif((((gDevice.devState[i].Abilities>>AbilityTypeEnum.MAINSTREAM) & 1) == 1 &&gDevice.devState[i].NewDevAbilityModeFlag != 1) ||(gDevice.devState[i].NewDevAbilityModeFlag == 1&&((gDevice.devState[i].Abilities>>AbilityTypeEnum.NOSUPMAINSTREAMPARAM) & 1) == 0)){\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}else if(name == \"substream\" || name == \"sub_stream_set\"){\n\t\tfor (var i=0; i<gDevice.loginRsp.ChannelNum; i++){\n\t\t\tif(gDevice.isOnline(i))\t\n\t\t\t\tif((((gDevice.devState[i].Abilities>>AbilityTypeEnum.SUBSTREAM) & 1) == 1&&gDevice.devState[i].NewDevAbilityModeFlag != 1) || (gDevice.devState[i].NewDevAbilityModeFlag == 1&&((gDevice.devState[i].Abilities>>AbilityTypeEnum.NOSUPSUBSTREAMPARAM) & 1) == 0)){\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}else if(name == \"mobistream\" || name == \"mobile_stream_set\"){\n\t\tfor (var i=0; i<gDevice.loginRsp.ChannelNum; i++){\n\t\t\tif(gDevice.isOnline(i))\t\n\t\t\t\tif((((gDevice.devState[i].Abilities>>AbilityTypeEnum.SNAPSTREAM) & 1) == 1&&gDevice.devState[i].NewDevAbilityModeFlag != 1) || (gDevice.devState[i].NewDevAbilityModeFlag == 1&&((gDevice.devState[i].Abilities>>AbilityTypeEnum.NOSUPMOBILESTREAMPARAM) & 1) == 0)){\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}else if(name == \"chn_yt\"){\n\t\tfor (var i=0; i<gDevice.loginRsp.ChannelNum; i++){\n\t\t\tif(/*gDevice.isOnline(i)*/1)\t\n\t\t\t\tif(/*((gDevice.devState[i].Abilities>>10) & 1) == 1*/1){\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}else if(name == \"alarm_mv\"){\n\t\tfor (var i=0; i<gDevice.loginRsp.ChannelNum; i++){\n\t\t\tif(gDevice.isOnline(i) || gDevice.isSleep(i))\t\n\t\t\t\tif((gDevice.devState[i].Abilities>>AbilityTypeEnum.MOTIONSET) & 1){\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}else if(name == \"Img_Ctrl\"){\n\t\tfor (var i=0; i<gDevice.loginRsp.ChannelNum; i++){\n\t\t\tif(gDevice.isOnline(i))\t\n\t\t\t\tif(gDevice.devState[i].Abilities>>AbilityTypeEnum.IMAGE&1){\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}else if(name == \"Capture_Set\"){\n\t\tfor (var i=0; i<gDevice.loginRsp.ChannelNum; i++){\n\t\t\tif(gDevice.isOnline(i)){\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}else if(name == \"GoodsLost_Legacy\"){\n\t\tfor (var i=0; i<gDevice.loginRsp.ChannelNum; i++){\n\t\t\tif(gDevice.isOnline(i)){\n\t\t\t\tif(gDevice.devType == devTypeEnum.DEV_HDVR){\n\t\t\t\t\tif(gDevice.hasAbility(i,AbilityTypeEnum.INTELLIGENT)){//switch\n\t\t\t\t\t\treturn 1;\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tif(gDevice.hasAbility(i,AbilityTypeEnum.INTELLIGENT) && gDevice.hasIntelligentAbilities(i,PageIntelligentEnum.SOD)){\n\t\t\t\t\t\treturn 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}else if(name == \"Perimeter_Line\"){\n\t\tfor (var i=0; i<gDevice.loginRsp.ChannelNum; i++){\n\t\t\tif(gDevice.isOnline(i)){\n\t\t\t\tif(gDevice.devType == devTypeEnum.DEV_HDVR){\n\t\t\t\t\tif(gDevice.hasAbility(i,AbilityTypeEnum.INTELLIGENT)){//switch\n\t\t\t\t\t\treturn 1;\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tif(gDevice.hasAbility(i,AbilityTypeEnum.INTELLIGENT) && gDevice.hasIntelligentAbilities(i,PageIntelligentEnum.LCD)){\n\t\t\t\t\t\treturn 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}else if(name == \"Perimeter_Zone\"){\n\t\tfor (var i=0; i<gDevice.loginRsp.ChannelNum; i++){\n\t\t\tif(gDevice.isOnline(i)){\n\t\t\t\tif(gDevice.devType == devTypeEnum.DEV_HDVR){\n\t\t\t\t\tif(gDevice.hasAbility(i,AbilityTypeEnum.INTELLIGENT)){//switch\n\t\t\t\t\t\treturn 1;\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tif(gDevice.hasAbility(i,AbilityTypeEnum.INTELLIGENT) && gDevice.hasIntelligentAbilities(i,PageIntelligentEnum.PID)){\n\t\t\t\t\t\treturn 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}else if(name == \"Human_Detection\"){\n\t\tfor (var i=0; i<gDevice.loginRsp.ChannelNum; i++){\n\t\t\tif(gDevice.isOnline(i)){\n\t\t\t\tif(gDevice.devType == devTypeEnum.DEV_HDVR){\n\t\t\t\t\tif(gDevice.hasAbility(i,AbilityTypeEnum.INTELLIGENT)){//switch\n\t\t\t\t\t\treturn 1;\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tif(gDevice.hasAbility(i,AbilityTypeEnum.INTELLIGENT) && gDevice.hasIntelligentAbilities(i,PageIntelligentEnum.PD)){\n\t\t\t\t\t\treturn 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}else if(name == \"Face_Detection\"){\n\t\tfor (var i=0; i<gDevice.loginRsp.ChannelNum; i++){\n\t\t\tif(gDevice.isOnline(i)){\n\t\t\t\tif(gDevice.devType == devTypeEnum.DEV_HDVR){\n\t\t\t\t\tif(gDevice.hasAbility(i,AbilityTypeEnum.INTELLIGENT)){//switch\n\t\t\t\t\t\treturn 1;\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tif(gDevice.hasAbility(i,AbilityTypeEnum.INTELLIGENT) && gDevice.hasIntelligentAbilities(i,PageIntelligentEnum.FD)){\n\t\t\t\t\t\treturn 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}else if(name == \"People_Cross_Counting\"){\n\t\tfor (var i=0; i<gDevice.loginRsp.ChannelNum; i++){\n\t\t\tif(gDevice.isOnline(i)){\n\t\t\t\tif(gDevice.devType == devTypeEnum.DEV_HDVR){\n\t\t\t\t\tif(gDevice.hasAbility(i,AbilityTypeEnum.INTELLIGENT)){//switch\n\t\t\t\t\t\treturn 1;\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tif(gDevice.hasAbility(i,AbilityTypeEnum.INTELLIGENT) && gDevice.hasIntelligentAbilities(i,PageIntelligentEnum.CC)){\n\t\t\t\t\t\treturn 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}else if(name == \"sysinf_smart\"){//HDVR\n for (var i = gDevice.loginRsp.AnalogChNum; i<gDevice.loginRsp.ChannelNum; i++){\n if(gDevice.isOnline(i)){\n return 1;\n }\n }\n return 0;\n }else if(name == \"alarm_pir\"){\n\t\tfor (var i=0; i<gDevice.loginRsp.ChannelNum; i++){\n\t\t\tif(gDevice.isOnline(i))\t\n\t\t\t\tif((gDevice.devState[i].Abilities>>AbilityTypeEnum.PIR) & 1){\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}else if(name == \"flood_lightmulchn\"){\n\t\tfor (var i=0; i<gDevice.loginRsp.ChannelNum; i++){\n\t\t\tif(gDevice.isOnline(i))\t\n\t\t\t\tif((gDevice.devState[i].Abilities>>AbilityTypeEnum.WHITE_LIGHT) & 1){\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}else if(name == \"AF_controls\"){\n\t\tfor (var i=0; i<gDevice.loginRsp.ChannelNum; i++){\n\t\t\tif(gDevice.isOnline(i))\t\n\t\t\t\tif((gDevice.devState[i].Abilities>>AbilityTypeEnum.AFOCUS) & 1){\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}else if(name == \"Alarm_ODSwitch\"){\n\t\tfor (var i=0; i<gDevice.loginRsp.ChannelNum; i++){\n\t\t\tif(gDevice.isOnline(i))\t\n\t\t\t\treturn 1;\n\t\t}\n\t\treturn 0;\n\t}\n\treturn 1; \n\n}", "title": "" }, { "docid": "18a938092ae3b3fdcecd1aeba1ed171f", "score": "0.50161505", "text": "function initPhoner() {\n try {\n phoner.init();\n if (browser.isSafariWebRTC()) {\n Phoner.playFirstVideo(localVideo, true);\n }\n } catch (e) {\n setStatus('error');\n throw new Error('[Caster] - cannot initiate phoner. Status degrading.');\n }\n }", "title": "" }, { "docid": "65aea0349a068c66f98f49d4dd09fe5b", "score": "0.50135577", "text": "function isWX() {\n var ua = window.navigator.userAgent.toLowerCase();\n return ua.match(/MicroMessenger/i) == \"micromessenger\";\n}", "title": "" }, { "docid": "710c74624b8064c6c5cd6297004fc12b", "score": "0.50115985", "text": "function Chat() {\n\n if (!isWebRTCSupported) {\n alert(\"error: This browser does not support WebRTC\");\n return;\n }\n\n console.log(\"Connecting to server\");\n socket = io(server);\n \n // once access given, join the channel\n socket.on(\"connect\", () => {\n console.log(\"Connected to server\");\n getId(\"loadingDiv\").style.display = \"none\";\n setElements();\n setChatRoom();\n setLeaveRoomBtn();\n setShareRoomBtn();\n setJoinCallBtn();\n start();\n });\n\n\n // server sends out 'add' signals to each pair of users in the channel \n socket.on(\"add\", (config) => {\n\n let peer_id = config.peer_id;\n let peers = config.peers;\n\n if (peer_id in connections) return;\n if (config.iceServers) iceServers = config.iceServers;\n\n connection = new RTCPeerConnection({ iceServers: iceServers });\n connections[peer_id] = connection;\n\n msgerAddPeers(peers);\n participantAddPeers(peers);\n\n connections[peer_id].onicecandidate = (event) => {\n if (event.candidate) {\n socket.emit(\"ICE\", { \n peer_id: peer_id, \n ice_candidate: { \n sdpMLineIndex: event.candidate.sdpMLineIndex, \n candidate: event.candidate.candidate, \n address: event.candidate.address, \n }, \n });\n } \n };\n\n // RTC Data Channel\n connections[peer_id].ondatachannel = (event) => {\n console.log(\"Datachannel event \" + peer_id, event);\n event.channel.onmessage = (msg) => {\n switch (event.channel.label) {\n case \"chat_channel\":\n let message = {};\n try {\n message = JSON.parse(msg.data);\n ChatChannel(message);\n } \n catch (err) {\n console.log(err);\n }\n break;\n }\n };\n };\n createChatChannel(peer_id);\n\n if (config.should_create_offer) {\n\n console.log(\"creating RTC offer to\", peer_id);\n connections[peer_id].createOffer()\n .then((local_description) => {\n console.log(\"local offer description is\", local_description);\n connections[peer_id].setLocalDescription(local_description)\n .then(() => {\n socket.emit(\"SDP\", { peer_id: peer_id, session_description: local_description, });\n console.log(\"offer setLocalDescription done!\");\n })\n .catch((err) => {\n console.error(\"error: offer setLocalDescription\", err);\n alert(\"error: offer setLocalDescription failed \" + err);\n });\n })\n .catch((err) => {\n console.error(\"error: sending offer\", err);\n });\n }\n\n });\n\n \n socket.on(\"sessionDescription\", (config) => {\n\n let peer_id = config.peer_id;\n let remote_description = config.session_description;\n let description = new RTCSessionDescription(remote_description);\n\n connections[peer_id].setRemoteDescription(description)\n .then(() => {\n console.log(\"setRemoteDescription done!\");\n if (remote_description.type == \"offer\") {\n console.log(\"creating answer\");\n connections[peer_id].createAnswer()\n .then((local_description) => {\n console.log(\"answer description is: \", local_description);\n connections[peer_id].setLocalDescription(local_description)\n .then(() => {\n socket.emit(\"SDP\", { peer_id: peer_id, session_description: local_description, });\n console.log(\"answer setLocalDescription done!\");\n })\n .catch((err) => {\n console.error(\"error: answer setLocalDescription\", err);\n alert(\"error: answer setLocalDescription failed \" + err);\n });\n })\n .catch((err) => {\n console.error(\"error: creating answer\", err);\n });\n } \n })\n .catch((err) => {\n console.error(\"error: setRemoteDescription\", err);\n });\n });\n\n\n socket.on(\"iceCandidate\", (config) => {\n\n let peer_id = config.peer_id;\n let ice_candidate = config.ice_candidate;\n connections[peer_id]\n .addIceCandidate(new RTCIceCandidate(ice_candidate))\n .catch((err) => {\n console.error(\"error: addIceCandidate\", err);\n alert(\"error: addIceCandidate failed \" + err);\n });\n });\n\n \n // remove all connections\n socket.on(\"disconnect\", () => {\n\n console.log(\"Disconnected from server\");\n for (let peer_id in connections) {\n connections[peer_id].close();\n msgerRemovePeer(peer_id);\n participantRemovePeer(peer_id);\n }\n chatChannels = {};\n connections = {};\n });\n\n \n // 'remove' signal is passed to all the users and the media channels open for that peer are deleted\n socket.on(\"remove\", (config) => {\n\n console.log(\"Server said to remove peer:\", config);\n let peer_id = config.peer_id;\n if (peer_id in connections) connections[peer_id].close();\n\n msgerRemovePeer(peer_id);\n participantRemovePeer(peer_id);\n\n delete chatChannels[peer_id];\n delete connections[peer_id];\n });\n\n} // end Chat", "title": "" }, { "docid": "fa434067bd38ad0452184e06fda8bafd", "score": "0.50113827", "text": "onPeerHandshakeComplete(app, peer) {\n\n if (this.browser_active == 0) { return; }\n\n //\n // leaving this here for the short term,\n // token manager can be a separate module\n // in the long-term, as the email client\n // should just handle emails\n //\n // this.getTokens();\n\n //\n //\n //\n url = new URL(window.location.href);\n if (url.searchParams.get('module') != null) { return; }\n\n this.app.storage.loadTransactions(\"Email\", 50, (txs) => {\n\n let keys = [];\n\n for (let i = 0; i < txs.length; i++) {\n let addtx = true;\n for (let k = 0; k < this.emails.inbox.length; k++) {\n if (txs[i].returnSignature() == this.emails.inbox[k].returnSignature()) {\n addtx = false;\n }\n }\n if (addtx) {\n this.emails.inbox.push(txs[i]);\n keys.push(txs[i].transaction.from[0].add);\n }\n }\n\n EmailList.render(this.app, this.uidata);\n EmailList.attachEvents(this.app, this.uidata);\n\n this.addrController.fetchIdentifiers(keys);\n\n });\n\n\n //EmailList.render(this.app, this.uidata);\n //EmailList.attachEvents(this.app, this.uidata);\n\n }", "title": "" }, { "docid": "a91a436646b022d325db500e59a6e6b2", "score": "0.5011215", "text": "function onIceCandidate(event) {\n if (event.candidate) {\n messaggio_da_inviare(event.candidate);\n } \n}", "title": "" }, { "docid": "66006d84e48ff80def3d880f51d3063f", "score": "0.50087756", "text": "function switchChat(swMode) {\r\n var vHeight; //Contains the Calculated video height.\r\n var vWidth = window.innerWidth; //When chat is below, video width is just the window content width. Currently.\r\n isOverUnder = ((vWidth < 992) || (window.innerWidth < window.innerHeight)); //The Picarto CSS moves videos into the over/under mode when the width of the window is under 992, and the window isn't in portrait.\r\n isPortrait = ~document.querySelector(\"body\").className.split(' ').indexOf('is-portrait'); //There's some other script on the picarto page that decides to add a is portrait tag that makes only a single video appear.\r\n\r\n //The names of the different modes, as pulled from the player container classes, are single duo triple quad\r\n\r\n if (currentMode == \"duo\") {\r\n if (isPortrait) vHeight = (vWidth / 16 * 9);\r\n else if (isOverUnder) vHeight = (vWidth / 16 * 18);\r\n else vHeight = (vWidth / 32 * 9);\r\n //document.querySelector(\"body.channel-page #channel_chat\").classList.remove(\"pnSingle\", \"pnTriple\", \"pnQuad\");\r\n //document.querySelector(\"body.channel-page #channel_chat\").classList.add(\"pnDuo\");\r\n overrideElems.forEach(function(elem){\r\n try {\r\n document.querySelector(elem).classList.remove(\"pnSingle\", \"pnTriple\", \"pnQuad\");\r\n document.querySelector(elem).classList.add(\"pnDuo\");\r\n }\r\n catch(error) {\r\n //console.error(error);\r\n }\r\n });\r\n }\r\n else if (currentMode == \"triple\") {\r\n if (isPortrait) vHeight = (vWidth / 16 * 9);\r\n else if (isOverUnder) vHeight = (vWidth / 16 * 27);\r\n else vHeight = (vWidth / 16 * 13.5);\r\n overrideElems.forEach(function(elem){\r\n try {\r\n document.querySelector(elem).classList.remove(\"pnSingle\", \"pnDuo\", \"pnQuad\");\r\n document.querySelector(elem).classList.add(\"pnTriple\");\r\n }\r\n catch(error) {\r\n //console.error(error);\r\n }\r\n });\r\n }\r\n else if (currentMode == \"quad\") {\r\n if (isPortrait) vHeight = (vWidth / 16 * 9);\r\n else if (isOverUnder) vHeight = (vWidth / 16 * 36);\r\n else vHeight = (vWidth / 16 * 9);\r\n overrideElems.forEach(function(elem){\r\n try {\r\n document.querySelector(elem).classList.remove(\"pnSingle\", \"pnDuo\", \"pnTriple\");\r\n document.querySelector(elem).classList.add(\"pnQuad\");\r\n }\r\n catch(error) {\r\n //console.error(error);\r\n }\r\n });\r\n }\r\n else //Safe fallback to Single mode, in case things get broken in the future.\r\n {\r\n vHeight = (vWidth / 16 * 9);\r\n overrideElems.forEach(function(elem){\r\n try {\r\n document.querySelector(elem).classList.remove(\"pnDuo\", \"pnTriple\", \"pnQuad\");\r\n document.querySelector(elem).classList.add(\"pnSingle\");\r\n }\r\n catch(error) {\r\n //console.error(error);\r\n }\r\n });\r\n }\r\n\r\n //Calculate chat dimensions\r\n var cHeight = (window.innerHeight - vHeight);\r\n var cWidth = window.innerWidth;\r\n if (cWidth > 1000) cWidth = 1000; //Chat width is capped in the CSS section below.\r\n\r\n\r\n //Now that we've done all that work, we can determine what the size of the chat would be, and see if it makes sense to move it!\r\n switch(swMode)\r\n {\r\n case 1: //Switch Below Manual Request\r\n if (cHeight >= 200) { //The requirements should be a lot less strenuous than an automatic switch.\r\n moveChatBelow();\r\n document.querySelector(\"#chatBottom\").scrollIntoView(false);\r\n document.querySelector(\"#player-container\").scrollTop = 60;\r\n }\r\n else addMsg(\"Not enough room to move chat below\"); //TODO: Add a response method that doesn't use my chat extender script for feedback. Nobody's installing that one :'3\r\n break;\r\n\r\n case 2: //Switch Original Manual Request\r\n moveChatSide(); //Just do it. The layout always will work, somewhat, with chat on the side.\r\n document.querySelector(\"#chatBottom\").scrollIntoView(false);\r\n document.querySelector(\"#player-container\").scrollTop = 0;\r\n break;\r\n\r\n default: //Automatic\r\n if ((cHeight >= 300) && ((cWidth / cHeight) < 2.4)) {\r\n moveChatBelow();\r\n document.querySelector(\"#chatBottom\").scrollIntoView(false);\r\n document.querySelector(\"#player-container\").scrollTop = 60;\r\n }\r\n else {\r\n moveChatSide();\r\n document.querySelector(\"#chatBottom\").scrollIntoView(false);\r\n document.querySelector(\"#player-container\").scrollTop = 0;\r\n }\r\n break;\r\n }\r\n\r\n //Scroll the Chat down to the most current messages. Would otherwise have annoying behavior when switching chat positions.\r\n var objDiv = document.querySelector(\".scrollwrapperchat\");\r\n objDiv.scrollTop = objDiv.scrollHeight - objDiv.clientHeight;\r\n }", "title": "" }, { "docid": "fa1ec02fd3557589dcc107c764352ed9", "score": "0.50059724", "text": "function start(isInitiator) {\n callButton.disabled = true;\n pc = new webkitRTCPeerConnection(configuration);\n\n // send any ice candidates to the other peer\n pc.onicecandidate = function (evt) {\n if (evt.candidate) {\n var candidate = \"\";\n var s = SDP.parse(\"m=application 0 NONE\\r\\na=\" + evt.candidate.candidate + \"\\r\\n\");\n var candidateDescription = s && s.mediaDescriptions[0].ice.candidates[0];\n if (!candidateDescription)\n candidate = evt.candidate.candidate;\n peer.send(JSON.stringify({\n \"candidate\": {\n \"candidate\": candidate,\n \"candidateDescription\": candidateDescription,\n \"sdpMLineIndex\": evt.candidate.sdpMLineIndex\n }\n }));\n console.log(\"candidate emitted: \" + evt.candidate.candidate);\n }\n };\n\n // let the \"negotiationneeded\" event trigger offer generation\n pc.onnegotiationneeded = function () {\n // check signaling state here because Chrome dispatches negotiationeeded during negotiation\n // check isInitiator because Firefox dispatches negotiationneeded during negotiation, in stable state\n if (pc.signalingState == \"stable\" && !isMozilla || isInitiator)\n pc.createOffer(localDescCreated, logError);\n };\n\n // start the chat\n if (chatCheckBox.checked) {\n if (isInitiator) {\n channel = pc.createDataChannel(\"chat\");\n setupChat();\n } else {\n pc.ondatachannel = function (evt) {\n channel = evt.channel;\n setupChat();\n };\n }\n }\n\n // once the remote stream arrives, show it in the remote video element\n pc.onaddstream = function (evt) {\n remoteView.src = URL.createObjectURL(evt.stream);\n if (videoCheckBox.checked)\n remoteView.style.visibility = \"visible\";\n else if (audioCheckBox.checked && !(chatCheckBox.checked))\n audioOnlyView.style.visibility = \"visible\";\n sendOrientationUpdate();\n };\n\n if (audioCheckBox.checked || videoCheckBox.checked) {\n pc.addStream(localStream);\n }\n}", "title": "" }, { "docid": "72e550b02901e4e57d10df4d148aa326", "score": "0.5005422", "text": "function shimPeerConnection(window) {\n const browserDetails = _utils__WEBPACK_IMPORTED_MODULE_0__[\"detectBrowser\"](window);\n\n if (window.RTCIceGatherer) {\n if (!window.RTCIceCandidate) {\n window.RTCIceCandidate = function RTCIceCandidate(args) {\n return args;\n };\n }\n if (!window.RTCSessionDescription) {\n window.RTCSessionDescription = function RTCSessionDescription(args) {\n return args;\n };\n }\n // this adds an additional event listener to MediaStrackTrack that signals\n // when a tracks enabled property was changed. Workaround for a bug in\n // addStream, see below. No longer required in 15025+\n if (browserDetails.version < 15025) {\n const origMSTEnabled = Object.getOwnPropertyDescriptor(\n window.MediaStreamTrack.prototype, 'enabled');\n Object.defineProperty(window.MediaStreamTrack.prototype, 'enabled', {\n set(value) {\n origMSTEnabled.set.call(this, value);\n const ev = new Event('enabled');\n ev.enabled = value;\n this.dispatchEvent(ev);\n }\n });\n }\n }\n\n // ORTC defines the DTMF sender a bit different.\n // https://github.com/w3c/ortc/issues/714\n if (window.RTCRtpSender && !('dtmf' in window.RTCRtpSender.prototype)) {\n Object.defineProperty(window.RTCRtpSender.prototype, 'dtmf', {\n get() {\n if (this._dtmf === undefined) {\n if (this.track.kind === 'audio') {\n this._dtmf = new window.RTCDtmfSender(this);\n } else if (this.track.kind === 'video') {\n this._dtmf = null;\n }\n }\n return this._dtmf;\n }\n });\n }\n // Edge currently only implements the RTCDtmfSender, not the\n // RTCDTMFSender alias. See http://draft.ortc.org/#rtcdtmfsender2*\n if (window.RTCDtmfSender && !window.RTCDTMFSender) {\n window.RTCDTMFSender = window.RTCDtmfSender;\n }\n\n const RTCPeerConnectionShim = rtcpeerconnection_shim__WEBPACK_IMPORTED_MODULE_2___default()(window,\n browserDetails.version);\n window.RTCPeerConnection = function RTCPeerConnection(config) {\n if (config && config.iceServers) {\n config.iceServers = Object(_filtericeservers__WEBPACK_IMPORTED_MODULE_1__[\"filterIceServers\"])(config.iceServers,\n browserDetails.version);\n _utils__WEBPACK_IMPORTED_MODULE_0__[\"log\"]('ICE servers after filtering:', config.iceServers);\n }\n return new RTCPeerConnectionShim(config);\n };\n window.RTCPeerConnection.prototype = RTCPeerConnectionShim.prototype;\n}", "title": "" }, { "docid": "dd923215749fe6eceab91379e1d4b1fd", "score": "0.49994805", "text": "function renderRemote(id, stream) {\n var activeStreams;\n\n // create the peer videos list\n peerMedia[id] = peerMedia[id] || [];\n\n activeStreams = Object.keys(peerMedia).filter(function(id) {\n return peerMedia[id];\n }).length;\n\n console.log('current active stream count = ' + activeStreams);\n peerMedia[id] = peerMedia[id].concat(media(stream).render(remotes[activeStreams % 2]));\n}", "title": "" }, { "docid": "6812bad45e7cf33b7a92c6304f1b6b46", "score": "0.49973765", "text": "function onSipEventSession(e /* SIPml.Session.Event */) {\n tsk_utils_log_info('==session event = ' + e.type);\n\n switch (e.type) {\n case 'connecting': case 'connected':\n {\n var bConnected = (e.type == 'connected');\n if (e.session == oSipSessionRegister) {\n uiOnConnectionEvent(bConnected, !bConnected);\n txtRegStatus.innerHTML = \"<i>\" + e.description + \"</i>\";\n }\n else if (e.session == oSipSessionCall) {\n btnHangup.value = 'HangUp';\n\n btnCallSTD_A.disabled = true;\n btnCallSTD_B.disabled = true;\n btnCallSTD_C.disabled = true;\n btnCallSTD_D.disabled = true;\n\n btnHangup.disabled = false;\n\n btnTransfer.disabled = false;\n if (window.btnBFCP) window.btnBFCP.disabled = false;\n\n if (bConnected) {\n stopRingbackTone();\n stopRingTone();\n\n if (oNotifICall) {\n oNotifICall.cancel();\n oNotifICall = null;\n }\n }\n\n txtCallStatus.innerHTML = \"<i>\" + e.description + \"</i>\";\n divCallOptions.style.opacity = bConnected ? 1 : 0;\n\n if (SIPml.isWebRtc4AllSupported()) { // IE don't provide stream callback\n }\n }\n break;\n } // 'connecting' | 'connected'\n case 'terminating': case 'terminated':\n {\n if (e.session == oSipSessionRegister) {\n uiOnConnectionEvent(false, false);\n\n oSipSessionCall = null;\n oSipSessionRegister = null;\n\n txtRegStatus.innerHTML = \"<i>\" + e.description + \"</i>\";\n }\n else if (e.session == oSipSessionCall) {\n uiCallTerminated(e.description);\n }\n break;\n } // 'terminating' | 'terminated'\n\n case 'm_stream_video_local_added':\n {\n if (e.session == oSipSessionCall) {\n }\n break;\n }\n case 'm_stream_video_local_removed':\n {\n if (e.session == oSipSessionCall) {\n }\n break;\n }\n case 'm_stream_video_remote_added':\n {\n if (e.session == oSipSessionCall) {\n }\n break;\n }\n case 'm_stream_video_remote_removed':\n {\n if (e.session == oSipSessionCall) {\n }\n break;\n }\n\n case 'm_stream_audio_local_added':\n case 'm_stream_audio_local_removed':\n case 'm_stream_audio_remote_added':\n case 'm_stream_audio_remote_removed':\n {\n break;\n }\n\n case 'i_ect_new_call':\n {\n oSipSessionTransferCall = e.session;\n break;\n }\n\n case 'i_ao_request':\n {\n if (e.session == oSipSessionCall) {\n var iSipResponseCode = e.getSipResponseCode();\n if (iSipResponseCode == 180 || iSipResponseCode == 183) {\n startRingbackTone();\n txtCallStatus.innerHTML = '<i>Remote ringing...</i>';\n }\n }\n break;\n }\n\n case 'm_early_media':\n {\n if (e.session == oSipSessionCall) {\n stopRingbackTone();\n stopRingTone();\n txtCallStatus.innerHTML = '<i>Early media started</i>';\n }\n break;\n }\n\n case 'm_local_hold_ok':\n {\n if (e.session == oSipSessionCall) {\n if (oSipSessionCall.bTransfering) {\n oSipSessionCall.bTransfering = false;\n }\n btnHoldResume.value = 'Resume';\n btnHoldResume.disabled = false;\n txtCallStatus.innerHTML = '<i>Call placed on hold</i>';\n oSipSessionCall.bHeld = true;\n }\n break;\n }\n case 'm_local_hold_nok':\n {\n if (e.session == oSipSessionCall) {\n oSipSessionCall.bTransfering = false;\n btnHoldResume.value = 'Hold';\n btnHoldResume.disabled = false;\n txtCallStatus.innerHTML = '<i>Failed to place remote party on hold</i>';\n }\n break;\n }\n case 'm_local_resume_ok':\n {\n if (e.session == oSipSessionCall) {\n oSipSessionCall.bTransfering = false;\n btnHoldResume.value = 'Hold';\n btnHoldResume.disabled = false;\n txtCallStatus.innerHTML = '<i>Call taken off hold</i>';\n oSipSessionCall.bHeld = false;\n }\n break;\n }\n case 'm_local_resume_nok':\n {\n if (e.session == oSipSessionCall) {\n oSipSessionCall.bTransfering = false;\n btnHoldResume.disabled = false;\n txtCallStatus.innerHTML = '<i>Failed to unhold call</i>';\n }\n break;\n }\n case 'm_remote_hold':\n {\n if (e.session == oSipSessionCall) {\n txtCallStatus.innerHTML = '<i>Placed on hold by remote party</i>';\n }\n break;\n }\n case 'm_remote_resume':\n {\n if (e.session == oSipSessionCall) {\n txtCallStatus.innerHTML = '<i>Taken off hold by remote party</i>';\n }\n break;\n }\n case 'm_bfcp_info':\n {\n if (e.session == oSipSessionCall) {\n txtCallStatus.innerHTML = 'BFCP Info: <i>' + e.description + '</i>';\n }\n break;\n }\n\n case 'o_ect_trying':\n {\n if (e.session == oSipSessionCall) {\n txtCallStatus.innerHTML = '<i>Call transfer in progress...</i>';\n }\n break;\n }\n case 'o_ect_accepted':\n {\n if (e.session == oSipSessionCall) {\n txtCallStatus.innerHTML = '<i>Call transfer accepted</i>';\n }\n break;\n }\n case 'o_ect_completed':\n case 'i_ect_completed':\n {\n if (e.session == oSipSessionCall) {\n txtCallStatus.innerHTML = '<i>Call transfer completed</i>';\n btnTransfer.disabled = false;\n if (oSipSessionTransferCall) {\n oSipSessionCall = oSipSessionTransferCall;\n }\n oSipSessionTransferCall = null;\n }\n break;\n }\n case 'o_ect_failed':\n case 'i_ect_failed':\n {\n if (e.session == oSipSessionCall) {\n txtCallStatus.innerHTML = '<i>Call transfer failed</i>';\n btnTransfer.disabled = false;\n }\n break;\n }\n case 'o_ect_notify':\n case 'i_ect_notify':\n {\n if (e.session == oSipSessionCall) {\n txtCallStatus.innerHTML = \"<i>Call Transfer: <b>\" + e.getSipResponseCode() + \" \" + e.description + \"</b></i>\";\n if (e.getSipResponseCode() >= 300) {\n if (oSipSessionCall.bHeld) {\n oSipSessionCall.resume();\n }\n btnTransfer.disabled = false;\n }\n }\n break;\n }\n case 'i_ect_requested':\n {\n if (e.session == oSipSessionCall) {\n var s_message = \"Do you accept call transfer to [\" + e.getTransferDestinationFriendlyName() + \"]?\";//FIXME\n if (confirm(s_message)) {\n txtCallStatus.innerHTML = \"<i>Call transfer in progress...</i>\";\n oSipSessionCall.acceptTransfer();\n break;\n }\n oSipSessionCall.rejectTransfer();\n }\n break;\n }\n }\n }", "title": "" }, { "docid": "d303fb259933f505255441ad839da05a", "score": "0.49947983", "text": "function createPeer(){\n \n let turnServerUrls;\n let turnServerCredential;\n let turnServerUsername;\n\n if (USER_TYPE === 'Guest'){\n turnServerUrls = GUEST_TURN_SERVER_URLS;\n turnServerCredential = GUEST_TURN_SERVER_CREDENTIAL;\n turnServerUsername = GUEST_TURN_SERVER_USERNAME; \n } else{\n turnServerUrls = HOST_TURN_SERVER_URLS;\n turnServerCredential = HOST_TURN_SERVER_CREDENTIAL;\n turnServerUsername = HOST_TURN_SERVER_USERNAME;\n }\n\n const peer = new RTCPeerConnection({\n iceServers: [\n {\n urls: turnServerUrls,\n credential: turnServerCredential,\n username: turnServerUsername\n },\n {urls:'stun:stun.l.google.com:19302'},\n {urls:'stun:stunserver.org'},\n ]\n });\n\n peer.onnegotiationneeded = async () => {\n \n can_call_addIceCandidate = 0;\n \n const offer = await peer.createOffer();\n await peer.setLocalDescription(offer);\n \n const payload = {\n sdp: peer.localDescription,\n roomId: ROOM_ID\n }\n \n socket.emit('offer', payload);\n }\n\n peer.onconnectionstatechange = (e) => {\n switch (peer.connectionState){\n case 'connected':\n console.log('connection state: connected');\n break;\n case 'disconnected':\n \n console.log('conneciton state: disconnected');\n \n break;\n case 'closed':\n console.log('connection state: closed');\n break;\n case 'connecting':\n console.log('connection state: connecting');\n break;\n case 'failed':\n console.log('connection state: failed');\n break;\n case 'new':\n console.log('connection state: new');\n break;\n }\n }\n\n \n peer.ontrack = async (e) => {\n\n receivedStreamCount++;\n if (receivedStreamCount === 2){\n receivedStream = e.streams[0];\n }\n \n otherVideo.srcObject = e.streams[0];\n \n }\n\n peer.onicecandidate = (e) => {\n\n const payload = {\n candidate: e.candidate,\n roomId: ROOM_ID\n }\n \n \n if (e.candidate && can_call_addIceCandidate === 1){\n peer.addIceCandidate(new RTCIceCandidate(e.candidate));\n }\n \n if (e.candidate){\n console.log(e.candidate);\n socket.emit('candidate', payload);\n }\n \n }\n\n //when new data channel is created - code used only by guest\n peer.ondatachannel = (e) => {\n peer.dc = e.channel;\n peer.dc.onopen = () => console.log('connection open in Guest Side');\n peer.dc.onmessage = async (event) => {\n display_msg(HOST_NAME, event.data);\n if(!chat_window_open){\n new_message_notification.classList.add('show-new-message-notification');\n await new Promise(r => setTimeout(r, 3000));\n new_message_notification.classList.remove('show-new-message-notification');\n }\n }\n\n msg_data.addEventListener('keyup', (event) => {\n if(event.key === 'Enter'){\n event.preventDefault();\n const msg = display_my_message();\n if(msg !== '') {\n peer.dc.send(msg);\n }\n }\n });\n\n msg_send.onclick = () => {\n const msg = display_my_message();\n if(msg !== '') {\n peer.dc.send(msg);\n }\n }\n }\n\n peer.addEventListener('icegatheringstatechange', (e) => {\n switch(peer.iceGatheringState) {\n case 'new':\n console.log('iceGatheringState: new');\n break;\n case 'gathering':\n console.log('iceGatheringState: gathering');\n break;\n case 'complete':\n console.log('iceGatheringState: complete');\n break;\n }\n });\n\n return peer;\n\n}", "title": "" }, { "docid": "8ba86aa7f5f0f6fbbd6a2f92a1ffa583", "score": "0.4994357", "text": "isAudioTrack() {\n return this.getType() === _service_RTC_MediaType__WEBPACK_IMPORTED_MODULE_3__[\"AUDIO\"];\n }", "title": "" }, { "docid": "2709d9dc21cc4802a0de4f133b10db0b", "score": "0.49937657", "text": "function receiveStream(stream,elemid){\n\n var video=document.getElementById(elemid);\n\n video.srcObject=stream;\n\n window.peer_stream=stream;\n\n}", "title": "" }, { "docid": "1a3373062917f25d092fffa2ff6b8a84", "score": "0.49891168", "text": "function MonitorWebSocket()\n{\n if (ws.readyState != 1)\n {\n document.getElementById(\"WebSocketData\").style.display=\"none\";\n document.getElementById(\"AltWebSocketData\").style.display=\"block\";\n }\n else\n {\n document.getElementById(\"WebSocketData\").style.display=\"block\";\n document.getElementById(\"AltWebSocketData\").style.display=\"none\";\n }\n}", "title": "" }, { "docid": "77f9051ab824ace7fe2c46bf4027d588", "score": "0.49853352", "text": "function isIframe() {\r\n return IS_WEB && window.parent !== window;\r\n }", "title": "" } ]
96df5dc964f340c61096db45833e18b1
Get things moving after a delay addTimeout( paper1start,1000);
[ { "docid": "b557c9e845fc9e16654156f697c58412", "score": "0.7275221", "text": "function paper1start(){\n\t\tpuzzleLeft.animate({'transform': '...T0,177'}, 600, '<>', function(){\n\t\t\taddTimeout(puzzleRightEnter, 1250);\n\t\t})\n\t}", "title": "" } ]
[ { "docid": "d87b5e722b421923cedc21db1cbe5eb1", "score": "0.66449684", "text": "function appearAfterDelay() {\r\n setTimeout(makeShapeAppear, 1000);\r\n }", "title": "" }, { "docid": "bcbd7a2614f4a945187e804937e9962d", "score": "0.6567799", "text": "function over(e){\n\tif(timeout == 0)\n\t{ \n\t\ttimeout = setInterval(move, 5);\n\t}\n}", "title": "" }, { "docid": "f7cc5b7c77f1db509c4bed1da81941a7", "score": "0.65374464", "text": "function paper3start() {\n\t jumble.animate({opacity: 1}, 1000, 'ease', function(){\n\t\t addTimeout(dropLetters, 1250)\n\t });\n\t}", "title": "" }, { "docid": "e62048c06b6fd22b9646dc2bb0c209d8", "score": "0.6483857", "text": "function t2map_delayed_move(e) {\n // clear existing timeout (if exists)\n clearTimeout(t2map_map_move_timeout);\n // set new timeout\n t2map_map_move_timeout = setTimeout(\"t2map_sprinkle_req();\", 400);\n}", "title": "" }, { "docid": "6cd84d74ac1d5bde5bdf23b99ba041ee", "score": "0.6427027", "text": "function start(){\n //Set a timer, call draw, and add a delay\n\t\n}", "title": "" }, { "docid": "66015be6f0e07fa0c160f948b0a20905", "score": "0.6424795", "text": "function MovementRepeat() {\n\t$(\"#robot\").animate({'top':'25px'},6000);\n\t$(\"#robot\").animate({'top':'225px'},6000);\n\tMovementRepeatid = setTimeout(MovementRepeat, 0);\n\t}", "title": "" }, { "docid": "14e689a97763060f75ee6a0c160f9295", "score": "0.64050287", "text": "function appearAfterDelay() {\n \n// setTimeout(function, milliseconds) Executes a function, after waiting a specified number of milliseconds.\n \n setTimeout(makeShapeAppear, Math.random() * 2000);\n \n }", "title": "" }, { "docid": "6ecb9efb75fff5a099fa7c4fb728be03", "score": "0.6403804", "text": "function appearAfterDelay(){\n var startingTime=Math.random()*20;\n // console.log(startingTime);\n setTimeout(makeShapeAppear, startingTime);\n}", "title": "" }, { "docid": "da2b82461e272174fb78f00311b74c2c", "score": "0.6320467", "text": "function move(){\r\n\tclearTimeout(setTimer);\r\n\tmoveball();\r\n}", "title": "" }, { "docid": "5f7184988dfa30afa5e743824222d862", "score": "0.6318362", "text": "function p1start() {\n playerOne.css('width','130px');\n playerOne.css('height','304px');\n playerOne.css('animation','p1start .5s steps(4) infinite')\n playerOne.css('background','url(img/player1/sanjistart.png')\n setTimeout(P1default,1000);\n }", "title": "" }, { "docid": "06301db4d9768fa658c18157891adab0", "score": "0.6272585", "text": "function _delayDrawOnTimeout() {\r\n _delayedDraw();\r\n if (delay.queue.keys().length == 0) { idle_tracker.stop(); }\r\n}", "title": "" }, { "docid": "a51bc45d195659b9e870696cef26db2e", "score": "0.61984015", "text": "function pauseUpdate() { var t=setTimeout(updateSpace,100); }", "title": "" }, { "docid": "64155bb35eee4eeb0a7de13a19b08c0f", "score": "0.61551297", "text": "function p1Moveleft() {\n playerOne.css('width','162px');\n playerOne.css('height','300px');\n playerOne.css('animation','pOnewalk .6s steps(8) infinite')\n playerOne.css('background','url(img/player1/sanjiwalk.png')\n p1pos = playerOne.offset().left;\n playerOne.css('left',p1pos-8);\n setTimeout(P1default,1000);\n }", "title": "" }, { "docid": "c5183082af88b38589867f272e9d129d", "score": "0.6153231", "text": "function start(time) {\n setTimeout(playMove, time);\n}", "title": "" }, { "docid": "d89bbfe3dc912233abf56207b7682e4d", "score": "0.6149096", "text": "function liftUp(){\n timeCalled += 1;\n setTimeout(function() {\n penDown = false;\n }, 250 * timeCalled);\n}", "title": "" }, { "docid": "905f74de84bd31ee19e021c1a282d58e", "score": "0.6131803", "text": "function timeDelay() \n{\n\tvar done = false;\n\tvar counter = 0;\n\twhile ((!done) && (counter < 60)) \n\t{\n\t\tvar progressIndicator = app.windows()[0].activityIndicators()[0];\n\t\tUIALogger.logMessage(progressIndicator);\n\t\tif (progressIndicator != \"[object UIAElementNil]\") \n\t\t{\n\t\t\ttarget.delay(0.5);\n\t\t\tcounter++; \n\t\t}\n\t\telse \n\t\t{\n\t\t\tdone = true;\n\t\t}\n\t}\n\ttarget.delay(0.5);\n}", "title": "" }, { "docid": "dd4d3611efba29df0167140808162df2", "score": "0.61143506", "text": "function myFunction() {\n move();\n setTimeout(myFunction, time);\n}", "title": "" }, { "docid": "78d46ce3513b5dbb19be668709b13be4", "score": "0.61032313", "text": "function liftDown(){\n timeCalled += 1;\n setTimeout(function() {\n penDown = true;\n }, 250 * timeCalled);\n}", "title": "" }, { "docid": "912b1d0d76db9a1ab6391af02b9ea623", "score": "0.6099394", "text": "function setup() {\n //things to only do one time.\n preload_img();\n create_locations();\n create_roster();\n create_missions();\n create_buttons();\n start_screen();\n //draw_canvas(); //get rid of this when reenable start screen\n var intttvID = window.setTimeout(start_screen_kill, 1500);\n var intttttvID = window.setTimeout(draw_canvas, 1500);\n text_fix();\n\n}", "title": "" }, { "docid": "dc66a338c4f3df4e14e6cfa52763d1ca", "score": "0.60784316", "text": "function moveToConstruct() {\n while (noBeepersPresent()){\n \tmove();\n\t}\n}", "title": "" }, { "docid": "c3aace0ce56a0584f87c1386ecebc243", "score": "0.6053701", "text": "function delayed() {\n self._scrollPage();\n self.resizeTimeout = null;\n }", "title": "" }, { "docid": "1d5ae0fcf32d4d4359d1e38206621ca9", "score": "0.60535884", "text": "function delay() {\n\t\t$(\"start\").disabled = true;\n\t\t$(\"stop\").disabled = false;\n\t\tlet speed = getSpeed();\n\t\tconsole.log(speed);\n \tinterval = setInterval(myAnimationOneFrame, speed); \n \tisAnimationDisplayed = true;\n\t}", "title": "" }, { "docid": "86548cf323bb98ee859bc61e391f7355", "score": "0.6047311", "text": "function nextStep(){\n pause();\n window.setTimeout(redrawBoard, 300);\n }", "title": "" }, { "docid": "2790ef0389afca4dc13489692562e74e", "score": "0.6038614", "text": "function _rect1move_actrl() {\n if (this.reqAF1Play){\n this.rect1_a1.pause();\n this.reqAF1Play = false;\n }else{\n this.rect1_a1.play();\n this.reqAF1Play = true;\n }\n }", "title": "" }, { "docid": "a5620a526481c4189e1fb3dee0cc1392", "score": "0.6029501", "text": "function Pointerenter(){\n\ttimer=0.1; \n}", "title": "" }, { "docid": "b62273f2c01bf06ef67943ba1950408e", "score": "0.60227704", "text": "function startSpaceInvader() {\n if (marginLeft > 50) {\n // Change the direction\n marginShift = -5;\n // Move down after a delay\n setTimeout(moveDown, 500);\n // Then move sideways after another delay\n setTimeout(move, 1000);\n } \n else if (marginLeft < -50) {\n // Change the direction\n marginShift = +5;\n // Move down after a delay\n setTimeout(moveDown, 500);\n // Then move sideways after another delay\n setTimeout(move, 1000);\n }\n else {\n // Move sideways after a delay\n setTimeout(move, 500);\n }\n;}", "title": "" }, { "docid": "416ae4ff49f808c9ef6acb9545cc9578", "score": "0.60183513", "text": "function sleepWell(s) {\r\n setTimeout(function() {\r\n},s*1000);\r\n}", "title": "" }, { "docid": "51d8d2a4ed9bf62c4d7c2f7d672b6062", "score": "0.60173047", "text": "function timerElapsed() { // called when the \"timerNextSlide\" elapses\n // repeat myself\n timerNextSlide = setTimeout(timerElapsed, slideOverTime);\n\n // Select next powerpoint slide (JPG).\n nextSlide();\n}", "title": "" }, { "docid": "cf4eae3489874e6d0a84137ad1886ab2", "score": "0.600003", "text": "function startAnimation () {\n on = true; // Animation angeschaltet\n timer = setInterval(paint,40); // Timer mit Intervall 0,040 s aktivieren\n t0 = new Date(); // Neuer Anfangszeitpunkt \n }", "title": "" }, { "docid": "cf4eae3489874e6d0a84137ad1886ab2", "score": "0.600003", "text": "function startAnimation () {\n on = true; // Animation angeschaltet\n timer = setInterval(paint,40); // Timer mit Intervall 0,040 s aktivieren\n t0 = new Date(); // Neuer Anfangszeitpunkt \n }", "title": "" }, { "docid": "a7fac72a9660bb2604400be9e717dd07", "score": "0.59916615", "text": "function startAnimation () {\r\n on = true; // Animation angeschaltet\r\n timer = setInterval(paint,40); // Timer mit Intervall 0,040 s aktivieren\r\n t0 = new Date(); // Neuer Bezugszeitpunkt \r\n }", "title": "" }, { "docid": "a91ca54e7fd87f901db8381c0b458f53", "score": "0.5954803", "text": "function slideover() {\r\n requestAnimationFrame(moveit);\r\n }", "title": "" }, { "docid": "68a61cbdb7e40a81b36e5f4e0033461c", "score": "0.59521335", "text": "function breatheInOut() {\n circle.style.animationPlayState = 'running';\n pointer.style.animationPlayState = 'running';\n\n setTimeout(() => {\n text.innerText = 'Inhale';\n \n }, 0000);\n\n setTimeout(() => {\n text.innerText = 'Hold';\n \n }, 3000);\n\n setTimeout(() => {\n text.innerText = 'Exhale'\n }, 4000);\n}", "title": "" }, { "docid": "3312ab93b7c9dd287caf949bb4c88a60", "score": "0.59366417", "text": "function showStartAnimation() {\n\n $('.main_block').addClass('show_main_block');\n setTimeout(function () {\n $('.main_libra').addClass('rotate_libra');\n $('.main_line').velocity({\n right: 0\n }, 1000);\n\n }, 1200);\n setTimeout(function () {\n $('.map_mark img').css('display' , 'inline-block').velocity({\n top: '10%',\n width: '20px'\n\n }, 1000);\n }, 2200)\n\n\n}", "title": "" }, { "docid": "2fcc3480150e54c9fd3dc2d8cc052e8d", "score": "0.5927558", "text": "function moveToMid() {\n while (noBeepersPresent()) {\n move();\n }\n}", "title": "" }, { "docid": "c45eaabf1366a5e923df1a6ba95f70ef", "score": "0.5909232", "text": "function moveText(currentX, currentY, physX, physY, bounceCounter) {\n var HEIGHT = window.innerHeight-45;\n var WIDTH = window.innerWidth-45;\n\n\n if (currentX >= WIDTH || (currentX <= 0 && physX < 0)) {\n physX=-physX;\n bounceCounter++;\n document.getElementById('theText').innerHTML = bounceCounter;\n }\n if (currentY >= HEIGHT || (currentY <= 0 && physY < 0)) {\n physY=-physY;\n bounceCounter++;\n document.getElementById('theText').innerHTML = bounceCounter;\n }\n if (bounceCounter > 7) {\n document.getElementById('theText').innerHTML = '8 and Done';\n throw new Error(\"Done :)\");\n }\n currentX += physX;\n currentY += physY;\n /*set if the counter is less than 8 here when get there\n this portion I THINK actually does the moving*/\n /*dom.left and dom.top actually change the style position in the html. The settimeout just recursively calls the method again*/\n\n dom.left = currentX + \"px\";\n dom.top = currentY + \"px\";\n setTimeout(\"moveText(\" + currentX + \",\" + currentY + \",\" + physX + \",\" + physY + \",\" + bounceCounter + \")\", 10);\n }", "title": "" }, { "docid": "5adc99a10c4330f075dcc0d7f9e60452", "score": "0.5907536", "text": "function delay(){\n setTimeout(update, Math.random() * interval);\n }", "title": "" }, { "docid": "475c5cfada98605207d35d81eed7aee7", "score": "0.5903243", "text": "function rem_delay(first, second) {\n setTimeout(function() {\n rem_select(first); //closes open tiles\n rem_select(second); //closes open tiles\n }, 1000);\n}", "title": "" }, { "docid": "3f367cd75c11aa995b0767e6e971d9e8", "score": "0.59010893", "text": "function pauseScript(ms) {var ms1 = getRndTime(ms); var aDate = new Date(); var crtDate = new Date(); do {crtDate = new Date();} while (crtDate - aDate < ms1);}", "title": "" }, { "docid": "0bec6f87bdef0b3016c69ab638727bf3", "score": "0.5894056", "text": "function godowna() {\r\n if (toopa.offsetTop < 460) {\r\n downa = setTimeout(function () {\r\n toopa.style.top = (toopa.offsetTop + x) + \"px\"\r\n godowna()\r\n }, 10)\r\n }\r\n}", "title": "" }, { "docid": "4ce449887c56c9a70ea945eb7873a48e", "score": "0.5869443", "text": "animate (clock) {}", "title": "" }, { "docid": "648524d5b9cc2f057e5e53d14a745bc1", "score": "0.58615714", "text": "function timing()\n{\n\tconsole.log(timer);\n\tif(timer > 0){\n\t\ttimer = timer - 20;\n\t}\n\telse{\n\t\tctx.clearRect(0,0,800,600);\n\t\tctxBg.clearRect(0,0,800,600);\n\t\tctxGeld.clearRect(0,0,800,600);\n\t\tdrawX = 0;\n\t\tctxEind.drawImage(eindImg,0,0,800,600,0,0,800,600);\n\t\tdrawText(\"Behaalde punten: \" + score, \"red\");//, \"orange\");\n\t\t// tijdOp == true;\n\t}\n}", "title": "" }, { "docid": "6531889f832ae4ac254d79acf3006295", "score": "0.5860658", "text": "function t1(el) {\n var e = el;\n var l = 0;\n function frame() {\n l++;\n //e.style.top = 15*Math.sin(l/15) + 15 + 'px';\n\t\te.style.left = 15*Math.sin(l/15) + 'px';\n if (l === 300) {\n clearInterval(id);\n }\n }\n var id = setInterval(frame, 10);\n}", "title": "" }, { "docid": "e94f54bcb2fa911695297ae29889eeef", "score": "0.5848231", "text": "function delay( then, seconds ) {\n // timer is declared higher up in order to access it later\n timer = new Timer( then, seconds * 1000 );\n }", "title": "" }, { "docid": "8a304fc2d4ec93c6cdac7c0703114e51", "score": "0.5836281", "text": "function updateMoves() {\n\tmoveContainer.textContent = moves;\n if (moves == 1) {\n\tstartTimer();\n\t}\n}", "title": "" }, { "docid": "dcedcef6e4f988d1fc9813825af080f9", "score": "0.5832968", "text": "function event_timer(){\n\t\t//calculating distance from target\n\t\tvar num_x = parseInt(bat.style.left);\n\t\tvar num_y = parseInt(bat.style.top);\n\t\tvar num_targX = num_batTargX;\n\t\tvar num_targY = num_batTargY;\n\t\tvar num_distX = num_targX - num_x;\n\t\tvar num_distY = num_targY - num_y;\n\t\t//IF IDLE (has ended)\n\t\tif((curr_action == \"_idle\" || curr_action == \"_idle_talking\") && num_batMoveCount <= 0){\n\t\t\tchangeEvent();\t\n\t\t}\n\t\t//WALKING (go to place)\n\t\tif(curr_action == \"_walking\" || curr_action == \"_walking_talking\"){\n\t\t\t//\n\t\t\tsetX(\"bat\", (num_x+num_distX*.07));\n\t\t\tsetY(\"bat\", (num_y+num_distY*.07));\n\t\t\t//if arrived (RESET)\n\t\t\tif(parseInt(bat.style.left) == num_targX || parseInt(bat.style.top) == num_targY || num_batMoveCount <= 0){\n\t\t\t\tchangeEvent();\n\t\t\t}\n\t\t}\n\t\t//deduct countdown to force a state reset\n\t\tnum_batMoveCount -= 1;\n\t}", "title": "" }, { "docid": "30a4bf670a36f57adf5753053e348ce1", "score": "0.58324087", "text": "function testScriptPauseAfterDelay() {\n setTimeout(testScriptPause, 300);\n }", "title": "" }, { "docid": "30d729c5a77a55d4646955bc5d9eb559", "score": "0.5821842", "text": "loop() {\n super.loop();\n let paddleBoxColor = super.Utils.blueColor;\n super.basketObject();\n super.paddleMove();\n super.createPaddleBox(paddleBoxColor);\n super.drawImageObject(clockObject, images[gameImage.CLOCK]);\n\n if (super.gameState.initialTime === 0 ) {\n\n sounds[gameSound.START].play();\n super.gameState.initialTime = new Date().getTime();\n }\n\n if (target.state === 'start'){\n\n if (super.gameState.initialTime > 0 && super.isOutsideBox(BOXGAP)){\n super.gameState.initialTime = 0;\n sounds[gameSound.START].pause();\n sounds[gameSound.START].currentTime = 0;\n paddleBoxColor = super.Utils.redColor;\n super.createPaddleBox(paddleBoxColor);\n }\n\n //Randomize initial wait time here\n if (super.gameState.initialTime > 0 && super.getElapsedTime() > jitterT) {\n sounds[gameSound.START].pause();\n sounds[gameSound.START].currentTime = 0;\n target.state = 'showTarget';\n }\n\n\n }\n\n\n\n // Add delay between showing the target (rat) and pizza (clock)\n if(target.state === 'showTarget') {\n if(target.pizzaTimeDelay === 0 ) {\n target.pizzaTimeDelay = new Date().getTime();\n }\n if(target.pizzaTimeDelay >0 && super.getElapsedTime(target.pizzaTimeDelay) > 0.2){\n target.state = 'showClock';\n target.showTime = new Date().getTime();\n }\n super.drawImageObject(target, images[gameImage.TARGET]);\n }\n\n\n\n\n if (target.state === 'showClock') {\n\n if (target.showTime > 0 && super.getElapsedTime(target.showTime) > 1) {\n\n target.state = 'done';\n sounds[gameSound.FAIL].play();\n }\n\n\n if (super.paddle.moved === 0 && super.paddle.positions.length > 5 && super.paddle.position.y - target.position.y <= 100) {\n\n sounds[gameSound.SWOOSH].play();\n super.paddle.moved = 1;\n\n }\n\n\n super.drawImageObject(target, images[gameImage.TARGET]);\n this.clockState();\n }\n\n\n if(target.state === 'showClock' || target.state === 'showTarget' ){\n this.collisionDetection();\n }\n\n\n if (target.state === 'done') {\n\n super.paddleAtZero( false);\n\n\n }\n\n this.showClock();\n this.drawImage(super.paddle, images[gameImage.PADDLE]);\n }", "title": "" }, { "docid": "ca972d7750bbe072e8565b648e75e124", "score": "0.5814671", "text": "function move(){\n pos--;\n rocketimage.style.top = pos + \"px\";\n if(pos==300){\n var fast = setInterval(move,5);\n clearInterval(y);}\n else if(pos==-200){\n clearInterval(fast);\n mytext();\n }\n\n \n \n\n \n \n \n\n }", "title": "" }, { "docid": "6df6af246cc317f8eabb90d76b2f9f6a", "score": "0.58087116", "text": "function setTimer(poses, container, timerEl, startTime) {\n container.style.backgroundImage = \"url('images/\" + poses[poseIndex].image + \"')\";\n timerEl.innerText = poses[poseIndex].timer - startTime;\n\n var i = startTime;\n intervalId = setInterval(function(){\n i++;\n timerEl.innerText = poses[poseIndex].timer - i;\n\n if (i==poses[poseIndex].timer) {\n clearInterval(intervalId);\n poseIndex++;\n if (poseIndex<poses.length) {\n setTimer(poses, container, timerEl, 0);\n } else {\n loadPage('templates/done.html', containerEl, function(){});\n };\n };\n }, 1000);\n}", "title": "" }, { "docid": "ebe2fe8a6cacfe0f339c89c85feea55f", "score": "0.57973945", "text": "function delay(ms) {\n // your code\n}", "title": "" }, { "docid": "d6e4d0a05c1e2f4cc7528a1c65886fb0", "score": "0.5796868", "text": "function captionmovement(speed)\n\t\t{\n\t\t\tcaptionScreen.position.x-=speed;\n\t\t}", "title": "" }, { "docid": "e84393cefd4c92c0935a521fa5a81c82", "score": "0.57859993", "text": "function startSleep() {\r\n isAnimating = true;\r\n clearInterval(tID);\r\n clearTimeout(sleepID);\r\n xpos = 0*xdiff;\r\n ypos = 7*ydiff;\r\n tID = setInterval ( () => {\r\n\t\tseal.style.backgroundPosition = `-${xpos}px -${ypos}px`; \r\n if (xpos == 6*xdiff) {\r\n rockRub();\r\n } else {\r\n xpos = xpos + xdiff;\r\n }\r\n }, interval); \r\n}", "title": "" }, { "docid": "f88eb5e1ca2bce839edf0a0456baa2ff", "score": "0.5785337", "text": "function scheduleNextTip() {\n me.nextTipTimeout = setTimeout(flipCard.bind(null, true), NEXT_TIP_INTERVAL);\n }", "title": "" }, { "docid": "e58331bdcfc7b3aeabdfa8e8bd2f0c10", "score": "0.57851005", "text": "move(timeStep) {}", "title": "" }, { "docid": "0207bdbcfdc1e118c91b3398f4dc8830", "score": "0.5781628", "text": "function step(){\n\tebc.tick(); \n\tebc_gui.update_elements(ebc);\n}", "title": "" }, { "docid": "52e6622a1602bff3c21b2f2ec8328e8b", "score": "0.57766676", "text": "function start(){ \n \n move()\n}", "title": "" }, { "docid": "efe2d22a3a0682b7a825daa918c42722", "score": "0.57648295", "text": "function frame() {\n\t if (pos == 350) {\n\t clearInterval(id);\n\t } else {\n\t pos++; \n\t elem.style.top = pos + 'px'; \n\t elem.style.left = pos + 'px'; \n\t }\n\t }", "title": "" }, { "docid": "ec445dd91d21837986c05d38192a7e1e", "score": "0.5758985", "text": "function startTimer() {\n transitionStep(orderedSteps()[0]);\n var circleTime = new circleTimer().start();\n}", "title": "" }, { "docid": "daaeaa84b58708ad030e547483008eea", "score": "0.5757461", "text": "function init_animation(p_start,p_end,t_length){\n\tp0 = p_start;\n\tp1 = p_end;\n\ttime_length = t_length;\n\ttime_start = clock.getElapsedTime();\n\ttime_end = time_start + time_length;\n\tanimate = true; // flag for animation\n\treturn;\n}", "title": "" }, { "docid": "369136ab5bed32694c19eba91111db7a", "score": "0.57566357", "text": "function setTime() {\n setTimeout(function(){\n nextRound();\n }, 5000); \n }", "title": "" }, { "docid": "b7b0dbc472f473e7bd63762a34a82bb1", "score": "0.575298", "text": "function gameLoop() {\n window.setTimeout(gameLoop, 20);\n drawScreen1();\n }", "title": "" }, { "docid": "8751a43d7a8245e0e3f9d5f74e08bccf", "score": "0.57414395", "text": "function drawGame(){\n takeScreen();\n changeSnakePosition();\n drawSnake();\n setTimeout(drawGame, 1000 /speed)\n}", "title": "" }, { "docid": "a7bb9e1901c2b2eaf9132725ccbba8af", "score": "0.5741235", "text": "move(duration = 0) {\n this.field.svg.selectAll('.field-performer').transition().duration(duration).ease(d3.easeLinear).attr('transform', p => {\n let {x, y} = this.position(p, this.state.set, this.state.count);\n return `translate(${this.field.xScale(x)},${this.field.yScale(y)})`;\n }).on('end', (d, i) => {\n if (i === 0) {\n panes.tools.metronome.playOnce();\n this.updateUI();\n\n if (this.playing && this.state.total < this.total) {\n this.nextCount();\n } else {\n // HACK: make updateUI automatically handle this\n if (duration) {\n this.playing = true;\n this.updateUI();\n }\n this.pause();\n }\n }\n });\n }", "title": "" }, { "docid": "361e150e672b64e7f0fb38147fcdd5f8", "score": "0.5735326", "text": "function delayAutoGallop(){\n if(autoPlay){\n clearTimeout(timeout);\n timeout = setTimeout( autoGallop, (autoPlaySpeed * 1.5) );\n }\n }", "title": "" }, { "docid": "63a7c3e1ef480ac2beefafc25fc2e9d8", "score": "0.57333136", "text": "function timer(){\n\n \n \n var timer = 100 - (int) (.227 *velocity/0.6818) ;\n var myVar = setTimeout(redraw, timer);\n \n \n\n}", "title": "" }, { "docid": "339a4d3a38ef28bd677a7a19d76b9a93", "score": "0.5729773", "text": "function AnimateAndCheck(){\r\n\t\tis_moving = true;\r\n\t\tanimateSlide(slide_to);\t\r\n\t\tcheckArrows();\r\n\t} // do stuff\t\t\t", "title": "" }, { "docid": "277c625a4384e7b7dac474e6ee379b4e", "score": "0.5728748", "text": "function start(){\n\tball = new Circle(20);\n\tball.setPosition(100, 100);\n\tadd(ball);\n\t\n\tsetTimer(draw, 20);\n /*Add a mouseClickMethod function with your pause function\n as an argument*/\n}", "title": "" }, { "docid": "c730c4f823d154963f34c39f2bcae2ac", "score": "0.57262266", "text": "animateEyesBlink() {\n const timeout = Math.floor(Math.random() * 6 + 4);\n let double = false;\n\n if (timeout === 9 && Math.random() > 0.5) {\n double = true;\n }\n\n setTimeout(() => {\n this.triggerInteractive('doBlink');\n if (double) {\n setTimeout(() => {\n this.triggerInteractive('doBlink');\n }, 180);\n }\n\n this.animateEyesBlink();\n }, timeout * 1000);\n }", "title": "" }, { "docid": "d1d908b2c3e8b453ef62b67587c274ac", "score": "0.5721976", "text": "function delayBeforeNextQuestion() {\n // delay 3 seconds\n delayTimer = setTimeout(renderQuestionAndAnswers, gameTimer.getDelayBetweenGames());\n $('.game-status').text('Wins: ' + gameStats.getWins() + ' Losses: ' + gameStats.getLosses());\n // turn off click events to the answer choices. If you don't do this,\n // rapidly clicking on answers during this delay runs up the score \n $('.game-choice').click(false);\n }", "title": "" }, { "docid": "79b6d5900c83f65c385f40c6f6705ccf", "score": "0.5719761", "text": "function handleLogic()\r\n{\r\n // setInterval(function(){\r\n // roar.play();\r\n // }, 5000)\r\n if(checkCollisions(player, paper)){\r\n paperShow = true;\r\n }\r\n if(paperShow){\r\n paper.width = 300;\r\n paper.height = 400;\r\n paper.y = 10;\r\n paper.x = 10;\r\n paperShown = true;\r\n hiddenPaper.src = \"paper12.png\"\r\n window.setTimeout(function(){\r\n paperShow = false;\r\n }, 2000);\r\n arrowShow1 = true;\r\n arrowShow = false;\r\n }\r\n if(paperShow == false){\r\n paper.width = 15;\r\n paper.height = 20;\r\n paper.x = 195;\r\n paper.y = 465;\r\n hiddenPaper.src = \"paper12.png\"\r\n }\r\n drink.onclick = function(){\r\n drink.x += 20;\r\n }\r\n player.HI()\r\n}", "title": "" }, { "docid": "d440ca0611e4a85679480b25e5c0e0af", "score": "0.571427", "text": "function loop() {\n moveShip();\n setTimeout(loop, 1000 / 60);\n }", "title": "" }, { "docid": "2c3036696d4628f8b8c7c8004e657253", "score": "0.57121354", "text": "function moveBoxNotes(distance, delay, time) {\n var currentForm = kony.application.getCurrentForm();\n try {\n currentForm.Note.FlxContainerInsertNote.animate(\n kony.ui.createAnimation(\n {\"100\": {\n \"top\":distance,\"stepConfig\":{\n \"timingFunction\":kony.anim.EASE\n }\n }\n }\n ),\n {\"delay\":delay,\"iterationCount\":1,\"fillMode\":\n kony.anim.FILL_MODE_FORWARDS,\"duration\":time},\n {\"animationEnd\" : function() {\n }\n }\n );\n } catch (e) {\n }\n}", "title": "" }, { "docid": "55b55ddf642fddb259a25b097e4c63c9", "score": "0.5710471", "text": "function animate() {\r\n console.log(\"Timeout\");\r\n Aufgabe5.crc2.clearRect(0, 0, 800, 600);\r\n Aufgabe5.crc2.putImageData(infoImg, 0, 0);\r\n for (let i = 0; i < fahrer.length; i++) {\r\n fahrer[i].update();\r\n }\r\n cloud[0].update1();\r\n cloud[1].update2();\r\n for (let i = 0; i < snow.length; i++) {\r\n snow[i].update();\r\n }\r\n /* for (let i = 0; i < skifahrer.length; i++) {\r\n skifahrer[i].x += 1;\r\n moveandDrawSkifahrer(skifahrer[i]);\r\n if (skifahrer[i].x > 800) {\r\n skifahrer[i].x = 0;\r\n }\r\n }\r\n \r\n */\r\n window.setTimeout(animate, 20);\r\n }", "title": "" }, { "docid": "147e5260f437e899bdbec9a460cefa31", "score": "0.57054657", "text": "function goupa() {\r\n clearTimeout(downa);\r\n dis1 = setTimeout(function () {\r\n document.getElementById(\"balls\").style.display = \"inline-block\";\r\n }, keyTime);\r\n if (toopa.offsetTop > 50) {\r\n setTimeout(function () {\r\n toopa.style.top = (toopa.offsetTop - t1) + \"px\"\r\n goupa()\r\n }, 10)\r\n } else {\r\n godowna()\r\n }\r\n}", "title": "" }, { "docid": "defd215eeb98e39d05463a975841e45d", "score": "0.5705435", "text": "function init_animation(p_start, p_end, t_length) {\n p0 = p_start;\n p1 = p_end;\n time_length = t_length;\n time_start = clock.getElapsedTime();\n time_end = time_start + time_length;\n animate = true; // flag for animation\n return;\n}", "title": "" }, { "docid": "1596170354c0bd25b2c2d2188d57d061", "score": "0.5704672", "text": "function init_animation(p_start,p_end,t_length){\n p0 = p_start;\n p1 = p_end;\n time_length = t_length;\n time_start = clock.getElapsedTime();\n time_end = time_start + time_length;\n animate = true; // flag for animation\n return;\n}", "title": "" }, { "docid": "95f7c813ffd835278f9dc56f7a00e99b", "score": "0.569768", "text": "function delayTimer() {\n setTimeout(appear, Math.random() * 2000);\n}", "title": "" }, { "docid": "7fbbb39f36051c3dd0a6172499066a85", "score": "0.56951815", "text": "function runpause(d){ d.value == 1 ? t = d3.timer(\n\tfunction() {\n\t for(let step=0; step<updates_per_frame; step++)\n\t {\n\t update();\n\t }\n\t draw();\n\t }\n\t,1) : t.stop(); }", "title": "" }, { "docid": "686dff3f238151d46d603a6cb3d020bf", "score": "0.5689416", "text": "function delay_for_main () {\r\n setTimeout(main, 1000);\r\n}", "title": "" }, { "docid": "1a6ee0da8d756d6f70de3f970bffe9cc", "score": "0.5686852", "text": "set delay(value) {}", "title": "" }, { "docid": "a924e3c8c83489da0aee75daff7906ce", "score": "0.5685224", "text": "function preptimer()\n\t\t{\n\t\t prepcount = prepcount - 1 ;\n\t\t if (prepcount <= 0)\n\t\t {\n\t\t clearInterval(prepcounter);\n\t\t PlaySound();\n\t\t document.getElementById(\"prep-timer\").innerHTML=\"\"; \n\t\t document.getElementById(\"talk-timer\").innerHTML= \"Talk time left: \" + talkcount + \" secs\"; \n\t\t\t\t\tvar talkcounter = setInterval(talktimer, 1000); //1000 will run it every 1 second\n\t\t\t\t\tfunction talktimer()\n\t\t\t\t\t{\n\t\t\t\t\t talkcount = talkcount - 1 ;\n\t\t\t\t\t if (talkcount <= 0)\n\t\t\t\t\t {\n\t\t\t\t\t clearInterval(talkcounter);\n\t\t\t\t\t PlaySound();\n\t\t\t\t\t document.getElementById('random-button').disabled = false;\n\t\t\t\t\t return;\n\t\t\t\t\t }\n\n\t\t\t\t\t document.getElementById(\"talk-timer\").innerHTML= \"Talk time left: \" + talkcount + \" secs\"; \n\t\t\t\t\t}\n\t\t return;\n\t\t }\n\n\t\t document.getElementById(\"prep-timer\").innerHTML=\"Prep time left: \" + prepcount + \" secs\"; \n\t\t}", "title": "" }, { "docid": "acc4ce8134ec6e00a098c1f8d2c7f4f6", "score": "0.5681612", "text": "function goToNext (){\n\tsetTimeout(pause, 3000); \n}", "title": "" }, { "docid": "1aec1cc4ce326f0fa9f1955071c4dd9e", "score": "0.5679174", "text": "function startRobot() {\n timer = setInterval(robotAct , 50);\n}", "title": "" }, { "docid": "dddb8f54f237c95268d7a78576fde439", "score": "0.56783915", "text": "function slideLogo(from, to) {\n if (from < to) {\n company.top = (from += 10);\n setTimeout('slideLogo(' + from + ',' + to + ')', 75);\n }\n else {initObjects();}\n}", "title": "" }, { "docid": "b2ae923687993828d2dc99d6d87dd2b1", "score": "0.5678311", "text": "function changePageDelay (miliseconds) {\n setTimeout(function() {\n changePage('#main');\n }, miliseconds);\n}", "title": "" }, { "docid": "2fd4055845110e3a4652e6f2e7fe5c15", "score": "0.5677917", "text": "function startGame()\n{\n cloneInsects();\n setTimer();\n}", "title": "" }, { "docid": "bfa4e12a583b2c044f318160dadb05a1", "score": "0.56716496", "text": "timeUnitNextQuestion(){\n setTimeout(function (){game.displayQuestion()}, 2500)\n\n }", "title": "" }, { "docid": "e0a07283f853f6335c44f7fa8cc8ce39", "score": "0.5671237", "text": "function commitMotionDuration(duration)//duration in milliseconds\n{\n setTimeout(function(){\n console.log(\"motion stopped\")\n pcmd = {};\n }, duration);\n}", "title": "" }, { "docid": "6513dc1622fdd85a044a399478fb567f", "score": "0.5652208", "text": "function setupAnimation(){\n animations[0] = getBasicPose();//pose the robot will start from\n sorted_keys = Object.keys(animations).sort(function(a,b){return a-b});\n start_time = Date.now();\n frameOneSeconds = sorted_keys[0];\n frameTwoSeconds = sorted_keys[1];\n isAnimating = true;\n counter = 2;\n}", "title": "" }, { "docid": "7249040604c5df017265611145d30888", "score": "0.56474686", "text": "function single() {\n // Tap the touch screen\n tapper.move(0);\n\n temporal.delay( 100, function() {\n // \"untap\"\n tapper.move(5);\n });\n }", "title": "" }, { "docid": "171b602a29e5ff5826e7437b2ae3b5d8", "score": "0.56457853", "text": "function onFrame() {\r\n setTime(Date.now() - start);\r\n loop();\r\n }", "title": "" }, { "docid": "a1bde7f328bb9a3e8a91513a46484ddd", "score": "0.5642413", "text": "function startGameTimer(){\n robot.moveMouseSmooth(183, 325);\n setTimeout (function(){\n if(i==0){\n checkMouseInLine();\n }else{\n console.log(i);\n i--;\n startGameTimer();\n }\n }, 1000);\n}", "title": "" }, { "docid": "19b8b1b0de4a611952980c34fd1c9884", "score": "0.56373173", "text": "function sliderRunAfterDelay() {\n timer = setTimeout(function () { sliderRun(); }, options.delay);\n }", "title": "" }, { "docid": "7fcfffaa789cc6d9f1c07acbf8d1c2eb", "score": "0.5633816", "text": "function frame() {\n if (pos == 0) {\n clearInterval(id);\n setTimeout(() => {\n pos = -100;\n }, 200);\n id = setInterval(frame, 12);\n } else {\n pos++;\n faxPaper.setAttribute('transform', 'translate(0, ' + pos + ')');\n }\n }", "title": "" }, { "docid": "ad906d76931ce648778f87401bd3f604", "score": "0.5631276", "text": "function wake() {\r\n isAnimating = true;\r\n clearInterval(tID);\r\n xpos = 0*xdiff;\r\n ypos = 10*ydiff;\r\n tID = setInterval ( () => {\r\n\t\tseal.style.backgroundPosition = `-${xpos}px -${ypos}px`; \r\n if (xpos == 6*xdiff) {\r\n xpos = xbase;\r\n ypos = ybase; \r\n isSleep = false; \r\n idle(); \r\n } else {\r\n xpos = xpos + xdiff;\r\n }\r\n }, interval); \r\n}", "title": "" }, { "docid": "644ccbfe238ee626917d2119aa0b366a", "score": "0.56307274", "text": "animate(time, ftime) { }", "title": "" }, { "docid": "a5128dbce3e6ee69faeb3e270f8452f8", "score": "0.5629817", "text": "function startPusheen(){\n var dlItems = donelist.children;\n if (dlItems.length == 0){\n\tmovePusheen = setInterval(move,100);\n\tconsole.log(\"start\");\n } else {}\n console.log(\"start\");\n}", "title": "" }, { "docid": "3dc371bfa2bcea0bcdf7ea80999087eb", "score": "0.56295174", "text": "function p1Defeat() {\n clearInterval(time);\n $('.result').text('PLAYER 2 WINS');\n $('.portraitp1').show();\n //p2 win animation\n playerTwo.css('width','260px');\n playerTwo.css('height','310px');\n playerTwo.css('animation','p2Win .8s steps(4)');\n playerTwo.css('background','url(img/player2/luffywin.png');\n //p1 lose animation\n playerOne.css('width','190px');\n playerOne.css('height','252px');\n playerOne.css('animation','p1Lose .8s steps(4)');\n playerOne.css('background','url(img/player1/sanjilose.png');\n }", "title": "" }, { "docid": "c3e04bc293491f4729779213dcc50603", "score": "0.56259114", "text": "function makePlayerOneMove() {\n $playerOneGameArea.slideDown();\n }", "title": "" } ]
f005d4bbc8ed4392e3ab3196ff311343
Creates an interval to wait until all the specified mods are loaded loaded
[ { "docid": "0857c556837eaf1baa4800b9e101d93f", "score": "0.7055201", "text": "function IntervalUntilAllLoaded(mods, func) {\n\tvar checkReady = setInterval(function () {\n\t\tvar allLoaded = true;\n\t\tfor (var i = 0; i < mods.length; i++) {\n\t\t\tif (!IsDefined(mods[i] + '.Loaded', 'true')) { allLoaded = false; break; }\n\t\t}\n\t\tif (allLoaded && IsDefined('TriggerCookies.Loaded', 'true')) {\n\t\t\tfunc();\n\t\t\tclearInterval(checkReady);\n\t\t}\n\t}, 100);\n}", "title": "" } ]
[ { "docid": "b62e373a66ebd1632f2c93d57c31078f", "score": "0.61045545", "text": "startModules() {\n let second = moment().second();\n if (second > 0 && second < 20) {\n this.startDataCollector();\n setTimeout(this.startTradingModules, 30 * 1000)\n } else {\n let timeout = Math.abs(60 - second + 5);\n setTimeout(this.startDataCollector, timeout * 1000);\n setTimeout(this.startTradingModules, (timeout + 30) * 1000);\n }\n }", "title": "" }, { "docid": "bd1f95398f68f6d2a3dc79905bf569b0", "score": "0.6082468", "text": "function waitForDependencies(callback) {\n const interval = setInterval(() => {\n const hasJQuery = typeof (window.$) !== \"undefined\";\n const hasSoundManager = typeof (window.soundManager) !== \"undefined\";\n const hasD20 = typeof (window.d20) !== \"undefined\";\n if (!hasJQuery || !hasSoundManager || !hasD20) {\n clearInterval(interval);\n callback();\n }\n }, 100);\n}", "title": "" }, { "docid": "11c2016f88d658daa2d2451c213ee064", "score": "0.5835681", "text": "async regulate() {\n\t\tconst t_delta = Date.now() - this.last_t;\n\t\tif (t_delta < this.min_duration) {\n\t\t\tawait sleep(this.min_duration - t_delta);\n\t\t}\n\t\tthis.last_t = Date.now();\n\t}", "title": "" }, { "docid": "1c01e043d6da4a7589b44aa632e70815", "score": "0.582664", "text": "function fireWaits(module) {\r\n\t\tmap(waits[module.id], function(fn) { fn(module); });\r\n\t\twaits[module.id] = [];\r\n\t}", "title": "" }, { "docid": "1911c79528f98a1dc68b789def29355a", "score": "0.58088815", "text": "function _doInterval() {\n _gcBlocksCache();\n\n if (_driver) {\n var pkg = system.DOWN.ARANGE;\n _driver.send(protocol.serialize(pkg));\n }\n}", "title": "" }, { "docid": "41d9c1dd49700f2fac437d97297b437f", "score": "0.5779704", "text": "function checkResources(){\n intervalId = setInterval(Main,300);\n }", "title": "" }, { "docid": "61d46f80fc9028b66d8a50eaf4a57ac4", "score": "0.57287025", "text": "static async waitForBuilds() {\n while (!allBuilt) {\n await sleep(10); // sleep 10ms and then check again\n }\n }", "title": "" }, { "docid": "6d2aa8b0f2e569de35f0499624b68023", "score": "0.57170904", "text": "function poll() {\n refresh().then(() => ( loaded = true, setTimeout(poll, 20000 * 60)))\n}", "title": "" }, { "docid": "299653f5631aa5397d12b4a544f52564", "score": "0.5689915", "text": "function delayForUpdatePeriod() {\n // Tick the virtual clock to trigger an update and resolve all Promises.\n Util.fakeEventLoop(updateTime);\n }", "title": "" }, { "docid": "d92019c7adb452de7151c48939596087", "score": "0.5626101", "text": "function waitLoaded() {\r\n if (wait == 10) {\r\n return;\r\n }\r\n if (isLoaded) {\r\n window.setTimeout(injectTabs, 5);\r\n return;\r\n }\r\n wait++;\r\n window.setTimeout(waitLoaded, 300);\r\n}", "title": "" }, { "docid": "3f7c07d5d75796affdd5a32a1c98cdf4", "score": "0.5603337", "text": "function wait_for_script_load(look_for, callback)\n {\n var interval = setInterval(function()\n {\n\n if (eval(\"typeof \" + look_for) != 'undefined')\n {\n\n clearInterval(interval);\n callback();\n }\n\n }, 50);\n }", "title": "" }, { "docid": "435821a765be739e8a0167a61d2393ef", "score": "0.56008255", "text": "async function updateInterval3(isInit = false) {\n\t// updating values\n\tconst Interval3 = require(__dirname + '/lib/Interval3.js');\n\tawait new Interval3().run(adapter, isInit);\n\t// @ts-ignore\n\ttimer3 = wait(adapter.config.interval3*3600000).then(() => updateInterval3()).catch(() => updateInterval3());\n}", "title": "" }, { "docid": "369927f8e31d3069011bee1878ab1fbe", "score": "0.5584849", "text": "function checkAllLoaded() {\n//\t\tsetTimeout(function() {\n\t\n\t\t// when all packages have finished loading execute their package functions\n\t\t// otherwise continue by loading the next package\n\t\tif (importList.length == 0) {\n\t\t\tloading = false;\n\t\t\tvar importedPkgs = packageGraph.toList();\n\t\t\tfor (var i = 0; i < importedPkgs.length; ++i) {\n\t\t\t\tvar curPkg = 'package_' + importedPkgs[i].replace('\\.', '_');\n\t\t\t\tif (window[curPkg]) {\n\t\t\t\t\twindow[curPkg].call(window);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tloadNextPkg();\n\t\t}\n\t\t\n//\t\t}, 3000);\n\t}", "title": "" }, { "docid": "2d9193c60a3717bfca1a6fcc97078213", "score": "0.55724716", "text": "async function periodicOnline(){\n while(true){\n await new Promise(resolve=> {\n setTimeout(() => { resolve(loadOnline());\n }, 5000);\n });\n }\n\n}", "title": "" }, { "docid": "fec127691e036785689a2ea515a60d89", "score": "0.5466188", "text": "async _loadPlugins() {\n\t\tfor (const mod of this.mods.filter(m => m.isEnabled && m.plugin)) {\n\t\t\ttry {\n\t\t\t\tawait mod.loadPlugin();\n\t\t\t} catch (e) {\n\t\t\t\tconsole.error(`Could not load plugin of mod '${mod.name}': `, e);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "395600317034d53ca2f92c941a2f0c65", "score": "0.5456798", "text": "start() {\n intervals.push(setInterval(checkPendingDonations, FIFTEEN_MINUTES));\n intervals.push(setInterval(checkPendingCommunities, FIFTEEN_MINUTES));\n intervals.push(setInterval(checkPendingCampaigns, FIFTEEN_MINUTES));\n intervals.push(setInterval(checkPendingMilestones, FIFTEEN_MINUTES));\n checkPendingDonations();\n checkPendingCommunities();\n checkPendingCampaigns();\n checkPendingMilestones();\n }", "title": "" }, { "docid": "b04c175d639db9404d013a18443deabe", "score": "0.54532766", "text": "async function updateInterval1(isInit = false) {\n\t// updating values\n\tconst Interval1 = require(__dirname + '/lib/Interval1.js');\n\tawait new Interval1().run(adapter, isInit);\n\t// @ts-ignore\n\ttimer1 = wait(adapter.config.interval1*1000).then(() => updateInterval1()).catch(() => updateInterval1());\n}", "title": "" }, { "docid": "f3d2d4652ed18afc621e3c88c0c5c5a8", "score": "0.54195017", "text": "function wait(){\n\t\ttimeWait = setInterval(function(){Waitt();},300);\n\t}", "title": "" }, { "docid": "acac0fec7b2cad434a92055960175ff4", "score": "0.54064286", "text": "function checkLoaded() {\n var waitInterval = config.waitSeconds * 1000,\n //It is possible to disable the wait interval by using waitSeconds of 0.\n expired = waitInterval && (context.startTime + waitInterval) < new Date().getTime(),\n noLoads = \"\", hasLoadedProp = false, stillLoading = false,\n cycleDeps = [],\n i, prop, err, manager, cycleManager, moduleDeps;\n\n //If there are items still in the paused queue processing wait.\n //This is particularly important in the sync case where each paused\n //item is processed right away but there may be more waiting.\n if (context.pausedCount > 0) {\n return undefined;\n }\n\n //Determine if priority loading is done. If so clear the priority. If\n //not, then do not check\n if (config.priorityWait) {\n if (isPriorityDone()) {\n //Call resume, since it could have\n //some waiting dependencies to trace.\n resume();\n } else {\n return undefined;\n }\n }\n\n //See if anything is still in flight.\n for (prop in loaded) {\n if (!(prop in empty)) {\n hasLoadedProp = true;\n if (!loaded[prop]) {\n if (expired) {\n noLoads += prop + \" \";\n } else {\n stillLoading = true;\n if (prop.indexOf('!') === -1) {\n //No reason to keep looking for unfinished\n //loading. If the only stillLoading is a\n //plugin resource though, keep going,\n //because it may be that a plugin resource\n //is waiting on a non-plugin cycle.\n cycleDeps = [];\n break;\n } else {\n moduleDeps = managerCallbacks[prop] && managerCallbacks[prop].moduleDeps;\n if (moduleDeps) {\n cycleDeps.push.apply(cycleDeps, moduleDeps);\n }\n }\n }\n }\n }\n }\n\n //Check for exit conditions.\n if (!hasLoadedProp && !context.waitCount) {\n //If the loaded object had no items, then the rest of\n //the work below does not need to be done.\n return undefined;\n }\n if (expired && noLoads) {\n //If wait time expired, throw error of unloaded modules.\n err = makeError(\"timeout\", \"Load timeout for modules: \" + noLoads);\n err.requireType = \"timeout\";\n err.requireModules = noLoads;\n err.contextName = context.contextName;\n return req.onError(err);\n }\n\n //If still loading but a plugin is waiting on a regular module cycle\n //break the cycle.\n if (stillLoading && cycleDeps.length) {\n for (i = 0; (manager = waiting[cycleDeps[i]]); i++) {\n if ((cycleManager = findCycle(manager, {}))) {\n forceExec(cycleManager, {});\n break;\n }\n }\n\n }\n\n //If still waiting on loads, and the waiting load is something\n //other than a plugin resource, or there are still outstanding\n //scripts, then just try back later.\n if (!expired && (stillLoading || context.scriptCount)) {\n //Something is still waiting to load. Wait for it, but only\n //if a timeout is not already in effect.\n if ((isBrowser || isWebWorker) && !checkLoadedTimeoutId) {\n checkLoadedTimeoutId = setTimeout(function () {\n checkLoadedTimeoutId = 0;\n checkLoaded();\n }, 50);\n }\n return undefined;\n }\n\n //If still have items in the waiting cue, but all modules have\n //been loaded, then it means there are some circular dependencies\n //that need to be broken.\n //However, as a waiting thing is fired, then it can add items to\n //the waiting cue, and those items should not be fired yet, so\n //make sure to redo the checkLoaded call after breaking a single\n //cycle, if nothing else loaded then this logic will pick it up\n //again.\n if (context.waitCount) {\n //Cycle through the waitAry, and call items in sequence.\n for (i = 0; (manager = waitAry[i]); i++) {\n forceExec(manager, {});\n }\n\n //If anything got placed in the paused queue, run it down.\n if (context.paused.length) {\n resume();\n }\n\n //Only allow this recursion to a certain depth. Only\n //triggered by errors in calling a module in which its\n //modules waiting on it cannot finish loading, or some circular\n //dependencies that then may add more dependencies.\n //The value of 5 is a bit arbitrary. Hopefully just one extra\n //pass, or two for the case of circular dependencies generating\n //more work that gets resolved in the sync node case.\n if (checkLoadedDepth < 5) {\n checkLoadedDepth += 1;\n checkLoaded();\n }\n }\n\n checkLoadedDepth = 0;\n\n //Check for DOM ready, and nothing is waiting across contexts.\n req.checkReadyState();\n\n return undefined;\n }", "title": "" }, { "docid": "ace5d914cfecfeec718d2de41b8b657b", "score": "0.538163", "text": "function startPollingTimes() {\n $(\".results\").each(function() {\n $(this).loadResults();\n });\n window.setInterval(startPollingTimes, 60000);\n }", "title": "" }, { "docid": "4dfba64573e40da78da86d091143be51", "score": "0.53799874", "text": "function LoadManager()\n{\n\tvar count = 0;\n\tvar object= null;\n\t\n\tthis.acquire = function() { count++; }\n\tthis.release = function() { count--; }\n\t\n//=====================================================================================\n/* Waits untill all files have been loaded. Then, calls 'init' on provided object\n*/\n\nthis.wait= function(obj) \n{\n\tobject = obj;\n\tsetTimeout(waitLoop, 10);\n}\n\n//=====================================================================================\n\nfunction waitLoop()\n{\n\tif (count != 0)\tsetTimeout(waitLoop, 100);\n\t\telse\t\t\t\tobject.init();\n\t\t\n}\n\n//=====================================================================================\n}", "title": "" }, { "docid": "a202cf06e50c19470a3e34d764045b62", "score": "0.53196263", "text": "function waitUntilLoaded() {\n let status;\n let tab;\n let tries = 0;\n const id = setInterval(function () {\n if (status === TabStatus.COMPLETE) {\n fetchCurrent(tab);\n clearInterval(id);\n }\n else if (tries > 20) {\n console.log('Gyazo request times out.');\n clearInterval(id);\n }\n chrome.tabs.query({ active: true, currentWindow: true }, function (result) {\n console.log(result ? 'DOM loaded' : 'waiting for DOM to load...');\n status = result[0].status;\n tab = result[0];\n });\n }, 400);\n}", "title": "" }, { "docid": "ec1df26898bc4db54ee14c1a6c47cd82", "score": "0.5314325", "text": "function initializeSubmodulesAndExecuteCallbacks(continueAuction) {\n var delayed = false; // initialize submodules only when undefined\n\n if (typeof initializedSubmodules === 'undefined') {\n initializedSubmodules = initSubmodules(submodules, __WEBPACK_IMPORTED_MODULE_5__src_adapterManager_js__[\"gdprDataHandler\"].getConsentData());\n\n if (initializedSubmodules.length) {\n // list of submodules that have callbacks that need to be executed\n var submodulesWithCallbacks = initializedSubmodules.filter(function (item) {\n return __WEBPACK_IMPORTED_MODULE_3__src_utils_js__[\"isFn\"](item.callback);\n });\n\n if (submodulesWithCallbacks.length) {\n if (continueAuction && auctionDelay > 0) {\n // delay auction until ids are available\n delayed = true;\n var continued = false;\n\n var continueCallback = function continueCallback() {\n if (!continued) {\n continued = true;\n continueAuction();\n }\n };\n\n __WEBPACK_IMPORTED_MODULE_3__src_utils_js__[\"logInfo\"](\"\".concat(MODULE_NAME, \" - auction delayed by \").concat(auctionDelay, \" at most to fetch ids\"));\n timeoutID = setTimeout(continueCallback, auctionDelay);\n processSubmoduleCallbacks(submodulesWithCallbacks, continueCallback);\n } else {\n // wait for auction complete before processing submodule callbacks\n __WEBPACK_IMPORTED_MODULE_2__src_events_js___default.a.on(__WEBPACK_IMPORTED_MODULE_6__src_constants_json___default.a.EVENTS.AUCTION_END, function auctionEndHandler() {\n __WEBPACK_IMPORTED_MODULE_2__src_events_js___default.a.off(__WEBPACK_IMPORTED_MODULE_6__src_constants_json___default.a.EVENTS.AUCTION_END, auctionEndHandler); // when syncDelay is zero, process callbacks now, otherwise delay process with a setTimeout\n\n if (syncDelay > 0) {\n setTimeout(function () {\n processSubmoduleCallbacks(submodulesWithCallbacks);\n }, syncDelay);\n } else {\n processSubmoduleCallbacks(submodulesWithCallbacks);\n }\n });\n }\n }\n }\n }\n\n if (continueAuction && !delayed) {\n continueAuction();\n }\n}", "title": "" }, { "docid": "774485fcef4e3ea98014fbe280b51712", "score": "0.53086406", "text": "async function updateInterval2(isInit = false) {\n\t// updating values\n\tconst Interval2 = require(__dirname + '/lib/Interval2.js');\n\tawait new Interval2().run(adapter, isInit);\n\t// @ts-ignore\n\ttimer2 = wait(adapter.config.interval2*60000).then(() => updateInterval2()).catch(() => updateInterval2());\n}", "title": "" }, { "docid": "d8938af9d7bd29c09e1636632e1fbf38", "score": "0.5296282", "text": "async function updateInterval4(isInit = false) {\n\t// updating values\n\tconst Interval4 = require(__dirname + '/lib/Interval4.js');\n\tawait new Interval4().run(adapter, isInit);\n\t// @ts-ignore\n\ttimer4 = wait(adapter.config.interval4*24*3600000).then(() => updateInterval4()).catch(() => updateInterval4());\n}", "title": "" }, { "docid": "9ad6e7c2c0cf8037d5dfd70099f0e5ca", "score": "0.52932554", "text": "start() {\n if (this._timeout) return;\n if (this.interval < 0) this.interval = 5 * 60 * 1000;\n\n const self = this;\n function endless() {\n self.load().then(() => {\n if (self._timeout) self._timeout = setTimeout(endless, self.interval);\n });\n }\n this._timeout = setTimeout(endless, this.interval);\n }", "title": "" }, { "docid": "a8e3143d3d04c5bf97ea1d472dcf312d", "score": "0.52778506", "text": "function wait(secs) {\n var t0 = new Date(), t1;\n do {\n CouchDB.request(\"GET\", \"/\");\n t1 = new Date();\n } while ((t1 - t0) < secs*1000);\n }", "title": "" }, { "docid": "88e398d6f6ba6c3138668578346adecf", "score": "0.5264311", "text": "function autoRefreshMyRequests(seconds) {\n //clear current interval\n clearInterval(allInterval);\n //set a new one\n allInterval = setInterval(function () {\n LoadAllRequest();\n }, seconds * 1000); // 60 * 1000 milsec\n\n}", "title": "" }, { "docid": "48d0848296510d09509527ee32344307", "score": "0.52588344", "text": "async function periodicChat(){\n while(true){\n await new Promise(resolve=> {\n setTimeout(() => { resolve(loadChat());\n }, 3000);\n });\n }\n\n}", "title": "" }, { "docid": "d3c8358a8b1f1b20fb3133a3ccc473f0", "score": "0.52586067", "text": "function readyCheck() {\r\n\tif($(\"movie_player\") && $(\"footer-container\") || $(\"ft\")) {\r\n\t\twindow.clearInterval(wait);\r\n\t\tmain();\r\n\t\t//checkChanged();\r\n\t}\r\n\ti++;\r\n\tif(i == 40) window.clearInterval(wait);\r\n\t\r\n}", "title": "" }, { "docid": "53688110158d7b56b54be8496c5bd076", "score": "0.524743", "text": "function waitLazy() {\n if (waitingLazy) {\n return;\n }\n waitingLazy = true;\n\n var lazyEls = document.querySelectorAll('.o_wait_lazy_js');\n for (var i = 0; i < lazyEls.length; i++) {\n var element = lazyEls[i];\n blockEvents.forEach(function (evType) {\n element.addEventListener(evType, blockFunction);\n });\n }\n}", "title": "" }, { "docid": "69a94fe9b0b13820d2cf2d6263e2c7e3", "score": "0.5245706", "text": "async function updateInterval0(isInit = false) {\n\t// updating values\n\tconst Interval0 = require(__dirname + '/lib/Interval0.js');\n\tawait new Interval0().run(adapter, isInit);\n\t// @ts-ignore\n\ttimer0 = wait(adapter.config.interval0*1000).then(() => updateInterval0()).catch(() => updateInterval0());\n}", "title": "" }, { "docid": "9da6f4c7d20a8c7564b5da9de6171467", "score": "0.5209504", "text": "function waitRemoveLoad(imported){\n localStorage.removeItem('storedMODULES');\n MODULES = JSON.parse(JSON.stringify(MODULESdefault));\n //load everything again, anew\n safeSetItems('storedMODULES', JSON.stringify(storedMODULES));\n ATrunning = true; //restart AT.\n }", "title": "" }, { "docid": "b19075b065fe2eb29b9072fa92ba17e7", "score": "0.5189641", "text": "function delayLoad(cb) {\n setTimeout(cb, 0);\n }", "title": "" }, { "docid": "d3c666592fc21cc6c82baacc1143e76c", "score": "0.51882136", "text": "function poller(callback) {\n var wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 3000;\n var multiplier = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n(function startPoller() {\n setTimeout(function () {\n callback.call(this, startPoller);\n }, wait);\n wait = wait * multiplier;\n })();\n}", "title": "" }, { "docid": "e55a9976061cb9a8fcb4f963d24e612f", "score": "0.51862234", "text": "function ic3cssWaitForAll(callback) {\n\n function timer() {\n\n var done = true;\n\n $.each(ic3allRequestedCss, function (key, item) {\n\n if (item == 0 /* still unloaded */) {\n done = false;\n return false;\n }\n\n });\n\n if (!done) {\n setTimeout(timer, 50);\n }\n else if (callback) {\n callback();\n }\n }\n\n setTimeout(timer, 0);\n}", "title": "" }, { "docid": "dc521409080074cf190338f8f480b667", "score": "0.5183432", "text": "function wait(ms){\n var start = new Date().getTime();\n var end = start;\n while(end < start + ms) {\n end = new Date().getTime();\n }\n }", "title": "" }, { "docid": "b1e4284c61f8707a0aacbda0124eb9a8", "score": "0.51726747", "text": "function poller () {\n\t\t\t// if the script loaded\n\t\t\tif (el.onload && readyStates[el.readyState]) {\n\t\t\t\tprocess({});\n\t\t\t}\n\t\t\t// if neither process or fail as run and our deadline is in the past\n\t\t\telse if (el.onload && deadline < new Date()) {\n\t\t\t\tfail();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tsetTimeout(poller, 10);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "340d1cd2de7b12f50b0fa3485ef49bbc", "score": "0.5172483", "text": "function GM_wait() {\r\n if (typeof unsafeWindow.jQuery == 'undefined') {\r\n window.setTimeout(GM_wait, 100);\r\n } else {\r\n $ = unsafeWindow.jQuery.noConflict(true);\r\n tagManager();\r\n }\r\n }", "title": "" }, { "docid": "e54cbae958de1afe199b95f3be3981cd", "score": "0.5166391", "text": "function runTimerExtensions() {\n\t\tdb.servers.find({\"extensions\": {$not: {$size: 0}}}, (err, serverDocuments) => {\n\t\t\tif(err) {\n\t\t\t\twinston.error(\"Failed to find server data to start timer extensions\", err);\n\t\t\t} else {\n\t\t\t\tfor(var i=0; i<serverDocuments.length; i++) {\n\t\t\t\t\tvar svr = bot.guilds.get(serverDocuments[i]._id);\n\t\t\t\t\tif(svr) {\n\t\t\t\t\t\tfor(var j=0; j<serverDocuments[i].extensions.length; j++) {\n\t\t\t\t\t\t\tif(serverDocuments[i].extensions[j].type==\"timer\") {\n\t\t\t\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\t\t\t\trunTimerExtension(svr, serverDocuments[i].extensions[j]);\n\t\t\t\t\t\t\t\t}, (extensionDocument.last_run + extensionDocument.interval) - Date.now());\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\n\t\tfunction runTimerExtension(svr, extensionDocument) {\n\t\t\twinston.info(\"Running timer extension '\" + extensionDocument.name + \"' in server '\" + svr.name + \"'\", {svrid: svr.id, extid: extensionDocument._id});\n\t\t\tfor(var i=0; i<extensionDocument.enabled_channel_ids.length; i++) {\n\t\t\t\tvar ch = svr.channels.get(extensionDocument.enabled_channel_ids[i]);\n\t\t\t\tif(ch) {\n\t\t\t\t\trunExtension(bot, db, winston, svr, serverDocument, ch, extensionDocument);\n\t\t\t\t}\n\t\t\t}\n\t\t\tsetTimeout(() => {\n\t\t\t\trunTimerExtension(svr, extensionDocument);\n\t\t\t}, extensionDocument.interval);\n\t\t}\n\t}", "title": "" }, { "docid": "88f459d396eb4d0c6b5e6d49e61fc2f0", "score": "0.51570994", "text": "function moduleSelect(){\n\t\tvar module = $(\"#md\").val();\n\t\tif(module == \"a\"){\n\t\t\ttimeMotorA = setInterval(function(){MotorA();},150);\n\t\t}\n\t\telse if(module == \"b\"){\n\t\t\ttimeMotorB = setInterval(function(){MotorB();},150);\n\t\t}\n\t\telse if(module == \"c\"){\n\t\t\ttimeServo = setInterval(function(){Servo();},150);\n\t\t}\n\t}", "title": "" }, { "docid": "8a4b9cdb3653456c612104890e1d0d4f", "score": "0.5153088", "text": "async waitForLoad(type, context = null){\n\t\tlet timeout;\n\t\tlet interval;\n\t\tconst startTime = Date.now();\n\t\tawait Promise.race([\n\t\t\tnew Promise(resolve => {\n\t\t\t\ttimeout = setTimeout(resolve, 10000);\n\t\t\t}),\n\t\t\tnew Promise(resolve => {\n\t\t\t\tconst loaded = this.loadPredicates[type];\n\t\t\t\tif (loaded(context)) {\n\t\t\t\t\tresolve();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tinterval = setInterval(() => loaded(context) && resolve(), 100);\n\t\t\t})\n\t\t]);\n\t\tconsole.log(`waited for ${type} load: ${Date.now() - startTime}ms`);\n\t\tclearTimeout(timeout);\n\t\tclearInterval(interval);\n\t}", "title": "" }, { "docid": "8930279f7fef04f6a105526b257e2ce5", "score": "0.5149881", "text": "function startPoll(toPoll){\r\n\t$.each(toPoll, function(index, value){\r\n\t\tinterval = this.dataset.interval;\r\n\t\tcommand = this.dataset.state;\r\n\t\tcommand = \"do.php?name=\" + command\r\n\t\tconsole.log(\"==========> Polling \"+interval+\"ms : \"+ command)\r\n\t\tpool(command,interval);\r\n\t});\r\n}", "title": "" }, { "docid": "f34c839d227dab1be3478111c7ab757d", "score": "0.5146286", "text": "function IntervalUntilLoaded(func) {\n\tvar checkReady = setInterval(function () {\n\t\tif (IsDefined('TriggerCookies.Loaded', 'true')) {\n\t\t\tfunc();\n\t\t\tclearInterval(checkReady);\n\t\t}\n\t}, 100);\n}", "title": "" }, { "docid": "f34c839d227dab1be3478111c7ab757d", "score": "0.5146286", "text": "function IntervalUntilLoaded(func) {\n\tvar checkReady = setInterval(function () {\n\t\tif (IsDefined('TriggerCookies.Loaded', 'true')) {\n\t\t\tfunc();\n\t\t\tclearInterval(checkReady);\n\t\t}\n\t}, 100);\n}", "title": "" }, { "docid": "a302178ef91370af2202142a8cbabbc2", "score": "0.5142626", "text": "function checkForUpdates() {\n console.log('Run plugins autoupdate')\n loadPlugins()\n .then(\n flow(\n filter(property('isUpdateAvailable')),\n map((plugin) => MainRpc.pluginClient.update(plugin.name))\n )\n )\n // eslint-disable-next-line promise/no-nesting\n .then((promises) => Promise.all(promises).then(() => promises.length))\n .then((updatedPlugins) => {\n console.log(updatedPlugins > 0 ? `${updatedPlugins} plugins are updated` : 'All plugins are up to date')\n })\n\n // Run autoupdate every 12 hours\n setTimeout(checkForUpdates, 12 * 60 * 60 * 1000)\n}", "title": "" }, { "docid": "51680dd23ead0de6d586913e5b3030ee", "score": "0.5138206", "text": "function wait(iMSec)\n{\n var dNow = new Date();\n while(1)\n {\n mill = new Date();\n diff = mill - dNow;\n if(diff > iMSec)\n break;\n }\n}", "title": "" }, { "docid": "69819faceab3fec321941888126e93e6", "score": "0.51367265", "text": "function loader_loops_healing_loop(args)\n{\n let interval = (args.interval ? args.interval : 1000);\n\n let id = setInterval(function() {\n \n if (character.mp < character.max_mp - 100) {\n if (!is_on_cooldown('regen_mp')) {\n use_skill('regen_mp');\n return;\n }\n } else if ((character.mp < character.max_mp - 400)) {\n use_skill('use_mp');\n return;\n }\n \n if (character.hp > character.max_hp - 450) {\n if (!is_on_cooldown('regen_hp')) {\n use_skill('regen_hp');\n return;\n }\n } else if ((character.hp < character.max_hp - 500)) {\n use_skill('use_hp');\n return;\n }\n\n }, interval);\n Loader.appendIntervalId(id);\n}", "title": "" }, { "docid": "e819d5f3e131213713b8a5d096d11326", "score": "0.5132495", "text": "function loadAllVideos(callbackFunction) {\n loadAllInterval = setInterval( function() {\n var feedlist = find_FeedList();\n pageCount1 = feedlist.length;\n\n var loadContainer = searchAllChildrenFor(document, \"class\", \"load-more-button\", true);\n\n if (loadContainer!= null && loadContainer.className.indexOf(\"loading\") != -1) {\n //currently loading\n var a = 1;\n } else if (pageCount1 == prevPage) {\n //done loading\n window.clearInterval(loadAllInterval);\n document.body.style.cursor = \"default\";\n\n alert(\"Subscriptions fully loaded.\");\n\n //Finished, invoke callback\n if(typeof callbackFunction !== 'undefined') {\n callbackFunction();\n }\n } else {\n //not loading\n prevPage = feedlist.length;\n if(loadContainer != null){\n loadContainer.firstElementChild.click();\n }\n }\n });\n}", "title": "" }, { "docid": "cede7beaf3865a93bcb3e0e2c700fdad", "score": "0.5121618", "text": "function waitTillLoad(selector, timeout = 60000, updateSpeed = 100) {\n return _waitTillLoad(() => document.querySelector(selector), timeout, updateSpeed);\n }", "title": "" }, { "docid": "d7386da7290fa986f5b57de9f2a68a36", "score": "0.5116619", "text": "function loadLamps(cb) {\n td.list(function(err, list){\n lamps = list;\n startTimers(function() {\n cb();\n });\n });\n }", "title": "" }, { "docid": "929a5448ff1bdbd42ef4e5d8dab7c275", "score": "0.5106389", "text": "waitOnLoading() {\n\t\treturn new Promise((resolve) => {\n\t\t\tif (this.isComponentLoaded == true)\n\t\t\t\tresolve();\n\t\t\telse\n\t\t\t\tthis.addEventListener('component-loaded', resolve);\n\t\t});\n\t}", "title": "" }, { "docid": "929a5448ff1bdbd42ef4e5d8dab7c275", "score": "0.5106389", "text": "waitOnLoading() {\n\t\treturn new Promise((resolve) => {\n\t\t\tif (this.isComponentLoaded == true)\n\t\t\t\tresolve();\n\t\t\telse\n\t\t\t\tthis.addEventListener('component-loaded', resolve);\n\t\t});\n\t}", "title": "" }, { "docid": "929a5448ff1bdbd42ef4e5d8dab7c275", "score": "0.5106389", "text": "waitOnLoading() {\n\t\treturn new Promise((resolve) => {\n\t\t\tif (this.isComponentLoaded == true)\n\t\t\t\tresolve();\n\t\t\telse\n\t\t\t\tthis.addEventListener('component-loaded', resolve);\n\t\t});\n\t}", "title": "" }, { "docid": "6b5eea546d46f09e111d8deea2c47118", "score": "0.5104032", "text": "wait(onPoll, interval = 2) {\n const millisecInterval = interval * 1000;\n\n return new Promise(resolve => {\n const interval = setInterval(() => {\n if (!this.isPending()) {\n resolve(this);\n return clearInterval(interval);\n }\n this.refresh().then(() => {\n if (onPoll) {\n onPoll(this);\n }\n });\n }, millisecInterval);\n });\n }", "title": "" }, { "docid": "b816fca0d6a7aac551dfd3d012a5b886", "score": "0.508497", "text": "function content_delay (spec) {\n this.delayed_load = spec;\n}", "title": "" }, { "docid": "b0a20e64f0c0f8b505a8c18b71571891", "score": "0.50727946", "text": "function poller () {\n\t\t\t// if the script loaded\n\t\t\tif (!completed) {\n\t\t\t\t// if neither process or fail as run and our deadline is in the past\n\t\t\t\tif (deadline < new Date()) {\n\t\t\t\t\tfailure();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tsetTimeout(poller, 10);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "0abacfdcd7eba7b6722ce43f8eff78e1", "score": "0.50701815", "text": "function waitStart(){\r\n\tif (kh && kh.createInstance && cc && cc.director && cc.director._runningScene && cc.director._runningScene.isRaid) {\r\n\t\tvar conf = kh.createInstance(\"playerGameConfig\");\r\n\t\tif (conf.BATTLE_SPEED_SETTINGS.quick !== speedUpAnimationBy &&\r\n (!playSafe || (!cc.director._runningScene.isRaid() || cc.director._runningScene.getQuestType() === \"event_union_demon_raid\"))\r\n ){\r\n\t\t\tconf.BATTLE_SPEED_SETTINGS.quick = speedUpAnimationBy;\r\n\t\t\tsetTimeout(reload,5000);\r\n\t\t}\r\n\t} else {\r\n\t\tsetTimeout(waitStart,500);\r\n\t}\r\n}", "title": "" }, { "docid": "24ea9297e0bc925363438ebba48b3d5c", "score": "0.50663596", "text": "function wait(ms){\n var start = new Date().getTime();\n var end = start;\n while(end < start + ms) {\n end = new Date().getTime();\n }\n}", "title": "" }, { "docid": "e94afd7b18887f7d81fc731dfac9fbba", "score": "0.50654", "text": "function watchImportsLoad(callback, doc) {\n var imports = doc.querySelectorAll(IMPORT_SELECTOR);\n // only non-nested imports\n imports = Array.prototype.slice.call(imports).filter(function(n) {\n return !n.matches('import-content ' + IMPORT_SELECTOR);\n });\n var parsedCount = 0, importCount = imports.length, newImports = [], errorImports = [];\n function checkDone() {\n if (parsedCount == importCount && callback) {\n // If there is a script with src, wait for its load. Use a RAF which\n // will trigger after that script is done. Handles the case of deferred/async\n // scripts.\n // TODO(valdrin) verify if works with slow resources.\n var scripts = doc.querySelectorAll(IMPORT_SELECTOR + ' script[src]');\n if (scripts.length) {\n window.requestAnimationFrame(function() {\n callback({\n allImports: imports,\n loadedImports: newImports,\n errorImports: errorImports\n });\n });\n } else {\n callback({\n allImports: imports,\n loadedImports: newImports,\n errorImports: errorImports\n });\n }\n }\n }\n function loadedImport(e) {\n markTargetLoaded(e);\n newImports.push(this);\n parsedCount++;\n checkDone();\n }\n function errorLoadingImport(e) {\n errorImports.push(this);\n parsedCount++;\n checkDone();\n }\n if (importCount) {\n for (var i=0, imp; i<importCount && (imp=imports[i]); i++) {\n if (isImportLoaded(imp)) {\n newImports.push(this);\n parsedCount++;\n checkDone();\n } else {\n imp.addEventListener('load', loadedImport);\n imp.addEventListener('error', errorLoadingImport);\n }\n }\n } else {\n checkDone();\n }\n}", "title": "" }, { "docid": "078bd225e2d52046dbf3fde85b022ab4", "score": "0.5062705", "text": "function wait () {\n\t\tif (document.readyState !== 'complete') return setTimeout(wait, 1000);\n\t\t/**\n \t\t * DOMTools own module hook.\n \t\t * Module source: https://bloodborne.fandom.com/wiki/MediaWiki:DOMTools.js\n \t\t */\n \tmw.hook('DOMTools').add(ready);\n\t}", "title": "" }, { "docid": "8147e608949fbe7885d3e5d1b2168c2a", "score": "0.5054141", "text": "function load_stats(){\n $(\"#stats\").load(stats_url);\n setInterval(function()\n {\n $(\"#stats\").load(stats_url);\n }, 100);\n\n}", "title": "" }, { "docid": "0cf72d6a9d22eedaaf33ee8451db2cea", "score": "0.50536156", "text": "function setTimeToLoad(ms){\n\n\tvar timeSinceLastLoad = new Date().getTime() - timeOfLastLoad;\n\n\ttimeOfLastLoad -= (loadFrequence - timeSinceLastLoad);\n\ttimeOfLastLoad += ms;\n\n}", "title": "" }, { "docid": "3b037230069ed8633f2fd79ec07b7052", "score": "0.50528336", "text": "function toggleInterval() {\r\n let loaderList = document.querySelectorAll('.loader');\r\n if (!intervalOn) {\r\n interval = setInterval(() => {\r\n if (!mainLoaderHidden) {\r\n crazyMode(mainLoader);\r\n } else if (miniLoadersCreated) {\r\n loaderList.forEach(loader => {\r\n crazyMode(loader)\r\n })\r\n }\r\n }, 2000);\r\n crazyModeOn = true;\r\n } else {\r\n if (!mainLoaderHidden) {\r\n clearInterval(interval)\r\n } else if (miniLoadersCreated) {\r\n clearInterval(interval)\r\n }\r\n crazyModeOn = false;\r\n }\r\n\r\n intervalOn = !intervalOn;\r\n}", "title": "" }, { "docid": "554ff86a34f8bf8772cba3639d56a99a", "score": "0.5051668", "text": "function checkLoaded() {\n var waitInterval = config.waitSeconds * 1000,\n //It is possible to disable the wait interval by using waitSeconds of 0.\n expired = waitInterval && (context.startTime + waitInterval) < new Date().getTime(),\n noLoads = \"\", hasLoadedProp = false, stillLoading = false, prop,\n err, manager;\n\n //If there are items still in the paused queue processing wait.\n //This is particularly important in the sync case where each paused\n //item is processed right away but there may be more waiting.\n if (context.pausedCount > 0) {\n return undefined;\n }\n\n //Determine if priority loading is done. If so clear the priority. If\n //not, then do not check\n if (config.priorityWait) {\n if (isPriorityDone()) {\n //Call resume, since it could have\n //some waiting dependencies to trace.\n resume();\n } else {\n return undefined;\n }\n }\n\n //See if anything is still in flight.\n for (prop in loaded) {\n if (!(prop in empty)) {\n hasLoadedProp = true;\n if (!loaded[prop]) {\n if (expired) {\n noLoads += prop + \" \";\n } else {\n stillLoading = true;\n break;\n }\n }\n }\n }\n\n //Check for exit conditions.\n if (!hasLoadedProp && !context.waitCount) {\n //If the loaded object had no items, then the rest of\n //the work below does not need to be done.\n return undefined;\n }\n if (expired && noLoads) {\n //If wait time expired, throw error of unloaded modules.\n err = new Error(\"require.js load timeout for modules: \" + noLoads);\n err.requireType = \"timeout\";\n err.requireModules = noLoads;\n return req.onError(err);\n }\n if (stillLoading || context.scriptCount) {\n //Something is still waiting to load. Wait for it.\n if (isBrowser || isWebWorker) {\n setTimeout(checkLoaded, 50);\n }\n return undefined;\n }\n\n //If still have items in the waiting cue, but all modules have\n //been loaded, then it means there are some circular dependencies\n //that need to be broken.\n //However, as a waiting thing is fired, then it can add items to\n //the waiting cue, and those items should not be fired yet, so\n //make sure to redo the checkLoaded call after breaking a single\n //cycle, if nothing else loaded then this logic will pick it up\n //again.\n if (context.waitCount) {\n //Cycle through the waitAry, and call items in sequence.\n for (i = 0; (manager = waitAry[i]); i++) {\n forceExec(manager, {});\n }\n\n checkLoaded();\n return undefined;\n }\n\n //Check for DOM ready, and nothing is waiting across contexts.\n req.checkReadyState();\n\n return undefined;\n }", "title": "" }, { "docid": "785ff52c50a0955f5a4ab901b6f283b2", "score": "0.5049777", "text": "function whenAvailable(name, callback) {\n var interval = 10; // ms\n window.setTimeout(function () {\n if (window[name]) {\n callback(window[name]);\n } else {\n whenAvailable(name, callback);\n }\n }, interval);\n}", "title": "" }, { "docid": "7334320161cdfb00fd2fe8d132b38c8e", "score": "0.50300086", "text": "function timeoutLazyElements() {\n if (waitingMode > 1) {\n waitingMode = 1;\n checkLazyElements();\n setTimeout(timeoutLazyElements, options.throttle);\n } else {\n waitingMode = 0;\n }\n }", "title": "" }, { "docid": "21a50a4fdd8f57002d1eccf630bbad09", "score": "0.501869", "text": "async function init() {\n const localConfig = await browser.storage.local.get(CONFIGNAME);\n schlepp(localConfig[CONFIGNAME]);\n INITIALISED = true;\n for (const waiter of WAITERS) {\n waiter();\n }\n}", "title": "" }, { "docid": "ec5a443ba99197eb5979bac4b61ef72e", "score": "0.50177383", "text": "runGames(){\r\n setInterval( () =>{\r\n for(var lobbyId of Object.keys(this.lobbies)){\r\n const lobby = this.lobbies[lobbyId]\r\n const game = lobby.game\r\n if(game){\r\n game.runGame()\r\n }\r\n }\r\n }, REFRESH_INTERVAL)\r\n }", "title": "" }, { "docid": "a5dff046ede752454adc32e4e1a76ff8", "score": "0.5014826", "text": "async function loop() {\n const time = new Date();\n let today = time.getHours() + \":\" + time.getMinutes() + \":\" + time.getSeconds()\n let { LastBump, NextBump } = require(\"./time.json\")\n //SEEING IF WE NEED TO BUMP\n if(NextBump <= today){\n BumpChannel.send(\"!d bump\")\n let NextBump = (`${time.getHours()+2}:${time.getMinutes() + 2}:${time.getSeconds()}`)\n let DataForJson = {\n \"LastBump\": today,\n \"NextBump\": NextBump\n }\n const JsonData = JSON.stringify(DataForJson)\n fs.writeFileSync(\"./time.json\", JsonData)\n timetillbump = 122 * 60\n }\n else{\n //HERE WE SEE HOW MUCH TIME WE NEED TO WAIT UNTILL WE CAN BUMP AGAIN\n //NextBump TO SECONDS\n var p = NextBump.split(':'),\n s = 0, m = 1;\n \n while (p.length > 0) {\n s += m * parseInt(p.pop(), 10);\n m *= 60;\n }\n let nextbump_s = s\n //today TO SECONDS\n var p = today.split(':'),\n s = 0, m = 1;\n \n while (p.length > 0) {\n s += m * parseInt(p.pop(), 10);\n m *= 60;\n }\n let today_s = s\n timetillbump = nextbump_s - today_s\n } \n }", "title": "" }, { "docid": "4f6c4411c17cba23e8aa70863fc73cde", "score": "0.5005834", "text": "async function loadMilGears () {\n let count = 0;\n\n await gearData.forEach(gear => {\n upgradeDebugger(gear);\n gears[count] = new Equip(gear);\n count++;\n });\n\n return `${count} military upgrade available in WTS...`\n}", "title": "" }, { "docid": "cdc91d3f5ff6c0f982f8d55fcd882121", "score": "0.50046325", "text": "function GM_wait() \r\n {\r\n if(typeof unsafeWindow.jQuery == 'undefined') \r\n\t\t{ \r\n\t\t\twindow.setTimeout(GM_wait,100); \r\n\t\t}\r\n else \r\n { \r\n $ = unsafeWindow.jQuery; \r\n\t\t\tinitMassModeration(); \r\n }\r\n }", "title": "" }, { "docid": "0a8a62948c42720ec2fdfde87b1992e3", "score": "0.5002752", "text": "function wait(ms) {\n\t\tvar start = new Date().getTime();\n\t\tvar end = start;\n\t\twhile(end < start + ms) {\n\t\t\tend = new Date().getTime(); \n\t\t}\n\t}", "title": "" }, { "docid": "db62eae2d3e110f2e4889ecf25e05c50", "score": "0.49965665", "text": "_fetchSlidesTimeout() {\n this.slides_timeout = setInterval(() => {\n this.props.fetchSlides(this.props.url)\n }, 10 * 60 * 1000)\n }", "title": "" }, { "docid": "07eb313f88bb5935e78076925a373da6", "score": "0.49965206", "text": "function sleep(secs) {\n var waitUntil = new Date().getTime() + secs * 1000;\n while(new Date().getTime() < waitUntil) { }\n }", "title": "" }, { "docid": "9946e2bcd1f8ceb56d7f676ed6260fd5", "score": "0.49888027", "text": "function wait(ms){\n var start = new Date().getTime();\n var end = start;\n while(end < start + ms) {\n end = new Date().getTime();\n }\n}", "title": "" }, { "docid": "498f0cd59e6f9017a79ed097153ccef8", "score": "0.49833292", "text": "function GM_wait() {\n\t\tif (typeof unsafeWindow.jQuery == 'undefined' && jqcounter < 10) {\n\t\t\tjqcounter++;\n\t\t\tif (jqcounter == 5) { // 1/2 second, must be some error, try to load our own jquery\n\t\t\t\tvar GM_Head = document.getElementsByTagName('head')[0] || document.documentElement,\n\t\t\t\t\tGM_JQ = document.createElement('script');\n\n\t\t\t\tGM_JQ.src = 'http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js';\n\t\t\t\tGM_JQ.type = 'text/javascript';\n\t\t\t\tGM_JQ.async = true;\n\n\t\t\t\tGM_Head.insertBefore(GM_JQ, GM_Head.firstChild);\n\t\t\t}\n\t\t\twindow.setTimeout(GM_wait, 100);\n\t\t} else {\n\t\t\t$ = unsafeWindow.jQuery;\n\t\t\t$T = unsafeWindow.Tipped;\n\t\t\tif (jqcounter>=0) {\n\t\t\t\tjqcounter = -1000; // prevent running main twice due to setTimeout effect\n\t\t\t\tmain();\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "e769e4b22b1499fdcba5ca135a5a5ede", "score": "0.4981937", "text": "function intervalFunct() {\n // reset interval\n interval = 50;\n if (activeWidgets) {\n for (const widget of activeWidgets) {\n widget.update();\n }\n }\n // recursive!!\n lastTimeoutID = setTimeout(intervalFunct, interval);\n}", "title": "" }, { "docid": "f54c24669555c4629dd46baec2be07ca", "score": "0.4981874", "text": "function componentsLoad( $component_links )\n\t{\t\t\n\t\t// list of all component script files\n\t\tvar component_scripts = getComponentScripts( $component_links );\t\n\t\t\t\n\t\tif ( component_scripts.length )\n\t\t{\t\t\t\n\t\t\tfor ( var i = 0; i < component_scripts.length; i++ )\n\t\t\t{\n\t\t\t\tvar load_script = true;\n\t\t\t\tvar wait_for_script = true;\n\t\t\t\t\n\t\t\t\t// check if we loaded this script before\n\t\t\t\tfor ( var j = 0; j < _component_scripts_loaded.length; j++ )\n\t\t\t\t{\n\t\t\t\t\tif ( component_scripts[i] === _component_scripts_loaded[j] )\n\t\t\t\t\t{\n\t\t\t\t\t\tload_script = false;\n\t\t\t\t\t\twait_for_script = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// check if the script is loading\n\t\t\t\tfor ( var j = 0; j < _component_scripts_loading.length; j++ )\n\t\t\t\t{\n\t\t\t\t\tif ( component_scripts[i] === _component_scripts_loading[j] )\n\t\t\t\t\t{\n\t\t\t\t\t\tload_script = false;\n\t\t\t\t\t\twait_for_script = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// load file and add it to the waiting list\n\t\t\t\tif ( load_script )\n\t\t\t\t{\t\t\t\t\t\t\t\n\t\t\t\t\tvar script_add_to_waiting = true;\n\t\t\t\t\t\n\t\t\t\t\t_component_scripts_loading.push( component_scripts[i] );\n\t\t\t\t\t\n\t\t\t\t\tfor ( var j = 0; j < _component_scripts_waiting.length; j++ )\n\t\t\t\t\t{\t\t\t\t\t\n\t\t\t\t\t\tif ( component_scripts[i] === _component_scripts_waiting[j].script )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tscript_add_to_waiting = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif ( script_add_to_waiting )\n\t\t\t\t\t{\t\t\t\t\n\t\t\t\t\t\t_component_scripts_waiting.push( { script: component_scripts[i], instances: [] } );\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t(function( component_scripts, i )\n\t\t\t\t\t{\t\t\t\n\t\t\t\t\t\tjQuery.ajax( \n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdataType: 'script',\n\t\t\t\t\t\t\t\turl: component_scripts[i],\n\t\t\t\t\t\t\t\tsuccess: function( $data, $xhr )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tcomponentScriptLoaded( component_scripts, $component_links, i );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t\t})( component_scripts, i );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// add link to waiting list for the script\n\t\t\t\tif ( wait_for_script )\n\t\t\t\t{\n\t\t\t\t\tfor ( j = 0; j < _component_scripts_waiting.length; j++ )\n\t\t\t\t\t{\n\t\t\t\t\t\tif ( _component_scripts_waiting[j].script === component_scripts[i] )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t_component_scripts_waiting[j].instances.push( i );\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// the component script is loaded instantiate!\n\t\t\t\tif (\n\t\t\t\t\t! load_script &&\n\t\t\t\t\t! wait_for_script\n\t\t\t\t)\n\t\t\t\t{\n\t\t\t\t\tcomponentInit( $component_links[i] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "fb657fe875adcad3e12d7b0d68ec10c7", "score": "0.49651477", "text": "_scheduleCheckUpdates() {\n if (this._watchedUpdatesTimeout !== null ||\n this._watchedUpdatesPeriodMS === null) {\n return;\n }\n\n this._watchedUpdatesLastScheduleTime = Date.now();\n this._watchedUpdatesTimeout = setTimeout(\n () => {\n this._watchedUpdatesTimeout = null;\n this._loadUpdates({\n entries: _.pluck(this._watchedEntries, 'entry'),\n onDone: this._scheduleCheckUpdates.bind(this),\n });\n },\n this._watchedUpdatesPeriodMS);\n }", "title": "" }, { "docid": "a1e2714207bc409c65acb4c441ca3663", "score": "0.49639636", "text": "function getTimers(cb) {\n loadLamps(function() {\n cb(timers);\n });\n }", "title": "" }, { "docid": "f3662f508d4db40b1cf1608322d7cc6b", "score": "0.4962373", "text": "function sleep(miliseconds) {\n\tvar currentTime = new Date().getTime();\n \n\twhile (currentTime + miliseconds >= new Date().getTime()) {\n\t}\n }", "title": "" }, { "docid": "af77d6e1a1533580d848aedf49a87585", "score": "0.49606493", "text": "function ChromeLoadTimes() {}", "title": "" }, { "docid": "7c49c7501a647b7e0056b2980cf69620", "score": "0.49591857", "text": "function waitTillCssLoaded()\n {\n var styleSheets = document.styleSheets;\n var numStyleSheets = styleSheets.length;\n\n // Don't bother checking if the count has not changed from the last poll\n if (cssLastCheckSheetCount == numStyleSheets)\n {\n return;\n }\n cssLastCheckSheetCount = numStyleSheets;\n // Loop through all the nodes that we are still waiting to finish loading\n for (var i = 0; i < loadingCssLinks.length; ++i)\n {\n var obj = loadingCssLinks[i];\n var nonLoadedNode = obj[\"node\"];\n\n for (var j = 0; j < numStyleSheets; ++j)\n {\n var linkNode = styleSheets[j].ownerNode;\n // See if this style sheet is for the node we are waiting to be loaded.\n if (nonLoadedNode == linkNode)\n {\n // When the style sheet appears in the styleSheets collection,\n // it has finished loading\n obj[\"resolve\"](linkNode);\n\n // Remove the item from the array\n loadingCssLinks.splice(i--, 1);\n\n if (loadingCssLinks.length == 0)\n {\n // We are not waiting on any more nodes\n window.clearInterval(cssLoadingCheckInterval);\n cssLoadingCheckInterval = null;\n return;\n }\n\n break;\n }\n }\n }\n\n var timeWaiting = new Date().getMilliseconds() - cssLoadingWaitStarted;\n // Since the code is not notified of CSS files that failed to load, only way for a maximum\n // of 5 seconds for all CSS files to load and then throw an error\n if (timeWaiting >= 5000)\n {\n for (var index = 0, size = loadingCssLinks.length; i < size; ++i)\n {\n var obj = loadingCssLinks[index];\n // Notify the listener that the resource failed to load\n obj[\"reject\"]();\n adf.mf.log.logInfoResource(\"AMXInfoBundle\", adf.mf.log.level.SEVERE,\n \"amx.includeCss\",\n \"MSG_FAILED_TO_LOAD\", obj[\"path\"]);\n }\n loadingCssLinks = [];\n window.clearInterval(cssLoadingCheckInterval);\n cssLoadingCheckInterval = null;\n }\n }", "title": "" }, { "docid": "a5855d7f15fa9e850463bcc0d328a4f1", "score": "0.49588987", "text": "function waitForReady(GM_config) {\r\n\tif($(navID) && $(\"movie_player\")) {\r\n\t\twindow.clearInterval(intStart);\r\n\t\tmain(GM_config);\r\n\t}\r\n\tsec++;\r\n\tif(sec >= 120) window.clearInterval(intStart);\r\n}", "title": "" }, { "docid": "83883ee21c36cc69abee8ed7308172ed", "score": "0.49569604", "text": "function checkItems(){\n\t\tsetInterval(function(){\n\t\t\tloadConversation();\n\t\t}, 3000);\n\t}", "title": "" }, { "docid": "5663d5a5f61df3023a72e9b076152ced", "score": "0.49563277", "text": "function updateFacility() {\n var secs = 3000; //3 sec\n setInterval(function() {\n checkFacility(lab);\n checkFacility(cern);\n checkFacility(timeMachine);\n\n }, secs);\n}", "title": "" }, { "docid": "478308dcdf9a25ada02b2c42aef43273", "score": "0.49440607", "text": "function testDelayArgument() {\n baseConfig.plugins[0] = new WebpackOpenBrowser({\n url: 'https://github.com/',\n delay: 10 * 1000,\n });\n webpack(baseConfig).watch({}, handler);\n}", "title": "" }, { "docid": "2e0789ac38f2873aef6dada8e793f7fa", "score": "0.4938604", "text": "function autoRefreshMyRequests(seconds) {\n //clear current interval\n clearInterval(myInterval);\n //set a new one\n myInterval = setInterval(function () {\n LoadMyRequest();\n }, seconds * 1000); // 60 * 1000 milsec\n\n}", "title": "" }, { "docid": "46201d291d491766647b292f3fac89cb", "score": "0.49321556", "text": "function wait(ms){\n var start = new Date().getTime();\n var current = start;\n while((current-start) < ms){\n current = new Date().getTime();\n }\n}", "title": "" }, { "docid": "03aceae0237de994e18698dbaf6197bc", "score": "0.4932111", "text": "async wait(ms) {\n return new Promise(resolve => {\n setTimeout(resolve, ms);\n });\n }", "title": "" }, { "docid": "aaf7e26f14aaafc488c5ecb240f65dc4", "score": "0.4931499", "text": "static get UPDATE_DELAY() { return 10; }", "title": "" }, { "docid": "b54377a6e58c8ad50a9b953a127c185b", "score": "0.4931353", "text": "async waitUntilGetsRollingLabel() {\n return new Promise(function (resolve, reject) {\n (function waitForElement(){\n if (Scripts.getMainRollingLabel()) return resolve();\n setTimeout(waitForElement, 30);\n })();\n });\n }", "title": "" }, { "docid": "9c12412a2cd319d586948ba369ed141a", "score": "0.49217904", "text": "run() {\n\t\tconst els = [ ...document.querySelectorAll('.js-lazy-load:not(.is-loaded)') ];\n\t\tels.forEach((el) => this.observer.observe(el));\n\t}", "title": "" }, { "docid": "59623d4f91e51a30c06d4d266a536e01", "score": "0.49196908", "text": "function GM_wait() {\r\n if(typeof unsafeWindow.jQuery == 'undefined') \r\n {\r\n window.setTimeout(GM_wait,500); \r\n }\r\n else\r\n {\r\n $ = unsafeWindow.jQuery; \r\n //unsafeWindow.jQuery.noConflict();\r\n bdallsubs(); // execute the GM code\r\n }\r\n}", "title": "" }, { "docid": "f5009b13e9295b498648ea3c470baabc", "score": "0.49103862", "text": "function check() {\n // Check if observer has loaded\n if (loading.observer && global.MutationObserver && global.WeakMap) {\n loading.observer = false;\n }\n\n // Check if classList has loaded\n if (loading.classList && ('classList' in document.createElement('div'))) {\n loading.classList = false;\n }\n\n // Done\n if (!loading.observer && !loading.classList) {\n clearInterval(timer);\n local.init();\n return;\n }\n\n // Increase counter\n polyCounter ++;\n if (polyCounter === 60) {\n // Polyfills didn't load after 30 seconds - increase timer to reduce page load\n clearInterval(timer);\n timer = setInterval(check, 5000);\n }\n }", "title": "" }, { "docid": "9d825157f3e0e97bb259a8ea73c81dbe", "score": "0.49091956", "text": "function status_loop () {\r\n\tsetInterval(status_check, 500);\r\n}", "title": "" }, { "docid": "36c22009e7a60c9a0309fbf5cf41780d", "score": "0.49045667", "text": "waitForDebounce (callback) {\n\t\tsetTimeout(callback, 3000);\n\t}", "title": "" }, { "docid": "d64abfd6a805365d1f35e645040dceea", "score": "0.48990557", "text": "function checkPicsToLoad(){\n picsToLoad--;\n if(picsToLoad == 0){\n setTimeout(loop,100);\n //showSplashScreen();\n }\n}", "title": "" } ]
02b3e77a17e0d422d703598604c482e9
conversion between JavaScript string and Data.Text values defined in Gen2.ClosureInfo thread status / lowlevel heap object manipulation macros GHCJS.Prim.JSVal GHCJS.Prim.JSException Exception dictionary for JSException SomeException GHC.Ptr.Ptr GHC.Integer.GMP.Internals Data.Maybe.Maybe define HS_NOTHING h$nothing Data.List Data.Text Data.Text.Lazy black holes can we skip the indirection for black holes? resumable thunks general deconstruction retrieve a numeric value that's possibly stored as an indirection generic lazy values generic data constructors and selectors unboxed tuple returns define RETURN_UBX_TUP1(x) return x; / convert a Data.Text buffer with offset/length to a JavaScript string
[ { "docid": "a1ffe8bcbf36c3789fa85353bde017d9", "score": "0.0", "text": "function h$textToString(arr, off, len) {\n var a = [];\n var end = off+len;\n var k = 0;\n var u1 = arr.u1;\n var s = '';\n for(var i=off;i<end;i++) {\n var cc = u1[i];\n a[k++] = cc;\n if(k === 60000) {\n s += String.fromCharCode.apply(this, a);\n k = 0;\n a = [];\n }\n }\n return s + String.fromCharCode.apply(this, a);\n}", "title": "" } ]
[ { "docid": "48603923a1f6202e459ffffa96920a33", "score": "0.699028", "text": "function jsString( n ) {\n\n}", "title": "" }, { "docid": "3dcbd79911ff2bbad6366f959373e585", "score": "0.68971616", "text": "function sc_string2jsstring(s) {\n return s;\n}", "title": "" }, { "docid": "3dcbd79911ff2bbad6366f959373e585", "score": "0.68971616", "text": "function sc_string2jsstring(s) {\n return s;\n}", "title": "" }, { "docid": "7e44d6869fd0b3e464816fe6844800fc", "score": "0.68796533", "text": "function sc_jsstring2string(s) {\n return s;\n}", "title": "" }, { "docid": "7e44d6869fd0b3e464816fe6844800fc", "score": "0.68796533", "text": "function sc_jsstring2string(s) {\n return s;\n}", "title": "" }, { "docid": "790a3a202e8f77abbc56966f3b1b2f72", "score": "0.6253187", "text": "function JSStrToBinStr(jsStr, offset) {\n var ptr = alloc_ustr(jsStr.length - offset), length = jsStr.length;\n for (var i = offset; i < length; i++, ptr++) {\n HEAPU8[ptr] = jsStr.charCodeAt(i);\n }\n return ptr;\n}", "title": "" }, { "docid": "0ceceee00d11ce5d70298548851a8095", "score": "0.6145018", "text": "function js(e){return!0===Ps(e)&&\"[object Object]\"===Object.prototype.toString.call(e)}", "title": "" }, { "docid": "0e1c8fdf12eec646fceb71dfcb242d94", "score": "0.60361546", "text": "function jsString(javaString) {\n if(javaString != null) {\n javaString = \"\" + javaString;\n }\n return javaString;\n}", "title": "" }, { "docid": "dff5080989e994ba2ee384007fd3f95f", "score": "0.6021058", "text": "function JSStrToUtf8Str(jsStr) {\n var arr = [], length = jsStr.length;\n for (var i = 0; i < length; i++) {\n var c = jsStr.charCodeAt(i);\n if (c <= 0x7f) {\n arr.push(c);\n }\n else if (c <= 0x7ff) {\n arr.push(0xc | (c >> 6));\n arr.push(0x8 | (c & 0x3f));\n }\n else {\n arr.push(0xe | (c >> 12));\n arr.push(0x8 | ((c >> 6) & 0x3f));\n arr.push(0x8 | (c & 0x3f));\n }\n }\n return allocate(arr, 'i8', ALLOC_STACK);\n}", "title": "" }, { "docid": "e6c63e659d22851974e8987469b20b3d", "score": "0.59622204", "text": "function jsonToJS(str) {\n var output = str.replace(/[\\u2028\\u2029]/g, function(char, pos, str) {\n var hex = char.codePointAt(0).toString(16);\n return '\\\\u' + '0000'.slice(hex.length) + hex;\n });\n return output;\n }", "title": "" }, { "docid": "25969ab66ad25359fa8e99beaa86ac8e", "score": "0.5936353", "text": "function _stringLiteral(val) {\n val = JSON.stringify(val);\n\n // escape illegal js but valid json unicode characters\n val = val.replace(/[\\u000A\\u000D\\u2028\\u2029]/g, function (c) {\n return \"\\\\u\" + (\"0000\" + c.charCodeAt(0).toString(16)).slice(-4);\n });\n\n if (this.format.quotes === \"single\") {\n // remove double quotes\n val = val.slice(1, -1);\n\n // unescape double quotes\n val = val.replace(/\\\\\"/g, '\"');\n\n // escape single quotes\n val = val.replace(/'/g, \"\\\\'\");\n\n // add single quotes\n val = \"'\" + val + \"'\";\n }\n\n return val;\n}", "title": "" }, { "docid": "32fcb69f514fa9a1d023b26f28e45d46", "score": "0.593184", "text": "function jsonToJS(str) {\n const output = str.replace(\n /[\\u2028\\u2029]/g,\n (char, pos, str) => {\n const hex = char.codePointAt(0).toString(16);\n return \"\\\\u\" + \"0000\".slice(hex.length) + hex;\n }\n );\n return output;\n }", "title": "" }, { "docid": "21329d2a722c28c125db47830b17f909", "score": "0.58894867", "text": "function buffer2String(buffer) {\r\n return utility.buffer2StringValue(buffer)\r\n}", "title": "" }, { "docid": "39aa84959612831ae7d2ad924ba9bb27", "score": "0.588224", "text": "function sc_symbol2jsstring(s) {\n return s.slice(1);\n}", "title": "" }, { "docid": "39aa84959612831ae7d2ad924ba9bb27", "score": "0.588224", "text": "function sc_symbol2jsstring(s) {\n return s.slice(1);\n}", "title": "" }, { "docid": "87a6f8cf1397ed594caec3a0e1327d58", "score": "0.57988167", "text": "function jsString(tag){ \r\n return {\r\n tag : tag\r\n ,primeiroCmp : \"\"\r\n ,master : true\r\n ,retorno : \"\"\r\n ,add: function(cmp,vlr){\r\n if( this.primeiroCmp==\"\" ){\r\n this.retorno+='{';\r\n this.primeiroCmp=cmp;\r\n } else if( this.primeiroCmp==cmp ){\r\n this.retorno=this.retorno.substring(0,(this.retorno.length-1));\r\n this.retorno+='},{';\r\n }\r\n /////////////////////////////////////////////////////////////////////////////////\r\n // Se vier [{\"campo\":\"valor\",......}] é que é um json dentro do json principal //\r\n /////////////////////////////////////////////////////////////////////////////////\r\n if(vlr.toString().substring(0,2) != \"[{\"){ \r\n this.retorno+='\"'+cmp+'\":\"'+vlr+'\",';\r\n } else {\r\n this.retorno+='\"'+cmp+'\":'+vlr+','; \r\n } \r\n return this;\r\n }\r\n ,principal:function(bol){\r\n this.master=bol;\r\n }\r\n ,fim:function(){\r\n if( this.retorno != \"\" )\r\n this.retorno=this.retorno.substring(0,(this.retorno.length-1))+'}';\r\n //////////////////////////////////////////////////////////////////\r\n // master true monta um json completo //\r\n // master false monta um json para estar dentro do principal //\r\n //////////////////////////////////////////////////////////////////\r\n if( this.master ){\r\n this.retorno='{\"'+tag+'\":['+this.retorno+']}'; \r\n } else {\r\n this.retorno='['+this.retorno+']'; \r\n } \r\n return this.retorno;\r\n }\r\n }\r\n}", "title": "" }, { "docid": "b0dab30bded64d3e4c9f901a9b257eb1", "score": "0.57796854", "text": "function Utf8StrToJSStr(ptr, offset) {\n ptr += offset;\n var s = \"\";\n for(;;) {\n var c = HEAPU8[ptr++];\n // (null-terminator?)\n if (c === 0)\n break;\n // multi-blurn! I mean, byte\n if (c & 0x80) {\n // 3-byte\n if (c & 0x20) {\n c = ((c & 0xf) << 12) |\n ((HEAPU8[ptr++] & 0x3f) << 6) |\n (HEAPU8[ptr++] & 0x3f);\n }\n // 2-byte\n else {\n c = ((c & 0x1f) << 6) |\n (HEAPU8[ptr++] & 0x3f);\n }\n }\n s += String.fromCharCode(c);\n }\n return s;\n}", "title": "" }, { "docid": "5adde75f2a42b596220021086804d111", "score": "0.57771814", "text": "function ue(a){return a&&a.implementsGoogStringTypedString?a.getTypedStringValue():a}", "title": "" }, { "docid": "52ba3971c31e3f6711c31fc6438cf576", "score": "0.5763973", "text": "returnString(ptr: number) {\n const memory = new Uint8Array(this.memory.buffer)\n\n let length = 0\n while (memory[ptr + length] !== 0) {\n length += 1\n }\n\n const str = this.readString(ptr, length)\n\n this.dealloc_str(ptr)\n return str\n }", "title": "" }, { "docid": "44f822751cd1cbf14b8344916fd7d20a", "score": "0.5761657", "text": "function toLiteral( value, json )\n{\n\tif (null===value)\n\t\treturn \"null\";\n\t\n\tif (undefined===value)\n\t\treturn \"undefined\";\n \t\n \tif (value instanceof Function)\n\t{\n\t\tvar info= functionInfo( value );\n\t\tvar args= info.argumentNames.join(\", \");\n\t\tif (args)\n\t\t\targs= \" \" + args + \" \";\n\t\tvar str= \"function \" + info.name + \"(\" + args + \") {...}\";\n\t\treturn str;\n\t}\n\t\n\tvar type= typeof(value);\n\t\n\tif ('string' == type)\n\t{\n\t\treturn '\"' + value + '\"';\n\t}\n\t\n\tif ('number' == type ||\n\t\t'boolean' == type)\n\t{\n\t\treturn value.toString();\n\t}\n\n\tif (value instanceof Array)\n\t{\n\t\treturn dumpArray( value, json );\n\t}\n\t\n\tif (value instanceof Object)\n\t{\n\t\treturn dumpObject( value, json );\n\t}\n\t\n\treturn value;\n}", "title": "" }, { "docid": "a0f2dad37e6e613991364a83fdcf96c8", "score": "0.5701165", "text": "function caml_js_to_string(s) { return new MlWrappedString(s); }", "title": "" }, { "docid": "f557c8010b8c2c5eaa1005d31c0c938e", "score": "0.56836355", "text": "function jsStr(data){\r\n ////////////////////////////////////////////////////////////////////////////////////////////\r\n // retorno = É atualizado a cada chamada de um metodo, seu valor se alterar ex:percentual //\r\n ////////////////////////////////////////////////////////////////////////////////////////////\r\n var retorno = \"\"; \r\n //////////////////////////////////////////////////////////////////////////////////\r\n // Converte quando vem da classe principal jsNmrs(str) ou jsNmrs().dolar(str); //\r\n //////////////////////////////////////////////////////////////////////////////////\r\n function converte(n){\r\n if( n==undefined ){\r\n n=\"\";\r\n }\r\n retorno=n;\r\n ///////////////////////////////////////////////////\r\n // Procurando se veio um element ou uma variavel //\r\n ///////////////////////////////////////////////////\r\n var total = document.getElementsByTagName('input').length;\r\n for(var i = 0; i < total; i++) {\r\n if( document.getElementsByTagName('input')[i].id == n ) {\r\n retorno=document.getElementById(n).value;\r\n }; \r\n };\r\n ////////////////////////////////////////////////////\r\n // Padrão da função tirar aspas e remover acentos //\r\n ////////////////////////////////////////////////////\r\n retorno=removeAcentos(retorno.replace(/'/g, \"\")); //remoceAcentos+tira aspas \r\n retorno=retorno.replace(/^\\s+/,\"\"); //ltrim\r\n retorno=retorno.replace(/\\s+$/,\"\"); //rtrim\r\n return retorno;\r\n };\r\n ////////////////////////\r\n // Iniciando a classe //\r\n ////////////////////////\r\n return {\r\n data : converte(data)\r\n ,alltrim(){\r\n retorno=retorno.split(\" \").join(\"\"); \r\n return this;\r\n } \r\n ,upper(){\r\n retorno=retorno.toUpperCase();\r\n return this;\r\n }\r\n ,lower(){\r\n retorno=retorno.toLowerCase();\r\n return this;\r\n }\r\n ,soNumeros(){\r\n retorno=retorno.replace(/\\D/g,\"\");\r\n return this;\r\n }\r\n ,tamMax(i){\r\n if( retorno.length>i ){\r\n retorno=retorno.substring(0,i);\r\n };\r\n return this;\r\n }\r\n ,ret:function(){\r\n return retorno;\r\n }\r\n };\r\n}", "title": "" }, { "docid": "5a657bb000b3c5f00f1880976270f861", "score": "0.5674277", "text": "function YFunction_json_get_string(bin_jsonbuff)\n {\n return JSON.parse(bin_jsonbuff);\n }", "title": "" }, { "docid": "de2d0360280dc7ca69639d4ce5ec9a47", "score": "0.56636655", "text": "function toJSONString(obj) {\r\n var m = {\r\n '\\b': '\\\\b',\r\n '\\t': '\\\\t',\r\n '\\n': '\\\\n',\r\n '\\f': '\\\\f',\r\n '\\r': '\\\\r',\r\n '\"': '\\\\\"',\r\n '\\\\': '\\\\\\\\'\r\n },\r\n s = {\r\n array: function(x) {\r\n var a = ['['],\r\n b, f, i, l = x.length,\r\n v;\r\n for (i = 0; i < l; i += 1) {\r\n v = x[i];\r\n f = s[typeof v];\r\n if (f) {\r\n v = f(v);\r\n if (typeof v == 'string') {\r\n if (b) {\r\n a[a.length] = ',';\r\n }\r\n a[a.length] = v;\r\n b = true;\r\n }\r\n }\r\n }\r\n a[a.length] = ']';\r\n return a.join('');\r\n },\r\n 'boolean': function(x) {\r\n return String(x);\r\n },\r\n 'null': function(x) {\r\n return \"null\";\r\n },\r\n number: function(x) {\r\n return isFinite(x) ? String(x) : 'null';\r\n },\r\n object: function(x) {\r\n if (x) {\r\n if (x instanceof Array) {\r\n return s.array(x);\r\n }\r\n var a = ['{'],\r\n b, f, i, v;\r\n for (i in x) {\r\n v = x[i];\r\n f = s[typeof v];\r\n if (f) {\r\n v = f(v);\r\n if (typeof v == 'string') {\r\n if (b) {\r\n a[a.length] = ',';\r\n }\r\n a.push(s.string(i), ':', v);\r\n b = true;\r\n }\r\n }\r\n }\r\n a[a.length] = '}';\r\n return a.join('');\r\n }\r\n return 'null';\r\n },\r\n string: function(x) {\r\n if (/[\"\\\\\\x00-\\x1f]/.test(x)) {\r\n x = x.replace(/([\\x00-\\x1f\\\\\"])/g, function(a, b) {\r\n var c = m[b];\r\n if (c) {\r\n return c;\r\n }\r\n c = b.charCodeAt();\r\n return '\\\\u00' +\r\n Math.floor(c / 16).toString(16) +\r\n (c % 16).toString(16);\r\n });\r\n }\r\n return '\"' + x + '\"';\r\n }\r\n };\r\n\r\n return s.object(obj);\r\n}", "title": "" }, { "docid": "8d5c01e3303179b3345b1ca15bd0a31b", "score": "0.56150043", "text": "function jstr(o) {\n return JSON.stringify(o);\n}", "title": "" }, { "docid": "b0304aa101313240bfa71ffa0bf0729d", "score": "0.56018174", "text": "function sc_StringInputPort(jsStr) {\n // we are going to do some charAts on the str.\n // instead of recreating all the time a String-object, we\n // create one in the beginning. (not sure, if this is really an optim)\n this.str = new String(jsStr);\n this.pos = 0;\n}", "title": "" }, { "docid": "b8b5849f1201b411f2e6f1f5d2aff261", "score": "0.55913985", "text": "function bufferText(obj){\n\tvar buffered = \"\";\n\tif (obj.forEach){\n\t\tobj.forEach(function(c){buffered+=c.decodeToString()});\n\t}else if (typeof obj=='string'){\n\t\tbuffered = obj;\t\n\t}else{\n\t\tbuffered = obj.toString();\n\t}\n\treturn buffered;\n}", "title": "" }, { "docid": "e714dbb38a8479efd6ec78dc29fc3f30", "score": "0.55833006", "text": "function StringDecoder(encoding){this.encoding=(encoding||'utf8').toLowerCase().replace(/[-_]/,'');assertEncoding(encoding);switch(this.encoding){case'utf8':// CESU-8 represents each of Surrogate Pair by 3-bytes\nthis.surrogateSize=3;break;case'ucs2':case'utf16le':// UTF-16 represents each of Surrogate Pair by 2-bytes\nthis.surrogateSize=2;this.detectIncompleteChar=utf16DetectIncompleteChar;break;case'base64':// Base-64 stores 3 bytes in 4 chars, and pads the remainder.\nthis.surrogateSize=3;this.detectIncompleteChar=base64DetectIncompleteChar;break;default:this.write=passThroughWrite;return;}// Enough space to store all bytes of a single character. UTF-8 needs 4\n// bytes, but CESU-8 may require up to 6 (3 bytes per surrogate).\nthis.charBuffer=new Buffer(6);// Number of bytes received for the current incomplete multi-byte character.\nthis.charReceived=0;// Number of bytes expected for the current incomplete multi-byte character.\nthis.charLength=0;}// write decodes the given buffer and returns it as JS string that is", "title": "" }, { "docid": "0aa522a46c2d3bfbbfc89bd4f8b68d3a", "score": "0.5583259", "text": "function c(a){if(c[a]!==g)// Return cached feature test result.\nreturn c[a];var b;if(\"bug-string-char-index\"==a)// IE <= 7 doesn't support accessing string characters using square\n// bracket notation. IE 8 only supports this for primitives.\nb=\"a\"!=\"a\"[0];else if(\"json\"==a)// Indicates whether both `JSON.stringify` and `JSON.parse` are\n// supported.\nb=c(\"json-stringify\")&&c(\"json-parse\");else{var d,e='{\"a\":[1,true,false,null,\"\\\\u0000\\\\b\\\\n\\\\f\\\\r\\\\t\"]}';// Test `JSON.stringify`.\nif(\"json-stringify\"==a){var f=k.stringify,i=\"function\"==typeof f&&l;if(i){// A test function object with a custom `toJSON` method.\n(d=function(){return 1}).toJSON=d;try{i=// Firefox 3.1b1 and b2 serialize string, number, and boolean\n// primitives as object literals.\n\"0\"===f(0)&&// FF 3.1b1, b2, and JSON 2 serialize wrapped primitives as object\n// literals.\n\"0\"===f(new Number)&&'\"\"'==f(new String)&&// FF 3.1b1, 2 throw an error if the value is `null`, `undefined`, or\n// does not define a canonical JSON representation (this applies to\n// objects with `toJSON` properties as well, *unless* they are nested\n// within an object or array).\nf(h)===g&&// IE 8 serializes `undefined` as `\"undefined\"`. Safari <= 5.1.7 and\n// FF 3.1b3 pass this test.\nf(g)===g&&// Safari <= 5.1.7 and FF 3.1b3 throw `Error`s and `TypeError`s,\n// respectively, if the value is omitted entirely.\nf()===g&&// FF 3.1b1, 2 throw an error if the given value is not a number,\n// string, array, object, Boolean, or `null` literal. This applies to\n// objects with custom `toJSON` methods as well, unless they are nested\n// inside object or array literals. YUI 3.0.0b1 ignores custom `toJSON`\n// methods entirely.\n\"1\"===f(d)&&\"[1]\"==f([d])&&// Prototype <= 1.6.1 serializes `[undefined]` as `\"[]\"` instead of\n// `\"[null]\"`.\n\"[null]\"==f([g])&&// YUI 3.0.0b1 fails to serialize `null` literals.\n\"null\"==f(null)&&// FF 3.1b1, 2 halts serialization if an array contains a function:\n// `[1, true, getClass, 1]` serializes as \"[1,true,],\". FF 3.1b3\n// elides non-JSON values from objects and arrays, unless they\n// define custom `toJSON` methods.\n\"[null,null,null]\"==f([g,h,null])&&// Simple serialization test. FF 3.1b1 uses Unicode escape sequences\n// where character escape codes are expected (e.g., `\\b` => `\\u0008`).\nf({a:[d,!0,!1,null,\"\\x00\\b\\n\\f\\r\t\"]})==e&&// FF 3.1b1 and b2 ignore the `filter` and `width` arguments.\n\"1\"===f(null,d)&&\"[\\n 1,\\n 2\\n]\"==f([1,2],null,1)&&// JSON 2, Prototype <= 1.7, and older WebKit builds incorrectly\n// serialize extended years.\n'\"-271821-04-20T00:00:00.000Z\"'==f(new Date(-864e13))&&// The milliseconds are optional in ES 5, but required in 5.1.\n'\"+275760-09-13T00:00:00.000Z\"'==f(new Date(864e13))&&// Firefox <= 11.0 incorrectly serializes years prior to 0 as negative\n// four-digit years instead of six-digit years. Credits: @Yaffle.\n'\"-000001-01-01T00:00:00.000Z\"'==f(new Date(-621987552e5))&&// Safari <= 5.1.5 and Opera >= 10.53 incorrectly serialize millisecond\n// values less than 1000. Credits: @Yaffle.\n'\"1969-12-31T23:59:59.999Z\"'==f(new Date(-1))}catch(j){i=!1}}b=i}// Test `JSON.parse`.\nif(\"json-parse\"==a){var m=k.parse;if(\"function\"==typeof m)try{// FF 3.1b1, b2 will throw an exception if a bare literal is provided.\n// Conforming implementations should also coerce the initial argument to\n// a string prior to parsing.\nif(0===m(\"0\")&&!m(!1)){// Simple parsing test.\nd=m(e);var n=5==d.a.length&&1===d.a[0];if(n){try{// Safari <= 5.1.2 and FF 3.1b1 allow unescaped tabs in strings.\nn=!m('\"\t\"')}catch(j){}if(n)try{// FF 4.0 and 4.0.1 allow leading `+` signs and leading\n// decimal points. FF 4.0, 4.0.1, and IE 9-10 also allow\n// certain octal literals.\nn=1!==m(\"01\")}catch(j){}if(n)try{// FF 4.0, 4.0.1, and Rhino 1.7R3-R4 allow trailing decimal\n// points. These environments, along with FF 3.1b1 and 2,\n// also allow trailing commas in JSON objects and arrays.\nn=1!==m(\"1.\")}catch(j){}}}}catch(j){n=!1}b=n}}return c[a]=!!b}// Convenience aliases.", "title": "" }, { "docid": "81ba5f32c82eacc9c8af511b95fb0608", "score": "0.55731463", "text": "function string() {}", "title": "" }, { "docid": "d143d2497ffe33d7e8ab7bdce43aa4a6", "score": "0.5570008", "text": "function convert(buffer) {\n //return new TextDecoder('shift_jis').decode(buffer);\n return Encoding.codeToString(Encoding.convert(new Uint8Array(buffer), 'UNICODE', 'AUTO'));\n}", "title": "" }, { "docid": "84ecc4bc440701c546f1641c6bbc7f98", "score": "0.55592996", "text": "function byteCompress(jsString, charArray) {\n let intArray = ctypes.cast(charArray, ctypes.uint8_t.array(charArray.length));\n for (let i = 0; i < jsString.length; i++)\n intArray[i] = jsString.charCodeAt(i);\n }", "title": "" }, { "docid": "78f26e1b2612f3a4e5dc659bc90e5e42", "score": "0.5544231", "text": "function buf2str(buf) { return apply(fromCharCode,String,buf); }", "title": "" }, { "docid": "fbed798623040dd581392f2088133f8d", "score": "0.55382967", "text": "getString() {\n if (!this.isTextInformationFrame()) {\n throw Error('String values are only supported for text information ' +\n 'frames.');\n }\n if (!this.data) {\n throw Error('data has not been set');\n }\n // The first bytes of the data represents the encoding; 0 for ISO-8859-1,\n // and 1 for unicode.\n const isUnicode = this.data[0];\n let offset = 1;\n if (isUnicode) {\n if (this.data.length > (offset + 1)) {\n if ((this.data[offset] == 255) &&\n (this.data[offset + 1] == 254)) {\n // Skip the utf16le BOM.\n offset += 2;\n }\n else if ((this.data[offset] == 254) &&\n (this.data[offset + 1] == 255)) {\n throw Error('utf16be is not supported.');\n }\n }\n for (let i = offset; i < this.data.length - 1; i += 2) {\n if ((this.data[i] == 0) && (this.data[i + 1] == 0)) {\n return this.data.toString('utf16le', offset, i);\n }\n }\n return this.data.toString('utf16le', offset);\n }\n else {\n const nullIndex = this.data.indexOf(0, offset);\n if (nullIndex < 0) {\n return this.data.toString(NON_UNICODE_ENCODING, 1);\n }\n else {\n return this.data.toString(NON_UNICODE_ENCODING, 1, nullIndex);\n }\n }\n }", "title": "" }, { "docid": "d63e1cd5a1641cb3ef32b2150307c209", "score": "0.55181235", "text": "function Jn(t) {\n return t + \"\u0001\u0001\";\n}", "title": "" }, { "docid": "eed519759505aa7482a8319df4ebabd6", "score": "0.5512746", "text": "string(value) {\n let chunk = this.textEncoder.encode(value);\n this.uint32(chunk.byteLength); // write length of chunk as varint\n return this.raw(chunk);\n }", "title": "" }, { "docid": "e28dd424b9a9cee4ef396421a4ab3c0d", "score": "0.5501767", "text": "function parseValue(text) {\n try {\n return JSON.stringify(JSON.parse(text), null, 4);\n } catch (e) {\n return text;\n }\n}", "title": "" }, { "docid": "a43a5fc45dd4390d4c3b8ca9b64f924e", "score": "0.54970545", "text": "function nodejsBufferToStringTest() {\n var b, s;\n\n // Check inheritance; not inherited from Object.prototype\n print(typeof Buffer.prototype.toString);\n print(Buffer.prototype.toString === Object.prototype.valueOf);\n print(Buffer.prototype.hasOwnProperty('toString'));\n\n // buf.toString([encoding], [start], [end])\n\n // Without arguments encoding defaults to UTF-8 and the entire\n // buffer is converted to string. At least undefined and null\n // are accepted as \"not defined\" for encoding.\n b = new Buffer('ABC');\n safePrintString(b.toString());\n safePrintString(b.toString(undefined));\n safePrintString(b.toString(null));\n\n // If the buffer is a slice of an underlying buffer, only that slice\n // is string converted. Offsets are relative to the slice.\n b = new Buffer('ABCDEFGH');\n b = b.slice(3, 7); // DEFG\n safePrintString(b.toString());\n safePrintString(b.toString(null, 1));\n safePrintString(b.toString(null, 1, 2));\n\n // When the buffer data is legal UTF-8 and the chosen encoding\n // is UTF-8 (default), Duktape internal representation is correct\n // as is. Here the 4-byte data is U+CAFE U+0041. (Since Duktape 2.x\n // there's an explicit UTF-8 decoding + CESU-8 encoding process.)\n b = new Buffer(4);\n b[0] = 0xec; b[1] = 0xab; b[2] = 0xbe; b[3] = 0x41;\n safePrintString(b.toString());\n\n // When the buffer data is not legal UTF-8 replacement characters\n // (U+FFFD) are emitted. In this case the input is a CESU-8 encoded\n // surrogate pair which is entirely invalid UTF-8. In this case one\n // replacement character gets emitted for each byte.\n b = new Buffer(6);\n b[0] = 0xed; b[1] = 0xa0; b[2] = 0x80;\n b[3] = 0xed; b[4] = 0xbf; b[5] = 0xbf;\n safePrintString(b.toString());\n\n // Here the buffer data is invalid UTF-8 and invalid CESU-8.\n // Node.js replaces the offending character (0xff) with U+FFFD\n // (replacement character).\n b = new Buffer(4);\n b[0] = 0xff; b[1] = 0x41; b[2] = 0x42; b[3] = 0x43;\n safePrintString(b.toString());\n\n // Invalid continuation characters. Node.js seems to scan for\n // the next valid starting byte and each offending byte causes\n // a new U+FFFD to be emitted (here U+FFFD U+FFFD U+0042 U+FFFD).\n // While there are differences in replacement character handling,\n // here the result agrees between Node.js and Duktape.\n b = new Buffer(4);\n b[0] = 0xc1; b[1] = 0xc1; b[2] = 0x42; b[3] = 0xc1;\n safePrintString(b.toString());\n\n // XXX: encoding test?\n\n // Offsets, very lenient, something like:\n // - Non-numbers coerce to 0 (no valueOf() etc consulted)\n // - Negative starting point => empty result, regardless of 'end'\n // - Valid starting point but 'end' out of bounds => clamp to end\n // - Crossed indices => empty result\n //\n // Duktape behavior is a bit more lenient: everything is ToInteger()\n // coerced, clamped to valid range, and crossed indices are allowed.\n // Testcase expect string has been corrected for this.\n //\n // Offsets are relative to a slice (if buffer is a slice).\n\n b = new Buffer('ABCDEFGH');\n b = b.slice(3, 7); // DEFG\n safePrintString(b.toString());\n\n var offsetList = [\n 'NONE',\n undefined,\n null,\n true,\n false,\n { valueOf: function () { return 1; } },\n { valueOf: function () { return 3; } },\n -1, 0, 1, 2, 3, 4, 5\n ]\n\n offsetList.forEach(function (start) {\n offsetList.forEach(function (end) {\n try {\n if (start === 'NONE') {\n s = b.toString('utf8');\n } else if (end === 'NONE') {\n s = b.toString('utf8', start);\n } else {\n s = b.toString('utf8', start, end);\n }\n print(start, end, safeEscapeString(s));\n } catch (e) {\n print(start, end, e.name);\n }\n });\n });\n}", "title": "" }, { "docid": "19543d655d175eb63fc91bfdd1658c7b", "score": "0.54727805", "text": "function to_string(input_str){\n input_str=removeAheadSpace(removeBackSpace(input_str));\n if(strcmp(\"string\",variableValueType(input_str))==0){\n return input_str;\n } else {\n var temp=\"\";\n temp=append(\"'\",input_str);\n temp=append(temp,\"'\"); \n return temp;\n }\n}", "title": "" }, { "docid": "be9ad71482eb448d91c4f5f772ba68c9", "score": "0.546244", "text": "function convertFromText(c) {\nc.t = 'text0';\nvar o = {p: c.p.pop()};\nif (c.si != null) o.i = c.si;\nif (c.sd != null) o.d = c.sd;\nc.o = [o];\n}", "title": "" }, { "docid": "ea6922c45e87d5446ea374d728144faf", "score": "0.54466337", "text": "function decodeString(buffer) {\n if (typeof TextDecoder !== 'undefined') {\n // Modern browsers, Node.js v11.0.0+ (or v8.3.0+ with util.TextDecoder)\n const decoder = new TextDecoder();\n if (buffer instanceof Uint8Array) {\n return decoder.decode(buffer);\n }\n const buf = Uint8Array.from(buffer);\n return decoder.decode(buf);\n }\n else if (typeof Buffer === 'function') {\n // Node.js (v10 and below)\n if (buffer instanceof Array) {\n buffer = Uint8Array.from(buffer); // convert to typed array\n }\n if (!(buffer instanceof Buffer) && 'buffer' in buffer && buffer.buffer instanceof ArrayBuffer) {\n const typedArray = buffer;\n buffer = Buffer.from(typedArray.buffer, typedArray.byteOffset, typedArray.byteLength); // Convert typed array to node.js Buffer\n }\n if (!(buffer instanceof Buffer)) {\n throw new Error('Unsupported buffer argument');\n }\n return buffer.toString('utf-8');\n }\n else {\n // Older browsers. Manually decode!\n if (!(buffer instanceof Uint8Array) && 'buffer' in buffer && buffer['buffer'] instanceof ArrayBuffer) {\n // Convert TypedArray to Uint8Array\n const typedArray = buffer;\n buffer = new Uint8Array(typedArray.buffer, typedArray.byteOffset, typedArray.byteLength);\n }\n if (buffer instanceof Buffer || buffer instanceof Array || buffer instanceof Uint8Array) {\n let str = '';\n for (let i = 0; i < buffer.length; i++) {\n let code = buffer[i];\n if (code > 128) {\n // Decode Unicode character\n if ((code & 0xf0) === 0xf0) {\n // 4 byte char\n const b1 = code, b2 = buffer[i + 1], b3 = buffer[i + 2], b4 = buffer[i + 3];\n code = ((b1 & 0x7) << 18) | ((b2 & 0x3f) << 12) | ((b3 & 0x3f) << 6) | (b4 & 0x3f);\n i += 3;\n }\n else if ((code & 0xe0) === 0xe0) {\n // 3 byte char\n const b1 = code, b2 = buffer[i + 1], b3 = buffer[i + 2];\n code = ((b1 & 0xf) << 12) | ((b2 & 0x3f) << 6) | (b3 & 0x3f);\n i += 2;\n }\n else if ((code & 0xc0) === 0xc0) {\n // 2 byte char\n const b1 = code, b2 = buffer[i + 1];\n code = ((b1 & 0x1f) << 6) | (b2 & 0x3f);\n i++;\n }\n else {\n throw new Error('invalid utf-8 data');\n }\n }\n if (code >= 65536) {\n // Split into 2-part utf-16 char codes\n code ^= 0x10000;\n const p1 = 0xd800 | (code >> 10);\n const p2 = 0xdc00 | (code & 0x3ff);\n str += String.fromCharCode(p1);\n str += String.fromCharCode(p2);\n }\n else {\n str += String.fromCharCode(code);\n }\n }\n return str;\n }\n else {\n throw new Error('Unsupported buffer argument');\n }\n }\n}", "title": "" }, { "docid": "530fdee44dfd004a209a0f546fd02b4a", "score": "0.544508", "text": "function extractValueFromJSXText(value) {\n return value.raw;\n}", "title": "" }, { "docid": "0516cdb9246ce984812f465b6752385d", "score": "0.5425086", "text": "evaluable(text, cast) {\n var tokens, expressions, len, v, s, r;\n tokens = this.tokenize(text);\n len = tokens.length;\n\n if (tokens.length === 1 && tokens[0].expr === false) {\n return JSON.stringify(tokens[0].value);\n }\n\n expressions = tokens.map(function(token, i) {\n if (!token.expr) {\n return JSON.stringify(token.value);\n }\n return Transpiler.renderer + \".beautify(\" + this.scopify(token.value) + \")\";\n }.bind(this));\n\n v = expressions.length ? expressions.join(\"+\") : '\"\"';\n\n return \"function(s){try{var v=\" + Transpiler.renderer + \".cast(\" + v + \",\" + cast + \");}finally{return v;}}\";\n }", "title": "" }, { "docid": "a212a4b8f7c39714587a951de05d0a9d", "score": "0.5412741", "text": "function BinStrToJSStr(ptr, offset, length) {\n var s = \"\";\n for (var i = offset; i < length; i++) {\n s += String.fromCharCode(HEAPU8[ptr + i]);\n }\n return s;\n}", "title": "" }, { "docid": "8ca0aa1188334636d37f73153a5db8b5", "score": "0.53938556", "text": "function h$textFromString(s) {\n var l = s.length;\n var b = h$newByteArray(l * 2);\n var u1 = b.u1;\n for(var i=l-1;i>=0;i--) u1[i] = s.charCodeAt(i);\n { h$ret1 = (l); return (b); };\n}", "title": "" }, { "docid": "8ca0aa1188334636d37f73153a5db8b5", "score": "0.53938556", "text": "function h$textFromString(s) {\n var l = s.length;\n var b = h$newByteArray(l * 2);\n var u1 = b.u1;\n for(var i=l-1;i>=0;i--) u1[i] = s.charCodeAt(i);\n { h$ret1 = (l); return (b); };\n}", "title": "" }, { "docid": "8ca0aa1188334636d37f73153a5db8b5", "score": "0.53938556", "text": "function h$textFromString(s) {\n var l = s.length;\n var b = h$newByteArray(l * 2);\n var u1 = b.u1;\n for(var i=l-1;i>=0;i--) u1[i] = s.charCodeAt(i);\n { h$ret1 = (l); return (b); };\n}", "title": "" }, { "docid": "3c97f799703371f7039bdff6288c7dfb", "score": "0.5378042", "text": "function cStringToBox(strPtr)\n{\n \"tachyon:static\";\n \"tachyon:noglobal\";\n \"tachyon:arg strPtr rptr\";\n\n // If the string pointer is null, return the JS null value\n if (strPtr === NULL_PTR)\n return null;\n\n // Compute the string length\n for (var strLen = pint(0); ; strLen++)\n {\n var ch = iir.load(IRType.i8, strPtr, strLen);\n\n if (ch === i8(0))\n break;\n }\n\n // Allocate a string object\n var strObj = alloc_str(strLen);\n\n // For each character\n for (var i = pint(0); i < strLen; i++)\n {\n var cCh = iir.load(IRType.i8, strPtr, i);\n\n var ch = iir.icast(IRType.u16, cCh);\n\n set_str_data(strObj, i, ch);\n }\n\n // Compute the hash code for the new string\n compStrHash(strObj);\n\n // Attempt to find the string in the string table\n return getTableStr(strObj);\n}", "title": "" }, { "docid": "ac5a1eea1d9026dcb38932d82f55ad63", "score": "0.5372707", "text": "transform(buffer) {\n return String.fromCharCode.apply(null, new Uint8Array(buffer));\n }", "title": "" }, { "docid": "6614efa271958cfaf3edd7dce3e7cd27", "score": "0.53704953", "text": "function s(t){var n=t;return e.isBuffer(n)||(n=e.from(n)),a.default.encode(n)}", "title": "" }, { "docid": "258dff9e254d406c0eec7f89e59f6c27", "score": "0.53458947", "text": "function Text(data) {\n return data;\n}", "title": "" }, { "docid": "0e9577ecd1214019dfe468671e0255e9", "score": "0.53442925", "text": "function OQAABlWwyD6MDQKkPtM6Fg(a)\r\n {\r\n var b, c, d;\r\n\r\n b = a;\r\n d = !BRMABr5xMzijfM5xNYhyrw(b, 'text');\r\n\r\n if (!d)\r\n {\r\n c = b.text;\r\n return c;\r\n }\r\n\r\n d = !BRMABr5xMzijfM5xNYhyrw(b, 'textContent');\r\n\r\n if (!d)\r\n {\r\n c = b.textContent;\r\n return c;\r\n }\r\n\r\n throw lwAABq9OGjCe3bHElJJ0LA('.text');\r\n return c;\r\n }", "title": "" }, { "docid": "c15144fee641dc54c83344f267541cb3", "score": "0.534358", "text": "function quote(string) { // 10\n return JSON.stringify(string); // 11\n} // 12", "title": "" }, { "docid": "1bfa1b3307278c11b843db1144a1041f", "score": "0.5334072", "text": "function sc_any2String(o) {\n return sc_jsstring2string(sc_toDisplayString(o));\n}", "title": "" }, { "docid": "323caffdc19d5d0b5c2fa5283efea167", "score": "0.5329168", "text": "arrayBufferToString(buffer) {\n const MAXLEN = 102400;\n\n let uArr = new Uint8Array(buffer);\n let ret = \"\";\n let len = buffer.byteLength;\n\n for (let j = 0; j < Math.floor(len / MAXLEN) + 1; j++) {\n ret += String.fromCharCode.apply(\n null,\n uArr.subarray(j * MAXLEN, (j + 1) * MAXLEN)\n );\n }\n\n return ret;\n }", "title": "" }, { "docid": "4099657806b7f730594ce9790e7485ff", "score": "0.5307344", "text": "function yydebug_cvt(obj) {\n var js;\n try {\n var re1;\n if (typeof XRegExp === 'undefined') {\n re1 = / \\\"([a-z_][a-z_0-9. ]*)\\\": /ig;\n } else {\n re1 = new XRegExp(\" \\\"([\\\\p{Alphabetic}_][\\\\p{Alphabetic}_\\\\p{Number}]*)\\\": \", \"g\");\n }\n js = JSON.stringify(obj, null, 2).replace(re1, ' $1: ').replace(/[\\n\\s]+/g, ' ');\n } catch (ex) {\n js = String(obj);\n }\n return js;\n }", "title": "" }, { "docid": "158c5b85abd73e128a42e9767f918039", "score": "0.5297698", "text": "function objsonConvert(b){b=b.replace(/^#[\\x20-\\x7e]+\\s$/gm,\"\");b=b.replace(/^g[\\x20-\\x7e]+\\s$/gm,\"\");b=b.replace(/^g\\s$/gm,\"\");b=b.replace(/\\x20{2,}/gm,\" \");b=b.replace(/^\\s/gm,\"\");var e=b.match(/[\\x20-\\x7e]+\\s/gm),a,f,c,k,h,l=0;b=h=0;var m=[],n=[],p=[],d=[],g=[];a=0;for(k=e.length;a<k;a++)switch(e[a].substr(0,2)){case \"v \":c=e[a].match(/-?[\\d\\.]+(e(?=-)?|e(?=\\+)?)?[-\\+\\d\\.]*/g);null==d[l]&&(d[l]=new objsonVertexData,d[l].faceIndex=[]);d[l].position=[c[0],c[1],c[2]];l++;break;case \"vn\":c=e[a].match(/-?[\\d\\.]+(e(?=-)?|e(?=\\+)?)?[-\\+\\d\\.]*/g);\nnull==d[h]&&(d[h]=new objsonVertexData,d[h].faceIndex=[]);d[h].normal=[c[0],c[1],c[2]];h++;break;case \"vt\":c=e[a].match(/-?[\\d\\.]+(e(?=-)?|e(?=\\+)?)?[-\\+\\d\\.]*/g);null==d[b]&&(d[b]=new objsonVertexData,d[b].faceIndex=[]);d[b].texCoord=[c[0],c[1]];b++;break;case \"f \":c=e[a].match(/[\\d\\/]+/g),g.push(c[0],c[1],c[2]),3<c.length&&g.push(c[2],c[3],c[0])}e=g.length/3;h=Array(e);for(a=0;a<e;a++)c=g[3*a].split(/\\//),k=g[3*a+1].split(/\\//),f=g[3*a+2].split(/\\//),h[a]=faceNormal(d[c[0]-1].position,d[k[0]-1].position,\nd[f[0]-1].position),d[c[0]-1].faceIndex.push(a),d[k[0]-1].faceIndex.push(a),d[f[0]-1].faceIndex.push(a);for(a=0;a<l;a++){c=[0,0,0];k=d[a].faceIndex;f=k.length;for(e=0;e<f;e++)c[0]+=parseFloat(h[k[e]][0]),c[1]+=parseFloat(h[k[e]][1]),c[2]+=parseFloat(h[k[e]][2]);d[a].normal=vec3Normalize(c)}for(a=0;a<d.length;a++)d[a].position&&m.push(d[a].position[0],d[a].position[1],d[a].position[2]);for(a=0;a<d.length;a++)d[a].normal&&n.push(d[a].normal[0],d[a].normal[1],d[a].normal[2]);for(a=0;a<g.length;a++)g[a]=\nparseInt(g[a].slice(0,g[a].indexOf(\"//\")))-1;a='{\"vertex\":0,\"face\":'+g.length/3;a+=',\"position\":['+m.join(\",\")+\"]\";a+=',\"normal\":['+n.join(\",\")+\"]\";0<b&&(a+=',\"texCoord\":['+p.join(\",\")+\"]\");a+=',\"index\":['+g.join(\",\")+\"]\";return a+=\"}\"}", "title": "" }, { "docid": "14475eb861ff24cd4a7f9a3ab2504891", "score": "0.5288307", "text": "function TEXT(text) {\n return Buffer.from(`${text}\\0`, \"ucs2\");\n}", "title": "" }, { "docid": "7139972895d7f0a96723d658d7db5100", "score": "0.5277829", "text": "function toS(buffer,size=-1,index=0) {\n\tlet s = \"\";\n\t//TextDecoder.decode()\n\tfor (let i = index; i < index + size && buffer[i]; ++i)\n\t\ts += String.fromCharCode(buffer[i]);\n\treturn s\n}", "title": "" }, { "docid": "8a4b259755d6fd3d579bb3e67d6da596", "score": "0.52743137", "text": "rawText(str) {\n return {\n inspect() {\n return str;\n }\n\n };\n }", "title": "" }, { "docid": "9baac41f87311c277ec99ecd4a0462ba", "score": "0.5269994", "text": "function URIEscapeJS(s) {\n return %URIEscape(s);\n}", "title": "" }, { "docid": "7768ded41558217ff815238a448865b7", "score": "0.5264241", "text": "function TEXT(text) {\n return \"'\" + text + \"'\";\n}", "title": "" }, { "docid": "d1274cbb0a6327f5b12ae2f8d9812602", "score": "0.5258936", "text": "static _utf8ArrayToStr (array, exitOnNull = false) {\n const len = array.length;\n let c;\n let char2;\n let char3;\n let out = '';\n let i = 0;\n while (i < len) {\n c = array[i++];\n if (c === 0x00 && exitOnNull) {\n return out;\n } else if (c === 0x00 || c === 0x03) {\n // If the character is 3 (END_OF_TEXT) or 0 (NULL) then skip it\n continue;\n }\n switch (c >> 4) {\n case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7:\n // 0xxxxxxx\n out += String.fromCharCode(c);\n break;\n case 12: case 13:\n // 110x xxxx 10xx xxxx\n char2 = array[i++];\n out += String.fromCharCode(((c & 0x1F) << 6) | (char2 & 0x3F));\n break;\n case 14:\n // 1110 xxxx 10xx xxxx 10xx xxxx\n char2 = array[i++];\n char3 = array[i++];\n out += String.fromCharCode(((c & 0x0F) << 12) |\n ((char2 & 0x3F) << 6) |\n ((char3 & 0x3F) << 0));\n break;\n default:\n }\n }\n return out;\n }", "title": "" }, { "docid": "09bfeb2f0065d0a46ad6bd606206c9ab", "score": "0.52538323", "text": "function str(/** @type {any} */ s) {\r\n return JSON.stringify(s, null, \"\\t\");\r\n}", "title": "" }, { "docid": "1a1350ed25497a7289ad5992dd7bc492", "score": "0.5245053", "text": "function js_eval(input_str){\n eval(input_str);\n return \"None\";\n}", "title": "" }, { "docid": "4bbf5014d55a912f9e0565225e01dc65", "score": "0.52435774", "text": "function btoa$1(s) {\n let i;\n // String conversion as required by Web IDL.\n s = `${s}`;\n // \"The btoa() method must throw an \"InvalidCharacterError\" DOMException if\n // data contains any character whose code point is greater than U+00FF.\"\n for (i = 0; i < s.length; i++) {\n if (s.charCodeAt(i) > 255) {\n return null;\n }\n }\n let out = \"\";\n for (i = 0; i < s.length; i += 3) {\n const groupsOfSix = [ undefined, undefined, undefined, undefined ];\n groupsOfSix[0] = s.charCodeAt(i) >> 2;\n groupsOfSix[1] = (s.charCodeAt(i) & 3) << 4;\n if (s.length > i + 1) {\n groupsOfSix[1] |= s.charCodeAt(i + 1) >> 4;\n groupsOfSix[2] = (s.charCodeAt(i + 1) & 15) << 2;\n }\n if (s.length > i + 2) {\n groupsOfSix[2] |= s.charCodeAt(i + 2) >> 6;\n groupsOfSix[3] = s.charCodeAt(i + 2) & 63;\n }\n for (let j = 0; j < groupsOfSix.length; j++) {\n if (typeof groupsOfSix[j] === \"undefined\") {\n out += \"=\";\n } else {\n out += btoaLookup(groupsOfSix[j]);\n }\n }\n }\n return out;\n }", "title": "" }, { "docid": "2330f53bcba259d42efa2c57bb3240e2", "score": "0.524306", "text": "function _addStringToBuffer(buffer,val){buffer.putInt32(val.length);buffer.putString(val);}", "title": "" }, { "docid": "623acc20d8d01ea1bbff1f76b1707e36", "score": "0.523855", "text": "static fromArrayBuffer() {\n DishString.checkForValue(this.value);\n this.value = this.value ? Utils.arrayBufferToStr(this.value) : \"\";\n }", "title": "" }, { "docid": "f434008cdbc6e6cf341771517f92db00", "score": "0.5230391", "text": "function h$strt(str) { return (h$c1(h$lazy_e, (function() { return h$toHsString(str); }))); }", "title": "" }, { "docid": "f434008cdbc6e6cf341771517f92db00", "score": "0.5230391", "text": "function h$strt(str) { return (h$c1(h$lazy_e, (function() { return h$toHsString(str); }))); }", "title": "" }, { "docid": "f434008cdbc6e6cf341771517f92db00", "score": "0.5230391", "text": "function h$strt(str) { return (h$c1(h$lazy_e, (function() { return h$toHsString(str); }))); }", "title": "" }, { "docid": "01c452c5a2485085330a34945d127e3a", "score": "0.5229697", "text": "function t(str) {\n return str;\n}", "title": "" }, { "docid": "c6fe32d5f1538b132dfeee892f74e4c0", "score": "0.5225681", "text": "function nextJSONToken(_state, _out) {\n _out.value = null;\n _out.type = 0 /* UNKNOWN */;\n _out.offset = -1;\n _out.len = -1;\n _out.line = -1;\n _out.char = -1;\n var source = _state.source;\n var pos = _state.pos;\n var len = _state.len;\n var line = _state.line;\n var char = _state.char;\n //------------------------ skip whitespace\n var chCode;\n do {\n if (pos >= len) {\n return false; /*EOS*/\n }\n chCode = source.charCodeAt(pos);\n if (chCode === 32 /* SPACE */ || chCode === 9 /* HORIZONTAL_TAB */ || chCode === 13 /* CARRIAGE_RETURN */) {\n // regular whitespace\n pos++;\n char++;\n continue;\n }\n if (chCode === 10 /* LINE_FEED */) {\n // newline\n pos++;\n line++;\n char = 0;\n continue;\n }\n // not whitespace\n break;\n } while (true);\n _out.offset = pos;\n _out.line = line;\n _out.char = char;\n if (chCode === 34 /* QUOTATION_MARK */) {\n //------------------------ strings\n _out.type = 1 /* STRING */;\n pos++;\n char++;\n do {\n if (pos >= len) {\n return false; /*EOS*/\n }\n chCode = source.charCodeAt(pos);\n pos++;\n char++;\n if (chCode === 92 /* BACKSLASH */) {\n // skip next char\n pos++;\n char++;\n continue;\n }\n if (chCode === 34 /* QUOTATION_MARK */) {\n // end of the string\n break;\n }\n } while (true);\n _out.value = source.substring(_out.offset + 1, pos - 1).replace(/\\\\u([0-9A-Fa-f]{4})/g, function (_, m0) {\n return String.fromCodePoint(parseInt(m0, 16));\n }).replace(/\\\\(.)/g, function (_, m0) {\n switch (m0) {\n case '\"': return '\"';\n case '\\\\': return '\\\\';\n case '/': return '/';\n case 'b': return '\\b';\n case 'f': return '\\f';\n case 'n': return '\\n';\n case 'r': return '\\r';\n case 't': return '\\t';\n default: doFail(_state, 'invalid escape sequence');\n }\n });\n }\n else if (chCode === 91 /* LEFT_SQUARE_BRACKET */) {\n _out.type = 2 /* LEFT_SQUARE_BRACKET */;\n pos++;\n char++;\n }\n else if (chCode === 123 /* LEFT_CURLY_BRACKET */) {\n _out.type = 3 /* LEFT_CURLY_BRACKET */;\n pos++;\n char++;\n }\n else if (chCode === 93 /* RIGHT_SQUARE_BRACKET */) {\n _out.type = 4 /* RIGHT_SQUARE_BRACKET */;\n pos++;\n char++;\n }\n else if (chCode === 125 /* RIGHT_CURLY_BRACKET */) {\n _out.type = 5 /* RIGHT_CURLY_BRACKET */;\n pos++;\n char++;\n }\n else if (chCode === 58 /* COLON */) {\n _out.type = 6 /* COLON */;\n pos++;\n char++;\n }\n else if (chCode === 44 /* COMMA */) {\n _out.type = 7 /* COMMA */;\n pos++;\n char++;\n }\n else if (chCode === 110 /* n */) {\n //------------------------ null\n _out.type = 8 /* NULL */;\n pos++;\n char++;\n chCode = source.charCodeAt(pos);\n if (chCode !== 117 /* u */) {\n return false; /* INVALID */\n }\n pos++;\n char++;\n chCode = source.charCodeAt(pos);\n if (chCode !== 108 /* l */) {\n return false; /* INVALID */\n }\n pos++;\n char++;\n chCode = source.charCodeAt(pos);\n if (chCode !== 108 /* l */) {\n return false; /* INVALID */\n }\n pos++;\n char++;\n }\n else if (chCode === 116 /* t */) {\n //------------------------ true\n _out.type = 9 /* TRUE */;\n pos++;\n char++;\n chCode = source.charCodeAt(pos);\n if (chCode !== 114 /* r */) {\n return false; /* INVALID */\n }\n pos++;\n char++;\n chCode = source.charCodeAt(pos);\n if (chCode !== 117 /* u */) {\n return false; /* INVALID */\n }\n pos++;\n char++;\n chCode = source.charCodeAt(pos);\n if (chCode !== 101 /* e */) {\n return false; /* INVALID */\n }\n pos++;\n char++;\n }\n else if (chCode === 102 /* f */) {\n //------------------------ false\n _out.type = 10 /* FALSE */;\n pos++;\n char++;\n chCode = source.charCodeAt(pos);\n if (chCode !== 97 /* a */) {\n return false; /* INVALID */\n }\n pos++;\n char++;\n chCode = source.charCodeAt(pos);\n if (chCode !== 108 /* l */) {\n return false; /* INVALID */\n }\n pos++;\n char++;\n chCode = source.charCodeAt(pos);\n if (chCode !== 115 /* s */) {\n return false; /* INVALID */\n }\n pos++;\n char++;\n chCode = source.charCodeAt(pos);\n if (chCode !== 101 /* e */) {\n return false; /* INVALID */\n }\n pos++;\n char++;\n }\n else {\n //------------------------ numbers\n _out.type = 11 /* NUMBER */;\n do {\n if (pos >= len) {\n return false; /*EOS*/\n }\n chCode = source.charCodeAt(pos);\n if (chCode === 46 /* DOT */\n || (chCode >= 48 /* D0 */ && chCode <= 57 /* D9 */)\n || (chCode === 101 /* e */ || chCode === 69 /* E */)\n || (chCode === 45 /* MINUS */ || chCode === 43 /* PLUS */)) {\n // looks like a piece of a number\n pos++;\n char++;\n continue;\n }\n // pos--; char--;\n break;\n } while (true);\n }\n _out.len = pos - _out.offset;\n if (_out.value === null) {\n _out.value = source.substr(_out.offset, _out.len);\n }\n _state.pos = pos;\n _state.line = line;\n _state.char = char;\n // console.log('PRODUCING TOKEN: ', _out.value, JSONTokenType[_out.type]);\n return true;\n}", "title": "" }, { "docid": "8707bed72867bc6089443977b0f5fae7", "score": "0.521502", "text": "function getStringImpl(U32, U16, ptr) {\n var dataLength = U32[ptr >>> 2];\n var dataOffset = (ptr + 4) >>> 1;\n var dataRemain = dataLength;\n var parts = [];\n const chunkSize = 1024;\n while (dataRemain > chunkSize) {\n let last = U16[dataOffset + chunkSize - 1];\n let size = last >= 0xD800 && last < 0xDC00 ? chunkSize - 1 : chunkSize;\n let part = U16.subarray(dataOffset, dataOffset += size);\n parts.push(String.fromCharCode.apply(String, part));\n dataRemain -= size;\n }\n return parts.join(\"\") + String.fromCharCode.apply(String, U16.subarray(dataOffset, dataOffset + dataRemain));\n}", "title": "" }, { "docid": "b962feeeeede054b24c4adebb3bd5791", "score": "0.5203367", "text": "function StringParser(buffer, offset) {\n if (offset == undefined) {\n offset = 0;\n }\n var result = {};\n result.buffer = buffer;\n result.offset = offset;\n result.next = function() {\n var old_offset = this.offset;\n while (this.offset < this.buffer.length &&\n this.buffer[this.offset] != 0x00) {\n this.offset++;\n }\n var str = this.buffer.slice(old_offset, this.offset).toString('ascii');\n this.offset = Math.min(this.offset + 1, this.buffer.length);\n return str;\n }\n return result;\n}", "title": "" }, { "docid": "a3cef1a09775ac8771b1efe0c630a611", "score": "0.5198273", "text": "text () {\n return consumeBody.call(this).then(buffer => buffer.toString())\n }", "title": "" }, { "docid": "424609e7bb144b77188e532b6a837981", "score": "0.5195176", "text": "function hje$unstringify(str) {\n eval(\"var ret=\" + str);\n return ret;\n}", "title": "" }, { "docid": "ce934b50f9d6917a1921c27df994547f", "score": "0.5195162", "text": "function copyCStr(module, ptr) {\n let orig_ptr = ptr;\n const collectCString = function* () {\n let memory = new Uint8Array(module.memory.buffer);\n while (memory[ptr] !== 0) {\n if (memory[ptr] === undefined) { throw new Error(\"Tried to read undef mem\") }\n yield memory[ptr];\n ptr += 1\n }\n };\n\n const buffer_as_u8 = new Uint8Array(collectCString());\n const utf8Decoder = new TextDecoder(\"UTF-8\");\n const buffer_as_utf8 = utf8Decoder.decode(buffer_as_u8);\n module.dealloc(orig_ptr);\n return buffer_as_utf8\n}", "title": "" }, { "docid": "9a06e2324671a3942a4aae671e1c28a1", "score": "0.51915747", "text": "function h$toHsString(str) {\n\n if(typeof str !== 'string') return h$ghczmprimZCGHCziTypesziZMZN;\n var i = str.length - 1;\n var r = h$ghczmprimZCGHCziTypesziZMZN;\n while(i>=0) {\n var cp = str.charCodeAt(i);\n if(cp >= 0xDC00 && cp <= 0xDFFF && i > 0) {\n --i;\n cp = (cp - 0xDC00) + (str.charCodeAt(i) - 0xD800) * 1024 + 0x10000;\n }\n r = (h$c2(h$ghczmprimZCGHCziTypesziZC_con_e, (cp), (r)));\n --i;\n }\n return r;\n}", "title": "" }, { "docid": "8ed245d2eca3b09b2fe62139caaa8ebb", "score": "0.51885253", "text": "function asString (str) {\n let result = ''\n let last = 0\n let found = false\n let point = 255\n const l = str.length\n if (l > 100) {\n return JSON.stringify(str)\n }\n for (var i = 0; i < l && point >= 32; i++) {\n point = str.charCodeAt(i)\n if (point === 34 || point === 92) {\n result += str.slice(last, i) + '\\\\'\n last = i\n found = true\n }\n }\n if (!found) {\n result = str\n } else {\n result += str.slice(last)\n }\n return point < 32 ? JSON.stringify(str) : '\"' + result + '\"'\n}", "title": "" }, { "docid": "2d398f13bdf81852b83d300cc4d7ed1f", "score": "0.5185055", "text": "testBufferString() {\r\n\t\tconst text = 'Keep your feet on the ground.';\r\n\t\tconst textByteLength = Buffer.byteLength(text);\r\n\t\r\n\t\tconst buf = BufferWrapper.from(text);\r\n\t\tassert.strictEqual(buf.byteLength, Buffer.byteLength(text), 'Buffer from string does not match string length');\r\n\t\r\n\t\t// Read full string back from buffer.\r\n\t\tconst outFull = buf.readString(textByteLength);\r\n\t\tassert.strictEqual(outFull, text, 'readString(x) does not return expected string');\r\n\t\r\n\t\tbuf.seek(0);\r\n\t\r\n\t\t// Read entire buffer as a string.\r\n\t\tconst outAll = buf.readString();\r\n\t\tassert.strictEqual(outAll, text, 'readString() does not return expected string');\r\n\t\r\n\t\tbuf.seek(0);\r\n\t\r\n\t\t// Read partial string.\r\n\t\tconst outShort = buf.readString(6);\r\n\t\tassert.strictEqual(outShort, text.slice(0, 6), 'readString(x) does not return expected string');\r\n\r\n\t\t// Read encoded string (hex).\r\n\t\tbuf.seek(0);\r\n\t\tconst hexExpected = Buffer.from(text).toString('hex');\r\n\t\tconst hexActual = buf.readString(undefined, 'hex');\r\n\t\tassert.strictEqual(hexActual, hexExpected, 'readString(-1, hex) does not return expected hex string');\r\n\t}", "title": "" }, { "docid": "2547d2da7496eab1d88b1ce3097939e4", "score": "0.51758754", "text": "stringifiable(text) {\n return this.evaluable(text, 'String');\n }", "title": "" }, { "docid": "4287a9735a5b062e773aa3b6176960d4", "score": "0.5161261", "text": "function t(e,t,n,r){var i={s:[\"\\u0925\\u094b\\u0921\\u092f\\u093e \\u0938\\u0945\\u0915\\u0902\\u0921\\u093e\\u0902\\u0928\\u0940\",\"\\u0925\\u094b\\u0921\\u0947 \\u0938\\u0945\\u0915\\u0902\\u0921\"],ss:[e+\" \\u0938\\u0945\\u0915\\u0902\\u0921\\u093e\\u0902\\u0928\\u0940\",e+\" \\u0938\\u0945\\u0915\\u0902\\u0921\"],m:[\"\\u090f\\u0915\\u093e \\u092e\\u093f\\u0923\\u091f\\u093e\\u0928\",\"\\u090f\\u0915 \\u092e\\u093f\\u0928\\u0942\\u091f\"],mm:[e+\" \\u092e\\u093f\\u0923\\u091f\\u093e\\u0902\\u0928\\u0940\",e+\" \\u092e\\u093f\\u0923\\u091f\\u093e\\u0902\"],h:[\"\\u090f\\u0915\\u093e \\u0935\\u0930\\u093e\\u0928\",\"\\u090f\\u0915 \\u0935\\u0930\"],hh:[e+\" \\u0935\\u0930\\u093e\\u0902\\u0928\\u0940\",e+\" \\u0935\\u0930\\u093e\\u0902\"],d:[\"\\u090f\\u0915\\u093e \\u0926\\u093f\\u0938\\u093e\\u0928\",\"\\u090f\\u0915 \\u0926\\u0940\\u0938\"],dd:[e+\" \\u0926\\u093f\\u0938\\u093e\\u0902\\u0928\\u0940\",e+\" \\u0926\\u0940\\u0938\"],M:[\"\\u090f\\u0915\\u093e \\u092e\\u094d\\u0939\\u092f\\u0928\\u094d\\u092f\\u093e\\u0928\",\"\\u090f\\u0915 \\u092e\\u094d\\u0939\\u092f\\u0928\\u094b\"],MM:[e+\" \\u092e\\u094d\\u0939\\u092f\\u0928\\u094d\\u092f\\u093e\\u0928\\u0940\",e+\" \\u092e\\u094d\\u0939\\u092f\\u0928\\u0947\"],y:[\"\\u090f\\u0915\\u093e \\u0935\\u0930\\u094d\\u0938\\u093e\\u0928\",\"\\u090f\\u0915 \\u0935\\u0930\\u094d\\u0938\"],yy:[e+\" \\u0935\\u0930\\u094d\\u0938\\u093e\\u0902\\u0928\\u0940\",e+\" \\u0935\\u0930\\u094d\\u0938\\u093e\\u0902\"]};return r?i[n][0]:i[n][1]}", "title": "" }, { "docid": "714d59570dcc58a84b5317aabc832f88", "score": "0.51540536", "text": "function test37() {\n var str = new String('foo');\n console.log(str);\n console.log(str.toString());\n}", "title": "" }, { "docid": "f61c4855601d798b9b6ad40416dfbcaf", "score": "0.51518166", "text": "text() {\n return consumeBody.call(this).then(function (buffer) {\n return buffer.toString();\n });\n }", "title": "" }, { "docid": "8893c63afdb38feee99f1cb7cff42676", "score": "0.51443315", "text": "function h$toHsString(str) {\n if(typeof str !== 'string') return h$ghczmprimZCGHCziTypesziZMZN;\n var i = str.length - 1;\n var r = h$ghczmprimZCGHCziTypesziZMZN;\n while(i>=0) {\n var cp = str.charCodeAt(i);\n if(cp >= 0xDC00 && cp <= 0xDFFF && i > 0) {\n --i;\n cp = (cp - 0xDC00) + (str.charCodeAt(i) - 0xD800) * 1024 + 0x10000;\n }\n r = (h$c2(h$ghczmprimZCGHCziTypesziZC_con_e, (cp), (r)));\n --i;\n }\n return r;\n}", "title": "" }, { "docid": "8893c63afdb38feee99f1cb7cff42676", "score": "0.51443315", "text": "function h$toHsString(str) {\n if(typeof str !== 'string') return h$ghczmprimZCGHCziTypesziZMZN;\n var i = str.length - 1;\n var r = h$ghczmprimZCGHCziTypesziZMZN;\n while(i>=0) {\n var cp = str.charCodeAt(i);\n if(cp >= 0xDC00 && cp <= 0xDFFF && i > 0) {\n --i;\n cp = (cp - 0xDC00) + (str.charCodeAt(i) - 0xD800) * 1024 + 0x10000;\n }\n r = (h$c2(h$ghczmprimZCGHCziTypesziZC_con_e, (cp), (r)));\n --i;\n }\n return r;\n}", "title": "" }, { "docid": "b647a5b35b8be56d736ea27d487792f7", "score": "0.5143811", "text": "function lwiw73920() { return 'ntStr'; }", "title": "" }, { "docid": "09e6e553e7a00a3595ba8e75c0233582", "score": "0.514071", "text": "function i(t){return null==t?\"\":\"object\"==typeof t?JSON.stringify(t,null,2):String(t)}", "title": "" }, { "docid": "02d46986b18caa63a48a4200e2a5ecd3", "score": "0.51392263", "text": "function strToJson(str) {\n return eval('(' + str + ')');\n}", "title": "" }, { "docid": "b9112fc8c95bd2a06d50680a5774aa11", "score": "0.5138613", "text": "text() {\n\t\treturn consumeBody.call(this).then(buffer => buffer.toString());\n\t}", "title": "" }, { "docid": "89f555dd24b7dbca85eb2c53499c86b3", "score": "0.51338345", "text": "toJs(str) {\n if (str.endsWith('.ts')) return str.replace('.ts', '.js');\n return str;\n }", "title": "" }, { "docid": "6bbefc079b947388d88a14f7c9c86a34", "score": "0.5131631", "text": "function t(e,t,n,a){var s={s:[\"\\u0925\\u094b\\u0921\\u092f\\u093e \\u0938\\u0945\\u0915\\u0902\\u0921\\u093e\\u0902\\u0928\\u0940\",\"\\u0925\\u094b\\u0921\\u0947 \\u0938\\u0945\\u0915\\u0902\\u0921\"],ss:[e+\" \\u0938\\u0945\\u0915\\u0902\\u0921\\u093e\\u0902\\u0928\\u0940\",e+\" \\u0938\\u0945\\u0915\\u0902\\u0921\"],m:[\"\\u090f\\u0915\\u093e \\u092e\\u093f\\u0923\\u091f\\u093e\\u0928\",\"\\u090f\\u0915 \\u092e\\u093f\\u0928\\u0942\\u091f\"],mm:[e+\" \\u092e\\u093f\\u0923\\u091f\\u093e\\u0902\\u0928\\u0940\",e+\" \\u092e\\u093f\\u0923\\u091f\\u093e\\u0902\"],h:[\"\\u090f\\u0915\\u093e \\u0935\\u0930\\u093e\\u0928\",\"\\u090f\\u0915 \\u0935\\u0930\"],hh:[e+\" \\u0935\\u0930\\u093e\\u0902\\u0928\\u0940\",e+\" \\u0935\\u0930\\u093e\\u0902\"],d:[\"\\u090f\\u0915\\u093e \\u0926\\u093f\\u0938\\u093e\\u0928\",\"\\u090f\\u0915 \\u0926\\u0940\\u0938\"],dd:[e+\" \\u0926\\u093f\\u0938\\u093e\\u0902\\u0928\\u0940\",e+\" \\u0926\\u0940\\u0938\"],M:[\"\\u090f\\u0915\\u093e \\u092e\\u094d\\u0939\\u092f\\u0928\\u094d\\u092f\\u093e\\u0928\",\"\\u090f\\u0915 \\u092e\\u094d\\u0939\\u092f\\u0928\\u094b\"],MM:[e+\" \\u092e\\u094d\\u0939\\u092f\\u0928\\u094d\\u092f\\u093e\\u0928\\u0940\",e+\" \\u092e\\u094d\\u0939\\u092f\\u0928\\u0947\"],y:[\"\\u090f\\u0915\\u093e \\u0935\\u0930\\u094d\\u0938\\u093e\\u0928\",\"\\u090f\\u0915 \\u0935\\u0930\\u094d\\u0938\"],yy:[e+\" \\u0935\\u0930\\u094d\\u0938\\u093e\\u0902\\u0928\\u0940\",e+\" \\u0935\\u0930\\u094d\\u0938\\u093e\\u0902\"]};return a?s[n][0]:s[n][1]}", "title": "" }, { "docid": "fdd705dbea1da34bfc2916abb0d9035e", "score": "0.5126303", "text": "function jsToOdata(str) {\n //stripe out the vars\n var regexp = new RegExp(\"'.*?'\", '');\n\n var matches = regexp.exec(str);\n str = str.replace(regexp, '{0}');\n\n for (key in opertionMapping) {\n str = str.split(key).join(' ' + opertionMapping[key] + ' ');\n }\n\n if (matches != null) {\n for (var i = 0; i < matches.length; i++) {\n str = str.replace('{0}', matches[i])\n }\n }\n\n return (str);\n }", "title": "" }, { "docid": "23a35183e0e3c330a7a4b28eaab1f527", "score": "0.5121105", "text": "function forceStringCoercion(obj) {\n var i = 0, chr;\n while(chr = obj.charAt(i)) {\n obj[i++] = chr;\n }\n }", "title": "" }, { "docid": "23a35183e0e3c330a7a4b28eaab1f527", "score": "0.5121105", "text": "function forceStringCoercion(obj) {\n var i = 0, chr;\n while(chr = obj.charAt(i)) {\n obj[i++] = chr;\n }\n }", "title": "" }, { "docid": "68c55086033d51e601e850db05af3559", "score": "0.51194245", "text": "function r(t){return null==t?\"\":\"object\"==typeof t?JSON.stringify(t,null,2):String(t)}", "title": "" }, { "docid": "68c55086033d51e601e850db05af3559", "score": "0.51194245", "text": "function r(t){return null==t?\"\":\"object\"==typeof t?JSON.stringify(t,null,2):String(t)}", "title": "" }, { "docid": "68c55086033d51e601e850db05af3559", "score": "0.51194245", "text": "function r(t){return null==t?\"\":\"object\"==typeof t?JSON.stringify(t,null,2):String(t)}", "title": "" }, { "docid": "172839a84b251d492e880ce0785e8a74", "score": "0.51179004", "text": "function dataviewish(value) {\n if (typeof(value) == 'string') {\n return {\n getUint8: function(i) { return value.charCodeAt(i); },\n };\n }\n return value;\n}", "title": "" }, { "docid": "8b9e75a3645ca61ea1206a2d6110119e", "score": "0.5111157", "text": "function toJavaString(aObject){\n\tif (aObject == undefined ){\n\t\treturn \"undefined\";\n\t}\n\tif ( aObject == null ){\n\t\treturn \"null\";\n\t}\n\treturn java.lang.String.valueOf(aObject);\t\n\t\n}", "title": "" } ]
710e7ff24239c5d5fdb05b4617861c49
(C) 19952013 Jeanloup Gailly and Mark Adler (C) 20142017 Vitaly Puzrin and Andrey Tupitsin This software is provided 'asis', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution.
[ { "docid": "428d806bfe0c33e00f07f55891661958", "score": "0.0", "text": "function ZStream() {\n /* next input byte */\n this.input = null; // JS specific, because we have no pointers\n this.next_in = 0;\n /* number of bytes available at input */\n this.avail_in = 0;\n /* total number of input bytes read so far */\n this.total_in = 0;\n /* next output byte should be put there */\n this.output = null; // JS specific, because we have no pointers\n this.next_out = 0;\n /* remaining free space at output */\n this.avail_out = 0;\n /* total number of bytes output so far */\n this.total_out = 0;\n /* last error message, NULL if no error */\n this.msg = ''/*Z_NULL*/;\n /* not visible by applications */\n this.state = null;\n /* best guess about the data type: binary or text */\n this.data_type = 2/*Z_UNKNOWN*/;\n /* adler32 value of the uncompressed data */\n this.adler = 0;\n}", "title": "" } ]
[ { "docid": "5fbd23a1dd228f808af0d8da16fbe9bc", "score": "0.63426965", "text": "function EG(){return typeof window>\"u\"&&(self.window=self),function(n){var e={parse:function(i){var s=e._bin,o=new Uint8Array(i);if(s.readASCII(o,0,4)==\"ttcf\"){var a=4;s.readUshort(o,a),a+=2,s.readUshort(o,a),a+=2;var l=s.readUint(o,a);a+=4;for(var u=[],c=0;c<l;c++){var h=s.readUint(o,a);a+=4,u.push(e._readFont(o,h))}return u}return[e._readFont(o,0)]},_readFont:function(i,s){var o=e._bin,a=s;o.readFixed(i,s),s+=4;var l=o.readUshort(i,s);s+=2,o.readUshort(i,s),s+=2,o.readUshort(i,s),s+=2,o.readUshort(i,s),s+=2;for(var u=[\"cmap\",\"head\",\"hhea\",\"maxp\",\"hmtx\",\"name\",\"OS/2\",\"post\",\"loca\",\"glyf\",\"kern\",\"CFF \",\"GPOS\",\"GSUB\",\"SVG \"],c={_data:i,_offset:a},h={},p=0;p<l;p++){var m=o.readASCII(i,s,4);s+=4,o.readUint(i,s),s+=4;var g=o.readUint(i,s);s+=4;var v=o.readUint(i,s);s+=4,h[m]={offset:g,length:v}}for(p=0;p<u.length;p++){var y=u[p];h[y]&&(c[y.trim()]=e[y.trim()].parse(i,h[y].offset,h[y].length,c))}return c},_tabOffset:function(i,s,o){for(var a=e._bin,l=a.readUshort(i,o+4),u=o+12,c=0;c<l;c++){var h=a.readASCII(i,u,4);u+=4,a.readUint(i,u),u+=4;var p=a.readUint(i,u);if(u+=4,a.readUint(i,u),u+=4,h==s)return p}return 0}};e._bin={readFixed:function(i,s){return(i[s]<<8|i[s+1])+(i[s+2]<<8|i[s+3])/65540},readF2dot14:function(i,s){return e._bin.readShort(i,s)/16384},readInt:function(i,s){return e._bin._view(i).getInt32(s)},readInt8:function(i,s){return e._bin._view(i).getInt8(s)},readShort:function(i,s){return e._bin._view(i).getInt16(s)},readUshort:function(i,s){return e._bin._view(i).getUint16(s)},readUshorts:function(i,s,o){for(var a=[],l=0;l<o;l++)a.push(e._bin.readUshort(i,s+2*l));return a},readUint:function(i,s){return e._bin._view(i).getUint32(s)},readUint64:function(i,s){return 4294967296*e._bin.readUint(i,s)+e._bin.readUint(i,s+4)},readASCII:function(i,s,o){for(var a=\"\",l=0;l<o;l++)a+=String.fromCharCode(i[s+l]);return a},readUnicode:function(i,s,o){for(var a=\"\",l=0;l<o;l++){var u=i[s++]<<8|i[s++];a+=String.fromCharCode(u)}return a},_tdec:typeof window<\"u\"&&window.TextDecoder?new window.TextDecoder:null,readUTF8:function(i,s,o){var a=e._bin._tdec;return a&&s==0&&o==i.length?a.decode(i):e._bin.readASCII(i,s,o)},readBytes:function(i,s,o){for(var a=[],l=0;l<o;l++)a.push(i[s+l]);return a},readASCIIArray:function(i,s,o){for(var a=[],l=0;l<o;l++)a.push(String.fromCharCode(i[s+l]));return a},_view:function(i){return i._dataView||(i._dataView=i.buffer?new DataView(i.buffer,i.byteOffset,i.byteLength):new DataView(new Uint8Array(i).buffer))}},e._lctf={},e._lctf.parse=function(i,s,o,a,l){var u=e._bin,c={},h=s;u.readFixed(i,s),s+=4;var p=u.readUshort(i,s);s+=2;var m=u.readUshort(i,s);s+=2;var g=u.readUshort(i,s);return s+=2,c.scriptList=e._lctf.readScriptList(i,h+p),c.featureList=e._lctf.readFeatureList(i,h+m),c.lookupList=e._lctf.readLookupList(i,h+g,l),c},e._lctf.readLookupList=function(i,s,o){var a=e._bin,l=s,u=[],c=a.readUshort(i,s);s+=2;for(var h=0;h<c;h++){var p=a.readUshort(i,s);s+=2;var m=e._lctf.readLookupTable(i,l+p,o);u.push(m)}return u},e._lctf.readLookupTable=function(i,s,o){var a=e._bin,l=s,u={tabs:[]};u.ltype=a.readUshort(i,s),s+=2,u.flag=a.readUshort(i,s),s+=2;var c=a.readUshort(i,s);s+=2;for(var h=u.ltype,p=0;p<c;p++){var m=a.readUshort(i,s);s+=2;var g=o(i,h,l+m,u);u.tabs.push(g)}return u},e._lctf.numOfOnes=function(i){for(var s=0,o=0;o<32;o++)i>>>o&1&&s++;return s},e._lctf.readClassDef=function(i,s){var o=e._bin,a=[],l=o.readUshort(i,s);if(s+=2,l==1){var u=o.readUshort(i,s);s+=2;var c=o.readUshort(i,s);s+=2;for(var h=0;h<c;h++)a.push(u+h),a.push(u+h),a.push(o.readUshort(i,s)),s+=2}if(l==2){var p=o.readUshort(i,s);for(s+=2,h=0;h<p;h++)a.push(o.readUshort(i,s)),s+=2,a.push(o.readUshort(i,s)),s+=2,a.push(o.readUshort(i,s)),s+=2}return a},e._lctf.getInterval=function(i,s){for(var o=0;o<i.length;o+=3){var a=i[o],l=i[o+1];if(i[o+2],a<=s&&s<=l)return o}return-1},e._lctf.readCoverage=function(i,s){var o=e._bin,a={};a.fmt=o.readUshort(i,s),s+=2;var l=o.readUshort(i,s);return s+=2,a.fmt==1&&(a.tab=o.readUshorts(i,s,l)),a.fmt==2&&(a.tab=o.readUshorts(i,s,3*l)),a},e._lctf.coverageIndex=function(i,s){var o=i.tab;if(i.fmt==1)return o.indexOf(s);if(i.fmt==2){var a=e._lctf.getInterval(o,s);if(a!=-1)return o[a+2]+(s-o[a])}return-1},e._lctf.readFeatureList=function(i,s){var o=e._bin,a=s,l=[],u=o.readUshort(i,s);s+=2;for(var c=0;c<u;c++){var h=o.readASCII(i,s,4);s+=4;var p=o.readUshort(i,s);s+=2;var m=e._lctf.readFeatureTable(i,a+p);m.tag=h.trim(),l.push(m)}return l},e._lctf.readFeatureTable=function(i,s){var o=e._bin,a=s,l={},u=o.readUshort(i,s);s+=2,u>0&&(l.featureParams=a+u);var c=o.readUshort(i,s);s+=2,l.tab=[];for(var h=0;h<c;h++)l.tab.push(o.readUshort(i,s+2*h));return l},e._lctf.readScriptList=function(i,s){var o=e._bin,a=s,l={},u=o.readUshort(i,s);s+=2;for(var c=0;c<u;c++){var h=o.readASCII(i,s,4);s+=4;var p=o.readUshort(i,s);s+=2,l[h.trim()]=e._lctf.readScriptTable(i,a+p)}return l},e._lctf.readScriptTable=function(i,s){var o=e._bin,a=s,l={},u=o.readUshort(i,s);s+=2,l.default=e._lctf.readLangSysTable(i,a+u);var c=o.readUshort(i,s);s+=2;for(var h=0;h<c;h++){var p=o.readASCII(i,s,4);s+=4;var m=o.readUshort(i,s);s+=2,l[p.trim()]=e._lctf.readLangSysTable(i,a+m)}return l},e._lctf.readLangSysTable=function(i,s){var o=e._bin,a={};o.readUshort(i,s),s+=2,a.reqFeature=o.readUshort(i,s),s+=2;var l=o.readUshort(i,s);return s+=2,a.features=o.readUshorts(i,s,l),a},e.CFF={},e.CFF.parse=function(i,s,o){var a=e._bin;(i=new Uint8Array(i.buffer,s,o))[s=0],i[++s],i[++s],i[++s],s++;var l=[];s=e.CFF.readIndex(i,s,l);for(var u=[],c=0;c<l.length-1;c++)u.push(a.readASCII(i,s+l[c],l[c+1]-l[c]));s+=l[l.length-1];var h=[];s=e.CFF.readIndex(i,s,h);var p=[];for(c=0;c<h.length-1;c++)p.push(e.CFF.readDict(i,s+h[c],s+h[c+1]));s+=h[h.length-1];var m=p[0],g=[];s=e.CFF.readIndex(i,s,g);var v=[];for(c=0;c<g.length-1;c++)v.push(a.readASCII(i,s+g[c],g[c+1]-g[c]));if(s+=g[g.length-1],e.CFF.readSubrs(i,s,m),m.CharStrings){s=m.CharStrings,g=[],s=e.CFF.readIndex(i,s,g);var y=[];for(c=0;c<g.length-1;c++)y.push(a.readBytes(i,s+g[c],g[c+1]-g[c]));m.CharStrings=y}if(m.ROS){s=m.FDArray;var _=[];for(s=e.CFF.readIndex(i,s,_),m.FDArray=[],c=0;c<_.length-1;c++){var w=e.CFF.readDict(i,s+_[c],s+_[c+1]);e.CFF._readFDict(i,w,v),m.FDArray.push(w)}s+=_[_.length-1],s=m.FDSelect,m.FDSelect=[];var S=i[s];if(s++,S!=3)throw S;var A=a.readUshort(i,s);for(s+=2,c=0;c<A+1;c++)m.FDSelect.push(a.readUshort(i,s),i[s+2]),s+=3}return m.Encoding&&(m.Encoding=e.CFF.readEncoding(i,m.Encoding,m.CharStrings.length)),m.charset&&(m.charset=e.CFF.readCharset(i,m.charset,m.CharStrings.length)),e.CFF._readFDict(i,m,v),m},e.CFF._readFDict=function(i,s,o){var a;for(var l in s.Private&&(a=s.Private[1],s.Private=e.CFF.readDict(i,a,a+s.Private[0]),s.Private.Subrs&&e.CFF.readSubrs(i,a+s.Private.Subrs,s.Private)),s)[\"FamilyName\",\"FontName\",\"FullName\",\"Notice\",\"version\",\"Copyright\"].indexOf(l)!=-1&&(s[l]=o[s[l]-426+35])},e.CFF.readSubrs=function(i,s,o){var a=e._bin,l=[];s=e.CFF.readIndex(i,s,l);var u,c=l.length;u=c<1240?107:c<33900?1131:32768,o.Bias=u,o.Subrs=[];for(var h=0;h<l.length-1;h++)o.Subrs.push(a.readBytes(i,s+l[h],l[h+1]-l[h]))},e.CFF.tableSE=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,0,111,112,113,114,0,115,116,117,118,119,120,121,122,0,123,0,124,125,126,127,128,129,130,131,0,132,133,0,134,135,136,137,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,138,0,139,0,0,0,0,140,141,142,143,0,0,0,0,0,144,0,0,0,145,0,0,146,147,148,149,0,0,0,0],e.CFF.glyphByUnicode=function(i,s){for(var o=0;o<i.charset.length;o++)if(i.charset[o]==s)return o;return-1},e.CFF.glyphBySE=function(i,s){return s<0||s>255?-1:e.CFF.glyphByUnicode(i,e.CFF.tableSE[s])},e.CFF.readEncoding=function(i,s,o){e._bin;var a=[\".notdef\"],l=i[s];if(s++,l!=0)throw\"error: unknown encoding format: \"+l;var u=i[s];s++;for(var c=0;c<u;c++)a.push(i[s+c]);return a},e.CFF.readCharset=function(i,s,o){var a=e._bin,l=[\".notdef\"],u=i[s];if(s++,u==0)for(var c=0;c<o;c++){var h=a.readUshort(i,s);s+=2,l.push(h)}else{if(u!=1&&u!=2)throw\"error: format: \"+u;for(;l.length<o;){h=a.readUshort(i,s),s+=2;var p=0;for(u==1?(p=i[s],s++):(p=a.readUshort(i,s),s+=2),c=0;c<=p;c++)l.push(h),h++}}return l},e.CFF.readIndex=function(i,s,o){var a=e._bin,l=a.readUshort(i,s)+1,u=i[s+=2];if(s++,u==1)for(var c=0;c<l;c++)o.push(i[s+c]);else if(u==2)for(c=0;c<l;c++)o.push(a.readUshort(i,s+2*c));else if(u==3)for(c=0;c<l;c++)o.push(16777215&a.readUint(i,s+3*c-1));else if(l!=1)throw\"unsupported offset size: \"+u+\", count: \"+l;return(s+=l*u)-1},e.CFF.getCharString=function(i,s,o){var a=e._bin,l=i[s],u=i[s+1];i[s+2],i[s+3],i[s+4];var c=1,h=null,p=null;l<=20&&(h=l,c=1),l==12&&(h=100*l+u,c=2),21<=l&&l<=27&&(h=l,c=1),l==28&&(p=a.readShort(i,s+1),c=3),29<=l&&l<=31&&(h=l,c=1),32<=l&&l<=246&&(p=l-139,c=1),247<=l&&l<=250&&(p=256*(l-247)+u+108,c=2),251<=l&&l<=254&&(p=256*-(l-251)-u-108,c=2),l==255&&(p=a.readInt(i,s+1)/65535,c=5),o.val=p??\"o\"+h,o.size=c},e.CFF.readCharString=function(i,s,o){for(var a=s+o,l=e._bin,u=[];s<a;){var c=i[s],h=i[s+1];i[s+2],i[s+3],i[s+4];var p=1,m=null,g=null;c<=20&&(m=c,p=1),c==12&&(m=100*c+h,p=2),c!=19&&c!=20||(m=c,p=2),21<=c&&c<=27&&(m=c,p=1),c==28&&(g=l.readShort(i,s+1),p=3),29<=c&&c<=31&&(m=c,p=1),32<=c&&c<=246&&(g=c-139,p=1),247<=c&&c<=250&&(g=256*(c-247)+h+108,p=2),251<=c&&c<=254&&(g=256*-(c-251)-h-108,p=2),c==255&&(g=l.readInt(i,s+1)/65535,p=5),u.push(g??\"o\"+m),s+=p}return u},e.CFF.readDict=function(i,s,o){for(var a=e._bin,l={},u=[];s<o;){var c=i[s],h=i[s+1];i[s+2],i[s+3],i[s+4];var p=1,m=null,g=null;if(c==28&&(g=a.readShort(i,s+1),p=3),c==29&&(g=a.readInt(i,s+1),p=5),32<=c&&c<=246&&(g=c-139,p=1),247<=c&&c<=250&&(g=256*(c-247)+h+108,p=2),251<=c&&c<=254&&(g=256*-(c-251)-h-108,p=2),c==255)throw g=a.readInt(i,s+1)/65535,p=5,\"unknown number\";if(c==30){var v=[];for(p=1;;){var y=i[s+p];p++;var _=y>>4,w=15&y;if(_!=15&&v.push(_),w!=15&&v.push(w),w==15)break}for(var S=\"\",A=[0,1,2,3,4,5,6,7,8,9,\".\",\"e\",\"e-\",\"reserved\",\"-\",\"endOfNumber\"],C=0;C<v.length;C++)S+=A[v[C]];g=parseFloat(S)}c<=21&&(m=[\"version\",\"Notice\",\"FullName\",\"FamilyName\",\"Weight\",\"FontBBox\",\"BlueValues\",\"OtherBlues\",\"FamilyBlues\",\"FamilyOtherBlues\",\"StdHW\",\"StdVW\",\"escape\",\"UniqueID\",\"XUID\",\"charset\",\"Encoding\",\"CharStrings\",\"Private\",\"Subrs\",\"defaultWidthX\",\"nominalWidthX\"][c],p=1,c==12&&(m=[\"Copyright\",\"isFixedPitch\",\"ItalicAngle\",\"UnderlinePosition\",\"UnderlineThickness\",\"PaintType\",\"CharstringType\",\"FontMatrix\",\"StrokeWidth\",\"BlueScale\",\"BlueShift\",\"BlueFuzz\",\"StemSnapH\",\"StemSnapV\",\"ForceBold\",0,0,\"LanguageGroup\",\"ExpansionFactor\",\"initialRandomSeed\",\"SyntheticBase\",\"PostScript\",\"BaseFontName\",\"BaseFontBlend\",0,0,0,0,0,0,\"ROS\",\"CIDFontVersion\",\"CIDFontRevision\",\"CIDFontType\",\"CIDCount\",\"UIDBase\",\"FDArray\",\"FDSelect\",\"FontName\"][h],p=2)),m!=null?(l[m]=u.length==1?u[0]:u,u=[]):u.push(g),s+=p}return l},e.cmap={},e.cmap.parse=function(i,s,o){i=new Uint8Array(i.buffer,s,o),s=0;var a=e._bin,l={};a.readUshort(i,s),s+=2;var u=a.readUshort(i,s);s+=2;var c=[];l.tables=[];for(var h=0;h<u;h++){var p=a.readUshort(i,s);s+=2;var m=a.readUshort(i,s);s+=2;var g=a.readUint(i,s);s+=4;var v=\"p\"+p+\"e\"+m,y=c.indexOf(g);if(y==-1){var _;y=l.tables.length,c.push(g);var w=a.readUshort(i,g);w==0?_=e.cmap.parse0(i,g):w==4?_=e.cmap.parse4(i,g):w==6?_=e.cmap.parse6(i,g):w==12?_=e.cmap.parse12(i,g):console.debug(\"unknown format: \"+w,p,m,g),l.tables.push(_)}if(l[v]!=null)throw\"multiple tables for one platform+encoding\";l[v]=y}return l},e.cmap.parse0=function(i,s){var o=e._bin,a={};a.format=o.readUshort(i,s),s+=2;var l=o.readUshort(i,s);s+=2,o.readUshort(i,s),s+=2,a.map=[];for(var u=0;u<l-6;u++)a.map.push(i[s+u]);return a},e.cmap.parse4=function(i,s){var o=e._bin,a=s,l={};l.format=o.readUshort(i,s),s+=2;var u=o.readUshort(i,s);s+=2,o.readUshort(i,s),s+=2;var c=o.readUshort(i,s);s+=2;var h=c/2;l.searchRange=o.readUshort(i,s),s+=2,l.entrySelector=o.readUshort(i,s),s+=2,l.rangeShift=o.readUshort(i,s),s+=2,l.endCount=o.readUshorts(i,s,h),s+=2*h,s+=2,l.startCount=o.readUshorts(i,s,h),s+=2*h,l.idDelta=[];for(var p=0;p<h;p++)l.idDelta.push(o.readShort(i,s)),s+=2;for(l.idRangeOffset=o.readUshorts(i,s,h),s+=2*h,l.glyphIdArray=[];s<a+u;)l.glyphIdArray.push(o.readUshort(i,s)),s+=2;return l},e.cmap.parse6=function(i,s){var o=e._bin,a={};a.format=o.readUshort(i,s),s+=2,o.readUshort(i,s),s+=2,o.readUshort(i,s),s+=2,a.firstCode=o.readUshort(i,s),s+=2;var l=o.readUshort(i,s);s+=2,a.glyphIdArray=[];for(var u=0;u<l;u++)a.glyphIdArray.push(o.readUshort(i,s)),s+=2;return a},e.cmap.parse12=function(i,s){var o=e._bin,a={};a.format=o.readUshort(i,s),s+=2,s+=2,o.readUint(i,s),s+=4,o.readUint(i,s),s+=4;var l=o.readUint(i,s);s+=4,a.groups=[];for(var u=0;u<l;u++){var c=s+12*u,h=o.readUint(i,c+0),p=o.readUint(i,c+4),m=o.readUint(i,c+8);a.groups.push([h,p,m])}return a},e.glyf={},e.glyf.parse=function(i,s,o,a){for(var l=[],u=0;u<a.maxp.numGlyphs;u++)l.push(null);return l},e.glyf._parseGlyf=function(i,s){var o=e._bin,a=i._data,l=e._tabOffset(a,\"glyf\",i._offset)+i.loca[s];if(i.loca[s]==i.loca[s+1])return null;var u={};if(u.noc=o.readShort(a,l),l+=2,u.xMin=o.readShort(a,l),l+=2,u.yMin=o.readShort(a,l),l+=2,u.xMax=o.readShort(a,l),l+=2,u.yMax=o.readShort(a,l),l+=2,u.xMin>=u.xMax||u.yMin>=u.yMax)return null;if(u.noc>0){u.endPts=[];for(var c=0;c<u.noc;c++)u.endPts.push(o.readUshort(a,l)),l+=2;var h=o.readUshort(a,l);if(l+=2,a.length-l<h)return null;u.instructions=o.readBytes(a,l,h),l+=h;var p=u.endPts[u.noc-1]+1;for(u.flags=[],c=0;c<p;c++){var m=a[l];if(l++,u.flags.push(m),(8&m)!=0){var g=a[l];l++;for(var v=0;v<g;v++)u.flags.push(m),c++}}for(u.xs=[],c=0;c<p;c++){var y=(2&u.flags[c])!=0,_=(16&u.flags[c])!=0;y?(u.xs.push(_?a[l]:-a[l]),l++):_?u.xs.push(0):(u.xs.push(o.readShort(a,l)),l+=2)}for(u.ys=[],c=0;c<p;c++)y=(4&u.flags[c])!=0,_=(32&u.flags[c])!=0,y?(u.ys.push(_?a[l]:-a[l]),l++):_?u.ys.push(0):(u.ys.push(o.readShort(a,l)),l+=2);var w=0,S=0;for(c=0;c<p;c++)w+=u.xs[c],S+=u.ys[c],u.xs[c]=w,u.ys[c]=S}else{var A;u.parts=[];do{A=o.readUshort(a,l),l+=2;var C={m:{a:1,b:0,c:0,d:1,tx:0,ty:0},p1:-1,p2:-1};if(u.parts.push(C),C.glyphIndex=o.readUshort(a,l),l+=2,1&A){var T=o.readShort(a,l);l+=2;var R=o.readShort(a,l);l+=2}else T=o.readInt8(a,l),l++,R=o.readInt8(a,l),l++;2&A?(C.m.tx=T,C.m.ty=R):(C.p1=T,C.p2=R),8&A?(C.m.a=C.m.d=o.readF2dot14(a,l),l+=2):64&A?(C.m.a=o.readF2dot14(a,l),l+=2,C.m.d=o.readF2dot14(a,l),l+=2):128&A&&(C.m.a=o.readF2dot14(a,l),l+=2,C.m.b=o.readF2dot14(a,l),l+=2,C.m.c=o.readF2dot14(a,l),l+=2,C.m.d=o.readF2dot14(a,l),l+=2)}while(32&A);if(256&A){var b=o.readUshort(a,l);for(l+=2,u.instr=[],c=0;c<b;c++)u.instr.push(a[l]),l++}}return u},e.GPOS={},e.GPOS.parse=function(i,s,o,a){return e._lctf.parse(i,s,o,a,e.GPOS.subt)},e.GPOS.subt=function(i,s,o,a){var l=e._bin,u=o,c={};if(c.fmt=l.readUshort(i,o),o+=2,s==1||s==2||s==3||s==7||s==8&&c.fmt<=2){var h=l.readUshort(i,o);o+=2,c.coverage=e._lctf.readCoverage(i,h+u)}if(s==1&&c.fmt==1){var p=l.readUshort(i,o);o+=2;var m=e._lctf.numOfOnes(p);p!=0&&(c.pos=e.GPOS.readValueRecord(i,o,p))}else if(s==2&&c.fmt>=1&&c.fmt<=2){p=l.readUshort(i,o),o+=2;var g=l.readUshort(i,o);o+=2,m=e._lctf.numOfOnes(p);var v=e._lctf.numOfOnes(g);if(c.fmt==1){c.pairsets=[];var y=l.readUshort(i,o);o+=2;for(var _=0;_<y;_++){var w=u+l.readUshort(i,o);o+=2;var S=l.readUshort(i,w);w+=2;for(var A=[],C=0;C<S;C++){var T=l.readUshort(i,w);w+=2,p!=0&&(N=e.GPOS.readValueRecord(i,w,p),w+=2*m),g!=0&&(U=e.GPOS.readValueRecord(i,w,g),w+=2*v),A.push({gid2:T,val1:N,val2:U})}c.pairsets.push(A)}}if(c.fmt==2){var R=l.readUshort(i,o);o+=2;var b=l.readUshort(i,o);o+=2;var I=l.readUshort(i,o);o+=2;var D=l.readUshort(i,o);for(o+=2,c.classDef1=e._lctf.readClassDef(i,u+R),c.classDef2=e._lctf.readClassDef(i,u+b),c.matrix=[],_=0;_<I;_++){var G=[];for(C=0;C<D;C++){var N=null,U=null;p!=0&&(N=e.GPOS.readValueRecord(i,o,p),o+=2*m),g!=0&&(U=e.GPOS.readValueRecord(i,o,g),o+=2*v),G.push({val1:N,val2:U})}c.matrix.push(G)}}}else{if(s==9&&c.fmt==1){var F=l.readUshort(i,o);o+=2;var X=l.readUint(i,o);if(o+=4,a.ltype==9)a.ltype=F;else if(a.ltype!=F)throw\"invalid extension substitution\";return e.GPOS.subt(i,a.ltype,u+X)}console.debug(\"unsupported GPOS table LookupType\",s,\"format\",c.fmt)}return c},e.GPOS.readValueRecord=function(i,s,o){var a=e._bin,l=[];return l.push(1&o?a.readShort(i,s):0),s+=1&o?2:0,l.push(2&o?a.readShort(i,s):0),s+=2&o?2:0,l.push(4&o?a.readShort(i,s):0),s+=4&o?2:0,l.push(8&o?a.readShort(i,s):0),s+=8&o?2:0,l},e.GSUB={},e.GSUB.parse=function(i,s,o,a){return e._lctf.parse(i,s,o,a,e.GSUB.subt)},e.GSUB.subt=function(i,s,o,a){var l=e._bin,u=o,c={};if(c.fmt=l.readUshort(i,o),o+=2,s!=1&&s!=4&&s!=5&&s!=6)return null;if(s==1||s==4||s==5&&c.fmt<=2||s==6&&c.fmt<=2){var h=l.readUshort(i,o);o+=2,c.coverage=e._lctf.readCoverage(i,u+h)}if(s==1&&c.fmt>=1&&c.fmt<=2){if(c.fmt==1)c.delta=l.readShort(i,o),o+=2;else if(c.fmt==2){var p=l.readUshort(i,o);o+=2,c.newg=l.readUshorts(i,o,p),o+=2*c.newg.length}}else if(s==4){c.vals=[],p=l.readUshort(i,o),o+=2;for(var m=0;m<p;m++){var g=l.readUshort(i,o);o+=2,c.vals.push(e.GSUB.readLigatureSet(i,u+g))}}else if(s==5&&c.fmt==2){if(c.fmt==2){var v=l.readUshort(i,o);o+=2,c.cDef=e._lctf.readClassDef(i,u+v),c.scset=[];var y=l.readUshort(i,o);for(o+=2,m=0;m<y;m++){var _=l.readUshort(i,o);o+=2,c.scset.push(_==0?null:e.GSUB.readSubClassSet(i,u+_))}}}else if(s==6&&c.fmt==3){if(c.fmt==3){for(m=0;m<3;m++){p=l.readUshort(i,o),o+=2;for(var w=[],S=0;S<p;S++)w.push(e._lctf.readCoverage(i,u+l.readUshort(i,o+2*S)));o+=2*p,m==0&&(c.backCvg=w),m==1&&(c.inptCvg=w),m==2&&(c.ahedCvg=w)}p=l.readUshort(i,o),o+=2,c.lookupRec=e.GSUB.readSubstLookupRecords(i,o,p)}}else{if(s==7&&c.fmt==1){var A=l.readUshort(i,o);o+=2;var C=l.readUint(i,o);if(o+=4,a.ltype==9)a.ltype=A;else if(a.ltype!=A)throw\"invalid extension substitution\";return e.GSUB.subt(i,a.ltype,u+C)}console.debug(\"unsupported GSUB table LookupType\",s,\"format\",c.fmt)}return c},e.GSUB.readSubClassSet=function(i,s){var o=e._bin.readUshort,a=s,l=[],u=o(i,s);s+=2;for(var c=0;c<u;c++){var h=o(i,s);s+=2,l.push(e.GSUB.readSubClassRule(i,a+h))}return l},e.GSUB.readSubClassRule=function(i,s){var o=e._bin.readUshort,a={},l=o(i,s),u=o(i,s+=2);s+=2,a.input=[];for(var c=0;c<l-1;c++)a.input.push(o(i,s)),s+=2;return a.substLookupRecords=e.GSUB.readSubstLookupRecords(i,s,u),a},e.GSUB.readSubstLookupRecords=function(i,s,o){for(var a=e._bin.readUshort,l=[],u=0;u<o;u++)l.push(a(i,s),a(i,s+2)),s+=4;return l},e.GSUB.readChainSubClassSet=function(i,s){var o=e._bin,a=s,l=[],u=o.readUshort(i,s);s+=2;for(var c=0;c<u;c++){var h=o.readUshort(i,s);s+=2,l.push(e.GSUB.readChainSubClassRule(i,a+h))}return l},e.GSUB.readChainSubClassRule=function(i,s){for(var o=e._bin,a={},l=[\"backtrack\",\"input\",\"lookahead\"],u=0;u<l.length;u++){var c=o.readUshort(i,s);s+=2,u==1&&c--,a[l[u]]=o.readUshorts(i,s,c),s+=2*a[l[u]].length}return c=o.readUshort(i,s),s+=2,a.subst=o.readUshorts(i,s,2*c),s+=2*a.subst.length,a},e.GSUB.readLigatureSet=function(i,s){var o=e._bin,a=s,l=[],u=o.readUshort(i,s);s+=2;for(var c=0;c<u;c++){var h=o.readUshort(i,s);s+=2,l.push(e.GSUB.readLigature(i,a+h))}return l},e.GSUB.readLigature=function(i,s){var o=e._bin,a={chain:[]};a.nglyph=o.readUshort(i,s),s+=2;var l=o.readUshort(i,s);s+=2;for(var u=0;u<l-1;u++)a.chain.push(o.readUshort(i,s)),s+=2;return a},e.head={},e.head.parse=function(i,s,o){var a=e._bin,l={};return a.readFixed(i,s),s+=4,l.fontRevision=a.readFixed(i,s),s+=4,a.readUint(i,s),s+=4,a.readUint(i,s),s+=4,l.flags=a.readUshort(i,s),s+=2,l.unitsPerEm=a.readUshort(i,s),s+=2,l.created=a.readUint64(i,s),s+=8,l.modified=a.readUint64(i,s),s+=8,l.xMin=a.readShort(i,s),s+=2,l.yMin=a.readShort(i,s),s+=2,l.xMax=a.readShort(i,s),s+=2,l.yMax=a.readShort(i,s),s+=2,l.macStyle=a.readUshort(i,s),s+=2,l.lowestRecPPEM=a.readUshort(i,s),s+=2,l.fontDirectionHint=a.readShort(i,s),s+=2,l.indexToLocFormat=a.readShort(i,s),s+=2,l.glyphDataFormat=a.readShort(i,s),s+=2,l},e.hhea={},e.hhea.parse=function(i,s,o){var a=e._bin,l={};return a.readFixed(i,s),s+=4,l.ascender=a.readShort(i,s),s+=2,l.descender=a.readShort(i,s),s+=2,l.lineGap=a.readShort(i,s),s+=2,l.advanceWidthMax=a.readUshort(i,s),s+=2,l.minLeftSideBearing=a.readShort(i,s),s+=2,l.minRightSideBearing=a.readShort(i,s),s+=2,l.xMaxExtent=a.readShort(i,s),s+=2,l.caretSlopeRise=a.readShort(i,s),s+=2,l.caretSlopeRun=a.readShort(i,s),s+=2,l.caretOffset=a.readShort(i,s),s+=2,s+=8,l.metricDataFormat=a.readShort(i,s),s+=2,l.numberOfHMetrics=a.readUshort(i,s),s+=2,l},e.hmtx={},e.hmtx.parse=function(i,s,o,a){for(var l=e._bin,u={aWidth:[],lsBearing:[]},c=0,h=0,p=0;p<a.maxp.numGlyphs;p++)p<a.hhea.numberOfHMetrics&&(c=l.readUshort(i,s),s+=2,h=l.readShort(i,s),s+=2),u.aWidth.push(c),u.lsBearing.push(h);return u},e.kern={},e.kern.parse=function(i,s,o,a){var l=e._bin,u=l.readUshort(i,s);if(s+=2,u==1)return e.kern.parseV1(i,s-2,o,a);var c=l.readUshort(i,s);s+=2;for(var h={glyph1:[],rval:[]},p=0;p<c;p++){s+=2,o=l.readUshort(i,s),s+=2;var m=l.readUshort(i,s);s+=2;var g=m>>>8;if((g&=15)!=0)throw\"unknown kern table format: \"+g;s=e.kern.readFormat0(i,s,h)}return h},e.kern.parseV1=function(i,s,o,a){var l=e._bin;l.readFixed(i,s),s+=4;var u=l.readUint(i,s);s+=4;for(var c={glyph1:[],rval:[]},h=0;h<u;h++){l.readUint(i,s),s+=4;var p=l.readUshort(i,s);s+=2,l.readUshort(i,s),s+=2;var m=p>>>8;if((m&=15)!=0)throw\"unknown kern table format: \"+m;s=e.kern.readFormat0(i,s,c)}return c},e.kern.readFormat0=function(i,s,o){var a=e._bin,l=-1,u=a.readUshort(i,s);s+=2,a.readUshort(i,s),s+=2,a.readUshort(i,s),s+=2,a.readUshort(i,s),s+=2;for(var c=0;c<u;c++){var h=a.readUshort(i,s);s+=2;var p=a.readUshort(i,s);s+=2;var m=a.readShort(i,s);s+=2,h!=l&&(o.glyph1.push(h),o.rval.push({glyph2:[],vals:[]}));var g=o.rval[o.rval.length-1];g.glyph2.push(p),g.vals.push(m),l=h}return s},e.loca={},e.loca.parse=function(i,s,o,a){var l=e._bin,u=[],c=a.head.indexToLocFormat,h=a.maxp.numGlyphs+1;if(c==0)for(var p=0;p<h;p++)u.push(l.readUshort(i,s+(p<<1))<<1);if(c==1)for(p=0;p<h;p++)u.push(l.readUint(i,s+(p<<2)));return u},e.maxp={},e.maxp.parse=function(i,s,o){var a=e._bin,l={},u=a.readUint(i,s);return s+=4,l.numGlyphs=a.readUshort(i,s),s+=2,u==65536&&(l.maxPoints=a.readUshort(i,s),s+=2,l.maxContours=a.readUshort(i,s),s+=2,l.maxCompositePoints=a.readUshort(i,s),s+=2,l.maxCompositeContours=a.readUshort(i,s),s+=2,l.maxZones=a.readUshort(i,s),s+=2,l.maxTwilightPoints=a.readUshort(i,s),s+=2,l.maxStorage=a.readUshort(i,s),s+=2,l.maxFunctionDefs=a.readUshort(i,s),s+=2,l.maxInstructionDefs=a.readUshort(i,s),s+=2,l.maxStackElements=a.readUshort(i,s),s+=2,l.maxSizeOfInstructions=a.readUshort(i,s),s+=2,l.maxComponentElements=a.readUshort(i,s),s+=2,l.maxComponentDepth=a.readUshort(i,s),s+=2),l},e.name={},e.name.parse=function(i,s,o){var a=e._bin,l={};a.readUshort(i,s),s+=2;var u=a.readUshort(i,s);s+=2,a.readUshort(i,s);for(var c,h=[\"copyright\",\"fontFamily\",\"fontSubfamily\",\"ID\",\"fullName\",\"version\",\"postScriptName\",\"trademark\",\"manufacturer\",\"designer\",\"description\",\"urlVendor\",\"urlDesigner\",\"licence\",\"licenceURL\",\"---\",\"typoFamilyName\",\"typoSubfamilyName\",\"compatibleFull\",\"sampleText\",\"postScriptCID\",\"wwsFamilyName\",\"wwsSubfamilyName\",\"lightPalette\",\"darkPalette\"],p=s+=2,m=0;m<u;m++){var g=a.readUshort(i,s);s+=2;var v=a.readUshort(i,s);s+=2;var y=a.readUshort(i,s);s+=2;var _=a.readUshort(i,s);s+=2;var w=a.readUshort(i,s);s+=2;var S=a.readUshort(i,s);s+=2;var A,C=h[_],T=p+12*u+S;if(g==0)A=a.readUnicode(i,T,w/2);else if(g==3&&v==0)A=a.readUnicode(i,T,w/2);else if(v==0)A=a.readASCII(i,T,w);else if(v==1)A=a.readUnicode(i,T,w/2);else if(v==3)A=a.readUnicode(i,T,w/2);else{if(g!=1)throw\"unknown encoding \"+v+\", platformID: \"+g;A=a.readASCII(i,T,w),console.debug(\"reading unknown MAC encoding \"+v+\" as ASCII\")}var R=\"p\"+g+\",\"+y.toString(16);l[R]==null&&(l[R]={}),l[R][C!==void 0?C:_]=A,l[R]._lang=y}for(var b in l)if(l[b].postScriptName!=null&&l[b]._lang==1033)return l[b];for(var b in l)if(l[b].postScriptName!=null&&l[b]._lang==0)return l[b];for(var b in l)if(l[b].postScriptName!=null&&l[b]._lang==3084)return l[b];for(var b in l)if(l[b].postScriptName!=null)return l[b];for(var b in l){c=b;break}return console.debug(\"returning name table with languageID \"+l[c]._lang),l[c]},e[\"OS/2\"]={},e[\"OS/2\"].parse=function(i,s,o){var a=e._bin.readUshort(i,s);s+=2;var l={};if(a==0)e[\"OS/2\"].version0(i,s,l);else if(a==1)e[\"OS/2\"].version1(i,s,l);else if(a==2||a==3||a==4)e[\"OS/2\"].version2(i,s,l);else{if(a!=5)throw\"unknown OS/2 table version: \"+a;e[\"OS/2\"].version5(i,s,l)}return l},e[\"OS/2\"].version0=function(i,s,o){var a=e._bin;return o.xAvgCharWidth=a.readShort(i,s),s+=2,o.usWeightClass=a.readUshort(i,s),s+=2,o.usWidthClass=a.readUshort(i,s),s+=2,o.fsType=a.readUshort(i,s),s+=2,o.ySubscriptXSize=a.readShort(i,s),s+=2,o.ySubscriptYSize=a.readShort(i,s),s+=2,o.ySubscriptXOffset=a.readShort(i,s),s+=2,o.ySubscriptYOffset=a.readShort(i,s),s+=2,o.ySuperscriptXSize=a.readShort(i,s),s+=2,o.ySuperscriptYSize=a.readShort(i,s),s+=2,o.ySuperscriptXOffset=a.readShort(i,s),s+=2,o.ySuperscriptYOffset=a.readShort(i,s),s+=2,o.yStrikeoutSize=a.readShort(i,s),s+=2,o.yStrikeoutPosition=a.readShort(i,s),s+=2,o.sFamilyClass=a.readShort(i,s),s+=2,o.panose=a.readBytes(i,s,10),s+=10,o.ulUnicodeRange1=a.readUint(i,s),s+=4,o.ulUnicodeRange2=a.readUint(i,s),s+=4,o.ulUnicodeRange3=a.readUint(i,s),s+=4,o.ulUnicodeRange4=a.readUint(i,s),s+=4,o.achVendID=[a.readInt8(i,s),a.readInt8(i,s+1),a.readInt8(i,s+2),a.readInt8(i,s+3)],s+=4,o.fsSelection=a.readUshort(i,s),s+=2,o.usFirstCharIndex=a.readUshort(i,s),s+=2,o.usLastCharIndex=a.readUshort(i,s),s+=2,o.sTypoAscender=a.readShort(i,s),s+=2,o.sTypoDescender=a.readShort(i,s),s+=2,o.sTypoLineGap=a.readShort(i,s),s+=2,o.usWinAscent=a.readUshort(i,s),s+=2,o.usWinDescent=a.readUshort(i,s),s+=2},e[\"OS/2\"].version1=function(i,s,o){var a=e._bin;return s=e[\"OS/2\"].version0(i,s,o),o.ulCodePageRange1=a.readUint(i,s),s+=4,o.ulCodePageRange2=a.readUint(i,s),s+=4},e[\"OS/2\"].version2=function(i,s,o){var a=e._bin;return s=e[\"OS/2\"].version1(i,s,o),o.sxHeight=a.readShort(i,s),s+=2,o.sCapHeight=a.readShort(i,s),s+=2,o.usDefault=a.readUshort(i,s),s+=2,o.usBreak=a.readUshort(i,s),s+=2,o.usMaxContext=a.readUshort(i,s),s+=2},e[\"OS/2\"].version5=function(i,s,o){var a=e._bin;return s=e[\"OS/2\"].version2(i,s,o),o.usLowerOpticalPointSize=a.readUshort(i,s),s+=2,o.usUpperOpticalPointSize=a.readUshort(i,s),s+=2},e.post={},e.post.parse=function(i,s,o){var a=e._bin,l={};return l.version=a.readFixed(i,s),s+=4,l.italicAngle=a.readFixed(i,s),s+=4,l.underlinePosition=a.readShort(i,s),s+=2,l.underlineThickness=a.readShort(i,s),s+=2,l},e==null&&(e={}),e.U==null&&(e.U={}),e.U.codeToGlyph=function(i,s){var o=i.cmap,a=-1;if(o.p0e4!=null?a=o.p0e4:o.p3e1!=null?a=o.p3e1:o.p1e0!=null?a=o.p1e0:o.p0e3!=null&&(a=o.p0e3),a==-1)throw\"no familiar platform and encoding!\";var l=o.tables[a];if(l.format==0)return s>=l.map.length?0:l.map[s];if(l.format==4){for(var u=-1,c=0;c<l.endCount.length;c++)if(s<=l.endCount[c]){u=c;break}return u==-1||l.startCount[u]>s?0:65535&(l.idRangeOffset[u]!=0?l.glyphIdArray[s-l.startCount[u]+(l.idRangeOffset[u]>>1)-(l.idRangeOffset.length-u)]:s+l.idDelta[u])}if(l.format==12){if(s>l.groups[l.groups.length-1][1])return 0;for(c=0;c<l.groups.length;c++){var h=l.groups[c];if(h[0]<=s&&s<=h[1])return h[2]+(s-h[0])}return 0}throw\"unknown cmap table format \"+l.format},e.U.glyphToPath=function(i,s){var o={cmds:[],crds:[]};if(i.SVG&&i.SVG.entries[s]){var a=i.SVG.entries[s];return a==null?o:(typeof a==\"string\"&&(a=e.SVG.toPath(a),i.SVG.entries[s]=a),a)}if(i.CFF){var l={x:0,y:0,stack:[],nStems:0,haveWidth:!1,width:i.CFF.Private?i.CFF.Private.defaultWidthX:0,open:!1},u=i.CFF,c=i.CFF.Private;if(u.ROS){for(var h=0;u.FDSelect[h+2]<=s;)h+=2;c=u.FDArray[u.FDSelect[h+1]].Private}e.U._drawCFF(i.CFF.CharStrings[s],l,u,c,o)}else i.glyf&&e.U._drawGlyf(s,i,o);return o},e.U._drawGlyf=function(i,s,o){var a=s.glyf[i];a==null&&(a=s.glyf[i]=e.glyf._parseGlyf(s,i)),a!=null&&(a.noc>-1?e.U._simpleGlyph(a,o):e.U._compoGlyph(a,s,o))},e.U._simpleGlyph=function(i,s){for(var o=0;o<i.noc;o++){for(var a=o==0?0:i.endPts[o-1]+1,l=i.endPts[o],u=a;u<=l;u++){var c=u==a?l:u-1,h=u==l?a:u+1,p=1&i.flags[u],m=1&i.flags[c],g=1&i.flags[h],v=i.xs[u],y=i.ys[u];if(u==a)if(p){if(!m){e.U.P.moveTo(s,v,y);continue}e.U.P.moveTo(s,i.xs[c],i.ys[c])}else m?e.U.P.moveTo(s,i.xs[c],i.ys[c]):e.U.P.moveTo(s,(i.xs[c]+v)/2,(i.ys[c]+y)/2);p?m&&e.U.P.lineTo(s,v,y):g?e.U.P.qcurveTo(s,v,y,i.xs[h],i.ys[h]):e.U.P.qcurveTo(s,v,y,(v+i.xs[h])/2,(y+i.ys[h])/2)}e.U.P.closePath(s)}},e.U._compoGlyph=function(i,s,o){for(var a=0;a<i.parts.length;a++){var l={cmds:[],crds:[]},u=i.parts[a];e.U._drawGlyf(u.glyphIndex,s,l);for(var c=u.m,h=0;h<l.crds.length;h+=2){var p=l.crds[h],m=l.crds[h+1];o.crds.push(p*c.a+m*c.b+c.tx),o.crds.push(p*c.c+m*c.d+c.ty)}for(h=0;h<l.cmds.length;h++)o.cmds.push(l.cmds[h])}},e.U._getGlyphClass=function(i,s){var o=e._lctf.getInterval(s,i);return o==-1?0:s[o+2]},e.U.getPairAdjustment=function(i,s,o){var a=!1;if(i.GPOS)for(var l=i.GPOS,u=l.lookupList,c=l.featureList,h=[],p=0;p<c.length;p++){var m=c[p];if(m.tag==\"kern\"){a=!0;for(var g=0;g<m.tab.length;g++)if(!h[m.tab[g]]){h[m.tab[g]]=!0;for(var v=u[m.tab[g]],y=0;y<v.tabs.length;y++)if(v.tabs[y]!=null){var _,w=v.tabs[y];if((!w.coverage||(_=e._lctf.coverageIndex(w.coverage,s))!=-1)&&v.ltype!=1){if(v.ltype==2){var S=null;if(w.fmt==1){var A=w.pairsets[_];for(p=0;p<A.length;p++)A[p].gid2==o&&(S=A[p])}else if(w.fmt==2){var C=e.U._getGlyphClass(s,w.classDef1),T=e.U._getGlyphClass(o,w.classDef2);S=w.matrix[C][T]}if(S){var R=0;return S.val1&&S.val1[2]&&(R+=S.val1[2]),S.val2&&S.val2[0]&&(R+=S.val2[0]),R}}}}}}}if(i.kern&&!a){var b=i.kern.glyph1.indexOf(s);if(b!=-1){var I=i.kern.rval[b].glyph2.indexOf(o);if(I!=-1)return i.kern.rval[b].vals[I]}}return 0},e.U._applySubs=function(i,s,o,a){for(var l=i.length-s-1,u=0;u<o.tabs.length;u++)if(o.tabs[u]!=null){var c,h=o.tabs[u];if(!h.coverage||(c=e._lctf.coverageIndex(h.coverage,i[s]))!=-1){if(o.ltype==1)i[s],h.fmt==1?i[s]=i[s]+h.delta:i[s]=h.newg[c];else if(o.ltype==4)for(var p=h.vals[c],m=0;m<p.length;m++){var g=p[m],v=g.chain.length;if(!(v>l)){for(var y=!0,_=0,w=0;w<v;w++){for(;i[s+_+(1+w)]==-1;)_++;g.chain[w]!=i[s+_+(1+w)]&&(y=!1)}if(y){for(i[s]=g.nglyph,w=0;w<v+_;w++)i[s+w+1]=-1;break}}}else if(o.ltype==5&&h.fmt==2)for(var S=e._lctf.getInterval(h.cDef,i[s]),A=h.cDef[S+2],C=h.scset[A],T=0;T<C.length;T++){var R=C[T],b=R.input;if(!(b.length>l)){for(y=!0,w=0;w<b.length;w++){var I=e._lctf.getInterval(h.cDef,i[s+1+w]);if(S==-1&&h.cDef[I+2]!=b[w]){y=!1;break}}if(y){var D=R.substLookupRecords;for(m=0;m<D.length;m+=2)D[m],D[m+1]}}}else if(o.ltype==6&&h.fmt==3){if(!e.U._glsCovered(i,h.backCvg,s-h.backCvg.length)||!e.U._glsCovered(i,h.inptCvg,s)||!e.U._glsCovered(i,h.ahedCvg,s+h.inptCvg.length))continue;var G=h.lookupRec;for(T=0;T<G.length;T+=2){S=G[T];var N=a[G[T+1]];e.U._applySubs(i,s+S,N,a)}}}}},e.U._glsCovered=function(i,s,o){for(var a=0;a<s.length;a++)if(e._lctf.coverageIndex(s[a],i[o+a])==-1)return!1;return!0},e.U.glyphsToPath=function(i,s,o){for(var a={cmds:[],crds:[]},l=0,u=0;u<s.length;u++){var c=s[u];if(c!=-1){for(var h=u<s.length-1&&s[u+1]!=-1?s[u+1]:0,p=e.U.glyphToPath(i,c),m=0;m<p.crds.length;m+=2)a.crds.push(p.crds[m]+l),a.crds.push(p.crds[m+1]);for(o&&a.cmds.push(o),m=0;m<p.cmds.length;m++)a.cmds.push(p.cmds[m]);o&&a.cmds.push(\"X\"),l+=i.hmtx.aWidth[c],u<s.length-1&&(l+=e.U.getPairAdjustment(i,c,h))}}return a},e.U.P={},e.U.P.moveTo=function(i,s,o){i.cmds.push(\"M\"),i.crds.push(s,o)},e.U.P.lineTo=function(i,s,o){i.cmds.push(\"L\"),i.crds.push(s,o)},e.U.P.curveTo=function(i,s,o,a,l,u,c){i.cmds.push(\"C\"),i.crds.push(s,o,a,l,u,c)},e.U.P.qcurveTo=function(i,s,o,a,l){i.cmds.push(\"Q\"),i.crds.push(s,o,a,l)},e.U.P.closePath=function(i){i.cmds.push(\"Z\")},e.U._drawCFF=function(i,s,o,a,l){for(var u=s.stack,c=s.nStems,h=s.haveWidth,p=s.width,m=s.open,g=0,v=s.x,y=s.y,_=0,w=0,S=0,A=0,C=0,T=0,R=0,b=0,I=0,D=0,G={val:0,size:0};g<i.length;){e.CFF.getCharString(i,g,G);var N=G.val;if(g+=G.size,N==\"o1\"||N==\"o18\")u.length%2!=0&&!h&&(p=u.shift()+a.nominalWidthX),c+=u.length>>1,u.length=0,h=!0;else if(N==\"o3\"||N==\"o23\")u.length%2!=0&&!h&&(p=u.shift()+a.nominalWidthX),c+=u.length>>1,u.length=0,h=!0;else if(N==\"o4\")u.length>1&&!h&&(p=u.shift()+a.nominalWidthX,h=!0),m&&e.U.P.closePath(l),y+=u.pop(),e.U.P.moveTo(l,v,y),m=!0;else if(N==\"o5\")for(;u.length>0;)v+=u.shift(),y+=u.shift(),e.U.P.lineTo(l,v,y);else if(N==\"o6\"||N==\"o7\")for(var U=u.length,F=N==\"o6\",X=0;X<U;X++){var Q=u.shift();F?v+=Q:y+=Q,F=!F,e.U.P.lineTo(l,v,y)}else if(N==\"o8\"||N==\"o24\"){U=u.length;for(var oe=0;oe+6<=U;)_=v+u.shift(),w=y+u.shift(),S=_+u.shift(),A=w+u.shift(),v=S+u.shift(),y=A+u.shift(),e.U.P.curveTo(l,_,w,S,A,v,y),oe+=6;N==\"o24\"&&(v+=u.shift(),y+=u.shift(),e.U.P.lineTo(l,v,y))}else{if(N==\"o11\")break;if(N==\"o1234\"||N==\"o1235\"||N==\"o1236\"||N==\"o1237\")N==\"o1234\"&&(w=y,S=(_=v+u.shift())+u.shift(),D=A=w+u.shift(),T=A,b=y,v=(R=(C=(I=S+u.shift())+u.shift())+u.shift())+u.shift(),e.U.P.curveTo(l,_,w,S,A,I,D),e.U.P.curveTo(l,C,T,R,b,v,y)),N==\"o1235\"&&(_=v+u.shift(),w=y+u.shift(),S=_+u.shift(),A=w+u.shift(),I=S+u.shift(),D=A+u.shift(),C=I+u.shift(),T=D+u.shift(),R=C+u.shift(),b=T+u.shift(),v=R+u.shift(),y=b+u.shift(),u.shift(),e.U.P.curveTo(l,_,w,S,A,I,D),e.U.P.curveTo(l,C,T,R,b,v,y)),N==\"o1236\"&&(_=v+u.shift(),w=y+u.shift(),S=_+u.shift(),D=A=w+u.shift(),T=A,R=(C=(I=S+u.shift())+u.shift())+u.shift(),b=T+u.shift(),v=R+u.shift(),e.U.P.curveTo(l,_,w,S,A,I,D),e.U.P.curveTo(l,C,T,R,b,v,y)),N==\"o1237\"&&(_=v+u.shift(),w=y+u.shift(),S=_+u.shift(),A=w+u.shift(),I=S+u.shift(),D=A+u.shift(),C=I+u.shift(),T=D+u.shift(),R=C+u.shift(),b=T+u.shift(),Math.abs(R-v)>Math.abs(b-y)?v=R+u.shift():y=b+u.shift(),e.U.P.curveTo(l,_,w,S,A,I,D),e.U.P.curveTo(l,C,T,R,b,v,y));else if(N==\"o14\"){if(u.length>0&&!h&&(p=u.shift()+o.nominalWidthX,h=!0),u.length==4){var O=u.shift(),H=u.shift(),J=u.shift(),k=u.shift(),j=e.CFF.glyphBySE(o,J),ne=e.CFF.glyphBySE(o,k);e.U._drawCFF(o.CharStrings[j],s,o,a,l),s.x=O,s.y=H,e.U._drawCFF(o.CharStrings[ne],s,o,a,l)}m&&(e.U.P.closePath(l),m=!1)}else if(N==\"o19\"||N==\"o20\")u.length%2!=0&&!h&&(p=u.shift()+a.nominalWidthX),c+=u.length>>1,u.length=0,h=!0,g+=c+7>>3;else if(N==\"o21\")u.length>2&&!h&&(p=u.shift()+a.nominalWidthX,h=!0),y+=u.pop(),v+=u.pop(),m&&e.U.P.closePath(l),e.U.P.moveTo(l,v,y),m=!0;else if(N==\"o22\")u.length>1&&!h&&(p=u.shift()+a.nominalWidthX,h=!0),v+=u.pop(),m&&e.U.P.closePath(l),e.U.P.moveTo(l,v,y),m=!0;else if(N==\"o25\"){for(;u.length>6;)v+=u.shift(),y+=u.shift(),e.U.P.lineTo(l,v,y);_=v+u.shift(),w=y+u.shift(),S=_+u.shift(),A=w+u.shift(),v=S+u.shift(),y=A+u.shift(),e.U.P.curveTo(l,_,w,S,A,v,y)}else if(N==\"o26\")for(u.length%2&&(v+=u.shift());u.length>0;)_=v,w=y+u.shift(),v=S=_+u.shift(),y=(A=w+u.shift())+u.shift(),e.U.P.curveTo(l,_,w,S,A,v,y);else if(N==\"o27\")for(u.length%2&&(y+=u.shift());u.length>0;)w=y,S=(_=v+u.shift())+u.shift(),A=w+u.shift(),v=S+u.shift(),y=A,e.U.P.curveTo(l,_,w,S,A,v,y);else if(N==\"o10\"||N==\"o29\"){var re=N==\"o10\"?a:o;if(u.length==0)console.debug(\"error: empty stack\");else{var ie=u.pop(),ee=re.Subrs[ie+re.Bias];s.x=v,s.y=y,s.nStems=c,s.haveWidth=h,s.width=p,s.open=m,e.U._drawCFF(ee,s,o,a,l),v=s.x,y=s.y,c=s.nStems,h=s.haveWidth,p=s.width,m=s.open}}else if(N==\"o30\"||N==\"o31\"){var pe=u.length,he=(oe=0,N==\"o31\");for(oe+=pe-(U=-3&pe);oe<U;)he?(w=y,S=(_=v+u.shift())+u.shift(),y=(A=w+u.shift())+u.shift(),U-oe==5?(v=S+u.shift(),oe++):v=S,he=!1):(_=v,w=y+u.shift(),S=_+u.shift(),A=w+u.shift(),v=S+u.shift(),U-oe==5?(y=A+u.shift(),oe++):y=A,he=!0),e.U.P.curveTo(l,_,w,S,A,v,y),oe+=4}else{if((N+\"\").charAt(0)==\"o\")throw console.debug(\"Unknown operation: \"+N,i),N;u.push(N)}}}s.x=v,s.y=y,s.nStems=c,s.haveWidth=h,s.width=p,s.open=m};var t=e,r={Typr:t};return n.Typr=t,n.default=r,Object.defineProperty(n,\"__esModule\",{value:!0}),n}({}).Typr}", "title": "" }, { "docid": "5228548799583de0091d4ec7e59eb49f", "score": "0.6324694", "text": "function jY(){return typeof window>\"u\"&&(self.window=self),function(n){var e={parse:function(r){var s=e._bin,o=new Uint8Array(r);if(s.readASCII(o,0,4)==\"ttcf\"){var a=4;s.readUshort(o,a),a+=2,s.readUshort(o,a),a+=2;var l=s.readUint(o,a);a+=4;for(var c=[],u=0;u<l;u++){var f=s.readUint(o,a);a+=4,c.push(e._readFont(o,f))}return c}return[e._readFont(o,0)]},_readFont:function(r,s){var o=e._bin,a=s;o.readFixed(r,s),s+=4;var l=o.readUshort(r,s);s+=2,o.readUshort(r,s),s+=2,o.readUshort(r,s),s+=2,o.readUshort(r,s),s+=2;for(var c=[\"cmap\",\"head\",\"hhea\",\"maxp\",\"hmtx\",\"name\",\"OS/2\",\"post\",\"loca\",\"glyf\",\"kern\",\"CFF \",\"GPOS\",\"GSUB\",\"SVG \"],u={_data:r,_offset:a},f={},p=0;p<l;p++){var m=o.readASCII(r,s,4);s+=4,o.readUint(r,s),s+=4;var v=o.readUint(r,s);s+=4;var y=o.readUint(r,s);s+=4,f[m]={offset:v,length:y}}for(p=0;p<c.length;p++){var M=c[p];f[M]&&(u[M.trim()]=e[M.trim()].parse(r,f[M].offset,f[M].length,u))}return u},_tabOffset:function(r,s,o){for(var a=e._bin,l=a.readUshort(r,o+4),c=o+12,u=0;u<l;u++){var f=a.readASCII(r,c,4);c+=4,a.readUint(r,c),c+=4;var p=a.readUint(r,c);if(c+=4,a.readUint(r,c),c+=4,f==s)return p}return 0}};e._bin={readFixed:function(r,s){return(r[s]<<8|r[s+1])+(r[s+2]<<8|r[s+3])/65540},readF2dot14:function(r,s){return e._bin.readShort(r,s)/16384},readInt:function(r,s){return e._bin._view(r).getInt32(s)},readInt8:function(r,s){return e._bin._view(r).getInt8(s)},readShort:function(r,s){return e._bin._view(r).getInt16(s)},readUshort:function(r,s){return e._bin._view(r).getUint16(s)},readUshorts:function(r,s,o){for(var a=[],l=0;l<o;l++)a.push(e._bin.readUshort(r,s+2*l));return a},readUint:function(r,s){return e._bin._view(r).getUint32(s)},readUint64:function(r,s){return 4294967296*e._bin.readUint(r,s)+e._bin.readUint(r,s+4)},readASCII:function(r,s,o){for(var a=\"\",l=0;l<o;l++)a+=String.fromCharCode(r[s+l]);return a},readUnicode:function(r,s,o){for(var a=\"\",l=0;l<o;l++){var c=r[s++]<<8|r[s++];a+=String.fromCharCode(c)}return a},_tdec:typeof window<\"u\"&&window.TextDecoder?new window.TextDecoder:null,readUTF8:function(r,s,o){var a=e._bin._tdec;return a&&s==0&&o==r.length?a.decode(r):e._bin.readASCII(r,s,o)},readBytes:function(r,s,o){for(var a=[],l=0;l<o;l++)a.push(r[s+l]);return a},readASCIIArray:function(r,s,o){for(var a=[],l=0;l<o;l++)a.push(String.fromCharCode(r[s+l]));return a},_view:function(r){return r._dataView||(r._dataView=r.buffer?new DataView(r.buffer,r.byteOffset,r.byteLength):new DataView(new Uint8Array(r).buffer))}},e._lctf={},e._lctf.parse=function(r,s,o,a,l){var c=e._bin,u={},f=s;c.readFixed(r,s),s+=4;var p=c.readUshort(r,s);s+=2;var m=c.readUshort(r,s);s+=2;var v=c.readUshort(r,s);return s+=2,u.scriptList=e._lctf.readScriptList(r,f+p),u.featureList=e._lctf.readFeatureList(r,f+m),u.lookupList=e._lctf.readLookupList(r,f+v,l),u},e._lctf.readLookupList=function(r,s,o){var a=e._bin,l=s,c=[],u=a.readUshort(r,s);s+=2;for(var f=0;f<u;f++){var p=a.readUshort(r,s);s+=2;var m=e._lctf.readLookupTable(r,l+p,o);c.push(m)}return c},e._lctf.readLookupTable=function(r,s,o){var a=e._bin,l=s,c={tabs:[]};c.ltype=a.readUshort(r,s),s+=2,c.flag=a.readUshort(r,s),s+=2;var u=a.readUshort(r,s);s+=2;for(var f=c.ltype,p=0;p<u;p++){var m=a.readUshort(r,s);s+=2;var v=o(r,f,l+m,c);c.tabs.push(v)}return c},e._lctf.numOfOnes=function(r){for(var s=0,o=0;o<32;o++)r>>>o&1&&s++;return s},e._lctf.readClassDef=function(r,s){var o=e._bin,a=[],l=o.readUshort(r,s);if(s+=2,l==1){var c=o.readUshort(r,s);s+=2;var u=o.readUshort(r,s);s+=2;for(var f=0;f<u;f++)a.push(c+f),a.push(c+f),a.push(o.readUshort(r,s)),s+=2}if(l==2){var p=o.readUshort(r,s);for(s+=2,f=0;f<p;f++)a.push(o.readUshort(r,s)),s+=2,a.push(o.readUshort(r,s)),s+=2,a.push(o.readUshort(r,s)),s+=2}return a},e._lctf.getInterval=function(r,s){for(var o=0;o<r.length;o+=3){var a=r[o],l=r[o+1];if(r[o+2],a<=s&&s<=l)return o}return-1},e._lctf.readCoverage=function(r,s){var o=e._bin,a={};a.fmt=o.readUshort(r,s),s+=2;var l=o.readUshort(r,s);return s+=2,a.fmt==1&&(a.tab=o.readUshorts(r,s,l)),a.fmt==2&&(a.tab=o.readUshorts(r,s,3*l)),a},e._lctf.coverageIndex=function(r,s){var o=r.tab;if(r.fmt==1)return o.indexOf(s);if(r.fmt==2){var a=e._lctf.getInterval(o,s);if(a!=-1)return o[a+2]+(s-o[a])}return-1},e._lctf.readFeatureList=function(r,s){var o=e._bin,a=s,l=[],c=o.readUshort(r,s);s+=2;for(var u=0;u<c;u++){var f=o.readASCII(r,s,4);s+=4;var p=o.readUshort(r,s);s+=2;var m=e._lctf.readFeatureTable(r,a+p);m.tag=f.trim(),l.push(m)}return l},e._lctf.readFeatureTable=function(r,s){var o=e._bin,a=s,l={},c=o.readUshort(r,s);s+=2,c>0&&(l.featureParams=a+c);var u=o.readUshort(r,s);s+=2,l.tab=[];for(var f=0;f<u;f++)l.tab.push(o.readUshort(r,s+2*f));return l},e._lctf.readScriptList=function(r,s){var o=e._bin,a=s,l={},c=o.readUshort(r,s);s+=2;for(var u=0;u<c;u++){var f=o.readASCII(r,s,4);s+=4;var p=o.readUshort(r,s);s+=2,l[f.trim()]=e._lctf.readScriptTable(r,a+p)}return l},e._lctf.readScriptTable=function(r,s){var o=e._bin,a=s,l={},c=o.readUshort(r,s);s+=2,l.default=e._lctf.readLangSysTable(r,a+c);var u=o.readUshort(r,s);s+=2;for(var f=0;f<u;f++){var p=o.readASCII(r,s,4);s+=4;var m=o.readUshort(r,s);s+=2,l[p.trim()]=e._lctf.readLangSysTable(r,a+m)}return l},e._lctf.readLangSysTable=function(r,s){var o=e._bin,a={};o.readUshort(r,s),s+=2,a.reqFeature=o.readUshort(r,s),s+=2;var l=o.readUshort(r,s);return s+=2,a.features=o.readUshorts(r,s,l),a},e.CFF={},e.CFF.parse=function(r,s,o){var a=e._bin;(r=new Uint8Array(r.buffer,s,o))[s=0],r[++s],r[++s],r[++s],s++;var l=[];s=e.CFF.readIndex(r,s,l);for(var c=[],u=0;u<l.length-1;u++)c.push(a.readASCII(r,s+l[u],l[u+1]-l[u]));s+=l[l.length-1];var f=[];s=e.CFF.readIndex(r,s,f);var p=[];for(u=0;u<f.length-1;u++)p.push(e.CFF.readDict(r,s+f[u],s+f[u+1]));s+=f[f.length-1];var m=p[0],v=[];s=e.CFF.readIndex(r,s,v);var y=[];for(u=0;u<v.length-1;u++)y.push(a.readASCII(r,s+v[u],v[u+1]-v[u]));if(s+=v[v.length-1],e.CFF.readSubrs(r,s,m),m.CharStrings){s=m.CharStrings,v=[],s=e.CFF.readIndex(r,s,v);var M=[];for(u=0;u<v.length-1;u++)M.push(a.readBytes(r,s+v[u],v[u+1]-v[u]));m.CharStrings=M}if(m.ROS){s=m.FDArray;var g=[];for(s=e.CFF.readIndex(r,s,g),m.FDArray=[],u=0;u<g.length-1;u++){var x=e.CFF.readDict(r,s+g[u],s+g[u+1]);e.CFF._readFDict(r,x,y),m.FDArray.push(x)}s+=g[g.length-1],s=m.FDSelect,m.FDSelect=[];var S=r[s];if(s++,S!=3)throw S;var w=a.readUshort(r,s);for(s+=2,u=0;u<w+1;u++)m.FDSelect.push(a.readUshort(r,s),r[s+2]),s+=3}return m.Encoding&&(m.Encoding=e.CFF.readEncoding(r,m.Encoding,m.CharStrings.length)),m.charset&&(m.charset=e.CFF.readCharset(r,m.charset,m.CharStrings.length)),e.CFF._readFDict(r,m,y),m},e.CFF._readFDict=function(r,s,o){var a;for(var l in s.Private&&(a=s.Private[1],s.Private=e.CFF.readDict(r,a,a+s.Private[0]),s.Private.Subrs&&e.CFF.readSubrs(r,a+s.Private.Subrs,s.Private)),s)[\"FamilyName\",\"FontName\",\"FullName\",\"Notice\",\"version\",\"Copyright\"].indexOf(l)!=-1&&(s[l]=o[s[l]-426+35])},e.CFF.readSubrs=function(r,s,o){var a=e._bin,l=[];s=e.CFF.readIndex(r,s,l);var c,u=l.length;c=u<1240?107:u<33900?1131:32768,o.Bias=c,o.Subrs=[];for(var f=0;f<l.length-1;f++)o.Subrs.push(a.readBytes(r,s+l[f],l[f+1]-l[f]))},e.CFF.tableSE=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,0,111,112,113,114,0,115,116,117,118,119,120,121,122,0,123,0,124,125,126,127,128,129,130,131,0,132,133,0,134,135,136,137,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,138,0,139,0,0,0,0,140,141,142,143,0,0,0,0,0,144,0,0,0,145,0,0,146,147,148,149,0,0,0,0],e.CFF.glyphByUnicode=function(r,s){for(var o=0;o<r.charset.length;o++)if(r.charset[o]==s)return o;return-1},e.CFF.glyphBySE=function(r,s){return s<0||s>255?-1:e.CFF.glyphByUnicode(r,e.CFF.tableSE[s])},e.CFF.readEncoding=function(r,s,o){e._bin;var a=[\".notdef\"],l=r[s];if(s++,l!=0)throw\"error: unknown encoding format: \"+l;var c=r[s];s++;for(var u=0;u<c;u++)a.push(r[s+u]);return a},e.CFF.readCharset=function(r,s,o){var a=e._bin,l=[\".notdef\"],c=r[s];if(s++,c==0)for(var u=0;u<o;u++){var f=a.readUshort(r,s);s+=2,l.push(f)}else{if(c!=1&&c!=2)throw\"error: format: \"+c;for(;l.length<o;){f=a.readUshort(r,s),s+=2;var p=0;for(c==1?(p=r[s],s++):(p=a.readUshort(r,s),s+=2),u=0;u<=p;u++)l.push(f),f++}}return l},e.CFF.readIndex=function(r,s,o){var a=e._bin,l=a.readUshort(r,s)+1,c=r[s+=2];if(s++,c==1)for(var u=0;u<l;u++)o.push(r[s+u]);else if(c==2)for(u=0;u<l;u++)o.push(a.readUshort(r,s+2*u));else if(c==3)for(u=0;u<l;u++)o.push(16777215&a.readUint(r,s+3*u-1));else if(l!=1)throw\"unsupported offset size: \"+c+\", count: \"+l;return(s+=l*c)-1},e.CFF.getCharString=function(r,s,o){var a=e._bin,l=r[s],c=r[s+1];r[s+2],r[s+3],r[s+4];var u=1,f=null,p=null;l<=20&&(f=l,u=1),l==12&&(f=100*l+c,u=2),21<=l&&l<=27&&(f=l,u=1),l==28&&(p=a.readShort(r,s+1),u=3),29<=l&&l<=31&&(f=l,u=1),32<=l&&l<=246&&(p=l-139,u=1),247<=l&&l<=250&&(p=256*(l-247)+c+108,u=2),251<=l&&l<=254&&(p=256*-(l-251)-c-108,u=2),l==255&&(p=a.readInt(r,s+1)/65535,u=5),o.val=p??\"o\"+f,o.size=u},e.CFF.readCharString=function(r,s,o){for(var a=s+o,l=e._bin,c=[];s<a;){var u=r[s],f=r[s+1];r[s+2],r[s+3],r[s+4];var p=1,m=null,v=null;u<=20&&(m=u,p=1),u==12&&(m=100*u+f,p=2),u!=19&&u!=20||(m=u,p=2),21<=u&&u<=27&&(m=u,p=1),u==28&&(v=l.readShort(r,s+1),p=3),29<=u&&u<=31&&(m=u,p=1),32<=u&&u<=246&&(v=u-139,p=1),247<=u&&u<=250&&(v=256*(u-247)+f+108,p=2),251<=u&&u<=254&&(v=256*-(u-251)-f-108,p=2),u==255&&(v=l.readInt(r,s+1)/65535,p=5),c.push(v??\"o\"+m),s+=p}return c},e.CFF.readDict=function(r,s,o){for(var a=e._bin,l={},c=[];s<o;){var u=r[s],f=r[s+1];r[s+2],r[s+3],r[s+4];var p=1,m=null,v=null;if(u==28&&(v=a.readShort(r,s+1),p=3),u==29&&(v=a.readInt(r,s+1),p=5),32<=u&&u<=246&&(v=u-139,p=1),247<=u&&u<=250&&(v=256*(u-247)+f+108,p=2),251<=u&&u<=254&&(v=256*-(u-251)-f-108,p=2),u==255)throw v=a.readInt(r,s+1)/65535,p=5,\"unknown number\";if(u==30){var y=[];for(p=1;;){var M=r[s+p];p++;var g=M>>4,x=15&M;if(g!=15&&y.push(g),x!=15&&y.push(x),x==15)break}for(var S=\"\",w=[0,1,2,3,4,5,6,7,8,9,\".\",\"e\",\"e-\",\"reserved\",\"-\",\"endOfNumber\"],C=0;C<y.length;C++)S+=w[y[C]];v=parseFloat(S)}u<=21&&(m=[\"version\",\"Notice\",\"FullName\",\"FamilyName\",\"Weight\",\"FontBBox\",\"BlueValues\",\"OtherBlues\",\"FamilyBlues\",\"FamilyOtherBlues\",\"StdHW\",\"StdVW\",\"escape\",\"UniqueID\",\"XUID\",\"charset\",\"Encoding\",\"CharStrings\",\"Private\",\"Subrs\",\"defaultWidthX\",\"nominalWidthX\"][u],p=1,u==12&&(m=[\"Copyright\",\"isFixedPitch\",\"ItalicAngle\",\"UnderlinePosition\",\"UnderlineThickness\",\"PaintType\",\"CharstringType\",\"FontMatrix\",\"StrokeWidth\",\"BlueScale\",\"BlueShift\",\"BlueFuzz\",\"StemSnapH\",\"StemSnapV\",\"ForceBold\",0,0,\"LanguageGroup\",\"ExpansionFactor\",\"initialRandomSeed\",\"SyntheticBase\",\"PostScript\",\"BaseFontName\",\"BaseFontBlend\",0,0,0,0,0,0,\"ROS\",\"CIDFontVersion\",\"CIDFontRevision\",\"CIDFontType\",\"CIDCount\",\"UIDBase\",\"FDArray\",\"FDSelect\",\"FontName\"][f],p=2)),m!=null?(l[m]=c.length==1?c[0]:c,c=[]):c.push(v),s+=p}return l},e.cmap={},e.cmap.parse=function(r,s,o){r=new Uint8Array(r.buffer,s,o),s=0;var a=e._bin,l={};a.readUshort(r,s),s+=2;var c=a.readUshort(r,s);s+=2;var u=[];l.tables=[];for(var f=0;f<c;f++){var p=a.readUshort(r,s);s+=2;var m=a.readUshort(r,s);s+=2;var v=a.readUint(r,s);s+=4;var y=\"p\"+p+\"e\"+m,M=u.indexOf(v);if(M==-1){var g;M=l.tables.length,u.push(v);var x=a.readUshort(r,v);x==0?g=e.cmap.parse0(r,v):x==4?g=e.cmap.parse4(r,v):x==6?g=e.cmap.parse6(r,v):x==12?g=e.cmap.parse12(r,v):console.debug(\"unknown format: \"+x,p,m,v),l.tables.push(g)}if(l[y]!=null)throw\"multiple tables for one platform+encoding\";l[y]=M}return l},e.cmap.parse0=function(r,s){var o=e._bin,a={};a.format=o.readUshort(r,s),s+=2;var l=o.readUshort(r,s);s+=2,o.readUshort(r,s),s+=2,a.map=[];for(var c=0;c<l-6;c++)a.map.push(r[s+c]);return a},e.cmap.parse4=function(r,s){var o=e._bin,a=s,l={};l.format=o.readUshort(r,s),s+=2;var c=o.readUshort(r,s);s+=2,o.readUshort(r,s),s+=2;var u=o.readUshort(r,s);s+=2;var f=u/2;l.searchRange=o.readUshort(r,s),s+=2,l.entrySelector=o.readUshort(r,s),s+=2,l.rangeShift=o.readUshort(r,s),s+=2,l.endCount=o.readUshorts(r,s,f),s+=2*f,s+=2,l.startCount=o.readUshorts(r,s,f),s+=2*f,l.idDelta=[];for(var p=0;p<f;p++)l.idDelta.push(o.readShort(r,s)),s+=2;for(l.idRangeOffset=o.readUshorts(r,s,f),s+=2*f,l.glyphIdArray=[];s<a+c;)l.glyphIdArray.push(o.readUshort(r,s)),s+=2;return l},e.cmap.parse6=function(r,s){var o=e._bin,a={};a.format=o.readUshort(r,s),s+=2,o.readUshort(r,s),s+=2,o.readUshort(r,s),s+=2,a.firstCode=o.readUshort(r,s),s+=2;var l=o.readUshort(r,s);s+=2,a.glyphIdArray=[];for(var c=0;c<l;c++)a.glyphIdArray.push(o.readUshort(r,s)),s+=2;return a},e.cmap.parse12=function(r,s){var o=e._bin,a={};a.format=o.readUshort(r,s),s+=2,s+=2,o.readUint(r,s),s+=4,o.readUint(r,s),s+=4;var l=o.readUint(r,s);s+=4,a.groups=[];for(var c=0;c<l;c++){var u=s+12*c,f=o.readUint(r,u+0),p=o.readUint(r,u+4),m=o.readUint(r,u+8);a.groups.push([f,p,m])}return a},e.glyf={},e.glyf.parse=function(r,s,o,a){for(var l=[],c=0;c<a.maxp.numGlyphs;c++)l.push(null);return l},e.glyf._parseGlyf=function(r,s){var o=e._bin,a=r._data,l=e._tabOffset(a,\"glyf\",r._offset)+r.loca[s];if(r.loca[s]==r.loca[s+1])return null;var c={};if(c.noc=o.readShort(a,l),l+=2,c.xMin=o.readShort(a,l),l+=2,c.yMin=o.readShort(a,l),l+=2,c.xMax=o.readShort(a,l),l+=2,c.yMax=o.readShort(a,l),l+=2,c.xMin>=c.xMax||c.yMin>=c.yMax)return null;if(c.noc>0){c.endPts=[];for(var u=0;u<c.noc;u++)c.endPts.push(o.readUshort(a,l)),l+=2;var f=o.readUshort(a,l);if(l+=2,a.length-l<f)return null;c.instructions=o.readBytes(a,l,f),l+=f;var p=c.endPts[c.noc-1]+1;for(c.flags=[],u=0;u<p;u++){var m=a[l];if(l++,c.flags.push(m),(8&m)!=0){var v=a[l];l++;for(var y=0;y<v;y++)c.flags.push(m),u++}}for(c.xs=[],u=0;u<p;u++){var M=(2&c.flags[u])!=0,g=(16&c.flags[u])!=0;M?(c.xs.push(g?a[l]:-a[l]),l++):g?c.xs.push(0):(c.xs.push(o.readShort(a,l)),l+=2)}for(c.ys=[],u=0;u<p;u++)M=(4&c.flags[u])!=0,g=(32&c.flags[u])!=0,M?(c.ys.push(g?a[l]:-a[l]),l++):g?c.ys.push(0):(c.ys.push(o.readShort(a,l)),l+=2);var x=0,S=0;for(u=0;u<p;u++)x+=c.xs[u],S+=c.ys[u],c.xs[u]=x,c.ys[u]=S}else{var w;c.parts=[];do{w=o.readUshort(a,l),l+=2;var C={m:{a:1,b:0,c:0,d:1,tx:0,ty:0},p1:-1,p2:-1};if(c.parts.push(C),C.glyphIndex=o.readUshort(a,l),l+=2,1&w){var T=o.readShort(a,l);l+=2;var R=o.readShort(a,l);l+=2}else T=o.readInt8(a,l),l++,R=o.readInt8(a,l),l++;2&w?(C.m.tx=T,C.m.ty=R):(C.p1=T,C.p2=R),8&w?(C.m.a=C.m.d=o.readF2dot14(a,l),l+=2):64&w?(C.m.a=o.readF2dot14(a,l),l+=2,C.m.d=o.readF2dot14(a,l),l+=2):128&w&&(C.m.a=o.readF2dot14(a,l),l+=2,C.m.b=o.readF2dot14(a,l),l+=2,C.m.c=o.readF2dot14(a,l),l+=2,C.m.d=o.readF2dot14(a,l),l+=2)}while(32&w);if(256&w){var b=o.readUshort(a,l);for(l+=2,c.instr=[],u=0;u<b;u++)c.instr.push(a[l]),l++}}return c},e.GPOS={},e.GPOS.parse=function(r,s,o,a){return e._lctf.parse(r,s,o,a,e.GPOS.subt)},e.GPOS.subt=function(r,s,o,a){var l=e._bin,c=o,u={};if(u.fmt=l.readUshort(r,o),o+=2,s==1||s==2||s==3||s==7||s==8&&u.fmt<=2){var f=l.readUshort(r,o);o+=2,u.coverage=e._lctf.readCoverage(r,f+c)}if(s==1&&u.fmt==1){var p=l.readUshort(r,o);o+=2;var m=e._lctf.numOfOnes(p);p!=0&&(u.pos=e.GPOS.readValueRecord(r,o,p))}else if(s==2&&u.fmt>=1&&u.fmt<=2){p=l.readUshort(r,o),o+=2;var v=l.readUshort(r,o);o+=2,m=e._lctf.numOfOnes(p);var y=e._lctf.numOfOnes(v);if(u.fmt==1){u.pairsets=[];var M=l.readUshort(r,o);o+=2;for(var g=0;g<M;g++){var x=c+l.readUshort(r,o);o+=2;var S=l.readUshort(r,x);x+=2;for(var w=[],C=0;C<S;C++){var T=l.readUshort(r,x);x+=2,p!=0&&(F=e.GPOS.readValueRecord(r,x,p),x+=2*m),v!=0&&(z=e.GPOS.readValueRecord(r,x,v),x+=2*y),w.push({gid2:T,val1:F,val2:z})}u.pairsets.push(w)}}if(u.fmt==2){var R=l.readUshort(r,o);o+=2;var b=l.readUshort(r,o);o+=2;var P=l.readUshort(r,o);o+=2;var L=l.readUshort(r,o);for(o+=2,u.classDef1=e._lctf.readClassDef(r,c+R),u.classDef2=e._lctf.readClassDef(r,c+b),u.matrix=[],g=0;g<P;g++){var U=[];for(C=0;C<L;C++){var F=null,z=null;p!=0&&(F=e.GPOS.readValueRecord(r,o,p),o+=2*m),v!=0&&(z=e.GPOS.readValueRecord(r,o,v),o+=2*y),U.push({val1:F,val2:z})}u.matrix.push(U)}}}else{if(s==9&&u.fmt==1){var G=l.readUshort(r,o);o+=2;var K=l.readUint(r,o);if(o+=4,a.ltype==9)a.ltype=G;else if(a.ltype!=G)throw\"invalid extension substitution\";return e.GPOS.subt(r,a.ltype,c+K)}console.debug(\"unsupported GPOS table LookupType\",s,\"format\",u.fmt)}return u},e.GPOS.readValueRecord=function(r,s,o){var a=e._bin,l=[];return l.push(1&o?a.readShort(r,s):0),s+=1&o?2:0,l.push(2&o?a.readShort(r,s):0),s+=2&o?2:0,l.push(4&o?a.readShort(r,s):0),s+=4&o?2:0,l.push(8&o?a.readShort(r,s):0),s+=8&o?2:0,l},e.GSUB={},e.GSUB.parse=function(r,s,o,a){return e._lctf.parse(r,s,o,a,e.GSUB.subt)},e.GSUB.subt=function(r,s,o,a){var l=e._bin,c=o,u={};if(u.fmt=l.readUshort(r,o),o+=2,s!=1&&s!=4&&s!=5&&s!=6)return null;if(s==1||s==4||s==5&&u.fmt<=2||s==6&&u.fmt<=2){var f=l.readUshort(r,o);o+=2,u.coverage=e._lctf.readCoverage(r,c+f)}if(s==1&&u.fmt>=1&&u.fmt<=2){if(u.fmt==1)u.delta=l.readShort(r,o),o+=2;else if(u.fmt==2){var p=l.readUshort(r,o);o+=2,u.newg=l.readUshorts(r,o,p),o+=2*u.newg.length}}else if(s==4){u.vals=[],p=l.readUshort(r,o),o+=2;for(var m=0;m<p;m++){var v=l.readUshort(r,o);o+=2,u.vals.push(e.GSUB.readLigatureSet(r,c+v))}}else if(s==5&&u.fmt==2){if(u.fmt==2){var y=l.readUshort(r,o);o+=2,u.cDef=e._lctf.readClassDef(r,c+y),u.scset=[];var M=l.readUshort(r,o);for(o+=2,m=0;m<M;m++){var g=l.readUshort(r,o);o+=2,u.scset.push(g==0?null:e.GSUB.readSubClassSet(r,c+g))}}}else if(s==6&&u.fmt==3){if(u.fmt==3){for(m=0;m<3;m++){p=l.readUshort(r,o),o+=2;for(var x=[],S=0;S<p;S++)x.push(e._lctf.readCoverage(r,c+l.readUshort(r,o+2*S)));o+=2*p,m==0&&(u.backCvg=x),m==1&&(u.inptCvg=x),m==2&&(u.ahedCvg=x)}p=l.readUshort(r,o),o+=2,u.lookupRec=e.GSUB.readSubstLookupRecords(r,o,p)}}else{if(s==7&&u.fmt==1){var w=l.readUshort(r,o);o+=2;var C=l.readUint(r,o);if(o+=4,a.ltype==9)a.ltype=w;else if(a.ltype!=w)throw\"invalid extension substitution\";return e.GSUB.subt(r,a.ltype,c+C)}console.debug(\"unsupported GSUB table LookupType\",s,\"format\",u.fmt)}return u},e.GSUB.readSubClassSet=function(r,s){var o=e._bin.readUshort,a=s,l=[],c=o(r,s);s+=2;for(var u=0;u<c;u++){var f=o(r,s);s+=2,l.push(e.GSUB.readSubClassRule(r,a+f))}return l},e.GSUB.readSubClassRule=function(r,s){var o=e._bin.readUshort,a={},l=o(r,s),c=o(r,s+=2);s+=2,a.input=[];for(var u=0;u<l-1;u++)a.input.push(o(r,s)),s+=2;return a.substLookupRecords=e.GSUB.readSubstLookupRecords(r,s,c),a},e.GSUB.readSubstLookupRecords=function(r,s,o){for(var a=e._bin.readUshort,l=[],c=0;c<o;c++)l.push(a(r,s),a(r,s+2)),s+=4;return l},e.GSUB.readChainSubClassSet=function(r,s){var o=e._bin,a=s,l=[],c=o.readUshort(r,s);s+=2;for(var u=0;u<c;u++){var f=o.readUshort(r,s);s+=2,l.push(e.GSUB.readChainSubClassRule(r,a+f))}return l},e.GSUB.readChainSubClassRule=function(r,s){for(var o=e._bin,a={},l=[\"backtrack\",\"input\",\"lookahead\"],c=0;c<l.length;c++){var u=o.readUshort(r,s);s+=2,c==1&&u--,a[l[c]]=o.readUshorts(r,s,u),s+=2*a[l[c]].length}return u=o.readUshort(r,s),s+=2,a.subst=o.readUshorts(r,s,2*u),s+=2*a.subst.length,a},e.GSUB.readLigatureSet=function(r,s){var o=e._bin,a=s,l=[],c=o.readUshort(r,s);s+=2;for(var u=0;u<c;u++){var f=o.readUshort(r,s);s+=2,l.push(e.GSUB.readLigature(r,a+f))}return l},e.GSUB.readLigature=function(r,s){var o=e._bin,a={chain:[]};a.nglyph=o.readUshort(r,s),s+=2;var l=o.readUshort(r,s);s+=2;for(var c=0;c<l-1;c++)a.chain.push(o.readUshort(r,s)),s+=2;return a},e.head={},e.head.parse=function(r,s,o){var a=e._bin,l={};return a.readFixed(r,s),s+=4,l.fontRevision=a.readFixed(r,s),s+=4,a.readUint(r,s),s+=4,a.readUint(r,s),s+=4,l.flags=a.readUshort(r,s),s+=2,l.unitsPerEm=a.readUshort(r,s),s+=2,l.created=a.readUint64(r,s),s+=8,l.modified=a.readUint64(r,s),s+=8,l.xMin=a.readShort(r,s),s+=2,l.yMin=a.readShort(r,s),s+=2,l.xMax=a.readShort(r,s),s+=2,l.yMax=a.readShort(r,s),s+=2,l.macStyle=a.readUshort(r,s),s+=2,l.lowestRecPPEM=a.readUshort(r,s),s+=2,l.fontDirectionHint=a.readShort(r,s),s+=2,l.indexToLocFormat=a.readShort(r,s),s+=2,l.glyphDataFormat=a.readShort(r,s),s+=2,l},e.hhea={},e.hhea.parse=function(r,s,o){var a=e._bin,l={};return a.readFixed(r,s),s+=4,l.ascender=a.readShort(r,s),s+=2,l.descender=a.readShort(r,s),s+=2,l.lineGap=a.readShort(r,s),s+=2,l.advanceWidthMax=a.readUshort(r,s),s+=2,l.minLeftSideBearing=a.readShort(r,s),s+=2,l.minRightSideBearing=a.readShort(r,s),s+=2,l.xMaxExtent=a.readShort(r,s),s+=2,l.caretSlopeRise=a.readShort(r,s),s+=2,l.caretSlopeRun=a.readShort(r,s),s+=2,l.caretOffset=a.readShort(r,s),s+=2,s+=8,l.metricDataFormat=a.readShort(r,s),s+=2,l.numberOfHMetrics=a.readUshort(r,s),s+=2,l},e.hmtx={},e.hmtx.parse=function(r,s,o,a){for(var l=e._bin,c={aWidth:[],lsBearing:[]},u=0,f=0,p=0;p<a.maxp.numGlyphs;p++)p<a.hhea.numberOfHMetrics&&(u=l.readUshort(r,s),s+=2,f=l.readShort(r,s),s+=2),c.aWidth.push(u),c.lsBearing.push(f);return c},e.kern={},e.kern.parse=function(r,s,o,a){var l=e._bin,c=l.readUshort(r,s);if(s+=2,c==1)return e.kern.parseV1(r,s-2,o,a);var u=l.readUshort(r,s);s+=2;for(var f={glyph1:[],rval:[]},p=0;p<u;p++){s+=2,o=l.readUshort(r,s),s+=2;var m=l.readUshort(r,s);s+=2;var v=m>>>8;if((v&=15)!=0)throw\"unknown kern table format: \"+v;s=e.kern.readFormat0(r,s,f)}return f},e.kern.parseV1=function(r,s,o,a){var l=e._bin;l.readFixed(r,s),s+=4;var c=l.readUint(r,s);s+=4;for(var u={glyph1:[],rval:[]},f=0;f<c;f++){l.readUint(r,s),s+=4;var p=l.readUshort(r,s);s+=2,l.readUshort(r,s),s+=2;var m=p>>>8;if((m&=15)!=0)throw\"unknown kern table format: \"+m;s=e.kern.readFormat0(r,s,u)}return u},e.kern.readFormat0=function(r,s,o){var a=e._bin,l=-1,c=a.readUshort(r,s);s+=2,a.readUshort(r,s),s+=2,a.readUshort(r,s),s+=2,a.readUshort(r,s),s+=2;for(var u=0;u<c;u++){var f=a.readUshort(r,s);s+=2;var p=a.readUshort(r,s);s+=2;var m=a.readShort(r,s);s+=2,f!=l&&(o.glyph1.push(f),o.rval.push({glyph2:[],vals:[]}));var v=o.rval[o.rval.length-1];v.glyph2.push(p),v.vals.push(m),l=f}return s},e.loca={},e.loca.parse=function(r,s,o,a){var l=e._bin,c=[],u=a.head.indexToLocFormat,f=a.maxp.numGlyphs+1;if(u==0)for(var p=0;p<f;p++)c.push(l.readUshort(r,s+(p<<1))<<1);if(u==1)for(p=0;p<f;p++)c.push(l.readUint(r,s+(p<<2)));return c},e.maxp={},e.maxp.parse=function(r,s,o){var a=e._bin,l={},c=a.readUint(r,s);return s+=4,l.numGlyphs=a.readUshort(r,s),s+=2,c==65536&&(l.maxPoints=a.readUshort(r,s),s+=2,l.maxContours=a.readUshort(r,s),s+=2,l.maxCompositePoints=a.readUshort(r,s),s+=2,l.maxCompositeContours=a.readUshort(r,s),s+=2,l.maxZones=a.readUshort(r,s),s+=2,l.maxTwilightPoints=a.readUshort(r,s),s+=2,l.maxStorage=a.readUshort(r,s),s+=2,l.maxFunctionDefs=a.readUshort(r,s),s+=2,l.maxInstructionDefs=a.readUshort(r,s),s+=2,l.maxStackElements=a.readUshort(r,s),s+=2,l.maxSizeOfInstructions=a.readUshort(r,s),s+=2,l.maxComponentElements=a.readUshort(r,s),s+=2,l.maxComponentDepth=a.readUshort(r,s),s+=2),l},e.name={},e.name.parse=function(r,s,o){var a=e._bin,l={};a.readUshort(r,s),s+=2;var c=a.readUshort(r,s);s+=2,a.readUshort(r,s);for(var u,f=[\"copyright\",\"fontFamily\",\"fontSubfamily\",\"ID\",\"fullName\",\"version\",\"postScriptName\",\"trademark\",\"manufacturer\",\"designer\",\"description\",\"urlVendor\",\"urlDesigner\",\"licence\",\"licenceURL\",\"---\",\"typoFamilyName\",\"typoSubfamilyName\",\"compatibleFull\",\"sampleText\",\"postScriptCID\",\"wwsFamilyName\",\"wwsSubfamilyName\",\"lightPalette\",\"darkPalette\"],p=s+=2,m=0;m<c;m++){var v=a.readUshort(r,s);s+=2;var y=a.readUshort(r,s);s+=2;var M=a.readUshort(r,s);s+=2;var g=a.readUshort(r,s);s+=2;var x=a.readUshort(r,s);s+=2;var S=a.readUshort(r,s);s+=2;var w,C=f[g],T=p+12*c+S;if(v==0)w=a.readUnicode(r,T,x/2);else if(v==3&&y==0)w=a.readUnicode(r,T,x/2);else if(y==0)w=a.readASCII(r,T,x);else if(y==1)w=a.readUnicode(r,T,x/2);else if(y==3)w=a.readUnicode(r,T,x/2);else{if(v!=1)throw\"unknown encoding \"+y+\", platformID: \"+v;w=a.readASCII(r,T,x),console.debug(\"reading unknown MAC encoding \"+y+\" as ASCII\")}var R=\"p\"+v+\",\"+M.toString(16);l[R]==null&&(l[R]={}),l[R][C!==void 0?C:g]=w,l[R]._lang=M}for(var b in l)if(l[b].postScriptName!=null&&l[b]._lang==1033)return l[b];for(var b in l)if(l[b].postScriptName!=null&&l[b]._lang==0)return l[b];for(var b in l)if(l[b].postScriptName!=null&&l[b]._lang==3084)return l[b];for(var b in l)if(l[b].postScriptName!=null)return l[b];for(var b in l){u=b;break}return console.debug(\"returning name table with languageID \"+l[u]._lang),l[u]},e[\"OS/2\"]={},e[\"OS/2\"].parse=function(r,s,o){var a=e._bin.readUshort(r,s);s+=2;var l={};if(a==0)e[\"OS/2\"].version0(r,s,l);else if(a==1)e[\"OS/2\"].version1(r,s,l);else if(a==2||a==3||a==4)e[\"OS/2\"].version2(r,s,l);else{if(a!=5)throw\"unknown OS/2 table version: \"+a;e[\"OS/2\"].version5(r,s,l)}return l},e[\"OS/2\"].version0=function(r,s,o){var a=e._bin;return o.xAvgCharWidth=a.readShort(r,s),s+=2,o.usWeightClass=a.readUshort(r,s),s+=2,o.usWidthClass=a.readUshort(r,s),s+=2,o.fsType=a.readUshort(r,s),s+=2,o.ySubscriptXSize=a.readShort(r,s),s+=2,o.ySubscriptYSize=a.readShort(r,s),s+=2,o.ySubscriptXOffset=a.readShort(r,s),s+=2,o.ySubscriptYOffset=a.readShort(r,s),s+=2,o.ySuperscriptXSize=a.readShort(r,s),s+=2,o.ySuperscriptYSize=a.readShort(r,s),s+=2,o.ySuperscriptXOffset=a.readShort(r,s),s+=2,o.ySuperscriptYOffset=a.readShort(r,s),s+=2,o.yStrikeoutSize=a.readShort(r,s),s+=2,o.yStrikeoutPosition=a.readShort(r,s),s+=2,o.sFamilyClass=a.readShort(r,s),s+=2,o.panose=a.readBytes(r,s,10),s+=10,o.ulUnicodeRange1=a.readUint(r,s),s+=4,o.ulUnicodeRange2=a.readUint(r,s),s+=4,o.ulUnicodeRange3=a.readUint(r,s),s+=4,o.ulUnicodeRange4=a.readUint(r,s),s+=4,o.achVendID=[a.readInt8(r,s),a.readInt8(r,s+1),a.readInt8(r,s+2),a.readInt8(r,s+3)],s+=4,o.fsSelection=a.readUshort(r,s),s+=2,o.usFirstCharIndex=a.readUshort(r,s),s+=2,o.usLastCharIndex=a.readUshort(r,s),s+=2,o.sTypoAscender=a.readShort(r,s),s+=2,o.sTypoDescender=a.readShort(r,s),s+=2,o.sTypoLineGap=a.readShort(r,s),s+=2,o.usWinAscent=a.readUshort(r,s),s+=2,o.usWinDescent=a.readUshort(r,s),s+=2},e[\"OS/2\"].version1=function(r,s,o){var a=e._bin;return s=e[\"OS/2\"].version0(r,s,o),o.ulCodePageRange1=a.readUint(r,s),s+=4,o.ulCodePageRange2=a.readUint(r,s),s+=4},e[\"OS/2\"].version2=function(r,s,o){var a=e._bin;return s=e[\"OS/2\"].version1(r,s,o),o.sxHeight=a.readShort(r,s),s+=2,o.sCapHeight=a.readShort(r,s),s+=2,o.usDefault=a.readUshort(r,s),s+=2,o.usBreak=a.readUshort(r,s),s+=2,o.usMaxContext=a.readUshort(r,s),s+=2},e[\"OS/2\"].version5=function(r,s,o){var a=e._bin;return s=e[\"OS/2\"].version2(r,s,o),o.usLowerOpticalPointSize=a.readUshort(r,s),s+=2,o.usUpperOpticalPointSize=a.readUshort(r,s),s+=2},e.post={},e.post.parse=function(r,s,o){var a=e._bin,l={};return l.version=a.readFixed(r,s),s+=4,l.italicAngle=a.readFixed(r,s),s+=4,l.underlinePosition=a.readShort(r,s),s+=2,l.underlineThickness=a.readShort(r,s),s+=2,l},e==null&&(e={}),e.U==null&&(e.U={}),e.U.codeToGlyph=function(r,s){var o=r.cmap,a=-1;if(o.p0e4!=null?a=o.p0e4:o.p3e1!=null?a=o.p3e1:o.p1e0!=null?a=o.p1e0:o.p0e3!=null&&(a=o.p0e3),a==-1)throw\"no familiar platform and encoding!\";var l=o.tables[a];if(l.format==0)return s>=l.map.length?0:l.map[s];if(l.format==4){for(var c=-1,u=0;u<l.endCount.length;u++)if(s<=l.endCount[u]){c=u;break}return c==-1||l.startCount[c]>s?0:65535&(l.idRangeOffset[c]!=0?l.glyphIdArray[s-l.startCount[c]+(l.idRangeOffset[c]>>1)-(l.idRangeOffset.length-c)]:s+l.idDelta[c])}if(l.format==12){if(s>l.groups[l.groups.length-1][1])return 0;for(u=0;u<l.groups.length;u++){var f=l.groups[u];if(f[0]<=s&&s<=f[1])return f[2]+(s-f[0])}return 0}throw\"unknown cmap table format \"+l.format},e.U.glyphToPath=function(r,s){var o={cmds:[],crds:[]};if(r.SVG&&r.SVG.entries[s]){var a=r.SVG.entries[s];return a==null?o:(typeof a==\"string\"&&(a=e.SVG.toPath(a),r.SVG.entries[s]=a),a)}if(r.CFF){var l={x:0,y:0,stack:[],nStems:0,haveWidth:!1,width:r.CFF.Private?r.CFF.Private.defaultWidthX:0,open:!1},c=r.CFF,u=r.CFF.Private;if(c.ROS){for(var f=0;c.FDSelect[f+2]<=s;)f+=2;u=c.FDArray[c.FDSelect[f+1]].Private}e.U._drawCFF(r.CFF.CharStrings[s],l,c,u,o)}else r.glyf&&e.U._drawGlyf(s,r,o);return o},e.U._drawGlyf=function(r,s,o){var a=s.glyf[r];a==null&&(a=s.glyf[r]=e.glyf._parseGlyf(s,r)),a!=null&&(a.noc>-1?e.U._simpleGlyph(a,o):e.U._compoGlyph(a,s,o))},e.U._simpleGlyph=function(r,s){for(var o=0;o<r.noc;o++){for(var a=o==0?0:r.endPts[o-1]+1,l=r.endPts[o],c=a;c<=l;c++){var u=c==a?l:c-1,f=c==l?a:c+1,p=1&r.flags[c],m=1&r.flags[u],v=1&r.flags[f],y=r.xs[c],M=r.ys[c];if(c==a)if(p){if(!m){e.U.P.moveTo(s,y,M);continue}e.U.P.moveTo(s,r.xs[u],r.ys[u])}else m?e.U.P.moveTo(s,r.xs[u],r.ys[u]):e.U.P.moveTo(s,(r.xs[u]+y)/2,(r.ys[u]+M)/2);p?m&&e.U.P.lineTo(s,y,M):v?e.U.P.qcurveTo(s,y,M,r.xs[f],r.ys[f]):e.U.P.qcurveTo(s,y,M,(y+r.xs[f])/2,(M+r.ys[f])/2)}e.U.P.closePath(s)}},e.U._compoGlyph=function(r,s,o){for(var a=0;a<r.parts.length;a++){var l={cmds:[],crds:[]},c=r.parts[a];e.U._drawGlyf(c.glyphIndex,s,l);for(var u=c.m,f=0;f<l.crds.length;f+=2){var p=l.crds[f],m=l.crds[f+1];o.crds.push(p*u.a+m*u.b+u.tx),o.crds.push(p*u.c+m*u.d+u.ty)}for(f=0;f<l.cmds.length;f++)o.cmds.push(l.cmds[f])}},e.U._getGlyphClass=function(r,s){var o=e._lctf.getInterval(s,r);return o==-1?0:s[o+2]},e.U.getPairAdjustment=function(r,s,o){var a=!1;if(r.GPOS)for(var l=r.GPOS,c=l.lookupList,u=l.featureList,f=[],p=0;p<u.length;p++){var m=u[p];if(m.tag==\"kern\"){a=!0;for(var v=0;v<m.tab.length;v++)if(!f[m.tab[v]]){f[m.tab[v]]=!0;for(var y=c[m.tab[v]],M=0;M<y.tabs.length;M++)if(y.tabs[M]!=null){var g,x=y.tabs[M];if((!x.coverage||(g=e._lctf.coverageIndex(x.coverage,s))!=-1)&&y.ltype!=1){if(y.ltype==2){var S=null;if(x.fmt==1){var w=x.pairsets[g];for(p=0;p<w.length;p++)w[p].gid2==o&&(S=w[p])}else if(x.fmt==2){var C=e.U._getGlyphClass(s,x.classDef1),T=e.U._getGlyphClass(o,x.classDef2);S=x.matrix[C][T]}if(S){var R=0;return S.val1&&S.val1[2]&&(R+=S.val1[2]),S.val2&&S.val2[0]&&(R+=S.val2[0]),R}}}}}}}if(r.kern&&!a){var b=r.kern.glyph1.indexOf(s);if(b!=-1){var P=r.kern.rval[b].glyph2.indexOf(o);if(P!=-1)return r.kern.rval[b].vals[P]}}return 0},e.U._applySubs=function(r,s,o,a){for(var l=r.length-s-1,c=0;c<o.tabs.length;c++)if(o.tabs[c]!=null){var u,f=o.tabs[c];if(!f.coverage||(u=e._lctf.coverageIndex(f.coverage,r[s]))!=-1){if(o.ltype==1)r[s],f.fmt==1?r[s]=r[s]+f.delta:r[s]=f.newg[u];else if(o.ltype==4)for(var p=f.vals[u],m=0;m<p.length;m++){var v=p[m],y=v.chain.length;if(!(y>l)){for(var M=!0,g=0,x=0;x<y;x++){for(;r[s+g+(1+x)]==-1;)g++;v.chain[x]!=r[s+g+(1+x)]&&(M=!1)}if(M){for(r[s]=v.nglyph,x=0;x<y+g;x++)r[s+x+1]=-1;break}}}else if(o.ltype==5&&f.fmt==2)for(var S=e._lctf.getInterval(f.cDef,r[s]),w=f.cDef[S+2],C=f.scset[w],T=0;T<C.length;T++){var R=C[T],b=R.input;if(!(b.length>l)){for(M=!0,x=0;x<b.length;x++){var P=e._lctf.getInterval(f.cDef,r[s+1+x]);if(S==-1&&f.cDef[P+2]!=b[x]){M=!1;break}}if(M){var L=R.substLookupRecords;for(m=0;m<L.length;m+=2)L[m],L[m+1]}}}else if(o.ltype==6&&f.fmt==3){if(!e.U._glsCovered(r,f.backCvg,s-f.backCvg.length)||!e.U._glsCovered(r,f.inptCvg,s)||!e.U._glsCovered(r,f.ahedCvg,s+f.inptCvg.length))continue;var U=f.lookupRec;for(T=0;T<U.length;T+=2){S=U[T];var F=a[U[T+1]];e.U._applySubs(r,s+S,F,a)}}}}},e.U._glsCovered=function(r,s,o){for(var a=0;a<s.length;a++)if(e._lctf.coverageIndex(s[a],r[o+a])==-1)return!1;return!0},e.U.glyphsToPath=function(r,s,o){for(var a={cmds:[],crds:[]},l=0,c=0;c<s.length;c++){var u=s[c];if(u!=-1){for(var f=c<s.length-1&&s[c+1]!=-1?s[c+1]:0,p=e.U.glyphToPath(r,u),m=0;m<p.crds.length;m+=2)a.crds.push(p.crds[m]+l),a.crds.push(p.crds[m+1]);for(o&&a.cmds.push(o),m=0;m<p.cmds.length;m++)a.cmds.push(p.cmds[m]);o&&a.cmds.push(\"X\"),l+=r.hmtx.aWidth[u],c<s.length-1&&(l+=e.U.getPairAdjustment(r,u,f))}}return a},e.U.P={},e.U.P.moveTo=function(r,s,o){r.cmds.push(\"M\"),r.crds.push(s,o)},e.U.P.lineTo=function(r,s,o){r.cmds.push(\"L\"),r.crds.push(s,o)},e.U.P.curveTo=function(r,s,o,a,l,c,u){r.cmds.push(\"C\"),r.crds.push(s,o,a,l,c,u)},e.U.P.qcurveTo=function(r,s,o,a,l){r.cmds.push(\"Q\"),r.crds.push(s,o,a,l)},e.U.P.closePath=function(r){r.cmds.push(\"Z\")},e.U._drawCFF=function(r,s,o,a,l){for(var c=s.stack,u=s.nStems,f=s.haveWidth,p=s.width,m=s.open,v=0,y=s.x,M=s.y,g=0,x=0,S=0,w=0,C=0,T=0,R=0,b=0,P=0,L=0,U={val:0,size:0};v<r.length;){e.CFF.getCharString(r,v,U);var F=U.val;if(v+=U.size,F==\"o1\"||F==\"o18\")c.length%2!=0&&!f&&(p=c.shift()+a.nominalWidthX),u+=c.length>>1,c.length=0,f=!0;else if(F==\"o3\"||F==\"o23\")c.length%2!=0&&!f&&(p=c.shift()+a.nominalWidthX),u+=c.length>>1,c.length=0,f=!0;else if(F==\"o4\")c.length>1&&!f&&(p=c.shift()+a.nominalWidthX,f=!0),m&&e.U.P.closePath(l),M+=c.pop(),e.U.P.moveTo(l,y,M),m=!0;else if(F==\"o5\")for(;c.length>0;)y+=c.shift(),M+=c.shift(),e.U.P.lineTo(l,y,M);else if(F==\"o6\"||F==\"o7\")for(var z=c.length,G=F==\"o6\",K=0;K<z;K++){var ee=c.shift();G?y+=ee:M+=ee,G=!G,e.U.P.lineTo(l,y,M)}else if(F==\"o8\"||F==\"o24\"){z=c.length;for(var oe=0;oe+6<=z;)g=y+c.shift(),x=M+c.shift(),S=g+c.shift(),w=x+c.shift(),y=S+c.shift(),M=w+c.shift(),e.U.P.curveTo(l,g,x,S,w,y,M),oe+=6;F==\"o24\"&&(y+=c.shift(),M+=c.shift(),e.U.P.lineTo(l,y,M))}else{if(F==\"o11\")break;if(F==\"o1234\"||F==\"o1235\"||F==\"o1236\"||F==\"o1237\")F==\"o1234\"&&(x=M,S=(g=y+c.shift())+c.shift(),L=w=x+c.shift(),T=w,b=M,y=(R=(C=(P=S+c.shift())+c.shift())+c.shift())+c.shift(),e.U.P.curveTo(l,g,x,S,w,P,L),e.U.P.curveTo(l,C,T,R,b,y,M)),F==\"o1235\"&&(g=y+c.shift(),x=M+c.shift(),S=g+c.shift(),w=x+c.shift(),P=S+c.shift(),L=w+c.shift(),C=P+c.shift(),T=L+c.shift(),R=C+c.shift(),b=T+c.shift(),y=R+c.shift(),M=b+c.shift(),c.shift(),e.U.P.curveTo(l,g,x,S,w,P,L),e.U.P.curveTo(l,C,T,R,b,y,M)),F==\"o1236\"&&(g=y+c.shift(),x=M+c.shift(),S=g+c.shift(),L=w=x+c.shift(),T=w,R=(C=(P=S+c.shift())+c.shift())+c.shift(),b=T+c.shift(),y=R+c.shift(),e.U.P.curveTo(l,g,x,S,w,P,L),e.U.P.curveTo(l,C,T,R,b,y,M)),F==\"o1237\"&&(g=y+c.shift(),x=M+c.shift(),S=g+c.shift(),w=x+c.shift(),P=S+c.shift(),L=w+c.shift(),C=P+c.shift(),T=L+c.shift(),R=C+c.shift(),b=T+c.shift(),Math.abs(R-y)>Math.abs(b-M)?y=R+c.shift():M=b+c.shift(),e.U.P.curveTo(l,g,x,S,w,P,L),e.U.P.curveTo(l,C,T,R,b,y,M));else if(F==\"o14\"){if(c.length>0&&!f&&(p=c.shift()+o.nominalWidthX,f=!0),c.length==4){var N=c.shift(),V=c.shift(),W=c.shift(),O=c.shift(),j=e.CFF.glyphBySE(o,W),Z=e.CFF.glyphBySE(o,O);e.U._drawCFF(o.CharStrings[j],s,o,a,l),s.x=N,s.y=V,e.U._drawCFF(o.CharStrings[Z],s,o,a,l)}m&&(e.U.P.closePath(l),m=!1)}else if(F==\"o19\"||F==\"o20\")c.length%2!=0&&!f&&(p=c.shift()+a.nominalWidthX),u+=c.length>>1,c.length=0,f=!0,v+=u+7>>3;else if(F==\"o21\")c.length>2&&!f&&(p=c.shift()+a.nominalWidthX,f=!0),M+=c.pop(),y+=c.pop(),m&&e.U.P.closePath(l),e.U.P.moveTo(l,y,M),m=!0;else if(F==\"o22\")c.length>1&&!f&&(p=c.shift()+a.nominalWidthX,f=!0),y+=c.pop(),m&&e.U.P.closePath(l),e.U.P.moveTo(l,y,M),m=!0;else if(F==\"o25\"){for(;c.length>6;)y+=c.shift(),M+=c.shift(),e.U.P.lineTo(l,y,M);g=y+c.shift(),x=M+c.shift(),S=g+c.shift(),w=x+c.shift(),y=S+c.shift(),M=w+c.shift(),e.U.P.curveTo(l,g,x,S,w,y,M)}else if(F==\"o26\")for(c.length%2&&(y+=c.shift());c.length>0;)g=y,x=M+c.shift(),y=S=g+c.shift(),M=(w=x+c.shift())+c.shift(),e.U.P.curveTo(l,g,x,S,w,y,M);else if(F==\"o27\")for(c.length%2&&(M+=c.shift());c.length>0;)x=M,S=(g=y+c.shift())+c.shift(),w=x+c.shift(),y=S+c.shift(),M=w,e.U.P.curveTo(l,g,x,S,w,y,M);else if(F==\"o10\"||F==\"o29\"){var q=F==\"o10\"?a:o;if(c.length==0)console.debug(\"error: empty stack\");else{var ie=c.pop(),le=q.Subrs[ie+q.Bias];s.x=y,s.y=M,s.nStems=u,s.haveWidth=f,s.width=p,s.open=m,e.U._drawCFF(le,s,o,a,l),y=s.x,M=s.y,u=s.nStems,f=s.haveWidth,p=s.width,m=s.open}}else if(F==\"o30\"||F==\"o31\"){var J=c.length,ye=(oe=0,F==\"o31\");for(oe+=J-(z=-3&J);oe<z;)ye?(x=M,S=(g=y+c.shift())+c.shift(),M=(w=x+c.shift())+c.shift(),z-oe==5?(y=S+c.shift(),oe++):y=S,ye=!1):(g=y,x=M+c.shift(),S=g+c.shift(),w=x+c.shift(),y=S+c.shift(),z-oe==5?(M=w+c.shift(),oe++):M=w,ye=!0),e.U.P.curveTo(l,g,x,S,w,y,M),oe+=4}else{if((F+\"\").charAt(0)==\"o\")throw console.debug(\"Unknown operation: \"+F,r),F;c.push(F)}}}s.x=y,s.y=M,s.nStems=u,s.haveWidth=f,s.width=p,s.open=m};var t=e,i={Typr:t};return n.Typr=t,n.default=i,Object.defineProperty(n,\"__esModule\",{value:!0}),n}({}).Typr}", "title": "" }, { "docid": "749a902638cf91483a048f221f1df40c", "score": "0.58149534", "text": "function zh(a){var b=!!a.readOnly;if(b)var c=null,d=!1,e=!1,f=!1,k=!1,m=!1,n=!1;else(c=a.toolbox)?(\"string\"!=typeof c&&(\"undefined\"==typeof XSLTProcessor&&c.outerHTML?c=c.outerHTML:c instanceof Element||(c=null)),\"string\"==typeof c&&(c=Xf(c))):c=null,d=!(!c||!c.getElementsByTagName(\"category\").length),e=a.trashcan,void 0===e&&(e=d),f=a.collapse,void 0===f&&(f=d),k=a.comments,void 0===k&&(k=d),m=a.disable,void 0===m&&(m=d),n=a.sounds,void 0===n&&(n=!0);var p=a.scrollbars;void 0===p&&(p=d);var u=a.css;\nvoid 0===u&&(u=!0);var q=\"https://blockly-demo.appspot.com/static/media/\";a.media?q=a.media:a.path&&(q=a.path+\"media/\");this.o=!!a.rtl;this.F=f;this.ba=k;this.I=m;this.i=b;this.D=a.maxBlocks||Infinity;this.v=q;this.sa=d;this.H=p;this.Qa=e;this.Ja=n;this.Fa=u;this.B=c;b=a.grid||{};c={};c.spacing=parseFloat(b.spacing)||0;c.Yo=b.colour||\"#888\";c.length=parseFloat(b.length)||1;c.fp=0<c.spacing&&!!b.snap;this.h=c;a=a.zoom||{};b={};b.controls=void 0===a.controls?!1:!!a.controls;b.ii=void 0===a.wheel?!1:\n!!a.wheel;b.ai=void 0===a.startScale?1:parseFloat(a.startScale);b.Oc=void 0===a.maxScale?3:parseFloat(a.maxScale);b.Pc=void 0===a.minScale?.3:parseFloat(a.minScale);b.Xh=void 0===a.scaleSpeed?1.2:parseFloat(a.scaleSpeed);this.g=b}", "title": "" }, { "docid": "1bb7079914aacea76525b6a3f8532efd", "score": "0.5501303", "text": "function yh(){var a=this;this.ma=new Te(function(){return zh(a)},function(b){var c=zh(a);c&&(n(b.y)&&(a.ma.scrollY=-c.Xb*b.y-c.wc),a.ma.Qa.setAttribute(\"transform\",\"translate(0,\"+(a.ma.scrollY+c.Wb)+\")\"))});this.ma.nm=!0;this.Ul=[];this.$b=this.Ma=0;this.gi=[];this.Tc=[]}", "title": "" }, { "docid": "73a35cc7ec07e618bdc74fad6d0d8e82", "score": "0.5452873", "text": "function Kc(){return function(){function a(){kb()}function b(a,b){return b?\"\\x00\"===a?\"\\ufffd\":a.slice(0,-1)+\"\\\\\"+a.charCodeAt(a.length-1).toString(16)+\" \":\"\\\\\"+a}function c(a,b,c){a=\"0x\"+b-65536;return a!==a||c?b:0>a?String.fromCharCode(a+65536):String.fromCharCode(a>>10|55296,a&1023|56320)}function d(a,b){for(var c=0,d=a.length;c<d;c++)if(a[c]===b)return c;return-1}function e(a,b){a===b&&(na=!0);return 0}function f(a,c,d,e){var f,g,h,k,l=c&&c.ownerDocument,m=c?c.nodeType:9;d=d||[];if(\"string\"!==\ntypeof a||!a||1!==m&&9!==m&&11!==m)return d;if(!e&&((c?c.ownerDocument||c:Ba)!==L&&kb(c),c=c||L,qa)){if(11!==m&&(k=Di.exec(a)))if(f=k[1])if(9===m)if(g=c.getElementById(f)){if(g.id===f)return d.push(g),d}else return d;else{if(l&&(g=l.getElementById(f))&&Vb(c,g)&&g.id===f)return d.push(g),d}else{if(k[2])return db.apply(d,c.getElementsByTagName(a)),d;if((f=k[3])&&U.getElementsByClassName&&c.getElementsByClassName)return db.apply(d,c.getElementsByClassName(f)),d}if(!(!U.qsa||Dc[a+\" \"]||fa&&fa.test(a))){if(1!==\nm){l=c;var pa=a}else if(\"object\"!==c.nodeName.toLowerCase()){(h=c.getAttribute(\"id\"))?h=h.replace(Bf,b):c.setAttribute(\"id\",h=T);g=Ec(a);for(f=g.length;f--;)g[f]=\"#\"+h+\" \"+x(g[f]);pa=g.join(\",\");l=Id.test(a)&&v(c.parentNode)||c}if(pa)try{return db.apply(d,l.querySelectorAll(pa)),d}catch(ql){Dc(a)}finally{h===T&&c.removeAttribute(\"id\")}}}return Ei(a.replace(Fc,\"$1\"),c,d,e)}function g(){function a(c,d){b.push(c+\" \")>N.cacheLength&&delete a[b.shift()];return a[c+\" \"]=d}var b=[];return a}function h(a){a[T]=\n!0;return a}function k(a){var b=L.createElement(\"fieldset\");try{return!!a(b)}catch(ea){return!1}finally{b.parentNode&&b.parentNode.removeChild(b)}}function l(a,b){for(var c=a.split(\"|\"),d=c.length;d--;)N.attrHandle[c[d]]=b}function m(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&a.sourceIndex-b.sourceIndex;if(d)return d;if(c)for(;c=c.nextSibling;)if(c===b)return-1;return a?1:-1}function p(a){return function(b){return\"input\"===b.nodeName.toLowerCase()&&b.type===a}}function n(a){return function(b){var c=\nb.nodeName.toLowerCase();return(\"input\"===c||\"button\"===c)&&b.type===a}}function q(a){return function(b){return\"form\"in b?b.parentNode&&!1===b.disabled?\"label\"in b?\"label\"in b.parentNode?b.parentNode.disabled===a:b.disabled===a:b.isDisabled===a||b.isDisabled!==!a&&Fi(b)===a:b.disabled===a:\"label\"in b?b.disabled===a:!1}}function r(a){return h(function(b){b=+b;return h(function(c,d){for(var e,f=a([],c.length,b),g=f.length;g--;)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function v(a){return a&&\"undefined\"!==\ntypeof a.getElementsByTagName&&a}function z(){}function x(a){for(var b=0,c=a.length,d=\"\";b<c;b++)d+=a[b].value;return d}function A(a,b,c){var d=b.dir,e=b.next,f=c&&\"parentNode\"===(e||d),g=Gi++;return b.first?function(b,c,e){for(;b=b[d];)if(1===b.nodeType||f)return a(b,c,e);return!1}:function(b,c,h){var k,l,m=eb+\" \"+g;if(h)for(;b=b[d];){if((1===b.nodeType||f)&&a(b,c,h))return!0}else for(;b=b[d];)if(1===b.nodeType||f){var p=b[T]||(b[T]={});p=p[b.uniqueID]||(p[b.uniqueID]={});if(e&&e===b.nodeName.toLowerCase())b=\nb[d]||b;else if((l=p[d])&&l[0]===m){if(!0===(k=l[1])||k===O)return!0===k}else if(l=p[d]=[m],l[1]=a(b,c,h)||O,!0===l[1])return!0}return!1}}function t(a){return 1<a.length?function(b,c,d){for(var e=a.length;e--;)if(!a[e](b,c,d))return!1;return!0}:a[0]}function B(a,b,c,d,e){for(var f,g=[],h=0,k=a.length,l=null!=b;h<k;h++)if(f=a[h])if(!c||c(f,d,e))g.push(f),l&&b.push(h);return g}function C(a,b,c,e,g,k){e&&!e[T]&&(e=C(e));g&&!g[T]&&(g=C(g,k));return h(function(h,k,l,m){var p,n=[],pa=[],q=k.length,ea;if(!(ea=\nh)){ea=b||\"*\";for(var t=l.nodeType?[l]:l,r=[],Db=0,z=t.length;Db<z;Db++)f(ea,t[Db],r);ea=r}ea=!a||!h&&b?ea:B(ea,n,a,l,m);t=c?g||(h?a:q||e)?[]:k:ea;c&&c(ea,t,l,m);if(e){var v=B(t,pa);e(v,[],l,m);for(l=v.length;l--;)if(p=v[l])t[pa[l]]=!(ea[pa[l]]=p)}if(h){if(g||a){if(g){v=[];for(l=t.length;l--;)(p=t[l])&&v.push(ea[l]=p);g(null,t=[],v,m)}for(l=t.length;l--;)(p=t[l])&&-1<(v=g?d(h,p):n[l])&&(h[v]=!(k[v]=p))}}else t=B(t===k?t.splice(q,t.length):t),g?g(null,k,t,m):db.apply(k,t)})}function D(a){var b,c,e=\na.length,f=N.relative[a[0].type];var g=f||N.relative[\" \"];for(var h=f?1:0,k=A(function(a){return a===b},g,!0),l=A(function(a){return-1<d(b,a)},g,!0),m=[function(a,c,d){a=!f&&(d||c!==M)||((b=c).nodeType?k(a,c,d):l(a,c,d));b=null;return a}];h<e;h++)if(g=N.relative[a[h].type])m=[A(t(m),g)];else{g=N.filter[a[h].type].apply(null,a[h].matches);if(g[T]){for(c=++h;c<e&&!N.relative[a[c].type];c++);return C(1<h&&t(m),1<h&&x(a.slice(0,h-1).concat({value:\" \"===a[h-2].type?\"*\":\"\"})).replace(Fc,\"$1\"),g,h<c&&D(a.slice(h,\nc)),c<e&&D(a=a.slice(c)),c<e&&x(a))}m.push(g)}return t(m)}function F(a,b){function c(c,h,k,l,m){var p,n,pa=0,q=\"0\",ea=c&&[],t=[],r=M,v=c||g&&N.find.TAG(\"*\",m),Db=eb+=null==r?1:Math.random()||.1,z=v.length;m&&(M=h===L||h||m,O=d);for(;q!==z&&null!=(p=v[q]);q++){if(g&&p){var x=0;h||p.ownerDocument===L||(kb(p),k=!qa);for(;n=a[x++];)if(n(p,h||L,k)){l.push(p);break}m&&(eb=Db,O=++d)}e&&((p=!n&&p)&&pa--,c&&ea.push(p))}pa+=q;if(e&&q!==pa){for(x=0;n=b[x++];)n(ea,t,h,k);if(c){if(0<pa)for(;q--;)ea[q]||t[q]||\n(t[q]=Hi.call(l));t=B(t)}db.apply(l,t);m&&!c&&0<t.length&&1<pa+b.length&&f.function_______________$uniqueSort(l)}m&&(eb=Db,M=r);return ea}var d=0,e=0<b.length,g=0<a.length;return e?h(c):c}var K,O,M,P,na,L,ha,qa,fa,lb,Gc,Vb,T=\"sizzle\"+1*new Date,Ba=window.document,eb=0,Gi=0,Cf=g(),Df=g(),Ef=g(),Dc=g(),Ii={}.hasOwnProperty,mb=[],Hi=mb.pop,Ji=mb.push,db=mb.push,Ff=mb.slice,Ki=RegExp(\"[\\\\x20\\\\t\\\\r\\\\n\\\\f]+\",\"g\"),Fc=RegExp(\"^[\\\\x20\\\\t\\\\r\\\\n\\\\f]+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)[\\\\x20\\\\t\\\\r\\\\n\\\\f]+$\",\"g\"),Li=/^[\\x20\\t\\r\\n\\f]*,[\\x20\\t\\r\\n\\f]*/,\nMi=/^[\\x20\\t\\r\\n\\f]*([>+~]|[\\x20\\t\\r\\n\\f])[\\x20\\t\\r\\n\\f]*/,Ni=/:((?:\\\\.|[\\w-]|[^\\x00-\\xa0])+)(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|\\[[\\x20\\t\\r\\n\\f]*((?:\\\\.|[\\w-]|[^\\x00-\\xa0])+)(?:[\\x20\\t\\r\\n\\f]*([*^$|!~]?=)[\\x20\\t\\r\\n\\f]*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(#?(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+))|)[\\x20\\t\\r\\n\\f]*\\])*)|.*)\\)|)/,Oi=/^(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+$/,Hc={ID:/^#((?:\\\\.|[\\w-]|[^\\x00-\\xa0])+)/,CLASS:/^\\.((?:\\\\.|[\\w-]|[^\\x00-\\xa0])+)/,TAG:/^((?:\\\\.|[\\w-]|[^\\x00-\\xa0])+|[*])/,\nATTR:/^\\[[\\x20\\t\\r\\n\\f]*((?:\\\\.|[\\w-]|[^\\x00-\\xa0])+)(?:[\\x20\\t\\r\\n\\f]*([*^$|!~]?=)[\\x20\\t\\r\\n\\f]*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(#?(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+))|)[\\x20\\t\\r\\n\\f]*\\]/,PSEUDO:/^:((?:\\\\.|[\\w-]|[^\\x00-\\xa0])+)(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|\\[[\\x20\\t\\r\\n\\f]*((?:\\\\.|[\\w-]|[^\\x00-\\xa0])+)(?:[\\x20\\t\\r\\n\\f]*([*^$|!~]?=)[\\x20\\t\\r\\n\\f]*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(#?(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+))|)[\\x20\\t\\r\\n\\f]*\\])*)|.*)\\)|)/,CHILD:/^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\([\\x20\\t\\r\\n\\f]*(even|odd|(([+-]|)(\\d*)n|)[\\x20\\t\\r\\n\\f]*(?:([+-]|)[\\x20\\t\\r\\n\\f]*(\\d+)|))[\\x20\\t\\r\\n\\f]*\\)|)/i,\nbool:/^(?:checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)$/i,needsContext:/^[\\x20\\t\\r\\n\\f]*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\([\\x20\\t\\r\\n\\f]*((?:-\\d)?\\d*)[\\x20\\t\\r\\n\\f]*\\)|)(?=[^-]|$)/i},Pi=/^(?:input|select|textarea|button)$/i,Qi=/^h\\d$/i,Wb=/^[^{]+\\{\\s*\\[native \\w/,Di=/^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,Id=/[+~]/,Ta=RegExp(\"\\\\\\\\([\\\\da-f]{1,6}[\\\\x20\\\\t\\\\r\\\\n\\\\f]?|([\\\\x20\\\\t\\\\r\\\\n\\\\f])|.)\",\"ig\"),Bf=/([\\0-\\x1f\\x7f]|^-?\\d)|^-$|[^\\0-\\x1f\\x7f-\\uFFFF\\w-]/g,\nFi=A(function(a){return!0===a.disabled&&\"fieldset\"===a.nodeName.toLowerCase()},{dir:\"parentNode\",next:\"legend\"});try{db.apply(mb=Ff.call(Ba.childNodes),Ba.childNodes),mb[Ba.childNodes.length].nodeType}catch(pa){db={apply:mb.length?function(a,b){Ji.apply(a,Ff.call(b))}:function(a,b){for(var c=a.length,d=0;a[c++]=b[d++];);a.length=c-1}}}var U=f.function_______________$support={};var Ri=f.isXML=function(a){return(a=a&&(a.ownerDocument||a).documentElement)?\"HTML\"!==a.nodeName:!1};var kb=f.setDocument=\nfunction(b){var f;b=b?b.ownerDocument||b:Ba;if(b===L||9!==b.nodeType||!b.documentElement)return L;L=b;ha=L.documentElement;qa=!Ri(L);Ba!==L&&(f=L.defaultView)&&f.top!==f&&(f.addEventListener?f.addEventListener(\"unload\",a,!1):f.attachEvent&&f.attachEvent(\"onunload\",a));U.attributes=k(function(a){a.className=\"i\";return!a.getAttribute(\"className\")});U.getElementsByTagName=k(function(a){a.appendChild(L.createComment(\"\"));return!a.getElementsByTagName(\"*\").length});U.getElementsByClassName=Wb.test(L.getElementsByClassName);\nU.getById=k(function(a){ha.appendChild(a).id=T;return!L.getElementsByName||!L.getElementsByName(T).length});U.getById?(N.filter.ID=function(a){var b=a.replace(Ta,c);return function(a){return a.getAttribute(\"id\")===b}},N.find.ID=function(a,b){if(\"undefined\"!==typeof b.getElementById&&qa){var c=b.getElementById(a);return c?[c]:[]}}):(N.filter.ID=function(a){var b=a.replace(Ta,c);return function(a){return(a=\"undefined\"!==typeof a.getAttributeNode&&a.getAttributeNode(\"id\"))&&a.value===b}},N.find.ID=function(a,\nb){if(\"undefined\"!==typeof b.getElementById&&qa){var c,d,e=b.getElementById(a);if(e){if((c=e.getAttributeNode(\"id\"))&&c.value===a)return[e];var f=b.getElementsByName(a);for(d=0;e=f[d++];)if((c=e.getAttributeNode(\"id\"))&&c.value===a)return[e]}return[]}});N.find.TAG=U.getElementsByTagName?function(a,b){if(\"undefined\"!==typeof b.getElementsByTagName)return b.getElementsByTagName(a);if(U.qsa)return b.querySelectorAll(a)}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if(\"*\"===a){for(;c=f[e++];)1===\nc.nodeType&&d.push(c);return d}return f};N.find.CLASS=U.getElementsByClassName&&function(a,b){if(\"undefined\"!==typeof b.getElementsByClassName&&qa)return b.getElementsByClassName(a)};lb=[];fa=[];if(U.qsa=Wb.test(L.querySelectorAll))k(function(a){ha.appendChild(a).innerHTML=\"<a id='\"+T+\"'></a><select id='\"+T+\"-\\r\\\\' msallowcapture=''><option selected=''></option></select>\";a.querySelectorAll(\"[msallowcapture^='']\").length&&fa.push(\"[*^$]=[\\\\x20\\\\t\\\\r\\\\n\\\\f]*(?:''|\\\"\\\")\");a.querySelectorAll(\"[selected]\").length||\nfa.push(\"\\\\[[\\\\x20\\\\t\\\\r\\\\n\\\\f]*(?:value|checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)\");a.querySelectorAll(\"[id~=\"+T+\"-]\").length||fa.push(\"~=\");a.querySelectorAll(\":checked\").length||fa.push(\":checked\");a.querySelectorAll(\"a#\"+T+\"+*\").length||fa.push(\".#.+[+~]\")}),k(function(a){a.innerHTML=\"<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>\";var b=L.createElement(\"input\");b.setAttribute(\"type\",\n\"hidden\");a.appendChild(b).setAttribute(\"name\",\"D\");a.querySelectorAll(\"[name=d]\").length&&fa.push(\"name[\\\\x20\\\\t\\\\r\\\\n\\\\f]*[*^$|!~]?=\");2!==a.querySelectorAll(\":enabled\").length&&fa.push(\":enabled\",\":disabled\");ha.appendChild(a).disabled=!0;2!==a.querySelectorAll(\":disabled\").length&&fa.push(\":enabled\",\":disabled\");fa.push(\",.*:\")});(U.matchesSelector=Wb.test(Gc=ha.matches||ha.webkitMatchesSelector||ha.mozMatchesSelector||ha.oMatchesSelector||ha.msMatchesSelector))&&k(function(a){U.disconnectedMatch=\nGc.call(a,\"*\");Gc.call(a,\"[s!='']:x\");lb.push(\"!=\",\":((?:\\\\\\\\.|[\\\\w-]|[^\\x00-\\\\xa0])+)(?:\\\\((('((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\")|((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|\\\\[[\\\\x20\\\\t\\\\r\\\\n\\\\f]*((?:\\\\\\\\.|[\\\\w-]|[^\\x00-\\\\xa0])+)(?:[\\\\x20\\\\t\\\\r\\\\n\\\\f]*([*^$|!~]?=)[\\\\x20\\\\t\\\\r\\\\n\\\\f]*(?:'((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\"|(#?(?:\\\\\\\\.|[\\\\w-]|[^\\x00-\\\\xa0])+))|)[\\\\x20\\\\t\\\\r\\\\n\\\\f]*\\\\])*)|.*)\\\\)|)\")});fa=fa.length&&new RegExp(fa.join(\"|\"));lb=lb.length&&new RegExp(lb.join(\"|\"));Vb=(f=Wb.test(ha.compareDocumentPosition))||\nWb.test(ha.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!!(d&&1===d.nodeType&&(c.contains?c.contains(d):a.compareDocumentPosition&&a.compareDocumentPosition(d)&16))}:function(a,b){if(b)for(;b=b.parentNode;)if(b===a)return!0;return!1};e=f?function(a,b){if(a===b)return na=!0,0;var c=!a.compareDocumentPosition-!b.compareDocumentPosition;if(c)return c;c=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1;return c&1||!U.sortDetached&&\nb.compareDocumentPosition(a)===c?a===L||a.ownerDocument===Ba&&Vb(Ba,a)?-1:b===L||b.ownerDocument===Ba&&Vb(Ba,b)?1:P?d(P,a)-d(P,b):0:c&4?-1:1}:function(a,b){if(a===b)return na=!0,0;var c=0;var e=a.parentNode;var f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===L?-1:b===L?1:e?-1:f?1:P?d(P,a)-d(P,b):0;if(e===f)return m(a,b);for(e=a;e=e.parentNode;)g.unshift(e);for(e=b;e=e.parentNode;)h.unshift(e);for(;g[c]===h[c];)c++;return c?m(g[c],h[c]):g[c]===Ba?-1:h[c]===Ba?1:0};return L};f.matches=function(a,b){return f(a,\nnull,null,b)};f.matchesSelector=function(a,b){(a.ownerDocument||a)!==L&&kb(a);if(!(!U.matchesSelector||!qa||Dc[b+\" \"]||lb&&lb.test(b)||fa&&fa.test(b)))try{var c=Gc.call(a,b);if(c||U.disconnectedMatch||a.document&&11!==a.document.nodeType)return c}catch(pl){Dc(b)}return 0<f(b,L,null,[a]).length};f.contains=function(a,b){(a.ownerDocument||a)!==L&&kb(a);return Vb(a,b)};f.function_______________$attr=function(a,b){(a.ownerDocument||a)!==L&&kb(a);var c=N.attrHandle[b.toLowerCase()];c=c&&Ii.call(N.attrHandle,\nb.toLowerCase())?c(a,b,!qa):void 0;return void 0!==c?c:U.attributes||!qa?a.getAttribute(b):(c=a.getAttributeNode(b))&&c.specified?c.value:null};f.function_______________$escape=function(a){return(a+\"\").replace(Bf,b)};f.error=function(a){throw Error(\"Syntax error, unrecognized expression: \"+a);};f.function_______________$uniqueSort=function(a){var b,c=[],d=0,f=0;na=!U.detectDuplicates;P=!U.sortStable&&a.slice(0);a.sort(e);if(na){for(;b=a[f++];)b===a[f]&&(d=c.push(f));for(;d--;)a.splice(c[d],1)}P=null};\nvar Jd=f.getText=function(a){var b=\"\",c=0;var d=a.nodeType;if(!d)for(;d=a[c++];)b+=Jd(d);else if(1===d||9===d||11===d){if(\"string\"===typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)b+=Jd(a)}else if(3===d||4===d)return a.nodeValue;return b};var N=f.selectors={cacheLength:50,createPseudo:h,match:Hc,attrHandle:{},find:{},relative:{\">\":{dir:\"parentNode\",first:!0},\" \":{dir:\"parentNode\"},\"+\":{dir:\"previousSibling\",first:!0},\"~\":{dir:\"previousSibling\"}},preFilter:{ATTR:function(a){a[1]=\na[1].replace(Ta,c);a[3]=(a[3]||a[4]||a[5]||\"\").replace(Ta,c);\"~=\"===a[2]&&(a[3]=\" \"+a[3]+\" \");return a.slice(0,4)},CHILD:function(a){a[1]=a[1].toLowerCase();\"nth\"===a[1].slice(0,3)?(a[3]||f.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*(\"even\"===a[3]||\"odd\"===a[3])),a[5]=+(a[7]+a[8]||\"odd\"===a[3])):a[3]&&f.error(a[0]);return a},PSEUDO:function(a){var b,c=!a[6]&&a[2];if(Hc.CHILD.test(a[0]))return null;a[3]?a[2]=a[4]||a[5]||\"\":c&&Ni.test(c)&&(b=Ec(c,!0))&&(b=c.indexOf(\")\",c.length-b)-c.length)&&(a[0]=a[0].slice(0,\nb),a[2]=c.slice(0,b));return a.slice(0,3)}},filter:{TAG:function(a){var b=a.replace(Ta,c).toLowerCase();return\"*\"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=Cf[a+\" \"];return b||(b=new RegExp(\"(^|[\\\\x20\\\\t\\\\r\\\\n\\\\f])\"+a+\"([\\\\x20\\\\t\\\\r\\\\n\\\\f]|$)\"),Cf(a,function(a){return b.test(\"string\"===typeof a.className&&a.className||\"undefined\"!==typeof a.getAttribute&&a.getAttribute(\"class\")||\"\")}))},ATTR:function(a,b,c){return function(d){d=\nf.function_______________$attr(d,a);return null==d?\"!=\"===b:b?\"=\"===b?d===c:\"!=\"===b?d!==c:\"^=\"===b?c&&0===d.indexOf(c):\"*=\"===b?c&&-1<d.indexOf(c):\"$=\"===b?c&&d.slice(-c.length)===c:\"~=\"===b?-1<(\" \"+d.replace(Ki,\" \")+\" \").indexOf(c):\"|=\"===b?d===c||d.slice(0,c.length+1)===c+\"-\":!1:!0}},CHILD:function(a,b,c,d,e){var f=\"nth\"!==a.slice(0,3),g=\"last\"!==a.slice(-4),h=\"of-type\"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,k){var l,m;c=f!==g?\"nextSibling\":\"previousSibling\";var p=\nb.parentNode,n=h&&b.nodeName.toLowerCase();k=!k&&!h;var q=!1;if(p){if(f){for(;c;){for(l=b;l=l[c];)if(h?l.nodeName.toLowerCase()===n:1===l.nodeType)return!1;var t=c=\"only\"===a&&!t&&\"nextSibling\"}return!0}t=[g?p.firstChild:p.lastChild];if(g&&k){l=p;var r=l[T]||(l[T]={});r=r[l.uniqueID]||(r[l.uniqueID]={});q=r[a]||[];q=(m=q[0]===eb&&q[1])&&q[2];for(l=m&&p.childNodes[m];l=++m&&l&&l[c]||(q=m=0)||t.pop();)if(1===l.nodeType&&++q&&l===b){r[a]=[eb,m,q];break}}else if(k&&(l=b,r=l[T]||(l[T]={}),r=r[l.uniqueID]||\n(r[l.uniqueID]={}),q=r[a]||[],q=m=q[0]===eb&&q[1]),!1===q)for(;(l=++m&&l&&l[c]||(q=m=0)||t.pop())&&((h?l.nodeName.toLowerCase()!==n:1!==l.nodeType)||!++q||(k&&(r=l[T]||(l[T]={}),r=r[l.uniqueID]||(r[l.uniqueID]={}),r[a]=[eb,q]),l!==b)););q-=e;return q===d||0===q%d&&0<=q/d}}},PSEUDO:function(a,b){var c=N.pseudos[a]||N.setFilters[a.toLowerCase()]||f.error(\"unsupported pseudo: \"+a);if(c[T])return c(b);if(1<c.length){var e=[a,a,\"\",b];return N.setFilters.hasOwnProperty(a.toLowerCase())?h(function(a,e){for(var f,\ng=c(a,b),h=g.length;h--;)f=d(a,g[h]),a[f]=!(e[f]=g[h])}):function(a){return c(a,0,e)}}return c}},pseudos:{not:h(function(a){var b=[],c=[],d=Gf(a.replace(Fc,\"$1\"));return d[T]?h(function(a,b,c,e){e=d(a,null,e,[]);for(var f=a.length;f--;)if(c=e[f])a[f]=!(b[f]=c)}):function(a,e,f){b[0]=a;d(b,null,f,c);b[0]=null;return!c.pop()}}),has:h(function(a){return function(b){return 0<f(a,b).length}}),contains:h(function(a){a=a.replace(Ta,c);return function(b){return-1<(b.textContent||b.innerText||Jd(b)).indexOf(a)}}),\nlang:h(function(a){Oi.test(a||\"\")||f.error(\"unsupported lang: \"+a);a=a.replace(Ta,c).toLowerCase();return function(b){var c;do if(c=qa?b.lang:b.getAttribute(\"xml:lang\")||b.getAttribute(\"lang\"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+\"-\");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(a){var b=window.location&&window.location.hash;return b&&b.slice(1)===a.id},root:function(a){return a===ha},focus:function(a){return a===L.activeElement&&(!L.hasFocus||L.hasFocus())&&!!(a.type||\na.href||~a.tabIndex)},enabled:q(!1),disabled:q(!0),checked:function(a){var b=a.nodeName.toLowerCase();return\"input\"===b&&!!a.checked||\"option\"===b&&!!a.selected},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return!0===a.selected},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(6>a.nodeType)return!1;return!0},parent:function(a){return!N.pseudos.empty(a)},header:function(a){return Qi.test(a.nodeName)},input:function(a){return Pi.test(a.nodeName)},button:function(a){var b=\na.nodeName.toLowerCase();return\"input\"===b&&\"button\"===a.type||\"button\"===b},text:function(a){var b;return\"input\"===a.nodeName.toLowerCase()&&\"text\"===a.type&&(null==(b=a.getAttribute(\"type\"))||\"text\"===b.toLowerCase())},first:r(function(){return[0]}),last:r(function(a,b){return[b-1]}),eq:r(function(a,b,c){return[0>c?c+b:c]}),even:r(function(a,b){for(var c=0;c<b;c+=2)a.push(c);return a}),odd:r(function(a,b){for(var c=1;c<b;c+=2)a.push(c);return a}),lt:r(function(a,b,c){for(b=0>c?c+b:c;0<=--b;)a.push(b);\nreturn a}),gt:r(function(a,b,c){for(c=0>c?c+b:c;++c<b;)a.push(c);return a})}};N.pseudos.nth=N.pseudos.eq;for(K in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})N.pseudos[K]=p(K);for(K in{submit:!0,reset:!0})N.pseudos[K]=n(K);z.prototype=N.filters=N.pseudos;N.setFilters=new z;var Ec=f.tokenize=function(a,b){var c,d,e,g,h;if(g=Df[a+\" \"])return b?0:g.slice(0);g=a;var l=[];for(h=N.preFilter;g;){if(!k||(c=Li.exec(g)))c&&(g=g.slice(c[0].length)||g),l.push(d=[]);var k=!1;if(c=Mi.exec(g))k=c.shift(),\nd.push({value:k,type:c[0].replace(Fc,\" \")}),g=g.slice(k.length);for(e in N.filter)!(c=Hc[e].exec(g))||h[e]&&!(c=h[e](c))||(k=c.shift(),d.push({value:k,type:e,matches:c}),g=g.slice(k.length));if(!k)break}return b?g.length:g?f.error(a):Df(a,l).slice(0)};var Gf=f.compile=function(a,b){var c,d=[],e=[],f=Ef[a+\" \"];if(!f){b||(b=Ec(a));for(c=b.length;c--;)f=D(b[c]),f[T]?d.push(f):e.push(f);f=Ef(a,F(e,d));f.selector=a}return f};var Ei=f.function_______________$select=function(a,b,d,e){var f,g,h,l=\"function\"===\ntypeof a&&a,k=!e&&Ec(a=l.selector||a);d=d||[];if(1===k.length){var m=k[0]=k[0].slice(0);if(2<m.length&&\"ID\"===(g=m[0]).type&&9===b.nodeType&&qa&&N.relative[m[1].type]){b=(N.find.ID(g.matches[0].replace(Ta,c),b)||[])[0];if(!b)return d;l&&(b=b.parentNode);a=a.slice(m.shift().value.length)}for(f=Hc.needsContext.test(a)?0:m.length;f--;){g=m[f];if(N.relative[h=g.type])break;if(h=N.find[h])if(e=h(g.matches[0].replace(Ta,c),Id.test(m[0].type)&&v(b.parentNode)||b)){m.splice(f,1);a=e.length&&x(m);if(!a)return db.apply(d,\ne),d;break}}}(l||Gf(a,k))(e,b,!qa,d,!b||Id.test(a)&&v(b.parentNode)||b);return d};U.sortStable=T.split(\"\").sort(e).join(\"\")===T;U.detectDuplicates=!!na;kb();U.sortDetached=k(function(a){return a.compareDocumentPosition(L.createElement(\"fieldset\"))&1});k(function(a){a.innerHTML=\"<a href='#'></a>\";return\"#\"===a.firstChild.getAttribute(\"href\")})||l(\"type|href|height|width\",function(a,b,c){if(!c)return a.getAttribute(b,\"type\"===b.toLowerCase()?1:2)});U.attributes&&k(function(a){a.innerHTML=\"<input/>\";\na.firstChild.setAttribute(\"value\",\"\");return\"\"===a.firstChild.getAttribute(\"value\")})||l(\"value\",function(a,b,c){if(!c&&\"input\"===a.nodeName.toLowerCase())return a.defaultValue});k(function(a){return null==a.getAttribute(\"disabled\")})||l(\"checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped\",function(a,b,c){var d;if(!c)return!0===a[b]?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null});return f}()}", "title": "" }, { "docid": "e5fc3eba801ede5d391a042c5e313e5c", "score": "0.5408646", "text": "function Ti(t,e,n){if(!t||!t.parentNode||(ui||_i(t)).documentElement===t)return new Ei;var i=function(t){for(var e,n;t&&t!==hi;)(n=t._gsap)&&!n.scaleX&&!n.scaleY&&n.renderTransform&&(n.scaleX=n.scaleY=1e-4,n.renderTransform(1,n),e?e.push(n):e=[n]),t=t.parentNode;return e}(t.parentNode),r=wi(t)?yi:xi,o=bi(t,n),s=r[0].getBoundingClientRect(),a=r[1].getBoundingClientRect(),u=r[2].getBoundingClientRect(),l=o.parentNode,c=function t(e){return\"fixed\"===li.getComputedStyle(e).position||((e=e.parentNode)&&1===e.nodeType?t(e):void 0)}(t),h=new Ei((a.left-s.left)/100,(a.top-s.top)/100,(u.left-s.left)/100,(u.top-s.top)/100,s.left+(c?0:li.pageXOffset||ui.scrollLeft||ci.scrollLeft||hi.scrollLeft||0),s.top+(c?0:li.pageYOffset||ui.scrollTop||ci.scrollTop||hi.scrollTop||0));if(l.removeChild(o),i)for(s=i.length;s--;)(a=i[s]).scaleX=a.scaleY=0,a.renderTransform(1,a);return e?h.inverse():h}", "title": "" }, { "docid": "c46c4105d33dae907da7d4efaf2f0d72", "score": "0.53640276", "text": "function Ri(t,e,n){if(!t||!t.parentNode||(gi||Si(t)).documentElement===t)return new zi;var i=function(t){for(var e,n;t&&t!==_i;)(n=t._gsap)&&!n.scaleX&&!n.scaleY&&n.renderTransform&&(n.scaleX=n.scaleY=1e-4,n.renderTransform(1,n),e?e.push(n):e=[n]),t=t.parentNode;return e}(t.parentNode),r=Pi(t)?Di:Ci,o=Ai(t,n),a=r[0].getBoundingClientRect(),s=r[1].getBoundingClientRect(),l=r[2].getBoundingClientRect(),u=o.parentNode,c=Oi(t),h=new zi((s.left-a.left)/100,(s.top-a.top)/100,(l.left-a.left)/100,(l.top-a.top)/100,a.left+(c?0:mi.pageXOffset||gi.scrollLeft||vi.scrollLeft||_i.scrollLeft||0),a.top+(c?0:mi.pageYOffset||gi.scrollTop||vi.scrollTop||_i.scrollTop||0));if(u.removeChild(o),i)for(a=i.length;a--;)(s=i[a]).scaleX=s.scaleY=0,s.renderTransform(1,s);return e?h.inverse():h}", "title": "" }, { "docid": "0c9fda78b1cda0e2564a5a0d763f6599", "score": "0.5354903", "text": "function kVector(){\n this.backend=\"svg\";\n if (navigator.userAgent.indexOf(\"MSIE\") != -1) {\n this.backend=\"vml\";\n }\n if (navigator.userAgent.indexOf(\"Android\") != -1) {\n this.backend=\"canvas\";\n }\n this.init=function(mapObj){\n this.mapObj=mapObj;\n var vectorElements=mapObj.map.parentNode.getElementsByTagName(this.backend);\n if(vectorElements.length > 0){\n this.vectorEl=vectorElements.item(0);\n }\n if(!this.vectorEl){\n if(this.backend==\"svg\"){\n this.vectorEl=document.createElementNS(\"http://www.w3.org/2000/svg\",\"svg\");\n }\n if(this.backend==\"canvas\"){\n this.vectorEl=document.createElement(\"canvas\");\n }\n if(this.backend==\"vml\"){\n if(document.namespaces['v'] == null) { \n var stl = document.createStyleSheet(); \n stl.addRule(\"v\\\\:*\", \"behavior: url(#default#VML);\"); \n document.namespaces.add(\"v\", \"urn:schemas-microsoft-com:vml\"); \n }\n this.vectorEl=document.createElement(\"v:group\");\n }\n this.vectorEl=document.createElement(this.backend);\n this.vectorEl.setAttribute(\"width\",1000);\n this.vectorEl.setAttribute(\"height\",1000);\n this.vectorEl.style.position=\"absolute\";\n this.vectorEl.style.top=\"0px\";\n this.vectorEl.style.left=\"0px\";\n mapObj.map.parentNode.appendChild(this.vectorEl);\n mapObj.map.parentNode.appendChild(map.overlayDiv);\n }\n\n if(this.backend==\"canvas\"){\n this.ctx = this.vectorEl.getContext(\"2d\");\n }\n\n }\n this.setStyle=function(el,style){\n if(!style){\n return;\n }\n switch(this.backend){\n case \"svg\": this.setStyleSVG(el,style); break;\n case \"canvas\": this.setStyleCanvas(el,style);break;\n case \"vml\": this.setStyleVML(el,style);break;\n }\n }\n this.setStyleSVG=function(el,styles){\n\n var stylesAr=styles.getArray();\n for(var i=0;i<stylesAr.length;i++){\n var style=stylesAr[i];\n switch(style[0]){ \n case \"fillStyle\":\n el.setAttribute(\"fill\",style[1]);\n break;\n case \"strokeStyle\":\n el.setAttribute(\"stroke\",style[1]);\n break;\n case \"lineWidth\":\n el.setAttribute(\"stroke-width\",style[1]);\n break;\n default:\n el.setAttribute(style[0],style[1]);\n }\n }\n }\n\n this.setStyleCanvas=function(el,styles){\n var stylesAr=styles.getArray();\n for(var i=0;i<stylesAr.length;i++){\n var style=stylesAr[i];\n \n //console.log(style[0],style[1]);\n for(a in this.ctx){\n //console.log(a,style[0]);\n if(a==style[0]){\n if(typeof(this.ctx[a])!=\"function\"){\n this.ctx[a]=style[1];\n //console.log(\"---\",a,this.ctx[a]);\n }\n }\n }\n }\n }\n\n this.setStyleVML=function(el,styles){\n var stylesAr=styles.getArray();\n for(var i=0;i<stylesAr.length;i++){\n var style=stylesAr[i];\n switch(style[0]){\n case \"fillStyle\":\n el.setAttribute(\"fillcolor\",style[1]);\n break;\n case \"strokeStyle\":\n el.setAttribute(\"strokecolor\",style[1]);\n break;\n case \"lineWidth\":\n el.setAttribute(\"strokeweight\",style[1]);\n break;\n default:\n //el.setAttribute(style[0],style[1]);\n }\n }\n\n }\n/*\n this.clear=function(){\n //alert(this.vectorEl);\n if(!this.vectorEl) return;\n\n if(this.ctx){\n this.ctx.clearRect(0,0,1000,1000);\n }\n while(this.vectorEl.firstChild){\n this.vectorEl.removeChild(this.vectorEl.firstChild);\n }\n } \n*/\n}", "title": "" }, { "docid": "418df0829b06dca6cd03cf2cd6f2c16e", "score": "0.5307658", "text": "function typrFactory(){return \"undefined\"==typeof window&&(self.window=self),function(r){var e={parse:function(r){var t=e._bin,a=new Uint8Array(r);if(\"ttcf\"==t.readASCII(a,0,4)){var n=4;t.readUshort(a,n),n+=2,t.readUshort(a,n),n+=2;var o=t.readUint(a,n);n+=4;for(var s=[],i=0;i<o;i++){var h=t.readUint(a,n);n+=4,s.push(e._readFont(a,h));}return s}return [e._readFont(a,0)]},_readFont:function(r,t){var a=e._bin,n=t;a.readFixed(r,t),t+=4;var o=a.readUshort(r,t);t+=2,a.readUshort(r,t),t+=2,a.readUshort(r,t),t+=2,a.readUshort(r,t),t+=2;for(var s=[\"cmap\",\"head\",\"hhea\",\"maxp\",\"hmtx\",\"name\",\"OS/2\",\"post\",\"loca\",\"glyf\",\"kern\",\"CFF \",\"GPOS\",\"GSUB\",\"SVG \"],i={_data:r,_offset:n},h={},f=0;f<o;f++){var d=a.readASCII(r,t,4);t+=4,a.readUint(r,t),t+=4;var u=a.readUint(r,t);t+=4;var l=a.readUint(r,t);t+=4,h[d]={offset:u,length:l};}for(f=0;f<s.length;f++){var v=s[f];h[v]&&(i[v.trim()]=e[v.trim()].parse(r,h[v].offset,h[v].length,i));}return i},_tabOffset:function(r,t,a){for(var n=e._bin,o=n.readUshort(r,a+4),s=a+12,i=0;i<o;i++){var h=n.readASCII(r,s,4);s+=4,n.readUint(r,s),s+=4;var f=n.readUint(r,s);if(s+=4,n.readUint(r,s),s+=4,h==t){ return f }}return 0}};e._bin={readFixed:function(r,e){return (r[e]<<8|r[e+1])+(r[e+2]<<8|r[e+3])/65540},readF2dot14:function(r,t){return e._bin.readShort(r,t)/16384},readInt:function(r,t){var a=e._bin.t.uint8;return a[0]=r[t+3],a[1]=r[t+2],a[2]=r[t+1],a[3]=r[t],e._bin.t.int32[0]},readInt8:function(r,t){return e._bin.t.uint8[0]=r[t],e._bin.t.int8[0]},readShort:function(r,t){var a=e._bin.t.uint8;return a[1]=r[t],a[0]=r[t+1],e._bin.t.int16[0]},readUshort:function(r,e){return r[e]<<8|r[e+1]},readUshorts:function(r,t,a){for(var n=[],o=0;o<a;o++){ n.push(e._bin.readUshort(r,t+2*o)); }return n},readUint:function(r,t){var a=e._bin.t.uint8;return a[3]=r[t],a[2]=r[t+1],a[1]=r[t+2],a[0]=r[t+3],e._bin.t.uint32[0]},readUint64:function(r,t){return 4294967296*e._bin.readUint(r,t)+e._bin.readUint(r,t+4)},readASCII:function(r,e,t){for(var a=\"\",n=0;n<t;n++){ a+=String.fromCharCode(r[e+n]); }return a},readUnicode:function(r,e,t){for(var a=\"\",n=0;n<t;n++){var o=r[e++]<<8|r[e++];a+=String.fromCharCode(o);}return a},_tdec:\"undefined\"!=typeof window&&window.TextDecoder?new window.TextDecoder:null,readUTF8:function(r,t,a){var n=e._bin._tdec;return n&&0==t&&a==r.length?n.decode(r):e._bin.readASCII(r,t,a)},readBytes:function(r,e,t){for(var a=[],n=0;n<t;n++){ a.push(r[e+n]); }return a},readASCIIArray:function(r,e,t){for(var a=[],n=0;n<t;n++){ a.push(String.fromCharCode(r[e+n])); }return a}},e._bin.t={buff:new ArrayBuffer(8)},e._bin.t.int8=new Int8Array(e._bin.t.buff),e._bin.t.uint8=new Uint8Array(e._bin.t.buff),e._bin.t.int16=new Int16Array(e._bin.t.buff),e._bin.t.uint16=new Uint16Array(e._bin.t.buff),e._bin.t.int32=new Int32Array(e._bin.t.buff),e._bin.t.uint32=new Uint32Array(e._bin.t.buff),e._lctf={},e._lctf.parse=function(r,t,a,n,o){var s=e._bin,i={},h=t;s.readFixed(r,t),t+=4;var f=s.readUshort(r,t);t+=2;var d=s.readUshort(r,t);t+=2;var u=s.readUshort(r,t);return t+=2,i.scriptList=e._lctf.readScriptList(r,h+f),i.featureList=e._lctf.readFeatureList(r,h+d),i.lookupList=e._lctf.readLookupList(r,h+u,o),i},e._lctf.readLookupList=function(r,t,a){var n=e._bin,o=t,s=[],i=n.readUshort(r,t);t+=2;for(var h=0;h<i;h++){var f=n.readUshort(r,t);t+=2;var d=e._lctf.readLookupTable(r,o+f,a);s.push(d);}return s},e._lctf.readLookupTable=function(r,t,a){var n=e._bin,o=t,s={tabs:[]};s.ltype=n.readUshort(r,t),t+=2,s.flag=n.readUshort(r,t),t+=2;var i=n.readUshort(r,t);t+=2;for(var h=s.ltype,f=0;f<i;f++){var d=n.readUshort(r,t);t+=2;var u=a(r,h,o+d,s);s.tabs.push(u);}return s},e._lctf.numOfOnes=function(r){for(var e=0,t=0;t<32;t++){ 0!=(r>>>t&1)&&e++; }return e},e._lctf.readClassDef=function(r,t){var a=e._bin,n=[],o=a.readUshort(r,t);if(t+=2,1==o){var s=a.readUshort(r,t);t+=2;var i=a.readUshort(r,t);t+=2;for(var h=0;h<i;h++){ n.push(s+h),n.push(s+h),n.push(a.readUshort(r,t)),t+=2; }}if(2==o){var f=a.readUshort(r,t);t+=2;for(h=0;h<f;h++){ n.push(a.readUshort(r,t)),t+=2,n.push(a.readUshort(r,t)),t+=2,n.push(a.readUshort(r,t)),t+=2; }}return n},e._lctf.getInterval=function(r,e){for(var t=0;t<r.length;t+=3){var a=r[t],n=r[t+1];if(r[t+2],a<=e&&e<=n){ return t }}return -1},e._lctf.readCoverage=function(r,t){var a=e._bin,n={};n.fmt=a.readUshort(r,t),t+=2;var o=a.readUshort(r,t);return t+=2,1==n.fmt&&(n.tab=a.readUshorts(r,t,o)),2==n.fmt&&(n.tab=a.readUshorts(r,t,3*o)),n},e._lctf.coverageIndex=function(r,t){var a=r.tab;if(1==r.fmt){ return a.indexOf(t); }if(2==r.fmt){var n=e._lctf.getInterval(a,t);if(-1!=n){ return a[n+2]+(t-a[n]) }}return -1},e._lctf.readFeatureList=function(r,t){var a=e._bin,n=t,o=[],s=a.readUshort(r,t);t+=2;for(var i=0;i<s;i++){var h=a.readASCII(r,t,4);t+=4;var f=a.readUshort(r,t);t+=2;var d=e._lctf.readFeatureTable(r,n+f);d.tag=h.trim(),o.push(d);}return o},e._lctf.readFeatureTable=function(r,t){var a=e._bin,n=t,o={},s=a.readUshort(r,t);t+=2,s>0&&(o.featureParams=n+s);var i=a.readUshort(r,t);t+=2,o.tab=[];for(var h=0;h<i;h++){ o.tab.push(a.readUshort(r,t+2*h)); }return o},e._lctf.readScriptList=function(r,t){var a=e._bin,n=t,o={},s=a.readUshort(r,t);t+=2;for(var i=0;i<s;i++){var h=a.readASCII(r,t,4);t+=4;var f=a.readUshort(r,t);t+=2,o[h.trim()]=e._lctf.readScriptTable(r,n+f);}return o},e._lctf.readScriptTable=function(r,t){var a=e._bin,n=t,o={},s=a.readUshort(r,t);t+=2,o.default=e._lctf.readLangSysTable(r,n+s);var i=a.readUshort(r,t);t+=2;for(var h=0;h<i;h++){var f=a.readASCII(r,t,4);t+=4;var d=a.readUshort(r,t);t+=2,o[f.trim()]=e._lctf.readLangSysTable(r,n+d);}return o},e._lctf.readLangSysTable=function(r,t){var a=e._bin,n={};a.readUshort(r,t),t+=2,n.reqFeature=a.readUshort(r,t),t+=2;var o=a.readUshort(r,t);return t+=2,n.features=a.readUshorts(r,t,o),n},e.CFF={},e.CFF.parse=function(r,t,a){var n=e._bin;(r=new Uint8Array(r.buffer,t,a))[t=0],r[++t],r[++t],r[++t],t++;var o=[];t=e.CFF.readIndex(r,t,o);for(var s=[],i=0;i<o.length-1;i++){ s.push(n.readASCII(r,t+o[i],o[i+1]-o[i])); }t+=o[o.length-1];var h=[];t=e.CFF.readIndex(r,t,h);var f=[];for(i=0;i<h.length-1;i++){ f.push(e.CFF.readDict(r,t+h[i],t+h[i+1])); }t+=h[h.length-1];var d=f[0],u=[];t=e.CFF.readIndex(r,t,u);var l=[];for(i=0;i<u.length-1;i++){ l.push(n.readASCII(r,t+u[i],u[i+1]-u[i])); }if(t+=u[u.length-1],e.CFF.readSubrs(r,t,d),d.CharStrings){t=d.CharStrings;u=[];t=e.CFF.readIndex(r,t,u);var v=[];for(i=0;i<u.length-1;i++){ v.push(n.readBytes(r,t+u[i],u[i+1]-u[i])); }d.CharStrings=v;}if(d.ROS){t=d.FDArray;var c=[];t=e.CFF.readIndex(r,t,c),d.FDArray=[];for(i=0;i<c.length-1;i++){var p=e.CFF.readDict(r,t+c[i],t+c[i+1]);e.CFF._readFDict(r,p,l),d.FDArray.push(p);}t+=c[c.length-1],t=d.FDSelect,d.FDSelect=[];var U=r[t];if(t++,3!=U){ throw U; }var g=n.readUshort(r,t);t+=2;for(i=0;i<g+1;i++){ d.FDSelect.push(n.readUshort(r,t),r[t+2]),t+=3; }}return d.Encoding&&(d.Encoding=e.CFF.readEncoding(r,d.Encoding,d.CharStrings.length)),d.charset&&(d.charset=e.CFF.readCharset(r,d.charset,d.CharStrings.length)),e.CFF._readFDict(r,d,l),d},e.CFF._readFDict=function(r,t,a){var n;for(var o in t.Private&&(n=t.Private[1],t.Private=e.CFF.readDict(r,n,n+t.Private[0]),t.Private.Subrs&&e.CFF.readSubrs(r,n+t.Private.Subrs,t.Private)),t){ -1!=[\"FamilyName\",\"FontName\",\"FullName\",\"Notice\",\"version\",\"Copyright\"].indexOf(o)&&(t[o]=a[t[o]-426+35]); }},e.CFF.readSubrs=function(r,t,a){var n=e._bin,o=[];t=e.CFF.readIndex(r,t,o);var s,i=o.length;s=i<1240?107:i<33900?1131:32768,a.Bias=s,a.Subrs=[];for(var h=0;h<o.length-1;h++){ a.Subrs.push(n.readBytes(r,t+o[h],o[h+1]-o[h])); }},e.CFF.tableSE=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,0,111,112,113,114,0,115,116,117,118,119,120,121,122,0,123,0,124,125,126,127,128,129,130,131,0,132,133,0,134,135,136,137,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,138,0,139,0,0,0,0,140,141,142,143,0,0,0,0,0,144,0,0,0,145,0,0,146,147,148,149,0,0,0,0],e.CFF.glyphByUnicode=function(r,e){for(var t=0;t<r.charset.length;t++){ if(r.charset[t]==e){ return t; } }return -1},e.CFF.glyphBySE=function(r,t){return t<0||t>255?-1:e.CFF.glyphByUnicode(r,e.CFF.tableSE[t])},e.CFF.readEncoding=function(r,t,a){e._bin;var n=[\".notdef\"],o=r[t];if(t++,0!=o){ throw \"error: unknown encoding format: \"+o; }var s=r[t];t++;for(var i=0;i<s;i++){ n.push(r[t+i]); }return n},e.CFF.readCharset=function(r,t,a){var n=e._bin,o=[\".notdef\"],s=r[t];if(t++,0==s){ for(var i=0;i<a;i++){var h=n.readUshort(r,t);t+=2,o.push(h);} }else {if(1!=s&&2!=s){ throw \"error: format: \"+s; }for(;o.length<a;){h=n.readUshort(r,t);t+=2;var f=0;1==s?(f=r[t],t++):(f=n.readUshort(r,t),t+=2);for(i=0;i<=f;i++){ o.push(h),h++; }}}return o},e.CFF.readIndex=function(r,t,a){var n=e._bin,o=n.readUshort(r,t)+1,s=r[t+=2];if(t++,1==s){ for(var i=0;i<o;i++){ a.push(r[t+i]); } }else if(2==s){ for(i=0;i<o;i++){ a.push(n.readUshort(r,t+2*i)); } }else if(3==s){ for(i=0;i<o;i++){ a.push(16777215&n.readUint(r,t+3*i-1)); } }else if(1!=o){ throw \"unsupported offset size: \"+s+\", count: \"+o; }return (t+=o*s)-1},e.CFF.getCharString=function(r,t,a){var n=e._bin,o=r[t],s=r[t+1];r[t+2],r[t+3],r[t+4];var i=1,h=null,f=null;o<=20&&(h=o,i=1),12==o&&(h=100*o+s,i=2),21<=o&&o<=27&&(h=o,i=1),28==o&&(f=n.readShort(r,t+1),i=3),29<=o&&o<=31&&(h=o,i=1),32<=o&&o<=246&&(f=o-139,i=1),247<=o&&o<=250&&(f=256*(o-247)+s+108,i=2),251<=o&&o<=254&&(f=256*-(o-251)-s-108,i=2),255==o&&(f=n.readInt(r,t+1)/65535,i=5),a.val=null!=f?f:\"o\"+h,a.size=i;},e.CFF.readCharString=function(r,t,a){for(var n=t+a,o=e._bin,s=[];t<n;){var i=r[t],h=r[t+1];r[t+2],r[t+3],r[t+4];var f=1,d=null,u=null;i<=20&&(d=i,f=1),12==i&&(d=100*i+h,f=2),19!=i&&20!=i||(d=i,f=2),21<=i&&i<=27&&(d=i,f=1),28==i&&(u=o.readShort(r,t+1),f=3),29<=i&&i<=31&&(d=i,f=1),32<=i&&i<=246&&(u=i-139,f=1),247<=i&&i<=250&&(u=256*(i-247)+h+108,f=2),251<=i&&i<=254&&(u=256*-(i-251)-h-108,f=2),255==i&&(u=o.readInt(r,t+1)/65535,f=5),s.push(null!=u?u:\"o\"+d),t+=f;}return s},e.CFF.readDict=function(r,t,a){for(var n=e._bin,o={},s=[];t<a;){var i=r[t],h=r[t+1];r[t+2],r[t+3],r[t+4];var f=1,d=null,u=null;if(28==i&&(u=n.readShort(r,t+1),f=3),29==i&&(u=n.readInt(r,t+1),f=5),32<=i&&i<=246&&(u=i-139,f=1),247<=i&&i<=250&&(u=256*(i-247)+h+108,f=2),251<=i&&i<=254&&(u=256*-(i-251)-h-108,f=2),255==i){ throw u=n.readInt(r,t+1)/65535,f=5,\"unknown number\"; }if(30==i){var l=[];for(f=1;;){var v=r[t+f];f++;var c=v>>4,p=15&v;if(15!=c&&l.push(c),15!=p&&l.push(p),15==p){ break }}for(var U=\"\",g=[0,1,2,3,4,5,6,7,8,9,\".\",\"e\",\"e-\",\"reserved\",\"-\",\"endOfNumber\"],S=0;S<l.length;S++){ U+=g[l[S]]; }u=parseFloat(U);}if(i<=21){ if(d=[\"version\",\"Notice\",\"FullName\",\"FamilyName\",\"Weight\",\"FontBBox\",\"BlueValues\",\"OtherBlues\",\"FamilyBlues\",\"FamilyOtherBlues\",\"StdHW\",\"StdVW\",\"escape\",\"UniqueID\",\"XUID\",\"charset\",\"Encoding\",\"CharStrings\",\"Private\",\"Subrs\",\"defaultWidthX\",\"nominalWidthX\"][i],f=1,12==i){ d=[\"Copyright\",\"isFixedPitch\",\"ItalicAngle\",\"UnderlinePosition\",\"UnderlineThickness\",\"PaintType\",\"CharstringType\",\"FontMatrix\",\"StrokeWidth\",\"BlueScale\",\"BlueShift\",\"BlueFuzz\",\"StemSnapH\",\"StemSnapV\",\"ForceBold\",0,0,\"LanguageGroup\",\"ExpansionFactor\",\"initialRandomSeed\",\"SyntheticBase\",\"PostScript\",\"BaseFontName\",\"BaseFontBlend\",0,0,0,0,0,0,\"ROS\",\"CIDFontVersion\",\"CIDFontRevision\",\"CIDFontType\",\"CIDCount\",\"UIDBase\",\"FDArray\",\"FDSelect\",\"FontName\"][h],f=2; } }null!=d?(o[d]=1==s.length?s[0]:s,s=[]):s.push(u),t+=f;}return o},e.cmap={},e.cmap.parse=function(r,t,a){r=new Uint8Array(r.buffer,t,a),t=0;var n=e._bin,o={};n.readUshort(r,t),t+=2;var s=n.readUshort(r,t);t+=2;var i=[];o.tables=[];for(var h=0;h<s;h++){var f=n.readUshort(r,t);t+=2;var d=n.readUshort(r,t);t+=2;var u=n.readUint(r,t);t+=4;var l=\"p\"+f+\"e\"+d,v=i.indexOf(u);if(-1==v){var c;v=o.tables.length,i.push(u);var p=n.readUshort(r,u);0==p?c=e.cmap.parse0(r,u):4==p?c=e.cmap.parse4(r,u):6==p?c=e.cmap.parse6(r,u):12==p?c=e.cmap.parse12(r,u):console.debug(\"unknown format: \"+p,f,d,u),o.tables.push(c);}if(null!=o[l]){ throw \"multiple tables for one platform+encoding\"; }o[l]=v;}return o},e.cmap.parse0=function(r,t){var a=e._bin,n={};n.format=a.readUshort(r,t),t+=2;var o=a.readUshort(r,t);t+=2,a.readUshort(r,t),t+=2,n.map=[];for(var s=0;s<o-6;s++){ n.map.push(r[t+s]); }return n},e.cmap.parse4=function(r,t){var a=e._bin,n=t,o={};o.format=a.readUshort(r,t),t+=2;var s=a.readUshort(r,t);t+=2,a.readUshort(r,t),t+=2;var i=a.readUshort(r,t);t+=2;var h=i/2;o.searchRange=a.readUshort(r,t),t+=2,o.entrySelector=a.readUshort(r,t),t+=2,o.rangeShift=a.readUshort(r,t),t+=2,o.endCount=a.readUshorts(r,t,h),t+=2*h,t+=2,o.startCount=a.readUshorts(r,t,h),t+=2*h,o.idDelta=[];for(var f=0;f<h;f++){ o.idDelta.push(a.readShort(r,t)),t+=2; }for(o.idRangeOffset=a.readUshorts(r,t,h),t+=2*h,o.glyphIdArray=[];t<n+s;){ o.glyphIdArray.push(a.readUshort(r,t)),t+=2; }return o},e.cmap.parse6=function(r,t){var a=e._bin,n={};n.format=a.readUshort(r,t),t+=2,a.readUshort(r,t),t+=2,a.readUshort(r,t),t+=2,n.firstCode=a.readUshort(r,t),t+=2;var o=a.readUshort(r,t);t+=2,n.glyphIdArray=[];for(var s=0;s<o;s++){ n.glyphIdArray.push(a.readUshort(r,t)),t+=2; }return n},e.cmap.parse12=function(r,t){var a=e._bin,n={};n.format=a.readUshort(r,t),t+=2,t+=2,a.readUint(r,t),t+=4,a.readUint(r,t),t+=4;var o=a.readUint(r,t);t+=4,n.groups=[];for(var s=0;s<o;s++){var i=t+12*s,h=a.readUint(r,i+0),f=a.readUint(r,i+4),d=a.readUint(r,i+8);n.groups.push([h,f,d]);}return n},e.glyf={},e.glyf.parse=function(r,e,t,a){for(var n=[],o=0;o<a.maxp.numGlyphs;o++){ n.push(null); }return n},e.glyf._parseGlyf=function(r,t){var a=e._bin,n=r._data,o=e._tabOffset(n,\"glyf\",r._offset)+r.loca[t];if(r.loca[t]==r.loca[t+1]){ return null; }var s={};if(s.noc=a.readShort(n,o),o+=2,s.xMin=a.readShort(n,o),o+=2,s.yMin=a.readShort(n,o),o+=2,s.xMax=a.readShort(n,o),o+=2,s.yMax=a.readShort(n,o),o+=2,s.xMin>=s.xMax||s.yMin>=s.yMax){ return null; }if(s.noc>0){s.endPts=[];for(var i=0;i<s.noc;i++){ s.endPts.push(a.readUshort(n,o)),o+=2; }var h=a.readUshort(n,o);if(o+=2,n.length-o<h){ return null; }s.instructions=a.readBytes(n,o,h),o+=h;var f=s.endPts[s.noc-1]+1;s.flags=[];for(i=0;i<f;i++){var d=n[o];if(o++,s.flags.push(d),0!=(8&d)){var u=n[o];o++;for(var l=0;l<u;l++){ s.flags.push(d),i++; }}}s.xs=[];for(i=0;i<f;i++){var v=0!=(2&s.flags[i]),c=0!=(16&s.flags[i]);v?(s.xs.push(c?n[o]:-n[o]),o++):c?s.xs.push(0):(s.xs.push(a.readShort(n,o)),o+=2);}s.ys=[];for(i=0;i<f;i++){v=0!=(4&s.flags[i]),c=0!=(32&s.flags[i]);v?(s.ys.push(c?n[o]:-n[o]),o++):c?s.ys.push(0):(s.ys.push(a.readShort(n,o)),o+=2);}var p=0,U=0;for(i=0;i<f;i++){ p+=s.xs[i],U+=s.ys[i],s.xs[i]=p,s.ys[i]=U; }}else {var g;s.parts=[];do{g=a.readUshort(n,o),o+=2;var S={m:{a:1,b:0,c:0,d:1,tx:0,ty:0},p1:-1,p2:-1};if(s.parts.push(S),S.glyphIndex=a.readUshort(n,o),o+=2,1&g){var m=a.readShort(n,o);o+=2;var b=a.readShort(n,o);o+=2;}else {m=a.readInt8(n,o);o++;b=a.readInt8(n,o);o++;}2&g?(S.m.tx=m,S.m.ty=b):(S.p1=m,S.p2=b),8&g?(S.m.a=S.m.d=a.readF2dot14(n,o),o+=2):64&g?(S.m.a=a.readF2dot14(n,o),o+=2,S.m.d=a.readF2dot14(n,o),o+=2):128&g&&(S.m.a=a.readF2dot14(n,o),o+=2,S.m.b=a.readF2dot14(n,o),o+=2,S.m.c=a.readF2dot14(n,o),o+=2,S.m.d=a.readF2dot14(n,o),o+=2);}while(32&g);if(256&g){var y=a.readUshort(n,o);o+=2,s.instr=[];for(i=0;i<y;i++){ s.instr.push(n[o]),o++; }}}return s},e.GPOS={},e.GPOS.parse=function(r,t,a,n){return e._lctf.parse(r,t,a,n,e.GPOS.subt)},e.GPOS.subt=function(r,t,a,n){var o=e._bin,s=a,i={};if(i.fmt=o.readUshort(r,a),a+=2,1==t||2==t||3==t||7==t||8==t&&i.fmt<=2){var h=o.readUshort(r,a);a+=2,i.coverage=e._lctf.readCoverage(r,h+s);}if(1==t&&1==i.fmt){var f=o.readUshort(r,a);a+=2;var d=e._lctf.numOfOnes(f);0!=f&&(i.pos=e.GPOS.readValueRecord(r,a,f));}else if(2==t&&i.fmt>=1&&i.fmt<=2){f=o.readUshort(r,a);a+=2;var u=o.readUshort(r,a);a+=2;d=e._lctf.numOfOnes(f);var l=e._lctf.numOfOnes(u);if(1==i.fmt){i.pairsets=[];var v=o.readUshort(r,a);a+=2;for(var c=0;c<v;c++){var p=s+o.readUshort(r,a);a+=2;var U=o.readUshort(r,p);p+=2;for(var g=[],S=0;S<U;S++){var m=o.readUshort(r,p);p+=2,0!=f&&(x=e.GPOS.readValueRecord(r,p,f),p+=2*d),0!=u&&(P=e.GPOS.readValueRecord(r,p,u),p+=2*l),g.push({gid2:m,val1:x,val2:P});}i.pairsets.push(g);}}if(2==i.fmt){var b=o.readUshort(r,a);a+=2;var y=o.readUshort(r,a);a+=2;var F=o.readUshort(r,a);a+=2;var _=o.readUshort(r,a);a+=2,i.classDef1=e._lctf.readClassDef(r,s+b),i.classDef2=e._lctf.readClassDef(r,s+y),i.matrix=[];for(c=0;c<F;c++){var C=[];for(S=0;S<_;S++){var x=null,P=null;0!=f&&(x=e.GPOS.readValueRecord(r,a,f),a+=2*d),0!=u&&(P=e.GPOS.readValueRecord(r,a,u),a+=2*l),C.push({val1:x,val2:P});}i.matrix.push(C);}}}else {if(9==t&&1==i.fmt){var I=o.readUshort(r,a);a+=2;var w=o.readUint(r,a);if(a+=4,9==n.ltype){ n.ltype=I; }else if(n.ltype!=I){ throw \"invalid extension substitution\"; }return e.GPOS.subt(r,n.ltype,s+w)}console.debug(\"unsupported GPOS table LookupType\",t,\"format\",i.fmt);}return i},e.GPOS.readValueRecord=function(r,t,a){var n=e._bin,o=[];return o.push(1&a?n.readShort(r,t):0),t+=1&a?2:0,o.push(2&a?n.readShort(r,t):0),t+=2&a?2:0,o.push(4&a?n.readShort(r,t):0),t+=4&a?2:0,o.push(8&a?n.readShort(r,t):0),t+=8&a?2:0,o},e.GSUB={},e.GSUB.parse=function(r,t,a,n){return e._lctf.parse(r,t,a,n,e.GSUB.subt)},e.GSUB.subt=function(r,t,a,n){var o=e._bin,s=a,i={};if(i.fmt=o.readUshort(r,a),a+=2,1!=t&&4!=t&&5!=t&&6!=t){ return null; }if(1==t||4==t||5==t&&i.fmt<=2||6==t&&i.fmt<=2){var h=o.readUshort(r,a);a+=2,i.coverage=e._lctf.readCoverage(r,s+h);}if(1==t&&i.fmt>=1&&i.fmt<=2){if(1==i.fmt){ i.delta=o.readShort(r,a),a+=2; }else if(2==i.fmt){var f=o.readUshort(r,a);a+=2,i.newg=o.readUshorts(r,a,f),a+=2*i.newg.length;}}else if(4==t){i.vals=[];f=o.readUshort(r,a);a+=2;for(var d=0;d<f;d++){var u=o.readUshort(r,a);a+=2,i.vals.push(e.GSUB.readLigatureSet(r,s+u));}}else if(5==t&&2==i.fmt){if(2==i.fmt){var l=o.readUshort(r,a);a+=2,i.cDef=e._lctf.readClassDef(r,s+l),i.scset=[];var v=o.readUshort(r,a);a+=2;for(d=0;d<v;d++){var c=o.readUshort(r,a);a+=2,i.scset.push(0==c?null:e.GSUB.readSubClassSet(r,s+c));}}}else if(6==t&&3==i.fmt){if(3==i.fmt){for(d=0;d<3;d++){f=o.readUshort(r,a);a+=2;for(var p=[],U=0;U<f;U++){ p.push(e._lctf.readCoverage(r,s+o.readUshort(r,a+2*U))); }a+=2*f,0==d&&(i.backCvg=p),1==d&&(i.inptCvg=p),2==d&&(i.ahedCvg=p);}f=o.readUshort(r,a);a+=2,i.lookupRec=e.GSUB.readSubstLookupRecords(r,a,f);}}else {if(7==t&&1==i.fmt){var g=o.readUshort(r,a);a+=2;var S=o.readUint(r,a);if(a+=4,9==n.ltype){ n.ltype=g; }else if(n.ltype!=g){ throw \"invalid extension substitution\"; }return e.GSUB.subt(r,n.ltype,s+S)}console.debug(\"unsupported GSUB table LookupType\",t,\"format\",i.fmt);}return i},e.GSUB.readSubClassSet=function(r,t){var a=e._bin.readUshort,n=t,o=[],s=a(r,t);t+=2;for(var i=0;i<s;i++){var h=a(r,t);t+=2,o.push(e.GSUB.readSubClassRule(r,n+h));}return o},e.GSUB.readSubClassRule=function(r,t){var a=e._bin.readUshort,n={},o=a(r,t),s=a(r,t+=2);t+=2,n.input=[];for(var i=0;i<o-1;i++){ n.input.push(a(r,t)),t+=2; }return n.substLookupRecords=e.GSUB.readSubstLookupRecords(r,t,s),n},e.GSUB.readSubstLookupRecords=function(r,t,a){for(var n=e._bin.readUshort,o=[],s=0;s<a;s++){ o.push(n(r,t),n(r,t+2)),t+=4; }return o},e.GSUB.readChainSubClassSet=function(r,t){var a=e._bin,n=t,o=[],s=a.readUshort(r,t);t+=2;for(var i=0;i<s;i++){var h=a.readUshort(r,t);t+=2,o.push(e.GSUB.readChainSubClassRule(r,n+h));}return o},e.GSUB.readChainSubClassRule=function(r,t){for(var a=e._bin,n={},o=[\"backtrack\",\"input\",\"lookahead\"],s=0;s<o.length;s++){var i=a.readUshort(r,t);t+=2,1==s&&i--,n[o[s]]=a.readUshorts(r,t,i),t+=2*n[o[s]].length;}i=a.readUshort(r,t);return t+=2,n.subst=a.readUshorts(r,t,2*i),t+=2*n.subst.length,n},e.GSUB.readLigatureSet=function(r,t){var a=e._bin,n=t,o=[],s=a.readUshort(r,t);t+=2;for(var i=0;i<s;i++){var h=a.readUshort(r,t);t+=2,o.push(e.GSUB.readLigature(r,n+h));}return o},e.GSUB.readLigature=function(r,t){var a=e._bin,n={chain:[]};n.nglyph=a.readUshort(r,t),t+=2;var o=a.readUshort(r,t);t+=2;for(var s=0;s<o-1;s++){ n.chain.push(a.readUshort(r,t)),t+=2; }return n},e.head={},e.head.parse=function(r,t,a){var n=e._bin,o={};return n.readFixed(r,t),t+=4,o.fontRevision=n.readFixed(r,t),t+=4,n.readUint(r,t),t+=4,n.readUint(r,t),t+=4,o.flags=n.readUshort(r,t),t+=2,o.unitsPerEm=n.readUshort(r,t),t+=2,o.created=n.readUint64(r,t),t+=8,o.modified=n.readUint64(r,t),t+=8,o.xMin=n.readShort(r,t),t+=2,o.yMin=n.readShort(r,t),t+=2,o.xMax=n.readShort(r,t),t+=2,o.yMax=n.readShort(r,t),t+=2,o.macStyle=n.readUshort(r,t),t+=2,o.lowestRecPPEM=n.readUshort(r,t),t+=2,o.fontDirectionHint=n.readShort(r,t),t+=2,o.indexToLocFormat=n.readShort(r,t),t+=2,o.glyphDataFormat=n.readShort(r,t),t+=2,o},e.hhea={},e.hhea.parse=function(r,t,a){var n=e._bin,o={};return n.readFixed(r,t),t+=4,o.ascender=n.readShort(r,t),t+=2,o.descender=n.readShort(r,t),t+=2,o.lineGap=n.readShort(r,t),t+=2,o.advanceWidthMax=n.readUshort(r,t),t+=2,o.minLeftSideBearing=n.readShort(r,t),t+=2,o.minRightSideBearing=n.readShort(r,t),t+=2,o.xMaxExtent=n.readShort(r,t),t+=2,o.caretSlopeRise=n.readShort(r,t),t+=2,o.caretSlopeRun=n.readShort(r,t),t+=2,o.caretOffset=n.readShort(r,t),t+=2,t+=8,o.metricDataFormat=n.readShort(r,t),t+=2,o.numberOfHMetrics=n.readUshort(r,t),t+=2,o},e.hmtx={},e.hmtx.parse=function(r,t,a,n){for(var o=e._bin,s={aWidth:[],lsBearing:[]},i=0,h=0,f=0;f<n.maxp.numGlyphs;f++){ f<n.hhea.numberOfHMetrics&&(i=o.readUshort(r,t),t+=2,h=o.readShort(r,t),t+=2),s.aWidth.push(i),s.lsBearing.push(h); }return s},e.kern={},e.kern.parse=function(r,t,a,n){var o=e._bin,s=o.readUshort(r,t);if(t+=2,1==s){ return e.kern.parseV1(r,t-2,a,n); }var i=o.readUshort(r,t);t+=2;for(var h={glyph1:[],rval:[]},f=0;f<i;f++){t+=2;a=o.readUshort(r,t);t+=2;var d=o.readUshort(r,t);t+=2;var u=d>>>8;if(0!=(u&=15)){ throw \"unknown kern table format: \"+u; }t=e.kern.readFormat0(r,t,h);}return h},e.kern.parseV1=function(r,t,a,n){var o=e._bin;o.readFixed(r,t),t+=4;var s=o.readUint(r,t);t+=4;for(var i={glyph1:[],rval:[]},h=0;h<s;h++){o.readUint(r,t),t+=4;var f=o.readUshort(r,t);t+=2,o.readUshort(r,t),t+=2;var d=f>>>8;if(0!=(d&=15)){ throw \"unknown kern table format: \"+d; }t=e.kern.readFormat0(r,t,i);}return i},e.kern.readFormat0=function(r,t,a){var n=e._bin,o=-1,s=n.readUshort(r,t);t+=2,n.readUshort(r,t),t+=2,n.readUshort(r,t),t+=2,n.readUshort(r,t),t+=2;for(var i=0;i<s;i++){var h=n.readUshort(r,t);t+=2;var f=n.readUshort(r,t);t+=2;var d=n.readShort(r,t);t+=2,h!=o&&(a.glyph1.push(h),a.rval.push({glyph2:[],vals:[]}));var u=a.rval[a.rval.length-1];u.glyph2.push(f),u.vals.push(d),o=h;}return t},e.loca={},e.loca.parse=function(r,t,a,n){var o=e._bin,s=[],i=n.head.indexToLocFormat,h=n.maxp.numGlyphs+1;if(0==i){ for(var f=0;f<h;f++){ s.push(o.readUshort(r,t+(f<<1))<<1); } }if(1==i){ for(f=0;f<h;f++){ s.push(o.readUint(r,t+(f<<2))); } }return s},e.maxp={},e.maxp.parse=function(r,t,a){var n=e._bin,o={},s=n.readUint(r,t);return t+=4,o.numGlyphs=n.readUshort(r,t),t+=2,65536==s&&(o.maxPoints=n.readUshort(r,t),t+=2,o.maxContours=n.readUshort(r,t),t+=2,o.maxCompositePoints=n.readUshort(r,t),t+=2,o.maxCompositeContours=n.readUshort(r,t),t+=2,o.maxZones=n.readUshort(r,t),t+=2,o.maxTwilightPoints=n.readUshort(r,t),t+=2,o.maxStorage=n.readUshort(r,t),t+=2,o.maxFunctionDefs=n.readUshort(r,t),t+=2,o.maxInstructionDefs=n.readUshort(r,t),t+=2,o.maxStackElements=n.readUshort(r,t),t+=2,o.maxSizeOfInstructions=n.readUshort(r,t),t+=2,o.maxComponentElements=n.readUshort(r,t),t+=2,o.maxComponentDepth=n.readUshort(r,t),t+=2),o},e.name={},e.name.parse=function(r,t,a){var n=e._bin,o={};n.readUshort(r,t),t+=2;var s=n.readUshort(r,t);t+=2,n.readUshort(r,t);for(var i,h=[\"copyright\",\"fontFamily\",\"fontSubfamily\",\"ID\",\"fullName\",\"version\",\"postScriptName\",\"trademark\",\"manufacturer\",\"designer\",\"description\",\"urlVendor\",\"urlDesigner\",\"licence\",\"licenceURL\",\"---\",\"typoFamilyName\",\"typoSubfamilyName\",\"compatibleFull\",\"sampleText\",\"postScriptCID\",\"wwsFamilyName\",\"wwsSubfamilyName\",\"lightPalette\",\"darkPalette\"],f=t+=2,d=0;d<s;d++){var u=n.readUshort(r,t);t+=2;var l=n.readUshort(r,t);t+=2;var v=n.readUshort(r,t);t+=2;var c=n.readUshort(r,t);t+=2;var p=n.readUshort(r,t);t+=2;var U=n.readUshort(r,t);t+=2;var g,S=h[c],m=f+12*s+U;if(0==u){ g=n.readUnicode(r,m,p/2); }else if(3==u&&0==l){ g=n.readUnicode(r,m,p/2); }else if(0==l){ g=n.readASCII(r,m,p); }else if(1==l){ g=n.readUnicode(r,m,p/2); }else if(3==l){ g=n.readUnicode(r,m,p/2); }else {if(1!=u){ throw \"unknown encoding \"+l+\", platformID: \"+u; }g=n.readASCII(r,m,p),console.debug(\"reading unknown MAC encoding \"+l+\" as ASCII\");}var b=\"p\"+u+\",\"+v.toString(16);null==o[b]&&(o[b]={}),o[b][void 0!==S?S:c]=g,o[b]._lang=v;}for(var y in o){ if(null!=o[y].postScriptName&&1033==o[y]._lang){ return o[y]; } }for(var y in o){ if(null!=o[y].postScriptName&&0==o[y]._lang){ return o[y]; } }for(var y in o){ if(null!=o[y].postScriptName&&3084==o[y]._lang){ return o[y]; } }for(var y in o){ if(null!=o[y].postScriptName){ return o[y]; } }for(var y in o){i=y;break}return console.debug(\"returning name table with languageID \"+o[i]._lang),o[i]},e[\"OS/2\"]={},e[\"OS/2\"].parse=function(r,t,a){var n=e._bin.readUshort(r,t);t+=2;var o={};if(0==n){ e[\"OS/2\"].version0(r,t,o); }else if(1==n){ e[\"OS/2\"].version1(r,t,o); }else if(2==n||3==n||4==n){ e[\"OS/2\"].version2(r,t,o); }else {if(5!=n){ throw \"unknown OS/2 table version: \"+n; }e[\"OS/2\"].version5(r,t,o);}return o},e[\"OS/2\"].version0=function(r,t,a){var n=e._bin;return a.xAvgCharWidth=n.readShort(r,t),t+=2,a.usWeightClass=n.readUshort(r,t),t+=2,a.usWidthClass=n.readUshort(r,t),t+=2,a.fsType=n.readUshort(r,t),t+=2,a.ySubscriptXSize=n.readShort(r,t),t+=2,a.ySubscriptYSize=n.readShort(r,t),t+=2,a.ySubscriptXOffset=n.readShort(r,t),t+=2,a.ySubscriptYOffset=n.readShort(r,t),t+=2,a.ySuperscriptXSize=n.readShort(r,t),t+=2,a.ySuperscriptYSize=n.readShort(r,t),t+=2,a.ySuperscriptXOffset=n.readShort(r,t),t+=2,a.ySuperscriptYOffset=n.readShort(r,t),t+=2,a.yStrikeoutSize=n.readShort(r,t),t+=2,a.yStrikeoutPosition=n.readShort(r,t),t+=2,a.sFamilyClass=n.readShort(r,t),t+=2,a.panose=n.readBytes(r,t,10),t+=10,a.ulUnicodeRange1=n.readUint(r,t),t+=4,a.ulUnicodeRange2=n.readUint(r,t),t+=4,a.ulUnicodeRange3=n.readUint(r,t),t+=4,a.ulUnicodeRange4=n.readUint(r,t),t+=4,a.achVendID=[n.readInt8(r,t),n.readInt8(r,t+1),n.readInt8(r,t+2),n.readInt8(r,t+3)],t+=4,a.fsSelection=n.readUshort(r,t),t+=2,a.usFirstCharIndex=n.readUshort(r,t),t+=2,a.usLastCharIndex=n.readUshort(r,t),t+=2,a.sTypoAscender=n.readShort(r,t),t+=2,a.sTypoDescender=n.readShort(r,t),t+=2,a.sTypoLineGap=n.readShort(r,t),t+=2,a.usWinAscent=n.readUshort(r,t),t+=2,a.usWinDescent=n.readUshort(r,t),t+=2},e[\"OS/2\"].version1=function(r,t,a){var n=e._bin;return t=e[\"OS/2\"].version0(r,t,a),a.ulCodePageRange1=n.readUint(r,t),t+=4,a.ulCodePageRange2=n.readUint(r,t),t+=4},e[\"OS/2\"].version2=function(r,t,a){var n=e._bin;return t=e[\"OS/2\"].version1(r,t,a),a.sxHeight=n.readShort(r,t),t+=2,a.sCapHeight=n.readShort(r,t),t+=2,a.usDefault=n.readUshort(r,t),t+=2,a.usBreak=n.readUshort(r,t),t+=2,a.usMaxContext=n.readUshort(r,t),t+=2},e[\"OS/2\"].version5=function(r,t,a){var n=e._bin;return t=e[\"OS/2\"].version2(r,t,a),a.usLowerOpticalPointSize=n.readUshort(r,t),t+=2,a.usUpperOpticalPointSize=n.readUshort(r,t),t+=2},e.post={},e.post.parse=function(r,t,a){var n=e._bin,o={};return o.version=n.readFixed(r,t),t+=4,o.italicAngle=n.readFixed(r,t),t+=4,o.underlinePosition=n.readShort(r,t),t+=2,o.underlineThickness=n.readShort(r,t),t+=2,o},null==e&&(e={}),null==e.U&&(e.U={}),e.U.codeToGlyph=function(r,e){var t=r.cmap,a=-1;if(null!=t.p0e4?a=t.p0e4:null!=t.p3e1?a=t.p3e1:null!=t.p1e0?a=t.p1e0:null!=t.p0e3&&(a=t.p0e3),-1==a){ throw \"no familiar platform and encoding!\"; }var n=t.tables[a];if(0==n.format){ return e>=n.map.length?0:n.map[e]; }if(4==n.format){for(var o=-1,s=0;s<n.endCount.length;s++){ if(e<=n.endCount[s]){o=s;break} }if(-1==o){ return 0; }if(n.startCount[o]>e){ return 0; }return 65535&(0!=n.idRangeOffset[o]?n.glyphIdArray[e-n.startCount[o]+(n.idRangeOffset[o]>>1)-(n.idRangeOffset.length-o)]:e+n.idDelta[o])}if(12==n.format){if(e>n.groups[n.groups.length-1][1]){ return 0; }for(s=0;s<n.groups.length;s++){var i=n.groups[s];if(i[0]<=e&&e<=i[1]){ return i[2]+(e-i[0]) }}return 0}throw \"unknown cmap table format \"+n.format},e.U.glyphToPath=function(r,t){var a={cmds:[],crds:[]};if(r.SVG&&r.SVG.entries[t]){var n=r.SVG.entries[t];return null==n?a:(\"string\"==typeof n&&(n=e.SVG.toPath(n),r.SVG.entries[t]=n),n)}if(r.CFF){var o={x:0,y:0,stack:[],nStems:0,haveWidth:!1,width:r.CFF.Private?r.CFF.Private.defaultWidthX:0,open:!1},s=r.CFF,i=r.CFF.Private;if(s.ROS){for(var h=0;s.FDSelect[h+2]<=t;){ h+=2; }i=s.FDArray[s.FDSelect[h+1]].Private;}e.U._drawCFF(r.CFF.CharStrings[t],o,s,i,a);}else { r.glyf&&e.U._drawGlyf(t,r,a); }return a},e.U._drawGlyf=function(r,t,a){var n=t.glyf[r];null==n&&(n=t.glyf[r]=e.glyf._parseGlyf(t,r)),null!=n&&(n.noc>-1?e.U._simpleGlyph(n,a):e.U._compoGlyph(n,t,a));},e.U._simpleGlyph=function(r,t){for(var a=0;a<r.noc;a++){for(var n=0==a?0:r.endPts[a-1]+1,o=r.endPts[a],s=n;s<=o;s++){var i=s==n?o:s-1,h=s==o?n:s+1,f=1&r.flags[s],d=1&r.flags[i],u=1&r.flags[h],l=r.xs[s],v=r.ys[s];if(s==n){ if(f){if(!d){e.U.P.moveTo(t,l,v);continue}e.U.P.moveTo(t,r.xs[i],r.ys[i]);}else { d?e.U.P.moveTo(t,r.xs[i],r.ys[i]):e.U.P.moveTo(t,(r.xs[i]+l)/2,(r.ys[i]+v)/2); } }f?d&&e.U.P.lineTo(t,l,v):u?e.U.P.qcurveTo(t,l,v,r.xs[h],r.ys[h]):e.U.P.qcurveTo(t,l,v,(l+r.xs[h])/2,(v+r.ys[h])/2);}e.U.P.closePath(t);}},e.U._compoGlyph=function(r,t,a){for(var n=0;n<r.parts.length;n++){var o={cmds:[],crds:[]},s=r.parts[n];e.U._drawGlyf(s.glyphIndex,t,o);for(var i=s.m,h=0;h<o.crds.length;h+=2){var f=o.crds[h],d=o.crds[h+1];a.crds.push(f*i.a+d*i.b+i.tx),a.crds.push(f*i.c+d*i.d+i.ty);}for(h=0;h<o.cmds.length;h++){ a.cmds.push(o.cmds[h]); }}},e.U._getGlyphClass=function(r,t){var a=e._lctf.getInterval(t,r);return -1==a?0:t[a+2]},e.U.getPairAdjustment=function(r,t,a){var n=0;if(r.GPOS){ for(var o=r.GPOS,s=o.lookupList,i=o.featureList,h=[],f=0;f<i.length;f++){var d=i[f];if(\"kern\"==d.tag){ for(var u=0;u<d.tab.length;u++){ if(!h[d.tab[u]]){h[d.tab[u]]=!0;for(var l=s[d.tab[u]],v=0;v<l.tabs.length;v++){ if(null!=l.tabs[v]){var c,p=l.tabs[v];if(!p.coverage||-1!=(c=e._lctf.coverageIndex(p.coverage,t))){ if(1==l.ltype);else if(2==l.ltype){var U;if(1==p.fmt){var g=p.pairsets[c];for(f=0;f<g.length;f++){ g[f].gid2==a&&(U=g[f]); }}else if(2==p.fmt){var S=e.U._getGlyphClass(t,p.classDef1),m=e.U._getGlyphClass(a,p.classDef2);U=p.matrix[S][m];}U&&U.val1&&U.val1[2]&&(n+=U.val1[2]),U&&U.val2&&U.val2[0]&&(n+=U.val2[0]);} }} }} } }} }if(r.kern){var b=r.kern.glyph1.indexOf(t);if(-1!=b){var y=r.kern.rval[b].glyph2.indexOf(a);-1!=y&&(n+=r.kern.rval[b].vals[y]);}}return n},e.U._applySubs=function(r,t,a,n){for(var o=r.length-t-1,s=0;s<a.tabs.length;s++){ if(null!=a.tabs[s]){var i,h=a.tabs[s];if(!h.coverage||-1!=(i=e._lctf.coverageIndex(h.coverage,r[t]))){ if(1==a.ltype){ r[t],1==h.fmt?r[t]=r[t]+h.delta:r[t]=h.newg[i]; }else if(4==a.ltype){ for(var f=h.vals[i],d=0;d<f.length;d++){var u=f[d],l=u.chain.length;if(!(l>o)){for(var v=!0,c=0,p=0;p<l;p++){for(;-1==r[t+c+(1+p)];){ c++; }u.chain[p]!=r[t+c+(1+p)]&&(v=!1);}if(v){r[t]=u.nglyph;for(p=0;p<l+c;p++){ r[t+p+1]=-1; }break}}} }else if(5==a.ltype&&2==h.fmt){ for(var U=e._lctf.getInterval(h.cDef,r[t]),g=h.cDef[U+2],S=h.scset[g],m=0;m<S.length;m++){var b=S[m],y=b.input;if(!(y.length>o)){for(v=!0,p=0;p<y.length;p++){var F=e._lctf.getInterval(h.cDef,r[t+1+p]);if(-1==U&&h.cDef[F+2]!=y[p]){v=!1;break}}if(v){var _=b.substLookupRecords;for(d=0;d<_.length;d+=2){ _[d],_[d+1]; }}}} }else if(6==a.ltype&&3==h.fmt){if(!e.U._glsCovered(r,h.backCvg,t-h.backCvg.length)){ continue; }if(!e.U._glsCovered(r,h.inptCvg,t)){ continue; }if(!e.U._glsCovered(r,h.ahedCvg,t+h.inptCvg.length)){ continue; }var C=h.lookupRec;for(m=0;m<C.length;m+=2){U=C[m];var x=n[C[m+1]];e.U._applySubs(r,t+U,x,n);}} }} }},e.U._glsCovered=function(r,t,a){for(var n=0;n<t.length;n++){if(-1==e._lctf.coverageIndex(t[n],r[a+n])){ return !1 }}return !0},e.U.glyphsToPath=function(r,t,a){for(var n={cmds:[],crds:[]},o=0,s=0;s<t.length;s++){var i=t[s];if(-1!=i){for(var h=s<t.length-1&&-1!=t[s+1]?t[s+1]:0,f=e.U.glyphToPath(r,i),d=0;d<f.crds.length;d+=2){ n.crds.push(f.crds[d]+o),n.crds.push(f.crds[d+1]); }a&&n.cmds.push(a);for(d=0;d<f.cmds.length;d++){ n.cmds.push(f.cmds[d]); }a&&n.cmds.push(\"X\"),o+=r.hmtx.aWidth[i],s<t.length-1&&(o+=e.U.getPairAdjustment(r,i,h));}}return n},e.U.P={},e.U.P.moveTo=function(r,e,t){r.cmds.push(\"M\"),r.crds.push(e,t);},e.U.P.lineTo=function(r,e,t){r.cmds.push(\"L\"),r.crds.push(e,t);},e.U.P.curveTo=function(r,e,t,a,n,o,s){r.cmds.push(\"C\"),r.crds.push(e,t,a,n,o,s);},e.U.P.qcurveTo=function(r,e,t,a,n){r.cmds.push(\"Q\"),r.crds.push(e,t,a,n);},e.U.P.closePath=function(r){r.cmds.push(\"Z\");},e.U._drawCFF=function(r,t,a,n,o){for(var s=t.stack,i=t.nStems,h=t.haveWidth,f=t.width,d=t.open,u=0,l=t.x,v=t.y,c=0,p=0,U=0,g=0,S=0,m=0,b=0,y=0,F=0,_=0,C={val:0,size:0};u<r.length;){e.CFF.getCharString(r,u,C);var x=C.val;if(u+=C.size,\"o1\"==x||\"o18\"==x){ s.length%2!=0&&!h&&(f=s.shift()+n.nominalWidthX),i+=s.length>>1,s.length=0,h=!0; }else if(\"o3\"==x||\"o23\"==x){s.length%2!=0&&!h&&(f=s.shift()+n.nominalWidthX),i+=s.length>>1,s.length=0,h=!0;}else if(\"o4\"==x){ s.length>1&&!h&&(f=s.shift()+n.nominalWidthX,h=!0),d&&e.U.P.closePath(o),v+=s.pop(),e.U.P.moveTo(o,l,v),d=!0; }else if(\"o5\"==x){ for(;s.length>0;){ l+=s.shift(),v+=s.shift(),e.U.P.lineTo(o,l,v); } }else if(\"o6\"==x||\"o7\"==x){ for(var P=s.length,I=\"o6\"==x,w=0;w<P;w++){var O=s.shift();I?l+=O:v+=O,I=!I,e.U.P.lineTo(o,l,v);} }else if(\"o8\"==x||\"o24\"==x){P=s.length;for(var T=0;T+6<=P;){ c=l+s.shift(),p=v+s.shift(),U=c+s.shift(),g=p+s.shift(),l=U+s.shift(),v=g+s.shift(),e.U.P.curveTo(o,c,p,U,g,l,v),T+=6; }\"o24\"==x&&(l+=s.shift(),v+=s.shift(),e.U.P.lineTo(o,l,v));}else {if(\"o11\"==x){ break; }if(\"o1234\"==x||\"o1235\"==x||\"o1236\"==x||\"o1237\"==x){ \"o1234\"==x&&(p=v,U=(c=l+s.shift())+s.shift(),_=g=p+s.shift(),m=g,y=v,l=(b=(S=(F=U+s.shift())+s.shift())+s.shift())+s.shift(),e.U.P.curveTo(o,c,p,U,g,F,_),e.U.P.curveTo(o,S,m,b,y,l,v)),\"o1235\"==x&&(c=l+s.shift(),p=v+s.shift(),U=c+s.shift(),g=p+s.shift(),F=U+s.shift(),_=g+s.shift(),S=F+s.shift(),m=_+s.shift(),b=S+s.shift(),y=m+s.shift(),l=b+s.shift(),v=y+s.shift(),s.shift(),e.U.P.curveTo(o,c,p,U,g,F,_),e.U.P.curveTo(o,S,m,b,y,l,v)),\"o1236\"==x&&(c=l+s.shift(),p=v+s.shift(),U=c+s.shift(),_=g=p+s.shift(),m=g,b=(S=(F=U+s.shift())+s.shift())+s.shift(),y=m+s.shift(),l=b+s.shift(),e.U.P.curveTo(o,c,p,U,g,F,_),e.U.P.curveTo(o,S,m,b,y,l,v)),\"o1237\"==x&&(c=l+s.shift(),p=v+s.shift(),U=c+s.shift(),g=p+s.shift(),F=U+s.shift(),_=g+s.shift(),S=F+s.shift(),m=_+s.shift(),b=S+s.shift(),y=m+s.shift(),Math.abs(b-l)>Math.abs(y-v)?l=b+s.shift():v=y+s.shift(),e.U.P.curveTo(o,c,p,U,g,F,_),e.U.P.curveTo(o,S,m,b,y,l,v)); }else if(\"o14\"==x){if(s.length>0&&!h&&(f=s.shift()+a.nominalWidthX,h=!0),4==s.length){var k=s.shift(),G=s.shift(),D=s.shift(),B=s.shift(),A=e.CFF.glyphBySE(a,D),R=e.CFF.glyphBySE(a,B);e.U._drawCFF(a.CharStrings[A],t,a,n,o),t.x=k,t.y=G,e.U._drawCFF(a.CharStrings[R],t,a,n,o);}d&&(e.U.P.closePath(o),d=!1);}else if(\"o19\"==x||\"o20\"==x){s.length%2!=0&&!h&&(f=s.shift()+n.nominalWidthX),i+=s.length>>1,s.length=0,h=!0,u+=i+7>>3;}else if(\"o21\"==x){ s.length>2&&!h&&(f=s.shift()+n.nominalWidthX,h=!0),v+=s.pop(),l+=s.pop(),d&&e.U.P.closePath(o),e.U.P.moveTo(o,l,v),d=!0; }else if(\"o22\"==x){ s.length>1&&!h&&(f=s.shift()+n.nominalWidthX,h=!0),l+=s.pop(),d&&e.U.P.closePath(o),e.U.P.moveTo(o,l,v),d=!0; }else if(\"o25\"==x){for(;s.length>6;){ l+=s.shift(),v+=s.shift(),e.U.P.lineTo(o,l,v); }c=l+s.shift(),p=v+s.shift(),U=c+s.shift(),g=p+s.shift(),l=U+s.shift(),v=g+s.shift(),e.U.P.curveTo(o,c,p,U,g,l,v);}else if(\"o26\"==x){ for(s.length%2&&(l+=s.shift());s.length>0;){ c=l,p=v+s.shift(),l=U=c+s.shift(),v=(g=p+s.shift())+s.shift(),e.U.P.curveTo(o,c,p,U,g,l,v); } }else if(\"o27\"==x){ for(s.length%2&&(v+=s.shift());s.length>0;){ p=v,U=(c=l+s.shift())+s.shift(),g=p+s.shift(),l=U+s.shift(),v=g,e.U.P.curveTo(o,c,p,U,g,l,v); } }else if(\"o10\"==x||\"o29\"==x){var L=\"o10\"==x?n:a;if(0==s.length){ console.debug(\"error: empty stack\"); }else {var W=s.pop(),M=L.Subrs[W+L.Bias];t.x=l,t.y=v,t.nStems=i,t.haveWidth=h,t.width=f,t.open=d,e.U._drawCFF(M,t,a,n,o),l=t.x,v=t.y,i=t.nStems,h=t.haveWidth,f=t.width,d=t.open;}}else if(\"o30\"==x||\"o31\"==x){var N=s.length,V=(T=0,\"o31\"==x);for(T+=N-(P=-3&N);T<P;){ V?(p=v,U=(c=l+s.shift())+s.shift(),v=(g=p+s.shift())+s.shift(),P-T==5?(l=U+s.shift(),T++):l=U,V=!1):(c=l,p=v+s.shift(),U=c+s.shift(),g=p+s.shift(),l=U+s.shift(),P-T==5?(v=g+s.shift(),T++):v=g,V=!0),e.U.P.curveTo(o,c,p,U,g,l,v),T+=4; }}else {if(\"o\"==(x+\"\").charAt(0)){ throw console.debug(\"Unknown operation: \"+x,r),x; }s.push(x);}}}t.x=l,t.y=v,t.nStems=i,t.haveWidth=h,t.width=f,t.open=d;};var t=e,a={Typr:t};return r.Typr=t,r.default=a,Object.defineProperty(r,\"__esModule\",{value:!0}),r}({}).Typr}", "title": "" }, { "docid": "3ded9779df7b19671fbd8697b7b99b17", "score": "0.5303185", "text": "function Translate(){function F(){function f(){this.Layer=this.Index=0;this.End=!1;this.Char=\"\";this.Results=[];this.m_values={};this.Parent=this.Failure=null;this.Add=function(c){if(null!=this.m_values[c])return this.m_values[c];var b=new f;b.Parent=this;b.Char=c;return this.m_values[c]=b};this.SetResults=function(c){0==this.End&&(this.End=!0);this.Results.push(c)}}function d(){this.End=!1;this.Results=[];this.m_values={};this.minflag=65535;this.maxflag=0;this.Add=function(c,b){this.minflag>c&&(this.minflag=c);this.maxflag<c&&(this.maxflag=c);this.m_values[c]=b};this.SetResults=function(c){0==this.End&&(this.End=!0);-1==this.Results.indexOf(c)&&this.Results.push(c)};this.HasKey=function(c){return void 0!=this.m_values[c]};this.TryGetValue=function(c){return this.minflag<=c&&this.maxflag>=c?this.m_values[c]:null}}var p=[],q=[];this._others=[];this.SetKeywords=function(c){q=c;c=new f;for(var b={},g=0;g<q.length;g++){for(var k=q[g],a=c,r=0;r<k.length;r++)a=a.Add(k.charCodeAt(r)),0==a.Layer&&(a.Layer=r+1,b[a.Layer]||(b[a.Layer]=[]),b[a.Layer].push(a));a.SetResults(g)}k=[];k.push(c);for(var h in b)for(a=b[h],g=0;g<a.length;g++)k.push(a[g]);for(g=1;g<k.length;g++){a=k[g];a.Index=g;h=a.Parent.Failure;for(b=a.Char;null!=h&&!h.m_values[b];)h=h.Failure;if(null==h)a.Failure=c;else{a.Failure=h.m_values[b];for(var l in a.Failure.Results)0!=a.Failure.Results.hasOwnProperty(l)&&a.SetResults(a.Failure.Results[l])}}c.Failure=c;l=[];for(g=0;g<k.length;g++)l.push(new d);for(g=0;g<l.length;g++){a=k[g];h=l[g];for(var m in a.m_values)0!=a.m_values.hasOwnProperty(m)&&(b=a.m_values[m].Index,h.Add(m,l[b]));for(b=0;b<a.Results.length;b++)h.SetResults(a.Results[b]);for(a=a.Failure;a!=c;){for(var n in a.m_values)0!=a.m_values.hasOwnProperty(n)&&0==h.HasKey(n)&&(b=a.m_values[n].Index,h.Add(n,l[b]));for(b=0;b<a.Results.length;b++)h.SetResults(a.Results[b]);a=a.Failure}}m=[];for(n=0;65535>n;n++)m.push(null);for(var e in l[0].m_values)0!=l[0].m_values.hasOwnProperty(e)&&(m[e]=l[0].m_values[e]);p=m};this.FindAll=function(c){for(var b=null,d=[],f=0;f<c.length;f++){var a=c.charCodeAt(f);null==b?b=p[a]:(b=b.TryGetValue(a))||(b=p[a]);if(null!=b&&b.End)for(a=0;a<b.Results.length;a++){var e=b.Results[a];d.push({Keyword:q[e],Success:!0,End:f,Start:f+1-q[e].length,Index:e})}}return d}}function t(f,d){for(var p=d.FindAll(f),e=\"\",c=0;c<f.length;){for(var b=null,g=-1,k=0;k<p.length;k++){var a=p[k];a.Start==c&&a.End>g&&(g=a.End,b=a)}null==b?(e+=f[c],c++):(e+=d._others[b.Index],c=b.End+1)}return e}function u(f,d){if(f){if(0==d)return null==v&&(v=e(G,H)),v;if(1==d)return null==w&&(w=e(B,C)),w;if(2==d)return null==x&&(x=e(D,E)),x}return 0==d?(null==y&&(y=e(I,J)),y):1==d?(null==z&&(z=e(C,B)),z):2==d?(null==A&&(A=e(E,D)),A):null}function e(f,d){var e=new F;e.SetKeywords(f);e._others=d;return e}var G=\"\\u3437 \\u3439 \\u343d \\u3447 \\u3448 \\u3454 \\u3469 \\u34c6 \\u34e5 \\u34f0 \\u3509 \\u358a \\u359e \\u35f7 \\u360e \\u36af \\u36c0 \\u36df \\u36e0 \\u36e3 \\u36e4 \\u36ff \\u37c6 \\u37dc \\u37e5 \\u384e \\u3918 \\u393d \\u396a \\u39cf \\u39d0 \\u39d1 \\u39df \\u39f0 \\u3a2b \\u3b4e \\u3b4f \\u3b63 \\u3b64 \\u3b74 \\u3c69 \\u3c6e \\u3cbf \\u3cd4 \\u3cd5 \\u3ce0 \\u3ce1 \\u3ce2 \\u3cfd \\u3d0b \\u3d89 \\u3db6 \\u3dbd \\u3e8d \\u3ec5 \\u3ecf \\u3ed8 \\u4025 \\u4056 \\u40b5 \\u40c5 \\u4149 \\u415f \\u416a \\u41f2 \\u4264 \\u4336 \\u4337 \\u4338 \\u4339 \\u433a \\u433b \\u433c \\u433d \\u433e \\u433f \\u4340 \\u4341 \\u4360 \\u43ac \\u43dd \\u447d \\u44d3 \\u44d5 \\u44d6 \\u44e8 \\u45d6 \\u461b \\u461e \\u464a \\u464c \\u4653 \\u4723 \\u4724 \\u4725 \\u4727 \\u4729 \\u4759 \\u478c \\u478d \\u478e \\u4790 \\u47e2 \\u4880 \\u4881 \\u4882 \\u497a \\u497d \\u497e \\u497f \\u4980 \\u4981 \\u4982 \\u4983 \\u4985 \\u4986 \\u49b6 \\u49b7 \\u4a44 \\u4b6a \\u4bc3 \\u4bc4 \\u4bc5 \\u4c9d \\u4c9e \\u4c9f \\u4ca0 \\u4ca1 \\u4ca2 \\u4ca3 \\u4d13 \\u4d14 \\u4d15 \\u4d16 \\u4d17 \\u4d18 \\u4d19 \\u4dae \\u4e07 \\u4e0e \\u4e11 \\u4e13 \\u4e1a \\u4e1b \\u4e1c \\u4e1d \\u4e22 \\u4e24 \\u4e25 \\u4e27 \\u4e2a \\u4e30 \\u4e34 \\u4e3a \\u4e3d \\u4e3e \\u4e48 \\u4e49 \\u4e4c \\u4e50 \\u4e54 \\u4e60 \\u4e61 \\u4e66 \\u4e70 \\u4e71 \\u4e86 \\u4e89 \\u4e8e \\u4e8f \\u4e91 \\u4e98 \\u4e9a \\u4ea7 \\u4ea9 \\u4eb2 \\u4eb5 \\u4eb8 \\u4ebf \\u4ec5 \\u4ec6 \\u4ec7 \\u4ece \\u4ed1 \\u4ed3 \\u4eea \\u4eec \\u4ef7 \\u4eff \\u4f17 \\u4f18 \\u4f19 \\u4f1a \\u4f1b \\u4f1e \\u4f1f \\u4f20 \\u4f21 \\u4f23 \\u4f24 \\u4f25 \\u4f26 \\u4f27 \\u4f2a \\u4f2b \\u4f53 \\u4f59 \\u4f5b \\u4f63 \\u4f65 \\u4fa0 \\u4fa3 \\u4fa5 \\u4fa6 \\u4fa7 \\u4fa8 \\u4fa9 \\u4faa \\u4fac \\u4fad \\u4fca \\u4fe3 \\u4fe6 \\u4fe8 \\u4fe9 \\u4fea \\u4feb \\u4fed \\u4fee \\u501f \\u503a \\u503e \\u506c \\u507b \\u507e \\u507f \\u50a4 \\u50a5 \\u50a7 \\u50a8 \\u50a9 \\u50f5 \\u513f \\u514b \\u5151 \\u5156 \\u515a \\u5170 \\u5173 \\u5174 \\u5179 \\u517b \\u517d \\u5181 \\u5185 \\u5188 \\u518c \\u5199 \\u519b \\u519c \\u51ac \\u51af \\u51b2 \\u51b3 \\u51b5 \\u51bb \\u51c0 \\u51c4 \\u51c6 \\u51c9 \\u51cc \\u51cf \\u51d1 \\u51db \\u51e0 \\u51e4 \\u51eb \\u51ed \\u51ef \\u51f6 \\u51fa \\u51fb \\u51ff \\u520d \\u5212 \\u5218 \\u5219 \\u521a \\u521b \\u5220 \\u522b \\u522c \\u522d \\u522e \\u5236 \\u5239 \\u523d \\u523e \\u523f \\u5240 \\u5242 \\u5250 \\u5251 \\u5265 \\u5267 \\u529d \\u529e \\u52a1 \\u52a2 \\u52a8 \\u52b1 \\u52b2 \\u52b3 \\u52bf \\u52cb \\u52da \\u5300 \\u5326 \\u532e \\u533a \\u533b \\u5343 \\u5347 \\u534e \\u534f \\u5355 \\u5356 \\u535c \\u5360 \\u5362 \\u5364 \\u5367 \\u536b \\u5374 \\u5377 \\u537a \\u5382 \\u5385 \\u5386 \\u5389 \\u538b \\u538c \\u538d \\u5390 \\u5395 \\u5398 \\u53a2 \\u53a3 \\u53a6 \\u53a8 \\u53a9 \\u53ae \\u53bf \\u53c1 \\u53c2 \\u53c6 \\u53c7 \\u53cc \\u53d1 \\u53d8 \\u53d9 \\u53e0 \\u53ea \\u53f0 \\u53f6 \\u53f7 \\u53f9 \\u53fd \\u5401 \\u5403 \\u5408 \\u540a \\u540c \\u540e \\u5411 \\u5413 \\u5415 \\u5417 \\u5423 \\u5428 \\u542c \\u542f \\u5434 \\u5450 \\u5452 \\u5453 \\u5455 \\u5456 \\u5457 \\u5458 \\u5459 \\u545b \\u545c \\u5468 \\u548f \\u5499 \\u549b \\u549d \\u54a4 \\u54a8 \\u54b8 \\u54bd \\u54c4 \\u54cd \\u54d1 \\u54d2 \\u54d3 \\u54d4 \\u54d5 \\u54d7 \\u54d9 \\u54dc \\u54dd \\u54df \\u5507 \\u551b \\u551d \\u5520 \\u5521 \\u5522 \\u5524 \\u5567 \\u556c \\u556d \\u556e \\u556f \\u5570 \\u5574 \\u5578 \\u5582 \\u55b7 \\u55bd \\u55be \\u55eb \\u55f3 \\u5618 \\u5624 \\u5631 \\u565c \\u566a \\u56a3 \\u56de \\u56e2 \\u56ed \\u56f0 \\u56f1 \\u56f4 \\u56f5 \\u56fd \\u56fe \\u5706 \\u5723 \\u5739 \\u573a \\u5742 \\u574f \\u5750 \\u5757 \\u575a \\u575b \\u575c \\u575d \\u575e \\u575f \\u5760 \\u5784 \\u5785 \\u5786 \\u5792 \\u57a6 \\u57a9 \\u57ab \\u57ad \\u57af \\u57b1 \\u57b2 \\u57b4 \\u57d8 \\u57d9 \\u57da \\u57ef \\u5811 \\u5815 \\u5846 \\u5899 \\u58ee \\u58f0 \\u58f3 \\u58f6 \\u58f8 \\u5904 \\u5907 \\u590d \\u591f \\u592b \\u5934 \\u5938 \\u5939 \\u593a \\u5941 \\u5942 \\u594b \\u5956 \\u5965 \\u5978 \\u5986 \\u5987 \\u5988 \\u59a9 \\u59aa \\u59ab \\u59d7 \\u59dc \\u59f9 \\u5a04 \\u5a05 \\u5a06 \\u5a07 \\u5a08 \\u5a18 \\u5a31 \\u5a32 \\u5a34 \\u5a73 \\u5a74 \\u5a75 \\u5a76 \\u5aaa \\u5aad \\u5ad2 \\u5ad4 \\u5af1 \\u5b37 \\u5b59 \\u5b66 \\u5b6a \\u5b81 \\u5b9d \\u5b9e \\u5ba0 \\u5ba1 \\u5baa \\u5bab \\u5bb6 \\u5bbd \\u5bbe \\u5bdd \\u5bf9 \\u5bfb \\u5bfc \\u5bff \\u5c06 \\u5c14 \\u5c18 \\u5c1d \\u5c27 \\u5c34 \\u5c38 \\u5c3d \\u5c40 \\u5c42 \\u5c43 \\u5c49 \\u5c4a \\u5c5e \\u5c61 \\u5c66 \\u5c7f \\u5c81 \\u5c82 \\u5c96 \\u5c97 \\u5c98 \\u5c99 \\u5c9a \\u5c9b \\u5ca9 \\u5cad \\u5cb3 \\u5cbd \\u5cbf \\u5cc3 \\u5cc4 \\u5ce1 \\u5ce3 \\u5ce4 \\u5ce5 \\u5ce6 \\u5cf0 \\u5d02 \\u5d03 \\u5d04 \\u5d2d \\u5d58 \\u5d5a \\u5d5d \\u5dc5 \\u5de8 \\u5de9 \\u5def \\u5e01 \\u5e03 \\u5e05 \\u5e08 \\u5e0f \\u5e10 \\u5e18 \\u5e1c \\u5e26 \\u5e27 \\u5e2d \\u5e2e \\u5e31 \\u5e3b \\u5e3c \\u5e42 \\u5e5e \\u5e72 \\u5e76 \\u5e78 \\u5e7f \\u5e84 \\u5e86 \\u5e8a \\u5e90 \\u5e91 \\u5e93 \\u5e94 \\u5e99 \\u5e9e \\u5e9f \\u5eb5 \\u5ebc \\u5eea \\u5f00 \\u5f02 \\u5f03 \\u5f11 \\u5f20 \\u5f25 \\u5f26 \\u5f2a \\u5f2f \\u5f39 \\u5f3a \\u5f52 \\u5f53 \\u5f55 \\u5f5f \\u5f66 \\u5f68 \\u5f69 \\u5f7b \\u5f81 \\u5f84 \\u5f95 \\u5fa1 \\u5fc6 \\u5fcf \\u5fd7 \\u5fe7 \\u5ff5 \\u5ffe \\u6000 \\u6001 \\u6002 \\u6003 \\u6004 \\u6005 \\u6006 \\u601c \\u603b \\u603c \\u603f \\u604b \\u6052 \\u6064 \\u6073 \\u6076 \\u6078 \\u6079 \\u607a \\u607b \\u607c \\u607d \\u60a6 \\u60ab \\u60ac \\u60ad \\u60ae \\u60af \\u60ca \\u60e7 \\u60e8 \\u60e9 \\u60eb \\u60ec \\u60ed \\u60ee \\u60ef \\u6108 \\u6120 \\u6124 \\u6126 \\u613f \\u6151 \\u616d \\u61d1 \\u61d2 \\u61d4 \\u6206 \\u620b \\u620f \\u6217 \\u6218 \\u621a \\u622c \\u622f \\u6237 \\u624d \\u624e \\u6251 \\u6258 \\u6263 \\u6267 \\u6269 \\u626a \\u626b \\u626c \\u6270 \\u6298 \\u629a \\u629b \\u629f \\u62a0 \\u62a1 \\u62a2 \\u62a4 \\u62a5 \\u62ac \\u62b5 \\u62c5 \\u62d0 \\u62df \\u62e2 \\u62e3 \\u62e5 \\u62e6 \\u62e7 \\u62e8 \\u62e9 \\u6302 \\u631a \\u631b \\u631c \\u631d \\u631e \\u631f \\u6320 \\u6321 \\u6322 \\u6323 \\u6324 \\u6325 \\u6326 \\u6328 \\u633d \\u635d \\u635e \\u635f \\u6361 \\u6362 \\u6363 \\u636e \\u63b3 \\u63b4 \\u63b7 \\u63b8 \\u63ba \\u63bc \\u63fd \\u63fe \\u63ff \\u6400 \\u6401 \\u6402 \\u6404 \\u6405 \\u641c \\u643a \\u6444 \\u6445 \\u6446 \\u6447 \\u6448 \\u644a \\u6484 \\u6491 \\u64b5 \\u64b7 \\u64b8 \\u64ba \\u64dc \\u64de \\u6512 \\u654c \\u655a \\u655b \\u6569 \\u6570 \\u658b \\u6593 \\u6597 \\u65a9 \\u65ad \\u65e0 \\u65e7 \\u65f6 \\u65f7 \\u65f8 \\u6606 \\u6619 \\u6635 \\u663c \\u663d \\u663e \\u664b \\u6652 \\u6653 \\u6654 \\u6655 \\u6656 \\u6682 \\u6685 \\u6697 \\u66a7 \\u66f2 \\u672f \\u6731 \\u6734 \\u673a \\u6740 \\u6742 \\u6743 \\u6746 \\u6760 \\u6761 \\u6765 \\u6768 \\u6769 \\u676f \\u6770 \\u677e \\u677f \\u6781 \\u6784 \\u679e \\u67a2 \\u67a3 \\u67a5 \\u67a7 \\u67a8 \\u67aa \\u67ab \\u67ad \\u67dc \\u67e0 \\u67fd \\u6800 \\u6805 \\u6807 \\u6808 \\u6809 \\u680a \\u680b \\u680c \\u680e \\u680f \\u6811 \\u6816 \\u6817 \\u6837 \\u6838 \\u683e \\u6860 \\u6861 \\u6862 \\u6863 \\u6864 \\u6865 \\u6866 \\u6867 \\u6868 \\u6869 \\u686a \\u6881 \\u68a6 \\u68bc \\u68be \\u68bf \\u68c0 \\u68c1 \\u68c2 \\u6901 \\u691d \\u691f \\u6920 \\u6922 \\u6924 \\u692b \\u692d \\u692e \\u697c \\u6984 \\u6985 \\u6987 \\u6988 \\u6989 \\u699d \\u69da \\u69db \\u69df \\u69e0 \\u6a2a \\u6a2f \\u6a31 \\u6a65 \\u6a71 \\u6a79 \\u6a7c \\u6aa9 \\u6b22 \\u6b24 \\u6b27 \\u6b32 \\u6b7c \\u6b81 \\u6b87 \\u6b8b \\u6b92 \\u6b93 \\u6b9a \\u6ba1 \\u6bb4 \\u6bc1 \\u6bc2 \\u6bd5 \\u6bd9 \\u6be1 \\u6bf5 \\u6bf6 \\u6c07 \\u6c14 \\u6c22 \\u6c29 \\u6c32 \\u6c47 \\u6c49 \\u6c64 \\u6c79 \\u6c88 \\u6c9f \\u6ca1 \\u6ca3 \\u6ca4 \\u6ca5 \\u6ca6 \\u6ca7 \\u6ca8 \\u6ca9 \\u6caa \\u6cdb \\u6cde \\u6ce8 \\u6cea \\u6cf6 \\u6cf7 \\u6cf8 \\u6cfa \\u6cfb \\u6cfc \\u6cfd \\u6cfe \\u6d01 \\u6d12 \\u6d3c \\u6d43 \\u6d45 \\u6d46 \\u6d47 \\u6d48 \\u6d49 \\u6d4a \\u6d4b \\u6d4d \\u6d4e \\u6d4f \\u6d50 \\u6d51 \\u6d52 \\u6d53 \\u6d54 \\u6d55 \\u6d82 \\u6d9a \\u6d9b \\u6d9d \\u6d9e \\u6d9f \\u6da0 \\u6da1 \\u6da2 \\u6da3 \\u6da4 \\u6da6 \\u6da7 \\u6da8 \\u6da9 \\u6dc0 \\u6e0a \\u6e0c \\u6e0d \\u6e0e \\u6e10 \\u6e11 \\u6e14 \\u6e16 \\u6e17 \\u6e29 \\u6e38 \\u6e7e \\u6e7f \\u6e81 \\u6e83 \\u6e85 \\u6e86 \\u6e87 \\u6ed7 \\u6eda \\u6ede \\u6edf \\u6ee0 \\u6ee1 \\u6ee2 \\u6ee4 \\u6ee5 \\u6ee6 \\u6ee8 \\u6ee9 \\u6eea \\u6f13 \\u6f46 \\u6f47 \\u6f4b \\u6f4d \\u6f5c \\u6f74 \\u6f9b \\u6f9c \\u6fd1 \\u6fd2 \\u704f \\u706d \\u706f \\u7075 \\u7076 \\u707e \\u707f \\u7080 \\u7089 \\u7096 \\u709c \\u709d \\u70b9 \\u70bc \\u70bd \\u70c1 \\u70c2 \\u70c3 \\u70db \\u70df \\u70e6 \\u70e7 \\u70e8 \\u70e9 \\u70eb \\u70ec \\u70ed \\u7115 \\u7116 \\u7118 \\u7174 \\u718f \\u7231 \\u7237 \\u724d \\u7266 \\u7275 \\u727a \\u728a \\u72b6 \\u72b7 \\u72b8 \\u72b9 \\u72c8 \\u72dd \\u72de \\u72ec \\u72ed \\u72ee \\u72ef \\u72f0 \\u72f1 \\u72f2 \\u7303 \\u730e \\u7315 \\u7321 \\u732a \\u732b \\u732c \\u732e \\u736d \\u7391 \\u7399 \\u739a \\u739b \\u73ae \\u73af \\u73b0 \\u73b1 \\u73ba \\u73d0 \\u73d1 \\u73f0 \\u73f2 \\u740e \\u740f \\u7410 \\u743c \\u7476 \\u7477 \\u7478 \\u748e \\u74d2 \\u74ee \\u74ef \\u7535 \\u753b \\u7545 \\u7574 \\u7596 \\u7597 \\u759f \\u75a0 \\u75a1 \\u75ac \\u75ad \\u75ae \\u75af \\u75b1 \\u75b4 \\u75c7 \\u75c8 \\u75c9 \\u75d2 \\u75d6 \\u75e8 \\u75ea \\u75eb \\u75f4 \\u7605 \\u7606 \\u7617 \\u7618 \\u762a \\u762b \\u763e \\u763f \\u765e \\u7663 \\u766b \\u7682 \\u7691 \\u76b1 \\u76b2 \\u76cf \\u76d0 \\u76d1 \\u76d6 \\u76d7 \\u76d8 \\u770d \\u7726 \\u772c \\u7741 \\u7750 \\u7751 \\u7786 \\u7792 \\u77a9 \\u77e9 \\u77eb \\u77f6 \\u77fe \\u77ff \\u7800 \\u7801 \\u7816 \\u7817 \\u781a \\u781c \\u783a \\u783b \\u783e \\u7840 \\u7841 \\u7855 \\u7856 \\u7857 \\u7859 \\u785a \\u786e \\u7875 \\u7877 \\u788d \\u789b \\u789c \\u78b1 \\u793c \\u7943 \\u794e \\u7962 \\u796f \\u7977 \\u7978 \\u7980 \\u7984 \\u7985 \\u79bb \\u79c1 \\u79c3 \\u79c6 \\u79cb \\u79cd \\u79d8 \\u79ef \\u79f0 \\u79fd \\u79fe \\u7a06 \\u7a0e \\u7a23 \\u7a33 \\u7a51 \\u7a57 \\u7a5e \\u7a77 \\u7a83 \\u7a8d \\u7a8e \\u7a91 \\u7a9c \\u7a9d \\u7aa5 \\u7aa6 \\u7aad \\u7ad6 \\u7ade \\u7b03 \\u7b0b \\u7b14 \\u7b15 \\u7b3a \\u7b3c \\u7b3e \\u7b51 \\u7b5a \\u7b5b \\u7b5c \\u7b5d \\u7b79 \\u7b7c \\u7b7e \\u7b7f \\u7b80 \\u7b93 \\u7ba6 \\u7ba7 \\u7ba8 \\u7ba9 \\u7baa \\u7bab \\u7bd1 \\u7bd3 \\u7bee \\u7bef \\u7bf1 \\u7c16 \\u7c41 \\u7c74 \\u7c7b \\u7c7c \\u7c9c \\u7c9d \\u7ca4 \\u7caa \\u7cae \\u7cbd \\u7cc1 \\u7cc7 \\u7ccd \\u7cfb \\u7d27 \\u7d77 \\u7dfc \\u7e06 \\u7e9f \\u7ea0 \\u7ea1 \\u7ea2 \\u7ea3 \\u7ea4 \\u7ea5 \\u7ea6 \\u7ea7 \\u7ea8 \\u7ea9 \\u7eaa \\u7eab \\u7eac \\u7ead \\u7eae \\u7eaf \\u7eb0 \\u7eb1 \\u7eb2 \\u7eb3 \\u7eb4 \\u7eb5 \\u7eb6 \\u7eb7 \\u7eb8 \\u7eb9 \\u7eba \\u7ebb \\u7ebc \\u7ebd \\u7ebe \\u7ebf \\u7ec0 \\u7ec1 \\u7ec2 \\u7ec3 \\u7ec4 \\u7ec5 \\u7ec6 \\u7ec7 \\u7ec8 \\u7ec9 \\u7eca \\u7ecb \\u7ecc \\u7ecd \\u7ece \\u7ecf \\u7ed0 \\u7ed1 \\u7ed2 \\u7ed3 \\u7ed4 \\u7ed5 \\u7ed6 \\u7ed7 \\u7ed8 \\u7ed9 \\u7eda \\u7edb \\u7edc \\u7edd \\u7ede \\u7edf \\u7ee0 \\u7ee1 \\u7ee2 \\u7ee3 \\u7ee4 \\u7ee5 \\u7ee6 \\u7ee7 \\u7ee8 \\u7ee9 \\u7eea \\u7eeb \\u7eec \\u7eed \\u7eee \\u7eef \\u7ef0 \\u7ef1 \\u7ef2 \\u7ef3 \\u7ef4 \\u7ef5 \\u7ef6 \\u7ef7 \\u7ef8 \\u7ef9 \\u7efa \\u7efb \\u7efc \\u7efd \\u7efe \\u7eff \\u7f00 \\u7f01 \\u7f02 \\u7f03 \\u7f04 \\u7f05 \\u7f06 \\u7f07 \\u7f08 \\u7f09 \\u7f0a \\u7f0b \\u7f0c \\u7f0d \\u7f0e \\u7f0f \\u7f10 \\u7f11 \\u7f12 \\u7f13 \\u7f14 \\u7f15 \\u7f16 \\u7f17 \\u7f18 \\u7f19 \\u7f1a \\u7f1b \\u7f1c \\u7f1d \\u7f1e \\u7f1f \\u7f20 \\u7f21 \\u7f22 \\u7f23 \\u7f24 \\u7f25 \\u7f26 \\u7f27 \\u7f28 \\u7f29 \\u7f2a \\u7f2b \\u7f2c \\u7f2d \\u7f2e \\u7f2f \\u7f30 \\u7f31 \\u7f32 \\u7f33 \\u7f34 \\u7f35 \\u7f42 \\u7f51 \\u7f57 \\u7f5a \\u7f62 \\u7f74 \\u7f81 \\u7f9f \\u7fa1 \\u7fa4 \\u7fd8 \\u7fd9 \\u7fda \\u8022 \\u8027 \\u8038 \\u803b \\u8042 \\u804b \\u804c \\u804d \\u8054 \\u8069 \\u806a \\u8083 \\u80a0 \\u80a4 \\u80ae \\u80b4 \\u80be \\u80bf \\u80c0 \\u80c1 \\u80c4 \\u80c6 \\u80cc \\u80dc \\u80e1 \\u80e7 \\u80e8 \\u80ea \\u80eb \\u80f6 \\u8109 \\u810d \\u810f \\u8110 \\u8111 \\u8113 \\u8114 \\u811a \\u8131 \\u8136 \\u8138 \\u814a \\u814c \\u8158 \\u816d \\u817b \\u817c \\u817d \\u817e \\u8191 \\u81bb \\u81dc \\u81f4 \\u8206 \\u820d \\u8223 \\u8230 \\u8231 \\u823b \\u8270 \\u8273 \\u827a \\u8282 \\u8288 \\u8297 \\u829c \\u82a6 \\u82b2 \\u82b8 \\u82c1 \\u82c7 \\u82c8 \\u82cb \\u82cc \\u82cd \\u82ce \\u82cf \\u82d4 \\u82d8 \\u82e7 \\u82f9 \\u8303 \\u830e \\u830f \\u8311 \\u8314 \\u8315 \\u8327 \\u8346 \\u8350 \\u8359 \\u835a \\u835b \\u835c \\u835d \\u835e \\u835f \\u8360 \\u8361 \\u8363 \\u8364 \\u8365 \\u8366 \\u8367 \\u8368 \\u8369 \\u836a \\u836b \\u836c \\u836d \\u836e \\u836f \\u8385 \\u83b1 \\u83b2 \\u83b3 \\u83b4 \\u83b6 \\u83b7 \\u83b8 \\u83b9 \\u83ba \\u83bc \\u841a \\u841d \\u8424 \\u8425 \\u8426 \\u8427 \\u8428 \\u8471 \\u8480 \\u8487 \\u8489 \\u848b \\u848c \\u848f \\u8499 \\u84dd \\u84df \\u84e0 \\u84e3 \\u84e5 \\u84e6 \\u8502 \\u8511 \\u8537 \\u8539 \\u853a \\u853c \\u8570 \\u8572 \\u8574 \\u85ae \\u85d3 \\u85f4 \\u8616 \\u864f \\u8651 \\u865a \\u866b \\u866c \\u866e \\u8671 \\u867d \\u867e \\u867f \\u8680 \\u8681 \\u8682 \\u8683 \\u8695 \\u869d \\u86ac \\u86ca \\u86ce \\u86cf \\u86ee \\u86f0 \\u86f1 \\u86f2 \\u86f3 \\u86f4 \\u8715 \\u8717 \\u8721 \\u8747 \\u8748 \\u8749 \\u874e \\u877c \\u877e \\u8780 \\u87a8 \\u87cf \\u8845 \\u8854 \\u8865 \\u8868 \\u886c \\u886e \\u8884 \\u8885 \\u8886 \\u889c \\u88ad \\u88af \\u88c5 \\u88c6 \\u88c8 \\u88e2 \\u88e3 \\u88e4 \\u88e5 \\u891b \\u8934 \\u8955 \\u89c1 \\u89c2 \\u89c3 \\u89c4 \\u89c5 \\u89c6 \\u89c7 \\u89c8 \\u89c9 \\u89ca \\u89cb \\u89cc \\u89cd \\u89ce \\u89cf \\u89d0 \\u89d1 \\u89de \\u89e6 \\u89ef \\u8a1a \\u8a5f \\u8a89 \\u8a8a \\u8ba0 \\u8ba1 \\u8ba2 \\u8ba3 \\u8ba4 \\u8ba5 \\u8ba6 \\u8ba7 \\u8ba8 \\u8ba9 \\u8baa \\u8bab \\u8bac \\u8bad \\u8bae \\u8baf \\u8bb0 \\u8bb1 \\u8bb2 \\u8bb3 \\u8bb4 \\u8bb5 \\u8bb6 \\u8bb7 \\u8bb8 \\u8bb9 \\u8bba \\u8bbb \\u8bbc \\u8bbd \\u8bbe \\u8bbf \\u8bc0 \\u8bc1 \\u8bc2 \\u8bc3 \\u8bc4 \\u8bc5 \\u8bc6 \\u8bc7 \\u8bc8 \\u8bc9 \\u8bca \\u8bcb \\u8bcc \\u8bcd \\u8bce \\u8bcf \\u8bd0 \\u8bd1 \\u8bd2 \\u8bd3 \\u8bd4 \\u8bd5 \\u8bd6 \\u8bd7 \\u8bd8 \\u8bd9 \\u8bda \\u8bdb \\u8bdc \\u8bdd \\u8bde \\u8bdf \\u8be0 \\u8be1 \\u8be2 \\u8be3 \\u8be4 \\u8be5 \\u8be6 \\u8be7 \\u8be8 \\u8be9 \\u8bea \\u8beb \\u8bec \\u8bed \\u8bee \\u8bef \\u8bf0 \\u8bf1 \\u8bf2 \\u8bf3 \\u8bf4 \\u8bf5 \\u8bf6 \\u8bf7 \\u8bf8 \\u8bf9 \\u8bfa \\u8bfb \\u8bfc \\u8bfd \\u8bfe \\u8bff \\u8c00 \\u8c01 \\u8c02 \\u8c03 \\u8c04 \\u8c05 \\u8c06 \\u8c07 \\u8c08 \\u8c09 \\u8c0a \\u8c0b \\u8c0c \\u8c0d \\u8c0e \\u8c0f \\u8c10 \\u8c11 \\u8c12 \\u8c13 \\u8c14 \\u8c15 \\u8c16 \\u8c17 \\u8c18 \\u8c19 \\u8c1a \\u8c1b \\u8c1c \\u8c1d \\u8c1e \\u8c1f \\u8c20 \\u8c21 \\u8c22 \\u8c23 \\u8c24 \\u8c25 \\u8c26 \\u8c27 \\u8c28 \\u8c29 \\u8c2a \\u8c2b \\u8c2c \\u8c2d \\u8c2e \\u8c2f \\u8c30 \\u8c31 \\u8c32 \\u8c33 \\u8c34 \\u8c35 \\u8c36 \\u8c37 \\u8c6e \\u8d1d \\u8d1e \\u8d1f \\u8d20 \\u8d21 \\u8d22 \\u8d23 \\u8d24 \\u8d25 \\u8d26 \\u8d27 \\u8d28 \\u8d29 \\u8d2a \\u8d2b \\u8d2c \\u8d2d \\u8d2e \\u8d2f \\u8d30 \\u8d31 \\u8d32 \\u8d33 \\u8d34 \\u8d35 \\u8d36 \\u8d37 \\u8d38 \\u8d39 \\u8d3a \\u8d3b \\u8d3c \\u8d3d \\u8d3e \\u8d3f \\u8d40 \\u8d41 \\u8d42 \\u8d43 \\u8d44 \\u8d45 \\u8d46 \\u8d47 \\u8d48 \\u8d49 \\u8d4a \\u8d4b \\u8d4c \\u8d4d \\u8d4e \\u8d4f \\u8d50 \\u8d51 \\u8d52 \\u8d53 \\u8d54 \\u8d55 \\u8d56 \\u8d57 \\u8d58 \\u8d59 \\u8d5a \\u8d5b \\u8d5c \\u8d5d \\u8d5e \\u8d5f \\u8d60 \\u8d61 \\u8d62 \\u8d63 \\u8d6a \\u8d75 \\u8d76 \\u8d8b \\u8db1 \\u8db8 \\u8dc3 \\u8dc4 \\u8dde \\u8df5 \\u8df6 \\u8df7 \\u8df8 \\u8df9 \\u8dfb \\u8e0c \\u8e2a \\u8e2c \\u8e2f \\u8e51 \\u8e52 \\u8e70 \\u8e7f \\u8e8f \\u8e9c \\u8eaf \\u8f3c \\u8f66 \\u8f67 \\u8f68 \\u8f69 \\u8f6a \\u8f6b \\u8f6c \\u8f6d \\u8f6e \\u8f6f \\u8f70 \\u8f71 \\u8f72 \\u8f73 \\u8f74 \\u8f75 \\u8f76 \\u8f77 \\u8f78 \\u8f79 \\u8f7a \\u8f7b \\u8f7c \\u8f7d \\u8f7e \\u8f7f \\u8f80 \\u8f81 \\u8f82 \\u8f83 \\u8f84 \\u8f85 \\u8f86 \\u8f87 \\u8f88 \\u8f89 \\u8f8a \\u8f8b \\u8f8c \\u8f8d \\u8f8e \\u8f8f \\u8f90 \\u8f91 \\u8f92 \\u8f93 \\u8f94 \\u8f95 \\u8f96 \\u8f97 \\u8f98 \\u8f99 \\u8f9a \\u8f9e \\u8f9f \\u8fa9 \\u8fab \\u8fb9 \\u8fbd \\u8fbe \\u8fc1 \\u8fc7 \\u8fc8 \\u8fd0 \\u8fd8 \\u8fd9 \\u8fdb \\u8fdc \\u8fdd \\u8fde \\u8fdf \\u8fe9 \\u8ff3 \\u8ff9 \\u9002 \\u9009 \\u900a \\u9012 \\u9026 \\u903b \\u9057 \\u9065 \\u9093 \\u909d \\u90ac \\u90ae \\u90b9 \\u90ba \\u90bb \\u90c1 \\u90cf \\u90d0 \\u90d1 \\u90d3 \\u90e6 \\u90e7 \\u90f8 \\u9142 \\u915d \\u9166 \\u9171 \\u9178 \\u917d \\u917e \\u917f \\u9196 \\u91c7 \\u91ca \\u91cc \\u9274 \\u92ae \\u933e \\u9485 \\u9486 \\u9487 \\u9488 \\u9489 \\u948a \\u948b \\u948c \\u948d \\u948e \\u948f \\u9490 \\u9491 \\u9492 \\u9493 \\u9494 \\u9495 \\u9496 \\u9497 \\u9498 \\u9499 \\u949a \\u949b \\u949c \\u949d \\u949e \\u949f \\u94a0 \\u94a1 \\u94a2 \\u94a3 \\u94a4 \\u94a5 \\u94a6 \\u94a7 \\u94a8 \\u94a9 \\u94aa \\u94ab \\u94ac \\u94ad \\u94ae \\u94af \\u94b0 \\u94b1 \\u94b2 \\u94b3 \\u94b4 \\u94b5 \\u94b6 \\u94b7 \\u94b8 \\u94b9 \\u94ba \\u94bb \\u94bc \\u94bd \\u94be \\u94bf \\u94c0 \\u94c1 \\u94c2 \\u94c3 \\u94c4 \\u94c5 \\u94c6 \\u94c7 \\u94c8 \\u94c9 \\u94ca \\u94cb \\u94cc \\u94cd \\u94ce \\u94cf \\u94d0 \\u94d1 \\u94d2 \\u94d3 \\u94d4 \\u94d5 \\u94d6 \\u94d7 \\u94d8 \\u94d9 \\u94da \\u94db \\u94dc \\u94dd \\u94de \\u94df \\u94e0 \\u94e1 \\u94e2 \\u94e3 \\u94e4 \\u94e5 \\u94e6 \\u94e7 \\u94e8 \\u94e9 \\u94ea \\u94eb \\u94ec \\u94ed \\u94ee \\u94ef \\u94f0 \\u94f1 \\u94f2 \\u94f3 \\u94f4 \\u94f5 \\u94f6 \\u94f7 \\u94f8 \\u94f9 \\u94fa \\u94fb \\u94fc \\u94fd \\u94fe \\u94ff \\u9500 \\u9501 \\u9502 \\u9503 \\u9504 \\u9505 \\u9506 \\u9507 \\u9508 \\u9509 \\u950a \\u950b \\u950c \\u950d \\u950e \\u950f \\u9510 \\u9511 \\u9512 \\u9513 \\u9514 \\u9515 \\u9516 \\u9517 \\u9518 \\u9519 \\u951a \\u951b \\u951c \\u951d \\u951e \\u951f \\u9520 \\u9521 \\u9522 \\u9523 \\u9524 \\u9525 \\u9526 \\u9527 \\u9528 \\u9529 \\u952a \\u952b \\u952c \\u952d \\u952e \\u952f \\u9530 \\u9531 \\u9532 \\u9533 \\u9534 \\u9535 \\u9536 \\u9537 \\u9538 \\u9539 \\u953a \\u953b \\u953c \\u953d \\u953e \\u953f \\u9540 \\u9541 \\u9542 \\u9543 \\u9544 \\u9545 \\u9546 \\u9547 \\u9548 \\u9549 \\u954a \\u954b \\u954c \\u954d \\u954e \\u954f \\u9550 \\u9551 \\u9552 \\u9553 \\u9554 \\u9555 \\u9556 \\u9557 \\u9558 \\u9559 \\u955a \\u955b \\u955c \\u955d \\u955e \\u955f \\u9560 \\u9561 \\u9562 \\u9563 \\u9564 \\u9565 \\u9566 \\u9567 \\u9568 \\u9569 \\u956a \\u956b \\u956c \\u956d \\u956e \\u956f \\u9570 \\u9571 \\u9572 \\u9573 \\u9574 \\u9575 \\u9576 \\u957f \\u95e8 \\u95e9 \\u95ea \\u95eb \\u95ec \\u95ed \\u95ee \\u95ef \\u95f0 \\u95f1 \\u95f2 \\u95f3 \\u95f4 \\u95f5 \\u95f6 \\u95f7 \\u95f8 \\u95f9 \\u95fa \\u95fb \\u95fc \\u95fd \\u95fe \\u95ff \\u9600 \\u9601 \\u9602 \\u9603 \\u9604 \\u9605 \\u9606 \\u9607 \\u9608 \\u9609 \\u960a \\u960b \\u960c \\u960d \\u960e \\u960f \\u9610 \\u9611 \\u9612 \\u9613 \\u9614 \\u9615 \\u9616 \\u9617 \\u9618 \\u9619 \\u961a \\u961b \\u961f \\u9633 \\u9634 \\u9635 \\u9636 \\u9645 \\u9646 \\u9647 \\u9648 \\u9649 \\u9655 \\u9666 \\u9667 \\u9668 \\u9669 \\u968f \\u9690 \\u96b6 \\u96bd \\u96be \\u96c7 \\u96cf \\u96d5 \\u96e0 \\u96f3 \\u96fe \\u9701 \\u9709 \\u9721 \\u972d \\u9753 \\u9754 \\u9759 \\u9762 \\u9765 \\u9791 \\u9792 \\u97af \\u97b2 \\u97e6 \\u97e7 \\u97e8 \\u97e9 \\u97ea \\u97eb \\u97ec \\u97f5 \\u9875 \\u9876 \\u9877 \\u9878 \\u9879 \\u987a \\u987b \\u987c \\u987d \\u987e \\u987f \\u9880 \\u9881 \\u9882 \\u9883 \\u9884 \\u9885 \\u9886 \\u9887 \\u9888 \\u9889 \\u988a \\u988b \\u988c \\u988d \\u988e \\u988f \\u9890 \\u9891 \\u9892 \\u9893 \\u9894 \\u9895 \\u9896 \\u9897 \\u9898 \\u9899 \\u989a \\u989b \\u989c \\u989d \\u989e \\u989f \\u98a0 \\u98a1 \\u98a2 \\u98a3 \\u98a4 \\u98a5 \\u98a6 \\u98a7 \\u98ce \\u98cf \\u98d0 \\u98d1 \\u98d2 \\u98d3 \\u98d4 \\u98d5 \\u98d6 \\u98d7 \\u98d8 \\u98d9 \\u98da \\u98de \\u98e8 \\u990d \\u9963 \\u9964 \\u9965 \\u9966 \\u9967 \\u9968 \\u9969 \\u996a \\u996b \\u996c \\u996d \\u996e \\u996f \\u9970 \\u9971 \\u9972 \\u9973 \\u9974 \\u9975 \\u9976 \\u9977 \\u9978 \\u9979 \\u997a \\u997b \\u997c \\u997d \\u997e \\u997f \\u9980 \\u9981 \\u9982 \\u9983 \\u9984 \\u9985 \\u9986 \\u9987 \\u9988 \\u9989 \\u998a \\u998b \\u998c \\u998d \\u998e \\u998f \\u9990 \\u9991 \\u9992 \\u9993 \\u9994 \\u9995 \\u9a6c \\u9a6d \\u9a6e \\u9a6f \\u9a70 \\u9a71 \\u9a72 \\u9a73 \\u9a74 \\u9a75 \\u9a76 \\u9a77 \\u9a78 \\u9a79 \\u9a7a \\u9a7b \\u9a7c \\u9a7d \\u9a7e \\u9a7f \\u9a80 \\u9a81 \\u9a82 \\u9a83 \\u9a84 \\u9a85 \\u9a86 \\u9a87 \\u9a88 \\u9a89 \\u9a8a \\u9a8b \\u9a8c \\u9a8d \\u9a8e \\u9a8f \\u9a90 \\u9a91 \\u9a92 \\u9a93 \\u9a94 \\u9a95 \\u9a96 \\u9a97 \\u9a98 \\u9a99 \\u9a9a \\u9a9b \\u9a9c \\u9a9d \\u9a9e \\u9a9f \\u9aa0 \\u9aa1 \\u9aa2 \\u9aa3 \\u9aa4 \\u9aa5 \\u9aa6 \\u9aa7 \\u9ac5 \\u9acb \\u9acc \\u9b13 \\u9b36 \\u9b47 \\u9b49 \\u9c7c \\u9c7d \\u9c7e \\u9c7f \\u9c80 \\u9c81 \\u9c82 \\u9c83 \\u9c84 \\u9c85 \\u9c86 \\u9c87 \\u9c88 \\u9c89 \\u9c8a \\u9c8b \\u9c8c \\u9c8d \\u9c8e \\u9c8f \\u9c90 \\u9c91 \\u9c92 \\u9c93 \\u9c94 \\u9c95 \\u9c96 \\u9c97 \\u9c98 \\u9c99 \\u9c9a \\u9c9b \\u9c9c \\u9c9d \\u9c9e \\u9c9f \\u9ca0 \\u9ca1 \\u9ca2 \\u9ca3 \\u9ca4 \\u9ca5 \\u9ca6 \\u9ca7 \\u9ca8 \\u9ca9 \\u9caa \\u9cab \\u9cac \\u9cad \\u9cae \\u9caf \\u9cb0 \\u9cb1 \\u9cb2 \\u9cb3 \\u9cb4 \\u9cb5 \\u9cb6 \\u9cb7 \\u9cb8 \\u9cb9 \\u9cba \\u9cbb \\u9cbc \\u9cbd \\u9cbe \\u9cbf \\u9cc0 \\u9cc1 \\u9cc2 \\u9cc3 \\u9cc4 \\u9cc5 \\u9cc6 \\u9cc7 \\u9cc8 \\u9cc9 \\u9cca \\u9ccb \\u9ccc \\u9ccd \\u9cce \\u9ccf \\u9cd0 \\u9cd1 \\u9cd2 \\u9cd3 \\u9cd4 \\u9cd5 \\u9cd6 \\u9cd7 \\u9cd8 \\u9cd9 \\u9cda \\u9cdb \\u9cdc \\u9cdd \\u9cde \\u9cdf \\u9ce0 \\u9ce1 \\u9ce2 \\u9ce3 \\u9ce4 \\u9e1f \\u9e20 \\u9e21 \\u9e22 \\u9e23 \\u9e24 \\u9e25 \\u9e26 \\u9e27 \\u9e28 \\u9e29 \\u9e2a \\u9e2b \\u9e2c \\u9e2d \\u9e2e \\u9e2f \\u9e30 \\u9e31 \\u9e32 \\u9e33 \\u9e34 \\u9e35 \\u9e36 \\u9e37 \\u9e38 \\u9e39 \\u9e3a \\u9e3b \\u9e3c \\u9e3d \\u9e3e \\u9e3f \\u9e40 \\u9e41 \\u9e42 \\u9e43 \\u9e44 \\u9e45 \\u9e46 \\u9e47 \\u9e48 \\u9e49 \\u9e4a \\u9e4b \\u9e4c \\u9e4d \\u9e4e \\u9e4f \\u9e50 \\u9e51 \\u9e52 \\u9e53 \\u9e54 \\u9e55 \\u9e56 \\u9e57 \\u9e58 \\u9e59 \\u9e5a \\u9e5b \\u9e5c \\u9e5d \\u9e5e \\u9e5f \\u9e60 \\u9e61 \\u9e62 \\u9e63 \\u9e64 \\u9e65 \\u9e66 \\u9e67 \\u9e68 \\u9e69 \\u9e6a \\u9e6b \\u9e6c \\u9e6d \\u9e6e \\u9e6f \\u9e70 \\u9e71 \\u9e72 \\u9e73 \\u9e74 \\u9e7e \\u9ea6 \\u9eb8 \\u9eb9 \\u9eba \\u9ebd \\u9ec4 \\u9ec9 \\u9ee1 \\u9ee9 \\u9eea \\u9efe \\u9f0b \\u9f0c \\u9f0d \\u9f17 \\u9f39 \\u9f44 \\u9f50 \\u9f51 \\u9f7f \\u9f80 \\u9f81 \\u9f82 \\u9f83 \\u9f84 \\u9f85 \\u9f86 \\u9f87 \\u9f88 \\u9f89 \\u9f8a \\u9f8b \\u9f8c \\u9f99 \\u9f9a \\u9f9b \\u9f9f \\u9fce \\u9fcf \\u9fd2 \\u9fd4 \\ud840\\udc3e \\ud840\\uddb2 \\ud840\\uddbf \\ud840\\uddf9 \\ud840\\ude42 \\ud840\\ude57 \\ud840\\ude89 \\ud840\\udec6 \\ud841\\udeb3 \\ud841\\udec5 \\ud841\\udec6 \\ud841\\udefe \\ud842\\udc60 \\ud842\\udfb6 \\ud842\\udfdf \\ud842\\udfe0 \\ud843\\udc31 \\ud843\\udc37 \\ud843\\udc5e \\ud843\\udca5 \\ud843\\udd1b \\ud843\\udd22 \\ud843\\udd78 \\ud843\\udd7e \\ud844\\udec0 \\ud844\\uded7 \\ud844\\udee4 \\ud844\\udf63 \\ud845\\udc84 \\ud845\\udf60 \\ud845\\udf8b \\ud845\\udfb1 \\ud846\\udc1f \\ud846\\udd67 \\ud846\\udf5c \\ud846\\udf6c \\ud847\\udcc3 \\ud847\\udcd2 \\ud847\\uddb4 \\ud847\\ude03 \\ud847\\ude83 \\ud847\\ude84 \\ud848\\udec8 \\ud849\\uddd3 \\ud849\\ude19 \\ud849\\ude1d \\ud849\\ude1e \\ud849\\ude4f \\ud849\\ude50 \\ud849\\ude51 \\ud849\\ude52 \\ud849\\ude53 \\ud849\\udeef \\ud84a\\udc01 \\ud84a\\udc90 \\ud84a\\uddd0 \\ud84a\\udeca \\ud84a\\udede \\ud84a\\udeec \\ud84a\\udf0d \\ud84a\\udf26 \\ud84a\\udf4f \\ud84b\\udf7e \\ud84c\\udcc1 \\ud84c\\udd90 \\ud84c\\ude23 \\ud84c\\udf68 \\ud84c\\udf6f \\ud84c\\udf70 \\ud84c\\udf91 \\ud84c\\udfe2 \\ud84d\\udc15 \\ud84d\\udc24 \\ud84d\\udc76 \\ud84d\\udc8c \\ud84d\\udcff \\ud84d\\udd0c \\ud84d\\uddca \\ud84d\\uddcb \\ud84d\\uddd9 \\ud84d\\ude10 \\ud84d\\ude13 \\ud84d\\ude34 \\ud84d\\ude37 \\ud84d\\ude9a \\ud84d\\udf8e \\ud84e\\ude3c \\ud84e\\udf64 \\ud84e\\udfe3 \\ud84f\\udc5d \\ud84f\\udc97 \\ud84f\\udc98 \\ud84f\\udcc6 \\ud84f\\udda9 \\ud84f\\uddab \\ud84f\\uddad \\ud84f\\uddf7 \\ud84f\\ude23 \\ud84f\\udebc \\ud84f\\udebd \\ud84f\\udf77 \\ud850\\udda1 \\ud850\\udda2 \\ud850\\uddc3 \\ud850\\uddc4 \\ud850\\udded \\ud850\\uddf9 \\ud850\\ude36 \\ud850\\ude37 \\ud850\\ude80 \\ud850\\udeb0 \\ud850\\udecf \\ud850\\udfba \\ud850\\udfbb \\ud851\\ude6f \\ud851\\udf62 \\ud851\\udf83 \\ud851\\udfa4 \\ud852\\udc0b \\ud852\\udd80 \\ud852\\ude7d \\ud853\\udcc4 \\ud853\\udd8a \\ud853\\udda7 \\ud853\\udeca \\ud853\\udf6f \\ud853\\udf80 \\ud853\\udff2 \\ud854\\udc62 \\ud854\\udd58 \\ud854\\udd74 \\ud854\\udd7f \\ud854\\udda7 \\ud854\\udde2 \\ud854\\udf9d \\ud855\\udc1f \\ud855\\udc2f \\ud855\\udc30 \\ud855\\udc3b \\ud855\\udfa6 \\ud856\\uddc2 \\ud856\\ude5f \\ud856\\ude7a \\ud856\\udee3 \\ud856\\udf00 \\ud856\\udf1e \\ud856\\udf20 \\ud856\\udf49 \\ud856\\udf8b \\ud856\\udf9c \\ud856\\udfbe \\ud857\\udc54 \\ud857\\ude65 \\ud857\\ude85 \\ud857\\ude87 \\ud858\\ude08 \\ud858\\ude09 \\ud858\\ude0b \\ud858\\ude0c \\ud858\\ude0e \\ud858\\ude0f \\ud858\\ude10 \\ud858\\ude11 \\ud858\\ude12 \\ud858\\ude13 \\ud858\\ude14 \\ud858\\ude15 \\ud858\\ude16 \\ud858\\ude17 \\ud858\\ude18 \\ud858\\ude19 \\ud858\\ude1a \\ud858\\ude1b \\ud858\\ude1c \\ud858\\ude1d \\ud858\\ude1e \\ud858\\ude1f \\ud858\\ude20 \\ud858\\ude21 \\ud858\\udf60 \\ud859\\udee8 \\ud859\\udf7c \\ud859\\udfd7 \\ud85a\\ude29 \\ud85b\\udc0f \\ud85b\\udc34 \\ud85b\\udd9f \\ud85b\\uddbb \\ud85b\\uded5 \\ud85b\\udf16 \\ud85c\\ude50 \\ud85c\\ude5e \\ud85c\\udf25 \\ud85c\\udfd6 \\ud85c\\udfd7 \\ud85d\\udc4f \\ud85d\\udcad \\ud85d\\udf2d \\ud85d\\udf5d \\ud85d\\udf67 \\ud85e\\udfaa \\ud85f\\udcd5 \\ud85f\\ude51 \\ud85f\\ude52 \\ud85f\\ude53 \\ud85f\\ude54 \\ud85f\\ude55 \\ud85f\\ude56 \\ud85f\\ude57 \\ud85f\\udfc8 \\ud860\\udc01 \\ud860\\udc31 \\ud860\\udc74 \\ud860\\udcba \\ud860\\udd04 \\ud860\\udd5b \\ud860\\udd6b \\ud860\\udd6c \\ud860\\ude57 \\ud861\\udc05 \\ud861\\udc06 \\ud861\\udc07 \\ud861\\udc08 \\ud861\\udc09 \\ud861\\udc0a \\ud861\\udc79 \\ud861\\udff3 \\ud862\\udc28 \\ud862\\udc59 \\ud862\\udc7a \\ud862\\udd30 \\ud863\\udc3e \\ud863\\udc3f \\ud863\\udc40 \\ud863\\udc41 \\ud863\\udc42 \\ud863\\udc43 \\ud863\\udc44 \\ud863\\udc45 \\ud863\\udc46 \\ud863\\udc47 \\ud863\\udc48 \\ud863\\udc49 \\ud863\\udc4a \\ud863\\udc4b \\ud863\\udc4c \\ud863\\udc4d \\ud863\\udc4e \\ud863\\udc4f \\ud863\\udc50 \\ud863\\udc51 \\ud863\\udc52 \\ud863\\udc53 \\ud863\\udc54 \\ud863\\udc55 \\ud863\\udc56 \\ud863\\uddff \\ud863\\ude00 \\ud863\\ude01 \\ud863\\ude02 \\ud863\\ude03 \\ud863\\ude04 \\ud863\\ude05 \\ud863\\ude06 \\ud863\\ude07 \\ud863\\ude09 \\ud863\\ude0a \\ud863\\ude0b \\ud863\\ude0c \\ud863\\ude0e \\ud863\\ude18 \\ud863\\ude1f \\ud864\\udffc \\ud864\\udffd \\ud864\\udffe \\ud864\\udfff \\ud865\\udc00 \\ud865\\udccb \\ud865\\udd95 \\ud865\\udd96 \\ud865\\udd97 \\ud865\\ude65 \\ud865\\ude66 \\ud865\\ude67 \\ud865\\ude68 \\ud865\\ude69 \\ud865\\ude6a \\ud865\\ude6b \\ud865\\ude6c \\ud865\\ude6d \\ud865\\ude6e \\ud865\\ude6f \\ud865\\ude70 \\ud865\\udfff \\ud866\\udc00 \\ud866\\udc01 \\ud866\\udc02 \\ud866\\udc03 \\ud866\\udc05 \\ud866\\udc06 \\ud866\\udc07 \\ud866\\udc08 \\ud866\\udc09 \\ud866\\udc0a \\ud866\\udc0b \\ud866\\udc0c \\ud866\\udc0e \\ud866\\udc0f \\ud866\\udc20 \\ud866\\udc56 \\ud866\\udde6 \\ud866\\udde8 \\ud866\\udde9 \\ud866\\uddea \\ud866\\uddeb \\ud866\\uddec \\ud866\\udded \\ud866\\uddee \\ud866\\uddef \\ud866\\uddf0 \\ud866\\uddf1 \\ud866\\uddf2 \\ud866\\uddf3 \\ud866\\uddf4 \\ud866\\uddf5 \\ud866\\uddf6 \\ud866\\uddf8 \\ud866\\uddfa \\ud866\\uddfb \\ud866\\uddfc \\ud866\\uddff \\ud866\\ude00 \\ud866\\ude01 \\ud866\\ude02 \\ud866\\ude03 \\ud866\\ude04 \\ud866\\ude05 \\ud866\\ude06 \\ud866\\ude07 \\ud866\\ude08 \\ud866\\ude09 \\ud866\\ude0a \\ud866\\ude0b \\ud866\\ude0c \\ud866\\ude0d \\ud866\\ude0e \\ud866\\ude0f \\ud866\\ude10 \\ud866\\ude48 \\ud866\\udf23 \\ud866\\udf24 \\ud866\\udf79 \\ud866\\udfd2 \\ud867\\udc30 \\ud867\\udc92 \\ud867\\udd0c \\ud867\\udf79 \\ud867\\udf7a \\ud867\\udf7b \\ud867\\udf7c \\ud867\\udf7d \\ud867\\udf7e \\ud867\\udf7f \\ud867\\udf80 \\ud867\\udf81 \\ud867\\udf82 \\ud867\\udf83 \\ud867\\udf84 \\ud867\\udf85 \\ud867\\udf86 \\ud867\\udf87 \\ud867\\udf88 \\ud867\\udf8a \\ud867\\udf8b \\ud867\\udf8c \\ud867\\udf8e \\ud868\\ude42 \\ud868\\ude43 \\ud868\\ude44 \\ud868\\ude45 \\ud868\\ude46 \\ud868\\ude48 \\ud868\\ude49 \\ud868\\ude4a \\ud868\\ude4b \\ud868\\ude4c \\ud868\\ude4d \\ud868\\ude4e \\ud868\\ude4f \\ud868\\ude50 \\ud868\\ude51 \\ud868\\ude52 \\ud868\\ude53 \\ud868\\ude54 \\ud868\\ude55 \\ud868\\udf88 \\ud868\\udf89 \\ud868\\udf8a \\ud868\\udf8b \\ud868\\udf8c \\ud868\\udf8d \\ud869\\udc45 \\ud869\\udd2d \\ud869\\ude8f \\ud869\\ude90 \\ud869\\udf0e \\ud869\\udf9d \\ud869\\udfce \\ud869\\udfdd \\ud86a\\udc00 \\ud86a\\udc1f \\ud86a\\udc21 \\ud86a\\udc33 \\ud86a\\udc35 \\ud86a\\udc38 \\ud86a\\udc3a \\ud86a\\udc3d \\ud86a\\udc40 \\ud86a\\udc43 \\ud86a\\udc4b \\ud86a\\udc4f \\ud86a\\udc5b \\ud86a\\udc5e \\ud86a\\udc7a \\ud86a\\udc8c \\ud86a\\udc90 \\ud86a\\udc92 \\ud86a\\udc95 \\ud86a\\udc96 \\ud86a\\udca0 \\ud86a\\udcae \\ud86a\\udcb8 \\ud86a\\udcc6 \\ud86a\\udcd2 \\ud86a\\udcfb \\ud86a\\udd04 \\ud86a\\udd1a \\ud86a\\udd60 \\ud86a\\udd6b \\ud86a\\udd70 \\ud86a\\udd7f \\ud86a\\uddc0 \\ud86a\\uddd8 \\ud86a\\ude0a \\ud86a\\ude17 \\ud86a\\ude27 \\ud86a\\ude29 \\ud86a\\ude36 \\ud86a\\ude37 \\ud86a\\ude39 \\ud86a\\ude47 \\ud86a\\ude4e \\ud86a\\ude58 \\ud86a\\ude5b \\ud86a\\ude77 \\ud86a\\ude78 \\ud86a\\ude8f \\ud86a\\ude91 \\ud86a\\ude9e \\ud86a\\udeb4 \\ud86a\\udebc \\ud86a\\udecc \\ud86a\\udee1 \\ud86a\\udef7 \\ud86a\\udefa \\ud86a\\udf1a \\ud86a\\udf2f \\ud86a\\udf5d \\ud86a\\udf62 \\ud86a\\udf67 \\ud86a\\udf6f \\ud86a\\udf75 \\ud86a\\udf7e \\ud86a\\udf83 \\ud86a\\udf8b \\ud86a\\udf96 \\ud86a\\udfb3 \\ud86a\\udfb6 \\ud86a\\udfcb \\ud86b\\udc36 \\ud86b\\udc65 \\ud86b\\udc77 \\ud86b\\udc8e \\ud86b\\udc94 \\ud86b\\udc9b \\ud86b\\udcae \\ud86b\\udccd \\ud86b\\udcd7 \\ud86b\\udd19 \\ud86b\\udd51 \\ud86b\\udd63 \\ud86b\\udd71 \\ud86b\\udd84 \\ud86b\\udd92 \\ud86b\\uddae \\ud86b\\uddcd \\ud86b\\uddfd \\ud86b\\ude15 \\ud86b\\ude29 \\ud86b\\ude40 \\ud86b\\ude60 \\ud86b\\ude73 \\ud86b\\ude79 \\ud86b\\udea3 \\ud86b\\udeaa \\ud86b\\udead \\ud86b\\udeb7 \\ud86b\\udeb8 \\ud86b\\udebb \\ud86b\\udebd \\ud86b\\uded0 \\ud86b\\udee8 \\ud86b\\udef2 \\ud86b\\udefa \\ud86b\\udf0b \\ud86b\\udf34 \\ud86b\\udf48 \\ud86b\\udf5d \\ud86b\\udf6a \\ud86b\\udf6d \\ud86b\\udf6e \\ud86b\\udf74 \\ud86b\\udf77 \\ud86b\\udf94 \\ud86b\\udfa2 \\ud86b\\udfa3 \\ud86b\\udfa6 \\ud86b\\udfb8 \\ud86b\\udfca \\ud86b\\udfde \\ud86b\\udfeb \\ud86b\\udff5 \\ud86c\\udc0c \\ud86c\\udc13 \\ud86c\\udc28 \\ud86c\\udc2c \\ud86c\\udc2e \\ud86c\\udc42 \\ud86c\\udc5f \\ud86c\\udc61 \\ud86c\\udc71 \\ud86c\\udc72 \\ud86c\\udc73 \\ud86c\\udc77 \\ud86c\\udc7a \\ud86c\\udc83 \\ud86c\\udc86 \\ud86c\\udc88 \\ud86c\\udc96 \\ud86c\\udcbf \\ud86c\\udcd7 \\ud86c\\udd19 \\ud86c\\udd1a \\ud86c\\udd1b \\ud86c\\udd1c \\ud86c\\udd1d \\ud86c\\udd1e \\ud86c\\udd1f \\ud86c\\udd20 \\ud86c\\udd21 \\ud86c\\udd22 \\ud86c\\udd23 \\ud86c\\udd24 \\ud86c\\udd25 \\ud86c\\udd26 \\ud86c\\udd27 \\ud86c\\udd28 \\ud86c\\udd29 \\ud86c\\udd2a \\ud86c\\udd2b \\ud86c\\udd2c \\ud86c\\udd2d \\ud86c\\udd2e \\ud86c\\udd2f \\ud86c\\udd30 \\ud86c\\udd31 \\ud86c\\udd32 \\ud86c\\udd33 \\ud86c\\udd34 \\ud86c\\udd35 \\ud86c\\udd36 \\ud86c\\udd37 \\ud86c\\udd38 \\ud86c\\udd39 \\ud86c\\udd45 \\ud86c\\udd57 \\ud86c\\udd65 \\ud86c\\udd6d \\ud86c\\udd7c \\ud86c\\udd8f \\ud86c\\udd9d \\ud86c\\uddab \\ud86c\\uddd8 \\ud86c\\udddb \\ud86c\\uddea \\ud86c\\udded \\ud86c\\uddf4 \\ud86c\\uddfd \\ud86c\\ude09 \\ud86c\\ude0e \\ud86c\\ude1f \\ud86c\\ude35 \\ud86c\\ude41 \\ud86c\\ude44 \\ud86c\\udeaa \\ud86c\\udeae \\ud86c\\udeb8 \\ud86c\\udeb9 \\ud86c\\udebb \\ud86c\\udec7 \\ud86c\\udecc \\ud86c\\udef2 \\ud86c\\udef7 \\ud86c\\udef9 \\ud86c\\udefb \\ud86c\\udf00 \\ud86c\\udf07 \\ud86c\\udf0b \\ud86c\\udf28 \\ud86c\\udf2a \\ud86c\\udf2b \\ud86c\\udf2c \\ud86c\\udf2d \\ud86c\\udf2f \\ud86c\\udf50 \\ud86c\\udf59 \\ud86c\\udf5a \\ud86c\\udf5b \\ud86c\\udf5c \\ud86c\\udf5d \\ud86c\\udf5e \\ud86c\\udf5f \\ud86c\\udf60 \\ud86c\\udf61 \\ud86c\\udf62 \\ud86c\\udf63 \\ud86c\\udf64 \\ud86c\\udf65 \\ud86c\\udf66 \\ud86c\\udf67 \\ud86c\\udf68 \\ud86c\\udf69 \\ud86c\\udf6a \\ud86c\\udf6b \\ud86c\\udf6c \\ud86c\\udf6d \\ud86c\\udf6e \\ud86c\\udf6f \\ud86c\\udf70 \\ud86c\\udf71 \\ud86c\\udf72 \\ud86c\\udf73 \\ud86c\\udf74 \\ud86c\\udf75 \\ud86c\\udf76 \\ud86c\\udf77 \\ud86c\\udf78 \\ud86c\\udf79 \\ud86c\\udf7a \\ud86c\\udf7b \\ud86c\\udf7c \\ud86c\\udf7d \\ud86c\\udf7e \\ud86c\\udf7f \\ud86c\\udf86 \\ud86c\\udf8c \\ud86c\\udfa6 \\ud86c\\udfa7 \\ud86c\\udfa8 \\ud86c\\udfa9 \\ud86c\\udfaa \\ud86c\\udfab \\ud86c\\udfac \\ud86c\\udfad \\ud86c\\udfb1 \\ud86c\\udfb3 \\ud86c\\udfb8 \\ud86c\\udfba \\ud86c\\udfc3 \\ud86c\\udfc6 \\ud86c\\udfcb \\ud86c\\udfcc \\ud86c\\udfd0 \\ud86c\\udfd1 \\ud86c\\udfd5 \\ud86c\\udfde \\ud86c\\udfe8 \\ud86d\\udc04 \\ud86d\\udc05 \\ud86d\\udc06 \\ud86d\\udc07 \\ud86d\\udc08 \\ud86d\\udc09 \\ud86d\\udc0a \\ud86d\\udc0b \\ud86d\\udc0c \\ud86d\\udc0d \\ud86d\\udc0e \\ud86d\\udc0f \\ud86d\\udc10 \\ud86d\\udc11 \\ud86d\\udc12 \\ud86d\\udc13 \\ud86d\\udc14 \\ud86d\\udc15 \\ud86d\\udc16 \\ud86d\\udc17 \\ud86d\\udc18 \\ud86d\\udc19 \\ud86d\\udc37 \\ud86d\\udc58 \\ud86d\\udc61 \\ud86d\\udc77 \\ud86d\\udce5 \\ud86d\\udce6 \\ud86d\\udce7 \\ud86d\\udce8 \\ud86d\\udce9 \\ud86d\\udcea \\ud86d\\udceb \\ud86d\\udcec \\ud86d\\udced \\ud86d\\udcee \\ud86d\\udcef \\ud86d\\udcf0 \\ud86d\\udcf1 \\ud86d\\udcf2 \\ud86d\\udcf3 \\ud86d\\udcf4 \\ud86d\\udcf5 \\ud86d\\udcf6 \\ud86d\\udcf7 \\ud86d\\udcf8 \\ud86d\\udcf9 \\ud86d\\udcfa \\ud86d\\udcfb \\ud86d\\udcfc \\ud86d\\udcfd \\ud86d\\udcfe \\ud86d\\udcff \\ud86d\\udd00 \\ud86d\\udd01 \\ud86d\\udd02 \\ud86d\\udd03 \\ud86d\\udd04 \\ud86d\\udd05 \\ud86d\\udd06 \\ud86d\\udd07 \\ud86d\\udd08 \\ud86d\\udd09 \\ud86d\\udd0a \\ud86d\\udd0b \\ud86d\\udd0c \\ud86d\\udd0d \\ud86d\\udd0e \\ud86d\\udd0f \\ud86d\\udd10 \\ud86d\\udd11 \\ud86d\\udd12 \\ud86d\\udd13 \\ud86d\\udd14 \\ud86d\\udd15 \\ud86d\\udd16 \\ud86d\\udd2d \\ud86d\\udd2e \\ud86d\\udd2f \\ud86d\\udd30 \\ud86d\\udd32 \\ud86d\\udd34 \\ud86d\\udd35 \\ud86d\\udd36 \\ud86d\\udd3d \\ud86d\\udd5a \\ud86d\\udd65 \\ud86d\\udd68 \\ud86d\\udd83 \\ud86d\\udd85 \\ud86d\\udd87 \\ud86d\\udd91 \\ud86d\\udd92 \\ud86d\\udd93 \\ud86d\\udd94 \\ud86d\\udd95 \\ud86d\\udd96 \\ud86d\\uddaa \\ud86d\\uddab \\ud86d\\uddac \\ud86d\\uddad \\ud86d\\uddae \\ud86d\\uddaf \\ud86d\\uddb0 \\ud86d\\uddb1 \\ud86d\\uddb2 \\ud86d\\uddb3 \\ud86d\\uddb4 \\ud86d\\uddb5 \\ud86d\\uddb6 \\ud86d\\uddb7 \\ud86d\\uddb8 \\ud86d\\uddb9 \\ud86d\\uddba \\ud86d\\uddc7 \\ud86d\\uddc8 \\ud86d\\uddc9 \\ud86d\\uddca \\ud86d\\uddcb \\ud86d\\uddda \\ud86d\\uddde \\ud86d\\udddf \\ud86d\\udde0 \\ud86d\\udde1 \\ud86d\\udde2 \\ud86d\\udde3 \\ud86d\\udde4 \\ud86d\\udde5 \\ud86d\\udde6 \\ud86d\\udde7 \\ud86d\\udde8 \\ud86d\\udde9 \\ud86d\\uddea \\ud86d\\uddeb \\ud86d\\uddec \\ud86d\\udded \\ud86d\\uddee \\ud86d\\uddef \\ud86d\\uddf0 \\ud86d\\uddf1 \\ud86d\\uddf3 \\ud86d\\uddf4 \\ud86d\\uddf5 \\ud86d\\ude1b \\ud86d\\ude1c \\ud86d\\ude1d \\ud86d\\ude1e \\ud86d\\ude1f \\ud86d\\ude20 \\ud86d\\ude21 \\ud86d\\ude23 \\ud86d\\ude24 \\ud86d\\ude25 \\ud86d\\ude26 \\ud86d\\ude27 \\ud86d\\ude28 \\ud86d\\ude29 \\ud86d\\ude2a \\ud86d\\ude2b \\ud86d\\ude2c \\ud86d\\ude2d \\ud86d\\ude2e \\ud86d\\ude2f \\ud86d\\ude30 \\ud86d\\ude31 \\ud86d\\ude3d \\ud86d\\ude42 \\ud86d\\ude88 \\ud86d\\ude89 \\ud86d\\ude8a \\ud86d\\ude8b \\ud86d\\ude8c \\ud86d\\ude8d \\ud86d\\ude8e \\ud86d\\ude8f \\ud86d\\ude90 \\ud86d\\ude91 \\ud86d\\ude92 \\ud86d\\ude93 \\ud86d\\ude94 \\ud86d\\ude95 \\ud86d\\ude96 \\ud86d\\ude97 \\ud86d\\ude98 \\ud86d\\ude99 \\ud86d\\ude9a \\ud86d\\ude9b \\ud86d\\ude9c \\ud86d\\ude9d \\ud86d\\ude9e \\ud86d\\ude9f \\ud86d\\udea0 \\ud86d\\udea1 \\ud86d\\udea2 \\ud86d\\udea3 \\ud86d\\udea4 \\ud86d\\udea5 \\ud86d\\udea6 \\ud86d\\udea7 \\ud86d\\udea8 \\ud86d\\udea9 \\ud86d\\udeaa \\ud86d\\udeab \\ud86d\\udeac \\ud86d\\udead \\ud86d\\udeda \\ud86d\\udedb \\ud86d\\udedc \\ud86d\\udedd \\ud86d\\udede \\ud86d\\udedf \\ud86d\\udee0 \\ud86d\\udee1 \\ud86d\\udee2 \\ud86d\\udee3 \\ud86d\\udee4 \\ud86d\\udee5 \\ud86d\\udee6 \\ud86d\\udee7 \\ud86d\\udee8 \\ud86d\\udee9 \\ud86d\\udeea \\ud86d\\udeeb \\ud86d\\udeec \\ud86d\\udeed \\ud86d\\udeee \\ud86d\\udeef \\ud86d\\udef0 \\ud86d\\udef1 \\ud86d\\udef2 \\ud86d\\udef3 \\ud86d\\udef4 \\ud86d\\udef5 \\ud86d\\udef6 \\ud86d\\udef7 \\ud86d\\udef8 \\ud86d\\udef9 \\ud86d\\udefa \\ud86d\\udefb \\ud86d\\udefc \\ud86d\\udefd \\ud86d\\udefe \\ud86d\\udf00 \\ud86d\\udf01 \\ud86d\\udf02 \\ud86d\\udf03 \\ud86d\\udf04 \\ud86d\\udf05 \\ud86d\\udf0a \\ud86d\\udf11 \\ud86d\\udf12 \\ud86d\\udf13 \\ud86d\\udf14 \\ud86d\\udf15 \\ud86d\\udf19 \\ud86d\\udf1f \\ud86d\\udf28 \\ud86d\\udf29 \\ud86d\\udf2a \\ud86d\\udf2b \\ud86d\\udf2c \\ud86d\\udf2d \\ud86d\\udf2e \\ud86d\\udf2f \\ud86d\\udf30 \\ud86d\\udf32 \\ud86d\\udf33 \\ud86d\\udf48 \\ud86d\\udf4b \\ud86d\\udf66 \\ud86d\\udf67 \\ud86d\\udf68 \\ud86d\\udf69 \\ud86d\\udf6a \\ud86d\\udf6b \\ud86d\\udf6c \\ud86d\\udf6d \\ud86d\\udf6e \\ud86d\\udf75 \\ud86d\\udf85 \\ud86d\\udf97 \\ud86d\\udf9a \\ud86d\\udf9b \\ud86d\\udf9d \\ud86d\\udfa0 \\ud86d\\udfa1 \\ud86d\\udfa2 \\ud86d\\udfa3 \\ud86d\\udfa5 \\ud86d\\udfa6 \\ud86d\\udfa7 \\ud86d\\udfa8 \\ud86d\\udfa9 \\ud86d\\udfb7 \\ud86d\\udfc3 \\ud86d\\udfc4 \\ud86d\\udfc5 \\ud86d\\udfc6 \\ud86d\\udfc7 \\ud86d\\udfd1 \\ud86d\\udfd5 \\ud86d\\udfde \\ud86d\\udfdf \\ud86d\\udfe0 \\ud86d\\udfe1 \\ud86d\\udfe2 \\ud86d\\udfe4 \\ud86d\\udfe5 \\ud86d\\udfe6 \\ud86d\\udfeb \\ud86d\\udfec \\ud86d\\udff2 \\ud86d\\udff3 \\ud86d\\udff4 \\ud86d\\udff5 \\ud86d\\udff6 \\ud86d\\udff7 \\ud86d\\udff8 \\ud86d\\udff9 \\ud86d\\udffa \\ud86d\\udffb \\ud86d\\udffc \\ud86d\\udffd \\ud86d\\udffe \\ud86d\\udfff \\ud86e\\udc00 \\ud86e\\udc01 \\ud86e\\udc02 \\ud86e\\udc05 \\ud86e\\udc06 \\ud86e\\udc07 \\ud86e\\udc08 \\ud86e\\udc0a \\ud86e\\udc0b \\ud86e\\udc0c \\ud86e\\udc0f \\ud86e\\udc10 \\ud86e\\udc11 \\ud86e\\udc12 \\ud86e\\udc16 \\ud86e\\udc1c \\ud86e\\udcb8 \\ud86e\\udf83 \\ud86f\\udc1b \\ud86f\\udd87 \\ud86f\\uddf7 \\ud86f\\ude29 \\ud870\\udc29 \\ud872\\udf2d \\ud872\\udf3b \\ud872\\udf4a \\ud872\\udf5b \\ud872\\udf73 \\ud872\\udf76 \\ud873\\udd8b \\ud873\\udd8d \\ud873\\udd8f \\ud873\\udd9f \\ud873\\ude2a \\u963f\\u6597 \\u963f\\u6770 \\u963f\\u5361\\u63d0\\u91cc \\u963f\\u62c9\\u5e72\\u5c71\\u8109 \\u963f\\u62c9\\u514b \\u963f\\u91cc \\u963f\\u91cc\\u65af\\u6258\\u82ac \\u963f\\u5a18 \\u963f\\u68ee\\u677e\\u5c9b \\u963f\\u677e\\u68ee\\u5c9b \\u963f\\u6258\\u54c1 \\u963f\\u54b8 \\u963f\\u624e\\u4f26\\u5361 \\u963f\\u829d\\u7279\\u514b\\u4eba \\u963f\\u829d\\u7279\\u514b\\u8bed \\u54c0\\u540a \\u54c0\\u621a \\u54c0\\u633d \\u57c3\\u592b\\u4f2f\\u91cc \\u57c3\\u683c\\u5c14\\u677e \\u57c3\\u53ca\\u5386 \\u57c3\\u514b\\u6258 \\u57c3\\u62c9\\u6258\\u585e\\u5c3c\\u65af \\u6328\\u6253 \\u6328\\u5230 \\u6328\\u5f97 \\u6328\\u997f \\u6328\\u8fc7 \\u6328\\u9965\\u62b5\\u997f \\u6328\\u82e6 \\u6328\\u4e86 \\u6328\\u9a82 \\u6328\\u6ee1 \\u6328\\u78e8 \\u6328\\u65e5\\u5b50 \\u6328\\u4e09\\u9876\\u56db \\u6328\\u4e0a \\u6328\\u65f6\\u95f4 \\u6328\\u6574 \\u6328\\u63cd \\u77ee\\u6746\\u54c1\\u79cd \\u77ee\\u51e0 \\u827e\\u56de \\u827e\\u91cc\\u8d5b\\u5bab \\u827e\\u91cc\\u68ee \\u827e\\u745e\\u91cc \\u7231\\u5f7c\\u8868 \\u7231\\u56f0 \\u7231\\u4e3d\\u820d\\u5bab \\u7231\\u6b32 \\u788d\\u96be\\u7167\\u51c6 \\u5b89\\u7eb3\\u6258\\u5229\\u4e9a \\u5b89\\u6c88\\u94c1\\u8def \\u5eb5\\u853c \\u5eb5\\u5eb5 \\u5eb5\\u5a6a \\u5eb5\\u5e90 \\u5eb5\\u7f57\\u6811\\u56ed \\u5eb5\\u820d \\u6848\\u51e0 \\u6848\\u51c6 \\u6697\\u5403\\u4e00\\u60ca \\u6697\\u706b \\u6697\\u6263 \\u6697\\u84dd\\u53d1 \\u6697\\u52a3 \\u6697\\u4e71 \\u6697\\u4f26 \\u6697\\u6627 \\u6697\\u51a5 \\u6697\\u83ab \\u6697\\u6d45 \\u6697\\u7136 \\u6697\\u5f31 \\u6697\\u8bf5 \\u6697\\u53f9 \\u6697\\u8df3 \\u6697\\u7bb1\\u64cd\\u4f5c \\u6697\\u4e2d\\u884c\\u4e8b \\u76ce\\u76c2\\u76f8\\u7cfb \\u6556\\u8361 \\u9068\\u6e38\\u56db\\u6d77 \\u71ac\\u59dc\\u5477\\u918b \\u71ac\\u5236 \\u7ff1\\u6e38\\u56db\\u6d77 \\u9f07\\u5934\\u72ec\\u5360 \\u5965\\u91cc\\u91cc\\u4e9a \\u5965\\u91cc\\u8428 \\u5965\\u7279\\u6717\\u6258 \\u5965\\u6258 \\u516b\\u6597 \\u516b\\u8721 \\u516b\\u91cc \\u516b\\u8f9f \\u516b\\u624e \\u516b\\u53ea \\u516b\\u5468 \\u516b\\u5b57\\u80e1 \\u5df4\\u6597 \\u5df4\\u62c9\\u514b \\u5df4\\u62c9\\u677e \\u5df4\\u5398\\u5c9b \\u5df4\\u91cc \\u5df4\\u677e\\u7ba1 \\u5df4\\u6258\\u4e3d \\u5df4\\u6258\\u8389 \\u5df4\\u6e38 \\u82ad\\u6258\\u8389 \\u7b06\\u6597 \\u62d4\\u53d1 \\u62d4\\u987b \\u62d4\\u5b85\\u4e0a\\u5347 \\u628a\\u996d\\u53eb\\u9965 \\u5427\\u53f0 \\u5427\\u6258\\u5973 \\u767d\\u53d1 \\u767d\\u53d1\\u94f6\\u987b \\u767d\\u7c89\\u9762 \\u767d\\u6746\\u5175 \\u767d\\u5e72 \\u767d\\u9aa8\\u677e \\u767d\\u679c\\u677e \\u767d\\u80e1 \\u767d\\u91cc\\u5b89 \\u767d\\u9762 \\u767d\\u9762\\u65e0\\u987b \\u767d\\u76ae\\u677e \\u767d\\u5343\\u5c42 \\u767d\\u672f \\u767d\\u677e \\u767d\\u987b \\u767d\\u4e91 \\u767d\\u4e91\\u5ca9 \\u767e\\u4e0d\\u5f53\\u4e00 \\u767e\\u8c37 \\u767e\\u82b1\\u5386 \\u767e\\u91cc \\u767e\\u70bc \\u767e\\u8f9f \\u767e\\u53f6 \\u767e\\u53f6\\u5377 \\u767e\\u624e \\u767e\\u53ea \\u67cf\\u8282\\u677e\\u64cd \\u6446\\u5e03 \\u6446\\u8361 \\u6446\\u4e4c\\u9f99 \\u6446\\u949f \\u62dc\\u6597 \\u62dc\\u590d \\u62dc\\u5cb3 \\u62dc\\u5360\\u5ead \\u9881\\u5e03 \\u6591\\u5ca9 \\u677f\\u677f \\u677f\\u6817 \\u677f\\u5ca9 \\u529e\\u516c\\u53f0 \\u529e\\u4f19 \\u534a\\u5e72 \\u534a\\u4e2a\\u4e16\\u7eaa \\u534a\\u91cc \\u534a\\u6258 \\u534a\\u53ea \\u62cc\\u9762 \\u7ed1\\u624e \\u68d2\\u5b50\\u9762 \\u5305\\u5e72 \\u5305\\u8c37 \\u5305\\u4f19 \\u5305\\u624e \\u5305\\u5360 \\u8912\\u91c7\\u4e00\\u4ecb \\u8912\\u8d5e \\u8584\\u5e78 \\u5b9d\\u4e30 \\u5b9d\\u91cc\\u5b9d\\u6c14 \\u5b9d\\u5386 \\u5b9d\\u5fd7 \\u4fdd\\u9669\\u6746 \\u62b1\\u5927\\u8db3\\u6746 \\u62b1\\u6734 \\u676f\\u5e03 \\u676f\\u5e72 \\u676f\\u9762 \\u676f\\u8d5b \\u60b2\\u621a \\u60b2\\u7b51 \\u7891\\u5fd7 \\u5317\\u6597 \\u5317\\u56de \\u5317\\u91cc \\u5317\\u5f81 \\u8d1d\\u5c14\\u6258\\u5167 \\u8d1d\\u91cc \\u8d1d\\u90a3\\u82ac\\u6258 \\u8d1d\\u80c4 \\u5907\\u5c1d\\u8270\\u82e6 \\u5907\\u5fa1 \\u5907\\u6ce8 \\u80cc\\u699c \\u80cc\\u5305 \\u80cc\\u51fa \\u80cc\\u51fa\\u53bb \\u80cc\\u5e26 \\u80cc\\u8d1f \\u80cc\\u56de \\u80cc\\u9965\\u8352 \\u80cc\\u7b50 \\u80cc\\u4f86 \\u80cc\\u7bd3 \\u80cc\\u4f60 \\u80cc\\u4eba \\u80cc\\u9178 \\u80cc\\u4ed6 \\u80cc\\u5979 \\u80cc\\u6211 \\u80cc\\u7269 \\u80cc\\u5c0f\\u5b69 \\u80cc\\u503a \\u80cc\\u7740 \\u80cc\\u8d70 \\u88ab\\u53d1 \\u88ab\\u590d \\u88ab\\u4eba\\u80cc \\u88ab\\u5934\\u6563\\u53d1 \\u7119\\u5e72 \\u5457\\u8d5e \\u672c\\u91cc \\u672c\\u5468 \\u755a\\u6597 \\u903c\\u5e76 \\u9f3b\\u6881 \\u9f3b\\u70df \\u6bd4\\u6746\\u8d5b \\u6bd4\\u5e72 \\u5f7c\\u5f97\\u91cc\\u76bf \\u79d5\\u8c37 \\u7b14\\u6746 \\u7b14\\u7ba1\\u9762 \\u7b14\\u5377 \\u7b14\\u79c3\\u58a8\\u5e72 \\u6bd5\\u5347 \\u5e87\\u91cc\\u725b\\u65af \\u5e87\\u836b \\u78a7\\u773c\\u7d2b\\u987b \\u5f0a\\u5e78 \\u58c1\\u5fd7 \\u58c1\\u949f \\u907f\\u51f6\\u5c31\\u5409 \\u907f\\u51f6\\u8d8b\\u5409 \\u5b16\\u5e78 \\u81c2\\u4e00\\u5377 \\u782d\\u9488 \\u7f16\\u53d1 \\u7f16\\u4f59 \\u7f16\\u949f \\u97ad\\u8f9f\\u8fd1\\u91cc \\u97ad\\u8f9f\\u5165\\u91cc \\u6241\\u62df\\u8c37\\u76d7\\u866b \\u53d8\\u901f\\u6746 \\u53d8\\u8d28\\u5ca9 \\u4fbf\\u5403\\u5e72 \\u4fbf\\u8f9f \\u904d\\u5e03 \\u8fa8\\u5978\\u8bba \\u8fab\\u53d1 \\u6807\\u5360 \\u6807\\u5fd7 \\u6807\\u81f4 \\u6807\\u6ce8 \\u6807\\u51c6 \\u6807\\u51c6\\u5c3a\\u5bf8 \\u6807\\u51c6\\u5355\\u4f4d \\u6807\\u51c6\\u6746 \\u8868\\u677f \\u8868\\u5382 \\u8868\\u5e26 \\u8868\\u7684\\u5600\\u55d2 \\u8868\\u7684\\u5386\\u53f2 \\u8868\\u5e97 \\u8868\\u51a0 \\u8868\\u884c \\u8868\\u58f3 \\u8868\\u5feb \\u8868\\u6b3e \\u8868\\u94fe \\u8868\\u6162 \\u8868\\u8499\\u5b50 \\u8868\\u76d8 \\u8868\\u901f \\u8868\\u505c \\u8868\\u738b \\u8868\\u6f14 \\u8868\\u6f14\\u6b32 \\u8868\\u9488 \\u8868\\u8f6c \\u522b\\u522b\\u626d\\u626d \\u522b\\u53e3\\u6c14 \\u522b\\u626d \\u522b\\u62d7 \\u522b\\u6c14 \\u522b\\u5f3a \\u522b\\u65e5\\u5357\\u9e3f\\u624d\\u5317\\u53bb \\u522b\\u7740 \\u522b\\u53ea \\u522b\\u81f4 \\u522b\\u5634 \\u73a2\\u5ca9 \\u6ee8\\u677e\\u5e02 \\u9b13\\u53d1 \\u51b0\\u6597 \\u51b0\\u789b\\u5ca9 \\u51b0\\u5ca9 \\u997c\\u5e72 \\u7980\\u590d \\u5e76\\u6848 \\u5e76\\u5305 \\u5e76\\u4e0d \\u5e76\\u4e0d\\u5e76 \\u5e76\\u4ea7 \\u5e76\\u6210 \\u5e76\\u9664 \\u5e76\\u5230 \\u5e76\\u53e0 \\u5e76\\u53d1 \\u5e76\\u8d2d \\u5e76\\u9aa8 \\u5e76\\u5408 \\u5e76\\u706b \\u5e76\\u80a9 \\u5e76\\u80a9\\u5b50 \\u5e76\\u517c \\u5e76\\u5377\\u673a \\u5e76\\u79d1 \\u5e76\\u529b \\u5e76\\u62e2 \\u5e76\\u540d \\u5e76\\u5165 \\u5e76\\u7eb1 \\u5e76\\u541e \\u5e76\\u7f51 \\u5e76\\u4e3a \\u5e76\\u7ebf \\u5e76\\u4e00\\u4e0d\\u4e8c \\u5e76\\u8d43\\u62ff\\u8d3c \\u5e76\\u8d43\\u6cbb\\u7f6a \\u5e76\\u5dde \\u75c5\\u6108 \\u62e8\\u8c37 \\u62e8\\u5f26 \\u6ce2\\u8361 \\u6ce2\\u5c14\\u5e72 \\u6ce2\\u53d1\\u85fb \\u6ce2\\u62c9\\u514b \\u6ce2\\u91cc \\u5265\\u5236 \\u83e0\\u841d\\u5e72 \\u4f2f\\u91cc\\u514b\\u5229 \\u4f2f\\u5a18 \\u4f2f\\u4f59 \\u6cca\\u677e \\u6cca\\u677e\\u5206\\u5e03 \\u535a\\u6c47 \\u7c38\\u8361 \\u535c\\u5f81 \\u900b\\u53d1 \\u8865\\u6263 \\u8865\\u6ce8 \\u6355\\u866b\\u690d\\u7269 \\u6355\\u98ce\\u7cfb\\u5f71 \\u6355\\u864f\\u5ca9 \\u6355\\u5f71\\u7cfb\\u98ce \\u54fa\\u5582 \\u4e0d\\u5e76 \\u4e0d\\u60ee\\u5f3a\\u5fa1 \\u4e0d\\u540a \\u4e0d\\u8d1f\\u6240\\u6258 \\u4e0d\\u5e72 \\u4e0d\\u5e72\\u4e0d\\u51c0 \\u4e0d\\u5e72\\u4e0d\\u6de8\\u5403\\u4e86\\u6ca1\\u75c5 \\u4e0d\\u5e72\\u5df1\\u4e8b \\u4e0d\\u5e72\\u80f6 \\u4e0d\\u5e72\\u4f60 \\u4e0d\\u5e72\\u4ed6 \\u4e0d\\u5e72\\u5b83 \\u4e0d\\u5e72\\u5979 \\u4e0d\\u5e72\\u6211 \\u4e0d\\u8c37 \\u4e0d\\u597d\\u5e72\\u9810 \\u4e0d\\u6c14\\u5e72 \\u4e0d\\u820d \\u4e0d\\u98df\\u5e72\\u814a \\u4e0d\\u8ba8\\u91c7 \\u4e0d\\u901a\\u540a\\u5e86 \\u4e0d\\u754f\\u5f3a\\u5fa1 \\u4e0d\\u7cfb \\u4e0d\\u8d5e \\u4e0d\\u5360 \\u4e0d\\u5360\\u5409\\u51f6 \\u4e0d\\u5360\\u7b97 \\u4e0d\\u5360\\u51f6\\u5409 \\u4e0d\\u51c6 \\u4e0d\\u51c6\\u7ffb\\u5370 \\u4e0d\\u51c6\\u6ca1 \\u4e0d\\u51c6\\u4f60 \\u4e0d\\u51c6\\u8c01 \\u4e0d\\u51c6\\u4ed6 \\u4e0d\\u51c6\\u5b83 \\u4e0d\\u51c6\\u5979 \\u4e0d\\u51c6\\u95ee \\u4e0d\\u51c6\\u6211 \\u5e03\\u6446 \\u5e03\\u73ed\\u5c3c\\u65af\\u74e6 \\u5e03\\u83dc \\u5e03\\u6148 \\u5e03\\u9053 \\u5e03\\u5fb7 \\u5e03\\u9632 \\u5e03\\u590d \\u5e03\\u5e72\\u7ef4\\u5c14 \\u5e03\\u5c97 \\u5e03\\u544a \\u5e03\\u8c37 \\u5e03\\u8c37\\u9e1f\\u949f \\u5e03\\u5212 \\u5e03\\u4f1a \\u5e03\\u6559 \\u5e03\\u666f \\u5e03\\u5c40 \\u5e03\\u6263 \\u5e03\\u62c9\\u514b \\u5e03\\u96f7 \\u5e03\\u91cc \\u5e03\\u91cc\\u65af\\u6258 \\u5e03\\u5217 \\u5e03\\u9c81 \\u5e03\\u9c81\\u6258 \\u5e03\\u4f26 \\u5e03\\u4f26\\u6258\\u6d77 \\u5e03\\u6ee1 \\u5e03\\u56ca \\u5e03\\u56ca\\u5176\\u53e3 \\u5e03\\u8ba9 \\u5e03\\u6563 \\u5e03\\u54e8 \\u5e03\\u8bbe \\u5e03\\u65bd \\u5e03\\u52bf \\u5e03\\u7f72 \\u5e03\\u6258 \\u5e03\\u7f51 \\u5e03\\u5e0c\\u603b\\u7edf \\u5e03\\u4e0b \\u5e03\\u7ebf \\u5e03\\u96ea \\u5e03\\u4e00\\u4e2a \\u5e03\\u7591\\u9635 \\u5e03\\u4e8e \\u5e03\\u9635 \\u5e03\\u653f \\u5e03\\u7f6e \\u6b65\\u6b65\\u9ad8\\u5347 \\u6b65\\u6597\\u8e0f\\u7f61 \\u6b65\\u7f61\\u8e0f\\u6597 \\u64e6\\u5e72 \\u731c\\u4e09\\u5212\\u4e94 \\u624d\\u4e0d \\u624d\\u51fa \\u624d\\u6b64 \\u624d\\u6253 \\u624d\\u5f53\\u66f9\\u6597 \\u624d\\u5230 \\u624d\\u5f97\\u5230 \\u624d\\u5f97\\u4e24\\u5e74 \\u624d\\u7b49 \\u624d\\u8bfb \\u624d\\u5bf9 \\u624d\\u591a \\u624d\\u6562 \\u624d\\u5e72 \\u624d\\u5e72\\u676f \\u624d\\u5e72\\u65f1 \\u624d\\u5e72\\u6de8 \\u624d\\u5e72\\u900f \\u624d\\u521a \\u624d\\u7ed9 \\u624d\\u8ddf \\u624d\\u591f \\u624d\\u602a \\u624d\\u8fc7\\u6765 \\u624d\\u8fc7\\u53bb \\u624d\\u884c \\u624d\\u597d \\u624d\\u56de \\u624d\\u4f1a \\u624d\\u5c06 \\u624d\\u8bb2 \\u624d\\u5f00 \\u624d\\u770b \\u624d\\u53ef \\u624d\\u6765 \\u624d\\u6599 \\u624d\\u4e70 \\u624d\\u6ca1 \\u624d\\u62ff \\u624d\\u80fd \\u624d\\u80fd\\u5920 \\u624d\\u80fd\\u52c7\\u6562\\u8ffd \\u624d\\u80fd\\u6709 \\u624d\\u6d3e \\u624d\\u8d77\\u6765 \\u624d\\u6c14\\u7eb5\\u6a2a \\u624d\\u53bb \\u624d\\u4e0a\\u5230 \\u624d\\u4e0a\\u6765 \\u624d\\u4e0a\\u53bb \\u624d\\u59cb \\u624d\\u662f \\u624d\\u677e\\u4e0b \\u624d\\u7b97 \\u624d\\u7232 \\u624d\\u4e0b\\u6765 \\u624d\\u4e0b\\u53bb \\u624d\\u60f3 \\u624d\\u50cf \\u624d\\u4fe1 \\u624d\\u8981 \\u624d\\u7528 \\u624d\\u7528\\u5230 \\u624d\\u6709 \\u624d\\u518d \\u624d\\u5728 \\u624d\\u5219 \\u88c1\\u5e76 \\u88c1\\u5236 \\u91c7\\u91c7 \\u91c7\\u693d\\u4e0d\\u65b2 \\u91c7\\u5730 \\u91c7\\u8629 \\u91c7\\u98ce \\u91c7\\u98ce\\u5f55 \\u91c7\\u845b \\u91c7\\u5149 \\u91c7\\u5149\\u5256\\u749e \\u91c7\\u7f09 \\u91c7\\u53ca\\u8451\\u83f2 \\u91c7\\u5170\\u8d60\\u828d \\u91c7\\u70c8 \\u91c7\\u82d3 \\u91c7\\u7eff \\u91c7\\u5973 \\u91c7\\u8291 \\u91c7\\u82b9 \\u91c7\\u8272 \\u91c7\\u58f0 \\u91c7\\u8bd7 \\u91c7\\u77f3 \\u91c7\\u77f3\\u4e4b\\u5f79 \\u91c7\\u77f3\\u4e4b\\u6218 \\u91c7\\u77f3\\u4e4b\\u6230 \\u91c7\\u83fd \\u91c7\\u5934 \\u91c7\\u8587 \\u91c7\\u85aa \\u91c7\\u85aa\\u4e4b\\u75be \\u91c7\\u85aa\\u4e4b\\u5fe7 \\u91c7\\u8863 \\u91c7\\u9091 \\u91c7\\u5236 \\u5f69\\u7b14 \\u5f69\\u7b14\\u751f \\u5f69\\u7b14\\u751f\\u82b1 \\u5f69\\u7ef8 \\u5f69\\u8239 \\u5f69\\u5e26 \\u5f69\\u7f0e \\u5f69\\u51e4 \\u5f69\\u697c \\u5f69\\u9e3e \\u5f69\\u5973 \\u5f69\\u724c\\u697c \\u5f69\\u68da \\u5f69\\u7403 \\u5f69\\u8272\\u4e16\\u754c \\u5f69\\u80dc \\u5f69\\u7ebf \\u5f69\\u8863 \\u5f69\\u7f2f \\u83dc\\u5e72 \\u83dc\\u82d4 \\u8521\\u677e\\u5761 \\u53c2\\u8338 \\u53c2\\u7ee5 \\u53c2\\u6c64 \\u9910\\u677e\\u5556\\u67cf \\u9910\\u677e\\u98df\\u67cf \\u9910\\u677e\\u996e\\u6da7 \\u9910\\u53f0 \\u60e8\\u621a \\u82cd\\u53d1 \\u82cd\\u672f \\u82cd\\u677e \\u85cf\\u5386 \\u85cf\\u8499\\u6b4c\\u513f \\u64cd\\u7eb5\\u6746 \\u64cd\\u7eb5\\u53f0 \\u64cd\\u4f5c\\u53f0 \\u64cd\\u4f5c\\u949f \\u66f9\\u90c1\\u82ac \\u6f15\\u633d \\u8278\\u6728\\u4e30\\u4e30 \\u8349\\u5eb5 \\u8349\\u8350 \\u8349\\u7b7e \\u8349\\u5e2d \\u6d4b\\u91cf\\u6746 \\u6748\\u6746\\u513f \\u8336\\u51e0 \\u8336\\u9762 \\u8336\\u6258 \\u8336\\u5df2\\u5e72 \\u67e5\\u6838 \\u67fb\\u62a5\\u8868 \\u67fb\\u8868 \\u67fb\\u4e0d\\u51fa \\u67fb\\u51fa \\u67fb\\u5151\\u514b \\u67fb\\u53f7\\u53f0 \\u67fb\\u56de \\u67fb\\u83b7 \\u67fb\\u4ef7 \\u67fb\\u5377 \\u67fb\\u514b\\u62c9 \\u67fb\\u95ee\\u51fa \\u67fb\\u65e0\\u5b9e\\u636e \\u67fb\\u4fee \\u67fb\\u8be2\\u53f0 \\u67fb\\u627e\\u5468\\u671f \\u643d\\u7a70\\u5377\\u513f \\u5bdf\\u6838 \\u4ea7\\u540e \\u4ea7\\u540e\\u68c0\\u67fb \\u4ea7\\u5236 \\u94f2\\u677f \\u94f2\\u8349 \\u94f2\\u94f2 \\u94f2\\u8f66 \\u94f2\\u51fa \\u94f2\\u9664 \\u94f2\\u5200 \\u94f2\\u5012 \\u94f2\\u6389 \\u94f2\\u6597 \\u94f2\\u65ad \\u94f2\\u7164 \\u94f2\\u5e73 \\u94f2\\u8d77 \\u94f2\\u62a2 \\u94f2\\u7403 \\u94f2\\u4f24 \\u94f2\\u5c04 \\u94f2\\u571f \\u94f2\\u4e0b \\u94f2\\u96ea \\u94f2\\u5208 \\u94f2\\u51ff \\u80a0\\u7cfb\\u819c \\u80a0\\u810f \\u5c1d\\u904d \\u5c1d\\u5c1d \\u5c1d\\u51fa \\u5c1d\\u5230 \\u5c1d\\u70b9 \\u5c1d\\u4e2a \\u5c1d\\u5c3d \\u5c1d\\u6765\\u5c1d\\u53bb \\u5c1d\\u4e86 \\u5c1d\\u4e86\\u5c1d \\u5c1d\\u8d77\\u6765 \\u5c1d\\u9c9c \\u5382\\u90e8 \\u5531\\u5ff5 \\u8d85\\u57fa\\u6027\\u5ca9 \\u8d85\\u7ea7\\u676f \\u8d85\\u8d5e \\u671d\\u949f \\u6f6e\\u70df \\u7092\\u9762 \\u8f66\\u6597 \\u8f66\\u592b \\u8f66\\u91cc \\u8f66\\u91cc\\u96c5\\u5bbe\\u65af\\u514b \\u8f66\\u4ed4\\u9762 \\u626f\\u9762 \\u626f\\u7ea4 \\u64a4\\u5e76 \\u6c89\\u79ef\\u5ca9 \\u9648\\u51b2 \\u9648\\u6c49\\u5347 \\u9648\\u6770 \\u9648\\u70bc \\u9648\\u5347 \\u9648\\u4e16\\u6770 \\u9648\\u4e07\\u677e \\u9648\\u5e78 \\u9648\\u5e78\\u5ada \\u9648\\u5c39\\u6770 \\u9648\\u701b\\u949f \\u9648\\u90c1\\u79c0 \\u6668\\u949f \\u886c\\u6258 \\u79f0\\u53f9 \\u79f0\\u8d5e \\u86cf\\u5e72 \\u6210\\u5ca9\\u4f5c\\u7528 \\u5448\\u51c6 \\u627f\\u5236 \\u4e58\\u51f6\\u5b8c\\u914d \\u79e4\\u6746 \\u79e4\\u5e73\\u6597\\u6ee1 \\u5403\\u677f\\u5200\\u9762 \\u5403\\u9971\\u4e86\\u996d\\u6491\\u7684 \\u5403\\u9971\\u6ca1\\u4e8b\\u5e72 \\u5403\\u4e0d\\u51fa \\u5403\\u4e0d\\u4e86 \\u5403\\u51fa \\u5403\\u9519\\u836f \\u5403\\u5f97\\u51fa \\u5403\\u5f97\\u4e86 \\u5403\\u5730\\u9762 \\u5403\\u9489\\u677f \\u5403\\u8c46\\u5e72 \\u5403\\u996d\\u522b\\u5fd8\\u4e86\\u79cd\\u8c37\\u4eba \\u5403\\u996d\\u5bb6\\u4f19 \\u5403\\u996d\\u50a2\\u4f19 \\u5403\\u5e72\\u918b \\u5403\\u5e72\\u4e86 \\u5403\\u6302\\u7edc\\u513f \\u5403\\u8fc7\\u9762 \\u5403\\u5408\\u5bb6\\u6b22 \\u5403\\u540e\\u6094\\u836f \\u5403\\u56de\\u5934\\u8349 \\u5403\\u51e0\\u7897\\u5e72\\u996d \\u5403\\u59dc \\u5403\\u5c3d \\u5403\\u4e8f\\u5c31\\u662f\\u5360\\u4fbf\\u5b9c \\u5403\\u4e8f\\u4e0a\\u5f53 \\u5403\\u8fa3\\u9762 \\u5403\\u4e86 \\u5403\\u91cc\\u6252\\u5916 \\u5403\\u91cc\\u722c\\u5916 \\u5403\\u9762 \\u5403\\u67aa\\u836f \\u5403\\u6572\\u624d \\u5403\\u4eba\\u866b \\u5403\\u4eba\\u4e00\\u4e2a\\u86cb\\u6069\\u60c5\\u65e0\\u6cd5\\u65ad \\u5403\\u4f24\\u4e86 \\u5403\\u5b8c\\u9762 \\u5403\\u95f2\\u996d \\u5403\\u95f2\\u8bdd \\u5403\\u70df \\u5403\\u836f \\u5403\\u4e00\\u987f\\u6328\\u4e00\\u987f \\u55ab\\u4e8f\\u7684\\u662f\\u4e56\\u5360\\u4fbf\\u5b9c\\u7684\\u662f\\u5446 \\u8fdf\\u56de \\u5c3a\\u5e03\\u6597\\u7c9f \\u5c3a\\u5bf8\\u6597\\u7c9f \\u9f7f\\u53d1 \\u9f7f\\u5371\\u53d1\\u79c0 \\u65a5\\u5364 \\u8d64\\u7ef3\\u7cfb\\u8db3 \\u8d64\\u672f \\u8d64\\u677e \\u51b2\\u9f3b \\u51b2\\u5395\\u6240 \\u51b2\\u8336 \\u51b2\\u51b2 \\u51b2\\u7240\\u5de5 \\u51b2\\u6de1 \\u51b2\\u6da4 \\u51b2\\u6389 \\u51b2\\u65ad \\u51b2\\u670d \\u51b2\\u6c9f \\u51b2\\u51a0 \\u51b2\\u51a0\\u53d1\\u6012 \\u51b2\\u548c \\u51b2\\u6000 \\u51b2\\u574f \\u51b2\\u6bc1 \\u51b2\\u79ef \\u51b2\\u5242 \\u51b2\\u895f \\u51b2\\u51b3 \\u51b2\\u514b \\u51b2\\u7a7a\\u673a \\u51b2\\u57ae \\u51b2\\u6269 \\u51b2\\u51c9 \\u51b2\\u6dcb\\u6d74 \\u51b2\\u9f84 \\u51b2\\u6d41 \\u51b2\\u6627 \\u51b2\\u6a21 \\u51b2\\u672b \\u51b2\\u9ed8 \\u51b2\\u5e74 \\u51b2\\u6ce1 \\u51b2\\u4eba \\u51b2\\u5f31 \\u51b2\\u7ef3 \\u51b2\\u8680 \\u51b2\\u5237 \\u51b2\\u6c34 \\u51b2\\u7a0e \\u51b2\\u584c \\u51b2\\u5929 \\u51b2\\u7530 \\u51b2\\u6d17 \\u51b2\\u559c \\u51b2\\u9500 \\u51b2\\u9704 \\u51b2\\u6cfb \\u51b2\\u865a \\u51b2\\u5370 \\u51b2\\u6fa1 \\u51b2\\u5e10 \\u51b2\\u5dde\\u649e\\u5e9c \\u51b2\\u8d70 \\u8202\\u8c37 \\u866b\\u90e8 \\u866b\\u5403\\u7259 \\u62bd\\u6597 \\u62bd\\u5e72 \\u62bd\\u70df \\u4ec7\\u4ec7 \\u4e11\\u65e6 \\u4e11\\u89d2 \\u4e11\\u5e74 \\u4e11\\u725b \\u4e11\\u5974\\u513f \\u4e11\\u65e5 \\u4e11\\u4e09 \\u4e11\\u65f6 \\u4e11\\u6708 \\u5062\\u91c7 \\u7785\\u4e0b\\u8868 \\u7785\\u4e0b\\u949f \\u81ed\\u5c40 \\u81ed\\u718f\\u718f \\u51fa\\u9648\\u5e03\\u65b0 \\u51fa\\u4e11 \\u51fa\\u4e11\\u72fc\\u501f \\u51fa\\u513f \\u51fa\\u5206\\u5b50 \\u51fa\\u5bb6 \\u51fa\\u5bb6\\u4eba \\u51fa\\u5bb6\\u4eba\\u5403\\u516b\\u65b9 \\u51fa\\u53e3\\u8d38\\u6613 \\u51fa\\u4e8b\\u60c5 \\u51fa\\u6c34\\u7ba1 \\u51fa\\u592a\\u9633 \\u51fa\\u620f \\u51fa\\u6c59\\u6ce5\\u800c\\u4e0d\\u67d3 \\u51fa\\u5f81 \\u521d\\u5f81 \\u9664\\u65e7\\u5e03\\u65b0 \\u89e6\\u987b \\u640b\\u9762 \\u5ddd\\u8c37 \\u5ddd\\u540e \\u4f20\\u5e03 \\u4f20\\u4f4d\\u4e8e\\u56db\\u592a\\u5b50 \\u8239\\u592b \\u8239\\u5a18 \\u8239\\u53ea \\u8239\\u949f \\u9044\\u5f81 \\u4e32\\u6e38 \\u7a97\\u660e\\u51e0\\u51c0 \\u7a97\\u660e\\u51e0\\u4eae \\u5e8a\\u5e2d \\u95ef\\u70bc \\u521b\\u83b7 \\u521b\\u5de8 \\u521b\\u4f24\\u540e\\u538b\\u529b \\u521b\\u610f\\u676f \\u5439\\u53d1 \\u5439\\u5e72 \\u5439\\u80e1 \\u708a\\u81fc\\u4e4b\\u621a \\u708a\\u70df \\u708a\\u70df\\u8885\\u8885 \\u5782\\u53d1 \\u6376\\u70bc \\u6376\\u53f0\\u62cd\\u51f3 \\u9524\\u70bc \\u6625\\u5377 \\u6625\\u79cb\\u5927\\u4e00\\u7edf \\u6625\\u7b0b\\u6012\\u53d1 \\u6625\\u6b66\\u91cc\\u5e9c \\u5507\\u5e72 \\u5507\\u71e5\\u820c\\u5e72 \\u8123\\u82e5\\u62b9\\u6731 \\u8123\\u82e5\\u6d82\\u6731 \\u8123\\u4f3c\\u62b9\\u6731 \\u6df3\\u4e8e \\u9187\\u90c1 \\u8bcd\\u91c7 \\u8bcd\\u6c47 \\u8f9e\\u91c7 \\u8f9e\\u6c47 \\u6148\\u60b2\\u559c\\u820d \\u78c1\\u5236 \\u6b64\\u4ec6\\u5f7c\\u8d77 \\u6b64\\u7cfb \\u523a\\u53c2 \\u523a\\u5e72 \\u8d50\\u6064 \\u8471\\u8471\\u90c1\\u90c1 \\u8471\\u59dc\\u849c \\u7c97\\u7ba1\\u9762 \\u7c97\\u5364 \\u7c97\\u9762 \\u7c97\\u9762\\u5ca9 \\u7c97\\u5236 \\u918b\\u6817 \\u918b\\u575b \\u50ac\\u5e76 \\u8106\\u8c37\\u4e50 \\u6dec\\u70bc \\u5b58\\u6258\\u80a1 \\u5b58\\u6298 \\u5bf8\\u53d1\\u5343\\u91d1 \\u9519\\u5f69\\u9542\\u91d1 \\u642d\\u5e72\\u94fa \\u8fbe\\u6b23\\u676f \\u7b54\\u590d \\u6253\\u6328 \\u6253\\u5e76 \\u6253\\u51fa \\u6253\\u51fa\\u540a\\u5165 \\u6253\\u51fa\\u5934\\u68d2\\u5b50 \\u6253\\u8c37 \\u6253\\u54c4 \\u6253\\u7c27\\u8868 \\u6253\\u6868\\u6746 \\u6253\\u5361\\u949f \\u6253\\u6e38\\u98de \\u6253\\u6e38\\u51fb \\u6253\\u5236 \\u6253\\u4e2d\\u4f19 \\u6253\\u949f \\u5927\\u672c\\u949f \\u5927\\u7b28\\u949f \\u5927\\u75c5\\u521d\\u6108 \\u5927\\u4e0d\\u91cc\\u58eb \\u5927\\u91c7 \\u5927\\u51b2 \\u5927\\u866b \\u5927\\u866b\\u4e0d\\u5403\\u4f0f\\u8089 \\u5927\\u866b\\u5403\\u5c0f\\u866b \\u5927\\u4e11 \\u5927\\u6597 \\u5927\\u53d1\\u6148\\u60b2 \\u5927\\u592b\\u677e \\u5927\\u9274 \\u5927\\u91d1\\u53d1\\u82d4 \\u5927\\u8721 \\u5927\\u91cc \\u5927\\u7406\\u5ca9 \\u5927\\u5386 \\u5927\\u5229\\u9762 \\u5927\\u9ebb\\u91cc \\u5927\\u660e\\u5386 \\u5927\\u76ee\\u5e72\\u8fde \\u5927\\u8f9f \\u5927\\u5343\\u4e16\\u754c \\u5927\\u66f2 \\u5927\\u6c34\\u51b2\\u5012\\u9f99\\u738b\\u6bbf \\u5927\\u6c34\\u51b2\\u5012\\u9f99\\u738b\\u5e99 \\u5927\\u6c34\\u51b2\\u6eba \\u5927\\u540c\\u4e16\\u754c \\u5927\\u6b66\\u4ed1 \\u5927\\u54b8 \\u5927\\u578b\\u949f \\u5927\\u51f6 \\u5927\\u8a00\\u975e\\u5938 \\u5927\\u884d\\u5386 \\u5927\\u4e00\\u7edf\\u5fd7 \\u5927\\u8d5e \\u5927\\u6298\\u513f \\u5927\\u53ea \\u5927\\u949f \\u5927\\u5468\\u540e \\u5927\\u4e13\\u676f \\u5446\\u81f4\\u81f4 \\u902e\\u7cfb \\u4ee3\\u8868\\u4eba\\u7269 \\u4ee3\\u7b7e \\u5e26\\u53d1\\u4fee\\u884c \\u5e26\\u51f6 \\u5f85\\u6838 \\u888b\\u8868 \\u6234\\u8868 \\u6234\\u53d1\\u542b\\u9f7f \\u6234\\u7ef4\\u65af\\u676f \\u4e39\\u53c2 \\u4e39\\u5e72 \\u62c5\\u62c5\\u9762 \\u62c5\\u5e72\\u7eaa \\u62c5\\u4ed4\\u9762 \\u5355\\u592b\\u53ea\\u5987 \\u5355\\u4f4d\\u4fe1\\u6258 \\u5355\\u5f26 \\u5355\\u4e8e \\u5355\\u53ea \\u5355\\u5468 \\u5355\\u5b50\\u53f6\\u690d\\u7269 \\u80c6\\u5927\\u5982\\u6597 \\u80c6\\u5927\\u4e8e\\u5929 \\u4f46\\u5f97\\u4e00\\u7247\\u6a58\\u76ae\\u5403\\u4e14\\u83ab\\u5fd8\\u4e86\\u6d1e\\u5ead\\u6e56 \\u4f46\\u4e91 \\u5f39\\u73e0\\u53f0 \\u5f39\\u5b50\\u53f0 \\u6fb9\\u8361 \\u5f53\\u5f53 \\u5f53\\u5f53\\u5f53 \\u5f53\\u7684\\u4e00\\u58f0 \\u5f53\\u7684\\u4e00\\u54cd \\u5f53\\u5bb6 \\u5f53\\u5bb6\\u624d\\u77e5\\u67f4\\u7c73\\u4ef7 \\u5f53\\u5577 \\u5f53\\u4e00\\u58f0 \\u5f53\\u5468 \\u6321\\u5fa1 \\u515a\\u53c2 \\u515a\\u6000\\u82f1 \\u515a\\u8fdb \\u515a\\u592a\\u5c09 \\u515a\\u592a\\u5c09\\u5403\\u533e\\u98df \\u515a\\u9879 \\u515a\\u9805 \\u515a\\u652f\\u4e66 \\u8361\\u51fa \\u8361\\u8239 \\u8361\\u8361 \\u8361\\u8361\\u60a0\\u60a0 \\u8361\\u5230 \\u8361\\u6da4 \\u8361\\u98ce \\u8361\\u590d \\u8361\\u57a2\\u6da4\\u6c59 \\u8361\\u5bd2 \\u8361\\u68c0\\u903e\\u95f2 \\u8361\\u9152 \\u8361\\u5f00 \\u8361\\u53e3 \\u8361\\u6765\\u8361\\u53bb \\u8361\\u6c14\\u56de\\u9633 \\u8361\\u79cb\\u5343 \\u8361\\u7455\\u6da4\\u79fd \\u8361\\u6f3e \\u8361\\u60a0\\u60a0 \\u8361\\u821f \\u53e8\\u5ff5 \\u6363\\u9b3c\\u540a\\u767d \\u5012\\u516b\\u5b57\\u987b \\u5012\\u5ff5 \\u5012\\u60ac\\u6328\\u547d \\u7977\\u5ff5 \\u76d7\\u949f \\u9053\\u91cc \\u7a3b\\u8c37 \\u5f97\\u91c7 \\u5fb7\\u5e72 \\u5fb7\\u9ad8\\u800c\\u6bc1\\u6765 \\u5fb7\\u91cc \\u5fb7\\u80dc\\u5934\\u56de \\u7684\\u949f \\u706f\\u5f69 \\u7b49\\u95f2\\u4eba\\u7269 \\u4f4e\\u8361 \\u4f4e\\u56de \\u4f4e\\u4ef7\\u4e70\\u8fdb \\u5600\\u55d2\\u7684\\u8868 \\u6ef4\\u5e72 \\u6ef4\\u91cc\\u8037\\u62c9 \\u6ef4\\u91cc\\u642d\\u62c9 \\u6ef4\\u91cc\\u561f\\u565c \\u72c4\\u62c9\\u514b \\u72c4\\u5fd7\\u6770 \\u6da4\\u8361 \\u6da4\\u79fd\\u8361\\u7455 \\u6da4\\u7455\\u8361\\u57a2 \\u6da4\\u7455\\u8361\\u79fd \\u8bcb\\u6bc1 \\u62b5\\u89e6 \\u62b5\\u727e \\u62b5\\u5fa1 \\u5730\\u590d\\u5929\\u7ffb \\u5730\\u585e\\u7c73\\u677e \\u5730\\u65e0\\u4e09\\u91cc\\u5e73 \\u5730\\u4e00\\u5377 \\u5730\\u5fd7 \\u5e1d\\u540e \\u9012\\u56de \\u7b2c\\u516b\\u51fa \\u7b2c\\u4e8c\\u51fa \\u7b2c\\u4e5d\\u51fa \\u7b2c\\u516d\\u51fa \\u7b2c\\u4e03\\u51fa \\u7b2c\\u4e09\\u51fa \\u7b2c\\u5341\\u51fa \\u7b2c\\u56db\\u51fa \\u7b2c\\u4e94\\u51fa \\u7b2c\\u4e00\\u51fa \\u98a0\\u98a0\\u4ec6\\u4ec6 \\u98a0\\u590d \\u98a0\\u4ec6 \\u6527\\u6527\\u4ec6\\u4ec6 \\u70b9\\u534a\\u949f \\u70b9\\u591a\\u949f \\u70b9\\u70df \\u70b9\\u949f \\u7535\\u8868 \\u7535\\u590d \\u7535\\u80e1\\u5200 \\u7535\\u8111\\u53f0 \\u7535\\u987b\\u5200 \\u7535\\u949f \\u7535\\u5b50\\u8868 \\u7535\\u5b50\\u949f \\u6bbf\\u949f\\u81ea\\u9e23 \\u5201\\u6597 \\u5201\\u5978 \\u8c82\\u590d\\u989d \\u96d5\\u9e57 \\u96d5\\u608d \\u96d5\\u5177\\u5ea7 \\u96d5\\u6881 \\u96d5\\u7fce \\u96d5\\u5fc3\\u96c1\\u722a \\u540a\\u8bcd \\u540a\\u5960 \\u540a\\u6597 \\u540a\\u53e4 \\u540a\\u8be1 \\u540a\\u8d3a\\u8fce\\u9001 \\u540a\\u9e64 \\u540a\\u5589 \\u540a\\u8c0e \\u540a\\u796d \\u540a\\u811a \\u540a\\u811a\\u513f \\u540a\\u811a\\u513f\\u4e8b \\u540a\\u62f7 \\u540a\\u5ba2 \\u540a\\u6c11 \\u540a\\u65d7 \\u540a\\u6492 \\u540a\\u4e27 \\u540a\\u4e66 \\u540a\\u6b7b \\u540a\\u6b7b\\u95ee\\u5b64 \\u540a\\u6b7b\\u95ee\\u75be \\u540a\\u5934 \\u540a\\u6170 \\u540a\\u6587 \\u540a\\u95ee \\u540a\\u5b5d \\u540a\\u5501 \\u540a\\u5bb4 \\u540a\\u55ad \\u540a\\u8170\\u6492\\u8de8 \\u540a\\u5f71 \\u540a\\u8a89\\u6cbd\\u540d \\u540a\\u8005\\u5927\\u60a6 \\u540a\\u7eb8 \\u540a\\u949f \\u6389\\u53d1 \\u7239\\u5a18 \\u53e0\\u5c42\\u5ca9 \\u8e40\\u91cc\\u8e40\\u659c \\u4e01\\u4e11 \\u4e01\\u56fa\\u751f\\u677e \\u53ee\\u5f53 \\u9876\\u9488 \\u9876\\u9488\\u6328\\u4f4f \\u8ba2\\u5236 \\u9489\\u6263 \\u5b9a\\u5236 \\u4e1c\\u4ed3\\u91cc \\u4e1c\\u5e72 \\u4e1c\\u91cc \\u4e1c\\u5c71\\u91cc \\u4e1c\\u5347 \\u4e1c\\u5f81 \\u4e1c\\u829d\\u533b\\u7597\\u7cfb \\u4e1c\\u5468 \\u4e1c\\u5468\\u949f \\u51ac\\u51ac \\u51ac\\u5b63\\u4e16\\u754c \\u8463\\u91cc\\u5e9c \\u8463\\u6c0f\\u5c01\\u53d1 \\u52a8\\u8361 \\u680b\\u6881 \\u90fd\\u820d\\u4e0b \\u6597\\u67c4 \\u6597\\u8f66 \\u6597\\u57ce \\u6597\\u50a8 \\u6597\\u5927 \\u6597\\u80c6 \\u6597\\u7684 \\u6597\\u706f \\u6597\\u5e97 \\u6597\\u987f \\u6597\\u65b9 \\u6597\\u5206\\u5b50 \\u6597\\u5e9c \\u6597\\u6982 \\u6597\\u62f1 \\u6597\\u6831 \\u6597\\u54c4 \\u6597\\u659b\\u4e4b\\u7984 \\u6597\\u7b95 \\u6597\\u6781 \\u6597\\u9152 \\u6597\\u9152\\u53ea\\u9e21 \\u6597\\u5c45 \\u6597\\u7edd \\u6597\\u9b41 \\u6597\\u7b20 \\u6597\\u91cf \\u6597\\u516d \\u6597\\u7f57\\u5927\\u9646 \\u6597\\u95e8 \\u6597\\u5357 \\u6597\\u725b \\u6597\\u725b\\u4e4b\\u95f4 \\u6597\\u84ec\\u88c5 \\u6597\\u7bf7 \\u6597\\u6e20 \\u6597\\u7136 \\u6597\\u5c71 \\u6597\\u7b72 \\u6597\\u6753 \\u6597\\u5347 \\u6597\\u98df \\u6597\\u5ba4 \\u6597\\u6570 \\u6597\\u85ae \\u6597\\u7c9f\\u5c3a\\u5e03 \\u6597\\u7c9f\\u56ca\\u91d1 \\u6597\\u5c3e\\u6e2f \\u6597\\u7eb9 \\u6597\\u9999 \\u6597\\u5c0f\\u9a6c \\u6597\\u70df\\u4e1d \\u6597\\u658b \\u6597\\u5e10 \\u6597\\u6298\\u86c7\\u884c \\u6597\\u771f \\u6597\\u91cd\\u5c71\\u9f50 \\u6597\\u8f6c\\u53c2\\u6a2a \\u6597\\u8f6c\\u661f\\u79fb \\u6597\\u5b50 \\u8c46\\u5e72 \\u8c46\\u5e72\\u8089\\u4e1d \\u8c46\\u9762 \\u8c46\\u7b7e \\u6bd2\\u50f5\\u6307 \\u72ec\\u5360\\u9f07\\u5934 \\u8bfb\\u4e66\\u4e09\\u4f59 \\u8d4c\\u53f0 \\u675c\\u8001\\u5fd7\\u9053 \\u675c\\u96c5\\u91cc\\u514b \\u77ed\\u53d1 \\u77ed\\u51e0 \\u77ed\\u987b \\u65ad\\u53d1 \\u65ad\\u5f26 \\u65ad\\u7eb8\\u4f59\\u58a8 \\u953b\\u70bc \\u5806\\u6848\\u76c8\\u51e0 \\u5bf9\\u8868 \\u5bf9\\u6298 \\u5bf9\\u51c6 \\u5bf9\\u51c6\\u8868 \\u5bf9\\u51c6\\u949f \\u591a\\u91c7 \\u591a\\u5c42\\u590d \\u591a\\u5403\\u591a\\u5360 \\u591a\\u4e2a \\u591a\\u5c11\\u53ea \\u591a\\u51f6\\u5c11\\u5409 \\u591a\\u53ea \\u593a\\u676f \\u4fc4\\u5236 \\u989d\\u6211\\u7565\\u5386 \\u6076\\u5fc3 \\u6076\\u610f \\u6076\\u610f\\u6bc1\\u8c24 \\u6076\\u5511\\u5549 \\u6069\\u540c\\u7236\\u6bcd \\u6069\\u51c6 \\u6441\\u6263 \\u800c\\u4e91 \\u4e8c\\u6597 \\u4e8c\\u6076\\u82f1 \\u4e8c\\u7f36\\u949f\\u60d1 \\u4e8c\\u6746\\u5b50 \\u4e8c\\u91cc \\u4e8c\\u4ed1 \\u4e8c\\u5a18 \\u4e8c\\u6487\\u80e1 \\u4e8c\\u624b\\u70df \\u4e8c\\u5f26 \\u4e8c\\u53f6\\u677e \\u4e8c\\u53ea \\u4e8c\\u5468 \\u53d1\\u8fab \\u53d1\\u8868 \\u53d1\\u8868\\u6b32 \\u53d1\\u9b13 \\u53d1\\u5e03 \\u53d1\\u91c7\\u626c\\u660e \\u53d1\\u83dc \\u53d1\\u9497 \\u53d1\\u5e26 \\u53d1\\u96d5 \\u53d1\\u77ed\\u5fc3\\u957f \\u53d1\\u532a \\u53d1\\u80a4 \\u53d1\\u590d \\u53d1\\u5e72 \\u53d1\\u6839 \\u53d1\\u7b8d \\u53d1\\u5149 \\u53d1\\u5149\\u53ef\\u9274 \\u53d1\\u53f7 \\u53d1\\u53f7\\u5e03\\u4ee4 \\u53d1\\u7693\\u9f7f \\u53d1\\u9645 \\u53d1\\u9afb \\u53d1\\u5939 \\u53d1\\u7b3a \\u53d1\\u80f6 \\u53d1\\u811a \\u53d1\\u7ed3 \\u53d1\\u59d0 \\u53d1\\u7981 \\u53d1\\u5377 \\u53d1\\u5361 \\u53d1\\u56f0 \\u53d1\\u814a \\u53d1\\u8721 \\u53d1\\u5eca \\u53d1\\u91cf \\u53d1\\u4e71\\u9497\\u6a2a \\u53d1\\u8499 \\u53d1\\u9762 \\u53d1\\u6f02 \\u53d1\\u59bb \\u53d1\\u5708 \\u53d1\\u5982\\u98de\\u84ec \\u53d1\\u4e73 \\u53d1\\u8272 \\u53d1\\u7eb1 \\u53d1\\u4e0a \\u53d1\\u4e0a\\u51b2\\u51a0 \\u53d1\\u4e0a\\u6307\\u51a0 \\u53d1\\u68a2 \\u53d1\\u5f0f \\u53d1\\u9970 \\u53d1\\u68b3 \\u53d1\\u675f \\u53d1\\u971c \\u53d1\\u4e1d \\u53d1\\u5957 \\u53d1\\u633d\\u53cc\\u9afb \\u53d1\\u7f51 \\u53d1\\u4e3a\\u8840\\u4e4b\\u672c \\u53d1\\u5c3e \\u53d1\\u5c4b \\u53d1\\u9999 \\u53d1\\u578b \\u53d1\\u987b\\u6591 \\u53d1\\u987b\\u90fd \\u53d1\\u987b\\u7686 \\u53d1\\u987b\\u4ff1 \\u53d1\\u987b\\u5df2 \\u53d1\\u7663 \\u53d1\\u5df2\\u971c\\u767d \\u53d1\\u5f15 \\u53d1\\u5f15\\u5343\\u94a7 \\u53d1\\u7f28 \\u53d1\\u8e0a\\u51b2\\u51a0 \\u53d1\\u6cb9 \\u53d1\\u7c2a \\u53d1\\u5c55\\u4e2d\\u56fd \\u53d1\\u957f \\u53d1\\u9488 \\u53d1\\u653f\\u65bd\\u4ec1 \\u53d1\\u6307 \\u53d1\\u8d28 \\u53d1\\u72b6 \\u5ee2\\u540e \\u6cd5\\u62c9\\u6258 \\u7ffb\\u590d \\u7ffb\\u6765\\u590d\\u53bb \\u7ffb\\u624b\\u4f5c\\u4e91\\u590d\\u624b\\u96e8 \\u7ffb\\u53f0 \\u7ffb\\u4e91\\u590d\\u96e8 \\u70e6\\u590d \\u7e41\\u590d \\u7e41\\u949f \\u53cd\\u94f2 \\u53cd\\u6597 \\u53cd\\u53cd\\u590d\\u590d \\u53cd\\u590d \\u53cd\\u5377 \\u53cd\\u4e71\\u5e76 \\u8fd4\\u8fd8\\u5360\\u6709 \\u8fd4\\u91cc \\u8fd4\\u7167\\u56de\\u5149 \\u996d\\u540e \\u996d\\u540e\\u949f \\u996d\\u56e2 \\u6cdb\\u6ee5 \\u6cdb\\u6c34 \\u6cdb\\u6c34\\u51cc\\u5c71 \\u8303\\u51b0\\u51b0 \\u8303\\u9648\\u67cf \\u8303\\u6210\\u5927 \\u8303\\u5fb7\\u683c\\u62c9\\u592b \\u8303\\u5fb7\\u6797\\u7279 \\u8303\\u5fb7\\u8428 \\u8303\\u5fb7\\u74e6\\u8033\\u65af \\u8303\\u5fb7\\u7ef4\\u5fb7 \\u8303\\u767b\\u5821 \\u8303\\u8303\\u4e4b\\u8f88 \\u8303\\u7518\\u8fea \\u8303\\u7eb2\\u6b66 \\u8303\\u6208\\u5fb7 \\u8303\\u516c\\u5041 \\u8303\\u516c\\u5824 \\u8303\\u5149\\u7fa4 \\u8303\\u56fd\\u94e8 \\u8303\\u54c8\\u80fd \\u8303\\u7693\\u9617 \\u8303\\u6d2a\\u68ee \\u8303\\u5bb6\\u8c26 \\u8303\\u5609\\u9a85 \\u8303\\u59dc \\u8303\\u8fdb \\u8303\\u9756\\u7476 \\u8303\\u96ce \\u8303\\u53ef\\u94a6 \\u8303\\u5bbd \\u8303\\u8821 \\u8303\\u4f26\\u94c1\\u8bfa \\u8303\\u5c65\\u971c \\u8303\\u5c3c\\u65af\\u7279\\u9c81\\u4f0a \\u8303\\u4f69\\u897f \\u8303\\u742a\\u6590 \\u8303\\u7eee\\u99a8 \\u8303\\u58eb\\u4e39 \\u8303\\u65af\\u5766 \\u8303\\u7279\\u5c14 \\u8303\\u7279\\u897f \\u8303\\u73ae\\u742a \\u8303\\u6587 \\u8303\\u6587\\u7a0b \\u8303\\u6587\\u82b3 \\u8303\\u6587\\u864e \\u8303\\u6587\\u6f9c \\u8303\\u6587\\u85e4 \\u8303\\u6587\\u540c \\u8303\\u6587\\u7167 \\u8303\\u6587\\u6b63\\u516c \\u8303\\u6e58\\u6684 \\u8303\\u5c0f\\u59d0 \\u8303\\u6653\\u8431 \\u8303\\u7b71\\u68b5 \\u8303\\u6b23\\u59a4 \\u8303\\u9633 \\u8303\\u6654 \\u8303\\u9038\\u81e3 \\u8303\\u589e \\u8303\\u5f20\\u9e21\\u9ecd \\u8303\\u6b63\\u7965 \\u8303\\u7ec7\\u94a6 \\u8303\\u690d\\u8c37 \\u8303\\u690d\\u4f1f \\u8303\\u5fd7\\u6bc5 \\u8303\\u4ef2\\u6df9 \\u65b9\\u4fbf\\u9762 \\u65b9\\u624d \\u65b9\\u51e0 \\u65b9\\u91cc \\u65b9\\u5cb3 \\u65b9\\u5fd7 \\u9632\\u53f0 \\u9632\\u5fa1 \\u4eff\\u4f5b \\u4eff\\u5236 \\u653e\\u8499\\u6323 \\u653e\\u677e \\u653e\\u677e\\u7ba1\\u5236 \\u98de\\u520d\\u633d\\u7c92 \\u98de\\u520d\\u633d\\u7cae \\u98de\\u520d\\u633d\\u7c9f \\u98de\\u884c\\u949f \\u98de\\u6881 \\u98de\\u7cae\\u633d\\u79e3 \\u98de\\u5347 \\u98de\\u624e \\u98de\\u5f81 \\u975e\\u7b7e\\u4e0d\\u53ef \\u975e\\u6e38\\u79bb\\u8f90\\u5c04\\u4f24\\u5bb3 \\u83f2\\u820d\\u5c14 \\u80a5\\u7682 \\u80a5\\u7682\\u83a2 \\u80a5\\u7682\\u5287 \\u80a5\\u7682\\u7d72 \\u80a5\\u7b51\\u65b9\\u8a00 \\u80ba\\u810f \\u5e9f\\u540e \\u8d39\\u5c14\\u5e72\\u7eb3 \\u8d39\\u91cc\\u514b\\u65af \\u5206\\u534a\\u949f \\u5206\\u5e03 \\u5206\\u591a\\u949f \\u5206\\u949f \\u5206\\u5b50\\u949f \\u711a\\u6bc1 \\u7c89\\u9762 \\u7c89\\u9762\\u6731\\u8123 \\u7caa\\u79fd\\u8511\\u9762 \\u4e30\\u6807 \\u4e30\\u91c7 \\u4e30\\u57ce \\u4e30\\u57ce\\u8d2f\\u6597 \\u4e30\\u5ea6 \\u4e30\\u60c5 \\u4e30\\u8338 \\u4e30\\u5bb9 \\u4e30\\u82e5\\u6709\\u808c\\u67d4\\u82e5\\u65e0\\u9aa8 \\u4e30\\u795e \\u4e30\\u6eaa\\u91cc \\u4e30\\u4eea \\u4e30\\u5100 \\u4e30\\u97f5 \\u4e30\\u97fb \\u4e30\\u59ff \\u98ce\\u91c7 \\u98ce\\u6597 \\u98ce\\u5e72 \\u98ce\\u522e \\u98ce\\u540e \\u98ce\\u5377 \\u98ce\\u5165\\u677e \\u98ce\\u571f\\u5fd7 \\u98ce\\u7269\\u5fd7 \\u98ce\\u4e91\\u4eba\\u7269 \\u5c01\\u540e \\u5c01\\u59bb\\u836b\\u5b50 \\u98a8\\u91c7 \\u5cf0\\u56de \\u8451\\u83f2\\u4e4b\\u91c7 \\u8702\\u540e \\u9022\\u51f6\\u5316\\u5409 \\u7f1d\\u5236 \\u51e4\\u7687\\u4e8e\\u871a \\u51e4\\u51f0\\u4e8e\\u871a \\u51e4\\u53f0 \\u51e4\\u5c3e\\u677e \\u51e4\\u5360 \\u5949\\u5e72 \\u5949\\u516c\\u514b\\u5df1 \\u4f5b\\u91cc\\u7279 \\u4f5b\\u5386 \\u4f5b\\u7f57\\u91cc\\u8fbe \\u4f5b\\u949f \\u592b\\u529b \\u592b\\u5f79 \\u80a4\\u53d1 \\u5f17\\u91cc\\u5f97\\u91cc\\u5e0c \\u5f17\\u91cc\\u5fb7\\u91cc\\u5e0c \\u5f17\\u91cc\\u6566 \\u5f17\\u91cc\\u66fc \\u4f0f\\u51e0 \\u4f0f\\u5c38\\u6d41\\u8840 \\u6276\\u5e7c\\u5468 \\u6276\\u4f59 \\u62c2\\u8361 \\u62c2\\u987b \\u62c2\\u949f\\u65e0\\u58f0 \\u670d\\u9970\\u5468 \\u670d\\u52a1\\u53f0 \\u670d\\u88c5\\u5468 \\u6d6e\\u6881 \\u6d6e\\u7b7e \\u6d6e\\u6258 \\u6d6e\\u6e38 \\u7b26\\u91c7 \\u798f\\u751f\\u4e8e\\u5fae \\u798f\\u836b \\u629a\\u5c38 \\u629a\\u5c38\\u6078\\u54ed \\u629a\\u677e \\u629a\\u6064 \\u8151\\u810f \\u8150\\u5e72 \\u7236\\u6bcd\\u5728\\u4e0d\\u8fdc\\u6e38 \\u8d1f\\u56fe\\u4e4b\\u6258 \\u5987\\u4eba\\u751f\\u987b \\u9644\\u81bb\\u9010\\u81ed \\u9644\\u81bb\\u9010\\u79fd \\u9644\\u81bb\\u9010\\u8165 \\u9644\\u6ce8 \\u590d\\u6309 \\u590d\\u8d25 \\u590d\\u676f \\u590d\\u88ab \\u590d\\u672c \\u590d\\u6bd4 \\u590d\\u5e87\\u4e4b\\u6069 \\u590d\\u853d \\u590d\\u58c1 \\u590d\\u53d8\\u51fd\\u6570 \\u590d\\u74ff \\u590d\\u6d4b \\u590d\\u67e5 \\u590d\\u67fb \\u590d\\u8f66 \\u590d\\u79f0 \\u590d\\u6210 \\u590d\\u5448 \\u590d\\u5e31 \\u590d\\u8bcd \\u590d\\u6b21 \\u590d\\u9053 \\u590d\\u7535 \\u590d\\u9f0e \\u590d\\u5bf9\\u6570 \\u590d\\u53d1 \\u590d\\u53d1\\u7387 \\u590d\\u53d1\\u6027 \\u590d\\u65b9 \\u590d\\u80a5 \\u590d\\u5206\\u89e3 \\u590d\\u5206\\u6570 \\u590d\\u5206\\u6790 \\u590d\\u8f85\\u97f3 \\u590d\\u590d \\u590d\\u76d6 \\u590d\\u9601 \\u590d\\u5171\\u8f6d \\u590d\\u679c \\u590d\\u6d77\\u79fb\\u5c71 \\u590d\\u91a2 \\u590d\\u51fd \\u590d\\u51fd\\u6570 \\u590d\\u5408 \\u590d\\u6838 \\u590d\\u5a5a \\u590d\\u5a5a\\u5236 \\u590d\\u57fa\\u56e0 \\u590d\\u68c0 \\u590d\\u9171\\u74ff \\u590d\\u8549\\u5bfb\\u9e7f \\u590d\\u53e5 \\u590d\\u51b3 \\u590d\\u519b \\u590d\\u5229 \\u590d\\u5217 \\u590d\\u6d41 \\u590d\\u9e7f\\u5bfb\\u8549 \\u590d\\u9e7f\\u9057\\u8549 \\u590d\\u9732 \\u590d\\u5192 \\u590d\\u6ca1 \\u590d\\u706d \\u590d\\u540d \\u590d\\u547d \\u590d\\u4ea9\\u73cd \\u590d\\u76ee \\u590d\\u5893 \\u590d\\u9006 \\u590d\\u62cd\\u5b50 \\u590d\\u76d8 \\u590d\\u76c6 \\u590d\\u8f9f \\u590d\\u9891 \\u590d\\u54c1\\u724c \\u590d\\u5e73\\u9762 \\u590d\\u8bc4 \\u590d\\u94b1 \\u590d\\u53bb\\u7ffb\\u6765 \\u590d\\u4ede\\u5e74\\u5982 \\u590d\\u8966 \\u590d\\u8d5b \\u590d\\u8272 \\u590d\\u4e0a \\u590d\\u5ba1 \\u590d\\u5f0f \\u590d\\u8bd5 \\u590d\\u89c6 \\u590d\\u8ff0 \\u590d\\u6570 \\u590d\\u6c34 \\u590d\\u8bf5 \\u590d\\u82cf \\u590d\\u6587 \\u590d\\u4e60 \\u590d\\u7ebf \\u590d\\u76f8\\u5173 \\u590d\\u6821 \\u590d\\u5199 \\u590d\\u4fe1 \\u590d\\u59d3 \\u590d\\u9009 \\u590d\\u7a74 \\u590d\\u5faa\\u73af\\u53d1\\u7535 \\u590d\\u8bad \\u590d\\u76d0 \\u590d\\u773c \\u590d\\u9a8c \\u590d\\u53f6 \\u590d\\u4ee5\\u767e\\u4e07 \\u590d\\u8bae \\u590d\\u610f \\u590d\\u97f3 \\u590d\\u5370 \\u590d\\u7528 \\u590d\\u76c2 \\u590d\\u96e8\\u7ffb\\u4e91 \\u590d\\u80b2 \\u590d\\u5143 \\u590d\\u5143\\u97f3 \\u590d\\u5458 \\u590d\\u5458\\u519b\\u4eba \\u590d\\u9605 \\u590d\\u97f5 \\u590d\\u6742 \\u590d\\u8f7d \\u590d\\u5728 \\u590d\\u5e10 \\u590d\\u8f99 \\u590d\\u8bca \\u590d\\u6b96\\u76ee \\u590d\\u6b96\\u5438\\u866b \\u590d\\u5236 \\u590d\\u79cd \\u590d\\u821f \\u590d\\u4f4f \\u590d\\u5b50\\u660e\\u8f9f \\u590d\\u5b57\\u952e \\u590d\\u5b97 \\u590d\\u7efc\\u8bed \\u590d\\ud86d\\udde7 \\u5085\\u91cc\\u53f6 \\u5085\\u5300\\u4f59 \\u5bcc\\u91cc \\u8986\\u96e8\\u7ffb\\u4e91 \\u99a5\\u90c1 \\u8be5\\u949f \\u6539\\u5ff5 \\u6539\\u7b7e \\u809d\\u810f \\u625e\\u5fa1 \\u6746\\u79e4 \\u6746\\u5200 \\u6746\\u83cc \\u6746\\u8335 \\u6746\\u76f4 \\u6746\\u72b6 \\u8d76\\u9762\\u68cd \\u8d76\\u5236 \\u6562\\u6597\\u4e86\\u80c6 \\u6a44\\u6984\\u5ca9 \\u64c0\\u9762 \\u5e72\\u963f\\u5976 \\u5e72\\u788d \\u5e72\\u71ac \\u5e72\\u5df4 \\u5e72\\u7238 \\u5e72\\u767d \\u5e72\\u676f \\u5e72\\u8d1d \\u5e72\\u7ef7 \\u5e72\\u903c \\u5e72\\u7178 \\u5e72\\u6241\\u8c46\\u89d2 \\u5e72\\u762a \\u5e72\\u51b0 \\u5e72\\u5265\\u5265 \\u5e72\\u4e0d \\u5e72\\u4e0d\\u5e72\\u676f \\u5e72\\u4e0d\\u5e72\\u51c0 \\u5e72\\u5e03 \\u5e72\\u64e6 \\u5e72\\u6750 \\u5e72\\u83dc \\u5e72\\u8349 \\u5e72\\u8336\\u94b1 \\u5e72\\u67f4 \\u5e72\\u4ea7 \\u5e72\\u5531 \\u5e72\\u7092\\u725b\\u6cb3 \\u5e72\\u57ce \\u5e72\\u6c60 \\u5e72\\u520d \\u5e72\\u8328\\u814a \\u5e72\\u6b64\\u676f \\u5e72\\u6b64\\u575b \\u5e72\\u918b \\u5e72\\u8106 \\u5e72\\u6751\\u6c99 \\u5e72\\u6253\\u96f7 \\u5e72\\u6253\\u5792 \\u5e72\\u65e6 \\u5e72\\u5f97 \\u5e72\\u5f97\\u5f88 \\u5e72\\u5f97\\u4e24\\u676f \\u5e72\\u5f97\\u4e09\\u676f \\u5e72\\u5f97\\u4e00\\u676f \\u5e72\\u7684 \\u5e72\\u706f\\u76cf \\u5e72\\u7b49 \\u5e72\\u77aa\\u773c \\u5e72\\u5730 \\u5e72\\u5f1f \\u5e72\\u70b9 \\u5e72\\u7535 \\u5e72\\u540a\\u7740\\u4e0b\\u5df4 \\u5e72\\u6389 \\u5e72\\u6389\\u90a3\\u676f \\u5e72\\u6389\\u90a3\\u7897 \\u5e72\\u6389\\u4e00\\u676f \\u5e72\\u6389\\u4e00\\u74f6 \\u5e72\\u6389\\u4e00\\u7897 \\u5e72\\u6389\\u8fd9\\u676f \\u5e72\\u6389\\u8fd9\\u7897 \\u5e72\\u7239 \\u5e72\\u65ad \\u5e72\\u513f \\u5e72\\u72af \\u5e72\\u996d \\u5e72\\u80a5 \\u5e72\\u7c89 \\u5e72\\u5e72 \\u5e72\\u7eb2 \\u5e72\\u7a3f \\u5e72\\u6208 \\u5e72\\u54e5 \\u5e72\\u6c9f \\u5e72\\u80a1 \\u5e72\\u5366 \\u5e72\\u9986 \\u5e72\\u679c \\u5e72\\u8fc7 \\u5e72\\u8fc7\\u676f \\u5e72\\u8fc7\\u4e00\\u676f \\u5e72\\u8fc7\\u763e \\u5e72\\u65f1 \\u5e72\\u568e \\u5e72\\u53f7 \\u5e72\\u8017 \\u5e72\\u548c \\u5e72\\u6db8 \\u5e72\\u7ea2 \\u5e72\\u7cc7 \\u5e72\\u82b1 \\u5e72\\u56de\\u4ed8 \\u5e72\\u54d5 \\u5e72\\u8d27 \\u5e72\\u970d\\u4e71 \\u5e72\\u59ec\\u677e\\u8338 \\u5e72\\u6025 \\u5e72\\u51e0\\u676f \\u5e72\\u51e0\\u624b \\u5e72\\u51e0\\u7897 \\u5e72\\u5b63 \\u5e72\\u5c06 \\u5e72\\u59dc \\u5e72\\u7126 \\u5e72\\u9175\\u6bcd \\u5e72\\u7ed3 \\u5e72\\u59d0 \\u5e72\\u75a5 \\u5e72\\u5c3d \\u5e72\\u5c3d\\u4e00\\u676f \\u5e72\\u5c3d\\u4e00\\u58fa \\u5e72\\u5c3d\\u4e00\\u575b \\u5e72\\u5c3d\\u4e00\\u7897 \\u5e72\\u4e95 \\u5e72\\u51c0 \\u5e72\\u6de8 \\u5e72\\u51ef\\u6587 \\u5e72\\u54b3 \\u5e72\\u6e34 \\u5e72\\u523b\\u7248 \\u5e72\\u67af \\u5e72\\u54ed \\u5e72\\u916a \\u5e72\\u4e86 \\u5e72\\u4e86\\u676f \\u5e72\\u4e86\\u8fd9\\u676f \\u5e72\\u4e86\\u8fd9\\u7897 \\u5e72\\u4e86\\u8fd9\\u4e00\\u676f \\u5e72\\u4e86\\u8fd9\\u4e00\\u74f6 \\u5e72\\u96f7 \\u5e72\\u51b7 \\u5e72\\u793c \\u5e72\\u674e\\u5b50 \\u5e72\\u8fde \\u5e72\\u51c9 \\u5e72\\u7cae \\u5e72\\u4e24\\u676f \\u5e72\\u91cf \\u5e72\\u6599 \\u5e72\\u6482\\u53f0 \\u5e72\\u88c2 \\u5e72\\u998f \\u5e72\\u843d \\u5e72\\u5988 \\u5e72\\u6bdb\\u5dfe \\u5e72\\u5192\\u70df \\u5e72\\u6ca1 \\u5e72\\u6885 \\u5e72\\u59b9 \\u5e72\\u9762 \\u5e72\\u7bfe\\u7247 \\u5e72\\u90a3 \\u5e72\\u90a3\\u676f \\u5e72\\u90a3\\u4e00\\u676f \\u5e72\\u6320 \\u5e72\\u4f60 \\u5e72\\u4f60\\u5a18 \\u5e72\\u5a18 \\u5e72\\u5974\\u624d \\u5e72\\u6696 \\u5e72\\u5973 \\u5e72\\u5455 \\u5e72\\u76ae\\u75c7 \\u5e72\\u5564 \\u5e72\\u7247 \\u5e72\\u6487\\u4e0b \\u5e72\\u621a \\u5e72\\u6f06 \\u5e72\\u8654 \\u5e72\\u4e54 \\u5e72\\u4eb2 \\u5e72\\u537f\\u5e95\\u4e8b \\u5e72\\u537f\\u4f55\\u4e8b \\u5e72\\u7403\\u6e29\\u5ea6 \\u5e72\\u6e20 \\u5e72\\u6270 \\u5e72\\u70ed \\u5e72\\u71b1 \\u5e72\\u8089 \\u5e72\\u98a1 \\u5e72\\u6da9 \\u5e72\\u70e7 \\u5e72\\u6d89 \\u5e72\\u4f38\\u820c \\u5e72\\u751f\\u6c14 \\u5e72\\u751f\\u53d7 \\u5e72\\u751f\\u5b50 \\u5e72\\u5c38 \\u5e72\\u6e7f \\u5e72\\u6e7f\\u53d1 \\u5e72\\u65f6 \\u5e72\\u5c4e\\u6a5b \\u5e72\\u5f0f \\u5e72\\u624b\\u51c0\\u811a \\u5e72\\u7626 \\u5e72\\u6570\\u676f \\u5e72\\u723d \\u5e72\\u4e1d \\u5e72\\u6b7b \\u5e72\\u95fc\\u5a46 \\u5e72\\u53f0 \\u5e72\\u82d4 \\u5e72\\u575b\\u5b50 \\u5e72\\u5802\\u5a76 \\u5e72\\u557c \\u5e72\\u7530 \\u5e72\\u900f \\u5e72\\u56fe \\u5e72\\u571f \\u5e72\\u575e \\u5e72\\u6d17 \\u5e72\\u7cfb \\u5e72\\u9c9c \\u5e72\\u8c61 \\u5e72\\u7b11 \\u5e72\\u85aa \\u5e72\\u6027 \\u5e72\\u4f11 \\u5e72\\u7663 \\u5e72\\u8840\\u6d46 \\u5e72\\u54d1 \\u5e72\\u54bd \\u5e72\\u773c \\u5e72\\u66dc \\u5e72\\u8c12 \\u5e72\\u4e00 \\u5e72\\u4e00\\u676f \\u5e72\\u4e00\\u575b \\u5e72\\u4e00\\u7897 \\u5e72\\u8863 \\u5e72\\u9091 \\u5e72\\u763e \\u5e72\\u786c \\u5e72\\u53c8\\u70ed \\u5e72\\u9c7c \\u5e72\\u4e0e \\u5e72\\u9884 \\u5e72\\u5706\\u6d01\\u51c0 \\u5e72\\u4e91\\u853d\\u65e5 \\u5e72\\u9020 \\u5e72\\u71e5 \\u5e72\\u8e81 \\u5e72\\u5b85 \\u5e72\\u7ad9\\u7740 \\u5e72\\u6298 \\u5e72\\u8fd9 \\u5e72\\u8fd9\\u676f \\u5e72\\u8fd9\\u4e00\\u676f \\u5e72\\u7740 \\u5e72\\u7740\\u6025 \\u5e72\\u653f \\u5e72\\u652f \\u5e72\\u652f\\u524c \\u5e72\\u652f\\u652f \\u5e72\\u679d \\u5e72\\u5236 \\u5e72\\u91cd \\u5e72\\u5b50 \\u5e72\\u59ca \\u5e72\\u5750\\u7740 \\u5188\\u7530\\u51c6 \\u521a\\u624d \\u521a\\u5e72 \\u94a2\\u6263 \\u94a2\\u6881 \\u94a2\\u5236 \\u6e2f\\u5236 \\u6760\\u6746 \\u69d3\\u6746 \\u9ad8\\u67cf\\u677e \\u9ad8\\u51e0 \\u9ad8\\u4e3d\\u53c2 \\u9ad8\\u826f\\u59dc \\u9ad8\\u6e05\\u613f \\u9ad8\\u90c1\\u6de8 \\u9ad8\\u653f\\u5347 \\u9ad8\\u5468\\u6ce2 \\u7cd5\\u5e72 \\u54af\\u5f53 \\u54e5\\u91cc \\u5272\\u820d \\u6b4c\\u540e \\u6b4c\\u949f \\u683c\\u91cc \\u683c\\u91cc\\u9ad8\\u5229\\u5386 \\u683c\\u91cc\\u5386 \\u683c\\u5217\\u9ad8\\u5229\\u5386 \\u9694\\u5468 \\u845b\\u91cc\\u82ac \\u845b\\u7f57\\u6258\\u65af\\u57fa \\u845b\\u65af\\u8303\\u6851 \\u4e2a\\u522b\\u6559\\u5b66 \\u4e2a\\u65e7 \\u4e2a\\u4eba\\u7535\\u8111 \\u4e2a\\u4eba\\u6d88\\u8d39 \\u4e2a\\u4e2d \\u4e2a\\u949f \\u5404\\u7c7b\\u949f \\u5404\\u91cc \\u5404\\u7b7e \\u6839\\u987b \\u6839\\u70df \\u8ddf\\u6597 \\u8015\\u83b7 \\u9abe\\u6734 \\u66f4\\u5f85\\u5e72\\u7f62 \\u66f4\\u949f \\u5de5\\u6b32\\u5584\\u5176\\u4e8b \\u5de5\\u81f4 \\u516c\\u5e03 \\u516c\\u6597 \\u516c\\u91cc \\u516c\\u5386 \\u516c\\u8ba4\\u4f1a\\u8ba1\\u51c6 \\u516c\\u5b59\\u4e11 \\u516c\\u4ed4\\u9762 \\u516c\\u5236\\u5355\\u4f4d \\u529f\\u81f4 \\u5bab\\u91cc \\u5bab\\u91cc\\u84dd \\u62f1\\u6258 \\u5171\\u94f2 \\u5171\\u548c\\u5386 \\u5171\\u540c\\u7ba1\\u9053 \\u5171\\u5fa1\\u5916\\u4fae \\u8d21\\u70df \\u4f9b\\u5236 \\u72d7\\u6263 \\u72d7\\u5a18\\u517b\\u7684 \\u72d7\\u5360\\u9a6c\\u5751 \\u8d2d\\u5e76 \\u8d2d\\u4e70\\u6b32 \\u5495\\u5495\\u949f \\u6cbd\\u540d\\u5e72\\u8a89 \\u5b64\\u5f81 \\u8f9c\\u6fc2\\u677e \\u53e4\\u8ff9 \\u53e4\\u91cc\\u53e4\\u602a \\u53e4\\u5207\\u91cc \\u53e4\\u4e66\\u4e91 \\u53e4\\u66f8\\u4e91 \\u53e4\\u5f26 \\u53e4\\u8a9e\\u4e91 \\u53e4\\u4e91 \\u53e4\\u949f \\u8c37\\u6c28\\u9178 \\u8c37\\u6c28\\u9170\\u80fa \\u8c37\\u4fdd\\u5bb6\\u5546 \\u8c37\\u4ed3 \\u8c37\\u8231 \\u8c37\\u8349 \\u8c37\\u573a \\u8c37\\u65e6 \\u8c37\\u9053 \\u8c37\\u7c89 \\u8c37\\u98ce \\u8c37\\u572d \\u8c37\\u8d35\\u997f\\u519c \\u8c37\\u8d35\\u997f\\u519c\\u8c37\\u8d31\\u4f24\\u519c \\u8c37\\u8d31\\u4f24\\u519c \\u8c37\\u7ce0 \\u8c37\\u58f3 \\u8c37\\u53e3 \\u8c37\\u53e3\\u8015\\u5ca9 \\u8c37\\u7c7b \\u8c37\\u7c92 \\u8c37\\u6881 \\u8c37\\u7c73 \\u8c37\\u82d7 \\u8c37\\u76ae \\u8c37\\u4eba \\u8c37\\u65e5 \\u8c37\\u795e \\u8c37\\u98df \\u8c37\\u7a57 \\u8c37\\u7269 \\u8c37\\u96e8 \\u8c37\\u5b50 \\u80a1\\u6817 \\u80a1\\u6817\\u80a4\\u7c9f \\u9aa8\\u5e72\\u5206\\u5b50 \\u9aa8\\u7070\\u575b \\u9aa8\\u575b \\u9aa8\\u5934\\u91cc\\u6323\\u51fa\\u6765\\u7684\\u94b1\\u624d\\u505a\\u5f97\\u8089 \\u9f13\\u8361 \\u9f13\\u566a \\u9e58\\u4ed1\\u541e\\u67a3 \\u6545\\u91cc \\u6545\\u4e91 \\u987e\\u501f \\u522e\\u5927\\u98ce \\u522e\\u5012 \\u522e\\u5f97 \\u522e\\u98ce \\u522e\\u80e1 \\u522e\\u4e86 \\u522e\\u8d77 \\u522e\\u53bb \\u522e\\u987b \\u522e\\u96ea \\u522e\\u7740 \\u522e\\u8d70 \\u5be1\\u6b32 \\u6302\\u8868 \\u6302\\u6597 \\u6302\\u51a0 \\u6302\\u51a0\\u5f52\\u91cc \\u6302\\u89d2\\u8bfb\\u4e66 \\u6302\\u5386 \\u6302\\u9762 \\u6302\\u949f \\u62d0\\u68d2 \\u62d0\\u68cd \\u62d0\\u6756 \\u62d0\\u5b50 \\u602a\\u91cc\\u602a\\u6c14 \\u5173\\u5f13\\u4e0e\\u6211\\u786e \\u5173\\u7cfb \\u5173\\u5cb3 \\u5173\\u5f81 \\u89c2\\u5149\\u5468 \\u89c2\\u53f6\\u690d\\u7269 \\u5b98\\u5730\\u4e3a\\u91c7 \\u5b98\\u5386 \\u5b98\\u51c6 \\u9986\\u8c37 \\u7ba1\\u9053\\u5347 \\u7ba1\\u5f26 \\u51a0\\u519b\\u676f \\u51a0\\u80c4 \\u704c\\u5236 \\u5149\\u91c7 \\u5149\\u6746 \\u5149\\u5364\\u77f3 \\u5149\\u81f4\\u81f4 \\u54a3\\u5f53 \\u5e7f\\u5e03 \\u5e7f\\u90e8 \\u5e7f\\u820d \\u5f52\\u5e76 \\u7845\\u8d28\\u5ca9 \\u7678\\u4e11 \\u67dc\\u67f3 \\u67dc\\u53f0 \\u8d35\\u4ef7 \\u6842\\u5706\\u5e72 \\u6842\\u4ed4\\u4e91 \\u90ed\\u91c7\\u6d01 \\u90ed\\u677e\\u7118 \\u90ed\\u5b50\\u5e72 \\u9505\\u4f19 \\u56fd\\u9645\\u6f2b\\u6e38\\u62e8\\u63a5\\u670d\\u52a1 \\u56fd\\u5386 \\u56fd\\u7acb\\u53f0\\u6e7e\\u56fe\\u4e66\\u9986 \\u56fd\\u6881 \\u56fd\\u4e4b\\u6862\\u5e72 \\u679c\\u5e72 \\u679c\\u5b50\\u5e72 \\u88f9\\u624e \\u8fc7\\u51b2 \\u8fc7\\u6881 \\u8fc7\\u6c34\\u9762 \\u54c8\\u91cc \\u54c8\\u91cc\\u91cc \\u8fd8\\u8f9f \\u6d77\\u53c2 \\u6d77\\u6dc0 \\u6d77\\u5e72 \\u6d77\\u91cc \\u6d77\\u9a6c\\u56de \\u6d77\\u677e \\u6d77\\u9c9c\\u9762 \\u6d77\\u4e8e\\u683c\\u677e \\u6d77\\u5cb3\\u540d\\u8a00 \\u542b\\u9f7f\\u6234\\u53d1 \\u542b\\u6cb9\\u5ca9 \\u51fd\\u590d \\u97e9\\u590d\\u77e9 \\u97e9\\u56fd\\u5236 \\u97e9\\u5347\\u6d19 \\u97e9\\u4f82\\u80c4 \\u97e9\\u5236 \\u6c49\\u5f25\\u767b\\u949f \\u65f1\\u5e72 \\u65f1\\u70df \\u634d\\u5fa1 \\u884c\\u4e2a\\u65b9\\u4fbf \\u884c\\u674e\\u5377 \\u884c\\u4e8b\\u5386 \\u884c\\u4e07\\u91cc\\u8def\\u80dc\\u8bfb\\u4e07\\u5377\\u4e66 \\u884c\\u4f63 \\u884c\\u9488 \\u884c\\u9488\\u5e03\\u7ebf \\u822a\\u6d77\\u5386 \\u84bf\\u91cc \\u6beb\\u53d1 \\u8c6a\\u6c14\\u5e72\\u4e91 \\u597d\\u4e0d\\u5bb9\\u6613\\u624d \\u597d\\u5e72 \\u597d\\u56f0 \\u597d\\u51f6 \\u597d\\u4e00\\u51fa \\u53f7\\u5fd7 \\u7693\\u9f7f\\u6731\\u5507 \\u7693\\u53d1 \\u559d\\u91c7 \\u559d\\u5012\\u91c7 \\u559d\\u5e72 \\u79be\\u8c37 \\u5408\\u516b\\u5b57 \\u5408\\u5e76 \\u5408\\u6210\\u4e50\\u5668 \\u5408\\u5403 \\u5408\\u513f \\u5408\\u5e9c \\u5408\\u5bb6 \\u5408\\u5386 \\u5408\\u7b7e \\u5408\\u773c \\u5408\\u4e8e \\u5408\\u4e8e\\u65f6\\u5b9c \\u5408\\u4e2d \\u5408\\u4f5c \\u5408\\u4f5c\\u4f19\\u4f34 \\u4f55\\u5e72 \\u4f55\\u6770\\u91d1\\u6c0f\\u75c5 \\u4f55\\u5c0f\\u5347 \\u548c\\u5978 \\u548c\\u9762 \\u548c\\u5e73\\u91cc \\u548c\\u5f26 \\u52be\\u7cfb \\u6cb3\\u5e72 \\u6cb3\\u91cc \\u6cb3\\u91cc\\u5b69\\u513f\\u5cb8\\u4e0a\\u5a18 \\u6cb3\\u5347\\u9547 \\u8377\\u91cc\\u6d3b \\u6838\\u4fdd \\u6838\\u62a5 \\u6838\\u7f16 \\u6838\\u62e8 \\u6838\\u67e5 \\u6838\\u5b9a \\u6838\\u5bf9 \\u6838\\u590d \\u6838\\u8ba1 \\u6838\\u4ef7 \\u6838\\u51cf \\u6838\\u6279 \\u6838\\u5ba1 \\u6838\\u5b9e \\u6838\\u793a \\u6838\\u6536 \\u6838\\u7b97 \\u6838\\u9500 \\u6838\\u9a8c \\u6838\\u51c6 \\u6838\\u8d44 \\u6838\\u5b57 \\u6db8\\u5e72 \\u8d3a\\u540e\\u9a82\\u6bbf \\u8d6b\\u5f17\\u91cc\\u5e0c \\u9e64\\u540a \\u9e64\\u53d1 \\u9e64\\u9aa8\\u677e\\u59ff \\u9ed1\\u6697\\u4e16\\u754c \\u9ed1\\u53d1 \\u9ed1\\u4eae\\u53d1 \\u9ed1\\u9762 \\u9ed1\\u677e \\u9ed1\\u987b \\u9ed1\\u66dc\\u5ca9 \\u5f88\\u5e72 \\u6a2a\\u6881 \\u70d8\\u5e72 \\u70d8\\u6258 \\u70d8\\u718f \\u70d8\\u4e91\\u6258\\u6708 \\u70d8\\u5236 \\u5f18\\u5386 \\u7ea2\\u53d1 \\u7ea2\\u7ef3\\u7cfb\\u8db3 \\u7ea2\\u4e1d\\u6697\\u7cfb \\u7ea2\\u677e \\u7ea2\\u987b\\u7eff\\u773c \\u7ea2\\u53f6 \\u7ea2\\u53f6\\u676f \\u7ea2\\u949f \\u6d2a\\u590d \\u6d2a\\u5347 \\u6d2a\\u58eb\\u6770 \\u6d2a\\u9002 \\u6d2a\\u949f \\u54c4\\u52a8 \\u54c4\\u4f19 \\u54c4\\u95f9 \\u54c4\\u7136 \\u54c4\\u5802 \\u54c4\\u7b11 \\u6f92\\u8499 \\u5589\\u5e72\\u820c\\u71e5 \\u540e\\u5b89\\u8def \\u540e\\u6446 \\u540e\\u5317\\u8857 \\u540e\\u5e1d \\u540e\\u53d1\\u5ea7 \\u540e\\u5983 \\u540e\\u4e30 \\u540e\\u8c50 \\u540e\\u51a0 \\u540e\\u6d77\\u6e7e \\u540e\\u6d77\\u7063 \\u540e\\u7687 \\u540e\\u7a37 \\u540e\\u89d2 \\u540e\\u8857 \\u540e\\u91cc \\u540e\\u5a18 \\u540e\\u8f9f \\u540e\\u5e73\\u8def \\u540e\\u571f \\u540e\\u738b \\u540e\\u8f9b \\u540e\\u7fbf \\u540e\\u5236 \\u540e\\u5ea7 \\u540e\\u5ea7\\u7cfb \\u539a\\u6734 \\u5ffd\\u820d\\u4e0b \\u72d0\\u501f\\u864e\\u5a01 \\u80e1\\u78b4\\u5b50 \\u80e1\\u5403\\u6d77\\u559d \\u80e1\\u5403\\u95f7\\u7761 \\u80e1\\u532a \\u80e1\\u6912 \\u80e1\\u6912\\u9762 \\u80e1\\u6770 \\u80e1\\u91cc\\u80e1\\u6d82 \\u80e1\\u9aef \\u80e1\\u68a2 \\u80e1\\u540c \\u80e1\\u6258\\u83ab \\u80e1\\u987b \\u80e1\\u4e91 \\u80e1\\u6e23 \\u80e1\\u9aed \\u80e1\\u5b50 \\u9e44\\u53d1 \\u7cca\\u53e3 \\u7cca\\u91cc\\u7cca\\u6d82 \\u864e\\u76ae\\u677e \\u864e\\u987b \\u62a4\\u53d1 \\u623d\\u6597 \\u82b1\\u5eb5\\u8bcd\\u9009 \\u82b1\\u91c7 \\u82b1\\u53d1\\u8001 \\u82b1\\u5c97\\u5ca9 \\u82b1\\u54c4 \\u82b1\\u6912\\u9762 \\u82b1\\u5377 \\u82b1\\u9a6c\\u540a\\u5634 \\u82b1\\u6258 \\u82b1\\u836f \\u82b1\\u949f \\u5212\\u4e0d\\u6765 \\u5212\\u8239 \\u5212\\u5355\\u4eba\\u8247 \\u5212\\u5230 \\u5212\\u5230\\u5cb8 \\u5212\\u5230\\u6c5f\\u5fc3 \\u5212\\u5f97 \\u5212\\u5f97\\u6765 \\u5212\\u52a8 \\u5212\\u8fc7 \\u5212\\u8fc7\\u6765 \\u5212\\u8fc7\\u53bb \\u5212\\u884c \\u5212\\u6868 \\u5212\\u8fdb \\u5212\\u5177 \\u5212\\u6765 \\u5212\\u4e86 \\u5212\\u4e86\\u4e00\\u4f1a \\u5212\\u9f99\\u821f \\u5212\\u8d77 \\u5212\\u62f3 \\u5212\\u53cc\\u4eba \\u5212\\u6c34 \\u5212\\u7b97 \\u5212\\u8247 \\u5212\\u5411 \\u5212\\u4e00 \\u5212\\u4e00\\u6868 \\u5212\\u7740 \\u5212\\u5b50 \\u5212\\u8d70 \\u534e\\u53d1 \\u534e\\u6838 \\u534e\\u91cc \\u534e\\u4e25\\u949f \\u54d7\\u7684 \\u54d7\\u5730 \\u54d7\\u54d7 \\u54d7\\u5566 \\u6ed1\\u6746 \\u6ed1\\u501f \\u753b\\u6881\\u96d5\\u680b \\u6000\\u8868 \\u6000\\u949f \\u73af\\u6e38\\u4e16\\u754c \\u6362\\u6321\\u6746 \\u6362\\u6863\\u6746 \\u6362\\u53d1 \\u6362\\u53ea \\u64d0\\u7cfb \\u614c\\u91cc\\u614c\\u5f20 \\u7687\\u540e \\u7687\\u6781 \\u7687\\u6781\\u5386 \\u7687\\u5386 \\u7687\\u8f9f \\u9ec4\\u4e1c\\u6881 \\u9ec4\\u53d1 \\u9ec4\\u5e72\\u9ed1\\u7626 \\u9ec4\\u91d1\\u5468 \\u9ec4\\u4fca\\u6770 \\u9ec4\\u5386 \\u9ec4\\u6881 \\u9ec4\\u6881\\u7f8e\\u68a6 \\u9ec4\\u73ee\\u7b51 \\u9ec4\\u66f2\\u6bd2\\u7d20 \\u9ec4\\u987b \\u9ec4\\u65ed\\u5347 \\u9ec4\\u5ca9 \\u9ec4\\u90c1\\u6db5 \\u9ec4\\u90c1\\u8339 \\u9ec4\\u80b2\\u6770 \\u9ec4\\u94b0\\u7b51 \\u9ec4\\u949f \\u9ec4\\u949f\\u6bc1\\u5f03 \\u9ec3\\u923a\\u7b51 \\u6e5f\\u6f66\\u751f\\u82f9 \\u6643\\u8361 \\u7070\\u53d1 \\u7070\\u80e1 \\u7070\\u8499 \\u8f89\\u7eff\\u5ca9 \\u8f89\\u957f\\u5ca9 \\u56de\\u907f \\u56de\\u98d9 \\u56de\\u80a0 \\u56de\\u51b2 \\u56de\\u5e26 \\u56de\\u8361 \\u56de\\u9012\\u6027 \\u56de\\u98ce \\u56de\\u590d \\u56de\\u5149\\u8fd4\\u7167 \\u56de\\u5f52 \\u56de\\u62a4 \\u56de\\u73af \\u56de\\u9ec4\\u5012\\u7682 \\u56de\\u9b42\\u4ed9\\u68a6 \\u56de\\u654e\\u4f1a\\u8bae\\u7ec4\\u7ec7 \\u56de\\u6559\\u4e16\\u754c \\u56de\\u5377 \\u56de\\u5eca \\u56de\\u5386 \\u56de\\u6d41 \\u56de\\u8def \\u56de\\u92ae \\u56de\\u76f2\\u74e3 \\u56de\\u68a6 \\u56de\\u6e05\\u5012\\u5f71 \\u56de\\u5708 \\u56de\\u7ed5 \\u56de\\u58f0 \\u56de\\u58f0\\u63a2\\u6d4b \\u56de\\u8bf5 \\u56de\\u5929 \\u56de\\u8155 \\u56de\\u6587 \\u56de\\u7eb9\\u9488 \\u56de\\u65a1 \\u56de\\u7fd4 \\u56de\\u54cd \\u56de\\u5411 \\u56de\\u5fc3 \\u56de\\u5f62\\u5939 \\u56de\\u65cb \\u56de\\u7a74 \\u56de\\u96ea \\u56de\\u9633\\u8361\\u6c14 \\u56de\\u97f3 \\u56de\\u5e94 \\u56de\\u4f63 \\u56de\\u6e38 \\u56de\\u531d \\u56de\\u8f6c \\u6d04\\u6697 \\u6d04\\u6e38 \\u6bc1\\u5f03 \\u6bc1\\u8bec \\u6bc1\\u7280 \\u6bc1\\u708e \\u6bc1\\u8a89 \\u6bc1\\u949f\\u4e3a\\u94ce \\u6c47\\u62a5 \\u6c47\\u7f16 \\u6c47\\u96c6 \\u6c47\\u8f91 \\u6c47\\u520a \\u6c47\\u7b97 \\u6c47\\u6620 \\u6c47\\u6574 \\u6c47\\u603b \\u6c47\\u7e82 \\u4f1a\\u540a \\u4f1a\\u7b7e\\u5236\\u5ea6 \\u7ed8\\u91cc \\u7ed8\\u5236 \\u70e9\\u9762 \\u60e0\\u91cc\\u9999 \\u6703\\u5e72\\u64fe \\u6d51\\u6734\\u81ea\\u7136 \\u6d51\\u4eea\\u6ce8 \\u9984\\u9968\\u9762 \\u6d3b\\u6263 \\u6d3b\\u585e\\u6746 \\u706b\\u676f \\u706b\\u5e76 \\u706b\\u67f4\\u6746 \\u706b\\u6210\\u5ca9 \\u706b\\u6597 \\u706b\\u70ac\\u677e \\u706b\\u7ef3\\u6746 \\u706b\\u4e2d\\u53d6\\u6817 \\u4f19\\u623f \\u4f19\\u592b \\u4f19\\u98df \\u4f19\\u5934 \\u6216\\u7cfb\\u4e4b\\u725b \\u83b7\\u51c6 \\u970d\\u514b\\u677e \\u970d\\u91cc \\u51fb\\u949f \\u9965\\u8352 \\u9965\\u9991 \\u9965\\u6c11 \\u9965\\u5e74 \\u673a\\u8f9f \\u673a\\u5668\\u538b\\u5236 \\u673a\\u68b0\\u8868 \\u673a\\u68b0\\u949f \\u9e21\\u86cb\\u91cc\\u6311\\u9aa8\\u5934 \\u9e21\\u86cb\\u9762 \\u9e21\\u5978 \\u9e21\\u5c38\\u725b\\u4ece \\u9e21\\u4e1d \\u9e21\\u4e1d\\u9762 \\u9e21\\u817f\\u9762 \\u9e21\\u53ea \\u79ef\\u8c37 \\u79ef\\u8c37\\u9632\\u9965 \\u79ef\\u91d1\\u81f3\\u6597 \\u57fa\\u91cc\\u5df4\\u65af \\u57fa\\u91cc\\u5170\\u67ef \\u57fa\\u5ca9 \\u8d4d\\u5fd7\\u6ca1\\u5730 \\u7b95\\u6597 \\u7a3d\\u6838 \\u6fc0\\u8361 \\u7f81\\u7cfb \\u5409\\u91cc \\u5409\\u666e\\u65af\\u5938 \\u5409\\u7530\\u677e\\u9634 \\u5409\\u51f6 \\u5409\\u51f6\\u5e86\\u540a \\u5409\\u5360 \\u6781\\u4e50\\u4e16\\u754c \\u6025\\u5f81\\u91cd\\u655b \\u96c6\\u4e2d\\u6258\\u8fd0 \\u96c6\\u6ce8 \\u51e0\\u6848 \\u51e0\\u51fa \\u51e0\\u51f3 \\u51e0\\u6746 \\u51e0\\u4e4e\\u5b8c\\u5168 \\u51e0\\u51e0 \\u51e0\\u51c0\\u7a97\\u660e \\u51e0\\u7387 \\u51e0\\u9762\\u4e0a \\u51e0\\u65c1 \\u51e0\\u5339\\u9a6c \\u51e0\\u4e0a \\u51e0\\u4e16\\u7eaa \\u51e0\\u69bb \\u51e0\\u5e2d \\u51e0\\u7b75 \\u51e0\\u6905 \\u51e0\\u6756 \\u51e0\\u53ea \\u51e0\\u5b50 \\u5df1\\u4e11 \\u866e\\u8768\\u76f8\\u540a \\u810a\\u6881 \\u8ba1\\u65f6\\u8868 \\u7eaa\\u91cc\\u8c37 \\u7eaa\\u5386 \\u7eaa\\u5ff5 \\u7eaa\\u5ff5\\u5468 \\u6280\\u672f\\u5355\\u4f4d \\u6280\\u672f\\u6f5c\\u6c34 \\u5fcc\\u70df \\u5b63\\u54b8 \\u8ff9\\u8e48 \\u89ca\\u5e78 \\u796d\\u540a \\u796d\\u5c38 \\u52a0\\u5377 \\u52a0\\u62c9\\u5e72\\u8fbe \\u52a0\\u91cc \\u52a0\\u7b7e \\u52a0\\u6ce8 \\u4f73\\u91cc \\u5bb6\\u4f19 \\u5bb6\\u5177 \\u5bb6\\u4ff1 \\u5bb6\\u4ec0 \\u5bb6\\u79c1 \\u50a2\\u4f19 \\u5609\\u67cf\\u9686\\u91cc \\u5609\\u8c37 \\u5939\\u6ce8 \\u988a\\u987b \\u7532\\u80c4 \\u8d3e\\u540e \\u5047\\u53d1 \\u8cc8\\u540e \\u4ef7\\u7535\\u5b50 \\u67b6\\u6881 \\u67b6\\u949f \\u5c16\\u7ba1\\u9762 \\u5978\\u76d7\\u90aa\\u6deb \\u5978\\u975e \\u5978\\u592b \\u5978\\u4f0f \\u5978\\u5987 \\u5978\\u60c5 \\u5978\\u6740 \\u5978\\u5c38 \\u5978\\u901a \\u5978\\u6c61 \\u5978\\u51f6 \\u5978\\u6deb \\u575a\\u81f4 \\u95f4\\u4e0d\\u5bb9\\u53d1 \\u8270\\u5de8 \\u8270\\u82e6\\u5907\\u5c1d \\u76d1\\u7cfb \\u76d1\\u5236 \\u517c\\u5e76 \\u517c\\u7b79\\u5e76\\u987e \\u517c\\u5bb9\\u5e76\\u84c4 \\u517c\\u6536\\u5e76\\u84c4 \\u7b3a\\u6ce8 \\u714e\\u9762 \\u8327\\u6817 \\u4fed\\u786e\\u4e4b\\u6559 \\u68c0\\u590d \\u526a\\u5f69 \\u526a\\u53d1 \\u526a\\u5176\\u53d1 \\u7b80\\u5e76 \\u7b80\\u671d\\u4ed1 \\u7b80\\u4f59\\u664f \\u622c\\u8c37 \\u78b1\\u6027\\u5ca9 \\u7fe6\\u5f69 \\u89c1\\u590d \\u89c1\\u9274 \\u4ef6\\u949f \\u5efa\\u7b51\\u673a\\u68b0 \\u8350\\u9965 \\u8350\\u5c45 \\u8350\\u81fb \\u5251\\u6746 \\u8230\\u53ea \\u9274\\u6838\\u5907\\u67fb \\u7bad\\u6746 \\u6c5f\\u91c7\\u82f9 \\u6c5f\\u5e72 \\u6c5f\\u5e72\\u533a \\u59dc\\u997c \\u59dc\\u8336 \\u59dc\\u6842 \\u59dc\\u8fd8\\u662f\\u8001 \\u59dc\\u9ec4 \\u59dc\\u5c31\\u662f\\u8001 \\u59dc\\u8fa3 \\u59dc\\u8001\\u8fa3 \\u59dc\\u9ebb\\u56ed \\u59dc\\u672b \\u59dc\\u6bcd \\u59dc\\u7247 \\u59dc\\u5207\\u7247 \\u59dc\\u84c9 \\u59dc\\u77f3\\u5e74 \\u59dc\\u662f\\u8001 \\u59dc\\u4e1d \\u59dc\\u6c64 \\u59dc\\u7cd6 \\u59dc\\u6587\\u6770 \\u59dc\\u90c1\\u7f8e \\u59dc\\u6108\\u8001\\u6108\\u8fa3 \\u59dc\\u8d8a\\u8001\\u8d8a\\u8fa3 \\u59dc\\u6c41 \\u50f5\\u8695 \\u50f5\\u4ec6 \\u50f5\\u5c38 \\u5f4a\\u5fa1 \\u5956\\u676f \\u4ea4\\u5e76 \\u4ea4\\u54c4 \\u6d47\\u5236 \\u80f6\\u5377 \\u7126\\u5e72 \\u7126\\u83b7 \\u7901\\u5ca9 \\u56bc\\u8c37 \\u89d2\\u91cc \\u7ede\\u5e72 \\u77eb\\u60c5\\u5e72\\u8a89 \\u811a\\u592b \\u811a\\u6263 \\u811a\\u70bc \\u811a\\u9178 \\u811a\\u6ce8 \\u510c\\u5e78 \\u5fbc\\u5e78 \\u8f7f\\u592b \\u6559\\u5b66\\u949f \\u55df\\u5401 \\u8857\\u91cc\\u8857\\u574a \\u8282\\u6b32 \\u6770\\u5f17\\u91cc\\u4e54\\u53df \\u6770\\u91cc\\u7c73 \\u6770\\u91cc\\u68ee \\u6770\\u4f26 \\u6770\\u7279 \\u62ee\\u636e \\u7ed3\\u91c7 \\u7ed3\\u5f69 \\u7ed3\\u53d1 \\u7ed3\\u6676\\u5ca9 \\u7ed3\\u6263 \\u7ed3\\u6258 \\u7ed3\\u624e \\u622a\\u53d1 \\u89e3\\u53d1 \\u89e3\\u53d1\\u4f6f\\u72c2 \\u89e3\\u6263 \\u89e3\\u94c3\\u7cfb\\u94c3 \\u4ecb\\u7cfb\\u8bcd \\u4ecb\\u80c4 \\u6212\\u70df \\u501f\\u8349\\u6795\\u5757 \\u501f\\u8bcd \\u501f\\u6b64 \\u501f\\u7aef \\u501f\\u69c1 \\u501f\\u6545 \\u501f\\u5349 \\u501f\\u673a \\u501f\\u501f \\u501f\\u53e3 \\u501f\\u5bc7\\u5175 \\u501f\\u751a \\u501f\\u624b \\u501f\\u6258 \\u501f\\u4ee5 \\u501f\\u7531 \\u501f\\u7740 \\u501f\\u52a9 \\u501f\\u7bb8 \\u501f\\u7bb8\\u4ee3\\u7b79 \\u501f\\u8d44 \\u65a4\\u6597 \\u91d1\\u676f \\u91d1\\u8868 \\u91d1\\u4f2f\\u5229\\u5ca9 \\u91d1\\u6597 \\u91d1\\u53d1 \\u91d1\\u91cc\\u5947 \\u91d1\\u94fe \\u91d1\\u4ed1\\u6eaa \\u91d1\\u9a6c\\u4ed1\\u9053 \\u91d1\\u94b1\\u677e \\u91d1\\u5347\\u572d \\u91d1\\u5c5e\\u6746 \\u91d1\\u5c5e\\u5236 \\u91d1\\u5370\\u5982\\u6597 \\u91d1\\u949f \\u89d4\\u6597 \\u6d25\\u6881 \\u7b4b\\u6597 \\u7d27\\u7cfb \\u7d27\\u81f4 \\u9526\\u56ca\\u4f73\\u5236 \\u5c3d\\u5e95\\u4e0b \\u5c3d\\u591f \\u5c3d\\u7ba1 \\u5c3d\\u6559 \\u5c3d\\u5c3d \\u5c3d\\u53ef \\u5c3d\\u5feb \\u5c3d\\u91cc \\u5c3d\\u91cf \\u5c3d\\u843d\\u5c3e \\u5c3d\\u8ba9 \\u5c3d\\u901f \\u5c3d\\u5148 \\u5c3d\\u60f3 \\u5c3d\\u6027 \\u5c3d\\u610f \\u5c3d\\u610f\\u968f\\u5fc3 \\u5c3d\\u6709\\u53ef\\u80fd \\u5c3d\\u65e9 \\u5c3d\\u5b50 \\u5c3d\\u81ea \\u8fd1\\u65e5\\u7121\\u4ec7 \\u6d78\\u5236 \\u7981\\u6bc1 \\u7981\\u70df \\u7981\\u6b32 \\u7ecf\\u6298 \\u8346\\u5c38 \\u83c1\\u82f1\\u676f \\u65cc\\u6064 \\u60ca\\u53f9 \\u60ca\\u8d5e \\u60ca\\u949f \\u7cbe\\u91c7 \\u7cbe\\u5947\\u91cc\\u6c5f \\u7cbe\\u5236 \\u7cbe\\u81f4 \\u9cb8\\u987b \\u4e95\\u5e72 \\u9888\\u94fe \\u666f\\u81f4 \\u8b66\\u62a5\\u949f \\u8b66\\u793a\\u949f \\u8b66\\u4e16\\u949f \\u8b66\\u949f \\u51c0\\u53d1 \\u6de8\\u53d1 \\u656c\\u9274 \\u656c\\u633d \\u656c\\u70df \\u8fe5\\u7136\\u56de\\u5f02 \\u63ea\\u53d1 \\u63ea\\u987b \\u4e5d\\u8c37 \\u4e5d\\u91cc \\u4e5d\\u70bc\\u6210\\u94a2 \\u4e5d\\u624e \\u4e5d\\u53ea \\u9152\\u5e72\\u6389 \\u9152\\u5e72\\u5c3d \\u9152\\u5e72\\u4e86 \\u9152\\u5e18 \\u9152\\u6c14\\u718f\\u4eba \\u9152\\u66f2 \\u9152\\u575b \\u9152\\u5df2\\u5e72 \\u9152\\u6e38\\u82b1 \\u65e7\\u8868 \\u65e7\\u5386 \\u65e7\\u949f \\u5c31\\u5403\\u5e72 \\u5c31\\u7cfb \\u62d8\\u7cfb \\u5c45\\u91cc \\u5c40\\u4fc3 \\u5c40\\u9650 \\u5480\\u54bd \\u8392\\u5149\\u5468 \\u4e3e\\u8350\\u5f81\\u8f9f \\u4e3e\\u624b\\u53ef\\u91c7 \\u5de8\\u53d8 \\u5de8\\u989d \\u5de8\\u5bcc \\u5de8\\u516c \\u5de8\\u5978 \\u5de8\\u8230 \\u5de8\\u5956 \\u5de8\\u6b3e \\u5de8\\u4e8f \\u5de8\\u9e7f \\u5de8\\u5546 \\u5de8\\u9ecd \\u5de8\\u8d2a \\u5de8\\u4e07 \\u5de8\\u7ec6 \\u5de8\\u732e \\u5de8\\u7965 \\u5de8\\u91ce \\u5de8\\u4e1a \\u5de8\\u503a \\u5de8\\u5236 \\u5de8\\u8457 \\u5de8\\u5b50 \\u5de8\\u4f5c \\u62d2\\u70df \\u636e\\u5e72\\u800c\\u7aa5\\u4e95\\u5e95 \\u636e\\u4e91 \\u805a\\u836f\\u96c4\\u854a \\u5377\\u5305 \\u5377\\u997c \\u5377\\u4e0d\\u8d77 \\u5377\\u5c64\\u4e91 \\u5377\\u7f20 \\u5377\\u6210 \\u5377\\u5c3a \\u5377\\u5230 \\u5377\\u52a8 \\u5377\\u53d1 \\u5377\\u98ce \\u5377\\u94a2 \\u5377\\u8fc7 \\u5377\\u56de \\u5377\\u7532 \\u5377\\u7532\\u91cd\\u6765 \\u5377\\u8fdb \\u5377\\u5f00 \\u5377\\u6b3e \\u5377\\u6765 \\u5377\\u6765\\u5377\\u53bb \\u5377\\u6d6a \\u5377\\u4e86 \\u5377\\u5e18 \\u5377\\u62e2 \\u5377\\u843d\\u53f6 \\u5377\\u6bdb \\u5377\\u68da \\u5377\\u94fa\\u76d6 \\u5377\\u8216\\u76d6 \\u5377\\u8d77 \\u5377\\u7fd8 \\u5377\\u66f2 \\u5377\\u53bb \\u5377\\u5203 \\u5377\\u5165 \\u5377\\u4e0a \\u5377\\u820c \\u5377\\u7f29 \\u5377\\u9003 \\u5377\\u7b52 \\u5377\\u56fe \\u5377\\u571f \\u5377\\u817f\\u88e4 \\u5377\\u5c3e\\u7334 \\u5377\\u5438\\u4f5c\\u7528 \\u5377\\u7ebf\\u5668 \\u5377\\u5fc3 \\u5377\\u8896 \\u5377\\u987b \\u5377\\u65cb \\u5377\\u70df \\u5377\\u70df\\u753b\\u7247 \\u5377\\u83f8 \\u5377\\u626c \\u5377\\u4e00\\u5377 \\u5377\\u8863\\u8896 \\u5377\\u4e91 \\u5377\\u7eb8 \\u5377\\u4f4f \\u5377\\u8d70 \\u7edd\\u7f18\\u53f0 \\u519b\\u8230\\u5ca9 \\u541b\\u5b50\\u4e8e\\u5f79 \\u94a7\\u590d \\u94a7\\u9274 \\u83cc\\u6258 \\u5580\\u62c9\\u5580\\u6258\\u706b\\u5c71 \\u5361\\u8fea\\u62c9\\u514b \\u5361\\u91cc \\u5361\\u91cc\\u624e\\u5fb7 \\u5361\\u6d1b\\u91cc \\u5361\\u8036\\u91cc \\u5f00\\u8bda\\u5e03\\u516c \\u5f00\\u540a \\u5f00\\u53d1\\u4e3a \\u5f00\\u53d1\\u4e2d\\u56fd \\u5f00\\u54c4 \\u5f00\\u4f19 \\u63e9\\u5e72 \\u63e9\\u53f0\\u62b9\\u51f3 \\u51ef\\u8fea\\u62c9\\u514b \\u51ef\\u91cc \\u94e0\\u80c4 \\u520a\\u5e03 \\u770b\\u8868 \\u770b\\u4e0b\\u8868 \\u770b\\u4e0b\\u949f \\u770b\\u949f \\u5eb7\\u91c7\\u6069 \\u625b\\u5927\\u6881 \\u6297\\u5fa1 \\u7095\\u5e2d \\u8003\\u6838 \\u70e4\\u5e72 \\u73c2\\u91cc \\u67ef\\u91cc \\u79d1\\u6597 \\u79d1\\u6258\\u52aa \\u79d1\\u5b66\\u9762 \\u86b5\\u4ed4\\u9762\\u7ebf \\u53ef\\u5e72\\u62ed \\u53ef\\u5e72\\u996e \\u53ef\\u53ef\\u6258\\u6d77 \\u53ef\\u5468 \\u514b\\u8584 \\u514b\\u5265 \\u514b\\u5206\\u5b50 \\u514b\\u592b \\u514b\\u6838 \\u514b\\u5df1\\u5949\\u516c \\u514b\\u514b \\u514b\\u6263 \\u514b\\u62c9\\u514b \\u514b\\u83b1 \\u514b\\u83b1\\u67fb\\u514b \\u514b\\u91cc \\u514b\\u91cc\\u65af\\u8482\\u5b89\\u677e \\u514b\\u91cc\\u65af\\u6258 \\u514b\\u91cc\\u7279\\u514b\\u91cc\\u5c9b \\u514b\\u843d \\u514b\\u671f \\u514b\\u65e5 \\u514b\\u556c \\u514b\\u6b7b \\u514b\\u661f \\u514b\\u610f \\u514b\\u539f\\u5b50 \\u514b\\u5236 \\u523b\\u534a\\u949f \\u523b\\u591a\\u949f \\u523b\\u949f \\u5cc7\\u5cc7\\u5a18\\u60f9 \\u5cc7\\u91cc\\u5c9b \\u5ba2\\u5236\\u5316 \\u57a6\\u4e01\\u676f \\u57a6\\u590d \\u7a7a\\u8499 \\u7a7a\\u524d\\u7edd\\u540e \\u7a7a\\u524d\\u7edd\\u540e\\u540e \\u7a7a\\u949f \\u6db3\\u8499 \\u5b54\\u7ae0\\u671b\\u6597 \\u63a7\\u5377 \\u63a7\\u5236 \\u63a7\\u5236\\u6746 \\u63a7\\u5236\\u53f0 \\u63a7\\u5236\\u6b32 \\u53e3\\u5e72 \\u53e3\\u5ff5 \\u53e3\\u71e5\\u8123\\u5e72 \\u53e3\\u5360 \\u53e3\\u949f \\u53e9\\u949f \\u6263\\u73af \\u6263\\u514b \\u6263\\u773c \\u6263\\u9488 \\u6263\\u5b50 \\u67af\\u5e72 \\u82e6\\u53c2 \\u82e6\\u74dc\\u5e72 \\u82e6\\u5364 \\u88e4\\u6263 \\u5938\\u8bde \\u5938\\u5c14 \\u5938\\u7236 \\u5938\\u59e3 \\u5938\\u514b \\u5938\\u4e3d \\u5938\\u6bd7 \\u5938\\u4eba \\u5938\\u5bb9 \\u5938\\u7279 \\u5938\\u8131 \\u5938\\u8d5e \\u5feb\\u5403\\u5e72 \\u5feb\\u5e72 \\u5feb\\u820d\\u4e0b \\u5feb\\u901f\\u9762 \\u72c2\\u5e76\\u6f6e \\u594e\\u677e\\u5e02 \\u5764\\u8868 \\u6606\\u5267 \\u6606\\u4ed1 \\u6606\\u8154 \\u6606\\u66f2 \\u6606\\u5c71 \\u6606\\u82cf \\u6606\\u8c03 \\u5d11\\u4ed1 \\u9ae1\\u53d1 \\u6346\\u624e \\u7d91\\u624e \\u56f0\\u4e4f \\u56f0\\u89c9 \\u56f0\\u5026 \\u56f0\\u610f \\u62ec\\u53d1 \\u62c9\\u6746 \\u62c9\\u514b\\u65bd\\u5c14\\u5fb7\\u949f \\u62c9\\u91cc \\u62c9\\u94fe \\u62c9\\u9762 \\u62c9\\u6d85\\u91cc \\u62c9\\u5347 \\u62c9\\u7ea4 \\u62c9\\u7956\\u91cc \\u908b\\u91cc\\u908b\\u9062 \\u814a\\u4e4b\\u4ee5\\u4e3a\\u9975 \\u8721\\u67fb \\u8721\\u796d \\u8721\\u6708 \\u8fa3\\u6912\\u9762 \\u6765\\u590d \\u83b1\\u5f69 \\u83b1\\u5f69\\u5317\\u5802 \\u83b1\\u91cc\\u8fbe \\u680f\\u5e72 \\u9611\\u5e72 \\u84dd\\u91c7\\u548c \\u84dd\\u53d1 \\u84dd\\u6258\\u65af \\u7bee\\u8679\\u676f \\u5577\\u5f53 \\u72fc\\u9910\\u864e\\u54bd \\u72fc\\u98e7\\u864e\\u54bd \\u72fc\\u541e\\u864e\\u54bd \\u6d6a\\u8776\\u6e38\\u8702 \\u6d6a\\u7434\\u8868 \\u635e\\u5e72 \\u635e\\u9762 \\u52b3\\u529b\\u58eb\\u8868 \\u8001\\u677f \\u8001\\u96d5 \\u8001\\u6597 \\u8001\\u9e39\\u7a9d\\u91cc\\u51fa\\u51e4\\u51f0 \\u8001\\u59dc \\u8001\\u8499 \\u8001\\u5a18 \\u8001\\u7237\\u949f \\u4e50\\u5668\\u949f \\u6cd0\\u590d \\u52d2\\u91cc\\u52d2\\u5f97 \\u4e86\\u89e3 \\u4e86\\u7136 \\u4e86\\u5982 \\u4e86\\u82e5\\u6307\\u638c \\u4e86\\u671b \\u96f7\\u592b\\u8303\\u6069\\u65af \\u8bd4\\u8d5e \\u6cea\\u5e72 \\u51b7\\u5730\\u91cc \\u51b7\\u9762 \\u5398\\u91d1 \\u68a8\\u5e72 \\u6f13\\u6c5f \\u6f13\\u7136 \\u6f13\\u6c34 \\u6f13\\u6e58 \\u793c\\u6597 \\u793c\\u8d5e \\u674e\\u5e72\\u9f99 \\u674e\\u8fde\\u6770 \\u674e\\u9023\\u6770 \\u674e\\u94fe\\u798f \\u674e\\u76df\\u5e72 \\u674e\\u4e09\\u5a18 \\u674e\\u949f\\u596d \\u674e\\u949f\\u90c1 \\u674e\\u953a\\u90c1 \\u91cc\\u6602 \\u91cc\\u5965 \\u91cc\\u5305\\u6069 \\u91cc\\u8d1d\\u5229 \\u91cc\\u5e03 \\u91cc\\u7a0b \\u91cc\\u7a0b\\u8868 \\u91cc\\u515a \\u91cc\\u5c14 \\u91cc\\u8033 \\u91cc\\u5f17\\u8d5b\\u5fb7 \\u91cc\\u6e2f \\u91cc\\u6839 \\u91cc\\u95ec \\u91cc\\u8c6a \\u91cc\\u808c \\u91cc\\u52a0 \\u91cc\\u8d3e\\u7eb3 \\u91cc\\u5c45 \\u91cc\\u541b \\u91cc\\u79d1 \\u91cc\\u514b\\u7279 \\u91cc\\u6263 \\u91cc\\u62c9 \\u91cc\\u8001 \\u91cc\\u90bb\\u957f \\u91cc\\u8def \\u91cc\\u95fe \\u91cc\\u7f8e \\u91cc\\u95e8 \\u91cc\\u8499\\u8bfa\\u592b \\u91cc\\u6c11 \\u91cc\\u540d \\u91cc\\u7eb3 \\u91cc\\u5c3c \\u91cc\\u5f04 \\u91cc\\u6b27 \\u91cc\\u5947\\u8499 \\u91cc\\u5951\\u8499 \\u91cc\\u4eba \\u91cc\\u4ec1 \\u91cc\\u820d \\u91cc\\u793e \\u91cc\\u58eb\\u6ee1 \\u91cc\\u6c0f \\u91cc\\u65af \\u91cc\\u8c08\\u5df7\\u8bae \\u91cc\\u7279\\u7ef4\\u5b81\\u79d1 \\u91cc\\u74e6\\u51e0\\u4e9a\\u6761\\u7ea6 \\u91cc\\u7ef4\\u62c9 \\u91cc\\u5e0c\\u7279\\u970d\\u82ac \\u91cc\\u5df7 \\u91cc\\u80e5 \\u91cc\\u4e9a \\u91cc\\u8c1a \\u91cc\\u8bed \\u91cc\\u7ea6 \\u91cc\\u5bb0 \\u91cc\\u957f \\u91cc\\u6b63 \\u91cc\\u5179 \\u7406\\u6b21\\u53d1 \\u7406\\u53d1 \\u7406\\u4e2a \\u7406\\u4e2a\\u53d1 \\u7406\\u4e8b\\u957f\\u676f \\u7406\\u5b8c\\u53d1 \\u7406\\u4e00\\u6b21\\u53d1 \\u7406\\u4e00\\u4e2a\\u53d1 \\u529b\\u5f81 \\u5386\\u672c \\u5386\\u6cd5 \\u5386\\u7eaa \\u5386\\u547d \\u5386\\u53f2\\u4eba\\u7269 \\u5386\\u59cb \\u5386\\u5ba4 \\u5386\\u4e66 \\u5386\\u5934 \\u5386\\u5c3e \\u5386\\u8c61 \\u5386\\u72f1 \\u5386\\u5143 \\u7acb\\u65b9\\u5398\\u7c73 \\u5229\\u5f97\\u6c47 \\u5229\\u9ed8\\u91cc\\u514b \\u5229\\u6258 \\u5229\\u6b32 \\u6ca5\\u5e72 \\u4fea\\u91c7 \\u6817\\u82de \\u6817\\u66b4 \\u6817\\u7206 \\u6817\\u5587 \\u6817\\u70c8 \\u6817\\u788c \\u6817\\u8272 \\u6817\\u9f20 \\u6817\\u7530\\u96c4\\u4ecb \\u6817\\u5c3e \\u6817\\u85aa \\u6817\\u51ff \\u6817\\u5b50 \\u783e\\u5ca9 \\u7c92\\u53d8\\u5ca9 \\u8fde\\u6746 \\u8fde\\u4e09\\u5e76\\u56db \\u8fde\\u7cfb \\u83b2\\u987b \\u8054\\u8d5b\\u676f \\u8054\\u7cfb \\u9570\\u4ed3 \\u70bc\\u5ea6 \\u70bc\\u94a2 \\u70bc\\u6c5e \\u70bc\\u91d1 \\u70bc\\u94dd \\u70bc\\u8d2b \\u70bc\\u5e08 \\u70bc\\u94c1 \\u70bc\\u94dc \\u70bc\\u51b6 \\u70bc\\u5236 \\u94fe\\u7532 \\u94fe\\u6263 \\u94fe\\u5f62 \\u94fe\\u5760 \\u826f\\u4ef7 \\u51c9\\u9762 \\u51c9\\u5e2d \\u6881\\u680b \\u6881\\u67b6 \\u6881\\u9f99 \\u6881\\u6728 \\u6881\\u6728\\u5176\\u574f \\u6881\\u4e0a \\u6881\\u6587\\u51b2 \\u6881\\u67f1 \\u6881\\u5b50 \\u4e24\\u5f53\\u4e00 \\u4e24\\u6487\\u80e1 \\u4e24\\u624e \\u4e24\\u53ea \\u4e24\\u5468 \\u4eae\\u949f \\u667e\\u5e72 \\u8fbd\\u6c88 \\u5bee\\u91c7 \\u71ce\\u53d1 \\u6599\\u6597 \\u5ed6\\u4e8e\\u8bda \\u90bb\\u91cc \\u6797\\u51b2 \\u6797\\u82b3\\u90c1 \\u6797\\u5e72\\u95f5 \\u6797\\u6770\\u6881 \\u6797\\u4fca\\u6770 \\u6797\\u8363\\u677e \\u6797\\u677e \\u6797\\u90c1\\u65b9 \\u6797\\u5360\\u6885 \\u6797\\u6b63\\u6770 \\u6797\\u949f \\u4e34\\u6d77\\u6c34\\u571f\\u5fd7 \\u6dcb\\u51b2 \\u78f7\\u9178\\u76d0\\u5ca9 \\u9cde\\u6e38 \\u8e8f\\u501f \\u7075\\u8ff9 \\u7075\\u4fee \\u7075\\u6b32 \\u51cc\\u7b56 \\u51cc\\u660c\\u7115 \\u51cc\\u9a70 \\u51cc\\u6cb3 \\u51cc\\u60e0\\u5e73 \\u51cc\\u501f \\u51cc\\u8499\\u521d \\u51cc\\u5982\\u7115 \\u51cc\\u5341\\u516b \\u51cc\\u6c0f \\u51cc\\u6c34 \\u51cc\\u7edf \\u51cc\\u9000\\u601d \\u51cc\\u5c0f\\u59d0 \\u51cc\\u59d3 \\u51cc\\u4e91 \\u51cc\\u4e91\\u7ff0 \\u51cc\\u5fd7 \\u51cc\\u5fd7\\u7f8e \\u96f6\\u53ea \\u9886\\u6263 \\u9886\\u53f0 \\u9886\\u8896\\u6b32 \\u4ee4\\u72d0\\u51b2 \\u4ee4\\u5cb3 \\u6e9c\\u987b \\u5218\\u5cf0\\u677e \\u5218\\u677e\\u85e9 \\u5218\\u677e\\u5e74 \\u5218\\u4f1f\\u6770 \\u5218\\u5e78\\u5982 \\u5218\\u5360\\u5409 \\u5218\\u5fd7\\u5347 \\u7559\\u53d1 \\u6d41\\u5e03 \\u6d41\\u5e72 \\u6d41\\u7eb9\\u5ca9 \\u6d41\\u8840\\u6d6e\\u5c38 \\u6d41\\u8840\\u6f02\\u5364 \\u67f3\\u658c\\u6770 \\u67f3\\u5347\\u8000 \\u516d\\u51b2 \\u516d\\u8c37 \\u516d\\u901a\\u56db\\u8f9f \\u516d\\u5f26 \\u516d\\u987b\\u9c87 \\u516d\\u987b\\u9cb6 \\u516d\\u6b32 \\u516d\\u624e \\u516d\\u53ea \\u516d\\u5468 \\u9f99\\u5377 \\u9f99\\u867e\\u9762 \\u9f99\\u987b \\u9f99\\u987b\\u9762 \\u9f99\\u6e38 \\u9f99\\u6e38\\u6d45\\u6c34 \\u783b\\u8c37\\u673a \\u9542\\u91d1\\u9519\\u91c7 \\u6f0f\\u6597 \\u565c\\u565c\\u82cf\\u82cf \\u565c\\u82cf \\u5362\\u8d1d\\u677e \\u5362\\u90c1\\u4f73 \\u82a6\\u5e2d \\u5364\\u7c3f \\u5364\\u4ee3\\u70c3 \\u5364\\u5730 \\u5364\\u949d \\u5364\\u5316 \\u5364\\u83bd \\u5364\\u9762 \\u5364\\u725b\\u8089 \\u5364\\u4eba \\u5364\\u7d20 \\u5364\\u5236 \\u5364\\u65cf \\u752a\\u91cc \\u9646\\u5747\\u677e \\u9646\\u6e38 \\u5f55\\u5f55 \\u5f55\\u5236 \\u9e7f\\u95e8\\u91c7\\u836f \\u8def\\u91cc \\u8def\\u5fd7 \\u9732\\u590d \\u4e71\\u53d1 \\u4e71\\u54c4 \\u4ed1\\u80cc \\u4ed1\\u4e30\\u6751 \\u8f6e\\u56de \\u8f6e\\u5978 \\u7f57\\u6c49\\u677e \\u7f57\\u5174\\u6881 \\u841d\\u535c \\u841d\\u535c\\u5e72 \\u87ba\\u6746 \\u87ba\\u65cb\\u9762 \\u88f8\\u5ca9 \\u8366\\u786e \\u6d1b\\u514b\\u5e0c\\u5fb7\\u9a6c\\u4e01 \\u6d1b\\u949f\\u4e1c\\u5e94 \\u7edc\\u816e\\u80e1 \\u843d\\u53d1 \\u843d\\u816e\\u80e1 \\u843d\\u6258 \\u843d\\u53f6 \\u843d\\u53f6\\u677e \\u843d\\u53f6\\u690d\\u7269 \\u56c9\\u56c9\\u82cf\\u82cf \\u56c9\\u82cf \\u9a74\\u8499\\u864e\\u76ae \\u95fe\\u91cc \\u5415\\u540e \\u5415\\u5b8b\\u70df \\u5415\\u5ca9 \\u5442\\u540e \\u90d8\\u949f \\u634b\\u91c7 \\u94dd\\u5236 \\u5c61\\u4ec6\\u5c61\\u8d77 \\u5f8b\\u5386\\u5fd7 \\u7eff\\u53d1 \\u9ebb\\u6746 \\u9ebb\\u9171\\u9762 \\u9ebb\\u6817\\u5761 \\u9a6c\\u8868 \\u9a6c\\u4e01\\u675c\\u91cc\\u8377 \\u9a6c\\u592b \\u9a6c\\u5e72 \\u9a6c\\u540e \\u9a6c\\u540e\\u7ec3\\u670d \\u9a6c\\u62c9\\u5df4\\u6817 \\u9a6c\\u62c9\\u677e \\u9a6c\\u91cc\\u5b89\\u7eb3\\u6d77\\u6c9f \\u9a6c\\u91cc\\u514b \\u9a6c\\u91cc\\u5170 \\u9a6c\\u91cc\\u5185\\u65af\\u79d1 \\u9a6c\\u91cc\\u5947 \\u9a6c\\u9b23\\u677e \\u9a6c\\u5c3c\\u6258\\u5df4 \\u9a6c\\u666e\\u6258 \\u9a6c\\u65af\\u5782\\u514b \\u9a6c\\u5c3e\\u677e \\u9a6c\\u624e \\u9a6c\\u5360\\u5c71 \\u7801\\u8868 \\u99ac\\u5360\\u5c71 \\u57cb\\u5e03 \\u57cb\\u5934\\u5bfb\\u8868 \\u57cb\\u5934\\u5bfb\\u949f \\u4e70\\u8fdb\\u5bf9\\u51b2 \\u4e70\\u70df \\u8fc8\\u79d1\\u91cc \\u9ea6\\u5361\\u6258 \\u9ea6\\u79d1\\u91cc \\u9ea6\\u6258\\u59c6 \\u5356\\u62d0 \\u5356\\u5978 \\u8109\\u5ca9 \\u989f\\u91cc\\u989f\\u9878 \\u6ee1\\u5e03 \\u6ee1\\u5e03\\u7591\\u4e91 \\u6ee1\\u5934\\u6d0b\\u53d1 \\u6ee1\\u6d32\\u91cc \\u66fc\\u5c3c\\u6258\\u5df4\\u7701 \\u6162\\u54bd \\u5fd9\\u5e76 \\u83bd\\u5364 \\u6bdb\\u53d1 \\u6bdb\\u59dc \\u6bdb\\u91cc\\u6c42\\u65af \\u6bdb\\u91cc\\u5854\\u5c3c\\u4e9a \\u8302\\u677e \\u8d38\\u6613\\u4f19\\u4f34 \\u6ca1\\u91c7 \\u6ca1\\u5730\\u91cc \\u6ca1\\u7239\\u6ca1\\u5a18 \\u6ca1\\u7cbe\\u6253\\u91c7 \\u6ca1\\u91cf\\u6597 \\u6ca1\\u7b7e \\u6ca1\\u6298\\u81f3 \\u6885\\u5e72 \\u6885\\u91cc \\u5a92\\u4eba\\u53e3\\u65e0\\u91cf\\u6597 \\u6bcf\\u53ea \\u6bcf\\u5468 \\u7f8e\\u53d1 \\u7f8e\\u56fd\\u5236 \\u7f8e\\u540e \\u7f8e\\u91cc \\u7f8e\\u4ed1 \\u7f8e\\u5236 \\u7f8e\\u6d32\\u676f \\u95e8\\u6597 \\u95f7\\u8868 \\u8499\\u853d \\u8499\\u61c2 \\u8499\\u53e4\\u5927\\u592b \\u8499\\u9e3f \\u8499\\u6df7 \\u8499\\u8069 \\u8499\\u772c \\u8499\\u6627 \\u8499\\u6627\\u4e0d\\u6e05 \\u8499\\u8499 \\u8499\\u8499\\u61c2\\u61c2 \\u8499\\u8499\\u9ed1 \\u8499\\u8499\\u4eae \\u8499\\u8499\\u772c\\u772c \\u8499\\u9a97 \\u8499\\u4e8b \\u8499\\u6c5c \\u8499\\u677e\\u96e8 \\u8499\\u778d \\u8499\\u7279\\u5361\\u6d1b \\u8499\\u5934 \\u8499\\u6258\\u7f57\\u62c9 \\u8499\\u96fe \\u8499\\u773c \\u8499\\u5728 \\u8499\\u5728\\u9f13\\u91cc \\u8499\\u76f4 \\u8499\\u4f4f \\u5b5f\\u5fb7\\u5c14\\u677e \\u68a6\\u56de \\u68a6\\u5170\\u53f6\\u5409 \\u68a6\\u7cfb \\u68a6\\u6709\\u4e94\\u4e0d\\u5360 \\u5f25\\u6f2b \\u5f25\\u8499 \\u5f25\\u5f25 \\u5f25\\u5c71\\u904d\\u91ce \\u8ff7\\u5978 \\u8ff7\\u8499 \\u7e3b\\u7cfb \\u7c73\\u5fb7\\u5c14\\u4f2f\\u91cc \\u7c73\\u8c37 \\u7c73\\u91cc \\u7c73\\u9762 \\u79d8\\u5236 \\u5bc6\\u5e03 \\u5bc6\\u6298 \\u5bc6\\u81f4 \\u68c9\\u5236 \\u514d\\u80c4 \\u9762\\u9738 \\u9762\\u767d\\u65e0\\u987b \\u9762\\u5305 \\u9762\\u997c \\u9762\\u8336 \\u9762\\u5382 \\u9762\\u70b9 \\u9762\\u5e97 \\u9762\\u574a \\u9762\\u80a5 \\u9762\\u7c89 \\u9762\\u7f38 \\u9762\\u7599\\u7629 \\u9762\\u9986 \\u9762\\u7cca \\u9762\\u7070 \\u9762\\u4ef7 \\u9762\\u6d46 \\u9762\\u9171 \\u9762\\u997a \\u9762\\u7b4b \\u9762\\u7801\\u513f \\u9762\\u576f\\u513f \\u9762\\u76ae \\u9762\\u7968 \\u9762\\u4eba \\u9762\\u98df \\u9762\\u5851 \\u9762\\u644a \\u9762\\u6c64 \\u9762\\u6761 \\u9762\\u56e2 \\u9762\\u7897 \\u9762\\u5411 \\u9762\\u5411\\u5bf9\\u8c61\\u7684\\u6280\\u672f \\u9762\\u5411\\u5bf9\\u8c61\\u8bed\\u8a00 \\u9762\\u8a89 \\u9762\\u8a89\\u80cc\\u6bc1 \\u9762\\u7682 \\u9762\\u6756 \\u9762\\u5b50 \\u9762\\u5b50\\u836f \\u82d7\\u6817 \\u79d2\\u8868 \\u79d2\\u949f \\u6c11\\u653f\\u91cc \\u6c11\\u65cf\\u5fd7 \\u95f5\\u91c7\\u5c14 \\u95f5\\u51f6 \\u62bf\\u53d1 \\u540d\\u8868 \\u540d\\u590d\\u91d1\\u74ef \\u540d\\u5f55\\u670d\\u52a1 \\u660e\\u67fb\\u6697\\u8bbf \\u660e\\u7a97\\u51c0\\u51e0 \\u660e\\u7a97\\u6de8\\u51e0 \\u660e\\u590d \\u660e\\u4f19\\u753b\\u4f9b \\u660e\\u6263 \\u660e\\u4e86 \\u9e23\\u949f \\u51a5\\u51cc \\u51a5\\u8499 \\u6e9f\\u8499 \\u8c2c\\u8d5e \\u6478\\u949f \\u6479\\u624e\\u7279 \\u6a21\\u8303\\u4eba\\u7269 \\u6a21\\u91cc\\u897f\\u65af \\u6a21\\u5236 \\u6469\\u6839\\u8d39\\u91cc\\u66fc \\u6469\\u91cc\\u897f\\u65af \\u6469\\u6258 \\u78e8\\u53d8\\u5ca9 \\u78e8\\u70bc \\u78e8\\u5236 \\u9b54\\u8868 \\u9b54\\u672f\\u6570\\u5b57 \\u62b9\\u5e72 \\u83ab\\u5e72\\u5c71 \\u83ab\\u5409\\u6258 \\u83ab\\u91cc \\u83ab\\u4f59\\u6bd2\\u4e5f \\u58a8\\u8361\\u5b50 \\u58a8\\u6597 \\u58a8\\u6c88 \\u58a8\\u6c88\\u672a\\u5e72 \\u9ed8\\u5ff5 \\u67d0\\u53ea \\u6bcd\\u540e \\u6bcd\\u949f \\u6728\\u6881 \\u6728\\u5076\\u620f\\u624e \\u6728\\u5236 \\u6728\\u949f \\u76ee\\u725b\\u6e38\\u5203 \\u5893\\u5fd7 \\u5e55\\u540e\\u4eba\\u7269 \\u7a46\\u7f55\\u9ed8\\u5fb7\\u5386 \\u62ff\\u5761\\u91cc \\u62ff\\u7834\\u4ed1 \\u62ff\\u4e0b\\u8868 \\u62ff\\u4e0b\\u949f \\u62ff\\u8d3c\\u8981\\u8d43\\u62ff\\u5978\\u8981\\u53cc \\u54ea\\u4e00\\u51fa \\u54ea\\u53ea \\u90a3\\u51fa\\u7535\\u5f71 \\u90a3\\u51fa\\u597d\\u620f \\u90a3\\u51fa\\u5267 \\u90a3\\u4e2a \\u90a3\\u4e2a\\u732b\\u513f\\u4e0d\\u5403\\u8165 \\u90a3\\u5377 \\u90a3\\u53ea \\u7eb3\\u91c7 \\u4e43\\u91cc \\u5976\\u5377 \\u5976\\u5a18 \\u7537\\u7528\\u8868 \\u5357\\u5bab\\u9002 \\u5357\\u56de \\u5357\\u4eac\\u949f \\u5357\\u91cc \\u5357\\u5c71\\u676f \\u5357\\u5f81 \\u5357\\u7b51 \\u96be\\u6328 \\u96be\\u820d \\u96be\\u54bd \\u96be\\u836b \\u95f9\\u8868 \\u95f9\\u54c4 \\u95f9\\u949f \\u5185\\u54c4 \\u5185\\u810f \\u5185\\u5236 \\u80fd\\u820d \\u80fd\\u5f81\\u60ef\\u6218 \\u80fd\\u5f81\\u5584\\u6218 \\u5c3c\\u91c7 \\u5c3c\\u514b \\u5c3c\\u514b\\u677e \\u6ce5\\u7070\\u5ca9 \\u6ce5\\u5ca9 \\u6ce5\\u8d28\\u5ca9 \\u502a\\u55e3\\u51b2 \\u62df\\u5236 \\u4f60\\u624d\\u5b50\\u53d1\\u660f \\u4f60\\u6597\\u4e86\\u80c6 \\u4f60\\u7cfb \\u9006\\u949f \\u60c4\\u5982\\u8c03\\u9965 \\u62c8\\u987b \\u5e74\\u8c37 \\u5e74\\u5386 \\u637b\\u987b \\u637b\\u9488 \\u5ff5\\u554a \\u5ff5\\u5427 \\u5ff5\\u767d \\u5ff5\\u9519 \\u5ff5\\u53e8 \\u5ff5\\u5230 \\u5ff5\\u7684 \\u5ff5\\u5bf9 \\u5ff5\\u4f5b \\u5ff5\\u7ecf \\u5ff5\\u4e86 \\u5ff5\\u5ff5 \\u5ff5\\u5ff5\\u6709\\u8bcd \\u5ff5\\u8bd7 \\u5ff5\\u4e66 \\u5ff5\\u8bf5 \\u5ff5\\u5b8c \\u5ff5\\u66f0 \\u5ff5\\u5492 \\u5ff5\\u4f5c \\u5a18\\u7684 \\u5a18\\u513f \\u5a18\\u5bb6 \\u5a18\\u8205 \\u5a18\\u8001\\u5b50 \\u5a18\\u4eb2 \\u5a18\\u80ce \\u5a18\\u59e8 \\u917f\\u5236 \\u9e1f\\u677e \\u8885\\u8885 \\u8885\\u8885\\u708a\\u70df \\u8885\\u8885\\u4e0a\\u5347 \\u8885\\u7ed5 \\u8885\\u7a95 \\u5c3f\\u6597 \\u634f\\u5236 \\u5b81\\u6210\\u5b50 \\u5b81\\u60bc\\u5b50 \\u5b81\\u65a7\\u6210 \\u5b81\\u6d69 \\u5b81\\u60e0\\u5b50 \\u5b81\\u731b\\u529b \\u5b81\\u621a \\u5b81\\u8c03\\u5143 \\u5b81\\u6b66\\u5b50 \\u5b81\\u8d8a \\u5b81\\u4e2d\\u5219 \\u5b81\\u5e84\\u5b50 \\u51dd\\u7070\\u5ca9 \\u51dd\\u70bc \\u62e7\\u5e72 \\u725b\\u9aa5\\u540c\\u7682 \\u725b\\u67f3\\u9762 \\u725b\\u8089\\u9762 \\u725b\\u53ea \\u7ebd\\u6263 \\u94ae\\u6263 \\u62d7\\u522b \\u519c\\u5386 \\u519c\\u6c11\\u5386 \\u6d53\\u53d1 \\u6d53\\u90c1 \\u91b2\\u90c1 \\u5f04\\u5e72 \\u5f04\\u9b3c\\u540a\\u7334 \\u5f04\\u9762\\u5403 \\u5974\\u513f\\u5e72 \\u6012\\u53d1\\u51b2\\u51a0 \\u6012\\u53d1\\u51b2\\u5929 \\u6012\\u6c14\\u51b2\\u53d1 \\u6696\\u8361\\u64a9\\u9505 \\u8bfa\\u91cc \\u7cef\\u7c73\\u56e2 \\u5973\\u4e11 \\u5973\\u751f\\u5916\\u5411 \\u6b27\\u4f2f\\u6258 \\u6b27\\u51e0\\u91cc\\u5f97 \\u6b27\\u51e0\\u91cc\\u5fb7 \\u6b27\\u91cc\\u5e87\\u5f97\\u65af \\u6b27\\u91cc\\u6851 \\u6b27\\u6d32\\u676f \\u85d5\\u590d \\u5e15\\u7d2f\\u6258\\u6cd5\\u5219 \\u5e15\\u7d2f\\u6258\\u6700\\u4f18 \\u62cd\\u51fa \\u62cd\\u51fa\\u597d\\u620f \\u62cd\\u53f0\\u62cd\\u51f3 \\u6392\\u6863\\u6746 \\u6392\\u9aa8\\u9762 \\u6392\\u987b \\u5f98\\u56de \\u6f58\\u5a01\\u5fd7 \\u6f58\\u5cb3 \\u76d8\\u56de \\u76d8\\u677e \\u87e0\\u91c7 \\u87e0\\u9f99\\u677e \\u65c1\\u6ce8 \\u530f\\u7cfb \\u8dd1\\u53f0\\u5b50 \\u6ce1\\u9762 \\u6ce1\\u5236 \\u70ae\\u5236 \\u966a\\u540a \\u57f9\\u5c14\\u677e \\u57f9\\u91cc\\u514b\\u91cc\\u65af \\u88f4\\u91cc\\u8bfa \\u88f4\\u677e\\u4e4b \\u4f69\\u8131\\u62c9\\u514b \\u914d\\u81b3\\u53f0 \\u914d\\u5236 \\u7830\\u5f53 \\u70f9\\u5236 \\u5f6d\\u54b8 \\u5f6d\\u4e8e\\u664f \\u84ec\\u53d1 \\u7bf7\\u76d6\\u5e03 \\u81a8\\u571f\\u5ca9 \\u78b0\\u949f \\u6279\\u590d \\u6279\\u6838 \\u6279\\u56de \\u6279\\u6ce8 \\u6279\\u51c6 \\u62ab\\u53d1 \\u62ab\\u590d \\u62ab\\u7ea2\\u6302\\u5f69 \\u62ab\\u5934\\u6563\\u53d1 \\u62ab\\u699b\\u91c7\\u5170 \\u5288\\u91cc \\u76ae\\u7279\\u62c9\\u514b \\u76ae\\u6258\\u7ba1 \\u76ae\\u5236 \\u6bd7\\u5a46\\u5c38\\u4f5b \\u75b2\\u56f0 \\u57e4\\u5858\\u91cc \\u813e\\u810f \\u5339\\u9a6c\\u53ea\\u8f6e \\u8f9f\\u6076 \\u8f9f\\u54a1 \\u8f9f\\u8c37 \\u8f9f\\u4e3e \\u8f9f\\u541b\\u4e09\\u820d \\u8f9f\\u5386\\u65bd\\u97ad \\u8f9f\\u7e91 \\u8f9f\\u903b \\u8f9f\\u547d \\u8f9f\\u533f \\u8f9f\\u8f9f \\u8f9f\\u7136 \\u8f9f\\u4eba\\u4e4b\\u58eb \\u8f9f\\u8272 \\u8f9f\\u4e16 \\u8f9f\\u4e66 \\u8f9f\\u8fdd \\u8f9f\\u90aa \\u8f9f\\u8a00 \\u8f9f\\u6613 \\u8f9f\\u6deb \\u8f9f\\u5f15 \\u8f9f\\u96cd \\u8f9f\\u5ef1 \\u8f9f\\u53ec \\u8f9f\\u652f\\u4f5b \\u8f9f\\u82b7 \\u504f\\u4fe1\\u5219\\u6697 \\u504f\\u5e78 \\u7247\\u9ebb\\u5ca9 \\u7247\\u8a00\\u53ea\\u8bed \\u7247\\u5ca9 \\u7247\\u8bed\\u53ea\\u8f9e \\u6f02\\u8361 \\u6f02\\u6e38 \\u98d8\\u6e38\\u56db\\u6d77 \\u6487\\u540a \\u62da\\u820d \\u54c1\\u5c1d \\u54c1\\u6c47 \\u5e73\\u5eb7\\u91cc \\u5e73\\u9762\\u6d4b\\u91cf \\u8bc4\\u6838 \\u8bc4\\u6ce8 \\u82f9\\u679c\\u7535\\u8111 \\u82f9\\u8426 \\u51ed\\u540a \\u51ed\\u51e0 \\u51ed\\u501f \\u51ed\\u95f2 \\u51ed\\u6298 \\u9887\\u590d \\u7834\\u8868 \\u7834\\u574f\\u6b32 \\u638a\\u6597\\u6298\\u8861 \\u88d2\\u514b \\u6251\\u51ac \\u94fa\\u76d6\\u5377\\u513f \\u4ec6\\u5012 \\u4ec6\\u5730 \\u4ec6\\u592b \\u4ec6\\u8857 \\u4ec6\\u7136 \\u8461\\u8404\\u5e72 \\u84b2\\u677e\\u9f84 \\u6734\\u8328\\u8305\\u65af \\u6734\\u5200 \\u6734\\u6069\\u60e0 \\u6734\\u51e4\\u67f1 \\u6734\\u7236 \\u6734\\u5409\\u6e0a \\u6734\\u69ff\\u60e0 \\u6734\\u4eac\\u7433 \\u6734\\u7490\\u7f8e \\u6734\\u8302 \\u6734\\u8bd7\\u598d \\u6734\\u4e16\\u8389 \\u6734\\u6811 \\u6734\\u6cf0\\u6853 \\u6734\\u785d \\u6734\\u65b0\\u9633 \\u6734\\u5ba3\\u82f1 \\u6734\\u6c38\\u8bad \\u6734\\u4ed4\\u6811 \\u6734\\u8d5e\\u6d69 \\u6734\\u771f\\u7199 \\u6734\\u6b63\\u6069 \\u6734\\u6b63\\u7199 \\u6734\\u6b63\\u7965 \\u6734\\u5fd7\\u80e4 \\u6734\\u667a\\u661f \\u6734\\u5fe0 \\u6734\\u5468\\u6c38 \\u6734\\u8d44\\u8305\\u65af \\u6734\\u5b50 \\u57d4\\u91cc \\u666e\\u52d2\\u6258\\u5229\\u4e9a \\u666e\\u91cc \\u666e\\u5229\\u827e\\u6258 \\u4e03\\u91cc\\u6cb3 \\u4e03\\u91cc\\u9999 \\u4e03\\u5a18 \\u4e03\\u5a18\\u5988 \\u4e03\\u575b \\u4e03\\u5f26 \\u4e03\\u624e \\u4e03\\u53ea \\u4e03\\u5468 \\u51c4\\u6ca7 \\u51c4\\u5bd2 \\u51c4\\u51b7 \\u51c4\\u5389 \\u51c4\\u51c9 \\u51c4\\u96e8 \\u621a\\u91cc \\u621a\\u621a \\u621a\\u5885\\u5830 \\u6b3a\\u8499 \\u9f50\\u540e\\u7834\\u73af \\u9f50\\u6881\\u4e16\\u754c \\u9f50\\u738b\\u820d\\u725b \\u5176\\u6b21\\u8f9f\\u5730 \\u5947\\u676f \\u5947\\u8ff9 \\u5947\\u91cc\\u5b89 \\u5947\\u53f0 \\u68cb\\u5e03 \\u68cb\\u7f57\\u661f\\u5e03 \\u542f\\u53d1 \\u542f\\u53d1\\u5f0f\\u654e\\u5b66\\u6cd5 \\u8d77\\u54c4 \\u8d77\\u6251\\u6746 \\u6c14\\u51b2\\u6597\\u725b \\u6c14\\u51b2\\u725b\\u6597 \\u6c14\\u514b\\u6597\\u725b \\u6c14\\u82e5\\u6e38\\u4e1d \\u6c14\\u52bf\\u718f\\u707c \\u6c14\\u541e\\u725b\\u6597 \\u6c14\\u626c\\u91c7\\u98de \\u6c14\\u4e00\\u51b2 \\u5f03\\u820d \\u789b\\u5364 \\u6070\\u624d \\u5343\\u5c42\\u9762 \\u5343\\u56de\\u767e\\u6298 \\u5343\\u56de\\u767e\\u8f6c \\u5343\\u94a7 \\u5343\\u94a7\\u4e00\\u53d1 \\u5343\\u91cc \\u5343\\u624e \\u5343\\u53ea \\u8fc1\\u601d\\u56de\\u8651 \\u7275\\u7cfb \\u7275\\u4e00\\u53d1 \\u94c5\\u5236 \\u60ad\\u541d\\u82e6\\u514b \\u8c26\\u51b2 \\u7b7e\\u62a5 \\u7b7e\\u5531 \\u7b7e\\u5448 \\u7b7e\\u51fa \\u7b7e\\u5355 \\u7b7e\\u5230 \\u7b7e\\u5f97 \\u7b7e\\u8ba2 \\u7b7e\\u5b9a \\u7b7e\\u8d4c \\u7b7e\\u53d1 \\u7b7e\\u8fc7 \\u7b7e\\u597d \\u7b7e\\u7ed3 \\u7b7e\\u4e86 \\u7b7e\\u540d \\u7b7e\\u6d3e\\u5ba4 \\u7b7e\\u5165 \\u7b7e\\u4e0a \\u7b7e\\u6536 \\u7b7e\\u4e66\\u4f1a \\u7b7e\\u7f72 \\u7b7e\\u9000 \\u7b7e\\u59a5 \\u7b7e\\u5b8c \\u7b7e\\u7232 \\u7b7e\\u4e0b \\u7b7e\\u4e9b \\u7b7e\\u5199 \\u7b7e\\u62bc \\u7b7e\\u5370 \\u7b7e\\u6709 \\u7b7e\\u7ea6 \\u7b7e\\u5728 \\u7b7e\\u7ae0 \\u7b7e\\u5e10 \\u7b7e\\u7740 \\u7b7e\\u8bc1 \\u7b7e\\u8a3c \\u7b7e\\u6ce8 \\u7b7e\\u5b57 \\u524d\\u8f66\\u590d\\u540e\\u8f66\\u6212 \\u524d\\u8f66\\u4e4b\\u590d \\u524d\\u540e\\u5de6\\u53f3 \\u524d\\u4ec6\\u540e\\u7ee7 \\u524d\\u4ec6\\u540e\\u8d77 \\u94b1\\u8c37 \\u4e7e\\u6e05\\u5bab \\u4e7e\\u8c61\\u5386 \\u6f5c\\u6c34\\u949f \\u6f5c\\u6e38 \\u67aa\\u6746 \\u67aa\\u6258 \\u5f3a\\u5978 \\u5f3a\\u6295\\u677e \\u5f3a\\u54bd \\u5f3a\\u5236\\u4fdd\\u9669 \\u7857\\u786e \\u6572\\u949f \\u4e54\\u677e \\u835e\\u9ea6\\u9762 \\u835e\\u9762 \\u6865\\u6881 \\u5de7\\u5386 \\u7a83\\u5360 \\u7a83\\u949f\\u63a9\\u8033 \\u4fb5\\u5e76 \\u4fb5\\u5165\\u5ca9 \\u4eb2\\u5a18 \\u4eb2\\u5e78 \\u4eb2\\u5f81 \\u79e6\\u5c11\\u6e38 \\u7434\\u65ad\\u6731\\u5f26 \\u7434\\u6746 \\u7434\\u5f26 \\u7434\\u949f \\u5659\\u9f7f\\u6234\\u53d1 \\u9752\\u5e18 \\u9752\\u82f9 \\u9752\\u5c71\\u4e00\\u53d1 \\u9752\\u677e \\u8f7b\\u6263 \\u6c22\\u5364\\u9178 \\u503e\\u590d\\u91cd\\u5668 \\u6e05\\u67fb\\u4e0d\\u5f53\\u515a\\u4ea7 \\u6e05\\u6668\\u676f \\u6e05\\u6746\\u8fd0\\u52a8 \\u6e05\\u53f0 \\u60c5\\u91c7 \\u60c5\\u7cfb \\u60c5\\u6b32 \\u5e86\\u540a \\u5e86\\u5386 \\u78ec\\u949f \\u7a77\\u53d1 \\u7a77\\u91cc \\u90b1\\u5bcc\\u90c1 \\u90b1\\u90c1\\u5a77 \\u79cb\\u4e0d\\u5e72 \\u79cb\\u53d1 \\u79cb\\u5343 \\u79cb\\u5f81 \\u56da\\u7cfb \\u6c42\\u77e5\\u6b32 \\u866c\\u987b \\u7403\\u540e \\u7403\\u53f0 \\u8d8b\\u5409\\u907f\\u51f6 \\u66f2\\u8f66 \\u66f2\\u5c18 \\u66f2\\u9053 \\u66f2\\u9053\\u58eb \\u66f2\\u9152 \\u66f2\\u5377 \\u66f2\\u83cc \\u66f2\\u9709 \\u66f2\\u8616 \\u66f2\\u94b1 \\u66f2\\u751f \\u66f2\\u677e \\u66f2\\u79c0\\u624d \\u66f2\\u9662 \\u53d6\\u820d \\u5708\\u6263 \\u5708\\u6881 \\u6743\\u529b\\u6b32 \\u6743\\u6b32\\u718f\\u5fc3 \\u5168\\u5f69 \\u5168\\u6597\\u7115 \\u5168\\u5e72 \\u5168\\u7403\\u5b9a\\u4f4d\\u7cfb\\u7edf\\u536b\\u661f\\u6d4b\\u91cf \\u8be0\\u6ce8 \\u75ca\\u6108 \\u9b08\\u53d1 \\u72ac\\u53ea \\u5374\\u624d \\u786e\\u7620 \\u786e\\u7cfb \\u9619\\u91cc \\u88d9\\u6446 \\u7fa4\\u540e \\u7fa4\\u8c0b\\u54b8\\u540c \\u7fa4\\u8f9f \\u7136\\u8eab\\u6b7b\\u624d\\u6570\\u6708\\u8033 \\u9aef\\u80e1 \\u67d3\\u53d1 \\u67d3\\u5e72 \\u7ed5\\u6881 \\u4eba\\u53c2 \\u4eba\\u7269\\u5fd7 \\u4eba\\u6b32 \\u4eba\\u4e91 \\u4eba\\u4e91\\u4ea6\\u4e91 \\u4ec1\\u6770 \\u5fcd\\u9965\\u53d7\\u997f \\u5fcd\\u9965\\u53d7\\u6e34 \\u8ba4\\u5236\\u4fee \\u65e5\\u672c\\u56fd\\u5fd7 \\u65e5\\u672c\\u5236 \\u65e5\\u590d\\u4e00\\u65e5 \\u65e5\\u5e72 \\u65e5\\u8fdb\\u6597\\u91d1 \\u65e5\\u5386 \\u65e5\\u5fd7 \\u65e5\\u5236 \\u8363\\u767b\\u540e\\u5ea7 \\u8363\\u83b7\\u51a0\\u519b \\u6eb6\\u5ca9 \\u7194\\u6bc1 \\u7194\\u70bc \\u7194\\u5ca9 \\u9555\\u5ca9 \\u63c9\\u9762 \\u97a3\\u5236 \\u8089\\u5e72 \\u8089\\u7fb9\\u9762 \\u8089\\u4e1d\\u9762 \\u8089\\u6b32 \\u5982\\u5e72 \\u5982\\u5750\\u9488\\u6be1 \\u8339\\u5fd7\\u9e43 \\u5112\\u7565\\u6539\\u9769\\u5386 \\u5112\\u7565\\u5386 \\u4e73\\u5a18 \\u8fb1\\u6e38 \\u5165\\u6258 \\u962e\\u54b8 \\u8edf\\u80a5\\u7682 \\u745e\\u90ce\\u65b9\\u9762 \\u745e\\u7b7e \\u745e\\u58eb\\u5377 \\u6da6\\u53d1 \\u82e5\\u5e72 \\u5f31\\u667a\\u8d56\\u4e8e\\u6db5 \\u6492\\u5e03 \\u8428\\u5df4\\u6258 \\u8428\\u91cc \\u816e\\u6597 \\u816e\\u6258 \\u8d5b\\u91cc\\u6728\\u6e56 \\u4e09\\u590d \\u4e09\\u91cc\\u6cb3 \\u4e09\\u91cc\\u5c6f \\u4e09\\u5a18\\u6559\\u5b50 \\u4e09\\u8f9f \\u4e09\\u5c38 \\u4e09\\u7edf\\u5386 \\u4e09\\u74e6\\u56db\\u820d \\u4e09\\u5f26 \\u4e09\\u718f\\u4e09\\u6c90 \\u4e09\\u53f6\\u677e \\u4e09\\u6d74\\u4e09\\u718f \\u4e09\\u5143\\u91cc \\u4e09\\u624e \\u4e09\\u5f81\\u4e03\\u8f9f \\u4e09\\u53ea \\u4e09\\u5468 \\u6563\\u5e03 \\u6851\\u5e72 \\u6851\\u6258\\u91cc\\u5c3c\\u5c9b \\u6851\\u6258\\u8363 \\u6851\\u6258\\u65af \\u4e27\\u8361\\u6e38\\u9b42 \\u4e27\\u949f \\u8272\\u6b32 \\u94ef\\u949f \\u6c99\\u53c2 \\u6c99\\u5751\\u6746 \\u6c99\\u91cc\\u592b \\u6c99\\u4ed1 \\u6c99\\u5ca9 \\u7802\\u9505\\u9762 \\u7802\\u5ca9 \\u50bb\\u91cc\\u50bb\\u6c14 \\u6652\\u5e72 \\u6652\\u8c37 \\u6652\\u70df \\u5c71\\u5d29\\u949f\\u5e94 \\u5c71\\u6597 \\u5c71\\u91cc \\u5c71\\u91cc\\u7ad9 \\u5c71\\u6881 \\u5c71\\u5ca9 \\u5c71\\u7f8a\\u80e1 \\u5c71\\u7f8a\\u987b \\u5c71\\u4ed4\\u540e \\u5c71\\u4e2d\\u65e0\\u5386\\u65e5 \\u5c71\\u91cd\\u6c34\\u590d \\u81bb\\u4e2d \\u9cdd\\u9c7c\\u9762 \\u5546\\u5386 \\u8d4f\\u8d5e \\u4e0a\\u51b2 \\u4e0a\\u51b2\\u4e0b\\u6d17 \\u4e0a\\u590d \\u4e0a\\u5408\\u5c4b \\u4e0a\\u8bfe\\u949f \\u4e0a\\u6817\\u53bf \\u4e0a\\u94fe \\u4e0a\\u6881 \\u4e0a\\u6881\\u4e0d\\u6b63\\u4e0b\\u6881\\u6b6a \\u4e0a\\u91ce\\u6811\\u91cc \\u4e0a\\u6e38 \\u4e0a\\u5468 \\u70e7\\u5e72 \\u70e7\\u6bc1 \\u70e7\\u5236 \\u7b72\\u6597 \\u97f6\\u5c71\\u51b2 \\u90b5\\u5ef7\\u91c7 \\u820c\\u5e72\\u5507\\u7126 \\u820c\\u5e72\\u8123\\u7126 \\u820c\\u4e00\\u5377 \\u86c7\\u53d1\\u5973\\u5996 \\u86c7\\u7eff\\u6df7\\u6742\\u5ca9 \\u86c7\\u7eff\\u5ca9 \\u86c7\\u76ae\\u677e \\u86c7\\u7eb9\\u5ca9 \\u820d\\u5b89\\u5c31\\u5371 \\u820d\\u672c \\u820d\\u4e0d\\u5f97 \\u820d\\u8f66\\u4fdd\\u5e05 \\u820d\\u51fa \\u820d\\u5f97 \\u820d\\u77ed\\u4ece\\u957f \\u820d\\u77ed\\u5f55\\u957f \\u820d\\u77ed\\u53d6\\u957f \\u820d\\u77ed\\u7528\\u957f \\u820d\\u5815 \\u820d\\u5df1 \\u820d\\u8fd1\\u5373\\u8fdc \\u820d\\u8fd1\\u8c0b\\u8fdc \\u820d\\u8fd1\\u6c42\\u8fdc \\u820d\\u8fd1\\u52a1\\u8fdc \\u820d\\u65e7\\u8fce\\u65b0 \\u820d\\u547d \\u820d\\u5f03 \\u820d\\u53bb \\u820d\\u8eab \\u820d\\u751f \\u820d\\u5b9e \\u820d\\u6b7b\\u5fd8\\u751f \\u820d\\u6211\\u590d\\u8c01 \\u820d\\u6211\\u5176\\u8c01 \\u820d\\u4e0b \\u820d\\u4e0b\\u4f60 \\u820d\\u4e0b\\u4ed6 \\u820d\\u4e0b\\u5979 \\u820d\\u4e0b\\u6211 \\u820d\\u6b63\\u4ece\\u90aa \\u8bbe\\u8a00\\u6258\\u610f \\u5c04\\u96d5 \\u5c04\\u590d \\u5c04\\u5e72 \\u6444\\u5236 \\u7533\\u590d \\u8eab\\u654e\\u91cd\\u4e8e\\u8a00\\u654e \\u8eab\\u7cfb\\u56f9\\u5704 \\u6df1\\u6210\\u5ca9 \\u6df1\\u5c71\\u4f55\\u5904\\u949f \\u4ec0\\u9526\\u9762 \\u795e\\u91c7 \\u795e\\u96d5 \\u795e\\u9b42\\u8361\\u98cf \\u795e\\u8ff9 \\u795e\\u66f2 \\u795e\\u66f2\\u8336 \\u795e\\u5723\\u5468 \\u795e\\u6447\\u9b42\\u8361 \\u6c88\\u6d77 \\u6c88\\u6cb3 \\u6c88\\u79ef \\u6c88\\u79ef\\u5ca9 \\u6c88\\u5409\\u7ebf \\u6c88\\u5c71\\u7ebf \\u6c88\\u6c34 \\u6c88\\u9633 \\u6c88\\u5dde \\u5ba1\\u6838 \\u5a76\\u5a18 \\u80be\\u810f \\u5347\\u6597 \\u5347\\u6c5e \\u5347\\u534e \\u5347\\u5e73 \\u5347\\u8fc1\\u7ba1\\u9053 \\u5347\\u5929 \\u5347\\u4ed9 \\u5347\\u5b66\\u538b\\u529b \\u5347\\u9633 \\u751f\\u65e6\\u6de8\\u672b\\u4e11 \\u751f\\u680b\\u590d\\u5c4b \\u751f\\u53d1 \\u751f\\u59dc \\u751f\\u529b\\u9762 \\u751f\\u6001\\u73af\\u5883\\u6e38 \\u751f\\u7530\\u6597 \\u751f\\u7269\\u949f \\u7ef3\\u6263 \\u7701\\u6b32\\u53bb\\u5962 \\u5723\\u676f \\u5723\\u54c8\\u8f9b\\u6258 \\u5723\\u8ff9 \\u5723\\u5e15\\u5f3a\\u53f0 \\u5723\\u795e\\u964d\\u4e34\\u5468 \\u5723\\u4fee\\u4f2f\\u91cc \\u80dc\\u90e8\\u51a0\\u519b \\u80dc\\u8ff9 \\u80dc\\u952e \\u80dc\\u80bd \\u76db\\u4ef7 \\u76db\\u8d5e \\u5c38\\u81e3 \\u5c38\\u8c0f \\u5c38\\u89e3 \\u5c38\\u9e20 \\u5c38\\u5c45\\u9f99\\u89c1 \\u5c38\\u5c45\\u4f59\\u6c14 \\u5c38\\u5229 \\u5c38\\u7984 \\u5c38\\u9640\\u6797 \\u5c38\\u4f4d \\u5c38\\u9954 \\u5c38\\u795d \\u5931\\u4e4b\\u6beb\\u5398 \\u5931\\u4e4b\\u6beb\\u5398\\u8c2c\\u4ee5\\u5343\\u91cc \\u5e08\\u5a18 \\u5e08\\u751f\\u676f \\u5e08\\u4e91\\u800c\\u4e91 \\u8bd7\\u4e91 \\u8bd7\\u8d5e \\u8bd7\\u949f \\u65bd\\u4f73\\u5347 \\u65bd\\u4ec1\\u5e03\\u6069 \\u65bd\\u4ec1\\u5e03\\u6cfd \\u65bd\\u820d \\u65bd\\u7ca5\\u820d\\u996d \\u6e7f\\u5730\\u677e \\u8a69\\u4e91 \\u5341\\u5206\\u5e72 \\u5341\\u5e72 \\u5341\\u91cc \\u5341\\u624e \\u5341\\u53ea \\u5341\\u5468 \\u77f3\\u62d0 \\u77f3\\u7070\\u5ca9 \\u77f3\\u51e0 \\u77f3\\u67af\\u677e\\u8001 \\u77f3\\u6881 \\u77f3\\u677e \\u77f3\\u5c4b\\u5236\\u679c \\u77f3\\u82f1\\u8868 \\u77f3\\u82f1\\u5ca9 \\u77f3\\u82f1\\u949f \\u77f3\\u949f\\u4e73 \\u65f6\\u5c1a\\u5468 \\u65f6\\u5baa\\u5386 \\u65f6\\u949f \\u65f6\\u88c5\\u5468 \\u62fe\\u6c88 \\u98df\\u866b\\u690d\\u7269 \\u98df\\u9762 \\u98df\\u91ce\\u4e4b\\u82f9 \\u98df\\u6b32 \\u53f2\\u67fb\\u514b \\u53f2\\u8ff9 \\u53f2\\u6258\\u59c6 \\u53f2\\u6258\\u745f \\u53f2\\u6258\\u82cf\\u513f \\u53f2\\u6258\\u817e\\u67cf\\u683c \\u53f2\\u6258\\u5a01 \\u53f2\\u6e38 \\u793a\\u8303\\u5355\\u4f4d \\u793a\\u8303\\u6559\\u5b66 \\u793a\\u590d \\u4e16\\u5f69\\u5802 \\u4e16\\u7eaa\\u949f \\u4e16\\u754c\\u676f \\u5e02\\u957f\\u676f \\u4e8b\\u8ff9 \\u4e8b\\u53ef\\u5e72 \\u4e8b\\u60c5\\u5e72\\u8106 \\u4e8b\\u60c5\\u53ef\\u5e72 \\u9970\\u6263 \\u8bd5\\u9a8c\\u53f0 \\u8bd5\\u5236 \\u62ed\\u5e72 \\u662f\\u53ea \\u9002\\u5f53\\u7684 \\u8996\\u5982\\u5bc7\\u4ec7 \\u55dc\\u9178\\u4e73\\u5e72\\u83cc \\u55dc\\u6b32 \\u6536\\u83b7 \\u624b\\u8868 \\u624b\\u5de5\\u53f0 \\u624b\\u94fe \\u624b\\u9762 \\u624b\\u9762\\u8d5a\\u5403 \\u624b\\u672f \\u624b\\u672f\\u53f0 \\u624b\\u9178 \\u624b\\u4e00\\u5377 \\u624b\\u6298 \\u624b\\u5236 \\u624b\\u51a2\\u6cbb\\u866b \\u5b88\\u5fa1 \\u9996\\u90fd\\u676f \\u9996\\u53ea \\u5bff\\u9762 \\u53d7\\u547d\\u4e8e\\u5929 \\u552e\\u540e\\u670d\\u52a1 \\u517d\\u5978 \\u517d\\u6b32 \\u4e66\\u53f0 \\u6b8a\\u57df\\u5468\\u54a8\\u5f55 \\u68b3\\u53d1 \\u68b3\\u5986\\u53f0 \\u6dd1\\u90c1 \\u8212\\u5377 \\u8f93\\u5f81 \\u9f20\\u66f2\\u8349 \\u672f\\u8d64 \\u675f\\u53d1 \\u675f\\u4fee \\u6811\\u6881 \\u6055\\u4e4f\\u4ef7\\u50ac \\u6570\\u4e2a \\u6570\\u4e0e\\u864f\\u786e \\u6570\\u5468 \\u6570\\u5b57\\u949f \\u6570\\u7f6a\\u5e76\\u7f5a \\u7529\\u53d1 \\u53cc\\u96d5 \\u53cc\\u62d0 \\u53cc\\u540e\\u524d\\u5175\\u5f00\\u5c40 \\u53cc\\u80dc\\u7c7b \\u53cc\\u6298 \\u53cc\\u5468 \\u53cc\\u5b50\\u53f6\\u690d\\u7269 \\u6c34\\u8868 \\u6c34\\u624d\\u5e72 \\u6c34\\u6210\\u5ca9 \\u6c34\\u6597 \\u6c34\\u5e72 \\u6c34\\u8c37 \\u6c34\\u8c37\\u4e4b\\u6d77 \\u6c34\\u7ba1\\u9762 \\u6c34\\u91cc \\u6c34\\u91cc\\u4e61 \\u6c34\\u91cc\\u9109 \\u6c34\\u4e00\\u51b2 \\u6c34\\u5df2\\u5e72 \\u6c34\\u51c6\\u6d4b\\u91cf \\u7761\\u7720\\u6b32 \\u987a\\u5fb7\\u8005\\u5409\\u9006\\u5929\\u8005\\u51f6 \\u987a\\u949f\\u5411 \\u987a\\u6731\\u513f \\u8bf4\\u5cb3 \\u4e1d\\u6069\\u53d1\\u6028 \\u4e1d\\u53d1 \\u4e1d\\u6746 \\u4e1d\\u6258\\u7d22 \\u4e1d\\u5f26 \\u79c1\\u6b32 \\u65af\\u4f2f\\u4e01\\u676f \\u65af\\u8fea\\u91cc \\u65af\\u5e72 \\u65af\\u91cc \\u65af\\u91cc\\u67fb\\u6f58 \\u65af\\u6258 \\u65af\\u74e6\\u5e0c\\u91cc \\u6b7b\\u9762 \\u6b7b\\u4f24\\u76f8\\u501f \\u56db\\u5206\\u5386 \\u56db\\u6d77\\u7686\\u51c6 \\u56db\\u91cc \\u56db\\u9762 \\u56db\\u9762\\u949f \\u56db\\u820d\\u516d\\u5165 \\u56db\\u820d\\u4e94\\u5165 \\u56db\\u51f6 \\u56db\\u624e \\u56db\\u53ea \\u5bfa\\u949f \\u9972\\u5582 \\u677e\\u5df4\\u54c7 \\u677e\\u67cf \\u677e\\u5317 \\u677e\\u672c \\u677e\\u6750\\u7ebf\\u866b \\u677e\\u5927\\u8f85 \\u677e\\u98ce \\u677e\\u5188 \\u677e\\u9ad8\\u8def \\u677e\\u679c \\u677e\\u9e64 \\u677e\\u82b1 \\u677e\\u5316\\u77f3 \\u677e\\u7bc1\\u4ea4\\u7fe0 \\u677e\\u9e21 \\u677e\\u6c5f \\u677e\\u80f6 \\u677e\\u7126\\u6cb9 \\u677e\\u8282\\u6cb9 \\u677e\\u4e95\\u79c0 \\u677e\\u83cc \\u677e\\u7b60\\u4e4b\\u64cd \\u677e\\u7b60\\u4e4b\\u8282 \\u677e\\u79d1 \\u677e\\u53e3 \\u677e\\u53e3\\u8611 \\u677e\\u6263 \\u677e\\u7c7b \\u677e\\u8fbd\\u5e73\\u539f \\u677e\\u6797 \\u677e\\u5cad \\u677e\\u9686\\u5b50 \\u677e\\u9732 \\u677e\\u841d \\u677e\\u6bdb \\u677e\\u7164 \\u677e\\u660e \\u677e\\u8611 \\u677e\\u6f20 \\u677e\\u6728 \\u677e\\u6f58 \\u677e\\u76ae\\u7663 \\u677e\\u6d66 \\u677e\\u4e54 \\u677e\\u9752 \\u677e\\u4e18 \\u677e\\u7403 \\u677e\\u6bec \\u677e\\u74e4 \\u677e\\u4ec1 \\u677e\\u8338 \\u677e\\u854a \\u677e\\u5c71 \\u677e\\u72ee\\u72ac \\u677e\\u77f3 \\u677e\\u9f20 \\u677e\\u6811 \\u677e\\u6d9b \\u677e\\u6843\\u82d7\\u65cf\\u81ea\\u6cbb\\u53bf \\u677e\\u6843\\u53bf \\u677e\\u7530 \\u677e\\u5c3e\\u82ad\\u8549 \\u677e\\u7eb9 \\u677e\\u6eaa \\u677e\\u4e0b \\u677e\\u9999 \\u677e\\u96ea\\u6cf0\\u5b50 \\u677e\\u8548 \\u677e\\u9e26 \\u677e\\u70df \\u677e\\u9633 \\u677e\\u53f6 \\u677e\\u6cb9 \\u677e\\u9c7c \\u677e\\u539f \\u677e\\u8d5e\\u5e72\\u5e03 \\u677e\\u85fb\\u866b \\u677e\\u9488 \\u677e\\u679d \\u677e\\u8102 \\u677e\\u6307\\u90e8 \\u677e\\u667a\\u8def \\u677e\\u7af9 \\u677e\\u5b50 \\u9001\\u62a5\\u592b \\u8bf5\\u5ff5 \\u9882\\u7cfb \\u9882\\u8d5e \\u641c\\u85cf \\u641c\\u67fb\\u8bc1 \\u641c\\u8d2d \\u641c\\u96c6 \\u641c\\u62ec \\u641c\\u7f57 \\u641c\\u8bc1 \\u6eb2\\u9762 \\u82cf\\u676f \\u82cf\\u4fc4\\u5728\\u4e2d\\u56fd \\u82cf\\u683c\\u5170 \\u82cf\\u683c\\u5170\\u6298\\u8033\\u732b \\u82cf\\u54c8\\u6258 \\u82cf\\u5bb6\\u5c6f \\u82cf\\u6606 \\u82cf\\u91cc \\u82cf\\u4ed9\\u533a \\u82cf\\u9192 \\u82cf\\u626c\\u6258 \\u9165\\u7b7e \\u7d20\\u53d1 \\u7d20\\u501f \\u5851\\u80f6\\u5236 \\u6eaf\\u6e38 \\u9178\\u61d2 \\u9178\\u9ebb \\u9178\\u8f6f \\u9178\\u75bc \\u9178\\u75db \\u849c\\u53d1 \\u849c\\u82d4 \\u7b97\\u53d1 \\u7b97\\u5386 \\u867d\\u590d\\u80fd\\u590d \\u5c81\\u51f6 \\u5c81\\u807f\\u4e91\\u66ae \\u813a\\u810f \\u788e\\u53d1 \\u788e\\u5c51\\u5ca9 \\u7a57\\u88f3 \\u7a57\\u5e0f\\u98d8\\u4e95\\u5e72 \\u7a57\\u5e37 \\u7a57\\u5e10 \\u5b59\\u6770 \\u7b0b\\u5e72 \\u7f29\\u5f71\\u5fae\\u5377 \\u6240\\u5e03\\u7684 \\u6240\\u5e03\\u4e4b \\u6240\\u7cfb \\u6240\\u4e91 \\u7d22\\u5c14\\u5179\\u4f2f\\u91cc\\u5e73\\u539f \\u7d22\\u5c14\\u5179\\u4f2f\\u91cc\\u77f3\\u73af \\u7d22\\u91cc\\u58eb \\u7d22\\u9a6c\\u91cc \\u7d22\\u99ac\\u91cc \\u7d22\\u9762 \\u7d22\\u6258 \\u9501\\u6263 \\u4ed6\\u949f \\u5854\\u514b \\u5854\\u514b\\u62c9\\u9a6c\\u5e72 \\u5854\\u514b\\u62c9\\u739b\\u5e72 \\u5854\\u91cc\\u73ed \\u5854\\u91cc\\u6728 \\u5854\\u91cc\\u5951\\u4e9a\\u52aa \\u5854\\u4ec0\\u5e72 \\u5854\\u4ec0\\u5e93\\u5c14\\u5e72\\u5854\\u5409\\u514b\\u81ea\\u6cbb\\u53bf \\u5854\\u4ec0\\u5e93\\u5c14\\u5e72\\u4e61 \\u5854\\u4ec0\\u5e93\\u5c14\\u5e72\\u81ea\\u6cbb\\u53bf \\u5854\\u949f \\u80ce\\u53d1 \\u53f0\\u5b89 \\u53f0\\u5317\\u5e02\\u957f \\u53f0\\u7b14 \\u53f0\\u5e03 \\u53f0\\u79e4 \\u53f0\\u706f \\u53f0\\u51f3 \\u53f0\\u98ce \\u53f0\\u9274 \\u53f0\\u5386 \\u53f0\\u9762 \\u53f0\\u76d8 \\u53f0\\u6f8e\\u91d1\\u9a6c \\u53f0\\u7403 \\u53f0\\u5c71 \\u53f0\\u6247 \\u53f0\\u6e7e \\u53f0\\u6e7e\\u654e\\u80b2\\u5b66\\u9662 \\u53f0\\u6e7e\\u53f0 \\u53f0\\u5236 \\u53f0\\u4e2d \\u53f0\\u4e2d\\u654e\\u80b2\\u5927\\u5b66 \\u53f0\\u949f \\u53f0\\u5dde \\u9a80\\u501f \\u592a\\u51b2 \\u592a\\u521d\\u5386 \\u592a\\u5e72 \\u592a\\u540e \\u592a\\u9ebb\\u91cc \\u592a\\u9633\\u9ed1\\u5b50\\u5468 \\u6cf0\\u6597 \\u8d2a\\u6b32 \\u575b\\u767d\\u5e72 \\u575b\\u9648\\u5e74 \\u575b\\u9ad8\\u7cb1 \\u575b\\u597d\\u9152 \\u575b\\u9a1e \\u575b\\u4f73\\u917f \\u575b\\u8001\\u9152 \\u575b\\u7f8e\\u9152 \\u575b\\u5973\\u513f\\u7ea2 \\u575b\\u70e7\\u5200\\u5b50 \\u575b\\u71d2\\u5200\\u5b50 \\u575b\\u575b\\u7f50\\u7f50 \\u575b\\u5b50 \\u6f6d\\u7949\\u53f6\\u5409 \\u53f9\\u670d \\u53f9\\u53f7 \\u53f9\\u7edd \\u53f9\\u8d4f \\u53f9\\u4e3a \\u53f9\\u4e3a\\u89c2\\u6b62 \\u53f9\\u7fa1 \\u63a2\\u77e5\\u6b32 \\u78b3\\u9178\\u5ca9 \\u6b4e\\u5401 \\u6c64\\u9762 \\u6c64\\u56e2 \\u6c64\\u4e0b\\u9762 \\u7cd6\\u918b\\u91cc\\u810a \\u70eb\\u6b21\\u53d1 \\u70eb\\u53d1 \\u70eb\\u4e2a \\u70eb\\u4e2a\\u53d1 \\u70eb\\u9762 \\u70eb\\u5b8c\\u53d1 \\u70eb\\u4e00\\u6b21\\u53d1 \\u70eb\\u4e00\\u4e2a\\u53d1 \\u9676\\u5236 \\u7279\\u522b\\u516c\\u79ef\\u91d1 \\u7279\\u91cc \\u7279\\u5185\\u91cc\\u8d39 \\u7279\\u677e\\u52a0 \\u7279\\u5236 \\u7279\\u51c6 \\u817e\\u5347 \\u85e4\\u5236 \\u63d0\\u6881 \\u63d0\\u5236 \\u63d0\\u5b50\\u5e72 \\u9898\\u7b7e \\u5243\\u53d1 \\u5243\\u80e1 \\u5243\\u987b \\u5929\\u51ac\\u9170\\u80fa \\u5929\\u7ffb\\u5730\\u590d \\u5929\\u590d \\u5929\\u5e72 \\u5929\\u5e72\\u7269\\u71e5 \\u5929\\u540e \\u5929\\u514b\\u5730\\u51b2 \\u5929\\u5386 \\u5929\\u53f0 \\u5929\\u6587\\u5b66\\u949f \\u5929\\u6587\\u949f \\u5929\\u5fc3\\u5ca9 \\u5929\\u8981\\u843d\\u96e8\\u5a18\\u8981\\u5ac1\\u4eba \\u5929\\u8981\\u4e0b\\u96e8\\u5a18\\u8981\\u5ac1\\u4eba \\u7530\\u8c37 \\u751c\\u9762\\u91ac \\u751c\\u6c34\\u9762 \\u6375\\u9762 \\u6311\\u5927\\u6881 \\u6311\\u4e86 \\u6311\\u4e86\\u53ea \\u6761\\u51e0 \\u8c03\\u8868 \\u8c03\\u67fb\\u56e2 \\u8c03\\u5f26 \\u8c03\\u5236 \\u8df3\\u8868 \\u8df3\\u6881 \\u8df3\\u6881\\u7316\\u7357\\u4e4b\\u5c0f\\u4e11 \\u8df3\\u6881\\u5c0f\\u4e11 \\u8df3\\u53ea\\u821e \\u94c1\\u677f \\u94c1\\u677f\\u9762 \\u94c1\\u677f\\u725b\\u67f3 \\u94c1\\u677f\\u725b\\u8089 \\u94c1\\u6746 \\u94c1\\u62d0 \\u94c1\\u6263 \\u94c1\\u6258 \\u94c1\\u5236 \\u94c1\\u949f \\u542c\\u5f26 \\u505c\\u5236 \\u901a\\u5e03\\u56fe \\u901a\\u5978 \\u901a\\u5386 \\u901a\\u5fc3\\u9762 \\u540c\\u6b65\\u536b\\u661f \\u540c\\u4faa\\u538b\\u529b \\u540c\\u5403 \\u540c\\u4eba \\u540c\\u4eba\\u5fd7 \\u540c\\u4f11\\u5171\\u621a \\u94dc\\u6597\\u513f \\u94dc\\u6263 \\u94dc\\u5236 \\u94dc\\u949f \\u77b3\\u8499 \\u5077\\u5c1d\\u7981\\u679c \\u5077\\u6881\\u6362\\u67f1 \\u5934\\u53d1 \\u5934\\u53d1\\u80e1\\u5b50\\u4e00\\u628a\\u6293 \\u5934\\u82b1\\u53d1 \\u5934\\u5dfe\\u540a\\u5728\\u6c34\\u91cc \\u6295\\u6258 \\u79c3\\u53d1 \\u79c3\\u5983\\u4e4b\\u53d1 \\u56fe\\u4e66\\u9986\\u5468 \\u6d82\\u9577\\u671b \\u6d82\\u5c14\\u5e72 \\u6d82\\u9022\\u5e74 \\u6d82\\u9e3f\\u94a6 \\u6d82\\u9d3b\\u6b3d \\u6d82\\u60e0\\u5143 \\u6d82\\u60e0\\u6e90 \\u6d82\\u6d46\\u53f0 \\u6d82\\u8c28\\u7533 \\u6d82\\u8b39\\u7533 \\u6d82\\u5c45\\u8d24 \\u6d82\\u5764 \\u6d82\\u7f8e\\u4f26 \\u6d82\\u654f\\u6052 \\u6d82\\u654f\\u6046 \\u6d82\\u5584\\u59ae \\u6d82\\u7ecd\\u7143 \\u6d82\\u5929\\u76f8 \\u6d82\\u6587\\u751f \\u6d82\\u9192\\u54f2 \\u6d82\\u59d3 \\u6d82\\u5e8f\\u7444 \\u6d82\\u6c38\\u8f89 \\u6d82\\u7fbd\\u537f \\u6d82\\u6708 \\u6d82\\u6cfd \\u6d82\\u6cfd\\u6c11 \\u6d82\\u6fa4\\u6c11 \\u6d82\\u957f\\u671b \\u6d82\\u58ee\\u52cb \\u6d82\\u58ef\\u52f3 \\u571f\\u8c37\\u7960 \\u571f\\u6258\\u9c7c \\u571f\\u5236 \\u56e2\\u7c89 \\u56e2\\u4f19 \\u56e2\\u4f53\\u51a0\\u519b \\u56e2\\u5b50 \\u56e2\\ud86a\\udcae \\u63a8\\u9648\\u5e03\\u65b0 \\u63a8\\u8bda\\u5e03\\u516c \\u63a8\\u8bda\\u5e03\\u4fe1 \\u63a8\\u8f87\\u5f52\\u91cc \\u63a8\\u6258 \\u63a8\\u6258\\u4e4b\\u8bcd \\u63a8\\u633d \\u63a8\\u5f26 \\u817f\\u9178 \\u541e\\u5e76 \\u541e\\u54bd \\u5c6f\\u624e \\u6258\\u676f \\u6258\\u6bd4\\u9ea6\\u594e\\u5c14 \\u6258\\u6bd4\\u4e9a\\u65af \\u6258\\u94b5\\u4eba \\u6258\\u94b5\\u50e7 \\u6258\\u94b5\\u4fee\\u4f1a \\u6258\\u9262 \\u6258\\u51fa \\u6258\\u80c6 \\u6258\\u767b\\u6c49\\u961f \\u6258\\u5730 \\u6258\\u8482 \\u6258\\u513f \\u6258\\u5c14 \\u6258\\u592b \\u6258\\u798f \\u6258\\u798f\\u8003 \\u6258\\u8364\\u54b8\\u98df \\u6258\\u67b6 \\u6258\\u514b \\u6258\\u514b\\u6258 \\u6258\\u62c9 \\u6258\\u8fa3\\u65af \\u6258\\u83b1\\u591a \\u6258\\u8d56 \\u6258\\u8001\\u9662 \\u6258\\u8001\\u4e2d\\u5fc3 \\u6258\\u52d2 \\u6258\\u91cc \\u6258\\u5229\\u515a\\u4eba \\u6258\\u5229\\u7c73\\u5c14 \\u6258\\u9886 \\u6258\\u7f57\\u65af\\u5c71 \\u6258\\u6d1b\\u8328\\u57fa \\u6258\\u6d1b\\u65af\\u57fa \\u6258\\u9a6c \\u6258\\u7c73 \\u6258\\u58a8 \\u6258\\u6728\\u5c14 \\u6258\\u76d8 \\u6258\\u8d77 \\u6258\\u745e\\u8d5b \\u6258\\u745e\\u4e1d \\u6258\\u816e \\u6258\\u585e\\u6d1b \\u6258\\u8272 \\u6258\\u5b9e \\u6258\\u719f \\u6258\\u65af\\u5361 \\u6258\\u5854\\u5929\\u738b \\u6258\\u80ce \\u6258\\u7279 \\u6258\\u7ef4 \\u6258\\u53f6 \\u6258\\u5e7c \\u6258\\u80b2 \\u6258\\u8fd0 \\u6258\\u8fd0\\u884c\\u674e \\u6258\\u4f4f \\u6258\\u5b50 \\u6258\\u8db3 \\u62d6\\u6597 \\u8131\\u53d1 \\u8131\\u8c37\\u673a \\u5768\\u91cc \\u8dce\\u7ea4 \\u553e\\u9762 \\u553e\\u9762\\u81ea\\u5e72 \\u553e\\u6cab\\u76f4\\u54bd \\u74e6\\u5c14\\u57fa\\u91cc \\u74e6\\u91cc \\u74e6\\u677e \\u5916\\u5f3a\\u4e2d\\u5e72 \\u5916\\u70df \\u5916\\u6b32 \\u5916\\u5fa1\\u5176\\u4fae \\u5916\\u5236 \\u5f2f\\u7ba1\\u9762 \\u5b8c\\u5168\\u6108\\u590d \\u987d\\u5364 \\u987d\\u7b51\\u821e\\u7b08 \\u633d\\u8bcd \\u633d\\u8a5e \\u633d\\u989d \\u633d\\u592b \\u633d\\u6b4c \\u633d\\u8054 \\u633d\\u806f \\u633d\\u66f2 \\u633d\\u8bd7 \\u633d\\u8a69 \\u665a\\u949f \\u7efe\\u53d1 \\u7897\\u9762 \\u4e07\\u91cc \\u4e07\\u91cc\\u957f\\u5f81 \\u4e07\\u5386 \\u4e07\\u5e74 \\u4e07\\u5e74\\u5386\\u8868 \\u4e07\\u65d7 \\u4e07\\u4fdf \\u4e07\\u575b \\u4e07\\u624e \\u4e07\\u53ea \\u8155\\u8868 \\u738b\\u5e72\\u53d1 \\u738b\\u4faf\\u540e \\u738b\\u540e \\u738b\\u7199\\u677e \\u738b\\u4e8e\\u771f \\u738b\\u6b63\\u6770 \\u738b\\u5b50\\u9762 \\u7f51\\u5fa1 \\u7f51\\u5fd7 \\u5f80\\u65e5\\u7121\\u4ec7 \\u5fd8\\u751f\\u820d\\u6b7b \\u671b\\u540e\\u77f3 \\u5a01\\u5947\\u6258 \\u504e\\u5e72 \\u7168\\u5e72 \\u97e6\\u540e \\u4e3a\\u4e2d\\u53f0 \\u7ef4\\u6597 \\u7ef4\\u514b \\u7ef4\\u514b\\u6258 \\u7ef4\\u7cfb \\u4f1f\\u6676\\u5ca9 \\u82c7\\u82d5\\u7cfb\\u5de2 \\u82c7\\u5e2d \\u5c3e\\u6ce8 \\u536b\\u661f\\u949f \\u672a\\u5e72 \\u80c3\\u810f \\u5582\\u9971 \\u5582\\u54fa \\u5582\\u52a8\\u7269 \\u5582\\u9e45 \\u5582\\u996d \\u5582\\u7ed9 \\u5582\\u8fc7 \\u5582\\u9e21 \\u5582\\u4e86 \\u5582\\u9a74 \\u5582\\u9a6c \\u5582\\u6bcd\\u4e73 \\u5582\\u5976 \\u5582\\u4f60 \\u5582\\u4e73 \\u5582\\u98df \\u5582\\u5b83 \\u5582\\u6211 \\u5582\\u9e2d \\u5582\\u7f8a \\u5582\\u517b \\u5582\\u9c7c \\u5582\\u732a \\u6170\\u501f \\u9b4f\\u90c1\\u5947 \\u6587\\u91c7 \\u6587\\u91c7\\u90c1\\u90c1 \\u6587\\u4e11 \\u6587\\u9526\\u590d\\u9631 \\u6587\\u65af\\u8303\\u6069 \\u7086\\u9762 \\u7a33\\u5403\\u4e09\\u6ce8 \\u7a33\\u624e \\u95ee\\u5377 \\u95ee\\u5377\\u5927\\u8c03\\u67fb \\u95ee\\u5377\\u8c03\\u67fb \\u7fc1\\u5e72\\u6643 \\u7fc1\\u90c1\\u5bb9 \\u7a9d\\u91cc \\u7a9d\\u91cc\\u7a9d\\u56ca \\u8717\\u6746 \\u6211\\u7cfb \\u6c83\\u4f9d\\u91c7\\u514b \\u5367\\u85aa\\u5c1d\\u80c6 \\u63e1\\u53d1 \\u4e4c\\u4e1c\\u67fb\\u514b \\u4e4c\\u53d1 \\u4e4c\\u5e72\\u8fbe \\u4e4c\\u72d7\\u5403\\u98df\\u767d\\u72d7\\u5f53\\u707e \\u4e4c\\u5170\\u5df4\\u6258 \\u4e4c\\u91cc \\u4e4c\\u9f99\\u9762 \\u4e4c\\u6d1b\\u6258\\u54c1 \\u4e4c\\u677e \\u4e4c\\u6258\\u90a6 \\u6c61\\u8511 \\u5deb\\u54b8 \\u8bec\\u8511 \\u5c4b\\u6881 \\u65e0\\u5e72 \\u65e0\\u4ef7 \\u65e0\\u4ef7\\u4e8b \\u65e0\\u4ef7\\u73cd\\u73e0 \\u65e0\\u7cbe\\u6253\\u91c7 \\u65e0\\u5398\\u5934 \\u65e0\\u6881 \\u65e0\\u6881\\u6597 \\u65e0\\u6b32 \\u5434\\u91c7\\u748b \\u5434\\u7693\\u5347 \\u5434\\u91cc\\u514b \\u5434\\u8363\\u6770 \\u5434\\u80b2\\u5347 \\u7121\\u8a00\\u4e0d\\u4ec7 \\u4e94\\u91c7 \\u4e94\\u6597 \\u4e94\\u8c37 \\u4e94\\u884c\\u751f\\u514b \\u4e94\\u68f5\\u677e \\u4e94\\u91cc \\u4e94\\u8f9f \\u4e94\\u5f26 \\u4e94\\u810f \\u4e94\\u624e \\u4e94\\u53ea \\u4e94\\u5468 \\u4f0d\\u91c7\\u514b \\u6b66\\u4e11 \\u6b66\\u5927\\u90ce\\u5403\\u6bd2\\u836f \\u6b66\\u540e \\u6b66\\u91cc\\u7701 \\u6b66\\u677e \\u821e\\u540e \\u821e\\u6c34\\u7aef\\u91cc \\u5140\\u672f \\u52ff\\u91cc\\u6d1e\\u5c9b \\u7269\\u6b32 \\u897f\\u540e \\u897f\\u91cc \\u897f\\u5386 \\u897f\\u5229\\u53e4\\u91cc \\u897f\\u677e \\u897f\\u5f81 \\u897f\\u5468 \\u897f\\u5468\\u949f \\u5438\\u5e72 \\u5438\\u70df \\u5e0c\\u4f2f\\u6765\\u5386 \\u5e0c\\u62c9\\u514b \\u5e0c\\u65af\\u4ed1 \\u77fd\\u5ca9 \\u77fd\\u8d28\\u5ca9 \\u606f\\u8c37 \\u665e\\u53d1 \\u6b37\\u5401 \\u7a00\\u91cc \\u7a00\\u91cc\\u54d7\\u5566 \\u5092\\u5e78 \\u5faf\\u5e78 \\u5e2d\\u5377 \\u5e2d\\u68da \\u5e2d\\u5fd7\\u6210 \\u88ad\\u5377 \\u6d17\\u8361 \\u6d17\\u53d1 \\u6d17\\u53d1\\u7682 \\u6d17\\u8138\\u53f0 \\u6d17\\u624b\\u53f0 \\u559c\\u6b22\\u8868 \\u559c\\u6b22\\u949f \\u620f\\u5f69\\u5a31\\u4eb2 \\u7cfb\\u81c2 \\u7cfb\\u81c2\\u4e4b\\u5ba0 \\u7cfb\\u6cca \\u7cfb\\u8239\\u6869 \\u7cfb\\u8f9e \\u7cfb\\u5e26 \\u7cfb\\u5230 \\u7cfb\\u800c\\u4e0d\\u98df \\u7cfb\\u53d1\\u5e26 \\u7cfb\\u98ce\\u6355\\u666f \\u7cfb\\u98ce\\u6355\\u5f71 \\u7cfb\\u7f1a \\u7cfb\\u4e2a \\u7cfb\\u88f9 \\u7cfb\\u597d \\u7cfb\\u6000 \\u7cfb\\u83b7 \\u7cfb\\u7ed3 \\u7cfb\\u7d27 \\u7cfb\\u9888 \\u7cfb\\u9888\\u9619\\u5ead \\u7cfb\\u6263 \\u7cfb\\u88e4\\u5b50 \\u7cfb\\u7f06 \\u7cfb\\u7262 \\u7cfb\\u4e86 \\u7cfb\\u7d2f \\u7cfb\\u604b \\u7cfb\\u94c3\\u89e3\\u94c3 \\u7cfb\\u94c3\\u4eba \\u7cfb\\u7559 \\u7cfb\\u9a6c \\u7cfb\\u547d \\u7cfb\\u637b\\u513f \\u7cfb\\u5ff5 \\u7cfb\\u56da \\u7cfb\\u4e0a \\u7cfb\\u7ef3 \\u7cfb\\u4e16 \\u7cfb\\u6570 \\u7cfb\\u4e1d\\u5e26 \\u7cfb\\u8e44 \\u7cfb\\u6761 \\u7cfb\\u5934\\u5dfe \\u7cfb\\u4e3a \\u7cfb\\u7232 \\u7cfb\\u7cfb \\u7cfb\\u978b\\u5e26 \\u7cfb\\u5fc3 \\u7cfb\\u8170 \\u7cfb\\u4e00\\u756a \\u7cfb\\u4e00\\u7247 \\u7cfb\\u4e00\\u7ebf \\u7cfb\\u4e00\\u79cd \\u7cfb\\u6709 \\u7cfb\\u4e8e \\u7cfb\\u4e8e\\u4e00\\u53d1 \\u7cfb\\u72f1 \\u7cfb\\u722a \\u7cfb\\u7740 \\u7cfb\\u4e89 \\u7cfb\\u6307 \\u7cfb\\u8dbe \\u7cfb\\u8e35 \\u7cfb\\u4f4f \\u7ec6\\u4e0d\\u5bb9\\u53d1 \\u7ec6\\u70bc \\u7ec6\\u5982\\u53d1 \\u7ec6\\u54bd \\u7ec6\\u81f4 \\u8204\\u5364 \\u6f5f\\u5364 \\u867e\\u5e72 \\u867e\\u987b \\u4fa0\\u6c14\\u5e72\\u4e91 \\u72ce\\u5993\\u51b6\\u6e38 \\u4e0b\\u6446 \\u4e0b\\u91c7 \\u4e0b\\u8bfe\\u949f \\u4e0b\\u91cc \\u4e0b\\u6881 \\u4e0b\\u4ed1\\u8def \\u4e0b\\u54bd \\u4e0b\\u6e38 \\u4e0b\\u5468 \\u590f\\u540e\\u6c0f \\u590f\\u91cc\\u592b \\u590f\\u5386 \\u590f\\u4e8e\\u4e54 \\u590f\\u4e8e\\u55ac \\u4ed9\\u540e \\u4ed9\\u8ff9 \\u4ed9\\u53f0 \\u4ed9\\u5ca9 \\u5148\\u5c1d \\u5148\\u5e72\\u4e3a\\u656c \\u5148\\u7b7e \\u5148\\u5929\\u4e0b\\u4e4b\\u5fe7\\u800c\\u5fe7\\u540e\\u5929\\u4e0b\\u4e4b\\u4e50\\u800c\\u4e50 \\u5148\\u5c0f\\u4eba\\u540e\\u541b\\u5b50 \\u7ea4\\u592b \\u7ea4\\u6237 \\u7ea4\\u7ef4\\u690d\\u7269 \\u9c9c\\u8c37\\u738b \\u9c9c\\u4e8e \\u8d24\\u540e \\u5f26\\u52a8 \\u5f26\\u65ad \\u5f26\\u6b4c \\u5f26\\u4e50 \\u5f26\\u5668 \\u5f26\\u7434 \\u5f26\\u58f0 \\u5f26\\u7d22 \\u5f26\\u7ebf \\u5f26\\u97f3 \\u5f26\\u8f74 \\u54b8\\u5b89\\u533a \\u54b8\\u6c60 \\u54b8\\u4e30 \\u54b8\\u548c \\u54b8\\u4ea8 \\u54b8\\u955c \\u54b8\\u5364 \\u54b8\\u5b81 \\u54b8\\u8ba4\\u4e3a \\u54b8\\u4e94\\u767b\\u4e09 \\u54b8\\u4fe1 \\u54b8\\u5174 \\u54b8\\u9633 \\u54b8\\u5b9c \\u8ce2\\u540e \\u663e\\u793a\\u8868 \\u663e\\u793a\\u949f \\u53bf\\u5fd7 \\u7fa1\\u53f9 \\u4e61\\u91cc \\u4e61\\u613f \\u76f8\\u5e76 \\u76f8\\u51b2 \\u76f8\\u5e72 \\u76f8\\u5978 \\u76f8\\u514b \\u76f8\\u91cc \\u76f8\\u6258 \\u9999\\u6597 \\u9999\\u5e72 \\u9999\\u69ad\\u91cc\\u5927\\u9053 \\u9999\\u70df \\u9999\\u90c1 \\u9999\\u7682 \\u7bb1\\u6263 \\u8be6\\u6ce8 \\u54cd\\u5f26 \\u54cd\\u949f \\u5411\\u5bfc \\u5411\\u8fe9 \\u5411\\u6666 \\u5411\\u660e \\u5411\\u6155 \\u5411\\u5f80 \\u5411\\u5e94 \\u5411\\u8005 \\u9879\\u94fe \\u6a61\\u6597 \\u6a61\\u5b50\\u9762 \\u6d88\\u8d39\\u6b32 \\u5bb5\\u5f81 \\u8427\\u53c2 \\u8427\\u884c\\u8303\\u7bc6 \\u9500\\u6bc1 \\u5c0f\\u4fbf\\u6597 \\u5c0f\\u5c1d \\u5c0f\\u4e11 \\u5c0f\\u4e11\\u8df3\\u6881 \\u5c0f\\u8303 \\u5c0f\\u51e0 \\u5c0f\\u4ef7 \\u5c0f\\u6770 \\u5c0f\\u6817\\u65ec \\u5c0f\\u5343\\u4e16\\u754c \\u5c0f\\u677e \\u5c0f\\u578b\\u949f \\u5c0f\\u4f59 \\u5c0f\\u4e91 \\u5c0f\\u6cfd\\u5f81\\u5c14 \\u5c0f\\u53ea \\u5c0f\\u949f \\u6821\\u6838 \\u6b47\\u65af\\u5e95\\u91cc \\u90aa\\u4e0d\\u5e72\\u6b63 \\u90aa\\u8f9f \\u659c\\u7ba1\\u9762 \\u978b\\u6263 \\u5199\\u5b57\\u53f0 \\u6cc4\\u6b32 \\u68b0\\u7cfb \\u8c22\\u798f\\u677e \\u8c22\\u91cc \\u87f9\\u9ec4\\u9c8d\\u9c7c\\u9762 \\u5fc3\\u8361\\u795e\\u6447 \\u5fc3\\u9ad8\\u906e\\u4e86\\u592a\\u9633 \\u5fc3\\u82b1\\u6012\\u53d1 \\u5fc3\\u7cfb \\u5fc3\\u7ec6\\u4f3c\\u53d1 \\u5fc3\\u5f26 \\u5fc3\\u76f8\\u7cfb \\u5fc3\\u810f \\u5fc3\\u810f\\u590d\\u82cf\\u672f \\u8f9b\\u4e11 \\u8f9b\\u8fa3\\u9762 \\u8f9b\\u91cc\\u5e0c \\u65b0\\u5e72 \\u65b0\\u5580\\u91cc\\u591a\\u5c3c\\u4e9a \\u65b0\\u5386 \\u65b0\\u624e \\u4fe1\\u9a6c\\u6e38\\u7f30 \\u4fe1\\u5929\\u6e38 \\u4fe1\\u6258 \\u4fe1\\u6258\\u8d38\\u6613 \\u8845\\u949f \\u661f\\u8fb0\\u8868 \\u661f\\u6597 \\u661f\\u56de \\u661f\\u5386 \\u661f\\u5386\\u8868 \\u661f\\u7f57\\u4e91\\u5e03 \\u661f\\u79fb\\u6597\\u6362 \\u661f\\u79fb\\u6597\\u8f6c \\u661f\\u5360\\u5b66 \\u5211\\u514b \\u5211\\u8f9f \\u5211\\u4e8e \\u5f62\\u5355\\u5f71\\u53ea \\u5f62\\u5b64\\u5f71\\u53ea \\u5f62\\u5f71\\u76f8\\u540a \\u5174\\u4e91\\u5e03\\u96e8 \\u5e78\\u81e3 \\u5e78\\u5b58 \\u5e78\\u611f\\u6b4c\\u59ec \\u5e78\\u8fdb \\u5e78\\u514d \\u5e78\\u5e78 \\u5e78\\u8fd0 \\u5e78\\u8fd0\\u80e1 \\u6027\\u6cfc\\u51f6\\u987d \\u6027\\u6b32 \\u59d3\\u5cb3 \\u51f6\\u5fb7 \\u51f6\\u5730 \\u51f6\\u591a\\u5409\\u5c11 \\u51f6\\u670d \\u51f6\\u602a \\u51f6\\u8017 \\u51f6\\u8352 \\u51f6\\u793c \\u51f6\\u95e8 \\u51f6\\u9006 \\u51f6\\u5e74 \\u51f6\\u5e74\\u9965\\u5c81 \\u51f6\\u6c14 \\u51f6\\u65e5 \\u51f6\\u715e \\u51f6\\u8eab \\u51f6\\u795e \\u51f6\\u4e8b \\u51f6\\u7ad6 \\u51f6\\u6b7b \\u51f6\\u8086 \\u51f6\\u5c81 \\u51f6\\u4fe1 \\u51f6\\u8baf \\u51f6\\u71c4 \\u51f6\\u5b85 \\u51f6\\u5146 \\u51f6\\u7ec8\\u9699\\u672b \\u96c4\\u6597\\u6597 \\u4f11\\u4ed1\\u6e56 \\u4f11\\u621a \\u4fee\\u80e1\\u5200 \\u4fee\\u6770\\u6977 \\u4fee\\u91d1 \\u4fee\\u656c \\u4fee\\u540d \\u4fee\\u812f \\u4fee\\u6da6 \\u4fee\\u6a3e \\u5bbf\\u677e \\u79c0\\u53d1 \\u8896\\u6263 \\u8896\\u4e00\\u5377 \\u5401\\u5488 \\u5401\\u55df \\u5401\\u4e86 \\u5401\\u6c14 \\u5401\\u53f9 \\u5401\\u5401 \\u5401\\u5618 \\u5401\\u4fde \\u987b\\u53d1 \\u987b\\u6839 \\u987b\\u540e\\u6c34 \\u987b\\u80e1 \\u987b\\u9cb8 \\u987b\\u6bdb \\u987b\\u7709 \\u987b\\u5f25\\u5c71 \\u987b\\u9aef \\u987b\\u9ca8 \\u987b\\u751f \\u987b\\u987b \\u987b\\u5b50 \\u865a\\u51b2 \\u589f\\u91cc \\u5f90\\u6c47 \\u5f90\\u6c47\\u533a \\u5f90\\u5bb6\\u6c47 \\u5f90\\u4f59\\u4f1f \\u5f90\\u8d5e\\u5347 \\u8bb8\\u4eba\\u4e30 \\u8bb8\\u5723\\u6770 \\u8bb8\\u613f \\u8bb8\\u613f\\u8d77\\u7ecf \\u65ed\\u65e5\\u521d\\u5347 \\u6064\\u5178 \\u6064\\u8352 \\u6064\\u91d1 \\u7eed\\u7b7e \\u7eed\\u5f26 \\u84c4\\u53d1 \\u84c4\\u80e1 \\u84c4\\u987b \\u5ba3\\u5e03 \\u5ba3\\u4f20\\u5468 \\u55a7\\u54c4 \\u7384\\u53c2 \\u7384\\u6b66\\u5ca9 \\u7384\\u9488 \\u7384\\u5236 \\u60ac\\u81c2\\u6881 \\u60ac\\u6881 \\u60ac\\u949f \\u60ac\\u80c4 \\u65cb\\u5e72\\u8f6c\\u5764 \\u65cb\\u56de \\u65cb\\u91cc \\u65cb\\u8f9f \\u524a\\u53d1 \\u524a\\u9762 \\u859b\\u677e\\u5e72 \\u8e05\\u95e8\\u4e86\\u6237 \\u96ea\\u7a97\\u8424\\u51e0 \\u96ea\\u677e \\u8840\\u624d\\u5e72 \\u8840\\u53c2 \\u8840\\u5df2\\u5e72 \\u8840\\u75c7 \\u718f\\u8349 \\u718f\\u98ce \\u718f\\u98ce\\u5f90\\u6765 \\u718f\\u8150 \\u718f\\u8d6b \\u718f\\u9ed1 \\u718f\\u9e21 \\u718f\\u70e4 \\u718f\\u7b3c \\u718f\\u946a \\u718f\\u4eba \\u718f\\u8089 \\u718f\\u9676 \\u718f\\u9676\\u6210\\u6027 \\u718f\\u5929 \\u718f\\u4e60 \\u718f\\u718f \\u718f\\u8863\\u8349 \\u718f\\u9c7c\\u513f \\u718f\\u70dd \\u718f\\u84b8 \\u718f\\u84b8\\u5242 \\u718f\\u84b8\\u5ba4 \\u718f\\u5236 \\u85b0\\u4fee \\u5de1\\u56de \\u5de1\\u56de\\u68c0\\u67fb \\u538b\\u6746 \\u538b\\u529b\\u8868 \\u538b\\u9762\\u68cd \\u538b\\u80c4\\u5b50 \\u9e26\\u7a9d\\u91cc\\u51fa\\u51e4\\u51f0 \\u5d16\\u5e7f \\u54d1\\u5b50\\u6258\\u68a6 \\u96c5\\u6e38 \\u96c5\\u81f4 \\u96c5\\u7b51 \\u4e9a\\u91cc \\u4e9a\\u7f8e\\u5c3c\\u4e9a\\u5386 \\u4e9a\\u9752\\u676f \\u4e9a\\u677e\\u68ee \\u4e9a\\u6d32\\u676f \\u54bd\\u4e0d\\u4e86 \\u54bd\\u5230 \\u54bd\\u5e72 \\u54bd\\u808c \\u54bd\\u8fdb \\u54bd\\u82e6\\u541e\\u7518 \\u54bd\\u4e86 \\u54bd\\u6c14 \\u54bd\\u553e \\u54bd\\u4e0b \\u54bd\\u7740 \\u54bd\\u4f4f \\u70df\\u8349 \\u70df\\u5382 \\u70df\\u888b \\u70df\\u888b\\u6746\\u513f \\u70df\\u8482 \\u70df\\u6597 \\u70df\\u6746 \\u70df\\u7f38 \\u70df\\u7ba1 \\u70df\\u7ba1\\u9762 \\u70df\\u5bb3 \\u70df\\u7070 \\u70df\\u78b1 \\u70df\\u7981 \\u70df\\u9152 \\u70df\\u5377 \\u70df\\u6c11 \\u70df\\u519c \\u70df\\u5c41\\u80a1 \\u70df\\u5708 \\u70df\\u4e1d \\u70df\\u5934 \\u70df\\u718f \\u70df\\u718f\\u706b\\u71ce \\u70df\\u869c \\u70df\\u53f6 \\u70df\\u7eb8\\u5e97 \\u70df\\u5634 \\u814c\\u91cc\\u5df4\\u81dc \\u814c\\u81dc \\u814c\\u4436 \\u814c\\u5236 \\u4e25\\u4e91\\u519c \\u8a00\\u8fa9\\u800c\\u786e \\u8a00\\u5927\\u800c\\u5938 \\u8a00\\u4e91 \\u5ca9\\u4ed3\\u4f7f\\u8282\\u56e2 \\u5ca9\\u5c42 \\u5ca9\\u5e8a \\u5ca9\\u6751 \\u5ca9\\u6751\\u660e\\u5baa \\u5ca9\\u57fa \\u5ca9\\u6d46 \\u5ca9\\u6d46\\u5ca9 \\u5ca9\\u7901 \\u5ca9\\u6fd1\\u5065 \\u5ca9\\u8109 \\u5ca9\\u68c9 \\u5ca9\\u5708 \\u5ca9\\u6eb6 \\u5ca9\\u77f3 \\u5ca9\\u571f \\u5ca9\\u5c51 \\u5ca9\\u5fc3 \\u5ca9\\u76d0 \\u5ca9\\u7f8a \\u6cbf\\u95e8\\u6258\\u94b5 \\u7814\\u5236 \\u7b75\\u51e0 \\u773c\\u5e72 \\u773c\\u82b1\\u4e86\\u4e71 \\u773c\\u524d\\u82b1\\u53d1 \\u773c\\u9178 \\u5043\\u4ec6 \\u5043\\u677e \\u8273\\u540e \\u5501\\u540a \\u9a8c\\u6838 \\u990d\\u4e8e\\u6e38\\u4e50 \\u71d5\\u51e0 \\u626c\\u8c37 \\u7f8a\\u987b\\u75ae \\u9633\\u6625\\u9762 \\u9633\\u5386 \\u6768\\u91c7\\u59ae \\u6768\\u51cc\\u793a\\u8303\\u533a \\u6768\\u65e5\\u677e \\u6768\\u58eb\\u6881 \\u6768\\u677e \\u6768\\u82cf\\u68e3 \\u6768\\u6587\\u5fd7 \\u6d0b\\u53c2 \\u6d0b\\u9762 \\u6d0b\\u70df \\u517b\\u53d1 \\u5996\\u540e \\u5996\\u91cc\\u5996\\u6c14 \\u8170\\u6746 \\u8170\\u95f4\\u7cfb \\u8170\\u6263 \\u8170\\u9178 \\u8170\\u7cfb \\u8170\\u4e00\\u5377 \\u4fa5\\u5929\\u4e4b\\u5e78 \\u4fa5\\u5e78 \\u59da\\u91c7\\u9896 \\u59da\\u5347\\u5fd7 \\u6447\\u8361 \\u6447\\u6746 \\u54ac\\u59dc\\u5477\\u918b \\u836f\\u800c\\u6108 \\u836f\\u9762\\u513f \\u836f\\u7528\\u690d\\u7269 \\u836f\\u7682 \\u8981\\u5e72\\u4e86 \\u8036\\u5a18 \\u6930\\u67a3\\u5e72 \\u564e\\u9965 \\u7237\\u996d\\u5a18\\u7fb9 \\u7237\\u7fb9\\u5a18\\u996d \\u7237\\u5a18 \\u4e5f\\u6597\\u4e86\\u80c6 \\u91ce\\u59dc \\u53f6\\u6b65\\u6881 \\u53f6\\u606d\\u5f18 \\u53f6\\u8f6e\\u673a\\u68b0 \\u53f6\\u53f6 \\u53f6\\u53f6\\u7439 \\u53f6\\u97f3 \\u53f6\\u97f5 \\u53f6\\u72b6\\u690d\\u7269 \\u53f6\\u5b50 \\u53f6\\u5b50\\u6770 \\u53f6\\u5b50\\u70df \\u9875\\u5ca9 \\u591c\\u5149\\u8868 \\u6db2\\u6676\\u8868 \\u6db2\\u9762 \\u4e00\\u8868\\u4eba\\u7269 \\u4e00\\u522b \\u4e00\\u522b\\u5934 \\u4e00\\u5e76 \\u4e00\\u51b2\\u6027\\u5b50 \\u4e00\\u51fa\\u5267 \\u4e00\\u51fa\\u5b50 \\u4e00\\u6597 \\u4e00\\u6597\\u6597 \\u4e00\\u53d1 \\u4e00\\u53d1\\u5343\\u94a7 \\u4e00\\u53d1\\u4e4b\\u5dee \\u4e00\\u53d1\\u4e4b\\u95f4 \\u4e00\\u6746 \\u4e00\\u6746\\u8fdb\\u6d1e \\u4e00\\u5e72 \\u4e00\\u5e72\\u800c\\u5c3d \\u4e00\\u5e72\\u4e8c\\u51c0 \\u4e00\\u4e2a \\u4e00\\u9505\\u9762 \\u4e00\\u6beb\\u4e00\\u53d1 \\u4e00\\u53f7\\u6728\\u6746 \\u4e00\\u54c4 \\u4e00\\u5757\\u9762 \\u4e00\\u5398\\u4e00\\u6beb \\u4e00\\u91cc \\u4e00\\u7b7e \\u4e00\\u65e5\\u53eb\\u5a18 \\u4e00\\u6811\\u767e\\u83b7 \\u4e00\\u575b \\u4e00\\u575b\\u575b \\u4e00\\u5929\\u949f \\u4e00\\u6258\\u6c14 \\u4e00\\u6258\\u5934 \\u4e00\\u7269\\u514b\\u4e00\\u7269 \\u4e00\\u8d5e \\u4e00\\u624e \\u4e00\\u53ea \\u4e00\\u5468 \\u4f0a\\u5e9c\\u9762 \\u4f0a\\u62c9\\u514b \\u4f0a\\u91cc\\u5947 \\u4f0a\\u9762 \\u4f0a\\u65af\\u5170\\u5386 \\u4f0a\\u4e8e\\u80e1\\u5e95 \\u4f0a\\u4e8e\\u6e56\\u5e95 \\u8863\\u6446 \\u8863\\u4e0d\\u517c\\u91c7 \\u8863\\u4e0d\\u5b8c\\u91c7 \\u8863\\u4e0d\\u91cd\\u91c7 \\u8863\\u6597\\u6728 \\u8863\\u9526\\u591c\\u6e38 \\u8863\\u9526\\u663c\\u6e38 \\u8863\\u6263 \\u8863\\u886b\\u5df2\\u5e72 \\u8863\\u7269\\u6e10\\u5e72 \\u8863\\u7269\\u5df2\\u5e72 \\u533b\\u6258 \\u566b\\u5401\\u620f \\u5b9c\\u4e91 \\u80f0\\u810f \\u79fb\\u661f\\u6362\\u6597 \\u9057\\u4f20\\u949f \\u9057\\u8451\\u83f2\\u91c7 \\u9057\\u8ff9 \\u7591\\u7cfb \\u4e59\\u4e11 \\u5df2\\u7cfb \\u5df2\\u5360 \\u5df2\\u5360\\u7b97 \\u4ee5\\u529f\\u590d\\u8fc7 \\u8681\\u540e \\u501a\\u6258 \\u501a\\u95f2 \\u87fb\\u540e \\u4ebf\\u53ea \\u4e49\\u6c14\\u5e72\\u9704 \\u4ee1\\u6817 \\u4ea6\\u820d\\u4e0b \\u4ea6\\u4e91 \\u5f02\\u91c7 \\u5f02\\u82d4\\u540c\\u5c91 \\u6291\\u626c\\u5347\\u964d\\u6027 \\u9091\\u91cc \\u8bd1\\u5236 \\u8bd1\\u6ce8 \\u9038\\u6e38\\u81ea\\u6063 \\u9038\\u81f4 \\u610f\\u5927\\u5229\\u76f4\\u9762 \\u610f\\u9762 \\u56e0\\u5978\\u6210\\u5b55 \\u9634\\u5e72 \\u9634\\u5386 \\u9634\\u5360 \\u8335\\u501f \\u836b\\u853d \\u836b\\u76d1 \\u836b\\u751f \\u836b\\u88ad \\u97f3\\u58f0\\u5982\\u949f \\u541f\\u53f9 \\u94f6\\u676f \\u94f6\\u53d1 \\u94f6\\u4e1d\\u5377 \\u94f6\\u987b \\u94f6\\u5236 \\u94f6\\u6731 \\u6deb\\u6b32 \\u569a\\u6697 \\u9690\\u51e0 \\u98ee\\u80c4 \\u5370\\u5236 \\u82f1\\u91cc \\u6a31\\u82b1\\u676f \\u9e70\\u96d5 \\u8426\\u56de \\u8426\\u7cfb \\u5f71\\u540e \\u5f71\\u8bc4\\u4eba\\u5468 \\u5f71\\u5360 \\u5f71\\u53ea\\u5f62\\u5355 \\u5e94\\u6709\\u5c3d\\u6709 \\u5e94\\u5360 \\u5e94\\u949f \\u786c\\u9762 \\u786c\\u54bd \\u4f63\\u94bf \\u4f63\\u91d1 \\u4f63\\u94b1 \\u5eb8\\u6697 \\u6c38\\u5386 \\u6c38\\u5fd7 \\u6c38\\u5fd7\\u4e0d\\u5fd8 \\u548f\\u53f9 \\u6cf3\\u6c14\\u949f \\u6538\\u621a\\u76f8\\u5173 \\u60a0\\u6697 \\u60a0\\u8361 \\u60a0\\u6d3b\\u4e3d\\u81f4 \\u60a0\\u60a0\\u8361\\u8361 \\u60a0\\u6e38 \\u60a0\\u6e38\\u8868 \\u5c24\\u91cc \\u7531\\u4f59 \\u72b9\\u5982\\u8868 \\u72b9\\u5982\\u949f \\u72b9\\u592a\\u5386 \\u6cb9\\u9762 \\u6cb9\\u677e \\u839c\\u9762 \\u6e38\\u5c18 \\u6e38\\u51fa \\u6e38\\u5230 \\u6e38\\u82b3\\u6765 \\u6e38\\u8702\\u6d6a\\u8776 \\u6e38\\u8fc7 \\u6e38\\u8fc7\\u6765 \\u6e38\\u8fc7\\u53bb \\u6e38\\u7693\\u73ae \\u6e38\\u9e3f\\u660e \\u6e38\\u9e3f\\u5112 \\u6e38\\u56de \\u6e38\\u51fb \\u6e38\\u51fb\\u961f \\u6e38\\u51fb\\u533a \\u6e38\\u51fb\\u624b \\u6e38\\u51fb\\u6218 \\u6e38\\u8fdb \\u6e38\\u8fdb\\u6765 \\u6e38\\u8fdb\\u53bb \\u6e38\\u6765 \\u6e38\\u6765\\u6e38\\u53bb \\u6e38\\u4e50\\u5668 \\u6e38\\u79bb\\u7535\\u5b50 \\u6e38\\u9f99 \\u6e38\\u5c65 \\u6e38\\u7f8e\\u6d32 \\u6e38\\u660e\\u91d1 \\u6e38\\u7267\\u6c11\\u65cf \\u6e38\\u4e43\\u6d77 \\u6e38\\u6b27\\u6d32 \\u6e38\\u6cee \\u6e38\\u79bd\\u7c7b \\u6e38\\u53bb \\u6e38\\u50e7\\u6512\\u4f4f\\u6301 \\u6e38\\u4e0a \\u6e38\\u6c34 \\u6e38\\u5b8c \\u6e38\\u6587\\u5b8f \\u6e38\\u9521 \\u6e38\\u9521\\u5764 \\u6e38\\u9521\\u6606 \\u6e38\\u9521\\u5803 \\u6e38\\u620f \\u6e38\\u620f\\u673a \\u6e38\\u620f\\u673a\\u53f0 \\u6e38\\u4e0b \\u6e38\\u4e9a\\u6d32 \\u6e38\\u76c8\\u9686 \\u6e38\\u6cf3 \\u6e38\\u56ff\\u4f26 \\u6e38\\u9c7c \\u6e38\\u662d\\u94a6 \\u6e38\\u5fd7\\u5b8f \\u6e38\\u4e2d\\u56fd \\u53cb\\u4e8e \\u6709\\u91c7 \\u6709\\u4ec7\\u4e0d\\u62a5\\u975e\\u541b\\u5b50 \\u6709\\u51fa\\u597d\\u620f \\u6709\\u53d1\\u5934\\u9640\\u5bfa \\u6709\\u591f\\u8d5e \\u6709\\u5c3d\\u6709\\u8ba9 \\u6709\\u8fdb\\u6709\\u51fa \\u6709\\u4e91 \\u6709\\u5f81 \\u6709\\u5f81\\u65e0\\u6218 \\u6709\\u53ea \\u7f91\\u91cc \\u7256\\u91cc \\u53c8\\u5e72 \\u53c8\\u5e72\\u53c8\\u786c \\u53c8\\u4e91 \\u5e7c\\u6258 \\u8bf1\\u5978 \\u8fc2\\u56de \\u7ea1\\u56de \\u4e8e\\u8d1d\\u5c14 \\u4e8e\\u658c \\u4e8e\\u6ce2 \\u4e8e\\u6668\\u6960 \\u4e8e\\u6210\\u9f99 \\u4e8e\\u6210\\u9f8d \\u4e8e\\u4ece\\u6fc2 \\u4e8e\\u5f9e\\u6fc2 \\u4e8e\\u5927\\u5b9d \\u4e8e\\u4e39 \\u4e8e\\u9053\\u6cc9 \\u4e8e\\u5fb7\\u6d77 \\u4e8e\\u5c14\\u5c91 \\u4e8e\\u5c14\\u6839 \\u4e8e\\u5c14\\u91cc\\u514b \\u4e8e\\u723e\\u91cc\\u514b \\u4e8e\\u98de \\u4e8e\\u98ce\\u653f \\u4e8e\\u51e4\\u6850 \\u4e8e\\u51e4\\u81f3 \\u4e8e\\u683c \\u4e8e\\u6839\\u4f1f \\u4e8e\\u5149\\u8fdc \\u4e8e\\u5e7f\\u6d32 \\u4e8e\\u5f52 \\u4e8e\\u56fd \\u4e8e\\u56fd\\u6862 \\u4e8e\\u6d77\\u6d0b \\u4e8e\\u6c49\\u8d85 \\u4e8e\\u6d69\\u5a01 \\u4e8e\\u8861 \\u4e8e\\u6d2a\\u533a \\u4e8e\\u5316\\u864e \\u4e8e\\u4f1a\\u6cf3 \\u4e8e\\u6167 \\u4e8e\\u5409 \\u4e8e\\u4f73\\u5349 \\u4e8e\\u5bb6 \\u4e8e\\u5bb6\\u5821 \\u4e8e\\u575a \\u4e8e\\u5805 \\u4e8e\\u6c5f\\u9707 \\u4e8e\\u55df \\u4e8e\\u6770 \\u4e8e\\u7981 \\u4e8e\\u9756 \\u4e8e\\u5a1f \\u4e8e\\u519b \\u4e8e\\u8ecd \\u4e8e\\u5eb7\\u9707 \\u4e8e\\u514b\\u52d2 \\u4e8e\\u5b54\\u517c \\u4e8e\\u52d2 \\u4e8e\\u91cc\\u5bdf \\u4e8e\\u51cc\\u594e \\u4e8e\\u5195 \\u4e8e\\u654f \\u4e8e\\u660e\\u6d9b \\u4e8e\\u9ed8\\u5965 \\u4e8e\\u5a1c \\u4e8e\\u54c1\\u6d77 \\u4e8e\\u5947\\u5e93\\u675c\\u514b \\u4e8e\\u8c26 \\u4e8e\\u8b19 \\u4e8e\\u6674 \\u4e8e\\u4ec1\\u6cf0 \\u4e8e\\u82e5\\u6728 \\u4e8e\\u5c71 \\u4e8e\\u614e\\u884c \\u4e8e\\u5f0f\\u679a \\u4e8e\\u6811\\u6d01 \\u4e8e\\u5e05 \\u4e8e\\u5e25 \\u4e8e\\u53cc\\u6208 \\u4e8e\\u601d \\u4e8e\\u65af \\u4e8e\\u65af\\u8fbe\\u5c14 \\u4e8e\\u65af\\u9054\\u723e \\u4e8e\\u65af\\u7eb3\\u5c14\\u65af\\u8d1d\\u91cc \\u4e8e\\u65af\\u7d0d\\u723e\\u65af\\u8c9d\\u91cc \\u4e8e\\u65af\\u5854\\u5fb7 \\u4e8e\\u7d20\\u79cb \\u4e8e\\u53f0\\u70df \\u4e8e\\u6d9b \\u4e8e\\u6fe4 \\u4e8e\\u7279\\u68ee \\u4e8e\\u5929\\u4ec1 \\u4e8e\\u7530 \\u4e8e\\u9617 \\u4e8e\\u97e6\\u65af\\u5c48\\u83b1 \\u4e8e\\u97cb\\u65af\\u5c48\\u840a \\u4e8e\\u4f1f\\u56fd \\u4e8e\\u897f\\u7ff0 \\u4e8e\\u6e58\\u5170 \\u4e8e\\u5c0f\\u5f64 \\u4e8e\\u5c0f\\u4f1f \\u4e8e\\u6b23\\u6e90 \\u4e8e\\u59d3 \\u4e8e\\u79c0\\u654f \\u4e8e\\u5f90 \\u4e8e\\u5b66\\u5fe0 \\u4e8e\\u836b\\u9716 \\u4e8e\\u6c38\\u6ce2 \\u4e8e\\u53f3\\u4efb \\u4e8e\\u5e7c\\u519b \\u4e8e\\u4e8e \\u4e8e\\u4f59\\u66f2\\u6298 \\u4e8e\\u9980\\u66f2\\u6298 \\u4e8e\\u7389\\u7acb \\u4e8e\\u8fdc\\u4f1f \\u4e8e\\u8d8a \\u4e8e\\u6a02 \\u4e8e\\u6cfd\\u5c14 \\u4e8e\\u8d60 \\u4e8e\\u8d08 \\u4e8e\\u5360\\u5143 \\u4e8e\\u632f \\u4e8e\\u9707\\u73af \\u4e8e\\u9707\\u5bf0 \\u4e8e\\u6b63\\u660c \\u4e8e\\u6b63\\u5347 \\u4e8e\\u5fd7\\u5b81 \\u4e8e\\u5bd8 \\u4e8e\\u5b50\\u5343 \\u6c59\\u8511 \\u4f59\\u78a7\\u82ac \\u4f59\\u79c9\\u8c1a \\u4f59\\u70b3\\u8d24 \\u4f59\\u707f\\u8363 \\u4f59\\u8f66 \\u4f59\\u53d1\\u626c \\u4f59\\u5e72 \\u4f59\\u6b4c\\u6ca7 \\u4f59\\u5149 \\u4f59\\u5149\\u751f \\u4f59\\u5149\\u4e2d \\u4f59\\u5170\\u9999 \\u4f59\\u91cc \\u4f59\\u7537 \\u4f59\\u73ee\\u7433 \\u4f59\\u4e09 \\u4f59\\u4e09\\u80dc \\u4f59\\u4e09\\u52dd \\u4f59\\u4e0a\\u6c85 \\u4f59\\u601d \\u4f59\\u601d\\u654f \\u4f59\\u5929 \\u4f59\\u5a01 \\u4f59\\u5a01\\u5fb7 \\u4f59\\u6587 \\u4f59\\u543e\\u9547 \\u4f59\\u8d24\\u660e \\u4f59\\u5baa\\u5b97 \\u4f59\\u7b71\\u840d \\u4f59\\u59d3 \\u4f59\\u79c0\\u83c1 \\u4f59\\u96ea\\u5170 \\u4f59\\u96ea\\u660e \\u4f59\\u82f1\\u65f6 \\u4f59\\u4f59 \\u4f59\\u82d1\\u7eee \\u4f59\\u6708 \\u4f59\\u653f\\u5baa \\u4f59\\u53ea \\u4f59\\u5b50 \\u4f59\\u5b50\\u660e \\u9c7c\\u5e72 \\u9c7c\\u9cde\\u677e \\u9c7c\\u6e38\\u91dc\\u5e95 \\u9c7c\\u6e38\\u91dc\\u4e2d \\u9c7c\\u80c4 \\u903e\\u95f2\\u8361\\u68c0 \\u611a\\u6697 \\u8206\\u5c38 \\u4e0e\\u56fd\\u540c\\u4f11 \\u5b87\\u5b99\\u5fd7 \\u8bed\\u6c47 \\u8bed\\u4e91 \\u7389\\u6597 \\u7389\\u91cc \\u7389\\u5386 \\u7389\\u7c73\\u987b \\u7389\\u5236 \\u90c1\\u8fbe\\u592b \\u90c1\\u99a5 \\u90c1\\u79bb\\u5b50 \\u90c1\\u674e \\u90c1\\u70c8 \\u90c1\\u7a46 \\u90c1\\u6734 \\u90c1\\u90c1 \\u90c1\\u90c1\\u83f2\\u83f2 \\u90c1\\u90c1\\u9752\\u9752 \\u90c1\\u54c9 \\u9884\\u5236 \\u6b32\\u6d77 \\u6b32\\u58d1\\u96be\\u586b \\u6b32\\u706b \\u6b32\\u52a0\\u4e4b\\u7f6a \\u6b32\\u52a0\\u4e4b\\u7f6a\\u4f55\\u60a3\\u65e0\\u8bcd \\u6b32\\u4ee4\\u667a\\u660f \\u6b32\\u5ff5 \\u6b32\\u5973 \\u6b32\\u6c42 \\u6b32\\u6c42\\u4e0d\\u6ee1 \\u6b32\\u5584\\u5176\\u4e8b\\u5fc5\\u5148\\u5229\\u5176\\u5668 \\u6b32\\u671b \\u6b32\\u969c \\u5fa1\\u654c \\u5fa1\\u5bd2 \\u5fa1\\u5bc7 \\u5fa1\\u53f2\\u5927\\u592b \\u5fa1\\u4fae \\u5fa1\\u5236 \\u5bd3\\u7981\\u4e8e\\u5f81 \\u6108\\u5408 \\u5143\\u540e \\u8881\\u53cb\\u8303 \\u8881\\u4e8e\\u4ee4 \\u539f\\u949f \\u539f\\u5b50\\u949f \\u8fdc\\u53bf\\u624d\\u81f3 \\u8fdc\\u5f81 \\u613f\\u800c\\u606d \\u613f\\u6734 \\u66f0\\u4e91 \\u7ea6\\u7ff0\\u677e \\u6708\\u5386 \\u6708\\u76f8\\u8868 \\u6708\\u5ca9 \\u5cb3\\u98de \\u5cb3\\u575f \\u5cb3\\u7236 \\u5cb3\\u5bb6 \\u5cb3\\u73c2 \\u5cb3\\u5e99 \\u5cb3\\u6bcd \\u5cb3\\u6c0f \\u5cb3\\u9633 \\u5cb3\\u4e91 \\u5cb3\\u4e08 \\u7174\\u6597 \\u4e91\\u57ce\\u533a \\u4e91\\u5c14 \\u4e91\\u7ffb\\u96e8\\u590d \\u4e91\\u4f55 \\u4e91\\u4e4e \\u4e91\\u7136 \\u4e91\\u541e \\u4e91\\u541e\\u9762 \\u4e91\\u4e3a \\u4e91\\u7232 \\u4e91\\u6eaa \\u4e91\\u987b \\u4e91\\u4e91 \\u82b8\\u8f89 \\u82b8\\u82d4 \\u82b8\\u85b9 \\u8018\\u8361 \\u5141\\u51c6 \\u9668\\u83b7 \\u915d\\u501f \\u8574\\u501f \\u71a8\\u6597 \\u6742\\u5408\\u9762\\u513f \\u6742\\u9171\\u9762 \\u6742\\u9762 \\u6742\\u5fd7 \\u518d\\u5236 \\u5728\\u6838 \\u8d5e\\u5457 \\u8d5e\\u4e0d\\u7edd\\u53e3 \\u8d5e\\u8bcd \\u8d5e\\u8f9e \\u8d5e\\u9053 \\u8d5e\\u7684 \\u8d5e\\u6b4c \\u8d5e\\u4e2a\\u4e0d \\u8d5e\\u53e3\\u4e0d \\u8d5e\\u4e50 \\u8d5e\\u4e86 \\u8d5e\\u4e24\\u53e5 \\u8d5e\\u7f8e \\u8d5e\\u4f69 \\u8d5e\\u8d4f \\u8d5e\\u9882 \\u8d5e\\u53f9 \\u8d5e\\u6b4e \\u8d5e\\u6211 \\u8d5e\\u7fa1 \\u8d5e\\u8bb8 \\u8d5e\\u626c \\u8d5e\\u4e00\\u53e5 \\u8d5e\\u4e00\\u58f0 \\u8d5e\\u4e00\\u8d5e \\u8d5e\\u8bed \\u8d5e\\u8a89 \\u8d5e\\u81ea\\u5df1 \\u810f\\u53d1 \\u810f\\u8151 \\u810f\\u5668 \\u81e7\\u8c37\\u4ea1\\u7f8a \\u51ff\\u5ca9 \\u51ff\\u5ca9\\u673a \\u65e9\\u8d77\\u7684\\u9e1f\\u513f\\u6709\\u866b\\u5403 \\u65e9\\u5360\\u52ff\\u836f \\u7682\\u5316 \\u7682\\u835a \\u9020\\u66f2 \\u9020\\u5ca9\\u77ff\\u7269 \\u9020\\u949f \\u566a\\u52a8 \\u566a\\u8bc8 \\u6cfd\\u91cc\\u53ef \\u6cfd\\u5364 \\u6cfd\\u6e17\\u6f13\\u800c\\u4e0b\\u964d \\u624e\\u6210 \\u624e\\u5e26 \\u624e\\u56ee \\u624e\\u5c14\\u8fbe\\u91cc \\u624e\\u6839 \\u624e\\u88f9 \\u624e\\u597d \\u624e\\u811a \\u624e\\u7ed3 \\u624e\\u7d27 \\u624e\\u4e86 \\u624e\\u9a6c\\u524c\\u4e01 \\u624e\\u9a6c\\u9c81\\u4e01 \\u624e\\u6b27\\u624e\\u7fc1 \\u624e\\u8d77 \\u624e\\u4e0a \\u624e\\u5b9e \\u624e\\u94c1 \\u624e\\u4e0b \\u624e\\u7ebf\\u5e26 \\u624e\\u8425 \\u624e\\u5728 \\u624e\\u624e \\u624e\\u624e\\u5b9e\\u5b9e \\u624e\\u8bc8 \\u624e\\u5be8 \\u672d\\u5938\\u5a01 \\u8f67\\u5236 \\u70b8\\u6bc1 \\u70b8\\u9171\\u9762 \\u69a8\\u5e72 \\u8a79\\u5fd7\\u7ef4 \\u859d\\u535c \\u5c55\\u91c7 \\u5360\\u62dc \\u5360\\u535c \\u5360\\u57ce \\u5360\\u65ad \\u5360\\u623f \\u5360\\u98ce\\u4f7f\\u5e06 \\u5360\\u51e4 \\u5360\\u5366 \\u5360\\u5019 \\u5360\\u8bfe \\u5360\\u4e86 \\u5360\\u4e86\\u535c \\u5360\\u68a6 \\u5360\\u5f3a \\u5360\\u4eb2 \\u5360\\u4eba \\u5360\\u4e0a \\u5360\\u5c04 \\u5360\\u8eab \\u5360\\u4e16\\u754c \\u5360\\u7b6e \\u5360\\u4e07 \\u5360\\u661f \\u5360\\u9a8c \\u5360\\u6709 \\u5360\\u6709\\u4e94\\u4e0d\\u9a8c \\u5360\\u6709\\u6b32 \\u5360\\u4e3b \\u5360\\u4e3b\\u5bfc\\u5730\\u4f4d \\u6218\\u7565\\u4f19\\u4f34 \\u7ad9\\u5e72\\u5cb8\\u513f \\u5f20\\u6597\\u8f89 \\u5f20\\u57fa\\u90c1 \\u5f20\\u6728\\u677e \\u5f20\\u7434\\u677e \\u5f20\\u4e09\\u4e30 \\u5f20\\u6587\\u677e \\u5f20\\u5fd7 \\u5f20\\u5fd7\\u5bb6 \\u957f\\u53d1 \\u957f\\u5e72\\u66f2 \\u957f\\u5e72\\u5df7 \\u957f\\u80e1 \\u957f\\u51e0 \\u957f\\u5386 \\u957f\\u7ef3\\u7cfb\\u666f \\u957f\\u7ef3\\u7cfb\\u65e5 \\u957f\\u5bff\\u70df \\u957f\\u5401 \\u957f\\u987b \\u957f\\u5f81 \\u4e08\\u6bcd\\u5a18 \\u4ed7\\u6258 \\u8d75\\u5764\\u90c1 \\u7167\\u7b7e \\u906e\\u590d \\u6298\\u5c3a \\u6298\\u53e0 \\u6298\\u597d \\u6298\\u5408 \\u6298\\u75d5 \\u6298\\u8282\\u8bfb\\u4e66 \\u6298\\u8fdb \\u6298\\u8fdb\\u6765 \\u6298\\u8fdb\\u53bb \\u6298\\u7bf7 \\u6298\\u88d9 \\u6298\\u6247 \\u6298\\u53f0 \\u6298\\u68af \\u6298\\u9875 \\u6298\\u6905 \\u6298\\u7eb8 \\u6298\\u5b50 \\u6298\\u594f \\u8fd9\\u51fa\\u7535\\u5f71 \\u8fd9\\u51fa\\u597d\\u620f \\u8fd9\\u51fa\\u5267 \\u8fd9\\u53ea \\u8fd9\\u949f \\u9488\\u782d \\u9488\\u5173 \\u9488\\u82a5\\u76f8\\u6295 \\u9488\\u7078 \\u9488\\u53e3 \\u9488\\u6263 \\u9488\\u8292 \\u9488\\u53f6\\u690d\\u7269 \\u73cd\\u73e0\\u5ca9 \\u7504\\u540e \\u6795\\u501f \\u6795\\u5e2d \\u7f1c\\u81f4 \\u9b12\\u53d1 \\u632f\\u8361 \\u632f\\u6770 \\u8d48\\u9965 \\u9707\\u8361 \\u9547\\u8363\\u91cc \\u9eee\\u6697 \\u5f81\\u5c18 \\u5f81\\u7a0b \\u5f81\\u4f10 \\u5f81\\u5e06 \\u5f81\\u592b \\u5f81\\u670d \\u5f81\\u9a7e \\u5f81\\u527f \\u5f81\\u655b \\u5f81\\u9a6c \\u5f81\\u65c6 \\u5f81\\u8f9f \\u5f81\\u886b \\u5f81\\u620d \\u5f81\\u8ba8 \\u5f81\\u9014 \\u5f81\\u8863 \\u5f81\\u6218 \\u5f81\\u5f78 \\u84b8\\u5e72 \\u84b8\\u9762 \\u6574\\u51fa\\u5267 \\u6574\\u53d1 \\u6574\\u53d1\\u7528\\u54c1 \\u6574\\u53ea \\u6574\\u5468 \\u6b63\\u6881 \\u6b63\\u51f6 \\u90d1\\u5bb6\\u949f \\u90d1\\u51ef\\u4e91 \\u90d1\\u8363\\u677e \\u90d1\\u6613\\u91cc \\u90d1\\u4f59\\u8c6a \\u75c7\\u7ed3 \\u912d\\u51f1\\u4e91 \\u4e4b\\u6b32 \\u4e4b\\u949f \\u652f\\u6746 \\u652f\\u52aa\\u5e72 \\u652f\\u70df \\u53ea\\u67fb \\u53ea\\u5403 \\u53ea\\u9e21\\u7d6e\\u9152 \\u53ea\\u7acb \\u53ea\\u8f6e\\u4e0d\\u53cd \\u53ea\\u8f6e\\u4e0d\\u8fd4 \\u53ea\\u65e5 \\u53ea\\u8eab \\u53ea\\u58f0\\u4e0d\\u51fa \\u53ea\\u624b \\u53ea\\u8a00\\u7247\\u8bed \\u53ea\\u8a00\\u7247\\u5b57 \\u53ea\\u773c \\u53ea\\u5f71 \\u53ea\\u5360 \\u53ea\\u5360\\u5409 \\u53ea\\u5360\\u795e\\u95ee\\u535c \\u53ea\\u5360\\u7b97 \\u53ea\\u51c6 \\u53ea\\u5b57 \\u679d\\u4e0d\\u5f97\\u5927\\u4e8e\\u5e72 \\u7ec7\\u5e2d \\u76f4\\u6446 \\u76f4\\u53d1 \\u76f4\\u7cfb \\u76f4\\u7cfb\\u519b\\u9600 \\u690d\\u53d1 \\u690d\\u7269\\u5fd7 \\u6b96\\u8c37 \\u6b62\\u8c24\\u83ab\\u5982\\u81ea\\u4fee \\u7eb8\\u70df \\u7eb8\\u624e \\u7eb8\\u5236 \\u6307\\u6325\\u53f0 \\u6307\\u4eb2\\u6258\\u6545 \\u6307\\u6c34\\u76df\\u677e \\u5fd7\\u54c0 \\u5fd7\\u8bda\\u541b\\u5b50 \\u5fd7\\u51b2\\u6597\\u725b \\u5fd7\\u60bc \\u5fd7\\u9ad8\\u6c14\\u626c \\u5fd7\\u5e86 \\u5fd7\\u559c \\u5fd7\\u5f02 \\u5fd7\\u4e4b\\u4e0d\\u5fd8 \\u5236\\u7248 \\u5236\\u5907 \\u5236\\u8868 \\u5236\\u51b0 \\u5236\\u64ad \\u5236\\u6750 \\u5236\\u8336 \\u5236\\u6210 \\u5236\\u7a0b \\u5236\\u51fa \\u5236\\u5f97 \\u5236\\u6bd2 \\u5236\\u6cd5 \\u5236\\u9769 \\u5236\\u5242 \\u5236\\u5047 \\u5236\\u4ef6 \\u5236\\u6d46 \\u5236\\u51b7 \\u5236\\u9762 \\u5236\\u9762\\u5177 \\u5236\\u576f \\u5236\\u7247 \\u5236\\u54c1 \\u5236\\u53d6 \\u5236\\u552e \\u5236\\u9178\\u6027 \\u5236\\u7cd6 \\u5236\\u9676 \\u5236\\u56fe \\u5236\\u4e3a \\u5236\\u7232 \\u5236\\u978b \\u5236\\u76d0 \\u5236\\u6c27 \\u5236\\u836f \\u5236\\u8863 \\u5236\\u9020 \\u5236\\u7eb8 \\u5236\\u949f \\u5236\\u4f5c \\u5236\\u505a \\u6cbb\\u6108 \\u6809\\u53d1\\u5de5 \\u81f4\\u5bc6 \\u7a92\\u6b32 \\u8e2c\\u4ec6 \\u8599\\u53d1 \\u4e2d\\u56fd\\u5236 \\u4e2d\\u73af\\u676f \\u4e2d\\u4ed1 \\u4e2d\\u5343\\u4e16\\u754c \\u4e2d\\u578b\\u949f \\u4e2d\\u6e38 \\u5fe0\\u4eba\\u4e4b\\u6258 \\u7ec8\\u7aef\\u53f0 \\u7ec8\\u8eab\\u6709\\u6258 \\u949f\\u6446 \\u949f\\u88ab \\u949f\\u58c1 \\u949f\\u8868 \\u949f\\u8868\\u76d8 \\u949f\\u4e0d \\u949f\\u5dee \\u949f\\u695a\\u7ea2 \\u949f\\u7684 \\u949f\\u70b9 \\u949f\\u9876 \\u949f\\u9f0e \\u949f\\u53d1\\u97f3 \\u949f\\u798f\\u677e \\u949f\\u9f13 \\u949f\\u5173 \\u949f\\u884c \\u949f\\u597d \\u949f\\u5320 \\u949f\\u53e3 \\u949f\\u5feb \\u949f\\u4e50 \\u949f\\u697c \\u949f\\u6f0f \\u949f\\u87ba \\u949f\\u5f8b \\u949f\\u6162 \\u949f\\u6ca1 \\u949f\\u9762 \\u949f\\u9e23 \\u949f\\u6a21 \\u949f\\u7ebd \\u949f\\u76d8 \\u949f\\u73ee\\u7444 \\u949f\\u6572 \\u949f\\u7434 \\u949f\\u78ec \\u949f\\u4e73\\u6d1e \\u949f\\u4e73\\u77f3 \\u949f\\u5c71 \\u949f\\u4e0a \\u949f\\u8eab \\u949f\\u58f0 \\u949f\\u901f \\u949f\\u5854 \\u949f\\u592a \\u949f\\u4f53 \\u949f\\u8c03 \\u949f\\u505c \\u949f\\u5934 \\u949f\\u738b \\u949f\\u4e0b \\u949f\\u76f8 \\u949f\\u54cd \\u949f\\u5f62 \\u949f\\u8170 \\u949f\\u610f \\u949f\\u6709 \\u949f\\u5728\\u5bfa\\u91cc \\u949f\\u7f69 \\u949f\\u5de6\\u53f3 \\u949f\\u5ea7 \\u79cd\\u653e \\u79cd\\u8c37 \\u79cd\\u5e08\\u9053 \\u79cd\\u5e08\\u4e2d \\u79cd\\u5b50\\u690d\\u7269 \\u91cd\\u590d \\u91cd\\u89c1\\u590d\\u51fa \\u91cd\\u7f57\\u9762 \\u91cd\\u6298 \\u91cd\\u5236 \\u5dde\\u91cc \\u5468\\u62a5 \\u5468\\u800c\\u590d\\u59cb \\u5468\\u4e8c \\u5468\\u56de \\u5468\\u4f1a \\u5468\\u8bb0 \\u5468\\u6d4e \\u5468\\u6770 \\u5468\\u520a \\u5468\\u8003 \\u5468\\u5386 \\u5468\\u516d \\u5468\\u672b \\u5468\\u5e74 \\u5468\\u671f \\u5468\\u5168\\u65b9\\u4fbf \\u5468\\u4eba \\u5468\\u4eba\\u4e4b\\u6025 \\u5468\\u65e5 \\u5468\\u4e09 \\u5468\\u4e0a \\u5468\\u6570 \\u5468\\u56db \\u5468\\u5c81 \\u5468\\u4e94 \\u5468\\u85aa \\u5468\\u4f11 \\u5468\\u4e00 \\u5468\\u6e38\\u4e16\\u754c \\u5468\\u53ec\\u5171\\u548c \\u5468\\u4e2d \\u5468\\u5468 \\u5468\\u8f6c \\u5468\\u8d70\\u79c0 \\u6d32\\u9645\\u676f \\u5492\\u613f \\u80c4\\u7532 \\u80c4\\u79d1 \\u663c\\u4f0f\\u591c\\u6e38 \\u76b1\\u522b \\u76b1\\u6298 \\u6731\\u8d1d\\u5c14 \\u6731\\u7b14 \\u6731\\u5507 \\u6731\\u5507\\u7693\\u9f7f \\u6731\\u8123\\u7693\\u9f7f \\u6731\\u8f53\\u7682\\u76d6 \\u6731\\u5e72\\u7389\\u621a \\u6731\\u7ea2 \\u6731\\u5377 \\u6731\\u4fca \\u6731\\u53e3\\u7693\\u9f7f \\u6731\\u7406\\u5b89\\u5386 \\u6731\\u4ed1\\u8857 \\u6731\\u6279 \\u6731\\u8272 \\u6731\\u7802 \\u6731\\u5929\\u6587 \\u6731\\u90c1\\u4fe1 \\u6731\\u8c15 \\u73e0\\u6597\\u70c2\\u73ed \\u732a\\u516b\\u6212\\u5403\\u4eba\\u53c2\\u679c \\u732a\\u809d\\u9762 \\u732a\\u811a\\u9762 \\u732a\\u820c\\u9762 \\u732a\\u53ea \\u7af9\\u82de\\u677e\\u8302 \\u7af9\\u51e0 \\u7af9\\u5e2d \\u7af9\\u5236 \\u4e3b\\u6881 \\u4e3b\\u949f\\u66f2\\u7ebf \\u716e\\u9762 \\u716e\\u7ca5\\u711a\\u987b \\u82a7\\u6817 \\u4f4f\\u624e \\u6ce8\\u6807 \\u6ce8\\u518a \\u6ce8\\u518c \\u6ce8\\u5b9a \\u6ce8\\u8bb0 \\u6ce8\\u811a \\u6ce8\\u89e3 \\u6ce8\\u540d \\u6ce8\\u660e \\u6ce8\\u6279 \\u6ce8\\u5165 \\u6ce8\\u5165\\u5f0f\\u654e\\u5b66\\u6cd5 \\u6ce8\\u4e0a \\u6ce8\\u751f\\u5a18\\u5a18 \\u6ce8\\u5931 \\u6ce8\\u91ca \\u6ce8\\u758f \\u6ce8\\u6587 \\u6ce8\\u9500 \\u6ce8\\u8bd1 \\u6ce8\\u4e91 \\u9a7b\\u624e \\u67f1\\u6881 \\u795d\\u53d1 \\u795d\\u8d5e \\u94f8\\u949f \\u7b51\\u90a6 \\u7b51\\u5317 \\u7b51\\u6ce2 \\u7b51\\u80a5 \\u7b51\\u540e \\u7b51\\u5f8c \\u7b51\\u524d \\u7b51\\u897f \\u7b51\\u9633 \\u7b51\\u967d \\u7b51\\u5dde \\u7b51\\u7d2b \\u6293\\u5978 \\u4e13\\u9274 \\u4e13\\u5f81 \\u8f6c\\u901f\\u8868 \\u8f6c\\u53f0 \\u8f6c\\u6e38 \\u8f6c\\u6ce8 \\u88c5\\u5ca9\\u673a \\u88c5\\u6298 \\u58ee\\u9762 \\u649e\\u5e9c\\u51b2\\u5dde \\u649e\\u7403\\u6746 \\u649e\\u949f \\u51c6\\u4fdd \\u51c6\\u4fdd\\u62a4 \\u51c6\\u4fdd\\u91ca \\u51c6\\u4e0d\\u51c6\\u4f60 \\u51c6\\u4e0d\\u51c6\\u8c01 \\u51c6\\u4e0d\\u51c6\\u4ed6 \\u51c6\\u4e0d\\u51c6\\u5b83 \\u51c6\\u4e0d\\u51c6\\u5979 \\u51c6\\u4e0d\\u51c6\\u6211 \\u51c6\\u4e0d\\u51c6\\u8bb8 \\u51c6\\u6b64 \\u51c6\\u5206\\u5b50 \\u51c6\\u4f0f \\u51c6\\u5047 \\u51c6\\u5c06 \\u51c6\\u51b3\\u6597 \\u51c6\\u8003\\u8bc1 \\u51c6\\u666e\\u5c14 \\u51c6\\u5165 \\u51c6\\u4e09\\u540e \\u51c6\\u7b97 \\u51c6\\u5c09 \\u51c6\\u8bb8 \\u51c6\\u4ee5 \\u51c6\\u4e88 \\u51c6\\u6298 \\u51c6\\u594f \\u6349\\u53d1 \\u6349\\u5978 \\u684c\\u51e0 \\u684c\\u5386 \\u6d4a\\u79ef\\u5ca9 \\u64e2\\u53d1 \\u59ff\\u91c7 \\u9aed\\u80e1 \\u9aed\\u987b \\u5b50\\u59dc\\u7092\\u9e21 \\u5b50\\u6e38 \\u5b50\\u4e91 \\u5b50\\u4e4b\\u4e30\\u516e \\u6893\\u91cc \\u7d2b\\u59dc \\u7d2b\\u4e91 \\u7d2b\\u4e91\\u82d7\\u65cf\\u5e03\\u4f9d\\u65cf\\u81ea\\u6cbb\\u53bf \\u81ea\\u52a8\\u8868 \\u81ea\\u7136\\u5377 \\u81ea\\u5236 \\u81ea\\u5236\\u70b8\\u5f39 \\u5b57\\u6c47 \\u6e0d\\u5df2\\u5e72 \\u5b97\\u5468 \\u5b97\\u5468\\u949f \\u7efc\\u6838 \\u603b\\u53d1 \\u603b\\u6746\\u8d5b \\u603b\\u6746\\u6570 \\u603b\\u6c47 \\u603b\\u53f0 \\u603b\\u7edf\\u676f \\u7eb5\\u6a2a\\u4ea4\\u5e03 \\u7eb5\\u6b32 \\u7cbd\\u7c91\\u53f6 \\u594f\\u6298 \\u8db3\\u534f\\u676f \\u8db3\\u603b\\u676f \\u7ec4\\u5408\\u670d\\u88c5 \\u7956\\u51b2\\u4e4b \\u94bb\\u6746 \\u6700\\u540e\\u4e00\\u5929 \\u5de6\\u5149\\u6597 \\u5de6\\u91cc\\u514b \\u5de6\\u90bb\\u53f3\\u91cc \\u5de6\\u624b\\u4e0d\\u6258\\u53f3\\u624b \\u5de6\\u53f3\\u91c7\\u4e4b \\u4f5c\\u5e78 \\u5750\\u6807 \\u5750\\u5982\\u949f \\u5750\\u53f0 \\u5750\\u949f \\u5ea7\\u949f \\u505a\\u51fa \\u505a\\u51fa\\u597d\\u620f\".split(\" \"),H=\"\\u508c \\u3476 \\u5051 \\u3473 \\u5032 \\u346f \\u5138 \\ud841\\udde3 \\u528f \\u5283 \\u529a \\u565a \\u558e \\u3614 \\u361a \\u3704 \\u5ab0 \\ud845\\udfb5 \\ud846\\udc83 \\u370f \\u5b4b \\ud846\\udc39 \\u380f \\ud847\\udfb1 \\u5d7e \\u5e53 \\u396e \\u61e4 \\u617a \\u6386 \\u3a73 \\u649d \\u64d3 \\u64fd \\u3a5c \\u68e1 \\u6932 \\ud84d\\ude4e \\u6a22 \\u6a2b \\u6bb0 \\u6ba8 \\u7007 \\u6fe7 \\u7061 \\u6fbe \\u6fc4 \\ud84f\\udfb7 \\u7030 \\u6f5a \\u9e02 \\u71f6 \\u7171 \\u7371 \\u74af \\ud852\\udee9 \\ud852\\udeba \\u407b \\u779c \\u78bd \\u78fe \\u7a0f \\u7a47 \\ud856\\udca2 \\u7b74 \\u7c54 \\u42b7 \\u7d2c \\u7e33 \\u7d45 \\u42d9 \\u42da \\u7d90 \\u7db5 \\u42fb \\u42f9 \\u7e7f \\u7e78 \\u4366 \\u43b1 \\u819e \\ud85a\\ude99 \\u85b5 \\u85b3 \\u85ed \\u7f43 \\u87ae \\ud85d\\udf5e \\ud85d\\udf17 \\ud85d\\udf35 \\u4661 \\u896c \\u8a22 \\u9fc1 \\ud85e\\ude59 \\u4700 \\u8b8c \\u8c99 \\ud85f\\udd73 \\u477c \\ud85f\\udda7 \\u8cf0 \\u8e8e \\ud860\\udeb0 \\ud860\\udeb8 \\ud860\\udee2 \\u91fe \\u93fa \\u4971 \\ud862\\udfc5 \\ud862\\uddab \\ud862\\udddc \\u4947 \\u942f \\u9425 \\u9481 \\u499b \\u499f \\u9766 \\ud865\\udfaf \\ud866\\udcd1 \\u9a27 \\u4bc0 \\u4c7d \\ud867\\udd98 \\u9ba3 \\u9c06 \\u9c0c \\u9c27 \\u4c77 \\u9cfe \\u9d41 \\u9d37 \\u9d84 \\u9daa \\u9dc8 \\u9dff \\u9f91 \\u842c \\u8207 \\u919c \\u5c08 \\u696d \\u53e2 \\u6771 \\u7d72 \\u4e1f \\u5169 \\u56b4 \\u55aa \\u500b \\u8c50 \\u81e8 \\u7232 \\u9e97 \\u8209 \\u9ebc \\u7fa9 \\u70cf \\u6a02 \\u55ac \\u7fd2 \\u9109 \\u66f8 \\u8cb7 \\u4e82 \\u4e86 \\u722d \\u65bc \\u8667 \\u96f2 \\u4e99 \\u4e9e \\u7522 \\u755d \\u89aa \\u893b \\u56b2 \\u5104 \\u50c5 \\u50d5 \\u4ec7 \\u5f9e \\u4f96 \\u5009 \\u5100 \\u5011 \\u50f9 \\u4eff \\u8846 \\u512a \\u5925 \\u6703 \\u50b4 \\u5098 \\u5049 \\u50b3 \\u4fe5 \\u4fd4 \\u50b7 \\u5000 \\u502b \\u5096 \\u50de \\u4f47 \\u9ad4 \\u9918 \\u4f5b \\u50ad \\u50c9 \\u4fe0 \\u4fb6 \\u50e5 \\u5075 \\u5074 \\u50d1 \\u5108 \\u5115 \\u5102 \\u5118 \\u4fca \\u4fc1 \\u5114 \\u513c \\u5006 \\u5137 \\u5008 \\u5109 \\u4fee \\u501f \\u50b5 \\u50be \\u50af \\u50c2 \\u50e8 \\u511f \\u510e \\u513b \\u5110 \\u5132 \\u513a \\u50f5 \\u5152 \\u514b \\u514c \\u5157 \\u9ee8 \\u862d \\u95dc \\u8208 \\u8332 \\u990a \\u7378 \\u56c5 \\u5167 \\u5ca1 \\u518a \\u5beb \\u8ecd \\u8fb2 \\u51ac \\u99ae \\u885d \\u6c7a \\u6cc1 \\u51cd \\u6de8 \\u60bd \\u6e96 \\u6dbc \\u51cc \\u6e1b \\u6e4a \\u51dc \\u5e7e \\u9cf3 \\u9ce7 \\u6191 \\u51f1 \\u5147 \\u51fa \\u64ca \\u947f \\u82bb \\u5283 \\u5289 \\u5247 \\u525b \\u5275 \\u522a \\u5225 \\u5257 \\u5244 \\u522e \\u5236 \\u524e \\u528a \\u34e8 \\u528c \\u5274 \\u5291 \\u526e \\u528d \\u525d \\u5287 \\u52f8 \\u8fa6 \\u52d9 \\u52f1 \\u52d5 \\u52f5 \\u52c1 \\u52de \\u52e2 \\u52f3 \\u52e9 \\u52fb \\u532d \\u5331 \\u5340 \\u91ab \\u5343 \\u5347 \\u83ef \\u5354 \\u55ae \\u8ce3 \\u535c \\u4f54 \\u76e7 \\u6ef7 \\u81e5 \\u885b \\u537b \\u5377 \\u5df9 \\u5ee0 \\u5ef3 \\u6b77 \\u53b2 \\u58d3 \\u53ad \\u5399 \\u9f8e \\u5ec1 \\u91d0 \\u5ec2 \\u53b4 \\u5ec8 \\u5eda \\u5ec4 \\u5edd \\u7e23 \\u53c4 \\u53c3 \\u9749 \\u9746 \\u96d9 \\u767c \\u8b8a \\u6558 \\u758a \\u53ea \\u81fa \\u8449 \\u865f \\u5606 \\u5630 \\u7c72 \\u55ab \\u5408 \\u540a \\u540c \\u5f8c \\u5411 \\u5687 \\u5442 \\u55ce \\u551a \\u5678 \\u807d \\u5553 \\u5433 \\u5436 \\u5638 \\u56c8 \\u5614 \\u56a6 \\u5504 \\u54e1 \\u54bc \\u55c6 \\u55da \\u5468 \\u8a60 \\u56a8 \\u5680 \\u565d \\u5412 \\u8aee \\u9e79 \\u54bd \\u54c4 \\u97ff \\u555e \\u5660 \\u5635 \\u55f6 \\u5666 \\u8b41 \\u5672 \\u568c \\u5665 \\u55b2 \\u8123 \\u561c \\u55ca \\u562e \\u5562 \\u55e9 \\u559a \\u5616 \\u55c7 \\u56c0 \\u9f67 \\u5613 \\u56c9 \\u563d \\u562f \\u5582 \\u5674 \\u560d \\u56b3 \\u56c1 \\u566f \\u5653 \\u56b6 \\u56d1 \\u5695 \\u566a \\u56c2 \\u56de \\u5718 \\u5712 \\u56f0 \\u56ea \\u570d \\u5707 \\u570b \\u5716 \\u5713 \\u8056 \\u58d9 \\u5834 \\u962a \\u58de \\u5750 \\u584a \\u5805 \\u58c7 \\u58e2 \\u58e9 \\u5862 \\u58b3 \\u589c \\u58df \\u58e0 \\u58da \\u58d8 \\u58be \\u580a \\u588a \\u57e1 \\u58b6 \\u58cb \\u584f \\u5816 \\u5852 \\u58ce \\u581d \\u57b5 \\u5879 \\u58ae \\u58ea \\u7246 \\u58ef \\u8072 \\u6bbc \\u58fa \\u58fc \\u8655 \\u5099 \\u5fa9 \\u5920 \\u592b \\u982d \\u8a87 \\u593e \\u596a \\u5969 \\u5950 \\u596e \\u734e \\u5967 \\u5978 \\u599d \\u5a66 \\u5abd \\u5af5 \\u5ad7 \\u5b00 \\u59cd \\u59dc \\u597c \\u5a41 \\u5a6d \\u5b08 \\u5b0c \\u5b4c \\u5a18 \\u5a1b \\u5aa7 \\u5afa \\u5aff \\u5b30 \\u5b0b \\u5b38 \\u5abc \\u5b03 \\u5b21 \\u5b2a \\u5b19 \\u5b24 \\u5b6b \\u5b78 \\u5b7f \\u5be7 \\u5bf6 \\u5be6 \\u5bf5 \\u5be9 \\u61b2 \\u5bae \\u5bb6 \\u5bec \\u8cd3 \\u5be2 \\u5c0d \\u5c0b \\u5c0e \\u58fd \\u5c07 \\u723e \\u5875 \\u5617 \\u582f \\u5c37 \\u5c4d \\u76e1 \\u5c40 \\u5c64 \\u5c53 \\u5c5c \\u5c46 \\u5c6c \\u5c62 \\u5c68 \\u5dbc \\u6b72 \\u8c48 \\u5d87 \\u5d17 \\u5cf4 \\u5db4 \\u5d50 \\u5cf6 \\u5dd6 \\u5dba \\u5dbd \\u5d2c \\u5dcb \\u5da8 \\u5da7 \\u5cfd \\u5da2 \\u5da0 \\u5d22 \\u5dd2 \\u5cef \\u5d97 \\u5d0d \\u5dae \\u5d84 \\u5db8 \\u5d94 \\u5d81 \\u5dd4 \\u5de8 \\u978f \\u5df0 \\u5e63 \\u5e03 \\u5e25 \\u5e2b \\u5e43 \\u5e33 \\u7c3e \\u5e5f \\u5e36 \\u5e40 \\u5e2d \\u5e6b \\u5e6c \\u5e58 \\u5e57 \\u51aa \\u8946 \\u5e79 \\u4e26 \\u5e78 \\u5ee3 \\u838a \\u6176 \\u7240 \\u5eec \\u5ee1 \\u5eab \\u61c9 \\u5edf \\u9f90 \\u5ee2 \\u5eb5 \\u5ece \\u5ee9 \\u958b \\u7570 \\u68c4 \\u5f12 \\u5f35 \\u5f4c \\u5f26 \\u5f33 \\u5f4e \\u5f48 \\u5f37 \\u6b78 \\u7576 \\u9304 \\u5f60 \\u5f65 \\u5f72 \\u5f69 \\u5fb9 \\u5fb5 \\u5f91 \\u5fa0 \\u5fa1 \\u61b6 \\u61fa \\u5fd7 \\u6182 \\u5ff5 \\u613e \\u61f7 \\u614b \\u616b \\u61ae \\u616a \\u60b5 \\u6134 \\u6190 \\u7e3d \\u61df \\u61cc \\u6200 \\u6046 \\u6064 \\u61c7 \\u60e1 \\u615f \\u61e8 \\u6137 \\u60fb \\u60f1 \\u60f2 \\u6085 \\u6128 \\u61f8 \\u6173 \\u609e \\u61ab \\u9a5a \\u61fc \\u6158 \\u61f2 \\u618a \\u611c \\u615a \\u619a \\u6163 \\u6108 \\u614d \\u61a4 \\u6192 \\u9858 \\u61fe \\u6196 \\u61e3 \\u61f6 \\u61cd \\u6207 \\u6214 \\u6232 \\u6227 \\u6230 \\u621a \\u6229 \\u6231 \\u6236 \\u624d \\u624e \\u64b2 \\u8a17 \\u6263 \\u57f7 \\u64f4 \\u636b \\u6383 \\u63da \\u64fe \\u6298 \\u64ab \\u62cb \\u6476 \\u6473 \\u6384 \\u6436 \\u8b77 \\u5831 \\u64e1 \\u62b5 \\u64d4 \\u62d0 \\u64ec \\u650f \\u63c0 \\u64c1 \\u6514 \\u64f0 \\u64a5 \\u64c7 \\u639b \\u646f \\u6523 \\u6397 \\u64be \\u64bb \\u633e \\u6493 \\u64cb \\u649f \\u6399 \\u64e0 \\u63ee \\u648f \\u6328 \\u633d \\u6329 \\u6488 \\u640d \\u64bf \\u63db \\u6417 \\u64da \\u64c4 \\u6451 \\u64f2 \\u64a3 \\u647b \\u645c \\u652c \\u6435 \\u64b3 \\u6519 \\u64f1 \\u645f \\u63ef \\u652a \\u641c \\u651c \\u651d \\u6504 \\u64fa \\u6416 \\u64ef \\u6524 \\u6516 \\u6490 \\u6506 \\u64f7 \\u64fc \\u651b \\u3a75 \\u64fb \\u6522 \\u6575 \\u6553 \\u6582 \\u6586 \\u6578 \\u9f4b \\u6595 \\u9b25 \\u65ac \\u65b7 \\u7121 \\u820a \\u6642 \\u66e0 \\u6698 \\u6606 \\u66c7 \\u66b1 \\u665d \\u66e8 \\u986f \\u6649 \\u66ec \\u66c9 \\u66c4 \\u6688 \\u6689 \\u66ab \\ud84c\\ude36 \\u6697 \\u66d6 \\u66f2 \\u8853 \\u6731 \\u6a38 \\u6a5f \\u6bba \\u96dc \\u6b0a \\u6746 \\u69d3 \\u689d \\u4f86 \\u694a \\u69aa \\u676f \\u5091 \\u9b06 \\u677f \\u6975 \\u69cb \\u6a05 \\u6a1e \\u68d7 \\u6aea \\u6898 \\u68d6 \\u69cd \\u6953 \\u689f \\u6ac3 \\u6ab8 \\u6a89 \\u6894 \\u67f5 \\u6a19 \\u68e7 \\u6adb \\u6af3 \\u68df \\u6ae8 \\u6adf \\u6b04 \\u6a39 \\u68f2 \\u6144 \\u6a23 \\u6838 \\u6b12 \\u690f \\u6a48 \\u6968 \\u6a94 \\u69bf \\u6a4b \\u6a3a \\u6a9c \\u69f3 \\u6a01 \\u6a33 \\u6881 \\u5922 \\u6aae \\u68f6 \\u69e4 \\u6aa2 \\u68b2 \\u6afa \\u69e8 \\u69fc \\u6add \\u69e7 \\u69f6 \\u6b0f \\u6a3f \\u6a62 \\u69ee \\u6a13 \\u6b16 \\u69b2 \\u6aec \\u6ada \\u6af8 \\u6a27 \\u6a9f \\u6abb \\u6ab3 \\u6ae7 \\u6a6b \\u6aa3 \\u6afb \\u6aeb \\u6ae5 \\u6ad3 \\u6ade \\u6a81 \\u6b61 \\u6b5f \\u6b50 \\u6b32 \\u6bb2 \\u6b7f \\u6ba4 \\u6b98 \\u6b9e \\u6bae \\u6bab \\u6baf \\u6bc6 \\u6bc0 \\u8f42 \\u7562 \\u6583 \\u6c08 \\u6bff \\u6bff \\u6c0c \\u6c23 \\u6c2b \\u6c2c \\u6c33 \\u532f \\u6f22 \\u6e6f \\u6d36 \\u6c88 \\u6e9d \\u6c92 \\u7043 \\u6f1a \\u701d \\u6dea \\u6ec4 \\u6e22 \\u6f59 \\u6eec \\u6cdb \\u6fd8 \\u6ce8 \\u6dda \\u6fa9 \\u7027 \\u7018 \\u6ffc \\u7009 \\u6f51 \\u6fa4 \\u6d87 \\u6f54 \\u7051 \\u7aaa \\u6d79 \\u6dfa \\u6f3f \\u6f86 \\u6e5e \\u6eae \\u6fc1 \\u6e2c \\u6fae \\u6fdf \\u700f \\u6efb \\u6e3e \\u6ef8 \\u6fc3 \\u6f6f \\u6fdc \\u5857 \\u6d97 \\u6fe4 \\u6f87 \\u6df6 \\u6f23 \\u6f7f \\u6e26 \\u6eb3 \\u6e19 \\u6ecc \\u6f64 \\u6f97 \\u6f32 \\u6f80 \\u6fb1 \\u6df5 \\u6de5 \\u6f2c \\u7006 \\u6f38 \\u6fa0 \\u6f01 \\u700b \\u6ef2 \\u6eab \\u904a \\u7063 \\u6ebc \\u6fda \\u6f70 \\u6ffa \\u6f35 \\u6f0a \\u6f77 \\u6efe \\u6eef \\u7069 \\u7044 \\u6eff \\u7005 \\u6ffe \\u6feb \\u7064 \\u6ff1 \\u7058 \\u6fa6 \\u6f13 \\u7020 \\u701f \\u7032 \\u6ff0 \\u6f5b \\u7026 \\u7002 \\u703e \\u7028 \\u7015 \\u705d \\u6ec5 \\u71c8 \\u9748 \\u7ac8 \\u707d \\u71e6 \\u716c \\u7210 \\u71c9 \\u7152 \\u7197 \\u9ede \\u7149 \\u71be \\u720d \\u721b \\u70f4 \\u71ed \\u7159 \\u7169 \\u71d2 \\u71c1 \\u71f4 \\u71d9 \\u71fc \\u71b1 \\u7165 \\u71dc \\u71fe \\u7185 \\u85b0 \\u611b \\u723a \\u7258 \\u729b \\u727d \\u72a7 \\u72a2 \\u72c0 \\u7377 \\u7341 \\u7336 \\u72fd \\u736e \\u7370 \\u7368 \\u72f9 \\u7345 \\u736a \\u7319 \\u7344 \\u733b \\u736b \\u7375 \\u737c \\u7380 \\u8c6c \\u8c93 \\u875f \\u737b \\u737a \\u74a3 \\u74b5 \\u7452 \\u746a \\u744b \\u74b0 \\u73fe \\u7472 \\u74bd \\u743a \\u74cf \\u74ab \\u743f \\u74a1 \\u7489 \\u7463 \\u74ca \\u7464 \\u74a6 \\u74b8 \\u74d4 \\u74da \\u7515 \\u750c \\u96fb \\u756b \\u66a2 \\u7587 \\u7664 \\u7642 \\u7627 \\u7658 \\u760d \\u7667 \\u7632 \\u7621 \\u760b \\u76b0 \\u75fe \\u75c7 \\u7670 \\u75d9 \\u7662 \\u7602 \\u7646 \\u7613 \\u7647 \\u7661 \\u7649 \\u762e \\u761e \\u763b \\u765f \\u7671 \\u766e \\u766d \\u7669 \\u766c \\u7672 \\u7681 \\u769a \\u76ba \\u76b8 \\u76de \\u9e7d \\u76e3 \\u84cb \\u76dc \\u76e4 \\u7798 \\u7725 \\u77d3 \\u775c \\u775e \\u77bc \\u77b6 \\u779e \\u77da \\u77e9 \\u77ef \\u78ef \\u792c \\u7926 \\u78ad \\u78bc \\u78da \\u7868 \\u786f \\u78b8 \\u792a \\u7931 \\u792b \\u790e \\u785c \\u78a9 \\u7864 \\u78fd \\u78d1 \\u7904 \\u78ba \\u78e0 \\u7906 \\u7919 \\u78e7 \\u78e3 \\u9e7c \\u79ae \\u79a1 \\u7995 \\u79b0 \\u798e \\u79b1 \\u798d \\u7a1f \\u797f \\u79aa \\u96e2 \\u79c1 \\u79bf \\u7a08 \\u79cb \\u7a2e \\u7955 \\u7a4d \\u7a31 \\u7a62 \\u7a60 \\u7a6d \\u7a05 \\u7a4c \\u7a69 \\u7a61 \\u7a57 \\u7a6d \\u7aae \\u7aca \\u7ac5 \\u7ab5 \\u7aaf \\u7ac4 \\u7aa9 \\u7aba \\u7ac7 \\u7ab6 \\u8c4e \\u7af6 \\u7be4 \\u7b4d \\u7b46 \\u7b67 \\u7b8b \\u7c60 \\u7c69 \\u7bc9 \\u7bf3 \\u7be9 \\u7c39 \\u7b8f \\u7c4c \\u7bd4 \\u7c64 \\u7be0 \\u7c21 \\u7c59 \\u7c00 \\u7bcb \\u7c5c \\u7c6e \\u7c1e \\u7c2b \\u7c23 \\u7c0d \\u7c43 \\u7c5b \\u7c6c \\u7c6a \\u7c5f \\u7cf4 \\u985e \\u79c8 \\u7cf6 \\u7cf2 \\u7cb5 \\u7cde \\u7ce7 \\u7cc9 \\u7cdd \\u9931 \\u9908 \\u7cfb \\u7dca \\u7e36 \\u7e15 \\u7dea \\u7cf9 \\u7cfe \\u7d06 \\u7d05 \\u7d02 \\u7e96 \\u7d07 \\u7d04 \\u7d1a \\u7d08 \\u7e8a \\u7d00 \\u7d09 \\u7def \\u7d1c \\u7d18 \\u7d14 \\u7d15 \\u7d17 \\u7db1 \\u7d0d \\u7d1d \\u7e31 \\u7db8 \\u7d1b \\u7d19 \\u7d0b \\u7d21 \\u7d35 \\u7d16 \\u7d10 \\u7d13 \\u7dda \\u7d3a \\u7d32 \\u7d31 \\u7df4 \\u7d44 \\u7d33 \\u7d30 \\u7e54 \\u7d42 \\u7e10 \\u7d46 \\u7d3c \\u7d40 \\u7d39 \\u7e79 \\u7d93 \\u7d3f \\u7d81 \\u7d68 \\u7d50 \\u7d5d \\u7e5e \\u7d70 \\u7d4e \\u7e6a \\u7d66 \\u7d62 \\u7d73 \\u7d61 \\u7d55 \\u7d5e \\u7d71 \\u7d86 \\u7d83 \\u7d79 \\u7e61 \\u7d8c \\u7d8f \\u7d5b \\u7e7c \\u7d88 \\u7e3e \\u7dd2 \\u7dbe \\u7dd3 \\u7e8c \\u7dba \\u7dcb \\u7dbd \\u979d \\u7dc4 \\u7e69 \\u7dad \\u7dbf \\u7dac \\u7e43 \\u7da2 \\u7daf \\u7db9 \\u7da3 \\u7d9c \\u7dbb \\u7db0 \\u7da0 \\u7db4 \\u7dc7 \\u7dd9 \\u7dd7 \\u7dd8 \\u7dec \\u7e9c \\u7df9 \\u7df2 \\u7ddd \\u7e15 \\u7e62 \\u7de6 \\u7d9e \\u7dde \\u7df6 \\u7dda \\u7df1 \\u7e0b \\u7de9 \\u7de0 \\u7e37 \\u7de8 \\u7de1 \\u7de3 \\u7e09 \\u7e1b \\u7e1f \\u7e1d \\u7e2b \\u7e17 \\u7e1e \\u7e8f \\u7e2d \\u7e0a \\u7e11 \\u7e7d \\u7e39 \\u7e35 \\u7e32 \\u7e93 \\u7e2e \\u7e46 \\u7e45 \\u7e88 \\u7e5a \\u7e55 \\u7e52 \\u7e6e \\u7e7e \\u7e70 \\u7e6f \\u7e73 \\u7e98 \\u7f4c \\u7db2 \\u7f85 \\u7f70 \\u7f77 \\u7f86 \\u7f88 \\u7fa5 \\u7fa8 \\u7fa3 \\u7ff9 \\u7ffd \\u7fec \\u802e \\u802c \\u8073 \\u6065 \\u8076 \\u807e \\u8077 \\u8079 \\u806f \\u8075 \\u8070 \\u8085 \\u8178 \\u819a \\u9aaf \\u991a \\u814e \\u816b \\u8139 \\u8105 \\u80c4 \\u81bd \\u80cc \\u52dd \\u80e1 \\u6727 \\u8156 \\u81da \\u811b \\u81a0 \\u8108 \\u81be \\u9ad2 \\u81cd \\u8166 \\u81bf \\u81e0 \\u8173 \\u812b \\u8161 \\u81c9 \\u81d8 \\u9183 \\u8195 \\u9f76 \\u81a9 \\u9766 \\u8183 \\u9a30 \\u81cf \\u7fb6 \\u81e2 \\u81f4 \\u8f3f \\u820d \\u8264 \\u8266 \\u8259 \\u826b \\u8271 \\u8c54 \\u85dd \\u7bc0 \\u7f8b \\u858c \\u856a \\u8606 \\u82b2 \\u82b8 \\u84ef \\u8466 \\u85f6 \\u83a7 \\u8407 \\u84bc \\u82e7 \\u8607 \\u82d4 \\u6abe \\u85b4 \\u860b \\u7bc4 \\u8396 \\u8622 \\u8526 \\u584b \\u7162 \\u7e6d \\u834a \\u85a6 \\u8598 \\u83a2 \\u8558 \\u84fd \\u8434 \\u854e \\u8588 \\u85ba \\u8569 \\u69ae \\u8477 \\u6ece \\u7296 \\u7192 \\u8541 \\u85ce \\u84c0 \\u852d \\u8552 \\u8452 \\u8464 \\u85e5 \\u849e \\u840a \\u84ee \\u8494 \\u8435 \\u859f \\u7372 \\u8555 \\u7469 \\u9daf \\u84f4 \\u8600 \\u863f \\u87a2 \\u71df \\u7e08 \\u856d \\u85a9 \\u8525 \\u8495 \\u8546 \\u8562 \\u8523 \\u851e \\u919f \\u8499 \\u85cd \\u858a \\u863a \\u8577 \\u93a3 \\u9a40 \\u8646 \\u8511 \\u8594 \\u861e \\u85fa \\u85f9 \\u8580 \\u8604 \\u860a \\u85ea \\u861a \\u860a \\u6af1 \\u865c \\u616e \\u865b \\u87f2 \\u866f \\u87e3 \\u8768 \\u96d6 \\u8766 \\u8806 \\u8755 \\u87fb \\u879e \\u8801 \\u8836 \\u8814 \\u8706 \\u8831 \\u8823 \\u87f6 \\u883b \\u87c4 \\u86fa \\u87ef \\u8784 \\u8810 \\u86fb \\u8778 \\u881f \\u8805 \\u87c8 \\u87ec \\u880d \\u87bb \\u8811 \\u87bf \\u87ce \\u8828 \\u91c1 \\u929c \\u88dc \\u8868 \\u896f \\u889e \\u8956 \\u5acb \\u8918 \\u896a \\u8972 \\u894f \\u88dd \\u8960 \\u890c \\u8933 \\u895d \\u8932 \\u8949 \\u8938 \\u8964 \\u8974 \\u898b \\u89c0 \\u898e \\u898f \\u8993 \\u8996 \\u8998 \\u89bd \\u89ba \\u89ac \\u89a1 \\u89bf \\u89a5 \\u89a6 \\u89af \\u89b2 \\u89b7 \\u89f4 \\u89f8 \\u89f6 \\u8abe \\u8b8b \\u8b7d \\u8b04 \\u8a01 \\u8a08 \\u8a02 \\u8a03 \\u8a8d \\u8b4f \\u8a10 \\u8a0c \\u8a0e \\u8b93 \\u8a15 \\u8a16 \\u8a17 \\u8a13 \\u8b70 \\u8a0a \\u8a18 \\u8a12 \\u8b1b \\u8af1 \\u8b33 \\u8a4e \\u8a1d \\u8a25 \\u8a31 \\u8a1b \\u8ad6 \\u8a29 \\u8a1f \\u8af7 \\u8a2d \\u8a2a \\u8a23 \\u8b49 \\u8a41 \\u8a36 \\u8a55 \\u8a5b \\u8b58 \\u8a57 \\u8a50 \\u8a34 \\u8a3a \\u8a46 \\u8b05 \\u8a5e \\u8a58 \\u8a54 \\u8a56 \\u8b6f \\u8a52 \\u8a86 \\u8a84 \\u8a66 \\u8a7f \\u8a69 \\u8a70 \\u8a7c \\u8aa0 \\u8a85 \\u8a75 \\u8a71 \\u8a95 \\u8a6c \\u8a6e \\u8a6d \\u8a62 \\u8a63 \\u8acd \\u8a72 \\u8a73 \\u8a6b \\u8ae2 \\u8a61 \\u8b78 \\u8aa1 \\u8aa3 \\u8a9e \\u8a9a \\u8aa4 \\u8aa5 \\u8a98 \\u8aa8 \\u8a91 \\u8aaa \\u8aa6 \\u8a92 \\u8acb \\u8af8 \\u8acf \\u8afe \\u8b80 \\u8ad1 \\u8ab9 \\u8ab2 \\u8ac9 \\u8adb \\u8ab0 \\u8ad7 \\u8abf \\u8ac2 \\u8ad2 \\u8ac4 \\u8ab6 \\u8ac7 \\u8b85 \\u8abc \\u8b00 \\u8af6 \\u8adc \\u8b0a \\u8aeb \\u8ae7 \\u8b14 \\u8b01 \\u8b02 \\u8ae4 \\u8aed \\u8afc \\u8b92 \\u8aee \\u8af3 \\u8afa \\u8ae6 \\u8b0e \\u8ade \\u8add \\u8b28 \\u8b9c \\u8b16 \\u8b1d \\u8b20 \\u8b17 \\u8ae1 \\u8b19 \\u8b10 \\u8b39 \\u8b3e \\u8b2b \\u8b7e \\u8b2c \\u8b5a \\u8b56 \\u8b59 \\u8b95 \\u8b5c \\u8b4e \\u8b9e \\u8b74 \\u8b6b \\u8b96 \\u8c37 \\u8c76 \\u8c9d \\u8c9e \\u8ca0 \\u8c9f \\u8ca2 \\u8ca1 \\u8cac \\u8ce2 \\u6557 \\u8cec \\u8ca8 \\u8cea \\u8ca9 \\u8caa \\u8ca7 \\u8cb6 \\u8cfc \\u8caf \\u8cab \\u8cb3 \\u8ce4 \\u8cc1 \\u8cb0 \\u8cbc \\u8cb4 \\u8cba \\u8cb8 \\u8cbf \\u8cbb \\u8cc0 \\u8cbd \\u8cca \\u8d04 \\u8cc8 \\u8cc4 \\u8cb2 \\u8cc3 \\u8cc2 \\u8d13 \\u8cc7 \\u8cc5 \\u8d10 \\u8cd5 \\u8cd1 \\u8cda \\u8cd2 \\u8ce6 \\u8ced \\u9f4e \\u8d16 \\u8cde \\u8cdc \\u8d14 \\u8cd9 \\u8ce1 \\u8ce0 \\u8ce7 \\u8cf4 \\u8cf5 \\u8d05 \\u8cfb \\u8cfa \\u8cfd \\u8cfe \\u8d17 \\u8d0a \\u8d07 \\u8d08 \\u8d0d \\u8d0f \\u8d1b \\u8d6c \\u8d99 \\u8d95 \\u8da8 \\u8db2 \\u8e89 \\u8e8d \\u8e4c \\u8e92 \\u8e10 \\u8e82 \\u8e7a \\u8e55 \\u8e9a \\u8e8b \\u8e8a \\u8e64 \\u8e93 \\u8e91 \\u8ea1 \\u8e63 \\u8e95 \\u8ea5 \\u8eaa \\u8ea6 \\u8ec0 \\u8f40 \\u8eca \\u8ecb \\u8ecc \\u8ed2 \\u8ed1 \\u8ed4 \\u8f49 \\u8edb \\u8f2a \\u8edf \\u8f5f \\u8ef2 \\u8efb \\u8f64 \\u8ef8 \\u8ef9 \\u8efc \\u8ee4 \\u8eeb \\u8f62 \\u8efa \\u8f15 \\u8efe \\u8f09 \\u8f0a \\u8f4e \\u8f08 \\u8f07 \\u8f05 \\u8f03 \\u8f12 \\u8f14 \\u8f1b \\u8f26 \\u8f29 \\u8f1d \\u8f25 \\u8f1e \\u8f2c \\u8f1f \\u8f1c \\u8f33 \\u8f3b \\u8f2f \\u8f40 \\u8f38 \\u8f61 \\u8f45 \\u8f44 \\u8f3e \\u8f46 \\u8f4d \\u8f54 \\u8fad \\u95e2 \\u8faf \\u8fae \\u908a \\u907c \\u9054 \\u9077 \\u904e \\u9081 \\u904b \\u9084 \\u9019 \\u9032 \\u9060 \\u9055 \\u9023 \\u9072 \\u9087 \\u9015 \\u8de1 \\u9069 \\u9078 \\u905c \\u905e \\u9090 \\u908f \\u907a \\u9059 \\u9127 \\u913a \\u9114 \\u90f5 \\u9112 \\u9134 \\u9130 \\u9b31 \\u90df \\u9136 \\u912d \\u9106 \\u9148 \\u9116 \\u9132 \\u9147 \\u919e \\u91b1 \\u91ac \\u9178 \\u91c5 \\u91c3 \\u91c0 \\u919e \\u63a1 \\u91cb \\u88cf \\u9451 \\u947e \\u93e8 \\u91d2 \\u91d3 \\u91d4 \\u91dd \\u91d8 \\u91d7 \\u91d9 \\u91d5 \\u91f7 \\u91fa \\u91e7 \\u91e4 \\u9212 \\u91e9 \\u91e3 \\u9346 \\u91f9 \\u935a \\u91f5 \\u9203 \\u9223 \\u9208 \\u9226 \\u9245 \\u920d \\u9214 \\u937e \\u9209 \\u92c7 \\u92fc \\u9211 \\u9210 \\u9470 \\u6b3d \\u921e \\u93a2 \\u9264 \\u9227 \\u9201 \\u9225 \\u9204 \\u9215 \\u9200 \\u923a \\u9322 \\u9266 \\u9257 \\u9237 \\u9262 \\u9233 \\u9255 \\u923d \\u9238 \\u925e \\u947d \\u926c \\u926d \\u9240 \\u923f \\u923e \\u9435 \\u9251 \\u9234 \\u9460 \\u925b \\u925a \\u924b \\u9230 \\u9249 \\u9248 \\u924d \\u922e \\u9239 \\u9438 \\u9276 \\u92ac \\u92a0 \\u927a \\u92e9 \\u930f \\u92aa \\u92ee \\u92cf \\u92e3 \\u9403 \\u928d \\u943a \\u9285 \\u92c1 \\u92b1 \\u92a6 \\u93a7 \\u9358 \\u9296 \\u9291 \\u92cc \\u92a9 \\u929b \\u93f5 \\u9293 \\u93a9 \\u927f \\u929a \\u927b \\u9298 \\u931a \\u92ab \\u9278 \\u92a5 \\u93df \\u9283 \\u940b \\u92a8 \\u9280 \\u92a3 \\u9444 \\u9412 \\u92ea \\u92d9 \\u9338 \\u92f1 \\u93c8 \\u93d7 \\u92b7 \\u9396 \\u92f0 \\u92e5 \\u92e4 \\u934b \\u92ef \\u92e8 \\u93fd \\u92bc \\u92dd \\u92d2 \\u92c5 \\u92f6 \\u9426 \\u9417 \\u92b3 \\u92bb \\u92c3 \\u92df \\u92e6 \\u9312 \\u9306 \\u937a \\u9369 \\u932f \\u9328 \\u931b \\u9321 \\u9340 \\u9301 \\u9315 \\u9329 \\u932b \\u932e \\u947c \\u9318 \\u9310 \\u9326 \\u9455 \\u6774 \\u9308 \\u9343 \\u9307 \\u931f \\u9320 \\u9375 \\u92f8 \\u9333 \\u9319 \\u9365 \\u9348 \\u9347 \\u93d8 \\u9376 \\u9354 \\u9364 \\u936c \\u937e \\u935b \\u93aa \\u9360 \\u9370 \\u9384 \\u934d \\u9382 \\u93e4 \\u93a1 \\u9428 \\u9387 \\u93cc \\u93ae \\u939b \\u9398 \\u9477 \\u9482 \\u942b \\u93b3 \\u93bf \\u93a6 \\u93ac \\u938a \\u93b0 \\u93b5 \\u944c \\u9394 \\u93e2 \\u93dc \\u93dd \\u93cd \\u93f0 \\u93de \\u93e1 \\u93d1 \\u93c3 \\u93c7 \\u93d0 \\u9414 \\u9481 \\u9410 \\u93f7 \\u9465 \\u9413 \\u946d \\u9420 \\u9479 \\u93f9 \\u9419 \\u944a \\u9433 \\u9436 \\u9432 \\u942e \\u943f \\u9454 \\u9463 \\u945e \\u9471 \\u9472 \\u9577 \\u9580 \\u9582 \\u9583 \\u9586 \\u9588 \\u9589 \\u554f \\u95d6 \\u958f \\u95c8 \\u9592 \\u958e \\u9593 \\u9594 \\u958c \\u60b6 \\u9598 \\u9b27 \\u95a8 \\u805e \\u95e5 \\u95a9 \\u95ad \\u95d3 \\u95a5 \\u95a3 \\u95a1 \\u95ab \\u9b2e \\u95b1 \\u95ac \\u95cd \\u95be \\u95b9 \\u95b6 \\u9b29 \\u95bf \\u95bd \\u95bb \\u95bc \\u95e1 \\u95cc \\u95c3 \\u95e0 \\u95ca \\u95cb \\u95d4 \\u95d0 \\u95d2 \\u95d5 \\u95de \\u95e4 \\u968a \\u967d \\u9670 \\u9663 \\u968e \\u969b \\u9678 \\u96b4 \\u9673 \\u9658 \\u965d \\u96af \\u9689 \\u9695 \\u96aa \\u96a8 \\u96b1 \\u96b8 \\u96cb \\u96e3 \\u50f1 \\u96db \\u96d5 \\u8b8e \\u9742 \\u9727 \\u973d \\u9ef4 \\u9722 \\u9744 \\u975a \\u975d \\u975c \\u9762 \\u9768 \\u97c3 \\u97bd \\u97c9 \\u97dd \\u97cb \\u97cc \\u97cd \\u97d3 \\u97d9 \\u97de \\u97dc \\u97fb \\u9801 \\u9802 \\u9803 \\u9807 \\u9805 \\u9806 \\u9808 \\u980a \\u9811 \\u9867 \\u9813 \\u980e \\u9812 \\u980c \\u980f \\u9810 \\u9871 \\u9818 \\u9817 \\u9838 \\u9821 \\u9830 \\u9832 \\u981c \\u6f41 \\u71b2 \\u9826 \\u9824 \\u983b \\u982e \\u9839 \\u9837 \\u9834 \\u7a4e \\u9846 \\u984c \\u9852 \\u984e \\u9853 \\u984f \\u984d \\u9873 \\u9862 \\u985b \\u9859 \\u9865 \\u7e87 \\u986b \\u986c \\u9870 \\u9874 \\u98a8 \\u98ba \\u98ad \\u98ae \\u98af \\u98b6 \\u98b8 \\u98bc \\u98bb \\u98c0 \\u98c4 \\u98c6 \\u98c8 \\u98db \\u9957 \\u995c \\u98e0 \\u98e3 \\u98e2 \\u98e5 \\u9933 \\u98e9 \\u993c \\u98ea \\u98eb \\u98ed \\u98ef \\u98f2 \\u991e \\u98fe \\u98fd \\u98fc \\u98ff \\u98f4 \\u990c \\u9952 \\u9909 \\u9904 \\u990e \\u9903 \\u990f \\u9905 \\u9911 \\u9916 \\u9913 \\u9918 \\u9912 \\u9915 \\u991c \\u991b \\u9921 \\u9928 \\u9937 \\u994b \\u9936 \\u993f \\u995e \\u9941 \\u9943 \\u993a \\u993e \\u9948 \\u9949 \\u9945 \\u994a \\u994c \\u9962 \\u99ac \\u99ad \\u99b1 \\u99b4 \\u99b3 \\u9a45 \\u99b9 \\u99c1 \\u9a62 \\u99d4 \\u99db \\u99df \\u99d9 \\u99d2 \\u9a36 \\u99d0 \\u99dd \\u99d1 \\u99d5 \\u9a5b \\u99d8 \\u9a4d \\u7f75 \\u99f0 \\u9a55 \\u9a4a \\u99f1 \\u99ed \\u99e2 \\u9a6b \\u9a6a \\u9a01 \\u9a57 \\u9a02 \\u99f8 \\u99ff \\u9a0f \\u9a0e \\u9a0d \\u9a05 \\u9a0c \\u9a4c \\u9a42 \\u9a19 \\u9a2d \\u9a24 \\u9a37 \\u9a16 \\u9a41 \\u9a2e \\u9a2b \\u9a38 \\u9a43 \\u9a3e \\u9a44 \\u9a4f \\u9a5f \\u9a65 \\u9a66 \\u9a64 \\u9acf \\u9ad6 \\u9ad5 \\u9b22 \\u9b39 \\u9b58 \\u9b4e \\u9b5a \\u9b5b \\u9b62 \\u9b77 \\u9b68 \\u9b6f \\u9b74 \\u4c3e \\u9b7a \\u9b81 \\u9b83 \\u9b8e \\u9c78 \\u9b8b \\u9b93 \\u9b92 \\u9b8a \\u9b91 \\u9c5f \\u9b8d \\u9b90 \\u9bad \\u9b9a \\u9bb3 \\u9baa \\u9b9e \\u9ba6 \\u9c02 \\u9b9c \\u9c60 \\u9c6d \\u9bab \\u9bae \\u9bba \\u9bd7 \\u9c58 \\u9bc1 \\u9c7a \\u9c31 \\u9c39 \\u9bc9 \\u9c23 \\u9c37 \\u9bc0 \\u9bca \\u9bc7 \\u9bb6 \\u9bfd \\u9bd2 \\u9bd6 \\u9bea \\u9bd5 \\u9beb \\u9be1 \\u9be4 \\u9be7 \\u9bdd \\u9be2 \\u9b8e \\u9bdb \\u9be8 \\u9c3a \\u9bf4 \\u9bd4 \\u9c5d \\u9c08 \\u9c0f \\u9c68 \\u9bf7 \\u9c2e \\u9c03 \\u9c13 \\u9c77 \\u9c0d \\u9c12 \\u9c09 \\u9c01 \\u9c42 \\u9bff \\u9c20 \\u9c32 \\u9c2d \\u9c28 \\u9c25 \\u9c29 \\u9c1f \\u9c1c \\u9c33 \\u9c3e \\u9c48 \\u9c49 \\u9c3b \\u9c35 \\u9c45 \\u4c81 \\u9c3c \\u9c56 \\u9c54 \\u9c57 \\u9c52 \\u9c6f \\u9c64 \\u9c67 \\u9c63 \\u4c98 \\u9ce5 \\u9ce9 \\u96de \\u9cf6 \\u9cf4 \\u9cf2 \\u9dd7 \\u9d09 \\u9dac \\u9d07 \\u9d06 \\u9d23 \\u9d87 \\u9e15 \\u9d28 \\u9d1e \\u9d26 \\u9d12 \\u9d1f \\u9d1d \\u9d1b \\u9dfd \\u9d15 \\u9de5 \\u9dd9 \\u9d2f \\u9d30 \\u9d42 \\u9d34 \\u9d43 \\u9d3f \\u9e1e \\u9d3b \\u9d50 \\u9d53 \\u9e1d \\u9d51 \\u9d60 \\u9d5d \\u9d52 \\u9df3 \\u9d5c \\u9d61 \\u9d72 \\u9d93 \\u9d6a \\u9d7e \\u9d6f \\u9d6c \\u9d6e \\u9d89 \\u9d8a \\u9d77 \\u9deb \\u9d98 \\u9da1 \\u9d9a \\u9dbb \\u9d96 \\u9dbf \\u9da5 \\u9da9 \\u9dca \\u9dc2 \\u9db2 \\u9db9 \\u9dba \\u9dc1 \\u9dbc \\u9db4 \\u9dd6 \\u9e1a \\u9dd3 \\u9dda \\u9def \\u9de6 \\u9df2 \\u9df8 \\u9dfa \\u4d09 \\u9e07 \\u9df9 \\u9e0c \\u9e0f \\u9e1b \\u9e18 \\u9e7a \\u9ea5 \\u9ea9 \\u9eb4 \\u9eaa \\u9ebc \\u9ec3 \\u9ecc \\u9ef6 \\u9ef7 \\u9ef2 \\u9efd \\u9eff \\u9f02 \\u9f09 \\u9780 \\u9f34 \\u9f47 \\u9f4a \\u9f4f \\u9f52 \\u9f54 \\u9f55 \\u9f57 \\u9f5f \\u9f61 \\u9f59 \\u9f60 \\u9f5c \\u9f66 \\u9f6c \\u9f6a \\u9f72 \\u9f77 \\u9f8d \\u9f94 \\u9f95 \\u9f9c \\u40ee \\u4951 \\u9fd3 \\u93b6 \\ud840\\udc5e \\u5123 \\ud840\\udf25 \\u4fd3 \\u3493 \\ud840\\udfe2 \\ud84c\\udf50 \\u512d \\ud842\\udc0e \\u527e \\ud841\\udf86 \\ud869\\udfd6 \\u52d1 \\u55f0 \\u54ef \\u5645 \\u3609 \\u56a7 \\u56c3 \\ud844\\udd4f \\ud844\\udcd5 \\ud844\\udd14 \\ud844\\udd23 \\u35f2 \\ud845\\udcfe \\ud845\\udc6d \\u58d7 \\ud845\\udd16 \\u58c8 \\u3737 \\u3717 \\u3722 \\u5b4e \\u5b7b \\ud846\\udf89 \\ud846\\udfa3 \\ud847\\udcf3 \\ud859\\ude27 \\u5d7c \\ud847\\udf57 \\u5d88 \\u5d98 \\u389d \\u399b \\ud84a\\udd31 \\ud84a\\udcda \\ud84a\\udced \\u613b \\u61b9 \\ud84a\\udc3c \\u61a2 \\u61c0 \\u398e \\u61ce \\ud852\\udcbb \\u6230 \\ud84b\\uddee \\ud84b\\uddab \\u644b \\u64eb \\ud84b\\ude7f \\u64e3 \\u6585 \\u65b8 \\u66e5 \\ud84c\\udecb \\ud85a\\udc88 \\u816a \\u8125 \\u81d7 \\u69eb \\u6871 \\u6b0d \\ud84e\\udc32 \\u6947 \\u6a6f \\u6a24 \\u6a20 \\u6b13 \\u3c19 \\u3be4 \\ud84d\\udfbb \\u6aad \\ud84d\\udf55 \\u6b18 \\ud84e\\udc29 \\u6ba2 \\ud84e\\udff4 \\ud84e\\udfe9 \\u6c2d \\u6e4b \\u6f55 \\u3d57 \\u6f85 \\ud84f\\udfc9 \\ud86b\\uddd3 \\ud850\\udd76 \\u6fc6 \\u7059 \\ud850\\udc63 \\u7003 \\u7193 \\u3dcd \\u7204 \\u718c \\u7216 \\u719a \\u7189 \\u3dff \\ud851\\udc8e \\ud851\\udce9 \\u71a1 \\u3e07 \\ud851\\udc73 \\ud851\\udeee \\ud852\\udc9f \\u7369 \\u7381 \\u3e8f \\u74d5 \\u74db \\ud853\\udcf8 \\u7650 \\ud853\\ude2b \\u3fd7 \\u3fe7 \\u769f \\u9eac \\u4009 \\ud854\\udf03 \\u4039 \\ud854\\ude9d \\u77a4 \\u406a \\u408e \\u7912 \\ud855\\udd85 \\ud855\\udd65 \\u7899 \\ud855\\udfb5 \\ud856\\ude10 \\u7ada \\ud856\\ude82 \\u7c45 \\u4259 \\u7c4b \\u7bd8 \\ud857\\udd4a \\ud857\\ude20 \\u4272 \\u7bf8 \\ud857\\udd43 \\ud857\\udf3d \\u42ad \\ud857\\udf56 \\ud857\\udfca \\u7df7 \\u7d87 \\u7d80 \\u7e5f \\u7dcd \\u7e3a \\u7df8 \\ud858\\udc85 \\u42ff \\u7e0e \\u7df0 \\u4308 \\ud858\\udcc4 \\u430b \\u4330 \\u7e2c \\u7e53 \\u4316 \\u7e4f \\u431f \\u431d \\u4325 \\u7e7b \\u437d \\u6725 \\u81a2 \\ud85a\\udcce \\ud85a\\udebd \\u84e7 \\u4573 \\u7207 \\ud85b\\udf9f \\u861f \\u6abe \\ud85d\\udd5f \\u45ff \\ud85c\\udf88 \\u8819 \\u8800 \\u883e \\ud85d\\udd25 \\u4671 \\u8970 \\ud85d\\udfc0 \\u8a40 \\ud85f\\udcdf \\u4788 \\u8cb7 \\ud85f\\udd94 \\u8cec \\u477b \\u8cdf \\u8d03 \\ud860\\uddc1 \\u8e98 \\ud860\\udd23 \\ud860\\udd4d \\ud860\\ude0a \\ud860\\ude0c \\u4831 \\ud860\\uddde \\u8e9d \\u8ec9 \\u8ed7 \\ud860\\udebb \\ud860\\udfe0 \\u8f04 \\ud860\\udfae \\ud860\\udfe5 \\u48a8 \\ud862\\udcde \\ud862\\udce7 \\ud862\\udcbf \\ud862\\udcc8 \\ud862\\udd3b \\u93b7 \\u91f3 \\ud862\\udd5b \\u9220 \\u920b \\u9232 \\u922f \\u9241 \\u9faf \\u92b6 \\u92c9 \\u9344 \\ud862\\uddf1 \\u9302 \\u93c6 \\u93af \\u936e \\u939d \\ud862\\uded2 \\u9404 \\u93c9 \\u940e \\u940f \\ud862\\udf82 \\u4969 \\u49b3 \\ud863\\udcd5 \\ud863\\udcd1 \\u958d \\u9590 \\u4998 \\ud863\\udd17 \\ud863\\udd69 \\ud863\\udd78 \\ud863\\udd80 \\ud863\\udd8f \\ud863\\uddb2 \\ud863\\uddae \\ud863\\uddf2 \\ud863\\udf4f \\u49e2 \\u4a8f \\ud864\\udfea \\ud864\\udfa2 \\u4a98 \\u4a97 \\u9842 \\ud865\\udce3 \\u9843 \\u4af4 \\u98b0 \\ud865\\uddc0 \\u4b1e \\ud865\\ude39 \\ud865\\ude00 \\u98b7 \\u98be \\ud865\\ude3a \\ud865\\ude1d \\u4b18 \\u4b1d \\ud865\\ude48 \\ud865\\ude9b \\ud865\\udea5 \\ud865\\udeb5 \\ud865\\udec6 \\ud865\\udee9 \\ud865\\udfd0 \\ud865\\udf26 \\u4b40 \\u4b43 \\ud865\\udf07 \\ud865\\udf35 \\ud865\\udf54 \\u9938 \\ud865\\udf84 \\ud865\\udfa6 \\ud866\\udc34 \\ud866\\udc63 \\ud866\\udc7a \\u99ce \\ud866\\udd0a \\u4bbe \\u99da \\ud866\\udca1 \\u4b7f \\ud866\\udcbe \\u9a4b \\u4b9d \\ud866\\udd49 \\u99e7 \\ud866\\udcb8 \\u99e9 \\ud866\\udcb4 \\ud866\\udccf \\ud866\\udceb \\u99f6 \\ud866\\udcf5 \\ud866\\udcfa \\u4ba0 \\u9a14 \\u4b9e \\u9a44 \\u9a1d \\u9a2a \\ud866\\udd38 \\ud866\\udd19 \\u4bab \\u9a1f \\ud866\\udd32 \\u9a1a \\ud866\\udd44 \\ud866\\udd51 \\ud866\\udd47 \\u9fad \\u4bb3 \\ud866\\uddc6 \\u4be4 \\ud866\\udf59 \\ud867\\udc00 \\u9b16 \\ud866\\udff3 \\ud867\\udc39 \\ud867\\udce4 \\ud867\\udd35 \\u9b65 \\ud867\\udd69 \\ud867\\udd79 \\u9bf6 \\ud867\\uddb1 \\u9b9f \\ud867\\uddb0 \\u9b95 \\u9bc4 \\u4c96 \\u9bb8 \\ud867\\uddf0 \\ud867\\ude03 \\ud867\\ude26 \\u9bf1 \\u4c59 \\u4c6c \\u4c70 \\u9c47 \\ud867\\udf47 \\u4cb0 \\u9cfc \\ud867\\udfea \\ud868\\udc26 \\u9d32 \\u9d1c \\ud868\\udc48 \\u9de8 \\ud868\\udc3e \\ud868\\udc56 \\u9d5a \\ud868\\udc86 \\ud868\\udccf \\ud868\\udccd \\u9dd4 \\ud868\\udd15 \\ud868\\ude3c \\ud868\\udd06 \\ud868\\uddf3 \\u4d2c \\u9eb2 \\u9ea8 \\u4d34 \\u9eb3 \\ud868\\udeff \\u4d73 \\ud869\\udd35 \\ud869\\ude00 \\ud869\\ude2f \\ud843\\udfd5 \\u51d9 \\u350b \\u52e3 \\ud85f\\uddce \\u34c4 \\ud842\\udf19 \\u5513 \\u35ae \\u569b \\ud843\\udf43 \\u5679 \\u563a \\u562a \\u565e \\u55f9 \\u35ff \\u5633 \\ud844\\udcc4 \\u3613 \\ud844\\udce4 \\ud844\\udca1 \\u56bd \\ud844\\udd6f \\u56d2 \\u571e \\u58b2 \\u57ec \\u581a \\u587f \\ud845\\udcc1 \\u58e3 \\ud85f\\ude48 \\u5b47 \\u5b23 \\u5b3b \\u5b7e \\u5be0 \\u379e \\u5c69 \\u5d19 \\ud847\\ude17 \\u8f0b \\u5dd7 \\ud847\\ude6c \\u37fa \\u5dca \\u5dd8 \\ud847\\udfd6 \\u5e5d \\u5e69 \\u5eec \\u3897 \\u5ee7 \\ud848\\udf70 \\u5f43 \\u5fbf \\ud84a\\udd29 \\u399e \\u61b8 \\ud84a\\udcd0 \\ud84a\\udd3f \\ud84a\\udff7 \\u6450 \\u64df \\ud84b\\udd92 \\u639a \\u648a \\u3a3b \\u3a4b \\u64a7 \\ud84b\\udeb3 \\u650b \\u3a8e \\u66ca \\u81b9 \\u6896 \\u6ac5 \\u6b10 \\u6ab5 \\u6ae0 \\u6b07 \\ud84d\\udf2c \\u6b11 \\u6bca \\u973c \\u6fff \\u6ea1 \\ud850\\udd37 \\ud84f\\udf4f \\u3d7e \\u7052 \\u7182 \\u7147 \\ud851\\udc79 \\ud851\\udccc \\u7225 \\ud851\\udcbb \\ud851\\ude00 \\ud851\\udf06 \\u729e \\u734a \\ud852\\udc2e \\u3e9c \\u730c \\u747d \\u74c4 \\u747b \\u749d \\u3ef6 \\ud852\\udf05 \\u757c \\ud853\\udcf7 \\u75ee \\ud853\\uddc3 \\u3fd6 \\ud853\\ude94 \\u7631 \\u76e8 \\u774d \\u771d \\u77d1 \\u77c9 \\ud854\\udfdd \\ud855\\uddb2 \\u792e \\ud855\\uddc7 \\ud855\\udf30 \\ud855\\udf10 \\u4150 \\u4173 \\ud856\\udcb7 \\u4189 \\u7af1 \\u9d17 \\ud857\\uddbd \\u4251 \\ud856\\udfe4 \\u4276 \\ud857\\udd3c \\u7c22 \\u7c02 \\u426c \\ud857\\udd28 \\ud857\\udee6 \\ud864\\udff7 \\u7cfa \\u42ba \\u7d1f \\u42c3 \\ud857\\udfaf \\u42d4 \\u7d41 \\u7d59 \\u7d67 \\u7d65 \\u7e77 \\u7e68 \\u7e9a \\ud858\\udc16 \\u7d96 \\u7d7a \\u42e6 \\ud858\\udd47 \\u7d9f \\u7de4 \\u7dee \\u42fc \\ud858\\udce9 \\u7e0d \\u7e6c \\u7e38 \\u7e30 \\u7e42 \\ud858\\udd48 \\u7e48 \\u7e76 \\u7e81 \\u7e97 \\u4364 \\u7fb5 \\ud859\\udc80 \\u4399 \\ud859\\udd16 \\u807b \\ud859\\udffc \\ud85a\\udc5d \\ud85a\\uddfa \\u8263 \\ud85b\\udc4c \\u853f \\u84ad \\u857d \\u8573 \\u845d \\u852f \\u855d \\u8586 \\u85f7 \\u45c5 \\u8826 \\u87dc \\ud85d\\udcaf \\u87f3 \\u87c2 \\u87d8 \\u4654 \\u8957 \\u8953 \\u8958 \\u8940 \\u8975 \\ud85d\\udfab \\u89bc \\u899b \\ud85e\\udc74 \\ud85e\\udc84 \\u89b9 \\u46a9 \\ud85e\\udf79 \\u8a11 \\u8a1e \\u8a1c \\u8a53 \\u8aeb \\ud85e\\udd9d \\ud85e\\udda7 \\u46c4 \\u8a51 \\u8b4a \\u8a77 \\u8b51 \\u8a82 \\u8b68 \\u8aba \\u8aab \\u8ae3 \\u8a8b \\u46f3 \\u8ab7 \\ud85e\\ude55 \\u8ab3 \\u8af4 \\u8af0 \\u8aef \\u8b0f \\u8ae5 \\u8b31 \\u8b38 \\ud85e\\ude7c \\u8b09 \\u8b06 \\u8b2f \\ud85e\\udedd \\u8b46 \\ud85e\\udf24 \\u8b5e \\ud85e\\udf48 \\u8b7e \\u8c75 \\u8c97 \\u8d1a \\u476d \\ud85f\\ude18 \\u8cdd \\u478b \\u8d09 \\u8d11 \\u4793 \\u47d0 \\u47c6 \\ud85f\\udf6f \\u47c3 \\u4806 \\u8e73 \\u8e7b \\ud860\\udc90 \\u8e54 \\ud860\\uddfd \\ud860\\uddaa \\ud860\\uddf0 \\ud860\\udde4 \\u8ecf \\u8ed5 \\u8f63 \\u8edc \\u8ef7 \\u8ee8 \\u8eec \\ud860\\udf8c \\u8eff \\ud860\\udf08 \\u8f22 \\u8f16 \\u8f17 \\u8f28 \\u8f37 \\u8f2e \\ud860\\udf70 \\u8f4a \\u8f47 \\u8f50 \\u8f57 \\u8f60 \\u9071 \\u911f \\u9133 \\u91b6 \\u91df \\u91e8 \\u9207 \\u921b \\u93e6 \\u9206 \\ud862\\udd5f \\u9254 \\u9260 \\ud862\\ude95 \\u9288 \\u928a \\u9408 \\u9281 \\ud863\\udc0b \\u927e \\u92e0 \\u92d7 \\ud86d\\udca1 \\u933d \\u9324 \\u942a \\u931c \\ud862\\ude1b \\u931d \\u9325 \\ud862\\ude22 \\u934a \\u943c \\u9349 \\ud863\\udc32 \\u9352 \\u938d \\u496f \\u939e \\u9399 \\ud863\\udc03 \\u93e5 \\u4957 \\u93fe \\u9407 \\u940d \\ud862\\udf16 \\ud862\\udf78 \\ud862\\udf56 \\ud862\\udfb3 \\ud862\\udfdf \\u9474 \\ud863\\udc25 \\ud863\\udcb3 \\u958b \\u9592 \\u9597 \\u959e \\ud863\\udd39 \\u95b5 \\u49af \\u95d1 \\ud863\\udf33 \\ud864\\udc28 \\u9723 \\ud864\\udd59 \\u9767 \\u4a8a \\u97be \\ud864\\udf96 \\u97e0 \\ud864\\udfc2 \\u97db \\u97dd \\ud864\\udfe0 \\ud865\\udc54 \\u4ab4 \\u4abe \\ud865\\udc8e \\u9857 \\u982b \\u4ac2 \\u4ac0 \\u4adf \\u9835 \\ud865\\udd33 \\ud865\\udce5 \\u9845 \\ud865\\udd11 \\u9858 \\u9863 \\u4af6 \\u4afb \\ud865\\uddd3 \\ud865\\uddf4 \\u4b13 \\u98cb \\ud865\\udfd7 \\u98e6 \\u4b27 \\u9926 \\ud865\\udea9 \\u98f5 \\u98f6 \\ud865\\udecc \\u992b \\u9914 \\u9917 \\ud865\\udee1 \\u9960 \\u9927 \\u992c \\u992a \\u9935 \\u992d \\u9931 \\u4b54 \\u4b51 \\ud865\\udf7d \\u9958 \\u995f \\u99af \\u99bc \\u99c3 \\u99de \\u99ca \\u99e4 \\u99eb \\u99fb \\u9a03 \\u9a09 \\u9a0a \\u9a04 \\u9a20 \\u9a1c \\u9a35 \\u9a34 \\u9a31 \\u9a3b \\u4bb0 \\u9a53 \\u9a59 \\u9a68 \\u9b20 \\ud866\\udfc1 \\u9c6e \\u9b5f \\u9c11 \\u9c44 \\u9b66 \\u9b75 \\ud867\\udd81 \\u4c41 \\u4c40 \\u9b85 \\u9b84 \\u9ba4 \\u9bb0 \\u9c24 \\u9b86 \\u9baf \\ud867\\udeee \\u9bc6 \\u9bbf \\u9bb5 \\u4c85 \\ud867\\ude04 \\u9bec \\ud867\\ude21 \\u4c67 \\u9bde \\u9c0b \\u9bfe \\u9c26 \\u9c15 \\u9c2b \\u9c3d \\ud867\\uded7 \\ud867\\udeec \\u9c4a \\u9c62 \\ud867\\udf36 \\u9c72 \\u9cfd \\u9cf7 \\u9d00 \\u9d05 \\u9d03 \\u9e17 \\ud867\\udfe4 \\u9d14 \\u9e0b \\u9d25 \\u9d10 \\u9d4a \\u9d2e \\ud868\\udc16 \\u9d67 \\u9d33 \\u9d3d \\u9db0 \\u4cdc \\u9d5f \\u4ce4 \\u9dad \\u4ce2 \\u9d6b \\u9d70 \\u9d69 \\u9de4 \\u9d8c \\u9d92 \\u9da6 \\u9d97 \\ud868\\udce7 \\u4ce7 \\ud868\\udcd2 \\u4ceb \\u9dc5 \\ud868\\uddb7 \\u9dd0 \\u9de9 \\ud868\\udd42 \\u9de3 \\u9df7 \\u4d0b \\ud868\\ude78 \\u9eb7 \\u4d31 \\ud868\\udf2d \\u4d3d \\ud868\\udf60 \\u4d74 \\ud869\\udcf0 \\u4d95 \\u9f67 \\u9f69 \\ud86d\\udf26 \\u9f70 \\u9f6d \\u9f74 \\ud869\\ude4f \\u9f7e \\u9f93 \\u4db2 \\u346e \\ud841\\udc0a \\u36dd \\u3710 \\u5a88 \\u5b26 \\ud845\\udfeb \\u5a61 \\u5b07 \\u5b46 \\u5b44 \\u5db9 \\ud85a\\udc05 \\u6f63 \\u6fac \\u3d86 \\u704d \\u7227 \\u7203 \\ud851\\udef1 \\u3e7d \\u73fc \\u74be \\ud852\\ude42 \\u74bc \\u748a \\ud856\\udcb6 \\u7d4d \\u7d8b \\u7da1 \\u7ddf \\ud858\\uddb2 \\u4585 \\u4564 \\u8a28 \\u8a4a \\u8b42 \\u8ab4 \\u4716 \\u4850 \\u4869 \\u4875 \\ud861\\udfba \\ud861\\udfca \\u91da \\u91f2 \\u9216 \\u9217 \\u928f \\u925d \\u927d \\u9277 \\u4924 \\u9282 \\u943d \\ud862\\uddf0 \\ud862\\ude70 \\u9388 \\u4944 \\u9449 \\u959d \\u97da \\u980d \\ud865\\uddb0 \\u4afe \\u4b84 \\u9a3c \\ud866\\udda0 \\ud867\\udd66 \\u9b7d \\u4c78 \\u9c46 \\ud867\\udfc5 \\u9f6f \\u50e4 \\u58a0 \\u5a19 \\u5d7d \\u5ede \\u5f44 \\u6690 \\u9300 \\u946a \\ud862\\uddc0 \\ud862\\ude0f \\ud862\\udf4e \\ud862\\udf46 \\u9b88 \\u9b80 \\u9ba0 \\u9bfb \\u9ded \\u963f\\u6597 \\u963f\\u6770 \\u963f\\u5361\\u63d0\\u91cc \\u963f\\u62c9\\u4e7e\\u5c71\\u8108 \\u963f\\u62c9\\u514b \\u963f\\u91cc \\u963f\\u91cc\\u65af\\u6258\\u82ac \\u963f\\u5b43 \\u963f\\u68ee\\u677e\\u5cf6 \\u963f\\u677e\\u68ee\\u5cf6 \\u963f\\u6258\\u54c1 \\u963f\\u54b8 \\u963f\\u7d2e\\u502b\\u5361 \\u963f\\u829d\\u7279\\u524b\\u4eba \\u963f\\u829d\\u7279\\u524b\\u8a9e \\u54c0\\u5f14 \\u54c0\\u617c \\u54c0\\u8f13 \\u57c3\\u592b\\u4f2f\\u91cc \\u57c3\\u683c\\u723e\\u677e \\u57c3\\u53ca\\u66c6 \\u57c3\\u514b\\u6258 \\u57c3\\u62c9\\u6258\\u585e\\u5c3c\\u65af \\u6371\\u6253 \\u6371\\u5230 \\u6371\\u5f97 \\u6371\\u9913 \\u6371\\u904e \\u6371\\u98e2\\u62b5\\u9913 \\u6371\\u82e6 \\u6371\\u4e86 \\u6371\\u7f75 \\u6371\\u6eff \\u6371\\u78e8 \\u6371\\u65e5\\u5b50 \\u6371\\u4e09\\u9802\\u56db \\u6371\\u4e0a \\u6371\\u6642\\u9593 \\u6371\\u6574 \\u6371\\u63cd \\u77ee\\u687f\\u54c1\\u7a2e \\u77ee\\u51e0 \\u827e\\u8ff4 \\u827e\\u91cc\\u8cfd\\u5bae \\u827e\\u91cc\\u68ee \\u827e\\u745e\\u91cc \\u611b\\u5f7c\\u9336 \\u611b\\u774f \\u611b\\u9e97\\u6368\\u5bae \\u611b\\u617e \\u7919\\u96e3\\u7167\\u51c6 \\u5b89\\u7d0d\\u6258\\u5229\\u4e9e \\u5b89\\u700b\\u9435\\u8def \\u83f4\\u85f9 \\u83f4\\u83f4 \\u83f4\\u5a6a \\u83f4\\u5eec \\u83f4\\u7f85\\u6a39\\u5712 \\u83f4\\u820d \\u6848\\u51e0 \\u6848\\u51c6 \\u6697\\u5403\\u4e00\\u9a5a \\u95c7\\u706b \\u6697\\u91e6 \\u95c7\\u85cd\\u9aee \\u95c7\\u52a3 \\u95c7\\u4e82 \\u95c7\\u502b \\u95c7\\u6627 \\u95c7\\u51a5 \\u95c7\\u83ab \\u95c7\\u6dfa \\u95c7\\u7136 \\u95c7\\u5f31 \\u95c7\\u8aa6 \\u6697\\u6b4e \\u95c7\\u8df3 \\u6697\\u7bb1\\u64cd\\u4f5c \\u6697\\u4e2d\\u884c\\u4e8b \\u76ce\\u76c2\\u76f8\\u7e6b \\u6556\\u76ea \\u9068\\u904a\\u56db\\u6d77 \\u71ac\\u8591\\u5477\\u918b \\u71ac\\u88fd \\u7ff1\\u904a\\u56db\\u6d77 \\u9f07\\u982d\\u7368\\u5360 \\u5967\\u91cc\\u91cc\\u4e9e \\u5967\\u91cc\\u85a9 \\u5967\\u7279\\u6717\\u6258 \\u5967\\u6258 \\u516b\\u6597 \\u516b\\u8721 \\u516b\\u91cc \\u516b\\u8f9f \\u516b\\u7d2e \\u516b\\u96bb \\u516b\\u9031 \\u516b\\u5b57\\u9b0d \\u5df4\\u6597 \\u5df4\\u62c9\\u514b \\u5df4\\u62c9\\u677e \\u5df4\\u5398\\u5cf6 \\u5df4\\u91cc \\u5df4\\u677e\\u7ba1 \\u5df4\\u6258\\u9e97 \\u5df4\\u6258\\u8389 \\u5df4\\u6e38 \\u82ad\\u6258\\u8389 \\u7b06\\u6597 \\u62d4\\u9aee \\u62d4\\u9b1a \\u62d4\\u5b85\\u4e0a\\u6607 \\u628a\\u98ef\\u53eb\\u9951 \\u5427\\u6aaf \\u5427\\u6258\\u5973 \\u767d\\u9aee \\u767d\\u9aee\\u9280\\u9b1a \\u767d\\u7c89\\u9eaa \\u767d\\u687f\\u5175 \\u767d\\u4e7e \\u767d\\u9aa8\\u677e \\u767d\\u679c\\u677e \\u767d\\u9b0d \\u767d\\u91cc\\u5b89 \\u767d\\u9eaa \\u767d\\u9762\\u7121\\u9b1a \\u767d\\u76ae\\u677e \\u767d\\u5343\\u5c64 \\u767d\\u672e \\u767d\\u677e \\u767d\\u9b1a \\u767d\\u96f2 \\u767d\\u96f2\\u5ca9 \\u767e\\u4e0d\\u7576\\u4e00 \\u767e\\u7a40 \\u767e\\u82b1\\u66c6 \\u767e\\u91cc \\u767e\\u934a \\u767e\\u8f9f \\u767e\\u8449 \\u767e\\u8449\\u6372 \\u767e\\u7d2e \\u767e\\u96bb \\u67cf\\u7bc0\\u677e\\u64cd \\u64fa\\u4f48 \\u64fa\\u76ea \\u64fa\\u70cf\\u9f8d \\u64fa\\u9418 \\u62dc\\u6597 \\u62dc\\u8986 \\u62dc\\u5cb3 \\u62dc\\u5360\\u5ead \\u9812\\u4f48 \\u6591\\u5ca9 \\u95c6\\u95c6 \\u677f\\u6817 \\u677f\\u5ca9 \\u8fa6\\u516c\\u6aaf \\u8fa6\\u4f19 \\u534a\\u4e7e \\u534a\\u500b\\u4e16\\u7d00 \\u534a\\u91cc \\u534a\\u6258 \\u534a\\u96bb \\u62cc\\u9eaa \\u7d81\\u7d2e \\u68d2\\u5b50\\u9eaa \\u5305\\u4e7e \\u5305\\u7a40 \\u5305\\u4f19 \\u5305\\u7d2e \\u5305\\u5360 \\u8912\\u91c7\\u4e00\\u4ecb \\u8912\\u8b9a \\u8584\\u5016 \\u5bf6\\u4e30 \\u5bf6\\u91cc\\u5bf6\\u6c23 \\u5bf6\\u66c6 \\u5bf6\\u8a8c \\u4fdd\\u96aa\\u687f \\u62b1\\u5927\\u8db3\\u687f \\u62b1\\u6734 \\u676f\\u4f48 \\u676f\\u4e7e \\u676f\\u9eaa \\u76c3\\u8cfd \\u60b2\\u617c \\u60b2\\u7b51 \\u7891\\u8a8c \\u5317\\u6597 \\u5317\\u8ff4 \\u5317\\u91cc \\u5317\\u5f81 \\u8c9d\\u723e\\u6258\\u5167 \\u8c9d\\u91cc \\u8c9d\\u90a3\\u82ac\\u6258 \\u8c9d\\u5191 \\u5099\\u5617\\u8271\\u82e6 \\u5099\\u79a6 \\u5099\\u8a3b \\u63f9\\u699c \\u63f9\\u5305 \\u80cc\\u51fa \\u63f9\\u51fa\\u53bb \\u63f9\\u5e36 \\u63f9\\u8ca0 \\u63f9\\u56de \\u63f9\\u9951\\u8352 \\u63f9\\u7b50 \\u63f9\\u4f86 \\u63f9\\u7c0d \\u63f9\\u4f60 \\u63f9\\u4eba \\u80cc\\u75e0 \\u63f9\\u4ed6 \\u63f9\\u5979 \\u63f9\\u6211 \\u63f9\\u7269 \\u63f9\\u5c0f\\u5b69 \\u63f9\\u50b5 \\u63f9\\u7740 \\u63f9\\u8d70 \\u88ab\\u9aee \\u88ab\\u8907 \\u88ab\\u4eba\\u63f9 \\u88ab\\u982d\\u6563\\u9aee \\u7119\\u4e7e \\u5504\\u8b9a \\u672c\\u91cc \\u672c\\u9031 \\u755a\\u6597 \\u903c\\u4f75 \\u9f3b\\u6a11 \\u9f3b\\u83f8 \\u6bd4\\u687f\\u8cfd \\u6bd4\\u5e72 \\u5f7c\\u5f97\\u91cc\\u76bf \\u79d5\\u7a40 \\u7b46\\u687f \\u7b46\\u7ba1\\u9eaa \\u7b46\\u6372 \\u7b46\\u79bf\\u58a8\\u4e7e \\u7562\\u6607 \\u5e87\\u91cc\\u725b\\u65af \\u5e87\\u5ed5 \\u78a7\\u773c\\u7d2b\\u9b1a \\u5f0a\\u5016 \\u58c1\\u8a8c \\u58c1\\u9418 \\u907f\\u51f6\\u5c31\\u5409 \\u907f\\u51f6\\u8da8\\u5409 \\u5b16\\u5016 \\u81c2\\u4e00\\u6372 \\u782d\\u937c \\u7de8\\u9aee \\u7de8\\u4f59 \\u7de8\\u9418 \\u97ad\\u8f9f\\u8fd1\\u88cf \\u97ad\\u8f9f\\u5165\\u88cf \\u6241\\u64ec\\u7a40\\u76dc\\u87f2 \\u8b8a\\u901f\\u687f \\u8b8a\\u8cea\\u5ca9 \\u4fbf\\u5403\\u4e7e \\u4fbf\\u8f9f \\u904d\\u4f48 \\u8fa8\\u59e6\\u8ad6 \\u8fae\\u9aee \\u6a19\\u5360 \\u6a19\\u8a8c \\u6a19\\u7dfb \\u6a19\\u8a3b \\u6a19\\u6e96 \\u6a19\\u6e96\\u5c3a\\u5bf8 \\u6a19\\u6e96\\u55ae\\u4f4d \\u6a19\\u6e96\\u687f \\u9336\\u677f \\u9336\\u5ee0 \\u9336\\u5e36 \\u9336\\u7684\\u5600\\u55d2 \\u9336\\u7684\\u6b77\\u53f2 \\u9336\\u5e97 \\u9336\\u51a0 \\u9336\\u884c \\u9336\\u6bbc \\u9336\\u5feb \\u9336\\u6b3e \\u9336\\u93c8 \\u9336\\u6162 \\u9336\\u8499\\u5b50 \\u9336\\u76e4 \\u9336\\u901f \\u9336\\u505c \\u9336\\u738b \\u8868\\u6f14 \\u8868\\u6f14\\u617e \\u9336\\u91dd \\u9336\\u8f49 \\u5f46\\u5f46\\u626d\\u626d \\u5f46\\u53e3\\u6c23 \\u5f46\\u626d \\u5f46\\u62d7 \\u5f46\\u6c23 \\u5f46\\u5f37 \\u5225\\u65e5\\u5357\\u9d3b\\u7e94\\u5317\\u53bb \\u5f46\\u7740 \\u5225\\u96bb \\u5225\\u7dfb \\u5f46\\u5634 \\u73a2\\u5ca9 \\u6ff1\\u677e\\u5e02 \\u9b22\\u9aee \\u51b0\\u6597 \\u51b0\\u78e7\\u5ca9 \\u51b0\\u5ca9 \\u9905\\u4e7e \\u7a1f\\u8986 \\u4f75\\u6848 \\u5e77\\u5305 \\u4e26\\u4e0d \\u4f75\\u4e0d\\u4f75 \\u4f75\\u7522 \\u4f75\\u6210 \\u4f75\\u9664 \\u4f75\\u5230 \\u4f75\\u758a \\u4f75\\u767c \\u4f75\\u8cfc \\u4f75\\u9aa8 \\u4f75\\u5408 \\u4f75\\u706b \\u4e26\\u80a9 \\u4f75\\u80a9\\u5b50 \\u4f75\\u517c \\u4f75\\u6372\\u6a5f \\u4f75\\u79d1 \\u4f75\\u529b \\u4f75\\u650f \\u4f75\\u540d \\u4f75\\u5165 \\u4f75\\u7d17 \\u4f75\\u541e \\u4f75\\u7db2 \\u4f75\\u7232 \\u4f75\\u7dda \\u4f75\\u4e00\\u4e0d\\u4e8c \\u4f75\\u8d13\\u62ff\\u8cca \\u4f75\\u8d13\\u6cbb\\u7f6a \\u5e77\\u5dde \\u75c5\\u7652 \\u64a5\\u7a40 \\u64a5\\u7d43 \\u6ce2\\u76ea \\u6ce2\\u723e\\u5e72 \\u6ce2\\u9aee\\u85fb \\u6ce2\\u62c9\\u514b \\u6ce2\\u91cc \\u525d\\u88fd \\u83e0\\u863f\\u4e7e \\u4f2f\\u91cc\\u514b\\u5229 \\u4f2f\\u5b43 \\u4f2f\\u4f59 \\u6cca\\u677e \\u6cca\\u677e\\u5206\\u4f48 \\u535a\\u5f59 \\u7c38\\u76ea \\u535c\\u5f81 \\u900b\\u9aee \\u88dc\\u91e6 \\u88dc\\u8a3b \\u6355\\u87f2\\u690d\\u7269 \\u6355\\u98a8\\u7e6b\\u5f71 \\u6355\\u865c\\u5ca9 \\u6355\\u5f71\\u7e6b\\u98a8 \\u54fa\\u9935 \\u4e0d\\u4f75 \\u4e0d\\u619a\\u5f37\\u79a6 \\u4e0d\\u5f14 \\u4e0d\\u8ca0\\u6240\\u6258 \\u4e0d\\u5e79 \\u4e0d\\u4e7e\\u4e0d\\u6de8 \\u4e0d\\u4e7e\\u4e0d\\u6de8\\u5403\\u4e86\\u6c92\\u75c5 \\u4e0d\\u5e72\\u5df1\\u4e8b \\u4e0d\\u4e7e\\u81a0 \\u4e0d\\u5e72\\u4f60 \\u4e0d\\u5e72\\u4ed6 \\u4e0d\\u5e72\\u5b83 \\u4e0d\\u5e72\\u5979 \\u4e0d\\u5e72\\u6211 \\u4e0d\\u7a40 \\u4e0d\\u597d\\u5e72\\u9810 \\u4e0d\\u6c23\\u5e72 \\u4e0d\\u6368 \\u4e0d\\u98df\\u4e7e\\u814a \\u4e0d\\u8a0e\\u91c7 \\u4e0d\\u901a\\u5f14\\u6176 \\u4e0d\\u754f\\u5f37\\u79a6 \\u4e0d\\u7e6b \\u4e0d\\u8b9a \\u4e0d\\u4f54 \\u4e0d\\u5360\\u5409\\u51f6 \\u4e0d\\u5360\\u7b97 \\u4e0d\\u5360\\u51f6\\u5409 \\u4e0d\\u6e96 \\u4e0d\\u51c6\\u7ffb\\u5370 \\u4e0d\\u51c6\\u6c92 \\u4e0d\\u51c6\\u4f60 \\u4e0d\\u51c6\\u8ab0 \\u4e0d\\u51c6\\u4ed6 \\u4e0d\\u51c6\\u5b83 \\u4e0d\\u51c6\\u5979 \\u4e0d\\u51c6\\u554f \\u4e0d\\u51c6\\u6211 \\u4f48\\u64fa \\u5e03\\u73ed\\u5c3c\\u65af\\u74e6 \\u4f48\\u83dc \\u4f48\\u6148 \\u4f48\\u9053 \\u4f48\\u5fb7 \\u4f48\\u9632 \\u5e03\\u8986 \\u5e03\\u5e72\\u7dad\\u723e \\u4f48\\u5d17 \\u4f48\\u544a \\u5e03\\u7a40 \\u5e03\\u7a40\\u9ce5\\u9418 \\u4f48\\u5283 \\u4f48\\u6703 \\u4f48\\u6559 \\u4f48\\u666f \\u4f48\\u5c40 \\u4f48\\u6263 \\u5e03\\u62c9\\u514b \\u4f48\\u96f7 \\u5e03\\u91cc \\u5e03\\u91cc\\u65af\\u6258 \\u4f48\\u5217 \\u5e03\\u9b6f \\u5e03\\u9b6f\\u6258 \\u5e03\\u502b \\u5e03\\u502b\\u6258\\u6d77 \\u4f48\\u6eff \\u5e03\\u56ca \\u4f48\\u56ca\\u5176\\u53e3 \\u4f48\\u8b93 \\u4f48\\u6563 \\u4f48\\u54e8 \\u4f48\\u8a2d \\u4f48\\u65bd \\u4f48\\u52e2 \\u4f48\\u7f72 \\u5e03\\u6258 \\u4f48\\u7db2 \\u5e03\\u5e0c\\u7e3d\\u7d71 \\u4f48\\u4e0b \\u4f48\\u7dda \\u4f48\\u96ea \\u4f48\\u4e00\\u500b \\u4f48\\u7591\\u9663 \\u4f48\\u65bc \\u4f48\\u9663 \\u4f48\\u653f \\u4f48\\u7f6e \\u6b65\\u6b65\\u9ad8\\u6607 \\u6b65\\u6597\\u8e0f\\u7f61 \\u6b65\\u7f61\\u8e0f\\u6597 \\u64e6\\u4e7e \\u731c\\u4e09\\u5212\\u4e94 \\u7e94\\u4e0d \\u7e94\\u51fa \\u7e94\\u6b64 \\u7e94\\u6253 \\u624d\\u7576\\u66f9\\u6597 \\u7e94\\u5230 \\u7e94\\u5f97\\u5230 \\u7e94\\u5f97\\u5169\\u5e74 \\u7e94\\u7b49 \\u7e94\\u8b80 \\u7e94\\u5c0d \\u7e94\\u591a \\u7e94\\u6562 \\u624d\\u5e79 \\u7e94\\u4e7e\\u676f \\u7e94\\u4e7e\\u65f1 \\u7e94\\u4e7e\\u6de8 \\u7e94\\u4e7e\\u900f \\u7e94\\u525b \\u7e94\\u7d66 \\u7e94\\u8ddf \\u7e94\\u5920 \\u7e94\\u602a \\u7e94\\u904e\\u4f86 \\u7e94\\u904e\\u53bb \\u7e94\\u884c \\u7e94\\u597d \\u7e94\\u56de \\u7e94\\u6703 \\u7e94\\u5c07 \\u7e94\\u8b1b \\u7e94\\u958b \\u7e94\\u770b \\u7e94\\u53ef \\u7e94\\u4f86 \\u7e94\\u6599 \\u7e94\\u8cb7 \\u7e94\\u6c92 \\u7e94\\u62ff \\u624d\\u80fd \\u7e94\\u80fd\\u5920 \\u7e94\\u80fd\\u52c7\\u6562\\u8ffd \\u7e94\\u80fd\\u6709 \\u7e94\\u6d3e \\u7e94\\u8d77\\u4f86 \\u624d\\u6c23\\u7e31\\u6a6b \\u7e94\\u53bb \\u7e94\\u4e0a\\u5230 \\u7e94\\u4e0a\\u4f86 \\u7e94\\u4e0a\\u53bb \\u7e94\\u59cb \\u7e94\\u662f \\u7e94\\u9b06\\u4e0b \\u7e94\\u7b97 \\u7e94\\u7232 \\u7e94\\u4e0b\\u4f86 \\u7e94\\u4e0b\\u53bb \\u7e94\\u60f3 \\u7e94\\u50cf \\u7e94\\u4fe1 \\u7e94\\u8981 \\u624d\\u7528 \\u7e94\\u7528\\u5230 \\u7e94\\u6709 \\u7e94\\u518d \\u7e94\\u5728 \\u7e94\\u5247 \\u88c1\\u4f75 \\u88c1\\u88fd \\u91c7\\u91c7 \\u91c7\\u693d\\u4e0d\\u65b2 \\u91c7\\u5730 \\u91c7\\u8629 \\u63a1\\u98a8 \\u91c7\\u98a8\\u9304 \\u91c7\\u845b \\u63a1\\u5149 \\u91c7\\u5149\\u5256\\u749e \\u91c7\\u7ddd \\u91c7\\u53ca\\u8451\\u83f2 \\u91c7\\u862d\\u8d08\\u828d \\u91c7\\u70c8 \\u91c7\\u82d3 \\u91c7\\u7da0 \\u91c7\\u5973 \\u91c7\\u8291 \\u91c7\\u82b9 \\u91c7\\u8272 \\u91c7\\u8072 \\u91c7\\u8a69 \\u63a1\\u77f3 \\u91c7\\u77f3\\u4e4b\\u5f79 \\u91c7\\u77f3\\u4e4b\\u6230 \\u91c7\\u77f3\\u4e4b\\u6230 \\u91c7\\u83fd \\u91c7\\u982d \\u91c7\\u8587 \\u63a1\\u85aa \\u91c7\\u85aa\\u4e4b\\u75be \\u91c7\\u85aa\\u4e4b\\u6182 \\u91c7\\u8863 \\u91c7\\u9091 \\u63a1\\u88fd \\u5f69\\u7b46 \\u5f69\\u7b46\\u751f \\u7db5\\u7b46\\u751f\\u82b1 \\u7db5\\u7da2 \\u7db5\\u8239 \\u7db5\\u5e36 \\u7db5\\u7dde \\u7db5\\u9cf3 \\u7db5\\u6a13 \\u7db5\\u9e1e \\u7db5\\u5973 \\u7db5\\u724c\\u6a13 \\u7db5\\u68da \\u7db5\\u7403 \\u5f69\\u8272\\u4e16\\u754c \\u7db5\\u52dd \\u7db5\\u7dda \\u7db5\\u8863 \\u7db5\\u7e52 \\u83dc\\u4e7e \\u83dc\\u85b9 \\u8521\\u677e\\u5761 \\u8518\\u8338 \\u8518\\u7d8f \\u8518\\u6e6f \\u9910\\u677e\\u5556\\u67cf \\u9910\\u677e\\u98df\\u67cf \\u9910\\u677e\\u98f2\\u6f97 \\u9910\\u6aaf \\u6158\\u617c \\u84bc\\u9aee \\u84bc\\u672e \\u84bc\\u677e \\u85cf\\u66c6 \\u85cf\\u77c7\\u6b4c\\u5152 \\u64cd\\u7e31\\u687f \\u64cd\\u7e31\\u6aaf \\u64cd\\u4f5c\\u6aaf \\u64cd\\u4f5c\\u9418 \\u66f9\\u90c1\\u82ac \\u6f15\\u8f13 \\u8278\\u6728\\u4e30\\u4e30 \\u8349\\u83f4 \\u8349\\u8350 \\u8349\\u7c3d \\u8349\\u84c6 \\u6e2c\\u91cf\\u687f \\u6748\\u687f\\u5152 \\u8336\\u51e0 \\u8336\\u9eaa \\u8336\\u6258 \\u8336\\u5df2\\u4e7e \\u67e5\\u8988 \\u67e5\\u5831\\u8868 \\u67e5\\u8868 \\u67e5\\u4e0d\\u51fa \\u67e5\\u51fa \\u67e5\\u514c\\u514b \\u67e5\\u865f\\u81fa \\u67e5\\u56de \\u67e5\\u7372 \\u67e5\\u50f9 \\u67e5\\u5377 \\u67e5\\u514b\\u62c9 \\u67e5\\u554f\\u51fa \\u67e5\\u7121\\u5be6\\u64da \\u67e5\\u4fee \\u67e5\\u8a62\\u6aaf \\u67e5\\u627e\\u9031\\u671f \\u643d\\u7a70\\u6372\\u5152 \\u5bdf\\u8988 \\u7522\\u5f8c \\u7522\\u5f8c\\u6aa2\\u67e5 \\u7522\\u88fd \\u5277\\u677f \\u5277\\u8349 \\u5277\\u5277 \\u5277\\u8eca \\u5277\\u51fa \\u5277\\u9664 \\u5277\\u5200 \\u5277\\u5012 \\u5277\\u6389 \\u5277\\u9b25 \\u5277\\u65b7 \\u5277\\u7164 \\u5277\\u5e73 \\u5277\\u8d77 \\u5277\\u6436 \\u5277\\u7403 \\u5277\\u50b7 \\u5277\\u5c04 \\u5277\\u571f \\u5277\\u4e0b \\u5277\\u96ea \\u5277\\u5208 \\u5277\\u947f \\u8178\\u7e6b\\u819c \\u8178\\u81df \\u5690\\u904d \\u5690\\u5690 \\u5690\\u51fa \\u5690\\u5230 \\u5690\\u9ede \\u5690\\u500b \\u5690\\u76e1 \\u5690\\u4f86\\u5690\\u53bb \\u5690\\u4e86 \\u5690\\u4e86\\u5690 \\u5690\\u8d77\\u4f86 \\u5690\\u9bae \\u5382\\u90e8 \\u5531\\u5538 \\u8d85\\u57fa\\u6027\\u5ca9 \\u8d85\\u7d1a\\u76c3 \\u8d85\\u8b9a \\u671d\\u9418 \\u6f6e\\u83f8 \\u7092\\u9eaa \\u8eca\\u6597 \\u8eca\\u4f15 \\u8eca\\u88cf \\u8eca\\u91cc\\u96c5\\u8cd3\\u65af\\u514b \\u8eca\\u4ed4\\u9eaa \\u626f\\u9eaa \\u626f\\u7e34 \\u64a4\\u4f75 \\u6c89\\u7a4d\\u5ca9 \\u9673\\u6c96 \\u9673\\u6f22\\u6607 \\u9673\\u6770 \\u9673\\u934a \\u9673\\u6607 \\u9673\\u4e16\\u6770 \\u9673\\u842c\\u677e \\u9673\\u5e78 \\u9673\\u5016\\u5ada \\u9673\\u5c39\\u6770 \\u9673\\u701b\\u9418 \\u9673\\u90c1\\u79c0 \\u6668\\u9418 \\u896f\\u6258 \\u7a31\\u6b4e \\u7a31\\u8b9a \\u87f6\\u4e7e \\u6210\\u5ca9\\u4f5c\\u7528 \\u5448\\u51c6 \\u627f\\u88fd \\u4e58\\u51f6\\u5b8c\\u914d \\u79e4\\u687f \\u79e4\\u5e73\\u6597\\u6eff \\u5403\\u677f\\u5200\\u9eaa \\u5403\\u98fd\\u4e86\\u98ef\\u6490\\u7684 \\u5403\\u98fd\\u6c92\\u4e8b\\u5e79 \\u5403\\u4e0d\\u51fa \\u5403\\u4e0d\\u4e86 \\u5403\\u51fa \\u5403\\u932f\\u85e5 \\u5403\\u5f97\\u51fa \\u5403\\u5f97\\u4e86 \\u5403\\u5730\\u9762 \\u5403\\u91d8\\u677f \\u5403\\u8c46\\u4e7e \\u5403\\u98ef\\u5225\\u5fd8\\u4e86\\u7a2e\\u7a40\\u4eba \\u5403\\u98ef\\u5bb6\\u4f19 \\u5403\\u98ef\\u50a2\\u4f19 \\u5403\\u4e7e\\u918b \\u5403\\u4e7e\\u4e86 \\u5403\\u639b\\u7d61\\u5152 \\u5403\\u904e\\u9eaa \\u5403\\u5408\\u5bb6\\u6b61 \\u5403\\u5f8c\\u6094\\u85e5 \\u5403\\u56de\\u982d\\u8349 \\u5403\\u5e7e\\u7897\\u4e7e\\u98ef \\u5403\\u8591 \\u5403\\u76e1 \\u5403\\u8667\\u5c31\\u662f\\u4f54\\u4fbf\\u5b9c \\u5403\\u8667\\u4e0a\\u7576 \\u5403\\u8fa3\\u9eaa \\u5403\\u4e86 \\u5403\\u88cf\\u6252\\u5916 \\u5403\\u88cf\\u722c\\u5916 \\u5403\\u9eaa \\u5403\\u69cd\\u85e5 \\u5403\\u6572\\u624d \\u5403\\u4eba\\u87f2 \\u5403\\u4eba\\u4e00\\u500b\\u86cb\\u6069\\u60c5\\u7121\\u6cd5\\u65b7 \\u5403\\u50b7\\u4e86 \\u5403\\u5b8c\\u9eaa \\u5403\\u9592\\u98ef \\u5403\\u9592\\u8a71 \\u5403\\u7159 \\u5403\\u85e5 \\u5403\\u4e00\\u9813\\u6328\\u4e00\\u9813 \\u55ab\\u8667\\u7684\\u662f\\u4e56\\u5360\\u4fbf\\u5b9c\\u7684\\u662f\\u5446 \\u9072\\u8ff4 \\u5c3a\\u5e03\\u6597\\u7c9f \\u5c3a\\u5bf8\\u6597\\u7c9f \\u9f52\\u9aee \\u9f52\\u5371\\u9aee\\u79c0 \\u65a5\\u9e75 \\u8d64\\u7e69\\u7e6b\\u8db3 \\u8d64\\u672e \\u8d64\\u677e \\u6c96\\u9f3b \\u6c96\\u5ec1\\u6240 \\u6c96\\u8336 \\u6c96\\u6c96 \\u6c96\\u7240\\u5de5 \\u6c96\\u6de1 \\u6c96\\u6ecc \\u6c96\\u6389 \\u6c96\\u65b7 \\u6c96\\u670d \\u6c96\\u6e9d \\u885d\\u51a0 \\u885d\\u51a0\\u9aee\\u6012 \\u6c96\\u548c \\u6c96\\u61f7 \\u6c96\\u58de \\u6c96\\u6bc0 \\u6c96\\u7a4d \\u6c96\\u5291 \\u6c96\\u895f \\u6c96\\u6c7a \\u6c96\\u524b \\u6c96\\u7a7a\\u6a5f \\u6c96\\u57ae \\u6c96\\u64f4 \\u6c96\\u6dbc \\u6c96\\u6dcb\\u6d74 \\u6c96\\u9f61 \\u6c96\\u6d41 \\u6c96\\u6627 \\u6c96\\u6a21 \\u6c96\\u672b \\u6c96\\u9ed8 \\u6c96\\u5e74 \\u6c96\\u6ce1 \\u6c96\\u4eba \\u6c96\\u5f31 \\u6c96\\u7e69 \\u6c96\\u8755 \\u6c96\\u5237 \\u6c96\\u6c34 \\u6c96\\u7a05 \\u6c96\\u584c \\u6c96\\u5929 \\u6c96\\u7530 \\u6c96\\u6d17 \\u6c96\\u559c \\u6c96\\u92b7 \\u6c96\\u9704 \\u6c96\\u7009 \\u6c96\\u865b \\u6c96\\u5370 \\u6c96\\u6fa1 \\u6c96\\u5e33 \\u885d\\u5dde\\u649e\\u5e9c \\u6c96\\u8d70 \\u8202\\u7a40 \\u866b\\u90e8 \\u87f2\\u5403\\u7259 \\u62bd\\u6597 \\u62bd\\u4e7e \\u62bd\\u83f8 \\u4ec7\\u8b8e \\u4e11\\u65e6 \\u4e11\\u89d2 \\u4e11\\u5e74 \\u4e11\\u725b \\u919c\\u5974\\u5152 \\u4e11\\u65e5 \\u4e11\\u4e09 \\u4e11\\u6642 \\u4e11\\u6708 \\u5062\\u91c7 \\u7785\\u4e0b\\u9336 \\u7785\\u4e0b\\u9418 \\u81ed\\u4fb7 \\u81ed\\u71fb\\u71fb \\u51fa\\u9673\\u4f48\\u65b0 \\u51fa\\u919c \\u51fa\\u919c\\u72fc\\u85c9 \\u9f63\\u5152 \\u51fa\\u5206\\u5b50 \\u51fa\\u5bb6 \\u51fa\\u5bb6\\u4eba \\u51fa\\u5bb6\\u4eba\\u5403\\u516b\\u65b9 \\u51fa\\u53e3\\u8cbf\\u6613 \\u51fa\\u4e8b\\u60c5 \\u51fa\\u6c34\\u7ba1 \\u51fa\\u592a\\u967d \\u9f63\\u6232 \\u51fa\\u6c61\\u6ce5\\u800c\\u4e0d\\u67d3 \\u51fa\\u5f81 \\u521d\\u5f81 \\u9664\\u820a\\u4f48\\u65b0 \\u89f8\\u9b1a \\u640b\\u9eaa \\u5ddd\\u7a40 \\u5ddd\\u540e \\u50b3\\u4f48 \\u50b3\\u4f4d\\u4e8e\\u56db\\u592a\\u5b50 \\u8239\\u4f15 \\u8239\\u5b43 \\u8239\\u96bb \\u8239\\u9418 \\u9044\\u5f81 \\u4e32\\u6e38 \\u7a97\\u660e\\u51e0\\u6de8 \\u7a97\\u660e\\u51e0\\u4eae \\u7240\\u84c6 \\u95d6\\u934a \\u5275\\u7a6b \\u5275\\u9245 \\u5275\\u50b7\\u5f8c\\u58d3\\u529b \\u5275\\u610f\\u76c3 \\u5439\\u9aee \\u5439\\u4e7e \\u5439\\u9b0d \\u708a\\u81fc\\u4e4b\\u93da \\u708a\\u7159 \\u708a\\u7159\\u88ca\\u88ca \\u5782\\u9aee \\u6376\\u934a \\u6376\\u6aaf\\u62cd\\u51f3 \\u9318\\u934a \\u6625\\u6372 \\u6625\\u79cb\\u5927\\u4e00\\u7d71 \\u6625\\u7b4d\\u6012\\u767c \\u6625\\u6b66\\u91cc\\u5e9c \\u8123\\u4e7e \\u8123\\u71e5\\u820c\\u4e7e \\u8123\\u82e5\\u62b9\\u7843 \\u8123\\u82e5\\u5857\\u7843 \\u8123\\u4f3c\\u62b9\\u7843 \\u6df3\\u4e8e \\u9187\\u90c1 \\u8a5e\\u91c7 \\u8a5e\\u5f59 \\u8fad\\u91c7 \\u8fad\\u5f59 \\u6148\\u60b2\\u559c\\u6368 \\u78c1\\u88fd \\u6b64\\u4ec6\\u5f7c\\u8d77 \\u6b64\\u4fc2 \\u523a\\u8518 \\u523a\\u5e72 \\u8cdc\\u5379 \\u8525\\u8525\\u90c1\\u90c1 \\u8525\\u8591\\u849c \\u7c97\\u7ba1\\u9eaa \\u7c97\\u9e75 \\u7c97\\u9eaa \\u7c97\\u9762\\u5ca9 \\u7c97\\u88fd \\u918b\\u6817 \\u918b\\u7f48 \\u50ac\\u4f75 \\u8106\\u7a40\\u6a02 \\u6dec\\u934a \\u5b58\\u6258\\u80a1 \\u5b58\\u647a \\u5bf8\\u9aee\\u5343\\u91d1 \\u932f\\u5f69\\u93e4\\u91d1 \\u642d\\u4e7e\\u92ea \\u9054\\u6b23\\u76c3 \\u7b54\\u8986 \\u6253\\u6371 \\u6253\\u4f75 \\u6253\\u51fa \\u6253\\u51fa\\u5f14\\u5165 \\u6253\\u51fa\\u982d\\u68d2\\u5b50 \\u6253\\u7a40 \\u6253\\u9b28 \\u6253\\u7c27\\u9336 \\u6253\\u69f3\\u687f \\u6253\\u5361\\u9418 \\u6253\\u6e38\\u98db \\u6253\\u6e38\\u64ca \\u6253\\u88fd \\u6253\\u4e2d\\u4f19 \\u6253\\u9418 \\u5927\\u672c\\u9418 \\u5927\\u7b28\\u9418 \\u5927\\u75c5\\u521d\\u7652 \\u5927\\u4e0d\\u91cc\\u58eb \\u5927\\u91c7 \\u5927\\u6c96 \\u5927\\u87f2 \\u5927\\u87f2\\u4e0d\\u5403\\u4f0f\\u8089 \\u5927\\u87f2\\u5403\\u5c0f\\u87f2 \\u5927\\u4e11 \\u5927\\u6597 \\u5927\\u767c\\u6148\\u60b2 \\u5927\\u592b\\u677e \\u5927\\u9452 \\u5927\\u91d1\\u9aee\\u85b9 \\u5927\\u8721 \\u5927\\u91cc \\u5927\\u7406\\u5ca9 \\u5927\\u66c6 \\u5927\\u5229\\u9eaa \\u5927\\u9ebb\\u91cc \\u5927\\u660e\\u66c6 \\u5927\\u76ee\\u4e7e\\u9023 \\u5927\\u8f9f \\u5927\\u5343\\u4e16\\u754c \\u5927\\u9eb4 \\u5927\\u6c34\\u6c96\\u5012\\u9f8d\\u738b\\u6bbf \\u5927\\u6c34\\u6c96\\u5012\\u9f8d\\u738b\\u5edf \\u5927\\u6c34\\u6c96\\u6eba \\u5927\\u540c\\u4e16\\u754c \\u5927\\u6b66\\u5d19 \\u5927\\u54b8 \\u5927\\u578b\\u9418 \\u5927\\u51f6 \\u5927\\u8a00\\u975e\\u5938 \\u5927\\u884d\\u66c6 \\u5927\\u4e00\\u7d71\\u8a8c \\u5927\\u8b9a \\u5927\\u647a\\u5152 \\u5927\\u96bb \\u5927\\u9418 \\u5927\\u5468\\u540e \\u5927\\u5c08\\u76c3 \\u5446\\u7dfb\\u7dfb \\u902e\\u7e6b \\u4ee3\\u8868\\u4eba\\u7269 \\u4ee3\\u7c3d \\u5e36\\u9aee\\u4fee\\u884c \\u5e36\\u51f6 \\u5f85\\u8988 \\u888b\\u9336 \\u6234\\u9336 \\u6234\\u9aee\\u542b\\u9f52 \\u6234\\u7dad\\u65af\\u76c3 \\u4e39\\u8518 \\u4e39\\u5e72 \\u64d4\\u64d4\\u9eaa \\u64d4\\u5e72\\u7d00 \\u64d4\\u4ed4\\u9eaa \\u55ae\\u592b\\u96bb\\u5a66 \\u55ae\\u4f4d\\u4fe1\\u6258 \\u55ae\\u7d43 \\u55ae\\u4e8e \\u55ae\\u96bb \\u55ae\\u9031 \\u55ae\\u5b50\\u8449\\u690d\\u7269 \\u81bd\\u5927\\u5982\\u6597 \\u81bd\\u5927\\u65bc\\u5929 \\u4f46\\u5f97\\u4e00\\u7247\\u6a58\\u76ae\\u5403\\u4e14\\u83ab\\u5fd8\\u4e86\\u6d1e\\u5ead\\u6e56 \\u4f46\\u4e91 \\u5f48\\u73e0\\u6aaf \\u5f48\\u5b50\\u6aaf \\u6fb9\\u76ea \\u5679\\u5679 \\u5679\\u5679\\u5679 \\u5679\\u7684\\u4e00\\u8072 \\u5679\\u7684\\u4e00\\u97ff \\u7576\\u5bb6 \\u7576\\u5bb6\\u7e94\\u77e5\\u67f4\\u7c73\\u50f9 \\u5679\\u5577 \\u5679\\u4e00\\u8072 \\u7576\\u9031 \\u64cb\\u79a6 \\u9ee8\\u8518 \\u515a\\u61f7\\u82f1 \\u515a\\u9032 \\u515a\\u592a\\u5c09 \\u515a\\u592a\\u5c09\\u5403\\u533e\\u98df \\u515a\\u9805 \\u515a\\u9805 \\u515a\\u652f\\u66f8 \\u76ea\\u51fa \\u76ea\\u8239 \\u8569\\u8569 \\u76ea\\u76ea\\u60a0\\u60a0 \\u76ea\\u5230 \\u76ea\\u6ecc \\u76ea\\u98a8 \\u8569\\u8986 \\u76ea\\u57a2\\u6ecc\\u6c61 \\u76ea\\u5bd2 \\u8569\\u6aa2\\u903e\\u9591 \\u76ea\\u9152 \\u76ea\\u958b \\u76ea\\u53e3 \\u76ea\\u4f86\\u76ea\\u53bb \\u8569\\u6c23\\u8ff4\\u967d \\u76ea\\u97a6\\u97c6 \\u8569\\u7455\\u6ecc\\u7a62 \\u76ea\\u6f3e \\u76ea\\u60a0\\u60a0 \\u76ea\\u821f \\u53e8\\u5538 \\u6417\\u9b3c\\u5f14\\u767d \\u5012\\u516b\\u5b57\\u9b1a \\u5012\\u5538 \\u5012\\u61f8\\u6371\\u547d \\u79b1\\u5538 \\u76dc\\u9418 \\u9053\\u91cc \\u7a3b\\u7a40 \\u5f97\\u91c7 \\u5fb7\\u5e72 \\u5fb7\\u9ad8\\u800c\\u8b6d\\u4f86 \\u5fb7\\u91cc \\u5fb7\\u52dd\\u982d\\u8ff4 \\u7684\\u9418 \\u71c8\\u7db5 \\u7b49\\u9592\\u4eba\\u7269 \\u4f4e\\u76ea \\u4f4e\\u8ff4 \\u4f4e\\u50f9\\u8cb7\\u9032 \\u5600\\u55d2\\u7684\\u9336 \\u6ef4\\u4e7e \\u6ef4\\u91cc\\u8037\\u62c9 \\u6ef4\\u91cc\\u642d\\u62c9 \\u6ef4\\u91cc\\u561f\\u5695 \\u72c4\\u62c9\\u514b \\u72c4\\u5fd7\\u6770 \\u6ecc\\u76ea \\u6ecc\\u7a62\\u76ea\\u7455 \\u6ecc\\u7455\\u76ea\\u57a2 \\u6ecc\\u7455\\u76ea\\u7a62 \\u8a46\\u8b6d \\u7274\\u89f8 \\u7274\\u727e \\u62b5\\u79a6 \\u5730\\u8986\\u5929\\u7ffb \\u5730\\u585e\\u7c73\\u677e \\u5730\\u7121\\u4e09\\u91cc\\u5e73 \\u5730\\u4e00\\u6372 \\u5730\\u8a8c \\u5e1d\\u540e \\u905e\\u8ff4 \\u7b2c\\u516b\\u9f63 \\u7b2c\\u4e8c\\u9f63 \\u7b2c\\u4e5d\\u9f63 \\u7b2c\\u516d\\u9f63 \\u7b2c\\u4e03\\u9f63 \\u7b2c\\u4e09\\u9f63 \\u7b2c\\u5341\\u9f63 \\u7b2c\\u56db\\u9f63 \\u7b2c\\u4e94\\u9f63 \\u7b2c\\u4e00\\u9f63 \\u985b\\u985b\\u4ec6\\u4ec6 \\u985b\\u8986 \\u985b\\u4ec6 \\u6527\\u6527\\u4ec6\\u4ec6 \\u9ede\\u534a\\u9418 \\u9ede\\u591a\\u9418 \\u9ede\\u83f8 \\u9ede\\u9418 \\u96fb\\u9336 \\u96fb\\u8986 \\u96fb\\u9b0d\\u5200 \\u96fb\\u8166\\u6aaf \\u96fb\\u9b1a\\u5200 \\u96fb\\u9418 \\u96fb\\u5b50\\u9336 \\u96fb\\u5b50\\u9418 \\u6bbf\\u9418\\u81ea\\u9cf4 \\u5201\\u6597 \\u5201\\u59e6 \\u8c82\\u8986\\u984d \\u9d70\\u9d9a \\u9d70\\u608d \\u9d70\\u5177\\u5ea7 \\u96d5\\u6a11 \\u9d70\\u7fce \\u9d70\\u5fc3\\u96c1\\u722a \\u5f14\\u8a5e \\u5f14\\u5960 \\u540a\\u6597 \\u5f14\\u53e4 \\u5f14\\u8a6d \\u5f14\\u8cc0\\u8fce\\u9001 \\u5f14\\u9db4 \\u5f14\\u5589 \\u5f14\\u8b0a \\u5f14\\u796d \\u540a\\u8173 \\u540a\\u8173\\u5152 \\u5f14\\u8173\\u5152\\u4e8b \\u5f14\\u62f7 \\u5f14\\u5ba2 \\u5f14\\u6c11 \\u5f14\\u65d7 \\u5f14\\u6492 \\u5f14\\u55aa \\u5f14\\u66f8 \\u540a\\u6b7b \\u5f14\\u6b7b\\u554f\\u5b64 \\u5f14\\u6b7b\\u554f\\u75be \\u5f14\\u982d \\u5f14\\u6170 \\u5f14\\u6587 \\u5f14\\u554f \\u5f14\\u5b5d \\u5f14\\u5501 \\u5f14\\u5bb4 \\u5f14\\u55ad \\u5f14\\u8170\\u6492\\u8de8 \\u5f14\\u5f71 \\u540a\\u8b7d\\u6cbd\\u540d \\u5f14\\u8005\\u5927\\u6085 \\u5f14\\u7d19 \\u540a\\u9418 \\u6389\\u9aee \\u7239\\u5b43 \\u758a\\u5c64\\u5ca9 \\u8e40\\u91cc\\u8e40\\u659c \\u4e01\\u4e11 \\u4e01\\u56fa\\u751f\\u677e \\u53ee\\u5679 \\u9802\\u91dd \\u9802\\u91dd\\u6371\\u4f4f \\u8a02\\u88fd \\u91d8\\u91e6 \\u5b9a\\u88fd \\u6771\\u5009\\u91cc \\u6771\\u5e72 \\u6771\\u91cc \\u6771\\u5c71\\u91cc \\u6771\\u6607 \\u6771\\u5f81 \\u6771\\u829d\\u91ab\\u7642\\u7e6b \\u6771\\u5468 \\u6771\\u5468\\u9418 \\u9f15\\u9f15 \\u51ac\\u5b63\\u4e16\\u754c \\u8463\\u91cc\\u5e9c \\u8463\\u6c0f\\u5c01\\u9aee \\u52d5\\u76ea \\u68df\\u6a11 \\u90fd\\u6368\\u4e0b \\u6597\\u67c4 \\u6597\\u8eca \\u6597\\u57ce \\u6597\\u5132 \\u6597\\u5927 \\u6597\\u81bd \\u6597\\u7684 \\u6597\\u71c8 \\u6597\\u5e97 \\u6597\\u9813 \\u6597\\u65b9 \\u9b25\\u5206\\u5b50 \\u6597\\u5e9c \\u6597\\u6982 \\u6597\\u62f1 \\u6597\\u6831 \\u9b25\\u9b28 \\u6597\\u659b\\u4e4b\\u797f \\u6597\\u7b95 \\u6597\\u6975 \\u6597\\u9152 \\u6597\\u9152\\u96bb\\u96de \\u6597\\u5c45 \\u6597\\u7d55 \\u6597\\u9b41 \\u6597\\u7b20 \\u6597\\u91cf \\u6597\\u516d \\u6597\\u7f85\\u5927\\u9678 \\u6597\\u9580 \\u6597\\u5357 \\u9b25\\u725b \\u6597\\u725b\\u4e4b\\u9593 \\u6597\\u84ec\\u88dd \\u6597\\u7bf7 \\u6597\\u6e20 \\u6597\\u7136 \\u6597\\u5c71 \\u6597\\u7b72 \\u6597\\u6753 \\u6597\\u5347 \\u6597\\u98df \\u6597\\u5ba4 \\u6597\\u6578 \\u6597\\u85ea \\u6597\\u7c9f\\u5c3a\\u5e03 \\u6597\\u7c9f\\u56ca\\u91d1 \\u6597\\u5c3e\\u6e2f \\u6597\\u7d0b \\u6597\\u9999 \\u6597\\u5c0f\\u99ac \\u6597\\u83f8\\u7d72 \\u6597\\u9f4b \\u6597\\u5e33 \\u6597\\u6298\\u86c7\\u884c \\u6597\\u771f \\u6597\\u91cd\\u5c71\\u9f4a \\u6597\\u8f49\\u53c3\\u6a6b \\u6597\\u8f49\\u661f\\u79fb \\u6597\\u5b50 \\u8c46\\u4e7e \\u8c46\\u5e72\\u8089\\u7d72 \\u8c46\\u9eaa \\u8c46\\u7c3d \\u6bd2\\u6bad\\u6307 \\u7368\\u4f54\\u9f07\\u982d \\u8b80\\u66f8\\u4e09\\u4f59 \\u8ced\\u6aaf \\u675c\\u8001\\u8a8c\\u9053 \\u675c\\u96c5\\u91cc\\u514b \\u77ed\\u9aee \\u77ed\\u51e0 \\u77ed\\u9b1a \\u65b7\\u9aee \\u65b7\\u7d43 \\u65b7\\u7d19\\u4f59\\u58a8 \\u935b\\u934a \\u5806\\u6848\\u76c8\\u51e0 \\u5c0d\\u9336 \\u5c0d\\u647a \\u5c0d\\u6e96 \\u5c0d\\u6e96\\u9336 \\u5c0d\\u6e96\\u9418 \\u591a\\u91c7 \\u591a\\u5c64\\u8907 \\u591a\\u5403\\u591a\\u4f54 \\u591a\\u7b87 \\u591a\\u5c11\\u96bb \\u591a\\u51f6\\u5c11\\u5409 \\u591a\\u96bb \\u596a\\u76c3 \\u4fc4\\u88fd \\u984d\\u6211\\u7565\\u66c6 \\u5641\\u5fc3 \\u60e1\\u610f \\u60e1\\u610f\\u8b6d\\u8b17 \\u5641\\u5511\\u5549 \\u6069\\u540c\\u7236\\u6bcd \\u6069\\u51c6 \\u6441\\u91e6 \\u800c\\u4e91 \\u4e8c\\u6597 \\u4e8c\\u5641\\u82f1 \\u4e8c\\u7f36\\u9418\\u60d1 \\u4e8c\\u687f\\u5b50 \\u4e8c\\u91cc \\u4e8c\\u5d19 \\u4e8c\\u5b43 \\u4e8c\\u6487\\u9b0d \\u4e8c\\u624b\\u83f8 \\u4e8c\\u7d43 \\u4e8c\\u8449\\u677e \\u4e8c\\u96bb \\u4e8c\\u9031 \\u9aee\\u8fae \\u767c\\u8868 \\u767c\\u8868\\u617e \\u9aee\\u9b22 \\u767c\\u4f48 \\u767c\\u91c7\\u63da\\u660e \\u9aee\\u83dc \\u9aee\\u91f5 \\u9aee\\u5e36 \\u9aee\\u96d5 \\u9aee\\u77ed\\u5fc3\\u9577 \\u9aee\\u532a \\u9aee\\u819a \\u767c\\u8986 \\u767c\\u4e7e \\u9aee\\u6839 \\u9aee\\u7b8d \\u767c\\u5149 \\u9aee\\u5149\\u53ef\\u9451 \\u767c\\u865f \\u767c\\u865f\\u4f48\\u4ee4 \\u767c\\u7693\\u9f52 \\u9aee\\u969b \\u9aee\\u9afb \\u9aee\\u593e \\u9aee\\u7b8b \\u9aee\\u81a0 \\u9aee\\u8173 \\u9aee\\u7d50 \\u9aee\\u59d0 \\u9aee\\u7981 \\u9aee\\u6372 \\u9aee\\u5361 \\u767c\\u774f \\u9aee\\u81d8 \\u9aee\\u881f \\u9aee\\u5eca \\u9aee\\u91cf \\u9aee\\u4e82\\u91f5\\u6a6b \\u767c\\u77c7 \\u767c\\u9eaa \\u9aee\\u6f02 \\u9aee\\u59bb \\u9aee\\u5708 \\u9aee\\u5982\\u98db\\u84ec \\u9aee\\u4e73 \\u9aee\\u8272 \\u9aee\\u7d17 \\u767c\\u4e0a \\u9aee\\u4e0a\\u885d\\u51a0 \\u9aee\\u4e0a\\u6307\\u51a0 \\u9aee\\u68a2 \\u9aee\\u5f0f \\u9aee\\u98fe \\u9aee\\u68b3 \\u9aee\\u675f \\u9aee\\u971c \\u9aee\\u7d72 \\u9aee\\u5957 \\u9aee\\u633d\\u96d9\\u9afb \\u9aee\\u7db2 \\u9aee\\u7232\\u8840\\u4e4b\\u672c \\u9aee\\u5c3e \\u9aee\\u5c4b \\u9aee\\u9999 \\u9aee\\u578b \\u9aee\\u9b1a\\u6591 \\u9aee\\u9b1a\\u90fd \\u9aee\\u9b1a\\u7686 \\u9aee\\u9b1a\\u4ff1 \\u9aee\\u9b1a\\u5df2 \\u9aee\\u766c \\u9aee\\u5df2\\u971c\\u767d \\u767c\\u5f15 \\u9aee\\u5f15\\u5343\\u921e \\u9aee\\u7e93 \\u9aee\\u8e0a\\u6c96\\u51a0 \\u9aee\\u6cb9 \\u9aee\\u7c2a \\u767c\\u5c55\\u4e2d\\u570b \\u9aee\\u9577 \\u9aee\\u91dd \\u767c\\u653f\\u65bd\\u4ec1 \\u9aee\\u6307 \\u9aee\\u8cea \\u9aee\\u72c0 \\u5ee2\\u540e \\u6cd5\\u62c9\\u6258 \\u7ffb\\u8986 \\u7ffb\\u4f86\\u8986\\u53bb \\u7ffb\\u624b\\u4f5c\\u96f2\\u8986\\u624b\\u96e8 \\u7ffb\\u6aaf \\u7ffb\\u96f2\\u8986\\u96e8 \\u7169\\u8907 \\u7e41\\u8907 \\u7e41\\u9418 \\u53cd\\u5277 \\u53cd\\u6597 \\u53cd\\u53cd\\u8986\\u8986 \\u53cd\\u8986 \\u53cd\\u6372 \\u53cd\\u4e82\\u4f75 \\u8fd4\\u9084\\u5360\\u6709 \\u8fd4\\u91cc \\u8fd4\\u7167\\u56de\\u5149 \\u98ef\\u5f8c \\u98ef\\u5f8c\\u9418 \\u98ef\\u7cf0 \\u6c3e\\u6feb \\u6cdb\\u6c34 \\u6c4e\\u6c34\\u6de9\\u5c71 \\u8303\\u51b0\\u51b0 \\u8303\\u9673\\u67cf \\u8303\\u6210\\u5927 \\u8303\\u5fb7\\u683c\\u62c9\\u592b \\u8303\\u5fb7\\u6797\\u7279 \\u8303\\u5fb7\\u85a9 \\u8303\\u5fb7\\u74e6\\u8033\\u65af \\u8303\\u5fb7\\u7dad\\u5fb7 \\u8303\\u767b\\u5821 \\u8303\\u7bc4\\u4e4b\\u8f29 \\u8303\\u7518\\u8fea \\u8303\\u7db1\\u6b66 \\u8303\\u6208\\u5fb7 \\u8303\\u516c\\u5041 \\u8303\\u516c\\u5824 \\u8303\\u5149\\u7fa3 \\u8303\\u570b\\u9293 \\u8303\\u54c8\\u80fd \\u8303\\u7693\\u95d0 \\u8303\\u6d2a\\u68ee \\u8303\\u5bb6\\u8b19 \\u8303\\u5609\\u9a4a \\u8303\\u59dc \\u8303\\u9032 \\u8303\\u9756\\u7464 \\u8303\\u96ce \\u8303\\u53ef\\u6b3d \\u8303\\u5bec \\u8303\\u8821 \\u8303\\u502b\\u9435\\u8afe \\u8303\\u5c65\\u971c \\u8303\\u5c3c\\u65af\\u7279\\u9b6f\\u4f0a \\u8303\\u4f69\\u897f \\u8303\\u742a\\u6590 \\u8303\\u7dba\\u99a8 \\u8303\\u58eb\\u4e39 \\u8303\\u65af\\u5766 \\u8303\\u7279\\u723e \\u8303\\u7279\\u897f \\u8303\\u744b\\u742a \\u7bc4\\u6587 \\u8303\\u6587\\u7a0b \\u8303\\u6587\\u82b3 \\u8303\\u6587\\u864e \\u8303\\u6587\\u703e \\u8303\\u6587\\u85e4 \\u8303\\u6587\\u540c \\u8303\\u6587\\u7167 \\u8303\\u6587\\u6b63\\u516c \\u8303\\u6e58\\u6684 \\u8303\\u5c0f\\u59d0 \\u8303\\u66c9\\u8431 \\u8303\\u7b71\\u68b5 \\u8303\\u6b23\\u59a4 \\u8303\\u967d \\u8303\\u66c4 \\u8303\\u9038\\u81e3 \\u8303\\u589e \\u8303\\u5f35\\u96de\\u9ecd \\u8303\\u6b63\\u7965 \\u8303\\u7e54\\u6b3d \\u8303\\u690d\\u8c37 \\u8303\\u690d\\u5049 \\u8303\\u5fd7\\u6bc5 \\u8303\\u4ef2\\u6df9 \\u65b9\\u4fbf\\u9eaa \\u65b9\\u7e94 \\u65b9\\u51e0 \\u65b9\\u91cc \\u65b9\\u5cb3 \\u65b9\\u8a8c \\u9632\\u98b1 \\u9632\\u79a6 \\u5f77\\u5f7f \\u4eff\\u88fd \\u653e\\u61de\\u6399 \\u653e\\u9b06 \\u653e\\u677e\\u7ba1\\u5236 \\u98db\\u82bb\\u8f13\\u7c92 \\u98db\\u82bb\\u8f13\\u7ce7 \\u98db\\u82bb\\u8f13\\u7c9f \\u98db\\u884c\\u9418 \\u98db\\u6a11 \\u98db\\u7ce7\\u8f13\\u79e3 \\u98db\\u6607 \\u98db\\u7d2e \\u98db\\u5f81 \\u975e\\u7c3d\\u4e0d\\u53ef \\u975e\\u6e38\\u96e2\\u8f3b\\u5c04\\u50b7\\u5bb3 \\u83f2\\u6368\\u723e \\u80a5\\u7682 \\u80a5\\u7682\\u835a \\u80a5\\u7682\\u5267 \\u80a5\\u7682\\u4e1d \\u80a5\\u7b51\\u65b9\\u8a00 \\u80ba\\u81df \\u5ee2\\u540e \\u8cbb\\u723e\\u5e72\\u7d0d \\u8cbb\\u91cc\\u514b\\u65af \\u5206\\u534a\\u9418 \\u5206\\u4f48 \\u5206\\u591a\\u9418 \\u5206\\u9418 \\u5206\\u5b50\\u9418 \\u711a\\u71ec \\u7c89\\u9762 \\u7c89\\u9762\\u7843\\u8123 \\u7cde\\u7a62\\u884a\\u9762 \\u4e30\\u6a19 \\u4e30\\u91c7 \\u8c50\\u57ce \\u8c50\\u57ce\\u8cab\\u6597 \\u4e30\\u5ea6 \\u4e30\\u60c5 \\u4e30\\u8338 \\u4e30\\u5bb9 \\u4e30\\u82e5\\u6709\\u808c\\u67d4\\u82e5\\u7121\\u9aa8 \\u4e30\\u795e \\u8c50\\u6eaa\\u91cc \\u4e30\\u5100 \\u4e30\\u5100 \\u4e30\\u97fb \\u4e30\\u97fb \\u4e30\\u59ff \\u98a8\\u91c7 \\u98a8\\u6597 \\u98a8\\u4e7e \\u98a8\\u98b3 \\u98a8\\u540e \\u98a8\\u6372 \\u98a8\\u5165\\u677e \\u98a8\\u571f\\u8a8c \\u98a8\\u7269\\u8a8c \\u98a8\\u96f2\\u4eba\\u7269 \\u5c01\\u540e \\u5c01\\u59bb\\u5ed5\\u5b50 \\u98a8\\u91c7 \\u5cef\\u8ff4 \\u8451\\u83f2\\u4e4b\\u91c7 \\u8702\\u540e \\u9022\\u51f6\\u5316\\u5409 \\u7e2b\\u88fd \\u9cf3\\u7687\\u4e8e\\u871a \\u9cf3\\u51f0\\u4e8e\\u871a \\u9cf3\\u53f0 \\u9cf3\\u5c3e\\u677e \\u9cf3\\u5360 \\u5949\\u5e72 \\u5949\\u516c\\u524b\\u5df1 \\u4f5b\\u91cc\\u7279 \\u4f5b\\u66c6 \\u4f5b\\u7f85\\u91cc\\u9054 \\u4f5b\\u9418 \\u4f15\\u529b \\u4f15\\u5f79 \\u819a\\u9aee \\u5f17\\u88cf\\u5f97\\u88cf\\u5e0c \\u5f17\\u91cc\\u5fb7\\u91cc\\u5e0c \\u5f17\\u91cc\\u6566 \\u5f17\\u91cc\\u66fc \\u4f0f\\u51e0 \\u4f0f\\u5c4d\\u6d41\\u8840 \\u6276\\u5e7c\\u9031 \\u6276\\u4f59 \\u62c2\\u76ea \\u62c2\\u9b1a \\u62c2\\u9418\\u7121\\u8072 \\u670d\\u98fe\\u9031 \\u670d\\u52d9\\u6aaf \\u670d\\u88dd\\u9031 \\u6d6e\\u6a11 \\u6d6e\\u7c3d \\u6d6e\\u6258 \\u6d6e\\u6e38 \\u7b26\\u91c7 \\u798f\\u751f\\u4e8e\\u5fae \\u798f\\u5ed5 \\u64ab\\u5c4d \\u64ab\\u5c38\\u615f\\u54ed \\u64ab\\u677e \\u64ab\\u5379 \\u8151\\u81df \\u8150\\u4e7e \\u7236\\u6bcd\\u5728\\u4e0d\\u9060\\u6e38 \\u8ca0\\u5716\\u4e4b\\u6258 \\u5a66\\u4eba\\u751f\\u9b1a \\u9644\\u81bb\\u9010\\u81ed \\u9644\\u81bb\\u9010\\u7a62 \\u9644\\u81bb\\u9010\\u8165 \\u9644\\u8a3b \\u8986\\u6309 \\u8986\\u6557 \\u8986\\u676f \\u8986\\u88ab \\u8907\\u672c \\u8907\\u6bd4 \\u8986\\u5e87\\u4e4b\\u6069 \\u8986\\u853d \\u8907\\u58c1 \\u8907\\u8b8a\\u51fd\\u6578 \\u8986\\u74ff \\u8907\\u6e2c \\u8907\\u67e5 \\u8907\\u67e5 \\u8986\\u8eca \\u8907\\u7a31 \\u8986\\u6210 \\u8986\\u5448 \\u8986\\u5e6c \\u8907\\u8a5e \\u8907\\u6b21 \\u8907\\u9053 \\u8986\\u96fb \\u8986\\u9f0e \\u8907\\u5c0d\\u6578 \\u5fa9\\u767c \\u8907\\u767c\\u7387 \\u8907\\u767c\\u6027 \\u8907\\u65b9 \\u8907\\u80a5 \\u8907\\u5206\\u89e3 \\u8907\\u5206\\u6578 \\u8907\\u5206\\u6790 \\u8907\\u8f14\\u97f3 \\u8907\\u5fa9 \\u8986\\u84cb \\u8907\\u95a3 \\u8907\\u5171\\u8edb \\u8907\\u679c \\u8986\\u6d77\\u79fb\\u5c71 \\u8986\\u91a2 \\u8986\\u51fd \\u8907\\u51fd\\u6578 \\u8907\\u5408 \\u8907\\u8988 \\u5fa9\\u5a5a \\u8907\\u5a5a\\u5236 \\u8907\\u57fa\\u56e0 \\u8907\\u6aa2 \\u8986\\u91ac\\u74ff \\u8986\\u8549\\u5c0b\\u9e7f \\u8907\\u53e5 \\u8907\\u6c7a \\u8986\\u8ecd \\u8907\\u5229 \\u8907\\u5217 \\u8907\\u6d41 \\u8986\\u9e7f\\u5c0b\\u8549 \\u8986\\u9e7f\\u907a\\u8549 \\u8986\\u9732 \\u8986\\u5192 \\u8986\\u6c92 \\u8986\\u6ec5 \\u8907\\u540d \\u8986\\u547d \\u8907\\u755d\\u73cd \\u8907\\u76ee \\u8986\\u5893 \\u8986\\u9006 \\u8907\\u62cd\\u5b50 \\u8986\\u76e4 \\u8986\\u76c6 \\u5fa9\\u8f9f \\u8907\\u983b \\u8907\\u54c1\\u724c \\u8907\\u5e73\\u9762 \\u8907\\u8a55 \\u8907\\u9322 \\u8986\\u53bb\\u7ffb\\u4f86 \\u8907\\u4ede\\u5e74\\u5982 \\u8907\\u8966 \\u8907\\u8cfd \\u8907\\u8272 \\u8986\\u4e0a \\u8907\\u5be9 \\u8907\\u5f0f \\u8907\\u8a66 \\u8907\\u8996 \\u8907\\u8ff0 \\u8907\\u6578 \\u8986\\u6c34 \\u8907\\u8aa6 \\u5fa9\\u7526 \\u8986\\u6587 \\u8907\\u7fd2 \\u8907\\u7dda \\u8907\\u76f8\\u95dc \\u8986\\u6821 \\u8907\\u5beb \\u8986\\u4fe1 \\u8907\\u59d3 \\u8907\\u9078 \\u8907\\u7a74 \\u8907\\u5faa\\u74b0\\u767c\\u96fb \\u8907\\u8a13 \\u8907\\u9e7d \\u8907\\u773c \\u8907\\u9a57 \\u8907\\u8449 \\u8907\\u4ee5\\u767e\\u842c \\u8907\\u8b70 \\u8907\\u610f \\u8907\\u97f3 \\u8907\\u5370 \\u8907\\u7528 \\u8986\\u76c2 \\u8986\\u96e8\\u7ffb\\u96f2 \\u8986\\u80b2 \\u5fa9\\u5143 \\u8907\\u5143\\u97f3 \\u5fa9\\u54e1 \\u8907\\u54e1\\u8ecd\\u4eba \\u8907\\u95b1 \\u8907\\u97fb \\u8907\\u96dc \\u8986\\u8f09 \\u8986\\u5728 \\u8986\\u5e33 \\u8986\\u8f4d \\u8907\\u8a3a \\u8907\\u6b96\\u76ee \\u8907\\u6b96\\u5438\\u87f2 \\u8907\\u88fd \\u8907\\u7a2e \\u8986\\u821f \\u8986\\u4f4f \\u5fa9\\u5b50\\u660e\\u8f9f \\u8907\\u5b57\\u9375 \\u8986\\u5b97 \\u8907\\u7d9c\\u8a9e \\u8986\\u9917 \\u5085\\u91cc\\u8449 \\u5085\\u52fb\\u4f59 \\u5bcc\\u91cc \\u8986\\u96e8\\u7ffb\\u96f2 \\u99a5\\u90c1 \\u8a72\\u9418 \\u6539\\u5538 \\u6539\\u7c3d \\u809d\\u81df \\u625e\\u79a6 \\u687f\\u79e4 \\u687f\\u5200 \\u687f\\u83cc \\u687f\\u8335 \\u687f\\u76f4 \\u687f\\u72c0 \\u8d95\\u9eaa\\u68cd \\u8d95\\u88fd \\u6562\\u6597\\u4e86\\u81bd \\u6a44\\u6b16\\u5ca9 \\u64c0\\u9eaa \\u4e7e\\u963f\\u5976 \\u5e72\\u7919 \\u4e7e\\u71ac \\u4e7e\\u5df4 \\u4e7e\\u7238 \\u4e7e\\u767d \\u4e7e\\u676f \\u4e7e\\u8c9d \\u4e7e\\u7e43 \\u4e7e\\u903c \\u4e7e\\u7178 \\u5e72\\u6241\\u8c46\\u89d2 \\u4e7e\\u765f \\u4e7e\\u51b0 \\u4e7e\\u525d\\u525d \\u5e79\\u4e0d \\u4e7e\\u4e0d\\u4e7e\\u676f \\u4e7e\\u4e0d\\u4e7e\\u6de8 \\u4e7e\\u5e03 \\u4e7e\\u64e6 \\u4e7e\\u6750 \\u4e7e\\u83dc \\u4e7e\\u8349 \\u4e7e\\u8336\\u9322 \\u4e7e\\u67f4 \\u4e7e\\u7522 \\u4e7e\\u5531 \\u4e7e\\u7092\\u725b\\u6cb3 \\u5e72\\u57ce \\u4e7e\\u6c60 \\u4e7e\\u82bb \\u4e7e\\u8328\\u81d8 \\u4e7e\\u6b64\\u676f \\u4e7e\\u6b64\\u7f48 \\u4e7e\\u918b \\u4e7e\\u8106 \\u4e7e\\u6751\\u6c99 \\u4e7e\\u6253\\u96f7 \\u4e7e\\u6253\\u58d8 \\u4e7e\\u65e6 \\u5e79\\u5f97 \\u4e7e\\u5f97\\u5f88 \\u4e7e\\u5f97\\u5169\\u676f \\u4e7e\\u5f97\\u4e09\\u676f \\u4e7e\\u5f97\\u4e00\\u676f \\u4e7e\\u7684 \\u4e7e\\u71c8\\u76de \\u4e7e\\u7b49 \\u4e7e\\u77aa\\u773c \\u4e7e\\u5730 \\u4e7e\\u5f1f \\u4e7e\\u9ede \\u4e7e\\u96fb \\u4e7e\\u540a\\u7740\\u4e0b\\u5df4 \\u5e79\\u6389 \\u4e7e\\u6389\\u90a3\\u676f \\u4e7e\\u6389\\u90a3\\u7897 \\u4e7e\\u6389\\u4e00\\u676f \\u4e7e\\u6389\\u4e00\\u74f6 \\u4e7e\\u6389\\u4e00\\u7897 \\u4e7e\\u6389\\u9019\\u676f \\u4e7e\\u6389\\u9019\\u7897 \\u4e7e\\u7239 \\u4e7e\\u65b7 \\u4e7e\\u5152 \\u5e72\\u72af \\u4e7e\\u98ef \\u4e7e\\u80a5 \\u4e7e\\u7c89 \\u4e7e\\u4e7e \\u4e7e\\u7db1 \\u4e7e\\u7a3f \\u5e72\\u6208 \\u4e7e\\u54e5 \\u4e7e\\u6e9d \\u4e7e\\u80a1 \\u4e7e\\u5366 \\u4e7e\\u9928 \\u4e7e\\u679c \\u5e79\\u904e \\u4e7e\\u904e\\u676f \\u4e7e\\u904e\\u4e00\\u676f \\u4e7e\\u904e\\u766e \\u4e7e\\u65f1 \\u4e7e\\u568e \\u4e7e\\u865f \\u4e7e\\u8017 \\u4e7e\\u548c \\u4e7e\\u6db8 \\u4e7e\\u7d05 \\u4e7e\\u9931 \\u4e7e\\u82b1 \\u4e7e\\u56de\\u4ed8 \\u4e7e\\u5666 \\u4e7e\\u8ca8 \\u4e7e\\u970d\\u4e82 \\u4e7e\\u59ec\\u677e\\u8338 \\u4e7e\\u6025 \\u4e7e\\u5e7e\\u676f \\u4e7e\\u5e7e\\u624b \\u4e7e\\u5e7e\\u7897 \\u4e7e\\u5b63 \\u5e72\\u5c07 \\u4e7e\\u8591 \\u4e7e\\u7126 \\u4e7e\\u9175\\u6bcd \\u4e7e\\u7d50 \\u4e7e\\u59d0 \\u4e7e\\u75a5 \\u5e79\\u76e1 \\u4e7e\\u76e1\\u4e00\\u676f \\u4e7e\\u76e1\\u4e00\\u58fa \\u4e7e\\u76e1\\u4e00\\u7f48 \\u4e7e\\u76e1\\u4e00\\u7897 \\u4e7e\\u4e95 \\u4e7e\\u6de8 \\u4e7e\\u6de8 \\u5e72\\u51f1\\u6587 \\u4e7e\\u54b3 \\u4e7e\\u6e34 \\u4e7e\\u523b\\u7248 \\u4e7e\\u67af \\u4e7e\\u54ed \\u4e7e\\u916a \\u5e79\\u4e86 \\u4e7e\\u4e86\\u676f \\u4e7e\\u4e86\\u9019\\u676f \\u4e7e\\u4e86\\u9019\\u7897 \\u4e7e\\u4e86\\u9019\\u4e00\\u676f \\u4e7e\\u4e86\\u9019\\u4e00\\u74f6 \\u4e7e\\u96f7 \\u4e7e\\u51b7 \\u4e7e\\u79ae \\u4e7e\\u674e\\u5b50 \\u5e72\\u9023 \\u4e7e\\u6dbc \\u4e7e\\u7ce7 \\u4e7e\\u5169\\u676f \\u4e7e\\u91cf \\u4e7e\\u6599 \\u4e7e\\u6482\\u81fa \\u4e7e\\u88c2 \\u4e7e\\u993e \\u4e7e\\u843d \\u4e7e\\u5abd \\u4e7e\\u6bdb\\u5dfe \\u4e7e\\u5192\\u7159 \\u4e7e\\u6c92 \\u4e7e\\u6885 \\u4e7e\\u59b9 \\u4e7e\\u9eaa \\u4e7e\\u7bfe\\u7247 \\u5e79\\u90a3 \\u4e7e\\u90a3\\u676f \\u4e7e\\u90a3\\u4e00\\u676f \\u5e72\\u6493 \\u5e79\\u4f60 \\u5e79\\u4f60\\u5b43 \\u4e7e\\u5b43 \\u4e7e\\u5974\\u624d \\u4e7e\\u6696 \\u4e7e\\u5973 \\u4e7e\\u5614 \\u4e7e\\u76ae\\u75c7 \\u4e7e\\u5564 \\u4e7e\\u7247 \\u4e7e\\u6487\\u4e0b \\u5e72\\u93da \\u4e7e\\u6f06 \\u4e7e\\u8654 \\u4e7e\\u55ac \\u4e7e\\u89aa \\u5e72\\u537f\\u5e95\\u4e8b \\u5e72\\u537f\\u4f55\\u4e8b \\u4e7e\\u7403\\u6eab\\u5ea6 \\u4e7e\\u6e20 \\u5e72\\u64fe \\u4e7e\\u71b1 \\u4e7e\\u71b1 \\u4e7e\\u8089 \\u4e7e\\u9859 \\u4e7e\\u6f80 \\u4e7e\\u71d2 \\u5e72\\u6d89 \\u4e7e\\u4f38\\u820c \\u4e7e\\u751f\\u6c23 \\u4e7e\\u751f\\u53d7 \\u4e7e\\u751f\\u5b50 \\u4e7e\\u5c4d \\u4e7e\\u6ebc \\u4e7e\\u6ebc\\u9aee \\u5e72\\u6642 \\u4e7e\\u5c4e\\u6a5b \\u4e7e\\u5f0f \\u4e7e\\u624b\\u6de8\\u8173 \\u4e7e\\u7626 \\u4e7e\\u6578\\u676f \\u4e7e\\u723d \\u4e7e\\u7d72 \\u4e7e\\u6b7b \\u4e7e\\u95e5\\u5a46 \\u4e7e\\u98b1 \\u4e7e\\u85b9 \\u4e7e\\u7f48\\u5b50 \\u4e7e\\u5802\\u5b38 \\u4e7e\\u557c \\u4e7e\\u7530 \\u4e7e\\u900f \\u4e7e\\u5716 \\u4e7e\\u571f \\u4e7e\\u5862 \\u4e7e\\u6d17 \\u5e72\\u4fc2 \\u4e7e\\u9bae \\u4e7e\\u8c61 \\u4e7e\\u7b11 \\u4e7e\\u85aa \\u4e7e\\u6027 \\u5e72\\u4f11 \\u4e7e\\u766c \\u4e7e\\u8840\\u6f3f \\u4e7e\\u555e \\u4e7e\\u56a5 \\u4e7e\\u773c \\u4e7e\\u66dc \\u5e72\\u8b01 \\u5e79\\u4e00 \\u4e7e\\u4e00\\u676f \\u4e7e\\u4e00\\u7f48 \\u4e7e\\u4e00\\u7897 \\u4e7e\\u8863 \\u5e72\\u9091 \\u4e7e\\u766e \\u4e7e\\u786c \\u4e7e\\u53c8\\u71b1 \\u4e7e\\u9b5a \\u5e72\\u8207 \\u5e72\\u9810 \\u4e7e\\u5713\\u6f54\\u6de8 \\u4e7e\\u96f2\\u853d\\u65e5 \\u4e7e\\u9020 \\u4e7e\\u71e5 \\u4e7e\\u8e81 \\u4e7e\\u5b85 \\u4e7e\\u7ad9\\u7740 \\u4e7e\\u6298 \\u5e79\\u9019 \\u4e7e\\u9019\\u676f \\u4e7e\\u9019\\u4e00\\u676f \\u5e79\\u7740 \\u4e7e\\u7740\\u6025 \\u5e72\\u653f \\u5e72\\u652f \\u4e7e\\u652f\\u524c \\u4e7e\\u652f\\u652f \\u4e7e\\u679d \\u4e7e\\u88fd \\u4e7e\\u91cd \\u4e7e\\u5b50 \\u4e7e\\u59ca \\u4e7e\\u5750\\u7740 \\u5ca1\\u7530\\u51c6 \\u525b\\u7e94 \\u525b\\u4e7e \\u92fc\\u91e6 \\u92fc\\u6a11 \\u92fc\\u88fd \\u6e2f\\u88fd \\u69d3\\u687f \\u69d3\\u687f \\u9ad8\\u67cf\\u677e \\u9ad8\\u51e0 \\u9ad8\\u9e97\\u8518 \\u9ad8\\u826f\\u8591 \\u9ad8\\u6e05\\u613f \\u9ad8\\u90c1\\u6de8 \\u9ad8\\u653f\\u6607 \\u9ad8\\u9031\\u6ce2 \\u7cd5\\u4e7e \\u54af\\u5679 \\u54e5\\u91cc \\u5272\\u6368 \\u6b4c\\u540e \\u6b4c\\u9418 \\u683c\\u91cc \\u683c\\u91cc\\u9ad8\\u5229\\u66c6 \\u683c\\u91cc\\u66c6 \\u683c\\u5217\\u9ad8\\u5229\\u66c6 \\u9694\\u9031 \\u845b\\u91cc\\u82ac \\u845b\\u7f85\\u6258\\u65af\\u57fa \\u845b\\u65af\\u8303\\u6851 \\u500b\\u5225\\u6559\\u5b78 \\u7b87\\u820a \\u500b\\u4eba\\u96fb\\u8166 \\u500b\\u4eba\\u6d88\\u8cbb \\u7b87\\u4e2d \\u500b\\u9418 \\u5404\\u985e\\u9418 \\u5404\\u91cc \\u5404\\u7c3d \\u6839\\u9b1a \\u6839\\u83f8 \\u8ddf\\u6597 \\u8015\\u7a6b \\u9abe\\u6734 \\u66f4\\u5f85\\u5e72\\u7f77 \\u66f4\\u9418 \\u5de5\\u6b32\\u5584\\u5176\\u4e8b \\u5de5\\u7dfb \\u516c\\u4f48 \\u516c\\u6597 \\u516c\\u91cc \\u516c\\u66c6 \\u516c\\u8a8d\\u6703\\u8a08\\u51c6 \\u516c\\u5b6b\\u4e11 \\u516c\\u4ed4\\u9eaa \\u516c\\u5236\\u55ae\\u4f4d \\u529f\\u7dfb \\u5bae\\u88cf \\u5bae\\u91cc\\u85cd \\u62f1\\u6258 \\u5171\\u5277 \\u5171\\u548c\\u66c6 \\u5171\\u540c\\u7ba1\\u9053 \\u5171\\u79a6\\u5916\\u4fae \\u8ca2\\u83f8 \\u4f9b\\u88fd \\u72d7\\u91e6 \\u72d7\\u5b43\\u990a\\u7684 \\u72d7\\u5360\\u99ac\\u5751 \\u8cfc\\u4f75 \\u8cfc\\u8cb7\\u617e \\u5495\\u5495\\u9418 \\u6cbd\\u540d\\u5e72\\u8b7d \\u5b64\\u5f81 \\u8f9c\\u6fc2\\u677e \\u53e4\\u8e5f \\u53e4\\u91cc\\u53e4\\u602a \\u53e4\\u5207\\u91cc \\u53e4\\u66f8\\u4e91 \\u53e4\\u66f8\\u4e91 \\u53e4\\u7d43 \\u53e4\\u8a9e\\u4e91 \\u53e4\\u4e91 \\u53e4\\u9418 \\u7a40\\u6c28\\u9178 \\u8c37\\u6c28\\u91af\\u80fa \\u7a40\\u4fdd\\u5bb6\\u5546 \\u7a40\\u5009 \\u7a40\\u8259 \\u7a40\\u8349 \\u7a40\\u5834 \\u7a40\\u65e6 \\u7a40\\u9053 \\u7a40\\u7c89 \\u7a40\\u98a8 \\u7a40\\u572d \\u7a40\\u8cb4\\u9913\\u8fb2 \\u7a40\\u8cb4\\u9913\\u8fb2\\u7a40\\u8ce4\\u50b7\\u8fb2 \\u7a40\\u8ce4\\u50b7\\u8fb2 \\u7a40\\u7ce0 \\u7a40\\u6bbc \\u8c37\\u53e3 \\u8c37\\u53e3\\u8015\\u5ca9 \\u7a40\\u985e \\u7a40\\u7c92 \\u7a40\\u6881 \\u7a40\\u7c73 \\u7a40\\u82d7 \\u7a40\\u76ae \\u7a40\\u4eba \\u7a40\\u65e5 \\u7a40\\u795e \\u7a40\\u98df \\u7a40\\u7a57 \\u7a40\\u7269 \\u7a40\\u96e8 \\u7a40\\u5b50 \\u80a1\\u6144 \\u80a1\\u6817\\u819a\\u7c9f \\u9aa8\\u5e79\\u5206\\u5b50 \\u9aa8\\u7070\\u7f48 \\u9aa8\\u7f48 \\u9aa8\\u982d\\u88cf\\u6399\\u51fa\\u4f86\\u7684\\u9322\\u7e94\\u505a\\u5f97\\u8089 \\u9f13\\u76ea \\u9f13\\u8b5f \\u9dbb\\u5d19\\u541e\\u68d7 \\u6545\\u91cc \\u6545\\u4e91 \\u9867\\u85c9 \\u98b3\\u5927\\u98a8 \\u98b3\\u5012 \\u98b3\\u5f97 \\u98b3\\u98a8 \\u522e\\u9b0d \\u98b3\\u4e86 \\u98b3\\u8d77 \\u98b3\\u53bb \\u522e\\u9b1a \\u98b3\\u96ea \\u98b3\\u7740 \\u98b3\\u8d70 \\u5be1\\u617e \\u639b\\u9336 \\u639b\\u6597 \\u639b\\u51a0 \\u639b\\u51a0\\u6b78\\u91cc \\u639b\\u89d2\\u8b80\\u66f8 \\u639b\\u66c6 \\u639b\\u9eaa \\u639b\\u9418 \\u67fa\\u68d2 \\u67fa\\u68cd \\u67fa\\u6756 \\u67fa\\u5b50 \\u602a\\u91cc\\u602a\\u6c23 \\u95dc\\u5f13\\u8207\\u6211\\u786e \\u95dc\\u4fc2 \\u95dc\\u5cb3 \\u95dc\\u5f81 \\u89c0\\u5149\\u9031 \\u89c0\\u8449\\u690d\\u7269 \\u5b98\\u5730\\u7232\\u5bc0 \\u5b98\\u66c6 \\u5b98\\u51c6 \\u9928\\u7a40 \\u7ba1\\u9053\\u6607 \\u7ba1\\u7d43 \\u51a0\\u8ecd\\u76c3 \\u51a0\\u5191 \\u704c\\u88fd \\u5149\\u91c7 \\u5149\\u687f \\u5149\\u9e75\\u77f3 \\u5149\\u7dfb\\u7dfb \\u54a3\\u5679 \\u5ee3\\u4f48 \\u5e7f\\u90e8 \\u5ee3\\u6368 \\u6b78\\u4f75 \\u7845\\u8cea\\u5ca9 \\u7678\\u4e11 \\u67dc\\u67f3 \\u6ac3\\u6aaf \\u8cb4\\u4ef7 \\u6842\\u5713\\u4e7e \\u6842\\u4ed4\\u4e91 \\u90ed\\u91c7\\u6f54 \\u90ed\\u677e\\u71fe \\u90ed\\u5b50\\u4e7e \\u934b\\u4f19 \\u570b\\u969b\\u6f2b\\u904a\\u64a5\\u63a5\\u670d\\u52d9 \\u570b\\u66c6 \\u570b\\u7acb\\u81fa\\u7063\\u5716\\u66f8\\u9928 \\u570b\\u6a11 \\u570b\\u4e4b\\u6968\\u69a6 \\u679c\\u4e7e \\u679c\\u5b50\\u4e7e \\u88f9\\u7d2e \\u904e\\u6c96 \\u904e\\u6a11 \\u904e\\u6c34\\u9eaa \\u54c8\\u91cc \\u54c8\\u91cc\\u91cc \\u9084\\u8f9f \\u6d77\\u8518 \\u6d77\\u6dc0 \\u6d77\\u4e7e \\u6d77\\u91cc \\u6d77\\u99ac\\u8ff4 \\u6d77\\u677e \\u6d77\\u9bae\\u9eaa \\u6d77\\u4e8e\\u683c\\u677e \\u6d77\\u5cb3\\u540d\\u8a00 \\u542b\\u9f52\\u6234\\u9aee \\u542b\\u6cb9\\u5ca9 \\u51fd\\u8986 \\u97d3\\u5fa9\\u6998 \\u97d3\\u570b\\u88fd \\u97d3\\u6607\\u6d19 \\u97d3\\u4f82\\u5191 \\u97d3\\u88fd \\u6f22\\u5f4c\\u767b\\u9418 \\u65f1\\u4e7e \\u65f1\\u83f8 \\u634d\\u79a6 \\u884c\\u500b\\u65b9\\u4fbf \\u884c\\u674e\\u6372 \\u884c\\u4e8b\\u66c6 \\u884c\\u842c\\u88cf\\u8def\\u52dd\\u8b80\\u842c\\u6372\\u66f8 \\u884c\\u4f63 \\u884c\\u937c \\u884c\\u937c\\u4f48\\u7dda \\u822a\\u6d77\\u66c6 \\u84bf\\u91cc \\u6beb\\u9aee \\u8c6a\\u6c23\\u5e72\\u96f2 \\u597d\\u4e0d\\u5bb9\\u6613\\u7e94 \\u597d\\u4e7e \\u597d\\u774f \\u597d\\u51f6 \\u597d\\u4e00\\u9f63 \\u865f\\u8a8c \\u7693\\u9f52\\u7843\\u8123 \\u7693\\u9aee \\u559d\\u91c7 \\u559d\\u5012\\u91c7 \\u559d\\u4e7e \\u79be\\u7a40 \\u5408\\u516b\\u5b57 \\u5408\\u4f75 \\u5408\\u6210\\u6a02\\u5668 \\u5408\\u5403 \\u95a4\\u5152 \\u95a4\\u5e9c \\u95a4\\u5bb6 \\u5408\\u66c6 \\u5408\\u7c3d \\u95a4\\u773c \\u5408\\u65bc \\u5408\\u4e8e\\u6642\\u5b9c \\u95a4\\u4e2d \\u5408\\u4f5c \\u5408\\u4f5c\\u4f19\\u4f34 \\u4f55\\u5e72 \\u4f55\\u6770\\u91d1\\u6c0f\\u75c5 \\u4f55\\u5c0f\\u6607 \\u548c\\u59e6 \\u548c\\u9eaa \\u548c\\u5e73\\u91cc \\u548c\\u7d43 \\u52be\\u7e6b \\u6cb3\\u5e72 \\u6cb3\\u88cf \\u6cb3\\u88cf\\u5b69\\u5152\\u5cb8\\u4e0a\\u5b43 \\u6cb3\\u6607\\u93ae \\u8377\\u91cc\\u6d3b \\u8988\\u4fdd \\u8988\\u5831 \\u8988\\u7de8 \\u8988\\u64a5 \\u8988\\u67e5 \\u8988\\u5b9a \\u8988\\u5c0d \\u8988\\u8986 \\u8988\\u8a08 \\u8988\\u50f9 \\u8988\\u6e1b \\u8988\\u6279 \\u8988\\u5be9 \\u8988\\u5be6 \\u8988\\u793a \\u8988\\u6536 \\u8988\\u7b97 \\u8988\\u92b7 \\u8988\\u9a57 \\u8988\\u51c6 \\u8988\\u8cc7 \\u8988\\u5b57 \\u6db8\\u4e7e \\u8cc0\\u540e\\u7f75\\u6bbf \\u8d6b\\u5f17\\u91cc\\u5e0c \\u9db4\\u5f14 \\u9db4\\u9aee \\u9db4\\u9aa8\\u677e\\u59ff \\u9ed1\\u6697\\u4e16\\u754c \\u9ed1\\u9aee \\u9ed1\\u4eae\\u9aee \\u9ed1\\u9eaa \\u9ed1\\u677e \\u9ed1\\u9b1a \\u9ed1\\u66dc\\u5ca9 \\u5f88\\u4e7e \\u6a6b\\u6a11 \\u70d8\\u4e7e \\u70d8\\u6258 \\u70d8\\u71fb \\u70d8\\u96f2\\u6258\\u6708 \\u70d8\\u88fd \\u5f18\\u66c6 \\u7d05\\u9aee \\u7d05\\u7e69\\u7e6b\\u8db3 \\u7d05\\u7d72\\u6697\\u7e6b \\u7d05\\u677e \\u7d05\\u9b1a\\u7da0\\u773c \\u7d05\\u8449 \\u7d05\\u8449\\u76c3 \\u7d05\\u9418 \\u6d2a\\u8986 \\u6d2a\\u6607 \\u6d2a\\u58eb\\u6770 \\u6d2a\\u9002 \\u6d2a\\u9418 \\u9b28\\u52d5 \\u9b28\\u5925 \\u9b28\\u9b27 \\u9b28\\u7136 \\u9b28\\u5802 \\u9b28\\u7b11 \\u6f92\\u6fdb \\u5589\\u4e7e\\u820c\\u71e5 \\u540e\\u5b89\\u8def \\u5f8c\\u896c \\u540e\\u5317\\u8857 \\u540e\\u5e1d \\u540e\\u9aee\\u5ea7 \\u540e\\u5983 \\u540e\\u8c50 \\u540e\\u8c50 \\u540e\\u51a0 \\u540e\\u6d77\\u7063 \\u540e\\u6d77\\u7063 \\u540e\\u7687 \\u540e\\u7a37 \\u540e\\u89d2 \\u540e\\u8857 \\u540e\\u91cc \\u5f8c\\u5b43 \\u540e\\u8f9f \\u540e\\u5e73\\u8def \\u540e\\u571f \\u540e\\u738b \\u540e\\u8f9b \\u540e\\u7fbf \\u5f8c\\u88fd \\u5f8c\\u5ea7 \\u5f8c\\u5ea7\\u7e6b \\u539a\\u6734 \\u5ffd\\u6368\\u4e0b \\u72d0\\u85c9\\u864e\\u5a01 \\u9b0d\\u78b4\\u5b50 \\u80e1\\u5403\\u6d77\\u559d \\u80e1\\u5403\\u60b6\\u7761 \\u9b0d\\u532a \\u80e1\\u6912 \\u80e1\\u6912\\u9eaa \\u80e1\\u6770 \\u80e1\\u91cc\\u80e1\\u5857 \\u9b0d\\u9aef \\u9b0d\\u68a2 \\u885a\\u8855 \\u80e1\\u6258\\u83ab \\u9b0d\\u9b1a \\u80e1\\u4e91 \\u9b0d\\u6e23 \\u9b0d\\u9aed \\u9b0d\\u5b50 \\u9d60\\u9aee \\u992c\\u53e3 \\u7cca\\u91cc\\u7cca\\u5857 \\u864e\\u76ae\\u677e \\u864e\\u9b1a \\u8b77\\u9aee \\u623d\\u6597 \\u82b1\\u83f4\\u8a5e\\u9078 \\u82b1\\u91c7 \\u82b1\\u9aee\\u8001 \\u82b1\\u5d17\\u5ca9 \\u82b1\\u9b28 \\u82b1\\u6912\\u9eaa \\u82b1\\u6372 \\u82b1\\u99ac\\u5f14\\u5634 \\u82b1\\u6258 \\u82b1\\u846f \\u82b1\\u9418 \\u5212\\u4e0d\\u4f86 \\u5212\\u8239 \\u5212\\u55ae\\u4eba\\u8247 \\u5283\\u5230 \\u5212\\u5230\\u5cb8 \\u5212\\u5230\\u6c5f\\u5fc3 \\u5283\\u5f97 \\u5212\\u5f97\\u4f86 \\u5212\\u52d5 \\u5283\\u904e \\u5212\\u904e\\u4f86 \\u5212\\u904e\\u53bb \\u5212\\u884c \\u5212\\u69f3 \\u5212\\u9032 \\u5212\\u5177 \\u5212\\u4f86 \\u5283\\u4e86 \\u5212\\u4e86\\u4e00\\u6703 \\u5212\\u9f8d\\u821f \\u5212\\u8d77 \\u5212\\u62f3 \\u5212\\u96d9\\u4eba \\u5212\\u6c34 \\u5212\\u7b97 \\u5212\\u8247 \\u5212\\u5411 \\u5283\\u4e00 \\u5212\\u4e00\\u69f3 \\u5212\\u7740 \\u5212\\u5b50 \\u5212\\u8d70 \\u83ef\\u9aee \\u83ef\\u8988 \\u83ef\\u91cc \\u83ef\\u56b4\\u9418 \\u5629\\u7684 \\u5629\\u5730 \\u5629\\u5629 \\u5629\\u5566 \\u6ed1\\u687f \\u6ed1\\u85c9 \\u756b\\u6a11\\u96d5\\u68df \\u61f7\\u9336 \\u61f7\\u9418 \\u74b0\\u904a\\u4e16\\u754c \\u63db\\u64cb\\u687f \\u63db\\u6a94\\u687f \\u63db\\u9aee \\u63db\\u96bb \\u64d0\\u7e6b \\u614c\\u91cc\\u614c\\u5f35 \\u7687\\u540e \\u7687\\u6975 \\u7687\\u6975\\u66c6 \\u7687\\u66c6 \\u7687\\u8f9f \\u9ec3\\u6771\\u6a11 \\u9ec3\\u9aee \\u9ec3\\u4e7e\\u9ed1\\u7626 \\u9ec3\\u91d1\\u9031 \\u9ec3\\u4fca\\u6770 \\u9ec3\\u66c6 \\u9ec3\\u6881 \\u9ec3\\u6a11\\u7f8e\\u5922 \\u9ec3\\u73ee\\u7b51 \\u9ec3\\u9eb4\\u6bd2\\u7d20 \\u9ec3\\u9b1a \\u9ec3\\u65ed\\u6607 \\u9ec3\\u5ca9 \\u9ec3\\u90c1\\u6db5 \\u9ec3\\u90c1\\u8339 \\u9ec3\\u80b2\\u6770 \\u9ec3\\u923a\\u7b51 \\u9ec3\\u9418 \\u9ec3\\u9418\\u8b6d\\u68c4 \\u9ec3\\u923a\\u7b51 \\u6e5f\\u6f66\\u751f\\u82f9 \\u6643\\u76ea \\u7070\\u9aee \\u7070\\u9b0d \\u7070\\u6fdb \\u8f1d\\u7da0\\u5ca9 \\u8f1d\\u9577\\u5ca9 \\u8ff4\\u907f \\u8ff4\\u98c6 \\u8ff4\\u8178 \\u56de\\u6c96 \\u8ff4\\u5e36 \\u8ff4\\u76ea \\u8ff4\\u905e\\u6027 \\u8ff4\\u98a8 \\u56de\\u8986 \\u8ff4\\u5149\\u8fd4\\u7167 \\u8ff4\\u6b78 \\u8ff4\\u8b77 \\u8ff4\\u74b0 \\u56de\\u9ec3\\u5012\\u7682 \\u8ff4\\u9b42\\u4ed9\\u5922 \\u56de\\u6559\\u6703\\u8b70\\u7d44\\u7e54 \\u56de\\u6559\\u4e16\\u754c \\u56de\\u6372 \\u8ff4\\u5eca \\u56de\\u66c6 \\u8ff4\\u6d41 \\u8ff4\\u8def \\u8ff4\\u947e \\u8ff4\\u76f2\\u74e3 \\u8ff4\\u5922 \\u8ff4\\u6e05\\u5012\\u5f71 \\u8ff4\\u5708 \\u8ff4\\u7e5e \\u56de\\u8072 \\u8ff4\\u8072\\u63a2\\u6e2c \\u8ff4\\u8aa6 \\u8ff4\\u5929 \\u8ff4\\u8155 \\u8ff4\\u6587 \\u8ff4\\u7d0b\\u91dd \\u8ff4\\u65a1 \\u8ff4\\u7fd4 \\u8ff4\\u97ff \\u8ff4\\u5411 \\u8ff4\\u5fc3 \\u8ff4\\u5f62\\u593e \\u8ff4\\u65cb \\u8ff4\\u7a74 \\u8ff4\\u96ea \\u8ff4\\u967d\\u8569\\u6c23 \\u8ff4\\u97f3 \\u8ff4\\u61c9 \\u56de\\u4f63 \\u8ff4\\u6e38 \\u8ff4\\u531d \\u8ff4\\u8f49 \\u6d04\\u95c7 \\u6d04\\u6e38 \\u8b6d\\u68c4 \\u8b6d\\u8aa3 \\u71ec\\u7280 \\u71ec\\u708e \\u8b6d\\u8b7d \\u8b6d\\u9418\\u7232\\u9438 \\u5f59\\u5831 \\u5f59\\u7de8 \\u5f59\\u96c6 \\u5f59\\u8f2f \\u5f59\\u520a \\u5f59\\u7b97 \\u5f59\\u6620 \\u5f59\\u6574 \\u5f59\\u7e3d \\u5f59\\u7e82 \\u6703\\u5f14 \\u6703\\u7c3d\\u5236\\u5ea6 \\u7e6a\\u91cc \\u7e6a\\u88fd \\u71f4\\u9eaa \\u60e0\\u91cc\\u9999 \\u6703\\u5e72\\u64fe \\u6e3e\\u6a38\\u81ea\\u7136 \\u6e3e\\u5100\\u8a3b \\u991b\\u98e9\\u9eaa \\u6d3b\\u91e6 \\u6d3b\\u585e\\u687f \\u706b\\u76c3 \\u706b\\u4f75 \\u706b\\u67f4\\u687f \\u706b\\u6210\\u5ca9 \\u706b\\u6597 \\u706b\\u70ac\\u677e \\u706b\\u7e69\\u687f \\u706b\\u4e2d\\u53d6\\u6817 \\u4f19\\u623f \\u4f19\\u4f15 \\u4f19\\u98df \\u4f19\\u982d \\u6216\\u7e6b\\u4e4b\\u725b \\u7372\\u51c6 \\u970d\\u514b\\u677e \\u970d\\u91cc \\u64ca\\u9418 \\u9951\\u8352 \\u9951\\u9949 \\u9951\\u6c11 \\u9951\\u5e74 \\u6a5f\\u8f9f \\u6a5f\\u5668\\u58d3\\u88fd \\u6a5f\\u68b0\\u9336 \\u6a5f\\u68b0\\u9418 \\u96de\\u86cb\\u88cf\\u6311\\u9aa8\\u982d \\u96de\\u86cb\\u9eaa \\u96de\\u59e6 \\u96de\\u5c38\\u725b\\u5f9e \\u96de\\u7d72 \\u96de\\u7d72\\u9eaa \\u96de\\u817f\\u9eaa \\u96de\\u96bb \\u7a4d\\u7a40 \\u7a4d\\u7a40\\u9632\\u9951 \\u7a4d\\u91d1\\u81f3\\u6597 \\u57fa\\u91cc\\u5df4\\u65af \\u57fa\\u91cc\\u862d\\u67ef \\u57fa\\u5ca9 \\u9f4e\\u5fd7\\u6c92\\u5730 \\u7b95\\u6597 \\u7a3d\\u8988 \\u6fc0\\u76ea \\u7f88\\u7e6b \\u5409\\u91cc \\u5409\\u666e\\u65af\\u5938 \\u5409\\u7530\\u677e\\u9670 \\u5409\\u51f6 \\u5409\\u51f6\\u6176\\u5f14 \\u5409\\u5360 \\u6975\\u6a02\\u4e16\\u754c \\u6025\\u5f81\\u91cd\\u6582 \\u96c6\\u4e2d\\u6258\\u904b \\u96c6\\u8a3b \\u51e0\\u6848 \\u5e7e\\u9f63 \\u51e0\\u51f3 \\u5e7e\\u687f \\u5e7e\\u4e4e\\u5b8c\\u5168 \\u51e0\\u51e0 \\u51e0\\u6de8\\u7a97\\u660e \\u6a5f\\u7387 \\u51e0\\u9762\\u4e0a \\u51e0\\u65c1 \\u5e7e\\u5339\\u99ac \\u51e0\\u4e0a \\u5e7e\\u4e16\\u7d00 \\u51e0\\u69bb \\u51e0\\u5e2d \\u51e0\\u7b75 \\u51e0\\u6905 \\u51e0\\u6756 \\u5e7e\\u96bb \\u51e0\\u5b50 \\u5df1\\u4e11 \\u87e3\\u8768\\u76f8\\u5f14 \\u810a\\u6a11 \\u8a08\\u6642\\u9336 \\u7d00\\u91cc\\u8c37 \\u7d00\\u66c6 \\u7d00\\u5ff5 \\u7d00\\u5ff5\\u9031 \\u6280\\u8853\\u55ae\\u4f4d \\u6280\\u8853\\u6f5b\\u6c34 \\u5fcc\\u83f8 \\u5b63\\u54b8 \\u8e5f\\u8e48 \\u89ac\\u5016 \\u796d\\u5f14 \\u796d\\u5c38 \\u52a0\\u6372 \\u52a0\\u62c9\\u5e72\\u9054 \\u52a0\\u91cc \\u52a0\\u7c3d \\u52a0\\u8a3b \\u4f73\\u91cc \\u50a2\\u4f19 \\u50a2\\u4ff1 \\u50a2\\u4ff1 \\u50a2\\u4ec0 \\u50a2\\u4fec \\u50a2\\u4f19 \\u5609\\u67cf\\u9686\\u91cc \\u5609\\u7a40 \\u593e\\u8a3b \\u9830\\u9b1a \\u7532\\u5191 \\u8cc8\\u540e \\u5047\\u9aee \\u8cc8\\u540e \\u50f9\\u96fb\\u5b50 \\u67b6\\u6a11 \\u67b6\\u9418 \\u5c16\\u7ba1\\u9eaa \\u59e6\\u76dc\\u90aa\\u6deb \\u59e6\\u975e \\u59e6\\u592b \\u59e6\\u4f0f \\u59e6\\u5a66 \\u59e6\\u60c5 \\u59e6\\u6bba \\u59e6\\u5c4d \\u59e6\\u901a \\u59e6\\u6c61 \\u59e6\\u51f6 \\u59e6\\u6deb \\u5805\\u7dfb \\u9593\\u4e0d\\u5bb9\\u9aee \\u8271\\u9245 \\u8271\\u82e6\\u5099\\u5690 \\u76e3\\u7e6b \\u76e3\\u88fd \\u517c\\u4f75 \\u517c\\u7c4c\\u5e77\\u9867 \\u517c\\u5bb9\\u5e77\\u84c4 \\u517c\\u6536\\u5e77\\u84c4 \\u7b8b\\u8a3b \\u714e\\u9eaa \\u7e6d\\u6817 \\u5109\\u786e\\u4e4b\\u6559 \\u6aa2\\u8986 \\u526a\\u7db5 \\u526a\\u9aee \\u526a\\u5176\\u9aee \\u7c21\\u4f75 \\u7c21\\u671d\\u5d19 \\u7c21\\u4f59\\u664f \\u6229\\u7a40 \\u9e7c\\u6027\\u5ca9 \\u7fe6\\u7db5 \\u898b\\u8986 \\u898b\\u9452 \\u4ef6\\u9418 \\u5efa\\u7bc9\\u6a5f\\u68b0 \\u8350\\u9951 \\u8350\\u5c45 \\u8350\\u81fb \\u528d\\u687f \\u8266\\u96bb \\u9451\\u6838\\u5099\\u67e5 \\u7bad\\u687f \\u6c5f\\u91c7\\u860b \\u6c5f\\u5e72 \\u6c5f\\u4e7e\\u5340 \\u8591\\u9905 \\u8591\\u8336 \\u8591\\u6842 \\u8591\\u9084\\u662f\\u8001 \\u8591\\u9ec3 \\u8591\\u5c31\\u662f\\u8001 \\u8591\\u8fa3 \\u8591\\u8001\\u8fa3 \\u8591\\u9ebb\\u5712 \\u8591\\u672b \\u8591\\u6bcd \\u8591\\u7247 \\u8591\\u5207\\u7247 \\u8591\\u84c9 \\u8591\\u77f3\\u5e74 \\u8591\\u662f\\u8001 \\u8591\\u7d72 \\u8591\\u6e6f \\u8591\\u7cd6 \\u59dc\\u6587\\u6770 \\u59dc\\u90c1\\u7f8e \\u8591\\u6108\\u8001\\u6108\\u8fa3 \\u8591\\u8d8a\\u8001\\u8d8a\\u8fa3 \\u8591\\u6c41 \\u6bad\\u8836 \\u50f5\\u4ec6 \\u6bad\\u5c4d \\u5f4a\\u79a6 \\u734e\\u76c3 \\u4ea4\\u4f75 \\u4ea4\\u9b28 \\u6f86\\u88fd \\u81a0\\u6372 \\u7126\\u4e7e \\u7126\\u7a6b \\u7901\\u5ca9 \\u56bc\\u7a40 \\u89d2\\u91cc \\u7d5e\\u4e7e \\u77ef\\u60c5\\u5e72\\u8b7d \\u8173\\u4f15 \\u8173\\u91e6 \\u8173\\u934a \\u8173\\u75e0 \\u8173\\u8a3b \\u510c\\u5016 \\u5fbc\\u5016 \\u8f4e\\u4f15 \\u6559\\u5b78\\u9418 \\u55df\\u5401 \\u8857\\u91cc\\u8857\\u574a \\u7bc0\\u617e \\u5091\\u5f17\\u91cc\\u55ac\\u53df \\u5091\\u91cc\\u7c73 \\u5091\\u91cc\\u68ee \\u6770\\u502b \\u6770\\u7279 \\u62ee\\u636e \\u7d50\\u91c7 \\u7d50\\u7db5 \\u7d50\\u9aee \\u7d50\\u6676\\u5ca9 \\u7d50\\u91e6 \\u7d50\\u6258 \\u7d50\\u7d2e \\u622a\\u9aee \\u89e3\\u767c \\u89e3\\u9aee\\u4f6f\\u72c2 \\u89e3\\u91e6 \\u89e3\\u9234\\u7e6b\\u9234 \\u4ecb\\u4fc2\\u8a5e \\u4ecb\\u5191 \\u6212\\u83f8 \\u85c9\\u8349\\u6795\\u584a \\u85c9\\u8a5e \\u85c9\\u6b64 \\u85c9\\u7aef \\u85c9\\u69c1 \\u85c9\\u6545 \\u85c9\\u5349 \\u85c9\\u6a5f \\u85c9\\u85c9 \\u85c9\\u53e3 \\u85c9\\u5bc7\\u5175 \\u85c9\\u751a \\u85c9\\u624b \\u501f\\u6258 \\u85c9\\u4ee5 \\u85c9\\u7531 \\u85c9\\u7740 \\u85c9\\u52a9 \\u501f\\u7bb8 \\u85c9\\u7bb8\\u4ee3\\u7c4c \\u85c9\\u8cc7 \\u65a4\\u6597 \\u91d1\\u76c3 \\u91d1\\u9336 \\u91d1\\u4f2f\\u5229\\u5ca9 \\u91d1\\u6597 \\u91d1\\u9aee \\u91d1\\u88cf\\u5947 \\u91d1\\u934a \\u91d1\\u5d19\\u6eaa \\u91d1\\u99ac\\u5d19\\u9053 \\u91d1\\u9322\\u677e \\u91d1\\u6607\\u572d \\u91d1\\u5c6c\\u687f \\u91d1\\u5c6c\\u88fd \\u91d1\\u5370\\u5982\\u6597 \\u91d1\\u9418 \\u89d4\\u6597 \\u6d25\\u6a11 \\u7b4b\\u6597 \\u7dca\\u7e6b \\u7dca\\u7dfb \\u9326\\u56ca\\u4f73\\u88fd \\u5118\\u5e95\\u4e0b \\u5118\\u5920 \\u5118\\u7ba1 \\u5118\\u6559 \\u5118\\u5118 \\u5118\\u53ef \\u5118\\u5feb \\u5118\\u88cf \\u5118\\u91cf \\u5118\\u843d\\u5c3e \\u5118\\u8b93 \\u5118\\u901f \\u5118\\u5148 \\u5118\\u60f3 \\u5118\\u6027 \\u76e1\\u610f \\u5118\\u610f\\u96a8\\u5fc3 \\u5118\\u6709\\u53ef\\u80fd \\u5118\\u65e9 \\u5118\\u5b50 \\u5118\\u81ea \\u8fd1\\u65e5\\u7121\\u8b8e \\u6d78\\u88fd \\u7981\\u71ec \\u7981\\u83f8 \\u7981\\u617e \\u7d93\\u647a \\u834a\\u5c38 \\u83c1\\u82f1\\u76c3 \\u65cc\\u5379 \\u9a5a\\u6b4e \\u9a5a\\u8b9a \\u9a5a\\u9418 \\u7cbe\\u91c7 \\u7cbe\\u5947\\u91cc\\u6c5f \\u7cbe\\u88fd \\u7cbe\\u7dfb \\u9be8\\u9b1a \\u4e95\\u69a6 \\u9838\\u934a \\u666f\\u7dfb \\u8b66\\u5831\\u9418 \\u8b66\\u793a\\u9418 \\u8b66\\u4e16\\u9418 \\u8b66\\u9418 \\u6de8\\u9aee \\u6de8\\u9aee \\u656c\\u9452 \\u656c\\u8f13 \\u656c\\u83f8 \\u8fe5\\u7136\\u8ff4\\u7570 \\u63ea\\u9aee \\u63ea\\u9b1a \\u4e5d\\u7a40 \\u4e5d\\u91cc \\u4e5d\\u934a\\u6210\\u92fc \\u4e5d\\u7d2e \\u4e5d\\u96bb \\u9152\\u4e7e\\u6389 \\u9152\\u4e7e\\u76e1 \\u9152\\u4e7e\\u4e86 \\u9152\\u5e18 \\u9152\\u6c23\\u718f\\u4eba \\u9152\\u9eb4 \\u9152\\u7f48 \\u9152\\u5df2\\u4e7e \\u9152\\u6e38\\u82b1 \\u820a\\u9336 \\u820a\\u66c6 \\u820a\\u9418 \\u5c31\\u5403\\u4e7e \\u5c31\\u4fc2 \\u62d8\\u7e6b \\u5c45\\u91cc \\u4fb7\\u4fc3 \\u4fb7\\u9650 \\u5480\\u56a5 \\u8392\\u5149\\u9031 \\u8209\\u85a6\\u5f81\\u8f9f \\u8209\\u624b\\u53ef\\u91c7 \\u9245\\u8b8a \\u9245\\u984d \\u9245\\u5bcc \\u9245\\u516c \\u9245\\u5978 \\u9245\\u8266 \\u9245\\u734e \\u9245\\u6b3e \\u9245\\u8667 \\u9245\\u9e7f \\u9245\\u5546 \\u9245\\u9ecd \\u9245\\u8caa \\u9245\\u842c \\u9245\\u7d30 \\u9245\\u737b \\u9245\\u7965 \\u9245\\u91ce \\u9245\\u696d \\u9245\\u50b5 \\u9245\\u88fd \\u9245\\u8457 \\u9245\\u5b50 \\u9245\\u4f5c \\u62d2\\u83f8 \\u64da\\u69a6\\u800c\\u7aba\\u4e95\\u5e95 \\u64da\\u4e91 \\u805a\\u846f\\u96c4\\u854a \\u6372\\u5305 \\u6372\\u9905 \\u6372\\u4e0d\\u8d77 \\u6372\\u5c64\\u96f2 \\u6372\\u7e8f \\u6372\\u6210 \\u6372\\u5c3a \\u6372\\u5230 \\u6372\\u52d5 \\u6372\\u9aee \\u6372\\u98a8 \\u6372\\u92fc \\u6372\\u904e \\u6372\\u56de \\u5377\\u7532 \\u6372\\u7532\\u91cd\\u4f86 \\u6372\\u9032 \\u6372\\u958b \\u6372\\u6b3e \\u6372\\u4f86 \\u6372\\u4f86\\u6372\\u53bb \\u6372\\u6d6a \\u6372\\u4e86 \\u6372\\u7c3e \\u6372\\u650f \\u6372\\u843d\\u8449 \\u6372\\u6bdb \\u6372\\u68da \\u6372\\u92ea\\u84cb \\u6372\\u8216\\u84cb \\u6372\\u8d77 \\u6372\\u7ff9 \\u6372\\u66f2 \\u6372\\u53bb \\u6372\\u5203 \\u6372\\u5165 \\u6372\\u4e0a \\u6372\\u820c \\u6372\\u7e2e \\u6372\\u9003 \\u6372\\u7b52 \\u6372\\u5716 \\u6372\\u571f \\u6372\\u817f\\u8932 \\u6372\\u5c3e\\u7334 \\u6372\\u5438\\u4f5c\\u7528 \\u6372\\u7dda\\u5668 \\u6372\\u5fc3 \\u6372\\u8896 \\u5377\\u9b1a \\u6372\\u65cb \\u6372\\u83f8 \\u6372\\u7159\\u756b\\u7247 \\u6372\\u83f8 \\u6372\\u63da \\u6372\\u4e00\\u6372 \\u6372\\u8863\\u8896 \\u6372\\u96f2 \\u6372\\u7d19 \\u6372\\u4f4f \\u6372\\u8d70 \\u7d55\\u7de3\\u6aaf \\u8ecd\\u8266\\u5ca9 \\u541b\\u5b50\\u4e8e\\u5f79 \\u921e\\u8986 \\u921e\\u9452 \\u83cc\\u6258 \\u5580\\u62c9\\u5580\\u6258\\u706b\\u5c71 \\u5361\\u8fea\\u62c9\\u514b \\u5361\\u91cc \\u5361\\u91cc\\u7d2e\\u5fb7 \\u5361\\u6d1b\\u91cc \\u5361\\u8036\\u91cc \\u958b\\u8aa0\\u4f48\\u516c \\u958b\\u5f14 \\u958b\\u767c\\u7232 \\u958b\\u767c\\u4e2d\\u570b \\u958b\\u9b28 \\u958b\\u4f19 \\u63e9\\u4e7e \\u63e9\\u6aaf\\u62b9\\u51f3 \\u51f1\\u8fea\\u62c9\\u514b \\u51f1\\u91cc \\u93a7\\u5191 \\u520a\\u4f48 \\u770b\\u9336 \\u770b\\u4e0b\\u9336 \\u770b\\u4e0b\\u9418 \\u770b\\u9418 \\u5eb7\\u91c7\\u6069 \\u625b\\u5927\\u6a11 \\u6297\\u79a6 \\u7095\\u84c6 \\u8003\\u8988 \\u70e4\\u4e7e \\u73c2\\u91cc \\u67ef\\u91cc \\u79d1\\u6597 \\u79d1\\u6258\\u52aa \\u79d1\\u5b78\\u9eaa \\u86b5\\u4ed4\\u9eaa\\u7dda \\u53ef\\u4e7e\\u62ed \\u53ef\\u4e7e\\u98f2 \\u53ef\\u53ef\\u6258\\u6d77 \\u53ef\\u9031 \\u524b\\u8584 \\u524b\\u525d \\u514b\\u5206\\u5b50 \\u524b\\u592b \\u524b\\u6838 \\u514b\\u5df1\\u5949\\u516c \\u524b\\u524b \\u524b\\u6263 \\u514b\\u62c9\\u514b \\u514b\\u840a \\u514b\\u840a\\u67e5\\u514b \\u514b\\u91cc \\u514b\\u91cc\\u65af\\u8482\\u5b89\\u677e \\u514b\\u91cc\\u65af\\u6258 \\u514b\\u91cc\\u7279\\u514b\\u91cc\\u5cf6 \\u524b\\u843d \\u524b\\u671f \\u524b\\u65e5 \\u524b\\u55c7 \\u524b\\u6b7b \\u524b\\u661f \\u524b\\u610f \\u514b\\u539f\\u5b50 \\u524b\\u5236 \\u523b\\u534a\\u9418 \\u523b\\u591a\\u9418 \\u523b\\u9418 \\u5cc7\\u5cc7\\u5b43\\u60f9 \\u5cc7\\u91cc\\u5cf6 \\u5ba2\\u88fd\\u5316 \\u58be\\u4e01\\u76c3 \\u58be\\u8907 \\u7a7a\\u6fdb \\u7a7a\\u524d\\u7d55\\u5f8c \\u7a7a\\u524d\\u7d55\\u540e\\u5f8c \\u7a7a\\u9418 \\u6db3\\u6fdb \\u5b54\\u7ae0\\u671b\\u6597 \\u63a7\\u6372 \\u63a7\\u5236 \\u63a7\\u5236\\u687f \\u63a7\\u5236\\u6aaf \\u63a7\\u5236\\u617e \\u53e3\\u4e7e \\u53e3\\u5538 \\u53e3\\u71e5\\u8123\\u4e7e \\u53e3\\u5360 \\u53e3\\u9418 \\u53e9\\u9418 \\u91e6\\u74b0 \\u6263\\u524b \\u91e6\\u773c \\u91e6\\u91dd \\u91e6\\u5b50 \\u67af\\u4e7e \\u82e6\\u8518 \\u82e6\\u74dc\\u4e7e \\u82e6\\u9e75 \\u8932\\u91e6 \\u5938\\u8a95 \\u5938\\u723e \\u5938\\u7236 \\u5938\\u59e3 \\u5938\\u514b \\u5938\\u9e97 \\u5938\\u6bd7 \\u5938\\u4eba \\u5938\\u5bb9 \\u5938\\u7279 \\u5938\\u812b \\u8a87\\u8b9a \\u5feb\\u5403\\u4e7e \\u5feb\\u4e7e \\u5feb\\u6368\\u4e0b \\u5feb\\u901f\\u9eaa \\u72c2\\u4f75\\u6f6e \\u594e\\u677e\\u5e02 \\u5764\\u9336 \\u5d11\\u5287 \\u5d11\\u5d19 \\u5d11\\u8154 \\u5d11\\u66f2 \\u5d11\\u5c71 \\u5d11\\u8607 \\u5d11\\u8abf \\u5d11\\u5d19 \\u9ae1\\u9aee \\u6346\\u7d2e \\u7d91\\u7d2e \\u774f\\u4e4f \\u774f\\u89ba \\u774f\\u5026 \\u774f\\u610f \\u62ec\\u9aee \\u62c9\\u687f \\u62c9\\u514b\\u65bd\\u723e\\u5fb7\\u9418 \\u62c9\\u91cc \\u62c9\\u934a \\u62c9\\u9eaa \\u62c9\\u6d85\\u91cc \\u62c9\\u6607 \\u62c9\\u7e34 \\u62c9\\u7956\\u91cc \\u908b\\u91cc\\u908b\\u9062 \\u814a\\u4e4b\\u4ee5\\u7232\\u990c \\u881f\\u67e5 \\u8721\\u796d \\u8721\\u6708 \\u8fa3\\u6912\\u9eaa \\u4f86\\u8907 \\u840a\\u5f69 \\u840a\\u7db5\\u5317\\u5802 \\u840a\\u91cc\\u9054 \\u6b04\\u5e72 \\u95cc\\u5e72 \\u85cd\\u91c7\\u548c \\u85cd\\u9aee \\u85cd\\u6258\\u65af \\u7c43\\u8679\\u76c3 \\u5577\\u5679 \\u72fc\\u9910\\u864e\\u56a5 \\u72fc\\u98e7\\u864e\\u56a5 \\u72fc\\u541e\\u864e\\u56a5 \\u6d6a\\u8776\\u6e38\\u8702 \\u6d6a\\u7434\\u9336 \\u6488\\u4e7e \\u6488\\u9eaa \\u52de\\u529b\\u58eb\\u9336 \\u8001\\u95c6 \\u8001\\u9d70 \\u8001\\u6597 \\u8001\\u9d30\\u7aa9\\u88cf\\u51fa\\u9cf3\\u51f0 \\u8001\\u8591 \\u8001\\u61de \\u8001\\u5b43 \\u8001\\u723a\\u9418 \\u6a02\\u5668\\u9418 \\u6cd0\\u8986 \\u52d2\\u91cc\\u52d2\\u5f97 \\u77ad\\u89e3 \\u77ad\\u7136 \\u77ad\\u5982 \\u77ad\\u82e5\\u6307\\u638c \\u77ad\\u671b \\u96f7\\u592b\\u8303\\u6069\\u65af \\u8a84\\u8b9a \\u6dda\\u4e7e \\u51b7\\u5730\\u91cc \\u51b7\\u9eaa \\u5398\\u91d1 \\u68a8\\u4e7e \\u7055\\u6c5f \\u7055\\u7136 \\u7055\\u6c34 \\u7055\\u6e58 \\u79ae\\u6597 \\u79ae\\u8b9a \\u674e\\u4e7e\\u9f8d \\u674e\\u9023\\u6770 \\u674e\\u9023\\u6770 \\u674e\\u934a\\u798f \\u674e\\u76df\\u4e7e \\u674e\\u4e09\\u5a18 \\u674e\\u9418\\u596d \\u674e\\u937e\\u90c1 \\u674e\\u937e\\u90c1 \\u91cc\\u6602 \\u91cc\\u5967 \\u91cc\\u5305\\u6069 \\u91cc\\u8c9d\\u5229 \\u91cc\\u5e03 \\u91cc\\u7a0b \\u91cc\\u7a0b\\u9336 \\u91cc\\u9ee8 \\u91cc\\u723e \\u91cc\\u8033 \\u91cc\\u5f17\\u8cfd\\u5fb7 \\u91cc\\u6e2f \\u91cc\\u6839 \\u91cc\\u9588 \\u91cc\\u8c6a \\u91cc\\u808c \\u91cc\\u52a0 \\u91cc\\u8cc8\\u7d0d \\u91cc\\u5c45 \\u91cc\\u541b \\u91cc\\u79d1 \\u91cc\\u514b\\u7279 \\u91cc\\u6263 \\u91cc\\u62c9 \\u91cc\\u8001 \\u91cc\\u9130\\u9577 \\u91cc\\u8def \\u91cc\\u95ad \\u91cc\\u7f8e \\u91cc\\u9580 \\u91cc\\u8499\\u8afe\\u592b \\u91cc\\u6c11 \\u91cc\\u540d \\u91cc\\u7d0d \\u91cc\\u5c3c \\u91cc\\u5f04 \\u91cc\\u6b50 \\u91cc\\u5947\\u8499 \\u91cc\\u5951\\u8499 \\u91cc\\u4eba \\u91cc\\u4ec1 \\u91cc\\u820d \\u91cc\\u793e \\u91cc\\u58eb\\u6eff \\u91cc\\u6c0f \\u91cc\\u65af \\u91cc\\u8ac7\\u5df7\\u8b70 \\u91cc\\u7279\\u7dad\\u5be7\\u79d1 \\u91cc\\u74e6\\u5e7e\\u4e9e\\u689d\\u7d04 \\u91cc\\u7dad\\u62c9 \\u91cc\\u5e0c\\u7279\\u970d\\u82ac \\u91cc\\u5df7 \\u91cc\\u80e5 \\u91cc\\u4e9e \\u91cc\\u8afa \\u91cc\\u8a9e \\u91cc\\u7d04 \\u91cc\\u5bb0 \\u91cc\\u9577 \\u91cc\\u6b63 \\u91cc\\u8332 \\u7406\\u6b21\\u9aee \\u7406\\u9aee \\u7406\\u500b \\u7406\\u500b\\u9aee \\u7406\\u4e8b\\u9577\\u76c3 \\u7406\\u5b8c\\u9aee \\u7406\\u4e00\\u6b21\\u9aee \\u7406\\u4e00\\u500b\\u9aee \\u529b\\u5f81 \\u66c6\\u672c \\u66c6\\u6cd5 \\u66c6\\u7d00 \\u66c6\\u547d \\u6b77\\u53f2\\u4eba\\u7269 \\u66c6\\u59cb \\u66c6\\u5ba4 \\u66c6\\u66f8 \\u66c6\\u982d \\u66c6\\u5c3e \\u66c6\\u8c61 \\u66c6\\u7344 \\u66c6\\u5143 \\u7acb\\u65b9\\u5398\\u7c73 \\u5229\\u5f97\\u5f59 \\u5229\\u9ed8\\u91cc\\u514b \\u5229\\u6258 \\u5229\\u617e \\u701d\\u4e7e \\u5137\\u91c7 \\u6817\\u82de \\u6817\\u66b4 \\u6817\\u7206 \\u6817\\u5587 \\u6817\\u70c8 \\u6817\\u788c \\u6817\\u8272 \\u6817\\u9f20 \\u6817\\u7530\\u96c4\\u4ecb \\u6817\\u5c3e \\u6817\\u85aa \\u6817\\u947f \\u6817\\u5b50 \\u792b\\u5ca9 \\u7c92\\u8b8a\\u5ca9 \\u9023\\u687f \\u9023\\u4e09\\u4f75\\u56db \\u9023\\u7e6b \\u84ee\\u9b1a \\u806f\\u8cfd\\u76c3 \\u806f\\u7e6b \\u938c\\u5009 \\u934a\\u5ea6 \\u934a\\u92fc \\u934a\\u6c5e \\u934a\\u91d1 \\u934a\\u92c1 \\u934a\\u8ca7 \\u934a\\u5e2b \\u934a\\u9435 \\u934a\\u9285 \\u934a\\u51b6 \\u7149\\u88fd \\u934a\\u7532 \\u93c8\\u91e6 \\u934a\\u5f62 \\u934a\\u589c \\u826f\\u4ef7 \\u6dbc\\u9eaa \\u6dbc\\u84c6 \\u6a11\\u68df \\u6a11\\u67b6 \\u6a11\\u9f8d \\u6881\\u6728 \\u6a11\\u6728\\u5176\\u58de \\u6a11\\u4e0a \\u6881\\u6587\\u6c96 \\u6a11\\u67f1 \\u6a11\\u5b50 \\u5169\\u7576\\u4e00 \\u5169\\u6487\\u9b0d \\u5169\\u7d2e \\u5169\\u96bb \\u5169\\u9031 \\u4eae\\u9418 \\u667e\\u4e7e \\u907c\\u700b \\u5bee\\u5bc0 \\u71ce\\u9aee \\u6599\\u6597 \\u5ed6\\u4e8e\\u8aa0 \\u9130\\u91cc \\u6797\\u6c96 \\u6797\\u82b3\\u90c1 \\u6797\\u4e7e\\u9594 \\u6797\\u6770\\u6a11 \\u6797\\u4fca\\u6770 \\u6797\\u69ae\\u677e \\u6797\\u677e \\u6797\\u90c1\\u65b9 \\u6797\\u5360\\u6885 \\u6797\\u6b63\\u6770 \\u6797\\u9418 \\u81e8\\u6d77\\u6c34\\u571f\\u8a8c \\u6dcb\\u6c96 \\u78f7\\u9178\\u9e7d\\u5ca9 \\u9c57\\u6e38 \\u8eaa\\u85c9 \\u9748\\u8e5f \\u9748\\u8129 \\u9748\\u617e \\u6de9\\u7b56 \\u6de9\\u660c\\u7115 \\u6de9\\u99b3 \\u6de9\\u6cb3 \\u6de9\\u60e0\\u5e73 \\u51cc\\u85c9 \\u6de9\\u6fdb\\u521d \\u6de9\\u5982\\u7115 \\u6de9\\u5341\\u516b \\u6de9\\u6c0f \\u6de9\\u6c34 \\u6de9\\u7d71 \\u6de9\\u9000\\u601d \\u6de9\\u5c0f\\u59d0 \\u6de9\\u59d3 \\u51cc\\u96f2 \\u6de9\\u4e91\\u7ff0 \\u51cc\\u5fd7 \\u6de9\\u5fd7\\u7f8e \\u96f6\\u96bb \\u9818\\u91e6 \\u9818\\u6aaf \\u9818\\u8896\\u617e \\u4ee4\\u72d0\\u6c96 \\u4ee4\\u5cb3 \\u6e9c\\u9b1a \\u5289\\u5cef\\u677e \\u5289\\u677e\\u85e9 \\u5289\\u677e\\u5e74 \\u5289\\u5049\\u6770 \\u5289\\u5016\\u5982 \\u5289\\u5360\\u5409 \\u5289\\u5fd7\\u6607 \\u7559\\u9aee \\u6d41\\u4f48 \\u6d41\\u4e7e \\u6d41\\u7d0b\\u5ca9 \\u6d41\\u8840\\u6d6e\\u5c38 \\u6d41\\u8840\\u6f02\\u9e75 \\u67f3\\u658c\\u6770 \\u67f3\\u6607\\u8000 \\u516d\\u6c96 \\u516d\\u7a40 \\u516d\\u901a\\u56db\\u8f9f \\u516d\\u7d43 \\u516d\\u9b1a\\u9b8e \\u516d\\u9b1a\\u9b8e \\u516d\\u617e \\u516d\\u7d2e \\u516d\\u96bb \\u516d\\u9031 \\u9f8d\\u6372 \\u9f8d\\u8766\\u9eaa \\u9f8d\\u9b1a \\u9f8d\\u9b1a\\u9eaa \\u9f8d\\u904a \\u9f8d\\u6e38\\u6dfa\\u6c34 \\u7931\\u7a40\\u6a5f \\u93e4\\u91d1\\u932f\\u91c7 \\u6f0f\\u6597 \\u5695\\u5695\\u56cc\\u56cc \\u5695\\u56cc \\u76e7\\u8c9d\\u677e \\u76e7\\u90c1\\u4f73 \\u8606\\u84c6 \\u9e75\\u7c3f \\u9e75\\u4ee3\\u70f4 \\u9e75\\u5730 \\u9e75\\u920d \\u9e75\\u5316 \\u9e75\\u83bd \\u6ef7\\u9eaa \\u6ef7\\u725b\\u8089 \\u9e75\\u4eba \\u9e75\\u7d20 \\u6ef7\\u88fd \\u9e75\\u65cf \\u752a\\u91cc \\u9678\\u5747\\u677e \\u9678\\u6e38 \\u5f54\\u5f54 \\u9304\\u88fd \\u9e7f\\u9580\\u91c7\\u85e5 \\u8def\\u91cc \\u8def\\u8a8c \\u9732\\u8986 \\u4e82\\u9aee \\u4e82\\u9b28 \\u5d19\\u80cc \\u5d19\\u8c50\\u6751 \\u8f2a\\u8ff4 \\u8f2a\\u59e6 \\u7f85\\u6f22\\u677e \\u7f85\\u8208\\u6a11 \\u863f\\u8514 \\u863f\\u8514\\u4e7e \\u87ba\\u687f \\u87ba\\u65cb\\u9eaa \\u88f8\\u5ca9 \\u7296\\u786e \\u6d1b\\u514b\\u5e0c\\u5fb7\\u99ac\\u4e01 \\u6d1b\\u9418\\u6771\\u61c9 \\u7d61\\u816e\\u9b0d \\u843d\\u9aee \\u843d\\u816e\\u9b0d \\u843d\\u6258 \\u843d\\u8449 \\u843d\\u8449\\u677e \\u843d\\u8449\\u690d\\u7269 \\u56c9\\u56c9\\u56cc\\u56cc \\u56c9\\u56cc \\u9a62\\u8499\\u864e\\u76ae \\u95ad\\u91cc \\u5442\\u540e \\u5442\\u5b8b\\u83f8 \\u5442\\u5ca9 \\u5442\\u540e \\u90d8\\u9418 \\u634b\\u91c7 \\u92c1\\u88fd \\u5c62\\u4ec6\\u5c62\\u8d77 \\u5f8b\\u66c6\\u5fd7 \\u7da0\\u9aee \\u9ebb\\u687f \\u9ebb\\u91ac\\u9eaa \\u9ebb\\u6817\\u5761 \\u99ac\\u9336 \\u99ac\\u4e01\\u675c\\u91cc\\u8377 \\u99ac\\u4f15 \\u99ac\\u4e7e \\u99ac\\u5f8c \\u99ac\\u540e\\u7df4\\u670d \\u99ac\\u62c9\\u5df4\\u6817 \\u99ac\\u62c9\\u677e \\u99ac\\u91cc\\u5b89\\u7d0d\\u6d77\\u6e9d \\u99ac\\u91cc\\u514b \\u99ac\\u91cc\\u862d \\u99ac\\u91cc\\u5167\\u65af\\u79d1 \\u99ac\\u91cc\\u5947 \\u99ac\\u9b23\\u677e \\u99ac\\u5c3c\\u6258\\u5df4 \\u99ac\\u666e\\u6258 \\u99ac\\u65af\\u5782\\u524b \\u99ac\\u5c3e\\u677e \\u99ac\\u7d2e \\u99ac\\u5360\\u5c71 \\u78bc\\u9336 \\u99ac\\u5360\\u5c71 \\u57cb\\u4f48 \\u57cb\\u982d\\u5c0b\\u9336 \\u57cb\\u982d\\u5c0b\\u9418 \\u8cb7\\u9032\\u5c0d\\u6c96 \\u8cb7\\u83f8 \\u9081\\u79d1\\u91cc \\u9ea5\\u5361\\u6258 \\u9ea5\\u79d1\\u91cc \\u9ea5\\u6258\\u59c6 \\u8ce3\\u67fa \\u8ce3\\u59e6 \\u8108\\u5ca9 \\u9862\\u91cc\\u9862\\u9807 \\u6eff\\u5e03 \\u6eff\\u4f48\\u7591\\u96f2 \\u6eff\\u982d\\u6d0b\\u9aee \\u6eff\\u6d32\\u91cc \\u66fc\\u5c3c\\u6258\\u5df4\\u7701 \\u6162\\u56a5 \\u5fd9\\u4f75 \\u83bd\\u9e75 \\u6bdb\\u9aee \\u6bdb\\u8591 \\u6bdb\\u91cc\\u6c42\\u65af \\u6bdb\\u91cc\\u5854\\u5c3c\\u4e9e \\u8302\\u677e \\u8cbf\\u6613\\u4f19\\u4f34 \\u6c92\\u91c7 \\u6c92\\u5730\\u91cc \\u6c92\\u7239\\u6c92\\u5b43 \\u6c92\\u7cbe\\u6253\\u91c7 \\u6c92\\u91cf\\u6597 \\u6c92\\u7c3d \\u6c92\\u647a\\u81f3 \\u6885\\u4e7e \\u6885\\u91cc \\u5a92\\u4eba\\u53e3\\u7121\\u91cf\\u6597 \\u6bcf\\u96bb \\u6bcf\\u9031 \\u7f8e\\u9aee \\u7f8e\\u570b\\u88fd \\u7f8e\\u540e \\u7f8e\\u91cc \\u7f8e\\u5d19 \\u7f8e\\u88fd \\u7f8e\\u6d32\\u76c3 \\u9580\\u6597 \\u60b6\\u9336 \\u77c7\\u853d \\u61de\\u61c2 \\u8499\\u53e4\\u5927\\u592b \\u6fdb\\u9d3b \\u77c7\\u6df7 \\u77c7\\u8075 \\u77c7\\u77d3 \\u77c7\\u6627 \\u6fdb\\u6627\\u4e0d\\u6e05 \\u6fdb\\u6fdb \\u61de\\u61de\\u61c2\\u61c2 \\u77c7\\u77c7\\u9ed1 \\u77c7\\u77c7\\u4eae \\u77c7\\u77c7\\u77d3\\u77d3 \\u77c7\\u9a19 \\u77c7\\u4e8b \\u6fdb\\u6c5c \\u6fdb\\u9b06\\u96e8 \\u77c7\\u778d \\u8499\\u7279\\u5361\\u6d1b \\u77c7\\u982d \\u8499\\u6258\\u7f85\\u62c9 \\u6fdb\\u9727 \\u77c7\\u773c \\u8499\\u5728 \\u77c7\\u5728\\u9f13\\u88cf \\u61de\\u76f4 \\u77c7\\u4f4f \\u5b5f\\u5fb7\\u723e\\u677e \\u5922\\u8ff4 \\u5922\\u862d\\u53f6\\u5409 \\u5922\\u7e6b \\u5922\\u6709\\u4e94\\u4e0d\\u5360 \\u7030\\u6f2b \\u5f4c\\u77c7 \\u7030\\u7030 \\u7030\\u5c71\\u904d\\u91ce \\u8ff7\\u59e6 \\u8ff7\\u6fdb \\u7e3b\\u7e6b \\u7c73\\u5fb7\\u723e\\u4f2f\\u88cf \\u7c73\\u7a40 \\u7c73\\u91cc \\u7c73\\u9eaa \\u7955\\u88fd \\u5bc6\\u4f48 \\u5bc6\\u647a \\u5bc6\\u7dfb \\u68c9\\u88fd \\u514d\\u5191 \\u9eaa\\u9738 \\u9762\\u767d\\u7121\\u9b1a \\u9eaa\\u5305 \\u9eaa\\u9905 \\u9eaa\\u8336 \\u9eaa\\u5ee0 \\u9eaa\\u9ede \\u9eaa\\u5e97 \\u9eaa\\u574a \\u9eaa\\u80a5 \\u9eaa\\u7c89 \\u9eaa\\u7f38 \\u9eaa\\u7599\\u7629 \\u9eaa\\u9928 \\u9eaa\\u7cca \\u9eaa\\u7070 \\u9eaa\\u50f9 \\u9eaa\\u6f3f \\u9eaa\\u91ac \\u9eaa\\u9903 \\u9eaa\\u7b4b \\u9eaa\\u78bc\\u5152 \\u9eaa\\u576f\\u5152 \\u9eaa\\u76ae \\u9eaa\\u7968 \\u9eaa\\u4eba \\u9eaa\\u98df \\u9eaa\\u5851 \\u9eaa\\u6524 \\u9eaa\\u6e6f \\u9eaa\\u689d \\u9eaa\\u7cf0 \\u9eaa\\u7897 \\u9762\\u5411 \\u9762\\u56ae\\u5c0d\\u8c61\\u7684\\u6280\\u8853 \\u9762\\u56ae\\u5c0d\\u8c61\\u8a9e\\u8a00 \\u9762\\u8b7d \\u9762\\u8b7d\\u80cc\\u8b6d \\u9762\\u7682 \\u9eaa\\u6756 \\u9762\\u5b50 \\u9eaa\\u5b50\\u85e5 \\u82d7\\u6817 \\u79d2\\u9336 \\u79d2\\u9418 \\u6c11\\u653f\\u91cc \\u6c11\\u65cf\\u8a8c \\u9594\\u91c7\\u723e \\u9594\\u51f6 \\u62bf\\u9aee \\u540d\\u9336 \\u540d\\u8986\\u91d1\\u750c \\u540d\\u9304\\u670d\\u52d9 \\u660e\\u67e5\\u6697\\u8a2a \\u660e\\u7a97\\u6de8\\u51e0 \\u660e\\u7a97\\u6de8\\u51e0 \\u660e\\u8986 \\u660e\\u4f19\\u756b\\u4f9b \\u660e\\u91e6 \\u660e\\u77ad \\u9cf4\\u9418 \\u51a5\\u6de9 \\u51a5\\u6fdb \\u6e9f\\u6fdb \\u8b2c\\u8b9a \\u6478\\u9418 \\u6479\\u7d2e\\u7279 \\u6a21\\u7bc4\\u4eba\\u7269 \\u6a21\\u91cc\\u897f\\u65af \\u6a21\\u88fd \\u6469\\u6839\\u8cbb\\u91cc\\u66fc \\u6469\\u91cc\\u897f\\u65af \\u6469\\u6258 \\u78e8\\u8b8a\\u5ca9 \\u78e8\\u934a \\u78e8\\u88fd \\u9b54\\u9336 \\u9b54\\u8853\\u6578\\u5b57 \\u62b9\\u4e7e \\u83ab\\u5e72\\u5c71 \\u83ab\\u5409\\u6258 \\u83ab\\u91cc \\u83ab\\u4f59\\u6bd2\\u4e5f \\u58a8\\u76ea\\u5b50 \\u58a8\\u6597 \\u58a8\\u6c88 \\u58a8\\u700b\\u672a\\u4e7e \\u9ed8\\u5538 \\u67d0\\u96bb \\u6bcd\\u540e \\u6bcd\\u9418 \\u6728\\u6a11 \\u6728\\u5076\\u6232\\u7d2e \\u6728\\u88fd \\u6728\\u9418 \\u76ee\\u725b\\u6e38\\u5203 \\u5893\\u8a8c \\u5e55\\u5f8c\\u4eba\\u7269 \\u7a46\\u7f55\\u9ed8\\u5fb7\\u66c6 \\u62ff\\u5761\\u91cc \\u62ff\\u7834\\u5d19 \\u62ff\\u4e0b\\u9336 \\u62ff\\u4e0b\\u9418 \\u62ff\\u8cca\\u8981\\u8d13\\u62ff\\u59e6\\u8981\\u96d9 \\u54ea\\u4e00\\u9f63 \\u54ea\\u96bb \\u90a3\\u9f63\\u96fb\\u5f71 \\u90a3\\u9f63\\u597d\\u6232 \\u90a3\\u9f63\\u5287 \\u90a3\\u500b \\u90a3\\u500b\\u8c93\\u5152\\u4e0d\\u5403\\u8165 \\u90a3\\u6372 \\u90a3\\u96bb \\u7d0d\\u91c7 \\u4e43\\u91cc \\u5976\\u6372 \\u5976\\u5b43 \\u7537\\u7528\\u9336 \\u5357\\u5bae\\u9002 \\u5357\\u8ff4 \\u5357\\u4eac\\u9418 \\u5357\\u91cc \\u5357\\u5c71\\u76c3 \\u5357\\u5f81 \\u5357\\u7b51 \\u96e3\\u6371 \\u96e3\\u6368 \\u96e3\\u56a5 \\u96e3\\u5ed5 \\u9b27\\u9336 \\u9b27\\u9b28 \\u9b27\\u9418 \\u5167\\u9b28 \\u5167\\u81df \\u5167\\u88fd \\u80fd\\u6368 \\u80fd\\u5f81\\u6163\\u6230 \\u80fd\\u5f81\\u5584\\u6230 \\u5c3c\\u91c7 \\u5c3c\\u514b \\u5c3c\\u514b\\u677e \\u6ce5\\u7070\\u5ca9 \\u6ce5\\u5ca9 \\u6ce5\\u8cea\\u5ca9 \\u502a\\u55e3\\u6c96 \\u64ec\\u88fd \\u4f60\\u7e94\\u5b50\\u767c\\u660f \\u4f60\\u6597\\u4e86\\u81bd \\u4f60\\u4fc2 \\u9006\\u9418 \\u60c4\\u5982\\u8abf\\u9951 \\u62c8\\u9b1a \\u5e74\\u7a40 \\u5e74\\u66c6 \\u637b\\u9b1a \\u637b\\u937c \\u5538\\u554a \\u5538\\u5427 \\u5538\\u767d \\u5538\\u932f \\u5538\\u53e8 \\u5538\\u5230 \\u5538\\u7684 \\u5538\\u5c0d \\u5538\\u4f5b \\u5538\\u7d93 \\u5538\\u4e86 \\u5ff5\\u5ff5 \\u5538\\u5538\\u6709\\u8a5e \\u5538\\u8a69 \\u5538\\u66f8 \\u5538\\u8aa6 \\u5538\\u5b8c \\u5538\\u66f0 \\u5538\\u5492 \\u5538\\u4f5c \\u5b43\\u7684 \\u5b43\\u5152 \\u5b43\\u5bb6 \\u5b43\\u8205 \\u5b43\\u8001\\u5b50 \\u5b43\\u89aa \\u5b43\\u80ce \\u5b43\\u59e8 \\u91c0\\u88fd \\u9ce5\\u677e \\u5acb\\u5acb \\u88ca\\u88ca\\u708a\\u7159 \\u88ca\\u88ca\\u4e0a\\u5347 \\u88ca\\u7e5e \\u88ca\\u7a95 \\u5c3f\\u6597 \\u634f\\u88fd \\u752f\\u6210\\u5b50 \\u752f\\u60bc\\u5b50 \\u752f\\u65a7\\u6210 \\u752f\\u6d69 \\u752f\\u60e0\\u5b50 \\u752f\\u731b\\u529b \\u752f\\u621a \\u752f\\u8abf\\u5143 \\u752f\\u6b66\\u5b50 \\u752f\\u8d8a \\u752f\\u4e2d\\u5247 \\u752f\\u838a\\u5b50 \\u51dd\\u7070\\u5ca9 \\u51dd\\u934a \\u64f0\\u4e7e \\u725b\\u9a65\\u540c\\u7682 \\u725b\\u67f3\\u9eaa \\u725b\\u8089\\u9eaa \\u725b\\u96bb \\u9215\\u91e6 \\u9215\\u91e6 \\u62d7\\u5f46 \\u8fb2\\u66c6 \\u8fb2\\u6c11\\u66c6 \\u6fc3\\u9aee \\u6fc3\\u90c1 \\u91b2\\u90c1 \\u5f04\\u4e7e \\u5f04\\u9b3c\\u5f14\\u7334 \\u5f04\\u9eaa\\u5403 \\u5974\\u5152\\u5e72 \\u6012\\u9aee\\u885d\\u51a0 \\u6012\\u9aee\\u6c96\\u5929 \\u6012\\u6c23\\u6c96\\u767c \\u6696\\u76ea\\u64a9\\u934b \\u8afe\\u91cc \\u7cef\\u7c73\\u7cf0 \\u5973\\u4e11 \\u5973\\u751f\\u5916\\u56ae \\u6b50\\u4f2f\\u6258 \\u6b50\\u5e7e\\u91cc\\u5f97 \\u6b50\\u5e7e\\u91cc\\u5fb7 \\u6b50\\u91cc\\u5e87\\u5f97\\u65af \\u6b50\\u91cc\\u6851 \\u6b50\\u6d32\\u76c3 \\u85d5\\u8986 \\u5e15\\u7d2f\\u6258\\u6cd5\\u5247 \\u5e15\\u7d2f\\u6258\\u6700\\u512a \\u62cd\\u51fa \\u62cd\\u9f63\\u597d\\u6232 \\u62cd\\u6aaf\\u62cd\\u51f3 \\u6392\\u6a94\\u687f \\u6392\\u9aa8\\u9eaa \\u6392\\u9b1a \\u5f98\\u8ff4 \\u6f58\\u5a01\\u8a8c \\u6f58\\u5cb3 \\u76e4\\u8ff4 \\u76e4\\u677e \\u87e0\\u91c7 \\u87e0\\u9f8d\\u677e \\u65c1\\u8a3b \\u530f\\u7e6b \\u8dd1\\u6aaf\\u5b50 \\u6ce1\\u9eaa \\u6ce1\\u88fd \\u70ae\\u88fd \\u966a\\u5f14 \\u57f9\\u723e\\u677e \\u57f9\\u91cc\\u514b\\u91cc\\u65af \\u88f4\\u91cc\\u8afe \\u88f4\\u677e\\u4e4b \\u4f69\\u812b\\u62c9\\u514b \\u914d\\u81b3\\u6aaf \\u914d\\u88fd \\u7830\\u5679 \\u70f9\\u88fd \\u5f6d\\u54b8 \\u5f6d\\u4e8e\\u664f \\u84ec\\u9aee \\u7bf7\\u84cb\\u4f48 \\u81a8\\u571f\\u5ca9 \\u78b0\\u9418 \\u6279\\u8986 \\u6279\\u8988 \\u6279\\u8ff4 \\u6279\\u8a3b \\u6279\\u51c6 \\u62ab\\u9aee \\u62ab\\u8986 \\u62ab\\u7d05\\u639b\\u7db5 \\u62ab\\u982d\\u6563\\u9aee \\u62ab\\u699b\\u63a1\\u862d \\u5288\\u91cc \\u76ae\\u7279\\u62c9\\u514b \\u76ae\\u6258\\u7ba1 \\u76ae\\u88fd \\u6bd7\\u5a46\\u5c38\\u4f5b \\u75b2\\u774f \\u57e4\\u5858\\u91cc \\u813e\\u81df \\u5339\\u99ac\\u96bb\\u8f2a \\u8f9f\\u60e1 \\u8f9f\\u54a1 \\u8f9f\\u7a40 \\u8f9f\\u8209 \\u8f9f\\u541b\\u4e09\\u820d \\u8f9f\\u6b77\\u65bd\\u97ad \\u8f9f\\u7e91 \\u8f9f\\u908f \\u8f9f\\u547d \\u8f9f\\u533f \\u95e2\\u8f9f \\u8f9f\\u7136 \\u8f9f\\u4eba\\u4e4b\\u58eb \\u8f9f\\u8272 \\u8f9f\\u4e16 \\u8f9f\\u66f8 \\u8f9f\\u9055 \\u8f9f\\u90aa \\u8f9f\\u8a00 \\u8f9f\\u6613 \\u8f9f\\u6deb \\u8f9f\\u5f15 \\u8f9f\\u96cd \\u8f9f\\u5ef1 \\u8f9f\\u53ec \\u8f9f\\u652f\\u4f5b \\u8f9f\\u82b7 \\u504f\\u4fe1\\u5247\\u95c7 \\u504f\\u5016 \\u7247\\u9ebb\\u5ca9 \\u7247\\u8a00\\u96bb\\u8a9e \\u7247\\u5ca9 \\u7247\\u8a9e\\u96bb\\u8fad \\u6f02\\u76ea \\u6f02\\u6e38 \\u98c4\\u904a\\u56db\\u6d77 \\u6487\\u5f14 \\u62da\\u6368 \\u54c1\\u5690 \\u54c1\\u5f59 \\u5e73\\u5eb7\\u91cc \\u5e73\\u9762\\u6e2c\\u91cf \\u8a55\\u8988 \\u8a55\\u8a3b \\u860b\\u679c\\u96fb\\u8166 \\u82f9\\u7e08 \\u6191\\u5f14 \\u6191\\u51e0 \\u6191\\u85c9 \\u6191\\u9591 \\u6191\\u647a \\u9817\\u8986 \\u7834\\u9336 \\u7834\\u58de\\u617e \\u638a\\u6597\\u6298\\u8861 \\u88d2\\u524b \\u64b2\\u9f15 \\u92ea\\u84cb\\u6372\\u5152 \\u4ec6\\u5012 \\u4ec6\\u5730 \\u50d5\\u4f15 \\u4ec6\\u8857 \\u4ec6\\u7136 \\u8461\\u8404\\u4e7e \\u84b2\\u677e\\u9f61 \\u6734\\u8328\\u8305\\u65af \\u6734\\u5200 \\u6734\\u6069\\u60e0 \\u6734\\u9cf3\\u67f1 \\u6734\\u7236 \\u6734\\u5409\\u6df5 \\u6734\\u69ff\\u60e0 \\u6734\\u4eac\\u7433 \\u6734\\u7490\\u7f8e \\u6734\\u8302 \\u6734\\u8a69\\u598d \\u6734\\u4e16\\u8389 \\u6734\\u6a39 \\u6734\\u6cf0\\u6853 \\u6734\\u785d \\u6734\\u65b0\\u967d \\u6734\\u5ba3\\u82f1 \\u6734\\u6c38\\u8a13 \\u6734\\u4ed4\\u6a39 \\u6734\\u8d0a\\u6d69 \\u6734\\u771f\\u7199 \\u6734\\u6b63\\u6069 \\u6734\\u6b63\\u7199 \\u6734\\u6b63\\u7965 \\u6734\\u5fd7\\u80e4 \\u6734\\u667a\\u661f \\u6734\\u5fe0 \\u6734\\u5468\\u6c38 \\u6734\\u8cc7\\u8305\\u65af \\u6734\\u5b50 \\u57d4\\u91cc \\u666e\\u52d2\\u6258\\u5229\\u4e9e \\u666e\\u91cc \\u666e\\u5229\\u827e\\u6258 \\u4e03\\u91cc\\u6cb3 \\u4e03\\u91cc\\u9999 \\u4e03\\u5a18 \\u4e03\\u5b43\\u5abd \\u4e03\\u7f48 \\u4e03\\u7d43 \\u4e03\\u7d2e \\u4e03\\u96bb \\u4e03\\u9031 \\u6dd2\\u6ec4 \\u6dd2\\u5bd2 \\u6dd2\\u51b7 \\u6dd2\\u53b2 \\u6dd2\\u6dbc \\u6dd2\\u96e8 \\u621a\\u91cc \\u617c\\u617c \\u617c\\u5885\\u5830 \\u6b3a\\u77c7 \\u9f4a\\u540e\\u7834\\u74b0 \\u9f4a\\u6881\\u4e16\\u754c \\u9f4a\\u738b\\u6368\\u725b \\u5176\\u6b21\\u8f9f\\u5730 \\u5947\\u76c3 \\u5947\\u8e5f \\u5947\\u91cc\\u5b89 \\u5947\\u53f0 \\u68cb\\u4f48 \\u68cb\\u7f85\\u661f\\u4f48 \\u5553\\u767c \\u5553\\u767c\\u5f0f\\u6559\\u5b78\\u6cd5 \\u8d77\\u9b28 \\u8d77\\u64b2\\u687f \\u6c23\\u885d\\u6597\\u725b \\u6c23\\u885d\\u725b\\u6597 \\u6c23\\u514b\\u6597\\u725b \\u6c23\\u82e5\\u6e38\\u7d72 \\u6c23\\u52e2\\u718f\\u707c \\u6c23\\u541e\\u725b\\u6597 \\u6c23\\u63da\\u91c7\\u98db \\u6c23\\u4e00\\u885d \\u68c4\\u6368 \\u78e7\\u9e75 \\u6070\\u7e94 \\u5343\\u5c64\\u9eaa \\u5343\\u8ff4\\u767e\\u6298 \\u5343\\u8ff4\\u767e\\u8f49 \\u5343\\u921e \\u5343\\u921e\\u4e00\\u9aee \\u5343\\u91cc \\u5343\\u7d2e \\u5343\\u96bb \\u9077\\u601d\\u8ff4\\u616e \\u727d\\u7e6b \\u727d\\u4e00\\u9aee \\u925b\\u88fd \\u6173\\u541d\\u82e6\\u524b \\u8b19\\u6c96 \\u7c3d\\u5831 \\u7c3d\\u5531 \\u7c3d\\u5448 \\u7c3d\\u51fa \\u7c3d\\u55ae \\u7c3d\\u5230 \\u7c3d\\u5f97 \\u7c3d\\u8a02 \\u7c3d\\u5b9a \\u7c3d\\u8ced \\u7c3d\\u767c \\u7c3d\\u904e \\u7c3d\\u597d \\u7c3d\\u7d50 \\u7c3d\\u4e86 \\u7c3d\\u540d \\u7c3d\\u6d3e\\u5ba4 \\u7c3d\\u5165 \\u7c3d\\u4e0a \\u7c3d\\u6536 \\u7c3d\\u66f8\\u6703 \\u7c3d\\u7f72 \\u7c3d\\u9000 \\u7c3d\\u59a5 \\u7c3d\\u5b8c \\u7c3d\\u7232 \\u7c3d\\u4e0b \\u7c3d\\u4e9b \\u7c3d\\u5beb \\u7c3d\\u62bc \\u7c3d\\u5370 \\u7c3d\\u6709 \\u7c3d\\u7d04 \\u7c3d\\u5728 \\u7c3d\\u7ae0 \\u7c3d\\u5e33 \\u7c3d\\u7740 \\u7c3d\\u8b49 \\u7c3d\\u8a3c \\u7c3d\\u8a3b \\u7c3d\\u5b57 \\u524d\\u8eca\\u8986\\u5f8c\\u8eca\\u6212 \\u524d\\u8eca\\u4e4b\\u8986 \\u524d\\u5f8c\\u5de6\\u53f3 \\u524d\\u4ec6\\u5f8c\\u7e7c \\u524d\\u4ec6\\u5f8c\\u8d77 \\u9322\\u7a40 \\u4e7e\\u6e05\\u5bab \\u4e7e\\u8c61\\u66c6 \\u6f5b\\u6c34\\u9418 \\u6f5b\\u6e38 \\u69cd\\u687f \\u69cd\\u6258 \\u5f37\\u59e6 \\u5f37\\u6295\\u677e \\u5f37\\u56a5 \\u5f37\\u5236\\u4fdd\\u96aa \\u78fd\\u786e \\u6572\\u9418 \\u55ac\\u677e \\u854e\\u9ea5\\u9eaa \\u854e\\u9eaa \\u6a4b\\u6a11 \\u5de7\\u66c6 \\u7aca\\u5360 \\u7aca\\u9418\\u63a9\\u8033 \\u4fb5\\u4f75 \\u4fb5\\u5165\\u5ca9 \\u89aa\\u5b43 \\u89aa\\u5016 \\u89aa\\u5f81 \\u79e6\\u5c11\\u6e38 \\u7434\\u65b7\\u6731\\u7d43 \\u7434\\u687f \\u7434\\u7d43 \\u7434\\u9418 \\u5659\\u9f52\\u6234\\u9aee \\u9752\\u5e18 \\u9752\\u82f9 \\u9752\\u5c71\\u4e00\\u9aee \\u9752\\u677e \\u8f15\\u91e6 \\u6c2b\\u9e75\\u9178 \\u50be\\u8986\\u91cd\\u5668 \\u6e05\\u67e5\\u4e0d\\u7576\\u9ee8\\u7522 \\u6e05\\u6668\\u76c3 \\u6e05\\u687f\\u904b\\u52d5 \\u6e05\\u6aaf \\u60c5\\u91c7 \\u60c5\\u7e6b \\u60c5\\u617e \\u6176\\u5f14 \\u6176\\u66c6 \\u78ec\\u9418 \\u7aae\\u9aee \\u7aae\\u91cc \\u90b1\\u5bcc\\u90c1 \\u90b1\\u90c1\\u5a77 \\u79cb\\u4e0d\\u4e7e \\u79cb\\u9aee \\u97a6\\u97c6 \\u79cb\\u5f81 \\u56da\\u7e6b \\u6c42\\u77e5\\u617e \\u866f\\u9b1a \\u7403\\u540e \\u7403\\u6aaf \\u8da8\\u5409\\u907f\\u51f6 \\u9eb4\\u8eca \\u9eb4\\u5875 \\u66f2\\u9053 \\u9eb4\\u9053\\u58eb \\u9eb4\\u9152 \\u66f2\\u6372 \\u9eb4\\u83cc \\u9eb4\\u9ef4 \\u9eb4\\u6af1 \\u9eb4\\u9322 \\u9eb4\\u751f \\u66f2\\u677e \\u9eb4\\u79c0\\u624d \\u9eb4\\u9662 \\u53d6\\u6368 \\u5708\\u91e6 \\u5708\\u6a11 \\u6b0a\\u529b\\u617e \\u6b0a\\u617e\\u85b0\\u5fc3 \\u5168\\u7db5 \\u5168\\u6597\\u7165 \\u5168\\u4e7e \\u5168\\u7403\\u5b9a\\u4f4d\\u7cfb\\u7d71\\u885b\\u661f\\u6e2c\\u91cf \\u8a6e\\u8a3b \\u75ca\\u7652 \\u9b08\\u9aee \\u72ac\\u96bb \\u537b\\u7e94 \\u786e\\u7620 \\u78ba\\u4fc2 \\u95d5\\u91cc \\u88d9\\u896c \\u7fa3\\u540e \\u7fa3\\u8b00\\u54b8\\u540c \\u7fa3\\u8f9f \\u7136\\u8eab\\u6b7b\\u7e94\\u6578\\u6708\\u8033 \\u9aef\\u9b0d \\u67d3\\u9aee \\u67d3\\u5e72 \\u7e5e\\u6a11 \\u4eba\\u8518 \\u4eba\\u7269\\u8a8c \\u4eba\\u617e \\u4eba\\u4e91 \\u4eba\\u4e91\\u4ea6\\u4e91 \\u4ec1\\u6770 \\u5fcd\\u9951\\u53d7\\u9913 \\u5fcd\\u9951\\u53d7\\u6e34 \\u8a8d\\u88fd\\u4fee \\u65e5\\u672c\\u570b\\u8a8c \\u65e5\\u672c\\u88fd \\u65e5\\u5fa9\\u4e00\\u65e5 \\u65e5\\u5e72 \\u65e5\\u9032\\u6597\\u91d1 \\u65e5\\u66c6 \\u65e5\\u8a8c \\u65e5\\u88fd \\u69ae\\u767b\\u540e\\u5ea7 \\u69ae\\u7372\\u51a0\\u8ecd \\u6eb6\\u5ca9 \\u7194\\u71ec \\u7194\\u934a \\u7194\\u5ca9 \\u9394\\u5ca9 \\u63c9\\u9eaa \\u97a3\\u88fd \\u8089\\u4e7e \\u8089\\u7fb9\\u9eaa \\u8089\\u7d72\\u9eaa \\u8089\\u617e \\u5982\\u5e72 \\u5982\\u5750\\u937c\\u6c08 \\u8339\\u8a8c\\u9d51 \\u5112\\u7565\\u6539\\u9769\\u66c6 \\u5112\\u7565\\u66c6 \\u4e73\\u5b43 \\u8fb1\\u6e38 \\u5165\\u6258 \\u962e\\u54b8 \\u8f6f\\u80a5\\u7682 \\u745e\\u90ce\\u65b9\\u9eaa \\u745e\\u7c3d \\u745e\\u58eb\\u6372 \\u6f64\\u9aee \\u82e5\\u5e72 \\u5f31\\u667a\\u8cf4\\u4e8e\\u6db5 \\u6492\\u4f48 \\u85a9\\u5df4\\u6258 \\u85a9\\u91cc \\u816e\\u6597 \\u816e\\u6258 \\u8cfd\\u91cc\\u6728\\u6e56 \\u4e09\\u8907 \\u4e09\\u91cc\\u6cb3 \\u4e09\\u91cc\\u5c6f \\u4e09\\u5b43\\u6559\\u5b50 \\u4e09\\u8f9f \\u4e09\\u5c38 \\u4e09\\u7d71\\u66c6 \\u4e09\\u74e6\\u56db\\u820d \\u4e09\\u7d43 \\u4e09\\u718f\\u4e09\\u6c90 \\u4e09\\u8449\\u677e \\u4e09\\u6d74\\u4e09\\u718f \\u4e09\\u5143\\u91cc \\u4e09\\u7d2e \\u4e09\\u5fb5\\u4e03\\u8f9f \\u4e09\\u96bb \\u4e09\\u9031 \\u6563\\u4f48 \\u6851\\u4e7e \\u6851\\u6258\\u91cc\\u5c3c\\u5cf6 \\u6851\\u6258\\u69ae \\u6851\\u6258\\u65af \\u55aa\\u8569\\u6e38\\u9b42 \\u55aa\\u9418 \\u8272\\u617e \\u92ab\\u9418 \\u6c99\\u8518 \\u6c99\\u5751\\u687f \\u6c99\\u91cc\\u592b \\u6c99\\u5d19 \\u6c99\\u5ca9 \\u7802\\u934b\\u9eaa \\u7802\\u5ca9 \\u50bb\\u91cc\\u50bb\\u6c23 \\u66ec\\u4e7e \\u66ec\\u7a40 \\u66ec\\u83f8 \\u5c71\\u5d29\\u9418\\u61c9 \\u5c71\\u6597 \\u5c71\\u88cf \\u5c71\\u91cc\\u7ad9 \\u5c71\\u6a11 \\u5c71\\u5ca9 \\u5c71\\u7f8a\\u9b0d \\u5c71\\u7f8a\\u9b1a \\u5c71\\u4ed4\\u540e \\u5c71\\u4e2d\\u7121\\u66c6\\u65e5 \\u5c71\\u91cd\\u6c34\\u8907 \\u81bb\\u4e2d \\u9c54\\u9b5a\\u9eaa \\u5546\\u66c6 \\u8cde\\u8b9a \\u4e0a\\u885d \\u4e0a\\u6c96\\u4e0b\\u6d17 \\u4e0a\\u8986 \\u4e0a\\u95a4\\u5c4b \\u4e0a\\u8ab2\\u9418 \\u4e0a\\u6817\\u7e23 \\u4e0a\\u934a \\u4e0a\\u6a11 \\u4e0a\\u6a11\\u4e0d\\u6b63\\u4e0b\\u6a11\\u6b6a \\u4e0a\\u91ce\\u6a39\\u91cc \\u4e0a\\u6e38 \\u4e0a\\u9031 \\u71d2\\u4e7e \\u71d2\\u71ec \\u71d2\\u88fd \\u7b72\\u6597 \\u97f6\\u5c71\\u6c96 \\u90b5\\u5ef7\\u91c7 \\u820c\\u4e7e\\u8123\\u7126 \\u820c\\u4e7e\\u8123\\u7126 \\u820c\\u4e00\\u6372 \\u86c7\\u9aee\\u5973\\u5996 \\u86c7\\u7da0\\u6df7\\u96dc\\u5ca9 \\u86c7\\u7da0\\u5ca9 \\u86c7\\u76ae\\u677e \\u86c7\\u7d0b\\u5ca9 \\u6368\\u5b89\\u5c31\\u5371 \\u6368\\u672c \\u6368\\u4e0d\\u5f97 \\u6368\\u8eca\\u4fdd\\u5e25 \\u6368\\u51fa \\u6368\\u5f97 \\u6368\\u77ed\\u5f9e\\u9577 \\u6368\\u77ed\\u9304\\u9577 \\u6368\\u77ed\\u53d6\\u9577 \\u6368\\u77ed\\u7528\\u9577 \\u6368\\u58ae \\u6368\\u5df1 \\u6368\\u8fd1\\u5373\\u9060 \\u6368\\u8fd1\\u8b00\\u9060 \\u6368\\u8fd1\\u6c42\\u9060 \\u6368\\u8fd1\\u52d9\\u9060 \\u6368\\u820a\\u8fce\\u65b0 \\u6368\\u547d \\u6368\\u68c4 \\u6368\\u53bb \\u6368\\u8eab \\u6368\\u751f \\u6368\\u5be6 \\u6368\\u6b7b\\u5fd8\\u751f \\u6368\\u6211\\u5fa9\\u8ab0 \\u6368\\u6211\\u5176\\u8ab0 \\u820d\\u4e0b \\u6368\\u4e0b\\u4f60 \\u6368\\u4e0b\\u4ed6 \\u6368\\u4e0b\\u5979 \\u6368\\u4e0b\\u6211 \\u6368\\u6b63\\u5f9e\\u90aa \\u8a2d\\u8a00\\u6258\\u610f \\u5c04\\u9d70 \\u5c04\\u8986 \\u5c04\\u5e72 \\u651d\\u88fd \\u7533\\u8986 \\u8eab\\u6559\\u91cd\\u65bc\\u8a00\\u6559 \\u8eab\\u7e6b\\u56f9\\u5704 \\u6df1\\u6210\\u5ca9 \\u6df1\\u5c71\\u4f55\\u8655\\u9418 \\u4ec0\\u9326\\u9eaa \\u795e\\u91c7 \\u795e\\u9d70 \\u795e\\u9b42\\u76ea\\u98ba \\u795e\\u8e5f \\u795e\\u66f2 \\u795e\\u9eb4\\u8336 \\u795e\\u8056\\u9031 \\u795e\\u6416\\u9b42\\u76ea \\u700b\\u6d77 \\u700b\\u6cb3 \\u6c88\\u7a4d \\u6c88\\u7a4d\\u5ca9 \\u700b\\u5409\\u7dda \\u700b\\u5c71\\u7dda \\u700b\\u6c34 \\u700b\\u967d \\u700b\\u5dde \\u5be9\\u8988 \\u5b38\\u5b43 \\u814e\\u81df \\u5347\\u6597 \\u6607\\u6c5e \\u6607\\u83ef \\u6607\\u5e73 \\u5347\\u9077\\u7ba1\\u9053 \\u6607\\u5929 \\u6607\\u4ed9 \\u5347\\u5b78\\u58d3\\u529b \\u6607\\u967d \\u751f\\u65e6\\u6de8\\u672b\\u4e11 \\u751f\\u68df\\u8986\\u5c4b \\u751f\\u9aee \\u751f\\u8591 \\u751f\\u529b\\u9eaa \\u751f\\u614b\\u74b0\\u5883\\u6e38 \\u751f\\u7530\\u6597 \\u751f\\u7269\\u9418 \\u7e69\\u91e6 \\u7701\\u617e\\u53bb\\u5962 \\u8056\\u76c3 \\u8056\\u54c8\\u8f9b\\u6258 \\u8056\\u8e5f \\u8056\\u5e15\\u5f37\\u98b1 \\u8056\\u795e\\u964d\\u81e8\\u9031 \\u8056\\u4fee\\u4f2f\\u91cc \\u52dd\\u90e8\\u51a0\\u8ecd \\u52dd\\u8e5f \\u80dc\\u9375 \\u80dc\\u80bd \\u76db\\u4ef7 \\u76db\\u8b9a \\u5c38\\u81e3 \\u5c38\\u8aeb \\u5c38\\u89e3 \\u5c38\\u9ce9 \\u5c38\\u5c45\\u9f8d\\u898b \\u5c38\\u5c45\\u9918\\u6c23 \\u5c38\\u5229 \\u5c38\\u797f \\u5c38\\u9640\\u6797 \\u5c38\\u4f4d \\u5c38\\u9954 \\u5c38\\u795d \\u5931\\u4e4b\\u6beb\\u91d0 \\u5931\\u4e4b\\u6beb\\u5398\\u8b2c\\u4ee5\\u5343\\u91cc \\u5e2b\\u5b43 \\u5e2b\\u751f\\u76c3 \\u5e2b\\u4e91\\u800c\\u4e91 \\u8a69\\u4e91 \\u8a69\\u8b9a \\u8a69\\u9418 \\u65bd\\u4f73\\u6607 \\u65bd\\u4ec1\\u4f48\\u6069 \\u65bd\\u4ec1\\u4f48\\u6fa4 \\u65bd\\u6368 \\u65bd\\u7ca5\\u6368\\u98ef \\u6ebc\\u5730\\u677e \\u8a69\\u4e91 \\u5341\\u5206\\u4e7e \\u5341\\u5e72 \\u5341\\u91cc \\u5341\\u7d2e \\u5341\\u96bb \\u5341\\u9031 \\u77f3\\u67fa \\u77f3\\u7070\\u5ca9 \\u77f3\\u51e0 \\u77f3\\u67af\\u677e\\u8001 \\u77f3\\u6a11 \\u77f3\\u677e \\u77f3\\u5c4b\\u88fd\\u679c \\u77f3\\u82f1\\u9336 \\u77f3\\u82f1\\u5ca9 \\u77f3\\u82f1\\u9418 \\u77f3\\u9418\\u4e73 \\u6642\\u5c1a\\u9031 \\u6642\\u61b2\\u66c6 \\u6642\\u9418 \\u6642\\u88dd\\u9031 \\u62fe\\u700b \\u98df\\u87f2\\u690d\\u7269 \\u98df\\u9eaa \\u98df\\u91ce\\u4e4b\\u82f9 \\u98df\\u617e \\u53f2\\u67e5\\u514b \\u53f2\\u8e5f \\u53f2\\u6258\\u59c6 \\u53f2\\u6258\\u745f \\u53f2\\u6258\\u8607\\u5152 \\u53f2\\u6258\\u9a30\\u67cf\\u683c \\u53f2\\u6258\\u5a01 \\u53f2\\u6e38 \\u793a\\u7bc4\\u55ae\\u4f4d \\u793a\\u7bc4\\u6559\\u5b78 \\u793a\\u8986 \\u4e16\\u7db5\\u5802 \\u4e16\\u7d00\\u9418 \\u4e16\\u754c\\u76c3 \\u5e02\\u9577\\u76c3 \\u4e8b\\u8e5f \\u4e8b\\u53ef\\u5e79 \\u4e8b\\u60c5\\u5e72\\u8106 \\u4e8b\\u60c5\\u53ef\\u5e79 \\u98fe\\u91e6 \\u8a66\\u9a57\\u6aaf \\u8a66\\u88fd \\u62ed\\u4e7e \\u662f\\u96bb \\u9069\\u7576\\u7684 \\u8996\\u5982\\u5bc7\\u8b8e \\u55dc\\u9178\\u4e73\\u5e72\\u83cc \\u55dc\\u617e \\u6536\\u7a6b \\u624b\\u9336 \\u624b\\u5de5\\u6aaf \\u624b\\u934a \\u624b\\u9762 \\u624b\\u9762\\u8cfa\\u5403 \\u624b\\u8853 \\u624b\\u8853\\u6aaf \\u624b\\u75e0 \\u624b\\u4e00\\u6372 \\u624b\\u647a \\u624b\\u88fd \\u624b\\u51a2\\u6cbb\\u866b \\u5b88\\u79a6 \\u9996\\u90fd\\u76c3 \\u9996\\u96bb \\u58fd\\u9eaa \\u53d7\\u547d\\u65bc\\u5929 \\u552e\\u5f8c\\u670d\\u52d9 \\u7378\\u59e6 \\u7378\\u617e \\u66f8\\u6aaf \\u6b8a\\u57df\\u5468\\u54a8\\u9304 \\u68b3\\u9aee \\u68b3\\u599d\\u6aaf \\u6dd1\\u90c1 \\u8212\\u6372 \\u8f38\\u5f81 \\u9f20\\u9eb4\\u8349 \\u672e\\u8d64 \\u675f\\u9aee \\u675f\\u8129 \\u6a39\\u6a11 \\u6055\\u4e4f\\u4ef7\\u50ac \\u6578\\u7b87 \\u6578\\u8207\\u865c\\u786e \\u6578\\u9031 \\u6578\\u5b57\\u9418 \\u6578\\u7f6a\\u4f75\\u7f70 \\u7529\\u9aee \\u96d9\\u9d70 \\u96d9\\u67fa \\u96d9\\u540e\\u524d\\u5175\\u958b\\u5c40 \\u96d9\\u80dc\\u985e \\u96d9\\u647a \\u96d9\\u9031 \\u96d9\\u5b50\\u8449\\u690d\\u7269 \\u6c34\\u9336 \\u6c34\\u7e94\\u4e7e \\u6c34\\u6210\\u5ca9 \\u6c34\\u6597 \\u6c34\\u4e7e \\u6c34\\u8c37 \\u6c34\\u7a40\\u4e4b\\u6d77 \\u6c34\\u7ba1\\u9eaa \\u6c34\\u88cf \\u6c34\\u91cc\\u9109 \\u6c34\\u91cc\\u9109 \\u6c34\\u4e00\\u885d \\u6c34\\u5df2\\u4e7e \\u6c34\\u6e96\\u6e2c\\u91cf \\u7761\\u7720\\u617e \\u9806\\u5fb7\\u8005\\u5409\\u9006\\u5929\\u8005\\u51f6 \\u9806\\u9418\\u5411 \\u9806\\u7843\\u5152 \\u8aaa\\u5cb3 \\u7d72\\u6069\\u9aee\\u6028 \\u7d72\\u9aee \\u7d72\\u687f \\u7d72\\u6258\\u7d22 \\u7d72\\u7d43 \\u79c1\\u617e \\u65af\\u4f2f\\u4e01\\u76c3 \\u65af\\u8fea\\u91cc \\u65af\\u5e72 \\u65af\\u91cc \\u65af\\u91cc\\u67e5\\u6f58 \\u65af\\u6258 \\u65af\\u74e6\\u5e0c\\u91cc \\u6b7b\\u9eaa \\u6b7b\\u50b7\\u76f8\\u85c9 \\u56db\\u5206\\u66c6 \\u56db\\u6d77\\u7686\\u51c6 \\u56db\\u91cc \\u56db\\u9762 \\u56db\\u9762\\u9418 \\u56db\\u6368\\u516d\\u5165 \\u56db\\u6368\\u4e94\\u5165 \\u56db\\u51f6 \\u56db\\u7d2e \\u56db\\u96bb \\u5bfa\\u9418 \\u98fc\\u9935 \\u677e\\u5df4\\u54c7 \\u677e\\u67cf \\u677e\\u5317 \\u677e\\u672c \\u677e\\u6750\\u7dda\\u87f2 \\u677e\\u5927\\u8f14 \\u677e\\u98a8 \\u677e\\u5ca1 \\u677e\\u9ad8\\u8def \\u677e\\u679c \\u677e\\u9db4 \\u677e\\u82b1 \\u677e\\u5316\\u77f3 \\u677e\\u7bc1\\u4ea4\\u7fe0 \\u677e\\u96de \\u677e\\u6c5f \\u677e\\u81a0 \\u677e\\u7126\\u6cb9 \\u677e\\u7bc0\\u6cb9 \\u677e\\u4e95\\u79c0 \\u677e\\u83cc \\u677e\\u7b60\\u4e4b\\u64cd \\u677e\\u7b60\\u4e4b\\u7bc0 \\u677e\\u79d1 \\u9b06\\u53e3 \\u677e\\u53e3\\u8611 \\u9b06\\u91e6 \\u677e\\u985e \\u677e\\u907c\\u5e73\\u539f \\u677e\\u6797 \\u677e\\u5dba \\u677e\\u9686\\u5b50 \\u677e\\u9732 \\u677e\\u863f \\u677e\\u6bdb \\u677e\\u7164 \\u677e\\u660e \\u677e\\u8611 \\u677e\\u6f20 \\u677e\\u6728 \\u677e\\u6f58 \\u677e\\u76ae\\u766c \\u677e\\u6d66 \\u677e\\u55ac \\u677e\\u9752 \\u677e\\u4e18 \\u677e\\u7403 \\u677e\\u6bec \\u677e\\u74e4 \\u677e\\u4ec1 \\u677e\\u8338 \\u677e\\u854a \\u677e\\u5c71 \\u677e\\u7345\\u72ac \\u677e\\u77f3 \\u677e\\u9f20 \\u677e\\u6a39 \\u677e\\u6fe4 \\u677e\\u6843\\u82d7\\u65cf\\u81ea\\u6cbb\\u7e23 \\u677e\\u6843\\u7e23 \\u677e\\u7530 \\u677e\\u5c3e\\u82ad\\u8549 \\u677e\\u7d0b \\u677e\\u6eaa \\u677e\\u4e0b \\u677e\\u9999 \\u677e\\u96ea\\u6cf0\\u5b50 \\u677e\\u8548 \\u677e\\u9d09 \\u677e\\u7159 \\u677e\\u967d \\u677e\\u8449 \\u677e\\u6cb9 \\u677e\\u9b5a \\u677e\\u539f \\u677e\\u8d0a\\u5e72\\u5e03 \\u677e\\u85fb\\u87f2 \\u677e\\u91dd \\u677e\\u679d \\u677e\\u8102 \\u677e\\u6307\\u90e8 \\u677e\\u667a\\u8def \\u677e\\u7af9 \\u677e\\u5b50 \\u9001\\u5831\\u4f15 \\u8aa6\\u5538 \\u980c\\u7e6b \\u980c\\u8b9a \\u8490\\u85cf \\u641c\\u67e5\\u8b49 \\u8490\\u8cfc \\u8490\\u96c6 \\u8490\\u62ec \\u8490\\u7f85 \\u8490\\u8b49 \\u6eb2\\u9eaa \\u8607\\u76c3 \\u8607\\u4fc4\\u5728\\u4e2d\\u570b \\u8607\\u683c\\u862d \\u8607\\u683c\\u862d\\u647a\\u8033\\u8c93 \\u8607\\u54c8\\u6258 \\u7526\\u5bb6\\u5c6f \\u8607\\u5d11 \\u8607\\u91cc \\u7526\\u4ed9\\u5340 \\u7526\\u9192 \\u8607\\u63da\\u6258 \\u9165\\u7c3d \\u7d20\\u9aee \\u7d20\\u85c9 \\u5851\\u81a0\\u88fd \\u6eaf\\u6e38 \\u75e0\\u61f6 \\u75e0\\u9ebb \\u75e0\\u8edf \\u75e0\\u75bc \\u75e0\\u75db \\u849c\\u9aee \\u849c\\u85b9 \\u7b97\\u9aee \\u7b97\\u66c6 \\u96d6\\u8986\\u80fd\\u5fa9 \\u6b72\\u51f6 \\u6b72\\u807f\\u4e91\\u66ae \\u813a\\u81df \\u788e\\u9aee \\u788e\\u5c51\\u5ca9 \\u7e50\\u88f3 \\u7e50\\u5e43\\u98c4\\u4e95\\u5e79 \\u7e50\\u5e37 \\u7e50\\u5e33 \\u5b6b\\u6770 \\u7b4d\\u4e7e \\u7e2e\\u5f71\\u5fae\\u6372 \\u6240\\u4f48\\u7684 \\u6240\\u4f48\\u4e4b \\u6240\\u7e6b \\u6240\\u4e91 \\u7d22\\u723e\\u8332\\u4f2f\\u91cc\\u5e73\\u539f \\u7d22\\u723e\\u8332\\u4f2f\\u91cc\\u77f3\\u74b0 \\u7d22\\u91cc\\u58eb \\u7d22\\u99ac\\u91cc \\u7d22\\u99ac\\u91cc \\u7d22\\u9eaa \\u7d22\\u6258 \\u9396\\u91e6 \\u4ed6\\u9418 \\u5854\\u514b \\u5854\\u514b\\u62c9\\u99ac\\u5e72 \\u5854\\u514b\\u62c9\\u746a\\u5e72 \\u5854\\u91cc\\u73ed \\u5854\\u91cc\\u6728 \\u5854\\u91cc\\u5951\\u4e9e\\u52aa \\u5854\\u4ec0\\u5e72 \\u5854\\u4ec0\\u5eab\\u723e\\u5e72\\u5854\\u5409\\u514b\\u81ea\\u6cbb\\u7e23 \\u5854\\u4ec0\\u5eab\\u723e\\u5e72\\u9109 \\u5854\\u4ec0\\u5eab\\u723e\\u5e72\\u81ea\\u6cbb\\u7e23 \\u5854\\u9418 \\u80ce\\u9aee \\u6aaf\\u5b89 \\u81fa\\u5317\\u5e02\\u9577 \\u6aaf\\u7b46 \\u6aaf\\u5e03 \\u6aaf\\u79e4 \\u6aaf\\u71c8 \\u6aaf\\u51f3 \\u98b1\\u98a8 \\u81fa\\u9452 \\u6aaf\\u66c6 \\u6aaf\\u9762 \\u6aaf\\u76e4 \\u81fa\\u6f8e\\u91d1\\u99ac \\u6aaf\\u7403 \\u53f0\\u5c71 \\u6aaf\\u6247 \\u81fa\\u7063 \\u81fa\\u7063\\u6559\\u80b2\\u5b78\\u9662 \\u81fa\\u7063\\u53f0 \\u81fa\\u88fd \\u81fa\\u4e2d \\u81fa\\u4e2d\\u6559\\u80b2\\u5927\\u5b78 \\u6aaf\\u9418 \\u53f0\\u5dde \\u99d8\\u85c9 \\u592a\\u6c96 \\u592a\\u521d\\u66c6 \\u592a\\u4e7e \\u592a\\u540e \\u592a\\u9ebb\\u91cc \\u592a\\u967d\\u9ed1\\u5b50\\u9031 \\u6cf0\\u6597 \\u8caa\\u617e \\u7f48\\u767d\\u5e72 \\u7f48\\u9673\\u5e74 \\u7f48\\u9ad8\\u7cb1 \\u7f48\\u597d\\u9152 \\u7f48\\u9a1e \\u7f48\\u4f73\\u91c0 \\u7f48\\u8001\\u9152 \\u7f48\\u7f8e\\u9152 \\u7f48\\u5973\\u5152\\u7d05 \\u7f48\\u71d2\\u5200\\u5b50 \\u7f48\\u71d2\\u5200\\u5b50 \\u7f48\\u7f48\\u7f50\\u7f50 \\u7f48\\u5b50 \\u6f6d\\u7949\\u53f6\\u5409 \\u6b4e\\u670d \\u6b4e\\u865f \\u6b4e\\u7d55 \\u6b4e\\u8cde \\u5606\\u7232 \\u6b4e\\u7232\\u89c0\\u6b62 \\u6b4e\\u7fa8 \\u63a2\\u77e5\\u617e \\u78b3\\u9178\\u5ca9 \\u6b4e\\u5401 \\u6e6f\\u9eaa \\u6e6f\\u7cf0 \\u6e6f\\u4e0b\\u9eaa \\u7cd6\\u918b\\u91cc\\u810a \\u71d9\\u6b21\\u9aee \\u71d9\\u9aee \\u71d9\\u500b \\u71d9\\u500b\\u9aee \\u71d9\\u9eaa \\u71d9\\u5b8c\\u9aee \\u71d9\\u4e00\\u6b21\\u9aee \\u71d9\\u4e00\\u500b\\u9aee \\u9676\\u88fd \\u7279\\u5225\\u516c\\u7a4d\\u91d1 \\u7279\\u91cc \\u7279\\u5167\\u91cc\\u8cbb \\u7279\\u677e\\u52a0 \\u7279\\u88fd \\u7279\\u51c6 \\u9a30\\u6607 \\u85e4\\u88fd \\u63d0\\u6a11 \\u63d0\\u88fd \\u63d0\\u5b50\\u4e7e \\u984c\\u7c3d \\u5243\\u9aee \\u5243\\u9b0d \\u5243\\u9b1a \\u5929\\u51ac\\u91af\\u80fa \\u5929\\u7ffb\\u5730\\u8986 \\u5929\\u8986 \\u5929\\u5e72 \\u5929\\u4e7e\\u7269\\u71e5 \\u5929\\u540e \\u5929\\u524b\\u5730\\u885d \\u5929\\u66c6 \\u5929\\u53f0 \\u5929\\u6587\\u5b78\\u9418 \\u5929\\u6587\\u9418 \\u5929\\u5fc3\\u5ca9 \\u5929\\u8981\\u843d\\u96e8\\u5b43\\u8981\\u5ac1\\u4eba \\u5929\\u8981\\u4e0b\\u96e8\\u5b43\\u8981\\u5ac1\\u4eba \\u7530\\u7a40 \\u751c\\u9eaa\\u91ac \\u751c\\u6c34\\u9eaa \\u6375\\u9eaa \\u6311\\u5927\\u6a11 \\u6311\\u4e86 \\u6311\\u4e86\\u96bb \\u689d\\u51e0 \\u8abf\\u9336 \\u8abf\\u67e5\\u5718 \\u8abf\\u7d43 \\u8abf\\u88fd \\u8df3\\u9336 \\u8df3\\u6881 \\u8df3\\u6a11\\u7316\\u7357\\u4e4b\\u5c0f\\u919c \\u8df3\\u6a11\\u5c0f\\u919c \\u8df3\\u96bb\\u821e \\u9435\\u677f \\u9435\\u677f\\u9eaa \\u9435\\u677f\\u725b\\u67f3 \\u9435\\u677f\\u725b\\u8089 \\u9435\\u687f \\u9435\\u67fa \\u9435\\u91e6 \\u9435\\u6258 \\u9435\\u88fd \\u9435\\u9418 \\u807d\\u7d43 \\u505c\\u88fd \\u901a\\u4f48\\u5716 \\u901a\\u59e6 \\u901a\\u66c6 \\u901a\\u5fc3\\u9eaa \\u540c\\u6b65\\u885b\\u661f \\u540c\\u5115\\u58d3\\u529b \\u540c\\u5403 \\u540c\\u4eba \\u540c\\u4eba\\u8a8c \\u540c\\u4f11\\u5171\\u617c \\u9285\\u6597\\u5152 \\u9285\\u91e6 \\u9285\\u88fd \\u9285\\u9418 \\u77b3\\u77c7 \\u5077\\u5690\\u7981\\u679c \\u5077\\u6a11\\u63db\\u67f1 \\u982d\\u9aee \\u982d\\u9aee\\u9b0d\\u5b50\\u4e00\\u628a\\u6293 \\u982d\\u82b1\\u9aee \\u982d\\u5dfe\\u5f14\\u5728\\u6c34\\u88cf \\u6295\\u6258 \\u79bf\\u9aee \\u79bf\\u5983\\u4e4b\\u9aee \\u5716\\u66f8\\u9928\\u9031 \\u6d82\\u9577\\u671b \\u6d82\\u723e\\u5e72 \\u6d82\\u9022\\u5e74 \\u6d82\\u9d3b\\u6b3d \\u6d82\\u9d3b\\u6b3d \\u6d82\\u60e0\\u5143 \\u6d82\\u60e0\\u6e90 \\u5857\\u6f3f\\u6aaf \\u6d82\\u8b39\\u7533 \\u6d82\\u8b39\\u7533 \\u6d82\\u5c45\\u8ce2 \\u6d82\\u5764 \\u6d82\\u7f8e\\u502b \\u6d82\\u654f\\u6046 \\u6d82\\u654f\\u6046 \\u6d82\\u5584\\u59ae \\u6d82\\u7d39\\u7143 \\u6d82\\u5929\\u76f8 \\u6d82\\u6587\\u751f \\u6d82\\u9192\\u54f2 \\u6d82\\u59d3 \\u6d82\\u5e8f\\u7444 \\u6d82\\u6c38\\u8f1d \\u6d82\\u7fbd\\u537f \\u6d82\\u6708 \\u5857\\u6fa4 \\u6d82\\u6fa4\\u6c11 \\u6d82\\u6fa4\\u6c11 \\u6d82\\u9577\\u671b \\u6d82\\u58ef\\u52f3 \\u6d82\\u58ef\\u52f3 \\u571f\\u7a40\\u7960 \\u571f\\u6258\\u9b5a \\u571f\\u88fd \\u7cf0\\u7c89 \\u5718\\u4f19 \\u5718\\u9ad4\\u51a0\\u8ecd \\u7cf0\\u5b50 \\u5718\\u571e \\u63a8\\u9673\\u4f48\\u65b0 \\u63a8\\u8aa0\\u4f48\\u516c \\u63a8\\u8aa0\\u4f48\\u4fe1 \\u63a8\\u8f26\\u6b78\\u91cc \\u63a8\\u8a17 \\u63a8\\u6258\\u4e4b\\u8a5e \\u63a8\\u8f13 \\u63a8\\u7d43 \\u817f\\u75e0 \\u541e\\u4f75 \\u541e\\u56a5 \\u5c6f\\u7d2e \\u6258\\u676f \\u6258\\u6bd4\\u9ea5\\u594e\\u723e \\u6258\\u6bd4\\u4e9e\\u65af \\u6258\\u9262\\u4eba \\u6258\\u9262\\u50e7 \\u6258\\u9262\\u4fee\\u6703 \\u6258\\u9262 \\u6258\\u51fa \\u6258\\u81bd \\u6258\\u767b\\u6f22\\u968a \\u6258\\u5730 \\u6258\\u8482 \\u6258\\u5152 \\u6258\\u723e \\u6258\\u592b \\u8a17\\u798f \\u6258\\u798f\\u8003 \\u6258\\u8477\\u9e79\\u98df \\u6258\\u67b6 \\u6258\\u514b \\u6258\\u514b\\u6258 \\u6258\\u62c9 \\u6258\\u8fa3\\u65af \\u6258\\u840a\\u591a \\u6258\\u8cf4 \\u6258\\u8001\\u9662 \\u6258\\u8001\\u4e2d\\u5fc3 \\u6258\\u52d2 \\u6258\\u88cf \\u6258\\u5229\\u9ee8\\u4eba \\u6258\\u5229\\u7c73\\u723e \\u6258\\u9818 \\u6258\\u7f85\\u65af\\u5c71 \\u6258\\u6d1b\\u8328\\u57fa \\u6258\\u6d1b\\u65af\\u57fa \\u6258\\u99ac \\u6258\\u7c73 \\u6258\\u58a8 \\u6258\\u6728\\u723e \\u6258\\u76e4 \\u6258\\u8d77 \\u6258\\u745e\\u8cfd \\u6258\\u745e\\u7d72 \\u6258\\u816e \\u6258\\u585e\\u6d1b \\u6258\\u8272 \\u6258\\u5be6 \\u6258\\u719f \\u6258\\u65af\\u5361 \\u6258\\u5854\\u5929\\u738b \\u6258\\u80ce \\u6258\\u7279 \\u6258\\u7dad \\u6258\\u8449 \\u6258\\u5e7c \\u6258\\u80b2 \\u8a17\\u904b \\u6258\\u904b\\u884c\\u674e \\u6258\\u4f4f \\u6258\\u5b50 \\u6258\\u8db3 \\u62d6\\u6597 \\u812b\\u9aee \\u812b\\u7a40\\u6a5f \\u5768\\u91cc \\u8dce\\u7e34 \\u553e\\u9762 \\u553e\\u9762\\u81ea\\u4e7e \\u553e\\u6cab\\u76f4\\u56a5 \\u74e6\\u723e\\u57fa\\u91cc \\u74e6\\u91cc \\u74e6\\u677e \\u5916\\u5f37\\u4e2d\\u4e7e \\u5916\\u83f8 \\u5916\\u617e \\u5916\\u79a6\\u5176\\u4fae \\u5916\\u88fd \\u5f4e\\u7ba1\\u9eaa \\u5b8c\\u5168\\u7652\\u5fa9 \\u9811\\u9e75 \\u9811\\u7b51\\u821e\\u7b08 \\u8f13\\u8a5e \\u8f13\\u8a5e \\u8f13\\u984d \\u8f13\\u592b \\u8f13\\u6b4c \\u8f13\\u806f \\u8f13\\u806f \\u8f13\\u66f2 \\u8f13\\u8a69 \\u8f13\\u8a69 \\u665a\\u9418 \\u7db0\\u9aee \\u7897\\u9eaa \\u842c\\u91cc \\u842c\\u91cc\\u9577\\u5f81 \\u842c\\u66c6 \\u842c\\u5e74 \\u842c\\u5e74\\u66c6\\u9336 \\u4e07\\u65d7 \\u4e07\\u4fdf \\u842c\\u7f48 \\u842c\\u7d2e \\u842c\\u96bb \\u8155\\u9336 \\u738b\\u4e7e\\u767c \\u738b\\u4faf\\u540e \\u738b\\u540e \\u738b\\u7199\\u677e \\u738b\\u4e8e\\u771f \\u738b\\u6b63\\u6770 \\u738b\\u5b50\\u9eaa \\u7db2\\u79a6 \\u7db2\\u8a8c \\u5f80\\u65e5\\u7121\\u8b8e \\u5fd8\\u751f\\u6368\\u6b7b \\u671b\\u540e\\u77f3 \\u5a01\\u5947\\u6258 \\u504e\\u4e7e \\u7168\\u4e7e \\u97cb\\u540e \\u7232\\u4e2d\\u98b1 \\u7dad\\u6597 \\u7dad\\u514b \\u7dad\\u514b\\u6258 \\u7dad\\u7e6b \\u5049\\u6676\\u5ca9 \\u8466\\u82d5\\u7e6b\\u5de2 \\u8466\\u84c6 \\u5c3e\\u8a3b \\u885b\\u661f\\u9418 \\u672a\\u4e7e \\u80c3\\u81df \\u9935\\u98fd \\u9935\\u54fa \\u9935\\u52d5\\u7269 \\u9935\\u9d5d \\u9935\\u98ef \\u9935\\u7d66 \\u9935\\u904e \\u9935\\u96de \\u9935\\u4e86 \\u9935\\u9a62 \\u9935\\u99ac \\u9935\\u6bcd\\u4e73 \\u9935\\u5976 \\u9935\\u4f60 \\u9935\\u4e73 \\u9935\\u98df \\u9935\\u5b83 \\u9935\\u6211 \\u9935\\u9d28 \\u9935\\u7f8a \\u9935\\u990a \\u9935\\u9b5a \\u9935\\u8c6c \\u6170\\u85c9 \\u9b4f\\u90c1\\u5947 \\u6587\\u91c7 \\u6587\\u91c7\\u90c1\\u90c1 \\u6587\\u4e11 \\u6587\\u9326\\u8986\\u9631 \\u6587\\u65af\\u8303\\u6069 \\u7086\\u9eaa \\u7a69\\u5403\\u4e09\\u6ce8 \\u7a69\\u7d2e \\u554f\\u5377 \\u554f\\u5377\\u5927\\u8abf\\u67e5 \\u554f\\u5377\\u8abf\\u67e5 \\u7fc1\\u4e7e\\u6643 \\u7fc1\\u90c1\\u5bb9 \\u7aa9\\u88cf \\u7aa9\\u91cc\\u7aa9\\u56ca \\u8778\\u687f \\u6211\\u4fc2 \\u6c83\\u4f9d\\u91c7\\u514b \\u81e5\\u85aa\\u5690\\u81bd \\u63e1\\u9aee \\u70cf\\u6771\\u67e5\\u514b \\u70cf\\u9aee \\u70cf\\u5e72\\u9054 \\u70cf\\u72d7\\u5403\\u98df\\u767d\\u72d7\\u7576\\u707d \\u70cf\\u862d\\u5df4\\u6258 \\u70cf\\u91cc \\u70cf\\u9f8d\\u9eaa \\u70cf\\u6d1b\\u6258\\u54c1 \\u70cf\\u677e \\u70cf\\u6258\\u90a6 \\u6c61\\u884a \\u5deb\\u54b8 \\u8aa3\\u884a \\u5c4b\\u6a11 \\u7121\\u5e72 \\u7121\\u50f9 \\u7121\\u4ef7\\u4e8b \\u7121\\u50f9\\u73cd\\u73e0 \\u7121\\u7cbe\\u6253\\u91c7 \\u7121\\u5398\\u982d \\u7121\\u6a11 \\u7121\\u6a11\\u6597 \\u7121\\u617e \\u5433\\u91c7\\u748b \\u5433\\u7693\\u6607 \\u5433\\u91cc\\u514b \\u5433\\u69ae\\u6770 \\u5433\\u80b2\\u6607 \\u7121\\u8a00\\u4e0d\\u8b8e \\u4e94\\u91c7 \\u4e94\\u6597 \\u4e94\\u7a40 \\u4e94\\u884c\\u751f\\u524b \\u4e94\\u68f5\\u677e \\u4e94\\u91cc \\u4e94\\u8f9f \\u4e94\\u7d43 \\u4e94\\u81df \\u4e94\\u7d2e \\u4e94\\u96bb \\u4e94\\u9031 \\u4f0d\\u91c7\\u514b \\u6b66\\u4e11 \\u6b66\\u5927\\u90ce\\u5403\\u6bd2\\u85e5 \\u6b66\\u540e \\u6b66\\u91cc\\u7701 \\u6b66\\u677e \\u821e\\u540e \\u821e\\u6c34\\u7aef\\u91cc \\u5140\\u672e \\u52ff\\u91cc\\u6d1e\\u5cf6 \\u7269\\u617e \\u897f\\u540e \\u897f\\u91cc \\u897f\\u66c6 \\u897f\\u5229\\u53e4\\u91cc \\u897f\\u677e \\u897f\\u5f81 \\u897f\\u5468 \\u897f\\u5468\\u9418 \\u5438\\u4e7e \\u5438\\u83f8 \\u5e0c\\u4f2f\\u4f86\\u66c6 \\u5e0c\\u62c9\\u524b \\u5e0c\\u65af\\u5d19 \\u77fd\\u5ca9 \\u77fd\\u8cea\\u5ca9 \\u606f\\u7a40 \\u665e\\u9aee \\u6b37\\u5401 \\u7a00\\u91cc \\u7a00\\u91cc\\u5629\\u5566 \\u5092\\u5016 \\u5faf\\u5016 \\u5e2d\\u6372 \\u84c6\\u68da \\u5e2d\\u8a8c\\u6210 \\u8972\\u6372 \\u6d17\\u76ea \\u6d17\\u9aee \\u6d17\\u9aee\\u7682 \\u6d17\\u81c9\\u6aaf \\u6d17\\u624b\\u6aaf \\u559c\\u6b61\\u9336 \\u559c\\u6b61\\u9418 \\u6232\\u7db5\\u5a1b\\u89aa \\u4fc2\\u81c2 \\u7e6b\\u81c2\\u4e4b\\u5bf5 \\u7e6b\\u6cca \\u7e6b\\u8239\\u6a01 \\u7e6b\\u8fad \\u7e6b\\u5e36 \\u7e6b\\u5230 \\u7e6b\\u800c\\u4e0d\\u98df \\u7e6b\\u9aee\\u5e36 \\u7e6b\\u98a8\\u6355\\u666f \\u7e6b\\u98a8\\u6355\\u5f71 \\u7e6b\\u7e1b \\u7e6b\\u500b \\u7e6b\\u88f9 \\u7e6b\\u597d \\u7e6b\\u61f7 \\u4fc2\\u7372 \\u7e6b\\u7d50 \\u7e6b\\u7dca \\u7e6b\\u9838 \\u4fc2\\u9838\\u95d5\\u5ead \\u4fc2\\u6263 \\u7e6b\\u8932\\u5b50 \\u7e6b\\u7e9c \\u7e6b\\u7262 \\u7e6b\\u4e86 \\u7e6b\\u7d2f \\u7e6b\\u6200 \\u7e6b\\u9234\\u89e3\\u9234 \\u7e6b\\u9234\\u4eba \\u7e6b\\u7559 \\u7e6b\\u99ac \\u7e6b\\u547d \\u7e6b\\u637b\\u5152 \\u7e6b\\u5ff5 \\u7e6b\\u56da \\u7e6b\\u4e0a \\u7e6b\\u7e69 \\u7e6b\\u4e16 \\u4fc2\\u6578 \\u7e6b\\u7d72\\u5e36 \\u4fc2\\u8e44 \\u7e6b\\u689d \\u7e6b\\u982d\\u5dfe \\u4fc2\\u7232 \\u4fc2\\u7232 \\u7e6b\\u7cfb \\u7e6b\\u978b\\u5e36 \\u7e6b\\u5fc3 \\u7e6b\\u8170 \\u4fc2\\u4e00\\u756a \\u4fc2\\u4e00\\u7247 \\u7e6b\\u4e00\\u7dda \\u4fc2\\u4e00\\u7a2e \\u7e6b\\u6709 \\u7e6b\\u65bc \\u7e6b\\u65bc\\u4e00\\u9aee \\u7e6b\\u7344 \\u7e6b\\u722a \\u7e6b\\u7740 \\u4fc2\\u722d \\u4fc2\\u6307 \\u7e6b\\u8dbe \\u4fc2\\u8e35 \\u7e6b\\u4f4f \\u7d30\\u4e0d\\u5bb9\\u9aee \\u7d30\\u934a \\u7d30\\u5982\\u9aee \\u7d30\\u56a5 \\u7d30\\u7dfb \\u8204\\u9e75 \\u6f5f\\u9e75 \\u8766\\u4e7e \\u8766\\u9b1a \\u4fe0\\u6c23\\u5e72\\u96f2 \\u72ce\\u5993\\u51b6\\u6e38 \\u4e0b\\u896c \\u4e0b\\u91c7 \\u4e0b\\u8ab2\\u9418 \\u4e0b\\u91cc \\u4e0b\\u6a11 \\u4e0b\\u5d19\\u8def \\u4e0b\\u56a5 \\u4e0b\\u6e38 \\u4e0b\\u9031 \\u590f\\u540e\\u6c0f \\u590f\\u91cc\\u592b \\u590f\\u66c6 \\u590f\\u4e8e\\u55ac \\u590f\\u4e8e\\u55ac \\u4ed9\\u540e \\u4ed9\\u8e5f \\u4ed9\\u53f0 \\u4ed9\\u5ca9 \\u5148\\u5690 \\u5148\\u4e7e\\u7232\\u656c \\u5148\\u7c3d \\u5148\\u5929\\u4e0b\\u4e4b\\u6182\\u800c\\u6182\\u540e\\u5929\\u4e0b\\u4e4b\\u6a02\\u800c\\u6a02 \\u5148\\u5c0f\\u4eba\\u5f8c\\u541b\\u5b50 \\u7e34\\u592b \\u7e34\\u6236 \\u7e96\\u7dad\\u690d\\u7269 \\u9bae\\u7a40\\u738b \\u9bae\\u4e8e \\u8ce2\\u540e \\u7d43\\u52d5 \\u7d43\\u65b7 \\u7d43\\u6b4c \\u7d43\\u6a02 \\u7d43\\u5668 \\u7d43\\u7434 \\u7d43\\u8072 \\u7d43\\u7d22 \\u7d43\\u7dda \\u7d43\\u97f3 \\u7d43\\u8ef8 \\u54b8\\u5b89\\u5340 \\u54b8\\u6c60 \\u54b8\\u8c50 \\u54b8\\u548c \\u54b8\\u4ea8 \\u54b8\\u93e1 \\u9e79\\u9e75 \\u54b8\\u5be7 \\u54b8\\u8a8d\\u7232 \\u54b8\\u4e94\\u767b\\u4e09 \\u54b8\\u4fe1 \\u54b8\\u8208 \\u54b8\\u967d \\u54b8\\u5b9c \\u8ce2\\u540e \\u986f\\u793a\\u9336 \\u986f\\u793a\\u9418 \\u7e23\\u8a8c \\u7fa8\\u6b4e \\u9109\\u91cc \\u9109\\u613f \\u76f8\\u4f75 \\u76f8\\u6c96 \\u76f8\\u5e72 \\u76f8\\u59e6 \\u76f8\\u524b \\u76f8\\u91cc \\u76f8\\u6258 \\u9999\\u6597 \\u9999\\u4e7e \\u9999\\u69ad\\u91cc\\u5927\\u9053 \\u9999\\u83f8 \\u9999\\u90c1 \\u9999\\u7682 \\u7bb1\\u91e6 \\u8a73\\u8a3b \\u97ff\\u7d43 \\u97ff\\u9418 \\u56ae\\u5c0e \\u56ae\\u9087 \\u56ae\\u6666 \\u56ae\\u660e \\u56ae\\u6155 \\u56ae\\u5f80 \\u56ae\\u61c9 \\u66cf\\u8005 \\u9805\\u934a \\u6a61\\u6597 \\u6a61\\u5b50\\u9eaa \\u6d88\\u8cbb\\u617e \\u5bb5\\u5f81 \\u856d\\u8518 \\u856d\\u884c\\u8303\\u7bc6 \\u92b7\\u71ec \\u5c0f\\u4fbf\\u6597 \\u5c0f\\u5690 \\u5c0f\\u4e11 \\u5c0f\\u919c\\u8df3\\u6a11 \\u5c0f\\u8303 \\u5c0f\\u51e0 \\u5c0f\\u4ef7 \\u5c0f\\u6770 \\u5c0f\\u6817\\u65ec \\u5c0f\\u5343\\u4e16\\u754c \\u5c0f\\u677e \\u5c0f\\u578b\\u9418 \\u5c0f\\u4f59 \\u5c0f\\u4e91 \\u5c0f\\u6fa4\\u5f81\\u723e \\u5c0f\\u96bb \\u5c0f\\u9418 \\u6821\\u8988 \\u6b47\\u65af\\u5e95\\u91cc \\u90aa\\u4e0d\\u5e72\\u6b63 \\u90aa\\u8f9f \\u659c\\u7ba1\\u9eaa \\u978b\\u91e6 \\u5beb\\u5b57\\u6aaf \\u6cc4\\u617e \\u68b0\\u7e6b \\u8b1d\\u798f\\u677e \\u8b1d\\u91cc \\u87f9\\u9ec3\\u9b91\\u9b5a\\u9eaa \\u5fc3\\u8569\\u795e\\u6416 \\u5fc3\\u9ad8\\u906e\\u4e86\\u592a\\u967d \\u5fc3\\u82b1\\u6012\\u767c \\u5fc3\\u7e6b \\u5fc3\\u7d30\\u4f3c\\u9aee \\u5fc3\\u7d43 \\u5fc3\\u76f8\\u7e6b \\u5fc3\\u81df \\u5fc3\\u81df\\u5fa9\\u7526\\u8853 \\u8f9b\\u4e11 \\u8f9b\\u8fa3\\u9eaa \\u8f9b\\u91cc\\u5e0c \\u65b0\\u5e72 \\u65b0\\u5580\\u91cc\\u591a\\u5c3c\\u4e9e \\u65b0\\u66c6 \\u65b0\\u7d2e \\u4fe1\\u99ac\\u6e38\\u7e6e \\u4fe1\\u5929\\u6e38 \\u4fe1\\u8a17 \\u4fe1\\u6258\\u8cbf\\u6613 \\u91c1\\u9418 \\u661f\\u8fb0\\u9336 \\u661f\\u6597 \\u661f\\u8ff4 \\u661f\\u66c6 \\u661f\\u66c6\\u9336 \\u661f\\u7f85\\u96f2\\u4f48 \\u661f\\u79fb\\u6597\\u63db \\u661f\\u79fb\\u6597\\u8f49 \\u661f\\u5360\\u5b78 \\u5211\\u524b \\u5211\\u8f9f \\u5211\\u4e8e \\u5f62\\u55ae\\u5f71\\u96bb \\u5f62\\u5b64\\u5f71\\u96bb \\u5f62\\u5f71\\u76f8\\u5f14 \\u8208\\u96f2\\u4f48\\u96e8 \\u5016\\u81e3 \\u5016\\u5b58 \\u5016\\u611f\\u6b4c\\u59ec \\u5016\\u9032 \\u5016\\u514d \\u5016\\u5e78 \\u5e78\\u904b \\u5e78\\u904b\\u9b0d \\u6027\\u6f51\\u51f6\\u9811 \\u6027\\u617e \\u59d3\\u5cb3 \\u51f6\\u5fb7 \\u51f6\\u5730 \\u51f6\\u591a\\u5409\\u5c11 \\u51f6\\u670d \\u51f6\\u602a \\u51f6\\u8017 \\u51f6\\u8352 \\u51f6\\u79ae \\u51f6\\u9580 \\u51f6\\u9006 \\u51f6\\u5e74 \\u51f6\\u5e74\\u9951\\u6b72 \\u51f6\\u6c23 \\u51f6\\u65e5 \\u51f6\\u715e \\u51f6\\u8eab \\u51f6\\u795e \\u51f6\\u4e8b \\u51f6\\u8c4e \\u51f6\\u6b7b \\u51f6\\u8086 \\u51f6\\u6b72 \\u51f6\\u4fe1 \\u51f6\\u8a0a \\u51f6\\u71c4 \\u51f6\\u5b85 \\u51f6\\u5146 \\u51f6\\u7d42\\u9699\\u672b \\u96c4\\u6597\\u6597 \\u4f11\\u5d19\\u6e56 \\u4f11\\u617c \\u4fee\\u9b0d\\u5200 \\u4fee\\u6770\\u6977 \\u8129\\u91d1 \\u8129\\u656c \\u8129\\u540d \\u8129\\u812f \\u8129\\u6f64 \\u8129\\u6a3e \\u5bbf\\u677e \\u79c0\\u9aee \\u8896\\u91e6 \\u8896\\u4e00\\u6372 \\u5401\\u5488 \\u5401\\u55df \\u5401\\u4e86 \\u5401\\u6c23 \\u5401\\u5606 \\u5401\\u5401 \\u5401\\u5653 \\u5401\\u4fde \\u9b1a\\u9aee \\u9b1a\\u6839 \\u9b1a\\u5f8c\\u6c34 \\u9b1a\\u9b0d \\u9b1a\\u9be8 \\u9b1a\\u6bdb \\u9b1a\\u7709 \\u9808\\u5f4c\\u5c71 \\u9b1a\\u9aef \\u9b1a\\u9bca \\u9b1a\\u751f \\u9b1a\\u9b1a \\u9b1a\\u5b50 \\u865b\\u6c96 \\u589f\\u91cc \\u5f90\\u532f \\u5f90\\u5f59\\u5340 \\u5f90\\u5bb6\\u5f59 \\u5f90\\u4f59\\u5049 \\u5f90\\u8b9a\\u6607 \\u8a31\\u4eba\\u4e30 \\u8a31\\u8056\\u6770 \\u8a31\\u9858 \\u8a31\\u613f\\u8d77\\u7d93 \\u65ed\\u65e5\\u521d\\u6607 \\u5379\\u5178 \\u5379\\u8352 \\u5379\\u91d1 \\u7e8c\\u7c3d \\u7e8c\\u7d43 \\u84c4\\u9aee \\u84c4\\u9b0d \\u84c4\\u9b1a \\u5ba3\\u4f48 \\u5ba3\\u50b3\\u9031 \\u55a7\\u9b28 \\u7384\\u8518 \\u7384\\u6b66\\u5ca9 \\u7384\\u937c \\u7384\\u88fd \\u61f8\\u81c2\\u6a11 \\u61f8\\u6a11 \\u61f8\\u9418 \\u61f8\\u5191 \\u65cb\\u4e7e\\u8f49\\u5764 \\u65cb\\u8ff4 \\u65cb\\u91cc \\u65cb\\u8f9f \\u524a\\u9aee \\u524a\\u9eaa \\u859b\\u677e\\u4e7e \\u8e05\\u9580\\u77ad\\u6236 \\u96ea\\u7a97\\u87a2\\u51e0 \\u96ea\\u677e \\u8840\\u7e94\\u4e7e \\u8840\\u8518 \\u8840\\u5df2\\u4e7e \\u8840\\u7665 \\u71fb\\u8349 \\u85b0\\u98a8 \\u718f\\u98a8\\u5f90\\u4f86 \\u718f\\u8150 \\u71fb\\u8d6b \\u71fb\\u9ed1 \\u71fb\\u96de \\u71fb\\u70e4 \\u718f\\u7c60 \\u71fb\\u946a \\u71fb\\u4eba \\u71fb\\u8089 \\u85b0\\u9676 \\u718f\\u9676\\u6210\\u6027 \\u718f\\u5929 \\u718f\\u7fd2 \\u718f\\u718f \\u718f\\u8863\\u8349 \\u71fb\\u9b5a\\u5152 \\u718f\\u70dd \\u71fb\\u84b8 \\u718f\\u84b8\\u5291 \\u718f\\u84b8\\u5ba4 \\u718f\\u88fd \\u85b0\\u8129 \\u5de1\\u8ff4 \\u5de1\\u8ff4\\u6aa2\\u67e5 \\u58d3\\u687f \\u58d3\\u529b\\u9336 \\u58d3\\u9eaa\\u68cd \\u58d3\\u5191\\u5b50 \\u9d09\\u7aa9\\u88cf\\u51fa\\u9cf3\\u51f0 \\u5d16\\u5e7f \\u555e\\u5b50\\u6258\\u5922 \\u96c5\\u6e38 \\u96c5\\u7dfb \\u96c5\\u7b51 \\u4e9e\\u91cc \\u4e9e\\u7f8e\\u5c3c\\u4e9e\\u66c6 \\u4e9e\\u9752\\u76c3 \\u4e9e\\u677e\\u68ee \\u4e9e\\u6d32\\u76c3 \\u56a5\\u4e0d\\u4e86 \\u56a5\\u5230 \\u54bd\\u4e7e \\u56a5\\u808c \\u56a5\\u9032 \\u56a5\\u82e6\\u541e\\u7518 \\u56a5\\u4e86 \\u56a5\\u6c23 \\u56a5\\u553e \\u56a5\\u4e0b \\u56a5\\u7740 \\u56a5\\u4f4f \\u83f8\\u8349 \\u83f8\\u5ee0 \\u83f8\\u888b \\u83f8\\u888b\\u687f\\u5152 \\u83f8\\u8482 \\u83f8\\u6597 \\u7159\\u687f \\u83f8\\u7f38 \\u7159\\u7ba1 \\u7159\\u7ba1\\u9eaa \\u83f8\\u5bb3 \\u83f8\\u7070 \\u83f8\\u9e7c \\u83f8\\u7981 \\u83f8\\u9152 \\u83f8\\u6372 \\u83f8\\u6c11 \\u83f8\\u8fb2 \\u83f8\\u5c41\\u80a1 \\u83f8\\u5708 \\u83f8\\u7d72 \\u83f8\\u982d \\u7159\\u71fb \\u7159\\u718f\\u706b\\u71ce \\u83f8\\u869c \\u83f8\\u8449 \\u83f8\\u7d19\\u5e97 \\u83f8\\u5634 \\u814c\\u88cf\\u5df4\\u81e2 \\u814c\\u81e2 \\u814c\\u4436 \\u9183\\u88fd \\u56b4\\u4e91\\u8fb2 \\u8a00\\u8faf\\u800c\\u786e \\u8a00\\u5927\\u800c\\u5938 \\u8a00\\u4e91 \\u5ca9\\u5009\\u4f7f\\u7bc0\\u5718 \\u5ca9\\u5c64 \\u5ca9\\u7240 \\u5dd6\\u6751 \\u5ca9\\u6751\\u660e\\u61b2 \\u5ca9\\u57fa \\u5ca9\\u6f3f \\u5ca9\\u6f3f\\u5ca9 \\u5ca9\\u7901 \\u5ca9\\u7028\\u5065 \\u5ca9\\u8108 \\u5ca9\\u68c9 \\u5ca9\\u5708 \\u5ca9\\u6eb6 \\u5ca9\\u77f3 \\u5ca9\\u571f \\u5ca9\\u5c51 \\u5ca9\\u5fc3 \\u5ca9\\u9e7d \\u5ca9\\u7f8a \\u6cbf\\u9580\\u6258\\u9262 \\u7814\\u88fd \\u7b75\\u51e0 \\u773c\\u4e7e \\u773c\\u82b1\\u77ad\\u4e82 \\u773c\\u524d\\u82b1\\u767c \\u773c\\u75e0 \\u5043\\u4ec6 \\u5043\\u677e \\u8c54\\u540e \\u5501\\u5f14 \\u9a57\\u8988 \\u995c\\u65bc\\u6e38\\u6a02 \\u71d5\\u51e0 \\u63da\\u7a40 \\u7f8a\\u9b1a\\u7621 \\u967d\\u6625\\u9eaa \\u967d\\u66c6 \\u694a\\u91c7\\u59ae \\u694a\\u6de9\\u793a\\u7bc4\\u5340 \\u694a\\u65e5\\u677e \\u694a\\u58eb\\u6a11 \\u694a\\u677e \\u694a\\u7526\\u68e3 \\u694a\\u6587\\u8a8c \\u6d0b\\u8518 \\u6d0b\\u9eaa \\u6d0b\\u83f8 \\u990a\\u9aee \\u5996\\u540e \\u5996\\u91cc\\u5996\\u6c23 \\u8170\\u687f \\u8170\\u9593\\u7e6b \\u8170\\u91e6 \\u8170\\u75e0 \\u8170\\u7e6b \\u8170\\u4e00\\u6372 \\u50e5\\u5929\\u4e4b\\u5016 \\u50e5\\u5016 \\u59da\\u91c7\\u7a4e \\u59da\\u6607\\u5fd7 \\u6416\\u76ea \\u6416\\u687f \\u54ac\\u8591\\u5477\\u918b \\u85e5\\u800c\\u7652 \\u85e5\\u9eaa\\u5152 \\u85e5\\u7528\\u690d\\u7269 \\u85e5\\u7682 \\u8981\\u4e7e\\u4e86 \\u8036\\u5b43 \\u6930\\u68d7\\u4e7e \\u564e\\u9951 \\u723a\\u98ef\\u5b43\\u7fb9 \\u723a\\u7fb9\\u5b43\\u98ef \\u723a\\u5b43 \\u4e5f\\u6597\\u4e86\\u81bd \\u91ce\\u8591 \\u8449\\u6b65\\u6a11 \\u53f6\\u606d\\u5f18 \\u8449\\u8f2a\\u6a5f\\u68b0 \\u8449\\u8449 \\u8449\\u53f6\\u7439 \\u53f6\\u97f3 \\u53f6\\u97fb \\u8449\\u72c0\\u690d\\u7269 \\u8449\\u5b50 \\u8449\\u5b50\\u6770 \\u8449\\u5b50\\u83f8 \\u9801\\u5ca9 \\u591c\\u5149\\u9336 \\u6db2\\u6676\\u9336 \\u6db2\\u9eaa \\u4e00\\u8868\\u4eba\\u7269 \\u4e00\\u5225 \\u4e00\\u5f46\\u982d \\u4e00\\u4f75 \\u4e00\\u6c96\\u6027\\u5b50 \\u4e00\\u9f63\\u5287 \\u4e00\\u9f63\\u5b50 \\u4e00\\u6597 \\u4e00\\u6597\\u6597 \\u4e00\\u767c \\u4e00\\u9aee\\u5343\\u921e \\u4e00\\u9aee\\u4e4b\\u5dee \\u4e00\\u9aee\\u4e4b\\u9593 \\u4e00\\u6746 \\u4e00\\u687f\\u9032\\u6d1e \\u4e00\\u5e72 \\u4e00\\u4e7e\\u800c\\u76e1 \\u4e00\\u4e7e\\u4e8c\\u6de8 \\u4e00\\u7b87 \\u4e00\\u934b\\u9eaa \\u4e00\\u6beb\\u4e00\\u9aee \\u4e00\\u865f\\u6728\\u687f \\u4e00\\u9b28 \\u4e00\\u584a\\u9eaa \\u4e00\\u91d0\\u4e00\\u6beb \\u4e00\\u91cc \\u4e00\\u7c3d \\u4e00\\u65e5\\u53eb\\u5b43 \\u4e00\\u6a39\\u767e\\u7a6b \\u4e00\\u7f48 \\u4e00\\u7f48\\u7f48 \\u4e00\\u5929\\u9418 \\u4e00\\u6258\\u6c23 \\u4e00\\u6258\\u982d \\u4e00\\u7269\\u524b\\u4e00\\u7269 \\u4e00\\u8b9a \\u4e00\\u7d2e \\u4e00\\u96bb \\u4e00\\u9031 \\u4f0a\\u5e9c\\u9eaa \\u4f0a\\u62c9\\u514b \\u4f0a\\u91cc\\u5947 \\u4f0a\\u9eaa \\u4f0a\\u65af\\u862d\\u66c6 \\u4f0a\\u4e8e\\u80e1\\u5e95 \\u4f0a\\u4e8e\\u6e56\\u5e95 \\u8863\\u896c \\u8863\\u4e0d\\u517c\\u91c7 \\u8863\\u4e0d\\u5b8c\\u91c7 \\u8863\\u4e0d\\u91cd\\u91c7 \\u8863\\u6597\\u6728 \\u8863\\u9326\\u591c\\u6e38 \\u8863\\u9326\\u665d\\u6e38 \\u8863\\u91e6 \\u8863\\u886b\\u5df2\\u4e7e \\u8863\\u7269\\u6f38\\u4e7e \\u8863\\u7269\\u5df2\\u4e7e \\u91ab\\u6258 \\u566b\\u5401\\u6232 \\u5b9c\\u4e91 \\u80f0\\u81df \\u79fb\\u661f\\u63db\\u6597 \\u907a\\u50b3\\u9418 \\u907a\\u8451\\u83f2\\u91c7 \\u907a\\u8e5f \\u7591\\u4fc2 \\u4e59\\u4e11 \\u5df2\\u4fc2 \\u5df2\\u4f54 \\u5df2\\u5360\\u7b97 \\u4ee5\\u529f\\u8986\\u904e \\u87fb\\u540e \\u501a\\u6258 \\u501a\\u9591 \\u87fb\\u540e \\u5104\\u96bb \\u7fa9\\u6c23\\u5e72\\u9704 \\u4ee1\\u6817 \\u4ea6\\u6368\\u4e0b \\u4ea6\\u4e91 \\u7570\\u91c7 \\u7570\\u85b9\\u540c\\u5c91 \\u6291\\u63da\\u6607\\u964d\\u6027 \\u9091\\u91cc \\u8b6f\\u88fd \\u8b6f\\u8a3b \\u9038\\u6e38\\u81ea\\u6063 \\u9038\\u7dfb \\u610f\\u5927\\u5229\\u76f4\\u9eaa \\u610f\\u9eaa \\u56e0\\u59e6\\u6210\\u5b55 \\u9670\\u4e7e \\u9670\\u66c6 \\u9670\\u5360 \\u8335\\u85c9 \\u5ed5\\u5e87 \\u5ed5\\u76e3 \\u5ed5\\u751f \\u5ed5\\u8972 \\u97f3\\u8072\\u5982\\u9418 \\u541f\\u6b4e \\u9280\\u76c3 \\u9280\\u9aee \\u9280\\u7d72\\u6372 \\u9280\\u9b1a \\u9280\\u88fd \\u9280\\u7843 \\u6deb\\u617e \\u569a\\u95c7 \\u96b1\\u51e0 \\u98ee\\u5191 \\u5370\\u88fd \\u82f1\\u91cc \\u6afb\\u82b1\\u76c3 \\u9df9\\u9d70 \\u7e08\\u8ff4 \\u7e08\\u7e6b \\u5f71\\u540e \\u5f71\\u8a55\\u4eba\\u9031 \\u5f71\\u5360 \\u5f71\\u96bb\\u5f62\\u55ae \\u61c9\\u6709\\u76e1\\u6709 \\u61c9\\u5360 \\u61c9\\u9418 \\u786c\\u9eaa \\u786c\\u56a5 \\u4f63\\u923f \\u4f63\\u91d1 \\u4f63\\u9322 \\u5eb8\\u95c7 \\u6c38\\u66c6 \\u6c38\\u5fd7 \\u6c38\\u8a8c\\u4e0d\\u5fd8 \\u8a60\\u6b4e \\u6cf3\\u6c23\\u9418 \\u6538\\u617c\\u76f8\\u95dc \\u60a0\\u95c7 \\u60a0\\u76ea \\u60a0\\u6d3b\\u9e97\\u7dfb \\u60a0\\u60a0\\u76ea\\u76ea \\u60a0\\u904a \\u60a0\\u904a\\u9336 \\u5c24\\u91cc \\u7531\\u4f59 \\u7336\\u5982\\u9336 \\u7336\\u5982\\u9418 \\u7336\\u592a\\u66c6 \\u6cb9\\u9eaa \\u6cb9\\u677e \\u839c\\u9eaa \\u6e38\\u5875 \\u6e38\\u51fa \\u6e38\\u5230 \\u6e38\\u82b3\\u4f86 \\u904a\\u8702\\u6d6a\\u8776 \\u904a\\u904e \\u6e38\\u904e\\u4f86 \\u6e38\\u904e\\u53bb \\u6e38\\u7693\\u744b \\u6e38\\u9d3b\\u660e \\u6e38\\u9d3b\\u5112 \\u6e38\\u56de \\u904a\\u64ca \\u6e38\\u64ca\\u968a \\u6e38\\u64ca\\u5340 \\u6e38\\u64ca\\u624b \\u6e38\\u64ca\\u6230 \\u904a\\u9032 \\u6e38\\u9032\\u4f86 \\u6e38\\u9032\\u53bb \\u6e38\\u4f86 \\u6e38\\u4f86\\u6e38\\u53bb \\u904a\\u6a02\\u5668 \\u904a\\u96e2\\u96fb\\u5b50 \\u6e38\\u9f8d \\u6e38\\u5c65 \\u904a\\u7f8e\\u6d32 \\u6e38\\u660e\\u91d1 \\u904a\\u7267\\u6c11\\u65cf \\u6e38\\u4e43\\u6d77 \\u904a\\u6b50\\u6d32 \\u6e38\\u6cee \\u6e38\\u79bd\\u985e \\u6e38\\u53bb \\u6e38\\u50e7\\u6522\\u4f4f\\u6301 \\u6e38\\u4e0a \\u6e38\\u6c34 \\u6e38\\u5b8c \\u6e38\\u6587\\u5b8f \\u904a\\u932b \\u6e38\\u932b\\u5764 \\u6e38\\u932b\\u6606 \\u6e38\\u932b\\u5803 \\u904a\\u6232 \\u904a\\u6232\\u6a5f \\u904a\\u6232\\u6a5f\\u6aaf \\u6e38\\u4e0b \\u904a\\u4e9e\\u6d32 \\u6e38\\u76c8\\u9686 \\u6e38\\u6cf3 \\u6e38\\u56ff\\u502b \\u6e38\\u9b5a \\u6e38\\u662d\\u6b3d \\u6e38\\u5fd7\\u5b8f \\u904a\\u4e2d\\u570b \\u53cb\\u4e8e \\u6709\\u91c7 \\u6709\\u4ec7\\u4e0d\\u5831\\u975e\\u541b\\u5b50 \\u6709\\u9f63\\u597d\\u6232 \\u6709\\u9aee\\u982d\\u9640\\u5bfa \\u6709\\u5920\\u8b9a \\u6709\\u5118\\u6709\\u8b93 \\u6709\\u9032\\u6709\\u51fa \\u6709\\u4e91 \\u6709\\u5fb5 \\u6709\\u5f81\\u7121\\u6230 \\u6709\\u96bb \\u7f91\\u91cc \\u7256\\u91cc \\u53c8\\u5e79 \\u53c8\\u4e7e\\u53c8\\u786c \\u53c8\\u4e91 \\u5e7c\\u6258 \\u8a98\\u59e6 \\u8fc2\\u8ff4 \\u7d06\\u8ff4 \\u4e8e\\u8c9d\\u723e \\u4e8e\\u658c \\u4e8e\\u6ce2 \\u4e8e\\u6668\\u6960 \\u4e8e\\u6210\\u9f8d \\u4e8e\\u6210\\u9f8d \\u4e8e\\u5f9e\\u6fc2 \\u4e8e\\u5f9e\\u6fc2 \\u4e8e\\u5927\\u5bf6 \\u4e8e\\u4e39 \\u4e8e\\u9053\\u6cc9 \\u4e8e\\u5fb7\\u6d77 \\u4e8e\\u723e\\u5c91 \\u4e8e\\u723e\\u6839 \\u4e8e\\u723e\\u91cc\\u514b \\u4e8e\\u723e\\u91cc\\u514b \\u4e8e\\u98db \\u4e8e\\u98a8\\u653f \\u4e8e\\u9cf3\\u6850 \\u4e8e\\u9cf3\\u81f3 \\u4e8e\\u683c \\u4e8e\\u6839\\u5049 \\u4e8e\\u5149\\u9060 \\u4e8e\\u5ee3\\u6d32 \\u4e8e\\u6b78 \\u65bc\\u570b \\u4e8e\\u570b\\u6968 \\u4e8e\\u6d77\\u6d0b \\u4e8e\\u6f22\\u8d85 \\u4e8e\\u6d69\\u5a01 \\u4e8e\\u8861 \\u4e8e\\u6d2a\\u5340 \\u4e8e\\u5316\\u864e \\u4e8e\\u6703\\u6cf3 \\u4e8e\\u6167 \\u4e8e\\u5409 \\u4e8e\\u4f73\\u5349 \\u65bc\\u5bb6 \\u4e8e\\u5bb6\\u5821 \\u4e8e\\u5805 \\u4e8e\\u5805 \\u4e8e\\u6c5f\\u9707 \\u4e8e\\u55df \\u4e8e\\u5091 \\u4e8e\\u7981 \\u4e8e\\u9756 \\u4e8e\\u5a1f \\u4e8e\\u8ecd \\u4e8e\\u8ecd \\u4e8e\\u5eb7\\u9707 \\u4e8e\\u514b\\u52d2 \\u4e8e\\u5b54\\u517c \\u4e8e\\u52d2 \\u4e8e\\u91cc\\u5bdf \\u4e8e\\u51cc\\u594e \\u4e8e\\u5195 \\u4e8e\\u654f \\u4e8e\\u660e\\u6fe4 \\u4e8e\\u9ed8\\u5967 \\u4e8e\\u5a1c \\u4e8e\\u54c1\\u6d77 \\u4e8e\\u5947\\u5eab\\u675c\\u514b \\u4e8e\\u8b19 \\u4e8e\\u8b19 \\u4e8e\\u6674 \\u4e8e\\u4ec1\\u6cf0 \\u4e8e\\u82e5\\u6728 \\u4e8e\\u5c71 \\u4e8e\\u614e\\u884c \\u4e8e\\u5f0f\\u679a \\u4e8e\\u6a39\\u6f54 \\u4e8e\\u5e25 \\u4e8e\\u5e25 \\u4e8e\\u96d9\\u6208 \\u4e8e\\u601d \\u65bc\\u65af \\u4e8e\\u65af\\u9054\\u723e \\u4e8e\\u65af\\u9054\\u723e \\u4e8e\\u65af\\u7d0d\\u723e\\u65af\\u8c9d\\u91cc \\u4e8e\\u65af\\u7d0d\\u723e\\u65af\\u8c9d\\u91cc \\u4e8e\\u65af\\u5854\\u5fb7 \\u4e8e\\u7d20\\u79cb \\u4e8e\\u81fa\\u7159 \\u4e8e\\u6fe4 \\u4e8e\\u6fe4 \\u4e8e\\u7279\\u68ee \\u4e8e\\u5929\\u4ec1 \\u4e8e\\u7530 \\u4e8e\\u95d0 \\u4e8e\\u97cb\\u65af\\u5c48\\u840a \\u4e8e\\u97cb\\u65af\\u5c48\\u840a \\u4e8e\\u5049\\u570b \\u4e8e\\u897f\\u7ff0 \\u4e8e\\u6e58\\u862d \\u4e8e\\u5c0f\\u5f64 \\u4e8e\\u5c0f\\u5049 \\u4e8e\\u6b23\\u6e90 \\u4e8e\\u59d3 \\u4e8e\\u79c0\\u654f \\u4e8e\\u5f90 \\u4e8e\\u5b78\\u5fe0 \\u4e8e\\u852d\\u9716 \\u4e8e\\u6c38\\u6ce2 \\u4e8e\\u53f3\\u4efb \\u4e8e\\u5e7c\\u8ecd \\u4e8e\\u4e8e \\u4e8e\\u9918\\u66f2\\u6298 \\u4e8e\\u9918\\u66f2\\u6298 \\u4e8e\\u7389\\u7acb \\u4e8e\\u9060\\u5049 \\u4e8e\\u8d8a \\u4e8e\\u6a02 \\u4e8e\\u6fa4\\u723e \\u4e8e\\u8d08 \\u4e8e\\u8d08 \\u4e8e\\u5360\\u5143 \\u4e8e\\u632f \\u4e8e\\u9707\\u74b0 \\u4e8e\\u9707\\u5bf0 \\u4e8e\\u6b63\\u660c \\u4e8e\\u6b63\\u6607 \\u4e8e\\u5fd7\\u5be7 \\u4e8e\\u5bd8 \\u4e8e\\u5b50\\u5343 \\u6c61\\u884a \\u4f59\\u78a7\\u82ac \\u4f59\\u79c9\\u8afa \\u4f59\\u70b3\\u8ce2 \\u4f59\\u71e6\\u69ae \\u4f59\\u8eca \\u4f59\\u767c\\u63da \\u9918\\u5e72 \\u4f59\\u6b4c\\u6ec4 \\u9918\\u5149 \\u4f59\\u5149\\u751f \\u4f59\\u5149\\u4e2d \\u4f59\\u862d\\u9999 \\u9918\\u91cc \\u4f59\\u7537 \\u4f59\\u73ee\\u7433 \\u9918\\u4e09 \\u4f59\\u4e09\\u52dd \\u4f59\\u4e09\\u52dd \\u4f59\\u4e0a\\u6c85 \\u9918\\u601d \\u4f59\\u601d\\u654f \\u4f59\\u5929 \\u9918\\u5a01 \\u4f59\\u5a01\\u5fb7 \\u4f59\\u6587 \\u4f59\\u543e\\u93ae \\u4f59\\u8ce2\\u660e \\u4f59\\u61b2\\u5b97 \\u4f59\\u7b71\\u840d \\u4f59\\u59d3 \\u4f59\\u79c0\\u83c1 \\u4f59\\u96ea\\u862d \\u4f59\\u96ea\\u660e \\u4f59\\u82f1\\u6642 \\u4f59\\u4f59 \\u4f59\\u82d1\\u7dba \\u4f59\\u6708 \\u4f59\\u653f\\u61b2 \\u9918\\u96bb \\u9918\\u5b50 \\u4f59\\u5b50\\u660e \\u9b5a\\u4e7e \\u9b5a\\u9c57\\u677e \\u9b5a\\u6e38\\u91dc\\u5e95 \\u9b5a\\u6e38\\u91dc\\u4e2d \\u9b5a\\u5191 \\u903e\\u9591\\u8569\\u6aa2 \\u611a\\u95c7 \\u8f3f\\u5c38 \\u8207\\u570b\\u540c\\u4f11 \\u5b87\\u5b99\\u8a8c \\u8a9e\\u5f59 \\u8a9e\\u4e91 \\u7389\\u6597 \\u7389\\u91cc \\u7389\\u66c6 \\u7389\\u7c73\\u9b1a \\u7389\\u88fd \\u90c1\\u9054\\u592b \\u90c1\\u99a5 \\u90c1\\u96e2\\u5b50 \\u90c1\\u674e \\u90c1\\u70c8 \\u90c1\\u7a46 \\u90c1\\u6a38 \\u9b31\\u90c1 \\u90c1\\u90c1\\u83f2\\u83f2 \\u90c1\\u90c1\\u9752\\u9752 \\u90c1\\u54c9 \\u9810\\u88fd \\u617e\\u6d77 \\u617e\\u58d1\\u96e3\\u586b \\u617e\\u706b \\u6b32\\u52a0\\u4e4b\\u7f6a \\u617e\\u52a0\\u4e4b\\u7f6a\\u4f55\\u60a3\\u7121\\u8a5e \\u617e\\u4ee4\\u667a\\u660f \\u617e\\u5ff5 \\u617e\\u5973 \\u6b32\\u6c42 \\u617e\\u6c42\\u4e0d\\u6eff \\u617e\\u5584\\u5176\\u4e8b\\u5fc5\\u5148\\u5229\\u5176\\u5668 \\u617e\\u671b \\u617e\\u969c \\u79a6\\u6575 \\u79a6\\u5bd2 \\u79a6\\u5bc7 \\u5fa1\\u53f2\\u5927\\u592b \\u79a6\\u4fae \\u5fa1\\u88fd \\u5bd3\\u7981\\u65bc\\u5f81 \\u7652\\u5408 \\u5143\\u540e \\u8881\\u53cb\\u8303 \\u8881\\u4e8e\\u4ee4 \\u539f\\u9418 \\u539f\\u5b50\\u9418 \\u9060\\u7e23\\u7e94\\u81f3 \\u9060\\u5f81 \\u613f\\u800c\\u606d \\u613f\\u6a38 \\u66f0\\u4e91 \\u7d04\\u7ff0\\u677e \\u6708\\u66c6 \\u6708\\u76f8\\u9336 \\u6708\\u5ca9 \\u5cb3\\u98db \\u5cb3\\u58b3 \\u5cb3\\u7236 \\u5cb3\\u5bb6 \\u5cb3\\u73c2 \\u5cb3\\u5edf \\u5cb3\\u6bcd \\u5cb3\\u6c0f \\u5cb3\\u967d \\u5cb3\\u96f2 \\u5cb3\\u4e08 \\u7185\\u6597 \\u4e91\\u57ce\\u5340 \\u4e91\\u723e \\u96f2\\u7ffb\\u96e8\\u8986 \\u4e91\\u4f55 \\u4e91\\u4e4e \\u4e91\\u7136 \\u96f2\\u541e \\u96f2\\u541e\\u9eaa \\u4e91\\u7232 \\u4e91\\u7232 \\u4e91\\u6eaa \\u96f2\\u9b1a \\u4e91\\u4e91 \\u8553\\u8f1d \\u8553\\u85b9 \\u8553\\u85b9 \\u8018\\u76ea \\u5141\\u51c6 \\u9695\\u7a6b \\u919e\\u85c9 \\u860a\\u85c9 \\u71a8\\u6597 \\u96dc\\u5408\\u9eaa\\u5152 \\u96dc\\u91ac\\u9eaa \\u96dc\\u9eaa \\u96dc\\u8a8c \\u518d\\u88fd \\u5728\\u8988 \\u8b9a\\u5504 \\u8b9a\\u4e0d\\u7d55\\u53e3 \\u8b9a\\u8a5e \\u8b9a\\u8fad \\u8b9a\\u9053 \\u8b9a\\u7684 \\u8b9a\\u6b4c \\u8b9a\\u500b\\u4e0d \\u8b9a\\u53e3\\u4e0d \\u8b9a\\u6a02 \\u8b9a\\u4e86 \\u8b9a\\u5169\\u53e5 \\u8b9a\\u7f8e \\u8b9a\\u4f69 \\u8b9a\\u8cde \\u8b9a\\u980c \\u8b9a\\u6b4e \\u8b9a\\u6b4e \\u8b9a\\u6211 \\u8b9a\\u7fa8 \\u8b9a\\u8a31 \\u8b9a\\u63da \\u8b9a\\u4e00\\u53e5 \\u8b9a\\u4e00\\u8072 \\u8b9a\\u4e00\\u8b9a \\u8b9a\\u8a9e \\u8b9a\\u8b7d \\u8b9a\\u81ea\\u5df1 \\u9ad2\\u9aee \\u81df\\u8151 \\u81df\\u5668 \\u81e7\\u7a40\\u4ea1\\u7f8a \\u947f\\u5dd6 \\u947f\\u5ca9\\u6a5f \\u65e9\\u8d77\\u7684\\u9ce5\\u5152\\u6709\\u87f2\\u5403 \\u65e9\\u5360\\u52ff\\u85e5 \\u7682\\u5316 \\u7682\\u83a2 \\u9020\\u9eb4 \\u9020\\u5ca9\\u7926\\u7269 \\u9020\\u9418 \\u8b5f\\u52d5 \\u8b5f\\u8a50 \\u6fa4\\u91cc\\u53ef \\u6fa4\\u9e75 \\u6fa4\\u6ef2\\u7055\\u800c\\u4e0b\\u964d \\u7d2e\\u6210 \\u7d2e\\u5e36 \\u7d2e\\u56ee \\u624e\\u723e\\u9054\\u91cc \\u7d2e\\u6839 \\u7d2e\\u88f9 \\u7d2e\\u597d \\u7d2e\\u8173 \\u7d2e\\u7d50 \\u7d2e\\u7dca \\u7d2e\\u4e86 \\u7d2e\\u99ac\\u524c\\u4e01 \\u7d2e\\u99ac\\u9b6f\\u4e01 \\u7d2e\\u6b50\\u7d2e\\u7fc1 \\u7d2e\\u8d77 \\u7d2e\\u4e0a \\u7d2e\\u5be6 \\u7d2e\\u9435 \\u7d2e\\u4e0b \\u7d2e\\u7dda\\u5e36 \\u7d2e\\u71df \\u7d2e\\u5728 \\u624e\\u624e \\u7d2e\\u7d2e\\u5be6\\u5be6 \\u7d2e\\u8a50 \\u7d2e\\u5be8 \\u672d\\u5938\\u5a01 \\u8ecb\\u88fd \\u70b8\\u71ec \\u70b8\\u91ac\\u9eaa \\u69a8\\u4e7e \\u8a79\\u8a8c\\u7dad \\u859d\\u8514 \\u5c55\\u91c7 \\u5360\\u62dc \\u5360\\u535c \\u5360\\u57ce \\u5360\\u65b7 \\u5360\\u623f \\u5360\\u98a8\\u4f7f\\u5e06 \\u5360\\u9cf3 \\u5360\\u5366 \\u5360\\u5019 \\u5360\\u8ab2 \\u4f54\\u4e86 \\u5360\\u4e86\\u535c \\u5360\\u5922 \\u5360\\u5f37 \\u5360\\u89aa \\u5360\\u4eba \\u5360\\u4e0a \\u5360\\u5c04 \\u5360\\u8eab \\u4f54\\u4e16\\u754c \\u5360\\u7b6e \\u4f54\\u4e07 \\u5360\\u661f \\u5360\\u9a57 \\u4f54\\u6709 \\u5360\\u6709\\u4e94\\u4e0d\\u9a57 \\u4f54\\u6709\\u617e \\u4f54\\u4e3b \\u5360\\u4e3b\\u5c0e\\u5730\\u4f4d \\u6230\\u7565\\u4f19\\u4f34 \\u7ad9\\u4e7e\\u5cb8\\u5152 \\u5f35\\u6597\\u8f1d \\u5f35\\u57fa\\u90c1 \\u5f35\\u6728\\u677e \\u5f35\\u7434\\u677e \\u5f35\\u4e09\\u4e30 \\u5f35\\u6587\\u677e \\u5f35\\u5fd7 \\u5f35\\u8a8c\\u5bb6 \\u9577\\u9aee \\u9577\\u5e72\\u66f2 \\u9577\\u5e72\\u5df7 \\u9577\\u9b0d \\u9577\\u51e0 \\u9577\\u66c6 \\u9577\\u7e69\\u7e6b\\u666f \\u9577\\u7e69\\u7e6b\\u65e5 \\u9577\\u58fd\\u83f8 \\u9577\\u5401 \\u9577\\u9b1a \\u9577\\u5f81 \\u4e08\\u6bcd\\u5b43 \\u4ed7\\u6258 \\u8d99\\u5764\\u90c1 \\u7167\\u7c3d \\u906e\\u8986 \\u647a\\u5c3a \\u647a\\u758a \\u647a\\u597d \\u647a\\u5408 \\u647a\\u75d5 \\u6298\\u7bc0\\u8b80\\u66f8 \\u6298\\u9032 \\u647a\\u9032\\u4f86 \\u647a\\u9032\\u53bb \\u647a\\u7bf7 \\u647a\\u88d9 \\u647a\\u6247 \\u6298\\u6aaf \\u647a\\u68af \\u647a\\u9801 \\u647a\\u6905 \\u647a\\u7d19 \\u647a\\u5b50 \\u647a\\u594f \\u9019\\u9f63\\u96fb\\u5f71 \\u9019\\u9f63\\u597d\\u6232 \\u9019\\u9f63\\u5287 \\u9019\\u96bb \\u9019\\u9418 \\u937c\\u782d \\u937c\\u95dc \\u937c\\u82a5\\u76f8\\u6295 \\u937c\\u7078 \\u937c\\u53e3 \\u91dd\\u91e6 \\u937c\\u8292 \\u91dd\\u8449\\u690d\\u7269 \\u73cd\\u73e0\\u5ca9 \\u7504\\u540e \\u6795\\u85c9 \\u6795\\u84c6 \\u7e1d\\u7dfb \\u9b12\\u9aee \\u632f\\u76ea \\u632f\\u6770 \\u8cd1\\u9951 \\u9707\\u76ea \\u93ae\\u69ae\\u91cc \\u9eee\\u95c7 \\u5f81\\u5875 \\u5f81\\u7a0b \\u5f81\\u4f10 \\u5f81\\u5e06 \\u5f81\\u592b \\u5f81\\u670d \\u5f81\\u99d5 \\u5f81\\u527f \\u5f81\\u6582 \\u5f81\\u99ac \\u5f81\\u65c6 \\u5fb5\\u8f9f \\u5f81\\u886b \\u5f81\\u620d \\u5f81\\u8a0e \\u5f81\\u9014 \\u5f81\\u8863 \\u5f81\\u6230 \\u5f81\\u5f78 \\u84b8\\u4e7e \\u84b8\\u9eaa \\u6574\\u9f63\\u5287 \\u6574\\u767c \\u6574\\u9aee\\u7528\\u54c1 \\u6574\\u96bb \\u6574\\u9031 \\u6b63\\u6a11 \\u6b63\\u51f6 \\u912d\\u5bb6\\u9418 \\u912d\\u51f1\\u4e91 \\u912d\\u69ae\\u677e \\u912d\\u6613\\u91cc \\u912d\\u4f59\\u8c6a \\u7665\\u7d50 \\u912d\\u51f1\\u4e91 \\u4e4b\\u617e \\u4e4b\\u9418 \\u652f\\u687f \\u652f\\u52aa\\u5e72 \\u652f\\u83f8 \\u53ea\\u67e5 \\u53ea\\u5403 \\u96bb\\u96de\\u7d6e\\u9152 \\u96bb\\u7acb \\u96bb\\u8f2a\\u4e0d\\u53cd \\u96bb\\u8f2a\\u4e0d\\u8fd4 \\u96bb\\u65e5 \\u96bb\\u8eab \\u96bb\\u8072\\u4e0d\\u51fa \\u96bb\\u624b \\u96bb\\u8a00\\u7247\\u8a9e \\u96bb\\u8a00\\u7247\\u5b57 \\u96bb\\u773c \\u96bb\\u5f71 \\u53ea\\u4f54 \\u53ea\\u5360\\u5409 \\u53ea\\u5360\\u795e\\u554f\\u535c \\u53ea\\u5360\\u7b97 \\u53ea\\u51c6 \\u96bb\\u5b57 \\u679d\\u4e0d\\u5f97\\u5927\\u65bc\\u69a6 \\u7e54\\u84c6 \\u76f4\\u896c \\u76f4\\u9aee \\u76f4\\u7cfb \\u76f4\\u4fc2\\u8ecd\\u95a5 \\u690d\\u9aee \\u690d\\u7269\\u8a8c \\u6b96\\u7a40 \\u6b62\\u8b17\\u83ab\\u5982\\u81ea\\u8129 \\u7d19\\u83f8 \\u7d19\\u7d2e \\u7d19\\u88fd \\u6307\\u63ee\\u53f0 \\u6307\\u89aa\\u6258\\u6545 \\u6307\\u6c34\\u76df\\u677e \\u8a8c\\u54c0 \\u5fd7\\u8aa0\\u541b\\u5b50 \\u5fd7\\u6c96\\u6597\\u725b \\u8a8c\\u60bc \\u5fd7\\u9ad8\\u6c23\\u63da \\u8a8c\\u6176 \\u8a8c\\u559c \\u8a8c\\u7570 \\u8a8c\\u4e4b\\u4e0d\\u5fd8 \\u88fd\\u7248 \\u88fd\\u5099 \\u88fd\\u8868 \\u88fd\\u51b0 \\u88fd\\u64ad \\u88fd\\u6750 \\u88fd\\u8336 \\u88fd\\u6210 \\u88fd\\u7a0b \\u88fd\\u51fa \\u88fd\\u5f97 \\u88fd\\u6bd2 \\u88fd\\u6cd5 \\u88fd\\u9769 \\u88fd\\u5291 \\u88fd\\u5047 \\u88fd\\u4ef6 \\u88fd\\u6f3f \\u88fd\\u51b7 \\u5236\\u9762 \\u88fd\\u9762\\u5177 \\u88fd\\u576f \\u88fd\\u7247 \\u88fd\\u54c1 \\u88fd\\u53d6 \\u88fd\\u552e \\u88fd\\u9178\\u6027 \\u88fd\\u7cd6 \\u88fd\\u9676 \\u88fd\\u5716 \\u88fd\\u7232 \\u88fd\\u7232 \\u88fd\\u978b \\u88fd\\u9e7d \\u88fd\\u6c27 \\u88fd\\u85e5 \\u88fd\\u8863 \\u88fd\\u9020 \\u88fd\\u7d19 \\u5236\\u9418 \\u88fd\\u4f5c \\u88fd\\u505a \\u6cbb\\u7652 \\u6adb\\u9aee\\u5de5 \\u7dfb\\u5bc6 \\u7a92\\u617e \\u8e93\\u4ec6 \\u8599\\u9aee \\u4e2d\\u570b\\u88fd \\u4e2d\\u74b0\\u76c3 \\u4e2d\\u5d19 \\u4e2d\\u5343\\u4e16\\u754c \\u4e2d\\u578b\\u9418 \\u4e2d\\u6e38 \\u5fe0\\u4eba\\u4e4b\\u6258 \\u7d42\\u7aef\\u6aaf \\u7d42\\u8eab\\u6709\\u6258 \\u9418\\u64fa \\u9418\\u88ab \\u9418\\u58c1 \\u9418\\u9336 \\u9418\\u8868\\u76e4 \\u9418\\u4e0d \\u9418\\u5dee \\u9418\\u695a\\u7d05 \\u9418\\u7684 \\u9418\\u9ede \\u9418\\u9802 \\u9418\\u9f0e \\u9418\\u767c\\u97f3 \\u9418\\u798f\\u677e \\u9418\\u9f13 \\u9418\\u95dc \\u9418\\u884c \\u9418\\u597d \\u9418\\u5320 \\u9418\\u53e3 \\u9418\\u5feb \\u9418\\u6a02 \\u9418\\u6a13 \\u9418\\u6f0f \\u9418\\u87ba \\u9418\\u5f8b \\u9418\\u6162 \\u9418\\u6c92 \\u9418\\u9762 \\u9418\\u9cf4 \\u9418\\u6a21 \\u9418\\u7d10 \\u9418\\u76e4 \\u9418\\u73ee\\u7444 \\u9418\\u6572 \\u9418\\u7434 \\u9418\\u78ec \\u9418\\u4e73\\u6d1e \\u9418\\u4e73\\u77f3 \\u9418\\u5c71 \\u9418\\u4e0a \\u9418\\u8eab \\u9418\\u8072 \\u9418\\u901f \\u9418\\u5854 \\u9418\\u592a \\u9418\\u9ad4 \\u9418\\u8abf \\u9418\\u505c \\u9418\\u982d \\u9418\\u738b \\u9418\\u4e0b \\u9418\\u76f8 \\u9418\\u97ff \\u9418\\u5f62 \\u9418\\u8170 \\u9418\\u610f \\u9418\\u6709 \\u9418\\u5728\\u5bfa\\u88cf \\u9418\\u7f69 \\u9418\\u5de6\\u53f3 \\u9418\\u5ea7 \\u79cd\\u653e \\u7a2e\\u7a40 \\u79cd\\u5e2b\\u9053 \\u79cd\\u5e2b\\u4e2d \\u7a2e\\u5b50\\u690d\\u7269 \\u91cd\\u8907 \\u91cd\\u898b\\u8907\\u51fa \\u91cd\\u7f85\\u9eaa \\u91cd\\u647a \\u91cd\\u88fd \\u5dde\\u91cc \\u9031\\u5831 \\u9031\\u800c\\u5fa9\\u59cb \\u9031\\u4e8c \\u9031\\u8ff4 \\u9031\\u6703 \\u9031\\u8a18 \\u8cd9\\u6fdf \\u5468\\u6770 \\u9031\\u520a \\u9031\\u8003 \\u5468\\u66c6 \\u9031\\u516d \\u9031\\u672b \\u9031\\u5e74 \\u9031\\u671f \\u5468\\u5168\\u65b9\\u4fbf \\u5468\\u4eba \\u8cd9\\u4eba\\u4e4b\\u6025 \\u9031\\u65e5 \\u9031\\u4e09 \\u9031\\u4e0a \\u9031\\u6578 \\u9031\\u56db \\u9031\\u6b72 \\u9031\\u4e94 \\u9031\\u85aa \\u9031\\u4f11 \\u9031\\u4e00 \\u5468\\u904a\\u4e16\\u754c \\u5468\\u53ec\\u5171\\u548c \\u9031\\u4e2d \\u9031\\u9031 \\u9031\\u8f49 \\u9031\\u8d70\\u79c0 \\u6d32\\u969b\\u76c3 \\u5492\\u613f \\u5191\\u7532 \\u5191\\u79d1 \\u665d\\u4f0f\\u591c\\u6e38 \\u76ba\\u5f46 \\u76ba\\u647a \\u6731\\u8c9d\\u723e \\u7843\\u7b46 \\u6731\\u8123 \\u7843\\u8123\\u7693\\u9f52 \\u6731\\u8123\\u7693\\u9f52 \\u6731\\u8f53\\u7682\\u84cb \\u6731\\u5e72\\u7389\\u93da \\u7843\\u7d05 \\u7843\\u5377 \\u6731\\u5101 \\u6731\\u53e3\\u7693\\u9f52 \\u6731\\u7406\\u5b89\\u66c6 \\u6731\\u5d19\\u8857 \\u7843\\u6279 \\u7843\\u8272 \\u7843\\u7802 \\u6731\\u5929\\u6587 \\u6731\\u90c1\\u4fe1 \\u7843\\u8aed \\u73e0\\u6597\\u721b\\u73ed \\u8c6c\\u516b\\u6212\\u5403\\u4eba\\u53c3\\u679c \\u8c6c\\u809d\\u9eaa \\u8c6c\\u8173\\u9eaa \\u8c6c\\u820c\\u9eaa \\u8c6c\\u96bb \\u7af9\\u82de\\u677e\\u8302 \\u7af9\\u51e0 \\u7af9\\u84c6 \\u7af9\\u88fd \\u4e3b\\u6a11 \\u4e3b\\u9418\\u66f2\\u7dda \\u716e\\u9eaa \\u716e\\u7ca5\\u711a\\u9b1a \\u82a7\\u6817 \\u4f4f\\u7d2e \\u8a3b\\u6a19 \\u8a3b\\u518a \\u8a3b\\u518a \\u8a3b\\u5b9a \\u8a3b\\u8a18 \\u8a3b\\u8173 \\u8a3b\\u89e3 \\u8a3b\\u540d \\u8a3b\\u660e \\u8a3b\\u6279 \\u6ce8\\u5165 \\u6ce8\\u5165\\u5f0f\\u6559\\u5b78\\u6cd5 \\u8a3b\\u4e0a \\u8a3b\\u751f\\u5a18\\u5a18 \\u8a3b\\u5931 \\u8a3b\\u91cb \\u8a3b\\u758f \\u8a3b\\u6587 \\u8a3b\\u92b7 \\u8a3b\\u8b6f \\u6ce8\\u4e91 \\u99d0\\u7d2e \\u67f1\\u6a11 \\u795d\\u9aee \\u795d\\u8b9a \\u9444\\u9418 \\u7b51\\u90a6 \\u7b51\\u5317 \\u7b51\\u6ce2 \\u7b51\\u80a5 \\u7b51\\u5f8c \\u7b51\\u5f8c \\u7b51\\u524d \\u7b51\\u897f \\u7b51\\u967d \\u7b51\\u967d \\u7b51\\u5dde \\u7b51\\u7d2b \\u6293\\u59e6 \\u5c08\\u9452 \\u5c08\\u5f81 \\u8f49\\u901f\\u9336 \\u8f49\\u6aaf \\u8f49\\u6e38 \\u8f49\\u8a3b \\u88dd\\u5ca9\\u6a5f \\u88dd\\u647a \\u58ef\\u9eaa \\u649e\\u5e9c\\u6c96\\u5dde \\u649e\\u7403\\u687f \\u649e\\u9418 \\u6e96\\u4fdd \\u51c6\\u4fdd\\u8b77 \\u51c6\\u4fdd\\u91cb \\u51c6\\u4e0d\\u51c6\\u4f60 \\u51c6\\u4e0d\\u51c6\\u8ab0 \\u51c6\\u4e0d\\u51c6\\u4ed6 \\u51c6\\u4e0d\\u51c6\\u5b83 \\u51c6\\u4e0d\\u51c6\\u5979 \\u51c6\\u4e0d\\u51c6\\u6211 \\u51c6\\u4e0d\\u51c6\\u8a31 \\u51c6\\u6b64 \\u6e96\\u5206\\u5b50 \\u51c6\\u4f0f \\u51c6\\u5047 \\u51c6\\u5c07 \\u51c6\\u6c7a\\u9b25 \\u51c6\\u8003\\u8b49 \\u51c6\\u666e\\u723e \\u51c6\\u5165 \\u51c6\\u4e09\\u540e \\u51c6\\u7b97 \\u51c6\\u5c09 \\u51c6\\u8a31 \\u51c6\\u4ee5 \\u51c6\\u4e88 \\u51c6\\u6298 \\u51c6\\u594f \\u6349\\u9aee \\u6349\\u59e6 \\u684c\\u51e0 \\u684c\\u66c6 \\u6fc1\\u7a4d\\u5ca9 \\u64e2\\u9aee \\u59ff\\u91c7 \\u9aed\\u9b0d \\u9aed\\u9b1a \\u5b50\\u8591\\u7092\\u96de \\u5b50\\u6e38 \\u5b50\\u4e91 \\u5b50\\u4e4b\\u4e30\\u516e \\u6893\\u91cc \\u7d2b\\u8591 \\u7d2b\\u96f2 \\u7d2b\\u4e91\\u82d7\\u65cf\\u5e03\\u4f9d\\u65cf\\u81ea\\u6cbb\\u7e23 \\u81ea\\u52d5\\u9336 \\u81ea\\u7136\\u6372 \\u81ea\\u5236 \\u81ea\\u88fd\\u70b8\\u5f48 \\u5b57\\u5f59 \\u6f2c\\u5df2\\u4e7e \\u5b97\\u5468 \\u5b97\\u5468\\u9418 \\u7d9c\\u8988 \\u7e3d\\u9aee \\u7e3d\\u687f\\u8cfd \\u7e3d\\u687f\\u6578 \\u7e3d\\u5f59 \\u7e3d\\u6aaf \\u7e3d\\u7d71\\u76c3 \\u7e31\\u6a6b\\u4ea4\\u4f48 \\u7e31\\u617e \\u7cbd\\u7c91\\u8449 \\u594f\\u647a \\u8db3\\u5354\\u76c3 \\u8db3\\u7e3d\\u76c3 \\u7d44\\u5408\\u670d\\u88dd \\u7956\\u6c96\\u4e4b \\u947d\\u687f \\u6700\\u5f8c\\u4e00\\u5929 \\u5de6\\u5149\\u6597 \\u5de6\\u91cc\\u514b \\u5de6\\u9130\\u53f3\\u91cc \\u5de6\\u624b\\u4e0d\\u6258\\u53f3\\u624b \\u5de6\\u53f3\\u91c7\\u4e4b \\u4f5c\\u5016 \\u5ea7\\u6a19 \\u5750\\u5982\\u9418 \\u5750\\u6aaf \\u5750\\u9418 \\u5ea7\\u9418 \\u505a\\u51fa \\u505a\\u9f63\\u597d\\u6232\".split(\" \"),B=\"\\u50de \\u514c \\u5191 \\u5197 \\u52f3 \\u53c4 \\u544a \\u5553 \\u55ab \\u5606 \\u56ea \\u599d \\u5abc \\u5acb \\u5afa \\u5b00 \\u5ca9 \\u6085 \\u614d \\u6236 \\u6329 \\u6435 \\u64e1 \\u6553 \\u6558 \\u67fa \\u68b2 \\u68f1 \\u69b2 \\u6aaf \\u6c33 \\u6d8c \\u6d97 \\u6eab \\u6ebc \\u6f59 \\u6f68 \\u7185 \\u7232 \\u75f9 \\u7661 \\u7681 \\u7a05 \\u7ac8 \\u7cc9 \\u7e15 \\u7e6e \\u7e94 \\u812b \\u8183 \\u81e5 \\u81fa \\u83f8 \\u8495 \\u8525 \\u853f \\u860a \\u86fb \\u8846 \\u885b \\u8988 \\u8aaa \\u8d17 \\u8e0a \\u8f40 \\u919e \\u9262 \\u9264 \\u92b3 \\u95b1 \\u9c2e \\u9c49 \\u8c9d\\u80c4 \\u5927\\u6b16\\u6d8c \\u5927\\u6d8c \\u6771\\u6d8c \\u51a0\\u80c4 \\u97d3\\u4f82\\u80c4 \\u8814\\u6d8c \\u6cb3\\u6d8c \\u7532\\u80c4 \\u4ecb\\u80c4 \\u93a7\\u80c4 \\u8475\\u6d8c \\u9ece\\u6d8c \\u9ebb\\u6d8c \\u514d\\u80c4 \\u5357\\u6d8c \\u6ce5\\u6d8c \\u6c99\\u9b5a\\u6d8c \\u6df1\\u6d8c \\u897f\\u6d8c \\u6eaa\\u6d8c \\u61f8\\u80c4 \\u58d3\\u80c4\\u5b50 \\u98ee\\u80c4 \\u6d8c\\u5c3e \\u9b5a\\u80c4 \\u9c02\\u9b5a\\u6d8c \\u80c4\\u7532 \\u80c4\\u79d1\".split(\" \"),C=\"\\u507d \\u5151 \\u80c4 \\u5b82 \\u52db \\u53c1 \\u543f \\u555f \\u5403 \\u6b4e \\u56f1 \\u7ca7 \\u5aaa \\u88ca \\u5afb \\u5aaf \\u5dd6 \\u60a6 \\u6120 \\u6237 \\u635d \\u63fe \\u62ac \\u655a \\u654d \\u67b4 \\u68c1 \\u7a1c \\u6985 \\u67b1 \\u6c32 \\u6e67 \\u6d9a \\u6e29 \\u6fd5 \\u6e88 \\u6f40 \\u7174 \\u70ba \\u75fa \\u75f4 \\u7682 \\u7a0e \\u7076 \\u7cbd \\u7dfc \\u97c1 \\u624d \\u8131 \\u817d \\u5367 \\u53f0 \\u7159 \\u8480 \\u8471 \\u848d \\u85f4 \\u8715 \\u773e \\u885e \\u6838 \\u8aac \\u8d0b \\u8e34 \\u8f3c \\u9196 \\u7f3d \\u920e \\u92ed \\u95b2 \\u9c1b \\u9f08 \\u8c9d\\u5191 \\u5927\\u6b16\\u6d8c \\u5927\\u6d8c \\u6771\\u6d8c \\u51a0\\u5191 \\u97d3\\u4f82\\u5191 \\u8814\\u6d8c \\u6cb3\\u6d8c \\u7532\\u5191 \\u4ecb\\u5191 \\u93a7\\u5191 \\u8475\\u6d8c \\u9ece\\u6d8c \\u9ebb\\u6d8c \\u514d\\u5191 \\u5357\\u6d8c \\u6ce5\\u6d8c \\u6c99\\u9b5a\\u6d8c \\u6df1\\u6d8c \\u897f\\u6d8c \\u6eaa\\u6d8c \\u61f8\\u5191 \\u58d3\\u5191\\u5b50 \\u98ee\\u5191 \\u6d8c\\u5c3e \\u9b5a\\u5191 \\u9c02\\u9b5a\\u6d8c \\u5191\\u7532 \\u5191\\u79d1\".split(\" \"),D=\"\\u50de \\u5147 \\u5553 \\u55ab \\u5afa \\u5b00 \\u5cef \\u5e7a \\u64e1 \\u66ec \\u68f1 \\u6a90 \\u6c61 \\u6cc4 \\u6d8c \\u6f59 \\u6f68 \\u7232 \\u7240 \\u75f9 \\u7661 \\u7740 \\u777e \\u7ac8 \\u7cc9 \\u7e6e \\u7e94 \\u7fa3 \\u853f \\u8846 \\u88cf \\u8988 \\u8e0a \\u9262 \\u9b8e \\u9eaa \\u9f76 \\u7839 \\u7845 \\u9170 \\u9201 \\u9208 \\u9307 \\u9340 \\u9384 \\u9387 \\u93bf \\u9426 \\u9465 PN\\u7d50 SQL\\u6ce8\\u5165 SQL\\u6ce8\\u5165\\u653b\\u64ca \\u963f\\u62c9\\u4f2f\\u806f\\u5408\\u914b\\u9577\\u570b \\u963f\\u585e\\u62dc\\u7586 \\u57c3\\u585e\\u4fc4\\u6bd4\\u4e9e \\u5b89\\u63d0\\u74dc\\u548c\\u5df4\\u5e03\\u9054 \\u5df4\\u5df4\\u591a\\u65af \\u5df4\\u5e03\\u4e9e\\u65b0\\u5e7e\\u5167\\u4e9e \\u534a\\u89d2 \\u7d81\\u5b9a \\u4fdd\\u5b58 \\u8c9d\\u5be7 \\u5954\\u99b3 \\u672c\\u5730\\u4ee3\\u78bc \\u8e66\\u6975 \\u6bd4\\u7279 \\u7b46\\u8a18\\u672c\\u96fb\\u8166 \\u58c1\\u7d19 \\u7de8\\u7a0b \\u7de8\\u7a0b\\u8a9e\\u8a00 \\u4fbf\\u651c\\u5f0f \\u8b8a\\u91cf \\u6a19\\u8b58\\u7b26 \\u8868\\u9054\\u5f0f \\u4e26\\u884c\\u8a08\\u7b97 \\u6ce2\\u5206\\u8907\\u7528 \\u6ce2\\u65af\\u5c3c\\u4e9e\\u9ed1\\u585e\\u54e5\\u7dad\\u90a3 \\u4f2f\\u5229\\u8332 \\u535a\\u8328\\u74e6\\u7d0d \\u535a\\u5ba2 \\u5e03\\u723e \\u5e03\\u57fa\\u7d0d\\u6cd5\\u7d22 \\u5e03\\u9686\\u8fea \\u63a1\\u6a23 \\u83dc\\u55ae \\u53c3\\u6578 \\u53c3\\u6578\\u8868 \\u64cd\\u4f5c\\u6578 \\u64cd\\u4f5c\\u7cfb\\u7d71 \\u63d2\\u4ef6 \\u67e5\\u770b \\u67e5\\u627e \\u5834\\u6548\\u61c9\\u7ba1 \\u57ce\\u57df\\u7db2 \\u7a0b\\u5e8f \\u7a0b\\u5e8f\\u54e1 \\u6301\\u4e45\\u6027 \\u51fa\\u79df\\u8eca \\u89f8\\u6478 \\u89f8\\u6478\\u5c4f \\u50b3\\u611f \\u4e32\\u884c \\u4e32\\u884c\\u7aef\\u53e3 \\u4e32\\u53e3 \\u7a97\\u53e3 \\u5275\\u5efa \\u8a5e\\u7d44 \\u78c1\\u9053 \\u78c1\\u76e4 \\u5b58\\u5132 \\u5b58\\u76e4 \\u6253\\u958b \\u6253\\u5370 \\u6253\\u5370\\u6a5f \\u4ee3\\u78bc \\u4ee3\\u78bc\\u9801 \\u5e36\\u5bec \\u55ae\\u7247\\u6a5f \\u5200\\u7247\\u670d\\u52d9\\u5668 \\u5c0e\\u51fa \\u5c0e\\u5165 \\u767b\\u9304 \\u4f4e\\u7d1a \\u5730\\u5740 \\u5730\\u5740\\u6b04 \\u905e\\u6b78 \\u9ede\\u64ca \\u8abf\\u5ea6 \\u8abf\\u8272\\u677f \\u8abf\\u8a66 \\u8abf\\u8a66\\u5668 \\u8abf\\u7528 \\u8abf\\u5236 \\u8abf\\u88fd\\u89e3\\u8abf\\u5668 \\u7aef\\u53e3 \\u77ed\\u4fe1 \\u5806\\u68e7 \\u968a\\u5217 \\u5c0d\\u8a71\\u6846 \\u5c0d\\u8c61 \\u591a\\u7c73\\u5c3c\\u52a0 \\u591a\\u4efb\\u52d9 \\u591a\\u614b \\u5384\\u74dc\\u591a\\u723e \\u5384\\u7acb\\u7279\\u91cc\\u4e9e \\u4e8c\\u6975\\u7ba1 \\u767c\\u4f48 \\u767c\\u9001 \\u7bc4\\u5f0f \\u65b9\\u4fbf\\u9eaa \\u4eff\\u771f \\u98db\\u884c\\u6a21\\u5f0f \\u5206\\u8fa8\\u7387 \\u5206\\u4f48\\u5f0f \\u5206\\u5340 \\u4f5b\\u5f97\\u89d2 \\u670d\\u52d9\\u5668 \\u8f14\\u97f3 \\u5085\\u91cc\\u8449 \\u8907\\u9078\\u6309\\u9215 \\u8907\\u9078\\u6846 \\u8907\\u5370 \\u5ca1\\u6bd4\\u4e9e \\u9ad8\\u7aef \\u9ad8\\u7d1a \\u9ad8\\u901f\\u7de9\\u5b58 \\u9ad8\\u6027\\u80fd\\u8a08\\u7b97 \\u54e5\\u65af\\u9054\\u9ece\\u52a0 \\u683c\\u6797\\u7d0d\\u9054 \\u683c\\u9b6f\\u5409\\u4e9e \\u69cb\\u9020\\u51fd\\u6578 \\u56fa\\u4ef6 \\u639b\\u65b7 \\u95dc\\u4fc2\\u6578\\u64da\\u5eab \\u5149\\u6a19 \\u5149\\u76e4 \\u5149\\u9a45 \\u572d\\u4e9e\\u90a3 \\u904e\\u7a0b\\u5f0f\\u7de8\\u7a0b \\u54c8\\u85a9\\u514b\\u65af\\u5766 \\u54c8\\u5e0c \\u51fd\\u6578 \\u51fd\\u6578\\u5f0f\\u7de8\\u7a0b \\u822a\\u5929\\u98db\\u6a5f \\u5b8f\\u5167\\u6838 \\u6d2a\\u90fd\\u62c9\\u65af \\u7d05\\u5fc3\\u5927\\u6230 \\u5f8c\\u7db4 \\u547c\\u51fa \\u547c\\u53eb\\u8f49\\u79fb \\u4e92\\u806f\\u7db2 \\u7de9\\u5b58 \\u56de\\u8abf \\u5f59\\u7de8 \\u5f59\\u7de8\\u8a9e\\u8a00 \\u57fa\\u91cc\\u5df4\\u65af \\u6fc0\\u5149 \\u6fc0\\u6d3b \\u5409\\u5e03\\u5824 \\u96c6\\u6210 \\u96c6\\u6210\\u96fb\\u8def \\u96c6\\u7fa3 \\u5e7e\\u5167\\u4e9e\\u6bd4\\u7d39 \\u8a08\\u7b97\\u6a5f\\u5b89\\u5168 \\u8a08\\u7b97\\u6a5f\\u79d1\\u5b78 \\u5bc4\\u5b58\\u5668 \\u52a0\\u7d0d \\u52a0\\u84ec \\u52a0\\u8f09 \\u517c\\u5bb9 \\u526a\\u5207 \\u526a\\u8cbc\\u677f \\u4ea4\\u4e92 \\u8173\\u672c \\u63a5\\u53e3 \\u622a\\u5c4f \\u622a\\u53d6 \\u89e3\\u91cb\\u5668 \\u754c\\u9762 \\u91d1\\u5c6c\\u6c27\\u5316\\u7269\\u534a\\u5c0e\\u9ad4 \\u6d25\\u5df4\\u5e03\\u97cb \\u9032\\u7a0b \\u9032\\u5236 \\u6676\\u9ad4\\u7ba1 \\u6676\\u9598\\u7ba1 \\u93e1\\u50cf \\u5c40\\u90e8 \\u5c40\\u57df\\u7db2 \\u53e5\\u67c4 \\u6372\\u7a4d \\u5496\\u55b1 \\u5361\\u5854\\u723e \\u79d1\\u6469\\u7f85 \\u79d1\\u7279\\u8fea\\u74e6 \\u53ef\\u8996\\u5316 \\u514b\\u7f85\\u5730\\u4e9e \\u523b\\u9304 \\u80af\\u5c3c\\u4e9e \\u7a7a\\u5206\\u591a\\u5740 \\u7a7a\\u5206\\u8907\\u7528 \\u63a7\\u4ef6 \\u5bec\\u5e36 \\u64f4\\u5c55 \\u64f4\\u5c55\\u540d \\u840a\\u7d22\\u6258 \\u85cd\\u7259 \\u8001\\u64be \\u985e\\u6a21\\u677f \\u985e\\u578b \\u5229\\u6bd4\\u91cc\\u4e9e \\u9023\\u63a5 \\u9023\\u63a5\\u5668 \\u806f\\u7e6b \\u806f\\u7e6b\\u6b77\\u53f2 \\u93c8\\u8868 \\u93c8\\u63a5 \\u6dbc\\u83dc \\u5217\\u652f\\u6566\\u58eb\\u767b \\u76e7\\u65fa\\u9054 \\u9304\\u50cf \\u908f\\u8f2f\\u9580 \\u99ac\\u723e\\u4ee3\\u592b \\u99ac\\u91cc\\u5171\\u548c\\u570b \\u78bc\\u5206\\u591a\\u5740 \\u78bc\\u7387 \\u6bdb\\u91cc\\u6c42\\u65af \\u6bdb\\u91cc\\u5854\\u5c3c\\u4e9e \\u5192\\u6ce1\\u6392\\u5e8f \\u679a\\u8209 \\u9580\\u96fb\\u8def \\u9580\\u6236\\u7db2\\u7ad9 \\u5bc6\\u9470 \\u514d\\u63d0 \\u9762\\u5411\\u5c0d\\u8c61 \\u9762\\u5411\\u904e\\u7a0b \\u547d\\u4ee4\\u884c \\u547d\\u4ee4\\u5f0f\\u7de8\\u7a0b \\u547d\\u540d\\u7a7a\\u9593 \\u6a21\\u584a \\u6a21\\u64ec \\u6a21\\u64ec\\u96fb\\u8def \\u6a21\\u64ec\\u96fb\\u5b50 \\u83ab\\u6851\\u6bd4\\u514b \\u9ed8\\u8a8d \\u76ee\\u6a19\\u4ee3\\u78bc \\u7d0d\\u7c73 \\u5976\\u916a \\u7459\\u9b6f \\u5167\\u5b58 \\u5167\\u6838 \\u5167\\u806f\\u51fd\\u6578 \\u5167\\u7f6e \\u5c3c\\u65e5\\u723e \\u5c3c\\u65e5\\u5229\\u4e9e \\u6b50\\u62c9 \\u5e15\\u52de \\u76e4\\u7b26 \\u76e4\\u7247 \\u62cb\\u51fa \\u76ae\\u819a \\u983b\\u5206\\u591a\\u5740 \\u983b\\u5206\\u8907\\u7528 \\u5c4f\\u853d \\u5c4f\\u5e55 \\u524d\\u7db4 \\u5d4c\\u5957 \\u5168\\u89d2 \\u5168\\u5c40 \\u6b0a\\u9650 \\u7f3a\\u7701 \\u4efb\\u52d9\\u7ba1\\u7406\\u5668 \\u4efb\\u52d9\\u6b04 \\u8edf\\u4ef6 \\u8edf\\u9a45 \\u585e\\u62c9\\u5229\\u6602 \\u585e\\u6d66\\u8def\\u65af \\u585e\\u820c\\u723e \\u4e09\\u6975\\u7ba1 \\u6563\\u5217 \\u6383\\u63cf\\u5100 \\u6c99\\u7279\\u963f\\u62c9\\u4f2f \\u6bba\\u6bd2 \\u9583\\u5b58 \\u793e\\u5340 \\u8a2d\\u5099 \\u8a2d\\u7f6e \\u5be9\\u8988 \\u8072\\u5361 \\u8072\\u660e \\u8056\\u57fa\\u8328\\u548c\\u5c3c\\u7dad\\u65af \\u8056\\u76e7\\u897f\\u4e9e \\u8056\\u99ac\\u529b\\u8afe \\u8056\\u6587\\u68ee\\u7279\\u548c\\u683c\\u6797\\u7d0d\\u4e01\\u65af \\u6642\\u5206\\u591a\\u5740 \\u6642\\u5206\\u8907\\u7528 \\u6642\\u9418\\u983b\\u7387 \\u5be6\\u4f8b \\u5be6\\u6a21\\u5f0f \\u77e2\\u91cf \\u8996\\u983b \\u8996\\u5716 \\u9069\\u914d\\u5668 \\u9996\\u5e2d\\u6280\\u8853\\u5b98 \\u9996\\u5e2d\\u4fe1\\u606f\\u5b98 \\u9996\\u5e2d\\u904b\\u71df\\u5b98 \\u9996\\u5e2d\\u57f7\\u884c\\u5b98 \\u9f20\\u6a19 \\u6578\\u64da \\u6578\\u64da\\u5831 \\u6578\\u64da\\u5009\\u5eab \\u6578\\u64da\\u6316\\u6398 \\u6578\\u64da\\u6e90 \\u6578\\u5b57 \\u6578\\u5b57\\u96fb\\u8def \\u6578\\u5b57\\u96fb\\u5b50 \\u6578\\u5b57\\u5370\\u5237 \\u6578\\u7d44 \\u5237\\u65b0 \\u65af\\u6d1b\\u6587\\u5c3c\\u4e9e \\u65af\\u5a01\\u58eb\\u862d \\u6b7b\\u6a5f \\u641c\\u7d22 \\u8607\\u91cc\\u5357 \\u7b97\\u6cd5 \\u7b97\\u5b50 \\u7e2e\\u9032 \\u7e2e\\u7565\\u5716 \\u6240\\u7f85\\u9580\\u7fa3\\u5cf6 \\u7d22\\u99ac\\u91cc \\u5854\\u5409\\u514b\\u65af\\u5766 \\u81fa\\u5f0f\\u6a5f \\u5766\\u6851\\u5c3c\\u4e9e \\u7279\\u7acb\\u5c3c\\u9054\\u548c\\u591a\\u5df4\\u54e5 \\u6dfb\\u52a0 \\u901a\\u914d\\u7b26 \\u901a\\u4fe1 \\u901a\\u8a0a\\u5361 \\u982d\\u6587\\u4ef6 \\u7a81\\u5c3c\\u65af \\u5716\\u6a19 \\u5716\\u5eab \\u5716\\u74e6\\u76e7 \\u5716\\u50cf \\u571f\\u5eab\\u66fc\\u65af\\u5766 \\u812b\\u6a5f \\u74e6\\u52aa\\u963f\\u5716 \\u5916\\u9375 \\u5916\\u7f6e \\u842c\\u7dad\\u7db2 \\u842c\\u8c61 \\u7db2\\u5427 \\u7db2\\u95dc \\u7db2\\u5361 \\u7db2\\u7d61 \\u7db2\\u4e0a\\u9130\\u5c45 \\u5371\\u5730\\u99ac\\u62c9 \\u50de\\u4ee3\\u78bc \\u4f4d\\u5716 \\u6eab\\u7d0d\\u5716\\u842c \\u6587\\u672c \\u6587\\u6a94 \\u6587\\u4ef6 \\u6587\\u4ef6\\u593e \\u6587\\u4ef6\\u64f4\\u5c55\\u540d \\u6587\\u4ef6\\u540d \\u6587\\u840a \\u6587\\u5b57\\u8655\\u7406 \\u70cf\\u8332\\u5225\\u514b\\u65af\\u5766 \\u7121\\u640d\\u58d3\\u7e2e \\u7269\\u7406\\u5730\\u5740 \\u7269\\u7406\\u5167\\u5b58 \\u6790\\u69cb\\u51fd\\u6578 \\u4e0b\\u62c9\\u5217\\u8868 \\u4ed9\\u7ae5\\u534a\\u5c0e\\u9ad4 \\u986f\\u5b58 \\u986f\\u5361 \\u986f\\u50cf\\u7ba1 \\u7dda\\u7a0b \\u76f8\\u518a \\u9999\\u8fb2 \\u9805\\u76ee \\u50cf\\u7d20 \\u6d88\\u606f \\u5beb\\u4fdd\\u8b77 \\u5378\\u8f09 \\u82af\\u7247 \\u65b0\\u897f\\u862d \\u4fe1\\u9053 \\u4fe1\\u865f \\u4fe1\\u606f \\u4fe1\\u606f\\u5b89\\u5168 \\u4fe1\\u606f\\u6280\\u8853 \\u4fe1\\u606f\\u8ad6 \\u4fe1\\u566a\\u6bd4 \\u6027\\u50f9\\u6bd4 \\u6027\\u80fd \\u865b\\u51fd\\u6578 \\u865b\\u64ec\\u6a5f \\u5faa\\u74b0 \\u5c0b\\u5740 \\u6f14\\u793a\\u6587\\u7a3f \\u4e5f\\u9580 \\u9801\\u8173 \\u9801\\u7709 \\u79fb\\u52d5\\u96fb\\u8a71 \\u79fb\\u52d5\\u901a\\u4fe1 \\u79fb\\u52d5\\u7db2\\u7d61 \\u79fb\\u52d5\\u786c\\u76e4 \\u79fb\\u52d5\\u8cc7\\u6599 \\u4ee5\\u592a\\u7db2 \\u7570\\u6b65 \\u610f\\u5927\\u5229 \\u6ea2\\u51fa \\u97f3\\u983b \\u5f15\\u5c0e\\u7a0b\\u5e8f \\u6620\\u5c04 \\u786c\\u4ef6 \\u786c\\u76e4 \\u7528\\u6236 \\u7528\\u6236\\u540d \\u512a\\u5148\\u7d1a \\u6709\\u640d\\u58d3\\u7e2e \\u9810\\u8655\\u7406\\u5668 \\u5143\\u7de8\\u7a0b \\u5143\\u6578\\u64da \\u5143\\u97f3 \\u539f\\u4ee3\\u78bc \\u6e90\\u4ee3\\u78bc \\u6e90\\u78bc \\u6e90\\u6587\\u4ef6 \\u9060\\u7a0b \\u96f2\\u5b58\\u5132 \\u96f2\\u8a08\\u7b97 \\u904b\\u884c \\u904b\\u7b97\\u7b26 \\u5728\\u7dda \\u8d0a\\u6bd4\\u4e9e \\u4e4d\\u5f97 \\u7c98\\u8cbc \\u6b63\\u5247\\u8868\\u9054\\u5f0f \\u652f\\u6301 \\u77e5\\u8b58\\u7522\\u6b0a \\u6307\\u91dd \\u667a\\u80fd \\u4e2d\\u9593\\u4ef6 \\u91cd\\u547d\\u540d \\u91cd\\u8f09 \\u91cd\\u88dd \\u4e3b\\u677f \\u4e3b\\u5f15\\u5c0e\\u8a18\\u9304 \\u8a3b\\u518a\\u8868 \\u8a3b\\u518a\\u6a5f \\u8a3b\\u92b7 \\u72c0\\u614b\\u6b04 \\u684c\\u9762\\u578b \\u81ea\\u52d5\\u8f49\\u5c4f \\u81ea\\u884c\\u8eca \\u5b57\\u6bb5 \\u5b57\\u7b26 \\u5b57\\u7b26\\u4e32 \\u5b57\\u7bc0 \\u5b57\\u5eab \\u5b57\\u9ad4 \\u7e3d\\u7dda \\u7d44\\u4ef6 \\u6700\\u7d42\\u7528\\u6236\".split(\" \"),E=\"\\u507d \\u51f6 \\u555f \\u5403 \\u5afb \\u5aaf \\u5cf0 \\u4e48 \\u62ac \\u6652 \\u7a1c \\u7c37 \\u6c59 \\u6d29 \\u6e67 \\u6e88 \\u6f40 \\u70ba \\u5e8a \\u75fa \\u75f4 \\u8457 \\u776a \\u7076 \\u7cbd \\u97c1 \\u624d \\u7fa4 \\u848d \\u773e \\u88e1 \\u6838 \\u8e34 \\u7f3d \\u9bf0 \\u9eb5 \\u984e \\u7808 \\u77fd \\u91af \\u9345 \\u923d \\u9273 \\u939d \\u9440 \\u92c2 \\u933c \\u9272 \\u93a6 PN\\u63a5\\u9762 SQL\\u96b1\\u78bc\\u653b\\u64ca SQL\\u96b1\\u78bc\\u653b\\u64ca \\u963f\\u62c9\\u4f2f\\u806f\\u5408\\u5927\\u516c\\u570b \\u4e9e\\u585e\\u62dc\\u7136 \\u8863\\u7d22\\u6bd4\\u4e9e \\u5b89\\u5730\\u5361\\u53ca\\u5df4\\u5e03\\u9054 \\u5df4\\u8c9d\\u591a \\u5df4\\u5e03\\u4e9e\\u7d10\\u5e7e\\u5167\\u4e9e \\u534a\\u5f62 \\u7e6b\\u7d50 \\u5132\\u5b58 \\u8c9d\\u5357 \\u8cd3\\u58eb \\u539f\\u751f\\u4ee3\\u78bc \\u9ad8\\u7a7a\\u5f48\\u8df3 \\u4f4d\\u5143 \\u819d\\u4e0a\\u578b\\u96fb\\u8166 \\u684c\\u5e03 \\u7a0b\\u5f0f\\u8a2d\\u8a08 \\u7a0b\\u5f0f\\u8a9e\\u8a00 \\u884c\\u52d5\\u5f0f \\u8b8a\\u6578 \\u8b58\\u5225\\u7b26\\u865f \\u8868\\u793a\\u5f0f \\u5e73\\u884c\\u8a08\\u7b97 \\u6ce2\\u9577\\u5206\\u6ce2\\u591a\\u5de5 \\u6ce2\\u58eb\\u5c3c\\u4e9e\\u8d6b\\u585e\\u54e5\\u7dad\\u7d0d \\u8c9d\\u91cc\\u65af \\u6ce2\\u672d\\u90a3 \\u90e8\\u843d\\u683c \\u5e03\\u6797 \\u5e03\\u5409\\u7d0d\\u6cd5\\u7d22 \\u84b2\\u9686\\u5730 \\u53d6\\u6a23 \\u9078\\u55ae \\u5f15\\u6578 \\u53c3\\u6578\\u5217 \\u904b\\u7b97\\u5143 \\u4f5c\\u696d\\u7cfb\\u7d71 \\u5916\\u639b \\u6aa2\\u8996 \\u67e5\\u8a62 \\u5834\\u6548\\u96fb\\u6676\\u9ad4 \\u90fd\\u6703\\u7db2\\u8def \\u7a0b\\u5f0f \\u7a0b\\u5f0f\\u8a2d\\u8a08\\u5e2b \\u6c38\\u7e8c\\u6027 \\u8a08\\u7a0b\\u8eca \\u89f8\\u63a7 \\u89f8\\u63a7\\u5f0f\\u87a2\\u5e55 \\u611f\\u6e2c \\u5e8f\\u5217 \\u4e32\\u5217\\u57e0 \\u4e32\\u5217\\u57e0 \\u8996\\u7a97 \\u5efa\\u7acb \\u7247\\u8a9e \\u78c1\\u8ecc \\u78c1\\u789f \\u5132\\u5b58 \\u5b58\\u6a94 \\u958b\\u555f \\u5217\\u5370 \\u5370\\u8868\\u6a5f \\u7a0b\\u5f0f\\u78bc \\u5167\\u78bc\\u8868 \\u983b\\u5bec \\u5fae\\u63a7\\u5236\\u5668 \\u5200\\u92d2\\u4f3a\\u670d\\u5668 \\u532f\\u51fa \\u532f\\u5165 \\u767b\\u5165 \\u4f4e\\u968e \\u5730\\u5740 \\u4f4d\\u5740\\u5217 \\u905e\\u8ff4 \\u9ede\\u9078 \\u6392\\u7a0b \\u8abf\\u8272\\u76e4 \\u9664\\u932f \\u5075\\u932f\\u7a0b\\u5f0f \\u547c\\u53eb \\u8abf\\u8b8a \\u6578\\u64da\\u6a5f \\u57e0 \\u7c21\\u8a0a \\u5806\\u758a \\u4f47\\u5217 \\u5c0d\\u8a71\\u65b9\\u584a \\u7269\\u4ef6 \\u591a\\u660e\\u5c3c\\u52a0 \\u591a\\u5de5 \\u591a\\u578b \\u5384\\u74dc\\u591a \\u5384\\u5229\\u5782\\u4e9e \\u4e8c\\u6975\\u9ad4 \\u91cb\\u51fa \\u50b3\\u9001 \\u6b63\\u898f\\u5316 \\u6ce1\\u9eb5 \\u6a21\\u64ec \\u98db\\u822a\\u6a21\\u5f0f \\u89e3\\u6790\\u5ea6 \\u5206\\u6563\\u5f0f \\u5206\\u5272\\u69fd \\u7dad\\u5fb7\\u89d2 \\u4f3a\\u670d\\u5668 \\u5b50\\u97f3 \\u5085\\u7acb\\u8449 \\u8988\\u53d6\\u6309\\u9215 \\u8988\\u53d6\\u65b9\\u584a \\u5f71\\u5370 \\u7518\\u6bd4\\u4e9e \\u9ad8\\u968e \\u9ad8\\u968e \\u5feb\\u53d6\\u8a18\\u61b6\\u9ad4 \\u9ad8\\u6548\\u80fd\\u904b\\u7b97 \\u54e5\\u65af\\u5927\\u9ece\\u52a0 \\u683c\\u745e\\u90a3\\u9054 \\u55ac\\u6cbb\\u4e9e \\u5efa\\u69cb\\u51fd\\u5f0f \\u97cc\\u9ad4 \\u7d50\\u675f\\u901a\\u8a71 \\u95dc\\u806f\\u5f0f\\u8cc7\\u6599\\u5eab \\u6e38\\u6a19 \\u5149\\u789f \\u5149\\u789f\\u6a5f \\u84cb\\u4e9e\\u90a3 \\u7a0b\\u5e8f\\u5f0f\\u7a0b\\u5f0f\\u8a2d\\u8a08 \\u54c8\\u85a9\\u514b \\u96dc\\u6e4a \\u51fd\\u5f0f \\u51fd\\u6578\\u8a9e\\u8a00\\u7a0b\\u5f0f\\u8a2d\\u8a08 \\u592a\\u7a7a\\u68ad \\u55ae\\u6838\\u5fc3 \\u5b8f\\u90fd\\u62c9\\u65af \\u50b7\\u5fc3\\u5c0f\\u68e7 \\u5b57\\u5c3e \\u64a5\\u51fa \\u4f86\\u96fb\\u8f49\\u99c1 \\u7db2\\u969b\\u7db2\\u8def \\u5feb\\u53d6 \\u56de\\u64a5 \\u5f59\\u7de8 \\u7d44\\u5408\\u8a9e\\u8a00 \\u5409\\u91cc\\u5df4\\u65af \\u9433\\u5c04 \\u555f\\u7528 \\u5409\\u5e03\\u5730 \\u6574\\u5408 \\u7a4d\\u9ad4\\u96fb\\u8def \\u53e2\\u96c6 \\u5e7e\\u5167\\u4e9e\\u6bd4\\u7d22 \\u96fb\\u8166\\u4fdd\\u5b89 \\u96fb\\u8166\\u79d1\\u5b78 \\u66ab\\u5b58\\u5668 \\u8fe6\\u7d0d \\u52a0\\u5f6d \\u8f09\\u5165 \\u76f8\\u5bb9 \\u526a\\u4e0b \\u526a\\u8cbc\\u7c3f \\u4e92\\u52d5 \\u6307\\u4ee4\\u78bc \\u4ecb\\u9762 \\u622a\\u5716 \\u64f7\\u53d6 \\u76f4\\u8b6f\\u5668 \\u4ecb\\u9762 \\u91d1\\u6c27\\u534a\\u5c0e\\u9ad4 \\u8f9b\\u5df4\\u5a01 \\u7a0b\\u5e8f \\u9032\\u4f4d\\u5236 \\u96fb\\u6676\\u9ad4 \\u9598\\u6d41\\u9ad4 \\u6620\\u8c61 \\u5340\\u57df\\u6027 \\u5340\\u57df\\u7db2 \\u63a7\\u5236\\u4ee3\\u78bc \\u647a\\u7a4d \\u5496\\u54e9 \\u5361\\u9054 \\u845b\\u6469 \\u8c61\\u7259\\u6d77\\u5cb8 \\u8996\\u89ba\\u5316 \\u514b\\u7f85\\u57c3\\u897f\\u4e9e \\u71d2\\u9304 \\u80af\\u4e9e \\u5206\\u7a7a\\u9593\\u591a\\u91cd\\u9032\\u63a5 \\u7a7a\\u9593\\u591a\\u5de5 \\u63a7\\u5236\\u5143\\u4ef6 \\u5bec\\u983b \\u64f4\\u5145\\u5957\\u4ef6 \\u526f\\u6a94\\u540d \\u8cf4\\u7d22\\u6258 \\u85cd\\u82bd \\u5bee\\u570b \\u985e\\u522b\\u7bc4\\u672c \\u578b\\u5225 \\u8cf4\\u6bd4\\u745e\\u4e9e \\u9023\\u7dda \\u806f\\u7d50\\u5668 \\u806f\\u7d61 \\u901a\\u8a71\\u8a18\\u9304 \\u9023\\u7d50\\u4e32\\u5217 \\u9023\\u7d50 \\u51b7\\u76e4 \\u5217\\u652f\\u6566\\u65af\\u767b \\u76e7\\u5b89\\u9054 \\u9304\\u5f71 \\u908f\\u8f2f\\u9598 \\u99ac\\u723e\\u5730\\u592b \\u99ac\\u5229\\u5171\\u548c\\u570b \\u5206\\u78bc\\u591a\\u91cd\\u9032\\u63a5 \\u4f4d\\u5143\\u901f\\u7387 \\u6a21\\u91cc\\u897f\\u65af \\u8305\\u5229\\u5854\\u5c3c\\u4e9e \\u6c23\\u6ce1\\u6392\\u5e8f \\u5217\\u8209 \\u9598\\u96fb\\u8def \\u5165\\u53e3\\u7db2\\u7ad9 \\u91d1\\u9470 \\u64f4\\u97f3 \\u7269\\u4ef6\\u5c0e\\u5411 \\u7a0b\\u5e8f\\u5c0e\\u5411 \\u547d\\u4ee4\\u5217 \\u6307\\u4ee4\\u5f0f\\u7a0b\\u5f0f\\u8a2d\\u8a08 \\u540d\\u7a31\\u7a7a\\u9593 \\u6a21\\u7d44 \\u6a21\\u64ec \\u985e\\u6bd4\\u96fb\\u8def \\u985e\\u6bd4\\u96fb\\u5b50 \\u83ab\\u4e09\\u6bd4\\u514b \\u9810\\u8a2d \\u76ee\\u7684\\u78bc \\u5948\\u7c73 \\u4e73\\u916a \\u8afe\\u9b6f \\u8a18\\u61b6\\u9ad4 \\u6838\\u5fc3 \\u884c\\u5167\\u51fd\\u6578 \\u5167\\u5efa \\u5c3c\\u65e5 \\u5948\\u53ca\\u5229\\u4e9e \\u5c24\\u62c9 \\u5e1b\\u7409 \\u789f\\u7b26 \\u789f\\u7247 \\u4e1f\\u64f2 \\u9762\\u677f \\u5206\\u983b\\u591a\\u91cd\\u9032\\u63a5 \\u5206\\u983b\\u591a\\u5de5 \\u906e\\u853d \\u87a2\\u5e55 \\u5b57\\u9996 \\u5de2\\u72c0 \\u5168\\u5f62 \\u5168\\u57df\\u6027 \\u8a31\\u53ef\\u6b0a \\u9810\\u8a2d \\u5de5\\u4f5c\\u7ba1\\u7406\\u54e1 \\u5de5\\u4f5c\\u5217 \\u8edf\\u9ad4 \\u8edf\\u789f\\u6a5f \\u7345\\u5b50\\u5c71 \\u585e\\u666e\\u52d2\\u65af \\u585e\\u5e2d\\u723e \\u4e09\\u6975\\u9ad4 \\u96dc\\u6e4a \\u6383\\u63cf\\u5668 \\u6c99\\u70cf\\u5730\\u963f\\u62c9\\u4f2f \\u9632\\u6bd2 \\u5feb\\u9583\\u8a18\\u61b6\\u9ad4 \\u793e\\u7fa3 \\u88dd\\u7f6e \\u8a2d\\u5b9a \\u7a3d\\u8988 \\u97f3\\u6548\\u5361 \\u5ba3\\u544a \\u8056\\u514b\\u91cc\\u65af\\u591a\\u798f\\u53ca\\u5c3c\\u7dad\\u65af \\u8056\\u9732\\u897f\\u4e9e \\u8056\\u99ac\\u5229\\u8afe \\u8056\\u6587\\u68ee\\u53ca\\u683c\\u745e\\u90a3\\u4e01 \\u5206\\u6642\\u591a\\u91cd\\u9032\\u63a5 \\u5206\\u6642\\u591a\\u5de5 \\u6642\\u8108\\u983b\\u7387 \\u4f8b\\u9805 \\u771f\\u5be6\\u6a21\\u5f0f \\u5411\\u91cf \\u8996\\u8a0a \\u6aa2\\u8996 \\u4ecb\\u9762\\u5361 \\u6280\\u8853\\u9577 \\u8cc7\\u8a0a\\u9577 \\u71df\\u904b\\u9577 \\u57f7\\u884c\\u9577 \\u6ed1\\u9f20 \\u8cc7\\u6599 \\u8cc7\\u6599\\u5305 \\u8cc7\\u6599\\u5009\\u5132 \\u8cc7\\u6599\\u63a2\\u52d8 \\u8cc7\\u6599\\u4f86\\u6e90 \\u6578\\u5b57 \\u6578\\u4f4d\\u96fb\\u8def \\u6578\\u4f4d\\u96fb\\u5b50 \\u6578\\u4f4d\\u5370\\u5237 \\u9663\\u5217 \\u91cd\\u65b0\\u6574\\u7406 \\u65af\\u6d1b\\u7dad\\u5c3c\\u4e9e \\u53f2\\u74e6\\u6fdf\\u862d \\u5b95\\u6a5f \\u641c\\u5c0b \\u8607\\u5229\\u5357 \\u6f14\\u7b97\\u6cd5 \\u904b\\u7b97\\u5143 \\u7e2e\\u6392 \\u7e2e\\u5716 \\u7d22\\u7f85\\u9580\\u7fa3\\u5cf6 \\u7d22\\u99ac\\u5229\\u4e9e \\u5854\\u5409\\u514b \\u684c\\u4e0a\\u578b\\u96fb\\u8166 \\u5766\\u5c1a\\u5c3c\\u4e9e \\u5343\\u91cc\\u9054\\u53ca\\u6258\\u5df4\\u54e5 \\u65b0\\u589e \\u842c\\u7528\\u5b57\\u5143 \\u901a\\u8a0a \\u901a\\u8a71\\u5361 \\u6a19\\u982d\\u6a94\\u6848 \\u7a81\\u5c3c\\u897f\\u4e9e \\u5716\\u793a \\u76f8\\u7c3f \\u5410\\u74e6\\u9b6f \\u5f71\\u8c61 \\u571f\\u5eab\\u66fc \\u96e2\\u7dda \\u842c\\u90a3\\u675c \\u5916\\u4f86\\u9375 \\u5916\\u63a5 \\u5168\\u7403\\u8cc7\\u8a0a\\u7db2 \\u6c38\\u73cd \\u7db2\\u5496 \\u9598\\u9053\\u5668 \\u7db2\\u7d61\\u5361 \\u7db2\\u8def \\u7db2\\u8def\\u4e0a\\u7684\\u82b3\\u9130 \\u74dc\\u5730\\u99ac\\u62c9 \\u865b\\u64ec\\u78bc \\u9ede\\u9663\\u5716 \\u90a3\\u675c \\u6587\\u5b57 \\u6587\\u4ef6 \\u6a94\\u6848 \\u8cc7\\u6599\\u593e \\u526f\\u6a94\\u540d \\u6a94\\u540d \\u6c76\\u840a \\u6587\\u66f8\\u8655\\u7406 \\u70cf\\u8332\\u5225\\u514b \\u7121\\u5931\\u771f\\u58d3\\u7e2e \\u5be6\\u9ad4\\u5730\\u5740 \\u5be6\\u9ad4\\u8a18\\u61b6\\u9ad4 \\u89e3\\u69cb\\u51fd\\u5f0f \\u4e0b\\u62c9\\u9078\\u55ae \\u5feb\\u6377\\u534a\\u5c0e\\u9ad4 \\u8996\\u8a0a\\u8a18\\u61b6\\u9ad4 \\u986f\\u793a\\u5361 \\u6620\\u8c61\\u7ba1 \\u57f7\\u884c\\u7dd2 \\u76f8\\u7c3f \\u590f\\u8fb2 \\u5c08\\u6848 \\u756b\\u7d20 \\u8a0a\\u606f \\u9632\\u5beb \\u89e3\\u9664\\u5b89\\u88dd \\u6676\\u7247 \\u7d10\\u897f\\u862d \\u901a\\u9053 \\u8a0a\\u865f \\u8cc7\\u8a0a \\u8cc7\\u8a0a\\u4fdd\\u5b89 \\u8cc7\\u8a0a\\u79d1\\u6280 \\u8cc7\\u8a0a\\u7406\\u8ad6 \\u8a0a\\u96dc\\u6bd4 \\u50f9\\u6548\\u6bd4 \\u6548\\u80fd \\u865b\\u64ec\\u51fd\\u5f0f \\u865b\\u64ec\\u6a5f\\u5668 \\u8ff4\\u5708 \\u5b9a\\u5740 \\u7c21\\u5831 \\u8449\\u9580 \\u9801\\u5c3e \\u9801\\u9996 \\u884c\\u52d5\\u96fb\\u8a71 \\u884c\\u52d5\\u901a\\u8a0a \\u884c\\u52d5\\u7db2\\u8def \\u884c\\u52d5\\u786c\\u789f \\u884c\\u52d5\\u8cc7\\u6599 \\u4e59\\u592a\\u7db2 \\u975e\\u540c\\u6b65 \\u7fa9\\u5927\\u5229 \\u6ea2\\u4f4d \\u97f3\\u8a0a \\u8f09\\u5165\\u7a0b\\u5f0f \\u5c0d\\u6620 \\u786c\\u9ad4 \\u786c\\u789f \\u4f7f\\u7528\\u8005 \\u4f7f\\u7528\\u8005\\u540d\\u7a31 \\u512a\\u5148\\u9806\\u5e8f \\u6709\\u5931\\u771f\\u58d3\\u7e2e \\u524d\\u8655\\u7406\\u5668 \\u8d85\\u7a0b\\u5f0f\\u8a2d\\u8a08 \\u5f8c\\u8a2d\\u8cc7\\u6599 \\u6bcd\\u97f3 \\u539f\\u59cb\\u78bc \\u539f\\u59cb\\u78bc \\u539f\\u59cb\\u78bc \\u539f\\u59cb\\u6a94 \\u9060\\u7aef \\u96f2\\u7aef\\u5132\\u5b58 \\u96f2\\u7aef\\u8a08\\u7b97 \\u57f7\\u884c \\u904b\\u7b97\\u5b50 \\u7dda\\u4e0a \\u5c1a\\u6bd4\\u4e9e \\u67e5\\u5fb7 \\u8cbc\\u4e0a \\u6b63\\u898f\\u8868\\u793a\\u5f0f \\u652f\\u63f4 \\u667a\\u6167\\u8ca1\\u7522\\u6b0a \\u6307\\u6a19 \\u667a\\u6167 \\u4e2d\\u4ecb\\u8edf\\u9ad4 \\u91cd\\u65b0\\u547d\\u540d \\u904e\\u8f09 \\u91cd\\u704c \\u4e3b\\u6a5f\\u677f \\u4e3b\\u958b\\u6a5f\\u8a18\\u9304 \\u767b\\u9304\\u6a94 \\u5e8f\\u865f\\u7522\\u751f\\u5668 \\u767b\\u51fa \\u72c0\\u614b\\u5217 \\u684c\\u4e0a\\u578b \\u81ea\\u52d5\\u65cb\\u8f49\\u87a2\\u5e55 \\u8173\\u8e0f\\u8eca \\u6b04\\u4f4d \\u5b57\\u5143 \\u5b57\\u4e32 \\u4f4d\\u5143\\u7d44 \\u5b57\\u578b\\u6a94 \\u5b57\\u578b \\u532f\\u6d41\\u6392 \\u5143\\u4ef6 \\u7d42\\u7aef\\u4f7f\\u7528\\u8005\".split(\" \"),I=\"\\u346e \\u346f \\u3473 \\u3476 \\u3493 \\u34c4 \\u34e8 \\u350b \\u35ae \\u35f2 \\u35ff \\u3609 \\u3613 \\u3614 \\u361a \\u36dd \\u3704 \\u370f \\u3710 \\u3717 \\u3722 \\u3737 \\u379e \\u37fa \\u380f \\u3897 \\u389d \\u396e \\u398e \\u399b \\u399e \\u3a3b \\u3a4b \\u3a5c \\u3a73 \\u3a75 \\u3a8e \\u3be4 \\u3c19 \\u3d57 \\u3d7e \\u3d86 \\u3dcd \\u3dff \\u3e07 \\u3e7d \\u3e8f \\u3e9c \\u3ef6 \\u3fd6 \\u3fd7 \\u3fe7 \\u4009 \\u4039 \\u406a \\u407b \\u408e \\u40ee \\u4150 \\u4173 \\u4189 \\u4251 \\u4259 \\u426c \\u4272 \\u4276 \\u42ad \\u42b7 \\u42ba \\u42c3 \\u42d4 \\u42d9 \\u42da \\u42e6 \\u42f9 \\u42fb \\u42fc \\u42ff \\u4308 \\u430b \\u4316 \\u431d \\u431f \\u4325 \\u4330 \\u4364 \\u4366 \\u437d \\u4399 \\u43b1 \\u4564 \\u4573 \\u4585 \\u45c5 \\u45ff \\u4654 \\u4661 \\u4671 \\u46a9 \\u46c4 \\u46f3 \\u4700 \\u4716 \\u476d \\u477b \\u477c \\u4788 \\u478b \\u4793 \\u47c3 \\u47c6 \\u47d0 \\u4806 \\u4831 \\u4850 \\u4869 \\u4875 \\u48a8 \\u4924 \\u4944 \\u4947 \\u4951 \\u4957 \\u4969 \\u496f \\u4971 \\u4998 \\u499b \\u499f \\u49af \\u49b3 \\u49e2 \\u4a8a \\u4a8f \\u4a97 \\u4a98 \\u4ab4 \\u4abe \\u4ac0 \\u4ac2 \\u4adf \\u4af4 \\u4af6 \\u4afb \\u4afe \\u4b13 \\u4b18 \\u4b1d \\u4b1e \\u4b27 \\u4b40 \\u4b43 \\u4b51 \\u4b54 \\u4b7f \\u4b84 \\u4b9d \\u4b9e \\u4ba0 \\u4bab \\u4bb0 \\u4bb3 \\u4bbe \\u4bc0 \\u4be4 \\u4c3e \\u4c40 \\u4c41 \\u4c59 \\u4c67 \\u4c6c \\u4c70 \\u4c77 \\u4c78 \\u4c7d \\u4c81 \\u4c85 \\u4c96 \\u4c98 \\u4cb0 \\u4cdc \\u4ce2 \\u4ce4 \\u4ce7 \\u4ceb \\u4d09 \\u4d0b \\u4d2c \\u4d31 \\u4d34 \\u4d3d \\u4d73 \\u4d74 \\u4d95 \\u4db2 \\u4e1f \\u4e26 \\u4e7e \\u4e82 \\u4e99 \\u4e9e \\u4f47 \\u4f48 \\u4f54 \\u4f75 \\u4f86 \\u4f96 \\u4fb6 \\u4fb7 \\u4fc1 \\u4fc2 \\u4fd3 \\u4fd4 \\u4fe0 \\u4fe5 \\u4fec \\u5000 \\u5006 \\u5008 \\u5009 \\u500b \\u5011 \\u5016 \\u502b \\u5032 \\u5049 \\u5051 \\u5074 \\u5075 \\u507d \\u508c \\u5091 \\u5096 \\u5098 \\u5099 \\u50a2 \\u50ad \\u50af \\u50b3 \\u50b4 \\u50b5 \\u50b7 \\u50be \\u50c2 \\u50c5 \\u50c9 \\u50d1 \\u50d5 \\u50de \\u50e5 \\u50e8 \\u50f1 \\u50f9 \\u5100 \\u5101 \\u5102 \\u5104 \\u5108 \\u5109 \\u510e \\u5110 \\u5114 \\u5115 \\u5118 \\u511f \\u5123 \\u512a \\u512d \\u5132 \\u5137 \\u5138 \\u513a \\u513b \\u513c \\u5147 \\u514c \\u5152 \\u5157 \\u5167 \\u5169 \\u518a \\u5191 \\u51aa \\u51c8 \\u51cd \\u51d9 \\u51dc \\u51f1 \\u5225 \\u522a \\u5244 \\u5247 \\u524b \\u524e \\u5257 \\u525b \\u525d \\u526e \\u5274 \\u5275 \\u5277 \\u527e \\u5283 \\u5287 \\u5289 \\u528a \\u528c \\u528d \\u528f \\u5291 \\u529a \\u52c1 \\u52d1 \\u52d5 \\u52d9 \\u52db \\u52dd \\u52de \\u52e2 \\u52e3 \\u52e9 \\u52f1 \\u52f3 \\u52f5 \\u52f8 \\u52fb \\u532d \\u532f \\u5331 \\u5340 \\u5354 \\u5379 \\u537b \\u537d \\u5399 \\u53a0 \\u53a4 \\u53ad \\u53b2 \\u53b4 \\u53c3 \\u53c4 \\u53e2 \\u5412 \\u5433 \\u5436 \\u5442 \\u54bc \\u54e1 \\u54ef \\u5504 \\u5513 \\u551a \\u5538 \\u554f \\u5553 \\u555e \\u555f \\u5562 \\u558e \\u559a \\u55aa \\u55ab \\u55ac \\u55ae \\u55b2 \\u55c6 \\u55c7 \\u55ca \\u55ce \\u55da \\u55e9 \\u55f0 \\u55f6 \\u55f9 \\u5606 \\u560d \\u5613 \\u5614 \\u5616 \\u5617 \\u561c \\u5629 \\u562a \\u562e \\u562f \\u5630 \\u5633 \\u5635 \\u5638 \\u563a \\u563d \\u5641 \\u5645 \\u5653 \\u565a \\u565d \\u565e \\u5660 \\u5665 \\u5666 \\u566f \\u5672 \\u5674 \\u5678 \\u5679 \\u5680 \\u5687 \\u568c \\u5690 \\u5695 \\u5699 \\u569b \\u56a5 \\u56a6 \\u56a7 \\u56a8 \\u56ae \\u56b2 \\u56b3 \\u56b4 \\u56b6 \\u56bd \\u56c0 \\u56c1 \\u56c2 \\u56c3 \\u56c5 \\u56c8 \\u56c9 \\u56cc \\u56d1 \\u56d2 \\u56ea \\u5707 \\u570b \\u570d \\u5712 \\u5713 \\u5716 \\u5718 \\u571e \\u57b5 \\u57e1 \\u57ec \\u57f0 \\u57f7 \\u5805 \\u580a \\u5816 \\u581a \\u581d \\u582f \\u5831 \\u5834 \\u584a \\u584b \\u584f \\u5852 \\u5857 \\u585a \\u5862 \\u5864 \\u5875 \\u5879 \\u587f \\u588a \\u589c \\u58ae \\u58b0 \\u58b2 \\u58b3 \\u58b6 \\u58bb \\u58be \\u58c7 \\u58c8 \\u58cb \\u58ce \\u58d3 \\u58d7 \\u58d8 \\u58d9 \\u58da \\u58dc \\u58de \\u58df \\u58e0 \\u58e2 \\u58e3 \\u58e9 \\u58ea \\u58ef \\u58fa \\u58fc \\u58fd \\u5920 \\u5922 \\u5925 \\u593e \\u5950 \\u5967 \\u5969 \\u596a \\u596c \\u596e \\u597c \\u599d \\u59cd \\u59e6 \\u5a1b \\u5a41 \\u5a61 \\u5a66 \\u5a6d \\u5a88 \\u5aa7 \\u5aaf \\u5ab0 \\u5abc \\u5abd \\u5acb \\u5ad7 \\u5af5 \\u5afa \\u5afb \\u5aff \\u5b00 \\u5b03 \\u5b07 \\u5b08 \\u5b0b \\u5b0c \\u5b19 \\u5b21 \\u5b23 \\u5b24 \\u5b26 \\u5b2a \\u5b30 \\u5b38 \\u5b3b \\u5b43 \\u5b44 \\u5b46 \\u5b47 \\u5b4b \\u5b4c \\u5b4e \\u5b6b \\u5b78 \\u5b7b \\u5b7e \\u5b7f \\u5bae \\u5bc0 \\u5be0 \\u5be2 \\u5be6 \\u5be7 \\u5be9 \\u5beb \\u5bec \\u5bf5 \\u5bf6 \\u5c07 \\u5c08 \\u5c0b \\u5c0d \\u5c0e \\u5c37 \\u5c46 \\u5c4d \\u5c53 \\u5c5c \\u5c62 \\u5c64 \\u5c68 \\u5c69 \\u5c6c \\u5ca1 \\u5cef \\u5cf4 \\u5cf6 \\u5cfd \\u5d0d \\u5d11 \\u5d17 \\u5d19 \\u5d22 \\u5d2c \\u5d50 \\u5d57 \\u5d7c \\u5d7e \\u5d81 \\u5d84 \\u5d87 \\u5d88 \\u5d94 \\u5d97 \\u5d98 \\u5da0 \\u5da2 \\u5da7 \\u5da8 \\u5dae \\u5db4 \\u5db8 \\u5db9 \\u5dba \\u5dbc \\u5dbd \\u5dca \\u5dcb \\u5dd2 \\u5dd4 \\u5dd6 \\u5dd7 \\u5dd8 \\u5df0 \\u5df9 \\u5e25 \\u5e2b \\u5e33 \\u5e36 \\u5e40 \\u5e43 \\u5e53 \\u5e57 \\u5e58 \\u5e5d \\u5e5f \\u5e63 \\u5e69 \\u5e6b \\u5e6c \\u5e79 \\u5e7e \\u5eab \\u5ec1 \\u5ec2 \\u5ec4 \\u5ec8 \\u5ece \\u5ed5 \\u5eda \\u5edd \\u5edf \\u5ee0 \\u5ee1 \\u5ee2 \\u5ee3 \\u5ee7 \\u5ee9 \\u5eec \\u5ef3 \\u5f12 \\u5f14 \\u5f33 \\u5f35 \\u5f37 \\u5f43 \\u5f46 \\u5f48 \\u5f4c \\u5f4e \\u5f54 \\u5f59 \\u5f5e \\u5f60 \\u5f65 \\u5f6b \\u5f72 \\u5f77 \\u5f7f \\u5f8c \\u5f91 \\u5f9e \\u5fa0 \\u5fa9 \\u5fb5 \\u5fb9 \\u5fbf \\u6046 \\u6065 \\u6085 \\u609e \\u60b5 \\u60b6 \\u60bd \\u60e1 \\u60f1 \\u60f2 \\u60fb \\u611b \\u611c \\u6128 \\u6134 \\u6137 \\u613b \\u613e \\u6144 \\u614b \\u614d \\u6158 \\u615a \\u615f \\u6163 \\u6164 \\u616a \\u616b \\u616e \\u6173 \\u6176 \\u617a \\u617c \\u617e \\u6182 \\u618a \\u6190 \\u6191 \\u6192 \\u6196 \\u619a \\u61a2 \\u61a4 \\u61ab \\u61ae \\u61b2 \\u61b6 \\u61b8 \\u61b9 \\u61c0 \\u61c7 \\u61c9 \\u61cc \\u61cd \\u61ce \\u61de \\u61df \\u61e3 \\u61e4 \\u61e8 \\u61f2 \\u61f6 \\u61f7 \\u61f8 \\u61fa \\u61fc \\u61fe \\u6200 \\u6207 \\u6214 \\u6227 \\u6229 \\u6230 \\u6231 \\u6232 \\u6236 \\u62cb \\u6329 \\u6331 \\u633e \\u6368 \\u636b \\u6371 \\u6372 \\u6383 \\u6384 \\u6386 \\u6397 \\u6399 \\u639a \\u639b \\u63a1 \\u63c0 \\u63da \\u63db \\u63ee \\u63ef \\u640d \\u6416 \\u6417 \\u6435 \\u6436 \\u644b \\u6450 \\u6451 \\u645c \\u645f \\u646f \\u6473 \\u6476 \\u647a \\u647b \\u6488 \\u648a \\u648f \\u6490 \\u6493 \\u649d \\u649f \\u64a3 \\u64a5 \\u64a7 \\u64ab \\u64b2 \\u64b3 \\u64bb \\u64be \\u64bf \\u64c1 \\u64c4 \\u64c7 \\u64ca \\u64cb \\u64d3 \\u64d4 \\u64da \\u64df \\u64e0 \\u64e1 \\u64e3 \\u64eb \\u64ec \\u64ef \\u64f0 \\u64f1 \\u64f2 \\u64f4 \\u64f7 \\u64fa \\u64fb \\u64fc \\u64fd \\u64fe \\u6504 \\u6506 \\u650b \\u650f \\u6514 \\u6516 \\u6519 \\u651b \\u651c \\u651d \\u6522 \\u6523 \\u6524 \\u652a \\u652c \\u654e \\u6553 \\u6557 \\u6558 \\u6575 \\u6578 \\u6582 \\u6583 \\u6585 \\u6586 \\u6595 \\u65ac \\u65b7 \\u65b8 \\u65bc \\u65c2 \\u65e3 \\u6607 \\u6642 \\u6649 \\u665d \\u6688 \\u6689 \\u6698 \\u66a2 \\u66ab \\u66c4 \\u66c6 \\u66c7 \\u66c9 \\u66ca \\u66cf \\u66d6 \\u66e0 \\u66e5 \\u66e8 \\u66ec \\u66f8 \\u6703 \\u6725 \\u6727 \\u672e \\u6771 \\u6774 \\u67b4 \\u67f5 \\u67fa \\u67fb \\u6871 \\u687f \\u6894 \\u6896 \\u6898 \\u689d \\u689f \\u68b2 \\u68c4 \\u68ca \\u68d6 \\u68d7 \\u68df \\u68e1 \\u68e7 \\u68f2 \\u68f6 \\u690f \\u6932 \\u6947 \\u694a \\u6953 \\u6968 \\u696d \\u6975 \\u6998 \\u69a6 \\u69aa \\u69ae \\u69b2 \\u69bf \\u69cb \\u69cd \\u69d3 \\u69e4 \\u69e7 \\u69e8 \\u69eb \\u69ee \\u69f3 \\u69f6 \\u69fc \\u6a01 \\u6a02 \\u6a05 \\u6a11 \\u6a13 \\u6a19 \\u6a1e \\u6a20 \\u6a22 \\u6a23 \\u6a24 \\u6a27 \\u6a2b \\u6a33 \\u6a38 \\u6a39 \\u6a3a \\u6a3f \\u6a48 \\u6a4b \\u6a5f \\u6a62 \\u6a6b \\u6a6f \\u6a81 \\u6a89 \\u6a94 \\u6a9c \\u6a9f \\u6aa2 \\u6aa3 \\u6aad \\u6aae \\u6aaf \\u6ab3 \\u6ab5 \\u6ab8 \\u6abb \\u6abe \\u6ac3 \\u6ac5 \\u6ad3 \\u6ada \\u6adb \\u6add \\u6ade \\u6adf \\u6ae0 \\u6ae5 \\u6ae7 \\u6ae8 \\u6aea \\u6aeb \\u6aec \\u6af1 \\u6af3 \\u6af8 \\u6afa \\u6afb \\u6b04 \\u6b05 \\u6b07 \\u6b0a \\u6b0d \\u6b0f \\u6b10 \\u6b11 \\u6b12 \\u6b13 \\u6b16 \\u6b18 \\u6b1e \\u6b3d \\u6b4e \\u6b50 \\u6b5f \\u6b61 \\u6b72 \\u6b77 \\u6b78 \\u6b7f \\u6b98 \\u6b9e \\u6ba2 \\u6ba4 \\u6ba8 \\u6bab \\u6bad \\u6bae \\u6baf \\u6bb0 \\u6bb2 \\u6bba \\u6bbb \\u6bbc \\u6bc0 \\u6bc6 \\u6bca \\u6bff \\u6c02 \\u6c08 \\u6c0c \\u6c23 \\u6c2b \\u6c2c \\u6c2d \\u6c33 \\u6c3e \\u6c4e \\u6c59 \\u6c7a \\u6c88 \\u6c92 \\u6c96 \\u6cc1 \\u6cdd \\u6d29 \\u6d36 \\u6d79 \\u6d87 \\u6d97 \\u6dbc \\u6dd2 \\u6dda \\u6de5 \\u6de8 \\u6de9 \\u6dea \\u6df5 \\u6df6 \\u6dfa \\u6e19 \\u6e1b \\u6e22 \\u6e26 \\u6e2c \\u6e3e \\u6e4a \\u6e4b \\u6e5e \\u6e67 \\u6e6f \\u6e88 \\u6e96 \\u6e9d \\u6ea1 \\u6eab \\u6eae \\u6eb3 \\u6ebc \\u6ec4 \\u6ec5 \\u6ecc \\u6ece \\u6ed9 \\u6eec \\u6eef \\u6ef2 \\u6ef7 \\u6ef8 \\u6efb \\u6efe \\u6eff \\u6f01 \\u6f0a \\u6f1a \\u6f22 \\u6f23 \\u6f2c \\u6f32 \\u6f35 \\u6f38 \\u6f3f \\u6f41 \\u6f51 \\u6f54 \\u6f55 \\u6f59 \\u6f5a \\u6f5b \\u6f63 \\u6f64 \\u6f6f \\u6f70 \\u6f77 \\u6f7f \\u6f80 \\u6f85 \\u6f86 \\u6f87 \\u6f90 \\u6f97 \\u6fa0 \\u6fa4 \\u6fa6 \\u6fa9 \\u6fac \\u6fae \\u6fb1 \\u6fbe \\u6fc1 \\u6fc3 \\u6fc4 \\u6fc6 \\u6fd5 \\u6fd8 \\u6fda \\u6fdb \\u6fdc \\u6fdf \\u6fe4 \\u6fe7 \\u6feb \\u6ff0 \\u6ff1 \\u6ffa \\u6ffc \\u6ffe \\u6fff \\u7002 \\u7003 \\u7005 \\u7006 \\u7007 \\u7009 \\u700b \\u700f \\u7015 \\u7018 \\u701d \\u701f \\u7020 \\u7026 \\u7027 \\u7028 \\u7030 \\u7032 \\u703e \\u7043 \\u7044 \\u704d \\u7051 \\u7052 \\u7055 \\u7058 \\u7059 \\u705d \\u7061 \\u7063 \\u7064 \\u7067 \\u7069 \\u707d \\u70ba \\u70cf \\u70f4 \\u7121 \\u7147 \\u7149 \\u7152 \\u7159 \\u7162 \\u7165 \\u7169 \\u716c \\u7171 \\u7182 \\u7185 \\u7189 \\u718c \\u7192 \\u7193 \\u7197 \\u719a \\u71a1 \\u71b1 \\u71b2 \\u71be \\u71c1 \\u71c8 \\u71c9 \\u71d2 \\u71d9 \\u71dc \\u71df \\u71e6 \\u71ec \\u71ed \\u71f4 \\u71f6 \\u71fb \\u71fc \\u71fe \\u7203 \\u7204 \\u7207 \\u720d \\u7210 \\u7216 \\u721b \\u7225 \\u7227 \\u722d \\u7232 \\u723a \\u723e \\u7240 \\u7246 \\u7258 \\u7274 \\u727d \\u7296 \\u729b \\u729e \\u72a2 \\u72a7 \\u72c0 \\u72f9 \\u72fd \\u730c \\u7319 \\u7336 \\u733b \\u7341 \\u7343 \\u7344 \\u7345 \\u734a \\u734e \\u7368 \\u7369 \\u736a \\u736b \\u736e \\u7370 \\u7371 \\u7372 \\u7375 \\u7377 \\u7378 \\u737a \\u737b \\u737c \\u7380 \\u7381 \\u73fc \\u73fe \\u7431 \\u743a \\u743f \\u744b \\u7452 \\u7463 \\u7464 \\u7469 \\u746a \\u7472 \\u747b \\u747d \\u7489 \\u748a \\u749d \\u74a1 \\u74a3 \\u74a6 \\u74ab \\u74af \\u74b0 \\u74b5 \\u74b8 \\u74bc \\u74bd \\u74be \\u74c4 \\u74ca \\u74cf \\u74d4 \\u74d5 \\u74da \\u74db \\u750c \\u7515 \\u7522 \\u7523 \\u7526 \\u752f \\u755d \\u7562 \\u756b \\u7570 \\u7575 \\u7576 \\u757c \\u7587 \\u758a \\u75d9 \\u75e0 \\u75ee \\u75fe \\u7602 \\u760b \\u760d \\u7613 \\u761e \\u7621 \\u7627 \\u762e \\u7631 \\u7632 \\u763a \\u763b \\u7642 \\u7646 \\u7647 \\u7649 \\u7650 \\u7652 \\u7658 \\u765f \\u7661 \\u7662 \\u7664 \\u7665 \\u7667 \\u7669 \\u766c \\u766d \\u766e \\u7670 \\u7671 \\u7672 \\u767c \\u7681 \\u769a \\u769f \\u76b0 \\u76b8 \\u76ba \\u76c3 \\u76dc \\u76de \\u76e1 \\u76e3 \\u76e4 \\u76e7 \\u76e8 \\u76ea \\u771d \\u771e \\u7725 \\u773e \\u774d \\u774f \\u775c \\u775e \\u776a \\u7798 \\u779c \\u779e \\u77a4 \\u77ad \\u77b6 \\u77bc \\u77c7 \\u77c9 \\u77d1 \\u77d3 \\u77da \\u77ef \\u7843 \\u785c \\u7864 \\u7868 \\u786f \\u7895 \\u7899 \\u78a9 \\u78ad \\u78b8 \\u78ba \\u78bc \\u78bd \\u78d1 \\u78da \\u78e0 \\u78e3 \\u78e7 \\u78ef \\u78fd \\u78fe \\u7904 \\u7906 \\u790e \\u7912 \\u7919 \\u7926 \\u792a \\u792b \\u792c \\u792e \\u7931 \\u7947 \\u7955 \\u797f \\u798d \\u798e \\u7995 \\u79a1 \\u79a6 \\u79aa \\u79ae \\u79b0 \\u79b1 \\u79bf \\u79c8 \\u7a05 \\u7a08 \\u7a0f \\u7a1c \\u7a1f \\u7a2e \\u7a31 \\u7a40 \\u7a47 \\u7a4c \\u7a4d \\u7a4e \\u7a60 \\u7a61 \\u7a62 \\u7a69 \\u7a6b \\u7a6d \\u7aa9 \\u7aaa \\u7aae \\u7aaf \\u7ab5 \\u7ab6 \\u7aba \\u7ac4 \\u7ac5 \\u7ac7 \\u7ac8 \\u7aca \\u7ada \\u7aea \\u7af1 \\u7af6 \\u7b46 \\u7b4d \\u7b67 \\u7b74 \\u7b87 \\u7b8b \\u7b8f \\u7bc0 \\u7bc4 \\u7bc9 \\u7bcb \\u7bd4 \\u7bd8 \\u7be0 \\u7be4 \\u7be9 \\u7bf3 \\u7bf8 \\u7c00 \\u7c02 \\u7c0d \\u7c11 \\u7c1e \\u7c21 \\u7c22 \\u7c23 \\u7c2b \\u7c39 \\u7c3d \\u7c3e \\u7c43 \\u7c45 \\u7c4b \\u7c4c \\u7c54 \\u7c59 \\u7c5b \\u7c5c \\u7c5f \\u7c60 \\u7c64 \\u7c69 \\u7c6a \\u7c6c \\u7c6e \\u7c72 \\u7cb5 \\u7cc9 \\u7cdd \\u7cde \\u7ce7 \\u7cf0 \\u7cf2 \\u7cf4 \\u7cf6 \\u7cf9 \\u7cfa \\u7cfe \\u7d00 \\u7d02 \\u7d04 \\u7d05 \\u7d06 \\u7d07 \\u7d08 \\u7d09 \\u7d0b \\u7d0d \\u7d10 \\u7d13 \\u7d14 \\u7d15 \\u7d16 \\u7d17 \\u7d18 \\u7d19 \\u7d1a \\u7d1b \\u7d1c \\u7d1d \\u7d1f \\u7d21 \\u7d2c \\u7d2e \\u7d30 \\u7d31 \\u7d32 \\u7d33 \\u7d35 \\u7d39 \\u7d3a \\u7d3c \\u7d3f \\u7d40 \\u7d41 \\u7d42 \\u7d43 \\u7d44 \\u7d45 \\u7d46 \\u7d4d \\u7d4e \\u7d50 \\u7d55 \\u7d59 \\u7d5b \\u7d5d \\u7d5e \\u7d61 \\u7d62 \\u7d65 \\u7d66 \\u7d67 \\u7d68 \\u7d70 \\u7d71 \\u7d72 \\u7d73 \\u7d76 \\u7d79 \\u7d7a \\u7d80 \\u7d81 \\u7d83 \\u7d86 \\u7d87 \\u7d88 \\u7d89 \\u7d8b \\u7d8c \\u7d8f \\u7d90 \\u7d91 \\u7d93 \\u7d96 \\u7d9c \\u7d9e \\u7d9f \\u7da0 \\u7da1 \\u7da2 \\u7da3 \\u7dab \\u7dac \\u7dad \\u7daf \\u7db0 \\u7db1 \\u7db2 \\u7db3 \\u7db4 \\u7db5 \\u7db8 \\u7db9 \\u7dba \\u7dbb \\u7dbd \\u7dbe \\u7dbf \\u7dc4 \\u7dc7 \\u7dca \\u7dcb \\u7dcd \\u7dd1 \\u7dd2 \\u7dd3 \\u7dd4 \\u7dd7 \\u7dd8 \\u7dd9 \\u7dda \\u7ddd \\u7dde \\u7ddf \\u7de0 \\u7de1 \\u7de3 \\u7de4 \\u7de6 \\u7de8 \\u7de9 \\u7dec \\u7dee \\u7def \\u7df0 \\u7df1 \\u7df2 \\u7df4 \\u7df6 \\u7df7 \\u7df8 \\u7df9 \\u7dfb \\u7dfc \\u7e08 \\u7e09 \\u7e0a \\u7e0b \\u7e0d \\u7e0e \\u7e10 \\u7e11 \\u7e15 \\u7e17 \\u7e1b \\u7e1d \\u7e1e \\u7e1f \\u7e23 \\u7e27 \\u7e2b \\u7e2c \\u7e2d \\u7e2e \\u7e30 \\u7e31 \\u7e32 \\u7e33 \\u7e34 \\u7e35 \\u7e36 \\u7e37 \\u7e38 \\u7e39 \\u7e3a \\u7e3d \\u7e3e \\u7e42 \\u7e43 \\u7e45 \\u7e46 \\u7e48 \\u7e4f \\u7e50 \\u7e52 \\u7e53 \\u7e54 \\u7e55 \\u7e5a \\u7e5e \\u7e5f \\u7e61 \\u7e62 \\u7e68 \\u7e69 \\u7e6a \\u7e6b \\u7e6c \\u7e6d \\u7e6e \\u7e6f \\u7e70 \\u7e73 \\u7e76 \\u7e77 \\u7e78 \\u7e79 \\u7e7b \\u7e7c \\u7e7d \\u7e7e \\u7e7f \\u7e81 \\u7e87 \\u7e88 \\u7e8a \\u7e8c \\u7e8d \\u7e8f \\u7e93 \\u7e94 \\u7e96 \\u7e97 \\u7e98 \\u7e9a \\u7e9c \\u7f3d \\u7f43 \\u7f48 \\u7f4c \\u7f4e \\u7f70 \\u7f75 \\u7f77 \\u7f85 \\u7f86 \\u7f88 \\u7f8b \\u7fa3 \\u7fa5 \\u7fa8 \\u7fa9 \\u7fb5 \\u7fb6 \\u7fd2 \\u7fec \\u7ff9 \\u7ffd \\u802c \\u802e \\u8056 \\u805e \\u806f \\u8070 \\u8072 \\u8073 \\u8075 \\u8076 \\u8077 \\u8079 \\u807b \\u807d \\u807e \\u8085 \\u8105 \\u8108 \\u811b \\u8123 \\u8125 \\u8129 \\u812b \\u8139 \\u814e \\u8156 \\u8161 \\u8166 \\u816a \\u816b \\u8173 \\u8178 \\u8183 \\u8195 \\u819a \\u819e \\u81a0 \\u81a2 \\u81a9 \\u81b9 \\u81bd \\u81be \\u81bf \\u81c9 \\u81cd \\u81cf \\u81d7 \\u81d8 \\u81da \\u81df \\u81e0 \\u81e2 \\u81e5 \\u81e8 \\u81fa \\u8207 \\u8208 \\u8209 \\u820a \\u8218 \\u8259 \\u8263 \\u8264 \\u8266 \\u826b \\u8271 \\u8277 \\u82bb \\u82e7 \\u8332 \\u834a \\u838a \\u8396 \\u83a2 \\u83a7 \\u83d5 \\u83ef \\u83f4 \\u83f8 \\u8407 \\u840a \\u842c \\u8434 \\u8435 \\u8449 \\u8452 \\u845d \\u8464 \\u8466 \\u846f \\u8477 \\u848d \\u8490 \\u8493 \\u8494 \\u8495 \\u849e \\u84ad \\u84bc \\u84c0 \\u84c6 \\u84cb \\u84e7 \\u84ee \\u84ef \\u84f4 \\u84fd \\u8514 \\u8518 \\u851e \\u8523 \\u8525 \\u8526 \\u852d \\u852f \\u853f \\u8541 \\u8546 \\u854e \\u8552 \\u8553 \\u8555 \\u8558 \\u855d \\u8562 \\u8569 \\u856a \\u856d \\u8573 \\u8577 \\u857d \\u8580 \\u8586 \\u8588 \\u858a \\u858c \\u8591 \\u8594 \\u8598 \\u859f \\u85a6 \\u85a9 \\u85b0 \\u85b3 \\u85b4 \\u85b5 \\u85b9 \\u85ba \\u85c9 \\u85cd \\u85ce \\u85dd \\u85e5 \\u85ea \\u85ed \\u85f4 \\u85f6 \\u85f7 \\u85f9 \\u85fa \\u8600 \\u8604 \\u8606 \\u8607 \\u860a \\u860b \\u861a \\u861e \\u861f \\u8622 \\u862d \\u863a \\u863f \\u8646 \\u8655 \\u865b \\u865c \\u865f \\u8667 \\u866f \\u86fa \\u86fb \\u8706 \\u8755 \\u875f \\u8766 \\u8768 \\u8778 \\u8784 \\u879e \\u87a2 \\u87ae \\u87bb \\u87bf \\u87c2 \\u87c4 \\u87c8 \\u87ce \\u87d8 \\u87dc \\u87e3 \\u87ec \\u87ef \\u87f2 \\u87f3 \\u87f6 \\u87fb \\u8800 \\u8801 \\u8805 \\u8806 \\u880d \\u8810 \\u8811 \\u8814 \\u8819 \\u881f \\u8823 \\u8826 \\u8828 \\u8831 \\u8836 \\u883b \\u883e \\u8846 \\u884a \\u8853 \\u8855 \\u885a \\u885b \\u885d \\u8879 \\u889e \\u88ca \\u88cf \\u88dc \\u88dd \\u88e1 \\u88fd \\u8907 \\u890c \\u8918 \\u8932 \\u8933 \\u8938 \\u893b \\u8940 \\u8946 \\u8947 \\u8949 \\u894f \\u8953 \\u8956 \\u8957 \\u8958 \\u895d \\u8960 \\u8964 \\u896a \\u896c \\u896f \\u8970 \\u8972 \\u8974 \\u8975 \\u8986 \\u8988 \\u898b \\u898e \\u898f \\u8993 \\u8996 \\u8998 \\u899b \\u89a1 \\u89a5 \\u89a6 \\u89aa \\u89ac \\u89af \\u89b2 \\u89b7 \\u89b9 \\u89ba \\u89bc \\u89bd \\u89bf \\u89c0 \\u89f4 \\u89f6 \\u89f8 \\u8a01 \\u8a02 \\u8a03 \\u8a08 \\u8a0a \\u8a0c \\u8a0e \\u8a10 \\u8a11 \\u8a12 \\u8a13 \\u8a15 \\u8a16 \\u8a17 \\u8a18 \\u8a1b \\u8a1c \\u8a1d \\u8a1e \\u8a1f \\u8a22 \\u8a23 \\u8a25 \\u8a28 \\u8a29 \\u8a2a \\u8a2d \\u8a31 \\u8a34 \\u8a36 \\u8a3a \\u8a3b \\u8a3c \\u8a40 \\u8a41 \\u8a46 \\u8a4a \\u8a4e \\u8a50 \\u8a51 \\u8a52 \\u8a53 \\u8a54 \\u8a55 \\u8a56 \\u8a57 \\u8a58 \\u8a5b \\u8a5e \\u8a60 \\u8a61 \\u8a62 \\u8a63 \\u8a66 \\u8a69 \\u8a6b \\u8a6c \\u8a6d \\u8a6e \\u8a70 \\u8a71 \\u8a72 \\u8a73 \\u8a75 \\u8a77 \\u8a7c \\u8a7f \\u8a82 \\u8a84 \\u8a85 \\u8a86 \\u8a87 \\u8a8b \\u8a8c \\u8a8d \\u8a91 \\u8a92 \\u8a95 \\u8a98 \\u8a9a \\u8a9e \\u8aa0 \\u8aa1 \\u8aa3 \\u8aa4 \\u8aa5 \\u8aa6 \\u8aa8 \\u8aaa \\u8aab \\u8aac \\u8ab0 \\u8ab2 \\u8ab3 \\u8ab4 \\u8ab6 \\u8ab7 \\u8ab9 \\u8aba \\u8abc \\u8abe \\u8abf \\u8ac2 \\u8ac4 \\u8ac7 \\u8ac9 \\u8acb \\u8acd \\u8acf \\u8ad1 \\u8ad2 \\u8ad6 \\u8ad7 \\u8adb \\u8adc \\u8add \\u8ade \\u8ae1 \\u8ae2 \\u8ae3 \\u8ae4 \\u8ae5 \\u8ae6 \\u8ae7 \\u8aeb \\u8aed \\u8aee \\u8aef \\u8af0 \\u8af1 \\u8af3 \\u8af4 \\u8af6 \\u8af7 \\u8af8 \\u8afa \\u8afc \\u8afe \\u8b00 \\u8b01 \\u8b02 \\u8b04 \\u8b05 \\u8b06 \\u8b09 \\u8b0a \\u8b0e \\u8b0f \\u8b10 \\u8b14 \\u8b16 \\u8b17 \\u8b19 \\u8b1a \\u8b1b \\u8b1d \\u8b20 \\u8b21 \\u8b28 \\u8b2b \\u8b2c \\u8b2d \\u8b2f \\u8b31 \\u8b33 \\u8b38 \\u8b39 \\u8b3e \\u8b41 \\u8b42 \\u8b45 \\u8b46 \\u8b49 \\u8b4a \\u8b4e \\u8b4f \\u8b51 \\u8b56 \\u8b58 \\u8b59 \\u8b5a \\u8b5c \\u8b5e \\u8b5f \\u8b68 \\u8b6b \\u8b6d \\u8b6f \\u8b70 \\u8b74 \\u8b77 \\u8b78 \\u8b7d \\u8b7e \\u8b80 \\u8b85 \\u8b8a \\u8b8b \\u8b8c \\u8b8e \\u8b92 \\u8b93 \\u8b95 \\u8b96 \\u8b9a \\u8b9c \\u8b9e \\u8c48 \\u8c4e \\u8c50 \\u8c54 \\u8c6c \\u8c75 \\u8c76 \\u8c93 \\u8c97 \\u8c99 \\u8c9d \\u8c9e \\u8c9f \\u8ca0 \\u8ca1 \\u8ca2 \\u8ca7 \\u8ca8 \\u8ca9 \\u8caa \\u8cab \\u8cac \\u8caf \\u8cb0 \\u8cb2 \\u8cb3 \\u8cb4 \\u8cb6 \\u8cb7 \\u8cb8 \\u8cba \\u8cbb \\u8cbc \\u8cbd \\u8cbf \\u8cc0 \\u8cc1 \\u8cc2 \\u8cc3 \\u8cc4 \\u8cc5 \\u8cc7 \\u8cc8 \\u8cca \\u8cd1 \\u8cd2 \\u8cd3 \\u8cd5 \\u8cd9 \\u8cda \\u8cdc \\u8cdd \\u8cde \\u8cdf \\u8ce0 \\u8ce1 \\u8ce2 \\u8ce3 \\u8ce4 \\u8ce6 \\u8ce7 \\u8cea \\u8ceb \\u8cec \\u8ced \\u8cf0 \\u8cf4 \\u8cf5 \\u8cfa \\u8cfb \\u8cfc \\u8cfd \\u8cfe \\u8d03 \\u8d04 \\u8d05 \\u8d07 \\u8d08 \\u8d09 \\u8d0a \\u8d0b \\u8d0d \\u8d0f \\u8d10 \\u8d11 \\u8d13 \\u8d14 \\u8d16 \\u8d17 \\u8d1a \\u8d1b \\u8d1c \\u8d6c \\u8d95 \\u8d99 \\u8da8 \\u8db2 \\u8de1 \\u8e10 \\u8e30 \\u8e34 \\u8e4c \\u8e54 \\u8e55 \\u8e5f \\u8e63 \\u8e64 \\u8e73 \\u8e7a \\u8e7b \\u8e82 \\u8e89 \\u8e8a \\u8e8b \\u8e8d \\u8e8e \\u8e91 \\u8e92 \\u8e93 \\u8e95 \\u8e98 \\u8e9a \\u8e9d \\u8ea1 \\u8ea5 \\u8ea6 \\u8eaa \\u8ec0 \\u8ec9 \\u8eca \\u8ecb \\u8ecc \\u8ecd \\u8ecf \\u8ed1 \\u8ed2 \\u8ed4 \\u8ed5 \\u8ed7 \\u8edb \\u8edc \\u8edf \\u8ee4 \\u8ee8 \\u8eeb \\u8eec \\u8ef2 \\u8ef7 \\u8ef8 \\u8ef9 \\u8efa \\u8efb \\u8efc \\u8efe \\u8eff \\u8f03 \\u8f04 \\u8f05 \\u8f07 \\u8f08 \\u8f09 \\u8f0a \\u8f0b \\u8f12 \\u8f13 \\u8f14 \\u8f15 \\u8f16 \\u8f17 \\u8f1b \\u8f1c \\u8f1d \\u8f1e \\u8f1f \\u8f22 \\u8f25 \\u8f26 \\u8f28 \\u8f29 \\u8f2a \\u8f2c \\u8f2e \\u8f2f \\u8f33 \\u8f37 \\u8f38 \\u8f3b \\u8f3c \\u8f3e \\u8f3f \\u8f40 \\u8f42 \\u8f44 \\u8f45 \\u8f46 \\u8f47 \\u8f49 \\u8f4a \\u8f4d \\u8f4e \\u8f50 \\u8f54 \\u8f57 \\u8f5f \\u8f60 \\u8f61 \\u8f62 \\u8f63 \\u8f64 \\u8fa6 \\u8fad \\u8fae \\u8faf \\u8fb2 \\u8ff4 \\u9015 \\u9019 \\u9023 \\u9031 \\u9032 \\u904a \\u904b \\u904e \\u9054 \\u9055 \\u9059 \\u905c \\u905e \\u9060 \\u9061 \\u9069 \\u9071 \\u9072 \\u9077 \\u9078 \\u907a \\u907c \\u9081 \\u9084 \\u9087 \\u908a \\u908f \\u9090 \\u90df \\u90f5 \\u9106 \\u9109 \\u9112 \\u9114 \\u9116 \\u911f \\u9127 \\u912d \\u9130 \\u9132 \\u9133 \\u9134 \\u9136 \\u913a \\u9147 \\u9148 \\u9183 \\u9196 \\u919c \\u919e \\u919f \\u91a3 \\u91ab \\u91ac \\u91b1 \\u91b6 \\u91c0 \\u91c1 \\u91c3 \\u91c5 \\u91cb \\u91d0 \\u91d2 \\u91d3 \\u91d4 \\u91d5 \\u91d7 \\u91d8 \\u91d9 \\u91da \\u91dd \\u91df \\u91e3 \\u91e4 \\u91e6 \\u91e7 \\u91e8 \\u91e9 \\u91f2 \\u91f3 \\u91f5 \\u91f7 \\u91f9 \\u91fa \\u91fe \\u9200 \\u9201 \\u9203 \\u9204 \\u9205 \\u9206 \\u9207 \\u9208 \\u9209 \\u920b \\u920d \\u920e \\u9210 \\u9211 \\u9212 \\u9214 \\u9215 \\u9216 \\u9217 \\u921b \\u921e \\u9220 \\u9221 \\u9223 \\u9225 \\u9226 \\u9227 \\u922e \\u922f \\u9230 \\u9232 \\u9233 \\u9234 \\u9237 \\u9238 \\u9239 \\u923a \\u923d \\u923e \\u923f \\u9240 \\u9241 \\u9245 \\u9246 \\u9248 \\u9249 \\u924b \\u924d \\u9251 \\u9254 \\u9255 \\u9257 \\u925a \\u925b \\u925d \\u925e \\u9260 \\u9262 \\u9264 \\u9266 \\u926c \\u926d \\u9273 \\u9276 \\u9277 \\u9278 \\u927a \\u927b \\u927d \\u927e \\u927f \\u9280 \\u9281 \\u9282 \\u9283 \\u9285 \\u9288 \\u928a \\u928d \\u928f \\u9291 \\u9293 \\u9296 \\u9298 \\u929a \\u929b \\u929c \\u92a0 \\u92a3 \\u92a5 \\u92a6 \\u92a8 \\u92a9 \\u92aa \\u92ab \\u92ac \\u92b1 \\u92b3 \\u92b6 \\u92b7 \\u92b9 \\u92bb \\u92bc \\u92c1 \\u92c2 \\u92c3 \\u92c5 \\u92c7 \\u92c9 \\u92cc \\u92cf \\u92d2 \\u92d7 \\u92d9 \\u92dd \\u92df \\u92e0 \\u92e3 \\u92e4 \\u92e5 \\u92e6 \\u92e8 \\u92e9 \\u92ea \\u92ed \\u92ee \\u92ef \\u92f0 \\u92f1 \\u92f6 \\u92f8 \\u92fc \\u9300 \\u9301 \\u9302 \\u9304 \\u9306 \\u9307 \\u9308 \\u930f \\u9310 \\u9312 \\u9315 \\u9318 \\u9319 \\u931a \\u931b \\u931c \\u931d \\u931f \\u9320 \\u9321 \\u9322 \\u9324 \\u9325 \\u9326 \\u9328 \\u9329 \\u932b \\u932e \\u932f \\u9332 \\u9333 \\u9336 \\u9338 \\u933c \\u933d \\u9340 \\u9341 \\u9343 \\u9344 \\u9345 \\u9346 \\u9347 \\u9348 \\u9349 \\u934a \\u934b \\u934d \\u9352 \\u9354 \\u9358 \\u935a \\u935b \\u9360 \\u9364 \\u9365 \\u9369 \\u936c \\u936e \\u9370 \\u9375 \\u9376 \\u937a \\u937c \\u937e \\u9382 \\u9384 \\u9387 \\u9388 \\u938a \\u938c \\u938d \\u9394 \\u9396 \\u9398 \\u9399 \\u939a \\u939b \\u939d \\u939e \\u93a1 \\u93a2 \\u93a3 \\u93a6 \\u93a7 \\u93a9 \\u93aa \\u93ac \\u93ad \\u93ae \\u93af \\u93b0 \\u93b2 \\u93b3 \\u93b5 \\u93b6 \\u93b7 \\u93b8 \\u93bf \\u93c3 \\u93c6 \\u93c7 \\u93c8 \\u93c9 \\u93cc \\u93cd \\u93d0 \\u93d1 \\u93d7 \\u93d8 \\u93da \\u93dc \\u93dd \\u93de \\u93df \\u93e1 \\u93e2 \\u93e4 \\u93e5 \\u93e6 \\u93e8 \\u93f0 \\u93f5 \\u93f7 \\u93f9 \\u93fa \\u93fd \\u93fe \\u9403 \\u9404 \\u9407 \\u9408 \\u940b \\u940d \\u940e \\u940f \\u9410 \\u9412 \\u9413 \\u9414 \\u9417 \\u9418 \\u9419 \\u941d \\u9420 \\u9425 \\u9426 \\u9427 \\u9428 \\u942a \\u942b \\u942e \\u942f \\u9432 \\u9433 \\u9435 \\u9436 \\u9438 \\u943a \\u943c \\u943d \\u943f \\u9440 \\u9444 \\u9449 \\u944a \\u944c \\u9451 \\u9452 \\u9454 \\u9455 \\u945e \\u9460 \\u9463 \\u9465 \\u946a \\u946d \\u9470 \\u9471 \\u9472 \\u9474 \\u9477 \\u9479 \\u947c \\u947d \\u947e \\u947f \\u9481 \\u9482 \\u955f \\u9577 \\u9580 \\u9582 \\u9583 \\u9586 \\u9588 \\u9589 \\u958b \\u958c \\u958d \\u958e \\u958f \\u9590 \\u9591 \\u9592 \\u9593 \\u9594 \\u9597 \\u9598 \\u959d \\u959e \\u95a1 \\u95a3 \\u95a4 \\u95a5 \\u95a8 \\u95a9 \\u95ab \\u95ac \\u95ad \\u95b1 \\u95b2 \\u95b5 \\u95b6 \\u95b9 \\u95bb \\u95bc \\u95bd \\u95be \\u95bf \\u95c3 \\u95c6 \\u95c7 \\u95c8 \\u95ca \\u95cb \\u95cc \\u95cd \\u95d0 \\u95d1 \\u95d2 \\u95d3 \\u95d4 \\u95d5 \\u95d6 \\u95dc \\u95de \\u95e0 \\u95e1 \\u95e2 \\u95e4 \\u95e5 \\u962a \\u9658 \\u965d \\u965e \\u9663 \\u9670 \\u9673 \\u9678 \\u967d \\u9689 \\u968a \\u968e \\u9695 \\u969b \\u96a8 \\u96aa \\u96af \\u96b1 \\u96b4 \\u96b8 \\u96bb \\u96cb \\u96d6 \\u96d9 \\u96db \\u96dc \\u96de \\u96e2 \\u96e3 \\u96f2 \\u96fb \\u9722 \\u9723 \\u9727 \\u973c \\u973d \\u9742 \\u9744 \\u9746 \\u9748 \\u9749 \\u975a \\u975c \\u975d \\u9766 \\u9767 \\u9768 \\u9780 \\u978f \\u979d \\u97a6 \\u97bd \\u97be \\u97c1 \\u97c3 \\u97c6 \\u97c9 \\u97cb \\u97cc \\u97cd \\u97d3 \\u97d9 \\u97da \\u97db \\u97dc \\u97dd \\u97de \\u97e0 \\u97fb \\u97ff \\u9801 \\u9802 \\u9803 \\u9805 \\u9806 \\u9807 \\u9808 \\u980a \\u980c \\u980d \\u980e \\u980f \\u9810 \\u9811 \\u9812 \\u9813 \\u9817 \\u9818 \\u981c \\u9821 \\u9824 \\u9826 \\u982b \\u982d \\u982e \\u9830 \\u9832 \\u9834 \\u9835 \\u9837 \\u9838 \\u9839 \\u983b \\u983d \\u9842 \\u9843 \\u9845 \\u9846 \\u984c \\u984d \\u984e \\u984f \\u9852 \\u9853 \\u9854 \\u9857 \\u9858 \\u9859 \\u985b \\u985e \\u9862 \\u9863 \\u9865 \\u9867 \\u986b \\u986c \\u986f \\u9870 \\u9871 \\u9873 \\u9874 \\u98a8 \\u98ad \\u98ae \\u98af \\u98b0 \\u98b1 \\u98b3 \\u98b6 \\u98b7 \\u98b8 \\u98ba \\u98bb \\u98bc \\u98be \\u98c0 \\u98c4 \\u98c6 \\u98c8 \\u98cb \\u98db \\u98e0 \\u98e2 \\u98e3 \\u98e5 \\u98e6 \\u98e9 \\u98ea \\u98eb \\u98ed \\u98ef \\u98f1 \\u98f2 \\u98f4 \\u98f5 \\u98f6 \\u98fc \\u98fd \\u98fe \\u98ff \\u9903 \\u9904 \\u9905 \\u9909 \\u990a \\u990c \\u990e \\u990f \\u9911 \\u9912 \\u9913 \\u9914 \\u9915 \\u9916 \\u9917 \\u9918 \\u991a \\u991b \\u991c \\u991e \\u9921 \\u9926 \\u9927 \\u9928 \\u992a \\u992b \\u992c \\u992d \\u9931 \\u9933 \\u9935 \\u9936 \\u9937 \\u9938 \\u993a \\u993c \\u993e \\u993f \\u9941 \\u9943 \\u9945 \\u9948 \\u9949 \\u994a \\u994b \\u994c \\u9951 \\u9952 \\u9957 \\u9958 \\u995c \\u995e \\u995f \\u9960 \\u9962 \\u99ac \\u99ad \\u99ae \\u99af \\u99b1 \\u99b3 \\u99b4 \\u99b9 \\u99bc \\u99c1 \\u99c3 \\u99ca \\u99ce \\u99d0 \\u99d1 \\u99d2 \\u99d4 \\u99d5 \\u99d8 \\u99d9 \\u99da \\u99db \\u99dd \\u99de \\u99df \\u99e1 \\u99e2 \\u99e4 \\u99e7 \\u99e9 \\u99eb \\u99ed \\u99f0 \\u99f1 \\u99f6 \\u99f8 \\u99fb \\u99ff \\u9a01 \\u9a02 \\u9a03 \\u9a04 \\u9a05 \\u9a09 \\u9a0a \\u9a0c \\u9a0d \\u9a0e \\u9a0f \\u9a14 \\u9a16 \\u9a19 \\u9a1a \\u9a1c \\u9a1d \\u9a1f \\u9a20 \\u9a24 \\u9a27 \\u9a2a \\u9a2b \\u9a2d \\u9a2e \\u9a30 \\u9a31 \\u9a34 \\u9a35 \\u9a36 \\u9a37 \\u9a38 \\u9a3b \\u9a3c \\u9a3e \\u9a40 \\u9a41 \\u9a42 \\u9a43 \\u9a44 \\u9a45 \\u9a4a \\u9a4b \\u9a4c \\u9a4d \\u9a4f \\u9a53 \\u9a55 \\u9a57 \\u9a59 \\u9a5a \\u9a5b \\u9a5f \\u9a62 \\u9a64 \\u9a65 \\u9a66 \\u9a68 \\u9a6a \\u9a6b \\u9aaf \\u9acf \\u9ad2 \\u9ad4 \\u9ad5 \\u9ad6 \\u9aee \\u9b06 \\u9b0d \\u9b16 \\u9b1a \\u9b20 \\u9b22 \\u9b25 \\u9b27 \\u9b28 \\u9b29 \\u9b2e \\u9b31 \\u9b39 \\u9b4e \\u9b58 \\u9b5a \\u9b5b \\u9b5f \\u9b62 \\u9b65 \\u9b66 \\u9b68 \\u9b6f \\u9b74 \\u9b75 \\u9b77 \\u9b7a \\u9b7d \\u9b81 \\u9b83 \\u9b84 \\u9b85 \\u9b86 \\u9b8a \\u9b8b \\u9b8d \\u9b8e \\u9b90 \\u9b91 \\u9b92 \\u9b93 \\u9b95 \\u9b9a \\u9b9c \\u9b9d \\u9b9e \\u9b9f \\u9ba3 \\u9ba4 \\u9ba6 \\u9baa \\u9bab \\u9bad \\u9bae \\u9baf \\u9bb0 \\u9bb3 \\u9bb5 \\u9bb6 \\u9bb8 \\u9bba \\u9bbf \\u9bc0 \\u9bc1 \\u9bc4 \\u9bc6 \\u9bc7 \\u9bc9 \\u9bca \\u9bd2 \\u9bd4 \\u9bd5 \\u9bd6 \\u9bd7 \\u9bdb \\u9bdd \\u9bde \\u9be1 \\u9be2 \\u9be4 \\u9be7 \\u9be8 \\u9bea \\u9beb \\u9bec \\u9bf0 \\u9bf1 \\u9bf4 \\u9bf6 \\u9bf7 \\u9bfd \\u9bfe \\u9bff \\u9c01 \\u9c02 \\u9c03 \\u9c06 \\u9c08 \\u9c09 \\u9c0b \\u9c0c \\u9c0d \\u9c0f \\u9c10 \\u9c11 \\u9c12 \\u9c13 \\u9c15 \\u9c1b \\u9c1c \\u9c1f \\u9c20 \\u9c23 \\u9c24 \\u9c25 \\u9c26 \\u9c27 \\u9c28 \\u9c29 \\u9c2b \\u9c2d \\u9c2e \\u9c31 \\u9c32 \\u9c33 \\u9c35 \\u9c37 \\u9c39 \\u9c3a \\u9c3b \\u9c3c \\u9c3d \\u9c3e \\u9c42 \\u9c44 \\u9c45 \\u9c46 \\u9c47 \\u9c48 \\u9c49 \\u9c4a \\u9c52 \\u9c54 \\u9c56 \\u9c57 \\u9c58 \\u9c5d \\u9c5f \\u9c60 \\u9c62 \\u9c63 \\u9c64 \\u9c67 \\u9c68 \\u9c6d \\u9c6e \\u9c6f \\u9c72 \\u9c77 \\u9c78 \\u9c7a \\u9ce5 \\u9ce7 \\u9ce9 \\u9cec \\u9cf2 \\u9cf3 \\u9cf4 \\u9cf6 \\u9cf7 \\u9cfc \\u9cfd \\u9cfe \\u9d00 \\u9d03 \\u9d05 \\u9d06 \\u9d07 \\u9d09 \\u9d10 \\u9d12 \\u9d14 \\u9d15 \\u9d17 \\u9d1b \\u9d1c \\u9d1d \\u9d1e \\u9d1f \\u9d23 \\u9d25 \\u9d26 \\u9d28 \\u9d2e \\u9d2f \\u9d30 \\u9d32 \\u9d33 \\u9d34 \\u9d37 \\u9d3b \\u9d3d \\u9d3f \\u9d41 \\u9d42 \\u9d43 \\u9d4a \\u9d50 \\u9d51 \\u9d52 \\u9d53 \\u9d5a \\u9d5c \\u9d5d \\u9d5f \\u9d60 \\u9d61 \\u9d67 \\u9d69 \\u9d6a \\u9d6b \\u9d6c \\u9d6e \\u9d6f \\u9d70 \\u9d72 \\u9d77 \\u9d7e \\u9d84 \\u9d87 \\u9d89 \\u9d8a \\u9d8c \\u9d92 \\u9d93 \\u9d96 \\u9d97 \\u9d98 \\u9d9a \\u9da1 \\u9da5 \\u9da6 \\u9da9 \\u9daa \\u9dac \\u9dad \\u9daf \\u9db0 \\u9db2 \\u9db4 \\u9db9 \\u9dba \\u9dbb \\u9dbc \\u9dbf \\u9dc0 \\u9dc1 \\u9dc2 \\u9dc4 \\u9dc5 \\u9dc8 \\u9dc9 \\u9dca \\u9dd0 \\u9dd3 \\u9dd4 \\u9dd6 \\u9dd7 \\u9dd9 \\u9dda \\u9de3 \\u9de4 \\u9de5 \\u9de6 \\u9de8 \\u9de9 \\u9deb \\u9def \\u9df2 \\u9df3 \\u9df4 \\u9df7 \\u9df8 \\u9df9 \\u9dfa \\u9dfd \\u9dff \\u9e02 \\u9e07 \\u9e0a \\u9e0b \\u9e0c \\u9e0f \\u9e15 \\u9e17 \\u9e18 \\u9e1a \\u9e1b \\u9e1d \\u9e1e \\u9e75 \\u9e79 \\u9e7a \\u9e7c \\u9e7d \\u9e97 \\u9ea5 \\u9ea8 \\u9ea9 \\u9eaa \\u9eab \\u9eac \\u9eaf \\u9eb2 \\u9eb3 \\u9eb4 \\u9eb5 \\u9eb7 \\u9ebc \\u9ebd \\u9ec3 \\u9ecc \\u9ede \\u9ee8 \\u9ef2 \\u9ef4 \\u9ef6 \\u9ef7 \\u9efd \\u9eff \\u9f02 \\u9f09 \\u9f15 \\u9f34 \\u9f47 \\u9f4a \\u9f4b \\u9f4e \\u9f4f \\u9f52 \\u9f54 \\u9f55 \\u9f57 \\u9f59 \\u9f5c \\u9f5f \\u9f60 \\u9f61 \\u9f63 \\u9f66 \\u9f67 \\u9f69 \\u9f6a \\u9f6c \\u9f6d \\u9f6f \\u9f70 \\u9f72 \\u9f74 \\u9f76 \\u9f77 \\u9f7e \\u9f8d \\u9f8e \\u9f90 \\u9f91 \\u9f93 \\u9f94 \\u9f95 \\u9f9c \\u9fad \\u9faf \\u9fc1 \\u9fd3 \\ud840\\udc5e \\ud840\\udf25 \\ud840\\udfe2 \\ud841\\udc0a \\ud841\\udde3 \\ud841\\udf86 \\ud842\\udc0e \\ud842\\udf19 \\ud843\\udf43 \\ud843\\udfd5 \\ud844\\udca1 \\ud844\\udcc4 \\ud844\\udcd5 \\ud844\\udce4 \\ud844\\udd14 \\ud844\\udd23 \\ud844\\udd4f \\ud844\\udd6f \\ud845\\udc6d \\ud845\\udcc1 \\ud845\\udcfe \\ud845\\udd16 \\ud845\\udfb5 \\ud845\\udfeb \\ud846\\udc39 \\ud846\\udc4e \\ud846\\udc83 \\ud846\\udf89 \\ud846\\udfa3 \\ud847\\udcf3 \\ud847\\ude17 \\ud847\\ude6c \\ud847\\uded5 \\ud847\\udf57 \\ud847\\udfb1 \\ud847\\udfd6 \\ud848\\udf70 \\ud84a\\udc3c \\ud84a\\udcd0 \\ud84a\\udcda \\ud84a\\udced \\ud84a\\udd29 \\ud84a\\udd31 \\ud84a\\udd3f \\ud84a\\udff7 \\ud84b\\udd92 \\ud84b\\uddab \\ud84b\\uddec \\ud84b\\uddee \\ud84b\\ude7f \\ud84b\\udeb3 \\ud84c\\ude36 \\ud84c\\udecb \\ud84c\\udf50 \\ud84d\\ude4e \\ud84d\\udf2c \\ud84d\\udf55 \\ud84d\\udfbb \\ud84e\\udc29 \\ud84e\\udc32 \\ud84e\\udfe9 \\ud84e\\udff4 \\ud84e\\udff6 \\ud84f\\udf4f \\ud84f\\udfb7 \\ud84f\\udfc9 \\ud850\\udc63 \\ud850\\udd37 \\ud850\\udd76 \\ud851\\udc73 \\ud851\\udc79 \\ud851\\udc8e \\ud851\\udcbb \\ud851\\udccc \\ud851\\udce9 \\ud851\\ude00 \\ud851\\udeee \\ud851\\udef1 \\ud851\\udf06 \\ud852\\udc2e \\ud852\\udc9f \\ud852\\udcbb \\ud852\\ude42 \\ud852\\udeba \\ud852\\udee9 \\ud852\\udf05 \\ud853\\udcf7 \\ud853\\udcf8 \\ud853\\uddc3 \\ud853\\ude2b \\ud853\\ude94 \\ud854\\ude9d \\ud854\\udf03 \\ud854\\udfdd \\ud855\\udd65 \\ud855\\udd85 \\ud855\\uddb2 \\ud855\\uddc7 \\ud855\\udf10 \\ud855\\udf30 \\ud855\\udfb5 \\ud856\\udca2 \\ud856\\udcb6 \\ud856\\udcb7 \\ud856\\ude10 \\ud856\\ude82 \\ud856\\udfe4 \\ud857\\udd28 \\ud857\\udd3c \\ud857\\udd43 \\ud857\\udd4a \\ud857\\uddbd \\ud857\\ude20 \\ud857\\udee6 \\ud857\\udf3d \\ud857\\udf56 \\ud857\\udfaf \\ud857\\udfca \\ud858\\udc16 \\ud858\\udc85 \\ud858\\udcc4 \\ud858\\udce9 \\ud858\\udd47 \\ud858\\udd48 \\ud858\\uddb2 \\ud859\\udc80 \\ud859\\udd16 \\ud859\\ude27 \\ud859\\udffc \\ud85a\\udc05 \\ud85a\\udc5d \\ud85a\\udc88 \\ud85a\\udcce \\ud85a\\uddfa \\ud85a\\ude99 \\ud85a\\udebd \\ud85b\\udc4c \\ud85b\\udf9f \\ud85c\\udf88 \\ud85d\\udcaf \\ud85d\\udd25 \\ud85d\\udd5f \\ud85d\\udf17 \\ud85d\\udf35 \\ud85d\\udf5e \\ud85d\\udfab \\ud85d\\udfc0 \\ud85e\\udc74 \\ud85e\\udc84 \\ud85e\\udd9d \\ud85e\\udda7 \\ud85e\\ude55 \\ud85e\\ude59 \\ud85e\\ude7c \\ud85e\\udedd \\ud85e\\udf24 \\ud85e\\udf48 \\ud85e\\udf79 \\ud85f\\udcdf \\ud85f\\udd73 \\ud85f\\udd94 \\ud85f\\udda7 \\ud85f\\uddce \\ud85f\\ude18 \\ud85f\\ude48 \\ud85f\\udf6f \\ud860\\udc90 \\ud860\\udd23 \\ud860\\udd4d \\ud860\\uddaa \\ud860\\uddc1 \\ud860\\uddde \\ud860\\udde4 \\ud860\\uddf0 \\ud860\\uddfd \\ud860\\ude0a \\ud860\\ude0c \\ud860\\udeb0 \\ud860\\udeb8 \\ud860\\udebb \\ud860\\udee2 \\ud860\\udf08 \\ud860\\udf70 \\ud860\\udf8c \\ud860\\udfae \\ud860\\udfe0 \\ud860\\udfe5 \\ud861\\udfba \\ud861\\udfca \\ud862\\udcbf \\ud862\\udcc8 \\ud862\\udcde \\ud862\\udce7 \\ud862\\udd3b \\ud862\\udd5b \\ud862\\udd5f \\ud862\\uddab \\ud862\\uddc0 \\ud862\\udddc \\ud862\\uddf0 \\ud862\\uddf1 \\ud862\\ude0f \\ud862\\ude1b \\ud862\\ude22 \\ud862\\ude70 \\ud862\\ude95 \\ud862\\uded2 \\ud862\\udf16 \\ud862\\udf46 \\ud862\\udf4e \\ud862\\udf56 \\ud862\\udf78 \\ud862\\udf82 \\ud862\\udfb3 \\ud862\\udfc5 \\ud862\\udfdf \\ud863\\udc03 \\ud863\\udc0b \\ud863\\udc25 \\ud863\\udc32 \\ud863\\udcb3 \\ud863\\udcd1 \\ud863\\udcd5 \\ud863\\udd17 \\ud863\\udd39 \\ud863\\udd69 \\ud863\\udd78 \\ud863\\udd80 \\ud863\\udd8f \\ud863\\uddae \\ud863\\uddb2 \\ud863\\uddf2 \\ud863\\udf33 \\ud863\\udf4f \\ud864\\udc28 \\ud864\\udd59 \\ud864\\udf96 \\ud864\\udfa2 \\ud864\\udfc2 \\ud864\\udfe0 \\ud864\\udfea \\ud864\\udff7 \\ud865\\udc54 \\ud865\\udc8e \\ud865\\udce3 \\ud865\\udce5 \\ud865\\udd11 \\ud865\\udd33 \\ud865\\uddb0 \\ud865\\uddc0 \\ud865\\uddd3 \\ud865\\uddf4 \\ud865\\ude00 \\ud865\\ude1d \\ud865\\ude39 \\ud865\\ude3a \\ud865\\ude48 \\ud865\\ude9b \\ud865\\udea5 \\ud865\\udea9 \\ud865\\udeb5 \\ud865\\udec6 \\ud865\\udecc \\ud865\\udee1 \\ud865\\udee9 \\ud865\\udf07 \\ud865\\udf26 \\ud865\\udf35 \\ud865\\udf54 \\ud865\\udf7d \\ud865\\udf84 \\ud865\\udfa6 \\ud865\\udfaf \\ud865\\udfd0 \\ud865\\udfd7 \\ud866\\udc34 \\ud866\\udc63 \\ud866\\udc7a \\ud866\\udca1 \\ud866\\udcb4 \\ud866\\udcb8 \\ud866\\udcbe \\ud866\\udccf \\ud866\\udcd1 \\ud866\\udceb \\ud866\\udcf5 \\ud866\\udcfa \\ud866\\udd0a \\ud866\\udd19 \\ud866\\udd32 \\ud866\\udd38 \\ud866\\udd44 \\ud866\\udd47 \\ud866\\udd49 \\ud866\\udd51 \\ud866\\udda0 \\ud866\\uddc6 \\ud866\\udf59 \\ud866\\udfc1 \\ud866\\udff3 \\ud867\\udc00 \\ud867\\udc39 \\ud867\\udce4 \\ud867\\udd35 \\ud867\\udd66 \\ud867\\udd69 \\ud867\\udd79 \\ud867\\udd81 \\ud867\\udd98 \\ud867\\uddb0 \\ud867\\uddb1 \\ud867\\uddf0 \\ud867\\ude03 \\ud867\\ude04 \\ud867\\ude21 \\ud867\\ude26 \\ud867\\uded7 \\ud867\\udeec \\ud867\\udeee \\ud867\\udf36 \\ud867\\udf47 \\ud867\\udfc5 \\ud867\\udfe4 \\ud867\\udfea \\ud868\\udc16 \\ud868\\udc26 \\ud868\\udc3e \\ud868\\udc48 \\ud868\\udc56 \\ud868\\udc86 \\ud868\\udccd \\ud868\\udccf \\ud868\\udcd2 \\ud868\\udce7 \\ud868\\udd06 \\ud868\\udd15 \\ud868\\udd42 \\ud868\\uddb7 \\ud868\\uddf3 \\ud868\\ude3c \\ud868\\ude78 \\ud868\\udeff \\ud868\\udf2d \\ud868\\udf60 \\ud869\\udcf0 \\ud869\\udd35 \\ud869\\ude00 \\ud869\\ude2f \\ud869\\ude4f \\ud869\\udfd6 \\ud86b\\uddd3 \\ud86d\\udca1 \\ud86d\\udf26 \\u516b\\u6fdb\\u5c71 \\u62dc\\u8986 \\u7562\\u6607 \\u8b8a\\u5fb5 \\u7a1f\\u8986 \\u671d\\u4e7e\\u5915\\u60d5 \\u7c4c\\u756b \\u51fa\\u919c\\u72fc\\u85c9 \\u7b54\\u8986 \\u5927\\u76ee\\u4e7e\\u9023\\u51a5\\u9593\\u6551\\u6bcd\\u8b8a\\u6587 \\u8569\\u8986 \\u7274\\u89f8 \\u7274\\u727e \\u985b\\u4e7e\\u5012\\u5764 \\u96fb\\u8986 \\u8c82\\u8986\\u984d \\u7be4\\u9ebc \\u935b\\u937e \\u767c\\u8986 \\u6a0a\\u65bc\\u671f \\u53cd\\u53cd\\u8986\\u8986 \\u53cd\\u8986 \\u8986\\u6309 \\u8986\\u676f \\u8986\\u74ff \\u8986\\u6210 \\u8986\\u5448 \\u8986\\u5e6c \\u8986\\u96fb \\u8986\\u9f0e \\u8986\\u91a2 \\u8986\\u91ac\\u74ff \\u8986\\u8549\\u5c0b\\u9e7f \\u8986\\u9e7f\\u5c0b\\u8549 \\u8986\\u9e7f\\u907a\\u8549 \\u8986\\u9732 \\u8986\\u5192 \\u8986\\u547d \\u8986\\u5893 \\u8986\\u9006 \\u8986\\u4e0a \\u8986\\u6587 \\u8986\\u6821 \\u8986\\u4fe1 \\u8986\\u76c2 \\u8986\\u80b2 \\u8986\\u5e33 \\u8986\\u4f4f \\u8986\\u5b97 \\u9867\\u85c9 \\u90ed\\u5b50\\u4e7e \\u51fd\\u8986 \\u72d0\\u85c9\\u864e\\u5a01 \\u6ed1\\u85c9 \\u9ec4\\u937e\\u516c \\u56de\\u8986 \\u85c9\\u8349\\u6795\\u584a \\u85c9\\u8a5e \\u85c9\\u6b64 \\u85c9\\u4ee3 \\u85c9\\u8b80 \\u85c9\\u7aef \\u85c9\\u65b9 \\u85c9\\u69c1 \\u85c9\\u6545 \\u85c9\\u5349 \\u85c9\\u6a5f \\u85c9\\u85c9 \\u85c9\\u64da \\u85c9\\u53e3 \\u85c9\\u5bc7\\u5175 \\u85c9\\u751a \\u85c9\\u624b \\u85c9\\u689d \\u85c9\\u4ee5 \\u85c9\\u7531 \\u85c9\\u55bb \\u85c9\\u7740 \\u85c9\\u52a9 \\u85c9\\u7bb8\\u4ee3\\u7c4c \\u85c9\\u8cc7 \\u8a08\\u756b \\u50a2\\u4ff1 \\u898b\\u8986 \\u89d2\\u5fb5 \\u9278\\u934a \\u91d1\\u934a \\u91d1\\u5412 \\u9838\\u934a \\u9152\\u9022\\u77e5\\u5df1\\u5343\\u937e\\u5c11 \\u9245\\u9632 \\u9245\\u842c \\u9245\\u5b50 \\u921e\\u8986 \\u5eb7\\u4e7e \\u62c9\\u934a \\u674e\\u934a\\u798f \\u674e\\u4e7e\\u5fb7 \\u674e\\u6fa4\\u9245 \\u674e\\u937e\\u90c1 \\u934a\\u9318 \\u934a\\u9396 \\u934a\\u689d \\u934a\\u5f62 \\u934a\\u589c \\u934a\\u5b50 \\u77ad\\u89e3 \\u77ad\\u7136 \\u77ad\\u5982 \\u77ad\\u82e5\\u6307\\u638c \\u8eaa\\u85c9 \\u51cc\\u85c9 \\u6d41\\u5fb5 \\u9732\\u8986 \\u8cb7\\u81e3\\u8986\\u6c34 \\u4e48\\u9ebd \\u4e48\\u9ebc \\u9ebc\\u4e9b\\u65cf \\u540d\\u8986\\u91d1\\u750c \\u660e\\u8986 \\u660e\\u77ad \\u4f94\\u5fb7\\u8986\\u8f09 \\u6728\\u5412 \\u54ea\\u5412 \\u5c3c\\u4e7e\\u9640 \\u9215\\u91e6 \\u5f77\\u5f7f \\u6191\\u85c9 \\u9817\\u8986 \\u5343\\u937e\\u7c9f \\u4e7e\\u65e6 \\u4e7e\\u9053 \\u4e7e\\u65b7 \\u4e7e\\u7db1 \\u4e7e\\u5366 \\u4e7e\\u7d05 \\u4e7e\\u5609 \\u4e7e\\u5764 \\u4e7e\\u9675 \\u4e7e\\u9686 \\u4e7e\\u6e05\\u5bae \\u4e7e\\u76db\\u4e16 \\u4e7e\\u5716 \\u4e7e\\u7e23 \\u4e7e\\u8c61 \\u4e7e\\u66dc \\u4e7e\\u5143 \\u4e7e\\u9020 \\u4e7e\\u5b85 \\u9322\\u937e\\u66f8 \\u50b7\\u4ea1\\u6795\\u85c9 \\u4e0a\\u934a \\u5c04\\u8986 \\u7533\\u8986 \\u6c88\\u8239 \\u6c88\\u7a4d \\u6c88\\u6c92 \\u6c88\\u9ed8 \\u751a\\u9245 \\u793a\\u8986 \\u624b\\u934a \\u7d20\\u85c9 \\u849c\\u85b9 \\u9396\\u934a \\u9435\\u934a \\u842c\\u937e \\u6587\\u9326\\u8986\\u9631 \\u9805\\u934a \\u856d\\u4e7e \\u65cb\\u4e7e\\u8f49\\u5764 \\u8e05\\u9580\\u77ad\\u6236 \\u96c1\\u6773\\u9b5a\\u6c88 \\u5e7a\\u9ebc \\u4ee5\\u529f\\u8986\\u904e \\u8335\\u85c9 \\u9280\\u934a \\u65bc\\u6556 \\u65bc\\u5d07\\u6587 \\u65bc\\u55ae \\u65bc\\u4e4e \\u65bc\\u547c\\u54c0\\u54c9 \\u65bc\\u68a8\\u83ef \\u65bc\\u7433 \\u65bc\\u9675\\u5b50 \\u65bc\\u502b \\u65bc\\u7a46 \\u65bc\\u5176\\u4e00 \\u65bc\\u6e05\\u8a00 \\u65bc\\u4e16\\u6210 \\u65bc\\u5766 \\u65bc\\u83df \\u65bc\\u60df\\u4e00 \\u65bc\\u6232 \\u65bc\\u9091 \\u65bc\\u52c7\\u660e \\u65bc\\u5247 \\u65bc\\u5fe0\\u7965 \\u65bc\\u4ef2\\u5b8c \\u65bc\\u7af9\\u5c4b \\u8553\\u85b9 \\u919e\\u85c9 \\u5f35\\u6cd5\\u4e7e \\u8879\\u5f97 \\u8879\\u898b\\u6a39\\u6728 \\u5fb5\\u8abf \\u5fb5\\u8072 \\u5fb5\\u5f26 \\u5fb5\\u7d43 \\u5fb5\\u97f3 \\u937e\\u935b \\u937e\\u9997 \\u937e\\u842c\\u6885 \\u937e\\u91cd\\u767c \\u91cd\\u8986\".split(\" \"),J=\"\\ud86d\\udf48 \\u3454 \\u3447 \\u3439 \\ud840\\ude42 \\ud86a\\udc1f \\u523e \\ud869\\udfce \\ud86a\\udc35 \\ud843\\udd7e \\ud86a\\udc5b \\ud843\\udc31 \\ud86a\\udc8c \\u35f7 \\u360e \\ud86d\\udf66 \\u36af \\u36e3 \\ud86d\\udf67 \\ud845\\udf8b \\ud845\\udfb1 \\ud845\\udf60 \\ud86a\\ude0a \\ud86a\\ude47 \\u37c6 \\ud86a\\ude91 \\ud848\\udec8 \\u3918 \\ud849\\udeef \\ud849\\uddd3 \\ud86a\\udef7 \\ud86a\\udf83 \\ud86a\\udf8b \\u3a2b \\u39d0 \\u64dc \\ud86a\\udfcb \\ud84d\\ude10 \\ud84d\\uddd9 \\ud84f\\udcc6 \\ud86b\\uddcd \\ud86d\\udf9b \\ud850\\udda2 \\ud850\\ude37 \\ud850\\udfba \\ud86d\\udfa3 \\ud852\\udc0b \\ud86b\\udebb \\ud86b\\udf0b \\ud86b\\udf6e \\ud853\\udeca \\ud853\\udf6f \\ud854\\udc62 \\ud854\\udd74 \\ud854\\udde2 \\u4025 \\ud854\\udf9d \\u9fce \\ud86c\\udc28 \\ud86c\\udc2c \\ud86c\\udc42 \\ud86c\\udc72 \\ud856\\udf00 \\ud86c\\udc88 \\ud856\\udf9c \\ud86c\\udc77 \\ud857\\ude85 \\u4336 \\ud86c\\udd1a \\ud86c\\udd1c \\ud86c\\udd1e \\u433a \\u433b \\ud86c\\udd29 \\u433f \\u433e \\ud86c\\udd2e \\ud858\\ude13 \\ud858\\ude16 \\ud858\\ude18 \\ud858\\ude1c \\ud858\\ude1f \\ud858\\ude1e \\ud858\\ude20 \\ud858\\ude19 \\ud86c\\udd45 \\u4360 \\ud858\\udf60 \\ud86c\\udd6d \\u43ac \\ud86d\\udfd5 \\ud85b\\udc34 \\ud86d\\udfd1 \\ud86c\\udeaa \\ud85c\\ude5e \\ud86c\\udef2 \\u464c \\ud85d\\udf2d \\ud86c\\udf2f \\ud86c\\udf60 \\ud86c\\udf6b \\u4727 \\ud86d\\udfe2 \\ud86c\\udfa7 \\ud85f\\ude55 \\u478d \\ud85f\\ude51 \\ud86c\\udfaa \\ud86c\\udfad \\ud86c\\udfba \\ud86c\\udfb3 \\ud86c\\udfb1 \\ud86c\\udfc3 \\ud860\\udd5b \\ud86d\\udfe4 \\ud86d\\udfe5 \\ud86d\\udfe6 \\ud861\\udc79 \\ud86d\\udffa \\ud86e\\udc00 \\u4982 \\u9fcf \\ud86d\\udd0b \\ud863\\udc56 \\ud86d\\udd06 \\u497e \\ud863\\ude04 \\u49b6 \\u49b7 \\ud86d\\udd35 \\ud863\\uddff \\ud863\\ude1f \\ud86d\\udd85 \\ud864\\udffc \\ud865\\udc00 \\ud864\\udfff \\ud86d\\uddab \\ud86d\\uddac \\ud86d\\uddb1 \\ud86d\\uddb0 \\ud86d\\uddb2 \\ud865\\udd97 \\ud86d\\uddba \\ud86d\\uddc7 \\ud86e\\udc08 \\ud86d\\uddca \\ud865\\ude6e \\ud865\\ude6f \\ud865\\ude67 \\ud86d\\udddf \\ud866\\udc07 \\ud866\\udc08 \\ud86d\\uddf1 \\ud86d\\uddf0 \\ud866\\udded \\ud86e\\udc0a \\ud866\\uddf0 \\ud866\\ude01 \\ud866\\uddff \\ud866\\ude07 \\ud86d\\ude2e \\ud866\\ude0f \\ud866\\uddea \\u4bc5 \\ud866\\ude48 \\u9c83 \\ud86d\\ude90 \\ud86d\\ude8f \\ud867\\udf88 \\ud86d\\udea0 \\ud867\\udf8a \\ud867\\udf8b \\u4ca3 \\ud86e\\udc11 \\u4c9d \\u9cda \\ud86d\\ude9c \\ud867\\udf82 \\u9ce4 \\ud868\\ude42 \\ud86d\\udeec \\ud86d\\udef0 \\ud86d\\udeee \\ud86d\\udefa \\ud86d\\udefc \\u9e6e \\ud86d\\udf05 \\ud868\\udf88 \\ud86d\\udf12 \\ud868\\udf8b \\ud86d\\udf14 \\ud869\\udc45 \\ud86d\\udf19 \\ud86d\\udf28 \\ud86d\\udf33 \\u4e22 \\u5e76 \\u5e72 \\u4e71 \\u4e98 \\u4e9a \\u4f2b \\u5e03 \\u5360 \\u5e76 \\u6765 \\u4ed1 \\u4fa3 \\u5c40 \\u4fe3 \\u7cfb \\ud840\\uddf9 \\u4f23 \\u4fa0 \\u4f21 \\u79c1 \\u4f25 \\u4fe9 \\u4feb \\u4ed3 \\u4e2a \\u4eec \\u5e78 \\u4f26 \\u3448 \\u4f1f \\u343d \\u4fa7 \\u4fa6 \\u4f2a \\u3437 \\u6770 \\u4f27 \\u4f1e \\u5907 \\u5bb6 \\u4f63 \\u506c \\u4f20 \\u4f1b \\u503a \\u4f24 \\u503e \\u507b \\u4ec5 \\u4f65 \\u4fa8 \\u4ec6 \\u4f2a \\u4fa5 \\u507e \\u96c7 \\u4ef7 \\u4eea \\u4fca \\u4fac \\u4ebf \\u4fa9 \\u4fed \\u50a4 \\u50a7 \\u4fe6 \\u4faa \\u5c3d \\u507f \\ud840\\uddb2 \\u4f18 \\ud840\\udec6 \\u50a8 \\u4fea \\u3469 \\u50a9 \\u50a5 \\u4fe8 \\u51f6 \\u5151 \\u513f \\u5156 \\u5185 \\u4e24 \\u518c \\u80c4 \\u5e42 \\u51c0 \\u51bb \\ud869\\udf9d \\u51db \\u51ef \\u522b \\u5220 \\u522d \\u5219 \\u514b \\u5239 \\u522c \\u521a \\u5265 \\u5250 \\u5240 \\u521b \\u94f2 \\ud841\\udec5 \\u5212 \\u5267 \\u5218 \\u523d \\u523f \\u5251 \\u34e5 \\u5242 \\u3509 \\u52b2 \\ud842\\udc60 \\u52a8 \\u52a1 \\u52cb \\u80dc \\u52b3 \\u52bf \\ud869\\udfdd \\u52da \\u52a2 \\u52cb \\u52b1 \\u529d \\u5300 \\u5326 \\u6c47 \\u532e \\u533a \\u534f \\u6064 \\u5374 \\u5373 \\u538d \\u5395 \\u5386 \\u538c \\u5389 \\u53a3 \\u53c2 \\u53c1 \\u4e1b \\u54a4 \\u5434 \\u5450 \\u5415 \\u5459 \\u5458 \\ud842\\udfdf \\u5457 \\ud86a\\udc33 \\u5423 \\u5ff5 \\u95ee \\u542f \\u54d1 \\u542f \\u5521 \\u359e \\u5524 \\u4e27 \\u5403 \\u4e54 \\u5355 \\u54df \\u545b \\u556c \\u551d \\u5417 \\u545c \\u5522 \\ud842\\udfb6 \\u54d4 \\ud86a\\udc4f \\u53f9 \\u55bd \\u556f \\u5455 \\u5567 \\u5c1d \\u551b \\u54d7 \\ud86a\\udc43 \\u5520 \\u5578 \\u53fd \\ud86a\\udc5e \\u54d3 \\u5452 \\ud86a\\udc40 \\u5574 \\u6076 \\ud842\\udfe0 \\u5618 \\u358a \\u549d \\ud86a\\udc4b \\u54d2 \\u54dd \\u54d5 \\u55f3 \\u54d9 \\u55b7 \\u5428 \\u5f53 \\u549b \\u5413 \\u54dc \\u5c1d \\u565c \\u556e \\ud86a\\udc38 \\u54bd \\u5456 \\ud843\\udc37 \\u5499 \\u5411 \\u4eb8 \\u55be \\u4e25 \\u5624 \\ud86a\\udc95 \\u556d \\u55eb \\u56a3 \\ud843\\udc5e \\u5181 \\u5453 \\u5570 \\u82cf \\u5631 \\ud86a\\udca0 \\u56f1 \\u56f5 \\u56fd \\u56f4 \\u56ed \\u5706 \\u56fe \\u56e2 \\ud86a\\udcae \\u57ef \\u57ad \\ud86a\\udcc6 \\u91c7 \\u6267 \\u575a \\u57a9 \\u57b4 \\ud86a\\udcd2 \\u57da \\u5c27 \\u62a5 \\u573a \\u5757 \\u8314 \\u57b2 \\u57d8 \\u6d82 \\u51a2 \\u575e \\u57d9 \\u5c18 \\u5811 \\ud86a\\udcfb \\u57ab \\u5760 \\u5815 \\u575b \\ud86a\\udcb8 \\u575f \\u57af \\u5899 \\u57a6 \\u575b \\ud845\\udc84 \\u57b1 \\u57d9 \\u538b \\ud844\\udee4 \\u5792 \\u5739 \\u5786 \\u575b \\u574f \\u5784 \\u5785 \\u575c \\ud86a\\udd1a \\u575d \\u5846 \\u58ee \\u58f6 \\u58f8 \\u5bff \\u591f \\u68a6 \\u4f19 \\u5939 \\u5942 \\u5965 \\u5941 \\u593a \\u5956 \\u594b \\u59f9 \\u5986 \\u59d7 \\u5978 \\u5a31 \\u5a04 \\ud86d\\udf6b \\u5987 \\u5a05 \\ud86d\\udf68 \\u5a32 \\u59ab \\u36c0 \\u5aaa \\u5988 \\u8885 \\u59aa \\u59a9 \\u5a34 \\u5a34 \\u5a73 \\u59ab \\u5aad \\ud86d\\udf6c \\u5a06 \\u5a75 \\u5a07 \\u5af1 \\u5ad2 \\ud86a\\udd70 \\u5b37 \\ud86d\\udf69 \\u5ad4 \\u5a74 \\u5a76 \\ud86a\\udd7f \\u5a18 \\ud86d\\udf6e \\ud86d\\udf6d \\ud86a\\udd6b \\u36e4 \\u5a08 \\ud846\\udc1f \\u5b59 \\u5b66 \\ud846\\udd67 \\ud86a\\uddc0 \\u5b6a \\u5bab \\u91c7 \\ud86a\\uddd8 \\u5bdd \\u5b9e \\u5b81 \\u5ba1 \\u5199 \\u5bbd \\u5ba0 \\u5b9d \\u5c06 \\u4e13 \\u5bfb \\u5bf9 \\u5bfc \\u5c34 \\u5c4a \\u5c38 \\u5c43 \\u5c49 \\u5c61 \\u5c42 \\u5c66 \\ud86a\\ude17 \\u5c5e \\u5188 \\u5cf0 \\u5c98 \\u5c9b \\u5ce1 \\u5d03 \\u6606 \\u5c97 \\u4ed1 \\u5ce5 \\u5cbd \\u5c9a \\u5c81 \\ud847\\uddb4 \\u37e5 \\u5d5d \\u5d2d \\u5c96 \\ud847\\ude83 \\u5d5a \\u5d02 \\ud847\\ude84 \\u5ce4 \\u5ce3 \\u5cc4 \\u5cc3 \\u5d04 \\u5c99 \\u5d58 \\ud86d\\udf75 \\u5cad \\u5c7f \\u5cb3 \\ud86a\\ude4e \\u5cbf \\u5ce6 \\u5dc5 \\u5ca9 \\ud86a\\ude37 \\ud86a\\ude58 \\u5def \\u537a \\u5e05 \\u5e08 \\u5e10 \\u5e26 \\u5e27 \\u5e0f \\u384e \\u5e3c \\u5e3b \\ud86a\\ude77 \\u5e1c \\u5e01 \\ud86a\\ude78 \\u5e2e \\u5e31 \\u5e72 \\u51e0 \\u5e93 \\u5395 \\u53a2 \\u53a9 \\u53a6 \\u5ebc \\u836b \\u53a8 \\u53ae \\u5e99 \\u5382 \\u5e91 \\u5e9f \\u5e7f \\ud86a\\ude9e \\u5eea \\u5e90 \\u5385 \\u5f11 \\u540a \\u5f2a \\u5f20 \\u5f3a \\ud86a\\udebc \\u522b \\u5f39 \\u5f25 \\u5f2f \\u5f55 \\u6c47 \\u5f5d \\u5f5f \\u5f66 \\u96d5 \\u5f68 \\u5f77 \\u4f5b \\u540e \\u5f84 \\u4ece \\u5f95 \\u590d \\u5f81 \\u5f7b \\ud86a\\udecc \\u6052 \\u803b \\u60a6 \\u60ae \\u6005 \\u95f7 \\u51c4 \\u6076 \\u607c \\u607d \\u607b \\u7231 \\u60ec \\u60ab \\u6006 \\u607a \\ud849\\ude4f \\u5ffe \\u6817 \\u6001 \\u6120 \\u60e8 \\u60ed \\u6078 \\u60ef \\u60ab \\u6004 \\u6002 \\u8651 \\u60ad \\u5e86 \\u396a \\u621a \\u6b32 \\u5fe7 \\u60eb \\u601c \\u51ed \\u6126 \\u616d \\u60ee \\ud849\\ude52 \\u6124 \\u60af \\u6003 \\u5baa \\u5fc6 \\ud86a\\udefa \\ud849\\ude50 \\ud849\\ude53 \\u6073 \\u5e94 \\u603f \\u61d4 \\ud84a\\udc01 \\u8499 \\u603c \\u61d1 \\u393d \\u6079 \\u60e9 \\u61d2 \\u6000 \\u60ac \\u5fcf \\u60e7 \\u6151 \\u604b \\u6206 \\u620b \\u6217 \\u622c \\u6218 \\u622f \\u620f \\u6237 \\u629b \\u635d \\u6332 \\u631f \\u820d \\u626a \\u6328 \\u5377 \\u626b \\u62a1 \\u39cf \\u631c \\u6323 \\ud86a\\udf75 \\u6302 \\u91c7 \\u62e3 \\u626c \\u6362 \\u6325 \\u6404 \\u635f \\u6447 \\u6363 \\u63fe \\u62a2 \\ud84a\\udeec \\ud86a\\udf62 \\u63b4 \\u63bc \\u6402 \\u631a \\u62a0 \\u629f \\u6298 \\u63ba \\u635e \\ud86a\\udf7e \\u6326 \\u6491 \\u6320 \\u39d1 \\u6322 \\u63b8 \\u62e8 \\ud86a\\udf96 \\u629a \\u6251 \\u63ff \\u631e \\u631d \\u6361 \\u62e5 \\u63b3 \\u62e9 \\u51fb \\u6321 \\u39df \\u62c5 \\u636e \\ud86a\\udf67 \\u6324 \\u62ac \\u6363 \\ud84a\\udf0d \\u62df \\u6448 \\u62e7 \\u6401 \\u63b7 \\u6269 \\u64b7 \\u6446 \\u64de \\u64b8 \\u39f0 \\u6270 \\u6445 \\u64b5 \\ud86a\\udfb6 \\u62e2 \\u62e6 \\u6484 \\u6400 \\u64ba \\u643a \\u6444 \\u6512 \\u631b \\u644a \\u6405 \\u63fd \\u6559 \\u655a \\u8d25 \\u53d9 \\u654c \\u6570 \\u655b \\u6bd9 \\ud84b\\udf7e \\u6569 \\u6593 \\u65a9 \\u65ad \\ud84c\\udcc1 \\u4e8e \\u65d7 \\u65e2 \\u5347 \\u65f6 \\u664b \\u663c \\u6655 \\u6656 \\u65f8 \\u7545 \\u6682 \\u6654 \\u5386 \\u6619 \\u6653 \\ud86b\\udc36 \\u5411 \\u66a7 \\u65f7 \\ud84c\\udd90 \\u663d \\u6652 \\u4e66 \\u4f1a \\ud859\\udee8 \\u80e7 \\u672f \\u4e1c \\u9528 \\u62d0 \\u6805 \\u62d0 \\u67e5 \\ud84d\\udc15 \\u6746 \\u6800 \\ud86b\\udc77 \\u67a7 \\u6761 \\u67ad \\u68c1 \\u5f03 \\u68cb \\u67a8 \\u67a3 \\u680b \\u3b4e \\u6808 \\u6816 \\u68be \\u6860 \\u3b4f \\ud84d\\udc8c \\u6768 \\u67ab \\u6862 \\u4e1a \\u6781 \\u77e9 \\u5e72 \\u6769 \\u8363 \\u6985 \\u6864 \\u6784 \\u67aa \\u6760 \\u68bf \\u6920 \\u6901 \\ud84c\\udfe2 \\u692e \\u6868 \\u6922 \\u691d \\u6869 \\u4e50 \\u679e \\u6881 \\u697c \\u6807 \\u67a2 \\ud84d\\uddca \\u3b64 \\u6837 \\ud84d\\udd0c \\u699d \\u3b74 \\u686a \\u6734 \\u6811 \\u6866 \\u692b \\u6861 \\u6865 \\u673a \\u692d \\u6a2a \\ud84d\\udcff \\u6aa9 \\u67fd \\u6863 \\u6867 \\u69da \\u68c0 \\u6a2f \\ud84d\\ude34 \\u68bc \\u53f0 \\u69df \\ud86b\\udc9b \\u67e0 \\u69db \\ud85b\\udf16 \\u67dc \\ud86b\\udc8e \\u6a79 \\u6988 \\u6809 \\u691f \\u6a7c \\u680e \\ud86b\\udcae \\u6a71 \\u69e0 \\u680c \\u67a5 \\u6a65 \\u6987 \\u8616 \\u680a \\u6989 \\u68c2 \\u6a31 \\u680f \\u6989 \\ud86b\\udccd \\u6743 \\ud84d\\udc24 \\u6924 \\ud86b\\udc94 \\ud86b\\udd19 \\u683e \\ud84d\\uddcb \\u6984 \\ud84d\\ude9a \\u68c2 \\u94a6 \\u53f9 \\u6b27 \\u6b24 \\u6b22 \\u5c81 \\u5386 \\u5f52 \\u6b81 \\u6b8b \\u6b92 \\ud84e\\ude3c \\u6b87 \\u3c6e \\u6b9a \\u50f5 \\u6b93 \\u6ba1 \\u3c69 \\u6b7c \\u6740 \\u58f3 \\u58f3 \\u6bc1 \\u6bb4 \\ud86b\\udd51 \\u6bf5 \\u7266 \\u6be1 \\u6c07 \\u6c14 \\u6c22 \\u6c29 \\ud84f\\udc5d \\u6c32 \\u6cdb \\u6cdb \\u6c61 \\u51b3 \\u6c88 \\u6ca1 \\u51b2 \\u51b5 \\u6eaf \\u6cc4 \\u6c79 \\u6d43 \\u6cfe \\u6d9a \\u51c9 \\u51c4 \\u6cea \\u6e0c \\u51c0 \\u51cc \\u6ca6 \\u6e0a \\u6d9e \\u6d45 \\u6da3 \\u51cf \\u6ca8 \\u6da1 \\u6d4b \\u6d51 \\u51d1 \\ud84f\\udc97 \\u6d48 \\u6d8c \\u6c64 \\u6ca9 \\u51c6 \\u6c9f \\ud86b\\udd84 \\u6e29 \\u6d49 \\u6da2 \\u6e7f \\u6ca7 \\u706d \\u6da4 \\u8365 \\u6c47 \\u6caa \\u6ede \\u6e17 \\u5364 \\u6d52 \\u6d50 \\u6eda \\u6ee1 \\u6e14 \\u6e87 \\u6ca4 \\u6c49 \\u6d9f \\u6e0d \\u6da8 \\u6e86 \\u6e10 \\u6d46 \\u988d \\u6cfc \\u6d01 \\ud84f\\udc98 \\u6ca9 \\u3d0b \\u6f5c \\ud86d\\udf97 \\u6da6 \\u6d54 \\u6e83 \\u6ed7 \\u6da0 \\u6da9 \\ud84f\\udda9 \\u6d47 \\u6d9d \\u6c84 \\u6da7 \\u6e11 \\u6cfd \\u6eea \\u6cf6 \\ud86d\\udf9a \\u6d4d \\u6dc0 \\u3ce0 \\u6d4a \\u6d53 \\u3ce1 \\ud84f\\ude23 \\u6e7f \\u6cde \\u6e81 \\u8499 \\u6d55 \\u6d4e \\u6d9b \\u3cd4 \\u6ee5 \\u6f4d \\u6ee8 \\u6e85 \\u6cfa \\u6ee4 \\ud86b\\udd71 \\u6f9b \\ud84f\\udf77 \\u6ee2 \\u6e0e \\u3cbf \\u6cfb \\u6c88 \\u6d4f \\u6fd2 \\u6cf8 \\u6ca5 \\u6f47 \\u6f46 \\u6f74 \\u6cf7 \\u6fd1 \\u5f25 \\u6f4b \\u6f9c \\u6ca3 \\u6ee0 \\ud86d\\udf9d \\u6d12 \\ud86b\\uddfd \\u6f13 \\u6ee9 \\ud84f\\udebc \\u704f \\u3cd5 \\u6e7e \\u6ee6 \\u6edf \\u6edf \\u707e \\u4e3a \\u4e4c \\u70c3 \\u65e0 \\ud86b\\ude29 \\u70bc \\u709c \\u70df \\u8315 \\u7115 \\u70e6 \\u7080 \\u3dbd \\ud86b\\ude15 \\u7174 \\ud850\\ude36 \\ud850\\uddc4 \\u8367 \\ud850\\udda1 \\u709d \\ud850\\uddf9 \\ud850\\udecf \\u70ed \\u988e \\u70bd \\u70e8 \\u706f \\u7096 \\u70e7 \\u70eb \\u7116 \\u8425 \\u707f \\u6bc1 \\u70db \\u70e9 \\u3db6 \\u718f \\u70ec \\u7118 \\ud86d\\udfa1 \\ud850\\uddc3 \\ud85b\\udd9f \\u70c1 \\u7089 \\ud850\\udded \\u70c2 \\ud86b\\ude73 \\ud86d\\udfa0 \\u4e89 \\u4e3a \\u7237 \\u5c14 \\u5e8a \\u5899 \\u724d \\u7274 \\u7275 \\u8366 \\u7266 \\ud86b\\udead \\u728a \\u727a \\u72b6 \\u72ed \\u72c8 \\ud86b\\udebd \\u72f0 \\u72b9 \\u72f2 \\u72b8 \\u5446 \\u72f1 \\u72ee \\ud86b\\udeb7 \\u5956 \\u72ec \\ud851\\udf83 \\u72ef \\u7303 \\u72dd \\u72de \\u3e8d \\u83b7 \\u730e \\u72b7 \\u517d \\u736d \\u732e \\u7315 \\u7321 \\ud851\\udfa4 \\ud86d\\udfa5 \\u73b0 \\u96d5 \\u73d0 \\u73f2 \\u73ae \\u739a \\u7410 \\u7476 \\u83b9 \\u739b \\u73b1 \\ud86b\\udef2 \\ud86b\\uded0 \\u740f \\ud86d\\udfa9 \\ud86b\\udefa \\u740e \\u7391 \\u7477 \\u73f0 \\u3ec5 \\u73af \\u7399 \\u7478 \\ud86d\\udfa8 \\u73ba \\ud86d\\udfa6 \\ud86b\\udee8 \\u743c \\u73d1 \\u748e \\ud852\\udd80 \\u74d2 \\ud852\\ude7d \\u74ef \\u74ee \\u4ea7 \\u4ea7 \\u82cf \\u5b81 \\u4ea9 \\u6bd5 \\u753b \\u5f02 \\u753b \\u5f53 \\ud86b\\udf48 \\u7574 \\u53e0 \\u75c9 \\u9178 \\ud86b\\udf6a \\u75b4 \\u75d6 \\u75af \\u75a1 \\u75ea \\u7617 \\u75ae \\u759f \\u7606 \\ud86b\\udf77 \\u75ad \\u7618 \\u7618 \\u7597 \\u75e8 \\u75eb \\u7605 \\ud853\\udd8a \\u6108 \\u75a0 \\u762a \\u75f4 \\u75d2 \\u7596 \\u75c7 \\u75ac \\u765e \\u7663 \\u763f \\u763e \\u75c8 \\u762b \\u766b \\u53d1 \\u7682 \\u7691 \\ud853\\udf80 \\u75b1 \\u76b2 \\u76b1 \\u676f \\u76d7 \\u76cf \\u5c3d \\u76d1 \\u76d8 \\u5362 \\ud86b\\udf94 \\u8361 \\ud86b\\udfa3 \\u771f \\u7726 \\u4f17 \\ud86b\\udfa2 \\u56f0 \\u7741 \\u7750 \\u777e \\u770d \\u4056 \\u7792 \\ud854\\udda7 \\u77ad \\u7786 \\u7751 \\u8499 \\ud86b\\udfb8 \\ud86b\\udfa6 \\u772c \\u77a9 \\u77eb \\u6731 \\u7841 \\u7856 \\u7817 \\u781a \\u57fc \\ud855\\udc3b \\u7855 \\u7800 \\u781c \\u786e \\u7801 \\u40b5 \\u7859 \\u7816 \\u7875 \\u789c \\u789b \\u77f6 \\u7857 \\u40c5 \\u785a \\u7877 \\u7840 \\ud855\\udc1f \\u788d \\u77ff \\u783a \\u783e \\u77fe \\ud86b\\udfeb \\u783b \\u7947 \\u79d8 \\u7984 \\u7978 \\u796f \\u794e \\u7943 \\u5fa1 \\u7985 \\u793c \\u7962 \\u7977 \\u79c3 \\u7c7c \\u7a0e \\u79c6 \\u4149 \\u68f1 \\u7980 \\u79cd \\u79f0 \\u8c37 \\u415f \\u7a23 \\u79ef \\u9896 \\u79fe \\u7a51 \\u79fd \\u7a33 \\u83b7 \\u7a5e \\u7a9d \\u6d3c \\u7a77 \\u7a91 \\u7a8e \\u7aad \\u7aa5 \\u7a9c \\u7a8d \\u7aa6 \\u7076 \\u7a83 \\ud856\\ude5f \\u7ad6 \\ud86c\\udc5f \\u7ade \\u7b14 \\u7b0b \\u7b15 \\u41f2 \\u4e2a \\u7b3a \\u7b5d \\u8282 \\u8303 \\u7b51 \\u7ba7 \\u7b7c \\ud856\\udf20 \\u7b7f \\u7b03 \\u7b5b \\u7b5a \\ud856\\udfbe \\u7ba6 \\ud86c\\udc86 \\u7bd3 \\u84d1 \\u7baa \\u7b80 \\ud86c\\udc83 \\u7bd1 \\u7bab \\u7b5c \\u7b7e \\u5e18 \\u7bee \\ud856\\udee3 \\ud856\\udf1e \\u7b79 \\u4264 \\u7b93 \\u7bef \\u7ba8 \\u7c41 \\u7b3c \\u7b7e \\u7b3e \\u7c16 \\u7bf1 \\u7ba9 \\u5401 \\u7ca4 \\u7cbd \\u7cc1 \\u7caa \\u7cae \\u56e2 \\u7c9d \\u7c74 \\u7c9c \\u7e9f \\ud86c\\udd19 \\u7ea0 \\u7eaa \\u7ea3 \\u7ea6 \\u7ea2 \\u7ea1 \\u7ea5 \\u7ea8 \\u7eab \\u7eb9 \\u7eb3 \\u7ebd \\u7ebe \\u7eaf \\u7eb0 \\u7ebc \\u7eb1 \\u7eae \\u7eb8 \\u7ea7 \\u7eb7 \\u7ead \\u7eb4 \\ud86c\\udd1b \\u7eba \\u4337 \\u624e \\u7ec6 \\u7ec2 \\u7ec1 \\u7ec5 \\u7ebb \\u7ecd \\u7ec0 \\u7ecb \\u7ed0 \\u7ecc \\ud86c\\udd1f \\u7ec8 \\u5f26 \\u7ec4 \\u4339 \\u7eca \\ud86d\\udfc3 \\u7ed7 \\u7ed3 \\u7edd \\ud86c\\udd20 \\u7ee6 \\u7ed4 \\u7ede \\u7edc \\u7eda \\ud86c\\udd22 \\u7ed9 \\ud86c\\udd21 \\u7ed2 \\u7ed6 \\u7edf \\u4e1d \\u7edb \\u7edd \\u7ee2 \\ud86c\\udd28 \\ud858\\ude0c \\u7ed1 \\u7ee1 \\u7ee0 \\ud858\\ude0b \\u7ee8 \\u7ee3 \\ud86d\\udfc4 \\u7ee4 \\u7ee5 \\u433c \\u6346 \\u7ecf \\ud86c\\udd27 \\u7efc \\u7f0d \\ud86c\\udd2b \\u7eff \\ud86d\\udfc5 \\u7ef8 \\u7efb \\u7ebf \\u7ef6 \\u7ef4 \\u7ef9 \\u7efe \\u7eb2 \\u7f51 \\u7ef7 \\u7f00 \\u5f69 \\u7eb6 \\u7efa \\u7eee \\u7efd \\u7ef0 \\u7eeb \\u7ef5 \\u7ef2 \\u7f01 \\u7d27 \\u7eef \\ud858\\ude0f \\u7eff \\u7eea \\u7eec \\u7ef1 \\u7f03 \\u7f04 \\u7f02 \\u7ebf \\u7f09 \\u7f0e \\ud86d\\udfc6 \\u7f14 \\u7f17 \\u7f18 \\ud86c\\udd2c \\u7f0c \\u7f16 \\u7f13 \\u7f05 \\ud86c\\udd2d \\u7eac \\ud858\\ude15 \\u7f11 \\u7f08 \\u7ec3 \\u7f0f \\ud858\\ude09 \\ud858\\ude11 \\u7f07 \\u81f4 \\u7f0a \\u8426 \\u7f19 \\u7f22 \\u7f12 \\ud86c\\udd30 \\ud858\\ude14 \\u7ec9 \\u7f23 \\u7f0a \\u7f1e \\u7f1a \\u7f1c \\u7f1f \\u7f1b \\u53bf \\u7ee6 \\u7f1d \\ud858\\ude1a \\u7f21 \\u7f29 \\ud86c\\udd33 \\u7eb5 \\u7f27 \\u4338 \\u7ea4 \\u7f26 \\u7d77 \\u7f15 \\ud86c\\udd32 \\u7f25 \\ud858\\ude10 \\u603b \\u7ee9 \\ud86c\\udd34 \\u7ef7 \\u7f2b \\u7f2a \\ud86c\\udd36 \\ud858\\ude1d \\u7a57 \\u7f2f \\ud858\\ude1b \\u7ec7 \\u7f2e \\u7f2d \\u7ed5 \\ud858\\ude0e \\u7ee3 \\u7f0b \\ud86c\\udd24 \\u7ef3 \\u7ed8 \\u7cfb \\ud86c\\udd31 \\u8327 \\u7f30 \\u7f33 \\u7f32 \\u7f34 \\ud86c\\udd37 \\ud86c\\udd23 \\u4341 \\u7ece \\ud858\\ude21 \\u7ee7 \\u7f24 \\u7f31 \\u4340 \\ud86c\\udd38 \\u98a3 \\u7f2c \\u7ea9 \\u7eed \\u7d2f \\u7f20 \\u7f28 \\u624d \\u7ea4 \\ud86c\\udd39 \\u7f35 \\ud86c\\udd25 \\u7f06 \\u94b5 \\u44e8 \\u575b \\u7f42 \\u575b \\u7f5a \\u9a82 \\u7f62 \\u7f57 \\u7f74 \\u7f81 \\u8288 \\u7fa4 \\u7f9f \\u7fa1 \\u4e49 \\ud86c\\udd57 \\u81bb \\u4e60 \\u7fda \\u7fd8 \\u7fd9 \\u8027 \\u8022 \\u5723 \\u95fb \\u8054 \\u806a \\u58f0 \\u8038 \\u8069 \\u8042 \\u804c \\u804d \\ud86c\\udd8f \\u542c \\u804b \\u8083 \\u80c1 \\u8109 \\u80eb \\u5507 \\ud84c\\udf70 \\u4fee \\u8131 \\u80c0 \\u80be \\u80e8 \\u8136 \\u8111 \\ud84c\\udf6f \\u80bf \\u811a \\u80a0 \\u817d \\u8158 \\u80a4 \\u43dd \\u80f6 \\ud859\\udf7c \\u817b \\ud86b\\udc65 \\u80c6 \\u810d \\u8113 \\u8138 \\u8110 \\u8191 \\ud84c\\udf91 \\u814a \\u80ea \\u810f \\u8114 \\u81dc \\u5367 \\u4e34 \\u53f0 \\u4e0e \\u5174 \\u4e3e \\u65e7 \\u9986 \\u8231 \\ud86c\\udddb \\u8223 \\u8230 \\u823b \\u8270 \\u8273 \\u520d \\u82ce \\u5179 \\u8346 \\u5e84 \\u830e \\u835a \\u82cb \\u82b2 \\u534e \\u5eb5 \\u70df \\u82cc \\u83b1 \\u4e07 \\u835d \\u83b4 \\u53f6 \\u836d \\ud86c\\ude0e \\u836e \\u82c7 \\u836f \\u8364 \\ud86c\\udded \\u641c \\u83bc \\u83b3 \\u8480 \\u8385 \\ud86c\\uddf4 \\u82cd \\u836a \\u5e2d \\u76d6 \\ud85b\\udc0f \\u83b2 \\u82c1 \\u83bc \\u835c \\u535c \\u53c2 \\u848c \\u848b \\u8471 \\u8311 \\u836b \\ud86c\\ude1f \\ud86c\\udded \\u8368 \\u8487 \\u835e \\u836c \\u82b8 \\u83b8 \\u835b \\ud86c\\ude35 \\u8489 \\u8361 \\u829c \\u8427 \\ud86c\\ude09 \\u84e3 \\ud86c\\uddfd \\u8570 \\ud86c\\ude41 \\u835f \\u84df \\u8297 \\u59dc \\u8537 \\u8359 \\u83b6 \\u8350 \\u8428 \\u85b0 \\u44d5 \\u82e7 \\u44d3 \\u82d4 \\u8360 \\u85c9 \\u84dd \\u8369 \\u827a \\u836f \\u85ae \\u44d6 \\u8574 \\u82c8 \\ud86c\\ude44 \\u853c \\u853a \\u841a \\u8572 \\u82a6 \\u82cf \\u8574 \\u82f9 \\u85d3 \\u8539 \\ud85b\\uded5 \\u830f \\u5170 \\u84e0 \\u841d \\u8502 \\u5904 \\u865a \\u864f \\u53f7 \\u4e8f \\u866c \\u86f1 \\u8715 \\u86ac \\u8680 \\u732c \\u867e \\u8671 \\u8717 \\u86f3 \\u8682 \\u8424 \\u45d6 \\u877c \\u8780 \\ud86c\\udec7 \\u86f0 \\u8748 \\u87a8 \\ud86c\\udecc \\ud86c\\udeb8 \\u866e \\u8749 \\u86f2 \\u866b \\ud86c\\udebb \\u86cf \\u8681 \\ud85c\\udfd7 \\u8683 \\u8747 \\u867f \\u874e \\u86f4 \\u877e \\u869d \\ud85c\\udfd6 \\u8721 \\u86ce \\ud86c\\udeae \\u87cf \\u86ca \\u8695 \\u86ee \\ud85d\\udc4f \\u4f17 \\u8511 \\u672f \\u540c \\u80e1 \\u536b \\u51b2 \\u8879 \\u886e \\u8885 \\u91cc \\u8865 \\u88c5 \\u91cc \\u5236 \\u590d \\u88c8 \\u8886 \\u88e4 \\u88e2 \\u891b \\u4eb5 \\ud86c\\udf00 \\u5e5e \\u88e5 \\u88e5 \\u88af \\ud86c\\udef9 \\u8884 \\ud86c\\udef7 \\ud86c\\udefb \\u88e3 \\u88c6 \\u8934 \\u889c \\u6446 \\u886c \\ud85d\\udf5d \\u88ad \\u8955 \\ud86c\\udf07 \\u8986 \\u6838 \\u89c1 \\u89c3 \\u89c4 \\u89c5 \\u89c6 \\u89c7 \\ud86c\\udf2a \\u89cb \\u89cd \\u89ce \\u4eb2 \\u89ca \\u89cf \\u89d0 \\u89d1 \\ud86c\\udf2d \\u89c9 \\ud86c\\udf28 \\u89c8 \\u89cc \\u89c2 \\u89de \\u89ef \\u89e6 \\u8ba0 \\u8ba2 \\u8ba3 \\u8ba1 \\u8baf \\u8ba7 \\u8ba8 \\u8ba6 \\ud86c\\udf59 \\u8bb1 \\u8bad \\u8baa \\u8bab \\u6258 \\u8bb0 \\u8bb9 \\ud86c\\udf5b \\u8bb6 \\ud86c\\udf5a \\u8bbc \\u4723 \\u8bc0 \\u8bb7 \\ud86d\\udfde \\u8bbb \\u8bbf \\u8bbe \\u8bb8 \\u8bc9 \\u8bc3 \\u8bca \\u6ce8 \\u8bc1 \\ud85e\\udfaa \\u8bc2 \\u8bcb \\ud86d\\udfdf \\u8bb5 \\u8bc8 \\ud86c\\udf61 \\u8bd2 \\ud86c\\udf5c \\u8bcf \\u8bc4 \\u8bd0 \\u8bc7 \\u8bce \\u8bc5 \\u8bcd \\u548f \\u8be9 \\u8be2 \\u8be3 \\u8bd5 \\u8bd7 \\u8be7 \\u8bdf \\u8be1 \\u8be0 \\u8bd8 \\u8bdd \\u8be5 \\u8be6 \\u8bdc \\ud86c\\udf63 \\u8bd9 \\u8bd6 \\ud86c\\udf65 \\u8bd4 \\u8bdb \\u8bd3 \\u5938 \\ud86c\\udf6a \\u5fd7 \\u8ba4 \\u8bf3 \\u8bf6 \\u8bde \\u8bf1 \\u8bee \\u8bed \\u8bda \\u8beb \\u8bec \\u8bef \\u8bf0 \\u8bf5 \\u8bf2 \\u8bf4 \\ud86c\\udf68 \\u8bf4 \\u8c01 \\u8bfe \\ud86c\\udf6e \\ud86d\\udfe1 \\u8c07 \\ud86c\\udf6c \\u8bfd \\ud86c\\udf67 \\u8c0a \\u8a1a \\u8c03 \\u8c04 \\u8c06 \\u8c08 \\u8bff \\u8bf7 \\u8be4 \\u8bf9 \\u8bfc \\u8c05 \\u8bba \\u8c02 \\u8c00 \\u8c0d \\u8c1e \\u8c1d \\u8c25 \\u8be8 \\ud86c\\udf69 \\u8c14 \\ud86c\\udf73 \\u8c1b \\u8c10 \\u8c0f \\u8c15 \\u54a8 \\ud86c\\udf71 \\ud86c\\udf70 \\u8bb3 \\u8c19 \\ud86c\\udf6f \\u8c0c \\u8bbd \\u8bf8 \\u8c1a \\u8c16 \\u8bfa \\u8c0b \\u8c12 \\u8c13 \\u8a8a \\u8bcc \\ud86c\\udf78 \\ud86c\\udf77 \\u8c0e \\u8c1c \\ud86c\\udf72 \\u8c27 \\u8c11 \\u8c21 \\u8c24 \\u8c26 \\u8c25 \\u8bb2 \\u8c22 \\u8c23 \\u8c23 \\u8c1f \\u8c2a \\u8c2c \\u8c2b \\ud86c\\udf79 \\ud86c\\udf74 \\u8bb4 \\ud86c\\udf75 \\u8c28 \\u8c29 \\u54d7 \\ud86d\\udfe0 \\u4727 \\ud86c\\udf7b \\u8bc1 \\ud86c\\udf62 \\u8c32 \\u8ba5 \\ud86c\\udf64 \\u8c2e \\u8bc6 \\u8c2f \\u8c2d \\u8c31 \\ud86c\\udf7d \\u566a \\ud86c\\udf66 \\u8c35 \\u6bc1 \\u8bd1 \\u8bae \\u8c34 \\u62a4 \\u8bea \\u8a89 \\u8c2b \\u8bfb \\u8c09 \\u53d8 \\u8a5f \\u4729 \\u96e0 \\u8c17 \\u8ba9 \\u8c30 \\u8c36 \\u8d5e \\u8c20 \\u8c33 \\u5c82 \\u7ad6 \\u4e30 \\u8273 \\u732a \\ud86c\\udf86 \\u8c6e \\u732b \\ud86c\\udf8c \\u4759 \\u8d1d \\u8d1e \\u8d20 \\u8d1f \\u8d22 \\u8d21 \\u8d2b \\u8d27 \\u8d29 \\u8d2a \\u8d2f \\u8d23 \\u8d2e \\u8d33 \\u8d40 \\u8d30 \\u8d35 \\u8d2c \\u4e70 \\u8d37 \\u8d36 \\u8d39 \\u8d34 \\u8d3b \\u8d38 \\u8d3a \\u8d32 \\u8d42 \\u8d41 \\u8d3f \\u8d45 \\u8d44 \\u8d3e \\u8d3c \\u8d48 \\u8d4a \\u5bbe \\u8d47 \\u8d52 \\u8d49 \\u8d50 \\ud86c\\udfa9 \\u8d4f \\ud85f\\ude56 \\u8d54 \\u8d53 \\u8d24 \\u5356 \\u8d31 \\u8d4b \\u8d55 \\u8d28 \\u8d4d \\u8d26 \\u8d4c \\u4790 \\u8d56 \\u8d57 \\u8d5a \\u8d59 \\u8d2d \\u8d5b \\u8d5c \\ud85f\\ude57 \\u8d3d \\u8d58 \\u8d5f \\u8d60 \\ud86c\\udfab \\u8d5e \\u8d5d \\u8d61 \\u8d62 \\u8d46 \\ud86c\\udfac \\u8d43 \\u8d51 \\u8d4e \\u8d5d \\ud86c\\udfa6 \\u8d63 \\u8d43 \\u8d6a \\u8d76 \\u8d75 \\u8d8b \\u8db1 \\u8ff9 \\u8df5 \\u903e \\u8e0a \\u8dc4 \\ud86c\\udfd0 \\u8df8 \\u8ff9 \\u8e52 \\u8e2a \\ud86c\\udfc6 \\u8df7 \\ud86c\\udfcb \\u8df6 \\u8db8 \\u8e0c \\u8dfb \\u8dc3 \\u47e2 \\u8e2f \\u8dde \\u8e2c \\u8e70 \\ud860\\udc01 \\u8df9 \\ud860\\udd6c \\u8e51 \\u8e7f \\u8e9c \\u8e8f \\u8eaf \\ud860\\ude57 \\u8f66 \\u8f67 \\u8f68 \\u519b \\ud86d\\udc04 \\u8f6a \\u8f69 \\u8f6b \\ud86d\\udc05 \\ud861\\udc05 \\u8f6d \\ud86d\\udc07 \\u8f6f \\u8f77 \\ud86d\\udc09 \\u8f78 \\ud86d\\udc0a \\u8f71 \\ud86d\\udc08 \\u8f74 \\u8f75 \\u8f7a \\u8f72 \\u8f76 \\u8f7c \\ud86d\\udc0c \\u8f83 \\ud861\\udc08 \\u8f82 \\u8f81 \\u8f80 \\u8f7d \\u8f7e \\ud86a\\ude36 \\u8f84 \\u633d \\u8f85 \\u8f7b \\ud86d\\udc0f \\ud86d\\udc10 \\u8f86 \\u8f8e \\u8f89 \\u8f8b \\u8f8d \\ud86d\\udc0e \\u8f8a \\u8f87 \\ud86d\\udc11 \\u8f88 \\u8f6e \\u8f8c \\ud86d\\udc13 \\u8f91 \\u8f8f \\ud86d\\udc12 \\u8f93 \\u8f90 \\u8f92 \\u8f97 \\u8206 \\u8f92 \\u6bc2 \\u8f96 \\u8f95 \\u8f98 \\ud86d\\udc16 \\u8f6c \\ud86d\\udc15 \\u8f99 \\u8f7f \\ud86d\\udc17 \\u8f9a \\ud86d\\udc18 \\u8f70 \\ud86d\\udc19 \\u8f94 \\u8f79 \\ud86d\\udc06 \\u8f73 \\u529e \\u8f9e \\u8fab \\u8fa9 \\u519c \\u56de \\u8ff3 \\u8fd9 \\u8fde \\u5468 \\u8fdb \\u6e38 \\u8fd0 \\u8fc7 \\u8fbe \\u8fdd \\u9065 \\u900a \\u9012 \\u8fdc \\u6eaf \\u9002 \\ud86d\\udc37 \\u8fdf \\u8fc1 \\u9009 \\u9057 \\u8fbd \\u8fc8 \\u8fd8 \\u8fe9 \\u8fb9 \\u903b \\u9026 \\u90cf \\u90ae \\u90d3 \\u4e61 \\u90b9 \\u90ac \\u90e7 \\ud86d\\udc58 \\u9093 \\u90d1 \\u90bb \\u90f8 \\ud86d\\udc61 \\u90ba \\u90d0 \\u909d \\u9142 \\u90e6 \\u814c \\u915d \\u4e11 \\u915d \\u848f \\u7cd6 \\u533b \\u9171 \\u9166 \\ud86d\\udc77 \\u917f \\u8845 \\u917e \\u917d \\u91ca \\u5398 \\u9485 \\u9486 \\u9487 \\u948c \\u948a \\u9489 \\u948b \\ud86d\\udff2 \\u9488 \\ud86d\\udce5 \\u9493 \\u9490 \\u6263 \\u948f \\ud86d\\udce6 \\u9492 \\ud86d\\udff3 \\ud863\\udc3f \\u9497 \\u948d \\u9495 \\u948e \\u497a \\u94af \\u94ab \\u9498 \\u94ad \\u94a5 \\ud86d\\udcea \\ud86d\\udce7 \\u949a \\u94a0 \\ud863\\udc42 \\u949d \\u94a9 \\u94a4 \\u94a3 \\u9491 \\u949e \\u94ae \\ud86d\\udff4 \\ud86d\\udff5 \\ud86d\\udce8 \\u94a7 \\ud863\\udc41 \\u949f \\u9499 \\u94ac \\u949b \\u94aa \\u94cc \\ud863\\udc44 \\u94c8 \\ud863\\udc43 \\u94b6 \\u94c3 \\u94b4 \\u94b9 \\u94cd \\u94b0 \\u94b8 \\u94c0 \\u94bf \\u94be \\ud863\\udc45 \\u5de8 \\u94bb \\u94ca \\u94c9 \\u94c7 \\u94cb \\u94c2 \\ud86d\\udcec \\u94b7 \\u94b3 \\u94c6 \\u94c5 \\ud86d\\udff7 \\u94ba \\ud86d\\udced \\u94b5 \\u94a9 \\u94b2 \\u94bc \\u94bd \\u952b \\u94cf \\ud86d\\udff9 \\u94f0 \\u94d2 \\u94ec \\ud86d\\udff8 \\ud86d\\udcf4 \\u94ea \\u94f6 \\ud86d\\udcf2 \\ud86d\\udffb \\u94f3 \\u94dc \\ud86d\\udcef \\ud86d\\udcf0 \\u94da \\ud86d\\udff6 \\u94e3 \\u94e8 \\u94e2 \\u94ed \\u94eb \\u94e6 \\u8854 \\u94d1 \\u94f7 \\u94f1 \\u94df \\u94f5 \\u94e5 \\u94d5 \\u94ef \\u94d0 \\u94de \\u9510 \\ud863\\udc47 \\u9500 \\u9508 \\u9511 \\u9509 \\u94dd \\u9545 \\u9512 \\u950c \\u94a1 \\ud863\\udc48 \\u94e4 \\u94d7 \\u950b \\ud86d\\udcf6 \\u94fb \\u950a \\u9513 \\ud86d\\udcf5 \\u94d8 \\u9504 \\u9503 \\u9514 \\u9507 \\u94d3 \\u94fa \\u9510 \\u94d6 \\u9506 \\u9502 \\u94fd \\u950d \\u952f \\u94a2 \\ud872\\udf2d \\u951e \\ud863\\udc4b \\u5f55 \\u9516 \\u952b \\u9529 \\u94d4 \\u9525 \\u9515 \\u951f \\u9524 \\u9531 \\u94ee \\u951b \\ud86d\\udcfb \\ud86d\\udcfd \\u952c \\u952d \\u951c \\u94b1 \\ud86d\\udcf9 \\ud86d\\udcfe \\u9526 \\u951a \\u9520 \\u9521 \\u9522 \\u9519 \\u5f55 \\u9530 \\u8868 \\u94fc \\u954e \\ud86d\\udcf8 \\u951d \\u9528 \\u952a \\ud863\\udc49 \\u94ab \\u9494 \\u9534 \\u9533 \\ud86d\\udd02 \\u70bc \\u9505 \\u9540 \\ud86d\\udd04 \\u9537 \\u94e1 \\u9496 \\u953b \\u953d \\u9538 \\u9532 \\u9518 \\u9539 \\ud863\\udc4e \\u953e \\u952e \\u9536 \\u9517 \\u9488 \\u949f \\u9541 \\u953f \\u9545 \\ud86d\\udfff \\u9551 \\u9570 \\ud86d\\udd05 \\u9555 \\u9501 \\u9549 \\ud86d\\udd08 \\u9524 \\u9548 \\ud863\\udc4f \\ud86d\\udd07 \\u9543 \\u94a8 \\u84e5 \\u954f \\u94e0 \\u94e9 \\u953c \\u9550 \\u9547 \\u9547 \\ud863\\udc4d \\u9552 \\u954b \\u954d \\u9553 \\u9fd4 \\ud863\\udc3e \\u954c \\u954e \\u955e \\ud863\\udc4c \\u955f \\u94fe \\ud863\\udc52 \\u9546 \\u9559 \\u9560 \\u955d \\u94ff \\u9535 \\u621a \\u9557 \\u9558 \\u955b \\u94f2 \\u955c \\u9556 \\u9542 \\ud86d\\udd0a \\ud86d\\udce9 \\u933e \\u955a \\u94e7 \\u9564 \\u956a \\u497d \\u9508 \\ud86d\\udd0c \\u94d9 \\ud863\\udc51 \\ud86d\\udd0d \\ud86d\\udcf1 \\u94f4 \\ud86d\\udd0e \\ud863\\udc53 \\ud863\\udc54 \\u9563 \\u94f9 \\u9566 \\u9561 \\u950f \\u949f \\u956b \\u9562 \\u9568 \\u4985 \\u950e \\u950f \\u9544 \\ud86d\\udcfa \\u954c \\u9570 \\u4983 \\u956f \\u956d \\u94c1 \\u956e \\u94ce \\u94db \\ud86d\\udd01 \\ud86d\\udffc \\u9571 \\u953f \\u94f8 \\ud86e\\udc01 \\u956c \\u9554 \\u9274 \\u9274 \\u9572 \\u9527 \\u9574 \\u94c4 \\u9573 \\u9565 \\ud872\\udf3b \\u9567 \\u94a5 \\u9575 \\u9576 \\ud86d\\udd14 \\u954a \\u9569 \\u9523 \\u94bb \\u92ae \\u51ff \\u9562 \\u954b \\u65cb \\u957f \\u95e8 \\u95e9 \\u95ea \\u95eb \\u95ec \\u95ed \\u5f00 \\u95f6 \\ud863\\ude02 \\u95f3 \\u95f0 \\ud863\\ude03 \\u95f2 \\u95f2 \\u95f4 \\u95f5 \\ud86d\\udd2f \\u95f8 \\ud86e\\udc02 \\ud86d\\udd30 \\u9602 \\u9601 \\u5408 \\u9600 \\u95fa \\u95fd \\u9603 \\u9606 \\u95fe \\u9605 \\u9605 \\ud86d\\udd34 \\u960a \\u9609 \\u960e \\u960f \\u960d \\u9608 \\u960c \\u9612 \\u677f \\u6697 \\u95f1 \\u9614 \\u9615 \\u9611 \\u9607 \\u9617 \\ud86d\\udd36 \\u9618 \\u95ff \\u9616 \\u9619 \\u95ef \\u5173 \\u961a \\u9613 \\u9610 \\u8f9f \\u961b \\u95fc \\u962a \\u9649 \\u9655 \\u5347 \\u9635 \\u9634 \\u9648 \\u9646 \\u9633 \\u9667 \\u961f \\u9636 \\u9668 \\u9645 \\u968f \\u9669 \\u9666 \\u9690 \\u9647 \\u96b6 \\u53ea \\u96bd \\u867d \\u53cc \\u96cf \\u6742 \\u9e21 \\u79bb \\u96be \\u4e91 \\u7535 \\u9721 \\ud86d\\udd65 \\u96fe \\ud86b\\udd63 \\u9701 \\u96f3 \\u972d \\u53c7 \\u7075 \\u53c6 \\u9753 \\u9759 \\u9754 \\u817c \\ud86d\\udd83 \\u9765 \\u9f17 \\u5de9 \\u7ef1 \\u79cb \\u9792 \\ud86d\\udd87 \\u7f30 \\u9791 \\u5343 \\u97af \\u97e6 \\u97e7 \\u97e8 \\u97e9 \\u97ea \\ud86e\\udc05 \\ud86d\\udd94 \\u97ec \\u97b2 \\u97eb \\ud86d\\udd92 \\u97f5 \\u54cd \\u9875 \\u9876 \\u9877 \\u9879 \\u987a \\u9878 \\u987b \\u987c \\u9882 \\ud86e\\udc06 \\u9880 \\u9883 \\u9884 \\u987d \\u9881 \\u987f \\u9887 \\u9886 \\u988c \\u9889 \\u9890 \\u988f \\ud86d\\uddaf \\u5934 \\u9892 \\u988a \\u988b \\u9895 \\ud86d\\uddb3 \\u9894 \\u9888 \\u9893 \\u9891 \\u9893 \\ud865\\udccb \\ud865\\udd96 \\ud86d\\uddb6 \\u9897 \\u9898 \\u989d \\u989a \\u989c \\u9899 \\u989b \\u989c \\ud86d\\uddae \\u613f \\u98a1 \\u98a0 \\u7c7b \\u989f \\ud86d\\uddb9 \\u98a2 \\u987e \\u98a4 \\u98a5 \\u663e \\u98a6 \\u9885 \\u989e \\u98a7 \\u98ce \\u98d0 \\u98d1 \\u98d2 \\ud865\\ude65 \\u53f0 \\u522e \\u98d3 \\ud865\\ude6a \\u98d4 \\u98cf \\u98d6 \\u98d5 \\ud865\\ude6b \\u98d7 \\u98d8 \\u98d9 \\u98da \\ud86d\\uddcb \\u98de \\u9963 \\u9965 \\u9964 \\u9966 \\ud86d\\uddde \\u9968 \\u996a \\u996b \\u996c \\u996d \\u98e7 \\u996e \\u9974 \\ud86d\\udde2 \\ud86d\\udde3 \\u9972 \\u9971 \\u9970 \\u9973 \\u997a \\u9978 \\u997c \\u9977 \\u517b \\u9975 \\u9979 \\u997b \\u997d \\u9981 \\u997f \\ud86d\\udde6 \\u9982 \\u997e \\ud86d\\udde7 \\u4f59 \\u80b4 \\u9984 \\u9983 \\u996f \\u9985 \\ud86d\\udde0 \\ud86d\\uddea \\u9986 \\ud86d\\uddec \\ud86d\\udde5 \\u7cca \\ud86d\\uddee \\u7cc7 \\u9967 \\u5582 \\u9989 \\u9987 \\ud866\\udc0c \\u998e \\u9969 \\u998f \\u998a \\u998c \\u998d \\u9992 \\u9990 \\u9991 \\u9993 \\u9988 \\u9994 \\u9965 \\u9976 \\u98e8 \\ud86d\\uddf4 \\u990d \\u998b \\ud86d\\uddf5 \\ud86d\\udde9 \\u9995 \\u9a6c \\u9a6d \\u51af \\ud86d\\ude1b \\u9a6e \\u9a70 \\u9a6f \\u9a72 \\ud86d\\ude1c \\u9a73 \\ud86d\\ude1d \\ud86d\\ude1f \\ud866\\udde8 \\u9a7b \\u9a7d \\u9a79 \\u9a75 \\u9a7e \\u9a80 \\u9a78 \\ud866\\uddeb \\u9a76 \\u9a7c \\ud86d\\ude1e \\u9a77 \\u9a82 \\u9a88 \\ud86d\\ude20 \\ud866\\uddf2 \\ud866\\uddf4 \\ud86d\\ude21 \\u9a87 \\u9a83 \\u9a86 \\ud866\\uddfa \\u9a8e \\ud86d\\ude23 \\u9a8f \\u9a8b \\u9a8d \\ud86d\\ude24 \\ud86d\\ude27 \\u9a93 \\ud86d\\ude25 \\ud86d\\ude26 \\u9a94 \\u9a92 \\u9a91 \\u9a90 \\ud866\\ude00 \\u9a9b \\u9a97 \\ud866\\ude0a \\ud86d\\ude29 \\ud866\\ude03 \\ud866\\ude08 \\ud86d\\ude28 \\u9a99 \\u4bc4 \\ud866\\ude04 \\u9a9e \\u9a98 \\u9a9d \\u817e \\ud86d\\ude2c \\ud86d\\ude2b \\ud86d\\ude2a \\u9a7a \\u9a9a \\u9a9f \\ud86d\\ude2d \\ud86e\\udc0b \\u9aa1 \\u84e6 \\u9a9c \\u9a96 \\u9aa0 \\u9aa2 \\u9a71 \\u9a85 \\ud866\\uddef \\u9a95 \\u9a81 \\u9aa3 \\ud86d\\ude2f \\u9a84 \\u9a8c \\ud86d\\ude30 \\u60ca \\u9a7f \\u9aa4 \\u9a74 \\u9aa7 \\u9aa5 \\u9aa6 \\ud86d\\ude31 \\u9a8a \\u9a89 \\u80ae \\u9ac5 \\u810f \\u4f53 \\u9acc \\u9acb \\u53d1 \\u677e \\u80e1 \\ud866\\udf79 \\u987b \\ud86d\\ude3d \\u9b13 \\u6597 \\u95f9 \\u54c4 \\u960b \\u9604 \\u90c1 \\u9b36 \\u9b49 \\u9b47 \\u9c7c \\u9c7d \\ud86d\\ude89 \\u9c7e \\ud867\\udf79 \\ud86d\\ude8c \\u9c80 \\u9c81 \\u9c82 \\ud86d\\ude8d \\u9c7f \\u9c84 \\ud86e\\udc10 \\u9c85 \\u9c86 \\ud86d\\ude92 \\ud86d\\ude91 \\ud86d\\ude96 \\u9c8c \\u9c89 \\u9c8f \\u9c87 \\u9c90 \\u9c8d \\u9c8b \\u9c8a \\ud867\\udf80 \\u9c92 \\u9c98 \\u9c9e \\u9c95 \\ud867\\udf7e \\u4c9f \\ud86d\\ude93 \\u9c96 \\u9c94 \\u9c9b \\u9c91 \\u9c9c \\ud86d\\ude97 \\ud86d\\ude94 \\u9c93 \\ud86d\\ude9b \\u9caa \\ud867\\udf83 \\u9c9d \\ud86d\\ude9a \\u9ca7 \\u9ca0 \\ud867\\udf81 \\ud86d\\ude99 \\u9ca9 \\u9ca4 \\u9ca8 \\u9cac \\u9cbb \\u9caf \\u9cad \\u9c9e \\u9cb7 \\u9cb4 \\ud86d\\udea1 \\u9cb1 \\u9cb5 \\u9cb2 \\u9cb3 \\u9cb8 \\u9cae \\u9cb0 \\ud86d\\ude9e \\u9cb6 \\ud867\\udf87 \\u9cba \\ud867\\udf7c \\u9cc0 \\u9cab \\ud86d\\udea3 \\u9cca \\u9cc8 \\u9c97 \\u9cc2 \\u4ca0 \\u9cbd \\u9cc7 \\ud86d\\udea2 \\u4ca1 \\u9cc5 \\u9cbe \\u9cc4 \\ud86d\\ude8a \\u9cc6 \\u9cc3 \\ud86d\\udea5 \\u9cc1 \\u9cd2 \\u9cd1 \\u9ccb \\u9ca5 \\ud86d\\ude95 \\u9ccf \\ud86d\\udea4 \\u4ca2 \\u9cce \\u9cd0 \\ud86d\\udea6 \\u9ccd \\u9cc1 \\u9ca2 \\u9ccc \\u9cd3 \\u9cd8 \\u9ca6 \\u9ca3 \\u9cb9 \\u9cd7 \\u9cdb \\ud86d\\udea7 \\u9cd4 \\u9cc9 \\ud86d\\ude8b \\u9cd9 \\ud86e\\udc12 \\ud867\\udf8c \\u9cd5 \\u9cd6 \\ud86d\\udeaa \\u9cdf \\u9cdd \\u9cdc \\u9cde \\u9c9f \\u9cbc \\u9c8e \\u9c99 \\ud86d\\udeab \\u9ce3 \\u9ce1 \\u9ce2 \\u9cbf \\u9c9a \\ud86d\\ude88 \\u9ce0 \\ud86d\\udead \\u9cc4 \\u9c88 \\u9ca1 \\u9e1f \\u51eb \\u9e20 \\u51eb \\u9e24 \\u51e4 \\u9e23 \\u9e22 \\ud86d\\udedb \\ud868\\ude43 \\ud86d\\udeda \\u4d13 \\ud86d\\udedc \\ud86d\\udede \\ud86d\\udedd \\u9e29 \\u9e28 \\u9e26 \\ud86d\\udee4 \\u9e30 \\ud86d\\udee1 \\u9e35 \\ud86c\\udc61 \\u9e33 \\ud868\\ude48 \\u9e32 \\u9e2e \\u9e31 \\u9e2a \\ud86d\\udee3 \\u9e2f \\u9e2d \\ud86d\\udee6 \\u9e38 \\u9e39 \\ud868\\ude46 \\ud86d\\udee9 \\u9e3b \\u4d15 \\u9e3f \\ud86d\\udeea \\u9e3d \\u4d14 \\u9e3a \\u9e3c \\ud86d\\udee5 \\u9e40 \\u9e43 \\u9e46 \\u9e41 \\ud868\\ude4d \\u9e48 \\u9e45 \\ud86d\\udeed \\u9e44 \\u9e49 \\ud86d\\udee8 \\ud86d\\udef3 \\u9e4c \\ud86d\\udef1 \\u9e4f \\u9e50 \\u9e4e \\u96d5 \\u9e4a \\u9e53 \\u9e4d \\u4d16 \\u9e2b \\u9e51 \\u9e52 \\ud86d\\udef5 \\ud86d\\udef6 \\u9e4b \\u9e59 \\ud86d\\udef8 \\u9e55 \\u9e57 \\u9e56 \\u9e5b \\ud86d\\udef7 \\u9e5c \\u4d17 \\u9e27 \\ud86d\\udeef \\u83ba \\ud86d\\udeeb \\u9e5f \\u9e64 \\u9e60 \\u9e61 \\u9e58 \\u9e63 \\u9e5a \\u9e5a \\u9e62 \\u9e5e \\u9e21 \\ud86d\\udefd \\u4d18 \\u4d18 \\u9e5d \\ud86d\\udf00 \\u9e67 \\ud868\\ude51 \\u9e65 \\u9e25 \\u9e37 \\u9e68 \\ud86d\\udf03 \\ud86d\\udef4 \\u9e36 \\u9e6a \\ud868\\ude4a \\ud86d\\udf01 \\u9e54 \\u9e69 \\u9e6b \\u9e47 \\u9e47 \\ud86d\\udf04 \\u9e6c \\u9e70 \\u9e6d \\u9e34 \\u4d19 \\u3d89 \\u9e6f \\u4d19 \\ud86d\\udee2 \\u9e71 \\u9e72 \\u9e2c \\ud86d\\udedf \\u9e74 \\u9e66 \\u9e73 \\u9e42 \\u9e3e \\u5364 \\u54b8 \\u9e7e \\u78b1 \\u76d0 \\u4e3d \\u9ea6 \\ud868\\udf8a \\u9eb8 \\u9762 \\u9762 \\ud853\\udff2 \\u66f2 \\ud868\\udf89 \\ud868\\udf8c \\u66f2 \\u9762 \\ud86d\\udf11 \\u4e48 \\u4e48 \\u9ec4 \\u9ec9 \\u70b9 \\u515a \\u9eea \\u9709 \\u9ee1 \\u9ee9 \\u9efe \\u9f0b \\u9f0c \\u9f0d \\u51ac \\u9f39 \\u9f44 \\u9f50 \\u658b \\u8d4d \\u9f51 \\u9f7f \\u9f80 \\u9f81 \\u9f82 \\u9f85 \\u9f87 \\u9f83 \\u9f86 \\u9f84 \\u51fa \\u9f88 \\u556e \\ud86d\\udf2a \\u9f8a \\u9f89 \\ud86d\\udf2d \\ud86e\\udc1c \\ud86d\\udf2c \\u9f8b \\ud86d\\udf2e \\u816d \\u9f8c \\ud86d\\udf30 \\u9f99 \\u5390 \\u5e9e \\u4dae \\ud86d\\udf32 \\u9f9a \\u9f9b \\u9f9f \\ud866\\ude0e \\ud863\\udc46 \\u4724 \\u9fd2 \\ud840\\udc3e \\ud840\\uddbf \\ud840\\ude57 \\ud86d\\udf4b \\u34c6 \\ud841\\udec6 \\ud841\\udeb3 \\ud86a\\udc21 \\ud86a\\udc3a \\ud869\\udf0e \\ud86a\\udc92 \\ud86a\\udc7a \\ud843\\udd1b \\ud86a\\udc90 \\ud843\\udd22 \\ud843\\udd78 \\ud843\\udca5 \\ud86a\\udc96 \\ud844\\uded7 \\ud86a\\udd04 \\ud844\\udec0 \\ud844\\udf63 \\u36df \\ud86d\\udf6a \\u36ff \\ud845\\udfb1 \\u36e0 \\ud846\\udf5c \\ud846\\udf6c \\ud847\\udcc3 \\ud86a\\ude29 \\ud86a\\ude39 \\u5c81 \\ud847\\ude03 \\u37dc \\ud86a\\ude5b \\ud86a\\udeb4 \\ud849\\ude51 \\ud86a\\udf1a \\ud849\\ude1d \\ud849\\ude1e \\ud86a\\udee1 \\ud849\\ude19 \\ud86a\\udf2f \\ud86a\\udf5d \\ud86a\\udf6f \\ud84a\\udede \\ud84a\\udf4f \\ud84a\\udeca \\ud84a\\udf26 \\ud86a\\udfb3 \\u6685 \\ud84c\\ude23 \\ud840\\ude89 \\u3b63 \\ud86b\\udcd7 \\ud84d\\ude37 \\ud84d\\ude13 \\ud84d\\udf8e \\ud84d\\udc76 \\ud84e\\udfe3 \\ud84e\\udf64 \\u6bf6 \\ud86b\\uddae \\u3ce2 \\ud84f\\uddab \\ud84f\\udebd \\ud86b\\udd92 \\ud84f\\uddf7 \\ud850\\udfbb \\ud86b\\ude40 \\ud850\\ude80 \\ud86b\\ude79 \\ud86b\\ude60 \\ud850\\udeb0 \\ud86b\\udea3 \\ud851\\ude6f \\ud86d\\udfa2 \\ud86b\\udeaa \\ud86b\\udeb8 \\ud851\\udf62 \\ud84a\\udc90 \\ud86d\\udfa7 \\u3ed8 \\u3ecf \\ud86b\\udf34 \\ud86b\\udf5d \\ud853\\udcc4 \\ud86b\\udf6d \\ud853\\udda7 \\ud86b\\udf74 \\ud854\\udd7f \\ud854\\udd58 \\ud86b\\udfca \\ud855\\udc30 \\ud855\\udc2f \\ud86b\\udfde \\ud86b\\udff5 \\ud86c\\udc13 \\ud86c\\udc0c \\ud855\\udfa6 \\u416a \\ud86d\\udfb7 \\ud86c\\udc2e \\ud856\\uddc2 \\ud856\\ude7a \\ud86c\\udc73 \\ud86c\\udc96 \\ud86c\\udc7a \\ud857\\udc54 \\ud856\\udf49 \\ud86c\\udc71 \\ud856\\udf8b \\ud86c\\udcbf \\ud857\\ude65 \\ud857\\ude87 \\ud86c\\udd1d \\ud858\\ude08 \\ud86c\\udd26 \\ud858\\ude12 \\ud858\\ude17 \\ud86c\\udd2f \\ud86c\\udd2a \\ud86c\\udd35 \\ud86d\\udfc7 \\ud86c\\udd65 \\ud86c\\udd7c \\ud847\\udcd2 \\ud86c\\udd9d \\ud86d\\udf85 \\ud86c\\uddab \\ud84c\\udf68 \\ud859\\udfd7 \\ud86c\\uddd8 \\u447d \\ud85a\\ude29 \\ud86c\\uddea \\ud85b\\uddbb \\ud85c\\udf25 \\ud86c\\udeb9 \\ud85d\\udcad \\ud85c\\ude50 \\u461e \\u464a \\u461b \\ud86c\\udf0b \\ud85d\\udf67 \\ud86c\\udf2b \\ud86c\\udf2c \\ud86c\\udf5e \\ud86c\\udf5f \\ud86c\\udf6d \\u4725 \\ud86c\\udf76 \\ud86c\\udf7a \\ud86c\\udf7c \\ud86c\\udf7e \\ud86c\\udf50 \\ud85f\\udcd5 \\u478c \\ud85f\\ude53 \\u478e \\ud86a\\udc00 \\ud86c\\udfa8 \\ud86a\\udd60 \\ud86c\\udfb8 \\ud86c\\udfcc \\ud860\\udc31 \\ud860\\udc74 \\ud86c\\udfd5 \\ud85f\\udfc8 \\ud860\\udd6b \\ud86c\\udfe8 \\ud86c\\udfde \\ud86c\\udfd1 \\ud860\\udcba \\ud860\\udd04 \\u4880 \\u4881 \\ud861\\udc06 \\u4882 \\ud86d\\udc0d \\ud86d\\udc14 \\ud86d\\udc0b \\ud861\\udc09 \\ud861\\udc07 \\ud861\\udc0a \\ud86d\\udfeb \\ud86d\\udfec \\ud862\\udc59 \\ud862\\udc7a \\ud861\\udff3 \\ud862\\udc28 \\ud862\\udd30 \\ud863\\udc40 \\ud86d\\udceb \\u4980 \\ud872\\udf4a \\u4981 \\ud86d\\udffd \\ud863\\udc4a \\ud872\\udf5b \\ud86d\\udcfc \\ud86d\\udcff \\ud86d\\udffe \\ud86d\\udcee \\ud863\\udc50 \\ud86d\\udd0f \\ud872\\udf76 \\ud872\\udf73 \\ud86d\\udd11 \\ud86d\\udd10 \\ud863\\udc55 \\ud86d\\udd12 \\u497f \\ud86d\\udd13 \\ud86d\\udd09 \\ud86d\\udcf3 \\ud86d\\udd15 \\ud86d\\udd03 \\ud86d\\udd16 \\ud863\\ude01 \\ud863\\ude00 \\ud863\\ude05 \\ud86d\\udd32 \\ud863\\ude06 \\ud863\\ude07 \\ud863\\ude09 \\ud863\\ude0a \\ud863\\ude0c \\ud863\\ude0b \\ud863\\ude0e \\ud86d\\udd3d \\ud863\\ude18 \\ud86d\\udd5a \\ud86d\\udd68 \\ud86d\\udd91 \\ud864\\udffe \\ud86d\\udd93 \\ud86d\\udd96 \\ud864\\udffd \\ud86c\\udcd7 \\ud86d\\uddaa \\ud86d\\uddad \\ud865\\udd95 \\ud86d\\uddb5 \\ud86d\\uddb7 \\ud86d\\uddb4 \\ud86e\\udc07 \\ud865\\ude66 \\ud86d\\uddc8 \\ud86d\\uddc9 \\ud865\\ude69 \\ud865\\ude6d \\ud865\\ude68 \\ud865\\ude6c \\ud865\\ude70 \\ud865\\udfff \\ud866\\udc00 \\ud86d\\udde1 \\ud866\\udc01 \\ud866\\udc02 \\ud86d\\udde4 \\ud86d\\udde8 \\ud866\\udc03 \\ud866\\udc09 \\ud866\\udc06 \\ud866\\udc0a \\ud866\\udc0b \\ud86d\\uddf3 \\ud866\\udc0e \\ud866\\udc0f \\u4b6a \\ud866\\udc05 \\ud86d\\uddda \\ud866\\udc20 \\ud866\\udc56 \\ud866\\udde6 \\ud866\\uddec \\ud866\\uddf5 \\ud866\\uddf3 \\ud866\\uddee \\ud866\\uddf6 \\u4bc3 \\ud866\\uddf8 \\ud866\\uddfb \\ud866\\uddfc \\ud866\\udde9 \\ud866\\ude06 \\ud866\\ude09 \\ud866\\ude05 \\ud866\\ude0b \\ud866\\ude0d \\ud866\\uddf1 \\ud866\\ude0c \\ud86e\\udc0c \\ud866\\ude10 \\ud866\\udf23 \\ud86d\\ude42 \\ud866\\udfd2 \\ud866\\udf24 \\ud867\\udc30 \\ud867\\udc92 \\ud867\\udd0c \\ud86e\\udc0f \\ud867\\udf7a \\ud867\\udf7b \\ud86d\\ude8e \\u4c9e \\ud867\\udf7f \\ud867\\udf7d \\ud867\\udf84 \\ud867\\udf85 \\ud86d\\ude9d \\ud86d\\ude9f \\ud867\\udf86 \\ud86d\\udea8 \\ud86d\\udea9 \\ud86d\\ude98 \\ud86d\\udeac \\ud867\\udf8e \\ud86e\\udc16 \\ud86d\\udee0 \\ud868\\ude44 \\ud86d\\udee7 \\ud868\\ude45 \\ud868\\ude4b \\ud868\\ude49 \\ud868\\ude4c \\ud868\\ude4e \\ud868\\ude50 \\ud868\\ude4f \\ud86d\\udefb \\ud86d\\udef9 \\ud868\\ude54 \\ud868\\ude52 \\ud86d\\udf02 \\ud86d\\udefe \\ud868\\ude55 \\ud868\\ude53 \\ud86d\\udf0a \\ud868\\udf8d \\ud86d\\udf13 \\ud86d\\udf15 \\ud86d\\udf1f \\ud869\\udd2d \\ud869\\ude8f \\ud869\\ude90 \\ud86d\\udf2f \\ud841\\udefe \\ud84f\\uddad \\ud86d\\udcf7 \\ud86d\\udf2b \\u516b\\u6fdb\\u5c71 \\u62dc\\u590d \\u6bd5\\u6607 \\u53d8\\u5fb5 \\u7980\\u590d \\u671d\\u4e7e\\u5915\\u60d5 \\u7b79\\u5212 \\u51fa\\u4e11\\u72fc\\u501f \\u7b54\\u590d \\u5927\\u76ee\\u4e7e\\u8fde\\u51a5\\u95f4\\u6551\\u6bcd\\u53d8\\u6587 \\u8361\\u590d \\u62b5\\u89e6 \\u62b5\\u727e \\u98a0\\u4e7e\\u5012\\u5764 \\u7535\\u590d \\u8c82\\u590d\\u989d \\u7b03\\u9ebd \\u953b\\u953a \\u53d1\\u590d \\u6a0a\\u65bc\\u671f \\u53cd\\u53cd\\u590d\\u590d \\u53cd\\u590d \\u590d\\u6309 \\u590d\\u676f \\u590d\\u74ff \\u590d\\u6210 \\u590d\\u5448 \\u590d\\u5e31 \\u590d\\u7535 \\u590d\\u9f0e \\u590d\\u91a2 \\u590d\\u9171\\u74ff \\u590d\\u8549\\u5bfb\\u9e7f \\u590d\\u9e7f\\u5bfb\\u8549 \\u590d\\u9e7f\\u9057\\u8549 \\u590d\\u9732 \\u590d\\u5192 \\u590d\\u547d \\u590d\\u5893 \\u590d\\u9006 \\u590d\\u4e0a \\u590d\\u6587 \\u590d\\u6821 \\u590d\\u4fe1 \\u590d\\u76c2 \\u590d\\u80b2 \\u590d\\u5e10 \\u590d\\u4f4f \\u590d\\u5b97 \\u987e\\u501f \\u90ed\\u5b50\\u4e7e \\u51fd\\u590d \\u72d0\\u501f\\u864e\\u5a01 \\u6ed1\\u501f \\u9ec4\\u953a\\u516c \\u56de\\u590d \\u501f\\u8349\\u6795\\u5757 \\u501f\\u8bcd \\u501f\\u6b64 \\u501f\\u4ee3 \\u501f\\u8bfb \\u501f\\u7aef \\u501f\\u65b9 \\u501f\\u69c1 \\u501f\\u6545 \\u501f\\u5349 \\u501f\\u673a \\u501f\\u501f \\u501f\\u636e \\u501f\\u53e3 \\u501f\\u5bc7\\u5175 \\u501f\\u751a \\u501f\\u624b \\u501f\\u6761 \\u501f\\u4ee5 \\u501f\\u7531 \\u501f\\u55bb \\u501f\\u7740 \\u501f\\u52a9 \\u501f\\u7bb8\\u4ee3\\u7b79 \\u501f\\u8d44 \\u8ba1\\u5212 \\u5bb6\\u5177 \\u89c1\\u590d \\u89d2\\u5fb5 \\u94f0\\u94fe \\u91d1\\u94fe \\u91d1\\u5412 \\u9888\\u94fe \\u9152\\u9022\\u77e5\\u5df1\\u5343\\u953a\\u5c11 \\u949c\\u9632 \\u949c\\u4e07 \\u949c\\u5b50 \\u94a7\\u590d \\u5eb7\\u4e7e \\u62c9\\u94fe \\u674e\\u94fe\\u798f \\u674e\\u4e7e\\u5fb7 \\u674e\\u6cfd\\u949c \\u674e\\u953a\\u90c1 \\u94fe\\u9524 \\u94fe\\u9501 \\u94fe\\u6761 \\u94fe\\u5f62 \\u94fe\\u5760 \\u94fe\\u5b50 \\u4e86\\u89e3 \\u4e86\\u7136 \\u4e86\\u5982 \\u4e86\\u82e5\\u6307\\u638c \\u8e8f\\u501f \\u51cc\\u501f \\u6d41\\u5fb5 \\u9732\\u590d \\u4e70\\u81e3\\u590d\\u6c34 \\u5e7a\\u9ebd \\u5e7a\\u9ebd \\u9ebd\\u4e9b\\u65cf \\u540d\\u590d\\u91d1\\u74ef \\u660e\\u590d \\u660e\\u4e86 \\u4f94\\u5fb7\\u590d\\u8f7d \\u6728\\u5412 \\u54ea\\u5412 \\u5c3c\\u4e7e\\u9640 \\u7ebd\\u6263 \\u4eff\\u4f5b \\u51ed\\u501f \\u9887\\u590d \\u5343\\u953a\\u7c9f \\u4e7e\\u65e6 \\u4e7e\\u9053 \\u4e7e\\u65ad \\u4e7e\\u7eb2 \\u4e7e\\u5366 \\u4e7e\\u7ea2 \\u4e7e\\u5609 \\u4e7e\\u5764 \\u4e7e\\u9675 \\u4e7e\\u9686 \\u4e7e\\u6e05\\u5bab \\u4e7e\\u76db\\u4e16 \\u4e7e\\u56fe \\u4e7e\\u53bf \\u4e7e\\u8c61 \\u4e7e\\u66dc \\u4e7e\\u5143 \\u4e7e\\u9020 \\u4e7e\\u5b85 \\u94b1\\u953a\\u4e66 \\u4f24\\u4ea1\\u6795\\u501f \\u4e0a\\u94fe \\u5c04\\u590d \\u7533\\u590d \\u6c89\\u8239 \\u6c89\\u79ef \\u6c89\\u6ca1 \\u6c89\\u9ed8 \\u751a\\u949c \\u793a\\u590d \\u624b\\u94fe \\u7d20\\u501f \\u849c\\u85b9 \\u9501\\u94fe \\u94c1\\u94fe \\u4e07\\u953a \\u6587\\u9526\\u590d\\u9631 \\u9879\\u94fe \\u8427\\u4e7e \\u65cb\\u4e7e\\u8f6c\\u5764 \\u8e05\\u95e8\\u4e86\\u6237 \\u96c1\\u6773\\u9c7c\\u6c89 \\u5e7a\\u9ebd \\u4ee5\\u529f\\u590d\\u8fc7 \\u8335\\u501f \\u94f6\\u94fe \\u65bc\\u6556 \\u65bc\\u5d07\\u6587 \\u65bc\\u5355 \\u65bc\\u4e4e \\u65bc\\u547c\\u54c0\\u54c9 \\u65bc\\u68a8\\u534e \\u65bc\\u7433 \\u65bc\\u9675\\u5b50 \\u65bc\\u4f26 \\u65bc\\u7a46 \\u65bc\\u5176\\u4e00 \\u65bc\\u6e05\\u8a00 \\u65bc\\u4e16\\u6210 \\u65bc\\u5766 \\u65bc\\u83df \\u65bc\\u60df\\u4e00 \\u65bc\\u620f \\u65bc\\u9091 \\u65bc\\u52c7\\u660e \\u65bc\\u5219 \\u65bc\\u5fe0\\u7965 \\u65bc\\u4ef2\\u5b8c \\u65bc\\u7af9\\u5c4b \\u82b8\\u85b9 \\u915d\\u501f \\u5f20\\u6cd5\\u4e7e \\u53ea\\u5f97 \\u53ea\\u89c1\\u6811\\u6728 \\u5fb5\\u8c03 \\u5fb5\\u58f0 \\u5fb5\\u5f26 \\u5fb5\\u5f26 \\u5fb5\\u97f3 \\u953a\\u953b \\u953a\\u9997 \\u953a\\u4e07\\u6885 \\u953a\\u91cd\\u53d1 \\u91cd\\u590d\".split(\" \"),v=null,y=null,x=null,A=null,w=null,z=null;this.ToTraditionalChinese=function(f,d){d=void 0===d?0:d;if(2<d||0>d)throw\"type \\u4e0d\\u652f\\u6301\\u8be5\\u7c7b\\u578b\";var e=u(!0,0);f=t(f,e);0<d&&(e=u(!0,d),f=t(f,e));return f};this.ToSimplifiedChinese=function(f,d){d=void 0===d?0:d;if(2<d||0>d)throw\"srcType \\u4e0d\\u652f\\u6301\\u8be5\\u7c7b\\u578b\";if(0<d){var e=u(!1,d);f=t(f,e)}e=u(!1,0);return f=t(f,e)}}", "title": "" }, { "docid": "0408cb2a8440aa1687e934d1a97aef61", "score": "0.5228134", "text": "function ws_rotate(j, i, a) {\n var d = jQuery;\n var h = d(this);\n var e = d(\".ws_list\", a);\n var b = {position: \"absolute\", left: 0, top: 0};\n var f = d(\"<div>\").addClass(\"ws_effect ws_rotate\").css(b).css({height: \"100%\", width: \"100%\", overflow: \"hidden\"}).appendTo(a.parent());\n var c;\n function g(n, k, l, m) {\n if (j.support.transform && j.support.transition) {\n k.transform = \"translate3d(0,0,0) rotate(\" + k.rotate + \"deg) scale(\" + k.scale + \")\";\n delete k.scale;\n delete k.rotate;\n if (l) {\n k.transition = \"all \" + l + \"ms cubic-bezier(0.770, 0.000, 0.175, 1.000)\"\n }\n n.css(k);\n if (m) {\n n.on(\"transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd\", function () {\n m()\n })\n }\n } else {\n if (l) {\n n.animate(k, {easing: \"easeInOutExpo\", duration: j.duration, complete: m ? m : 0})\n } else {\n n.css(k)\n }\n }\n }\n this.go = function (k, l) {\n var n = d(i[0]);\n n = {width: n.width(), height: n.height(), marginTop: parseFloat(n.css(\"marginTop\")), marginLeft: parseFloat(n.css(\"marginLeft\"))};\n if (c) {\n c.stop(true, true)\n }\n c = d(i.get(k)).clone().css(b).css(n).hide().appendTo(f);\n if (!j.noCross) {\n var m = d(i.get(l)).clone().css(b).css(n).appendTo(f);\n g(c, {opacity: 1, rotate: 0, scale: 1});\n setTimeout(function () {\n e.hide();\n g(m, {rotate: j.rotateOut || 180, scale: j.scaleOut || 10, opacity: 0}, j.duration, function () {\n m.remove()\n })\n }, 0)\n }\n g(c, {display: \"block\", opacity: 0, rotate: -(j.rotateIn || 180), scale: j.scaleIn || 10, zIndex: 10});\n setTimeout(function () {\n g(c, {rotate: 0, scale: 1, opacity: 1}, j.duration, function () {\n c.remove();\n c = 0;\n h.trigger(\"effectEnd\")\n })\n }, 0)\n }\n}", "title": "" }, { "docid": "b2a1b7fd6901e27102f69504bcac2dc6", "score": "0.5205652", "text": "function __loadCompatLayer(w){ULSh2q:;w.Debug=function(){};w.Debug._fail=function(message){ULSh2q:;throw new Error(message);};w.Debug.writeln=function(text){ULSh2q:;if(window.console){if(window.console.debug){window.console.debug(text);return;} else if(window.console.log){window.console.log(text);return;}} else if(window.opera&&window.opera.postError){window.opera.postError(text);return;}};w.__getNonTextNode=function(node){ULSh2q:;try{while(node&&(node.nodeType!=1)){node=node.parentNode;}} catch(ex){node=null;} return node;};w.__getLocation=function(e){ULSh2q:;var loc={x:0,y:0};while(e){loc.x+=e.offsetLeft;loc.y+=e.offsetTop;e=e.offsetParent;} return loc;};RegExp._cacheable=true;String._quoteSkipTest=true;w.navigate=function(url){ULSh2q:;window.setTimeout('window.location = \"'+url+'\";',0);};var attachEventProxy=function(eventName,eventHandler){ULSh2q:;eventHandler._mozillaEventHandler=function(e){ULSh2q:;window.event=e;eventHandler();if(!e.avoidReturn){return e.returnValue;}};this.addEventListener(eventName.slice(2),eventHandler._mozillaEventHandler,false);};var detachEventProxy=function(eventName,eventHandler){ULSh2q:;if(eventHandler._mozillaEventHandler){var mozillaEventHandler=eventHandler._mozillaEventHandler;delete eventHandler._mozillaEventHandler;this.removeEventListener(eventName.slice(2),mozillaEventHandler,false);}};w.attachEvent=attachEventProxy;w.detachEvent=detachEventProxy;w.HTMLDocument.prototype.attachEvent=attachEventProxy;w.HTMLDocument.prototype.detachEvent=detachEventProxy;w.HTMLElement.prototype.attachEvent=attachEventProxy;w.HTMLElement.prototype.detachEvent=detachEventProxy;w.Event.prototype.__defineGetter__('srcElement',function(){ULSh2q:;return __getNonTextNode(this.target)||this.currentTarget;});w.Event.prototype.__defineGetter__('cancelBubble',function(){ULSh2q:;return this._bubblingCanceled||false;});w.Event.prototype.__defineSetter__('cancelBubble',function(v){ULSh2q:;if(v){this._bubblingCanceled=true;this.stopPropagation();}});w.Event.prototype.__defineGetter__('returnValue',function(){ULSh2q:;return!this._cancelDefault;});w.Event.prototype.__defineSetter__('returnValue',function(v){ULSh2q:;if(!v){this._cancelDefault=true;this.preventDefault();}});w.Event.prototype.__defineGetter__('fromElement',function(){ULSh2q:;var n;if(this.type=='mouseover'){n=this.relatedTarget;} else if(this.type=='mouseout'){n=this.target;} return __getNonTextNode(n);});w.Event.prototype.__defineGetter__('toElement',function(){ULSh2q:;var n;if(this.type=='mouseout'){n=this.relatedTarget;} else if(this.type=='mouseover'){n=this.target;} return __getNonTextNode(n);});w.Event.prototype.__defineGetter__('button',function(){ULSh2q:;return(this.which==1)?1:(this.which==3)?2:0});w.Event.prototype.__defineGetter__('offsetX',function(){ULSh2q:;return window.pageXOffset+this.clientX-__getLocation(this.srcElement).x;});w.Event.prototype.__defineGetter__('offsetY',function(){ULSh2q:;return window.pageYOffset+this.clientY-__getLocation(this.srcElement).y;});w.HTMLElement.prototype.__defineGetter__('parentElement',function(){ULSh2q:;return this.parentNode;});w.HTMLElement.prototype.__defineGetter__('children',function(){ULSh2q:;var children=[];var childCount=this.childNodes.length;for(var i=0;i<childCount;i++){var childNode=this.childNodes[i];if(childNode.nodeType==1){children.push(childNode);}} return children;});w.HTMLElement.prototype.__defineGetter__('innerText',function(){ULSh2q:;try{return this.textContent} catch(ex){var text='';for(var i=0;i<this.childNodes.length;i++){if(this.childNodes[i].nodeType==3){text+=this.childNodes[i].textContent;}} return str;}});w.HTMLElement.prototype.__defineSetter__('innerText',function(v){ULSh2q:;var textNode=document.createTextNode(v);this.innerHTML='';this.appendChild(textNode);});w.HTMLElement.prototype.__defineGetter__('currentStyle',function(){ULSh2q:;return window.getComputedStyle(this,null);});w.HTMLElement.prototype.__defineGetter__('runtimeStyle',function(){ULSh2q:;return window.getOverrideStyle(this,null);});w.HTMLElement.prototype.removeNode=function(b){ULSh2q:;return this.parentNode.removeChild(this)};w.HTMLElement.prototype.contains=function(el){ULSh2q:;while(el!=null&&el!=this){el=el.parentNode;} return(el!=null)};w.HTMLStyleElement.prototype.__defineGetter__('styleSheet',function(){ULSh2q:;return this.sheet;});w.CSSStyleSheet.prototype.__defineGetter__('rules',function(){ULSh2q:;return this.cssRules;});w.CSSStyleSheet.prototype.addRule=function(selector,style,index){ULSh2q:;this.insertRule(selector+'{'+style+'}',index);};w.CSSStyleSheet.prototype.removeRule=function(index){ULSh2q:;this.deleteRule(index);};w.CSSStyleDeclaration.prototype.__defineGetter__('styleFloat',function(){ULSh2q:;return this.cssFloat;});w.CSSStyleDeclaration.prototype.__defineSetter__('styleFloat',function(v){ULSh2q:;this.cssFloat=v;});DocumentFragment.prototype.getElementById=function(id){ULSh2q:;var nodeQueue=[];var childNodes=this.childNodes;var node;var c;for(c=0;c<childNodes.length;c++){node=childNodes[c];if(node.nodeType==1){nodeQueue.push(node);}} while(nodeQueue.length){node=nodeQueue.dequeue();if(node.id==id){return node;} childNodes=node.childNodes;if(childNodes.length!=0){for(c=0;c<childNodes.length;c++){node=childNodes[c];if(node.nodeType==1){nodeQueue.push(node);}}}} return null;};DocumentFragment.prototype.getElementsByTagName=function(tagName){ULSh2q:;var elements=[];var nodeQueue=[];var childNodes=this.childNodes;var node;var c;for(c=0;c<childNodes.length;c++){node=childNodes[c];if(node.nodeType==1){nodeQueue.push(node);}} while(nodeQueue.length){node=nodeQueue.dequeue();if(node.tagName==tagName){elements.add(node);} childNodes=node.childNodes;if(childNodes.length!=0){for(c=0;c<childNodes.length;c++){node=childNodes[c];if(node.nodeType==1){nodeQueue.push(node);}}}} return elements;};DocumentFragment.prototype.createElement=function(tagName){ULSh2q:;return document.createElement(tagName);};var selectNodes=function(doc,path,contextNode){ULSh2q:;contextNode=contextNode?contextNode:doc;var xpath=new XPathEvaluator();var result=xpath.evaluate(path,contextNode,doc.createNSResolver(doc.documentElement),XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);var nodeList=new Array(result.snapshotLength);for(var i=0;i<result.snapshotLength;i++){nodeList[i]=result.snapshotItem(i);} return nodeList;};var selectSingleNode=function(doc,path,contextNode){ULSh2q:;path+='[1]';var nodes=selectNodes(doc,path,contextNode);if(nodes.length!=0){for(var i=0;i<nodes.length;i++){if(nodes[i]){return nodes[i];}}} return null;};w.XMLDocument.prototype.selectNodes=function(path,contextNode){ULSh2q:;return selectNodes(this,path,contextNode);};w.XMLDocument.prototype.selectSingleNode=function(path,contextNode){ULSh2q:;return selectSingleNode(this,path,contextNode);};w.XMLDocument.prototype.transformNode=function(xsl){ULSh2q:;var xslProcessor=new XSLTProcessor();xslProcessor.importStylesheet(xsl);var ownerDocument=document.implementation.createDocument(\"\",\"\",null);var transformedDoc=xslProcessor.transformToDocument(this);return transformedDoc.xml;};Node.prototype.selectNodes=function(path){ULSh2q:;var doc=this.ownerDocument;return doc.selectNodes(path,this);};Node.prototype.selectSingleNode=function(path){ULSh2q:;var doc=this.ownerDocument;return doc.selectSingleNode(path,this);};Node.prototype.__defineGetter__('baseName',function(){ULSh2q:;return this.localName;});Node.prototype.__defineGetter__('text',function(){ULSh2q:;return this.textContent;});Node.prototype.__defineSetter__('text',function(value){ULSh2q:;this.textContent=value;});Node.prototype.__defineGetter__('xml',function(){ULSh2q:;return(new XMLSerializer()).serializeToString(this);});}", "title": "" }, { "docid": "1794ef0bec3c2c42c1b9cc5f686d71c5", "score": "0.51913697", "text": "function ze(a){var b;D&&(b=a.Xf());var c=ec(\"xml\");a=$c(a,!0);for(var d=0,e;e=a[d];d++){var h=Ae(e);e=e.Sa();h.setAttribute(\"x\",D?b-e.x:e.x);h.setAttribute(\"y\",e.y);c.appendChild(h)}return c}", "title": "" }, { "docid": "9e4a5ed0d01a5fda2759f41c6bed507d", "score": "0.518942", "text": "function ws_rotate(i,h,a){var d=jQuery;var g=d(this);var e=d(\".ws_list\",a);var b={position:\"absolute\",left:0,top:0};var f=d(\"<div>\").addClass(\"ws_effect ws_rotate\").css(b).css({height:\"100%\",width:\"100%\",overflow:\"hidden\"}).appendTo(a);var c;this.go=function(j,k){var m=d(h[0]);m={width:m.width(),height:m.height(),marginTop:parseFloat(m.css(\"marginTop\")),marginLeft:parseFloat(m.css(\"marginLeft\")),maxHeight:\"none\",maxWidth:\"none\",};if(c){c.stop(true,true)}c=d(h.get(j)).clone().css(b).css(m).appendTo(f);if(!i.noCross){var l=d(h.get(k)).clone().css(b).css(m).appendTo(f);wowAnimate(l,{opacity:1,rotate:0,scale:1},{opacity:0,rotate:i.rotateOut||180,scale:i.scaleOut||10},i.duration,\"easeInOutExpo\",function(){l.remove()})}wowAnimate(c,{opacity:1,rotate:-(i.rotateIn||180),scale:i.scaleIn||10},{opacity:1,rotate:0,scale:1},i.duration,\"easeInOutExpo\",function(){c.remove();c=0;g.trigger(\"effectEnd\")})}}", "title": "" }, { "docid": "9e4a5ed0d01a5fda2759f41c6bed507d", "score": "0.518942", "text": "function ws_rotate(i,h,a){var d=jQuery;var g=d(this);var e=d(\".ws_list\",a);var b={position:\"absolute\",left:0,top:0};var f=d(\"<div>\").addClass(\"ws_effect ws_rotate\").css(b).css({height:\"100%\",width:\"100%\",overflow:\"hidden\"}).appendTo(a);var c;this.go=function(j,k){var m=d(h[0]);m={width:m.width(),height:m.height(),marginTop:parseFloat(m.css(\"marginTop\")),marginLeft:parseFloat(m.css(\"marginLeft\")),maxHeight:\"none\",maxWidth:\"none\",};if(c){c.stop(true,true)}c=d(h.get(j)).clone().css(b).css(m).appendTo(f);if(!i.noCross){var l=d(h.get(k)).clone().css(b).css(m).appendTo(f);wowAnimate(l,{opacity:1,rotate:0,scale:1},{opacity:0,rotate:i.rotateOut||180,scale:i.scaleOut||10},i.duration,\"easeInOutExpo\",function(){l.remove()})}wowAnimate(c,{opacity:1,rotate:-(i.rotateIn||180),scale:i.scaleIn||10},{opacity:1,rotate:0,scale:1},i.duration,\"easeInOutExpo\",function(){c.remove();c=0;g.trigger(\"effectEnd\")})}}", "title": "" }, { "docid": "9e4a5ed0d01a5fda2759f41c6bed507d", "score": "0.518942", "text": "function ws_rotate(i,h,a){var d=jQuery;var g=d(this);var e=d(\".ws_list\",a);var b={position:\"absolute\",left:0,top:0};var f=d(\"<div>\").addClass(\"ws_effect ws_rotate\").css(b).css({height:\"100%\",width:\"100%\",overflow:\"hidden\"}).appendTo(a);var c;this.go=function(j,k){var m=d(h[0]);m={width:m.width(),height:m.height(),marginTop:parseFloat(m.css(\"marginTop\")),marginLeft:parseFloat(m.css(\"marginLeft\")),maxHeight:\"none\",maxWidth:\"none\",};if(c){c.stop(true,true)}c=d(h.get(j)).clone().css(b).css(m).appendTo(f);if(!i.noCross){var l=d(h.get(k)).clone().css(b).css(m).appendTo(f);wowAnimate(l,{opacity:1,rotate:0,scale:1},{opacity:0,rotate:i.rotateOut||180,scale:i.scaleOut||10},i.duration,\"easeInOutExpo\",function(){l.remove()})}wowAnimate(c,{opacity:1,rotate:-(i.rotateIn||180),scale:i.scaleIn||10},{opacity:1,rotate:0,scale:1},i.duration,\"easeInOutExpo\",function(){c.remove();c=0;g.trigger(\"effectEnd\")})}}", "title": "" }, { "docid": "1cd379abede472d57315c1a2c55dfe11", "score": "0.5172329", "text": "function ws_book(e,t,i){function s(t,i,s,n,a,o,r,d,c,h,l){numSlices=a/2,widthScale=a/c,heightScale=(1-o)/numSlices,t.clearRect(0,0,l.width(),l.height());for(var p=0;numSlices+widthScale>p;p++){var g=r?p*e.width/a+e.width/2:(numSlices-p)*e.width/a,f=s+(r?2:-2)*p,u=n+h*heightScale*p/2;0>g&&(g=0),0>f&&(f=0),0>u&&(u=0),t.drawImage(i,g,0,2.5,e.height,f,u,2,h*(1-heightScale*p))}t.save(),t.beginPath(),t.moveTo(s,n),t.lineTo(s+(r?2:-2)*(numSlices+widthScale),n+h*heightScale*(numSlices+widthScale)/2),t.lineTo(s+(r?2:-2)*(numSlices+widthScale),h*(1-heightScale*(numSlices+widthScale))+n+h*heightScale*(numSlices+widthScale)/2),t.lineTo(s,n+h),t.closePath(),t.clip(),t.fillStyle=\"rgba(0,0,0,\"+Math.round(100*d)/100+\")\",t.fillRect(0,0,l.width(),l.height()),t.restore()}function n(e,t,i,n,a,o,r,d,f,u,m,v){if(g){if(!e){t*=-1;var w=n;n=i,i=w,w=o,o=a,a=w}setTimeout(function(){i.children(\"img\").css(\"opacity\",l).animate({opacity:1},c/2),a.css(\"transform\",\"rotateY(\"+t+\"deg)\").children(\"img\").css(\"opacity\",1).animate({opacity:l},c/2,function(){a.hide(),o.show().css(\"transform\",\"rotateY(0deg)\").children(\"img\").css(\"opacity\",l).animate({opacity:1},c/2),n.children(\"img\").css(\"opacity\",1).animate({opacity:l},c/2)})},0)}else if(p){r.show();var y=new Date,b=!0,S=setInterval(function(){var t=(new Date-y)/c;t>1&&(t=1);var p=jQuery.easing.easeInOutQuint(1,t,0,1,1),g=jQuery.easing.easeInOutCubic(1,t,0,1,1),m=!e;if(.5>t){p*=2,g*=2;var v=a}else{m=e,p=2*(1-p),g=2*(1-g);var v=o}var w=r.height()*h/2,T=(1-p)*r.width()/2,x=1+g*h,C=r.width()/2;s(i,v,C,w,T,x,m,g*l,C,r.height(),d),b&&(u.show(),b=!1),n.clearRect(0,0,f.width(),f.height()),n.fillStyle=\"rgba(0,0,0,\"+(l-g*l)+\")\",n.fillRect(m?C:0,0,f.width()/2,f.height()),1==t&&clearInterval(S)},15)}setTimeout(v,c)}var a=jQuery,o=a(this),r=a(\".ws_list\",i);i=i.parent();var d=a(\"<div>\").addClass(\"ws_effect\").css({position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",overflow:e.responsive>1?\"hidden\":\"visible\"}).appendTo(i),c=e.duration,h=e.perspective||.4,l=e.shadow||.35,p=e.noCanvas||!1,g=e.no3d||!1,f={domPrefixes:\" Webkit Moz ms O Khtml\".split(\" \"),testDom:function(e){for(var t=this.domPrefixes.length;t--;)if(\"undefined\"!=typeof document.body.style[this.domPrefixes[t]+e])return!0;return!1},cssTransitions:function(){return this.testDom(\"Transition\")},cssTransforms3d:function(){var e=\"undefined\"!=typeof document.body.style.perspectiveProperty||this.testDom(\"Perspective\");if(e&&/AppleWebKit/.test(navigator.userAgent)){var t=document.createElement(\"div\"),i=document.createElement(\"style\"),s=\"Test3d\"+Math.round(99999*Math.random());i.textContent=\"@media (-webkit-transform-3d){#\"+s+\"{height:3px}}\",document.getElementsByTagName(\"head\")[0].appendChild(i),t.id=s,document.body.appendChild(t),e=3===t.offsetHeight,i.parentNode.removeChild(i),t.parentNode.removeChild(t)}return e},canvas:function(){return\"undefined\"!=typeof document.createElement(\"canvas\").getContext?!0:void 0}};g||(g=f.cssTransitions()&&f.cssTransforms3d()),p||(p=f.canvas());var u;this.go=function(e,s){if(u)return-1;var l=0==s&&e!=s+1||e==s-1,f=t.get(e),m=t.get(s),v=a(\"<div>\").appendTo(d),w=a(f);if(w={width:w.width(),height:w.height(),marginLeft:parseFloat(w.css(\"marginLeft\")),marginTop:parseFloat(w.css(\"marginTop\"))},g){var y={backgroundColor:\"#000\",position:\"absolute\",left:0,top:0,width:\"100%\",height:\"100%\",transformStyle:\"preserve-3d\",zIndex:3,outline:\"1px solid transparent\"};perspect=i.width()*(3-2*h),v.css(y).css(\"perspective\",perspect);var b=90,S=a(\"<div>\").css(y).css({position:\"relative\",background:\"#000\",\"float\":\"left\",width:\"50%\",overflow:\"hidden\"}).append(a(\"<img>\").attr(\"src\",(l?f:m).src).css(w)).appendTo(v),T=a(\"<div>\").css(y).css({position:\"relative\",background:\"#000\",\"float\":\"left\",width:\"50%\",overflow:\"hidden\"}).append(a(\"<img>\").attr(\"src\",(l?m:f).src).css(w).css({marginLeft:-w.width/2})).appendTo(v),x=a(\"<div>\").css(y).css({display:l?\"block\":\"none\",position:\"absolute\",background:\"#000\",left:0,top:0,width:\"50%\",height:\"100%\",transform:\"rotateY(\"+(l?.1:b)+\"deg)\",transition:(l?\"ease-in \":\"ease-out \")+c/2e3+\"s\",transformOrigin:\"right\",overflow:\"hidden\"}).append(a(\"<img>\").attr(\"src\",(l?m:f).src).css(w)).appendTo(v),C=a(\"<div>\").css(y).css({display:l?\"none\":\"block\",position:\"absolute\",background:\"#000\",left:\"50%\",top:0,width:\"50%\",height:\"100%\",transform:\"rotateY(-\"+(l?b:.1)+\"deg)\",transition:(l?\"ease-out \":\"ease-in \")+c/2e3+\"s\",transformOrigin:\"left\",overflow:\"hidden\"}).append(a(\"<img>\").attr(\"src\",(l?f:m).src).css(w).css({marginLeft:-w.width/2})).appendTo(v)}else if(p)var I=a(\"<div>\").css({position:\"absolute\",top:0,left:l?0:\"50%\",width:\"50%\",height:\"100%\",overflow:\"hidden\",zIndex:6}).append(a(t.get(e)).clone().css({position:\"absolute\",height:\"100%\",right:l?\"auto\":0,left:l?0:\"auto\"})).appendTo(v).hide(),k=a(\"<div>\").css({position:\"absolute\",width:\"100%\",height:\"100%\",left:0,top:0,zIndex:8}).appendTo(v).hide(),O=a(\"<canvas>\").css({position:\"absolute\",zIndex:2,left:0,top:-k.height()*h/2}).attr({width:k.width(),height:k.height()*(h+1)}).appendTo(k),P=O.clone().css({top:0,zIndex:1}).attr({width:k.width(),height:k.height()}).appendTo(k),Q=O.get(0).getContext(\"2d\"),z=P.get(0).getContext(\"2d\");else r.stop(!0).animate({left:e?-e+\"00%\":/Safari/.test(navigator.userAgent)?\"0%\":0},c,\"easeInOutExpo\");if(!g&&p)var S=Q,T=z,x=m,C=f;u=new n(l,b,S,T,x,C,k,O,P,I,w,function(){o.trigger(\"effectEnd\"),v.remove(),u=0})}}", "title": "" }, { "docid": "7f0220ed4d38f2848e4b400ecc55d16e", "score": "0.5126811", "text": "function ws_book(p,n,b){var f=jQuery;var m=f(this);var i=f(\".ws_list\",b);var k=f(\"<div>\").addClass(\"ws_effect ws_book\").css({position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\"}).appendTo(b),e=p.duration,d=p.perspective||0.4,g=p.shadow||0.35,a=p.noCanvas||false,l=p.no3d||false;var o={domPrefixes:\" Webkit Moz ms O Khtml\".split(\" \"),testDom:function(r){var q=this.domPrefixes.length;while(q--){if(typeof document.body.style[this.domPrefixes[q]+r]!==\"undefined\"){return true}}return false},cssTransitions:function(){return this.testDom(\"Transition\")},cssTransforms3d:function(){var r=(typeof document.body.style.perspectiveProperty!==\"undefined\")||this.testDom(\"Perspective\");if(r&&/AppleWebKit/.test(navigator.userAgent)){var t=document.createElement(\"div\"),q=document.createElement(\"style\"),s=\"Test3d\"+Math.round(Math.random()*99999);q.textContent=\"@media (-webkit-transform-3d){#\"+s+\"{height:3px}}\";document.getElementsByTagName(\"head\")[0].appendChild(q);t.id=s;document.body.appendChild(t);r=t.offsetHeight===3;q.parentNode.removeChild(q);t.parentNode.removeChild(t)}return r},canvas:function(){if(typeof document.createElement(\"canvas\").getContext!==\"undefined\"){return true}}};if(!l){l=o.cssTransitions()&&o.cssTransforms3d()}if(!a){a=o.canvas()}var j;this.go=function(r,q,E){if(j){return -1}var v=n.get(r),G=n.get(q);if(E==undefined){E=(q==0&&r!=q+1)||(r==q-1)}else{E=!E}var s=f(\"<div>\").appendTo(k);var t=f(v);t={width:t.width(),height:t.height(),marginLeft:parseFloat(t.css(\"marginLeft\")),marginTop:parseFloat(t.css(\"marginTop\"))};if(l){var y={background:\"#000\",position:\"absolute\",left:0,top:0,width:\"100%\",height:\"100%\",transformStyle:\"preserve-3d\",zIndex:3,outline:\"1px solid transparent\"};perspect=b.width()*(3-d*2);s.css(y).css({perspective:perspect,transform:\"translate3d(0,0,0)\"});var z=90;var D=f(\"<div>\").css(y).css({position:\"relative\",\"float\":\"left\",width:\"50%\",overflow:\"hidden\"}).append(f(\"<img>\").attr(\"src\",(E?v:G).src).css(t)).appendTo(s);var C=f(\"<div>\").css(y).css({position:\"relative\",\"float\":\"left\",width:\"50%\",overflow:\"hidden\"}).append(f(\"<img>\").attr(\"src\",(E?G:v).src).css(t).css({marginLeft:-t.width/2})).appendTo(s);var I=f(\"<div>\").css(y).css({display:E?\"block\":\"none\",width:\"50%\",transform:\"rotateY(\"+(E?0.1:z)+\"deg)\",transition:(E?\"ease-in \":\"ease-out \")+e/2000+\"s\",transformOrigin:\"right\",overflow:\"hidden\"}).append(f(\"<img>\").attr(\"src\",(E?G:v).src).css(t)).appendTo(s);var F=f(\"<div>\").css(y).css({display:E?\"none\":\"block\",left:\"50%\",width:\"50%\",transform:\"rotateY(-\"+(E?z:0.1)+\"deg)\",transition:(E?\"ease-out \":\"ease-in \")+e/2000+\"s\",transformOrigin:\"left\",overflow:\"hidden\"}).append(f(\"<img>\").attr(\"src\",(E?v:G).src).css(t).css({marginLeft:-t.width/2})).appendTo(s)}else{if(a){var x=f(\"<div>\").css({position:\"absolute\",top:0,left:E?0:\"50%\",width:\"50%\",height:\"100%\",overflow:\"hidden\",zIndex:6}).append(f(n.get(r)).clone().css({position:\"absolute\",height:\"100%\",right:E?\"auto\":0,left:E?0:\"auto\"})).appendTo(s).hide();var B=f(\"<div>\").css({position:\"absolute\",width:\"100%\",height:\"100%\",left:0,top:0,zIndex:8}).appendTo(s).hide();var H=f(\"<canvas>\").css({position:\"absolute\",zIndex:2,left:0,top:-B.height()*d/2}).attr({width:B.width(),height:B.height()*(d+1)}).appendTo(B);var A=H.clone().css({top:0,zIndex:1}).attr({width:B.width(),height:B.height()}).appendTo(B);var w=H.get(0).getContext(\"2d\");var u=A.get(0).getContext(\"2d\")}else{i.stop(true).animate({left:(r?-r+\"00%\":(/Safari/.test(navigator.userAgent)?\"0%\":0))},e,\"easeInOutExpo\")}}if(!l&&a){var D=w;var C=u;var I=G;var F=v}j=new h(E,z,D,C,I,F,B,H,A,x,t,function(){m.trigger(\"effectEnd\");s.remove();j=0})};function c(G,s,A,v,u,E,D,C,B,t,r){numSlices=u/2,widthScale=u/B,heightScale=(1-E)/numSlices;G.clearRect(0,0,r.width(),r.height());for(var q=0;q<numSlices+widthScale;q++){var z=(D?q*p.width/u+p.width/2:(numSlices-q)*p.width/u);var H=A+(D?2:-2)*q,F=v+t*heightScale*q/2;if(z<0){z=0}if(H<0){H=0}if(F<0){F=0}G.drawImage(s,z,0,2.5,p.height,H,F,2,t*(1-(heightScale*q)))}G.save();G.beginPath();G.moveTo(A,v);G.lineTo(A+(D?2:-2)*(numSlices+widthScale),v+t*heightScale*(numSlices+widthScale)/2);G.lineTo(A+(D?2:-2)*(numSlices+widthScale),t*(1-heightScale*(numSlices+widthScale))+v+t*heightScale*(numSlices+widthScale)/2);G.lineTo(A,v+t);G.closePath();G.clip();G.fillStyle=\"rgba(0,0,0,\"+Math.round(C*100)/100+\")\";G.fillRect(0,0,r.width(),r.height());G.restore()}function h(A,r,C,B,y,x,v,w,u,z,t,E){if(l){if(!A){r*=-1;var D=B;B=C;C=D;D=x;x=y;y=D}setTimeout(function(){C.children(\"img\").css(\"opacity\",g).animate({opacity:1},e/2);y.css(\"transform\",\"rotateY(\"+r+\"deg)\").children(\"img\").css(\"opacity\",1).animate({opacity:g},e/2,function(){y.hide();x.show().css(\"transform\",\"rotateX(0deg) rotateY(0deg)\").children(\"img\").css(\"opacity\",g).animate({opacity:1},e/2);B.children(\"img\").css(\"opacity\",1).animate({opacity:g},e/2)})},0);setTimeout(E,e)}else{if(a){v.show();var q=new Date;var s=true;wowAnimate(function(F){var I=jQuery.easing.easeInOutQuint(1,F,0,1,1),H=jQuery.easing.easeInOutCubic(1,F,0,1,1),L=!A;if(F<0.5){I*=2;H*=2;var G=y}else{L=A;I=(1-I)*2;H=(1-H)*2;var G=x}var J=v.height()*d/2,N=(1-I)*v.width()/2,M=1+H*d,K=v.width()/2;c(C,G,K,J,N,M,L,H*g,K,v.height(),w);if(s){z.show();s=false}B.clearRect(0,0,u.width(),u.height());B.fillStyle=\"rgba(0,0,0,\"+(g-H*g)+\")\";B.fillRect(L?K:0,0,u.width()/2,u.height())},0,1,e,E)}}}}", "title": "" }, { "docid": "7f0220ed4d38f2848e4b400ecc55d16e", "score": "0.5126811", "text": "function ws_book(p,n,b){var f=jQuery;var m=f(this);var i=f(\".ws_list\",b);var k=f(\"<div>\").addClass(\"ws_effect ws_book\").css({position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\"}).appendTo(b),e=p.duration,d=p.perspective||0.4,g=p.shadow||0.35,a=p.noCanvas||false,l=p.no3d||false;var o={domPrefixes:\" Webkit Moz ms O Khtml\".split(\" \"),testDom:function(r){var q=this.domPrefixes.length;while(q--){if(typeof document.body.style[this.domPrefixes[q]+r]!==\"undefined\"){return true}}return false},cssTransitions:function(){return this.testDom(\"Transition\")},cssTransforms3d:function(){var r=(typeof document.body.style.perspectiveProperty!==\"undefined\")||this.testDom(\"Perspective\");if(r&&/AppleWebKit/.test(navigator.userAgent)){var t=document.createElement(\"div\"),q=document.createElement(\"style\"),s=\"Test3d\"+Math.round(Math.random()*99999);q.textContent=\"@media (-webkit-transform-3d){#\"+s+\"{height:3px}}\";document.getElementsByTagName(\"head\")[0].appendChild(q);t.id=s;document.body.appendChild(t);r=t.offsetHeight===3;q.parentNode.removeChild(q);t.parentNode.removeChild(t)}return r},canvas:function(){if(typeof document.createElement(\"canvas\").getContext!==\"undefined\"){return true}}};if(!l){l=o.cssTransitions()&&o.cssTransforms3d()}if(!a){a=o.canvas()}var j;this.go=function(r,q,E){if(j){return -1}var v=n.get(r),G=n.get(q);if(E==undefined){E=(q==0&&r!=q+1)||(r==q-1)}else{E=!E}var s=f(\"<div>\").appendTo(k);var t=f(v);t={width:t.width(),height:t.height(),marginLeft:parseFloat(t.css(\"marginLeft\")),marginTop:parseFloat(t.css(\"marginTop\"))};if(l){var y={background:\"#000\",position:\"absolute\",left:0,top:0,width:\"100%\",height:\"100%\",transformStyle:\"preserve-3d\",zIndex:3,outline:\"1px solid transparent\"};perspect=b.width()*(3-d*2);s.css(y).css({perspective:perspect,transform:\"translate3d(0,0,0)\"});var z=90;var D=f(\"<div>\").css(y).css({position:\"relative\",\"float\":\"left\",width:\"50%\",overflow:\"hidden\"}).append(f(\"<img>\").attr(\"src\",(E?v:G).src).css(t)).appendTo(s);var C=f(\"<div>\").css(y).css({position:\"relative\",\"float\":\"left\",width:\"50%\",overflow:\"hidden\"}).append(f(\"<img>\").attr(\"src\",(E?G:v).src).css(t).css({marginLeft:-t.width/2})).appendTo(s);var I=f(\"<div>\").css(y).css({display:E?\"block\":\"none\",width:\"50%\",transform:\"rotateY(\"+(E?0.1:z)+\"deg)\",transition:(E?\"ease-in \":\"ease-out \")+e/2000+\"s\",transformOrigin:\"right\",overflow:\"hidden\"}).append(f(\"<img>\").attr(\"src\",(E?G:v).src).css(t)).appendTo(s);var F=f(\"<div>\").css(y).css({display:E?\"none\":\"block\",left:\"50%\",width:\"50%\",transform:\"rotateY(-\"+(E?z:0.1)+\"deg)\",transition:(E?\"ease-out \":\"ease-in \")+e/2000+\"s\",transformOrigin:\"left\",overflow:\"hidden\"}).append(f(\"<img>\").attr(\"src\",(E?v:G).src).css(t).css({marginLeft:-t.width/2})).appendTo(s)}else{if(a){var x=f(\"<div>\").css({position:\"absolute\",top:0,left:E?0:\"50%\",width:\"50%\",height:\"100%\",overflow:\"hidden\",zIndex:6}).append(f(n.get(r)).clone().css({position:\"absolute\",height:\"100%\",right:E?\"auto\":0,left:E?0:\"auto\"})).appendTo(s).hide();var B=f(\"<div>\").css({position:\"absolute\",width:\"100%\",height:\"100%\",left:0,top:0,zIndex:8}).appendTo(s).hide();var H=f(\"<canvas>\").css({position:\"absolute\",zIndex:2,left:0,top:-B.height()*d/2}).attr({width:B.width(),height:B.height()*(d+1)}).appendTo(B);var A=H.clone().css({top:0,zIndex:1}).attr({width:B.width(),height:B.height()}).appendTo(B);var w=H.get(0).getContext(\"2d\");var u=A.get(0).getContext(\"2d\")}else{i.stop(true).animate({left:(r?-r+\"00%\":(/Safari/.test(navigator.userAgent)?\"0%\":0))},e,\"easeInOutExpo\")}}if(!l&&a){var D=w;var C=u;var I=G;var F=v}j=new h(E,z,D,C,I,F,B,H,A,x,t,function(){m.trigger(\"effectEnd\");s.remove();j=0})};function c(G,s,A,v,u,E,D,C,B,t,r){numSlices=u/2,widthScale=u/B,heightScale=(1-E)/numSlices;G.clearRect(0,0,r.width(),r.height());for(var q=0;q<numSlices+widthScale;q++){var z=(D?q*p.width/u+p.width/2:(numSlices-q)*p.width/u);var H=A+(D?2:-2)*q,F=v+t*heightScale*q/2;if(z<0){z=0}if(H<0){H=0}if(F<0){F=0}G.drawImage(s,z,0,2.5,p.height,H,F,2,t*(1-(heightScale*q)))}G.save();G.beginPath();G.moveTo(A,v);G.lineTo(A+(D?2:-2)*(numSlices+widthScale),v+t*heightScale*(numSlices+widthScale)/2);G.lineTo(A+(D?2:-2)*(numSlices+widthScale),t*(1-heightScale*(numSlices+widthScale))+v+t*heightScale*(numSlices+widthScale)/2);G.lineTo(A,v+t);G.closePath();G.clip();G.fillStyle=\"rgba(0,0,0,\"+Math.round(C*100)/100+\")\";G.fillRect(0,0,r.width(),r.height());G.restore()}function h(A,r,C,B,y,x,v,w,u,z,t,E){if(l){if(!A){r*=-1;var D=B;B=C;C=D;D=x;x=y;y=D}setTimeout(function(){C.children(\"img\").css(\"opacity\",g).animate({opacity:1},e/2);y.css(\"transform\",\"rotateY(\"+r+\"deg)\").children(\"img\").css(\"opacity\",1).animate({opacity:g},e/2,function(){y.hide();x.show().css(\"transform\",\"rotateX(0deg) rotateY(0deg)\").children(\"img\").css(\"opacity\",g).animate({opacity:1},e/2);B.children(\"img\").css(\"opacity\",1).animate({opacity:g},e/2)})},0);setTimeout(E,e)}else{if(a){v.show();var q=new Date;var s=true;wowAnimate(function(F){var I=jQuery.easing.easeInOutQuint(1,F,0,1,1),H=jQuery.easing.easeInOutCubic(1,F,0,1,1),L=!A;if(F<0.5){I*=2;H*=2;var G=y}else{L=A;I=(1-I)*2;H=(1-H)*2;var G=x}var J=v.height()*d/2,N=(1-I)*v.width()/2,M=1+H*d,K=v.width()/2;c(C,G,K,J,N,M,L,H*g,K,v.height(),w);if(s){z.show();s=false}B.clearRect(0,0,u.width(),u.height());B.fillStyle=\"rgba(0,0,0,\"+(g-H*g)+\")\";B.fillRect(L?K:0,0,u.width()/2,u.height())},0,1,e,E)}}}}", "title": "" }, { "docid": "7f0220ed4d38f2848e4b400ecc55d16e", "score": "0.5126811", "text": "function ws_book(p,n,b){var f=jQuery;var m=f(this);var i=f(\".ws_list\",b);var k=f(\"<div>\").addClass(\"ws_effect ws_book\").css({position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\"}).appendTo(b),e=p.duration,d=p.perspective||0.4,g=p.shadow||0.35,a=p.noCanvas||false,l=p.no3d||false;var o={domPrefixes:\" Webkit Moz ms O Khtml\".split(\" \"),testDom:function(r){var q=this.domPrefixes.length;while(q--){if(typeof document.body.style[this.domPrefixes[q]+r]!==\"undefined\"){return true}}return false},cssTransitions:function(){return this.testDom(\"Transition\")},cssTransforms3d:function(){var r=(typeof document.body.style.perspectiveProperty!==\"undefined\")||this.testDom(\"Perspective\");if(r&&/AppleWebKit/.test(navigator.userAgent)){var t=document.createElement(\"div\"),q=document.createElement(\"style\"),s=\"Test3d\"+Math.round(Math.random()*99999);q.textContent=\"@media (-webkit-transform-3d){#\"+s+\"{height:3px}}\";document.getElementsByTagName(\"head\")[0].appendChild(q);t.id=s;document.body.appendChild(t);r=t.offsetHeight===3;q.parentNode.removeChild(q);t.parentNode.removeChild(t)}return r},canvas:function(){if(typeof document.createElement(\"canvas\").getContext!==\"undefined\"){return true}}};if(!l){l=o.cssTransitions()&&o.cssTransforms3d()}if(!a){a=o.canvas()}var j;this.go=function(r,q,E){if(j){return -1}var v=n.get(r),G=n.get(q);if(E==undefined){E=(q==0&&r!=q+1)||(r==q-1)}else{E=!E}var s=f(\"<div>\").appendTo(k);var t=f(v);t={width:t.width(),height:t.height(),marginLeft:parseFloat(t.css(\"marginLeft\")),marginTop:parseFloat(t.css(\"marginTop\"))};if(l){var y={background:\"#000\",position:\"absolute\",left:0,top:0,width:\"100%\",height:\"100%\",transformStyle:\"preserve-3d\",zIndex:3,outline:\"1px solid transparent\"};perspect=b.width()*(3-d*2);s.css(y).css({perspective:perspect,transform:\"translate3d(0,0,0)\"});var z=90;var D=f(\"<div>\").css(y).css({position:\"relative\",\"float\":\"left\",width:\"50%\",overflow:\"hidden\"}).append(f(\"<img>\").attr(\"src\",(E?v:G).src).css(t)).appendTo(s);var C=f(\"<div>\").css(y).css({position:\"relative\",\"float\":\"left\",width:\"50%\",overflow:\"hidden\"}).append(f(\"<img>\").attr(\"src\",(E?G:v).src).css(t).css({marginLeft:-t.width/2})).appendTo(s);var I=f(\"<div>\").css(y).css({display:E?\"block\":\"none\",width:\"50%\",transform:\"rotateY(\"+(E?0.1:z)+\"deg)\",transition:(E?\"ease-in \":\"ease-out \")+e/2000+\"s\",transformOrigin:\"right\",overflow:\"hidden\"}).append(f(\"<img>\").attr(\"src\",(E?G:v).src).css(t)).appendTo(s);var F=f(\"<div>\").css(y).css({display:E?\"none\":\"block\",left:\"50%\",width:\"50%\",transform:\"rotateY(-\"+(E?z:0.1)+\"deg)\",transition:(E?\"ease-out \":\"ease-in \")+e/2000+\"s\",transformOrigin:\"left\",overflow:\"hidden\"}).append(f(\"<img>\").attr(\"src\",(E?v:G).src).css(t).css({marginLeft:-t.width/2})).appendTo(s)}else{if(a){var x=f(\"<div>\").css({position:\"absolute\",top:0,left:E?0:\"50%\",width:\"50%\",height:\"100%\",overflow:\"hidden\",zIndex:6}).append(f(n.get(r)).clone().css({position:\"absolute\",height:\"100%\",right:E?\"auto\":0,left:E?0:\"auto\"})).appendTo(s).hide();var B=f(\"<div>\").css({position:\"absolute\",width:\"100%\",height:\"100%\",left:0,top:0,zIndex:8}).appendTo(s).hide();var H=f(\"<canvas>\").css({position:\"absolute\",zIndex:2,left:0,top:-B.height()*d/2}).attr({width:B.width(),height:B.height()*(d+1)}).appendTo(B);var A=H.clone().css({top:0,zIndex:1}).attr({width:B.width(),height:B.height()}).appendTo(B);var w=H.get(0).getContext(\"2d\");var u=A.get(0).getContext(\"2d\")}else{i.stop(true).animate({left:(r?-r+\"00%\":(/Safari/.test(navigator.userAgent)?\"0%\":0))},e,\"easeInOutExpo\")}}if(!l&&a){var D=w;var C=u;var I=G;var F=v}j=new h(E,z,D,C,I,F,B,H,A,x,t,function(){m.trigger(\"effectEnd\");s.remove();j=0})};function c(G,s,A,v,u,E,D,C,B,t,r){numSlices=u/2,widthScale=u/B,heightScale=(1-E)/numSlices;G.clearRect(0,0,r.width(),r.height());for(var q=0;q<numSlices+widthScale;q++){var z=(D?q*p.width/u+p.width/2:(numSlices-q)*p.width/u);var H=A+(D?2:-2)*q,F=v+t*heightScale*q/2;if(z<0){z=0}if(H<0){H=0}if(F<0){F=0}G.drawImage(s,z,0,2.5,p.height,H,F,2,t*(1-(heightScale*q)))}G.save();G.beginPath();G.moveTo(A,v);G.lineTo(A+(D?2:-2)*(numSlices+widthScale),v+t*heightScale*(numSlices+widthScale)/2);G.lineTo(A+(D?2:-2)*(numSlices+widthScale),t*(1-heightScale*(numSlices+widthScale))+v+t*heightScale*(numSlices+widthScale)/2);G.lineTo(A,v+t);G.closePath();G.clip();G.fillStyle=\"rgba(0,0,0,\"+Math.round(C*100)/100+\")\";G.fillRect(0,0,r.width(),r.height());G.restore()}function h(A,r,C,B,y,x,v,w,u,z,t,E){if(l){if(!A){r*=-1;var D=B;B=C;C=D;D=x;x=y;y=D}setTimeout(function(){C.children(\"img\").css(\"opacity\",g).animate({opacity:1},e/2);y.css(\"transform\",\"rotateY(\"+r+\"deg)\").children(\"img\").css(\"opacity\",1).animate({opacity:g},e/2,function(){y.hide();x.show().css(\"transform\",\"rotateX(0deg) rotateY(0deg)\").children(\"img\").css(\"opacity\",g).animate({opacity:1},e/2);B.children(\"img\").css(\"opacity\",1).animate({opacity:g},e/2)})},0);setTimeout(E,e)}else{if(a){v.show();var q=new Date;var s=true;wowAnimate(function(F){var I=jQuery.easing.easeInOutQuint(1,F,0,1,1),H=jQuery.easing.easeInOutCubic(1,F,0,1,1),L=!A;if(F<0.5){I*=2;H*=2;var G=y}else{L=A;I=(1-I)*2;H=(1-H)*2;var G=x}var J=v.height()*d/2,N=(1-I)*v.width()/2,M=1+H*d,K=v.width()/2;c(C,G,K,J,N,M,L,H*g,K,v.height(),w);if(s){z.show();s=false}B.clearRect(0,0,u.width(),u.height());B.fillStyle=\"rgba(0,0,0,\"+(g-H*g)+\")\";B.fillRect(L?K:0,0,u.width()/2,u.height())},0,1,e,E)}}}}", "title": "" }, { "docid": "7f0220ed4d38f2848e4b400ecc55d16e", "score": "0.5126811", "text": "function ws_book(p,n,b){var f=jQuery;var m=f(this);var i=f(\".ws_list\",b);var k=f(\"<div>\").addClass(\"ws_effect ws_book\").css({position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\"}).appendTo(b),e=p.duration,d=p.perspective||0.4,g=p.shadow||0.35,a=p.noCanvas||false,l=p.no3d||false;var o={domPrefixes:\" Webkit Moz ms O Khtml\".split(\" \"),testDom:function(r){var q=this.domPrefixes.length;while(q--){if(typeof document.body.style[this.domPrefixes[q]+r]!==\"undefined\"){return true}}return false},cssTransitions:function(){return this.testDom(\"Transition\")},cssTransforms3d:function(){var r=(typeof document.body.style.perspectiveProperty!==\"undefined\")||this.testDom(\"Perspective\");if(r&&/AppleWebKit/.test(navigator.userAgent)){var t=document.createElement(\"div\"),q=document.createElement(\"style\"),s=\"Test3d\"+Math.round(Math.random()*99999);q.textContent=\"@media (-webkit-transform-3d){#\"+s+\"{height:3px}}\";document.getElementsByTagName(\"head\")[0].appendChild(q);t.id=s;document.body.appendChild(t);r=t.offsetHeight===3;q.parentNode.removeChild(q);t.parentNode.removeChild(t)}return r},canvas:function(){if(typeof document.createElement(\"canvas\").getContext!==\"undefined\"){return true}}};if(!l){l=o.cssTransitions()&&o.cssTransforms3d()}if(!a){a=o.canvas()}var j;this.go=function(r,q,E){if(j){return -1}var v=n.get(r),G=n.get(q);if(E==undefined){E=(q==0&&r!=q+1)||(r==q-1)}else{E=!E}var s=f(\"<div>\").appendTo(k);var t=f(v);t={width:t.width(),height:t.height(),marginLeft:parseFloat(t.css(\"marginLeft\")),marginTop:parseFloat(t.css(\"marginTop\"))};if(l){var y={background:\"#000\",position:\"absolute\",left:0,top:0,width:\"100%\",height:\"100%\",transformStyle:\"preserve-3d\",zIndex:3,outline:\"1px solid transparent\"};perspect=b.width()*(3-d*2);s.css(y).css({perspective:perspect,transform:\"translate3d(0,0,0)\"});var z=90;var D=f(\"<div>\").css(y).css({position:\"relative\",\"float\":\"left\",width:\"50%\",overflow:\"hidden\"}).append(f(\"<img>\").attr(\"src\",(E?v:G).src).css(t)).appendTo(s);var C=f(\"<div>\").css(y).css({position:\"relative\",\"float\":\"left\",width:\"50%\",overflow:\"hidden\"}).append(f(\"<img>\").attr(\"src\",(E?G:v).src).css(t).css({marginLeft:-t.width/2})).appendTo(s);var I=f(\"<div>\").css(y).css({display:E?\"block\":\"none\",width:\"50%\",transform:\"rotateY(\"+(E?0.1:z)+\"deg)\",transition:(E?\"ease-in \":\"ease-out \")+e/2000+\"s\",transformOrigin:\"right\",overflow:\"hidden\"}).append(f(\"<img>\").attr(\"src\",(E?G:v).src).css(t)).appendTo(s);var F=f(\"<div>\").css(y).css({display:E?\"none\":\"block\",left:\"50%\",width:\"50%\",transform:\"rotateY(-\"+(E?z:0.1)+\"deg)\",transition:(E?\"ease-out \":\"ease-in \")+e/2000+\"s\",transformOrigin:\"left\",overflow:\"hidden\"}).append(f(\"<img>\").attr(\"src\",(E?v:G).src).css(t).css({marginLeft:-t.width/2})).appendTo(s)}else{if(a){var x=f(\"<div>\").css({position:\"absolute\",top:0,left:E?0:\"50%\",width:\"50%\",height:\"100%\",overflow:\"hidden\",zIndex:6}).append(f(n.get(r)).clone().css({position:\"absolute\",height:\"100%\",right:E?\"auto\":0,left:E?0:\"auto\"})).appendTo(s).hide();var B=f(\"<div>\").css({position:\"absolute\",width:\"100%\",height:\"100%\",left:0,top:0,zIndex:8}).appendTo(s).hide();var H=f(\"<canvas>\").css({position:\"absolute\",zIndex:2,left:0,top:-B.height()*d/2}).attr({width:B.width(),height:B.height()*(d+1)}).appendTo(B);var A=H.clone().css({top:0,zIndex:1}).attr({width:B.width(),height:B.height()}).appendTo(B);var w=H.get(0).getContext(\"2d\");var u=A.get(0).getContext(\"2d\")}else{i.stop(true).animate({left:(r?-r+\"00%\":(/Safari/.test(navigator.userAgent)?\"0%\":0))},e,\"easeInOutExpo\")}}if(!l&&a){var D=w;var C=u;var I=G;var F=v}j=new h(E,z,D,C,I,F,B,H,A,x,t,function(){m.trigger(\"effectEnd\");s.remove();j=0})};function c(G,s,A,v,u,E,D,C,B,t,r){numSlices=u/2,widthScale=u/B,heightScale=(1-E)/numSlices;G.clearRect(0,0,r.width(),r.height());for(var q=0;q<numSlices+widthScale;q++){var z=(D?q*p.width/u+p.width/2:(numSlices-q)*p.width/u);var H=A+(D?2:-2)*q,F=v+t*heightScale*q/2;if(z<0){z=0}if(H<0){H=0}if(F<0){F=0}G.drawImage(s,z,0,2.5,p.height,H,F,2,t*(1-(heightScale*q)))}G.save();G.beginPath();G.moveTo(A,v);G.lineTo(A+(D?2:-2)*(numSlices+widthScale),v+t*heightScale*(numSlices+widthScale)/2);G.lineTo(A+(D?2:-2)*(numSlices+widthScale),t*(1-heightScale*(numSlices+widthScale))+v+t*heightScale*(numSlices+widthScale)/2);G.lineTo(A,v+t);G.closePath();G.clip();G.fillStyle=\"rgba(0,0,0,\"+Math.round(C*100)/100+\")\";G.fillRect(0,0,r.width(),r.height());G.restore()}function h(A,r,C,B,y,x,v,w,u,z,t,E){if(l){if(!A){r*=-1;var D=B;B=C;C=D;D=x;x=y;y=D}setTimeout(function(){C.children(\"img\").css(\"opacity\",g).animate({opacity:1},e/2);y.css(\"transform\",\"rotateY(\"+r+\"deg)\").children(\"img\").css(\"opacity\",1).animate({opacity:g},e/2,function(){y.hide();x.show().css(\"transform\",\"rotateX(0deg) rotateY(0deg)\").children(\"img\").css(\"opacity\",g).animate({opacity:1},e/2);B.children(\"img\").css(\"opacity\",1).animate({opacity:g},e/2)})},0);setTimeout(E,e)}else{if(a){v.show();var q=new Date;var s=true;wowAnimate(function(F){var I=jQuery.easing.easeInOutQuint(1,F,0,1,1),H=jQuery.easing.easeInOutCubic(1,F,0,1,1),L=!A;if(F<0.5){I*=2;H*=2;var G=y}else{L=A;I=(1-I)*2;H=(1-H)*2;var G=x}var J=v.height()*d/2,N=(1-I)*v.width()/2,M=1+H*d,K=v.width()/2;c(C,G,K,J,N,M,L,H*g,K,v.height(),w);if(s){z.show();s=false}B.clearRect(0,0,u.width(),u.height());B.fillStyle=\"rgba(0,0,0,\"+(g-H*g)+\")\";B.fillRect(L?K:0,0,u.width()/2,u.height())},0,1,e,E)}}}}", "title": "" }, { "docid": "7f0220ed4d38f2848e4b400ecc55d16e", "score": "0.5126811", "text": "function ws_book(p,n,b){var f=jQuery;var m=f(this);var i=f(\".ws_list\",b);var k=f(\"<div>\").addClass(\"ws_effect ws_book\").css({position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\"}).appendTo(b),e=p.duration,d=p.perspective||0.4,g=p.shadow||0.35,a=p.noCanvas||false,l=p.no3d||false;var o={domPrefixes:\" Webkit Moz ms O Khtml\".split(\" \"),testDom:function(r){var q=this.domPrefixes.length;while(q--){if(typeof document.body.style[this.domPrefixes[q]+r]!==\"undefined\"){return true}}return false},cssTransitions:function(){return this.testDom(\"Transition\")},cssTransforms3d:function(){var r=(typeof document.body.style.perspectiveProperty!==\"undefined\")||this.testDom(\"Perspective\");if(r&&/AppleWebKit/.test(navigator.userAgent)){var t=document.createElement(\"div\"),q=document.createElement(\"style\"),s=\"Test3d\"+Math.round(Math.random()*99999);q.textContent=\"@media (-webkit-transform-3d){#\"+s+\"{height:3px}}\";document.getElementsByTagName(\"head\")[0].appendChild(q);t.id=s;document.body.appendChild(t);r=t.offsetHeight===3;q.parentNode.removeChild(q);t.parentNode.removeChild(t)}return r},canvas:function(){if(typeof document.createElement(\"canvas\").getContext!==\"undefined\"){return true}}};if(!l){l=o.cssTransitions()&&o.cssTransforms3d()}if(!a){a=o.canvas()}var j;this.go=function(r,q,E){if(j){return -1}var v=n.get(r),G=n.get(q);if(E==undefined){E=(q==0&&r!=q+1)||(r==q-1)}else{E=!E}var s=f(\"<div>\").appendTo(k);var t=f(v);t={width:t.width(),height:t.height(),marginLeft:parseFloat(t.css(\"marginLeft\")),marginTop:parseFloat(t.css(\"marginTop\"))};if(l){var y={background:\"#000\",position:\"absolute\",left:0,top:0,width:\"100%\",height:\"100%\",transformStyle:\"preserve-3d\",zIndex:3,outline:\"1px solid transparent\"};perspect=b.width()*(3-d*2);s.css(y).css({perspective:perspect,transform:\"translate3d(0,0,0)\"});var z=90;var D=f(\"<div>\").css(y).css({position:\"relative\",\"float\":\"left\",width:\"50%\",overflow:\"hidden\"}).append(f(\"<img>\").attr(\"src\",(E?v:G).src).css(t)).appendTo(s);var C=f(\"<div>\").css(y).css({position:\"relative\",\"float\":\"left\",width:\"50%\",overflow:\"hidden\"}).append(f(\"<img>\").attr(\"src\",(E?G:v).src).css(t).css({marginLeft:-t.width/2})).appendTo(s);var I=f(\"<div>\").css(y).css({display:E?\"block\":\"none\",width:\"50%\",transform:\"rotateY(\"+(E?0.1:z)+\"deg)\",transition:(E?\"ease-in \":\"ease-out \")+e/2000+\"s\",transformOrigin:\"right\",overflow:\"hidden\"}).append(f(\"<img>\").attr(\"src\",(E?G:v).src).css(t)).appendTo(s);var F=f(\"<div>\").css(y).css({display:E?\"none\":\"block\",left:\"50%\",width:\"50%\",transform:\"rotateY(-\"+(E?z:0.1)+\"deg)\",transition:(E?\"ease-out \":\"ease-in \")+e/2000+\"s\",transformOrigin:\"left\",overflow:\"hidden\"}).append(f(\"<img>\").attr(\"src\",(E?v:G).src).css(t).css({marginLeft:-t.width/2})).appendTo(s)}else{if(a){var x=f(\"<div>\").css({position:\"absolute\",top:0,left:E?0:\"50%\",width:\"50%\",height:\"100%\",overflow:\"hidden\",zIndex:6}).append(f(n.get(r)).clone().css({position:\"absolute\",height:\"100%\",right:E?\"auto\":0,left:E?0:\"auto\"})).appendTo(s).hide();var B=f(\"<div>\").css({position:\"absolute\",width:\"100%\",height:\"100%\",left:0,top:0,zIndex:8}).appendTo(s).hide();var H=f(\"<canvas>\").css({position:\"absolute\",zIndex:2,left:0,top:-B.height()*d/2}).attr({width:B.width(),height:B.height()*(d+1)}).appendTo(B);var A=H.clone().css({top:0,zIndex:1}).attr({width:B.width(),height:B.height()}).appendTo(B);var w=H.get(0).getContext(\"2d\");var u=A.get(0).getContext(\"2d\")}else{i.stop(true).animate({left:(r?-r+\"00%\":(/Safari/.test(navigator.userAgent)?\"0%\":0))},e,\"easeInOutExpo\")}}if(!l&&a){var D=w;var C=u;var I=G;var F=v}j=new h(E,z,D,C,I,F,B,H,A,x,t,function(){m.trigger(\"effectEnd\");s.remove();j=0})};function c(G,s,A,v,u,E,D,C,B,t,r){numSlices=u/2,widthScale=u/B,heightScale=(1-E)/numSlices;G.clearRect(0,0,r.width(),r.height());for(var q=0;q<numSlices+widthScale;q++){var z=(D?q*p.width/u+p.width/2:(numSlices-q)*p.width/u);var H=A+(D?2:-2)*q,F=v+t*heightScale*q/2;if(z<0){z=0}if(H<0){H=0}if(F<0){F=0}G.drawImage(s,z,0,2.5,p.height,H,F,2,t*(1-(heightScale*q)))}G.save();G.beginPath();G.moveTo(A,v);G.lineTo(A+(D?2:-2)*(numSlices+widthScale),v+t*heightScale*(numSlices+widthScale)/2);G.lineTo(A+(D?2:-2)*(numSlices+widthScale),t*(1-heightScale*(numSlices+widthScale))+v+t*heightScale*(numSlices+widthScale)/2);G.lineTo(A,v+t);G.closePath();G.clip();G.fillStyle=\"rgba(0,0,0,\"+Math.round(C*100)/100+\")\";G.fillRect(0,0,r.width(),r.height());G.restore()}function h(A,r,C,B,y,x,v,w,u,z,t,E){if(l){if(!A){r*=-1;var D=B;B=C;C=D;D=x;x=y;y=D}setTimeout(function(){C.children(\"img\").css(\"opacity\",g).animate({opacity:1},e/2);y.css(\"transform\",\"rotateY(\"+r+\"deg)\").children(\"img\").css(\"opacity\",1).animate({opacity:g},e/2,function(){y.hide();x.show().css(\"transform\",\"rotateX(0deg) rotateY(0deg)\").children(\"img\").css(\"opacity\",g).animate({opacity:1},e/2);B.children(\"img\").css(\"opacity\",1).animate({opacity:g},e/2)})},0);setTimeout(E,e)}else{if(a){v.show();var q=new Date;var s=true;wowAnimate(function(F){var I=jQuery.easing.easeInOutQuint(1,F,0,1,1),H=jQuery.easing.easeInOutCubic(1,F,0,1,1),L=!A;if(F<0.5){I*=2;H*=2;var G=y}else{L=A;I=(1-I)*2;H=(1-H)*2;var G=x}var J=v.height()*d/2,N=(1-I)*v.width()/2,M=1+H*d,K=v.width()/2;c(C,G,K,J,N,M,L,H*g,K,v.height(),w);if(s){z.show();s=false}B.clearRect(0,0,u.width(),u.height());B.fillStyle=\"rgba(0,0,0,\"+(g-H*g)+\")\";B.fillRect(L?K:0,0,u.width()/2,u.height())},0,1,e,E)}}}}", "title": "" }, { "docid": "7f0220ed4d38f2848e4b400ecc55d16e", "score": "0.5126811", "text": "function ws_book(p,n,b){var f=jQuery;var m=f(this);var i=f(\".ws_list\",b);var k=f(\"<div>\").addClass(\"ws_effect ws_book\").css({position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\"}).appendTo(b),e=p.duration,d=p.perspective||0.4,g=p.shadow||0.35,a=p.noCanvas||false,l=p.no3d||false;var o={domPrefixes:\" Webkit Moz ms O Khtml\".split(\" \"),testDom:function(r){var q=this.domPrefixes.length;while(q--){if(typeof document.body.style[this.domPrefixes[q]+r]!==\"undefined\"){return true}}return false},cssTransitions:function(){return this.testDom(\"Transition\")},cssTransforms3d:function(){var r=(typeof document.body.style.perspectiveProperty!==\"undefined\")||this.testDom(\"Perspective\");if(r&&/AppleWebKit/.test(navigator.userAgent)){var t=document.createElement(\"div\"),q=document.createElement(\"style\"),s=\"Test3d\"+Math.round(Math.random()*99999);q.textContent=\"@media (-webkit-transform-3d){#\"+s+\"{height:3px}}\";document.getElementsByTagName(\"head\")[0].appendChild(q);t.id=s;document.body.appendChild(t);r=t.offsetHeight===3;q.parentNode.removeChild(q);t.parentNode.removeChild(t)}return r},canvas:function(){if(typeof document.createElement(\"canvas\").getContext!==\"undefined\"){return true}}};if(!l){l=o.cssTransitions()&&o.cssTransforms3d()}if(!a){a=o.canvas()}var j;this.go=function(r,q,E){if(j){return -1}var v=n.get(r),G=n.get(q);if(E==undefined){E=(q==0&&r!=q+1)||(r==q-1)}else{E=!E}var s=f(\"<div>\").appendTo(k);var t=f(v);t={width:t.width(),height:t.height(),marginLeft:parseFloat(t.css(\"marginLeft\")),marginTop:parseFloat(t.css(\"marginTop\"))};if(l){var y={background:\"#000\",position:\"absolute\",left:0,top:0,width:\"100%\",height:\"100%\",transformStyle:\"preserve-3d\",zIndex:3,outline:\"1px solid transparent\"};perspect=b.width()*(3-d*2);s.css(y).css({perspective:perspect,transform:\"translate3d(0,0,0)\"});var z=90;var D=f(\"<div>\").css(y).css({position:\"relative\",\"float\":\"left\",width:\"50%\",overflow:\"hidden\"}).append(f(\"<img>\").attr(\"src\",(E?v:G).src).css(t)).appendTo(s);var C=f(\"<div>\").css(y).css({position:\"relative\",\"float\":\"left\",width:\"50%\",overflow:\"hidden\"}).append(f(\"<img>\").attr(\"src\",(E?G:v).src).css(t).css({marginLeft:-t.width/2})).appendTo(s);var I=f(\"<div>\").css(y).css({display:E?\"block\":\"none\",width:\"50%\",transform:\"rotateY(\"+(E?0.1:z)+\"deg)\",transition:(E?\"ease-in \":\"ease-out \")+e/2000+\"s\",transformOrigin:\"right\",overflow:\"hidden\"}).append(f(\"<img>\").attr(\"src\",(E?G:v).src).css(t)).appendTo(s);var F=f(\"<div>\").css(y).css({display:E?\"none\":\"block\",left:\"50%\",width:\"50%\",transform:\"rotateY(-\"+(E?z:0.1)+\"deg)\",transition:(E?\"ease-out \":\"ease-in \")+e/2000+\"s\",transformOrigin:\"left\",overflow:\"hidden\"}).append(f(\"<img>\").attr(\"src\",(E?v:G).src).css(t).css({marginLeft:-t.width/2})).appendTo(s)}else{if(a){var x=f(\"<div>\").css({position:\"absolute\",top:0,left:E?0:\"50%\",width:\"50%\",height:\"100%\",overflow:\"hidden\",zIndex:6}).append(f(n.get(r)).clone().css({position:\"absolute\",height:\"100%\",right:E?\"auto\":0,left:E?0:\"auto\"})).appendTo(s).hide();var B=f(\"<div>\").css({position:\"absolute\",width:\"100%\",height:\"100%\",left:0,top:0,zIndex:8}).appendTo(s).hide();var H=f(\"<canvas>\").css({position:\"absolute\",zIndex:2,left:0,top:-B.height()*d/2}).attr({width:B.width(),height:B.height()*(d+1)}).appendTo(B);var A=H.clone().css({top:0,zIndex:1}).attr({width:B.width(),height:B.height()}).appendTo(B);var w=H.get(0).getContext(\"2d\");var u=A.get(0).getContext(\"2d\")}else{i.stop(true).animate({left:(r?-r+\"00%\":(/Safari/.test(navigator.userAgent)?\"0%\":0))},e,\"easeInOutExpo\")}}if(!l&&a){var D=w;var C=u;var I=G;var F=v}j=new h(E,z,D,C,I,F,B,H,A,x,t,function(){m.trigger(\"effectEnd\");s.remove();j=0})};function c(G,s,A,v,u,E,D,C,B,t,r){numSlices=u/2,widthScale=u/B,heightScale=(1-E)/numSlices;G.clearRect(0,0,r.width(),r.height());for(var q=0;q<numSlices+widthScale;q++){var z=(D?q*p.width/u+p.width/2:(numSlices-q)*p.width/u);var H=A+(D?2:-2)*q,F=v+t*heightScale*q/2;if(z<0){z=0}if(H<0){H=0}if(F<0){F=0}G.drawImage(s,z,0,2.5,p.height,H,F,2,t*(1-(heightScale*q)))}G.save();G.beginPath();G.moveTo(A,v);G.lineTo(A+(D?2:-2)*(numSlices+widthScale),v+t*heightScale*(numSlices+widthScale)/2);G.lineTo(A+(D?2:-2)*(numSlices+widthScale),t*(1-heightScale*(numSlices+widthScale))+v+t*heightScale*(numSlices+widthScale)/2);G.lineTo(A,v+t);G.closePath();G.clip();G.fillStyle=\"rgba(0,0,0,\"+Math.round(C*100)/100+\")\";G.fillRect(0,0,r.width(),r.height());G.restore()}function h(A,r,C,B,y,x,v,w,u,z,t,E){if(l){if(!A){r*=-1;var D=B;B=C;C=D;D=x;x=y;y=D}setTimeout(function(){C.children(\"img\").css(\"opacity\",g).animate({opacity:1},e/2);y.css(\"transform\",\"rotateY(\"+r+\"deg)\").children(\"img\").css(\"opacity\",1).animate({opacity:g},e/2,function(){y.hide();x.show().css(\"transform\",\"rotateX(0deg) rotateY(0deg)\").children(\"img\").css(\"opacity\",g).animate({opacity:1},e/2);B.children(\"img\").css(\"opacity\",1).animate({opacity:g},e/2)})},0);setTimeout(E,e)}else{if(a){v.show();var q=new Date;var s=true;wowAnimate(function(F){var I=jQuery.easing.easeInOutQuint(1,F,0,1,1),H=jQuery.easing.easeInOutCubic(1,F,0,1,1),L=!A;if(F<0.5){I*=2;H*=2;var G=y}else{L=A;I=(1-I)*2;H=(1-H)*2;var G=x}var J=v.height()*d/2,N=(1-I)*v.width()/2,M=1+H*d,K=v.width()/2;c(C,G,K,J,N,M,L,H*g,K,v.height(),w);if(s){z.show();s=false}B.clearRect(0,0,u.width(),u.height());B.fillStyle=\"rgba(0,0,0,\"+(g-H*g)+\")\";B.fillRect(L?K:0,0,u.width()/2,u.height())},0,1,e,E)}}}}", "title": "" }, { "docid": "6181e0d8e7519a228afe4f08e3c422c1", "score": "0.51152307", "text": "function Lh(){var a=this;this.n=new wh(function(){return Mh(a)},function(b){var c=Mh(a);c&&(fa(b.y)&&(a.n.scrollY=-c.$a*b.y-c.xb),a.n.R.setAttribute(\"transform\",\"translate(0,\"+(a.n.scrollY+c.Za)+\")\"))});this.n.Ki=!0;this.ti=[];this.cb=this.Q=0;this.Ge=[];this.Pb=[]}", "title": "" }, { "docid": "4ace735a939d2098136fa78bd931b644", "score": "0.5114717", "text": "function Hi(){var a=this;this.o=new mh(function(){return Ii(a)},function(b){var c=Ii(a);c&&(fa(b.y)&&(a.o.scrollY=-c.Xa*b.y-c.ib),a.o.W.setAttribute(\"transform\",\"translate(0,\"+(a.o.scrollY+c.Wa)+\")\"))});this.o.ai=!0;this.Mh=[];this.ma=this.F=0;this.yf=[];this.zb=[]}", "title": "" }, { "docid": "5704b54a8ffe131a875ecfb40caa40de", "score": "0.5107847", "text": "function xs_rotateElement(el, t) {\r\n if (xs_is_ie) {\r\n el.style.filter=\"progid:DXImageTransform.Microsoft.BasicImage(rotation=\"+t+\")\";\r\n }\r\n}", "title": "" }, { "docid": "389ec36dff2b8800cbbc9c5dd38d6741", "score": "0.51053816", "text": "function support3d() {\n\n var el = document.createElement('p'),\n\n has3d,\n\n transforms = {\n\n 'webkitTransform':'-webkit-transform',\n\n 'OTransform':'-o-transform',\n\n 'msTransform':'-ms-transform',\n\n 'MozTransform':'-moz-transform',\n\n 'transform':'transform'\n\n };\n\n\n\n //preventing the style p:empty{display: none;} from returning the wrong result\n\n el.style.display = 'block'\n\n\n\n // Add it to the body to get the computed style.\n\n document.body.insertBefore(el, null);\n\n\n\n for (var t in transforms) {\n\n if (el.style[t] !== undefined) {\n\n el.style[t] = 'translate3d(1px,1px,1px)';\n\n has3d = window.getComputedStyle(el).getPropertyValue(transforms[t]);\n\n }\n\n }\n\n\n\n document.body.removeChild(el);\n\n\n\n return (has3d !== undefined && has3d.length > 0 && has3d !== 'none');\n\n }", "title": "" }, { "docid": "e17552b9d733ad10a9915bcc3201e386", "score": "0.5081148", "text": "function wc(){return function(){function a(){mb()}function b(a,b){return b?\"\\x00\"===a?\"\\ufffd\":a.slice(0,-1)+\"\\\\\"+a.charCodeAt(a.length-1).toString(16)+\" \":\"\\\\\"+a}function c(a,b,c){a=\"0x\"+b-65536;return a!==a||c?b:0>a?String.fromCharCode(a+65536):String.fromCharCode(a>>10|55296,a&1023|56320)}function d(a,b){for(var c=0,d=a.length;c<d;c++)if(a[c]===b)return c;return-1}function e(a,b){a===b&&(ma=!0);return 0}function f(a,c,d,e){var f,g,h,k,l=c&&c.ownerDocument,m=c?c.nodeType:9;d=d||[];if(\"string\"!==\ntypeof a||!a||1!==m&&9!==m&&11!==m)return d;if(!e&&((c?c.ownerDocument||c:Ea)!==J&&mb(c),c=c||J,Fa)){if(11!==m&&(k=ij.exec(a)))if(f=k[1])if(9===m)if(g=c.getElementById(f)){if(g.id===f)return d.push(g),d}else return d;else{if(l&&(g=l.getElementById(f))&&$b(c,g)&&g.id===f)return d.push(g),d}else{if(k[2])return ab.apply(d,c.getElementsByTagName(a)),d;if((f=k[3])&&S.getElementsByClassName&&c.getElementsByClassName)return ab.apply(d,c.getElementsByClassName(f)),d}if(!(!S.qsa||Nc[a+\" \"]||X&&X.test(a))){if(1!==\nm){l=c;var qa=a}else if(\"object\"!==c.nodeName.toLowerCase()){(h=c.getAttribute(\"id\"))?h=h.replace(Vf,b):c.setAttribute(\"id\",h=P);g=Oc(a);for(f=g.length;f--;)g[f]=\"#\"+h+\" \"+z(g[f]);qa=g.join(\",\");l=Zd.test(a)&&x(c.parentNode)||c}if(qa)try{return ab.apply(d,l.querySelectorAll(qa)),d}catch(tm){Nc(a)}finally{h===P&&c.removeAttribute(\"id\")}}}return jj(a.replace(Pc,\"$1\"),c,d,e)}function g(){function a(c,d){b.push(c+\" \")>K.cacheLength&&delete a[b.shift()];return a[c+\" \"]=d}var b=[];return a}function h(a){a[P]=\n!0;return a}function k(a){var b=J.createElement(\"fieldset\");try{return!!a(b)}catch(ca){return!1}finally{b.parentNode&&b.parentNode.removeChild(b)}}function m(a,b){for(var c=a.split(\"|\"),d=c.length;d--;)K.attrHandle[c[d]]=b}function l(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&a.sourceIndex-b.sourceIndex;if(d)return d;if(c)for(;c=c.nextSibling;)if(c===b)return-1;return a?1:-1}function n(a){return function(b){return\"input\"===b.nodeName.toLowerCase()&&b.type===a}}function p(a){return function(b){var c=\nb.nodeName.toLowerCase();return(\"input\"===c||\"button\"===c)&&b.type===a}}function q(a){return function(b){return\"form\"in b?b.parentNode&&!1===b.disabled?\"label\"in b?\"label\"in b.parentNode?b.parentNode.disabled===a:b.disabled===a:b.isDisabled===a||b.isDisabled!==!a&&kj(b)===a:b.disabled===a:\"label\"in b?b.disabled===a:!1}}function v(a){return h(function(b){b=+b;return h(function(c,d){for(var e,f=a([],c.length,b),g=f.length;g--;)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function x(a){return a&&\"undefined\"!==\ntypeof a.getElementsByTagName&&a}function y(){}function z(a){for(var b=0,c=a.length,d=\"\";b<c;b++)d+=a[b].value;return d}function A(a,b,c){var d=b.dir,e=b.next,f=c&&\"parentNode\"===(e||d),g=lj++;return b.first?function(b,c,e){for(;b=b[d];)if(1===b.nodeType||f)return a(b,c,e);return!1}:function(b,c,h){var k,l,m=bb+\" \"+g;if(h)for(;b=b[d];){if((1===b.nodeType||f)&&a(b,c,h))return!0}else for(;b=b[d];)if(1===b.nodeType||f){var n=b[P]||(b[P]={});n=n[b.uniqueID]||(n[b.uniqueID]={});if(e&&e===b.nodeName.toLowerCase())b=\nb[d]||b;else if((l=n[d])&&l[0]===m){if(!0===(k=l[1])||k===Y)return!0===k}else if(l=n[d]=[m],l[1]=a(b,c,h)||Y,!0===l[1])return!0}return!1}}function t(a){return 1<a.length?function(b,c,d){for(var e=a.length;e--;)if(!a[e](b,c,d))return!1;return!0}:a[0]}function B(a,b,c,d,e){for(var f,g=[],h=0,k=a.length,l=null!=b;h<k;h++)if(f=a[h])if(!c||c(f,d,e))g.push(f),l&&b.push(h);return g}function D(a,b,c,e,g,k){e&&!e[P]&&(e=D(e));g&&!g[P]&&(g=D(g,k));return h(function(h,k,l,m){var n,p=[],qa=[],q=k.length,ca;if(!(ca=\nh)){ca=b||\"*\";for(var t=l.nodeType?[l]:l,v=[],Gb=0,y=t.length;Gb<y;Gb++)f(ca,t[Gb],v);ca=v}ca=!a||!h&&b?ca:B(ca,p,a,l,m);t=c?g||(h?a:q||e)?[]:k:ca;c&&c(ca,t,l,m);if(e){var x=B(t,qa);e(x,[],l,m);for(l=x.length;l--;)if(n=x[l])t[qa[l]]=!(ca[qa[l]]=n)}if(h){if(g||a){if(g){x=[];for(l=t.length;l--;)(n=t[l])&&x.push(ca[l]=n);g(null,t=[],x,m)}for(l=t.length;l--;)(n=t[l])&&-1<(x=g?d(h,n):p[l])&&(h[x]=!(k[x]=n))}}else t=B(t===k?t.splice(q,t.length):t),g?g(null,k,t,m):ab.apply(k,t)})}function C(a){var b,c,e=\na.length,f=K.relative[a[0].type];var g=f||K.relative[\" \"];for(var h=f?1:0,k=A(function(a){return a===b},g,!0),l=A(function(a){return-1<d(b,a)},g,!0),m=[function(a,c,d){a=!f&&(d||c!==aa)||((b=c).nodeType?k(a,c,d):l(a,c,d));b=null;return a}];h<e;h++)if(g=K.relative[a[h].type])m=[A(t(m),g)];else{g=K.filter[a[h].type].apply(null,a[h].matches);if(g[P]){for(c=++h;c<e&&!K.relative[a[c].type];c++);return D(1<h&&t(m),1<h&&z(a.slice(0,h-1).concat({value:\" \"===a[h-2].type?\"*\":\"\"})).replace(Pc,\"$1\"),g,h<c&&C(a.slice(h,\nc)),c<e&&C(a=a.slice(c)),c<e&&z(a))}m.push(g)}return t(m)}function M(a,b){function c(c,h,k,l,m){var n,p,qa=0,q=\"0\",ca=c&&[],t=[],v=aa,Gb=c||g&&K.find.TAG(\"*\",m),y=bb+=null==v?1:Math.random()||.1,x=Gb.length;m&&(aa=h===J||h||m,Y=d);for(;q!==x&&null!=(n=Gb[q]);q++){if(g&&n){var z=0;h||n.ownerDocument===J||(mb(n),k=!Fa);for(;p=a[z++];)if(p(n,h||J,k)){l.push(n);break}m&&(bb=y,Y=++d)}e&&((n=!p&&n)&&qa--,c&&ca.push(n))}qa+=q;if(e&&q!==qa){for(z=0;p=b[z++];)p(ca,t,h,k);if(c){if(0<qa)for(;q--;)ca[q]||t[q]||\n(t[q]=mj.call(l));t=B(t)}ab.apply(l,t);m&&!c&&0<t.length&&1<qa+b.length&&f.function_______________$uniqueSort(l)}m&&(bb=y,aa=v);return ca}var d=0,e=0<b.length,g=0<a.length;return e?h(c):c}var L,Y,aa,V,ma,J,da,Fa,X,nb,Qc,$b,P=\"sizzle\"+1*new Date,Ea=window.document,bb=0,lj=0,Wf=g(),Xf=g(),Yf=g(),Nc=g(),nj={}.hasOwnProperty,ob=[],mj=ob.pop,oj=ob.push,ab=ob.push,Zf=ob.slice,pj=RegExp(\"[\\\\x20\\\\t\\\\r\\\\n\\\\f]+\",\"g\"),Pc=RegExp(\"^[\\\\x20\\\\t\\\\r\\\\n\\\\f]+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)[\\\\x20\\\\t\\\\r\\\\n\\\\f]+$\",\"g\"),qj=/^[\\x20\\t\\r\\n\\f]*,[\\x20\\t\\r\\n\\f]*/,\nrj=/^[\\x20\\t\\r\\n\\f]*([>+~]|[\\x20\\t\\r\\n\\f])[\\x20\\t\\r\\n\\f]*/,sj=/:((?:\\\\.|[\\w-]|[^\\x00-\\xa0])+)(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|\\[[\\x20\\t\\r\\n\\f]*((?:\\\\.|[\\w-]|[^\\x00-\\xa0])+)(?:[\\x20\\t\\r\\n\\f]*([*^$|!~]?=)[\\x20\\t\\r\\n\\f]*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(#?(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+))|)[\\x20\\t\\r\\n\\f]*\\])*)|.*)\\)|)/,tj=/^(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+$/,Rc={ID:/^#((?:\\\\.|[\\w-]|[^\\x00-\\xa0])+)/,CLASS:/^\\.((?:\\\\.|[\\w-]|[^\\x00-\\xa0])+)/,TAG:/^((?:\\\\.|[\\w-]|[^\\x00-\\xa0])+|[*])/,\nATTR:/^\\[[\\x20\\t\\r\\n\\f]*((?:\\\\.|[\\w-]|[^\\x00-\\xa0])+)(?:[\\x20\\t\\r\\n\\f]*([*^$|!~]?=)[\\x20\\t\\r\\n\\f]*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(#?(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+))|)[\\x20\\t\\r\\n\\f]*\\]/,PSEUDO:/^:((?:\\\\.|[\\w-]|[^\\x00-\\xa0])+)(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|\\[[\\x20\\t\\r\\n\\f]*((?:\\\\.|[\\w-]|[^\\x00-\\xa0])+)(?:[\\x20\\t\\r\\n\\f]*([*^$|!~]?=)[\\x20\\t\\r\\n\\f]*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(#?(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+))|)[\\x20\\t\\r\\n\\f]*\\])*)|.*)\\)|)/,CHILD:/^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\([\\x20\\t\\r\\n\\f]*(even|odd|(([+-]|)(\\d*)n|)[\\x20\\t\\r\\n\\f]*(?:([+-]|)[\\x20\\t\\r\\n\\f]*(\\d+)|))[\\x20\\t\\r\\n\\f]*\\)|)/i,\nbool:/^(?:checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)$/i,needsContext:/^[\\x20\\t\\r\\n\\f]*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\([\\x20\\t\\r\\n\\f]*((?:-\\d)?\\d*)[\\x20\\t\\r\\n\\f]*\\)|)(?=[^-]|$)/i},uj=/^(?:input|select|textarea|button)$/i,vj=/^h\\d$/i,ac=/^[^{]+\\{\\s*\\[native \\w/,ij=/^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,Zd=/[+~]/,Ta=RegExp(\"\\\\\\\\([\\\\da-f]{1,6}[\\\\x20\\\\t\\\\r\\\\n\\\\f]?|([\\\\x20\\\\t\\\\r\\\\n\\\\f])|.)\",\"ig\"),Vf=/([\\0-\\x1f\\x7f]|^-?\\d)|^-$|[^\\0-\\x1f\\x7f-\\uFFFF\\w-]/g,\nkj=A(function(a){return!0===a.disabled&&\"fieldset\"===a.nodeName.toLowerCase()},{dir:\"parentNode\",next:\"legend\"});try{ab.apply(ob=Zf.call(Ea.childNodes),Ea.childNodes),ob[Ea.childNodes.length].nodeType}catch(qa){ab={apply:ob.length?function(a,b){oj.apply(a,Zf.call(b))}:function(a,b){for(var c=a.length,d=0;a[c++]=b[d++];);a.length=c-1}}}var S=f.function_______________$support={};var wj=f.isXML=function(a){return(a=a&&(a.ownerDocument||a).documentElement)?\"HTML\"!==a.nodeName:!1};var mb=f.setDocument=\nfunction(b){var f;b=b?b.ownerDocument||b:Ea;if(b===J||9!==b.nodeType||!b.documentElement)return J;J=b;da=J.documentElement;Fa=!wj(J);Ea!==J&&(f=J.defaultView)&&f.top!==f&&(f.addEventListener?f.addEventListener(\"unload\",a,!1):f.attachEvent&&f.attachEvent(\"onunload\",a));S.attributes=k(function(a){a.className=\"i\";return!a.getAttribute(\"className\")});S.getElementsByTagName=k(function(a){a.appendChild(J.createComment(\"\"));return!a.getElementsByTagName(\"*\").length});S.getElementsByClassName=ac.test(J.getElementsByClassName);\nS.getById=k(function(a){da.appendChild(a).id=P;return!J.getElementsByName||!J.getElementsByName(P).length});S.getById?(K.filter.ID=function(a){var b=a.replace(Ta,c);return function(a){return a.getAttribute(\"id\")===b}},K.find.ID=function(a,b){if(\"undefined\"!==typeof b.getElementById&&Fa){var c=b.getElementById(a);return c?[c]:[]}}):(K.filter.ID=function(a){var b=a.replace(Ta,c);return function(a){return(a=\"undefined\"!==typeof a.getAttributeNode&&a.getAttributeNode(\"id\"))&&a.value===b}},K.find.ID=function(a,\nb){if(\"undefined\"!==typeof b.getElementById&&Fa){var c,d,e=b.getElementById(a);if(e){if((c=e.getAttributeNode(\"id\"))&&c.value===a)return[e];var f=b.getElementsByName(a);for(d=0;e=f[d++];)if((c=e.getAttributeNode(\"id\"))&&c.value===a)return[e]}return[]}});K.find.TAG=S.getElementsByTagName?function(a,b){if(\"undefined\"!==typeof b.getElementsByTagName)return b.getElementsByTagName(a);if(S.qsa)return b.querySelectorAll(a)}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if(\"*\"===a){for(;c=f[e++];)1===\nc.nodeType&&d.push(c);return d}return f};K.find.CLASS=S.getElementsByClassName&&function(a,b){if(\"undefined\"!==typeof b.getElementsByClassName&&Fa)return b.getElementsByClassName(a)};nb=[];X=[];if(S.qsa=ac.test(J.querySelectorAll))k(function(a){da.appendChild(a).innerHTML=\"<a id='\"+P+\"'></a><select id='\"+P+\"-\\r\\\\' msallowcapture=''><option selected=''></option></select>\";a.querySelectorAll(\"[msallowcapture^='']\").length&&X.push(\"[*^$]=[\\\\x20\\\\t\\\\r\\\\n\\\\f]*(?:''|\\\"\\\")\");a.querySelectorAll(\"[selected]\").length||\nX.push(\"\\\\[[\\\\x20\\\\t\\\\r\\\\n\\\\f]*(?:value|checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)\");a.querySelectorAll(\"[id~=\"+P+\"-]\").length||X.push(\"~=\");a.querySelectorAll(\":checked\").length||X.push(\":checked\");a.querySelectorAll(\"a#\"+P+\"+*\").length||X.push(\".#.+[+~]\")}),k(function(a){a.innerHTML=\"<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>\";var b=J.createElement(\"input\");b.setAttribute(\"type\",\n\"hidden\");a.appendChild(b).setAttribute(\"name\",\"D\");a.querySelectorAll(\"[name=d]\").length&&X.push(\"name[\\\\x20\\\\t\\\\r\\\\n\\\\f]*[*^$|!~]?=\");2!==a.querySelectorAll(\":enabled\").length&&X.push(\":enabled\",\":disabled\");da.appendChild(a).disabled=!0;2!==a.querySelectorAll(\":disabled\").length&&X.push(\":enabled\",\":disabled\");X.push(\",.*:\")});(S.matchesSelector=ac.test(Qc=da.matches||da.webkitMatchesSelector||da.mozMatchesSelector||da.oMatchesSelector||da.msMatchesSelector))&&k(function(a){S.disconnectedMatch=\nQc.call(a,\"*\");Qc.call(a,\"[s!='']:x\");nb.push(\"!=\",\":((?:\\\\\\\\.|[\\\\w-]|[^\\x00-\\\\xa0])+)(?:\\\\((('((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\")|((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|\\\\[[\\\\x20\\\\t\\\\r\\\\n\\\\f]*((?:\\\\\\\\.|[\\\\w-]|[^\\x00-\\\\xa0])+)(?:[\\\\x20\\\\t\\\\r\\\\n\\\\f]*([*^$|!~]?=)[\\\\x20\\\\t\\\\r\\\\n\\\\f]*(?:'((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\"|(#?(?:\\\\\\\\.|[\\\\w-]|[^\\x00-\\\\xa0])+))|)[\\\\x20\\\\t\\\\r\\\\n\\\\f]*\\\\])*)|.*)\\\\)|)\")});X=X.length&&new RegExp(X.join(\"|\"));nb=nb.length&&new RegExp(nb.join(\"|\"));$b=(f=ac.test(da.compareDocumentPosition))||\nac.test(da.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!!(d&&1===d.nodeType&&(c.contains?c.contains(d):a.compareDocumentPosition&&a.compareDocumentPosition(d)&16))}:function(a,b){if(b)for(;b=b.parentNode;)if(b===a)return!0;return!1};e=f?function(a,b){if(a===b)return ma=!0,0;var c=!a.compareDocumentPosition-!b.compareDocumentPosition;if(c)return c;c=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1;return c&1||!S.sortDetached&&\nb.compareDocumentPosition(a)===c?a===J||a.ownerDocument===Ea&&$b(Ea,a)?-1:b===J||b.ownerDocument===Ea&&$b(Ea,b)?1:V?d(V,a)-d(V,b):0:c&4?-1:1}:function(a,b){if(a===b)return ma=!0,0;var c=0;var e=a.parentNode;var f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===J?-1:b===J?1:e?-1:f?1:V?d(V,a)-d(V,b):0;if(e===f)return l(a,b);for(e=a;e=e.parentNode;)g.unshift(e);for(e=b;e=e.parentNode;)h.unshift(e);for(;g[c]===h[c];)c++;return c?l(g[c],h[c]):g[c]===Ea?-1:h[c]===Ea?1:0};return J};f.matches=function(a,b){return f(a,\nnull,null,b)};f.matchesSelector=function(a,b){(a.ownerDocument||a)!==J&&mb(a);if(!(!S.matchesSelector||!Fa||Nc[b+\" \"]||nb&&nb.test(b)||X&&X.test(b)))try{var c=Qc.call(a,b);if(c||S.disconnectedMatch||a.document&&11!==a.document.nodeType)return c}catch(sm){Nc(b)}return 0<f(b,J,null,[a]).length};f.contains=function(a,b){(a.ownerDocument||a)!==J&&mb(a);return $b(a,b)};f.function_______________$attr=function(a,b){(a.ownerDocument||a)!==J&&mb(a);var c=K.attrHandle[b.toLowerCase()];c=c&&nj.call(K.attrHandle,\nb.toLowerCase())?c(a,b,!Fa):void 0;return void 0!==c?c:S.attributes||!Fa?a.getAttribute(b):(c=a.getAttributeNode(b))&&c.specified?c.value:null};f.function_______________$escape=function(a){return(a+\"\").replace(Vf,b)};f.error=function(a){throw Error(\"Syntax error, unrecognized expression: \"+a);};f.function_______________$uniqueSort=function(a){var b,c=[],d=0,f=0;ma=!S.detectDuplicates;V=!S.sortStable&&a.slice(0);a.sort(e);if(ma){for(;b=a[f++];)b===a[f]&&(d=c.push(f));for(;d--;)a.splice(c[d],1)}V=null};\nvar $d=f.getText=function(a){var b=\"\",c=0;var d=a.nodeType;if(!d)for(;d=a[c++];)b+=$d(d);else if(1===d||9===d||11===d){if(\"string\"===typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)b+=$d(a)}else if(3===d||4===d)return a.nodeValue;return b};var K=f.selectors={cacheLength:50,createPseudo:h,match:Rc,attrHandle:{},find:{},relative:{\">\":{dir:\"parentNode\",first:!0},\" \":{dir:\"parentNode\"},\"+\":{dir:\"previousSibling\",first:!0},\"~\":{dir:\"previousSibling\"}},preFilter:{ATTR:function(a){a[1]=\na[1].replace(Ta,c);a[3]=(a[3]||a[4]||a[5]||\"\").replace(Ta,c);\"~=\"===a[2]&&(a[3]=\" \"+a[3]+\" \");return a.slice(0,4)},CHILD:function(a){a[1]=a[1].toLowerCase();\"nth\"===a[1].slice(0,3)?(a[3]||f.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*(\"even\"===a[3]||\"odd\"===a[3])),a[5]=+(a[7]+a[8]||\"odd\"===a[3])):a[3]&&f.error(a[0]);return a},PSEUDO:function(a){var b,c=!a[6]&&a[2];if(Rc.CHILD.test(a[0]))return null;a[3]?a[2]=a[4]||a[5]||\"\":c&&sj.test(c)&&(b=Oc(c,!0))&&(b=c.indexOf(\")\",c.length-b)-c.length)&&(a[0]=a[0].slice(0,\nb),a[2]=c.slice(0,b));return a.slice(0,3)}},filter:{TAG:function(a){var b=a.replace(Ta,c).toLowerCase();return\"*\"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=Wf[a+\" \"];return b||(b=new RegExp(\"(^|[\\\\x20\\\\t\\\\r\\\\n\\\\f])\"+a+\"([\\\\x20\\\\t\\\\r\\\\n\\\\f]|$)\"),Wf(a,function(a){return b.test(\"string\"===typeof a.className&&a.className||\"undefined\"!==typeof a.getAttribute&&a.getAttribute(\"class\")||\"\")}))},ATTR:function(a,b,c){return function(d){d=\nf.function_______________$attr(d,a);return null==d?\"!=\"===b:b?\"=\"===b?d===c:\"!=\"===b?d!==c:\"^=\"===b?c&&0===d.indexOf(c):\"*=\"===b?c&&-1<d.indexOf(c):\"$=\"===b?c&&d.slice(-c.length)===c:\"~=\"===b?-1<(\" \"+d.replace(pj,\" \")+\" \").indexOf(c):\"|=\"===b?d===c||d.slice(0,c.length+1)===c+\"-\":!1:!0}},CHILD:function(a,b,c,d,e){var f=\"nth\"!==a.slice(0,3),g=\"last\"!==a.slice(-4),h=\"of-type\"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,k){var l,m;c=f!==g?\"nextSibling\":\"previousSibling\";var n=\nb.parentNode,p=h&&b.nodeName.toLowerCase();k=!k&&!h;var q=!1;if(n){if(f){for(;c;){for(l=b;l=l[c];)if(h?l.nodeName.toLowerCase()===p:1===l.nodeType)return!1;var t=c=\"only\"===a&&!t&&\"nextSibling\"}return!0}t=[g?n.firstChild:n.lastChild];if(g&&k){l=n;var v=l[P]||(l[P]={});v=v[l.uniqueID]||(v[l.uniqueID]={});q=v[a]||[];q=(m=q[0]===bb&&q[1])&&q[2];for(l=m&&n.childNodes[m];l=++m&&l&&l[c]||(q=m=0)||t.pop();)if(1===l.nodeType&&++q&&l===b){v[a]=[bb,m,q];break}}else if(k&&(l=b,v=l[P]||(l[P]={}),v=v[l.uniqueID]||\n(v[l.uniqueID]={}),q=v[a]||[],q=m=q[0]===bb&&q[1]),!1===q)for(;(l=++m&&l&&l[c]||(q=m=0)||t.pop())&&((h?l.nodeName.toLowerCase()!==p:1!==l.nodeType)||!++q||(k&&(v=l[P]||(l[P]={}),v=v[l.uniqueID]||(v[l.uniqueID]={}),v[a]=[bb,q]),l!==b)););q-=e;return q===d||0===q%d&&0<=q/d}}},PSEUDO:function(a,b){var c=K.pseudos[a]||K.setFilters[a.toLowerCase()]||f.error(\"unsupported pseudo: \"+a);if(c[P])return c(b);if(1<c.length){var e=[a,a,\"\",b];return K.setFilters.hasOwnProperty(a.toLowerCase())?h(function(a,e){for(var f,\ng=c(a,b),h=g.length;h--;)f=d(a,g[h]),a[f]=!(e[f]=g[h])}):function(a){return c(a,0,e)}}return c}},pseudos:{not:h(function(a){var b=[],c=[],d=$f(a.replace(Pc,\"$1\"));return d[P]?h(function(a,b,c,e){e=d(a,null,e,[]);for(var f=a.length;f--;)if(c=e[f])a[f]=!(b[f]=c)}):function(a,e,f){b[0]=a;d(b,null,f,c);b[0]=null;return!c.pop()}}),has:h(function(a){return function(b){return 0<f(a,b).length}}),contains:h(function(a){a=a.replace(Ta,c);return function(b){return-1<(b.textContent||b.innerText||$d(b)).indexOf(a)}}),\nlang:h(function(a){tj.test(a||\"\")||f.error(\"unsupported lang: \"+a);a=a.replace(Ta,c).toLowerCase();return function(b){var c;do if(c=Fa?b.lang:b.getAttribute(\"xml:lang\")||b.getAttribute(\"lang\"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+\"-\");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(a){var b=window.location&&window.location.hash;return b&&b.slice(1)===a.id},root:function(a){return a===da},focus:function(a){return a===J.activeElement&&(!J.hasFocus||J.hasFocus())&&!!(a.type||\na.href||~a.tabIndex)},enabled:q(!1),disabled:q(!0),checked:function(a){var b=a.nodeName.toLowerCase();return\"input\"===b&&!!a.checked||\"option\"===b&&!!a.selected},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return!0===a.selected},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(6>a.nodeType)return!1;return!0},parent:function(a){return!K.pseudos.empty(a)},header:function(a){return vj.test(a.nodeName)},input:function(a){return uj.test(a.nodeName)},button:function(a){var b=\na.nodeName.toLowerCase();return\"input\"===b&&\"button\"===a.type||\"button\"===b},text:function(a){var b;return\"input\"===a.nodeName.toLowerCase()&&\"text\"===a.type&&(null==(b=a.getAttribute(\"type\"))||\"text\"===b.toLowerCase())},first:v(function(){return[0]}),last:v(function(a,b){return[b-1]}),eq:v(function(a,b,c){return[0>c?c+b:c]}),even:v(function(a,b){for(var c=0;c<b;c+=2)a.push(c);return a}),odd:v(function(a,b){for(var c=1;c<b;c+=2)a.push(c);return a}),lt:v(function(a,b,c){for(b=0>c?c+b:c;0<=--b;)a.push(b);\nreturn a}),gt:v(function(a,b,c){for(c=0>c?c+b:c;++c<b;)a.push(c);return a})}};K.pseudos.nth=K.pseudos.eq;for(L in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})K.pseudos[L]=n(L);for(L in{submit:!0,reset:!0})K.pseudos[L]=p(L);y.prototype=K.filters=K.pseudos;K.setFilters=new y;var Oc=f.tokenize=function(a,b){var c,d,e,g,h;if(g=Xf[a+\" \"])return b?0:g.slice(0);g=a;var k=[];for(h=K.preFilter;g;){if(!l||(c=qj.exec(g)))c&&(g=g.slice(c[0].length)||g),k.push(d=[]);var l=!1;if(c=rj.exec(g))l=c.shift(),\nd.push({value:l,type:c[0].replace(Pc,\" \")}),g=g.slice(l.length);for(e in K.filter)!(c=Rc[e].exec(g))||h[e]&&!(c=h[e](c))||(l=c.shift(),d.push({value:l,type:e,matches:c}),g=g.slice(l.length));if(!l)break}return b?g.length:g?f.error(a):Xf(a,k).slice(0)};var $f=f.compile=function(a,b){var c,d=[],e=[],f=Yf[a+\" \"];if(!f){b||(b=Oc(a));for(c=b.length;c--;)f=C(b[c]),f[P]?d.push(f):e.push(f);f=Yf(a,M(e,d));f.selector=a}return f};var jj=f.function_______________$select=function(a,b,d,e){var f,g,h,k=\"function\"===\ntypeof a&&a,l=!e&&Oc(a=k.selector||a);d=d||[];if(1===l.length){var m=l[0]=l[0].slice(0);if(2<m.length&&\"ID\"===(g=m[0]).type&&9===b.nodeType&&Fa&&K.relative[m[1].type]){b=(K.find.ID(g.matches[0].replace(Ta,c),b)||[])[0];if(!b)return d;k&&(b=b.parentNode);a=a.slice(m.shift().value.length)}for(f=Rc.needsContext.test(a)?0:m.length;f--;){g=m[f];if(K.relative[h=g.type])break;if(h=K.find[h])if(e=h(g.matches[0].replace(Ta,c),Zd.test(m[0].type)&&x(b.parentNode)||b)){m.splice(f,1);a=e.length&&z(m);if(!a)return ab.apply(d,\ne),d;break}}}(k||$f(a,l))(e,b,!Fa,d,!b||Zd.test(a)&&x(b.parentNode)||b);return d};S.sortStable=P.split(\"\").sort(e).join(\"\")===P;S.detectDuplicates=!!ma;mb();S.sortDetached=k(function(a){return a.compareDocumentPosition(J.createElement(\"fieldset\"))&1});k(function(a){a.innerHTML=\"<a href='#'></a>\";return\"#\"===a.firstChild.getAttribute(\"href\")})||m(\"type|href|height|width\",function(a,b,c){if(!c)return a.getAttribute(b,\"type\"===b.toLowerCase()?1:2)});S.attributes&&k(function(a){a.innerHTML=\"<input/>\";\na.firstChild.setAttribute(\"value\",\"\");return\"\"===a.firstChild.getAttribute(\"value\")})||m(\"value\",function(a,b,c){if(!c&&\"input\"===a.nodeName.toLowerCase())return a.defaultValue});k(function(a){return null==a.getAttribute(\"disabled\")})||m(\"checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped\",function(a,b,c){var d;if(!c)return!0===a[b]?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null});return f}()}", "title": "" }, { "docid": "813c5d92205218d34f6e4d156b16af66", "score": "0.5075044", "text": "function uh(){var a=this;this.ea=new Re(function(){return vh(a)},function(b){var c=vh(a);c&&(fa(b.y)&&(a.ea.scrollY=-c.Mb*b.y-c.gc),a.ea.Ja.setAttribute(\"transform\",\"translate(0,\"+(a.ea.scrollY+c.Lb)+\")\"))});this.ea.kk=!0;this.Tj=[];this.Pb=this.Ia=0;this.Ff=[];this.Cc=[]}", "title": "" }, { "docid": "4c482910afc1005dae3335c54f226928", "score": "0.49457255", "text": "function WRDX(c){var b,a;if(c){b=self;a=c.data}else{b=window}b.WRCy=b.WRCy||function(r,bb){var o=32768;var X=0;var bQ=1;var be=2;var aw=6;var bO=true;var a6=32768;var au=64;var q=1024*8;var I=2*o;var a2=3;var h=258;var aU=16;var w=8192;var bN=13;if(w>a6){alert(\"error: zip_INBUFSIZ is too small\")}if((o<<1)>(1<<aU)){alert(\"error: zip_WSIZE is too large\")}if(bN>aU-1){alert(\"error: zip_HASH_BITS is too large\")}if(bN<8||h!=258){alert(\"error: Code too clever\")}var ay=w;var B=1<<bN;var aD=B-1;var aq=o-1;var aI=0;var a3=4096;var m=h+a2+1;var bz=o-m;var aV=1;var ah=15;var n=7;var bJ=29;var ab=256;var bv=256;var aK=ab+1+bJ;var bc=30;var j=19;var y=16;var aP=17;var af=18;var bw=2*aK+1;var bI=parseInt((bN+a2-1)/a2);var ax;var ao,ak;var k;var bS=null;var bU,aO;var br;var aJ;var d;var bq;var D;var aF;var K;var u;var bV;var ai;var aZ;var aY;var an;var ad;var bk;var aL;var F;var H;var W;var bE;var bh;var x;var Q;var e;var U;var a4;var bF;var al;var aT;var aX;var ap;var aH;var at;var G;var bW;var R;var v;var t;var bT;var N;var bl;var a5;var ac;var a0;var bC;var a9;var bg;var P;var bB;var bX;var bm=null;var aN=false;function bn(){return bm||(bm=new Date())}function l(){return bm=null}function ba(){this.fc=0;this.dl=0}function a1(){this.dyn_tree=null;this.static_tree=null;this.extra_bits=null;this.extra_base=0;this.elems=0;this.max_length=0;this.max_code=0}function bs(bZ,bY,b1,b0){this.good_length=bZ;this.max_lazy=bY;this.nice_length=b1;this.max_chain=b0}function bo(){this.next=null;this.len=0;this.ptr=new Array(q);this.off=0}var bd=new Array(0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0);var bP=new Array(0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13);var aW=new Array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7);var C=new Array(16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15);var bK=new Array(new bs(0,0,0,0),new bs(4,4,8,4),new bs(4,5,16,8),new bs(4,6,32,32),new bs(4,4,16,16),new bs(8,16,32,32),new bs(8,16,128,128),new bs(8,32,128,256),new bs(32,128,258,1024),new bs(32,258,258,4096));function f(bZ){var bY;if(!bZ){bZ=aw}else{if(bZ<1){bZ=1}else{if(bZ>9){bZ=9}}}bh=bZ;k=false;F=false;if(bS!=null){return}ax=ao=ak=null;bS=new Array(q);aJ=new Array(I);d=new Array(ay);bq=new Array(a6+au);D=new Array(1<<aU);e=new Array(bw);for(bY=0;bY<bw;bY++){e[bY]=new ba()}U=new Array(2*bc+1);for(bY=0;bY<2*bc+1;bY++){U[bY]=new ba()}a4=new Array(aK+2);for(bY=0;bY<aK+2;bY++){a4[bY]=new ba()}bF=new Array(bc);for(bY=0;bY<bc;bY++){bF[bY]=new ba()}al=new Array(2*j+1);for(bY=0;bY<2*j+1;bY++){al[bY]=new ba()}aT=new a1();aX=new a1();ap=new a1();aH=new Array(ah+1);at=new Array(2*aK+1);R=new Array(2*aK+1);v=new Array(h-a2+1);t=new Array(512);bT=new Array(bJ);N=new Array(bc);bl=new Array(parseInt(w/8))}function bj(){ax=ao=ak=null;bS=null;aJ=null;d=null;bq=null;D=null;e=null;U=null;a4=null;bF=null;al=null;aT=null;aX=null;ap=null;aH=null;at=null;R=null;v=null;t=null;bT=null;N=null;bl=null}function p(bY){bY.next=ax;ax=bY}function J(){var bY;if(ax!=null){bY=ax;ax=ax.next}else{bY=new bo()}bY.next=null;bY.len=bY.off=0;return bY}function M(bY){return D[o+bY]}function L(bY,bZ){return D[o+bY]=bZ}function bf(bY){bS[aO+bU++]=bY;if(aO+bU==q){aB()}}function az(bY){bY&=65535;if(aO+bU<q-2){bS[aO+bU++]=(bY&255);bS[aO+bU++]=(bY>>>8)}else{bf(bY&255);bf(bY>>>8)}}function aC(){bV=((bV<<bI)^(aJ[bk+a2-1]&255))&aD;ai=M(bV);D[bk&aq]=ai;L(bV,bk)}function V(bZ,bY){Y(bY[bZ].fc,bY[bZ].dl)}function O(bY){return(bY<256?t[bY]:t[256+(bY>>7)])&255}function aR(bZ,b0,bY){return bZ[b0].fc<bZ[bY].fc||(bZ[b0].fc==bZ[bY].fc&&R[b0]<=R[bY])}function aj(b6,b1,b0){var b2,bZ,bY=255,b3,b4,b5=bB.length;for(b2=0;b2<b0&&bX<b5;b2++){bZ=bB.charCodeAt(bX);b3=b1+b2;b4=av(bZ)-1;if((b2+b4)<b0){if(bZ<=127){b6[b3]=(bZ)&bY}else{if(bZ<=2047){b6[b3]=((bZ>>6)|192)&bY;b6[b3+1]=((bZ&63)|128)&bY}else{if(bZ<=65535){b6[b3]=((bZ>>12)|224)&bY;b6[b3+1]=(((bZ>>6)&63)|128)&bY;b6[b3+2]=((bZ&63)|128)&bY}else{b6[b3]=((bZ>>18)|240)&bY;b6[b3+1]=(((bZ>>12)&63)|128)&bY;b6[b3+2]=(((bZ>>6)&63)|128)&bY;b6[b3+3]=((bZ&63)|128)&bY}}}bX++;b2+=b4}else{break}}return b2}function av(bY){if(bY<=127){return 1}else{if(bY<=2047){return 2}else{if(bY<=65535){return 3}}}return 4}function bi(){var bY;for(bY=0;bY<B;bY++){D[o+bY]=0}bE=bK[bh].max_lazy;x=bK[bh].good_length;if(!bO){Q=bK[bh].nice_length}W=bK[bh].max_chain;bk=0;u=0;H=aj(aJ,0,2*o);if(H<=0){F=true;H=0;return}F=false;while(H<m&&!F){aA()}bV=0;for(bY=0;bY<a2-1;bY++){bV=((bV<<bI)^(aJ[bY]&255))&aD}}function aa(b3){var b5=W;var b0=bk;var b1;var b4;var bZ=ad;var b2=(bk>bz?bk-bz:aI);var bY=bk+h;var b7=aJ[b0+bZ-1];var b6=aJ[b0+bZ];if(ad>=x){b5>>=2}do{b1=b3;if(aJ[b1+bZ]!=b6||aJ[b1+bZ-1]!=b7||aJ[b1]!=aJ[b0]||aJ[++b1]!=aJ[b0+1]){continue}b0+=2;b1++;do{}while(aJ[++b0]==aJ[++b1]&&aJ[++b0]==aJ[++b1]&&aJ[++b0]==aJ[++b1]&&aJ[++b0]==aJ[++b1]&&aJ[++b0]==aJ[++b1]&&aJ[++b0]==aJ[++b1]&&aJ[++b0]==aJ[++b1]&&aJ[++b0]==aJ[++b1]&&b0<bY);b4=h-(bY-b0);b0=bY-h;if(b4>bZ){aL=b3;bZ=b4;if(bO){if(b4>=h){break}}else{if(b4>=Q){break}}b7=aJ[b0+bZ-1];b6=aJ[b0+bZ]}}while((b3=D[b3&aq])>b2&&--b5!=0);return bZ}function aA(){var b0,bY;var bZ=I-H-bk;if(bZ==-1){bZ--}else{if(bk>=o+bz){for(b0=0;b0<o;b0++){aJ[b0]=aJ[b0+o]}aL-=o;bk-=o;u-=o;for(b0=0;b0<B;b0++){bY=M(b0);L(b0,bY>=o?bY-o:aI)}for(b0=0;b0<o;b0++){bY=D[b0];D[b0]=(bY>=o?bY-o:aI)}bZ+=o}}if(!F){b0=aj(aJ,bk+H,bZ);if(b0<=0){F=true}else{H+=b0}}}function S(){if(ai!=aI&&bk-ai<=bz){an=aa(ai);if(an>H){an=H}}if(an>=a2){flush=aS(bk-aL,an-a2);H-=an;if(an<=bE){an--;do{bk++;aC()}while(--an!=0);bk++}else{bk+=an;an=0;bV=aJ[bk]&255;bV=((bV<<bI)^(aJ[bk+1]&255))&aD}}else{flush=aS(0,aJ[bk]&255);H--;bk++}if(flush){am(0);u=bk}}function ae(b0){if(!aN){var bZ=bL(ae,b0);while(H!=0&&ao==null){var bY;aC();if(bx(bZ)){return}S();if(bx(bZ)){return}by();if(bx(bZ)){return}}b0()}}function by(){while(H<m&&!F){aA()}}function bx(bZ){if(!bb.async&&bb.useDefer){var bY=new Date()-bn();if(bY>bb.threshold){aN=true;setTimeout(function(){aN=false;l();bZ()},bb.defer);return true}}return false}function bL(bZ,bY){return function(){bZ(bY)}}function bu(){ad=an;aZ=aL;an=a2-1;if(ai!=aI&&ad<bE&&bk-ai<=bz){an=aa(ai);if(an>H){an=H}if(an==a2&&bk-aL>a3){an--}}if(ad>=a2&&an<=ad){var bY;bY=aS(bk-1-aZ,ad-a2);H-=ad-1;ad-=2;do{bk++;aC()}while(--ad!=0);aY=0;an=a2-1;bk++;if(bY){am(0);u=bk}}else{if(aY!=0){if(aS(0,aJ[bk-1]&255)){am(0);u=bk}bk++;H--}else{aY=1;bk++;H--}}}function ar(bZ){if(!aN){var bY=bL(ar,bZ);while(H!=0&&ao==null){aC();if(bx(bY)){return}bu();if(bx(bY)){return}by();if(bx(bY)){return}}bZ()}}function bM(){if(F){return}aF=0;K=0;bp();bi();ao=null;bU=0;aO=0;aY=0;if(bh<=3){ad=a2-1;an=0}else{an=a2-1;aY=0;aY=0}br=false}function T(b4,b1,bZ,b3){var b2,b0;if(!k){bM();k=true;if(H==0){br=true;return b3(0)}}if((b2=bR(b4,b1,bZ))==bZ){return b3(bZ)}if(br){return b3(b2)}b0=bh<=3?ae:ar;b0(function(){b3(bY())});function bY(){if(H==0){if(aY!=0){aS(0,aJ[bk-1]&255)}am(1);br=true}return b2+bR(b4,b2+b1,bZ-b2)}}function bR(b4,b2,bZ){var b3,b0,bY;b3=0;while(ao!=null&&b3<bZ){b0=bZ-b3;if(b0>ao.len){b0=ao.len}for(bY=0;bY<b0;bY++){b4[b2+b3+bY]=ao.ptr[ao.off+bY]}ao.off+=b0;ao.len-=b0;b3+=b0;if(ao.len==0){var b1;b1=ao;ao=ao.next;p(b1)}}if(b3==bZ){return b3}if(aO<bU){b0=bZ-b3;if(b0>bU-aO){b0=bU-aO}for(bY=0;bY<b0;bY++){b4[b2+b3+bY]=bS[aO+bY]}aO+=b0;b3+=b0;if(bU==aO){bU=aO=0}}return b3}function bp(){var b2;var b0;var bZ;var bY;var b1;if(bF[0].dl!=0){return}aT.dyn_tree=e;aT.static_tree=a4;aT.extra_bits=bd;aT.extra_base=ab+1;aT.elems=aK;aT.max_length=ah;aT.max_code=0;aX.dyn_tree=U;aX.static_tree=bF;aX.extra_bits=bP;aX.extra_base=0;aX.elems=bc;aX.max_length=ah;aX.max_code=0;ap.dyn_tree=al;ap.static_tree=null;ap.extra_bits=aW;ap.extra_base=0;ap.elems=j;ap.max_length=n;ap.max_code=0;bZ=0;for(bY=0;bY<bJ-1;bY++){bT[bY]=bZ;for(b2=0;b2<(1<<bd[bY]);b2++){v[bZ++]=bY}}v[bZ-1]=bY;b1=0;for(bY=0;bY<16;bY++){N[bY]=b1;for(b2=0;b2<(1<<bP[bY]);b2++){t[b1++]=bY}}b1>>=7;for(;bY<bc;bY++){N[bY]=b1<<7;for(b2=0;b2<(1<<(bP[bY]-7));b2++){t[256+b1++]=bY}}for(b0=0;b0<=ah;b0++){aH[b0]=0}b2=0;while(b2<=143){a4[b2++].dl=8;aH[8]++}while(b2<=255){a4[b2++].dl=9;aH[9]++}while(b2<=279){a4[b2++].dl=7;aH[7]++}while(b2<=287){a4[b2++].dl=8;aH[8]++}aQ(a4,aK+1);for(b2=0;b2<bc;b2++){bF[b2].dl=5;bF[b2].fc=E(b2,5)}bG()}function bG(){var bY;for(bY=0;bY<aK;bY++){e[bY].fc=0}for(bY=0;bY<bc;bY++){U[bY].fc=0}for(bY=0;bY<j;bY++){al[bY].fc=0}e[bv].fc=1;bg=P=0;a5=ac=a0=0;bC=0;a9=1}function ag(bY,b0){var bZ=at[b0];var b1=b0<<1;while(b1<=G){if(b1<G&&aR(bY,at[b1+1],at[b1])){b1++}if(aR(bY,bZ,at[b1])){break}at[b0]=at[b1];b0=b1;b1<<=1}at[b0]=bZ}function a7(b6){var cb=b6.dyn_tree;var b1=b6.extra_bits;var bY=b6.extra_base;var b7=b6.max_code;var b9=b6.max_length;var ca=b6.static_tree;var b4;var bZ,b0;var b8;var b3;var b5;var b2=0;for(b8=0;b8<=ah;b8++){aH[b8]=0}cb[at[bW]].dl=0;for(b4=bW+1;b4<bw;b4++){bZ=at[b4];b8=cb[cb[bZ].dl].dl+1;if(b8>b9){b8=b9;b2++}cb[bZ].dl=b8;if(bZ>b7){continue}aH[b8]++;b3=0;if(bZ>=bY){b3=b1[bZ-bY]}b5=cb[bZ].fc;bg+=b5*(b8+b3);if(ca!=null){P+=b5*(ca[bZ].dl+b3)}}if(b2==0){return}do{b8=b9-1;while(aH[b8]==0){b8--}aH[b8]--;aH[b8+1]+=2;aH[b9]--;b2-=2}while(b2>0);for(b8=b9;b8!=0;b8--){bZ=aH[b8];while(bZ!=0){b0=at[--b4];if(b0>b7){continue}if(cb[b0].dl!=b8){bg+=(b8-cb[b0].dl)*cb[b0].fc;cb[b0].fc=b8}bZ--}}}function aQ(bZ,b4){var b1=new Array(ah+1);var b0=0;var b2;var b3;for(b2=1;b2<=ah;b2++){b0=((b0+aH[b2-1])<<1);b1[b2]=b0}for(b3=0;b3<=b4;b3++){var bY=bZ[b3].dl;if(bY==0){continue}bZ[b3].fc=E(b1[bY]++,bY)}}function bH(b3){var b6=b3.dyn_tree;var b5=b3.static_tree;var bY=b3.elems;var bZ,b1;var b4=-1;var b0=bY;G=0;bW=bw;for(bZ=0;bZ<bY;bZ++){if(b6[bZ].fc!=0){at[++G]=b4=bZ;R[bZ]=0}else{b6[bZ].dl=0}}while(G<2){var b2=at[++G]=(b4<2?++b4:0);b6[b2].fc=1;R[b2]=0;bg--;if(b5!=null){P-=b5[b2].dl}}b3.max_code=b4;for(bZ=G>>1;bZ>=1;bZ--){ag(b6,bZ)}do{bZ=at[aV];at[aV]=at[G--];ag(b6,aV);b1=at[aV];at[--bW]=bZ;at[--bW]=b1;b6[b0].fc=b6[bZ].fc+b6[b1].fc;if(R[bZ]>R[b1]+1){R[b0]=R[bZ]}else{R[b0]=R[b1]+1}b6[bZ].dl=b6[b1].dl=b0;at[aV]=b0++;ag(b6,aV)}while(G>=2);at[--bW]=at[aV];a7(b3);aQ(b6,b4)}function z(b6,b5){var bZ;var b3=-1;var bY;var b1=b6[0].dl;var b2=0;var b0=7;var b4=4;if(b1==0){b0=138;b4=3}b6[b5+1].dl=65535;for(bZ=0;bZ<=b5;bZ++){bY=b1;b1=b6[bZ+1].dl;if(++b2<b0&&bY==b1){continue}else{if(b2<b4){al[bY].fc+=b2}else{if(bY!=0){if(bY!=b3){al[bY].fc++}al[y].fc++}else{if(b2<=10){al[aP].fc++}else{al[af].fc++}}}}b2=0;b3=bY;if(b1==0){b0=138;b4=3}else{if(bY==b1){b0=6;b4=3}else{b0=7;b4=4}}}}function bA(b6,b5){var bZ;var b3=-1;var bY;var b1=b6[0].dl;var b2=0;var b0=7;var b4=4;if(b1==0){b0=138;b4=3}for(bZ=0;bZ<=b5;bZ++){bY=b1;b1=b6[bZ+1].dl;if(++b2<b0&&bY==b1){continue}else{if(b2<b4){do{V(bY,al)}while(--b2!=0)}else{if(bY!=0){if(bY!=b3){V(bY,al);b2--}V(y,al);Y(b2-3,2)}else{if(b2<=10){V(aP,al);Y(b2-3,3)}else{V(af,al);Y(b2-11,7)}}}}b2=0;b3=bY;if(b1==0){b0=138;b4=3}else{if(bY==b1){b0=6;b4=3}else{b0=7;b4=4}}}}function A(){var bY;z(e,aT.max_code);z(U,aX.max_code);bH(ap);for(bY=j-1;bY>=3;bY--){if(al[C[bY]].dl!=0){break}}bg+=3*(bY+1)+5+5+4;return bY}function s(bZ,bY,b0){var b1;Y(bZ-257,5);Y(bY-1,5);Y(b0-4,4);for(b1=0;b1<b0;b1++){Y(al[C[b1]].dl,3)}bA(e,bZ-1);bA(U,bY-1)}function am(bY){var b0,bZ;var b2;var b3;b3=bk-u;bl[a0]=bC;bH(aT);bH(aX);b2=A();b0=(bg+3+7)>>3;bZ=(P+3+7)>>3;if(bZ<=b0){b0=bZ}if(b3+4<=b0&&u>=0){var b1;Y((X<<1)+bY,3);aE();az(b3);az(~b3);for(b1=0;b1<b3;b1++){bf(aJ[u+b1])}}else{if(bZ==b0){Y((bQ<<1)+bY,3);bt(a4,bF)}else{Y((be<<1)+bY,3);s(aT.max_code+1,aX.max_code+1,b2+1);bt(e,U)}}bG();if(bY!=0){aE()}}function aS(b2,b0){bq[a5++]=b0;if(b2==0){e[b0].fc++}else{b2--;e[v[b0]+ab+1].fc++;U[O(b2)].fc++;d[ac++]=b2;bC|=a9}a9<<=1;if((a5&7)==0){bl[a0++]=bC;bC=0;a9=1}if(bh>2&&(a5&4095)==0){var bY=a5*8;var b1=bk-u;var bZ;for(bZ=0;bZ<bc;bZ++){bY+=U[bZ].fc*(5+bP[bZ])}bY>>=3;if(ac<parseInt(a5/2)&&bY<parseInt(b1/2)){return true}}return(a5==w-1||ac==ay)}function bt(b4,b2){var b6;var bZ;var b0=0;var b7=0;var b3=0;var b5=0;var bY;var b1;if(a5!=0){do{if((b0&7)==0){b5=bl[b3++]}bZ=bq[b0++]&255;if((b5&1)==0){V(bZ,b4)}else{bY=v[bZ];V(bY+ab+1,b4);b1=bd[bY];if(b1!=0){bZ-=bT[bY];Y(bZ,b1)}b6=d[b7++];bY=O(b6);V(bY,b2);b1=bP[bY];if(b1!=0){b6-=N[bY];Y(b6,b1)}}b5>>=1}while(b0<a5)}V(bv,b4)}var a8=16;function Y(bZ,bY){if(K>a8-bY){aF|=(bZ<<K);az(aF);aF=(bZ>>(a8-K));K+=bY-a8}else{aF|=bZ<<K;K+=bY}}function E(b0,bY){var bZ=0;do{bZ|=b0&1;b0>>=1;bZ<<=1}while(--bY>0);return bZ>>1}function aE(){if(K>8){az(aF)}else{if(K>0){bf(aF)}}aF=0;K=0}function aB(){if(bU!=0){var bZ,bY;bZ=J();if(ao==null){ao=ak=bZ}else{ak=ak.next=bZ}bZ.len=bU-aO;for(bY=0;bY<bZ.len;bY++){bZ.ptr[bY]=bS[aO+bY]}bU=aO=0}}var Z=function(b0){var bZ=\"\";for(var bY=0;bY<b0.length;bY++){bZ+=String.fromCharCode(b0[bY])}return bZ};function aG(bY){return bY<26?bY+65:bY<52?bY+71:bY<62?bY-4:bY===62?43:bY===63?47:65}function g(b3){var bZ,b2=\"\";for(var b1=b3.length,bY=0,b0=0;b0<b1;b0++){bZ=b0%3;bY|=b3[b0]<<(16>>>bZ&24);if(bZ===2||b3.length-b0===1){b2+=String.fromCharCode(aG(bY>>>18&63),aG(bY>>>12&63),aG(bY>>>6&63),aG(bY&63));bY=0}}return b2.replace(/A(?=A$|$)/g,\"=\")}function bD(b1,b0,bZ){var bY=b1.slice(b0,bZ);if(!!r.Uint8Array){return new Uint8Array(bY)}return bY}function aM(b2){var bZ=new Array(bb.chunkSize),b1=true,bY=[],b0;if(!aN){bn();T(bZ,0,bZ.length,function(b3){if(b3>0){bY=bD(bZ,0,b3);b1=(b3<bb.chunkSize)}switch(bb.outputType){case\"string\":bY=Z(bY);break;case\"base64\":bY=g(bY);break;default:break}b2.apply(this,[bY,b1]);if(b1){bB=null;return false}})}return true}bB=bb.text;bX=0;if(!bb.level){bb.level=aw}f(bb.level);this.options=bb;this.process=aM};if(a){if(!b.deflate){b.options=a;b.options.async=true;b.options.useDefer=false;b.deflate=new WRCy(self,a)}b.deflate.process(function(){var d=Array.prototype.slice.call(arguments);postMessage(d)})}}", "title": "" }, { "docid": "79bc58f29206bbf7fd81b47a781005a3", "score": "0.49305606", "text": "function ws_flip(c, n, e) {\n var f = jQuery;\n var g = f(this);\n var m = c.cols || Math.round(c.width / 90);\n var l = c.rows || Math.round(c.height / 30);\n var k = f(\"<div>\").addClass(\"ws_effect ws_flip\").css({position: \"absolute\", left: 0, top: 0, width: \"100%\", height: \"100%\", transform: \"translate3d(0,0,0)\"}).appendTo(e.parent());\n var q = [];\n var a = [m * 0.7, m * 2.5];\n var o = [[], []];\n function p(j, w, x) {\n if (!j[x]) {\n j[x] = []\n }\n j[x][j[x].length] = w\n }\n for (var h = 0; h < m * l; h++) {\n var t = h % m, s = Math.floor(h / m);\n var r = q[h] = document.createElement(\"div\");\n f(r).css({position: \"absolute\", overflow: \"hidden\"}).append(f(\"<img>\").css({position: \"absolute\", top: 0, left: 0})).appendTo(k);\n p(o[0], r, 2 * s + t);\n p(o[1], r, Math.abs(h - (m * l >> 1)))\n }\n function v() {\n var z = k.width();\n var B = k.height();\n for (var A = 0; A < m * l; A++) {\n var y = A % m, x = Math.floor(A / m);\n var E = Math.round(z * (y) / m), C = Math.round(B * (x) / l), w = Math.round(z * (y + 1) / m) - E, D = Math.round(B * (x + 1) / l) - C;\n f(q[A]).css({width: w + \"px\", height: D + \"px\", left: E + \"px\", top: C + \"px\"}).data({width: w, height: D})\n }\n }\n function d(w, j, i) {\n if (!c.support.transform) {\n w.each(function (x, y) {\n y = f(y);\n y.animate({width: y.data(\"width\") * 0.8 + \"px\", height: 0}, {easing: \"easeInOutCubic\", duration: j, complete: i})\n })\n } else {\n w.animate({scaleX: 0.8, scaleY: -1}, {easing: \"easeInOutCubic\", duration: j, complete: i})\n }\n }\n function b(w, j, i) {\n if (!c.support.transform) {\n w.each(function (x, y) {\n y = f(y);\n y.animate({width: y.data(\"width\") + \"px\", height: y.data(\"height\") + \"px\"}, {easing: \"easeInOutCubic\", duration: j, complete: i})\n })\n } else {\n w.animate({scaleX: 1, scaleY: 1}, {easing: \"easeInOutCubic\", duration: j, complete: function () {\n w.css({\"-o-transform\": \"none\"});\n if (i) {\n i()\n }\n }})\n }\n }\n var u;\n this.go = function (C, w) {\n if (u) {\n return -1\n }\n u = 1;\n v();\n var j = (\"type\" in c) ? c.type : Math.round(Math.random() * (o.length - 1));\n var i = f(n.get(w));\n i = {width: i.width(), height: i.height(), marginTop: parseFloat(i.css(\"marginTop\")), marginLeft: parseFloat(i.css(\"marginLeft\"))};\n var y = e.width() / m, z = e.height() / l;\n f(q).stop(1, 1).css({opacity: 1, \"z-index\": 3}).find(\"img\").attr(\"src\", n.get(w).src).css(i).each(function (I) {\n var J = I % m, H = Math.floor(I / m);\n f(this).css({left: -y * J, top: -z * H})\n });\n k.show();\n var B = f(\".ws_list\", e);\n B.find(\"img\").css({visibility: \"hidden\"});\n var G = o[j];\n var F = Math.round(a[j]);\n var D = c.duration * 0.9 / (G.length + 2 * F);\n var x = D * F;\n if (c.support.transform) {\n x /= 2\n }\n var A = 0;\n function E() {\n if (A < G.length) {\n d(f(G[A]), x)\n }\n var J = A - F;\n if (J >= 0 && J < G.length) {\n var I = f(G[J]);\n var H;\n if (J >= G.length - 1) {\n H = function () {\n if (u) {\n B.find(\"img\").css({visibility: \"visible\"});\n g.trigger(\"effectEnd\");\n k.hide();\n u = 0\n }\n }\n }\n b(I, x, H);\n I.find(\"img\").attr(\"src\", n.get(C).src)\n }\n A++;\n if (A - F < G.length) {\n setTimeout(E, D)\n }\n }\n E()\n }\n}", "title": "" }, { "docid": "400bd071da7803dfaba2188dc59028b7", "score": "0.49218518", "text": "function ws_rotate(t,e,o){var a,s=jQuery,i=s(this),n=(s(\".ws_list\",o),{position:\"absolute\",left:0,top:0}),c=s(\"<div>\").addClass(\"ws_effect ws_rotate\").css(n).css({height:\"100%\",width:\"100%\",overflow:\"hidden\"}).appendTo(o);this.go=function(o,r){var p=s(e[0]);if(p={width:p.width(),height:p.height(),marginTop:parseFloat(p.css(\"marginTop\")),marginLeft:parseFloat(p.css(\"marginLeft\")),maxHeight:\"none\",maxWidth:\"none\"},a&&a.stop(!0,!0),a=s(e.get(o)).clone().css(n).css(p).appendTo(c),!t.noCross){var d=s(e.get(r)).clone().css(n).css(p).appendTo(c);wowAnimate(d,{opacity:1,rotate:0,scale:1},{opacity:0,rotate:t.rotateOut||180,scale:t.scaleOut||10},t.duration,\"easeInOutExpo\",function(){d.remove()})}wowAnimate(a,{opacity:1,rotate:-(t.rotateIn||180),scale:t.scaleIn||10},{opacity:1,rotate:0,scale:1},t.duration,\"easeInOutExpo\",function(){a.remove(),a=0,i.trigger(\"effectEnd\")})}}", "title": "" }, { "docid": "8197d128882e5f8f4d077e3759fe32f3", "score": "0.4913941", "text": "function o(){function e(e){return e.currentStyle||document.defaultView.getComputedStyle(e)}var t,n={minHeight:200,maxHeight:300,minWidth:100,maxWidth:300},o=document.body,r=document.createTextNode(\"\"),i=document.createElement(\"SPAN\"),a=function(e,t,n){window.attachEvent?e.attachEvent(\"on\"+t,n):e.addEventListener(t,n,!1)},s=function(e,t,n){window.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent(\"on\"+t,n)},l=function(a){var s,l;a?/^[a-zA-Z \\.,\\\\\\/\\|0-9]$/.test(a)||(a=\".\"):a=\"\",void 0!==r.textContent?r.textContent=t.value+a:r.data=t.value+a,i.style.fontSize=e(t).fontSize,i.style.fontFamily=e(t).fontFamily,i.style.whiteSpace=\"pre\",o.appendChild(i),s=i.clientWidth+2,o.removeChild(i),t.style.height=n.minHeight+\"px\",n.minWidth>s?t.style.width=n.minWidth+\"px\":s>n.maxWidth?t.style.width=n.maxWidth+\"px\":t.style.width=s+\"px\",l=t.scrollHeight?t.scrollHeight-1:0,n.minHeight>l?t.style.height=n.minHeight+\"px\":n.maxHeight<l?(t.style.height=n.maxHeight+\"px\",t.style.overflowY=\"visible\"):t.style.height=l+\"px\"},u=function(){window.setTimeout(l,0)},c=function(e){if(e&&e.minHeight)if(\"inherit\"==e.minHeight)n.minHeight=t.clientHeight;else{var o=parseInt(e.minHeight);isNaN(o)||(n.minHeight=o)}if(e&&e.maxHeight)if(\"inherit\"==e.maxHeight)n.maxHeight=t.clientHeight;else{var a=parseInt(e.maxHeight);isNaN(a)||(n.maxHeight=a)}if(e&&e.minWidth)if(\"inherit\"==e.minWidth)n.minWidth=t.clientWidth;else{var s=parseInt(e.minWidth);isNaN(s)||(n.minWidth=s)}if(e&&e.maxWidth)if(\"inherit\"==e.maxWidth)n.maxWidth=t.clientWidth;else{var l=parseInt(e.maxWidth);isNaN(l)||(n.maxWidth=l)}i.firstChild||(i.className=\"autoResize\",i.style.display=\"inline-block\",i.appendChild(r))},d=function(e,o,r){t=e,c(o),\"TEXTAREA\"==t.nodeName&&(t.style.resize=\"none\",t.style.overflowY=\"\",t.style.height=n.minHeight+\"px\",t.style.minWidth=n.minWidth+\"px\",t.style.maxWidth=n.maxWidth+\"px\",t.style.overflowY=\"hidden\"),r&&(a(t,\"change\",l),a(t,\"cut\",u),a(t,\"paste\",u),a(t,\"drop\",u),a(t,\"keydown\",u),a(t,\"focus\",l)),l()};return{init:function(e,t,n){d(e,t,n)},unObserve:function(){s(t,\"change\",l),s(t,\"cut\",u),s(t,\"paste\",u),s(t,\"drop\",u),s(t,\"keydown\",u),s(t,\"focus\",l)},resize:l}}", "title": "" }, { "docid": "b3562788825610190e13d4e95166c908", "score": "0.49065807", "text": "function _0x40df2e(_0x503d61,_0x1e0723){0x0;}", "title": "" }, { "docid": "099172fab3f7516530dc68fbcd2b7aa9", "score": "0.49039966", "text": "function UnitoZg(utext)\n{\n var zgtext = utext;\n\n\n zgtext = zgtext.replace(/\\u104E\\u1004\\u103A\\u1038/g, '\\u104E');\n zgtext = zgtext.replace(/\\u102B\\u103A/g, '\\u105A');\n zgtext = zgtext.replace(/\\u102D\\u1036/g, '\\u108E');\n zgtext = zgtext.replace(/\\u103F/g, '\\u1086');\n\n\n zgtext = zgtext.replace(/(\\u102F[\\u1036]?)\\u1037/g, function($0, $1)\n {\n return $1 ? $1 + '\\u1094' : $0 + $1;\n }\n );\n zgtext = zgtext.replace(/(\\u1030[\\u1036]?)\\u1037/g, function($0, $1)\n {\n return $1 ? $1 + '\\u1094' : $0 + $1;\n }\n );\n zgtext = zgtext.replace(/(\\u1014[\\u103A\\u1032]?)\\u1037/g, function($0, $1)\n {\n return $1 ? $1 + '\\u1094' : $0 + $1;\n }\n );\n zgtext = zgtext.replace(/(\\u103B[\\u1032\\u1036]?)\\u1037/g, function($0, $1)\n {\n return $1 ? $1 + '\\u1095' : $0 + $1;\n }\n );\n\n zgtext = zgtext.replace(/(\\u103D[\\u1032]?)\\u1037/g, function($0, $1)\n {\n return $1 ? $1 + '\\u1095' : $0 + $1;\n }\n );\n\n zgtext = zgtext.replace(/([\\u103B\\u103C\\u103D][\\u102D\\u1036]?)\\u102F/g, function($0, $1)\n {\n return $1 ? $1 + '\\u1033' : $0 + $1;\n }\n );\n zgtext = zgtext.replace(/((\\u1039[\\u1000-\\u1021])[\\u102D\\u1036]?)\\u102F/g, function($0, $1)\n {\n return $1 ? $1 + '\\u1033' : $0 + $1;\n }\n );\n zgtext = zgtext.replace(/([\\u100A\\u100C\\u1020\\u1025\\u1029][\\u102D\\u1036]?)\\u102F/g, function($0, $1)\n {\n return $1 ? $1 + '\\u1033' : $0 + $1;\n }\n );\n zgtext = zgtext.replace(/([\\u103B\\u103C][\\u103D]?[\\u103E]?[\\u102D\\u1036]?)\\u1030/g, function($0, $1)\n {\n return $1 ? $1 + '\\u1034' : $0 + $1;\n\n }\n );\n // uu - 2\n zgtext = zgtext.replace(/((\\u1039[\\u1000-\\u1021])[\\u102D\\u1036]?)\\u1030/g, function($0, $1)\n {\n return $1 ? $1 + '\\u1034' : $0 + $1;\n\n }\n );\n // uu - 2\n zgtext = zgtext.replace(/([\\u100A\\u100C\\u1020\\u1025\\u1029][\\u102D\\u1036]?)\\u1030/g, function($0, $1)\n {\n return $1 ? $1 + '\\u1034' : $0 + $1;\n\n }\n );\n // uu - 2\n\n zgtext = zgtext.replace(/(\\u103C)\\u103E/g, function($0, $1)\n {\n return $1 ? $1 + '\\u1087' : $0 + $1;\n\n }\n );\n // ha - 2\n\n\n zgtext = zgtext.replace(/\\u1009(?=[\\u103A])/g, '\\u1025');\n zgtext = zgtext.replace(/\\u1009(?=\\u1039[\\u1000-\\u1021])/g, '\\u1025');\n\n\n\n // E render\n zgtext = zgtext.replace( /([\\u1000-\\u1021\\u1029])(\\u1039[\\u1000-\\u1021])?([\\u103B-\\u103E\\u1087]*)?\\u1031/g, \"\\u1031$1$2$3\");\n \n // Ra render\n\n zgtext = zgtext.replace( /([\\u1000-\\u1021\\u1029])(\\u1039[\\u1000-\\u1021\\u1000-\\u1021])?(\\u103C)/g, \"$3$1$2\");\n\n\n\n // Kinzi\n zgtext = zgtext.replace(/\\u1004\\u103A\\u1039/g, \"\\u1064\");\n // kinzi\n zgtext = zgtext.replace(/(\\u1064)([\\u1031]?)([\\u103C]?)([\\u1000-\\u1021])\\u102D/g, \"$2$3$4\\u108B\");\n // reordering kinzi lgt\n zgtext = zgtext.replace(/(\\u1064)(\\u1031)?(\\u103C)?([ \\u1000-\\u1021])\\u102E/g, \"$2$3$4\\u108C\");\n // reordering kinzi lgtsk\n zgtext = zgtext.replace(/(\\u1064)(\\u1031)?(\\u103C)?([ \\u1000-\\u1021])\\u1036/g, \"$2$3$4\\u108D\");\n // reordering kinzi ttt\n zgtext = zgtext.replace(/(\\u1064)(\\u1031)?(\\u103C)?([ \\u1000-\\u1021])/g, \"$2$3$4\\u1064\");\n // reordering kinzi\n\n // Consonant\n\n zgtext = zgtext.replace(/\\u100A(?=[\\u1039\\u102F\\u1030])/g, \"\\u106B\");\n // nnya - 2\n zgtext = zgtext.replace(/\\u100A/g, \"\\u100A\");\n // nnya\n\n zgtext = zgtext.replace(/\\u101B(?=[\\u102F\\u1030])/g, \"\\u1090\");\n // ra - 2\n zgtext = zgtext.replace(/\\u101B/g, \"\\u101B\");\n // ra\n\n zgtext = zgtext.replace(/\\u1014(?=[\\u1039\\u103D\\u103E\\u102F\\u1030])/g, \"\\u108F\");\n // na - 2\n zgtext = zgtext.replace(/\\u1014/g, \"\\u1014\");\n // na\n\n // Stacked consonants\n zgtext = zgtext.replace(/\\u1039\\u1000/g, \"\\u1060\");\n zgtext = zgtext.replace(/\\u1039\\u1001/g, \"\\u1061\");\n zgtext = zgtext.replace(/\\u1039\\u1002/g, \"\\u1062\");\n zgtext = zgtext.replace(/\\u1039\\u1003/g, \"\\u1063\");\n zgtext = zgtext.replace(/\\u1039\\u1005/g, \"\\u1065\");\n zgtext = zgtext.replace(/\\u1039\\u1006/g, \"\\u1066\");\n // 1067\n zgtext = zgtext.replace(/([\\u1001\\u1002\\u1004\\u1005\\u1007\\u1012\\u1013\\u108F\\u1015\\u1016\\u1017\\u1019\\u101D])\\u1066/g, function($0, $1)\n {\n return $1 ? $1 + '\\u1067' : $0 + $1;\n\n }\n );\n // 1067\n zgtext = zgtext.replace(/\\u1039\\u1007/g, \"\\u1068\");\n zgtext = zgtext.replace(/\\u1039\\u1008/g, \"\\u1069\");\n\n zgtext = zgtext.replace(/\\u1039\\u100F/g, \"\\u1070\");\n zgtext = zgtext.replace(/\\u1039\\u1010/g, \"\\u1071\");\n // 1072 omit (little shift to right)\n zgtext = zgtext.replace(/([\\u1001\\u1002\\u1004\\u1005\\u1007\\u1012\\u1013\\u108F\\u1015\\u1016\\u1017\\u1019\\u101D])\\u1071/g, function($0, $1)\n {\n return $1 ? $1 + '\\u1072' : $0 + $1;\n\n }\n );\n // 1067\n zgtext = zgtext.replace(/\\u1039\\u1011/g, \"\\u1073\");\n // \\u1074 omit(little shift to right)\n zgtext = zgtext.replace(/([\\u1001\\u1002\\u1004\\u1005\\u1007\\u1012\\u1013\\u108F\\u1015\\u1016\\u1017\\u1019\\u101D])\\u1073/g, function($0, $1)\n {\n return $1 ? $1 + '\\u1074' : $0 + $1;\n\n }\n );\n // 1067\n zgtext = zgtext.replace(/\\u1039\\u1012/g, \"\\u1075\");\n zgtext = zgtext.replace(/\\u1039\\u1013/g, \"\\u1076\");\n zgtext = zgtext.replace(/\\u1039\\u1014/g, \"\\u1077\");\n zgtext = zgtext.replace(/\\u1039\\u1015/g, \"\\u1078\");\n zgtext = zgtext.replace(/\\u1039\\u1016/g, \"\\u1079\");\n zgtext = zgtext.replace(/\\u1039\\u1017/g, \"\\u107A\");\n zgtext = zgtext.replace(/\\u1039\\u1018/g, \"\\u107B\");\n zgtext = zgtext.replace(/\\u1039\\u1019/g, \"\\u107C\");\n zgtext = zgtext.replace(/\\u1039\\u101C/g, \"\\u1085\");\n\n\n zgtext = zgtext.replace(/\\u100F\\u1039\\u100D/g, \"\\u1091\");\n zgtext = zgtext.replace(/\\u100B\\u1039\\u100C/g, \"\\u1092\");\n zgtext = zgtext.replace(/\\u1039\\u100C/g, \"\\u106D\");\n zgtext = zgtext.replace(/\\u100B\\u1039\\u100B/g, \"\\u1097\");\n zgtext = zgtext.replace(/\\u1039\\u100B/g, \"\\u106C\");\n zgtext = zgtext.replace(/\\u100E\\u1039\\u100D/g, \"\\u106F\");\n zgtext = zgtext.replace(/\\u100D\\u1039\\u100D/g, \"\\u106E\");\n\n zgtext = zgtext.replace(/\\u1009(?=\\u103A)/g, \"\\u1025\");\n // u\n zgtext = zgtext.replace(/\\u1025(?=[\\u1039\\u102F\\u1030])/g, \"\\u106A\");\n // u - 2\n zgtext = zgtext.replace(/\\u1025/g, \"\\u1025\");\n // u\n /////////////////////////////////////\n\n zgtext = zgtext.replace(/\\u103A/g, \"\\u1039\");\n // asat\n\n zgtext = zgtext.replace(/\\u103B\\u103D\\u103E/g, \"\\u107D\\u108A\");\n // ya wa ha\n zgtext = zgtext.replace(/\\u103D\\u103E/g, \"\\u108A\");\n // wa ha\n \n zgtext = zgtext.replace(/\\u103E\\u102F/g, '\\u1088');//ha u\n \n zgtext = zgtext.replace(/\\u103E\\u1030/g, '\\u1089');//ha uu\n\n zgtext = zgtext.replace(/\\u103B/g, \"\\u103A\");\n // ya\n zgtext = zgtext.replace(/\\u103C/g, \"\\u103B\");\n // ra\n zgtext = zgtext.replace(/\\u103D/g, \"\\u103C\");\n // wa\n zgtext = zgtext.replace(/\\u103E/g, \"\\u103D\");\n // ha\n zgtext = zgtext.replace(/\\u103A(?=[\\u103C\\u103D\\u108A])/g, \"\\u107D\");\n // ya - 2\n\n zgtext = zgtext.replace(/(\\u100A(?:[\\u102D\\u102E\\u1036\\u108B\\u108C\\u108D\\u108E])?)\\u103D/g, function($0, $1)\n {\n // return $1 ? $1 + '\\u1087 ' : $0 + $1;\n return $1 ? $1 + '\\u1087' : $0 ;\n\n }\n );\n // ha - 2\n\n zgtext = zgtext.replace(/\\u103B(?=[\\u1000\\u1003\\u1006\\u100F\\u1010\\u1011\\u1018\\u101A\\u101C\\u101E\\u101F\\u1021])/g, \"\\u107E\");\n // great Ra with wide consonants\n zgtext = zgtext.replace(/\\u107E([\\u1000-\\u1021\\u108F])(?=[\\u102D\\u102E\\u1036\\u108B\\u108C\\u108D\\u108E])/g, \"\\u1080$1\");\n // great Ra with upper sign\n zgtext = zgtext.replace(/\\u107E([\\u1000-\\u1021\\u108F])(?=[\\u103C\\u108A])/g, \"\\u1082$1\");\n // great Ra with under signs\n\n zgtext = zgtext.replace(/\\u103B([\\u1000-\\u1021\\u108F])(?=[\\u102D \\u102E \\u1036 \\u108B \\u108C \\u108D \\u108E])/g, \"\\u107F$1\");\n // little Ra with upper sign\n\n zgtext = zgtext.replace(/\\u103B([\\u1000-\\u1021\\u108F])(?=[\\u103C\\u108A])/g, \"\\u1081$1\");\n // little Ra with under signs\n\n zgtext = zgtext.replace(/(\\u1014[\\u103A\\u1032]?)\\u1037/g, function($0, $1)\n {\n return $1 ? $1 + '\\u1094' : $0 + $1;\n\n }\n );\n // aukmyint\n zgtext = zgtext.replace(/(\\u1033[\\u1036]?)\\u1094/g, function($0, $1)\n {\n return $1 ? $1 + '\\u1095' : $0 + $1;\n\n }\n );\n // aukmyint\n zgtext = zgtext.replace(/(\\u1034[\\u1036]?)\\u1094/g, function($0, $1)\n {\n return $1 ? $1 + '\\u1095' : $0 + $1;\n\n }\n );\n // aukmyint\n zgtext = zgtext.replace(/([\\u103C\\u103D\\u108A][\\u1032]?)\\u1037/g, function($0, $1)\n {\n return $1 ? $1 + '\\u1095' : $0 + $1;\n\n }\n );\n // aukmyint\n return zgtext;\n\n}", "title": "" }, { "docid": "db57eb8551e2b1b51c4629803cb1bd23", "score": "0.48880395", "text": "function r(){function e(e){return e.currentStyle||document.defaultView.getComputedStyle(e)}var t,n={minHeight:200,maxHeight:300,minWidth:100,maxWidth:300},r=document.body,o=document.createTextNode(\"\"),i=document.createElement(\"SPAN\"),s=function(e,t,n){window.attachEvent?e.attachEvent(\"on\"+t,n):e.addEventListener(t,n,!1)},a=function(e,t,n){window.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent(\"on\"+t,n)},l=function(s){var a,l;s?/^[a-zA-Z \\.,\\\\\\/\\|0-9]$/.test(s)||(s=\".\"):s=\"\",void 0!==o.textContent?o.textContent=t.value+s:o.data=t.value+s,i.style.fontSize=e(t).fontSize,i.style.fontFamily=e(t).fontFamily,i.style.whiteSpace=\"pre\",r.appendChild(i),a=i.clientWidth+2,r.removeChild(i),t.style.height=n.minHeight+\"px\",n.minWidth>a?t.style.width=n.minWidth+\"px\":a>n.maxWidth?t.style.width=n.maxWidth+\"px\":t.style.width=a+\"px\",l=t.scrollHeight?t.scrollHeight-1:0,n.minHeight>l?t.style.height=n.minHeight+\"px\":n.maxHeight<l?(t.style.height=n.maxHeight+\"px\",t.style.overflowY=\"visible\"):t.style.height=l+\"px\"},u=function(){window.setTimeout(l,0)},c=function(e){if(e&&e.minHeight)if(\"inherit\"==e.minHeight)n.minHeight=t.clientHeight;else{var r=parseInt(e.minHeight);isNaN(r)||(n.minHeight=r)}if(e&&e.maxHeight)if(\"inherit\"==e.maxHeight)n.maxHeight=t.clientHeight;else{var s=parseInt(e.maxHeight);isNaN(s)||(n.maxHeight=s)}if(e&&e.minWidth)if(\"inherit\"==e.minWidth)n.minWidth=t.clientWidth;else{var a=parseInt(e.minWidth);isNaN(a)||(n.minWidth=a)}if(e&&e.maxWidth)if(\"inherit\"==e.maxWidth)n.maxWidth=t.clientWidth;else{var l=parseInt(e.maxWidth);isNaN(l)||(n.maxWidth=l)}i.firstChild||(i.className=\"autoResize\",i.style.display=\"inline-block\",i.appendChild(o))},d=function(e,r,o){t=e,c(r),\"TEXTAREA\"==t.nodeName&&(t.style.resize=\"none\",t.style.overflowY=\"\",t.style.height=n.minHeight+\"px\",t.style.minWidth=n.minWidth+\"px\",t.style.maxWidth=n.maxWidth+\"px\",t.style.overflowY=\"hidden\"),o&&(s(t,\"change\",l),s(t,\"cut\",u),s(t,\"paste\",u),s(t,\"drop\",u),s(t,\"keydown\",u),s(t,\"focus\",l)),l()};return{init:function(e,t,n){d(e,t,n)},unObserve:function(){a(t,\"change\",l),a(t,\"cut\",u),a(t,\"paste\",u),a(t,\"drop\",u),a(t,\"keydown\",u),a(t,\"focus\",l)},resize:l}}", "title": "" }, { "docid": "be78fd9583a71504e002024ce1afa399", "score": "0.48834696", "text": "function pV(a,b,c,d,e,f,g,k,l,n){if(ea[ud]){this.sta=n?n:kwa;t:{n=this.sta;var p=ea[Fc][Kc]||ea[Fc].hash;if(null==n)n=p;else{if(p)for(var p=p[we](1)[zc](We),t=0;t<p[J];t++)if(p[t][we](0,p[t][zd](If))==n){n=p[t][we](p[t][zd](If)+1);break t}n=M}}this.pta=n;this.ca={};this.en={};this.attributes=[];a&&this[v](xD,a);b&&this[v](mH,b);c&&this[v](pi,c);d&&this[v](gh,d);e&&this[v](OC,new qV(e[qc]()[zc](mf)));t:if(a=new qV([0,0,0]),Rx.plugins&&Rx.mimeTypes[J])(b=Rx.plugins[SAa])&&b.description&&(a=new qV(b.description[Ab](/([a-zA-Z]|\\s)+/,\nM)[Ab](/(\\s+r|\\s+b[0-9]+)/,mf)[zc](mf)));else if(Rx[Cc]&&0<=Rx[Cc][zd](tAa))for(b=1,c=3;b;)try{c++,b=new ActiveXObject(QAa+c),a=new qV([c,0,0])}catch(u){b=null}else{b=null;try{b=new ActiveXObject(OAa)}catch(x){try{b=new ActiveXObject(PAa),a=new qV([6,0,21]),b.Wya=WK}catch(A){if(6==a.UE)break t}try{b=new ActiveXObject(RAa)}catch(C){}}null!=b&&(a=new qV(b.GetVariable(MEa)[zc](Ke)[1][zc](jf)))}this.DU=a;!ba.opera&&ea.all&&7<this.DU.UE&&(GKa=!0);f&&(this.ca.bgcolor=f);this.ca.quality=g?g:wH;this[v](bna,\n!1);this[v](DI,!1);this[v](Gma,k?k:ba[Fc]);this[v](dF,M);l&&this[v](dF,l)}}", "title": "" }, { "docid": "2e8776e838185eefa753dc60f968e1bf", "score": "0.48762223", "text": "function XF(){}", "title": "" }, { "docid": "b0265b79205a9f2c51e7021dfa07588e", "score": "0.48697448", "text": "function Ot(t){var{fallback:e}=t,s=function(t,e){var n={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.indexOf(s)<0&&(n[s]=t[s]);if(null!=t&&\"function\"==typeof Object.getOwnPropertySymbols){var o=0;for(s=Object.getOwnPropertySymbols(t);o<s.length;o++)e.indexOf(s[o])<0&&Object.prototype.propertyIsEnumerable.call(t,s[o])&&(n[s[o]]=t[s[o]])}return n}(t,[\"fallback\"]);const o=new Map,r=new Map;function c(t,o,r){return(c,a)=>(t.set(a.key,{rect:c.getBoundingClientRect()}),()=>{if(o.has(a.key)){const{rect:t}=o.get(a.key);return o.delete(a.key),function(t,e,o){const{delay:r=0,duration:c=(t=>30*Math.sqrt(t)),easing:a=St}=n(n({},s),o),u=e.getBoundingClientRect(),l=t.left-u.left,h=t.top-u.top,p=t.width/u.width,d=t.height/u.height,f=Math.sqrt(l*l+h*h),m=getComputedStyle(e),g=\"none\"===m.transform?\"\":m.transform,y=+m.opacity;return{delay:r,duration:i(c)?c(f):c,easing:a,css:(t,e)=>`\\n\\t\\t\\t\\topacity: ${t*y};\\n\\t\\t\\t\\ttransform-origin: top left;\\n\\t\\t\\t\\ttransform: ${g} translate(${e*l}px,${e*h}px) scale(${t+(1-t)*p}, ${t+(1-t)*d});\\n\\t\\t\\t`}}(t,c,a)}return t.delete(a.key),e&&e(c,a,r)})}return[c(r,o,!1),c(o,r,!0)]}", "title": "" }, { "docid": "6e9d36a80e06d6f142c921149c7ad6ae", "score": "0.48545507", "text": "function zh(a,b){this.h=a;this.n=null;this.type=b;this.P=this.tb=0;this.jb=a.p.qj;this.$f=!this.jb;this.yb=!1}", "title": "" }, { "docid": "f6af9f23fd56a1e24778bf5e9a9cbdca", "score": "0.48347065", "text": "function Li(t,e,n){if(!t||!t.parentNode||(Di||Ei(t)).documentElement===t)return new Pi;var i=function(t){for(var e,n;t&&t!==vi;)(n=t._gsap)&&!n.scaleX&&!n.scaleY&&n.renderTransform&&(n.scaleX=n.scaleY=1e-4,n.renderTransform(1,n),e?e.push(n):e=[n]),t=t.parentNode;return e}(t.parentNode),r=Ai(t)?Ti:ki,o=Bi(t,n),s=r[0].getBoundingClientRect(),a=r[1].getBoundingClientRect(),u=r[2].getBoundingClientRect(),l=o.parentNode,c=Mi(t),h=new Pi((a.left-s.left)/100,(a.top-s.top)/100,(u.left-s.left)/100,(u.top-s.top)/100,s.left+(c?0:gi.pageXOffset||Di.scrollLeft||mi.scrollLeft||vi.scrollLeft||0),s.top+(c?0:gi.pageYOffset||Di.scrollTop||mi.scrollTop||vi.scrollTop||0));if(l.removeChild(o),i)for(s=i.length;s--;)(a=i[s]).scaleX=a.scaleY=0,a.renderTransform(1,a);return e?h.inverse():h}", "title": "" }, { "docid": "458e554edf9cb1c6bb91e37a619a688c", "score": "0.48319712", "text": "function ma() {\n var tsfh = \"\\!\\@\\#\\$\\%\\^\\&\\*\\(\\)\\-\\_\\+\\=\\{\\}\\[\\]\\'\\<\\>\\?\\:\\;\\\"\\~\\,\\.\\/\";\n var tsfh=\"\"\n var qianzhui = \".\";\n var houzhui = \"90cba\";\n\n\n // this.bm = function (str) {\n // var ass = str; var bb = \"\";\n // try {\n\n // for (i = 0; i < tsfh.length; i++) {\n\n // // str = str.replace(/sz3[i]/g, sz4[i]);\n\n // // ass=ass.split(sz3[i]).join(sz4[i]);\n // var th = qianzhui + i + houzhui; //alert(th);\n // var thq = tsfh.substring(i, i + 1);// alert(thq);\n // bb = ass.replace(new RegExp(thq, 'g'), th);\n // }\n\n\n // } catch (e) {\n // // alert(e);\n // }\n\n // return bb;\n // }\n //this.jm = function (str) {\n // var ass = str;\n // try {\n // ass = ass.replace(/_b001b_/g, '&');\n // ass = ass.replace(/_b002b_/g, \"\\\\\");\n // for (i = 0; i < sz3.length; i++) {\n\n // // str = str.replace(/sz4[i]/g, sz3[i]);\n // // str= str.split(sz4[i]).join(sz3[i]);\n // ass = ass.replace(new RegExp(sz4[i], 'g'), sz3[i]);\n // }\n \n //} catch (e) { }\n // return ass;\n // }\n\n this.bm = function (str) {\n // return str;\n // var ss = \"\";\n // 33-47 58-64 91-96 123-126\n try {\n var fh = \"\"; var dg = \"\"; var asc = 0;\n for (i = 0; i < str.length; i++) {\n dg = str.substring(i, i + 1);\n try {\n asc = parseInt(str.charCodeAt(i));\n if ((asc < 48) || (asc > 90 && asc < 97) || (asc > 122 && asc < 127) || (asc > 57 && asc < 65)) {\n var s000 = asc.toString();\n if (asc < 100) { s000 = \"0\" + s000; }\n fh += qianzhui + s000;\n }\n else {\n fh += dg;\n }\n } catch (e) {\n fh += dg;\n }\n\n }\n return encodeURI(encodeURI(fh));\n } catch (e) { return str; }\n\n //var ascii = str.charCodeAt();\n //return ascii;\n\n }\n\n this.jm = function (str) {\n \n var fh = \"\"; var youb = \"\";\n str = decodeURI(decodeURI(str));\n var array = str.split(qianzhui);\n for (i = 0; i < array.length; i++) {\n if (i > 0) {\n try {\n youb = array[i].substring(0, 3);\n array[i] = array[i].replace(youb, String.fromCharCode(youb));\n } catch (e) { }\n }\n fh += array[i];\n }\n //for (i = 0; i < str.length; i++) {\n // yb=fh.indexOf(qianzhui);\n // if (yb > -1) {\n // try {\n // fh = fh.replace(fh.substring(yb, qianzhui.length + 3), String.fromCharCode(fh.substring(yb + qianzhui.length, qianzhui.length + 3)));\n\n // } catch (e) { }\n // } \n\n //}\n return fh;\n\n }\n\n}", "title": "" }, { "docid": "acd6d093cb07ee68cf59a2e5084ae3bc", "score": "0.48271337", "text": "function Ae(){if(da)r.innerHTML=ea;else if(fa)r.innerHTML=fa;Be();Za&&bb.call(window,Za);hb();Za=-1;Wa=[];Xa={};Hb=i;Fb=0;Gb=[];x.zc();document.documentElement.className=\"js no-treesaver\";document.documentElement.style.display=\"block\"}", "title": "" }, { "docid": "d7f22505e672518e97ca07e73d39a293", "score": "0.4823789", "text": "function S(){function e(e){t.Extends(f,e),i(e.jQuery),t._base.name(\"Zambezi\"),n=t._base,a=n.config}function i(e){r=e,o=e}var t=new I(this);this.LocalSVNRevision=\"$Rev: 3172 $\";var n,a,r,o;t.Override(\"buildHtml\",function(){var e='<div id=\"{{id}}\" class=\"walkme-direction-{{direction}} walkme-player walkme-zambezi walkme-theme-{{theme}} walkme-position-major-{{positionMajor}} walkme-position-minor-{{positionMinor}} {{accessibleClass}}\"></div>',i=n.mustache().to_html(e,{id:n.id(),direction:a().Direction,positionMajor:n.positionMajor(),positionMinor:n.positionMinor(),theme:a().TriangleTheme,accessibleClass:n.accessibleClass()});return i});e.apply(null,arguments)}", "title": "" }, { "docid": "d3f7476ec47be0dec45e774657b5f032", "score": "0.4814852", "text": "function Ht(e,t){dt(t||{},Li),Yi||(Nt(),Yi=!0);var o=Ue({},Li,t);// If they are specifying a virtual positioning reference, we need to polyfill\n// some native DOM props\n$e(e)&&Ge(e);var r=Ze(e).reduce(function(e,t){var r=t&&Yt(t,o);return r&&e.push(r),e},[]);return rt(e)?r[0]:r}", "title": "" }, { "docid": "42d5be49365fd015114273105698dd97", "score": "0.48036376", "text": "function ws_seven(m,A,o){var p=jQuery;var w=p(this);var n=m.distance||5;var d=m.cols;var z=m.rows;var a=m.duration*2;var q=m.blur||50;var E=o.find(\".ws_list\");var x=p(\"<div>\").css({position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\"});var c=x.clone().css(\"overflow\",\"hidden\");x.addClass(\"ws_effect ws_seven\");var t=!m.noCanvas&&!window.opera&&!!document.createElement(\"canvas\").getContext;var l;var e=p(\"<div>\").addClass(\"ws_parts\").css({position:\"absolute\",width:\"100%\",height:\"100%\",left:0,top:0,zIndex:8,transform:\"translate3d(0,0,0)\"});var B=p(\"<div>\").addClass(\"ws_zoom\").css({position:\"absolute\",width:\"100%\",height:\"100%\",top:0,left:0,zIndex:2,transform:\"translate3d(0,0,0)\"});x.append(e,B,c).appendTo(o);var f={t:p(window).scrollTop(),l:p(window).scrollLeft(),w:p(window).width(),h:p(window).height()};var D=Math.max((m.width||e.width())/(m.height||e.height())||3,3);d=d||Math.round(D<1?3:3*D);z=z||Math.round(D<1?3/D:3);var J=[];var y=[];for(var v=0;v<d*z;v++){var H=v%d;var G=Math.floor(v/d);p(J[v]=p(\"<div>\")[0]).css({position:\"absolute\",overflow:\"hidden\",transform:\"translate3d(0,0,0)\"}).appendTo(e).append(p(\"<img>\").css({position:\"absolute\",transform:\"translate3d(0,0,0)\"}));p(y[v]=p(\"<div>\")[0]).css({position:\"absolute\",overflow:\"hidden\",transform:\"translate3d(0,0,0)\"}).appendTo(B).append(p(\"<img>\").css({position:\"absolute\",transform:\"translate3d(0,0,0)\"}))}J=p(J);y=p(y);jQuery.extend(jQuery.easing,{easeOutQuart:function(j,K,i,M,L){return -M*((K=K/L-1)*K*K*K-1)+i},easeInExpo:function(j,K,i,M,L){return(K==0)?i:M*Math.pow(2,10*(K/L-1))+i},easeInCirc:function(j,K,i,M,L){return -M*(Math.sqrt(1-(K/=L)*K)-1)+i}});function s(j,i){return Math.abs((i%2?1:0)+((i-i%2)/2)-j)/i}function I(M,L,N,i){var K=(L>=i)?(i)/(L):1;var j=(M>=N)?(N)/(M):1;return{l:j,t:K,m:Math.min(j,K)}}function k(j,L){var K=0;for(var i in j){(function(N,O){var M=O[N];wowAnimate(M.item,M.begin,M.end,M.duration,M.delay,M.easing,function(){if(M.callback){M.callback()}K++;if(K==O.length&&L){L()}})}(i,j))}}function u(U,i,j,M,W){var Q=e.width(),S=e.height(),T=n*Q/d,O=n*S/z,P=a*(M?4:5)/(d*z),L=M?\"easeInExpo\":\"easeOutQuart\";var K=f.h+f.t-S/z,R=f.w+f.l-Q/d,X=e.offset().top+e.height(),N=e.offset().left+e.width();if(K<X){K=X}if(R<N){R=N}var V=[];p(U).each(function(af){var ac=af%d,Z=Math.floor(af/d),ad=a*0.2*(s(ac,d)*45+Z*4)/(d*z),ab=e.offset().left+f.l+T*ac-Q*n/2+T,ae=e.offset().top+f.t+O*Z-S*n/2+O,Y=I(ab,ae,R,K);if(m.support.transform){var ag={opacity:1,translate:[Q*ac/d,S*Z/z,0],scale:1,width:Q/d,height:S/z,zIndex:Math.ceil(100-s(ac,d)*100)},aj={opacity:0,translate:[(T*ac-Q*n/2.115)*Y.l,(O*Z-S*n/2.115)*Y.t,0],scale:n*Y.m,width:Q/d,height:S/z,zIndex:Math.ceil(100-s(ac,d)*100)};p(this).find(\"img\").css({transform:\"translate3d(\"+(-Q*ac/d+j.marginLeft)+\"px,\"+(-S*Z/z+j.marginTop)+\"px,0px)\",width:j.width,height:j.height})}else{var ag={opacity:1,left:Q*ac/d,top:S*Z/z,width:Q/d,height:S/z,zIndex:Math.ceil(100-s(ac,d)*100)},aj={opacity:0,left:(T*ac-Q*n/2)*Y.l,top:(O*Z-S*n/2)*Y.t,width:T*Y.m,height:O*Y.m},ai={left:-(Q*ac/d)+j.marginLeft,top:-(S*Z/z)+j.marginTop,width:j.width,height:j.height},ah={left:-n*(Q/d*ac-j.marginLeft)*Y.m,top:-n*(S/z*Z-j.marginTop)*Y.m,width:n*j.width*Y.m,height:n*j.height*Y.m}}if(!M){var aa=ag;ag=aj;aj=aa;aa=ai;ai=ah;ah=aa}V.push({item:p(this).show(),begin:ag,end:aj,easing:L,delay:ad,duration:P,callback:M?function(){this.item.hide()}:0});if(ai){V.push({item:p(this).find(\"img\"),begin:ai,end:ah,easing:L,delay:ad,duration:P})}});if(M){p(i).each(function(ac){var Z=ac%d;var Y=Math.floor(ac/d);var aa=a*0.2+a*0.15*(s(Z,d)*35+Y*4)/(d*z);var ab=a*4/(d*z);if(m.support.transform){var ad={opacity:0,translate:[Q/2,S/2,0],scale:0,width:Q/d,height:S/z,zIndex:Math.ceil(100-s(Z,d)*100)},af={opacity:1,translate:[Q*Z/d,S*Y/z,0],scale:1,width:Q/d,height:S/z,zIndex:Math.ceil(100-s(Z,d)*100)};p(this).find(\"img\").css({transform:\"translate3d(\"+(-Q*Z/d+j.marginLeft)+\"px,\"+(-S*Y/z+j.marginTop)+\"px,0px)\",width:j.width,height:j.height})}else{var ad={left:Q/2,top:S/2,width:0,height:0,zIndex:Math.ceil(100-s(Z,d)*100)},af={left:Q*Z/d,top:S*Y/z,width:Q/d,height:S/z},ag={left:0,top:0,width:0,height:0},ae={left:-Q*Z/d+j.marginLeft,top:-S*Y/z+j.marginTop,width:j.width,height:j.height}}V.push({item:p(this),begin:ad,end:af,easing:\"easeOutBack\",delay:aa,duration:ab});if(ag){V.push({item:p(this).find(\"img\"),begin:ag,end:ae,easing:\"easeOutBack\",delay:aa,duration:ab})}});B.delay(a*0.1).animate({opacity:1},a*0.2,\"easeInCirc\")}k(V,W);return{stop:function(){W()}}}var h;this.go=function(i,j,M){if(h){return j}if(M==undefined){M=(j==0&&i!=j+1)||(i==j-1)?false:true}f.t=p(window).scrollTop();f.l=p(window).scrollLeft();f.w=p(window).width();f.h=p(window).height();var N=p(A.get(j));N={width:N.width(),height:N.height(),marginTop:parseFloat(N.css(\"marginTop\")),marginLeft:parseFloat(N.css(\"marginLeft\"))};J.find(\"img\").attr(\"src\",A.get(M?j:i).src);y.find(\"img\").attr(\"src\",A.get(i).src);e.show();if(M){B.show()}var L=0;if(M){if(t){try{document.createElement(\"canvas\").getContext(\"2d\").getImageData(0,0,1,1)}catch(K){t=0}l='<canvas width=\"'+x.width+'\" height=\"'+x.height+'\"/>';l=p(l).css({\"z-index\":1,position:\"absolute\",left:0,top:0}).css(N).appendTo(c);L=F(p(A.get(j)),N,q,l.get(0))}if(!t||!L){t=0;L=F(p(A.get(j)),N,8);if(l){l.remove();l=0}}}h=new u(J,y,N,M,function(){w.trigger(\"effectEnd\");e.hide();B.hide();if(l){l.remove()}else{if(L){L.remove()}}h=0})};function F(P,K,O,L){var S=(parseInt(P.parent().css(\"z-index\"))||0)+1;if(t){var V=L.getContext(\"2d\");V.drawImage(P.get(0),0,0,K.width,K.height);if(!b(V,0,0,L.width,L.height,O)){return 0}return p(L)}var W=p(\"<div></div>\").css({position:\"absolute\",\"z-index\":S,left:0,top:0,overflow:\"hidden\"}).css(K).appendTo(c);var U=(Math.sqrt(5)+1)/2;var M=1-U/2;for(var N=0;M*N<O;N++){var Q=Math.PI*U*N;var j=(M*N+1);var T=j*Math.cos(Q);var R=j*Math.sin(Q);p(document.createElement(\"img\")).attr(\"src\",P.attr(\"src\")).css({opacity:1/(N/1.8+1),position:\"absolute\",\"z-index\":S,left:Math.round(T)+\"px\",top:Math.round(R)+\"px\",width:\"100%\",height:\"100%\"}).appendTo(W)}return W}var r=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259];var C=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function b(az,ag,ae,j,K,ap){if(isNaN(ap)||ap<1){return}ap|=0;var au;try{au=az.getImageData(ag,ae,j,K)}catch(ay){console.log(\"error:unable to access image data: \"+ay);return false}var O=au.data;var an,am,aw,at,V,Y,S,M,N,ad,T,af,ab,aj,ao,W,R,X,Z,ai;var ax=ap+ap+1;var ak=j<<2;var U=j-1;var ar=K-1;var Q=ap+1;var aq=Q*(Q+1)/2;var ah=new g();var ac=ah;for(aw=1;aw<ax;aw++){ac=ac.next=new g();if(aw==Q){var P=ac}}ac.next=ah;var av=null;var al=null;S=Y=0;var aa=r[ap];var L=C[ap];for(am=0;am<K;am++){aj=ao=W=M=N=ad=0;T=Q*(R=O[Y]);af=Q*(X=O[Y+1]);ab=Q*(Z=O[Y+2]);M+=aq*R;N+=aq*X;ad+=aq*Z;ac=ah;for(aw=0;aw<Q;aw++){ac.r=R;ac.g=X;ac.b=Z;ac=ac.next}for(aw=1;aw<Q;aw++){at=Y+((U<aw?U:aw)<<2);M+=(ac.r=(R=O[at]))*(ai=Q-aw);N+=(ac.g=(X=O[at+1]))*ai;ad+=(ac.b=(Z=O[at+2]))*ai;aj+=R;ao+=X;W+=Z;ac=ac.next}av=ah;al=P;for(an=0;an<j;an++){O[Y]=(M*aa)>>L;O[Y+1]=(N*aa)>>L;O[Y+2]=(ad*aa)>>L;M-=T;N-=af;ad-=ab;T-=av.r;af-=av.g;ab-=av.b;at=(S+((at=an+ap+1)<U?at:U))<<2;aj+=(av.r=O[at]);ao+=(av.g=O[at+1]);W+=(av.b=O[at+2]);M+=aj;N+=ao;ad+=W;av=av.next;T+=(R=al.r);af+=(X=al.g);ab+=(Z=al.b);aj-=R;ao-=X;W-=Z;al=al.next;Y+=4}S+=j}for(an=0;an<j;an++){ao=W=aj=N=ad=M=0;Y=an<<2;T=Q*(R=O[Y]);af=Q*(X=O[Y+1]);ab=Q*(Z=O[Y+2]);M+=aq*R;N+=aq*X;ad+=aq*Z;ac=ah;for(aw=0;aw<Q;aw++){ac.r=R;ac.g=X;ac.b=Z;ac=ac.next}V=j;for(aw=1;aw<=ap;aw++){Y=(V+an)<<2;M+=(ac.r=(R=O[Y]))*(ai=Q-aw);N+=(ac.g=(X=O[Y+1]))*ai;ad+=(ac.b=(Z=O[Y+2]))*ai;aj+=R;ao+=X;W+=Z;ac=ac.next;if(aw<ar){V+=j}}Y=an;av=ah;al=P;for(am=0;am<K;am++){at=Y<<2;O[at]=(M*aa)>>L;O[at+1]=(N*aa)>>L;O[at+2]=(ad*aa)>>L;M-=T;N-=af;ad-=ab;T-=av.r;af-=av.g;ab-=av.b;at=(an+(((at=am+Q)<ar?at:ar)*j))<<2;M+=(aj+=(av.r=O[at]));N+=(ao+=(av.g=O[at+1]));ad+=(W+=(av.b=O[at+2]));av=av.next;T+=(R=al.r);af+=(X=al.g);ab+=(Z=al.b);aj-=R;ao-=X;W-=Z;al=al.next;Y+=j}}az.putImageData(au,ag,ae);return true}function g(){this.r=0;this.g=0;this.b=0;this.a=0;this.next=null}}", "title": "" }, { "docid": "42d5be49365fd015114273105698dd97", "score": "0.48036376", "text": "function ws_seven(m,A,o){var p=jQuery;var w=p(this);var n=m.distance||5;var d=m.cols;var z=m.rows;var a=m.duration*2;var q=m.blur||50;var E=o.find(\".ws_list\");var x=p(\"<div>\").css({position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\"});var c=x.clone().css(\"overflow\",\"hidden\");x.addClass(\"ws_effect ws_seven\");var t=!m.noCanvas&&!window.opera&&!!document.createElement(\"canvas\").getContext;var l;var e=p(\"<div>\").addClass(\"ws_parts\").css({position:\"absolute\",width:\"100%\",height:\"100%\",left:0,top:0,zIndex:8,transform:\"translate3d(0,0,0)\"});var B=p(\"<div>\").addClass(\"ws_zoom\").css({position:\"absolute\",width:\"100%\",height:\"100%\",top:0,left:0,zIndex:2,transform:\"translate3d(0,0,0)\"});x.append(e,B,c).appendTo(o);var f={t:p(window).scrollTop(),l:p(window).scrollLeft(),w:p(window).width(),h:p(window).height()};var D=Math.max((m.width||e.width())/(m.height||e.height())||3,3);d=d||Math.round(D<1?3:3*D);z=z||Math.round(D<1?3/D:3);var J=[];var y=[];for(var v=0;v<d*z;v++){var H=v%d;var G=Math.floor(v/d);p(J[v]=p(\"<div>\")[0]).css({position:\"absolute\",overflow:\"hidden\",transform:\"translate3d(0,0,0)\"}).appendTo(e).append(p(\"<img>\").css({position:\"absolute\",transform:\"translate3d(0,0,0)\"}));p(y[v]=p(\"<div>\")[0]).css({position:\"absolute\",overflow:\"hidden\",transform:\"translate3d(0,0,0)\"}).appendTo(B).append(p(\"<img>\").css({position:\"absolute\",transform:\"translate3d(0,0,0)\"}))}J=p(J);y=p(y);jQuery.extend(jQuery.easing,{easeOutQuart:function(j,K,i,M,L){return -M*((K=K/L-1)*K*K*K-1)+i},easeInExpo:function(j,K,i,M,L){return(K==0)?i:M*Math.pow(2,10*(K/L-1))+i},easeInCirc:function(j,K,i,M,L){return -M*(Math.sqrt(1-(K/=L)*K)-1)+i}});function s(j,i){return Math.abs((i%2?1:0)+((i-i%2)/2)-j)/i}function I(M,L,N,i){var K=(L>=i)?(i)/(L):1;var j=(M>=N)?(N)/(M):1;return{l:j,t:K,m:Math.min(j,K)}}function k(j,L){var K=0;for(var i in j){(function(N,O){var M=O[N];wowAnimate(M.item,M.begin,M.end,M.duration,M.delay,M.easing,function(){if(M.callback){M.callback()}K++;if(K==O.length&&L){L()}})}(i,j))}}function u(U,i,j,M,W){var Q=e.width(),S=e.height(),T=n*Q/d,O=n*S/z,P=a*(M?4:5)/(d*z),L=M?\"easeInExpo\":\"easeOutQuart\";var K=f.h+f.t-S/z,R=f.w+f.l-Q/d,X=e.offset().top+e.height(),N=e.offset().left+e.width();if(K<X){K=X}if(R<N){R=N}var V=[];p(U).each(function(af){var ac=af%d,Z=Math.floor(af/d),ad=a*0.2*(s(ac,d)*45+Z*4)/(d*z),ab=e.offset().left+f.l+T*ac-Q*n/2+T,ae=e.offset().top+f.t+O*Z-S*n/2+O,Y=I(ab,ae,R,K);if(m.support.transform){var ag={opacity:1,translate:[Q*ac/d,S*Z/z,0],scale:1,width:Q/d,height:S/z,zIndex:Math.ceil(100-s(ac,d)*100)},aj={opacity:0,translate:[(T*ac-Q*n/2.115)*Y.l,(O*Z-S*n/2.115)*Y.t,0],scale:n*Y.m,width:Q/d,height:S/z,zIndex:Math.ceil(100-s(ac,d)*100)};p(this).find(\"img\").css({transform:\"translate3d(\"+(-Q*ac/d+j.marginLeft)+\"px,\"+(-S*Z/z+j.marginTop)+\"px,0px)\",width:j.width,height:j.height})}else{var ag={opacity:1,left:Q*ac/d,top:S*Z/z,width:Q/d,height:S/z,zIndex:Math.ceil(100-s(ac,d)*100)},aj={opacity:0,left:(T*ac-Q*n/2)*Y.l,top:(O*Z-S*n/2)*Y.t,width:T*Y.m,height:O*Y.m},ai={left:-(Q*ac/d)+j.marginLeft,top:-(S*Z/z)+j.marginTop,width:j.width,height:j.height},ah={left:-n*(Q/d*ac-j.marginLeft)*Y.m,top:-n*(S/z*Z-j.marginTop)*Y.m,width:n*j.width*Y.m,height:n*j.height*Y.m}}if(!M){var aa=ag;ag=aj;aj=aa;aa=ai;ai=ah;ah=aa}V.push({item:p(this).show(),begin:ag,end:aj,easing:L,delay:ad,duration:P,callback:M?function(){this.item.hide()}:0});if(ai){V.push({item:p(this).find(\"img\"),begin:ai,end:ah,easing:L,delay:ad,duration:P})}});if(M){p(i).each(function(ac){var Z=ac%d;var Y=Math.floor(ac/d);var aa=a*0.2+a*0.15*(s(Z,d)*35+Y*4)/(d*z);var ab=a*4/(d*z);if(m.support.transform){var ad={opacity:0,translate:[Q/2,S/2,0],scale:0,width:Q/d,height:S/z,zIndex:Math.ceil(100-s(Z,d)*100)},af={opacity:1,translate:[Q*Z/d,S*Y/z,0],scale:1,width:Q/d,height:S/z,zIndex:Math.ceil(100-s(Z,d)*100)};p(this).find(\"img\").css({transform:\"translate3d(\"+(-Q*Z/d+j.marginLeft)+\"px,\"+(-S*Y/z+j.marginTop)+\"px,0px)\",width:j.width,height:j.height})}else{var ad={left:Q/2,top:S/2,width:0,height:0,zIndex:Math.ceil(100-s(Z,d)*100)},af={left:Q*Z/d,top:S*Y/z,width:Q/d,height:S/z},ag={left:0,top:0,width:0,height:0},ae={left:-Q*Z/d+j.marginLeft,top:-S*Y/z+j.marginTop,width:j.width,height:j.height}}V.push({item:p(this),begin:ad,end:af,easing:\"easeOutBack\",delay:aa,duration:ab});if(ag){V.push({item:p(this).find(\"img\"),begin:ag,end:ae,easing:\"easeOutBack\",delay:aa,duration:ab})}});B.delay(a*0.1).animate({opacity:1},a*0.2,\"easeInCirc\")}k(V,W);return{stop:function(){W()}}}var h;this.go=function(i,j,M){if(h){return j}if(M==undefined){M=(j==0&&i!=j+1)||(i==j-1)?false:true}f.t=p(window).scrollTop();f.l=p(window).scrollLeft();f.w=p(window).width();f.h=p(window).height();var N=p(A.get(j));N={width:N.width(),height:N.height(),marginTop:parseFloat(N.css(\"marginTop\")),marginLeft:parseFloat(N.css(\"marginLeft\"))};J.find(\"img\").attr(\"src\",A.get(M?j:i).src);y.find(\"img\").attr(\"src\",A.get(i).src);e.show();if(M){B.show()}var L=0;if(M){if(t){try{document.createElement(\"canvas\").getContext(\"2d\").getImageData(0,0,1,1)}catch(K){t=0}l='<canvas width=\"'+x.width+'\" height=\"'+x.height+'\"/>';l=p(l).css({\"z-index\":1,position:\"absolute\",left:0,top:0}).css(N).appendTo(c);L=F(p(A.get(j)),N,q,l.get(0))}if(!t||!L){t=0;L=F(p(A.get(j)),N,8);if(l){l.remove();l=0}}}h=new u(J,y,N,M,function(){w.trigger(\"effectEnd\");e.hide();B.hide();if(l){l.remove()}else{if(L){L.remove()}}h=0})};function F(P,K,O,L){var S=(parseInt(P.parent().css(\"z-index\"))||0)+1;if(t){var V=L.getContext(\"2d\");V.drawImage(P.get(0),0,0,K.width,K.height);if(!b(V,0,0,L.width,L.height,O)){return 0}return p(L)}var W=p(\"<div></div>\").css({position:\"absolute\",\"z-index\":S,left:0,top:0,overflow:\"hidden\"}).css(K).appendTo(c);var U=(Math.sqrt(5)+1)/2;var M=1-U/2;for(var N=0;M*N<O;N++){var Q=Math.PI*U*N;var j=(M*N+1);var T=j*Math.cos(Q);var R=j*Math.sin(Q);p(document.createElement(\"img\")).attr(\"src\",P.attr(\"src\")).css({opacity:1/(N/1.8+1),position:\"absolute\",\"z-index\":S,left:Math.round(T)+\"px\",top:Math.round(R)+\"px\",width:\"100%\",height:\"100%\"}).appendTo(W)}return W}var r=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259];var C=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function b(az,ag,ae,j,K,ap){if(isNaN(ap)||ap<1){return}ap|=0;var au;try{au=az.getImageData(ag,ae,j,K)}catch(ay){console.log(\"error:unable to access image data: \"+ay);return false}var O=au.data;var an,am,aw,at,V,Y,S,M,N,ad,T,af,ab,aj,ao,W,R,X,Z,ai;var ax=ap+ap+1;var ak=j<<2;var U=j-1;var ar=K-1;var Q=ap+1;var aq=Q*(Q+1)/2;var ah=new g();var ac=ah;for(aw=1;aw<ax;aw++){ac=ac.next=new g();if(aw==Q){var P=ac}}ac.next=ah;var av=null;var al=null;S=Y=0;var aa=r[ap];var L=C[ap];for(am=0;am<K;am++){aj=ao=W=M=N=ad=0;T=Q*(R=O[Y]);af=Q*(X=O[Y+1]);ab=Q*(Z=O[Y+2]);M+=aq*R;N+=aq*X;ad+=aq*Z;ac=ah;for(aw=0;aw<Q;aw++){ac.r=R;ac.g=X;ac.b=Z;ac=ac.next}for(aw=1;aw<Q;aw++){at=Y+((U<aw?U:aw)<<2);M+=(ac.r=(R=O[at]))*(ai=Q-aw);N+=(ac.g=(X=O[at+1]))*ai;ad+=(ac.b=(Z=O[at+2]))*ai;aj+=R;ao+=X;W+=Z;ac=ac.next}av=ah;al=P;for(an=0;an<j;an++){O[Y]=(M*aa)>>L;O[Y+1]=(N*aa)>>L;O[Y+2]=(ad*aa)>>L;M-=T;N-=af;ad-=ab;T-=av.r;af-=av.g;ab-=av.b;at=(S+((at=an+ap+1)<U?at:U))<<2;aj+=(av.r=O[at]);ao+=(av.g=O[at+1]);W+=(av.b=O[at+2]);M+=aj;N+=ao;ad+=W;av=av.next;T+=(R=al.r);af+=(X=al.g);ab+=(Z=al.b);aj-=R;ao-=X;W-=Z;al=al.next;Y+=4}S+=j}for(an=0;an<j;an++){ao=W=aj=N=ad=M=0;Y=an<<2;T=Q*(R=O[Y]);af=Q*(X=O[Y+1]);ab=Q*(Z=O[Y+2]);M+=aq*R;N+=aq*X;ad+=aq*Z;ac=ah;for(aw=0;aw<Q;aw++){ac.r=R;ac.g=X;ac.b=Z;ac=ac.next}V=j;for(aw=1;aw<=ap;aw++){Y=(V+an)<<2;M+=(ac.r=(R=O[Y]))*(ai=Q-aw);N+=(ac.g=(X=O[Y+1]))*ai;ad+=(ac.b=(Z=O[Y+2]))*ai;aj+=R;ao+=X;W+=Z;ac=ac.next;if(aw<ar){V+=j}}Y=an;av=ah;al=P;for(am=0;am<K;am++){at=Y<<2;O[at]=(M*aa)>>L;O[at+1]=(N*aa)>>L;O[at+2]=(ad*aa)>>L;M-=T;N-=af;ad-=ab;T-=av.r;af-=av.g;ab-=av.b;at=(an+(((at=am+Q)<ar?at:ar)*j))<<2;M+=(aj+=(av.r=O[at]));N+=(ao+=(av.g=O[at+1]));ad+=(W+=(av.b=O[at+2]));av=av.next;T+=(R=al.r);af+=(X=al.g);ab+=(Z=al.b);aj-=R;ao-=X;W-=Z;al=al.next;Y+=j}}az.putImageData(au,ag,ae);return true}function g(){this.r=0;this.g=0;this.b=0;this.a=0;this.next=null}}", "title": "" }, { "docid": "42d5be49365fd015114273105698dd97", "score": "0.48036376", "text": "function ws_seven(m,A,o){var p=jQuery;var w=p(this);var n=m.distance||5;var d=m.cols;var z=m.rows;var a=m.duration*2;var q=m.blur||50;var E=o.find(\".ws_list\");var x=p(\"<div>\").css({position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\"});var c=x.clone().css(\"overflow\",\"hidden\");x.addClass(\"ws_effect ws_seven\");var t=!m.noCanvas&&!window.opera&&!!document.createElement(\"canvas\").getContext;var l;var e=p(\"<div>\").addClass(\"ws_parts\").css({position:\"absolute\",width:\"100%\",height:\"100%\",left:0,top:0,zIndex:8,transform:\"translate3d(0,0,0)\"});var B=p(\"<div>\").addClass(\"ws_zoom\").css({position:\"absolute\",width:\"100%\",height:\"100%\",top:0,left:0,zIndex:2,transform:\"translate3d(0,0,0)\"});x.append(e,B,c).appendTo(o);var f={t:p(window).scrollTop(),l:p(window).scrollLeft(),w:p(window).width(),h:p(window).height()};var D=Math.max((m.width||e.width())/(m.height||e.height())||3,3);d=d||Math.round(D<1?3:3*D);z=z||Math.round(D<1?3/D:3);var J=[];var y=[];for(var v=0;v<d*z;v++){var H=v%d;var G=Math.floor(v/d);p(J[v]=p(\"<div>\")[0]).css({position:\"absolute\",overflow:\"hidden\",transform:\"translate3d(0,0,0)\"}).appendTo(e).append(p(\"<img>\").css({position:\"absolute\",transform:\"translate3d(0,0,0)\"}));p(y[v]=p(\"<div>\")[0]).css({position:\"absolute\",overflow:\"hidden\",transform:\"translate3d(0,0,0)\"}).appendTo(B).append(p(\"<img>\").css({position:\"absolute\",transform:\"translate3d(0,0,0)\"}))}J=p(J);y=p(y);jQuery.extend(jQuery.easing,{easeOutQuart:function(j,K,i,M,L){return -M*((K=K/L-1)*K*K*K-1)+i},easeInExpo:function(j,K,i,M,L){return(K==0)?i:M*Math.pow(2,10*(K/L-1))+i},easeInCirc:function(j,K,i,M,L){return -M*(Math.sqrt(1-(K/=L)*K)-1)+i}});function s(j,i){return Math.abs((i%2?1:0)+((i-i%2)/2)-j)/i}function I(M,L,N,i){var K=(L>=i)?(i)/(L):1;var j=(M>=N)?(N)/(M):1;return{l:j,t:K,m:Math.min(j,K)}}function k(j,L){var K=0;for(var i in j){(function(N,O){var M=O[N];wowAnimate(M.item,M.begin,M.end,M.duration,M.delay,M.easing,function(){if(M.callback){M.callback()}K++;if(K==O.length&&L){L()}})}(i,j))}}function u(U,i,j,M,W){var Q=e.width(),S=e.height(),T=n*Q/d,O=n*S/z,P=a*(M?4:5)/(d*z),L=M?\"easeInExpo\":\"easeOutQuart\";var K=f.h+f.t-S/z,R=f.w+f.l-Q/d,X=e.offset().top+e.height(),N=e.offset().left+e.width();if(K<X){K=X}if(R<N){R=N}var V=[];p(U).each(function(af){var ac=af%d,Z=Math.floor(af/d),ad=a*0.2*(s(ac,d)*45+Z*4)/(d*z),ab=e.offset().left+f.l+T*ac-Q*n/2+T,ae=e.offset().top+f.t+O*Z-S*n/2+O,Y=I(ab,ae,R,K);if(m.support.transform){var ag={opacity:1,translate:[Q*ac/d,S*Z/z,0],scale:1,width:Q/d,height:S/z,zIndex:Math.ceil(100-s(ac,d)*100)},aj={opacity:0,translate:[(T*ac-Q*n/2.115)*Y.l,(O*Z-S*n/2.115)*Y.t,0],scale:n*Y.m,width:Q/d,height:S/z,zIndex:Math.ceil(100-s(ac,d)*100)};p(this).find(\"img\").css({transform:\"translate3d(\"+(-Q*ac/d+j.marginLeft)+\"px,\"+(-S*Z/z+j.marginTop)+\"px,0px)\",width:j.width,height:j.height})}else{var ag={opacity:1,left:Q*ac/d,top:S*Z/z,width:Q/d,height:S/z,zIndex:Math.ceil(100-s(ac,d)*100)},aj={opacity:0,left:(T*ac-Q*n/2)*Y.l,top:(O*Z-S*n/2)*Y.t,width:T*Y.m,height:O*Y.m},ai={left:-(Q*ac/d)+j.marginLeft,top:-(S*Z/z)+j.marginTop,width:j.width,height:j.height},ah={left:-n*(Q/d*ac-j.marginLeft)*Y.m,top:-n*(S/z*Z-j.marginTop)*Y.m,width:n*j.width*Y.m,height:n*j.height*Y.m}}if(!M){var aa=ag;ag=aj;aj=aa;aa=ai;ai=ah;ah=aa}V.push({item:p(this).show(),begin:ag,end:aj,easing:L,delay:ad,duration:P,callback:M?function(){this.item.hide()}:0});if(ai){V.push({item:p(this).find(\"img\"),begin:ai,end:ah,easing:L,delay:ad,duration:P})}});if(M){p(i).each(function(ac){var Z=ac%d;var Y=Math.floor(ac/d);var aa=a*0.2+a*0.15*(s(Z,d)*35+Y*4)/(d*z);var ab=a*4/(d*z);if(m.support.transform){var ad={opacity:0,translate:[Q/2,S/2,0],scale:0,width:Q/d,height:S/z,zIndex:Math.ceil(100-s(Z,d)*100)},af={opacity:1,translate:[Q*Z/d,S*Y/z,0],scale:1,width:Q/d,height:S/z,zIndex:Math.ceil(100-s(Z,d)*100)};p(this).find(\"img\").css({transform:\"translate3d(\"+(-Q*Z/d+j.marginLeft)+\"px,\"+(-S*Y/z+j.marginTop)+\"px,0px)\",width:j.width,height:j.height})}else{var ad={left:Q/2,top:S/2,width:0,height:0,zIndex:Math.ceil(100-s(Z,d)*100)},af={left:Q*Z/d,top:S*Y/z,width:Q/d,height:S/z},ag={left:0,top:0,width:0,height:0},ae={left:-Q*Z/d+j.marginLeft,top:-S*Y/z+j.marginTop,width:j.width,height:j.height}}V.push({item:p(this),begin:ad,end:af,easing:\"easeOutBack\",delay:aa,duration:ab});if(ag){V.push({item:p(this).find(\"img\"),begin:ag,end:ae,easing:\"easeOutBack\",delay:aa,duration:ab})}});B.delay(a*0.1).animate({opacity:1},a*0.2,\"easeInCirc\")}k(V,W);return{stop:function(){W()}}}var h;this.go=function(i,j,M){if(h){return j}if(M==undefined){M=(j==0&&i!=j+1)||(i==j-1)?false:true}f.t=p(window).scrollTop();f.l=p(window).scrollLeft();f.w=p(window).width();f.h=p(window).height();var N=p(A.get(j));N={width:N.width(),height:N.height(),marginTop:parseFloat(N.css(\"marginTop\")),marginLeft:parseFloat(N.css(\"marginLeft\"))};J.find(\"img\").attr(\"src\",A.get(M?j:i).src);y.find(\"img\").attr(\"src\",A.get(i).src);e.show();if(M){B.show()}var L=0;if(M){if(t){try{document.createElement(\"canvas\").getContext(\"2d\").getImageData(0,0,1,1)}catch(K){t=0}l='<canvas width=\"'+x.width+'\" height=\"'+x.height+'\"/>';l=p(l).css({\"z-index\":1,position:\"absolute\",left:0,top:0}).css(N).appendTo(c);L=F(p(A.get(j)),N,q,l.get(0))}if(!t||!L){t=0;L=F(p(A.get(j)),N,8);if(l){l.remove();l=0}}}h=new u(J,y,N,M,function(){w.trigger(\"effectEnd\");e.hide();B.hide();if(l){l.remove()}else{if(L){L.remove()}}h=0})};function F(P,K,O,L){var S=(parseInt(P.parent().css(\"z-index\"))||0)+1;if(t){var V=L.getContext(\"2d\");V.drawImage(P.get(0),0,0,K.width,K.height);if(!b(V,0,0,L.width,L.height,O)){return 0}return p(L)}var W=p(\"<div></div>\").css({position:\"absolute\",\"z-index\":S,left:0,top:0,overflow:\"hidden\"}).css(K).appendTo(c);var U=(Math.sqrt(5)+1)/2;var M=1-U/2;for(var N=0;M*N<O;N++){var Q=Math.PI*U*N;var j=(M*N+1);var T=j*Math.cos(Q);var R=j*Math.sin(Q);p(document.createElement(\"img\")).attr(\"src\",P.attr(\"src\")).css({opacity:1/(N/1.8+1),position:\"absolute\",\"z-index\":S,left:Math.round(T)+\"px\",top:Math.round(R)+\"px\",width:\"100%\",height:\"100%\"}).appendTo(W)}return W}var r=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259];var C=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function b(az,ag,ae,j,K,ap){if(isNaN(ap)||ap<1){return}ap|=0;var au;try{au=az.getImageData(ag,ae,j,K)}catch(ay){console.log(\"error:unable to access image data: \"+ay);return false}var O=au.data;var an,am,aw,at,V,Y,S,M,N,ad,T,af,ab,aj,ao,W,R,X,Z,ai;var ax=ap+ap+1;var ak=j<<2;var U=j-1;var ar=K-1;var Q=ap+1;var aq=Q*(Q+1)/2;var ah=new g();var ac=ah;for(aw=1;aw<ax;aw++){ac=ac.next=new g();if(aw==Q){var P=ac}}ac.next=ah;var av=null;var al=null;S=Y=0;var aa=r[ap];var L=C[ap];for(am=0;am<K;am++){aj=ao=W=M=N=ad=0;T=Q*(R=O[Y]);af=Q*(X=O[Y+1]);ab=Q*(Z=O[Y+2]);M+=aq*R;N+=aq*X;ad+=aq*Z;ac=ah;for(aw=0;aw<Q;aw++){ac.r=R;ac.g=X;ac.b=Z;ac=ac.next}for(aw=1;aw<Q;aw++){at=Y+((U<aw?U:aw)<<2);M+=(ac.r=(R=O[at]))*(ai=Q-aw);N+=(ac.g=(X=O[at+1]))*ai;ad+=(ac.b=(Z=O[at+2]))*ai;aj+=R;ao+=X;W+=Z;ac=ac.next}av=ah;al=P;for(an=0;an<j;an++){O[Y]=(M*aa)>>L;O[Y+1]=(N*aa)>>L;O[Y+2]=(ad*aa)>>L;M-=T;N-=af;ad-=ab;T-=av.r;af-=av.g;ab-=av.b;at=(S+((at=an+ap+1)<U?at:U))<<2;aj+=(av.r=O[at]);ao+=(av.g=O[at+1]);W+=(av.b=O[at+2]);M+=aj;N+=ao;ad+=W;av=av.next;T+=(R=al.r);af+=(X=al.g);ab+=(Z=al.b);aj-=R;ao-=X;W-=Z;al=al.next;Y+=4}S+=j}for(an=0;an<j;an++){ao=W=aj=N=ad=M=0;Y=an<<2;T=Q*(R=O[Y]);af=Q*(X=O[Y+1]);ab=Q*(Z=O[Y+2]);M+=aq*R;N+=aq*X;ad+=aq*Z;ac=ah;for(aw=0;aw<Q;aw++){ac.r=R;ac.g=X;ac.b=Z;ac=ac.next}V=j;for(aw=1;aw<=ap;aw++){Y=(V+an)<<2;M+=(ac.r=(R=O[Y]))*(ai=Q-aw);N+=(ac.g=(X=O[Y+1]))*ai;ad+=(ac.b=(Z=O[Y+2]))*ai;aj+=R;ao+=X;W+=Z;ac=ac.next;if(aw<ar){V+=j}}Y=an;av=ah;al=P;for(am=0;am<K;am++){at=Y<<2;O[at]=(M*aa)>>L;O[at+1]=(N*aa)>>L;O[at+2]=(ad*aa)>>L;M-=T;N-=af;ad-=ab;T-=av.r;af-=av.g;ab-=av.b;at=(an+(((at=am+Q)<ar?at:ar)*j))<<2;M+=(aj+=(av.r=O[at]));N+=(ao+=(av.g=O[at+1]));ad+=(W+=(av.b=O[at+2]));av=av.next;T+=(R=al.r);af+=(X=al.g);ab+=(Z=al.b);aj-=R;ao-=X;W-=Z;al=al.next;Y+=j}}az.putImageData(au,ag,ae);return true}function g(){this.r=0;this.g=0;this.b=0;this.a=0;this.next=null}}", "title": "" }, { "docid": "e3bb001cd43f76897a74303833ffdc6a", "score": "0.47960523", "text": "function gia(a){for(var b=0;b<a.length;++b){var c=a[b],d=c[1];if(c[0]){var e=\"_\"==c[0].charAt(0)?[c[0]]:(\"\"+c[0]).split(\".\");if(1==e.length)window[e[0]]=d;else{for(var f=window,g=0;g<e.length-1;++g){var l=e[g];f[l]||(f[l]={});f=f[l]}f[e[e.length-1]]=d}}if(e=c[2])for(g=0;g<e.length;++g)d.prototype[e[g][0]]=e[g][1];if(c=c[3])for(g=0;g<c.length;++g)d[c[g][0]]=c[g][1]}}", "title": "" }, { "docid": "af55b148d9d140ade192f4b3ddf98aec", "score": "0.47888386", "text": "function ws_book(p, n, b) {\n var f = jQuery;\n var m = f(this);\n var i = f(\".ws_list\", b);\n b = b.parent();\n var k = f(\"<div>\").addClass(\"ws_effect ws_book\").css({position: \"absolute\", top: 0, left: 0, width: \"100%\", height: \"100%\"}).appendTo(b), e = p.duration, d = p.perspective || 0.4, g = p.shadow || 0.35, a = p.noCanvas || false, l = p.no3d || false;\n var o = {domPrefixes: \" Webkit Moz ms O Khtml\".split(\" \"), testDom: function (r) {\n var q = this.domPrefixes.length;\n while (q--) {\n if (typeof document.body.style[this.domPrefixes[q] + r] !== \"undefined\") {\n return true\n }\n }\n return false\n }, cssTransitions: function () {\n return this.testDom(\"Transition\")\n }, cssTransforms3d: function () {\n var r = (typeof document.body.style.perspectiveProperty !== \"undefined\") || this.testDom(\"Perspective\");\n if (r && /AppleWebKit/.test(navigator.userAgent)) {\n var t = document.createElement(\"div\"), q = document.createElement(\"style\"), s = \"Test3d\" + Math.round(Math.random() * 99999);\n q.textContent = \"@media (-webkit-transform-3d){#\" + s + \"{height:3px}}\";\n document.getElementsByTagName(\"head\")[0].appendChild(q);\n t.id = s;\n document.body.appendChild(t);\n r = t.offsetHeight === 3;\n q.parentNode.removeChild(q);\n t.parentNode.removeChild(t)\n }\n return r\n }, canvas: function () {\n if (typeof document.createElement(\"canvas\").getContext !== \"undefined\") {\n return true\n }\n }};\n if (!l) {\n l = o.cssTransitions() && o.cssTransforms3d()\n }\n if (!a) {\n a = o.canvas()\n }\n var j;\n this.go = function (r, q, E) {\n if (j) {\n return -1\n }\n var v = n.get(r), G = n.get(q);\n if (E == undefined) {\n E = (q == 0 && r != q + 1) || (r == q - 1)\n } else {\n E = !E\n }\n var s = f(\"<div>\").appendTo(k);\n var t = f(v);\n t = {width: t.width(), height: t.height(), marginLeft: parseFloat(t.css(\"marginLeft\")), marginTop: parseFloat(t.css(\"marginTop\"))};\n if (l) {\n var y = {background: \"#000\", position: \"absolute\", left: 0, top: 0, width: \"100%\", height: \"100%\", transformStyle: \"preserve-3d\", zIndex: 3, outline: \"1px solid transparent\"};\n perspect = b.width() * (3 - d * 2);\n s.css(y).css({perspective: perspect, transform: \"translate3d(0,0,0)\"});\n var z = 90;\n var D = f(\"<div>\").css(y).css({position: \"relative\", \"float\": \"left\", width: \"50%\", overflow: \"hidden\"}).append(f(\"<img>\").attr(\"src\", (E ? v : G).src).css(t)).appendTo(s);\n var C = f(\"<div>\").css(y).css({position: \"relative\", \"float\": \"left\", width: \"50%\", overflow: \"hidden\"}).append(f(\"<img>\").attr(\"src\", (E ? G : v).src).css(t).css({marginLeft: -t.width / 2})).appendTo(s);\n var I = f(\"<div>\").css(y).css({display: E ? \"block\" : \"none\", width: \"50%\", transform: \"rotateY(\" + (E ? 0.1 : z) + \"deg)\", transition: (E ? \"ease-in \" : \"ease-out \") + e / 2000 + \"s\", transformOrigin: \"right\", overflow: \"hidden\"}).append(f(\"<img>\").attr(\"src\", (E ? G : v).src).css(t)).appendTo(s);\n var F = f(\"<div>\").css(y).css({display: E ? \"none\" : \"block\", left: \"50%\", width: \"50%\", transform: \"rotateY(-\" + (E ? z : 0.1) + \"deg)\", transition: (E ? \"ease-out \" : \"ease-in \") + e / 2000 + \"s\", transformOrigin: \"left\", overflow: \"hidden\"}).append(f(\"<img>\").attr(\"src\", (E ? v : G).src).css(t).css({marginLeft: -t.width / 2})).appendTo(s)\n } else {\n if (a) {\n var x = f(\"<div>\").css({position: \"absolute\", top: 0, left: E ? 0 : \"50%\", width: \"50%\", height: \"100%\", overflow: \"hidden\", zIndex: 6}).append(f(n.get(r)).clone().css({position: \"absolute\", height: \"100%\", right: E ? \"auto\" : 0, left: E ? 0 : \"auto\"})).appendTo(s).hide();\n var B = f(\"<div>\").css({position: \"absolute\", width: \"100%\", height: \"100%\", left: 0, top: 0, zIndex: 8}).appendTo(s).hide();\n var H = f(\"<canvas>\").css({position: \"absolute\", zIndex: 2, left: 0, top: -B.height() * d / 2}).attr({width: B.width(), height: B.height() * (d + 1)}).appendTo(B);\n var A = H.clone().css({top: 0, zIndex: 1}).attr({width: B.width(), height: B.height()}).appendTo(B);\n var w = H.get(0).getContext(\"2d\");\n var u = A.get(0).getContext(\"2d\")\n } else {\n i.stop(true).animate({left: (r ? -r + \"00%\" : (/Safari/.test(navigator.userAgent) ? \"0%\" : 0))}, e, \"easeInOutExpo\")\n }\n }\n if (!l && a) {\n var D = w;\n var C = u;\n var I = G;\n var F = v\n }\n j = new h(E, z, D, C, I, F, B, H, A, x, t, function () {\n m.trigger(\"effectEnd\");\n s.remove();\n j = 0\n })\n };\n function c(G, s, A, v, u, E, D, C, B, t, r) {\n numSlices = u / 2, widthScale = u / B, heightScale = (1 - E) / numSlices;\n G.clearRect(0, 0, r.width(), r.height());\n for (var q = 0; q < numSlices + widthScale; q++) {\n var z = (D ? q * p.width / u + p.width / 2 : (numSlices - q) * p.width / u);\n var H = A + (D ? 2 : -2) * q, F = v + t * heightScale * q / 2;\n if (z < 0) {\n z = 0\n }\n if (H < 0) {\n H = 0\n }\n if (F < 0) {\n F = 0\n }\n G.drawImage(s, z, 0, 2.5, p.height, H, F, 2, t * (1 - (heightScale * q)))\n }\n G.save();\n G.beginPath();\n G.moveTo(A, v);\n G.lineTo(A + (D ? 2 : -2) * (numSlices + widthScale), v + t * heightScale * (numSlices + widthScale) / 2);\n G.lineTo(A + (D ? 2 : -2) * (numSlices + widthScale), t * (1 - heightScale * (numSlices + widthScale)) + v + t * heightScale * (numSlices + widthScale) / 2);\n G.lineTo(A, v + t);\n G.closePath();\n G.clip();\n G.fillStyle = \"rgba(0,0,0,\" + Math.round(C * 100) / 100 + \")\";\n G.fillRect(0, 0, r.width(), r.height());\n G.restore()\n }\n function h(B, s, D, C, z, y, w, x, v, A, u, F) {\n if (l) {\n if (!B) {\n s *= -1;\n var E = C;\n C = D;\n D = E;\n E = y;\n y = z;\n z = E\n }\n setTimeout(function () {\n D.children(\"img\").css(\"opacity\", g).animate({opacity: 1}, e / 2);\n z.css(\"transform\", \"rotateY(\" + s + \"deg)\").children(\"img\").css(\"opacity\", 1).animate({opacity: g}, e / 2, function () {\n z.hide();\n y.show().css(\"transform\", \"rotateY(0deg)\").children(\"img\").css(\"opacity\", g).animate({opacity: 1}, e / 2);\n C.children(\"img\").css(\"opacity\", 1).animate({opacity: g}, e / 2)\n })\n }, 0)\n } else {\n if (a) {\n w.show();\n var r = new Date;\n var t = true;\n var q = setInterval(function () {\n var G = (new Date - r) / e;\n if (G > 1) {\n G = 1\n }\n var J = jQuery.easing.easeInOutQuint(1, G, 0, 1, 1), I = jQuery.easing.easeInOutCubic(1, G, 0, 1, 1), M = !B;\n if (G < 0.5) {\n J *= 2;\n I *= 2;\n var H = z\n } else {\n M = B;\n J = (1 - J) * 2;\n I = (1 - I) * 2;\n var H = y\n }\n var K = w.height() * d / 2, O = (1 - J) * w.width() / 2, N = 1 + I * d, L = w.width() / 2;\n c(D, H, L, K, O, N, M, I * g, L, w.height(), x);\n if (t) {\n A.show();\n t = false\n }\n C.clearRect(0, 0, v.width(), v.height());\n C.fillStyle = \"rgba(0,0,0,\" + (g - I * g) + \")\";\n C.fillRect(M ? L : 0, 0, v.width() / 2, v.height());\n if (G == 1) {\n clearInterval(q)\n }\n }, 15)\n }\n }\n setTimeout(F, e)\n }}", "title": "" }, { "docid": "945bae5723210a0d5710902d16f620b6", "score": "0.47881272", "text": "function BurrowsWheelerTransform() {\n}", "title": "" }, { "docid": "d012f3fd421cfcb68f41cfe405fbfc9a", "score": "0.47839347", "text": "function XujWkuOtln(){return 23;/* SRaNQ1gHzrK 6aBbPlVkxXfo QRIDJjPrN3O 5sJqH8a3mp ptKy9SfuGQ03 qQw55n7xJqB P6ucIvfa8IRW ZOv56cNyGV UKIuozbpctcJ ESFw5bfyXgv XTdiVnqzGe5L voeKc4iqIPy 0y13fW0oZe rMo8LfVvN2tr RaGyLe8r2B 8JGOhFu9gfu pDS0eizKMDkX TLedSQF5rSA KceAGoY8Ri lmF6vqTUcPm 82mHSdxbxBn6 EBY7pubsIK6 efChA1YiHD H4rFN3tBG2L yv2cMLqbm4Y B2MxpdQW0PAD R5NDneUGEQJ MXId28RnylcI Hmdj52pzJB e3lx8T7CgSS i8XyRKaqHb tw6pGOxIWToe 5wRah2i77NjM TKexrABJSD4 9cG8eZeCwD DmlukCApSlER fMa4m2Hacu jtyPD2eOkP 9jRuGcjjeW 5mCuSyJQr1pM bPc3NMIvUP1d yA4WlLSNZ2 KhWViQeSNZM Ot5MHdXBiw CGAYSs6JNW4u NuyY4zKMwLA q4PhU43Ypl xj1jlERu8eeV 7zT5MoBrurC IxdpT5LBOP Rh9J3GjgOwp dXApsrKCMO vnWUMgbTKEMt zyrHHqqb35e sp1SZ2YGzei A8MD7l3XeSaI m0CsgivM23GO GQoO8dPGOSpL sbFGqnAaMV rlwMAiPuLUW 2ZW5hydTBKH Ivqgj6ENis ySfAuahsw9yS K3hDUfhQXhS QaPIcNV9jOb LOTnQaIJqK UzymdnzKFG RO24wAf2gm l9a6XYzwPW QtPmtMDI8ci dtsq98hXktGL dlXuOMNSl3 fG9sHsZ0pZFU jBqwEbdQlA 4VHubPYZse lp3mU3UzdP ZPKFqn4bp2K7 SZIckcZOLEl V4kuZAHkDsq Zg2aSmyPUoGx NSLYbiHis8 iTus0zJ985 SileHb0xlZ ajiky0SE6kYU 5WFPzQc0fGNN 494s9hV5t8 Mso472ufMC SOSGDUS87e HAVDUHsYCCb vfrPFeF3ReB5 okW9XhKddxr FIwOccAcKA 4bchOdwb7aFu qFr7VuPfejgA 7pevsnQt7CE CviZdnsp0Ho mwcqHJfwdQTh w1xASDFaGIq3 dnP4Tul7OKu 2yv45Ua3lu gXUbMp7ORQ 1hqtXaESrJ5A c43KlvE1j2zZ q9iWcWAZV9J qYAe6WN4PV0 dFvxD5DGp4 YcnmSXMrR2 CRSchgGNN2Z0 UtKVKU2RzD 1mpPqcP2RB4X NIHId1OkpVws Ke33IfplJsJ rcPjxyjcpu BgfhDa3jeNL5 IxQDJ3ld8l 1yW6prLUUxI gzuaogd2Hs3 6MuyDgQeCy1K g8pD6CUsxbBb p40n5DeG0AR RZKnitGF5C BWThrlCKKn kBUfBvPjuGn hpjZPQKU0Sg RjK8uMyUGaF Lw2KO2HlcWPb VxofgJ8cMFm uJ7l5xIcVlcO oUm0DDBgmoI PBVaxGPuCwH MyFVoQ9q8LVN bXmpgF1BcI93 9sp6QWxqy641 ygXjIAbZbIz EhgCcFEHLe 1mzcGtore1 NrgStl54HKh 3aOHMUOzB10J yQk7pg06zZ PFYFsPi3125C JJ8L5tYYQUL BVyYM5QoIzPx jrgw60xRi9HD kuWdmRRYDJ6l ngzPGf57KZ1q QVry4ZLjBUiZ ZqgPi3Pexh0l 17GxCYargis jA4xukPZf9 sMNbl0jeqjM HiK8XQPOoDQ 2kEV6m4RFgA uG7kKVcb8VsY 5A50yjyHm7V sweoQDpUyYL UR3T0vDMQ2 2D9hTrMSltij 5TKduF8iA3 HVWT3KyCmrJX 0Ykg5rAnQF Onxy8tSFSQq KS2XIXr1WQG 0BHSpmNA2xw G2hptgeUvqo xRm1dUYpss wK8HHl6NJ5ee 65QJS2ikk0 j6ZN5oMjnS SU6GJXOsI2 uMLr0YREjp wVVvXdvuno5 HulzN9xaXkh PHdEn88Aqx ExFhFcnkxK KnTNzFYI8O 85DuCicq6h o7wxn31g3SXV eenF33q7W70 Y6Ii3OOWmkO7 nsOyyAV7KYAx RuAyJU67S4Ew Wa3FS6gSMu HmlGCSt0RE PkqmSAcd7R a2rgmA2qEL 9L0VNxdR648I J3fapVMfNpTM yfvNhxtLjZ9 9NzOOUyPdy xSCqObEU7NZy mgddP5BG97t pSMc8X5FLKo 7pnT891iwFHy N5y6qTz4o83 7sJ3mdTa03Ox ERhjjf0DlXD zh5EYevG0lDg 2EtZPm6anITw fUu93Pc1WG hQdmnXpRPAJ S37ip5Diou9 ZRrUqbNeUl ytnZtCZyQ2f2 wfpfMCwBV1mM grfvEoUlGL cZ8E0JaYoDo xid3QxRfbHt azMoLSDALaqI G1yjdlqqSBLP dAMMkflYJwq3 WdYJxKEnFj hZPmQCdf0I 8sowdH4mC2J qgcBL8ep5Y5 Bt3oJmsxpi 6VewE89t0ZsG J98CyBNa3s1 XT3OphQjgil0 Qd4w0woyPk6 9yKDhgF0Asb sWeosQeAkAv Vz2R3lofbrE ea5ihvnk2J sPhg66aRNi jCbxatGCPm YrsbnZby2ZG X924pfMvjR eADXTHmjRw LEKaXB9YVis DSWG4nyzrS dh7AIqN38f6 DgEgmZh6GEq i8kXO8j18Lou AbgtT03QAlP mJSyZo3WVELw GQdItZExXW CIeYhhTrpBuc D19jt6a2QshZ Nyo7lfKAsxo MwBK3nt8fW 6e8s9VIrS4IO ltZCMe7205d ryE1OGKaIJ Wh0gQ0gtXF zlItD97sJhY AvrrUX7zSxoh zXd91DauRY6h YzX4dWkVB0 0BurPyWOfY ByKNg0Zjw8 2qHS0rxOKZ PU0Cbj1vDb d4xlPnqyyc DEtuoFO74qVj tjnad1ax3Sv 299l4rmdalkM sVkvApTPX3L 2NUmgTZn7p D53FmH9mXeY ylP7xQo22oa 0AZooZn0lX8 QzpApfZKMk0 LI0TZM2NDGGg HmvpOf6K7zrs Oitjlr7BBV4 JSqlY7YAF5HF SC4crBfpAF xPeqO8EiHS AfCqPgRim1 NmgNrOrWLE dvRdpcpgRb AOsBBgCX5Dp CRxqreWfRN RHKb4RXaMMYl JdEcIZAr0M gbZRrBAYtihB pET3Xzeu5j nQdPOCbuLO EqjT9Gyna8e 83KnwPyvSlAU Cnqfv6xXFtbT RqaAkotQJvQx UgRTqaiwx0 B0vcnIOF8rZ 6AEmHBJlvb9 NAMJLne29g fEtBKGSa4yc beQTGawq447 oXyaTkv31F5 DLSNwxqjH7 6qvv94mybG T18I07t3kMRv WXJHNMz1j8nA pAcMIxS07RO mpi7MtUWnTA vCI1LCsBrT6 YIiIU8ATyZ4 qnZtUI6E9r sm719JftqgPS OUV6E7AG2J9K op0J4omFi82O euxtvrNDHkRw GWhPun0q1I BkpM4x2V6Azc HyObRmuDA632 oUtU4Y0oS8I BNZnM6ToB2 6lCUFof662L 5UbkpjDkcdy hPxhw6jCqx ZmdRdd67QtIq ytHG7pnIb7ae FivWxXCaLIOA RKR55WcIsGh fbB57nGPMTv5 OFOhfv7xN0vg HwMVzVaK2pD EMIWb8nkYkO3 H7wXhHV2n1 ZyQ8eAPjTVSK 87TMgV5iW6T7 bqbsLYQIJRg oci8XBlle0dq hBOqS8TANJ U002mN6S2gLx wB1xoWMEujD EniLC3e1f83Y YkyQshAKtXI v2RwM9AZschi UYoUahcYYJ 5MAa8oLRzb4i LjasDefNMx cVItYS1rei DAkAzlclAjSi m2VI1xJszH WBOJiNWGgmqS y9IfaFHbIEp TW1L0JWKZTP uBwZ6a2pm8 FVOSURdg6v kmpxg06A0C 9QiWp24V8cp KO7Zniai915h rFIcEos88dl iHhQh1N30Xni jLu9R9mOW8S8 udmU7cX1j7d 1L7kL6HnEyJ Gp5ASj8ENQ 9RXtiXDGzP 1kKLriSJYon bOQhxQRJm31c MZrfJflxvnOw kICdT1W7TafW AHZvU6MywgHi vKOIYD0tz4F CDFhbQNJz3YK 8bOS8rWSdbjc l7XymGr7xKp GSZLqDbko7 dTk1uk62oR yaO7EzuuWQf9 4cQfep5tsDV QaDe3Y7V6OX mxqU4uigVNs8 kEf337ziY8gd GyUTAK5wnR6x sg84ErkAb2Zi lrAg9sfrnby a8cnUYqCpHf gxX0Aifjux YCT4zH0Ypnff vIw2SXA1te e7iW41TI5Z hAJ6lY09A9d DHbEly4TVq1F rqlGaOl9BUa SDv4Zf6VRuWo nb4ts4yZ5O7C 35Efqp7GOwfH 3eydPrLEX5vZ wPDfai1iiN9 7aNWIeksP3 aHooanIKiB tIVxe9oZFfh MA4TtdslZWyK XPX7voJcENF yDOVRIU47rZ eZjL35XSoSB o09zEHnXRGve TPMJM1d5vy 1hJ35S7oGI6U hdMjIz6q9KB DzauTGrKhr oCSDgQBY4n a9lHOmZT5qI 1tOVBy2dGar 4RS49SM2pJ KKFWCrSYPyZl ZydzaAyMYmlC uTthdhFAPD zn7k64h0lYjl 3Cmg0SsMtAM rIZqzXYwQln XrxW59QgNoMB 5bPfoat2uH 64WPLfyexo a28NT6RU38vI GAJC8axiz8 jOkzWhvhr7 jeKozfi3kR sJeVK693JOA l2pewIVi0m1A OnaBf69D5kKz TRUXIvaWLRBS XcRQXR9W1U jiGwW8tbGt jMR0T3geA1ah kLQjbXeBEN Ga9nMXfdreZv 3V766EA57B 1XNwo1ozLOP loYz6fo6Nl 5oahAE2xAw zQaBXO64eH6J yo7Ihz25YJDm aTme0lliAN zUNzWYP9Nrvg tcM7wT4Pz1 2HNLcsdq5kN4 ZuglsC0CgiA x0B1mJR1hW qNkHWIJo39mv UM1g04Ldg6C q6XNrc2Re2 COd1h0dz3Okd UYyu77kvSFnc zilSOUeIb22V 5b6SceM5Rd 7w4xdLVjGkJ8 535hjvHn0D9R Zoz88DpYjPW hmPKdB1tIuH qhTlRZPwroP xlYUPkYa63Y o9JJf6VtL5 7iSvu27Ewg LRiAeDhNDfl wI7f2lQhu8 qccOAuZ69M0q ULftTgViJ4 cUv6Pw3XX7Hm li6VwleinEqm khl8OkjIaU UDPCsQJYLN REAtSMym2hwk 7Of5ajL5GTj yzZtMykp8hw vN8biOZOGp NH5e5wY7Bbn SyPFNFCSrA BQFGE2YM0H 8RuubVmTTaIL cp7UQa2NIb CIJyZMu2OZ iRmrVYVzxn WVbWz6zgbKI TdETTGkrbJCM kYericUlpR9 nz3lnAngMD5n KwkpLs2qpMEa 7U4leFhYeYl c8ukW7NcXurT lScGKqxAZB21 ADc5SvdeAvV WQkpgT7DNyi hiodSene9owX EpBPTYp69zDP Dr1Gu5xvFnYP bzDYi7aMCV nNYM9jcKuo pjRPrMzZ9y 3XOzYI5a9Lb 9rmii9bMIgUu 51eX3B8quFu uOP2KX2x6q gX893z3oPkO 5DAGZ3UuHETT y8ucYMjT7Y HIi72GnogS MxBNjQzq4x4 W4BJglJdp6i3 cXDvBZjvaI 14fqZC7GZtrj g6Un3qBNxf Ysc9b8dsDt bt2VlIs5e8S GJLYFKyWJst m3iAIA5JoB1l YBzsOavT8w L5tSPz6Gpe1v dOnyRFkEd3Y Ptm2Vd4ylWeA EfB7P9FkzmeH o1urdgB8XxK uK7sFRmFpFf aMMZGrL1f5z3 DYP26Siz6P a0lVMzPQXZhn AANEc0TIfT L447BBnQT2 iQ63kTq15lZ AWQ0coHKYXLh TzkYFfyr98r7 VEsONESnknUl eIGufYcbD7 qfG25GixBQt 4CoCPWvAeR TsGnKttHIT7Y 5fuSSSYQzf2c PnmwmEWIsA ztFjtZ03EA dZCKImzRbgD mqwLqq4ei2xX OFQRXfmry25 TngPwUDBlJtx UbQ4tH9TGsOi popXNWdDXx N4JIkZzT8WpN qFyivOHmK9 PGua2uIl9U BWDwRmwEooE 73hcpLUEgs beTxHgZPol UBOaxxWv3VRY OcAJk5jxXHk 2tNp8wdWFD woN0AvZv97Ok AVW7G5nDfX 4DxG0YwGsdp0 waefu1QaGjaz szswgc8xrmVs agyNFmGG88K E1ageedNNTm phtLurvDjP 8EAAFkJqWyu uTlTTBPUdK83 3dDyeJvud1 gqpcFhgldH jON1wLhXMG wp0FthHoqovZ MxPyA4PjyJ NAWYeQEyvPC FP4UAVGEozz7 wxYhN1TJkL bqim7Om0XvM9 SyWbhSC7Fn kOUi4r2vuw6K Fjq92DRnHK sjMLMuyJ5Gsu rB7P2j10opMv B3uDA84Jyx QQJJ9893fgmh DHYU7vge5m 104JiZmbOurG vQ37GdjsH2 irx6PYPWIT XHerkt4zt2pD 3GVPrciqXsm wNfmlpXukM7l jVQZe8E7eu8r msRZ6ZR9r5qs 7XoqJNwpBquz Nh2qiLWHPH86 pMAKlLnKJkCh fGnoVeqwWmSf GrmthSqCWPw 3bXwSbfk6l RfdMqftedf j9RgUChwa0d3 WaLFCTJSIj kgKPLU9iDrF rQq3X7ODSy7o sWoHt7GYhS9e yvA8h0canW UTKLDZ7cCE8i JwnIEOfFfvcs ZgrfR4Y0Fl0 vE307BDiAWyy fN0T1hM3Gu ISrgiD1ljL pTGzeIWFRk QbJXk4Ydpt hhZIORSCo0Z DJ8ZF6t1aYbq PNyIGCWPq20y 6DeIOkmpBaJ D582AvHPRdsf Os6aR7bPmCpS 1ySIN9AbrW tpAv5XmEQkB6 uZSHmSOPrQ eCWrakix4bao hnbKctA5oxd dEfzW4cQvD lVejRU1aqv bJ8svFuGWE bUkmag3kX5 IyT8T1dhEQB0 X9gZ9wDmylbN q3rZw8XDgj97 gS4eMNHMZ31C aO3Py8dvmz Tw7MYZZda1C H63e3hBrsy2 JbLkRimfsji 3dyAlLzwoFQ3 xMcvAH53sWmW nL0Se7wH3IHY w6QDLZaPVqm0 ihzAsw3uFVM PgBv4IwNt96s 7qv7qpXHXYA Fi6svQchjG 4EbVg3YTYHBb syvyiB0MQV6 Ow7wp2qnSW9 LAezCKWGuhz apgVjYZlvszI fHnPDd6iHE4p gWgnAecAJhY 8BVn8JgNbk nDAFUhuSNm3f pOOXo13LgvE OC80tOfkAMlC XheWuRgzpP Pi5c5I1Vktt 1yLjpkB4FU 1RcVeobDLF 8b4XXlLbvi5s qDG1VTp9v1Z rEIMGn5y8q dt5Dzgtf3imK mEEKUdvuNV oI2tmtWjYita CKhg4Goe7t 0tNWYzJjMk0T xXm7Pnzahl ItKPWgUPdCe VmlNkSRSjs R2kvdzHlFX m4LfM39pZx 9QRXbIEYkcN p5qDm51aUYRH MlLQXXk7siV OB5v39LIa3Kv KMCl44Q0mI ZPHlFXblkc LtQjwanTYb XuOnemLE0Q1h odUqkT8IbY Uze8sYPxMO JKLuYuAOtpsh 8ILcHP1dTk0 NofSPCOC0h zJTvF4mOl1x7 N66ZesKRoaR M7ndROdSuJY 9Sl093bTChR JeJL4uScWj2o SbmSucuMgeh WqjQjJuVBk pBe9ChKikON wy3gWFtYnbL h5AcznZgcxg kZtuS02WhjQo FbBRWbHM6wRm V7bDn2hd2N 76axu6nqCy3f xpoWx7R20L NyJ4JCvj3pn jtDEmb2JGAS Lwgm3HGB5iU SAyXJCPFzb sTOEToikLML c5krPcfrC8 dorBrdfNRH 2lvlUyYfo25K EI6WmQ8j2ex pNMAs5VD0e8D SMTkQS25h9 sTIQq1hPSjPu 2N6VWEEfyJwW aY8hWRsb5k Gq0EvuBa4l bwWn6dtSSYxL so2GFNNXseg Kfy2CL1YFVY atJfk6LIjfT JugENYihhEb xeHXbEr49Z BXlRtCFLUxSf xG6xFMN9XO CclYtKBYqyfo tYk1j8eKI17 lu1XOwbWKUSB dqdQ2CZpph2V vG0OflMyy5oj 3jfkTz6lnD OhJxsfn7SMZM PYl9ROFJos dJ3pmAzUij 2Gd7QQK8ZOm tVOHlPLYbbw Xd12CxKQzbH QkVS3WT5ku RtmJgx20Hcza A5XgCazoPEBZ QAFqrTcfpKPu WdzxuX7993Nv 4RPZdClcJxLG iJUiTP4a79 HVJHfMc7zVnQ INAGDxcuQE1R OPvaBpjtjeo Ah6JnpwdjTa qIWkeWbEUR POTjCLPR5y ly2Cp1S8F1P iS5rFXYasW qrlo1Hg2z7lu QvySULL3oPgP CGnHFwJDCOcf bG0nH3iNti 0euzfOOcfRnd q08ndmBqTnmh qyoZGLfstAQ cGv7nnk6tE FprTCWdYLQCW We8mly6dCBQ W7NRxnFUlX IBo0puMFGn EQ8WesQzyNeh 8LA5YISaVKsY 0jfBXNltNF o7cvM1tTjo LtFuZP08qZ6c Xlq9CtzI6rh 0R8zUTM7Amy 1u1RcOXh0h JeZzc1RswHc LmVjyf24YFyL vqQxj2mwXj BviqE3C0VmP mm68jDYFz5nv sXOgY6spX7e FTtvjGfXut BKoLWnPDH1dD BIrLCrf4N1 gwaduXRNHt75 1oJ3a0HfPpLr 4y1aFxUFV2MT 6KYLOVKPvE8i 7tKewZfTAkd Zq5boAtkxTKv as9o3JnjUuwi ESjmNtsz659T 6WDJGpkjoe 4fA3wz8up0R U5nHIyKJJJ 6G1vbihtdML ANeEEUVKZVY7 rwQVxOZABL PJVKlcigxSXT W6TMWVd5bt YV80kJUDcJel 0T7E1GtPnV Kayjyz0rzu7 7azOlakPkh 8qo01SZqsm H6eVEdvmUBF Rfxk9Oq3kff Qm4PFkjmqm yIOOlwLXsuC wk738e1Lbkn Rw6HY3Ttww Y2wrD5HQqF xXj7sowizq b5XSRiOsOAR9 hWEWsRqMUzb vIbD4aDGEySe H5X3RIrroj2C b8CogE0VlSMW VlkpAQuD3yn GifK4B8qR0F7 ek8bMP9VTam IvXHpXhwLuH oUDxyQ4niEs 55wKTHzzyakw jgTDMo6Gpw4 PqHxaoWGi2 bJAfiRT3Vcfe AciZe7XrE4bL ttsbu8Tt0rRI MOvApgFIz5 D0vt45GX4Cg g6mZlLwj3rU uPejulQ84l zFW8DRoIOeJ w87tUYrvzNic vUTv84k48L9m LyL8Udg9UW4 cv10e7UX1Bv gyme45vNKGpJ XmuQiHSV8a 15E8FoNjMuvI Hwgx4SHubUym jdBiIuJsU7WI 04AacVJfpOb WXG3Py4LbtIO CNyu4627wi0 pyAvqZVgtVs P3GXdW7qAda jvuDR7W0HYF mDJKsAxHxC3 Q5WPjOKdWPDy SYVjiI35M4x Bw9ZYXqViYym izsOhcNqSKfN kMidcDzqUb bb7cXoxzcdKj jjotzcEqqW 0kn42Dgg6se 4YkAWipi5h8 fqkb2LpIidy0 umo4VgWWvGod bkcz7PFETX 9FTuFyQxXKq5 uxnbJXQ0gn10 U5voIVOhTTmX SalKP6UcEAf XI1AVHu3K8 utKWDyxklGs7 QPkYx1mj8hHh oqkkIam1ny XNbWYGNkJhWJ QBFgyOVUNFgS PU2qstfQYCk SwlI4T4nP8 OVQIfxsf2FTh OTQDQTgPWs A6DUMiNOFcOX CBT94UHEPz g5BV7QNZHnYX AxUHpYuOoI8O ncMRtdpBFjs sSwZIDL9A5vr 69zIJq7GrRZ2 DkDuePUbTnYI DzrBspTGzEn 1FMtiqlEi8 rsIlhnDCM58 Ygq6e8JMtS3f le5MXfWEW3A 0WR1BFAZu2Wp hidEVeyzJhm cp7kWHtMPO wCnLzjafw5ZF LRT9bCvUx0Tq Je25sx87CTct Q93tIa5bOE BcfkO6niZu rBFUWe1N0h mbPwELAGl0m urwCuBUnTZMw p3ilZNa6bEB 7lhOeXOg7G3 MYR91ONdQiDA SIZoS2fcqZxA Ud5B9HdXXg 5FD6wDvGWFj X4iJRezFU62n xQDy361Y3y tms8Z8QcmT ZIneKtphBf0 Phjor9N5lPv 9icGfUr0NsDI XdKvMD5WFXw DFts0WvkV6 nb4Jf2TSqj DcwIP1ILprDA R70uUanUus wpUoqUEn28 CyMJiKSw1OIC ujB4Z8RaHrzh PH2hef3Duqk GAaMvA199HIV pDGqR6v63e n0w1RfwJ7Lrx OjlWOzMrjrI eWRMqi021k5s 1nYc1W3PnB VvLlbEaCIzEb 4NGamKPzojrS 1GwlANJwAcI Sm5ExqmpEb oZaBsxc245X 3Sch2Qd7US rkiERTL6uc24 t7cfWlvYa3Gn iRdJ8iO8Ku Dv5bLG5N99vu 5y0F3QXUf8 lwMhGUTWMEMD eCXkLJW8y5a 8VIozE6s1lE R0fNqCmEuQ pI4Vd3wutBoj 9JKEc54HPK4t WKOL2zKLEVK2 L5f42B0pxQVV 4IzEvmZzGN b3nTIpwqpu N0ql7iUTzun CllOPpiErh4 WTkKKVc8XKF qzmIxT5SqR2 z1rWleAKape hxqs1qvh6H30 vfC0KplE1LCJ HsRRw8odqyE 2oMtD6VA0Y WQb0mHZL6Rt9 CrytHulu33 xAZwg4vkEy AIGdLMtJwmbH 5hjZj7ZNtgn jl8KqV0GfTtf NklKaAswihR kkYcFRHI15cf dvAC5D5I441 4ohAVizG7dx ApdI4kklqB hofJ0TUYQA 9sttsgJSBh bghttXmy3k3H fXstL5i6CIH 24ehncqljnBS lgciZqlYJk ts36mstLaJ8 4po0mVqzyjF 5qYutRWxlOg knhCxs4AkTs r9MV7ebBvCY Ll2J9T2KGBX jtsvNorK7JCc Cn7Uxo9o9i 8bWFQSvva4 SEVhqaOtTe73 qXqUKkT31PGc I7OMCHtWvDh9 MPXect0TcQ qtkSs8NVPuQ t9WZhkQ2dCI Zlwav3boOvB znfUtUOVoT3 ol7BvP9BBdPd 1U8Qf1d3wfPm DS9qNFE6U2 cBhmJzVWRD7s kIpGFhq9keb 2v4e2FRoPy A9QFjBK2PVW zK5lhyTTcC ULYwZint2c M8Aclgh2Eq SOfmAWY9wti pCq0gttZvw gJDcnhnyyFzh fEsiTwxW7Rv KylbsV5ICFuZ f6zFO17AdT9 lBQHeV1Llue ptOWs2qYzGn xoqOnkugopOH UD416HQqCfOx Zq5Uo3nlMD auAES9oqh6G qJoc3gV87hd XPwobUzPScXw 4oWyPSgsn7g Myg3zUreCi7 CRhZQ0bvDwV GINDfX8emjq jjZntUnhly YQTbMVLmJcI 7sdqyL3Thu kTz2JY3ww8 qFXQBUxseNTl fBcyvPmd7FK w8l8GrnCSxt MTShVAzUrr NeuKiCfJrkp w6Us5DnGNA i8dT2UW7cz hhHOuVZrs7c A1iS7k3DmZ 9Fm7cKGGIuV c5XKU3oIPf JmhlXnKREv MEKRV1DlWL BKIblwkyK13 65weYecd2Vn pMH1R9LMFffK xkpkvPSyLRv wSYT38xUJhE waN6kEUP4XE iA9ZF4hVQI Aq4TwsjWXyv OXu7rMctNwiG rtL8EJh3wTt UVKZPD3TKvhA dv1FHPQyg4d gdTtqV2j9Z x0yf4Dk2nP S6s3BufxszWY wqpSDOQ1GY KPVXfO2NFUXk kdQQKapvM8 2isrotL5Kes 8FzKGon6eii 5UED7LQQ88MR Qn4LUlGsR0f yvbhhL7JdCd MsyWC50uNA0 3IL06MxLIrW yI3fh8AhP5 DSoXbRbCe2em ZcuaS0RzdB IkUu7wPzew YSrd3iQuXn5q 9Jscd1yxbc9L WwjFU8axZJQW hC5RRM7NlRP0 I8mLrRf9cpU 9cxBJCkVSX b7HEQhfA8h wYVhQ0uO2Wxx Ymyj0jYyXM2 lRve28xsjuW vYuxxrUtABZ KFs5a3SojXvv 6GAbMk01E7H Rfvu76BscC32 BrBuqa1YZgHY KNQjncfaWk XlwUr6vzLH s4UkOzV8SJA 418E6smXBb4 HsMWusWKR40C Rin0WzP0NZb1 3mAlHDtnuE5 euxtj8Ou07 IY0aWQ6xM87Y 4Q6Ai6rsGxx wiPyvl3MKu2M npVdMyqyUYZ dzuwoktugS 2RDcYZIeAv 2OqaOwE01v6 6rWWlzxixSN taiYDuHM1Y ZshDkz9yfiL4 QxISkLcOzgEO MiZtWpROcSJU 9tZr3zCt6c uivt0pAZ5tP aUgPuG2KBgQ P38I75HYmV 555Jx0kN1vaC ZOZbbvA3fQ MxP1HMvrmKgi 7Sp5vTqXWdk lun7mdgxPT JxBXQZvDDsuv DybZvFmlSf mRO6HrRTfaA AGe951NHKMYK zqPCqkNoCAlA shLU874JFec xwe4xSQYDv ETfomf4UAt4 SWO1akRUHKd PBZQgWpLKL CWYtsk2uAdyi BFnJVFl4gT wXI89n3v5X9M Gpb55Vehgj8 YsYQiYf3fP rUjGtFmXVI 2bXpDTL03I ttTU3Z4u3PK6 JuIRaDswd5 6PDLf09pwok 1EmyhPbygq lDc242TOFgF bpeyST9hFP hQpMjBgWB9Ep o2Pr796AHPy CAlG75Q6PQ7I 7kYfXdmULUS nVFuDS3CNI yJdCdKd12c XhHgkqVLd0 TO88SNBkNWs 5PuASmEwnjU ADuPVnqP219i dBsSE8C0zA 41ibQO3Sxemi 28zQdAwROIMF SX7sIYyNt6kl G59cRww2VOr0 sNqmsUIHRqdN xJxrxMB2KE lPzx6Q0oX6D wz2weTpTMr BBOAPuoOhg MZNUSGGuGv HGybvk3asr6h CsmKqVEgLw JlLVUzy1fG bmywDAQjBqu1 nyD86KtArue Z29jqX3bNT stjrepJjKy 3eWEhL0i6X GLfkCZQf6fWD bbb1TXsn32AS KjoeQacs3YY BuuzUGDXeX jrdma19TQO 9NsSL0zK6R gbySG4nT0w6 ZPbuySni53M ZmDdo260xc Bn9tvZRUfICG TTDFrAEBskeD BgsIXl3Oto fxqnBPY0Zd2a zVDWO37F2qJ oWKYkiQD1B NXorI33hKwd U6FzK59EoF4 JvjdvXg6Gom nRCxPviVMd eNnsELSi5aPa OkXE0z8fbr5 kMXzoM7yVU JTshrZxOpq vrbpE683Jy 649z9ZiMJe EnM7f3dOwm YqQ8Wyysr2 w43DvKtWug JXmm9tU5W7AA ixheCKBu0j 4P2O96DC1w2 OfCEwGQIFMd iyqAtyD5mwVL MoirYcWScbHb CfIbPhRUbL 7LeoCdYwwH TGLtsX4Z9iqU dtm8d9jV3oZq i765mdiy17W MKf19rtFTeG Ggn5WdWo62w kUe6BV5erV jwIQzSxD1gqJ QCfhAFXzTYK8 rHry1UlSTT evcIDht7pHq7 Tp94kYXA1Zsf jt9eCeNiYek XYtg7E3JtE bmzJPPGLTg WxJfNcBE9FVG HV0mJhvNiwA eiHvsqyvQd1u RM9McRnWRIUv j4vytZiF4s znxxIm5KCP 7wRb826RykP 2E2BmwbNEy hNaFCQnvvvcy vMAfVnhe4oTp mM6E4i1LsZHr 7Qo9gmSNrXS 7cugDq8SoS RuXOYqgEkB o0KUAL9QKq 6xphTWpOu3 WEIPfybSShVd BnjgCtugjJl o04MWJQssDM TB2ayR2BY9c MYjuu8IouiqO 5K3JLnqICf */}", "title": "" }, { "docid": "bbe2c8265e431fc9b370ed32f7e59573", "score": "0.47782403", "text": "function y(){function e(e){t.Extends(f,e),i(e.jQuery),t._base.name(\"Mississippi\"),n=t._base,a=n.config,r=n.utils}function i(e){o=e,s=e}var t=new I(this);this.LocalSVNRevision=\"$Rev: 5979 $\";var n,a,r,o,s;t.Override(\"buildHtml\",function(){var e='<div id=\"{{id}}\" class=\"walkme-player walkme-mississippi walkme-theme-{{theme}} walkme-direction-{{direction}} walkme-{{isIe}} walkme-position-major-{{positionMajor}} walkme-position-minor-{{positionMinor}} {{accessibleClass}}\"><div class=\"walkme-out-wrapper\"><div class=\"walkme-in-wrapper\">{{#jawsAccessibility}}<a href=\"#\" class=\"walkme-title\" title=\"{{{title}}}\">{{{title}}}</a>{{/jawsAccessibility}}{{^jawsAccessibility}}<div class=\"walkme-title\">{{{title}}}</div>{{/jawsAccessibility}}<div class=\"walkme-arrow\"></div><div class=\"walkme-bar\"></div></div></div></div>',i=n.mustache().to_html(e,{id:n.id(),theme:a().TriangleTheme,direction:a().Direction,isIe:n.isIeClass(),positionMajor:n.positionMajor(),positionMinor:n.positionMinor(),title:a().ClosedMenuTitle,accessibleClass:n.accessibleClass(),jawsAccessibility:r().isFeatureActive(\"jawsAccessibility\")});return i}),t.Override(\"addResources\",function(e,i){var t=[{id:\"widgetFont\",name:\"widget-font\",url:\"/player/resources/fonts/widget-font_v3\",dummeyText:\"&#xe60c;\"},{id:\"opensans\",name:\"opensans\",url:\"/player/resources/fonts/opensans\"}];r().ResourceManager.fonts(t,s(\"head\"),e,i)});e.apply(null,arguments)}", "title": "" }, { "docid": "0a97d02845b7110308bddb56fb87f5b3", "score": "0.47706127", "text": "function ws_blinds(c, b, a) { var g = jQuery; var e = c.parts || 3; var f = g(\"<div>\"); f.css({ position: \"absolute\", width: \"100%\", height: \"100%\", left: 0, top: 0, \"z-index\": 8 }).hide().appendTo(a); var h = []; for (var d = 0; d < e; d++) { h[d] = g(\"<div>\").css({ position: \"absolute\", height: \"100%\", width: Math.ceil(100 / e) + 1 + \"%\", border: \"none\", margin: 0, overflow: \"hidden\", top: 0, left: Math.round(100 * d / e) + \"%\" }).appendTo(f) } this.go = function (m, p, j) { var l = p > m ? 1 : 0; if (j) { if (j <= -1) { m = (p + 1) % b.length; l = 0 } else { if (j >= 1) { m = (p - 1 + b.length) % b.length; l = 1 } else { return -1 } } } f.find(\"img\").stop(true, true); f.show(); var o = g(\"ul\", a); if (c.fadeOut) { o.fadeOut((1 - 1 / e) * c.duration) } for (var n = 0; n < h.length; n++) { var k = h[n]; g(b.get(m)).clone().css({ position: \"absolute\", top: 0, left: (!l ? (-f.width()) : (f.width() - k.position().left)) + \"px\", width: \"auto\", height: \"100%\", transform: \"translate3d(0,0,0)\" }).appendTo(k).animate({ left: -k.position().left + \"px\" }, (c.duration / (h.length + 1)) * (l ? (h.length - n + 1) : (n + 2)), ((!l && n == h.length - 1 || l && !n) ? function () { o.css({ left: -m + \"00%\" }).stop(true, true).show(); f.hide().find(\"img\").remove() } : null)) } return m } }", "title": "" }, { "docid": "7600397dda3ec2e3e4b27f99c211d299", "score": "0.47598985", "text": "function rg(a){var b;I&&(b=a.xe());var c=ac(\"xml\");a=Uc(a,!0);for(var d=0,e;e=a[d];d++){var g=sg(e);e=e.Q();g.setAttribute(\"x\",I?b-e.x:e.x);g.setAttribute(\"y\",e.y);c.appendChild(g)}return c}", "title": "" }, { "docid": "587acf825e8abe22ea533fe2228bdc03", "score": "0.47401997", "text": "function ed(a){this.sa={};this.w=a}", "title": "" }, { "docid": "077ab03ca6bd9cff0243c0abdd2f91c1", "score": "0.4735586", "text": "function M44() {\n}", "title": "" }, { "docid": "4393747d1654c7efe826c95ac0c028c2", "score": "0.47283387", "text": "function JimpWrapper()\n{\n\n}", "title": "" }, { "docid": "189bfcb740826442eeb9822bdd447c7e", "score": "0.47251946", "text": "function tV(a,b,c,d,e,f,g,k,l,n){if(ea[ud]){this.sta=n?n:lwa;t:{n=this.sta;var p=ea[Fc][Kc]||ea[Fc].hash;if(null==n)n=p;else{if(p)for(var p=p[we](1)[zc](We),t=0;t<p[J];t++)if(p[t][we](0,p[t][zd](If))==n){n=p[t][we](p[t][zd](If)+1);break t}n=M}}this.pta=n;this.ca={};this.en={};this.attributes=[];a&&this[v](BD,a);b&&this[v](qH,b);c&&this[v](pi,c);d&&this[v](gh,d);e&&this[v](SC,new uV(e[qc]()[zc](mf)));t:if(a=new uV([0,0,0]),Rx.plugins&&Rx.mimeTypes[J])(b=Rx.plugins[TAa])&&b.description&&(a=new uV(b.description[Ab](/([a-zA-Z]|\\s)+/,\nM)[Ab](/(\\s+r|\\s+b[0-9]+)/,mf)[zc](mf)));else if(Rx[Cc]&&0<=Rx[Cc][zd](uAa))for(b=1,c=3;b;)try{c++,b=new ActiveXObject(RAa+c),a=new uV([c,0,0])}catch(u){b=null}else{b=null;try{b=new ActiveXObject(PAa)}catch(x){try{b=new ActiveXObject(QAa),a=new uV([6,0,21]),b.Wya=$K}catch(A){if(6==a.UE)break t}try{b=new ActiveXObject(SAa)}catch(C){}}null!=b&&(a=new uV(b.GetVariable(NEa)[zc](Ke)[1][zc](jf)))}this.DU=a;!ba.opera&&ea.all&&7<this.DU.UE&&(GKa=!0);f&&(this.ca.bgcolor=f);this.ca.quality=g?g:AH;this[v](cna,\n!1);this[v](HI,!1);this[v](Hma,k?k:ba[Fc]);this[v](hF,M);l&&this[v](hF,l)}}", "title": "" }, { "docid": "6380fc3e7db85ed0d742d1192f42e574", "score": "0.47165766", "text": "function Encoder() {\n}", "title": "" }, { "docid": "5090ec5c969b85d1dda944ec5cf3e49d", "score": "0.47120836", "text": "function ie(a,b,c){if(c){var d=document.createDocumentFragment(),f=!b.hasAttribute(\"viewBox\")&&c.getAttribute(\"viewBox\");f&&b.setAttribute(\"viewBox\",f);for(b=c.cloneNode(!0);b.childNodes.length;)d.appendChild(b.firstChild);a.appendChild(d)}}", "title": "" }, { "docid": "15fe29de6c2ec2b46653b302c941243d", "score": "0.47037938", "text": "function en(a,b){this.qe=[];this.ki=a;this.fh=b||null;this.Rc=this.ic=!1;this.ab=void 0;this.mg=this.uj=this.Qe=!1;this.Be=0;this.Y=null;this.Se=0}", "title": "" }, { "docid": "4301d97a0b5abafca348a9fdc8b8f3aa", "score": "0.46967345", "text": "function ws_bubbles(b,l,n){var e=jQuery;var f=e(this);var i=b.noCanvas||!document.createElement(\"canvas\").getContext;var k=b.width,p=b.height;var g=e(\"<div>\").css({position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",overflow:\"hidden\"}).addClass(\"ws_effect ws_bubbles\").appendTo(n);if(!i){var a=e(\"<canvas>\").css({position:\"absolute\",left:0,top:0,width:\"100%\",height:\"100%\"}).appendTo(g);var o=a.get(0).getContext(\"2d\")}var j={easeOutBack:function(u,v,h,z,y,w){if(w==undefined){w=1.70158}return z*((v=v/y-1)*v*((w+1)*v+w)+1)+h},easeOutBackCubic:function(u,v,h,A,z,w){var y=(v/=z)*v;return h+A*(-1.5*y*v*y+2*y*y+4*y*v+-9*y+5.5*v)},easeOutCubic:function(u,v,h,y,w){return y*((v=v/w-1)*v*v+1)+h},easeOutExpo:function(u,v,h,y,w){return(v==w)?h+y:y*(-Math.pow(2,-10*v/w)+1)+h}};var s=[[\"#bbbbbb\",0.5,0.5],[\"#b3b3b3\",0.2,0.2],[\"#b6b6b6\",0.5,0.2],[\"#b9b9b9\",0.8,0.2],[\"#cccccc\",0.2,0.8],[\"#c3c3c3\",0.5,0.8],[\"#c6c6c6\",0.8,0.8]];var c=[[[0.5,0.5,0.7,0.15],[0.5,0.5,0.6,0.3],[0.5,0.5,0.5,0.45],[0.5,0.5,0.4,0.6],[0.5,0.5,0.3,0.75],[0.5,0.5,0.2,0.9],[0.5,0.5,0.1,1]],[[0.5,0.5,0.7,1],[0.5,0.5,0.6,0.9],[0.5,0.5,0.5,0.75],[0.5,0.5,0.4,0.6],[0.5,0.5,0.3,0.45],[0.5,0.5,0.2,0.3],[0.5,0.5,0.1,0.15]]];var m=[[[0.5,0.5,0,1],[0.5,0.5,0,0.9],[0.5,0.5,0,0.75],[0.5,0.5,0,0.6],[0.5,0.5,0,0.45],[0.5,0.5,0,0.3],[0.5,0.5,0,0.15]],[[0.5,0.5,0,0.15],[0.5,0.5,0,0.3],[0.5,0.5,0,0.45],[0.5,0.5,0,0.6],[0.5,0.5,0,0.75],[0.5,0.5,0,0.9],[0.5,0.5,0,1]],[[0.5,7.5,0.7,0.75],[0.5,7.5,0.6,0.15],[0.5,7.5,0.5,1],[0.5,7.5,0.4,0.3],[0.5,7.5,0.3,0.45],[0.5,7.5,0.2,0.6],[0.5,7.5,0.1,0.9]],[[0.5,7.5,0.7,1],[0.5,7.5,0.6,0.9],[0.5,7.5,0.5,0.75],[0.5,7.5,0.4,0.6],[0.5,7.5,0.3,0.45],[0.5,7.5,0.2,0.3],[0.5,7.5,0.1,0.15]]];function d(u){if(Object.prototype.toString.call(u)===\"[object Array]\"){return u[Math.floor(Math.random()*(u.length))]}else{var h;var t=0;for(var v in u){if(Math.random()<1/++t){h=v}}return/linear|swing/g.test(h)?d(u):h}}function q(B,A,v,z,t){B.clearRect(0,0,k,p);for(var u=0,y=v.length;u<y;u++){var h=Math.max(0,Math.min(1,A-v[u][3]*(1-A)));if(t&&j[t]){h=j[t](1,h,0,1,1,1)}var w=k;if(k/p<=1.8&&k/p>0.7){w*=2}else{if(k/p<=0.7){w=p*2}}var x=v[u][2]*h*w;if(z){x=(v[u][2]+(z[u][2]-v[u][2])*h)*w}x=Math.max(0,x);B.beginPath();B.arc((v[u][0]+((z?z[u][0]:0.5)-v[u][0])*h)*k,(v[u][1]+((z?z[u][1]:0.5)-v[u][1])*h)*p,x,0,2*Math.PI,false);B.fillStyle=s[u][0];B.fill()}}this.go=function(B,w){if(i){n.find(\".ws_list\").css(\"transform\",\"translate3d(0,0,0)\").stop(true).animate({left:(B?-B+\"00%\":(/Safari/.test(navigator.userAgent)?\"0%\":0))},b.duration,\"easeInOutExpo\",function(){f.trigger(\"effectEnd\")})}else{k=n.width();p=n.height();a.attr({width:k,height:p});var z=l.get(w);for(var x=0,A=s.length;x<A;x++){var u=Math.abs(s[x][1]),h=Math.abs(s[x][2]);s[x][0]=r(z,{x:u*k,y:h*p,w:2,h:2})||s[x][0]}var t=d(c);var v=d(m);var y=d(j);wowAnimate(function(C){q(o,C,t,0,y)},0,1,b.duration/2,function(){n.find(\".ws_list\").css({left:(B?-B+\"00%\":(/Safari/.test(navigator.userAgent)?\"0%\":0))});y=d(j);wowAnimate(function(C){q(o,1-C,v,t,y)},0,1,b.duration/2,function(){o.clearRect(0,0,k,p);f.trigger(\"effectEnd\")})})}};function r(C,t){t=t||{};var E=1,w=t.exclude||[],B;var y=document.createElement(\"canvas\"),v=y.getContext(\"2d\"),u=y.width=C.naturalWidth,I=y.height=C.naturalHeight;v.drawImage(C,0,0,C.naturalWidth,C.naturalHeight);try{B=v.getImageData(t.x?t.x:0,t.y?t.y:0,t.w?t.w:C.width,t.h?t.h:C.height)[\"data\"]}catch(D){return false}var x=(t.w?t.w:C.width*t.h?t.h:C.height)||B.length,z={},G=\"\",F=[],h={dominant:{name:\"\",count:0}};var A=0;while(A<x){F[0]=B[A];F[1]=B[A+1];F[2]=B[A+2];G=F.join(\",\");if(G in z){z[G]=z[G]+1}else{z[G]=1}if(w.indexOf([\"rgb(\",G,\")\"].join(\"\"))===-1){var H=z[G];if(H>h.dominant.count){h.dominant.name=G;h.dominant.count=H}}A+=E*4}return[\"rgb(\",h.dominant.name,\")\"].join(\"\")}}", "title": "" }, { "docid": "4301d97a0b5abafca348a9fdc8b8f3aa", "score": "0.46967345", "text": "function ws_bubbles(b,l,n){var e=jQuery;var f=e(this);var i=b.noCanvas||!document.createElement(\"canvas\").getContext;var k=b.width,p=b.height;var g=e(\"<div>\").css({position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",overflow:\"hidden\"}).addClass(\"ws_effect ws_bubbles\").appendTo(n);if(!i){var a=e(\"<canvas>\").css({position:\"absolute\",left:0,top:0,width:\"100%\",height:\"100%\"}).appendTo(g);var o=a.get(0).getContext(\"2d\")}var j={easeOutBack:function(u,v,h,z,y,w){if(w==undefined){w=1.70158}return z*((v=v/y-1)*v*((w+1)*v+w)+1)+h},easeOutBackCubic:function(u,v,h,A,z,w){var y=(v/=z)*v;return h+A*(-1.5*y*v*y+2*y*y+4*y*v+-9*y+5.5*v)},easeOutCubic:function(u,v,h,y,w){return y*((v=v/w-1)*v*v+1)+h},easeOutExpo:function(u,v,h,y,w){return(v==w)?h+y:y*(-Math.pow(2,-10*v/w)+1)+h}};var s=[[\"#bbbbbb\",0.5,0.5],[\"#b3b3b3\",0.2,0.2],[\"#b6b6b6\",0.5,0.2],[\"#b9b9b9\",0.8,0.2],[\"#cccccc\",0.2,0.8],[\"#c3c3c3\",0.5,0.8],[\"#c6c6c6\",0.8,0.8]];var c=[[[0.5,0.5,0.7,0.15],[0.5,0.5,0.6,0.3],[0.5,0.5,0.5,0.45],[0.5,0.5,0.4,0.6],[0.5,0.5,0.3,0.75],[0.5,0.5,0.2,0.9],[0.5,0.5,0.1,1]],[[0.5,0.5,0.7,1],[0.5,0.5,0.6,0.9],[0.5,0.5,0.5,0.75],[0.5,0.5,0.4,0.6],[0.5,0.5,0.3,0.45],[0.5,0.5,0.2,0.3],[0.5,0.5,0.1,0.15]]];var m=[[[0.5,0.5,0,1],[0.5,0.5,0,0.9],[0.5,0.5,0,0.75],[0.5,0.5,0,0.6],[0.5,0.5,0,0.45],[0.5,0.5,0,0.3],[0.5,0.5,0,0.15]],[[0.5,0.5,0,0.15],[0.5,0.5,0,0.3],[0.5,0.5,0,0.45],[0.5,0.5,0,0.6],[0.5,0.5,0,0.75],[0.5,0.5,0,0.9],[0.5,0.5,0,1]],[[0.5,7.5,0.7,0.75],[0.5,7.5,0.6,0.15],[0.5,7.5,0.5,1],[0.5,7.5,0.4,0.3],[0.5,7.5,0.3,0.45],[0.5,7.5,0.2,0.6],[0.5,7.5,0.1,0.9]],[[0.5,7.5,0.7,1],[0.5,7.5,0.6,0.9],[0.5,7.5,0.5,0.75],[0.5,7.5,0.4,0.6],[0.5,7.5,0.3,0.45],[0.5,7.5,0.2,0.3],[0.5,7.5,0.1,0.15]]];function d(u){if(Object.prototype.toString.call(u)===\"[object Array]\"){return u[Math.floor(Math.random()*(u.length))]}else{var h;var t=0;for(var v in u){if(Math.random()<1/++t){h=v}}return/linear|swing/g.test(h)?d(u):h}}function q(B,A,v,z,t){B.clearRect(0,0,k,p);for(var u=0,y=v.length;u<y;u++){var h=Math.max(0,Math.min(1,A-v[u][3]*(1-A)));if(t&&j[t]){h=j[t](1,h,0,1,1,1)}var w=k;if(k/p<=1.8&&k/p>0.7){w*=2}else{if(k/p<=0.7){w=p*2}}var x=v[u][2]*h*w;if(z){x=(v[u][2]+(z[u][2]-v[u][2])*h)*w}x=Math.max(0,x);B.beginPath();B.arc((v[u][0]+((z?z[u][0]:0.5)-v[u][0])*h)*k,(v[u][1]+((z?z[u][1]:0.5)-v[u][1])*h)*p,x,0,2*Math.PI,false);B.fillStyle=s[u][0];B.fill()}}this.go=function(B,w){if(i){n.find(\".ws_list\").css(\"transform\",\"translate3d(0,0,0)\").stop(true).animate({left:(B?-B+\"00%\":(/Safari/.test(navigator.userAgent)?\"0%\":0))},b.duration,\"easeInOutExpo\",function(){f.trigger(\"effectEnd\")})}else{k=n.width();p=n.height();a.attr({width:k,height:p});var z=l.get(w);for(var x=0,A=s.length;x<A;x++){var u=Math.abs(s[x][1]),h=Math.abs(s[x][2]);s[x][0]=r(z,{x:u*k,y:h*p,w:2,h:2})||s[x][0]}var t=d(c);var v=d(m);var y=d(j);wowAnimate(function(C){q(o,C,t,0,y)},0,1,b.duration/2,function(){n.find(\".ws_list\").css({left:(B?-B+\"00%\":(/Safari/.test(navigator.userAgent)?\"0%\":0))});y=d(j);wowAnimate(function(C){q(o,1-C,v,t,y)},0,1,b.duration/2,function(){o.clearRect(0,0,k,p);f.trigger(\"effectEnd\")})})}};function r(C,t){t=t||{};var E=1,w=t.exclude||[],B;var y=document.createElement(\"canvas\"),v=y.getContext(\"2d\"),u=y.width=C.naturalWidth,I=y.height=C.naturalHeight;v.drawImage(C,0,0,C.naturalWidth,C.naturalHeight);try{B=v.getImageData(t.x?t.x:0,t.y?t.y:0,t.w?t.w:C.width,t.h?t.h:C.height)[\"data\"]}catch(D){return false}var x=(t.w?t.w:C.width*t.h?t.h:C.height)||B.length,z={},G=\"\",F=[],h={dominant:{name:\"\",count:0}};var A=0;while(A<x){F[0]=B[A];F[1]=B[A+1];F[2]=B[A+2];G=F.join(\",\");if(G in z){z[G]=z[G]+1}else{z[G]=1}if(w.indexOf([\"rgb(\",G,\")\"].join(\"\"))===-1){var H=z[G];if(H>h.dominant.count){h.dominant.name=G;h.dominant.count=H}}A+=E*4}return[\"rgb(\",h.dominant.name,\")\"].join(\"\")}}", "title": "" }, { "docid": "606e7df20bbcb1a140aac1e8ecdf208a", "score": "0.46966153", "text": "function ih(a,b,c,d,e,h,k){var m=jh;D&&(m=-m);this.Aq=Yb(m);this.ma=a;this.$c=b;this.Sm=c;a.Re.appendChild(this.li(b,!(!h||!k)));kh(this,d,e);h&&k||(a=this.$c.getBBox(),h=a.width+2*lh,k=a.height+2*lh);this.Gd(h,k);mh(this);nh(this);this.kj=!0;H||(F(this.lg,\"mousedown\",this,this.Fq),this.kd&&F(this.kd,\"mousedown\",this,this.ys))}", "title": "" }, { "docid": "7f16b40d3c9f7fea77ed9c2b7a8f3c65", "score": "0.4689777", "text": "function eh(a,b,c,d,e,h,k){var m=fh;D&&(m=-m);this.Ho=m*Math.PI/180;this.ea=a;this.Lc=b;this.Sk=c;a.pe.appendChild(this.oh(b,!(!h||!k)));gh(this,d,e);h&&k||(a=this.Lc.getBBox(),h=a.width+2*hh,k=a.height+2*hh);this.kd(h,k);ih(this);jh(this);this.li=!0;H||(F(this.Ef,\"mousedown\",this,this.Mo),this.Rc&&F(this.Rc,\"mousedown\",this,this.yq))}", "title": "" }, { "docid": "03cd533ccae3d6622228c60e44aa1ba2", "score": "0.46886948", "text": "function Wagen() {}", "title": "" }, { "docid": "84e5068e6b39129a1579b3d6b6f4c9e3", "score": "0.46849737", "text": "function toDevar(l) { l = l.toLowerCase() + \" \"; var m = { a: \" अ\", i: \" इ\", u: \" उ\", \"ā\": \" आ\", \"ī\": \" ई\", \"ū\": \" ऊ\", e: \" ए\", o: \" ओ\" }; var n = { \"ā\": \"ा\", i: \"ि\", \"ī\": \"ी\", u: \"ु\", \"ū\": \"ू\", e: \"े\", o: \"ो\", \"ṃ\": \"ं\", k: \"क\", kh: \"ख\", g: \"ग\", gh: \"घ\", \"ṅ\": \"ङ\", c: \"च\", ch: \"छ\", j: \"ज\", jh: \"झ\", \"ñ\": \"ञ\", \"ṭ\": \"ट\", \"ṭh\": \"ठ\", \"ḍ\": \"ड\", \"ḍh\": \"ढ\", \"ṇ\": \"ण\", t: \"त\", th: \"थ\", d: \"द\", dh: \"ध\", n: \"न\", p: \"प\", ph: \"फ\", b: \"ब\", bh: \"भ\", m: \"म\", y: \"य\", r: \"र\", l: \"ल\", \"ḷ\": \"ळ\", v: \"व\", s: \"स\", h: \"ह\" }; var k, h, g, f, e, d, b; var c = \"\"; var a = 0; var j = 0; l = l.replace(/\\&quot;/g, \"`\"); while (j < l.length) { k = l.charAt(j - 2); h = l.charAt(j - 1); g = l.charAt(j); f = l.charAt(j + 1); e = l.charAt(j + 2); d = l.charAt(j + 3); b = l.charAt(j + 4); if (j == 0 && m[g]) { c += m[g]; j += 1 } else { if (f == \"h\" && n[g + f]) { c += n[g + f]; if (e && !m[e] && f != \"ṃ\") { c += \"्\" } j += 2 } else { if (n[g]) { c += n[g]; if (f && !m[f] && !m[g] && g != \"ṃ\") { c += \"्\" } j++ } else { if (g != \"a\") { if (a[h] || (h == \"h\" && a[k])) { c += \"्\" } c += g; j++; if (m[f]) { c += m[f]; j++ } } else { j++ } } } } } if (a[g]) { c += \"्\" } c = c.replace(/\\`+/g, '\"'); pdevar = c.slice(0, -1); return c.slice(0, -1) }", "title": "" }, { "docid": "d9e324b0ab914c67fb6e7a535d74d284", "score": "0.46821767", "text": "function DwCASimplifier() {\n}", "title": "" }, { "docid": "66f967099abb31870e941e9c5a7f6f66", "score": "0.4678099", "text": "function Xw(a,b){this.H=[];this.ba=a;this.ca=b||null;this.D=this.C=!1;this.A=void 0;this.R=this.ua=this.S=!1;this.N=0;this.B=null;this.F=0}", "title": "" }, { "docid": "bdb9f34e56d7a6bde59294bb1e281f84", "score": "0.46682143", "text": "function support3d() {\r\n var el = document.createElement('p'),\r\n has3d,\r\n transforms = {\r\n 'webkitTransform':'-webkit-transform',\r\n 'OTransform':'-o-transform',\r\n 'msTransform':'-ms-transform',\r\n 'MozTransform':'-moz-transform',\r\n 'transform':'transform'\r\n };\r\n\r\n // Add it to the body to get the computed style.\r\n document.body.insertBefore(el, null);\r\n\r\n for (var t in transforms) {\r\n if (el.style[t] !== undefined) {\r\n el.style[t] = 'translate3d(1px,1px,1px)';\r\n has3d = window.getComputedStyle(el).getPropertyValue(transforms[t]);\r\n }\r\n }\r\n\r\n document.body.removeChild(el);\r\n\r\n return (has3d !== undefined && has3d.length > 0 && has3d !== 'none');\r\n }", "title": "" }, { "docid": "bdb9f34e56d7a6bde59294bb1e281f84", "score": "0.46682143", "text": "function support3d() {\r\n var el = document.createElement('p'),\r\n has3d,\r\n transforms = {\r\n 'webkitTransform':'-webkit-transform',\r\n 'OTransform':'-o-transform',\r\n 'msTransform':'-ms-transform',\r\n 'MozTransform':'-moz-transform',\r\n 'transform':'transform'\r\n };\r\n\r\n // Add it to the body to get the computed style.\r\n document.body.insertBefore(el, null);\r\n\r\n for (var t in transforms) {\r\n if (el.style[t] !== undefined) {\r\n el.style[t] = 'translate3d(1px,1px,1px)';\r\n has3d = window.getComputedStyle(el).getPropertyValue(transforms[t]);\r\n }\r\n }\r\n\r\n document.body.removeChild(el);\r\n\r\n return (has3d !== undefined && has3d.length > 0 && has3d !== 'none');\r\n }", "title": "" }, { "docid": "bdb9f34e56d7a6bde59294bb1e281f84", "score": "0.46682143", "text": "function support3d() {\r\n var el = document.createElement('p'),\r\n has3d,\r\n transforms = {\r\n 'webkitTransform':'-webkit-transform',\r\n 'OTransform':'-o-transform',\r\n 'msTransform':'-ms-transform',\r\n 'MozTransform':'-moz-transform',\r\n 'transform':'transform'\r\n };\r\n\r\n // Add it to the body to get the computed style.\r\n document.body.insertBefore(el, null);\r\n\r\n for (var t in transforms) {\r\n if (el.style[t] !== undefined) {\r\n el.style[t] = 'translate3d(1px,1px,1px)';\r\n has3d = window.getComputedStyle(el).getPropertyValue(transforms[t]);\r\n }\r\n }\r\n\r\n document.body.removeChild(el);\r\n\r\n return (has3d !== undefined && has3d.length > 0 && has3d !== 'none');\r\n }", "title": "" }, { "docid": "de67b5a5f6ba42fbdd304748a36b41b1", "score": "0.4667328", "text": "function jsCanvas(c,o,p,pl) {\n /*\n Instance variables:\n self.jsState; // transformation and style and similar\n this.ctx; // refers to the current context on the canvas\n */\n var self = this; // keep hold of this\n this.ctx = c; // canvas context\n var gctx = c; // so that we never lose the base canvas \n var output = o; // output pane\n var params = p; // parameters pane\n var panel = pl; // parameter panel\n if (p)\n\tp.addEventListener('submit',function(e) {e.preventDefault(); return false;}); // disable submission\n\n var jsDraw; // the draw cycle animation\n var jsGrExt; // our graphical extensions\n var jsG; // a global table\n var sTime; // time at which the script started\n var inTouch; // used for handling touches\n var code; // saves the current code in case we restart\n var codetxt; // saves the text version of the current code\n var imgNum = 0; // generated images\n var blendmodes = { // all the various blend modes\n\tsourceOver: 'source-over',\n\tsourceIn: 'source-in',\n\tsourceOut: 'source-out',\n\tsourceAtop: 'source-atop',\n\tdestinationOver: 'destination-over',\n\tdestinationIn: 'destination-in',\n\tdestinationOut: 'destination-out',\n\tdestinationAtop: 'destination-atop',\n\tlighter: 'lighter',\n\tcopy: 'copy',\n\txor: 'xor',\n\tmultiply: 'multiply',\n\tscreen: 'screen',\n\toverlay: 'overlay',\n\tdarken: 'darken',\n\tlighten: 'lighten',\n\tcolourDodge: 'color-dodge',\n\tcolourBurn: 'color-burn',\n\thardLight: 'hard-light',\n\tsoftLight: 'soft-light',\n\tdifference: 'difference',\n\texclusion: 'exclusion',\n\thue: 'hue',\n\tsaturation: 'saturation',\n\tcolour: 'color',\n\tluminosity: 'luminosity'\n };\n\n /*\n This does the actual execution\n */\n this.executeJS = function(c,cl) {\n\tvar offset;\n\tjsG = new Table;\n\tif (panel)\n\t panel.style.display = 'block';\n\tvar evt = new Event ('resize');\n\twindow.dispatchEvent(evt);\n\t\n\tself.initialiseJS();\n\tif (typeof c == 'string') {\n\t codetxt = self.prejs(true);\n\t offset = codetxt.split('\\n').length - 1 + 4; // not currently used\n\t codetxt += '\\n' + c + '\\n' + self.postjs(true);\n\t code = function() { eval(codetxt) };\n\t} else if (typeof c == 'function') {\n\t code = c;\n\t codetxt = c.toString();\n\t offset = 0;\n\t}\n\tif (cl && output) {\n\t output.innerHTML = '';\n\t output.style.color = 'black';\n\t self.clear();\n\t}\n\tsTime = performance.now();\n\tself.ctx.canvas.focus();\n\ttry {\n\t code(jsG);\n\t} catch (e) {\n\t self.doError(e,codetxt,offset);\n\t};\n }\n\n this.doError = function(e,c,o) {\n\tself.stopJS();\n\tif (!c) {\n\t c = codetxt;\n\t}\n var emsg;\n\tvar elines = e.stack.split('\\n');\n\tvar efn;\n\tvar eln;\n\tif (elines[0].search(/@/) != -1) {\n\t // Firefox\n\t efn = elines[0].substring(0,elines[0].search(/@/));\n\t eln = elines[0].match(/:(\\d+):\\d+$/)[1];\n\t} else if (elines[1].search(/^\\s*at /) != -1) {\n\t // Chrome\n\t var matches = elines[1].match(/^\\s*at (\\w+) .*:(\\d+):\\d+\\)$/);\n\t if (matches) {\n\t\teln = matches[2];\n\t\tif (matches[1] != \"eval\") {\n\t\t efn = matches[1];\n\t\t}\n\t }\n\t}\n if (eln) {\n var lines = c.split('\\n');\n var tab,m,n = 0;\n for (var i = 0; i < lines.length && i< eln; i++) {\n if (lines[i].search(/^\\/\\/##/) != -1) {\n m = lines[i].match(/^\\/\\/## (.*)/);\n tab = m[1];\n\t\t n = i;\n }\n }\n\t emsg = e.message;\n\t if (efn) {\n\t\temsg += \"\\nFunction: \" + efn;\n\t }\n\t emsg += \"\\nLine: \" + (eln - 2 - n) + \"\\nTab: \" + tab;\n } else {\n emsg = e.message.toString();\n }\n\n\tif (output) {\n\t var elt;\n\t if (!output.hasChildNodes()) {\n\t\telt = document.createElement('br');\n\t\toutput.appendChild(elt);\n\t }\n\t var errdiv = document.createElement('div');\n\t errdiv.classList.add('error');\n\t var errtype = document.createElement('span');\n\t var errtxt = document.createTextNode(e.name + ':');\n\t errtype.appendChild(errtxt);\n\t errdiv.appendChild(errtype);\n\t var errmsg = document.createElement('span');\n\t var errmsgtxt = document.createTextNode(emsg);\n\t errmsg.appendChild(errmsgtxt);\n\t errdiv.appendChild(errmsg);\n\t output.appendChild(errdiv);\n\t output.scrollTop = output.scrollHeight;\n\t} else {\n\t console.log(e.name + ' : ' + emsg);\n\t}\n }\n\n /*\n Wraps the supplied code for exporting \n */\n this.exportCode = function(c) {\n\tjsG = new Table;\n\tself.initialiseJS();\n\tvar jcode = self.prejs() + '\\n' + c + '\\n' + self.postjs();\n\treturn jcode;\n }\n \n /*\n Restart the code from fresh\n */\n this.restartCode = function() {\n\tself.stopJS();\n\tself.executeJS(null,true);\n }\n \n /*\n Stops the draw cycle\n */\n this.stopJS = function() {\n\tif (jsDraw) {\n\t jsDraw.stop();\n\t}\n }\n \n /*\n Pauses the draw cycle\n TODO: adjust sTime accordingly\n */\n this.pauseCode = function(e) {\n\tif (jsDraw) {\n\t if (jsDraw.isPaused) {\n\t\tjsDraw.resume();\n\t\te.target.innerHTML = 'Pause';\n\t } else {\n\t\tjsDraw.pause();\n\t\te.target.innerHTML = 'Resume';\n\t }\n\t}\n\treturn false;\n }\n \n /*\n Returns a vanilla state (transformation,styles,etc)\n */\n this.getState = function() {\n\treturn {\n\t transformation: [\n\t\tnew Transformation(),\n\t ],\n\t style: [\n\t\t{\n\t\t fill: true,\n\t\t stroke: true,\n\t\t fillColour: new Colour(0,0,0,255),\n\t\t strokeColour: new Colour(255,255,255,255),\n\t\t strokeWidth: 1,\n\t\t rectMode: 0,\n\t\t ellipseMode: 2,\n\t\t arcMode: 0,\n\t\t bezierMode: 0,\n\t\t textMode: 0,\n\t\t lineCapMode: 0,\n\t\t font: 'sans-serif',\n\t\t fontSize: 12,\n\t\t textValign: 1,\n\t\t blendMode: 'source-over'\n\t\t}\n\t ],\n\t defaultStyle: {\n\t\tfill: true,\n\t\tstroke: true,\n\t\tfillColour: new Colour(0,0,0,255),\n\t\tstrokeColour: new Colour(255,255,255,255),\n\t\tstrokeWidth: 1,\n\t\trectMode: 0,\n\t\tellipseMode: 2,\n\t\tarcMode: 0,\n\t\tbezierMode: 0,\n\t\ttextMode: 0,\n\t\tlineCapMode: 0,\n\t\tfont: 'sans-serif',\n\t\tfontSize: 12,\n\t\ttextValign: 1,\n\t\tblendMode: 'source-over'\n\t },\n\t touches: [],\n\t keys: [],\n\t watches: []\n\t}\n }\n \n self.jsState = this.getState();\n\n /*\n Apply a style\n */\n this.applyStyle = function(s) {\n\tself.ctx.lineWidth = s.strokeWidth;\n\tself.ctx.fillStyle = s.fillColour.toCSS();\n\tself.ctx.strokeStyle = s.strokeColour.toCSS();\n\tself.ctx.font = s.fontSize + 'px ' + s.font;\n\tif (s.lineCapMode == 0) {\n\t self.ctx.lineCap = \"round\";\n\t} else if (s.lineCapMode == 1) {\n\t self.ctx.lineCap = \"butt\";\n\t} else if (s.lineCapMode == 2) {\n\t self.ctx.lineCap = \"square\";\n\t}\n\tself.ctx.globalCompositeOperation = s.blendMode;\n }\n\n this.applyTransformation = function(x,y) {\n\tvar p = self.jsState.transformation[0].applyTransformation(x,y);\n\tvar ch = self.ctx.canvas.height;\n\tp.y *= -1;\n\tp.y += ch;\n\treturn p;\n }\n\n this.applyTransformationNoShift = function(x,y) {\n\tvar p = self.jsState.transformation[0].applyTransformationNoShift(x,y);\n\tp.y *= -1;\n\treturn p;\n }\n\n this.clear = function() {\n\tself.ctx.save();\n\tself.ctx.setTransform(1,0,0,1,0,0);\n\tself.ctx.clearRect(0,0,self.ctx.canvas.width,self.ctx.canvas.height);\n\tself.ctx.restore();\n }\n\n/*\nCurrently only records a single touch. Needs a bit of work to track multiple touches correctly.\n*/\n \n this.startTouch = function(e) {\n\te.preventDefault();\n\twindow.blockMenuHeaderScroll = true;\n\tself.recordTouch(e);\n\tinTouch = true;\n\tself.ctx.canvas.addEventListener('mousemove',self.recordTouch);\n\tself.ctx.canvas.addEventListener('touchmove',self.recordTouch);\n }\n\n this.stopTouch = function(e) {\n\te.preventDefault();\n\twindow.blockMenuHeaderScroll = false;\n\tif (inTouch)\n\t self.recordTouch(e);\n\tself.ctx.canvas.removeEventListener('mousemove',self.recordTouch);\n\tself.ctx.canvas.removeEventListener('touchmove',self.recordTouch);\n\tinTouch = false;\n }\n\n \n self.ctx.canvas.addEventListener('mousedown',self.startTouch);\n self.ctx.canvas.addEventListener('touchstart',self.startTouch);\n self.ctx.canvas.addEventListener('mouseleave',self.stopTouch);\n self.ctx.canvas.addEventListener('mouseup',self.stopTouch);\n self.ctx.canvas.addEventListener('touchend',self.stopTouch);\n self.ctx.canvas.addEventListener('touchcancel',self.stopTouch);\n\n this.recordTouch = (function() {\n\tvar prevTouch;\n\treturn function(e) {\n\t e.preventDefault();\n\t var s;\n\t var px,py,dx,dy,x,y,pgx,pgy,id,radx;\n\t if (e.type == 'touchstart' || e.type == 'touchmove' || e.type == 'touchend' || e.type == 'touchcancel' ) {\n\t\tvar touch = e.touches[0] || e.changedTouches[0];\n\t\tpgx = touch.pageX;\n\t\tpgy = touch.pageY;\n\t\tid = touch.identifier;\n\t } else {\n\t\tpgx = e.pageX;\n\t\tpgy = e.pageY;\n\t }\n\t x = Math.floor(pgx - self.ctx.canvas.offsetLeft);\n\t y = parseInt(self.ctx.canvas.offsetTop,10) + parseInt(self.ctx.canvas.offsetHeight,10) - pgy;\n\t if (e.type == 'mousedown' || e.type == 'touchstart') {\n\t\ts = 0;\n\t } else if (e.type == 'mousemove' || e.type == 'touchmove') {\n\t\ts = 1;\n\t\tpx = prevTouch.x;\n\t\tpy = prevTouch.y;\n\t\tdx = x - px;\n\t\tdy = x - py;\n\t } else if (e.type == 'mouseup' || e.type == 'mouseleave' || e.type == 'touchend' || e.type == 'touchcancel') {\n\t\ts = 2;\n\t\tpx = prevTouch.x;\n\t\tpy = prevTouch.y;\n\t\tdx = x - px;\n\t\tdy = x - py;\n\t }\n\t var t = {\n\t\tstate: s,\n\t\tid: id,\n\t\ttime: getHighResTimeStamp(e) - sTime,\n\t\tx: x,\n\t\ty: y,\n\t\tprevX: px,\n\t\tprevY: py,\n\t\tdeltaX: dx,\n\t\tdeltaY: dy\n\t };\n\t prevTouch = t;\n\t self.jsState.touches.push(t);\n\t}\n })();\n\n /*\n For tracking keys\n */\n\n this.recordKey = function(e) {\n\te.preventDefault();\n\tvar s;\n\tif (e.type == 'keydown') {\n\t s = 0;\n\t} else if (e.type == 'keypress') {\n\t s = 1;\n\t} else if (e.type == 'keyup') {\n\t s = 2;\n\t}\n\tvar k = {\n\t state: s,\n\t time: getHighResTimeStamp(e) - sTime,\n\t key: e.key,\n\t code: e.which,\n//\t repeat: e.originalEvent.repeat,\n\t shift: e.shiftKey,\n\t meta: e.metaKey,\n\t ctrl: e.ctrlKey,\n\t alt: e.altKey,\n\t};\n\tself.jsState.keys.push(k);\n }\n\n self.ctx.canvas.addEventListener('keydown',self.recordKey);\n self.ctx.canvas.addEventListener('keypress',self.recordKey);\n self.ctx.canvas.addEventListener('keyup',self.recordKey);\n\n this.prejs = function(b) {\n\tvar str;\n\tif (b) {\n\t str = '(function() { '\n\t} else {\n\t str = 'Project = function (jsG) { '\n\t}\n\tstr += 'var self; '\n\t + jsG.getProperties()\n\t + ' setter = eval(jsG.makeSetter()); jsG.setAll(setter); print(); clearOutput(); '\n\t + '(function() { '\n\t + 'stroke(255,255,255); '\n\t + 'fill(0,0,0); ';\n\treturn str;\n }\n\n this.postjs = function(b) {\n\tvar str =\n\t 'setup(); ' +\n\t 'initCycle(draw,touched,key); ' +\n\t '})();}';\n\tif (b) {\n\t str += ')();';\n\t}\n\treturn str;\n }\n\n this.initCycle = function (draw,touched,key) {\n\tjsDraw = new Animation(\n\t function(et,dt) {\n\t\tjsG.set('ElapsedTime',et);\n\t\tjsG.set('DeltaTime',dt);\n\t\tjsG.set('WIDTH',parseInt(self.ctx.canvas.offsetWidth,10));\n\t\tjsG.set('HEIGHT',parseInt(self.ctx.canvas.offsetHeight,10));\n\t\tself.jsState.transformation = [new Transformation()];\n\t\tself.ctx = gctx;\n\t\ttry {\n\t\t draw();\n\t\t} catch(e) {\n\t\t self.doError(e);\n\t\t}\n\t\tself.jsState.touches.forEach(\n\t\t function(t) {\n\t\t\ttry {\n\t\t\t touched(t);\n\t\t\t} catch(e) {\n\t\t\t self.doError(e);\n\t\t\t}\n\t\t }\n\t\t);\n\t\tself.jsState.keys.forEach(\n\t\t function(k) {\n\t\t\ttry {\n\t\t\t key(k);\n\t\t\t} catch(e) {\n\t\t\t self.doError(e);\n\t\t\t}\n\t\t }\n\t\t);\n\t\tself.jsState.touches = [];\n\t\tself.jsState.keys = [];\n\t\tself.jsState.watches.forEach(function(v) {v()});\n\t }\n\t);\n }\n\t\n\n this.initialiseJS = function() {\n\tvar g = jsG;\n\tif (params)\n\t params.innerHTML = '';\n\t// Canvas dimensions\n\tg.set('WIDTH',parseInt(self.ctx.canvas.offsetWidth,10));\n\tg.set('HEIGHT',parseInt(self.ctx.canvas.offsetHeight,10));\n\t// Rectangle and Ellipse modes\n\tg.set('CORNER',0);\n\tg.set('CORNERS',1);\n\tg.set('CENTER',2);\n\tg.set('CENTRE',2);\n\tg.set('RADIUS',3);\n\t// Text horizontal alignment\n\tg.set('LEFT',0);\n\tg.set('RIGHT',1);\n\t// Text vertical alignment\n\tg.set('BOTTOM',0);\n\tg.set('BASELINE',1);\n\tg.set('TOP',3);\n\t// Bezier control point and Arc angle\n\tg.set('ABSOLUTE',0);\n\tg.set('RELATIVE',1);\n\t// line cap\n\tg.set('ROUND',0);\n\tg.set('SQUARE',1);\n\tg.set('PROJECT',2);\n\t// display mode\n\tg.set('NORMAL',0);\n\tg.set('FULLSIZE',1);\n\tg.set('FULLSIZE_NO_BUTTONS',2);\n\t// touches\n\tg.set('BEGAN',0);\n\tg.set('MOVING',1);\n\tg.set('PRESSED',1);\n\tg.set('ENDED',2);\n\tObject.keys(jsGrExt).forEach(function(v,i,a) {\n\t g.set(v, jsGrExt[v]);\n\t})\n\tg.set('ElapsedTime',0);\n\tg.set('DeltaTime',0);\n\tg.set('blendmodes',blendmodes);\n\tg.set('setup', function() {});\n\tg.set('draw', function() {});\n\tg.set('touched', function() {});\n\tg.set('key', function() {});\n\tself.jsState = this.getState();\n\tself.applyStyle(self.jsState.defaultStyle);\n }\n\n jsGrExt = {\n\tinitCycle: function(d,t,k) {\n\t self.initCycle(d,t,k);\n\t},\n\tclearOutput: function() {\n\t if (output)\n\t\toutput.innerHTML = '';\n\t},\n\tprint: function(x) {\n\t if (output) {\n\t\tif (!output.hasChildNodes()) {\n\t\t var br = document.createElement('br');\n\t\t output.appendChild(br);\n\t\t}\n\t\toutput.appendChild(document.createTextNode(x));\n\t\toutput.scrollTop = outdiv.scrollHeight;\n\t }\n\t},\n\trect: function(x,y,w,h) {\n\t if (x instanceof Vec2) {\n\t\th = w;\n\t\tw = y;\n\t\ty = x.y;\n\t\tx = x.x;\n\t }\n\t if (w instanceof Vec2) {\n\t\th = w.y;\n\t\tw = w.x;\n\t }\n\t if (typeof(h) === \"undefined\") {\n\t\th = w;\n\t }\n\t if (self.jsState.style[0].rectMode == 1) {\n\t\tw -=x;\n\t\th -=y;\n\t } else if (self.jsState.style[0].rectMode == 2) {\n\t\tx -= w/2;\n\t\ty -= h/2;\n\t } else if (self.jsState.style[0].rectMode == 3) {\n\t\tx -= w/2;\n\t\ty -= h/2;\n\t\tw *= 2;\n\t\th *= 2;\n\t }\n\t var p = self.applyTransformation(x,y);\n\t var r = self.applyTransformationNoShift(w,0);\n\t var s = self.applyTransformationNoShift(0,h);\n\t self.ctx.beginPath();\n\t self.ctx.save();\n\t self.ctx.setTransform(r.x,r.y,s.x,s.y,p.x,p.y);\n\t self.ctx.rect(0,0,1,1);\n\t self.ctx.restore();\n\t if (self.jsState.style[0].fill) {\n\t\tself.ctx.fill();\n\t }\n\t if (self.jsState.style[0].stroke) {\n\t\tself.ctx.stroke();\n\t }\n\t},\n\trectMode: function(m) {\n\t if (typeof m !== 'undefined') {\n\t\tself.jsState.style[0].rectMode = m;\n\t } else {\n\t\treturn self.jsState.style[0].rectMode;\n\t }\n\t},\n\tpolygon: function() {\n\t var i = 0;\n\t var x,y,p,ln;\n\t var args = Array.from(arguments);\n\t ln = 'moveTo';\n\t self.ctx.beginPath();\n\t x = args[i];\n\t if (x instanceof Vec2) {\n\t\ty = x.y;\n\t\tx = x.x;\n\t } else {\n\t\ti++;\n\t\ty = args[i];\n\t }\n\t p = self.applyTransformation(x,y);\n\t self.ctx.moveTo(p.x,p.y);\n\t args.push(x,y);\n\t i++;\n\t while (i < args.length) {\n\t\tx = args[i];\n\t\tif (x instanceof Vec2) {\n\t\t y = x.y;\n\t\t x = x.x;\n\t\t} else {\n\t\t i++;\n\t\t y = args[i];\n\t\t}\n\t\tp = self.applyTransformation(x,y);\n\t\tself.ctx.lineTo(p.x,p.y);\n\t\ti++;\n\t }\n\t if (self.jsState.style[0].fill) {\n\t\tself.ctx.fill();\n\t }\n\t if (self.jsState.style[0].stroke) {\n\t\tself.ctx.stroke();\n\t }\n\t},\n\tpolyline: function() {\n\t var i = 0;\n\t var x,y,p,ln;\n\t var args = Array.from(arguments);\n\t ln = 'moveTo';\n\t self.ctx.beginPath();\n\t x = args[i];\n\t if (x instanceof Vec2) {\n\t\ty = x.y;\n\t\tx = x.x;\n\t } else {\n\t\ti++;\n\t\ty = args[i];\n\t }\n\t p = self.applyTransformation(x,y);\n\t self.ctx.moveTo(p.x,p.y);\n\t i++;\n\t while (i < args.length) {\n\t\tx = args[i];\n\t\tif (x instanceof Vec2) {\n\t\t y = x.y;\n\t\t x = x.x;\n\t\t} else {\n\t\t i++;\n\t\t y = args[i];\n\t\t}\n\t\tp = self.applyTransformation(x,y);\n\t\tself.ctx.lineTo(p.x,p.y);\n\t\ti++;\n\t }\n\t if (self.jsState.style[0].fill) {\n\t\tself.ctx.fill();\n\t }\n\t if (self.jsState.style[0].stroke) {\n\t\tself.ctx.stroke();\n\t }\n\t},\n\tarcMode: function(m) {\n\t if (m !== 'undefined') {\n\t\tself.jsState.style[0].arcMode = m;\n\t } else {\n\t\treturn self.jsState.style[0].arcMode;\n\t }\n\t},\n\tbezierMode: function(m) {\n\t if (m !== 'undefined') {\n\t\tself.jsState.style[0].bezierMode = m;\n\t } else {\n\t\treturn self.jsState.style[0].bezierMode;\n\t }\n\t},\n\tblendMode: function(m) {\n\t if (m !== 'undefined') {\n\t\tself.jsState.style[0].blendMode = m;\n\t\tself.ctx.globalCompositeOperation = m;\n\t } else {\n\t\treturn self.jsState.style[0].blendMode;\n\t }\n\t},\n\tbackground: function(c,g,b,a) {\n\t if (!(c instanceof Colour)) {\n\t\tc = new Colour(c,g,b,a);\n\t }\n\t self.ctx.save();\n\t self.ctx.globalCompositeOperation = 'source-over';\n\t self.ctx.fillStyle = c.toCSS();\n\t self.ctx.setTransform(1,0,0,1,0,0);\n\t self.ctx.beginPath();\n\t self.ctx.fillRect(0,0,self.ctx.canvas.width,self.ctx.canvas.height);\n\t self.ctx.restore();\n\t},\n\tfill: function (c,g,b,a) {\n\t if (typeof c != 'undefined') {\n\t\tif (!(c instanceof Colour)) {\n\t\t c = new Colour(c,g,b,a);\n\t\t}\n\t\tself.ctx.fillStyle = c.toCSS();\n\t\tself.jsState.style[0].fillColour = c;\n\t\tself.jsState.style[0].fill = true;\n\t } else {\n\t\treturn self.ctx.fillStyle;\n\t }\n\t},\n\tstroke: function (c,g,b,a) {\n\t if (typeof c != 'undefined') {\n\t\tvar c;\n\t\tif (!(c instanceof Colour)) {\n\t\t c = new Colour(c,g,b,a);\n\t\t}\n\t\tself.ctx.strokeStyle = c.toCSS();\n\t\tself.jsState.style[0].strokeColour = c;\n\t\tself.jsState.style[0].stroke = true;\n\t } else {\n\t\treturn self.ctx.strokeStyle;\n\t }\n\t},\n\tstrokeWidth: function (w) {\n\t if (typeof w != 'undefined') {\n\t\tself.ctx.lineWidth = w;\n\t\tself.jsState.style[0].strokeWidth = w;\n\t\tself.jsState.style[0].stroke = true;\n\t } else {\n\t\treturn self.ctx.lineWidth;\n\t }\n\t},\n\tnoFill: function() {\n\t self.jsState.style[0].fill = false;\n\t},\n\tnoStroke: function() {\n\t self.jsState.style[0].stroke = false;\n\t},\n\tline: function (x,y,xx,yy) {\n\t if (x instanceof Vec2) {\n\t\tyy = xx;\n\t\txx = y;\n\t\ty = x.y;\n\t\tx = x.x;\n\t }\n\t if (xx instanceof Vec2) {\n\t\tyy = xx.y;\n\t\txx = xx.x;\n\t }\n\t if (self.jsState.style[0].stroke) {\n\t\tvar p = self.applyTransformation(x,y);\n\t\tvar pp = self.applyTransformation(xx,yy);\n\t\tself.ctx.beginPath();\n\t\tself.ctx.moveTo(p.x,p.y);\n\t\tself.ctx.lineTo(pp.x,pp.y);\n\t\tself.ctx.stroke();\n\t }\n\t},\n/*\nHow should the angles interact with the transformation?\n*/\n\tarc: function(x,y,r,sa,ea,cl) {\n\t if (x instanceof Vec2) {\n\t\tcl = ea;\n\t\tea = sa;\n\t\tsa = r;\n\t\tr = y;\n\t\ty = x.y;\n\t\tx = x.x;\n\t }\n\t if (self.jsState.style[0].arcMode == 1)\n\t\tea += sa;\n\t sa *= Math.PI/180;\n\t ea *= Math.PI/180;\n\t if (typeof cl === 'undefined') {\n\t\tcl = true;\n\t }\n\t cl = !cl;\n\t var p = self.applyTransformation(x,y);\n\t var q = self.applyTransformationNoShift(r,0);\n\t var s = self.applyTransformationNoShift(0,r);\n\t self.ctx.beginPath();\n\t self.ctx.save();\n\t self.ctx.setTransform(q.x,q.y,s.x,s.y,p.x,p.y);\n\t self.ctx.arc(0,0,1,sa,ea,cl);\n\t self.ctx.restore();\n\t if (self.jsState.style[0].stroke) {\n\t\tself.ctx.stroke();\n\t }\n\t},\n\tbezier: function(ax,ay,bx,by,cx,cy,dx,dy) {\n\t if (ax instanceof Vec2) {\n\t\tdy = dx;\n\t\tdx = cy;\n\t\tcy = cx;\n\t\tcx = by;\n\t\tby = bx;\n\t\tbx = ay;\n\t\tay = ax.y;\n\t\tax = ax.x;\n\t }\n\t if (bx instanceof Vec2) {\n\t\tdy = dx;\n\t\tdx = cy;\n\t\tcy = cx;\n\t\tcx = by;\n\t\tby = bx.y;\n\t\tbx = bx,x;\n\t }\n\t if (cx instanceof Vec2) {\n\t\tdy = dx;\n\t\tdx = cy;\n\t\tcy = cx.y;\n\t\tcx = cx.x;\n\t }\n\t if (dx instanceof Vec2) {\n\t\tdy = dx.y;\n\t\tdx = dx.x;\n\t }\n\n\t if (self.jsState.style[0].bezierMode == 1) {\n\t\tcy += dy;\n\t\tcx += dx;\n\t\tby += ay;\n\t\tbx += ax;\n\t }\n\t dy -= ay;\n\t dx -= ax;\n\t cy -= ay;\n\t cx -= ax;\n\t by -= ay;\n\t bx -= ax;\n\t var p = self.applyTransformation(ax,ay);\n\t var q = self.applyTransformationNoShift(1,0);\n\t var s = self.applyTransformationNoShift(0,1);\n\t self.ctx.beginPath();\n\t self.ctx.save();\n\t self.ctx.setTransform(q.x,q.y,s.x,s.y,p.x,p.y);\n\t self.ctx.moveTo(0,0);\n\t self.ctx.bezierCurveTo(bx,by,cx,cy,dx,dy);\n\t self.ctx.restore();\n\t if (self.jsState.style[0].stroke) {\n\t\tself.ctx.stroke();\n\t }\n\t},\n\tlineCapMode: function(m) {\n\t if (typeof m !== 'undefined') {\n\t\tif (m == 0) {\n\t\t self.ctx.lineCap = \"round\";\n\t\t} else if (m == 1) {\n\t\t self.ctx.lineCap = \"butt\";\n\t\t} else if (m == 2) {\n\t\t self.ctx.lineCap = \"square\";\n\t\t}\n\t\tself.jsState.style[0].lineCapMode = m;\n\t } else {\n\t\treturn self.jsState.style[0].lineCapMode;\n\t }\n\t},\n\ttext: function (s,x,y) {\n\t if (x instanceof Vec2) {\n\t\ty = x.y;\n\t\tx = x.x;\n\t }\n\t var p = self.applyTransformation(x,y);\n\t var q = self.applyTransformationNoShift(1,0).normalise();\n\t var r = self.applyTransformationNoShift(0,-1).normalise();\n\t if (self.jsState.style[0].textMode == 1) {\n\t\tvar tm = self.ctx.measureText(s);\n\t\tp = p.subtract(q.multiply(tm.width));\n\t } else if (self.jsState.style[0].textMode == 2) {\n\t\tvar tm = self.ctx.measureText(s);\n\t\tp = p.subtract(q.multiply(tm.width/2));\n\t }\n\t if (self.jsState.style[0].textValign == 0) {\n\t\tvar f = self.jsState.style[0].fontSize + 'px ' + self.jsState.style[0].font;\n\t\tvar fm = getTextHeight(f,s);\n\t\tp = p.subtract(r.multiply(fm.descent));\n\t } else if (self.jsState.style[0].textValign == 2) {\n\t\tvar f = self.jsState.style[0].fontSize + 'px ' + self.jsState.style[0].font;\n\t\tvar fm = getTextHeight(f,s);\n\t\tp = p.add(r.multiply(fm.height/2-fm.descent));\n\t } else if (self.jsState.style[0].textValign == 3) {\n\t\tvar f = self.jsState.style[0].fontSize + 'px ' + self.jsState.style[0].font;\n\t\tvar fm = getTextHeight(f,s);\n\t\tp = p.add(r.multiply(fm.ascent));\n\t }\n\t self.ctx.save();\n\t self.ctx.beginPath();\n\t self.ctx.setTransform(q.x,q.y,r.x,r.y,p.x,p.y);\n\t self.ctx.fillText(s,0,0);\n\t self.ctx.restore();\n\t},\n\ttextMode: function(m) {\n\t if (typeof m !== 'undefined') {\n\t\tif (m == 0) {\n\t\t self.jsState.style[0].textMode = 0;\n\t\t} else if (m == 1) {\n\t\t self.jsState.style[0].textMode = 1;\n\t\t} else if (m == 2) {\n\t\t self.jsState.style[0].textMode = 2;\n\t\t}\n\t } else {\n\t\treturn self.jsState.style[0].textMode;\n\t }\n\t},\n\ttextValign: function(m) {\n\t if (typeof m !== 'undefined') {\n\t\tif (m == 0) {\n\t\t self.jsState.style[0].textValign = 0;\n\t\t} else if (m == 1) {\n\t\t self.jsState.style[0].textValign = 1;\n\t\t} else if (m == 2) {\n\t\t self.jsState.style[0].textValign = 2;\n\t\t} else if (m == 3) {\n\t\t self.jsState.style[0].textValign = 3;\n\t\t}\n\t } else {\n\t\treturn self.jsState.style[0].textValign;\n\t }\n\t},\n\ttextSize: function(s) {\n\t var tm = self.ctx.measureText(s);\n\t var f = self.jsState.style[0].fontSize + 'px ' + self.jsState.style[0].font;\n\t var fm = getTextHeight(f,s);\n\t return {width: tm.width,height: fm.height};\n\t},\n\tfont: function (f) {\n\t self.jsState.style[0].font = f;\n\t self.ctx.font = self.jsState.style[0].fontSize + 'px ' + f;\n\t},\n\tfontSize: function (f) {\n\t if (typeof f !== 'undefined') {\n\t\tself.jsState.style[0].fontSize = f;\n\t\tself.ctx.font = f + 'px ' + self.jsState.style[0].font;\n\t }\n\t return self.jsState.style[0].fontSize;\n\t},\n\tellipse: function (x,y,w,h) {\n\t if (x instanceof Vec2) {\n\t\th = w;\n\t\tw = y;\n\t\ty = x.y;\n\t\tx = x.x;\n\t }\n\t if (w instanceof Vec2) {\n\t\th = w.y;\n\t\tw = w.x;\n\t }\n\t if (typeof(h) === \"undefined\") {\n\t\th = w;\n\t }\n\t \n\t if (self.jsState.style[0].ellipseMode == 0) {\n\t\tw /=2;\n\t\th /=2;\n\t\tx += w;\n\t\ty += h;\n\t } else if (self.jsState.style[0].ellipseMode == 1) {\n\t\tw -=x;\n\t\th -=y;\n\t\tw /=2;\n\t\th /=2;\n\t\tx += w;\n\t\ty += h;\n\t } else if (self.jsState.style[0].ellipseMode == 2) {\n\t\tw /= 2;\n\t\th /= 2;\n\t }\n\t var p = self.applyTransformation(x,y);\n\t var r = self.applyTransformationNoShift(w,0);\n\t var s = self.applyTransformationNoShift(0,h);\n\t self.ctx.save();\n\t self.ctx.beginPath();\n\t self.ctx.setTransform(r.x,r.y,s.x,s.y,p.x,p.y);\n\t self.ctx.arc(0,0,1,0, 2 * Math.PI,false);\n\t self.ctx.restore();\n\t if (self.jsState.style[0].fill) {\n\t\tself.ctx.fill();\n\t }\n\t if (self.jsState.style[0].stroke) {\n\t\tself.ctx.stroke();\n\t }\n\t},\n\tcircle: function (x,y,r) {\n\t if (x instanceof Vec2) {\n\t\tr = y;\n\t\ty = x.y;\n\t\tx = x.x;\n\t }\n\n\t if (self.jsState.style[0].ellipseMode == 0) {\n\t\tr /=2;\n\t\tx += r;\n\t\ty += r;\n\t } else if (self.jsState.style[0].ellipseMode == 1) {\n\t\tr -=Math.max(x,y);\n\t\tr /=2;\n\t\tx += r;\n\t\ty += r;\n\t } else if (self.jsState.style[0].ellipseMode == 2) {\n\t\tr /= 2;\n\t }\n\t var p = self.applyTransformation(x,y);\n\t var d = self.jsState.transformation[0].determinant();\n\t d = Math.sqrt(d) * r;\n\t self.ctx.save();\n\t self.ctx.beginPath();\n\t self.ctx.setTransform(d,0,0,d,p.x,p.y);\n\t self.ctx.arc(0,0,1,0, 2 * Math.PI,false);\n\t self.ctx.restore();\n\t if (self.jsState.style[0].fill) {\n\t\tself.ctx.fill();\n\t }\n\t if (self.jsState.style[0].stroke) {\n\t\tself.ctx.stroke();\n\t }\n\t},\n\tellipseMode: function(m) {\n\t if (typeof m !== 'undefined') {\n\t\tself.jsState.style[0].ellipseMode = m;\n\t } else {\n\t\treturn self.jsState.style[0].ellipseMode;\n\t }\n\t},\n\tpushStyle: function() {\n\t var s = {};\n\t Object.keys(self.jsState.style[0]).forEach(function(v) {\n\t\ts[v] = self.jsState.style[0][v];\n\t })\n\t self.jsState.style.unshift(s);\n\t},\n\tpopStyle: function() {\n\t self.jsState.style.shift();\n\t self.applyStyle(self.jsState.style[0]);\n\t},\n\tresetStyle: function() {\n\t Object.keys(self.jsState.defaultStyle).forEach(function(v) {\n\t\tself.jsState.style[0][v] = self.jsState.defaultStyle[v];\n\t })\n\t self.applyStyle(self.jsState.style[0]);\n\t},\n\tpushTransformation: function() {\n\t self.jsState.transformation.unshift(new Transformation(self.jsState.transformation[0]));\n\t},\n\tpopTransformation: function() {\n\t self.jsState.transformation.shift();\n\t},\n\tresetTransformation: function() {\n\t self.jsState.transformation[0] = new Transformation();\n\t},\n\ttranslate: function(x,y) {\n\t if (x instanceof Vec2) {\n\t\ty = x.y;\n\t\tx = x.x;\n\t }\n\t self.jsState.transformation[0] = self.jsState.transformation[0].translate(x,y);\n\t},\n\tscale: function(a,b) {\n\t if (a instanceof Vec2) {\n\t\tb = a.y;\n\t\ta = a.x;\n\t }\n\t self.jsState.transformation[0] = self.jsState.transformation[0].scale(a,b);\n\t},\n\txsheer: function(a) {\n\t self.jsState.transformation[0] = self.jsState.transformation[0].xsheer(a);\n\t},\n\tysheer: function(a) {\n\t self.jsState.transformation[0] = self.jsState.transformation[0].ysheer(a);\n\t},\n\trotate: function(ang,x,y) {\n\t self.jsState.transformation[0] = self.jsState.transformation[0].rotate(ang,x,y);\n\t},\n\tapplyTransformation: function(x,y) {\n\t return self.jsState.transformation[0].applyTransformation(x,y);\n\t},\n\tcomposeTransformation: function(m) {\n\t self.jsState.transformation[0] = self.jsState.transformation[0].composeTransformation(m);\n\t},\n\tmodelTransformation: function(m) {\n\t if (typeof m !== 'undefined') {\n\t\tself.jsState.transformation[0] = new Transformation(m);\n\t } else {\n\t\treturn self.jsState.transformation[0];\n\t }\n\t},\n\tclearState: function() {\n\t self.jsState = self.getState();\n\t},\n\t/* These aren't good javascript OO\n\tcolour: function(r,g,b,a) {\n\t return new Colour(r,g,b,a);\n\t},\n\tcolor: function(r,g,b,a) {\n\t return new Colour(r,g,b,a);\n\t},\n\ttransformation: function(a,b,c,d,e,f) {\n\t return new Transformation(a,b,c,d,e,f);\n\t},\n\tvec2: function(x,y) {\n\t return new Vec2(x,y);\n\t},\n\tpoint: function(x,y) {\n\t return new Vec2(x,y);\n\t},\n\tpath: function(a,b) {\n\t return new Path(a,b);\n\t},\n\t*/\n\tlog: function(s) {\n\t console.log(s.toString());\n\t},\n\timage: function(w,h) {\n\t if (w instanceof Vec2) {\n\t\th = w.y;\n\t\tw = w.x;\n\t }\n\t var c = document.createElement('canvas');\n\t c.width = w;\n\t c.height = h;\n\t return c.getContext('2d');\n\t},\n\tsetContext: function(c) {\n\t if (typeof c !== 'undefined') {\n\t\tself.ctx = c;\n\t } else {\n\t\tself.ctx = gctx;\n\t }\n\t},\n\tsmooth: function() {\n\t self.ctx.imageSmoothingEnabled = true;\n\t self.ctx.canvas.classList.remove('pixelated');\n\t},\n\tnoSmooth: function() {\n\t self.ctx.imageSmoothingEnabled = false;\n\t self.ctx.canvas.classList.add('pixelated');\n\t},\n\tsprite: function(img,x,y,w,h) {\n\t if (img.canvas)\n\t\timg = img.canvas;\n\t if (x instanceof Vec2) {\n\t\th = w;\n\t\tw = y;\n\t\ty = x.y;\n\t\tx = x.x;\n\t }\n\t if (w instanceof Vec2) {\n\t\th = w.y;\n\t\tw = w.x;\n\t }\n\t if (typeof(x) === 'undefined') {\n\t\tx = 0;\n\t }\n\t if (typeof(y) === 'undefined') {\n\t\ty = 0;\n\t }\n\t if (typeof(h) === 'undefined') {\n\t\th = img.height;\n\t }\n\t if (typeof(w) === 'undefined') {\n\t\tw = img.width;\n\t }\n\t var p = self.applyTransformation(x,y+h);\n\t var r = self.applyTransformationNoShift(1,0).normalise();\n\t var s = self.applyTransformationNoShift(0,-1).normalise();\n\t self.ctx.save();\n\t self.ctx.setTransform(r.x,r.y,s.x,s.y,p.x,p.y);\n\t self.ctx.drawImage(img,0,0,w,h);\n\t self.ctx.restore();\n\t},\n\tsaveImage: function(img,s) {\n\t if (typeof(s) === 'undefined')\n\t\ts = document.getElementById('title').innerText + '-' + imgNum++;\n\t img.canvas.toBlob(function(b) {\n\t\tvar a = document.createElement('a');\n\t\ta.href = window.URL.createObjectURL(b);\n\t\ta.download = s + '.png';\n\t\ta.innerHTML = 'Download ' + s;\n\t\ta.classList.add('imgDownload');\n\t\tvar pdiv = document.createElement('div');\n\t\tpdiv.classList.add('parameter');\n\t\tpdiv.appendChild(a);\n\t\tparams.appendChild(pdiv);\n\t });\n\t},\n\toutput: {\n\t clear: function() {\n\t\tif (output)\n\t\t output.innerHTML = '';\n\t }\n\t},\n\tparameters: {\n\t clear: function() {\n\t\tif (params)\n\t\t params.innerHTML = '';\n\t }\n\t},\n\tdisplayMode: function(m) {\n\t if (m == 0) {\n\t\tpanel.style.display = 'block';\n\t } else if (m == 1) {\n\t\tpanel.style.display = 'none';\n\t }\n\t var evt = new Event ('resize');\n\t window.dispatchEvent(evt);\n\t}\n }\n\n Path.prototype.jc = this;\n Parameter.prototype.jc = this;\n Parameter.prototype.params = params;\n\n return this;\n\n}", "title": "" }, { "docid": "48a8482f036d7b975778f788ffd5ad5b", "score": "0.4659396", "text": "function support3d() {\n var el = document.createElement('p'),\n has3d,\n transforms = {\n 'webkitTransform': '-webkit-transform',\n 'OTransform': '-o-transform',\n 'msTransform': '-ms-transform',\n 'MozTransform': '-moz-transform',\n 'transform': 'transform'\n };\n document.body.insertBefore(el, null);\n for (var t in transforms) {\n if (el.style[t] !== undefined) {\n el.style[t] = 'translate3d(1px,1px,1px)';\n has3d = window.getComputedStyle(el).getPropertyValue(transforms[t]);\n }\n }\n document.body.removeChild(el);\n return true;\n }", "title": "" }, { "docid": "c01e12ffd53f3758e8b5ab17a2aac2f0", "score": "0.4655558", "text": "function Floatbox(){this.defaultOptions={licenseKey:\"rrxIfJFvrrhDv5A@f5JLu6xvrqZ4qJJBspBxvK5BqJITrZNvT\",padding:24,panelPadding:8,overlayOpacity:55,shadowType:\"drop\",shadowSize:12,roundCorners:\"all\",cornerRadius:12,roundBorder:1,outerBorder:4,innerBorder:1,autoFitImages:true,resizeImages:true,autoFitOther:false,resizeOther:false,resizeTool:\"cursor\",captionPos:\"bl\",caption2Pos:\"tc\",infoLinkPos:\"bl\",printLinkPos:\"bl\",newWindowLinkPos:\"tr\",itemNumberPos:\"bl\",indexLinksPos:\"br\",controlsPos:\"br\",centerNav:false,colorImages:\"black\",colorHTML:\"white\",colorVideo:\"blue\",boxLeft:\"auto\",boxTop:\"auto\",enableDragMove:false,stickyDragMove:true,enableDragResize:false,stickyDragResize:true,draggerLocation:\"frame\",minContentWidth:140,minContentHeight:100,centerOnResize:true,titleAsCaption:true,showItemNumber:true,showClose:true,showNewWindowIcon:true,closeOnNewWindow:false,cacheAjaxContent:false,hideObjects:true,hideJava:true,disableScroll:false,randomOrder:false,printCSS:\"\",preloadAll:true,autoGallery:false,autoTitle:\"\",language:\"auto\",graphicsType:\"auto\",doAnimations:true,resizeDuration:3.5,imageFadeDuration:3,overlayFadeDuration:4,startAtClick:true,zoomImageStart:true,liveImageResize:true,splitResize:\"no\",cycleInterval:5,cycleFadeDuration:4.5,navType:\"both\",navOverlayWidth:35,navOverlayPos:30,showNavOverlay:\"never\",showHints:\"once\",enableWrap:true,enableKeyboardNav:true,outsideClickCloses:true,imageClickCloses:false,numIndexLinks:0,showIndexThumbs:true,maxIndexThumbSize:0,doSlideshow:false,slideInterval:4.5,endTask:\"exit\",showPlayPause:true,startPaused:false,pauseOnPrev:true,pauseOnNext:false,pauseOnResize:true};this.childOptions={padding:16,overlayOpacity:45,resizeDuration:3,imageFadeDuration:3,overlayFadeDuration:0};this.customPaths={installBase:stylepath+\"/common/floatbox/\",jsModules:\"\",cssModules:\"\",languages:\"\",graphics:\"\"};this.aJ()}", "title": "" }, { "docid": "84afc26f671f21be6b07dc2514091310", "score": "0.46519586", "text": "function MatrixRotationQuaternion(q,m)\n{\n\tvar x = q[0];\n\tvar y = q[1];\n\tvar z = q[2];\n\tvar w = -q[3];\n\tvar n = w * w + x * x + y * y + z * z;\n\tvar s = n == 0 ? 0 : 2 / n;\n\tvar wx = s * w * x;\n\tvar wy = s * w * y;\n\tvar wz = s * w * z;\n\tvar xx = s * x * x;\n\tvar xy = s * x * y;\n\tvar xz = s * x * z;\n\tvar yy = s * y * y;\n\tvar yz = s * y * z;\n\tvar zz = s * z * z;\n\t\n\tm[0]=1-(yy+zz); \tm[1]=xy-wz; \t\tm[2]=xz+wy; \t\tm[3]=0;\n\tm[4]=xy+wz;\t\t\tm[5]=1-(xx+zz);\t\tm[6]=yz-wx;\t\t\tm[7]=0;\n\tm[8]=xz-wy;\t\t\tm[9]=yz+wx;\t\t\tm[10]=1-(xx+yy);\tm[11]=0;\n\tm[12]=0;\t\t\tm[13]=0; \t\t\tm[14]=0; \t\t\tm[15]=1;\n\t\n\t/*\n\t[ 1 - (yy + zz) xy - wz xz + wy ]\n\t[ xy + wz 1 - (xx + zz) yz - wx ]\n\t[ xz - wy yz + wx 1 - (xx + yy) ]\n\t*/\n}", "title": "" }, { "docid": "a1792f256c84af1e7cf04940ff5f82a2", "score": "0.46487138", "text": "function zg(a,b,d){zg.v.constructor.call(this,a);this.Bb=a.Bb||Ag;this.Df=a.Df||Bg;var e=[];e[x.fb]=new Le;e[x.ug]=new Le;e[x.Eb]=new Le;e[x.We]=new Le;this.Al=e;b&&(this.Mc=b);d&&(this.pg=d);this.kk=this.pg&&x.j.Zf();this.o=[];this.$e=new pg(a.Nb);this.nd=this.options.Yr?new Qf(a.Yr,a.Xr):null;x.P&&x.P.ef&&(this.Wg[x.Iq]=x.P.ef);x.fd&&x.fd.ef&&(this.Wg[x.Cy]=x.fd.ef);x.xa&&x.xa.ef&&(this.Wg[x.wq]=x.xa.ef)}", "title": "" }, { "docid": "351ff4a7343da0faa1313693dc547044", "score": "0.4642096", "text": "function JY(){return function(n){var e=Uint8Array,t=Uint16Array,i=Uint32Array,r=new e([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),s=new e([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),o=new e([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),a=function(F,z){for(var G=new t(31),K=0;K<31;++K)G[K]=z+=1<<F[K-1];var ee=new i(G[30]);for(K=1;K<30;++K)for(var oe=G[K];oe<G[K+1];++oe)ee[oe]=oe-G[K]<<5|K;return[G,ee]},l=a(r,2),c=l[0],u=l[1];c[28]=258,u[258]=28;for(var f=a(s,0)[0],p=new t(32768),m=0;m<32768;++m){var v=(43690&m)>>>1|(21845&m)<<1;v=(61680&(v=(52428&v)>>>2|(13107&v)<<2))>>>4|(3855&v)<<4,p[m]=((65280&v)>>>8|(255&v)<<8)>>>1}var y=function(F,z,G){for(var K=F.length,ee=0,oe=new t(z);ee<K;++ee)++oe[F[ee]-1];var N,V=new t(z);for(ee=0;ee<z;++ee)V[ee]=V[ee-1]+oe[ee-1]<<1;if(G){N=new t(1<<z);var W=15-z;for(ee=0;ee<K;++ee)if(F[ee])for(var O=ee<<4|F[ee],j=z-F[ee],Z=V[F[ee]-1]++<<j,q=Z|(1<<j)-1;Z<=q;++Z)N[p[Z]>>>W]=O}else for(N=new t(K),ee=0;ee<K;++ee)F[ee]&&(N[ee]=p[V[F[ee]-1]++]>>>15-F[ee]);return N},M=new e(288);for(m=0;m<144;++m)M[m]=8;for(m=144;m<256;++m)M[m]=9;for(m=256;m<280;++m)M[m]=7;for(m=280;m<288;++m)M[m]=8;var g=new e(32);for(m=0;m<32;++m)g[m]=5;var x=y(M,9,1),S=y(g,5,1),w=function(F){for(var z=F[0],G=1;G<F.length;++G)F[G]>z&&(z=F[G]);return z},C=function(F,z,G){var K=z/8|0;return(F[K]|F[K+1]<<8)>>(7&z)&G},T=function(F,z){var G=z/8|0;return(F[G]|F[G+1]<<8|F[G+2]<<16)>>(7&z)},R=[\"unexpected EOF\",\"invalid block type\",\"invalid length/literal\",\"invalid distance\",\"stream finished\",\"no stream handler\",,\"no callback\",\"invalid UTF-8 data\",\"extra field too long\",\"date not in range 1980-2099\",\"filename too long\",\"stream finishing\",\"invalid zip data\"],b=function(F,z,G){var K=new Error(z||R[F]);if(K.code=F,Error.captureStackTrace&&Error.captureStackTrace(K,b),!G)throw K;return K},P=function(F,z,G){var K=F.length;if(!K||G&&!G.l&&K<5)return z||new e(0);var ee=!z||G,oe=!G||G.i;G||(G={}),z||(z=new e(3*K));var N,V=function(Ae){var He=z.length;if(Ae>He){var Ze=new e(Math.max(2*He,Ae));Ze.set(z),z=Ze}},W=G.f||0,O=G.p||0,j=G.b||0,Z=G.l,q=G.d,ie=G.m,le=G.n,J=8*K;do{if(!Z){G.f=W=C(F,O,1);var ye=C(F,O+1,3);if(O+=3,!ye){var Pe=F[(Ue=((N=O)/8|0)+(7&N&&1)+4)-4]|F[Ue-3]<<8,de=Ue+Pe;if(de>K){oe&&b(0);break}ee&&V(j+Pe),z.set(F.subarray(Ue,de),j),G.b=j+=Pe,G.p=O=8*de;continue}if(ye==1)Z=x,q=S,ie=9,le=5;else if(ye==2){var ue=C(F,O,31)+257,te=C(F,O+10,15)+4,ae=ue+C(F,O+5,31)+1;O+=14;for(var Se=new e(ae),Le=new e(19),Be=0;Be<te;++Be)Le[o[Be]]=C(F,O+3*Be,7);O+=3*te;var Ge=w(Le),Ee=(1<<Ge)-1,Oe=y(Le,Ge,1);for(Be=0;Be<ae;){var Ue,we=Oe[C(F,O,Ee)];if(O+=15&we,(Ue=we>>>4)<16)Se[Be++]=Ue;else{var I=0,D=0;for(Ue==16?(D=3+C(F,O,3),O+=2,I=Se[Be-1]):Ue==17?(D=3+C(F,O,7),O+=3):Ue==18&&(D=11+C(F,O,127),O+=7);D--;)Se[Be++]=I}}var ne=Se.subarray(0,ue),pe=Se.subarray(ue);ie=w(ne),le=w(pe),Z=y(ne,ie,1),q=y(pe,le,1)}else b(1);if(O>J){oe&&b(0);break}}ee&&V(j+131072);for(var De=(1<<ie)-1,Fe=(1<<le)-1,ze=O;;ze=O){var Ne=(I=Z[T(F,O)&De])>>>4;if((O+=15&I)>J){oe&&b(0);break}if(I||b(2),Ne<256)z[j++]=Ne;else{if(Ne==256){ze=O,Z=null;break}var Me=Ne-254;if(Ne>264){var We=r[Be=Ne-257];Me=C(F,O,(1<<We)-1)+c[Be],O+=We}var Y=q[T(F,O)&Fe],me=Y>>>4;if(Y||b(3),O+=15&Y,pe=f[me],me>3&&(We=s[me],pe+=T(F,O)&(1<<We)-1,O+=We),O>J){oe&&b(0);break}ee&&V(j+131072);for(var ve=j+Me;j<ve;j+=4)z[j]=z[j-pe],z[j+1]=z[j+1-pe],z[j+2]=z[j+2-pe],z[j+3]=z[j+3-pe];j=ve}}G.l=Z,G.p=ze,G.b=j,Z&&(W=1,G.m=ie,G.d=q,G.n=le)}while(!W);return j==z.length?z:function(Ae,He,Ze){(He==null||He<0)&&(He=0),(Ze==null||Ze>Ae.length)&&(Ze=Ae.length);var ut=new(Ae instanceof t?t:Ae instanceof i?i:e)(Ze-He);return ut.set(Ae.subarray(He,Ze)),ut}(z,0,j)},L=new e(0),U=typeof TextDecoder<\"u\"&&new TextDecoder;try{U.decode(L,{stream:!0})}catch{}return n.convert_streams=function(F){var z=new DataView(F),G=0;function K(){var ue=z.getUint16(G);return G+=2,ue}function ee(){var ue=z.getUint32(G);return G+=4,ue}function oe(ue){Pe.setUint16(de,ue),de+=2}function N(ue){Pe.setUint32(de,ue),de+=4}for(var V={signature:ee(),flavor:ee(),length:ee(),numTables:K(),reserved:K(),totalSfntSize:ee(),majorVersion:K(),minorVersion:K(),metaOffset:ee(),metaLength:ee(),metaOrigLength:ee(),privOffset:ee(),privLength:ee()},W=0;Math.pow(2,W)<=V.numTables;)W++;W--;for(var O=16*Math.pow(2,W),j=16*V.numTables-O,Z=12,q=[],ie=0;ie<V.numTables;ie++)q.push({tag:ee(),offset:ee(),compLength:ee(),origLength:ee(),origChecksum:ee()}),Z+=16;var le,J=new Uint8Array(12+16*q.length+q.reduce(function(ue,te){return ue+te.origLength+4},0)),ye=J.buffer,Pe=new DataView(ye),de=0;return N(V.flavor),oe(V.numTables),oe(O),oe(W),oe(j),q.forEach(function(ue){N(ue.tag),N(ue.origChecksum),N(Z),N(ue.origLength),ue.outOffset=Z,(Z+=ue.origLength)%4!=0&&(Z+=4-Z%4)}),q.forEach(function(ue){var te,ae=F.slice(ue.offset,ue.offset+ue.compLength);if(ue.compLength!=ue.origLength){var Se=new Uint8Array(ue.origLength);te=new Uint8Array(ae,2),P(te,Se)}else Se=new Uint8Array(ae);J.set(Se,ue.outOffset);var Le=0;(Z=ue.outOffset+ue.origLength)%4!=0&&(Le=4-Z%4),J.set(new Uint8Array(Le).buffer,ue.outOffset+ue.origLength),le=Z+Le}),ye.slice(0,le)},Object.defineProperty(n,\"__esModule\",{value:!0}),n}({}).convert_streams}", "title": "" }, { "docid": "917cb15c7db6232cc73adcbafd01683c", "score": "0.46398494", "text": "function bibliography(){\n\n b2d.flDa= b2d.fl=function(){//this is a NEW OBJECT: FilterData\n var flDa = new b2d.Dynamics.b2FilterData\n return flDa}\n fd.bit = function (cat, msk) {var fd=this\n fd.cat(cat).msk(msk)\n return fd\n }\n fD.cat = fD.cB = function (cB) {\n var fD = this\n if (U(cB)) {\n return fD.filter.categoryBits\n }\n fD.filter.categoryBits = cB\n return fD\n }\n fd.msk = function (mB) {var fd=this,\n fl=fd.filter,n\n if(U(mB)){return fl.maskBits}\n if(A(mB)){\n n=0\n _.e(mB, function(b){n+=b})\n mB=n}\n fl.maskBits = mB\n return fd\n }\n BIBLI=function(){\n function removeAllLVW(){\n\n//cx.v= cx.lV= function(b){ return b.lVW( this.cen() )}\n//linVel from LocalPoint.. i think not used\n//f.lVW=function(){return this.B().lVW.apply(this.B(), arguments)}\n\n\n // If you want to know the actual direction that these two corners impacted at, you can use:\n// v1 = b1.GetLinearVelocityFromWorldPoint( cx.cen() )\n// v2 = b2.GetLinearVelocityFromWorldPoint( cx.cen() )\n// impactV = v1 - v2\n\n//cx.vA= function(){var cx=this; return cx.lV(cx.a())}\n//cx.vB= function(){var cx=this;return cx.lV(cx.b())}\n\n //so lvW is not from the ships perspective\n//it is from world perspective\n//if the ship is going towards the right part of the screen,\n//it will have a positive x\n//regardless of which direction the ship is facing (regardless of its rotation)\n\n AMPGUN =function () {W().stats().P()\n // var b1,b2\n\n // p.C('z')\n\n vor = w.S(400,300,'r', 100 )\n\n p.cl(vor, function(f,cx){\n\n var v,lP,bu,imp\n\n //p.C('g')\n\n pt=cx.pt();\n\n w.dot(pt)\n\n //lP = pt.lP(v.x, v.y)\n\n bu = w.D(300, 100, 'w', 10,'-')\n\n imp = V(\n p.lVW(pt).x - f.B().lVW(pt).x,\n p.lVW(pt).y - f.B().lVW(pt).y\n )\n\n bu.I(imp.x, imp.y)\n })\n }\n\n\n\n/// *** IMPORTANT PITFALL: CANNOT GET cx.pt() FROM SENSOR FIXTS\n LVW =function () {W([800, 600 ], {g:100,w:0 }).stats()\n\n var b1,b2\n vor = w.S(400,300,'r', 500,10 ).K('r')\n y= w.y(50,100).warp().lD(0).rt(70).I(10,10)\n\n y.cl(vor, _.mo(function(f,cx){var p,lP, b,imp\n\n y.stat()\n p= cx.p(); // w.dot(p.x, p.y)\n lP = y.lP(p.x, p.y)\n //y.cir({r:7, x:lP.x, y:lP.y, c:'z'})\n\n b= w.D(400, 100, 'r', 10,'-')\n $l('y.lVW(p).y: '+y.lVW(p).y)\n imp = V( // ITS THE DIRECTION!!\n //SO ITS A RATIO THAT WE NEED TO 'NORMALIZE' INTO A UNIT VALUE? THANKS MATH. :)\n\n\n y.lVW(p).x-f.B().lVW(p).x,\n\n f.B().lVW(p).y-y.lVW(p).y\n\n )\n\n\n\n\n\n\n b.I(imp.x, imp.y)\n\n\n }))\n\n\n /*\n w.S(600,300,'w', 30,'-').K('r').cl( function(f,cx){\n var pt=cx.cen(), v1= f.B().lVW(pt), v2=r.lVW(pt)\n w.D(630,250,'r',10)\n .I(v1.x-v2.x, v1.y-v2.y)})\n */\n\n }\n /*\n midRedSensor = w.S(600,400,'z', 30,'-').K('r')\n leftGreenWeap = w.S(300,300,'g',50)\n r = w.S(600,200,'w', 30,'-').K('r')\n r.cl( function(f,cx){\n var pt=cx.cen(), v1= f.B().lVW(pt), v2=r.lVW(pt)\n w.D(630,250,'r',10).I(v1.x-v2.x, v1.y-v2.y)//.bS('sun')\n })\n */\n /*\n y.cl('r',function(f,cx){var b=this,\n sun= w.D(630,350,'r',30) ,\n pt=cx.cen()\n sun.I(b.lVW(pt).x-f.lVW(pt).x, b.lVW(pt).y-f.lVW(pt).y)})\n */\n\n\n\n }\n CX=function(){W()\n\n var centerFx = b2d.cir(80).K('center')\n\n b= w.D(500,300,'r',[\n centerFx,\n b2d.rec(60,90,0,40,10).sen(1).K('sen1')\n ]).aV(100)\n //wow! no friction?? ..b and floor both hav fr .2!\n\n w.D(700,300,'p',[\n centerFx,\n b2d.cir(100).sen(1).K('sen2')\n\n ]).aV(100)\n\n w.col('s1','s2', function(){ w.D(100,100,'w', 100) })\n\n w.b(function(cx){\n if(cx.w('s1','s2')){\n w.flag('new')\n }}) //w.on('new', function(){w.ball()})\n\n }\n THROTTLE=function(){W()\n b = w.ball(300,300, 100)\n b1 = w.brick(300,500)\n time = 0\n\n _.ev(1,function(){time++})\n\n cjs.t(function(){\n if(w.flagged('moveBrick')){\n b1.X( 20 , '+' )}})\n\n lastTime=0\n change = 0\n\n w.b(function(cx){\n if(cx.w('brick')){\n if(lastTime!=time){\n lastTime=time;\n w.flag('moveBrick')\n }}})\n }\n\n\n\n }\n }", "title": "" }, { "docid": "b832017abe969b1c7b8eec7547ad0364", "score": "0.46363464", "text": "function toSinhala(l) { l = l.toLowerCase() + \" \"; var m = { a: \"අ\", \"ā\": \"ආ\", i: \"ඉ\", \"ī\": \"ඊ\", u: \"උ\", \"ū\": \"ඌ\", e: \"එ\", o: \"ඔ\" }; var b = { \"ā\": \"ා\", i: \"ි\", \"ī\": \"ී\", u: \"ු\", \"ū\": \"ූ\", e: \"ෙ\", o: \"ො\", \"ṃ\": \"ං\", k: \"ක\", g: \"ග\", \"ṅ\": \"ඞ\", c: \"ච\", j: \"ජ\", \"ñ\": \"ඤ\", \"ṭ\": \"ට\", \"ḍ\": \"ඩ\", \"ṇ\": \"ණ\", t: \"ත\", d: \"ද\", n: \"න\", p: \"ප\", b: \"බ\", m: \"ම\", y: \"ය\", r: \"ර\", l: \"ල\", \"ḷ\": \"ළ\", v: \"ව\", s: \"ස\", h: \"හ\" }; var j = { kh: \"ඛ\", gh: \"ඝ\", ch: \"ඡ\", jh: \"ඣ\", \"ṭh\": \"ඨ\", \"ḍh\": \"ඪ\", th: \"ථ\", dh: \"ධ\", ph: \"ඵ\", bh: \"භ\", \"jñ\": \"ඥ\", \"ṇḍ\": \"ඬ\", nd: \"ඳ\", mb: \"ඹ\", rg: \"ඟ\" }; var a = { k: \"ක\", g: \"ග\", \"ṅ\": \"ඞ\", c: \"ච\", j: \"ජ\", \"ñ\": \"ඤ\", \"ṭ\": \"ට\", \"ḍ\": \"ඩ\", \"ṇ\": \"ණ\", t: \"ත\", d: \"ද\", n: \"න\", p: \"ප\", b: \"බ\", m: \"ම\", y: \"ය\", r: \"ර\", l: \"ල\", \"ḷ\": \"ළ\", v: \"ව\", s: \"ස\", h: \"හ\" }; var k, g, f, e, d; var c = \"\"; var h = 0; while (h < l.length) { k = l.charAt(h - 2); g = l.charAt(h - 1); f = l.charAt(h); e = l.charAt(h + 1); d = l.charAt(h + 2); if (m[f]) { if (h == 0 || g == \"a\") { c += m[f] } else { if (f != \"a\") { c += b[f] } } h++ } else { if (j[f + e]) { c += j[f + e]; h += 2; if (a[d]) { c += \"්\" } } else { if (b[f] && f != \"a\") { c += b[f]; h++; if (a[e] && f != \"ṃ\") { c += \"්\" } } else { if (!b[f]) { if (a[g] || (g == \"h\" && a[k])) { c += \"්\" } c += f; h++; if (m[e]) { c += m[e]; h++ } } else { h++ } } } } } if (a[f]) { c += \"්\" } c = c.replace(/ඤ්ජ/g, \"ඦ\"); c = c.replace(/ණ්ඩ/g, \"ඬ\"); c = c.replace(/න්ද/g, \"ඳ\"); c = c.replace(/ම්බ/g, \"ඹ\"); c = c.replace(/්ර/g, \"්ර\"); c = c.replace(/\\`+/g, '\"'); psri = c.slice(0, -1); return c.slice(0, -1) }", "title": "" }, { "docid": "a8f6ca1f99b52f565d4f76dd6ece3f74", "score": "0.46310475", "text": "_transform() {\n const h = this._H;\n let h0 = h[0];\n let h1 = h[1];\n let h2 = h[2];\n let h3 = h[3];\n let h4 = h[4];\n let h5 = h[5];\n let h6 = h[6];\n let h7 = h[7];\n // convert byte buffer into w[0..15]\n const w = new Uint32Array(16);\n let i;\n for (i = 0; i < 16; i++) {\n w[i] =\n this._buf[(i << 2) + 3] |\n (this._buf[(i << 2) + 2] << 8) |\n (this._buf[(i << 2) + 1] << 16) |\n (this._buf[i << 2] << 24);\n }\n for (i = 0; i < 64; i++) {\n let tmp;\n if (i < 16) {\n tmp = w[i];\n }\n else {\n let a = w[(i + 1) & 15];\n let b = w[(i + 14) & 15];\n tmp = w[i & 15] =\n (((a >>> 7) ^ (a >>> 18) ^ (a >>> 3) ^ (a << 25) ^ (a << 14)) +\n ((b >>> 17) ^ (b >>> 19) ^ (b >>> 10) ^ (b << 15) ^ (b << 13)) +\n w[i & 15] +\n w[(i + 9) & 15]) |\n 0;\n }\n tmp =\n (tmp +\n h7 +\n ((h4 >>> 6) ^\n (h4 >>> 11) ^\n (h4 >>> 25) ^\n (h4 << 26) ^\n (h4 << 21) ^\n (h4 << 7)) +\n (h6 ^ (h4 & (h5 ^ h6))) +\n this._K[i]) |\n 0;\n h7 = h6;\n h6 = h5;\n h5 = h4;\n h4 = h3 + tmp;\n h3 = h2;\n h2 = h1;\n h1 = h0;\n h0 =\n (tmp +\n ((h1 & h2) ^ (h3 & (h1 ^ h2))) +\n ((h1 >>> 2) ^\n (h1 >>> 13) ^\n (h1 >>> 22) ^\n (h1 << 30) ^\n (h1 << 19) ^\n (h1 << 10))) |\n 0;\n }\n h[0] = (h[0] + h0) | 0;\n h[1] = (h[1] + h1) | 0;\n h[2] = (h[2] + h2) | 0;\n h[3] = (h[3] + h3) | 0;\n h[4] = (h[4] + h4) | 0;\n h[5] = (h[5] + h5) | 0;\n h[6] = (h[6] + h6) | 0;\n h[7] = (h[7] + h7) | 0;\n }", "title": "" }, { "docid": "e2f2b082800fa50957974cd6b78184fa", "score": "0.4630465", "text": "function Mw(b,c){this.f=[];this.o=b;this.q=c||null;this.c=this.a=!1;this.b=void 0;this.i=this.p=this.j=!1;this.e=0;this.d=null;this.g=0}", "title": "" }, { "docid": "62962338ec6fca0d28316c52ba112823", "score": "0.4628502", "text": "function fontToSfntTable(font){var xMins=[];var yMins=[];var xMaxs=[];var yMaxs=[];var advanceWidths=[];var leftSideBearings=[];var rightSideBearings=[];var firstCharIndex;var lastCharIndex=0;var ulUnicodeRange1=0;var ulUnicodeRange2=0;var ulUnicodeRange3=0;var ulUnicodeRange4=0;for(var i=0;i<font.glyphs.length;i+=1){var glyph=font.glyphs.get(i);var unicode=glyph.unicode|0;if(isNaN(glyph.advanceWidth)){throw new Error('Glyph '+glyph.name+' ('+i+'): advanceWidth is not a number.');}if(firstCharIndex>unicode||firstCharIndex===undefined){// ignore .notdef char\nif(unicode>0){firstCharIndex=unicode;}}if(lastCharIndex<unicode){lastCharIndex=unicode;}var position=os2.getUnicodeRange(unicode);if(position<32){ulUnicodeRange1|=1<<position;}else if(position<64){ulUnicodeRange2|=1<<position-32;}else if(position<96){ulUnicodeRange3|=1<<position-64;}else if(position<123){ulUnicodeRange4|=1<<position-96;}else{throw new Error('Unicode ranges bits > 123 are reserved for internal usage');}// Skip non-important characters.\nif(glyph.name==='.notdef'){continue;}var metrics=glyph.getMetrics();xMins.push(metrics.xMin);yMins.push(metrics.yMin);xMaxs.push(metrics.xMax);yMaxs.push(metrics.yMax);leftSideBearings.push(metrics.leftSideBearing);rightSideBearings.push(metrics.rightSideBearing);advanceWidths.push(glyph.advanceWidth);}var globals={xMin:Math.min.apply(null,xMins),yMin:Math.min.apply(null,yMins),xMax:Math.max.apply(null,xMaxs),yMax:Math.max.apply(null,yMaxs),advanceWidthMax:Math.max.apply(null,advanceWidths),advanceWidthAvg:average(advanceWidths),minLeftSideBearing:Math.min.apply(null,leftSideBearings),maxLeftSideBearing:Math.max.apply(null,leftSideBearings),minRightSideBearing:Math.min.apply(null,rightSideBearings)};globals.ascender=font.ascender;globals.descender=font.descender;var headTable=head.make({flags:3,// 00000011 (baseline for font at y=0; left sidebearing point at x=0)\nunitsPerEm:font.unitsPerEm,xMin:globals.xMin,yMin:globals.yMin,xMax:globals.xMax,yMax:globals.yMax,lowestRecPPEM:3,createdTimestamp:font.createdTimestamp});var hheaTable=hhea.make({ascender:globals.ascender,descender:globals.descender,advanceWidthMax:globals.advanceWidthMax,minLeftSideBearing:globals.minLeftSideBearing,minRightSideBearing:globals.minRightSideBearing,xMaxExtent:globals.maxLeftSideBearing+(globals.xMax-globals.xMin),numberOfHMetrics:font.glyphs.length});var maxpTable=maxp.make(font.glyphs.length);var os2Table=os2.make({xAvgCharWidth:Math.round(globals.advanceWidthAvg),usWeightClass:font.tables.os2.usWeightClass,usWidthClass:font.tables.os2.usWidthClass,usFirstCharIndex:firstCharIndex,usLastCharIndex:lastCharIndex,ulUnicodeRange1:ulUnicodeRange1,ulUnicodeRange2:ulUnicodeRange2,ulUnicodeRange3:ulUnicodeRange3,ulUnicodeRange4:ulUnicodeRange4,fsSelection:font.tables.os2.fsSelection,// REGULAR\n// See http://typophile.com/node/13081 for more info on vertical metrics.\n// We get metrics for typical characters (such as \"x\" for xHeight).\n// We provide some fallback characters if characters are unavailable: their\n// ordering was chosen experimentally.\nsTypoAscender:globals.ascender,sTypoDescender:globals.descender,sTypoLineGap:0,usWinAscent:globals.yMax,usWinDescent:Math.abs(globals.yMin),ulCodePageRange1:1,// FIXME: hard-code Latin 1 support for now\nsxHeight:metricsForChar(font,'xyvw',{yMax:Math.round(globals.ascender/2)}).yMax,sCapHeight:metricsForChar(font,'HIKLEFJMNTZBDPRAGOQSUVWXY',globals).yMax,usDefaultChar:font.hasChar(' ')?32:0,// Use space as the default character, if available.\nusBreakChar:font.hasChar(' ')?32:0// Use space as the break character, if available.\n});var hmtxTable=hmtx.make(font.glyphs);var cmapTable=cmap.make(font.glyphs);var englishFamilyName=font.getEnglishName('fontFamily');var englishStyleName=font.getEnglishName('fontSubfamily');var englishFullName=englishFamilyName+' '+englishStyleName;var postScriptName=font.getEnglishName('postScriptName');if(!postScriptName){postScriptName=englishFamilyName.replace(/\\s/g,'')+'-'+englishStyleName;}var names={};for(var n in font.names){names[n]=font.names[n];}if(!names.uniqueID){names.uniqueID={en:font.getEnglishName('manufacturer')+':'+englishFullName};}if(!names.postScriptName){names.postScriptName={en:postScriptName};}if(!names.preferredFamily){names.preferredFamily=font.names.fontFamily;}if(!names.preferredSubfamily){names.preferredSubfamily=font.names.fontSubfamily;}var languageTags=[];var nameTable=_name.make(names,languageTags);var ltagTable=languageTags.length>0?ltag.make(languageTags):undefined;var postTable=post.make();var cffTable=cff.make(font.glyphs,{version:font.getEnglishName('version'),fullName:englishFullName,familyName:englishFamilyName,weightName:englishStyleName,postScriptName:postScriptName,unitsPerEm:font.unitsPerEm,fontBBox:[0,globals.yMin,globals.ascender,globals.advanceWidthMax]});var metaTable=font.metas&&Object.keys(font.metas).length>0?meta.make(font.metas):undefined;// The order does not matter because makeSfntTable() will sort them.\nvar tables=[headTable,hheaTable,maxpTable,os2Table,nameTable,cmapTable,postTable,cffTable,hmtxTable];if(ltagTable){tables.push(ltagTable);}// Optional tables\nif(font.tables.gsub){tables.push(gsub.make(font.tables.gsub));}if(metaTable){tables.push(metaTable);}var sfntTable=makeSfntTable(tables);// Compute the font's checkSum and store it in head.checkSumAdjustment.\nvar bytes=sfntTable.encode();var checkSum=computeCheckSum(bytes);var tableFields=sfntTable.fields;var checkSumAdjusted=false;for(var i$1=0;i$1<tableFields.length;i$1+=1){if(tableFields[i$1].name==='head table'){tableFields[i$1].value.checkSumAdjustment=0xB1B0AFBA-checkSum;checkSumAdjusted=true;break;}}if(!checkSumAdjusted){throw new Error('Could not find head table with checkSum to adjust.');}return sfntTable;}", "title": "" }, { "docid": "c925d4576b4b03fcef1130612002a644", "score": "0.46249992", "text": "function createPanoViewer(e){function ut(e){return(\"\"+e).toLowerCase()}function at(e,t){return e[d](t)>=0}function ft(){var t,r,i,s,o,u,a,f,l=n.location;l=l.search||l.hash;if(l){t=\".html5.flash.wmode.mobilescale.fakedevice.\",r=l[R](1)[j](\"&\");for(i=0;i<r[M];i++)s=r[i],o=s[d](\"=\"),o==-1&&(o=s[M]),u=s[R](0,o),a=ut(u),f=s[R](o+1),t[d](\".\"+a)>=0?e[a]=f:a[N](0,9)==\"initvars.\"?(e[O]||(e[O]={}),e[O][u[N](9)]=f):e.addVariable(u,f)}}function lt(e){return e[P]=ft,e}function ct(){function x(){var e,n,i,s,o,u,a;if(t.plugins){e=t.plugins[\"Shockwave Flash\"];if(typeof e==\"object\"){n=e.description;if(n){i=v,t[q]&&(s=t[q][\"application/x-shockwave-flash\"],s&&(s.enabledPlugin||(i=p)));if(i){o=n[j](\" \");for(u=0;u<o[M];++u){a=parseFloat(o[u]);if(isNaN(a))continue;return a}}}}}if(r[G])try{e=new ActiveXObject(\"ShockwaveFlash.ShockwaveFlash\");if(e){n=e.GetVariable(\"$version\");if(n)return parseFloat(n[j](\" \")[1][j](\",\").join(\".\"))}}catch(f){}return 0}function T(){var e,t,i=p,s=n[Z](\"div\");for(e=0;e<5;e++)if(typeof s.style[[\"p\",\"msP\",\"MozP\",\"WebkitP\",\"OP\"][e]+\"erspective\"]!=U){i=v,e==3&&r.matchMedia&&(t=r.matchMedia(\"(-webkit-transform-3d)\"),t&&(i=t.matches==v));break}return i}function C(){var e,t,i={failIfMajorPerformanceCaveat:v};if(r._krpWGL==v)return v;try{e=n[Z](\"canvas\");for(t=0;t<4;t++)if(e.getContext([B,\"experimental-webgl\",\"moz-webgl\",\"webkit-3d\"][t],i))return r._krpWGL=v,v}catch(s){}return p}var l,c,h,m,g,y,b,w,E,S;if(s>0)return;l=p,c=p,h=p,c=C();if(e.isDevice(\"iphone|ipad|ipod\")&&i[d](\"opera mini\")<0)a=f=v,l=v;else{o=x(),o>=10.1&&(u=v),l=T(),m=ut(t.platform),g=0,y=0,b=0,w=i[d](\"firefox/\"),w<0&&(w=i[d](\"gecko/\")),w>=0&&(g=parseInt(i[N](1+i[d](\"/\",w)),10)),h=!!r[et],w=i[d](et),w>0&&(b=parseInt(i[N](w+7),10),h=v),w=i[d](tt),w>0&&(y=parseInt(i[N](w+8),10),g>=18&&(y=4)),l&&(y>0&&y<4&&(l=p),g>3&&g<18&&y>1&&(c=l=p),c||(m[d](Q)<0&&g>3&&y<1&&(l=p),h&&(l=p)));if(l||c){a=v,E=i[d](\"blackberry\")>=0||i[d](\"rim tablet\")>=0||i[d](\"bb10\")>=0,S=(t.msMaxTouchPoints|0)>1;if(y>=4||E||S)f=v}}s=1|l<<1|c<<2|h<<3}function ht(e){function L(e){function a(){r[m]?(r[m](\"DOMMouseScroll\",c,p),r[m](\"mousewheel\",c,p),n[m](\"mousedown\",f,p),n[m](\"mouseup\",l,p)):(r.opera?r.attachEvent(_,c):r[_]=n[_]=c,n.onmousedown=f,n.onmouseup=l)}function f(e){e||(e=r.event,e[w]=e[X]),u=e?e[w]:x}function l(e){var t,i,s,a,f,l,c,h;e||(e=r.event,e[w]=e[X]),t=0,i=o[M];for(t=0;t<i;t++){s=o[t];if(s){a=n[s.id];if(a&&s.needfix){f=a[S](),l=a==e[w],c=a==u,h=e.clientX>=f.left&&e.clientX<f.right&&e.clientY>=f.top&&e.clientY<f.bottom;if((l||c)&&h==p)try{a[I]&&a[I](0,\"mouseUp\")}catch(d){}}}}return v}function c(t){var i,u,a,f,l,c;t||(t=r.event,t[w]=t[X]),i=0,u=p,t.wheelDelta?(i=t.wheelDelta/120,r.opera&&s&&(i/=4/3)):t.detail&&(i=-t.detail,s==p&&(i/=3));if(i){a=0,f=o[M];for(a=0;a<f;a++){l=o[a];if(l){c=n[l.id];if(c&&c==t[w]){try{c.jswheel?c.jswheel(i):c[b]?c[b](i):c[k]&&(c[k](),c[b]&&c[b](i))}catch(h){}u=v;break}}}}e[$]==p&&(u=p);if(u)return t[nt]&&t[nt](),t[st]&&t[st](),t.cancelBubble=v,t.cancel=v,n[m]||(t.returnValue=p),p}var i,s=ut(t.appVersion)[d](Q)>=0,o=r._krpMW,u=x;o||(o=r._krpMW=new Array,a()),i=e[y],o.push({id:e.id,needfix:s||!!r[et]||i==\"opaque\"||i==\"transparent\"})}var i,s,o,u,a,f,l=encodeURIComponent,c=\"\",h=e[rt],T=e[H],N=e.id;for(;;){s=n[E](N);if(!s)break;N+=String.fromCharCode(48+Math.floor(9*Math.random())),e.id=N}e[y]&&(T[y]=e[y]),e[C]&&(T[C]=e[C]),e[z]!==undefined&&(h[z]=e[z]),e[y]=ut(T[y]),T.allowfullscreen=\"true\",T.allowscriptaccess=it,i=\"browser.\",c=i+\"useragent=\"+l(t.userAgent)+\"&\"+i+\"location=\"+l(r.location.href);for(i in h)c+=\"&\"+l(i)+\"=\"+l(h[i]);i=O,h=e[i];if(h){c+=\"&\"+i+\"=\";for(i in h)c+=\"%26\"+l(escape(i))+\"=\"+l(escape(h[i]))}T.flashvars=c,e[A]&&(T.base=e[A]),o=\"\",u=' id=\"'+N+'\" width=\"'+e.width+'\" height=\"'+e.height+'\" style=\"outline:none;\" ',a=\"_krpcb_\"+N,!e[F]||(r[a]=function(){try{delete r[a]}catch(t){r[a]=x}e[F](n[E](N))});if(t.plugins&&t[q]&&!r[G]){o='<embed name=\"'+N+'\"'+u+'type=\"application/x-shockwave-flash\" src=\"'+e.swf+'\" ';for(i in T)o+=i+'=\"'+T[i]+'\" ';o+=\" />\"}else{o=\"<object\"+u+'classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"><param name=\"movie\" value=\"'+e.swf+'\" />';for(i in T)o+='<param name=\"'+i+'\" value=\"'+T[i]+'\" />';o+=\"</object>\"}e[g].innerHTML=o,e.focus===v&&(f=n[E](N),f&&f.focus()),L(e)}function pt(e){typeof embedpanoJS!==U?embedpanoJS(e):e[T](\"krpano HTML5 Viewer not available!\")}function dt(n,r){var u,a,f,l;n==1?(o>=11.4&&(u=v,ut(t.platform)[d](Q)>=0&&ut(t.vendor)[d](\"apple\")>=0&&(a=i[d](\"webkit/\"),a>0&&(a=parseFloat(i[N](a+7)),!isNaN(a)&&a>0&&a<534&&(u=p))),u&&(e[y]==x&&!e[H][y]?e[y]=s&8?\"window\":\"direct\":(f=(\"\"+e[y])[d](\"-flash\"),f>0&&(e[y]=e[y][N](0,f))))),ht(e)):n==2?pt(e):(l=\"\",r<2&&(l+=\"Adobe Flashplayer\"),r==0&&(l+=\" or<br/>\"),r!=1&&(l+=\"HTML5 Browser with WebGL \",at(ut(e[W]),B)||(l+=\"or CSS3D \"),l+=\"support\"),l+=\" required!\",e[T](l))}function vt(){var t='Local usage with <span style=\"border:1px solid gray;padding:0px 3px;\">file://</span> urls is limited due browser security restrictions!<br><br>Use a localhost server (like the <a href=\"http://krpano.com/tools/ktestingserver/#top\" style=\"color:white;\">krpano Testing Server</a>) for local testing!<br>Just start the krpano Testing Server and refresh this page.<br><br><a href=\"http://krpano.com/docu/localusage/#top\" style=\"color:gray;font-style:italic;text-decoration:none;\">More information...</a>';e[T](t)}function mt(e,t,n){var r;try{r=new XMLHttpRequest,r.responseType=\"text\",r.open(\"GET\",e,v),r.onreadystatechange=function(){var e;r.readyState===4&&(e=r.status,e==0&&r.responseText||e==200?t():n())},r.send(x)}catch(i){n()}}var t,n,r,i,s,o,u,a,f,l,c,h,p=!1,d=\"indexOf\",v=!0,m=\"addEventListener\",g=\"targetelement\",y=\"wmode\",b=\"externalMouseEvent\",w=\"target\",E=\"getElementById\",S=\"getBoundingClientRect\",x=null,T=\"onerror\",N=\"slice\",C=\"bgcolor\",k=\"enable_mousewheel_js_bugfix\",L=\"localfallback\",A=\"flashbasepath\",O=\"initvars\",M=\"length\",_=\"onmousewheel\",D=\"fallback\",P=\"passQueryParameters\",H=\"params\",B=\"webgl\",j=\"split\",F=\"onready\",I=\"externalMouseEvent2\",q=\"mimeTypes\",R=\"substring\",U=\"undefined\",z=\"xml\",W=\"html5\",X=\"srcElement\",V=\"basepath\",$=\"mwheel\",J=\"flash\",K=\"consolelog\",Q=\"mac\",G=\"ActiveXObject\",Y=\"never\",Z=\"createElement\",et=\"chrome\",tt=\"android\",nt=\"stopPropagation\",rt=\"vars\",it=\"always\",st=\"preventDefault\",ot=\"only\";return t=navigator,n=document,r=window,i=ut(t.userAgent),s=0,o=0,u=p,a=p,f=v,e||(e={}),l=e[P]===v,e.swf||(e.swf=\"krpano.swf\"),e[z]===undefined&&(e[z]=e.swf[j](\".swf\").join(\".xml\")),e.id||(e.id=\"krpanoSWFObject\"),e.width||(e.width=\"100%\"),e.height||(e.height=\"100%\"),e[C]||(e[C]=\"#000000\"),e[y]||(e[y]=x),e[w]||(e[w]=x),e[W]||(e[W]=\"auto\"),e[J]||(e[J]=x),e[$]===undefined&&(e[$]=v),e[rt]||(e[rt]={}),e[H]||(e[H]={}),e[F]||(e[F]=x),e.mobilescale||(e.mobilescale=.5),e.fakedevice||(e.fakedevice=x),e[L]||(e[L]=\"http://localhost:8090\"),e[V]?e[A]=e[V]:(c=\"./\",h=e.swf.lastIndexOf(\"/\"),h>=0&&(c=e.swf[N](0,h+1)),e[V]=c),e.isDevice=function(e){var t,n,r,s=\"all\",o=[\"ipad\",\"iphone\",\"ipod\",tt];for(t=0;t<4;t++)i[d](o[t])>=0&&(s+=\"|\"+o[t]);e=ut(e)[j](\"|\");if(e==x)return v;n=e[M];for(t=0;t<n;t++){r=e[t];if(s[d](r)>=0)return v}return p},e.addVariable=function(t,n){t=ut(t),t==\"pano\"||t==z?e[z]=n:e[rt][t]=n},e.addParam=function(t,n){e[H][ut(t)]=n},e.useHTML5=function(t){e[W]=t},e.isHTML5possible=function(){return ct(),a},e.isFlashpossible=function(){return ct(),u},e[T]||(e[T]=function(t){var n=e[g];n?n.innerHTML='<table style=\"width:100%;height:100%;\"><tr style=\"vertical-align:middle;text-align:center;\"><td>ERROR:<br><br>'+t+\"<br><br></td></tr></table>\":alert(\"ERROR: \"+t)}),e.embed=function(t){var i,o,f,c,h,m;t&&(e[w]=t),e[g]=n[E](e[w]),e[g]?(l&&ft(),e.focus===undefined&&e[g][S]&&(i=e[g][S](),e.focus=i.top==0&&i.left==0&&i.right>=r.innerWidth&&i.bottom>=r.innerHeight),e[$]==p&&(e[rt][\"control.disablewheel\"]=v),e[K]&&(e[rt][K]=e[K]),s==0&&ct(),o=ut(e[W]),f=e[J],f&&(f=ut(f),f==\"prefer\"?o=D:f==D?o=\"prefer\":f==ot?o=Y:f==Y&&(o=ot)),c=0,h=0,m=a,m&&at(o,B)&&(m=s&4),o==Y?(c=u?1:0,h=1):at(o,ot)?(c=m?2:0,h=2):at(o,it)?c=h=2:o==D?c=u?1:a?2:0:c=m?2:u?1:0,c==2&&ut(location.href[N](0,7))==\"file://\"?mt(location.href,function(){dt(c,h)},function(){var t,n=ut(e[L]);n==J?u?dt(1,0):vt():n==\"none\"?dt(c,h):n[d](\"://\")>0?(t=new Image,t[T]=vt,t.onload=function(){location.href=n+\"/krpanotestingserverredirect.html?\"+location.href},t.src=n+\"/krpanotestingserver.png\"):vt()}):dt(c,h)):e[T](\"No Embedding Target\")},lt(e)}", "title": "" }, { "docid": "043dba0a711f3e7c714c8472b423f3e4", "score": "0.46244624", "text": "function C(){function e(e){o.Extends(f,e),i(e.jQuery),o._base.name(\"Colorado\"),s=o._base,l=s.config,c=s.utils,d=p(s.windowTopContainer())}function i(e){u=e,p=e}function t(e,i,t){var n=i.width()+v;e.width(n),a(t,n)}function n(e,i,t,n){var r=c().getHostData().isIE(8,\"lte\"),o=r?i.height():i.width();i.width(o),r||(i.css(t,(o-g)/2*-1),i.css(\"bottom\",(o-w)/2));var s=o+v;e.height(s),a(n,s)}function a(e,i){var t=p(window);switch(e){case\"center\":var n=(t.width()-i)/2/t.width()*100;s.player().css(\"left\",n+\"%\");break;case\"middle\":var a=(t.height()-i)/2/t.height()*100;s.player().css(\"top\",a+\"%\")}}function r(){d.on(\"resize.walkme-player\",function(){var e=p(window),i=e.width(),t=e.height();(t!=h||i!=m)&&(m=i,h=t,b())})}var o=new I(this);this.LocalSVNRevision=\"$Rev: 4763 $\";var s,l,c,d,u,p,m,h,v=57,g=40,w=7,b=(o.Override(\"buildHtml\",function(){var e='<div id=\"{{id}}\" class=\"walkme-player walkme-colorado walkme-theme-{{theme}} walkme-direction-{{direction}} walkme-{{isIe}} walkme-position-major-{{positionMajor}} walkme-position-minor-{{positionMinor}} {{accessibleClass}} walkme-dynamic-size\"><div class=\"walkme-in-wrapper\"><div class=\"walkme-question-mark\"></div><div class=\"walkme-title\">{{{title}}}</div></div></div>',i=s.mustache().to_html(e,{id:s.id(),theme:l().TriangleTheme,direction:l().Direction,isIe:s.isIeClass(),positionMajor:s.positionMajor(),positionMinor:s.positionMinor(),title:l().ClosedMenuTitle,accessibleClass:s.accessibleClass()});return i}),o.Override(\"customSizeHandler\",function(){var e=s.player(),i=e.find(\".walkme-title\"),e=e.find(\".walkme-in-wrapper\"),a=s.positionMajor(),r=s.positionMinor(),o=\"none\"!=e.css(\"display\");e.show(),\"top\"==a||\"bottom\"==a?t(e,i,r):n(e,i,a,r),o||e.hide()}));o.Override(\"addResources\",function(e,i){var t=[{id:\"widgetFont\",name:\"widget-font\",url:\"/player/resources/fonts/widget-font_v3\",dummeyText:\"&#xe60c;\"},{id:\"opensans\",name:\"opensans\",url:\"/player/resources/fonts/opensans\"}];c().ResourceManager.fonts(t,p(\"head\"),e,i)}),o.Override(\"show\",function(){s.show(void 0,r)}),o.Override(\"destroy\",function(){s.destroy(),d.off(\"resize.walkme-player\")}),o.Override(\"hide\",function(){s.hide(),d.off(\"resize.walkme-player\")}),o.Override(\"languageChanged\",function(){s.languageChanged(),b()});e.apply(null,arguments)}", "title": "" }, { "docid": "80c80f963cf9a297aa33d1b5c61059af", "score": "0.46233577", "text": "function io(){const e=Qt(),t=document.createElementNS(Fi,\"defs\"),o=eo(),r=to(),i=oo(),n=ro();return o.appendChild(r),o.appendChild(i),t.appendChild(o),e.appendChild(t),e.appendChild(n),e}", "title": "" }, { "docid": "9e84f62d4278e3ff4ed5d0a7d8143a2d", "score": "0.4618903", "text": "function init() {\r\n\t\r\n\r\n}//init", "title": "" }, { "docid": "33bff26c8b5657c2a93ae5e04ad145c7", "score": "0.46171385", "text": "function Visitor(k,s){if(!k)throw\"Visitor requires Adobe Marketing Cloud Org ID\";var a=this;a.version=\"1.3.2\";var h=window,m=h.Visitor;h.s_c_in||(h.s_c_il=[],h.s_c_in=0);a._c=\"Visitor\";a._il=h.s_c_il;a._in=h.s_c_in;a._il[a._in]=a;h.s_c_in++;var x=h.document,j=h.O;j||(j=null);var i=h.P;i||(i=!0);var q=h.N;q||(q=!1);a.C=function(a){var c=0,b,e;if(a)for(b=0;b<a.length;b++)e=a.charCodeAt(b),c=(c<<5)-c+e,c&=c;return c};a.m=function(a){var c=\"0123456789\",b=\"\",e=\"\",f,g=8,h=10,i=10;if(1==a){c+=\"ABCDEF\";for(a=\n 0;16>a;a++)f=Math.floor(Math.random()*g),b+=c.substring(f,f+1),f=Math.floor(Math.random()*g),e+=c.substring(f,f+1),g=16;return b+\"-\"+e}for(a=0;19>a;a++)f=Math.floor(Math.random()*h),b+=c.substring(f,f+1),0==a&&9==f?h=3:(1==a||2==a)&&10!=h&&2>f?h=10:2<a&&(h=10),f=Math.floor(Math.random()*i),e+=c.substring(f,f+1),0==a&&9==f?i=3:(1==a||2==a)&&10!=i&&2>f?i=10:2<a&&(i=10);return b+e};a.I=function(){var a;!a&&h.location&&(a=h.location.hostname);if(a)if(/^[0-9.]+$/.test(a))a=\"\";else{var c=a.split(\".\"),b=\n c.length-1,e=b-1;1<b&&2>=c[b].length&&(2==c[b-1].length||0>\",ac,ad,ae,af,ag,ai,al,am,an,ao,aq,ar,as,at,au,aw,ax,az,ba,bb,be,bf,bg,bh,bi,bj,bm,bo,br,bs,bt,bv,bw,by,bz,ca,cc,cd,cf,cg,ch,ci,cl,cm,cn,co,cr,cu,cv,cw,cx,cz,de,dj,dk,dm,do,dz,ec,ee,eg,es,eu,fi,fm,fo,fr,ga,gb,gd,ge,gf,gg,gh,gi,gl,gm,gn,gp,gq,gr,gs,gt,gw,gy,hk,hm,hn,hr,ht,hu,id,ie,im,in,io,iq,ir,is,it,je,jo,jp,kg,ki,km,kn,kp,kr,ky,kz,la,lb,lc,li,lk,lr,ls,lt,lu,lv,ly,ma,mc,md,me,mg,mh,mk,ml,mn,mo,mp,mq,mr,ms,mt,mu,mv,mw,mx,my,na,nc,ne,nf,ng,nl,no,nr,nu,nz,om,pa,pe,pf,ph,pk,pl,pm,pn,pr,ps,pt,pw,py,qa,re,ro,rs,ru,rw,sa,sb,sc,sd,se,sg,sh,si,sj,sk,sl,sm,sn,so,sr,st,su,sv,sx,sy,sz,tc,td,tf,tg,th,tj,tk,tl,tm,tn,to,tp,tt,tv,tw,tz,ua,ug,uk,us,uy,uz,va,vc,ve,vg,vi,vn,vu,wf,ws,yt,nd,\".indexOf(\",\"+\n c[b]+\",\"))&&e--;if(0<e)for(a=\"\";b>=e;)a=c[b]+(a?\".\":\"\")+a,b--}return a};a.cookieRead=function(a){var a=encodeURIComponent(a),c=(\";\"+x.cookie).split(\" \").join(\";\"),b=c.indexOf(\";\"+a+\"=\"),e=0>b?b:c.indexOf(\";\",b+1);return 0>b?\"\":decodeURIComponent(c.substring(b+2+a.length,0>e?c.length:e))};a.cookieWrite=function(d,c,b){var e=a.cookieLifetime,f,c=\"\"+c,e=e?(\"\"+e).toUpperCase():\"\";b&&\"SESSION\"!=e&&\"NONE\"!=e?(f=\"\"!=c?parseInt(e?e:0):-60)?(b=new Date,b.setTime(b.getTime()+1E3*f)):1==b&&(b=new Date,f=b.getYear(),\n b.setYear(f+2+(1900>f?1900:0))):b=0;return d&&\"NONE\"!=e?(x.cookie=encodeURIComponent(d)+\"=\"+encodeURIComponent(c)+\"; path=/;\"+(b?\" expires=\"+b.toGMTString()+\";\":\"\")+(a.cookieDomain?\" domain=\"+a.cookieDomain+\";\":\"\"),a.cookieRead(d)==c):0};a.e=j;a.w=function(a,c){try{\"function\"==typeof a?a.apply(h,c):a[1].apply(a[0],c)}catch(b){}};a.L=function(d,c){c&&(a.e==j&&(a.e={}),void 0==a.e[d]&&(a.e[d]=[]),a.e[d].push(c))};a.l=function(d,c){if(a.e!=j){var b=a.e[d];if(b)for(;0<b.length;)a.w(b.shift(),c)}};a.j=\n j;a.J=function(d,c,b){!c&&b&&b();var e=x.getElementsByTagName(\"HEAD\")[0],f=x.createElement(\"SCRIPT\");f.type=\"text/javascript\";f.setAttribute(\"async\",\"async\");f.src=c;e.firstChild?e.insertBefore(f,e.firstChild):e.appendChild(f);b&&(a.j==j&&(a.j={}),a.j[d]=setTimeout(b,a.loadTimeout))};a.H=function(d){a.j!=j&&a.j[d]&&(clearTimeout(a.j[d]),a.j[d]=0)};a.D=q;a.F=q;a.isAllowed=function(){if(!a.D&&(a.D=i,a.cookieRead(a.cookieName)||a.cookieWrite(a.cookieName,\"T\",1)))a.F=i;return a.F};a.a=j;a.c=j;var v=a.V;\n v||(v=\"MC\");var n=a.Y;n||(n=\"MCMID\");var w=a.X;w||(w=\"MCCIDH\");var y=a.W;y||(y=\"MCAS\");var t=a.T;t||(t=\"A\");var l=a.Q;l||(l=\"MCAID\");var u=a.U;u||(u=\"AAM\");var r=a.S;r||(r=\"MCAAMLH\");var o=a.R;o||(o=\"MCAAMB\");var p=a.Z;p||(p=\"NONE\");a.t=0;a.B=function(){if(!a.t){var d=a.version;a.audienceManagerServer&&(d+=\"|\"+a.audienceManagerServer);a.audienceManagerServerSecure&&(d+=\"|\"+a.audienceManagerServerSecure);if(a.audienceManagerCustomerIDDPIDs)for(var c in a.audienceManagerCustomerIDDPIDs)!Object.prototype[c]&&\n a.audienceManagerCustomerIDDPIDs[c]&&(d+=c+\"=\"+a.audienceManagerCustomerIDDPIDs[c]);a.t=a.C(d)}return a.t};a.G=q;a.h=function(){if(!a.G){a.G=i;var d=a.B(),c=q,b=a.cookieRead(a.cookieName),e,f,g,h=new Date;a.a==j&&(a.a={});if(b&&\"T\"!=b){b=b.split(\"|\");b[0].match(/^[\\-0-9]+$/)&&(parseInt(b[0])!=d&&(c=i),b.shift());1==b.length%2&&b.pop();for(d=0;d<b.length;d+=2)e=b[d].split(\"-\"),f=e[0],g=b[d+1],e=1<e.length?parseInt(e[1]):0,c&&(f==w&&(g=\"\"),0<e&&(e=h.getTime()/1E3-60)),f&&g&&(a.d(f,g,1),0<e&&(a.a[\"expire\"+\n f]=e,h.getTime()>=1E3*e&&(a.c||(a.c={}),a.c[f]=i)))}if(!a.b(l)&&(b=a.cookieRead(\"s_vi\")))b=b.split(\"|\"),1<b.length&&0<=b[0].indexOf(\"v1\")&&(g=b[1],d=g.indexOf(\"[\"),0<=d&&(g=g.substring(0,d)),g&&g.match(/^[0-9a-fA-F\\-]+$/)&&a.d(l,g))}};a.M=function(){var d=a.B(),c,b;for(c in a.a)!Object.prototype[c]&&a.a[c]&&\"expire\"!=c.substring(0,6)&&(b=a.a[c],d+=(d?\"|\":\"\")+c+(a.a[\"expire\"+c]?\"-\"+a.a[\"expire\"+c]:\"\")+\"|\"+b);a.cookieWrite(a.cookieName,d,1)};a.b=function(d,c){return a.a!=j&&(c||!a.c||!a.c[d])?a.a[d]:\n j};a.d=function(d,c,b){a.a==j&&(a.a={});a.a[d]=c;b||a.M()};a.p=function(d,c){var b=new Date;b.setTime(b.getTime()+1E3*c);a.a==j&&(a.a={});a.a[\"expire\"+d]=Math.floor(b.getTime()/1E3);0>c&&(a.c||(a.c={}),a.c[d]=i)};a.A=function(a){if(a&&(\"object\"==typeof a&&(a=a.d_mid?a.d_mid:a.visitorID?a.visitorID:a.id?a.id:a.uuid?a.uuid:\"\"+a),a&&(a=a.toUpperCase(),\"NOTARGET\"==a&&(a=p)),!a||a!=p&&!a.match(/^[0-9a-fA-F\\-]+$/)))a=\"\";return a};a.i=function(d,c){a.H(d);a.g!=j&&(a.g[d]=q);if(d==v){var b=a.b(n);if(!b){b=\n \"object\"==typeof c&&c.mid?c.mid:a.A(c);if(!b){if(a.r){a.getAnalyticsVisitorID(null,!1,!0);return}b=a.m()}a.d(n,b)}if(!b||b==p)b=\"\";\"object\"==typeof c&&((c.d_region||c.dcs_region||c.d_blob||c.blob)&&a.i(u,c),a.r&&c.mid&&a.i(t,{id:c.id}));a.l(n,[b])}if(d==u&&\"object\"==typeof c){b=604800;void 0!=c.id_sync_ttl&&c.id_sync_ttl&&(b=parseInt(c.id_sync_ttl));var e=a.b(r);e||((e=c.d_region)||(e=c.dcs_region),e&&(a.p(r,b),a.d(r,e)));e||(e=\"\");a.l(r,[e]);e=a.b(o);if(c.d_blob||c.blob)(e=c.d_blob)||(e=c.blob),\n a.p(o,b),a.d(o,e);e||(e=\"\");a.l(o,[e]);!c.error_msg&&a.o&&a.d(w,a.o)}if(d==t){b=a.b(l);b||((b=a.A(c))?a.p(o,-1):b=p,a.d(l,b));if(!b||b==p)b=\"\";a.l(l,[b])}};a.g=j;a.n=function(d,c,b,e){var f=\"\",g;if(a.isAllowed()&&(a.h(),f=a.b(d),!f&&(d==n?g=v:d==r||d==o?g=u:d==l&&(g=t),g))){if(c&&(a.g==j||!a.g[g]))a.g==j&&(a.g={}),a.g[g]=i,a.J(g,c,function(){if(!a.b(d)){var b=\"\";d==n&&(b=a.m());a.i(g,b)}});a.L(d,b);c||a.i(g,{id:p});return\"\"}if((d==n||d==l)&&f==p)f=\"\",e=i;b&&e&&a.w(b,[f]);return f};a._setMarketingCloudFields=\n function(d){a.h();a.i(v,d)};a.setMarketingCloudVisitorID=function(d){a._setMarketingCloudFields(d)};a.r=q;a.getMarketingCloudVisitorID=function(d,c){return a.isAllowed()?(a.marketingCloudServer&&0>a.marketingCloudServer.indexOf(\".demdex.net\")&&(a.r=i),a.n(n,a.s(\"_setMarketingCloudFields\"),d,c)):\"\"};a.K=function(){a.getAudienceManagerBlob()};a.f={};a.z=q;a.o=\"\";a.setCustomerIDs=function(d){a.f=d;if(a.isAllowed()){a.h();var d=a.b(w),c=\"\",b,e;d||(d=0);for(b in a.f)e=a.f[b],!Object.prototype[b]&&e&&(c+=\n (c?\"|\":\"\")+b+\"|\"+e);a.o=a.C(c);a.o!=d&&(a.z=i,a.K())}};a.getCustomerIDs=function(){return a.f};a._setAnalyticsFields=function(d){a.h();a.i(t,d)};a.setAnalyticsVisitorID=function(d){a._setAnalyticsFields(d)};a.getAnalyticsVisitorID=function(d,c,b){if(a.isAllowed()){var e=\"\";b||(e=a.getMarketingCloudVisitorID(function(){a.getAnalyticsVisitorID(d,i)}));if(e||b){var f=b?a.marketingCloudServer:a.trackingServer,g=\"\";a.loadSSL&&(b?a.marketingCloudServerSecure&&(f=a.marketingCloudServerSecure):a.trackingServerSecure&&\n (f=a.trackingServerSecure));f&&(g=\"http\"+(a.loadSSL?\"s\":\"\")+\"://\"+f+\"/id?callback=s_c_il%5B\"+a._in+\"%5D._set\"+(b?\"MarketingCloud\":\"Analytics\")+\"Fields&mcorgid=\"+encodeURIComponent(a.marketingCloudOrgID)+(e?\"&mid=\"+e:\"\"));return a.n(b?n:l,g,d,c)}}return\"\"};a._setAudienceManagerFields=function(d){a.h();a.i(u,d)};a.s=function(d){var c=a.audienceManagerServer,b=\"\",e=a.b(n),f=a.b(o,i),g=a.b(l),g=g&&g!=p?\"&d_cid_ic=AVID%01\"+encodeURIComponent(g):\"\",h=\"\",j,k;a.loadSSL&&a.audienceManagerServerSecure&&(c=\n a.audienceManagerServerSecure);if(c){if(a.f)for(j in a.f)if(!Object.prototype[j]&&(b=a.f[j]))g+=\"&d_cid_ic=\"+encodeURIComponent(j)+\"%01\"+encodeURIComponent(b),a.audienceManagerCustomerIDDPIDs&&(k=a.audienceManagerCustomerIDDPIDs[j])&&(h+=\"&d_cid=\"+k+\"%01\"+encodeURIComponent(b));d||(d=\"_setAudienceManagerFields\");b=\"http\"+(a.loadSSL?\"s\":\"\")+\"://\"+c+\"/id?d_rtbd=json&d_ver=2\"+(!e&&a.r?\"&d_verify=1\":\"\")+\"&d_orgid=\"+encodeURIComponent(a.marketingCloudOrgID)+(e?\"&d_mid=\"+e:\"\")+(f?\"&d_blob=\"+encodeURIComponent(f):\n \"\")+g+h+\"&d_cb=s_c_il%5B\"+a._in+\"%5D.\"+d}return b};a.getAudienceManagerLocationHint=function(d,c){if(a.isAllowed()&&a.getMarketingCloudVisitorID(function(){a.getAudienceManagerLocationHint(d,i)})){var b=a.b(l);b||(b=a.getAnalyticsVisitorID(function(){a.getAudienceManagerLocationHint(d,i)}));if(b)return a.n(r,a.s(),d,c)}return\"\"};a.getAudienceManagerBlob=function(d,c){if(a.isAllowed()&&a.getMarketingCloudVisitorID(function(){a.getAudienceManagerBlob(d,i)})){var b=a.b(l);b||(b=a.getAnalyticsVisitorID(function(){a.getAudienceManagerBlob(d,\n i)}));if(b)return b=a.s(),a.z&&a.p(o,-1),a.n(o,b,d,c)}return\"\"};m.AUTH_STATE_UNAUTHENTICATED=0;m.AUTH_STATE_AUTHENTICATED=1;m.AUTH_STATE_ASSUMED_AUTHENTICATED=2;m.AUTH_STATE_LOGGEDOUT=3;a.setAuthState=function(d){a.isAllowed()&&(a.h(),a.d(y,d))};a.getAuthState=function(){return a.isAllowed()?(a.h(),a.b(y)):0};a.k=\"\";a.q={};a.u=\"\";a.v={};a.getSupplementalDataID=function(d,c){!a.k&&!c&&(a.k=a.m(1));var b=a.k;a.u&&!a.v[d]?(b=a.u,a.v[d]=i):b&&(a.q[d]&&(a.u=a.k,a.v=a.q,a.k=b=!c?a.m(1):\"\",a.q={}),b&&(a.q[d]=\n i));return b};0>k.indexOf(\"@\")&&(k+=\"@AdobeOrg\");a.marketingCloudOrgID=k;a.namespace=s;a.cookieName=\"AMCV_\"+k;a.cookieDomain=a.I();a.cookieDomain==h.location.hostname&&(a.cookieDomain=\"\");if(s){var m=\"AMCV_\"+s,A=a.cookieRead(a.cookieName),z=a.cookieRead(m);!A&&z&&(a.cookieWrite(a.cookieName,z,1),a.cookieWrite(m,\"\",-60))}a.loadSSL=0<=h.location.protocol.toLowerCase().indexOf(\"https\");a.loadTimeout=500;a.marketingCloudServer=a.audienceManagerServer=\"dpm.demdex.net\"}", "title": "" }, { "docid": "a9790d0316dacad61a6113f1ae7f1174", "score": "0.46159646", "text": "function kh(a,b){this.g=[];this.v=a;this.u=b||null;this.f=this.a=!1;this.c=void 0;this.m=this.w=this.i=!1;this.h=0;this.b=null;this.l=0}", "title": "" }, { "docid": "ae643b74bec0ddf50899360740166172", "score": "0.46115658", "text": "function P(){function e(e){i.Extends(h,e),t(e.jQuery),i._base.name(\"Mississippi\"),n=i._base,a=n.config,r=n.utils}function t(e){o=e,s=e}var i=new E(this);this.LocalSVNRevision=\"$Rev: 5979 $\";var n,a,r,o,s;i.Override(\"buildHtml\",function(){var e='<div id=\"{{id}}\" class=\"walkme-player walkme-mississippi walkme-theme-{{theme}} walkme-direction-{{direction}} walkme-{{isIe}} walkme-position-major-{{positionMajor}} walkme-position-minor-{{positionMinor}} {{accessibleClass}}\"><div class=\"walkme-out-wrapper\"><div class=\"walkme-in-wrapper\">{{#jawsAccessibility}}<a href=\"#\" class=\"walkme-title\" title=\"{{{title}}}\">{{{title}}}</a>{{/jawsAccessibility}}{{^jawsAccessibility}}<div class=\"walkme-title\">{{{title}}}</div>{{/jawsAccessibility}}<div class=\"walkme-arrow\"></div><div class=\"walkme-bar\"></div></div></div></div>',t=n.mustache().to_html(e,{id:n.id(),theme:a().TriangleTheme,direction:a().Direction,isIe:n.isIeClass(),positionMajor:n.positionMajor(),positionMinor:n.positionMinor(),title:a().ClosedMenuTitle,accessibleClass:n.accessibleClass(),jawsAccessibility:r().isFeatureActive(\"jawsAccessibility\")});return t}),i.Override(\"addResources\",function(e,t){var i=[{id:\"widgetFont\",name:\"widget-font\",url:\"/player/resources/fonts/widget-font_v3\",dummeyText:\"&#xe60c;\"},{id:\"opensans\",name:\"opensans\",url:\"/player/resources/fonts/opensans\"}];r().ResourceManager.fonts(i,s(\"head\"),e,t)});e.apply(null,arguments)}", "title": "" }, { "docid": "38f5e7d3c445a98e936110fb217b3ac0", "score": "0.46076205", "text": "function WRDP(d){var c,b;if(d){c=self;b=d.data;c.WRCr=c.WRCr||a}function a(h,n){(function(p){if(typeof exports===\"object\"&&typeof module!==\"undefined\"){module.exports=p()}else{if(typeof pakoDefine===\"function\"&&pakoDefine.amd){pakoDefine([],p)}else{var o;if(typeof window!==\"undefined\"){o=window}else{if(typeof h!==\"undefined\"){o=h}else{if(typeof self!==\"undefined\"){o=self}else{o=this}}}o.pako=p()}}})(function(){var r,p,o;return(function q(v,z,x){function w(C,A){if(!z[C]){if(!v[C]){var t=typeof require==\"function\"&&require;if(!A&&t){return t(C,!0)}if(u){return u(C,!0)}var B=new Error(\"Cannot find module '\"+C+\"'\");throw B.code=\"MODULE_NOT_FOUND\",B}var s=z[C]={exports:{}};v[C][0].call(s.exports,function(D){var E=v[C][1][D];return w(E?E:D)},s,s.exports,q,v,z,x)}return z[C].exports}var u=typeof require==\"function\"&&require;for(var y=0;y<x.length;y++){w(x[y])}return w})({1:[function(B,t,N){var G=B(\"./zlib/deflate.js\");var M=B(\"./utils/common\");var x=B(\"./utils/strings\");var z=B(\"./zlib/messages\");var L=B(\"./zlib/zstream\");var I=Object.prototype.toString;var H=0;var P=4;var y=0;var D=1;var u=-1;var v=0;var E=8;var O=function(R){this.options=M.assign({level:u,method:E,chunkSize:16384,windowBits:15,memLevel:8,strategy:v,to:\"\"},R||{});var S=this.options;if(S.raw&&(S.windowBits>0)){S.windowBits=-S.windowBits}else{if(S.gzip&&(S.windowBits>0)&&(S.windowBits<16)){S.windowBits+=16}}this.err=0;this.msg=\"\";this.ended=false;this.chunks=[];this.strm=new L();this.strm.avail_out=0;var Q=G.deflateInit2(this.strm,S.level,S.method,S.windowBits,S.memLevel,S.strategy);if(Q!==y){throw new Error(z[Q])}if(S.header){G.deflateSetHeader(this.strm,S.header)}};O.prototype.pushSingleChunk=function(T,U){var R=this.strm;var V=this.options.chunkSize;var Q,S;if(this.ended){return false}S=(U===~~U)?U:((U===true)?P:H);if(typeof T===\"string\"){R.input=x.string2buf(T)}else{if(I.call(T)===\"[object ArrayBuffer]\"){R.input=new Uint8Array(T)}else{R.input=T}}R.next_in=0;R.avail_in=R.input.length;w.call(this,S);if(j){return}if(S===P){Q=G.deflateEnd(this.strm);this.onEnd(Q);this.ended=true;return Q===y}return true};function A(Q){return Q<26?Q+65:Q<52?Q+71:Q<62?Q-4:Q===62?43:Q===63?47:65}function F(Q){var R=btoa(String.fromCharCode.apply(null,Q));return R}function K(V){var R,U=\"\";if(window.btoa){return F(V)}for(var T=V.length,Q=0,S=0;S<T;S++){R=S%3;Q|=V[S]<<(16>>>R&24);if(R===2||V.length-S===1){U+=String.fromCharCode(A(Q>>>18&63),A(Q>>>12&63),A(Q>>>6&63),A(Q&63));Q=0}}return U.replace(/A(?=A$|$)/g,\"=\")}function w(V){g();var T;var S=this.strm;var W=this.options.chunkSize;var R,U,Q;s.call(this,S,U);if(j){return}if(this.ended){return false}U=(V===~~V)?V:((V===true)?P:H);if(S.avail_out===0){S.output=new M.Buf8(W);S.next_out=0;S.avail_out=W;if(m()){T=k(w,this,U,null);e(T);return}}R=G.deflate(S,U);if(R===\"defer\"){T=k(w,this,U,null);e(T);return}if(m()){T=k(w,this,U,null);e(T);return}if(R!==D&&R!==y){this.onEnd(R);this.ended=true;return false}s.call(this,S,U);if((S.avail_in>0||S.avail_out===0)&&R!==D){if(S.avail_out===0){S.output=new M.Buf8(W);S.next_out=0;S.avail_out=W}w.call(this,U)}}function s(Q,S){if(Q.output&&(Q.avail_out===0||(Q.avail_in===0&&S===P))){if(this.options.to===\"string\"){base64=K(M.shrinkBuf(Q.output,Q.next_out));this.onData(base64)}else{this.onData(M.shrinkBuf(Q.output,Q.next_out))}if(m()){var R=k(w,this,S,null);e(R);return}}}O.prototype.push=function(U,V){var S=this.strm;var W=this.options.chunkSize;var R,T,Q;if(this.ended){return false}T=(V===~~V)?V:((V===true)?P:H);if(typeof U===\"string\"){S.input=x.string2buf(U)}else{if(I.call(U)===\"[object ArrayBuffer]\"){S.input=new Uint8Array(U)}else{S.input=U}}S.next_in=0;S.avail_in=S.input.length;do{if(S.avail_out===0){S.output=new M.Buf8(W);S.next_out=0;S.avail_out=W}R=G.deflate(S,T);if(R!==D&&R!==y){this.onEnd(R);this.ended=true;return false}if(S.avail_out===0|0|(S.avail_in===0&&T===P)){if(this.options.to===\"string\"){Q=K(M.shrinkBuf(S.output,S.next_out));this.onData(Q)}else{this.onData(M.shrinkBuf(S.output,S.next_out))}}}while((S.avail_in>0||S.avail_out===0)&&R!==D);if(T===P){R=G.deflateEnd(this.strm);this.onEnd(R);this.ended=true;return R===y}return true};O.prototype.onData=function(Q){this.chunks.push(Q)};O.prototype.onEnd=function(Q){if(Q===y){if(this.options.to===\"string\"){this.result=this.chunks.join(\"\")}else{this.result=M.flattenChunks(this.chunks)}}this.chunks=[];this.err=Q;this.msg=this.strm.msg};function C(Q,R){var S;if(!R.level){R.level=u}S=new O(R);(!R.async&&R.useDefer)?S.pushSingleChunk(Q,true):S.push(Q,true);if(S.err){throw S.msg}return S.result}function J(Q,R){R=R||{};R.raw=true;return C(Q,R)}N.Deflate=O;N.deflate=C;N.deflateRaw=J},{\"./utils/common\":3,\"./utils/strings\":4,\"./zlib/deflate.js\":8,\"./zlib/messages\":13,\"./zlib/zstream\":15}],2:[function(t,u,s){},{\"./utils/common\":3,\"./utils/strings\":4,\"./zlib/constants\":6,\"./zlib/gzheader\":9,\"./zlib/inflate.js\":11,\"./zlib/messages\":13,\"./zlib/zstream\":15}],3:[function(t,u,s){var x=(typeof Uint8Array!==\"undefined\")&&(typeof Uint16Array!==\"undefined\")&&(typeof Int32Array!==\"undefined\");s.assign=function(B){var y=Array.prototype.slice.call(arguments,1);while(y.length){var z=y.shift();if(!z){continue}if(typeof(z)!==\"object\"){throw new TypeError(z+\"must be non-object\")}for(var A in z){if(z.hasOwnProperty(A)){B[A]=z[A]}}}return B};s.shrinkBuf=function(y,z){if(y.length===z){return y}if(y.subarray){return y.subarray(0,z)}y.length=z;return y};var v={arraySet:function(z,B,D,y,C){if(B.subarray&&z.subarray){z.set(B.subarray(D,D+y),C);return}for(var A=0;A<y;A++){z[C+A]=B[D+A]}},flattenChunks:function(E){var C,A,z,D,B,y;z=0;for(C=0,A=E.length;C<A;C++){z+=E[C].length}y=new Uint8Array(z);D=0;for(C=0,A=E.length;C<A;C++){B=E[C];y.set(B,D);D+=B.length}return y}};var w={arraySet:function(z,B,D,y,C){for(var A=0;A<y;A++){z[C+A]=B[D+A]}},flattenChunks:function(y){return[].concat.apply([],y)}};s.setTyped=function(y){if(y&&(n.useBinary||window.btoa)){s.Buf8=Uint8Array;s.Buf16=Uint16Array;s.Buf32=Int32Array;s.assign(s,v)}else{s.Buf8=Array;s.Buf16=Array;s.Buf32=Array;s.assign(s,w)}};s.setTyped(x)},{}],4:[function(u,s,v){var B=u(\"./common\");var z=true;var x=true;try{String.fromCharCode.apply(null,[0])}catch(A){z=false}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(A){x=false}var t=new B.Buf8(256);for(var w=0;w<256;w++){t[w]=(w>=252?6:w>=248?5:w>=240?4:w>=224?3:w>=192?2:1)}t[254]=t[254]=1;v.string2buf=function(I){var C,J,E,F,D,H=I.length,G=0;for(F=0;F<H;F++){J=I.charCodeAt(F);if((J&64512)===55296&&(F+1<H)){E=I.charCodeAt(F+1);if((E&64512)===56320){J=65536+((J-55296)<<10)+(E-56320);F++}}G+=J<128?1:J<2048?2:J<65536?3:4}C=new B.Buf8(G);for(D=0,F=0;D<G;F++){J=I.charCodeAt(F);if((J&64512)===55296&&(F+1<H)){E=I.charCodeAt(F+1);if((E&64512)===56320){J=65536+((J-55296)<<10)+(E-56320);F++}}if(J<128){C[D++]=J}else{if(J<2048){C[D++]=192|(J>>>6);C[D++]=128|(J&63)}else{if(J<65536){C[D++]=224|(J>>>12);C[D++]=128|(J>>>6&63);C[D++]=128|(J&63)}else{C[D++]=240|(J>>>18);C[D++]=128|(J>>>12&63);C[D++]=128|(J>>>6&63);C[D++]=128|(J&63)}}}}return C};function y(E,D){if(D<65537){if((E.subarray&&x)||(!E.subarray&&z)){return String.fromCharCode.apply(null,B.shrinkBuf(E,D))}}var C=\"\";for(var F=0;F<D;F++){C+=String.fromCharCode(E[F])}return C}v.buf2binstring=function(C){return y(C,C.length)};v.binstring2buf=function(F){var D=new B.Buf8(F.length);for(var E=0,C=D.length;E<C;E++){D[E]=F.charCodeAt(E)}return D};v.buf2string=function(H,E){var I,G,J,F;var D=E||H.length;var C=new Array(D*2);for(G=0,I=0;I<D;){J=H[I++];if(J<128){C[G++]=J;continue}F=t[J];if(F>4){C[G++]=65533;I+=F-1;continue}J&=F===2?31:F===3?15:7;while(F>1&&I<D){J=(J<<6)|(H[I++]&63);F--}if(F>1){C[G++]=65533;continue}if(J<65536){C[G++]=J}else{J-=65536;C[G++]=55296|((J>>10)&1023);C[G++]=56320|(J&1023)}}return y(C,G)};v.utf8border=function(D,C){var E;C=C||D.length;if(C>D.length){C=D.length}E=C-1;while(E>=0&&(D[E]&192)===128){E--}if(E<0){return C}if(E===0){return C}return(E+t[D[E]]>C)?E:C}},{\"./common\":3}],5:[function(t,u,s){},{}],6:[function(t,u,s){u.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],7:[function(t,u,s){},{}],8:[function(aI,aW,ac){var aj=aI(\"../utils/common\");var aU=aI(\"./trees\");var ab=aI(\"./adler32\");var aq=aI(\"./crc32\");var W=aI(\"./messages\");var ae=0;var ap=1;var aM=3;var C=4;var ak=5;var I=0;var N=1;var aJ=-2;var M=-3;var w=-5;var y=-1;var af=1;var U=2;var Q=3;var J=4;var aN=0;var aa=2;var ao=8;var aO=9;var ah=15;var E=8;var aE=29;var aS=256;var aV=aS+1+aE;var T=30;var az=19;var aG=2*aV+1;var ai=15;var Y=3;var aK=258;var u=(aK+Y+1);var A=32;var am=42;var G=69;var ar=73;var aF=91;var H=103;var aZ=113;var S=666;var aH=1;var K=2;var al=3;var v=4;var aL=3;function aA(a0,a1){a0.msg=W[a1];return a1}function ag(a0){return((a0)<<1)-((a0)>4?9:0)}function aR(a1){var a0=a1.length;while(--a0>=0){a1[a0]=0}}function x(a1){var a2=a1.state;var a0=a2.pending;if(a0>a1.avail_out){a0=a1.avail_out}if(a0===0){return}aj.arraySet(a1.output,a2.pending_buf,a2.pending_out,a0,a1.next_out);a1.next_out+=a0;a2.pending_out+=a0;a1.total_out+=a0;a1.avail_out-=a0;a2.pending-=a0;if(a2.pending===0){a2.pending_out=0}}function B(a0,a1){aU._tr_flush_block(a0,(a0.block_start>=0?a0.block_start:-1),a0.strstart-a0.block_start,a1);a0.block_start=a0.strstart;x(a0.strm)}function t(a1,a0){a1.pending_buf[a1.pending++]=a0}function R(a1,a0){a1.pending_buf[a1.pending++]=(a0>>>8)&255;a1.pending_buf[a1.pending++]=a0&255}function V(a1,a2,a4,a3){var a0=a1.avail_in;if(a0>a3){a0=a3}if(a0===0){return 0}a1.avail_in-=a0;aj.arraySet(a2,a1.input,a1.next_in,a0,a4);if(a1.state.wrap===1){a1.adler=ab(a1.adler,a2,a0,a4)}else{if(a1.state.wrap===2){a1.adler=aq(a1.adler,a2,a0,a4)}}a1.next_in+=a0;a1.total_in+=a0;return a0}function aQ(bd,a4){var a7=bd.max_chain_length;var be=bd.strstart;var a5;var a6;var a0=bd.prev_length;var a1=bd.nice_match;var a3=(bd.strstart>(bd.w_size-u))?bd.strstart-(bd.w_size-u):0;var bb=bd.window;var a8=bd.w_mask;var a2=bd.prev;var ba=bd.strstart+aK;var bc=bb[be+a0-1];var a9=bb[be+a0];if(bd.prev_length>=bd.good_match){a7>>=2}if(a1>bd.lookahead){a1=bd.lookahead}do{a5=a4;if(bb[a5+a0]!==a9||bb[a5+a0-1]!==bc||bb[a5]!==bb[be]||bb[++a5]!==bb[be+1]){continue}be+=2;a5++;do{}while(bb[++be]===bb[++a5]&&bb[++be]===bb[++a5]&&bb[++be]===bb[++a5]&&bb[++be]===bb[++a5]&&bb[++be]===bb[++a5]&&bb[++be]===bb[++a5]&&bb[++be]===bb[++a5]&&bb[++be]===bb[++a5]&&be<ba);a6=aK-(ba-be);be=ba-aK;if(a6>a0){bd.match_start=a4;a0=a6;if(a6>=a1){break}bc=bb[be+a0-1];a9=bb[be+a0]}}while((a4=a2[a4&a8])>a3&&--a7!==0);if(a0<=bd.lookahead){return a0}return bd.lookahead}function aD(a2){var a6=a2.w_size;var a3,a5,a0,a1,a4;do{a1=a2.window_size-a2.lookahead-a2.strstart;if(a2.strstart>=a6+(a6-u)){aj.arraySet(a2.window,a2.window,a6,a6,0);a2.match_start-=a6;a2.strstart-=a6;a2.block_start-=a6;a5=a2.hash_size;a3=a5;do{a0=a2.head[--a3];a2.head[a3]=(a0>=a6?a0-a6:0)}while(--a5);a5=a6;a3=a5;do{a0=a2.prev[--a3];a2.prev[a3]=(a0>=a6?a0-a6:0)}while(--a5);a1+=a6}if(a2.strm.avail_in===0){break}a5=V(a2.strm,a2.window,a2.strstart+a2.lookahead,a1);a2.lookahead+=a5;if(a2.lookahead+a2.insert>=Y){a4=a2.strstart-a2.insert;a2.ins_h=a2.window[a4];a2.ins_h=((a2.ins_h<<a2.hash_shift)^a2.window[a4+1])&a2.hash_mask;while(a2.insert){a2.ins_h=((a2.ins_h<<a2.hash_shift)^a2.window[a4+Y-1])&a2.hash_mask;a2.prev[a4&a2.w_mask]=a2.head[a2.ins_h];a2.head[a2.ins_h]=a4;a4++;a2.insert--;if(a2.lookahead+a2.insert<Y){break}}}}while(a2.lookahead<u&&a2.strm.avail_in!==0)}function ad(a3,a0){var a2=65535;if(a2>a3.pending_buf_size-5){a2=a3.pending_buf_size-5}for(;;){if(a3.lookahead<=1){aD(a3);if(a3.lookahead===0&&a0===ae){return aH}if(a3.lookahead===0){break}}a3.strstart+=a3.lookahead;a3.lookahead=0;var a1=a3.block_start+a2;if(a3.strstart===0||a3.strstart>=a1){a3.lookahead=a3.strstart-a1;a3.strstart=a1;B(a3,false);if(a3.strm.avail_out===0){return aH}}if(a3.strstart-a3.block_start>=(a3.w_size-u)){B(a3,false);if(a3.strm.avail_out===0){return aH}}}a3.insert=0;if(a0===C){B(a3,true);if(a3.strm.avail_out===0){return al}return v}if(a3.strstart>a3.block_start){B(a3,false);if(a3.strm.avail_out===0){return aH}}return aH}function D(a2,a0){var a3;var a1;for(;;){if(a2.lookahead<u){aD(a2);if(a2.lookahead<u&&a0===ae){return aH}if(a2.lookahead===0){break}}a3=0;if(a2.lookahead>=Y){a2.ins_h=((a2.ins_h<<a2.hash_shift)^a2.window[a2.strstart+Y-1])&a2.hash_mask;a3=a2.prev[a2.strstart&a2.w_mask]=a2.head[a2.ins_h];a2.head[a2.ins_h]=a2.strstart}if(a3!==0&&((a2.strstart-a3)<=(a2.w_size-u))){a2.match_length=aQ(a2,a3)}if(a2.match_length>=Y){a1=aU._tr_tally(a2,a2.strstart-a2.match_start,a2.match_length-Y);a2.lookahead-=a2.match_length;if(a2.match_length<=a2.max_lazy_match&&a2.lookahead>=Y){a2.match_length--;do{a2.strstart++;a2.ins_h=((a2.ins_h<<a2.hash_shift)^a2.window[a2.strstart+Y-1])&a2.hash_mask;a3=a2.prev[a2.strstart&a2.w_mask]=a2.head[a2.ins_h];a2.head[a2.ins_h]=a2.strstart}while(--a2.match_length!==0);a2.strstart++}else{a2.strstart+=a2.match_length;a2.match_length=0;a2.ins_h=a2.window[a2.strstart];a2.ins_h=((a2.ins_h<<a2.hash_shift)^a2.window[a2.strstart+1])&a2.hash_mask}}else{a1=aU._tr_tally(a2,0,a2.window[a2.strstart]);a2.lookahead--;a2.strstart++}if(a1){B(a2,false);if(a2.strm.avail_out===0){return aH}}}a2.insert=((a2.strstart<(Y-1))?a2.strstart:Y-1);if(a0===C){B(a2,true);if(a2.strm.avail_out===0){return al}return v}if(a2.last_lit){B(a2,false);if(a2.strm.avail_out===0){return aH}}return K}function aB(a3,a1){var a4;var a2;var a0;for(;;){if(a3.lookahead<u){aD(a3);if(a3.lookahead<u&&a1===ae){return aH}if(a3.lookahead===0){break}}a4=0;if(a3.lookahead>=Y){a3.ins_h=((a3.ins_h<<a3.hash_shift)^a3.window[a3.strstart+Y-1])&a3.hash_mask;a4=a3.prev[a3.strstart&a3.w_mask]=a3.head[a3.ins_h];a3.head[a3.ins_h]=a3.strstart}a3.prev_length=a3.match_length;a3.prev_match=a3.match_start;a3.match_length=Y-1;if(a4!==0&&a3.prev_length<a3.max_lazy_match&&a3.strstart-a4<=(a3.w_size-u)){a3.match_length=aQ(a3,a4);if(a3.match_length<=5&&(a3.strategy===af||(a3.match_length===Y&&a3.strstart-a3.match_start>4096))){a3.match_length=Y-1}}if(a3.prev_length>=Y&&a3.match_length<=a3.prev_length){a0=a3.strstart+a3.lookahead-Y;a2=aU._tr_tally(a3,a3.strstart-1-a3.prev_match,a3.prev_length-Y);a3.lookahead-=a3.prev_length-1;a3.prev_length-=2;do{if(++a3.strstart<=a0){a3.ins_h=((a3.ins_h<<a3.hash_shift)^a3.window[a3.strstart+Y-1])&a3.hash_mask;a4=a3.prev[a3.strstart&a3.w_mask]=a3.head[a3.ins_h];a3.head[a3.ins_h]=a3.strstart}}while(--a3.prev_length!==0);a3.match_available=0;a3.match_length=Y-1;a3.strstart++;if(a2){B(a3,false);if(a3.strm.avail_out===0){return aH}}}else{if(a3.match_available){a2=aU._tr_tally(a3,0,a3.window[a3.strstart-1]);if(a2){B(a3,false)}a3.strstart++;a3.lookahead--;if(a3.strm.avail_out===0){return aH}}else{a3.match_available=1;a3.strstart++;a3.lookahead--}}}if(a3.match_available){a2=aU._tr_tally(a3,0,a3.window[a3.strstart-1]);a3.match_available=0}a3.insert=a3.strstart<Y-1?a3.strstart:Y-1;if(a1===C){B(a3,true);if(a3.strm.avail_out===0){return al}return v}if(a3.last_lit){B(a3,false);if(a3.strm.avail_out===0){return aH}}return K}function ax(a4,a1){var a3;var a5;var a2,a0;var a6=a4.window;for(;;){if(a4.lookahead<=aK){aD(a4);if(a4.lookahead<=aK&&a1===ae){return aH}if(a4.lookahead===0){break}}a4.match_length=0;if(a4.lookahead>=Y&&a4.strstart>0){a2=a4.strstart-1;a5=a6[a2];if(a5===a6[++a2]&&a5===a6[++a2]&&a5===a6[++a2]){a0=a4.strstart+aK;do{}while(a5===a6[++a2]&&a5===a6[++a2]&&a5===a6[++a2]&&a5===a6[++a2]&&a5===a6[++a2]&&a5===a6[++a2]&&a5===a6[++a2]&&a5===a6[++a2]&&a2<a0);a4.match_length=aK-(a0-a2);if(a4.match_length>a4.lookahead){a4.match_length=a4.lookahead}}}if(a4.match_length>=Y){a3=aU._tr_tally(a4,1,a4.match_length-Y);a4.lookahead-=a4.match_length;a4.strstart+=a4.match_length;a4.match_length=0}else{a3=aU._tr_tally(a4,0,a4.window[a4.strstart]);a4.lookahead--;a4.strstart++}if(a3){B(a4,false);if(a4.strm.avail_out===0){return aH}}}a4.insert=0;if(a1===C){B(a4,true);if(a4.strm.avail_out===0){return al}return v}if(a4.last_lit){B(a4,false);if(a4.strm.avail_out===0){return aH}}return K}function ay(a2,a0){var a1;for(;;){if(a2.lookahead===0){aD(a2);if(a2.lookahead===0){if(a0===ae){return aH}break}}a2.match_length=0;a1=aU._tr_tally(a2,0,a2.window[a2.strstart]);a2.lookahead--;a2.strstart++;if(a1){B(a2,false);if(a2.strm.avail_out===0){return aH}}}a2.insert=0;if(a0===C){B(a2,true);if(a2.strm.avail_out===0){return al}return v}if(a2.last_lit){B(a2,false);if(a2.strm.avail_out===0){return aH}}return K}var av=function(a0,a4,a1,a3,a2){this.good_length=a0;this.max_lazy=a4;this.nice_length=a1;this.max_chain=a3;this.func=a2};var au;au=[new av(0,0,0,0,ad),new av(4,4,8,4,D),new av(4,5,16,8,D),new av(4,6,32,32,D),new av(4,4,16,16,aB),new av(8,16,32,32,aB),new av(8,16,128,128,aB),new av(8,32,128,256,aB),new av(32,128,258,1024,aB),new av(32,258,258,4096,aB)];function Z(a0){a0.window_size=2*a0.w_size;aR(a0.head);a0.max_lazy_match=au[a0.level].max_lazy;a0.good_match=au[a0.level].good_length;a0.nice_match=au[a0.level].nice_length;a0.max_chain_length=au[a0.level].max_chain;a0.strstart=0;a0.block_start=0;a0.lookahead=0;a0.insert=0;a0.match_length=a0.prev_length=Y-1;a0.match_available=0;a0.ins_h=0}function s(){this.strm=null;this.status=0;this.pending_buf=null;this.pending_buf_size=0;this.pending_out=0;this.pending=0;this.wrap=0;this.gzhead=null;this.gzindex=0;this.method=ao;this.last_flush=-1;this.w_size=0;this.w_bits=0;this.w_mask=0;this.window=null;this.window_size=0;this.prev=null;this.head=null;this.ins_h=0;this.hash_size=0;this.hash_bits=0;this.hash_mask=0;this.hash_shift=0;this.block_start=0;this.match_length=0;this.prev_match=0;this.match_available=0;this.strstart=0;this.match_start=0;this.lookahead=0;this.prev_length=0;this.max_chain_length=0;this.max_lazy_match=0;this.level=0;this.strategy=0;this.good_match=0;this.nice_match=0;this.dyn_ltree=new aj.Buf16(aG*2);this.dyn_dtree=new aj.Buf16((2*T+1)*2);this.bl_tree=new aj.Buf16((2*az+1)*2);aR(this.dyn_ltree);aR(this.dyn_dtree);aR(this.bl_tree);this.l_desc=null;this.d_desc=null;this.bl_desc=null;this.bl_count=new aj.Buf16(ai+1);this.heap=new aj.Buf16(2*aV+1);aR(this.heap);this.heap_len=0;this.heap_max=0;this.depth=new aj.Buf16(2*aV+1);aR(this.depth);this.l_buf=0;this.lit_bufsize=0;this.last_lit=0;this.d_buf=0;this.opt_len=0;this.static_len=0;this.matches=0;this.insert=0;this.bi_buf=0;this.bi_valid=0}function aC(a0){var a1;if(!a0||!a0.state){return aA(a0,aJ)}a0.total_in=a0.total_out=0;a0.data_type=aa;a1=a0.state;a1.pending=0;a1.pending_out=0;if(a1.wrap<0){a1.wrap=-a1.wrap}a1.status=(a1.wrap?am:aZ);a0.adler=(a1.wrap===2)?0:1;a1.last_flush=ae;aU._tr_init(a1);return I}function O(a0){var a1=aC(a0);if(a1===I){Z(a0.state)}return a1}function aY(a0,a1){if(!a0||!a0.state){return aJ}if(a0.state.wrap!==2){return aJ}a0.state.gzhead=a1;return I}function X(a0,a7,a6,a3,a5,a4){if(!a0){return aJ}var a2=1;if(a7===y){a7=6}if(a3<0){a2=0;a3=-a3}else{if(a3>15){a2=2;a3-=16}}if(a5<1||a5>aO||a6!==ao||a3<8||a3>15||a7<0||a7>9||a4<0||a4>J){return aA(a0,aJ)}if(a3===8){a3=9}var a1=new s();a0.state=a1;a1.strm=a0;a1.wrap=a2;a1.gzhead=null;a1.w_bits=a3;a1.w_size=1<<a1.w_bits;a1.w_mask=a1.w_size-1;a1.hash_bits=a5+7;a1.hash_size=1<<a1.hash_bits;a1.hash_mask=a1.hash_size-1;a1.hash_shift=~~((a1.hash_bits+Y-1)/Y);a1.window=new aj.Buf8(a1.w_size*2);a1.head=new aj.Buf16(a1.hash_size);a1.prev=new aj.Buf16(a1.w_size);a1.lit_bufsize=1<<(a5+6);a1.pending_buf_size=a1.lit_bufsize*4;a1.pending_buf=new aj.Buf8(a1.pending_buf_size);a1.d_buf=a1.lit_bufsize>>1;a1.l_buf=(1+2)*a1.lit_bufsize;a1.level=a7;a1.strategy=a4;a1.method=a6;return O(a0)}function an(a0,a1){return X(a0,a1,ao,ah,E,aN)}function F(a5,a6,a7){var a4,a8,a3,a0;var a2,a1;g();if(!a5||!a5.state||a6>ak||a6<0){return a5?aA(a5,aJ):aJ}a8=a5.state;if(!a5.output||(!a5.input&&a5.avail_in!==0)||(a8.status===S&&a6!==C)){return aA(a5,(a5.avail_out===0)?w:aJ)}a8.strm=a5;a4=a8.last_flush;a8.last_flush=a6;if(a8.status===am){P(a8)}if(m()){return\"defer\"}if(a8.status===G){aT(a8,a5)}if(m()){return\"defer\"}if(a8.status===ar){z(a8,a5)}if(m()){return\"defer\"}if(a8.status===aF){at(a8,a5)}if(m()){return\"defer\"}if(a8.status===H){aX(a8,a5)}if(m()){return\"defer\"}if(!a8.flushedPending){a0=aw(a8,a5,a6);if(typeof a0!==\"undefined\"){a8.flushedPending=null;return a0}}if(a6!==C){return I}if(a8.wrap<=0){return N}if(m()){return\"defer\"}a8.flushedPending=null;L(a8);x(a8,a5);if(a8.wrap>0){a8.wrap=-a8.wrap}return a8.pending!==0?I:N}function P(a1,a0){if(a1.wrap===2){a0.adler=0;t(a1,31);t(a1,139);t(a1,8);if(!a1.gzhead){t(a1,0);t(a1,0);t(a1,0);t(a1,0);t(a1,0);t(a1,a1.level===9?2:(a1.strategy>=U||a1.level<2?4:0));t(a1,aL);a1.status=aZ}else{t(a1,(a1.gzhead.text?1:0)+(a1.gzhead.hcrc?2:0)+(!a1.gzhead.extra?0:4)+(!a1.gzhead.name?0:8)+(!a1.gzhead.comment?0:16));t(a1,a1.gzhead.time&255);t(a1,(a1.gzhead.time>>8)&255);t(a1,(a1.gzhead.time>>16)&255);t(a1,(a1.gzhead.time>>24)&255);t(a1,a1.level===9?2:(a1.strategy>=U||a1.level<2?4:0));t(a1,a1.gzhead.os&255);if(a1.gzhead.extra&&a1.gzhead.extra.length){t(a1,a1.gzhead.extra.length&255);t(a1,(a1.gzhead.extra.length>>8)&255)}if(a1.gzhead.hcrc){a0.adler=aq(a0.adler,a1.pending_buf,a1.pending,0)}a1.gzindex=0;a1.status=G}}else{var a3=(ao+((a1.w_bits-8)<<4))<<8;var a2=-1;if(a1.strategy>=U||a1.level<2){a2=0}else{if(a1.level<6){a2=1}else{if(a1.level===6){a2=2}else{a2=3}}}a3|=(a2<<6);if(a1.strstart!==0){a3|=A}a3+=31-(a3%31);a1.status=aZ;R(a1,a3);if(a1.strstart!==0){R(a1,a0.adler>>>16);R(a1,a0.adler&65535)}a0.adler=1}}function aT(a1,a0){if(a1.gzhead.extra){beg=a1.pending;while(a1.gzindex<(a1.gzhead.extra.length&65535)){if(a1.pending===a1.pending_buf_size){if(a1.gzhead.hcrc&&a1.pending>beg){a0.adler=aq(a0.adler,a1.pending_buf,a1.pending-beg,beg)}x(a0);beg=a1.pending;if(a1.pending===a1.pending_buf_size){break}}t(a1,a1.gzhead.extra[a1.gzindex]&255);a1.gzindex++}if(a1.gzhead.hcrc&&a1.pending>beg){a0.adler=aq(a0.adler,a1.pending_buf,a1.pending-beg,beg)}if(a1.gzindex===a1.gzhead.extra.length){a1.gzindex=0;a1.status=ar}}else{a1.status=ar}}function z(a1,a0){if(a1.gzhead.name){beg=a1.pending;do{if(a1.pending===a1.pending_buf_size){if(a1.gzhead.hcrc&&a1.pending>beg){a0.adler=aq(a0.adler,a1.pending_buf,a1.pending-beg,beg)}x(a0);beg=a1.pending;if(a1.pending===a1.pending_buf_size){val=1;break}}if(a1.gzindex<a1.gzhead.name.length){val=a1.gzhead.name.charCodeAt(a1.gzindex++)&255}else{val=0}t(a1,val)}while(val!==0);if(a1.gzhead.hcrc&&a1.pending>beg){a0.adler=aq(a0.adler,a1.pending_buf,a1.pending-beg,beg)}if(val===0){a1.gzindex=0;a1.status=aF}}else{a1.status=aF}}function at(a1,a0){if(a1.gzhead.comment){beg=a1.pending;do{if(a1.pending===a1.pending_buf_size){if(a1.gzhead.hcrc&&a1.pending>beg){a0.adler=aq(a0.adler,a1.pending_buf,a1.pending-beg,beg)}x(a0);beg=a1.pending;if(a1.pending===a1.pending_buf_size){val=1;break}}if(a1.gzindex<a1.gzhead.comment.length){val=a1.gzhead.comment.charCodeAt(a1.gzindex++)&255}else{val=0}t(a1,val)}while(val!==0);if(a1.gzhead.hcrc&&a1.pending>beg){a0.adler=aq(a0.adler,a1.pending_buf,a1.pending-beg,beg)}if(val===0){a1.status=H}}else{a1.status=H}}function aX(a1,a0){if(a1.gzhead.hcrc){if(a1.pending+2>a1.pending_buf_size){x(a0)}if(a1.pending+2<=a1.pending_buf_size){t(a1,a0.adler&255);t(a1,(a0.adler>>8)&255);a0.adler=0;a1.status=aZ}}else{a1.status=aZ}}function aw(a2,a1,a0){var a3=a2.last_flush;a2.flushedPending=true;if(a2.pending!==0){x(a1);if(a1.avail_out===0){a2.last_flush=-1;return I}}else{if(a1.avail_in===0&&ag(a0)<=ag(a3)&&a0!==C){return aA(a1,w)}}if(a2.status===S&&a1.avail_in!==0){return aA(a1,w)}if(a1.avail_in!==0||a2.lookahead!==0||(a0!==ae&&a2.status!==S)){var a4=(a2.strategy===U)?ay(a2,a0):(a2.strategy===Q?ax(a2,a0):au[a2.level].func(a2,a0));if(a4===al||a4===v){a2.status=S}if(a4===aH||a4===al){if(a1.avail_out===0){a2.last_flush=-1}return I}if(a4===K){if(a0===ap){aU._tr_align(a2)}else{if(a0!==ak){aU._tr_stored_block(a2,0,0,false);if(a0===aM){aR(a2.head);if(a2.lookahead===0){a2.strstart=0;a2.block_start=0;a2.insert=0}}}}x(a1);if(a1.avail_out===0){a2.last_flush=-1;return I}}}}function L(a1,a0){if(a1.wrap===2){t(a1,a0.adler&255);t(a1,(a0.adler>>8)&255);t(a1,(a0.adler>>16)&255);t(a1,(a0.adler>>24)&255);t(a1,a0.total_in&255);t(a1,(a0.total_in>>8)&255);t(a1,(a0.total_in>>16)&255);t(a1,(a0.total_in>>24)&255)}else{R(a1,a0.adler>>>16);R(a1,a0.adler&65535)}}function aP(a1){var a0;if(!a1||!a1.state){return aJ}a0=a1.state.status;if(a0!==am&&a0!==G&&a0!==ar&&a0!==aF&&a0!==H&&a0!==aZ&&a0!==S){return aA(a1,aJ)}a1.state=null;return a0===aZ?aA(a1,M):I}ac.deflateInit=an;ac.deflateInit2=X;ac.deflateReset=O;ac.deflateResetKeep=aC;ac.deflateSetHeader=aY;ac.deflate=F;ac.deflateEnd=aP;ac.deflateInfo=\"pako deflate (from Nodeca project)\"},{\"../utils/common\":3,\"./adler32\":5,\"./crc32\":7,\"./messages\":13,\"./trees\":14}],9:[function(t,u,s){function v(){this.text=0;this.time=0;this.xflags=0;this.os=0;this.extra=null;this.extra_len=0;this.name=\"\";this.comment=\"\";this.hcrc=0;this.done=false}u.exports=v},{}],10:[function(t,u,s){},{}],11:[function(t,u,s){},{\"../utils/common\":3,\"./adler32\":5,\"./crc32\":7,\"./inffast\":10,\"./inftrees\":12}],12:[function(v,t,w){var E=v(\"../utils/common\");var D=15;var A=852;var z=592;var C=0;var y=1;var u=2;var B=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0];var F=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78];var x=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0];var s=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]},{\"../utils/common\":3}],13:[function(t,u,s){},{}],14:[function(A,y,aA){var aK=A(\"../utils/common\");var ah=4;var I=0;var S=1;var T=2;function s(aM){var aL=aM.length;while(--aL>=0){aM[aL]=0}}var al=0;var aC=1;var aa=2;var aJ=3;var U=258;var F=29;var v=256;var w=v+1+F;var t=30;var L=19;var x=2*w+1;var aG=15;var O=16;var av=7;var u=256;var X=16;var W=17;var ab=18;var z=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0];var M=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];var R=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7];var ai=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];var aj=512;var ad=new Array((w+2)*2);s(ad);var ap=new Array(t*2);s(ap);var aw=new Array(aj);s(aw);var P=new Array(U-aJ+1);s(P);var ac=new Array(F);s(ac);var aF=new Array(t);s(aF);var at=function(aO,aN,aM,aL,aP){this.static_tree=aO;this.extra_bits=aN;this.extra_base=aM;this.elems=aL;this.max_length=aP;this.has_stree=aO&&aO.length};var ay;var ao;var N;var aI=function(aM,aL){this.dyn_tree=aM;this.max_code=0;this.stat_desc=aL};function aq(aL){return aL<256?aw[aL]:aw[256+(aL>>>7)]}function D(aM,aL){aM.pending_buf[aM.pending++]=(aL)&255;aM.pending_buf[aM.pending++]=(aL>>>8)&255}function ax(aL,aN,aM){if(aL.bi_valid>(O-aM)){aL.bi_buf|=(aN<<aL.bi_valid)&65535;D(aL,aL.bi_buf);aL.bi_buf=aN>>(O-aL.bi_valid);aL.bi_valid+=aM-O}else{aL.bi_buf|=(aN<<aL.bi_valid)&65535;aL.bi_valid+=aM}}function aB(aM,aN,aL){ax(aM,aL[aN*2],aL[aN*2+1])}function Q(aN,aL){var aM=0;do{aM|=aN&1;aN>>>=1;aM<<=1}while(--aL>0);return aM>>>1}function K(aL){if(aL.bi_valid===16){D(aL,aL.bi_buf);aL.bi_buf=0;aL.bi_valid=0}else{if(aL.bi_valid>=8){aL.pending_buf[aL.pending++]=aL.bi_buf&255;aL.bi_buf>>=8;aL.bi_valid-=8}}}function C(aZ,aU){var a0=aU.dyn_tree;var aV=aU.max_code;var aY=aU.stat_desc.static_tree;var aN=aU.stat_desc.has_stree;var aP=aU.stat_desc.extra_bits;var aL=aU.stat_desc.extra_base;var aX=aU.stat_desc.max_length;var aS;var aM,aO;var aW;var aR;var aT;var aQ=0;for(aW=0;aW<=aG;aW++){aZ.bl_count[aW]=0}a0[aZ.heap[aZ.heap_max]*2+1]=0;for(aS=aZ.heap_max+1;aS<x;aS++){aM=aZ.heap[aS];aW=a0[a0[aM*2+1]*2+1]+1;if(aW>aX){aW=aX;aQ++}a0[aM*2+1]=aW;if(aM>aV){continue}aZ.bl_count[aW]++;aR=0;if(aM>=aL){aR=aP[aM-aL]}aT=a0[aM*2];aZ.opt_len+=aT*(aW+aR);if(aN){aZ.static_len+=aT*(aY[aM*2+1]+aR)}}if(aQ===0){return}do{aW=aX-1;while(aZ.bl_count[aW]===0){aW--}aZ.bl_count[aW]--;aZ.bl_count[aW+1]+=2;aZ.bl_count[aX]--;aQ-=2}while(aQ>0);for(aW=aX;aW!==0;aW--){aM=aZ.bl_count[aW];while(aM!==0){aO=aZ.heap[--aS];if(aO>aV){continue}if(a0[aO*2+1]!==aW){aZ.opt_len+=(aW-a0[aO*2+1])*a0[aO*2];a0[aO*2+1]=aW}aM--}}}function az(aM,aS,aN){var aP=new Array(aG+1);var aO=0;var aQ;var aR;for(aQ=1;aQ<=aG;aQ++){aP[aQ]=aO=(aO+aN[aQ-1])<<1}for(aR=0;aR<=aS;aR++){var aL=aM[aR*2+1];if(aL===0){continue}aM[aR*2]=Q(aP[aL]++,aL)}}function ak(){var aQ;var aO;var aN;var aM;var aP;var aL=new Array(aG+1);aN=0;for(aM=0;aM<F-1;aM++){ac[aM]=aN;for(aQ=0;aQ<(1<<z[aM]);aQ++){P[aN++]=aM}}P[aN-1]=aM;aP=0;for(aM=0;aM<16;aM++){aF[aM]=aP;for(aQ=0;aQ<(1<<M[aM]);aQ++){aw[aP++]=aM}}aP>>=7;for(;aM<t;aM++){aF[aM]=aP<<7;for(aQ=0;aQ<(1<<(M[aM]-7));aQ++){aw[256+aP++]=aM}}for(aO=0;aO<=aG;aO++){aL[aO]=0}aQ=0;while(aQ<=143){ad[aQ*2+1]=8;aQ++;aL[8]++}while(aQ<=255){ad[aQ*2+1]=9;aQ++;aL[9]++}while(aQ<=279){ad[aQ*2+1]=7;aQ++;aL[7]++}while(aQ<=287){ad[aQ*2+1]=8;aQ++;aL[8]++}az(ad,w+1,aL);for(aQ=0;aQ<t;aQ++){ap[aQ*2+1]=5;ap[aQ*2]=Q(aQ,5)}ay=new at(ad,z,v+1,w,aG);ao=new at(ap,M,0,t,aG);N=new at(new Array(0),R,0,L,av)}function Z(aL){var aM;for(aM=0;aM<w;aM++){aL.dyn_ltree[aM*2]=0}for(aM=0;aM<t;aM++){aL.dyn_dtree[aM*2]=0}for(aM=0;aM<L;aM++){aL.bl_tree[aM*2]=0}aL.dyn_ltree[u*2]=1;aL.opt_len=aL.static_len=0;aL.last_lit=aL.matches=0}function B(aL){if(aL.bi_valid>8){D(aL,aL.bi_buf)}else{if(aL.bi_valid>0){aL.pending_buf[aL.pending++]=aL.bi_buf}}aL.bi_buf=0;aL.bi_valid=0}function H(aN,aM,aL,aO){B(aN);if(aO){D(aN,aL);D(aN,~aL)}aK.arraySet(aN.pending_buf,aN.window,aM,aL,aN.pending);aN.pending+=aL}function an(aM,aQ,aL,aP){var aO=aQ*2;var aN=aL*2;return(aM[aO]<aM[aN]||(aM[aO]===aM[aN]&&aP[aQ]<=aP[aL]))}function aH(aP,aL,aN){var aM=aP.heap[aN];var aO=aN<<1;while(aO<=aP.heap_len){if(aO<aP.heap_len&&an(aL,aP.heap[aO+1],aP.heap[aO],aP.depth)){aO++}if(an(aL,aM,aP.heap[aO],aP.depth)){break}aP.heap[aN]=aP.heap[aO];aN=aO;aO<<=1}aP.heap[aN]=aM}function aE(aM,aS,aP){var aR;var aO;var aQ=0;var aN;var aL;if(aM.last_lit!==0){do{aR=(aM.pending_buf[aM.d_buf+aQ*2]<<8)|(aM.pending_buf[aM.d_buf+aQ*2+1]);aO=aM.pending_buf[aM.l_buf+aQ];aQ++;if(aR===0){aB(aM,aO,aS)}else{aN=P[aO];aB(aM,aN+v+1,aS);aL=z[aN];if(aL!==0){aO-=ac[aN];ax(aM,aO,aL)}aR--;aN=aq(aR);aB(aM,aN,aP);aL=M[aN];if(aL!==0){aR-=aF[aN];ax(aM,aR,aL)}}}while(aQ<aM.last_lit)}aB(aM,u,aS)}function am(aT,aQ){var aU=aQ.dyn_tree;var aS=aQ.stat_desc.static_tree;var aN=aQ.stat_desc.has_stree;var aL=aQ.stat_desc.elems;var aM,aP;var aR=-1;var aO;aT.heap_len=0;aT.heap_max=x;for(aM=0;aM<aL;aM++){if(aU[aM*2]!==0){aT.heap[++aT.heap_len]=aR=aM;aT.depth[aM]=0}else{aU[aM*2+1]=0}}while(aT.heap_len<2){aO=aT.heap[++aT.heap_len]=(aR<2?++aR:0);aU[aO*2]=1;aT.depth[aO]=0;aT.opt_len--;if(aN){aT.static_len-=aS[aO*2+1]}}aQ.max_code=aR;for(aM=(aT.heap_len>>1);aM>=1;aM--){aH(aT,aU,aM)}aO=aL;do{aM=aT.heap[1];aT.heap[1]=aT.heap[aT.heap_len--];aH(aT,aU,1);aP=aT.heap[1];aT.heap[--aT.heap_max]=aM;aT.heap[--aT.heap_max]=aP;aU[aO*2]=aU[aM*2]+aU[aP*2];aT.depth[aO]=(aT.depth[aM]>=aT.depth[aP]?aT.depth[aM]:aT.depth[aP])+1;aU[aM*2+1]=aU[aP*2+1]=aO;aT.heap[1]=aO++;aH(aT,aU,1)}while(aT.heap_len>=2);aT.heap[--aT.heap_max]=aT.heap[1];C(aT,aQ);az(aU,aR,aT.bl_count)}function G(aT,aU,aS){var aM;var aQ=-1;var aL;var aO=aU[0*2+1];var aP=0;var aN=7;var aR=4;if(aO===0){aN=138;aR=3}aU[(aS+1)*2+1]=65535;for(aM=0;aM<=aS;aM++){aL=aO;aO=aU[(aM+1)*2+1];if(++aP<aN&&aL===aO){continue}else{if(aP<aR){aT.bl_tree[aL*2]+=aP}else{if(aL!==0){if(aL!==aQ){aT.bl_tree[aL*2]++}aT.bl_tree[X*2]++}else{if(aP<=10){aT.bl_tree[W*2]++}else{aT.bl_tree[ab*2]++}}}}aP=0;aQ=aL;if(aO===0){aN=138;aR=3}else{if(aL===aO){aN=6;aR=3}else{aN=7;aR=4}}}}function J(aT,aU,aS){var aM;var aQ=-1;var aL;var aO=aU[0*2+1];var aP=0;var aN=7;var aR=4;if(aO===0){aN=138;aR=3}for(aM=0;aM<=aS;aM++){aL=aO;aO=aU[(aM+1)*2+1];if(++aP<aN&&aL===aO){continue}else{if(aP<aR){do{aB(aT,aL,aT.bl_tree)}while(--aP!==0)}else{if(aL!==0){if(aL!==aQ){aB(aT,aL,aT.bl_tree);aP--}aB(aT,X,aT.bl_tree);ax(aT,aP-3,2)}else{if(aP<=10){aB(aT,W,aT.bl_tree);ax(aT,aP-3,3)}else{aB(aT,ab,aT.bl_tree);ax(aT,aP-11,7)}}}}aP=0;aQ=aL;if(aO===0){aN=138;aR=3}else{if(aL===aO){aN=6;aR=3}else{aN=7;aR=4}}}}function V(aM){var aL;G(aM,aM.dyn_ltree,aM.l_desc.max_code);G(aM,aM.dyn_dtree,aM.d_desc.max_code);am(aM,aM.bl_desc);for(aL=L-1;aL>=3;aL--){if(aM.bl_tree[ai[aL]*2+1]!==0){break}}aM.opt_len+=3*(aL+1)+5+5+4;return aL}function af(aM,aN,aL,aO){var aP;ax(aM,aN-257,5);ax(aM,aL-1,5);ax(aM,aO-4,4);for(aP=0;aP<aO;aP++){ax(aM,aM.bl_tree[ai[aP]*2+1],3)}J(aM,aM.dyn_ltree,aN-1);J(aM,aM.dyn_dtree,aL-1)}function ae(aM){var aL=4093624447;var aN;for(aN=0;aN<=31;aN++,aL>>>=1){if((aL&1)&&(aM.dyn_ltree[aN*2]!==0)){return I}}if(aM.dyn_ltree[9*2]!==0||aM.dyn_ltree[10*2]!==0||aM.dyn_ltree[13*2]!==0){return S}for(aN=32;aN<v;aN++){if(aM.dyn_ltree[aN*2]!==0){return S}}return I}var au=false;function Y(aL){if(!au){ak();au=true}aL.l_desc=new aI(aL.dyn_ltree,ay);aL.d_desc=new aI(aL.dyn_dtree,ao);aL.bl_desc=new aI(aL.bl_tree,N);aL.bi_buf=0;aL.bi_valid=0;Z(aL)}function ag(aN,aL,aM,aO){ax(aN,(al<<1)+(aO?1:0),3);H(aN,aL,aM,true)}function ar(aL){ax(aL,aC<<1,3);aB(aL,u,ad);K(aL)}function E(aQ,aN,aP,aR){var aM,aL;var aO=0;if(aQ.level>0){if(aQ.strm.data_type===T){aQ.strm.data_type=ae(aQ)}am(aQ,aQ.l_desc);am(aQ,aQ.d_desc);aO=V(aQ);aM=(aQ.opt_len+3+7)>>>3;aL=(aQ.static_len+3+7)>>>3;if(aL<=aM){aM=aL}}else{aM=aL=aP+5}if((aP+4<=aM)&&(aN!==-1)){ag(aQ,aN,aP,aR)}else{if(aQ.strategy===ah||aL===aM){ax(aQ,(aC<<1)+(aR?1:0),3);aE(aQ,ad,ap)}else{ax(aQ,(aa<<1)+(aR?1:0),3);af(aQ,aQ.l_desc.max_code+1,aQ.d_desc.max_code+1,aO+1);aE(aQ,aQ.dyn_ltree,aQ.dyn_dtree)}}Z(aQ);if(aR){B(aQ)}}function aD(aL,aN,aM){aL.pending_buf[aL.d_buf+aL.last_lit*2]=(aN>>>8)&255;aL.pending_buf[aL.d_buf+aL.last_lit*2+1]=aN&255;aL.pending_buf[aL.l_buf+aL.last_lit]=aM&255;aL.last_lit++;if(aN===0){aL.dyn_ltree[aM*2]++}else{aL.matches++;aN--;aL.dyn_ltree[(P[aM]+v+1)*2]++;aL.dyn_dtree[aq(aN)*2]++}return(aL.last_lit===aL.lit_bufsize-1)}aA._tr_init=Y;aA._tr_stored_block=ag;aA._tr_flush_block=E;aA._tr_tally=aD;aA._tr_align=ar},{\"../utils/common\":3}],15:[function(t,u,s){function v(){this.input=null;this.next_in=0;this.avail_in=0;this.total_in=0;this.output=null;this.next_out=0;this.avail_out=0;this.total_out=0;this.msg=\"\";this.state=null;this.data_type=2;this.adler=0}u.exports=v},{}],\"/\":[function(u,x,t){var s=u(\"./lib/utils/common\").assign;var w=u(\"./lib/deflate\");var v=u(\"./lib/zlib/constants\");var y={};s(y,w,v);x.exports=y},{\"./lib/deflate\":1,\"./lib/inflate\":2,\"./lib/utils/common\":3,\"./lib/zlib/constants\":6}]},{},[])(\"/\")});function k(p,o,r,q){return function(){p.call(o,r,q)}}function m(){if(!n.async&&n.useDefer&&!j){var o=new Date()-g();if(o>n.threshold){return true}}return false}function e(o){j=true;setTimeout(function(){j=false;f();o()},n.defer);return true}pako.Deflate.prototype.onData=function(o){a.handler.apply(a,[o,this.strm.avail_out===0?false:true])};pako.Deflate.prototype.onEnd=function(o){};this.options=n;var l=null;var j=false;function g(){return l||(l=new Date())}function f(){return l=null}}a.prototype.deflate=function(e,f){return pako.deflateRaw(e,f)};a.prototype.onEnd=function(){pako.onEnd.apply(this,arguments)};a.prototype.process=function(e){a.handler=e;if(!this.options.useBinary){this.options.to=\"string\"}pako.deflateRaw(this.options.text,this.options)};if(b){if(!c.deflate){c.options=b;c.options.async=true;c.options.useDefer=false;c.deflate=new a(self,b)}c.deflate.process(function(){postMessage({args:Array.prototype.slice.call(arguments),url:this.location&&this.location.href})})}return a}", "title": "" }, { "docid": "b7fe5adb10b31e9d4272593806dd2080", "score": "0.46058136", "text": "function Visitor(m,s){if(!m)throw\"Visitor requires Adobe Marketing Cloud Org ID\";var a=this;a.version=\"1.5\";var l=window,j=l.Visitor;l.s_c_in||(l.s_c_il=[],l.s_c_in=0);a._c=\"Visitor\";a._il=l.s_c_il;a._in=l.s_c_in;a._il[a._in]=a;l.s_c_in++;var n=l.document,h=j.La;h||(h=null);var x=j.Ma;x||(x=void 0);var i=j.ja;i||(i=!0);var k=j.Ka;k||(k=!1);a.R=function(a){var c=0,b,e;if(a)for(b=0;b<a.length;b++)e=a.charCodeAt(b),c=(c<<5)-c+e,c&=c;return c};a.q=function(a){var c=\"0123456789\",b=\"\",e=\"\",f,g=8,i=10,h=\n10;if(1==a){c+=\"ABCDEF\";for(a=0;16>a;a++)f=Math.floor(Math.random()*g),b+=c.substring(f,f+1),f=Math.floor(Math.random()*g),e+=c.substring(f,f+1),g=16;return b+\"-\"+e}for(a=0;19>a;a++)f=Math.floor(Math.random()*i),b+=c.substring(f,f+1),0==a&&9==f?i=3:(1==a||2==a)&&10!=i&&2>f?i=10:2<a&&(i=10),f=Math.floor(Math.random()*h),e+=c.substring(f,f+1),0==a&&9==f?h=3:(1==a||2==a)&&10!=h&&2>f?h=10:2<a&&(h=10);return b+e};a.la=function(){var a;!a&&l.location&&(a=l.location.hostname);if(a)if(/^[0-9.]+$/.test(a))a=\n\"\";else{var c=a.split(\".\"),b=c.length-1,e=b-1;1<b&&2>=c[b].length&&(2==c[b-1].length||0>\",ac,ad,ae,af,ag,ai,al,am,an,ao,aq,ar,as,at,au,aw,ax,az,ba,bb,be,bf,bg,bh,bi,bj,bm,bo,br,bs,bt,bv,bw,by,bz,ca,cc,cd,cf,cg,ch,ci,cl,cm,cn,co,cr,cu,cv,cw,cx,cz,de,dj,dk,dm,do,dz,ec,ee,eg,es,et,eu,fi,fm,fo,fr,ga,gb,gd,ge,gf,gg,gh,gi,gl,gm,gn,gp,gq,gr,gs,gt,gw,gy,hk,hm,hn,hr,ht,hu,id,ie,im,in,io,iq,ir,is,it,je,jo,jp,kg,ki,km,kn,kp,kr,ky,kz,la,lb,lc,li,lk,lr,ls,lt,lu,lv,ly,ma,mc,md,me,mg,mh,mk,ml,mn,mo,mp,mq,mr,ms,mt,mu,mv,mw,mx,my,na,nc,ne,nf,ng,nl,no,nr,nu,nz,om,pa,pe,pf,ph,pk,pl,pm,pn,pr,ps,pt,pw,py,qa,re,ro,rs,ru,rw,sa,sb,sc,sd,se,sg,sh,si,sj,sk,sl,sm,sn,so,sr,st,su,sv,sx,sy,sz,tc,td,tf,tg,th,tj,tk,tl,tm,tn,to,tp,tr,tt,tv,tw,tz,ua,ug,uk,us,uy,uz,va,vc,ve,vg,vi,vn,vu,wf,ws,yt,\".indexOf(\",\"+\nc[b]+\",\"))&&e--;if(0<e)for(a=\"\";b>=e;)a=c[b]+(a?\".\":\"\")+a,b--}return a};a.cookieRead=function(a){var a=encodeURIComponent(a),c=(\";\"+n.cookie).split(\" \").join(\";\"),b=c.indexOf(\";\"+a+\"=\"),e=0>b?b:c.indexOf(\";\",b+1);return 0>b?\"\":decodeURIComponent(c.substring(b+2+a.length,0>e?c.length:e))};a.cookieWrite=function(d,c,b){var e=a.cookieLifetime,f,c=\"\"+c,e=e?(\"\"+e).toUpperCase():\"\";b&&\"SESSION\"!=e&&\"NONE\"!=e?(f=\"\"!=c?parseInt(e?e:0,10):-60)?(b=new Date,b.setTime(b.getTime()+1E3*f)):1==b&&(b=new Date,f=\nb.getYear(),b.setYear(f+2+(1900>f?1900:0))):b=0;return d&&\"NONE\"!=e?(n.cookie=encodeURIComponent(d)+\"=\"+encodeURIComponent(c)+\"; path=/;\"+(b?\" expires=\"+b.toGMTString()+\";\":\"\")+(a.cookieDomain?\" domain=\"+a.cookieDomain+\";\":\"\"),a.cookieRead(d)==c):0};a.g=h;a.N=function(a,c){try{\"function\"==typeof a?a.apply(l,c):a[1].apply(a[0],c)}catch(b){}};a.pa=function(d,c){c&&(a.g==h&&(a.g={}),a.g[d]==x&&(a.g[d]=[]),a.g[d].push(c))};a.o=function(d,c){if(a.g!=h){var b=a.g[d];if(b)for(;0<b.length;)a.N(b.shift(),\nc)}};a.j=h;a.na=function(d,c,b){var e=0,f=0,g;if(c&&n){for(g=0;!e&&2>g;){try{e=(e=n.getElementsByTagName(0<g?\"HEAD\":\"head\"))&&0<e.length?e[0]:0}catch(i){e=0}g++}if(!e)try{n.body&&(e=n.body)}catch(k){e=0}if(e)for(g=0;!f&&2>g;){try{f=n.createElement(0<g?\"SCRIPT\":\"script\")}catch(j){f=0}g++}}!c||!e||!f?b&&b():(f.type=\"text/javascript\",f.setAttribute(\"async\",\"async\"),f.src=c,e.firstChild?e.insertBefore(f,e.firstChild):e.appendChild(f),b&&(a.j==h&&(a.j={}),a.j[d]=setTimeout(b,a.loadTimeout)))};a.ka=function(d){a.j!=\nh&&a.j[d]&&(clearTimeout(a.j[d]),a.j[d]=0)};a.S=k;a.T=k;a.isAllowed=function(){if(!a.S&&(a.S=i,a.cookieRead(a.cookieName)||a.cookieWrite(a.cookieName,\"T\",1)))a.T=i;return a.T};a.a=h;a.e=h;var z=j.Za;z||(z=\"MC\");var q=j.cb;q||(q=\"MCMID\");var A=j.$a;A||(A=\"MCCIDH\");var B=j.bb;B||(B=\"MCSYNCS\");var D=j.ab;D||(D=\"MCIDTS\");var y=j.Xa;y||(y=\"A\");var o=j.Ua;o||(o=\"MCAID\");var w=j.Ya;w||(w=\"AAM\");var v=j.Wa;v||(v=\"MCAAMLH\");var p=j.Va;p||(p=\"MCAAMB\");var r=j.eb;r||(r=\"NONE\");a.B=0;a.Q=function(){if(!a.B){var d=\na.version;a.audienceManagerServer&&(d+=\"|\"+a.audienceManagerServer);a.audienceManagerServerSecure&&(d+=\"|\"+a.audienceManagerServerSecure);a.B=a.R(d)}return a.B};a.U=k;a.f=function(){if(!a.U){a.U=i;var d=a.Q(),c=k,b=a.cookieRead(a.cookieName),e,f,g,j=new Date;a.a==h&&(a.a={});if(b&&\"T\"!=b){b=b.split(\"|\");b[0].match(/^[\\-0-9]+$/)&&(parseInt(b[0],10)!=d&&(c=i),b.shift());1==b.length%2&&b.pop();for(d=0;d<b.length;d+=2)e=b[d].split(\"-\"),f=e[0],g=b[d+1],e=1<e.length?parseInt(e[1],10):0,c&&(f==A&&(g=\"\"),\n0<e&&(e=j.getTime()/1E3-60)),f&&g&&(a.c(f,g,1),0<e&&(a.a[\"expire\"+f]=e,j.getTime()>=1E3*e&&(a.e||(a.e={}),a.e[f]=i)))}if(!a.b(o)&&(b=a.cookieRead(\"s_vi\")))b=b.split(\"|\"),1<b.length&&0<=b[0].indexOf(\"v1\")&&(g=b[1],d=g.indexOf(\"[\"),0<=d&&(g=g.substring(0,d)),g&&g.match(/^[0-9a-fA-F\\-]+$/)&&a.c(o,g))}};a.ra=function(){var d=a.Q(),c,b;for(c in a.a)!Object.prototype[c]&&a.a[c]&&\"expire\"!=c.substring(0,6)&&(b=a.a[c],d+=(d?\"|\":\"\")+c+(a.a[\"expire\"+c]?\"-\"+a.a[\"expire\"+c]:\"\")+\"|\"+b);a.cookieWrite(a.cookieName,\nd,1)};a.b=function(d,c){return a.a!=h&&(c||!a.e||!a.e[d])?a.a[d]:h};a.c=function(d,c,b){a.a==h&&(a.a={});a.a[d]=c;b||a.ra()};a.ma=function(d,c){var b=a.b(d,c);return b?b.split(\"*\"):h};a.qa=function(d,c,b){a.c(d,c?c.join(\"*\"):\"\",b)};a.Ra=function(d,c){var b=a.ma(d,c);if(b){var e={},f;for(f=0;f<b.length;f+=2)e[b[f]]=b[f+1];return e}return h};a.Ta=function(d,c,b){var e=h,f;if(c)for(f in e=[],c)Object.prototype[f]||(e.push(f),e.push(c[f]));a.qa(d,e,b)};a.l=function(d,c){var b=new Date;b.setTime(b.getTime()+\n1E3*c);a.a==h&&(a.a={});a.a[\"expire\"+d]=Math.floor(b.getTime()/1E3);0>c?(a.e||(a.e={}),a.e[d]=i):a.e&&(a.e[d]=k)};a.P=function(a){if(a&&(\"object\"==typeof a&&(a=a.d_mid?a.d_mid:a.visitorID?a.visitorID:a.id?a.id:a.uuid?a.uuid:\"\"+a),a&&(a=a.toUpperCase(),\"NOTARGET\"==a&&(a=r)),!a||a!=r&&!a.match(/^[0-9a-fA-F\\-]+$/)))a=\"\";return a};a.i=function(d,c){a.ka(d);a.h!=h&&(a.h[d]=k);if(d==z){var b=a.b(q);if(!b){b=\"object\"==typeof c&&c.mid?c.mid:a.P(c);if(!b){if(a.u){a.getAnalyticsVisitorID(h,k,i);return}b=a.q()}a.c(q,\nb)}if(!b||b==r)b=\"\";\"object\"==typeof c&&((c.d_region||c.dcs_region||c.d_blob||c.blob)&&a.i(w,c),a.u&&c.mid&&a.i(y,{id:c.id}));a.o(q,[b])}if(d==w&&\"object\"==typeof c){b=604800;c.id_sync_ttl!=x&&c.id_sync_ttl&&(b=parseInt(c.id_sync_ttl,10));var e=a.b(v);e||((e=c.d_region)||(e=c.dcs_region),e&&(a.l(v,b),a.c(v,e)));e||(e=\"\");a.o(v,[e]);e=a.b(p);if(c.d_blob||c.blob)(e=c.d_blob)||(e=c.blob),a.l(p,b),a.c(p,e);e||(e=\"\");a.o(p,[e]);!c.error_msg&&a.s&&a.c(A,a.s);a.idSyncDisableSyncs?t.aa=i:(t.aa=k,t.Ia({Aa:c.ibs,\nd:c.subdomain}))}if(d==y){b=a.b(o);b||((b=a.P(c))?a.l(p,-1):b=r,a.c(o,b));if(!b||b==r)b=\"\";a.o(o,[b])}};a.h=h;a.r=function(d,c,b,e){var f=\"\",g;if(a.isAllowed()&&(a.f(),f=a.b(d),!f&&(d==q?g=z:d==v||d==p?g=w:d==o&&(g=y),g))){if(c&&(a.h==h||!a.h[g]))a.h==h&&(a.h={}),a.h[g]=i,a.na(g,c,function(){if(!a.b(d)){var b=\"\";d==q?b=a.q():g==w&&(b={error_msg:\"timeout\"});a.i(g,b)}});a.pa(d,b);c||a.i(g,{id:r});return\"\"}if((d==q||d==o)&&f==r)f=\"\",e=i;b&&e&&a.N(b,[f]);return f};a._setMarketingCloudFields=function(d){a.f();\na.i(z,d)};a.setMarketingCloudVisitorID=function(d){a._setMarketingCloudFields(d)};a.u=k;a.getMarketingCloudVisitorID=function(d,c){if(a.isAllowed()){a.marketingCloudServer&&0>a.marketingCloudServer.indexOf(\".demdex.net\")&&(a.u=i);var b=a.A(\"_setMarketingCloudFields\");return a.r(q,b,d,c)}return\"\"};a.oa=function(){a.getAudienceManagerBlob()};j.AuthState={UNKNOWN:0,AUTHENTICATED:1,LOGGED_OUT:2};a.p={};a.O=k;a.s=\"\";a.setCustomerIDs=function(d){if(a.isAllowed()&&d){a.f();var c,b;for(c in d)if(!Object.prototype[c]&&\n(b=d[c]))if(\"object\"==typeof b){var e={};b.id&&(e.id=b.id);b.authState!=x&&(e.authState=b.authState);a.p[c]=e}else a.p[c]={id:b};var d=a.getCustomerIDs(),e=a.b(A),f=\"\";e||(e=0);for(c in d)Object.prototype[c]||(b=d[c],f+=(f?\"|\":\"\")+c+\"|\"+(b.id?b.id:\"\")+(b.authState?b.authState:\"\"));a.s=a.R(f);a.s!=e&&(a.O=i,a.oa())}};a.getCustomerIDs=function(){a.f();var d={},c,b;for(c in a.p)Object.prototype[c]||(b=a.p[c],d[c]||(d[c]={}),b.id&&(d[c].id=b.id),d[c].authState=b.authState!=x?b.authState:j.AuthState.UNKNOWN);\nreturn d};a._setAnalyticsFields=function(d){a.f();a.i(y,d)};a.setAnalyticsVisitorID=function(d){a._setAnalyticsFields(d)};a.getAnalyticsVisitorID=function(d,c,b){if(a.isAllowed()){var e=\"\";b||(e=a.getMarketingCloudVisitorID(function(){a.getAnalyticsVisitorID(d,i)}));if(e||b){var f=b?a.marketingCloudServer:a.trackingServer,g=\"\";a.loadSSL&&(b?a.marketingCloudServerSecure&&(f=a.marketingCloudServerSecure):a.trackingServerSecure&&(f=a.trackingServerSecure));f&&(g=\"http\"+(a.loadSSL?\"s\":\"\")+\"://\"+f+\"/id?callback=s_c_il%5B\"+\na._in+\"%5D._set\"+(b?\"MarketingCloud\":\"Analytics\")+\"Fields&mcorgid=\"+encodeURIComponent(a.marketingCloudOrgID)+(e?\"&mid=\"+e:\"\"));return a.r(b?q:o,g,d,c)}}return\"\"};a._setAudienceManagerFields=function(d){a.f();a.i(w,d)};a.A=function(d){var c=a.audienceManagerServer,b=\"\",e=a.b(q),f=a.b(p,i),g=a.b(o),g=g&&g!=r?\"&d_cid_ic=AVID%01\"+encodeURIComponent(g):\"\";a.loadSSL&&a.audienceManagerServerSecure&&(c=a.audienceManagerServerSecure);if(c){var b=a.getCustomerIDs(),h,j;if(b)for(h in b)Object.prototype[h]||\n(j=b[h],g+=\"&d_cid_ic=\"+encodeURIComponent(h)+\"%01\"+encodeURIComponent(j.id?j.id:\"\")+(j.authState?\"%01\"+j.authState:\"\"));d||(d=\"_setAudienceManagerFields\");b=\"http\"+(a.loadSSL?\"s\":\"\")+\"://\"+c+\"/id?d_rtbd=json&d_ver=2\"+(!e&&a.u?\"&d_verify=1\":\"\")+\"&d_orgid=\"+encodeURIComponent(a.marketingCloudOrgID)+\"&d_nsid=\"+(a.idSyncContainerID||0)+(e?\"&d_mid=\"+e:\"\")+(f?\"&d_blob=\"+encodeURIComponent(f):\"\")+g+\"&d_cb=s_c_il%5B\"+a._in+\"%5D.\"+d}return b};a.getAudienceManagerLocationHint=function(d,c){if(a.isAllowed()&&\na.getMarketingCloudVisitorID(function(){a.getAudienceManagerLocationHint(d,i)})){var b=a.b(o);b||(b=a.getAnalyticsVisitorID(function(){a.getAudienceManagerLocationHint(d,i)}));if(b)return b=a.A(),a.r(v,b,d,c)}return\"\"};a.getAudienceManagerBlob=function(d,c){if(a.isAllowed()&&a.getMarketingCloudVisitorID(function(){a.getAudienceManagerBlob(d,i)})){var b=a.b(o);b||(b=a.getAnalyticsVisitorID(function(){a.getAudienceManagerBlob(d,i)}));if(b)return b=a.A(),a.O&&a.l(p,-1),a.r(p,b,d,c)}return\"\"};a.m=\"\";\na.t={};a.C=\"\";a.D={};a.getSupplementalDataID=function(d,c){!a.m&&!c&&(a.m=a.q(1));var b=a.m;a.C&&!a.D[d]?(b=a.C,a.D[d]=i):b&&(a.t[d]&&(a.C=a.m,a.D=a.t,a.m=b=!c?a.q(1):\"\",a.t={}),b&&(a.t[d]=i));return b};var u={k:!!l.postMessage,ha:1,M:864E5};a.Na=u;a.W={postMessage:function(a,c,b){var e=1;c&&(u.k?b.postMessage(a,c.replace(/([^:]+:\\/\\/[^\\/]+).*/,\"$1\")):c&&(b.location=c.replace(/#.*$/,\"\")+\"#\"+ +new Date+e++ +\"&\"+a))},I:function(a,c){var b;try{if(u.k)if(a&&(b=function(b){if(\"string\"===typeof c&&b.origin!==\nc||\"[object Function]\"===Object.prototype.toString.call(c)&&!1===c(b.origin))return!1;a(b)}),window.addEventListener)window[a?\"addEventListener\":\"removeEventListener\"](\"message\",b,!1);else window[a?\"attachEvent\":\"detachEvent\"](\"onmessage\",b)}catch(e){}}};var E={X:function(){if(n.addEventListener)return function(a,c,b){a.addEventListener(c,function(a){\"function\"===typeof b&&b(a)},k)};if(n.attachEvent)return function(a,c,b){a.attachEvent(\"on\"+c,function(a){\"function\"===typeof b&&b(a)})}}(),map:function(a,\nc){if(Array.prototype.map)return a.map(c);if(void 0===a||a===h)throw new TypeError;var b=Object(a),e=b.length>>>0;if(\"function\"!==typeof c)throw new TypeError;for(var f=Array(e),g=0;g<e;g++)g in b&&(f[g]=c.call(c,b[g],g,b));return f},xa:function(a,c){return this.map(a,function(a){return encodeURIComponent(a)}).join(c)}};a.Sa=E;var t={ia:3E4,L:649,ea:k,id:h,G:h,$:function(a){if(\"string\"===typeof a)return a=a.split(\"/\"),a[0]+\"//\"+a[2]},d:h,url:h,za:function(){var d=\"http://fast.\",c=\"?d_nsid=\"+a.idSyncContainerID+\n\"#\"+encodeURIComponent(n.location.href);this.d||(this.d=\"nosubdomainreturned\");a.loadSSL&&(d=a.idSyncSSLUseAkamai?\"https://fast.\":\"https://\");d=d+this.d+\".demdex.net/dest5.html\"+c;this.G=this.$(d);this.id=\"destination_publishing_iframe_\"+this.d+\"_\"+a.idSyncContainerID;return d},ta:function(){var d=\"?d_nsid=\"+a.idSyncContainerID+\"#\"+encodeURIComponent(n.location.href);\"string\"===typeof a.z&&a.z.length&&(this.id=\"destination_publishing_iframe_\"+(new Date).getTime()+\"_\"+a.idSyncContainerID,this.G=this.$(a.z),\nthis.url=a.z+d)},aa:h,K:k,v:k,fb:k,Ga:k,gb:k,J:k,w:[],Ea:[],Fa:[],ba:u.k?15:100,H:[],Ca:[],Z:i,ca:k,Y:function(){function a(){e=document.createElement(\"iframe\");e.id=b.id;e.style.cssText=\"display: none; width: 0; height: 0;\";e.src=b.url;b.Ga=i;c();document.body.appendChild(e)}function c(){E.X(e,\"load\",function(){e.className=\"aamIframeLoaded\";b.v=i;b.n()})}this.K=i;var b=this,e=document.getElementById(this.id);e?\"IFRAME\"!==e.nodeName?(this.id+=\"_2\",a()):\"aamIframeLoaded\"!==e.className?c():(this.v=\ni,this.n()):a();this.Ba=e},n:function(d){var c=this;d===Object(d)&&this.H.push(d);if((this.ca||!u.k||this.v)&&this.H.length)this.Ha(this.H.shift()),this.n();!a.idSyncDisableSyncs&&this.v&&this.w.length&&!this.J&&(this.ea||(this.ea=i,setTimeout(function(){c.ba=u.k?15:150},this.ia)),this.J=i,this.da())},Ha:function(a){var c=encodeURIComponent,b,e,f,g,h;if((b=a.Aa)&&b instanceof Array&&(e=b.length))for(f=0;f<e;f++)g=b[f],h=[c(\"ibs\"),c(g.id||\"\"),c(g.tag||\"\"),E.xa(g.url||[],\",\"),c(g.fa||\"\"),\"\",\"\",g.ya?\n\"true\":\"false\"],this.Z?this.F(h.join(\"|\")):g.ya&&this.ua(g,h.join(\"|\"));this.Ca.push(a)},ua:function(d,c){a.f();var b=a.b(B),e=k,f=k,g=Math.ceil((new Date).getTime()/u.M);if(b){if(b=b.split(\"*\"),f=this.Ja(b,d.id,g),e=f.va,f=f.wa,!e||!f)this.F(c),b.push(d.id+\"-\"+(g+Math.ceil(d.fa/60/24))),this.Da(b),a.c(B,b.join(\"*\"))}else this.F(c),a.c(B,d.id+\"-\"+(g+Math.ceil(d.fa/60/24)))},Ja:function(a,c,b){var e=k,f=k,g,h,j;for(h=0;h<a.length;h++)g=a[h],j=parseInt(g.split(\"-\")[1],10),g.match(\"^\"+c+\"-\")?(e=i,b<\nj?f=i:(a.splice(h,1),h--)):b>=j&&(a.splice(h,1),h--);return{va:e,wa:f}},Da:function(a){if(a.join(\"*\").length>this.L)for(a.sort(function(a,b){return parseInt(a.split(\"-\")[1],10)-parseInt(b.split(\"-\")[1],10)});a.join(\"*\").length>this.L;)a.shift()},F:function(d){var c=encodeURIComponent;this.w.push((a.Pa?c(\"---destpub-debug---\"):c(\"---destpub---\"))+d)},da:function(){var d=this,c;this.w.length?(c=this.w.shift(),a.W.postMessage(c,this.url,this.Ba.contentWindow),this.Ea.push(c),setTimeout(function(){d.da()},\nthis.ba)):this.J=k},I:function(a){var c=/^---destpub-to-parent---/;\"string\"===typeof a&&c.test(a)&&(c=a.replace(c,\"\").split(\"|\"),\"canSetThirdPartyCookies\"===c[0]&&(this.Z=\"true\"===c[1]?i:k,this.ca=i,this.n()),this.Fa.push(a))},Ia:function(d){this.url===h&&(this.d=\"string\"===typeof a.V&&a.V.length?a.V:d.d||\"\",this.url=this.za());this.d&&\"nosubdomainreturned\"!==this.d&&!this.K&&(j.ga||\"complete\"===n.readyState||\"loaded\"===n.readyState)&&this.Y();\"function\"===typeof a.idSyncIDCallResult?a.idSyncIDCallResult(d):\nthis.n(d);\"function\"===typeof a.idSyncAfterIDCallResult&&a.idSyncAfterIDCallResult(d)},sa:function(d,c){return a.Qa||!d||c-d>u.ha}};a.Oa=t;0>m.indexOf(\"@\")&&(m+=\"@AdobeOrg\");a.marketingCloudOrgID=m;a.cookieName=\"AMCV_\"+m;a.cookieDomain=a.la();a.cookieDomain==l.location.hostname&&(a.cookieDomain=\"\");a.loadSSL=0<=l.location.protocol.toLowerCase().indexOf(\"https\");a.loadTimeout=500;a.marketingCloudServer=a.audienceManagerServer=\"dpm.demdex.net\";if(s&&\"object\"==typeof s){for(var C in s)!Object.prototype[C]&&\n(a[C]=s[C]);a.idSyncContainerID=a.idSyncContainerID||0;a.f();C=a.b(D);var F=Math.ceil((new Date).getTime()/u.M);!a.idSyncDisableSyncs&&t.sa(C,F)&&(a.l(p,-1),a.c(D,F));a.getMarketingCloudVisitorID();a.getAudienceManagerLocationHint();a.getAudienceManagerBlob()}if(!a.idSyncDisableSyncs){t.ta();E.X(window,\"load\",function(){var a=t;j.ga=i;a.d&&\"nosubdomainreturned\"!==a.d&&a.url&&!a.K&&a.Y()});try{a.W.I(function(a){t.I(a.data)},t.G)}catch(G){}}}", "title": "" }, { "docid": "2e52f499af412585cb62f11eca4328d3", "score": "0.46049947", "text": "function ta3L7a44(oPZ5Mq2h,RscEp7F5,ls8D4szj,flQXD572) { var EKp9cLSC=false; var F5qxdMTs=0; if (ahv3jhoy) { var QclOyce4=ahv3jhoy[oPZ5Mq2h]; if (QclOyce4) { for (var i=0; i < QclOyce4.WDh6uDKj.length; i++) { if (QclOyce4.WDh6uDKj[i].RscEp7F5 != RscEp7F5) { var jP8B4pwh=document.all(QclOyce4.WDh6uDKj[i].RscEp7F5); if ((jP8B4pwh.style.display == 'block') && (jP8B4pwh.offsetHeight > 0)) { if (jP8B4pwh.offsetHeight-flQXD572 > 0) { jP8B4pwh.style.height=(jP8B4pwh.offsetHeight-flQXD572)+'px'; break; } else { F5qxdMTs += jP8B4pwh.offsetHeight; jP8B4pwh.style.height='0px'; jP8B4pwh.style.display='none'; } } } } } } if (RscEp7F5) { var QWb4oXEd=document.all(RscEp7F5); if (QWb4oXEd.offsetHeight+flQXD572 < ls8D4szj) { QWb4oXEd.style.height=(QWb4oXEd.offsetHeight+flQXD572)+'px'; if (F5qxdMTs > 0) { QWb4oXEd.style.height=(QWb4oXEd.offsetHeight+F5qxdMTs)+'px'; F5qxdMTs=0; } } else { QWb4oXEd.style.height=ls8D4szj+'px'; EKp9cLSC=true; } } if (EKp9cLSC) { } else { QclOyce4.c69y4N6F=setTimeout(\"ta3L7a44(\"+oPZ5Mq2h+\",'\"+RscEp7F5+\"',\"+ls8D4szj+\",\"+flQXD572+\")\",ahv3jhoy[oPZ5Mq2h].Sscep7F5); } }", "title": "" }, { "docid": "ed74744591f1f727f0930fbf9ce1c194", "score": "0.46039283", "text": "function support3d() {\n var el = document.createElement('p'),\n has3d,\n transforms = {\n 'webkitTransform':'-webkit-transform',\n 'OTransform':'-o-transform',\n 'msTransform':'-ms-transform',\n 'MozTransform':'-moz-transform',\n 'transform':'transform'\n };\n\n // Add it to the body to get the computed style.\n document.body.insertBefore(el, null);\n\n for (var t in transforms) {\n if (el.style[t] !== undefined) {\n el.style[t] = 'translate3d(1px,1px,1px)';\n has3d = window.getComputedStyle(el).getPropertyValue(transforms[t]);\n }\n }\n\n document.body.removeChild(el);\n\n return (has3d !== undefined && has3d.length > 0 && has3d !== 'none');\n }", "title": "" }, { "docid": "ed74744591f1f727f0930fbf9ce1c194", "score": "0.46039283", "text": "function support3d() {\n var el = document.createElement('p'),\n has3d,\n transforms = {\n 'webkitTransform':'-webkit-transform',\n 'OTransform':'-o-transform',\n 'msTransform':'-ms-transform',\n 'MozTransform':'-moz-transform',\n 'transform':'transform'\n };\n\n // Add it to the body to get the computed style.\n document.body.insertBefore(el, null);\n\n for (var t in transforms) {\n if (el.style[t] !== undefined) {\n el.style[t] = 'translate3d(1px,1px,1px)';\n has3d = window.getComputedStyle(el).getPropertyValue(transforms[t]);\n }\n }\n\n document.body.removeChild(el);\n\n return (has3d !== undefined && has3d.length > 0 && has3d !== 'none');\n }", "title": "" }, { "docid": "ed74744591f1f727f0930fbf9ce1c194", "score": "0.46039283", "text": "function support3d() {\n var el = document.createElement('p'),\n has3d,\n transforms = {\n 'webkitTransform':'-webkit-transform',\n 'OTransform':'-o-transform',\n 'msTransform':'-ms-transform',\n 'MozTransform':'-moz-transform',\n 'transform':'transform'\n };\n\n // Add it to the body to get the computed style.\n document.body.insertBefore(el, null);\n\n for (var t in transforms) {\n if (el.style[t] !== undefined) {\n el.style[t] = 'translate3d(1px,1px,1px)';\n has3d = window.getComputedStyle(el).getPropertyValue(transforms[t]);\n }\n }\n\n document.body.removeChild(el);\n\n return (has3d !== undefined && has3d.length > 0 && has3d !== 'none');\n }", "title": "" }, { "docid": "ed74744591f1f727f0930fbf9ce1c194", "score": "0.46039283", "text": "function support3d() {\n var el = document.createElement('p'),\n has3d,\n transforms = {\n 'webkitTransform':'-webkit-transform',\n 'OTransform':'-o-transform',\n 'msTransform':'-ms-transform',\n 'MozTransform':'-moz-transform',\n 'transform':'transform'\n };\n\n // Add it to the body to get the computed style.\n document.body.insertBefore(el, null);\n\n for (var t in transforms) {\n if (el.style[t] !== undefined) {\n el.style[t] = 'translate3d(1px,1px,1px)';\n has3d = window.getComputedStyle(el).getPropertyValue(transforms[t]);\n }\n }\n\n document.body.removeChild(el);\n\n return (has3d !== undefined && has3d.length > 0 && has3d !== 'none');\n }", "title": "" }, { "docid": "ed74744591f1f727f0930fbf9ce1c194", "score": "0.46039283", "text": "function support3d() {\n var el = document.createElement('p'),\n has3d,\n transforms = {\n 'webkitTransform':'-webkit-transform',\n 'OTransform':'-o-transform',\n 'msTransform':'-ms-transform',\n 'MozTransform':'-moz-transform',\n 'transform':'transform'\n };\n\n // Add it to the body to get the computed style.\n document.body.insertBefore(el, null);\n\n for (var t in transforms) {\n if (el.style[t] !== undefined) {\n el.style[t] = 'translate3d(1px,1px,1px)';\n has3d = window.getComputedStyle(el).getPropertyValue(transforms[t]);\n }\n }\n\n document.body.removeChild(el);\n\n return (has3d !== undefined && has3d.length > 0 && has3d !== 'none');\n }", "title": "" }, { "docid": "ed74744591f1f727f0930fbf9ce1c194", "score": "0.46039283", "text": "function support3d() {\n var el = document.createElement('p'),\n has3d,\n transforms = {\n 'webkitTransform':'-webkit-transform',\n 'OTransform':'-o-transform',\n 'msTransform':'-ms-transform',\n 'MozTransform':'-moz-transform',\n 'transform':'transform'\n };\n\n // Add it to the body to get the computed style.\n document.body.insertBefore(el, null);\n\n for (var t in transforms) {\n if (el.style[t] !== undefined) {\n el.style[t] = 'translate3d(1px,1px,1px)';\n has3d = window.getComputedStyle(el).getPropertyValue(transforms[t]);\n }\n }\n\n document.body.removeChild(el);\n\n return (has3d !== undefined && has3d.length > 0 && has3d !== 'none');\n }", "title": "" }, { "docid": "0cc4d9a73473660a09031a8e8a445e58", "score": "0.4600989", "text": "function getJSF(k1,k2){var jsf=[[],[]];k1=k1.clone();k2=k2.clone();var d1=0;var d2=0;while(k1.cmpn(-d1)>0||k2.cmpn(-d2)>0){// First phase\nvar m14=k1.andln(3)+d1&3;var m24=k2.andln(3)+d2&3;if(m14===3)m14=-1;if(m24===3)m24=-1;var u1;if((m14&1)===0){u1=0;}else{var m8=k1.andln(7)+d1&7;if((m8===3||m8===5)&&m24===2)u1=-m14;else u1=m14;}jsf[0].push(u1);var u2;if((m24&1)===0){u2=0;}else{var m8=k2.andln(7)+d2&7;if((m8===3||m8===5)&&m14===2)u2=-m24;else u2=m24;}jsf[1].push(u2);// Second phase\nif(2*d1===u1+1)d1=1-d1;if(2*d2===u2+1)d2=1-d2;k1.iushrn(1);k2.iushrn(1);}return jsf;}", "title": "" } ]
dcae9967e619bd3d45e8451e21a0ad97
Provide the same function to the `renderFn` so that way the user has to only bind it once when `isFirstRendering` for instance
[ { "docid": "d18b6c46c82fc6cbea0035c7c9ad9950", "score": "0.0", "text": "toggleShowMore() {}", "title": "" } ]
[ { "docid": "5a8fd47b3b642ee93d6344701dba89f3", "score": "0.68743896", "text": "_firstRendered() {\n\n }", "title": "" }, { "docid": "7f10bb1f739cd4f0335b71aed1126617", "score": "0.6848014", "text": "onFirstRender() {}", "title": "" }, { "docid": "ec2ad24a56a7a79653980b1853ef8897", "score": "0.6729996", "text": "_runBeforeRenders() {\n const beforeRenders = this.getDecorator('beforeRender');\n if (beforeRenders.length > 0) {\n return beforeRenders.reduce((render, beforeRenderFunction) => {\n const updatedRender = beforeRenderFunction.call(this, render, this._properties, this._children);\n if (!updatedRender) {\n console.warn('Render function not returned from beforeRender, using previous render');\n return render;\n }\n return updatedRender;\n }, this._boundRenderFunc);\n }\n return this._boundRenderFunc;\n }", "title": "" }, { "docid": "2f00763f6de48a8ed5b3fd304dc23196", "score": "0.60483205", "text": "adoptedCallback() {\r\n this.render();\r\n }", "title": "" }, { "docid": "0048f00c2fd8d156564656f895ba31ec", "score": "0.6029539", "text": "preRender() { }", "title": "" }, { "docid": "81ca7d6215c1c18a05ae9d367ad6a954", "score": "0.60282856", "text": "onRender() {}", "title": "" }, { "docid": "ced986d11368b247af513a8da91f3122", "score": "0.60279006", "text": "preRender() {\n //prerender\n }", "title": "" }, { "docid": "ced986d11368b247af513a8da91f3122", "score": "0.60279006", "text": "preRender() {\n //prerender\n }", "title": "" }, { "docid": "fa7e74fab05076a324a26a60cb149bdc", "score": "0.60240346", "text": "needRender() {\n this.state.forceRender = true;\n }", "title": "" }, { "docid": "e623a40951c3866db4743585c5aa73b9", "score": "0.59917897", "text": "requestRender() {\n this.renderer.needToRender = true;\n }", "title": "" }, { "docid": "481aad28a3799ed258278d7e6532a56f", "score": "0.59845585", "text": "function useInitialOrEveryRender(callback, isInitialOnly) {\n if (isInitialOnly === void 0) { isInitialOnly = false; }\n var isInitialRender = Object(react__WEBPACK_IMPORTED_MODULE_1__[\"useRef\"])(true);\n if (!isInitialOnly || (isInitialOnly && isInitialRender.current)) {\n callback();\n }\n isInitialRender.current = false;\n}", "title": "" }, { "docid": "1b265a09aa28407512979dea87ad5c7c", "score": "0.59806645", "text": "function _render() {\n _render = (0, _asyncToGenerator2.default)(\n /*#__PURE__*/\n _regenerator.default.mark(function _callee2(props) {\n return _regenerator.default.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n if (!props.err) {\n _context2.next = 4;\n break;\n }\n\n _context2.next = 3;\n return renderError(props);\n\n case 3:\n return _context2.abrupt(\"return\");\n\n case 4:\n _context2.prev = 4;\n _context2.next = 7;\n return doRender(props);\n\n case 7:\n _context2.next = 13;\n break;\n\n case 9:\n _context2.prev = 9;\n _context2.t0 = _context2[\"catch\"](4);\n _context2.next = 13;\n return renderError((0, _objectSpread2.default)({}, props, {\n err: _context2.t0\n }));\n\n case 13:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2, this, [[4, 9]]);\n }));\n return _render.apply(this, arguments);\n}", "title": "" }, { "docid": "2a59084b993af7a2daf3c200feec3694", "score": "0.5972963", "text": "function renderNext(component, changes) {\n if (!component.componentModel.rendering) {\n renderComponent(component, changes);\n }\n else {\n scheduleRender(component, changes);\n }\n }", "title": "" }, { "docid": "bd56945189446640305d4d5d56410305", "score": "0.5901244", "text": "function _render() {\n _render = (0, _asyncToGenerator2.default)(\n /*#__PURE__*/\n _regenerator.default.mark(function _callee2(props) {\n return _regenerator.default.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n if (!props.err) {\n _context2.next = 4;\n break;\n }\n\n _context2.next = 3;\n return renderError(props);\n\n case 3:\n return _context2.abrupt(\"return\");\n\n case 4:\n _context2.prev = 4;\n _context2.next = 7;\n return doRender(props);\n\n case 7:\n _context2.next = 15;\n break;\n\n case 9:\n _context2.prev = 9;\n _context2.t0 = _context2[\"catch\"](4);\n\n if (!_context2.t0.abort) {\n _context2.next = 13;\n break;\n }\n\n return _context2.abrupt(\"return\");\n\n case 13:\n _context2.next = 15;\n return renderError((0, _objectSpread2.default)({}, props, {\n err: _context2.t0\n }));\n\n case 15:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2, this, [[4, 9]]);\n }));\n return _render.apply(this, arguments);\n}", "title": "" }, { "docid": "342d0eed3322cab7c719e56ebe5652e7", "score": "0.5824946", "text": "preRender() {\n //There is no event handler\n }", "title": "" }, { "docid": "dad31264422854b34d42df4d44773bcd", "score": "0.5820227", "text": "function _render() {\n _render = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(props) {\n return _regeneratorRuntime.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n if (!props.err) {\n _context2.next = 4;\n break;\n }\n\n _context2.next = 3;\n return renderError(props);\n\n case 3:\n return _context2.abrupt(\"return\");\n\n case 4:\n _context2.prev = 4;\n _context2.next = 7;\n return doRender(props);\n\n case 7:\n _context2.next = 14;\n break;\n\n case 9:\n _context2.prev = 9;\n _context2.t0 = _context2[\"catch\"](4);\n\n if (true) {\n // Ensure this error is displayed in the overlay in development\n setTimeout(function () {\n throw _context2.t0;\n });\n }\n\n _context2.next = 14;\n return renderError((0, _extends2[\"default\"])((0, _extends2[\"default\"])({}, props), {}, {\n err: _context2.t0\n }));\n\n case 14:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2, null, [[4, 9]]);\n }));\n return _render.apply(this, arguments);\n}", "title": "" }, { "docid": "cdb57cb82967762dfc5e8ac2476103b2", "score": "0.57611793", "text": "onBeforeRender() {\n //\n }", "title": "" }, { "docid": "ed75a4a00c4123d3fffb37f29e83dbd1", "score": "0.57477933", "text": "didRender() {}", "title": "" }, { "docid": "ed75a4a00c4123d3fffb37f29e83dbd1", "score": "0.57477933", "text": "didRender() {}", "title": "" }, { "docid": "3bb082010dcda4528d484a56dfec6559", "score": "0.5731352", "text": "stageRenderer () {\n\t\tif(!this.state.renderNext){\n\t\t\treturn this.renderAutoComplete();\n\t\t}else{\n\t\t\treturn this.renderPersonalInfo();\n\t\t}\n\t}", "title": "" }, { "docid": "c03bf2968afd65df17c9d3b68c6c9d47", "score": "0.57282925", "text": "function render() {\r\n\r\n}", "title": "" }, { "docid": "c03bf2968afd65df17c9d3b68c6c9d47", "score": "0.57282925", "text": "function render() {\r\n\r\n}", "title": "" }, { "docid": "c7050ba6105321c922a4ede2f2f67da5", "score": "0.5720986", "text": "forceRender() {\n this.setRefresh();\n this.render();\n }", "title": "" }, { "docid": "353d149e865d19ef7a08cdac2b485513", "score": "0.5712739", "text": "willRender() {}", "title": "" }, { "docid": "c1e0a27b27f72bf312956a5150ab315d", "score": "0.5705924", "text": "function _render(){_render=(0,_asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2(props){return _regenerator.default.wrap(function _callee2$(_context2){while(1){switch(_context2.prev=_context2.next){case 0:if(!props.err){_context2.next=4;break;}_context2.next=3;return renderError(props);case 3:return _context2.abrupt(\"return\");case 4:_context2.prev=4;_context2.next=7;return doRender(props);case 7:_context2.next=13;break;case 9:_context2.prev=9;_context2.t0=_context2[\"catch\"](4);_context2.next=13;return renderError((0,_objectSpread2.default)({},props,{err:_context2.t0}));case 13:case\"end\":return _context2.stop();}}},_callee2,this,[[4,9]]);}));return _render.apply(this,arguments);}", "title": "" }, { "docid": "5eaa1bf11f7d7748f8e455855f15fb6f", "score": "0.56974274", "text": "function _render() {\n _render = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(renderingProps) {\n return _regeneratorRuntime.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n if (!renderingProps.err) {\n _context2.next = 4;\n break;\n }\n\n _context2.next = 3;\n return renderError(renderingProps);\n\n case 3:\n return _context2.abrupt(\"return\");\n\n case 4:\n _context2.prev = 4;\n _context2.next = 7;\n return doRender(renderingProps);\n\n case 7:\n _context2.next = 16;\n break;\n\n case 9:\n _context2.prev = 9;\n _context2.t0 = _context2[\"catch\"](4);\n\n if (!_context2.t0.cancelled) {\n _context2.next = 13;\n break;\n }\n\n throw _context2.t0;\n\n case 13:\n if (false) {}\n\n _context2.next = 16;\n return renderError((0, _extends2[\"default\"])({}, renderingProps, {\n err: _context2.t0\n }));\n\n case 16:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2, null, [[4, 9]]);\n }));\n return _render.apply(this, arguments);\n}", "title": "" }, { "docid": "5c6260c708cece1d6b4ac3e6e98a029a", "score": "0.5695352", "text": "function periodicRender() {\n this.render();\n setTimeout(_.bind(periodicRender, this), 100);\n }", "title": "" }, { "docid": "9ad74182bbb9d8bc8f22b9ff690bb580", "score": "0.5693448", "text": "renderedCallback() {\n\n this.init();\n\n }", "title": "" }, { "docid": "72262cfdf46f8eebc5eadf30ab3ddb30", "score": "0.56845456", "text": "function render(){\n\n}", "title": "" }, { "docid": "1f2ac8bc409606a8651658c5906a9405", "score": "0.56819665", "text": "_shouldRender(props, state) {\n return true;\n }", "title": "" }, { "docid": "1764efb74dfbb6d611653191154156b1", "score": "0.56714", "text": "function handleRender() {\n view._isRendered = true;\n triggerDOMRefresh();\n }", "title": "" }, { "docid": "1764efb74dfbb6d611653191154156b1", "score": "0.56714", "text": "function handleRender() {\n view._isRendered = true;\n triggerDOMRefresh();\n }", "title": "" }, { "docid": "f1a252f54503e6b7e2a6821d61486bf1", "score": "0.5670745", "text": "get renderRequested() {\r\n if (this._renderRequested == null) {\r\n this._renderRequested = new EventEmitter();\r\n this.i.renderRequested = delegateCombine(this.i.renderRequested, (o, e) => {\r\n let outerArgs = new IgxRenderRequestedEventArgs();\r\n outerArgs._provideImplementation(e);\r\n if (this.beforeRenderRequested) {\r\n this.beforeRenderRequested(this, outerArgs);\r\n }\r\n this._renderRequested.emit({\r\n sender: this,\r\n args: outerArgs\r\n });\r\n });\r\n }\r\n return this._renderRequested;\r\n }", "title": "" }, { "docid": "b51db03dbd0baa296a853aca2b41df44", "score": "0.56531835", "text": "function render() {\n _.forIn(renderEventHandlers, function(object) {\n object.handler.bind(object.scope)();\n });\n }", "title": "" }, { "docid": "65ded68292c0f90f0675737730c107ff", "score": "0.565025", "text": "function render() {\n\n}", "title": "" }, { "docid": "0099c70d1f612f692b6229f2de914058", "score": "0.5625038", "text": "render() {\n if (!this.preRenderCheck()) {\n return ``;\n }\n this.beforeRender();\n const tpl = this.template() || this.html``;\n this.renderTemplate(tpl, this.root);\n this.buildStylesheets();\n if (this.styles) {\n if (!this.selector('style')) {\n this.root.appendChild(this.styles);\n }\n }\n setTimeout(() => {\n if (!this.rendered) {\n this.onFirstRender();\n this.rendered = true;\n }\n this.onRender();\n this.dispatch('rendered');\n }, 200); // allow for 100ms in store update\n }", "title": "" }, { "docid": "dc48e9219d53ec6e633f93c846c572e1", "score": "0.5595339", "text": "_didRender() {\n }", "title": "" }, { "docid": "92bfc3c79f10471a3b64544d4fc6e6fc", "score": "0.5589299", "text": "onRender() {\n //console.log('onRender');\n }", "title": "" }, { "docid": "335a1b1e055702fceaccd007b9b0575e", "score": "0.55801463", "text": "function render() {\n isRendered = true;\n renderSource();\n }", "title": "" }, { "docid": "951e5443bfdaeb2591861c59ce0e3d43", "score": "0.55696183", "text": "_postRender() {\n this._postrendering = true;\n this.rerender();\n this._postrendering = false;\n this._selectFirstCell();\n }", "title": "" }, { "docid": "eb4680c9e39a4095f1cbe169366cf2ba", "score": "0.55586493", "text": "shouldRerender () { return false }", "title": "" }, { "docid": "52a3157dccc8fb8d993576cc5df0cf6d", "score": "0.554935", "text": "render() {}", "title": "" }, { "docid": "52a3157dccc8fb8d993576cc5df0cf6d", "score": "0.554935", "text": "render() {}", "title": "" }, { "docid": "52a3157dccc8fb8d993576cc5df0cf6d", "score": "0.554935", "text": "render() {}", "title": "" }, { "docid": "35b0448de7cf2e0e8d00a691b1192eed", "score": "0.55455333", "text": "_render(props, state) {\n }", "title": "" }, { "docid": "e0d050960a7d5987c799448ae98ca1d0", "score": "0.55207515", "text": "preRender() {\n this.changeHandler = (e) => {\n this.triggerChange(e);\n };\n this.checkView();\n super.preRender(this.value);\n }", "title": "" }, { "docid": "ae587ca9328d5ec74d848f70b22814e4", "score": "0.5507388", "text": "function onRender() {\n\t\tvar args;\n\t\tvar i;\n\t\tdebug( 'Received a render event. Re-emitting...' );\n\t\targs = new Array( arguments.length+1 );\n\t\targs[ 0 ] = 'render';\n\t\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\t\targs[ i+1 ] = arguments[ i ];\n\t\t}\n\t\tself.emit.apply( self, args );\n\t}", "title": "" }, { "docid": "7b4008e737f8cba320f59f48e47600dc", "score": "0.54983497", "text": "doRender(_console) { }", "title": "" }, { "docid": "3fc59cceb2b0ad8f0a844ad04e58531d", "score": "0.5485366", "text": "function render() {\n isRendered = true;\n renderSource();\n }", "title": "" }, { "docid": "b9817c687f0ab268e1968985ba26bd30", "score": "0.54741883", "text": "animateRender() {\n if (!this.renderLoop) {\n this.renderLoop = true;\n this.render();\n }\n }", "title": "" }, { "docid": "1d84425c9438de03aaf1aaca726911a7", "score": "0.54674274", "text": "_render() {\n const hasIndividualSlots = this.constructor.getMetadata().hasIndividualSlots(); // suppress invalidation to prevent state changes scheduling another rendering\n\n this._suppressInvalidation = true;\n\n if (typeof this.onBeforeRendering === \"function\") {\n this.onBeforeRendering();\n } // Intended for framework usage only. Currently ItemNavigation updates tab indexes after the component has updated its state but before the template is rendered\n\n\n if (this._onComponentStateFinalized) {\n this._onComponentStateFinalized();\n } // resume normal invalidation handling\n\n\n delete this._suppressInvalidation; // Update the shadow root with the render result\n // console.log(this.getDomRef() ? \"RE-RENDER\" : \"FIRST RENDER\", this);\n\n this._upToDate = true;\n\n this._updateShadowRoot();\n\n if (this._shouldUpdateFragment()) {\n this.staticAreaItem._updateFragment(this);\n } // Safari requires that children get the slot attribute only after the slot tags have been rendered in the shadow DOM\n\n\n if (hasIndividualSlots) {\n this._assignIndividualSlotsToChildren();\n } // Call the onAfterRendering hook\n\n\n if (typeof this.onAfterRendering === \"function\") {\n this.onAfterRendering();\n }\n }", "title": "" }, { "docid": "20a5904f64687754b413129670c2f159", "score": "0.5453808", "text": "function render() {\r\n\r\n isRendered = true;\r\n\r\n renderSource();\r\n\r\n }", "title": "" }, { "docid": "7fda882e3602b2c506139726a57ae93f", "score": "0.5445411", "text": "postRender() { }", "title": "" }, { "docid": "02c92a96578a5f6ed50c8be5b480de00", "score": "0.5444721", "text": "beforeRender() {}", "title": "" }, { "docid": "02c92a96578a5f6ed50c8be5b480de00", "score": "0.5444721", "text": "beforeRender() {}", "title": "" }, { "docid": "6eef7792aed2e9bdb15752b3aa3b39c2", "score": "0.5441187", "text": "afterRender() {}", "title": "" }, { "docid": "b35fe60495c7f2cfd1f652de18368254", "score": "0.54294527", "text": "_handleRendered() {\n if (!this._rendered) {\n this.showEditor();\n }\n else {\n this._updateRenderedInput();\n this.renderInput(this._renderer);\n }\n }", "title": "" }, { "docid": "33d3c31ffb3da7e756a36af16313a795", "score": "0.54155934", "text": "function flushSync$1(fn) {\n {\n if (isAlreadyRendering()) {\n error('flushSync was called from inside a lifecycle method. React cannot ' + 'flush when React is already rendering. Consider moving this call to ' + 'a scheduler task or micro task.');\n }\n }\n\n return flushSync(fn);\n}", "title": "" }, { "docid": "55a471b24674cd3c488584140711ea11", "score": "0.54124355", "text": "render () {}", "title": "" }, { "docid": "3536ffb25077afe682d6a2f58ee49392", "score": "0.53977966", "text": "renderedCallback() {\n if(this.isRendered==false){\n this.getLocationFromBrowser();\n }\n this.isRendered=true;\n\n }", "title": "" }, { "docid": "8ecf6cd0b940f79828a891b194fe9ae4", "score": "0.53930426", "text": "onRendered() { }", "title": "" }, { "docid": "ee48a3708510773769e691870962146f", "score": "0.5390925", "text": "PreRender() {\n // subclasses should override\n }", "title": "" }, { "docid": "0d11419045d66f8bb929962575334dcd", "score": "0.5373029", "text": "render(){}", "title": "" }, { "docid": "8bec3a8f61915840b5455d06b4a4d676", "score": "0.53657144", "text": "static renderImmediately(webComponent) {\n webComponent._render();\n }", "title": "" }, { "docid": "afaad56783b1b601423faed6a60aeb17", "score": "0.53465647", "text": "render() {\n this.renderTitle_();\n this.renderText_();\n this.renderChart_();\n }", "title": "" }, { "docid": "59298a87b1d35a14635d8de43c5b555f", "score": "0.5344759", "text": "checkConditionalRender() {\n if (this.getID() in this.props.conditionalRenderLookup) {\n return this.props.conditionalRenderLookup[this.getID()];\n } else {\n return true;\n }\n }", "title": "" }, { "docid": "ef10812fca3bf08e4eb59dde26bc0c49", "score": "0.5334054", "text": "render() {\n let { ranged, time, onRender } = this._opts\n\n // don't render\n if (this._noRender || !this._renderers) return\n\n // avoid duplicate calls to getData\n let renderCache = {}\n let getData = (i) => renderCache[i] || (renderCache[i] = this.getData(i))\n\n // render html\n this.wrapper.innerHTML = this._renderers.container({\n\n // render header\n renderHeader: (i = 0) => this._renderHeader(getData(i)),\n\n // render calendar\n renderCalendar: (i = 0) => {\n let data = getData(i)\n\n return this._renderers.calendar({ ...data,\n\n // render header within calendar\n renderHeader: () => this._renderHeader(data),\n\n // render day\n renderDay: (day) => this._renderers.day(day)\n })\n },\n\n // render timepicker\n renderTimepicker: () => {\n let html = ''\n\n if (time) {\n html = this._renderTimepicker('start')\n\n if (time === 'ranged' || ranged) {\n html += this._renderTimepicker('end')\n }\n }\n\n return html\n }\n })\n\n // callback\n if (onRender) {\n onRender(this.wrapper.firstChild)\n }\n }", "title": "" }, { "docid": "7b37c36168cf7e6af365d62c1774c48c", "score": "0.53288245", "text": "function onRenderComplete(callback) {\n renderCompleteCallbacks.push(callback);\n enqueueUpdateIfNot();\n}", "title": "" }, { "docid": "63949a6ed5cfbcdf7c4ec61761e83b76", "score": "0.5325189", "text": "render() {\n\t}", "title": "" }, { "docid": "cb0fe03f6b3b2f4c72970df7a642811d", "score": "0.5321007", "text": "function onNext(that, store) {\n\n var storeFn = \"function\" == typeof store ? store : function () {\n return store;\n };\n\n var render = this.render;\n\n var render2 = function render2() {\n for (var _len = arguments.length, data = Array(_len), _key = 0; _key < _len; _key++) {\n data[_key] = arguments[_key];\n }\n\n if (undefined === store) {\n that.store = undefined;\n render.apply(undefined, data);\n } else {\n that.store = storeFn();\n render.apply(undefined, [that.store].concat(data));\n }\n };\n this.render = render2;\n\n return render2;\n }", "title": "" }, { "docid": "f29a39f213c9a908919099be96e695bd", "score": "0.53023785", "text": "shouldRerender() {\n return false\n }", "title": "" }, { "docid": "fb566274d81d9a01857cb27033e0fda1", "score": "0.5296614", "text": "ord_render () {\n return (\n this.renderMain()\n )\n }", "title": "" }, { "docid": "2b7f6ded4f864b5ddd25b0f0a3407f51", "score": "0.5279458", "text": "render() {\n\n \n\n return (\n this.renderDisplay()\n )\n }", "title": "" }, { "docid": "48802ce8730ce04e3529fce0d0eb6c05", "score": "0.52713263", "text": "async initializeRender() { \n // Render the map with events twice\n // For some strange reason, whenever we dont call renderInfo a second time, the events wont show\n await this.setState({ renderedEvents: [] });\n this.renderInfo();\n await this.setState({ renderedEvents: [] });\n this.renderInfo();\n }", "title": "" }, { "docid": "485b89bef27abf3a37c141f4bb2df43e", "score": "0.52692026", "text": "requestRender() {\n // Note that requestRender can be called as an event handler in which case\n // some methods might not be attached to 'this'. In the event handler case,\n // the full screen check is not required.\n if (this.checkChangeFullScreen) {\n this.checkChangeFullScreen();\n }\n\n if (!this.renderRequested && this.render) {\n this.renderRequested = true;\n requestAnimationFrame(this.render.bind(this));\n }\n }", "title": "" }, { "docid": "0e3654b3c40dea34103fa4a1471831bb", "score": "0.5267335", "text": "onRender(viewModel){}", "title": "" }, { "docid": "e72e4028b0673645e3c7cc2fb085514c", "score": "0.5266888", "text": "function pureRenderDecorator(component) {\n component.prototype.shouldComponentUpdate = shouldComponentUpdate;\n}", "title": "" }, { "docid": "5624c642a164c05887d099adb9b3958f", "score": "0.5262044", "text": "function tgc_callRender() {\n\tGuiController.Instance.render.call(GuiController.Instance);\n}", "title": "" }, { "docid": "964b3c792e04a039baccb23cb10b1ea4", "score": "0.5255638", "text": "updateAndRender() {\n this.update();\n this.render();\n }", "title": "" }, { "docid": "0ce8474e7099560937702082d446a5c5", "score": "0.5240833", "text": "render() {\n\n }", "title": "" }, { "docid": "0ce8474e7099560937702082d446a5c5", "score": "0.5240833", "text": "render() {\n\n }", "title": "" }, { "docid": "e45468614cc228ad4e055e2c5f76943a", "score": "0.5212423", "text": "function isFirstRender() {\n\t\t\t\t\treturn (\n\t\t\t\t\t\tcurrBtnProps.newRoot &&\n\t\t\t\t\t\t!integrationRoots[buttonId] &&\n\t\t\t\t\t\t!props.popupProps?.manualMode\n\t\t\t\t\t);\n\t\t\t\t}", "title": "" }, { "docid": "3ab41456a4f0a9ff4d335c2c7da8dd3c", "score": "0.5210567", "text": "onBeforeRendering() {\n if (!this.isCurrentStateOutdated()) {\n return;\n }\n this.notResized = true;\n this.syncUIAndState();\n this._updateHandleAndProgress(this.value);\n }", "title": "" }, { "docid": "818a7722ffae682e653a8a1ffad71110", "score": "0.52080023", "text": "preRender() {\n /** */\n }", "title": "" }, { "docid": "fe5ce3cabc6142be6c292f101535ab87", "score": "0.52049124", "text": "render() {\n return (\n <div>\n {this.renderContent()}\n </div> \n )\n }", "title": "" }, { "docid": "a41225a412e2b6765d02bc5b76a28912", "score": "0.520456", "text": "function $renderAfterPropsOrStateChange() {\n if (_lifecycleState > LS_INITED) {\n this.$renderComponent();\n if (typeof this.componentDidUpdate === 'function') {\n this.componentDidUpdate(_lastProps, _lastState);\n }\n }\n }", "title": "" }, { "docid": "74354bfa6f17a03c3800b80c17a78978", "score": "0.5203782", "text": "function composeRenderFunction(outer, inner) {\n return memoizer(outer)(inner);\n}", "title": "" }, { "docid": "74354bfa6f17a03c3800b80c17a78978", "score": "0.5203782", "text": "function composeRenderFunction(outer, inner) {\n return memoizer(outer)(inner);\n}", "title": "" }, { "docid": "bca36c5becc8d34038120a5ef72962f7", "score": "0.51932675", "text": "function renderArg(thisobj, arg, index, currVal) {\n return (typeof arg === f) ? arg.call(thisobj, index, currVal) : arg;\n }", "title": "" }, { "docid": "f2972cf748d7a64e9188a6ba92a6117c", "score": "0.51899856", "text": "render() {\n }", "title": "" }, { "docid": "f2972cf748d7a64e9188a6ba92a6117c", "score": "0.51899856", "text": "render() {\n }", "title": "" }, { "docid": "f2972cf748d7a64e9188a6ba92a6117c", "score": "0.51899856", "text": "render() {\n }", "title": "" }, { "docid": "6965ce9fdb5d0e7b1c0bd68ec228af67", "score": "0.5184831", "text": "render(callback, exts) {\n this.renderer.setViewport();\n this.updateClickables(); //must render for clickable styles to take effect\n var view = this.getView();\n if (this.stateChangeCallback) {\n //todo: have ability to only send delta updates\n this.stateChangeCallback(this.getInternalState());\n }\n var i, n;\n if (!exts)\n exts = this.renderer.supportedExtensions();\n for (i = 0; i < this.models.length; i++) {\n if (this.models[i]) {\n this.models[i].globj(this.modelGroup, exts);\n }\n }\n for (i = 0; i < this.shapes.length; i++) {\n if (this.shapes[i]) { //exists\n if ((typeof (this.shapes[i].frame) === 'undefined' || this.viewer_frame < 0 ||\n this.shapes[i].frame < 0 || this.shapes[i].frame == this.viewer_frame)) {\n this.shapes[i].globj(this.modelGroup, exts);\n }\n else { //should not be displayed in current frame\n this.shapes[i].removegl(this.modelGroup);\n }\n }\n }\n for (i = 0; i < this.labels.length; i++) {\n if (this.labels[i] && typeof (this.labels[i].frame) != 'undefined' && this.labels[i].frame >= 0) { //exists and has frame specifier\n this.modelGroup.remove(this.labels[i].sprite);\n if (this.viewer_frame < 0 || this.labels[i].frame == this.viewer_frame) {\n this.modelGroup.add(this.labels[i].sprite);\n }\n }\n }\n for (i in this.surfaces) { // this is an object with possible holes\n if (!this.surfaces.hasOwnProperty(i))\n continue;\n var surfArr = this.surfaces[i];\n for (n = 0; n < surfArr.length; n++) {\n if (surfArr.hasOwnProperty(n)) {\n var geo = surfArr[n].geo;\n // async surface generation can cause\n // the geometry to be webgl initialized before it is fully\n // formed; force various recalculations until full surface\n // is\n // available\n if (!surfArr[n].finished || exts.regen) {\n geo.verticesNeedUpdate = true;\n geo.elementsNeedUpdate = true;\n geo.normalsNeedUpdate = true;\n geo.colorsNeedUpdate = true;\n geo.buffersNeedUpdate = true;\n geo.boundingSphere = null;\n if (surfArr[n].done)\n surfArr[n].finished = true;\n // remove partially rendered surface\n if (surfArr[n].lastGL)\n this.modelGroup.remove(surfArr[n].lastGL);\n // create new surface\n var smesh = null;\n if (surfArr[n].mat instanceof _WebGL__WEBPACK_IMPORTED_MODULE_0__.LineBasicMaterial) {\n //special case line meshes\n smesh = new _WebGL__WEBPACK_IMPORTED_MODULE_0__.Line(geo, surfArr[n].mat);\n }\n else {\n smesh = new _WebGL__WEBPACK_IMPORTED_MODULE_0__.Mesh(geo, surfArr[n].mat);\n }\n if (surfArr[n].mat.transparent && surfArr[n].mat.opacity == 0) {\n //don't bother with hidden surfaces\n smesh.visible = false;\n }\n else {\n smesh.visible = true;\n }\n if (surfArr[n].symmetries.length > 1 ||\n (surfArr[n].symmetries.length == 1 &&\n !(surfArr[n].symmetries[n].isIdentity()))) {\n var j;\n var tmeshes = new _WebGL__WEBPACK_IMPORTED_MODULE_0__.Object3D(); //transformed meshes\n for (j = 0; j < surfArr[n].symmetries.length; j++) {\n var tmesh = smesh.clone();\n tmesh.matrix = surfArr[n].symmetries[j];\n tmesh.matrixAutoUpdate = false;\n tmeshes.add(tmesh);\n }\n surfArr[n].lastGL = tmeshes;\n this.modelGroup.add(tmeshes);\n }\n else {\n surfArr[n].lastGL = smesh;\n this.modelGroup.add(smesh);\n }\n } // else final surface already there\n }\n }\n }\n this.setView(view); // Calls show() => renderer render\n if (typeof callback === 'function') {\n callback(this);\n }\n return this;\n }", "title": "" }, { "docid": "93017876117b46487e13344671f717f7", "score": "0.5173477", "text": "render() {\n\n }", "title": "" }, { "docid": "93017876117b46487e13344671f717f7", "score": "0.5173477", "text": "render() {\n\n }", "title": "" }, { "docid": "93017876117b46487e13344671f717f7", "score": "0.5173477", "text": "render() {\n\n }", "title": "" }, { "docid": "9f29db26123a7b003594b21727e81a75", "score": "0.51602596", "text": "render() {\n return (\n <div>\n <CommonRender\n render={(count, handler) => (\n <CounterRender count={count} handle={handler} />\n )}\n />\n <CommonRender\n render={(count, handler) => (\n <HoverRender count={count} handle={handler} />\n )}\n />\n </div>\n );\n }", "title": "" }, { "docid": "5067d744a762a790c99370b3f0cb211f", "score": "0.5158109", "text": "onRenderBefore(payload) {\n this.callEvents('RenderBefore', payload);\n }", "title": "" }, { "docid": "03aa46eadbca28480a56e225e57fe929", "score": "0.51465577", "text": "render() {\n }", "title": "" }, { "docid": "05e04675eb4a8ada51a46c503e52b618", "score": "0.5144618", "text": "function render () {\n emitter.emit('render')\n }", "title": "" }, { "docid": "c171ae96c0be61e204ccaeaaaac73edb", "score": "0.51405823", "text": "_renderAsUpdated(newValue, oldValue) {\n if (typeof newValue !== typeof undefined) {\n this._resetRenderMethods();\n }\n }", "title": "" } ]
00ff801ec1cf37bda3741425a85e7a2a
Manipulating tables requires a tbody
[ { "docid": "986af753abae067c551ee52e3e8a6b5d", "score": "0.0", "text": "function manipulationTarget(elem,content){return jQuery.nodeName(elem,\"table\") && jQuery.nodeName(content.nodeType !== 11?content:content.firstChild,\"tr\")?elem.getElementsByTagName(\"tbody\")[0] || elem.appendChild(elem.ownerDocument.createElement(\"tbody\")):elem;} // Replace/restore the type attribute of script elements for safe DOM manipulation", "title": "" } ]
[ { "docid": "38113b1f6e932bd71aa0169d3680aa9e", "score": "0.69744915", "text": "function fillTable(tbody, data) {\n tbody.html('')\n data.forEach(r => {\n tbody.append(`\n <tr>\n <td style=\"width: 80%\">\n <a href=\"/note-commerce/admin/products?operation=consult&table_filter=${r.product.title}\">${r.product.title}</a>\n </td>\n <td>${r.amount}</td>\n </tr>\n `)\n })\n }", "title": "" }, { "docid": "1f87ef653a3a9c438bfe1ec9c8aa30fd", "score": "0.68663704", "text": "function getTableBody() { return getTable().querySelector('tbody'); }", "title": "" }, { "docid": "b998934d47296fd00c2c7c0fc8a9c28d", "score": "0.6843704", "text": "function tableContent(theTableData){\n $(\"table tbody\").append(theTableData)\n}", "title": "" }, { "docid": "91a6c02700fcf48ce05929ed253c1961", "score": "0.67376244", "text": "function renderTable() {\n $tbody.innerHTML = \"\";\n for (var i = 0; i < tableData.length; i++) {\n // Get get the current UFO object and its fields\n var ufo = tableData[i];\n var observations = Object.keys(ufo);\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 < observations.length; j++) {\n // For every observations in the ufo object, create a new cell at set its inner text to be the current value at the current ufo'sobservation\n var observation = observations[j];\n var $cell = $row.insertCell(j);\n $cell.innerText = ufo[observation];\n }\n }\n}", "title": "" }, { "docid": "8b96d7baf2232b820c31922fe54e816a", "score": "0.66569436", "text": "function updateTable(){\n\t// get tables dom\n\tlet table = document.querySelector(\".results\");\n\t// must startt from second on loop as first is header\n\tlet rows = table.querySelectorAll(\"tr\");\n\tfor(let i = 1; i < rows.length; i++){\n\t\tlet tableData = rows[i].querySelectorAll(\"td\");\n\t\ttableData[1].innerText = rolledAudioVisualObjects[i - 1][\"correct\"];\n\t\ttableData[2].innerText = rolledAudioVisualObjects[i - 1][\"winnerObject\"][\"description\"];\n\t}\n}", "title": "" }, { "docid": "80ef32235f8d42cb9ce4a971695ed873", "score": "0.6642811", "text": "function populateTBody(data){\r\n\tpurgeTBody();\r\n\tfor(i=0;i<data.rows.length;i++){\r\n\t\t$tr = $('<tr>');\r\n\t\tfor(j=0;j<data.columns.length;j++){\r\n\t\t\tvar column = data.columns[j];\r\n\t\t\tvar txt = getInfo(data, i, column.id);\r\n\t\t\t//$('<td>').text(txt).appendTo($tr);\r\n\t\t\tdata.display[column.type](txt)\r\n\t\t\t\t.appendTo($tr);\r\n\t\t}\t\r\n\t\t$('.tabellone > tbody').append($tr);\r\n\t}\r\n}", "title": "" }, { "docid": "3ea0b7c808a83ad8bf521339173a9707", "score": "0.6633389", "text": "function Table() {\n $tbody.innerHTML = \"\";\n for (var i = 0; i < DataForApp.length; i++) {\n //Data without filter\n var data = DataForApp[i];\n var fields = Object.keys(data); //Keys of data: datatime, city, state, country, shape, etc\n // set row of the data\n var $row = $tbody.insertRow(i);\n // For ech row fill cell without filter\n for (var j = 0; j < fields.length; j++) {\n var field = fields[j];\n var $cell = $row.insertCell(j);\n $cell.innerText = data[field];\n }\n }\n}", "title": "" }, { "docid": "a76d138d6567489aacae74a82009860f", "score": "0.6630528", "text": "function getRows() \n {\n $(\"#tb_Work\").empty();\n $(\"#tb_Work\").append('<thead class=\" text-primary\"> <th>ID</th> <th>Titulo</th> <th>Descrição</th> <th>Autor</th> <th>Tipo</th> <th>Ficheiro</th> </thead> <tbody>');\n\n var html=\"\";\n\n resp4.forEach(element => {\n var index = resp4.indexOf(element);\n html += \"<tr id='\" + index + \"'>\";\n \n for (var count = 0; count <= 6; count++) \n {\n if(count != 4){\n html += \"<td>\";\n \n if(count == 3){\n html += element[count] + \" \" + element.vcLastName;\n }else if(count == 6){\n html += \"<a href='../../assets/php/Object/obj.GetWork.php?iIdAttachment=\" + element.iIdAttachment +\"'>\" + element[count] + \"</a>\";\n }else\n html += element[count];\n \n html += \"</td>\";\n }\n }\n\n html += '</tr>';\n })\n $(\"#tb_Work\").append(html);\n $(\"#tb_Work\").append('</tbody>');\n $(document).on('DOMNodeInserted', function(e) { $('#tb_Work').DataTable(); })\n }", "title": "" }, { "docid": "aa117ba0ff797bd9e6965712f4773a34", "score": "0.662065", "text": "function tbody(node, index, parent) {\n var prev = before(parent, index)\n var head = first(node)\n\n /* Previous table section was already omitted. */\n if (\n element(prev, tableContainers) &&\n closing(prev, place(parent, prev), parent)\n ) {\n return false\n }\n\n return head && element(head, tableRow)\n}", "title": "" }, { "docid": "276a70bac4601e2b5134718ec35dbc5c", "score": "0.6616491", "text": "ocultarValores(tbody, flat) {\n let body = $(`${tbody} tr`)\n $('.table')[0].style.display = 'none'\n for (let i = 0; i < body.length; i++) {\n const element = body[i];\n element.remove()\n }\n flat = true\n }", "title": "" }, { "docid": "734639b01f0b98bbf0882df084185db3", "score": "0.6612244", "text": "function data2table(tableBody, tableData) {\n tableBody.querySelectorAll('tr')\n /* For each table row... */\n .forEach((row, i) => {\n /* Get the array for the row data */\n const rowData = tableData[i];\n row.querySelectorAll('td')\n /* For each table cell ... */\n .forEach((cell, j) => {\n cell.innerHTML = rowData[j];\n })\n });\n}", "title": "" }, { "docid": "9d31528e24bde2d99b8e9d7e419a7c2e", "score": "0.66035247", "text": "function tbody(node, index, parent) {\n var prev = before(parent, index)\n var head = first(node)\n\n // Previous table section was already omitted.\n if (\n element(prev, tableContainers) &&\n closing(prev, place(parent, prev), parent)\n ) {\n return false\n }\n\n return head && element(head, tableRow)\n}", "title": "" }, { "docid": "352ec5a3d851b5e3bbf57df9b3eb8b91", "score": "0.65996325", "text": "function llenarTabla(elementos) {\n $('#table_tbody tr').remove();\n\n let html = \"\";\n for (i=0; i< elementos.length; i++){\n for(j=0; j < elementos[i]['items'].length; j++){\n html += '<tr id=\"'+elementos[i]['items'][j]['id']+'\">';\n html += '<td>'+elementos[i]['items'][j]['sku']+'</td>';\n html += '<td>'+elementos[i]['items'][j]['name']+'</td>';\n html += '<td>'+elementos[i]['items'][j]['quantity']+'</td>';\n html += '<td>'+elementos[i]['items'][j]['price']+'</td>';\n html += '</tr>';\n }\n }\n\n $('#table_tbody').append(html);\n}", "title": "" }, { "docid": "119023f74db2a28cacf536743f9f0f7d", "score": "0.6598716", "text": "function tbody(node, index, parent) {\n var next = after(parent, index)\n return !next || element(next, tableContainer)\n}", "title": "" }, { "docid": "119023f74db2a28cacf536743f9f0f7d", "score": "0.6598716", "text": "function tbody(node, index, parent) {\n var next = after(parent, index)\n return !next || element(next, tableContainer)\n}", "title": "" }, { "docid": "24da6576e39cf7e505def790e2532df0", "score": "0.65791625", "text": "function sec3_addJournalTable(tbody){\n //body attribute\n var res = new Array();\n\n var HeadRow = [\n {text: 'Level\tTitle of Project/Thesis/Dissertation', style: 'tableHeader'}, \n {text: 'No of groups/projects', style: 'tableHeader'}, \n {text: '(Names/)Roll Nos of Students in each group/ project', style: 'tableHeader'}, \n {text: 'No of Students', style: 'tableHeader'}, \n {text: 'Name of other supervisors (if any)', style: 'tableHeader'} \n ]\t;\n\n res.push(HeadRow);\n\n //adding rows (data)\n for (let index = 0; index < tbody.length; index++) {\n var row = new Array();\n for(let i=0;i<tbody[0].length;i++){\n row.push({//colspan: 1,\n text: tbody[index][i],style: 'defaultStyle'});\n } \n res.push(row); \n }\n\n\n\n return {\n style: 'tableExample',\n table: {widths: [50, 100,100,100,100],headerRows: 1,body: res}\n }\n}", "title": "" }, { "docid": "e0aa24319910a3aa8d7fa34c44c65795", "score": "0.6569169", "text": "function Table(data){\n\n tbody.html(\"\");\n data.forEach((ufo) => {\n \n var row = tbody.append(\"tr\");\n Object.entries(ufo).forEach(([key, value]) => { \n var cell = row.append(\"td\");\n cell.text(value);\n });\n });\n}", "title": "" }, { "docid": "5d8d5b0a64b89d2e0c1270c5ea2342e5", "score": "0.6564261", "text": "function ufo_table(d) {\n //clear tbody section for any leftover data from previous filter\n tbody.html(\"\");\n\n //loop through data, append row, and then insert data\n d.forEach((ufo_info) => {\n var row = tbody.append(\"tr\");\n Object.entries(ufo_info).forEach(([key,value]) => {\n var cell = row.append(\"td\");\n cell.text(value);\n });\n });\n}", "title": "" }, { "docid": "af2be8ebed1e47518c7527ffac2c5c7a", "score": "0.65431345", "text": "function showTable(data){\n tbody.html(\"\")\n\n data.forEach((ufoSighting) => {\n var row = tbody.append(\"tr\");\n Object.entries(ufoSighting).forEach(([key, value]) => {\n var cell = row.append(\"td\");\n cell.text(value);\n });\n });\n}", "title": "" }, { "docid": "97ec411a4fc9b80bc38363de02cc0c33", "score": "0.65225226", "text": "function table(dataSet){\n tbody.html(\"\")\n dataSet.forEach((ufo) => {\n var row = tbody.append(\"tr\");\n Object.entries(ufo).forEach(([key, value]) => {\n var cell = row.append(\"td\");\n cell.text(value);\n });\n });\n}", "title": "" }, { "docid": "581c22da9c9bccbcf70e6112ebff862c", "score": "0.6513245", "text": "function tbody(node, index, parent) {\n var next = after(parent, index);\n return !next || element(next, ['tbody', 'tfoot']);\n}", "title": "" }, { "docid": "7f700a6c6303e3f668c456267d458625", "score": "0.6504799", "text": "function dibujarTablaPlanillas(){\n\n \n\n tablePlanillas.innerHTML =\n `<table width=\"100%\" cellpadding=\"0\">\n <thead>\n <tr>\n <th data-sort=\"id-planilla\">ID</th>\n <th data-sort=\"id\">Cedula</th>\n <th data-sort=\"nombre\" width=\"20%\">Contratista</th>\n <th>Monto</th>\n <th>Fecha</th>\n </tr>\n </thead>\n <tbody id=\"databodyPlanillas\">\n \n </tbody>\n </table>`;\n}", "title": "" }, { "docid": "11db1bcf85268fb23d2d3d0086b3032d", "score": "0.65002567", "text": "function manipulationTarget(elem, content) {\n\t\t\t\t\t\t\t\treturn jQuery.nodeName(elem, \"table\") && jQuery.nodeName(content.nodeType !== 11 ? content : content.firstChild, \"tr\") ? elem.getElementsByTagName(\"tbody\")[0] || elem.appendChild(elem.ownerDocument.createElement(\"tbody\")) : elem;\n\t\t\t\t\t\t\t}", "title": "" }, { "docid": "057ed1342d0194e4a8bc2e42a7546a27", "score": "0.6494592", "text": "function buildTable(data){\r\n // First, clear out any existing data\r\n tbody.html(\"\");\r\n}", "title": "" }, { "docid": "931bd65f1f8d298292150472c616d76c", "score": "0.6492846", "text": "function writetable(data){\n\n // Clear table\n tbody.html(\"\");\n\n // Update information with arrow function\n data.forEach((ufo) => {\n var row = tbody.append(\"tr\");\n Object.values(ufo).forEach(value => {\n var cell = row.append(\"td\");\n cell.text(value);\n });\n });\n\n}", "title": "" }, { "docid": "bdc215015107bad56a470c41d0ca011b", "score": "0.6489926", "text": "function deleteTableBody() {\r\n tbody.selectAll(\"tr\").remove()\r\n}", "title": "" }, { "docid": "e07d176bbeca7285556766c5b9c450bf", "score": "0.6488965", "text": "function renderTable() {\n $tbody.innerHTML = \"\";\n for (var i = 0; i < fil.length; i++) {\n // Get get the current UFO object and its fields\n var ufo = fil[i];\n var observations = Object.keys(ufo);\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 < observations.length; j++) {\n // For every observations in the ufo object, create a new cell at set its inner text to be the current value at the current ufo'sobservation\n var observation = observations[j];\n var $cell = $row.insertCell(j);\n $cell.innerText = ufo[observation];\n }\n }\n}", "title": "" }, { "docid": "86cc13a23cb58f4f953024d30920212b", "score": "0.64867806", "text": "function tbody(node, index, parent) {\n var prev = before(parent, index);\n var head = first(node);\n\n /* Previous table section was already omitted. */\n if (\n element(prev, ['thead', 'tbody']) &&\n closing(prev, place(parent, prev), parent)\n ) {\n return false;\n }\n\n return head && element(head, 'tr');\n}", "title": "" }, { "docid": "b618441bec8f8d346379015680091b7a", "score": "0.6476277", "text": "function renderTable() {\r\n $tbody.innerHTML = \"\";\r\n for (i = 0; i < filtered_data.length; i++) {\r\n // Get current ufo info object and its fields\r\n info = filtered_data[i];\r\n fields = Object.keys(info);\r\n // Create a new row in the tbody\r\n $row = $tbody.insertRow(i);\r\n for (j = 0; j < fields.length; j++) {\r\n // For every field in info object, create new cell and set its inner\r\n // text to be the current value at the current info field\r\n field = fields[j];\r\n $cell = $row.insertCell(j);\r\n $cell.innerText = info[field];\r\n }\r\n }\r\n}", "title": "" }, { "docid": "bbca76580f660e010875f5f5e35e475b", "score": "0.6473187", "text": "function updateTable(selectedData){\n tbody.html(\"\");\n selectedData.forEach((ufoSightings)=>{\n var row = tbody.append(\"tr\");\n Object.entries(ufoSightings).forEach(([key, value]) => {\n var cell = row.append(\"td\");\n cell.text(value);\n });\n });\n}", "title": "" }, { "docid": "ba329de0a820b5561aacab623eedddb3", "score": "0.6468181", "text": "inTbody() {\n return this.bvTableRowGroup.isTbody\n }", "title": "" }, { "docid": "08f9da4461750695a5d4675a2f4ada5f", "score": "0.64635783", "text": "function getdata(tdata){\n \n tbody.text(\"\")\n tdata.forEach((ufotable) => {\n var row = tbody.append(\"tr\");\n Object.entries(ufotable).forEach(([key, value]) => {\n var cell = row.append(\"td\").text(value);\n // cell.text(value); \n });\n })\n}", "title": "" }, { "docid": "81ab41d007f2299d8f61d4dc3416ae14", "score": "0.64585483", "text": "function tabla_socio()\n{\n var accion = 'Busca_socio';\n var tipo = $('#sel_socio').val();\n $.post(\"core/controller/ConsultasRCanchasController.php\",{accion:accion,tipo_socio:tipo,cancha:'',periodo:'',rut:'',fecha:'',valor:''},\n function (data)\n {\n $('#so_tbody').remove(); \n var num = data.length; \n var fila = '<tbody id=\"so_tbody\">';\n for(var i = 0; i < num; i++)\n {\n fila+='<tr style=\"cursor:pointer\" class=\"filasm\"><td>'+data[i][0]+'</td><td>'+data[i][1]+'</td></tr>';\n }\n fila+='</tbody>';\n $('#so_tabla').append(fila); \n datatable_tabla_socios();\n },'json'); \n}", "title": "" }, { "docid": "3331b4894295709eefb202c72cc4ba10", "score": "0.64529383", "text": "function createTableBody() {\n if (document.getElementsByTagName(\"tbody\").length) {\n let el = document.getElementsByTagName(\"tbody\");\n el[0].parentElement.removeChild(el[0]);\n let btnRef = document.getElementById('ldBtn');\n btnRef.parentElement.removeChild(btnRef);\n }\n var tableRef = document.getElementById(\"table\");\n var tbodyTag = document.createElement(\"tbody\");\n tableRef.append(tbodyTag);\n}", "title": "" }, { "docid": "d7be6dd66d9d53ae540028e8dabf2090", "score": "0.644964", "text": "function k(e,t){return i(e,\"table\")&&i(11!==t.nodeType?t:t.firstChild,\"tr\")?ge(\">tbody\",e)[0]||e:e}", "title": "" }, { "docid": "19353edb0059f8d93014529e68fda55f", "score": "0.64419067", "text": "function manipulationTarget( elem, content ) {\n return jQuery.nodeName( elem, \"table\" ) &&\n jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n \n elem.getElementsByTagName(\"tbody\")[0] ||\n elem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n elem;\n }", "title": "" }, { "docid": "2cf96309e6a02dae7c0aee1b30e16c20", "score": "0.6432592", "text": "function buildTable(response){\n response.forEach(function(response) {\n let row = setTable(response);\n\n document.getElementById('tableBody').innerHTML += row;\n })\n}", "title": "" }, { "docid": "449ea3941fde8385f836bdccf2366aea", "score": "0.6427041", "text": "function sec4_addSTCTable(tbody){\n //table body\n var res = new Array();\n\n var HeadRow = [\n \"Name of the Course\",\n \"Sponsored by\",\n \"Dates\"\n ];\n res.push(HeadRow);\n //head row added\n\n //adding rows (data)\n for (let index = 0; index < tbody.length; index++) {\n var row = new Array();\n for(let i=0;i<tbody[0].length;i++){\n row.push({\n //colspan: 1,\n text: tbody[index][i],style: 'defaultStyle'});\n }\n \n //add ith row\n res.push(row); \n }\n\n\n return {\n style: 'tableExample',\n table: {widths: [150,150,150],headerRows: 1,body: res}\n }\n}", "title": "" }, { "docid": "1b1187e6210bd8ed92970e3e1d3f6939", "score": "0.6422082", "text": "function populateTable(tableBody, data){\n \n \n}", "title": "" }, { "docid": "eae5569edd0faf0090eb5f093f8d40b3", "score": "0.6414917", "text": "function manipulationTarget(elem, content) {\n return jQuery.nodeName(elem, \"table\") &&\n jQuery.nodeName(content.nodeType !== 11 ? content : content.firstChild, \"tr\") ?\n\n elem.getElementsByTagName(\"tbody\")[0] ||\n elem.appendChild(elem.ownerDocument.createElement(\"tbody\")) :\n elem;\n }", "title": "" }, { "docid": "eae5569edd0faf0090eb5f093f8d40b3", "score": "0.6414917", "text": "function manipulationTarget(elem, content) {\n return jQuery.nodeName(elem, \"table\") &&\n jQuery.nodeName(content.nodeType !== 11 ? content : content.firstChild, \"tr\") ?\n\n elem.getElementsByTagName(\"tbody\")[0] ||\n elem.appendChild(elem.ownerDocument.createElement(\"tbody\")) :\n elem;\n }", "title": "" }, { "docid": "303af69a79eaf184d085f559b87f1002", "score": "0.64065367", "text": "function displayTable(data) {\n tbody.text(\"\")\n console.log(\"Build table\");\n data.forEach(function(UFOSightings) {\n new_tr = tbody.append(\"tr\")\n Object.entries(UFOSightings).forEach(function([key, value]) {\n new_td = new_tr.append(\"td\").text(value)\n })\n })\n}", "title": "" }, { "docid": "487748495c6a9837e89a9e0ad70a4b6e", "score": "0.63959026", "text": "function updateTable(data) {\n let tbody = document.getElementById('tbody');\n let content = ``;\n for (let i = 0; i < data.observations.length; i++) {\n let obs = data.observations[i];\n content += `<tr><td>${obs.sensor_path}</td><td>${obs.value}</td><td>${obs.uom}</td></tr>`;\n }\n tbody.innerHTML =content;\n }", "title": "" }, { "docid": "8e2b820a008b891ea9fa2eea6d1bcca9", "score": "0.6392381", "text": "function renderTable() {\n $tbody.innerHTML = '';\n for (var i = 0; i < tableLimit; i++) {\n // Get get the current data object and its fields\n var data = filteredData[i];\n var fields = Object.keys(data);\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 data 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 = data[field];\n }\n }\n }", "title": "" }, { "docid": "6d8d83d14e2d6d7a6307dd375eb9e6f6", "score": "0.63886094", "text": "function tableCreation(data) {\n tbody.html(\"\");\n\n data.forEach((dataRow) => {\n\n var row = tbody.append(\"tr\");\n\n Object.values(dataRow).forEach((value) => {\n var cell = row.append(\"td\");\n cell.text(value);\n }\n );\n });\n}", "title": "" }, { "docid": "1cc03ebcd09e409ae41a1a95d285b697", "score": "0.6385321", "text": "function manipulationTarget( elem, content ) {\n return jQuery.nodeName( elem, \"table\" ) &&\n jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n \n elem.getElementsByTagName( \"tbody\" )[ 0 ] ||\n elem.appendChild( elem.ownerDocument.createElement( \"tbody\" ) ) :\n elem;\n }", "title": "" }, { "docid": "0ebf34de8951b3cdcf99d51982d09935", "score": "0.63771594", "text": "function deleteTableBody() {\n tbody.selectAll(\"tr\")\n .remove()\n}", "title": "" }, { "docid": "3fb4881a90accde1cf430abecf3287d9", "score": "0.6375734", "text": "function addTableBody()\n{\n\tlet i = 1,\n\t\tcnt = table.rows.length;\n\twhile (++i < cnt)\n\t{\n\t\taddTableRow('TD', table.rows[i]);\n\t}\n\n\tcreateBodyTags(table.rows[2].pos, pos);\n}", "title": "" }, { "docid": "b4e13ab8f5a85b7f8e78b876f7c2070a", "score": "0.6373275", "text": "function manipulationTarget(elem, content) {\n return jQuery.nodeName(elem, 'table') && jQuery.nodeName(content.nodeType !== 11 ? content : content.firstChild, 'tr') ? elem.getElementsByTagName('tbody')[0] || elem.appendChild(elem.ownerDocument.createElement('tbody')) : elem;\n }", "title": "" }, { "docid": "b4e13ab8f5a85b7f8e78b876f7c2070a", "score": "0.6373275", "text": "function manipulationTarget(elem, content) {\n return jQuery.nodeName(elem, 'table') && jQuery.nodeName(content.nodeType !== 11 ? content : content.firstChild, 'tr') ? elem.getElementsByTagName('tbody')[0] || elem.appendChild(elem.ownerDocument.createElement('tbody')) : elem;\n }", "title": "" }, { "docid": "2d09f0466b6e7c449617539ee0e1d00c", "score": "0.63706386", "text": "function index() {\nufotable.forEach((record) => {\n //add a new row for each object\n var row = addtbody.append(\"tr\").attr('class', 'table-row');\n //looping through every object \n Object.entries(record).forEach(([key, value]) => {\n //adding cells th element to html \n var cell = row.append(\"th\");\n //adding cell text value to html\n cell.text(value);\n }) \n });\n}", "title": "" }, { "docid": "8a2551f08ddc018f30d55f95eced997a", "score": "0.63700837", "text": "function init(){\n tableData.forEach((sighting) =>{\n var row = tbody.append(\"tr\");\n Object.values(sighting).forEach(value => {\n var cell = row.append(\"td\");\n cell.text(value);\n });\n });\n}", "title": "" }, { "docid": "c28c939c15f7e7645ea7a00e16521a84", "score": "0.6366577", "text": "function manipulationTarget(elem, content) {\n return jQuery.nodeName(elem, \"table\") &&\n jQuery.nodeName(content.nodeType !== 11 ? content : content.firstChild, \"tr\") ?\n\n elem.getElementsByTagName(\"tbody\")[0] ||\n elem.appendChild(elem.ownerDocument.createElement(\"tbody\")) :\n elem;\n }", "title": "" }, { "docid": "2ff3e9fcb708e861755cc35b2d8b0894", "score": "0.63652164", "text": "function formTable(dataForTable) {\n // Add rows of data for each UFO sighting\n dataForTable.forEach((row) => {\n var t_row = t_body.append(\"tr\");\n\n Object.entries(row).forEach(([k,v]) => {\n t_row.append(\"td\").text(v);\n });\n });\n}", "title": "" }, { "docid": "2d15b985c6c9e420fb7c600f27142738", "score": "0.63628423", "text": "function createTable(data) { //basically, fill the table from \"tbody\"\n tbody.html(\"\"); //clear data, if existing\n\n data.forEach(dataRow => {\n var row = tbody.append(\"tr\"); //'tr' = table row\n \n Object.values(dataRow).forEach((val) => {//(q4 TJ or DK) \"val\" in this case is pre-determined as \"value\" from the function\n var cell = row.append(\"td\");//\"td\" = table data in each cell\n cell.text(val); //(q4 TJ or DK) \"val\" in this case is pre-determined as \"value\" from the function\n }\n );\n });\n}", "title": "" }, { "docid": "f38c5a2c0b9da788ec32b9be221e9fd1", "score": "0.6362353", "text": "_getTbody(data,columnHeader,footer){if(data!==void 0&&null!==data&&0<data.length){let ch=columnHeader?1:0,tbody;if(footer){tbody=data.slice(ch,data.length-1);this.__tfoot=data.slice(data.length-1)}else{tbody=data.slice(ch,data.length);this.__tfoot=[]}return tbody}return[]}", "title": "" }, { "docid": "dbd50194b3d68b951fae634fdeb11f61", "score": "0.6359552", "text": "function masterTable(ufoData) {\n tbody.html(\"\");\n ufoData.forEach((ufoObjects) => {\n var row = tbody.append(\"tr\");\n // only need value since we already have the keys set-up\n Object.values(ufoObjects).forEach((value) => {\n var cell = row.append(\"td\");\n cell.text(value);\n })\n }) \n}", "title": "" }, { "docid": "029102ec74929db70764230a95d54850", "score": "0.63568413", "text": "function manipulationTarget( elem, content ) {\n return jQuery.nodeName( elem, \"table\" ) &&\n jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n elem.getElementsByTagName(\"tbody\")[0] ||\n elem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n elem;\n}", "title": "" }, { "docid": "cd94ae791a239acf6491bf3d19d0938f", "score": "0.6356275", "text": "function doTable1(){\n let neocpTab = document.getElementById('tbody1');\n let tabBod = \"\";\n /* build contents of table body */\n for (let i = 0; i < neocps.length; i++) {\n if (neocps[i].visible === true) {\n tabBod+=\"<tr>\";\n tabBod+=\"<td><input type=\\\"checkbox\\\" name=\\\"Obj\\\"></td>\";\n if (pccp.includes(neocps[i].id)) {\n tabBod+=\"<td>* \" + neocps[i].id + \"</td>\";\n } else {\n tabBod+=\"<td>\" + neocps[i].id + \"</td>\";\n } \n tabBod+=\"<td>\" + neocps[i].v + \"</td>\";\n tabBod+=\"<td>\" + neocps[i].score + \"</td>\";\n let ra = neocps[i].coord.x/(toRadians * 15);\n tabBod+=\"<td>\" + ra.toFixed(3) + \"</td>\";\n let dec = neocps[i].coord.y/toRadians;\n tabBod+=\"<td>\" + dec.toFixed(2) + \"</td>\";\n tabBod+=\"<td>\" + neocps[i].updated + \"</td>\";\n tabBod+=\"<td>\" + neocps[i].obs + \"</td></tr>\";\n }\n }\n neocpTab.innerHTML = tabBod; \n}", "title": "" }, { "docid": "bcc40ea7a22ed5849f258621d18f277d", "score": "0.6353203", "text": "function manipulationTarget(elem, content) {\n\t\t\treturn jQuery.nodeName(elem, \"table\") && jQuery.nodeName(content.nodeType !== 11 ? content : content.firstChild, \"tr\") ? elem.getElementsByTagName(\"tbody\")[0] || elem.appendChild(elem.ownerDocument.createElement(\"tbody\")) : elem;\n\t\t}", "title": "" }, { "docid": "0663b4aefba861beb492abc5a61439c8", "score": "0.63492656", "text": "function deleteTbody() {\n d3.select(\"#ufo-body\")\n .selectAll(\"tr\").remove()\n .selectAll(\"td\").remove();\n }", "title": "" }, { "docid": "fa96e9476182dc142dda4601040af737", "score": "0.6346233", "text": "function createTable() {\n tableData.forEach((sighting) => {\n var row = tbody.append(\"tr\");\n Object.entries(sighting).forEach(([key, value]) => {\n var cell = row.append(\"td\");\n cell.text(value);\n });\n });\n}", "title": "" }, { "docid": "67ad941658e98e6fe38b4d5cd3a3fd1e", "score": "0.63457274", "text": "function buildTable(data){\n\n data.forEach(element => {\n\n var row = tbody.append(\"tr\");\n Object.values(element).forEach(value => {\n var cell = row.append(\"td\");\n cell.text(value);\n });\n\n\n })\n\n}", "title": "" }, { "docid": "a156d09509fa9b0864e7d4197e8ca658", "score": "0.63445956", "text": "function manipulationTarget( elem, content ) {\n return jQuery.nodeName( elem, \"table\" ) &&\n jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n elem.getElementsByTagName(\"tbody\")[0] ||\n elem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n elem;\n }", "title": "" }, { "docid": "b34264920748e0013b4c746272f1fcaa", "score": "0.63386875", "text": "function getHallTable(data) {\n $('table#halls').append('<tr id=\"0\"><th></th></tr>');\n $.each(data, (i, hall) => {\n let newCell = '<th>' + hall.name + '</th>';\n $(newCell).appendTo( 'tr#0' );\n });\n\n let years = ['First', 'Second', 'Third', 'Fourth']; let newElem = '';\n $.each(years, (i, year) => {\n newElem = '<tr id=\"' + (i+1) + '\"><td>' + year + '</td></tr>';\n $(newElem).appendTo( 'table#halls' );\n\n $.each(data, (j, hall) => {\n if ( hall.years.includes(i+1) ) {\n newElem = '<td> X </td>';\n } else {\n newElem = '<td></td>';\n } //console.log(newElem);\n $(newElem).appendTo( 'tr#' + (i+1) )\n });\n });\n}", "title": "" }, { "docid": "12641840dd8b41bc8412a0eb31829cdc", "score": "0.63366693", "text": "function updateTableContent(tableBodyId){\n $(tableBodyId).empty();\n var queryString = \"/cars/ownerRest/\" +\n \"?name=\" + $(\"#name\").val() +\n \"&lastName=\" + $(\"#lastName\").val() +\n \"&nationality=\" + $(\"#nationality\").val() +\n \"&dni=\" + $(\"#dni\").val() + \"&offset=\" + $(\"#offset\").val()\n\n $.getJSON(queryString, function(data){\n var tableBody = $(tableBodyId);\n var totalRows = data.content.cantItems;\n for (var i = 0, len = data.content.owner.length; i < len; i++) {\n //alert(tableElement);\n var item=data.content.owner[i];\n tableBody.append($('<tr>')\n .attr('attr-id',item.id)\n .append($('<td>')\n .text(item.id)\n .attr('class','active'))\n .append($('<td>')\n .text(item.name)\n .attr('class','success'))\n .append($('<td>')\n .text(item.lastName)\n .attr('class','success'))\n .append($('<td>')\n .text(item.dni)\n .attr('class','success'))\n .append($('<td>')\n .text(item.nationality)\n .attr('class','success'))\n );\n };\n\n //After appending\n addRowHandlers(\"#ownersTable\", '#myModal',loadOwnerInModal);\n updateTableHeader(\"#ownersTable\",'#ownerTableHead');\n updatePaginateButtons(\"#ownersTable\",'#paginateButtons',totalRows);\n });\n}", "title": "" }, { "docid": "c926202cb782f13cea79f545ab6a6487", "score": "0.63357955", "text": "function renderTable(table){\n tbody.html(\"\");\n table.forEach(sighting => {\n var row = tbody.append(\"tr\");\n Object.entries(sighting).forEach(([key, value]) => {\n var cell = row.append(\"td\");\n cell.text(value);\n });\n });\n}", "title": "" }, { "docid": "d772d5b3b88f6d1b57110a357f009eed", "score": "0.6327265", "text": "function manipulationTarget(elem, content) {\n return jQuery.nodeName(elem, \"table\") && jQuery.nodeName(content.nodeType !== 11 ? content : content.firstChild, \"tr\") ? elem.getElementsByTagName(\"tbody\")[0] || elem.appendChild(elem.ownerDocument.createElement(\"tbody\")) : elem;\n }", "title": "" }, { "docid": "b308b4a7749c84163fda3d57df795403", "score": "0.63272417", "text": "function newBody(arg) {\n var body = $('<div></div>');\n for (var i=0;i<arg.sortArr.length;i++) {\n var tr = newRow(arg.rowArr[arg.sortArr[i]]);\n body.append(tr);\n };\n arg.tr.remove();\n arg.table.find('tbody').append(body.children());\n }", "title": "" }, { "docid": "27cd1f6bbf16a4ace66bdb1bf931fe78", "score": "0.63250494", "text": "function AppendRowsToTable(table, tbody, rows)\n{\n\tfor(var i=0;i<rows.length;i++)\n\t{\n\t\ttbody.appendChild(rows[i]);\n\t}\n\ttable.appendChild(tbody);\n}", "title": "" }, { "docid": "859d62d83b754ceb3f43fd41a9b5edb3", "score": "0.63209504", "text": "function manipulationTarget( elem, content ) {\n return jQuery.nodeName( elem, \"table\" ) &&\n jQuery.nodeName( content.nodeType === 1 ? content : content.firstChild, \"tr\" ) ?\n\n elem.getElementsByTagName(\"tbody\")[0] ||\n elem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n elem;\n}", "title": "" }, { "docid": "6775bd5d22dfc7d4c2500333f527f99b", "score": "0.6312672", "text": "function resetTable() {\n\n // clear the current data\n clearTable();\n\n //clear the current form filters\n resetForm();\n\n // use forEach and Object.values to populate the initial table\n data.forEach((ufoSighting) => {\n var row = tbody.append(\"tr\");\n Object.values(ufoSighting).forEach(value => {\n var cell = row.append(\"td\");\n cell.text(value);\n cell.attr(\"class\", \"table-style\");\n }); // close second forEach\n }); // close first forEach\n\n}", "title": "" }, { "docid": "c2c88417da12bb8aa096533079357bdd", "score": "0.6308912", "text": "function manipulationTarget( elem, content ) {\r\n\treturn jQuery.nodeName( elem, \"table\" ) &&\r\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\r\n\r\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\r\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\r\n\t\telem;\r\n}", "title": "" }, { "docid": "c2c88417da12bb8aa096533079357bdd", "score": "0.6308912", "text": "function manipulationTarget( elem, content ) {\r\n\treturn jQuery.nodeName( elem, \"table\" ) &&\r\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\r\n\r\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\r\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\r\n\t\telem;\r\n}", "title": "" }, { "docid": "096bedd97c91fca6fdfdf58d24310458", "score": "0.63068235", "text": "function filterDesignTableGrid(object,tbody){\n\tvar optimumOrder = object.optimumOrder;\n\tvar capacitor = object.capacitor;\n\tvar inductor = object.inductor;\n\ttbody.empty();\n\t\n\tfor (var i = 0; i < optimumOrder; i++){\n\t\tvar $tr = $(\"<tr/>\");\n\t\tvar num = i+1;\n\t\tvar capacitorVal = DESIGNER.Constants.getNullToZero(capacitor[i],4);\n\t\tvar inductorVal = DESIGNER.Constants.getNullToZero(inductor[i],4);\n\t\t\n\t\t$(\"<td/>\").addClass(\"col-md-2 text-center\").html(num).appendTo($tr);\n\t\t$(\"<td/>\").addClass(\"col-md-5 text-center\").html(capacitorVal).appendTo($tr);\n\t\t$(\"<td/>\").addClass(\"col-md-5 text-center\").html(inductorVal).appendTo($tr);\n\t\t$tr.appendTo(tbody);\n\t}\n}", "title": "" }, { "docid": "508b1229caf538fedeeea6446d589957", "score": "0.6301759", "text": "function sec2_addConferenceTable(tbody){\n var res = new Array();\n var HeadRow = [\n {text: 'S No', style: 'tableHeader'}, \n {text: 'Details of paper:Authors names (sequence as in paper), Title of paper, Name of Conference, (Year), Page nos of proceedings.', style: 'tableHeader'}, \n {text: 'Please mention indexed with:SCI & Web of Science/SCI/SCOPUS/not indexed', style: 'tableHeader'}, \n {text: 'Names of co-authors', style: 'tableHeader'} \n ]\t;\n\n res.push(HeadRow);\n\n //adding rows (data)\n for (let index = 0; index < tbody.length; index++) {\n var row = new Array();\n for(let i=0;i<tbody[0].length;i++){\n row.push({\n colspan: 1,\n text: tbody[index][i],\n //text :\"Random\" ,\n style: 'defaultStyle'\n });\n } \n res.push(row); \n }\n\n\n\n return {\n style: 'tableExample',\n table: { //no of rows as table head\n //total = 450\n widths: [50, 150,150,150,150],\n //widths: ['8%', '15%', '10%', '10%', '15%', '30%', '10%', '17%'],\n headerRows: 1, \n body: res\n \n }\n }\n}", "title": "" }, { "docid": "7f7e1456884886051f06f0e7d7defdc0", "score": "0.6298107", "text": "function fillTabe(data){\n const trData = data.map(user =>{\n return `\n <td>${user.id}</td>\n <td>${user.name}</td>\n <td>${user.username}</td>\n <td>${user.email}</td>\n `;\n });\n\n const tbody = document.createElement(\"tbody\");\n trData.forEach(tr => tbody.innerHTML += tr);\n\n if(table.children[1]){\n table.replaceChild(tbody, table.children[1]);\n\n }else{\n table.appendChild(tbody);\n }\n}", "title": "" }, { "docid": "c2a27b899031d3373d85f3579fe25612", "score": "0.6294239", "text": "function renderTable(){\n let birthdays = getModel();\n \n // clear table == delete old table body and create new\n var table = document.getElementById(\"birthdayRecords\");\n \n var old_tbody = table.getElementsByTagName(\"tbody\")[0];\n old_tbody.remove();\n \n // generate from new\n var rows_num = birthdays.length;\n var new_tbody = document.createElement('tbody');\n \n if(rows_num > 0){ \n var new_row = \"\";\n for(var i=0; i<rows_num; i++){\n new_row = generate_row(birthdays[i], new_tbody);\n new_tbody.appendChild(new_row);\n }\n table.appendChild( new_tbody );\n }else{\n var nodata_row = '<tr><td colspan=\"4\">input birthdates of your friends and loved ones &#127752;</td></tr>';\n table.insertAdjacentHTML( 'beforeend', nodata_row );\n }\n\n}", "title": "" }, { "docid": "be4c3b5546407cdc8d1e749dc4613a89", "score": "0.6293507", "text": "function tableHandler(sighting){\n let row = tbody.append(\"tr\");\n Object.entries(sighting).forEach(function ([key, value]) {\n let cell = row.append(\"td\");\n cell.text(value);\n });\n}", "title": "" }, { "docid": "425deab30177d447f4a18ffbe550d70f", "score": "0.62789017", "text": "function resetTable(table) {\n let dataBody = document.getElementById(\"dataBody\");\n let newBody = document.createElement(\"tbody\");\n newBody.setAttribute(\"id\", \"dataBody\");\n\n table.replaceChild(newBody, dataBody);\n}", "title": "" }, { "docid": "d72b9b09488006b9cebda17c7bab1e6f", "score": "0.62750983", "text": "function renderTable() {\n\n var endingIndex = startingIndex + resultsPerPage;\n\n // Looping through data\n for (let i = 0; i < filteredList.length; i++) {\n \n let $row = $tbody.insertRow(i);\n let currentList = filteredList[i];\n let fields = Object.keys(currentList);\n\n for(let j = 0; j < fields.length; j++) {\n let field = fields[j];\n let $cell = $row.insertCell(j);\n $cell.innerText = currentList[field];\n };\n };\n}", "title": "" }, { "docid": "efd36f00cdc7284b099bea3a69cf8cde", "score": "0.6270966", "text": "function manipulationTarget(elem, content) {\n\t\treturn jQuery.nodeName(elem, \"table\") && jQuery.nodeName(content.nodeType !== 11 ? content : content.firstChild, \"tr\") ? elem.getElementsByTagName(\"tbody\")[0] || elem.appendChild(elem.ownerDocument.createElement(\"tbody\")) : elem;\n\t}", "title": "" }, { "docid": "ffad4c15430b28927367a2e81b64c441", "score": "0.6268935", "text": "function buildTable(data) {\r\n tbody.html(\"\");\r\n// looping from each data and append the row\r\ndata.forEach((dataRow) => {\r\n var row = tbody.append(\"tr\");\r\n// each value as data element\r\n Object.values(dataRow).forEach((val) => {\r\n var cell = row.append(\"td\");\r\n cell.text(val);\r\n\r\n });\r\n });\r\n}", "title": "" }, { "docid": "d996ffdf3aff514dcd78612f3e762da2", "score": "0.62679434", "text": "function renderTable() {\n // Clear the tbody first \n $tbody.innerHTML = \"\";\n\n for (var i = 0; i < ufoSightingsData.length; i++) {\n // Get each ufoSightings object and its fields\n var ufoSightings = ufoSightingsData[i];\n var fields = Object.keys(ufoSightings);\n\n // Create a new row in the tbody, then set the index to increase by i\n var $row = $tbody.insertRow(i);\n\n for (var j = 0; j < fields.length; j++) {\n // For every field in the ufoSightings object, create a new cell\n // Then set the inner text to be the current values of the current ufoSightings's field\n var field = fields[j];\n var $cell = $row.insertCell(j);\n $cell.innerText = ufoSightings[field];\n }\n }\n}", "title": "" }, { "docid": "8ae5c57ca95f5104ba584cdf1b70c489", "score": "0.626568", "text": "function populateTable(data) {\n\n // Clear Any Existing Table Data\n tbody.html(\"\");\n\n // Loop Through Each Object in TableData\n data.forEach((tableObject) => {\n\n // Append a Row to the Table Body for Each Object in TableData\n var row = tbody.append(\"tr\");\n\n // Loop Through Each Value in Given Object\n Object.values(tableObject).forEach((objectValue) => {\n\n // Append a Cell to Given Row for Each Value\n var cell = row.append(\"td\");\n cell.text(objectValue);\n });\n });\n}", "title": "" }, { "docid": "222cb6ff1722633be222f1233f5958f9", "score": "0.62632805", "text": "function fillTheTable(dataTable) {\n tbody.html(\"\");\n dataTable.forEach((energyData) => {\n var row = tbody.append(\"tr\");\n\n var cell = row.append(\"td\");\n cell.text(energyData.country)\n\n cell = row.append(\"td\");\n cell.text(energyData.year)\n\n cell = row.append(\"td\");\n cell.text(energyData.source)\n\n cell = row.append(\"td\");\n cell.text(energyData.units.toFixed(4))\n\n cell = row.append(\"td\");\n cell.text(energyData.percent.toFixed(4))\n });\n }", "title": "" }, { "docid": "87ceaf1d181ef82af3f02767dad8c9c9", "score": "0.6261921", "text": "function manipulationTarget( elem, content ) {\r\n\treturn jQuery.nodeName( elem, \"table\" ) &&\r\n\t\tjQuery.nodeName( content.nodeType === 1 ? content : content.firstChild, \"tr\" ) ?\r\n\r\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\r\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\r\n\t\telem;\r\n}", "title": "" }, { "docid": "dfe5d34429dab57037cceff9b277768a", "score": "0.6261734", "text": "function updateTable(filtered_data) {\n //When the user submits, have the new information append to the table\n filtered_data.forEach(instance => {\n var row = tbody.append(\"tr\");\n Object.entries(instance).forEach(([key, value]) => {\n var cell = row.append(\"td\");\n cell.text(value);\n });\n }); \n}", "title": "" }, { "docid": "5a315999aa06aab5bf5aacdfd725d295", "score": "0.6258877", "text": "function createTable(data) {\n tbody.html(\"\");\n data.forEach((sighting) => {\n var row = tbody.append(\"tr\");\n Object.entries(sighting).forEach(([key, value]) => {\n var cell = row.append(\"td\");\n cell.text(value);\n });\n });\n}", "title": "" }, { "docid": "b34e35ed89e1ba49663796264c48e1d6", "score": "0.6252905", "text": "function loadTable(listObj) {\n $.each(listObj, function(index, obj) {\n // get element of th\n // $('table tbody tr').remove();\n var thData = $('table thead tr th');\n var tr = $(`<tr></tr>`);\n tr.data(obj);\n // map td with th \n $.each(thData, function(index, _item) {\n var fieldName = $(_item).attr('fieldName');\n var value = obj[fieldName];\n var field = fieldName + '';\n if (field.toLowerCase() == \"checkbox\") {\n var td = $(`<td style=\"text-align: center;\"><input type=\"checkbox\"></td>`);\n td.children('input').addClass(\"checkbox\");\n td.children('input').data(obj);\n } else if (field.toLowerCase().includes(\"date\")) {\n var td = $(`<td style=\"text-align: center;\"></td>`);\n td.append(value);\n } else if (field.toLowerCase() == \"salary\") {\n var td = $(`<td style=\"text-align: end;\"></td>`);\n td.append(value);\n } else {\n var td = $(`<td></td>`);\n td.append(value);\n }\n tr.append(td);\n // tr.data()\n $(\"tbody\").append(tr);\n })\n })\n}", "title": "" }, { "docid": "7eedd40290210c769f48ac16ab02057d", "score": "0.6247446", "text": "function buildHtmlTable(selector, myList, loaded, headers) {\n\t\tvar body = $(selector + ' tbody');\n\t\tvar columns = addAllColumnHeaders(myList, selector, loaded, headers);\n\n\t\tfor (var i = 0; i < myList.length; i++) {\n\n\t\t\tvar row$ = $('<tr/>');\n\n\n\t\t\tfor (var colIndex = 0; colIndex < columns.length; colIndex++) {\n\t\t\t\tvar cellValue = myList[i][columns[colIndex]];\n\t\t\t\tif (cellValue == null) cellValue = \"\";\n\t\t\t\tvar head = columns[colIndex];\n\n\t\t\t\tif (head == 'Amount' || head == 'Price' || head == \"Total\") {\n\t\t\t\t\tif (cellValue !== \"\" && cellValue !== undefined) {\n\t\t\t\t\t\tvar dec = fixedDecimals;\n\t\t\t\t\t\tif (head == 'Price')\n\t\t\t\t\t\t\tdec += 2;\n\t\t\t\t\t\tvar num = '<span data-toggle=\"tooltip\" title=\"' + cellValue.toString() + '\">' + cellValue.toFixed(dec) + '</span>';\n\t\t\t\t\t\trow$.append($('<td/>').html(num));\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\trow$.append($('<td/>').html(cellValue));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (head == 'Token' || head == 'Base') {\n\n\t\t\t\t\tlet token = cellValue;\n\t\t\t\t\tif (token) {\n\t\t\t\t\t\tlet popoverContents = _delta.makePopoverContents(token);\n\t\t\t\t\t\tlet labelClass = 'label-warning';\n\t\t\t\t\t\tif (!token.unlisted)\n\t\t\t\t\t\t\tlabelClass = 'label-primary';\n\n\t\t\t\t\t\trow$.append($('<td/>').html('<a tabindex=\"0\" class=\"label ' + labelClass + '\" role=\"button\" data-html=\"true\" data-toggle=\"popover\" data-placement=\"auto right\" title=\"' + token.name + '\" data-container=\"body\" data-content=\\'' + popoverContents + '\\'>' + token.name + '</a>'));\n\t\t\t\t\t} else {\n\t\t\t\t\t\trow$.append('<td> </td>');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (head == 'Type') {\n\t\t\t\t\tif (cellValue == 'Deposit' || cellValue == 'Approve' || cellValue == 'Wrap ETH') {\n\t\t\t\t\t\trow$.append($('<td/>').html('<span class=\"label label-success\" >' + cellValue + '</span>'));\n\t\t\t\t\t}\n\t\t\t\t\telse if (cellValue == 'Withdraw' || cellValue == 'Unwrap ETH') {\n\t\t\t\t\t\trow$.append($('<td/>').html('<span class=\"label label-danger\" >' + cellValue + '</span>'));\n\t\t\t\t\t}\n\t\t\t\t\telse if (cellValue == 'Cancel sell' || cellValue == 'Cancel buy') {\n\t\t\t\t\t\trow$.append($('<td/>').html('<span class=\"label label-default\" >' + cellValue + '</span>'));\n\t\t\t\t\t}\n\t\t\t\t\telse if (cellValue == 'Taker Buy' || cellValue == 'Buy up to' || cellValue == 'Maker Buy') {\n\t\t\t\t\t\trow$.append($('<td/>').html('<span class=\"label label-info\" >' + cellValue + '</span>'));\n\t\t\t\t\t}\n\t\t\t\t\telse if (cellValue == 'Taker Sell' || cellValue == 'Sell up to' || cellValue == 'Maker Sell') {\n\t\t\t\t\t\trow$.append($('<td/>').html('<span class=\"label label-info\" >' + cellValue + '</span>'));\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\trow$.append($('<td/>').html('<span>' + cellValue + '</span>'));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (head == 'Hash') {\n\t\t\t\t\trow$.append($('<td/>').html(_util.hashLink(cellValue, true, true)));\n\t\t\t\t}\n\t\t\t\telse if (head == 'Status') {\n\t\t\t\t\tif (cellValue)\n\t\t\t\t\t\trow$.append($('<td align=\"center\"/>').html('<i title=\"success\" style=\"color:green;\" class=\"fa fa-check\"></i>'));\n\t\t\t\t\telse\n\t\t\t\t\t\trow$.append($('<td align=\"center\"/>').html('<i title=\"failed\" style=\"color:red;\" class=\"fa fa-exclamation-circle\"></i>'));\n\t\t\t\t}\n\t\t\t\telse if (head == 'Info') {\n\n\t\t\t\t\trow$.append($('<td/>').html('<a href=\"' + cellValue + '\" target=\"_blank\"><i class=\"fa fa-ellipsis-h\"></i></a>'));\n\t\t\t\t}\n\t\t\t\telse if (head == 'Date') {\n\t\t\t\t\trow$.append($('<td/>').html(_util.formatDate(cellValue, false, true)));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\trow$.append($('<td/>').html(cellValue));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tbody.append(row$);\n\t\t\t$(\"[data-toggle=popover]\").popover();\n\t\t\t$('[data-toggle=tooltip]').tooltip({\n\t\t\t\t'placement': 'top',\n\t\t\t\t'container': 'body'\n\t\t\t});\n\t\t}\n\t}", "title": "" }, { "docid": "9f0a8497db3a681174a1ec459dd63395", "score": "0.6245014", "text": "function renderTable() {\r\n $tbody.innerHTML = \"\";\r\n for (var i = 0; i < filteredData.length; i++) {\r\n // Get get the current sighting object and its fields\r\n var sighting = filteredData[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 sighting object, create a new cell at set its inner text to be the current value at the current sighting'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": "fc7e6c2d3fad7c6ddad9add9e24c98d2", "score": "0.623828", "text": "function manipulationTarget( elem, content ) {\n\t\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\t\n\t\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\t\telem;\n\t}", "title": "" }, { "docid": "fc7e6c2d3fad7c6ddad9add9e24c98d2", "score": "0.623828", "text": "function manipulationTarget( elem, content ) {\n\t\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\t\n\t\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\t\telem;\n\t}", "title": "" }, { "docid": "fc7e6c2d3fad7c6ddad9add9e24c98d2", "score": "0.623828", "text": "function manipulationTarget( elem, content ) {\n\t\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\t\n\t\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\t\telem;\n\t}", "title": "" }, { "docid": "fc7e6c2d3fad7c6ddad9add9e24c98d2", "score": "0.623828", "text": "function manipulationTarget( elem, content ) {\n\t\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\t\n\t\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\t\telem;\n\t}", "title": "" }, { "docid": "7f8bdebd80af372501ae5fa977b750bc", "score": "0.6229251", "text": "function printTable(new_array) {\n \n var tbody = d3.select(\"tbody\");\n //var tbody_id = d3.select(tbody).attr(\"id\",\"printTable\")\n\n var tbody_info = tbody.html(); \n \n\n if (tbody_info != ''){\n var all_tr = d3.select(\"tbody\").selectAll(\"tr\").remove();\n var all_td = d3.select(\"tbody\").selectAll(\"td\").remove();\n }\n\n//\n//loop thru the array to display on screen using tr and td within tbody\n//\n \n new_array.forEach((incident) => {\n var row = tbody.append(\"tr\");\n Object.entries(incident).forEach(([key, value]) => {\n var cell = row.append(\"td\");\n cell.text(value);\n });\n });\n\n console.log('function - printTable is finished');\n}", "title": "" }, { "docid": "3a4bc7cf3c628c094d6fb82cc55df9b2", "score": "0.62264186", "text": "function renderTable() {\n $tbody.innerHTML = \"\";\n for (var i = 0; i < UFOdata.length; i++) {\n // Get get the sightings object and its fields\n var CurrentSighting = UFOdata[i];\n var fields = Object.keys(CurrentSighting);\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 CurrentSighting object, create a new cell at set its inner text to be the current value at the current sightings field\n var field = fields[j];\n var $cell = $row.insertCell(j);\n $cell.innerText = CurrentSighting[field];\n }\n }\n}", "title": "" }, { "docid": "de85bb5cb8f194ebd5c5c109307fa3b8", "score": "0.62216103", "text": "function manipulationTarget( elem, content ) {\r\n\tif ( nodeName( elem, \"table\" ) &&\r\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\r\n\r\n\t\treturn jQuery( elem ).children( \"tbody\" )[ 0 ] || elem;\r\n\t}\r\n\r\n\treturn elem;\r\n}", "title": "" }, { "docid": "62b2ee80bf164787272a6650fb8c1c41", "score": "0.6218964", "text": "function renderTable() {\n $tbody.innerHTML = \"\";\n for (var i = 0; i < filteredUFO.length; i++) {\n // Get get the current address object and its fields\n var ufo = filteredUFO[i];\n var fields = Object.keys(ufo);\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 = ufo[field];\n }\n }\n}", "title": "" }, { "docid": "ef98b04bf5e2f8f87d04588d6f1ec1a6", "score": "0.6218601", "text": "function renderTable() {\n $tbody.innerHTML = \"\";\n\n //iter through list of dictionaries in data.js\n for (var i = 0; i < filteredData.length; i++) {\n\n //get dictionary and keys\n var dict = filteredData[i];\n var keys = Object.keys(dict);\n\n //new row\n var $row = $tbody.insertRow(i);\n\n //iter through keys and insert each value to a cell\n for (var j = 0; j < keys.length; j++) {\n var key = keys[j];\n var $cell = $row.insertCell(j);\n $cell.innerText = dict[key];\n }\n }\n}", "title": "" } ]
7583e2238b27fc0a7a8e74612a01b535
This function is called when an error occurred during the fetch github stats' process. The most common error is that the repository the user requested is not valid (it doesn't exist).
[ { "docid": "e14cc86b26bda63bee30d81f1daa4d5c", "score": "0.74141306", "text": "function gettingStatsFailed(error) {\n console.log(\"gettingStatsFailed\");\n console.log(error);\n vm.labels = [];\n vm.data = [[],[]];\n vm.responseCallback = \"error \" + error.status + \" \" + error.statusText +\n \" : \" + vm.userName + \"/\" + vm.repoName + \" is not a valid repository.\";\n }", "title": "" } ]
[ { "docid": "6e3962d747c76565b6bf35c98919dd32", "score": "0.6474429", "text": "async function showGithubInfoConError() {\n try {\n let response = await fetch(\n \"https://api.github.com/users/fernandopaz1/repos\"\n ); // esto seria una promesa pero con await se transforma en el valor de la promesa\n let repos = await response.json(); // pasaar a json devuelve tambien promesa pero el await me lo convierte a json\n console.log(repos);\n } catch (error) {\n // todos los posibles errores del bloque try van a parar a este catch\n console.log(error);\n }\n}", "title": "" }, { "docid": "8d92c38c88cae48488222367f7b9a12c", "score": "0.6100905", "text": "function missingActualRepo(name) {\n result.push(`missing repo ${colorBad(name)}`);\n }", "title": "" }, { "docid": "3fc92cedfe7501c2ef5527ad97299260", "score": "0.59114534", "text": "function handlePullError(xhr, error) {\n if (!remote.isConnected()) {\n return;\n }\n\n switch (xhr.status) {\n // Session is invalid. User is still login, but needs to reauthenticate\n // before sync can be continued\n case 401:\n remote.trigger('error:unauthenticated', error);\n return remote.disconnect();\n\n // the 404 comes, when the requested DB has been removed\n // or does not exist yet.\n //\n // BUT: it might also happen that the background workers did\n // not create a pending database yet. Therefore,\n // we try it again in 3 seconds\n //\n // TODO: review / rethink that.\n //\n case 404:\n return global.setTimeout(remote.pull, 3000);\n\n case 500:\n //\n // Please server, don't give us these. At least not persistently\n //\n remote.trigger('error:server', error);\n global.setTimeout(remote.pull, 3000);\n return hoodie.checkConnection();\n default:\n // usually a 0, which stands for timeout or server not reachable.\n if (xhr.statusText === 'abort') {\n // manual abort after 25sec. restart pulling changes directly when connected\n return remote.pull();\n } else {\n\n // oops. This might be caused by an unreachable server.\n // Or the server cancelled it for what ever reason, e.g.\n // heroku kills the request after ~30s.\n // we'll try again after a 3s timeout\n //\n global.setTimeout(remote.pull, 3000);\n return hoodie.checkConnection();\n }\n }\n }", "title": "" }, { "docid": "0246f47e1da9de399ac9c98d0f8baeb6", "score": "0.5865075", "text": "function getDataFromGithub () {\n let client = {\n host: 'github.com',\n port: '80',\n path: '/'\n };\n Http.get(client, function (response) {\n if (response.statusCode < 400) {\n console.log(`GET status ${response.statusCode}: ${JSON.stringify(response.headers)}`);\n\n } else {\n throw new Error(`${response.statusCode}: Unable to GET ${client.host}:${client.port}${client.path}`);\n }\n\n }).on('error', console.error);\n}", "title": "" }, { "docid": "793b826dd3faf302dd76236d554ccfdd", "score": "0.57790357", "text": "function watchStatsFromGithubByUserAndRepo(user, repo) {\n\n // Check if the fields are filled\n var error = false;\n if (!vm.userName) {\n vm.userNameError = \"You must provide a github user\";\n error = true;\n }\n if (!vm.repoName) {\n vm.repoNameError = \"You must provide a github repository\";\n error = true;\n }\n\n if (!error) {\n // No error at this stage, Let's try to get github data\n vm.userNameError = vm.repoNameError = undefined;\n vm.responseCallback = undefined;\n vm.errorMessage = undefined;\n\n // Call of our service to get github data\n watchStatsFromGithub(user + '/' + repo);\n }\n else {\n // Empty the graph if an error has occurred.\n // This is useful when the graph was already displayed when\n // the error occurred\n vm.labels = [];\n vm.data = [[],[]];\n }\n }", "title": "" }, { "docid": "d0890c8aae9a9e43171326f55d2d6baa", "score": "0.5745484", "text": "constructor(api, args, origError) {\n super(`Error calling github: ${api}\\n\\twith: ${JSON.stringify(args)}.\\n\\t${origError.message}`);\n }", "title": "" }, { "docid": "b094ed883213ca199a07397ff200614d", "score": "0.5730872", "text": "function handleError(err) {\n\t\t\t\t\t// Log\n\t\t\t\t\tme.log(\n\t\t\t\t\t\t'warn',\n\t\t\t\t\t\t`Feedr === fetching [${feed.url}] to [${feed.path}], failed`,\n\t\t\t\t\t\terr.stack\n\t\t\t\t\t)\n\n\t\t\t\t\t// Exit\n\t\t\t\t\tif (feed.cache) {\n\t\t\t\t\t\tviaCache(next)\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\tviaRequestComplete(err, opts.data, requestOptions.headers)\n\t\t\t\t}", "title": "" }, { "docid": "10b4d29cbfe3e844454865fe7772ff19", "score": "0.56419414", "text": "function watchStatsFromGithub(repo) {\n githubstatsservice.getGithubStats(repo)\n .then(displayStats)\n .then(displayHistory)\n .then(getTrends)\n .then(getRequestsHistory)\n .catch(gettingStatsFailed);\n }", "title": "" }, { "docid": "48a47405c7a14ef1823f0ab86c39ab35", "score": "0.56020087", "text": "function fetchIssue({owner, repository, number}) {\n return this.getData({path:`/repos/${owner}/${repository}/issues/${number}`})\n .then(response => {\n return response.data;\n });\n}", "title": "" }, { "docid": "650288410951dad65bf2a11ce19837ac", "score": "0.5576058", "text": "function getRepos(){\n let handle = $('#handle').val();\n let url = `https://api.github.com/users/${handle}/repos`\n fetch(url) \n .then(response => {\n if(response.ok) {\n return response.json();\n }\n throw new Error(response.statusText)\n })\n .then(responseJson => displayResults(responseJson))\n .catch(err => alert(`Something went wrong! ${err}`));\n}", "title": "" }, { "docid": "e7d1466aea041298a0f237ec9b8e98e7", "score": "0.5571421", "text": "async function repoD(username) {\r\n var ghd = await BASICfetch(username);\r\n var repo_info = await ISF(username, Math.ceil(ghd.public_repos / 100));\r\n var tiss = Number(await FIssues(username)) - Number(repo_info.total_opened_issues);\r\n if (tiss < 0) var tiss = 0;\r\n if (ghd.login == undefined) {\r\n return ghd;\r\n } else {\r\n if (ghd.name == undefined) { //Fallback in username if there is noname of that profile\r\n var name = ghd.login;\r\n } else {\r\n var name = ghd.name; //Grab First Name\r\n }\r\n var output = ({\r\n username: ghd.login,\r\n name: name,\r\n pic: await base64.encode(ghd.avatar_url + \"&s=200\", { string: true }),\r\n public_repos: format(ghd.public_repos),\r\n followers: format(ghd.followers),\r\n following: ghd.following,\r\n total_stars: format(repo_info.total_stars),\r\n total_forks: format(repo_info.total_forks),\r\n total_issues: format(await FIssues(username)),\r\n total_closed_issues: format(tiss),\r\n total_commits: format(await Fcommit(username))\r\n });\r\n return output;\r\n };\r\n}", "title": "" }, { "docid": "d9a65ea841a07af1f0bc66e8ba6bf873", "score": "0.55622613", "text": "function reposFailure(page) {\n return function(error) {\n return {\n type: REPOS_FAILURE,\n page,\n error\n };\n };\n}", "title": "" }, { "docid": "3e939897bed2fc6950b8a8fb5a20eb06", "score": "0.55328625", "text": "error() {\n\n\t\t_debug('- Fetch = error');\n\n\t}", "title": "" }, { "docid": "6250ac59af2b5f3ce2ad3a3a9762a623", "score": "0.55092263", "text": "function getStats() {\n var user = $(\"#github_url_1\").val().split(\"/\")[3];\n var repository = $(\"#github_url_1\").val().split(\"/\")[4];\n console.log('user:' + user);\n console.log('repository:' + repository);\n\n var url = apiRoot + \"repos/\" + user + \"/\" + repository;\n $.getJSON(url, showStats1).fail(showStats1);\n\n var user2 = $(\"#github_url_2\").val().split(\"/\")[3];\n var repository2 = $(\"#github_url_2\").val().split(\"/\")[4];\n console.log('user2:' + user2);\n console.log('repository2:' + repository2);\n\n var url = apiRoot + \"repos/\" + user2 + \"/\" + repository2;\n $.getJSON(url, showStats2).fail(showStats2);\n}", "title": "" }, { "docid": "e64fb57aec0ea61384d21e843352dd85", "score": "0.543718", "text": "function searchRepos() {\n errorDiv.style.display = \"none\";//Starting searching, backing to initial status\n exitDiv.style.display = \"none\";//Starting searching, backing to initial status\n var request = new XMLHttpRequest();\n request.onreadystatechange = function() {\n if (this.readyState === 4 && this.status === 200) { //Ok\n request.onload = printRepoCount;\n }else if (this.status === 404){//GET - User not found\n errorDiv.style.display = \"block\";\n }\n };\n request.open('get', 'https://api.github.com/users/' + searchText.value, true);\n request.send(); \n}", "title": "" }, { "docid": "d6785209ef0067865bb7a5067e5c6123", "score": "0.54234475", "text": "function fetchRepoData(repo, cb) {\n var repoKey = repo.host + \"/\" + repo.room;\n\n // initialize\n if (!REPOS_DATA[repoKey])\n REPOS_DATA[repoKey] = {};\n\n // pointer to the repo data\n var repoData = REPOS_DATA[repoKey];\n\n // did it recently?\n if (repoData.lastFetched &&\n (Date.now() - repoData.lastFetched < (repo.frequency * 1000))) {\n return process.nextTick(cb);\n }\n\n // we only know github for now, but we're ready for more later\n if (repo.type != 'github')\n return process.nextTick(function() {cb('no support for ' + repo.type + ' repos');});\n\n console.log(\"fetching repo data \" + repo.host + \"/\" + repo.room);\n\n // mark fetched\n repoData.lastFetched = Date.now();\n\n repoData.issues = {};\n\n fetchGithubIssues({\n user: repo.user,\n repo: repo.repo,\n labels: FIVE_STAR,\n state: 'open',\n per_page: 100\n }, function(err, issues) {\n if (err)\n return console.log(err);\n\n repoData.issues[FIVE_STAR] = issues;\n\n // go through each label and request\n async.forEach(NON_BLOCKER_LABELS, function(label, cb) {\n fetchGithubIssues({\n user: repo.user,\n repo: repo.repo,\n labels: label,\n state: 'open',\n per_page: 100\n }, function(err, issues) {\n if (err)\n return console.log(err);\n\n repoData.issues[label] = {\n count: issues.length,\n html_url: \"https://github.com/\" + repo.user + \"/\" + repo.repo + \"/issues?labels=\" + label\n };\n\n // done with this iteration\n cb();\n });\n }, cb); // function-level callback\n });\n}", "title": "" }, { "docid": "d7ce26cdf40e3f01293224b92ffc8a1c", "score": "0.5412519", "text": "async function getGithub(){\n try{\n let res=await fetch(`https://api.github.com/users/${$usuario.value}`);\n let json= await res.json();\n let res2=await fetch(`https://api.github.com/users/${$usuario.value}/repos`);\n let json2=await res2.json();\n \n manipulacion(json, json2);\n }catch(err){\n //handle errors\n $card.innerHTML='';\n let h1=d.createElement('h1');\n h1.textContent=`No se ha encontrado usuario con ese nombre '${$usuario.value}' revise la busqueda e intente de nuevo`\n $card.appendChild(h1);\n }\n $usuario.value=''\n}", "title": "" }, { "docid": "c56a70826aa0b160788041ee96381036", "score": "0.539631", "text": "createGitHubIssueOrComment (error) {\n this._errors.push(error);\n this.sendErrors();\n }", "title": "" }, { "docid": "76f79accd806aa611c78b4350d0c48d5", "score": "0.5388033", "text": "function fetchIssues({owner, repository}) {\n return this.getData({path:`/repos/${owner}/${repository}/issues`})\n .then(response => {\n return response.data;\n });\n}", "title": "" }, { "docid": "565084a11e497754e77cc75ade462344", "score": "0.53311205", "text": "function isRepositoryDoesNotExistError(error) {\n // TODO this is odd here.This piece of code is already implementation specific, so this should go to the Git API.\n // But how can we ensure that the `any` type error is serializable?\n if (error instanceof Error && ('code' in error)) {\n // tslint:disable-next-line:no-any\n return error.code === RepositoryDoesNotExistErrorCode;\n }\n return false;\n }", "title": "" }, { "docid": "565084a11e497754e77cc75ade462344", "score": "0.53311205", "text": "function isRepositoryDoesNotExistError(error) {\n // TODO this is odd here.This piece of code is already implementation specific, so this should go to the Git API.\n // But how can we ensure that the `any` type error is serializable?\n if (error instanceof Error && ('code' in error)) {\n // tslint:disable-next-line:no-any\n return error.code === RepositoryDoesNotExistErrorCode;\n }\n return false;\n }", "title": "" }, { "docid": "544f64cdda6853d39646aefcaff8723d", "score": "0.5323897", "text": "function getRepo(query){\n const url = searchURL + query + '/repos';\n\n fetch (url)\n .then(response => {\n if(response.ok){\n return response.json();\n }\n throw new Error (response.statusText);\n })\n .then(responseJSON => displayResults(responseJSON))\n .catch(error => { \n $('#js-error').text(`Error - user ${error.message}`);\n })\n }", "title": "" }, { "docid": "830d2ec616bfbe858622a83a2427ea04", "score": "0.5304261", "text": "async function getRepos(username) {\n const baseUrl = await `https://api.github.com/users/${username}/repos`;\n\n try {\n fetch(baseUrl) // if the url exists\n .then((res) => {\n return res.json(); // get data in json format\n })\n .then((data) => {\n console.log(data);\n if (data.message) {\n cardList.innerHTML = \"\";\n reposQty.innerHTML = \"\";\n followersQty.innerHTML = \"\";\n\n // if data contains a key called message it means user doesn't exists\n user.classList.add(\"welcomeMsg\");\n user.innerHTML = `User @${username} was not found!`;\n } else {\n user.classList.remove(\"welcomeMsg\");\n user.innerHTML = `Welcome @${username}`;\n reposQty.innerHTML = `You currently have ${data.length} <strong>public</strong> projects on GitHub`;\n\n // get followers\n const followersUrl = `https://api.github.com/users/${username}/followers`;\n fetch(followersUrl)\n .then((res) => {\n return res.json();\n })\n .then((followers) => {\n followersQty.innerHTML = `<strong>Followers:</strong> ${followers.length}`;\n });\n\n showRepos(data); // if user exists, show user's repositories\n }\n welcomeMsg.innerHTML = \"\";\n welcomeMsg.classList.add(\"d-none\");\n });\n } catch (error) {\n console.log(error);\n welcomeMsg.innerHTML = `Something happened: ${error}`;\n }\n}", "title": "" }, { "docid": "958a26c21a1d52cdf3c002a51d41560c", "score": "0.5293848", "text": "function isRepositoryDoesNotExistError(error) {\n // TODO this is odd here.This piece of code is already implementation specific, so this should go to the Git API.\n // But how can we ensure that the `any` type error is serializable?\n if (error instanceof Error && ('code' in error)) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return error.code === RepositoryDoesNotExistErrorCode;\n }\n return false;\n }", "title": "" }, { "docid": "f68a0b277260e1c9ff7595a22bd5e0ce", "score": "0.5268538", "text": "function getRepoMetric(username,reponame,mymetric) {\n\n var myValue = 0; // store return-value in top-level variable\n\n /* YES!! I know sync-request should NOT be used in production apps.\n But THIS IS NOT AN APP! It's a once/day cron job. We don't plan to\n scale THIS code to check 1000s of repos. If we wanted that, it would\n be a complete rewrite (not a refactoring of this stuff).\n */\n try {\n var res = syncrequest('GET',\n `https://api.github.com/repos/${username}/${reponame}`,\n {\n // GitHub requires User-Agent, see\n // https://developer.github.com/v3/#user-agent-required\n headers: {\n 'Accept': 'application/json', // probably pro-forma\n 'User-Agent': 'stars2cyfe/0.0.1' //TODO: read this from env somehow!\n }\n }\n );\n // Minimal error-check logic testing res.statusCode\n if (res.statusCode < 200 || res.statusCode > 399) {\n console.log(`Got ${res.statusCode} for repo ${username}/${reponame}, returning 0`);\n return myValue;\n }\n\n var returnedObject = JSON.parse(res.getBody());\n myValue = returnedObject[mymetric];\n // console.log(\"getRepoMetric returns: \" + mymetric + \"=\" + myValue);\n }\n catch(err) {\n console.log(\"getRepoMetric() exception: \" + err);\n }\n return myValue;\n}", "title": "" }, { "docid": "0013a397c85aa3907c3557da04b7bfe4", "score": "0.5247266", "text": "function downloadError (err, res) {\n if (err || res.statusCode != 200) {\n badDownload = true\n cb(err || new Error(res.statusCode + ' status code downloading tarball'))\n }\n }", "title": "" }, { "docid": "134d366ce02eeb52c57b7791e82e97ae", "score": "0.5246679", "text": "function getGitHubStatistics() {\n \n // set up the service\n var service = getGithubService_();\n \n if (service.hasAccess()) {\n Logger.log(\"App has access.\");\n \n var api = \"https://api.github.com/repos/benlcollins/apps_script/stats/commit_activity\";\n \n var headers = {\n \"Authorization\": \"Bearer \" + getGithubService_().getAccessToken(),\n \"Accept\": \"application/vnd.github.v3+json\"\n };\n \n var options = {\n \"headers\": headers,\n \"method\" : \"GET\",\n \"muteHttpExceptions\": true\n };\n \n var response = UrlFetchApp.fetch(api, options);\n \n var json = JSON.parse(response.getContentText());\n var responseCode = response.getResponseCode();\n \n Logger.log(responseCode);\n \n Logger.log(json);\n \n outputWeeklyCommitStats(json);\n \n }\n else {\n Logger.log(\"App has no access yet.\");\n \n // open this url to gain authorization from github\n var authorizationUrl = service.getAuthorizationUrl();\n Logger.log(\"Open the following URL and re-run the script: %s\",\n authorizationUrl);\n }\n}", "title": "" }, { "docid": "d96d8c0733bb76635f4334effc92ebe5", "score": "0.5242058", "text": "function search() {\r\n//reset on start\r\nreset();\r\n//get input from user and set url\r\nlet input = document.getElementById(\"lookFor\").value;\r\nlet yourUrl = \"https://api.github.com/users/\" + input;\r\nlet yourUrl2 = yourUrl + \"/repos\";\r\n\r\n function Get(data){\r\n let Httpreq = new XMLHttpRequest(); // a new request - url for profile data\r\n Httpreq.open(\"GET\",data,false);\r\n Httpreq.send(null);\r\n return Httpreq.responseText;\r\n};\r\n//creates data for name, avatar, bio and data2 for repositories info//\r\n//-------------//\r\nlet data = JSON.parse(Get(yourUrl)); //url for profile data\r\nlet data2 = JSON.parse(Get(yourUrl2)); //url for repositories\r\n\r\n//if user exists - execute 2 functions, if not - execute fail function//\r\n//-------------//\r\n if (data['message'] === \"Not Found\") {\r\n fail();\r\n } else {\r\n mainProfile(data);\r\n repos(data2);\r\n}}", "title": "" }, { "docid": "ee2a7e2b5d44e215cd4d0ba22f3976e6", "score": "0.5233764", "text": "fetch(path) {\n const baseUrl = \"https://api.github.com\"\n debugger\n\n return global.fetch(`${baseUrl}${path}`, {\n method: 'GET',\n headers: {\n 'Content-Type': 'application/json',\n 'Authorization': `bearer ${REACT_APP_GITHUB_ACCESS_TOKEN}`\n }\n })\n .then(res => {\n return res.ok ? res.json() : res.then(inner => Promise.reject(inner))\n })\n }", "title": "" }, { "docid": "71a70e6e90cd283f27b936e908919d97", "score": "0.5217627", "text": "function getRepoUrl(repo) {\n let generalUrl = \"https://api.github.com/repos/HackYourFuture/\";\n let repoUrl = generalUrl + repo;\n return repoUrl;\n}", "title": "" }, { "docid": "e53589fa15d5918227e6d88ce4e20c2e", "score": "0.52132523", "text": "function checkRepo(currentpage) {\n\n\tvar page_limit = 100;\n\tif(currentpage == undefined){\n\t\tvar pth = '/orgs/jquery/repos?page=1&per_page='+page_limit+'&access_token=dabcd530d821ada1073be24d36b6c92d829457e8'\n\t\tcurrentpage = 0;\n\t}\n\telse \n\t\tvar pth = '/orgs/jquery/repos?page='+(currentpage+1)+'&per_page='+page_limit+'&access_token=dabcd530d821ada1073be24d36b6c92d829457e8'\n\n\tvar options = {\n \tpath: pth\n\t};\n\n\tgithub.request(options, function(error, repos) {\n \tif(!error) {\n \t\tvar obj = repos;\n\t\t\tvar len = obj.length;\n\t\t\n\t\t\tif(len > 0) {\n\t\t\t\tfor(var i=0;i<len;i++) {\n\t\t\t\t\tvar repo_id = obj[i].id;\n\t\t\t\t\tvar repo_fullname = obj[i].full_name;\n\t\t\t\t\tvar repo_desc = obj[i].description;\n\t\t\t\t\t//console.log(repo_id+\" ... \"+repo_fullname+\" ... \"+repo_desc);\n\t\t\t\t\tfixRepo(repo_id, repo_fullname, repo_desc);\n\t\t\t\t}\n\t\t\t\tif(len == page_limit) {\n\t\t\t\t\tcheckRepo(currentpage + 1);\n\t\t\t\t}\n\t\t\t}\n \t}\n\t});\n}", "title": "" }, { "docid": "5f06525aadcf61c3ec95c47a3c198c0d", "score": "0.5207279", "text": "function fetchGithubIssues(opts, cb) {\n var allIssues = [];\n function afterSingleFetch(err, issues) {\n if (err)\n return cb(err);\n\n // save those issues!\n allIssues = allIssues.concat(issues);\n\n if (github.hasNextPage(issues)) {\n console.log(\"ohhhh, there's more!\");\n // fetch the next batch\n github.getNextPage(issues, afterSingleFetch);\n } else {\n // done!\n cb(null, allIssues);\n }\n }\n\n // start the fetch\n github.issues.repoIssues(opts, afterSingleFetch);\n}", "title": "" }, { "docid": "580373cee5397604a29a0712929bf917", "score": "0.518949", "text": "function avatarUpdateError({ error }) {\n\treturn {\n\t\ttype: AVATAR_UPDATE_ERROR,\n\t\tisFetching: false,\n\t\ttimestamp: Date.now(),\n\t\terror,\n\t};\n}", "title": "" }, { "docid": "59b98d80f721e8f2a5e457af53f85e08", "score": "0.51757133", "text": "function printRepoCount() {\n exitDiv.style.display = \"block\";//Showing up the data containing div\n var responseObj = JSON.parse(this.responseText);\n userImg.src = responseObj.avatar_url;\n userImg.alt = responseObj.login + \" avatar\";//Adding alt to the avatar user img\n userLogin.innerHTML = responseObj.login;\n if(!responseObj.name) {//In case there is no inserted name\n userFullName.innerHTML = \"No inserted name\";\n } else {\n userFullName.innerHTML = responseObj.name;\n }\n if(!responseObj.bio) {//In case there is no inserted bio\n userBio.innerHTML = \"No inserted bio\";\n } else {\n userBio.innerHTML = responseObj.bio;\n } \n \n var request = new XMLHttpRequest();\n request.onreadystatechange = function() {\n if (this.readyState === 4 && this.status === 200) {//Ok\n request.onload = printRepos;\n }else if (this.status === 404){//GET - just in case!! no found user\n errorDiv.style.display = \"block\";\n exitDiv.style.display = \"none\";\n }\n };\n request.open('get', 'https://api.github.com/users/' + searchText.value + '/repos', true);\n request.send();\n}", "title": "" }, { "docid": "a45c13b201da0db29df963eb71d59f40", "score": "0.51743567", "text": "function getGitHubRateLimit() {\n // set up the service\n var service = getGithubService_();\n \n if (service.hasAccess()) {\n Logger.log(\"App has access.\");\n \n var api = \"https://api.github.com/rate_limit\";\n \n var headers = {\n \"Authorization\": \"Bearer \" + getGithubService_().getAccessToken(),\n \"Accept\": \"application/vnd.github.v3+json\"\n };\n \n var options = {\n \"headers\": headers,\n \"method\" : \"GET\",\n \"muteHttpExceptions\": true\n };\n \n var response = UrlFetchApp.fetch(api, options);\n \n var json = JSON.parse(response.getContentText());\n var responseCode = response.getResponseCode();\n \n Logger.log(responseCode);\n \n Logger.log(\"You have \" + json.rate.remaining + \" requests left this hour.\");\n \n }\n else {\n Logger.log(\"App has no access yet.\");\n \n // open this url to gain authorization from github\n var authorizationUrl = service.getAuthorizationUrl();\n Logger.log(\"Open the following URL and re-run the script: %s\",\n authorizationUrl);\n }\n}", "title": "" }, { "docid": "dc59620c07a5e8426dfd763afdb1f492", "score": "0.5161873", "text": "function getCount() {\n fetch(`https://api.github.com/repos/${gitArray[count]}`)\n .then(function(response) {\n if (response.status !== 200 && count > 0 && count < gitArray.length) {\n alert(`There is no github repository matching \"${gitArray[count]}\".`)\n throw new Error(\"Not 200 response\")\n } else if (count < 0 || count > gitArray.length-1) {\n alert(`There is no index in database matching number ${count}. Index goes from 0 to ${gitArray.length-1}.`)\n throw new Error(\"Not 200 response\")\n } else {\n return response.json();\n } \n })\n .then(function(json) {\n document.getElementById('fullName').innerHTML = `FULL NAME | ${json.full_name}`;\n document.getElementById('description').innerHTML = `DESCRIPTION | ${json.description}`;\n document.getElementById('stargazersCount').innerHTML = `AMOUNT OF STARS | ${json.stargazers_count}`;\n console.log(json.full_name, json.description, json.stargazers_count);\n })\n .catch((error) => {\n console.log('ERROR', error.message);\n })\n ;\n console.log(count);\n}", "title": "" }, { "docid": "2c806e4b30b6626c373a8385032b2e53", "score": "0.5146086", "text": "errored () {\n throw new Error('errored API')\n }", "title": "" }, { "docid": "9be021eca8ee4ec2283e869d57d743c8", "score": "0.51354814", "text": "function handleError() {\n handleFeedParsingFailed('Failed to fetch RSS feed.');\n}", "title": "" }, { "docid": "03273248cfdcf0df6295459f8214908a", "score": "0.5131663", "text": "async function fetchAllIssues() {\r\n log.i('Generator-Issues-Plugin: Fetching the issues in repository %s...', options.repos);\r\n try {\r\n let issues = await githubApi.fetchAllIssues();\r\n issues = issues.map(item => ({\r\n title : item.title,\r\n number: item.number,\r\n state : item.state\r\n })).sort((a, b) => a.number - b.number);\r\n return issues;\r\n } catch(err) {\r\n log.e('Generator-Issues-Plugin: Fetch issues Failed!');\r\n throw(err);\r\n }\r\n}", "title": "" }, { "docid": "37a75867e1af9984331649db3fadd8c2", "score": "0.509912", "text": "function downloadAvatarsMonitor () {\n // 1. Input Arguments Check\n var argvs = process.argv.slice(\" \");\n if(argvs.length === 4) {\n owner = argvs[2];\n name = argvs[3];\n } else {\n return 1;\n }\n\n // 2. Confige File .env Check\n if(!fs.existsSync('./.env')) {\n return 3;\n }\n if(!secrets.token) {\n return 4;\n }\n // 4. Run the Download Avatars\n console.log('Welcome to the Recommended Repo!');\n\n getRepoContributors(owner, name, function(err, result) {\n console.log(\"Errors:\", err);\n dataSize = result.length;\n for(var i = 0; i < dataSize; i++) {\n var obj = {};\n obj = result[i];\n var avatarUrl = obj[\"starred_url\"];\n findContributorStarNum(avatarUrl.split('{')[0]);\n }\n });\n}", "title": "" }, { "docid": "1bf57813841f3e6e6e0209b28599d8f4", "score": "0.50854266", "text": "function error () {\n var m = [].slice.call(arguments).join(' ')\n throw new Error([\n m,\n 'we accept pull requests',\n 'http://github.com/brianloveswords/zlib-browserify'\n ].join('\\n'))\n}", "title": "" }, { "docid": "f4a3bb8539c6ca1671042231e3d7b973", "score": "0.50813323", "text": "function fetchUserCommitDates() {\n\n var gitHubUsername = document.getElementById('username').value;\n var accessToken = document.getElementById('token').value;\n\n console.log('user inputs are', gitHubUsername, accessToken);\n\n /*\n Function to Sort dates\n */\n var sort_asc = function(commit1, commit2) {\n console.log('commit1 is', commit1);\n console.log('commit2 is', commit2);\n if (commit1.date < commit2.date) return 1;\n if (commit1.date > commit2.date) return -1;\n return 0;\n };\n\n var commits = [];\n var done = 0;\n var countToDo = 0;\n var num_commits = 60; //per Problem Description\n try {\n\n /* Approach is outlined here:\n Get the repositories of the user, and get the names of the repository in an array.\n \t\tCall to API Link - api.github.com/users/:user/repos\n For each repository, get the list of commits authored by that user.\n\t\t\tapi.github.com/repos/:user/{repo}/commits?author=:user.\n Since Github APIs return only 30 rows, I'm using query_param per_page to ask the API to fetch 100 rows. This could be changed to 60 for our use case..\n */\n $.ajax({\n url: 'https://api.github.com/users/' + gitHubUsername + '/repos' + '?per_page=60',\n dataType: \"json\",\n\n beforeSend: function(xhr) {\n xhr.setRequestHeader('Authorization', accessToken);\n },\n success: function(response) { //get repos\n countToDo = response.length;\n\n for (var i = 0; i < response.length; i++) {\n //code for each repo\n var repo = response[i].url;\n // Pagination using per_page to get 60 records in descending order\n var commit_url = repo + \"/commits?\" + 'author=' + gitHubUsername + '&order=desc&per_page=60';\n $.ajax({\n url: commit_url,\n dataType: \"json\",\n beforeSend: function(xhr) {\n xhr.setRequestHeader('Authorization', accessToken);\n },\n success: function(commit_response) {\n var commitCount = 0;\n // num_commits is 60 to get the last 60 commits\n for (var j = 0; j < num_commits; j++) {\n if (j < commit_response.length) {\n var i_commit = commit_response[j].commit;\n //Get the author and date. We use only dates.\n var date = i_commit.committer.date;\n var author = i_commit.author.name;\n commits.push(date);\n }\n commitCount++;\n if (commitCount == num_commits) {\n done++;\n }\n }\n --countToDo;\n\n if (countToDo == 0) {\n console.log('commits is', commits);\n // Sort dataset by dates \n commits.sort(sort_asc);\n // Store result in Csv.\n exportFile(commits.join(\"\\n\"), 'GitCommits.csv');\n //Calculate Mean Time\n calculateMeanTime(commits);\n }\n }\n });\n } //end of for loop\n }\n })\n } catch (e) {\n console.log(e.constructor)\n }\n}", "title": "" }, { "docid": "9d172e8b344f3c8107c8e8301c9e4904", "score": "0.50724214", "text": "function handleErrors(response) {\n console.log(\"error while fetching data\");\n if (!response.ok) {\n console.log(response.statusText);\n throw Error(response.statusText);\n }\n return response;\n }", "title": "" }, { "docid": "a06039d80fe3d88c8a67d7c692d9c7c2", "score": "0.5070612", "text": "function processGitHubRepo(repo) {\n return __awaiter(this, void 0, void 0, function* () {\n const repoUrl = repo.url;\n const repoParts = repoUrl.slice(repoUrl.indexOf('github.com') + 'github.com/'.length).split('/');\n const orgName = repoParts[0];\n const repoName = repoParts[1];\n const octokit = Octokit();\n // TODO - right now this doesn't respect paging (I think octokit may have a bug, wasn't important to figure out for our use case)\n let { data: pullRequests } = yield octokit.pulls.list({\n owner: orgName,\n repo: repoName,\n state: 'open',\n per_page: 100\n });\n pullRequests = pullRequests;\n pullRequests.forEach(pull => {\n let duration = Date.now() - (new Date(pull.updated_at)); //Duration in ms\n duration = duration / 1000 / 60 / 60; //Duration in h.'\n const link = `${repo.url}/pull/${pull.number}`;\n const curPr = { author: pull.user.login, timeSinceUpdate: duration, link: link, title: pull.title };\n let isStale = false;\n repo.groups.forEach(group => {\n if (!isStale && group.githubHandles && (group.githubHandles.indexOf(curPr.author.toLowerCase()) > -1 || group.isDefaultGroup)) {\n let ignorePull = false;\n // Check labels\n pull.labels.forEach(label => {\n if (!ignorePull && group.ignoreLabels.indexOf(label.name) > -1) {\n ignorePull = true;\n }\n });\n if (!ignorePull) {\n isStale = isPrStale(group, curPr);\n }\n }\n });\n if (isStale) {\n repo.stalePrs.push(curPr);\n }\n });\n return repo;\n });\n}", "title": "" }, { "docid": "3553edbe7e9d02a63558f919ae426b5c", "score": "0.50559556", "text": "function getGitHubRepoURL(repo) {\n return `https://api.github.com/repos/${SPLUNK}/${repo}/commits/HEAD`;\n}", "title": "" }, { "docid": "4ba902f56b172f47f3e84e2f93fafb91", "score": "0.5052832", "text": "getResults() { \n this.setState({\n loading:true,\n resultsVisibility: true,\n navVisibility: true,\n lastPage:false,\n })\n \n let url = \"https://api.github.com/users/\" + this.state.search + \"/repos?page=\" + this.state.currentPage + \"&per_page=30\"\n\n //Fetch repositories, 30 per page\n fetch(url)\n .then(this.checkStatus)\n .then(this.getPageNumbers)\n .then(this.parseJSON)\n\n //Successful fetch\n .then(function(data) {\n //If this is the last page hide page navigation\n if (this.state.lastPage === true || data.length < 30) {\n console.log(\"Last page\")\n this.setState({navVisibility:false})\n }\n\n if (data.length < 1) {\n this.setState({\n error: \"This user has no public repositories\",\n allResults: [],\n loading:false\n })\n } else {\n this.setState({\n allResults: data,\n error: \"\",\n loading:false\n })\n }\n\n \n \n }.bind(this))\n\n\n //Error handling\n .catch(function(error) {\n this.setState({\n error: \"User not found\",\n allResults: [],\n loading:false,\n navVisibility: false\n })\n }.bind(this))\n }", "title": "" }, { "docid": "a4339a4721eab5b6defd3340c3966e38", "score": "0.50364554", "text": "function getRepo(username) {\n let url = url1 + username + url2;\n return fetch(url)\n .then(response => response.json())\n .catch(error => alert('something went wrong'));\n}", "title": "" }, { "docid": "bfd8c1bf15f2926b819a216fd804773a", "score": "0.4996263", "text": "function NetworkFailure(stat, url) { \n\tthis._status = stat; \n\tthis._url = url;\n}", "title": "" }, { "docid": "7012f955b0778799ca89328c3c6b5b64", "score": "0.4991027", "text": "function init(){\n\n fetch('https://api.github.com/users/audreysperry', options).then(function(response){\n return response.json();\n }).then(function(data){\n displayUserInfo(data);\n displayMiniPhoto(data);\n displayAccountNav(data);\n });\n\n fetch('https://api.github.com/users/audreysperry/repos', options).then(function(response){\n return response.json();\n }).then(function(data){\n displayRepoInfo(data);\n });\n\n}", "title": "" }, { "docid": "d6363926bf9e32a04129e7eda26991f3", "score": "0.49801496", "text": "function getGitHubProfileInfos() {\n const url = `https://api.github.com/users/${links.github}`\n\n fetch(url)\n .then(response => response.json())\n .then(data => {\n userName.textContent = data.name\n userBio.textContent = data.bio\n userGitHubLink.href = data.html_url\n porfilePhoto.src = data.avatar_url\n })\n}", "title": "" }, { "docid": "f7aa710d9597d46603d181709b7001d7", "score": "0.49772105", "text": "function demoGithubUser() {\n let name = prompt(\"Enter a name?\", \"iliakan\");\n\n return loadJson(`https://api.github.com/users/${name}`)\n .then(user => {\n alert(`Full name: ${user.name}.`);\n return user;\n })\n .catch(err => {\n if (err instanceof HttpError && err.response.status == 404) {\n alert(\"No such user, please reenter.\");\n return demoGithubUser();\n } else {\n throw err;\n }\n });\n}", "title": "" }, { "docid": "bb08fb07b53fa6eaa0ac06dbc68e490a", "score": "0.49737936", "text": "function fetchPullRequestFromGithub(git, prNumber) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var e_1;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, github_1.getPr(PR_SCHEMA, prNumber, git)];\n case 1: return [2 /*return*/, _a.sent()];\n case 2:\n e_1 = _a.sent();\n // If the pull request could not be found, we want to return `null` so\n // that the error can be handled gracefully.\n if (e_1.status === 404) {\n return [2 /*return*/, null];\n }\n throw e_1;\n case 3: return [2 /*return*/];\n }\n });\n });\n }", "title": "" }, { "docid": "0ecd6be2c641b93e4cf2abbf88b43502", "score": "0.49485135", "text": "function searchRepo() {\n vm.requestProcessed = false;\n vm.searching = true;\n /*Get the repo name out of the address*/\n var repositoryName = vm.searchFactor.slice(vm.searchFactor.lastIndexOf('/') + 1);\n /*Get the repo details from git api*/\n GitService.SearchRepositories(vm.properties.GIT_REST_URL + vm.properties.GET_REPO_RESOURCE + '?q=' + repositoryName)\n .then(function (response) {\n /*There won't be any success attribute on the object sent by git api*/\n if (angular.isUndefined(response.success) && angular.isUndefined(response.message) && response.total_count != 0 ) {\n /*We have our rep listings*/\n vm.repos = response.items;\n /*Check for our repo in these listings*/\n for (var i = 0, len = vm.repos.length; i < len; i++) {\n if (vm.repos[i].html_url.toLowerCase() == vm.searchFactor.toLowerCase()) {\n /*We have found our repository, lets fetch the issues and do the calculation*/\n vm.myIssues.open = vm.repos[i].open_issues;\n vm.myIssues.openedToday = 0;\n vm.myIssues.openedThisWeek = 0;\n vm.myIssues.openedEarlier = 0;\n var fetchOpenIssuesResource = vm.repos[i].issues_url.slice(0, vm.repos[i].issues_url.indexOf('{'));\n fetchOpenIssues(fetchOpenIssuesResource, 100, 1);\n break;\n }\n }\n vm.searching = false;\n }\n else if(!angular.isUndefined(response.message)) {\n /*We hit a roadblock*/\n vm.searching = false;\n FlashService.Error('Error while searching repositories. ' + response.message);\n } else if(response.total_count == 0){\n /* There are no such repos */\n vm.searching = false;\n FlashService.Error('There is no such repository.');\n }\n });\n }", "title": "" }, { "docid": "d8da6d91edcb43398aea06157509403a", "score": "0.4932644", "text": "function checkArguments(owner, name) {\n if (owner === undefined || name === undefined) {\n console.log(\"Please enter valid owner name and repository!\");\n } else {\n //welcome message\n console.log('Welcome to the GitHub Avatar Downloader!');\n getRepoContributors(repoOwner, repoName, getJson);\n }\n}", "title": "" }, { "docid": "336105926fdf7ccd2440d3f5ccaca982", "score": "0.4931684", "text": "async function makeGitHubRequest(url, token, body, method = 'GET', handleError = true) {\n const stringifiedBody = body\n ? JSON.stringify(body)\n : null;\n\n const res = await fetch(url, {\n headers: getDefaultGitHeaders(token),\n method,\n body: stringifiedBody\n });\n\n if (handleError && !res.ok) {\n const errorMessage = `${res.status}: ${res.statusText}`;\n\n handleError(errorMessage);\n\n throw errorMessage;\n }\n\n return res;\n}", "title": "" }, { "docid": "9e5930bf4414790c66456444c9179802", "score": "0.49292892", "text": "getData() {\n const { gist_id } = this.props.match.params || this.props;\n\n fetch(`https://api.github.com/gists/${gist_id}?access_token=${TOKEN}`)\n .then(response => {\n if (response.ok) {\n return response.json();\n } else {\n throw new Error('Oops! This Gist can not be found.');\n }\n })\n .then(data => {\n this.setState({ gist: data, user: data.owner.login })\n this.updateIframe(data);\n })\n .catch(error => this.setState({ error }));\n }", "title": "" }, { "docid": "3c990b1c6a1ed1adece7f3809bd986b1", "score": "0.4916177", "text": "function findUserByCredentialsError(error) {\n errorMessage.message = \"Could not fetch user data. Please try again later.\";\n res.status(401).json(errorMessage);\n }", "title": "" }, { "docid": "6d1c762fed59198a9633060c0d482376", "score": "0.49125397", "text": "getUsernameFromGithubURL(url) {\n const githubUrl = 'images.githubusercontent.com/';\n if (url && url.indexOf(githubUrl) !== -1) {\n const tokens = url.split(githubUrl);\n if (tokens.length === 2 && tokens[1] !== '') {\n return tokens[1];\n }\n }\n return null;\n }", "title": "" }, { "docid": "47cd4b488a370751bf54c0114da08d70", "score": "0.49063176", "text": "async function getRepos(username) {\n try {\n const { data } = await axios(APIURL + username + '/repos?sort=created');\n addReposToCard(data);\n } catch (err) {\n createErrorCard('Problem with taking repos from API');\n }\n}", "title": "" }, { "docid": "a41326e30733fcf7bb8d17a42ca49c7a", "score": "0.48990893", "text": "fetchDataErrorMsg(error){\n return error.response.data.errors.message[0];\n }", "title": "" }, { "docid": "94f47beb137eb77845374d6b84c6041d", "score": "0.4898191", "text": "function error(data, status/*, headers, config*/) {\n\t\t\tdeferred.reject(status);\n\t\t}", "title": "" }, { "docid": "a2f87e314b75f76cc9ff1eab3dbbaf8f", "score": "0.48946762", "text": "function handleAjaxError(error) {\n console.error(error);\n alert('Server responds with an error. Please report the issue on the github page.');\n }", "title": "" }, { "docid": "905350023a9c17ffd0efa2bcd129f096", "score": "0.48897704", "text": "status() {\n this.checkGitResponse();\n }", "title": "" }, { "docid": "38e9a574d3fab07f0e7105d1420fd4e3", "score": "0.4882205", "text": "function loadPermalink() {\r\n var id = getParam(\"id\");\r\n if (!id) return;\r\n\r\n $.get('https://api.github.com/gists/' + id,\r\n function(data, status, xhr) {\r\n console.log(\"Remaining this hour: \" + xhr.getResponseHeader(\"X-RateLimit-Remaining\"));\r\n\r\n var input = data.files[\"source.json\"].content;\r\n $(\".json textarea\").val(input);\r\n doJSON();\r\n showJSON(true);\r\n }\r\n ).fail(function(xhr, status, errorThrown) {\r\n console.log(\"Error fetching anonymous gist!\");\r\n console.log(xhr);\r\n console.log(status);\r\n console.log(errorThrown);\r\n });\r\n }", "title": "" }, { "docid": "7f67a73b4dab22a4d9abc6be8ad2eedb", "score": "0.48754254", "text": "constructor(options, logger = logger_1.dummyLog()) {\n this.logger = logger;\n this.options = options;\n this.baseUrl = this.options.baseUrl || \"https://api.github.com\";\n this.graphqlBaseUrl = this.options.baseUrl\n ? this.options.graphqlBaseUrl || url_join_1.default(new URL(this.baseUrl).origin, \"api\")\n : this.baseUrl;\n this.logger.veryVerbose.info(`Initializing GitHub with: ${this.baseUrl}`);\n const GitHub = rest_1.Octokit.plugin(plugin_enterprise_compatibility_1.enterpriseCompatibility, plugin_retry_1.retry, plugin_throttling_1.throttling);\n this.github = new GitHub({\n baseUrl: this.baseUrl,\n auth: this.options.token,\n previews: [\"symmetra-preview\"],\n request: { agent: this.options.agent },\n throttle: {\n /** Add a wait once rate limit is hit */\n onRateLimit: (retryAfter, opts) => {\n this.logger.log.warn(`Request quota exhausted for request ${opts.method} ${opts.url}`);\n if (opts.request.retryCount < 5) {\n this.logger.log.log(`Retrying after ${pretty_ms_1.default(retryAfter * 1000)}!`);\n return true;\n }\n },\n /** wait after abuse */\n onAbuseLimit: (retryAfter, opts) => {\n this.logger.log.error(`Went over abuse rate limit ${opts.method} ${opts.url}, retrying in ${pretty_ms_1.default(retryAfter * 1000)}.`);\n return true;\n },\n },\n });\n this.github.hook.error(\"request\", (error) => {\n var _a;\n if ((_a = error === null || error === void 0 ? void 0 : error.headers) === null || _a === void 0 ? void 0 : _a.authorization) {\n delete error.headers.authorization;\n }\n throw error;\n });\n }", "title": "" }, { "docid": "a45ace32f4fb84919561f87e68338682", "score": "0.48749807", "text": "function getRepoContributors(owner, repo, cb) {\n //check for mandatory command line arguments owner and repository\n //if they are provided continue with retrieving the avatar\n if (!owner) {\n console.log(\"Please provide an owner!\");\n } else if (!repo){\n console.log(\"Please provide a repository!\");\n } else{\n if (process.env.GITHUB_TOKEN === undefined) {\n console.log(\"The .env file has not been created or filled with the correct informtion. \");\n } else {\n //http header\n var options = {\n url: \"https://api.github.com/repos/\" + owner + \"/\" + repo + \"/contributors\",\n headers: {\n 'User-Agent': 'request',\n 'Authorization': \"token \" + process.env.GITHUB_TOKEN\n }\n };\n\n //http request with callback function parsing the result\n request(options, function(err, res, body) {\n var obj = JSON.parse(body);\n\n if (obj.message === 'Bad credentials') {\n console.log(\"The GITHUB_TOKEN provided is not correct. \");\n } else {\n cb(err, obj);\n }\n });\n }\n }\n}", "title": "" }, { "docid": "8722e0e19f6e5879d2c4949745f6566f", "score": "0.48514906", "text": "function httpError(data, status, headers, config)\n {\n $rootScope.searching = false;\n\t notification.error(\"Uh-oh, there was an error loading data.\", { singleton: true });\n }", "title": "" }, { "docid": "b1bdfc34d580ec18a96ebce92c37ffab", "score": "0.48503357", "text": "unhandled() {\n throw new Error('request for ' + this.hash + ' UNHANDLED')\n }", "title": "" }, { "docid": "b3030a0919d808c920d90ce7ac7866f7", "score": "0.48477042", "text": "function getRepoContributors(repoOwner, repoName, useAPI, cb) {\n\n if(!(repoOwner && repoName)) {\n console.log(\"You need to give us a User and their Repository name\");\n throw new Error(\"Need to have a user and repository.\");\n }\n\n const url = getContributorsURL(repoOwner, repoName, useAPI);\n\n const options = {\n url: url,\n headers: {\n 'User-Agent': 'GitHub Avatar Downloader - Student Project'\n }\n };\n\n // Main request to GitHub api\n request.get(options, (err, response, body) => {\n if(err) {\n throw err;\n }\n // Parse the returned JSON and pass it to our callback\n cb(null, JSON.parse(body));\n })\n .on('error', (err) => {\n cb(err);\n })\n .on('response', (res) =>{\n if(res.statusCode > 399) {\n cb(res.statusMessage);\n }\n // console.log(`Response Code: ${res.statusCode}`);\n // console.log(`Response Message: ${res.statusMessage}`);\n });\n}", "title": "" }, { "docid": "260894f1745621aa05d2cec04d739a25", "score": "0.48471043", "text": "function finishGitHubIntegration(baseApiLink, commitTotal) {\n var commitsApiLink = baseApiLink + '/commits';\n\n getJSON(commitsApiLink, function (err, data) {\n var lastCommitMessage, authorLogin, avatarUrl;\n\n if (err !== null || data.length < 0 || !data[0].hasOwnProperty('commit') || !data[0].commit.hasOwnProperty('message')\n || !data[0].hasOwnProperty('author') || !data[0].author.hasOwnProperty('login')\n || !data[0].author.hasOwnProperty('avatar_url')) {\n hideGitHubIntegrations();\n return;\n }\n\n lastCommitMessage = data[0].commit.message;\n authorLogin = data[0].author.login;\n // We append the s=40 parameter so that a smaller 40x40 image is returned\n avatarUrl = data[0].author.avatar_url + '&s=30';\n\n // Display the commit total in the appropriate element, and hide the loading spinner\n document.getElementById(numberOfCommitsId).innerHTML = commitTotal + ' Commits';\n document.getElementById(avatarId).src = avatarUrl;\n document.getElementById(authorLoginId).innerHTML = authorLogin;\n document.getElementById(lastCommitMessageId).innerHTML = lastCommitMessage;\n document.getElementById(githubSpinnerId).style.display = 'none';\n document.getElementById(githubIntegrationsId).style.display = 'block';\n });\n }", "title": "" }, { "docid": "b28fa40de72b298b75a90f98b736db70", "score": "0.48463157", "text": "handleUpdateFailed(message) {\n\n // Not really sure what to do in this case. For now just log it and move on.\n console.error(message);\n }", "title": "" }, { "docid": "35a91b8a9f2dd65ee00e6c54061ec7f1", "score": "0.48453113", "text": "handleError( error ) {\n this.setState({\n error,\n fetching: false,\n });\n }", "title": "" }, { "docid": "9da3bb4c43e5f09a6f279dea22cd2da0", "score": "0.48448876", "text": "async function fetchFromGithub(fromGit) {\n let prData = [\n {\n commits_url: `${fromGit.gitUrl}/${fromGit.pr_number}/commits`,\n review_comments_url: `${fromGit.gitUrl}/${fromGit.pr_number}/comments`,\n },\n ];\n\n // console.log(prData[0].review_comments_url);\n\n fetchGitHubReviewComments(fromGit, prData).then(async (reviewer) => {\n console.log(\"fetching commits url\", prData[0].commits_url);\n\n await fetch(`${prData[0].commits_url}`, {\n method: \"GET\",\n headers: {\n Authorization: `Bearer ${fromGit.token}`,\n },\n })\n .then((response) => response.json())\n .then(async (data) => {\n console.log(\"got commits url\");\n fetchGithubCommitDetails(\n fromGit,\n data,\n reviewer,\n reviewer.nextCodeReviewId\n );\n });\n });\n}", "title": "" }, { "docid": "ebd50ff45bb35af31170081a074cfb55", "score": "0.48421428", "text": "function handleGithubRes (proxyRes, req, res) {\n // prevent express from calling this a 'fresh' request and 304-ing it anyway\n delete req.headers['if-none-match']\n if (proxyRes.headers.link) {\n proxyRes.headers.link = fixGithubLinkRefs(proxyRes.headers.link)\n }\n if (req.cachedData && proxyRes.statusCode === 304) {\n handleGithubCacheOkayRes(req, proxyRes)\n } else if (proxyRes.statusCode >= 200 && proxyRes.statusCode < 300) {\n handleGithubCacheMissRes(req, proxyRes)\n } else {\n handleGithubErrRes(proxyRes, res)\n }\n}", "title": "" }, { "docid": "5fd3733873c2b3c72f83de3dbac36b90", "score": "0.48410153", "text": "function onError() {\n console.error(\"network\", this.statusText || \"unknown error\");\n }", "title": "" }, { "docid": "c7fdd8ea77222f23429b34fcd4373837", "score": "0.48393255", "text": "function findUserByUsernameError(error) {\n errorMessage.message = \"Could not fetch user data. Please try again later.\";\n res.status(500).json(errorMessage);\n }", "title": "" }, { "docid": "7ce7de72d858bf9378b96f2a19ea366a", "score": "0.48343283", "text": "function getRepo(event){\n event.preventDefault();\n //clears the screen\n if (userList.children){\n while(userList.firstChild){\n userList.firstChild.remove();\n }\n }\n\n if (event.target.tagName === 'IMG'){\n let username = event.target.id;\n fetch(`https://api.github.com/users/${username}/repos`)\n .then(resp =>{\n return resp.json();\n })\n .then(info =>{ \n renderRepo(info);\n })\n }\n }", "title": "" }, { "docid": "59bf7c316403bb2b2837632cefd6107e", "score": "0.48328742", "text": "function initial_request(user, repo) {\n const API_REQUEST_URL = `https://api.github.com/repos/${user}/${repo}`;\n let request = authenticatedRequestHeaderFactory(API_REQUEST_URL);\n request.onreadystatechange = onreadystatechangeFactory(request,\n () => {\n const response = JSON.parse(request.responseText);\n\n if (isEmpty(response))\n return;\n\n if (response.forks_count > 0) {\n request_fork_page(1, user, repo, response.default_branch);\n } else {\n setMsg(UF_MSG_NO_FORKS);\n enableQueryFields();\n }\n },\n () => setMsg(UF_MSG_ERROR)\n );\n request.send();\n}", "title": "" }, { "docid": "90752e2ae1228b94c713e5c1998d97f4", "score": "0.48316962", "text": "getGitHubRepo( user ){\n\t\tthis.setState({ fetching : true });\n\t\taxios.get( `https://api.github.com/users/${ user }/repos` )\n\t\t\t.then(( response ) => {\n\t\t\t\tconsole.log( response );\n\t\t\t\tthis.setState( Object.assign({},\n\t\t\t\t\tthis.state,\n\t\t\t\t\t{ fetching : false },\n\t\t\t\t\t{\n\t\t\t\t\t\tpage : {\n\t\t\t\t\t\t\tpageNum : 1,\n\t\t\t\t\t\t\trowCount : this.state.page.rowCount\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\trepos : iList( response.data )\n\t\t\t\t\t}));\n\t\t\t\tconsole.log( \"this.state\", this.state );\n\t\t\t})\n\t\t\t.catch(( error ) => {\n\t\t\t\tconsole.log( error );\n\t\t\t\talert( \"Mayday! There was an error!\" );\n\t\t\t});\n\t}", "title": "" }, { "docid": "d05b86d2accc26cb0923b609a7233015", "score": "0.48312503", "text": "function failedScrape(error, response, body) {\n console.log(\"Failed to scrape mentors.\");\n console.log('error:', error);\n console.log('statusCode:', response && response.statusCode);\n console.log('body:', body);\n}", "title": "" }, { "docid": "387428b87b5dfad8a20c47fd92ba00c2", "score": "0.48282653", "text": "handleError(error) {\n if (error.status) {\n if (error.status == 401) {\n //Cerrar sesión\n throw new Error(\"401\")\n } else if (error.status == 412) {\n //Precondition failed\n throw new Error(\"412\")\n }\n } else {\n throw new Error(\"System down\")\n //System down\n }\n }", "title": "" }, { "docid": "4ff52e189c94183c7f0fc4eda11d6855", "score": "0.4826951", "text": "async function getPublicReposNumber(ctx, next) {\n try {\n const { username } = ctx.params;\n console.log(\"username:\", username);\n let data = null;\n //访问缓存,没有再请求\n await new Promise((resolve,reject)=>{\n try {\n redisClient.get(username, (error, cachedData) => {\n if (error) throw error;\n if (cachedData != null) {\n data = cachedData;\n console.log(\"use cache...\",cachedData);\n }\n resolve()\n }); \n } catch (error) {\n console.error('error',error);\n }\n \n })\n \n if(!data){\n console.log(\"requert github data...\");\n const response = await fetch(`https://api.github.com/users/${username}`);\n data = await response.json();\n //set to redis\n redisClient.set(username,JSON.stringify(data),redis.print);\n }\n ctx.response.type = \"json\";\n ctx.response.body = data;\n } catch (error) {\n console.error('error',error);\n }\n}", "title": "" }, { "docid": "93cc547b96c9920e028f3a6d45e8f77d", "score": "0.48223385", "text": "function handleError (error) {\n if (!error) return\n\n var message = error.message || error\n console.error('Download failed: ' + message)\n process.exit(1)\n}", "title": "" }, { "docid": "ffd789a439a2ff1f34c78246d5343bd5", "score": "0.4813848", "text": "function gitHubData(userName) {\n\tconst gitUser = userName.username;\n\tconst myName = \"Jason Martin\";\n\tconst gitLink =\"https://github.com/\"+gitUser+\"?tab=repositories\"\n\tconst locationLink = \"https://www.google.com/maps/d/u/0/viewer?ie=UTF8&hl=en&msa=0&ll=39.61520999999999%2C-104.99908399999998&spn=0.158686%2C0.205994&z=11&source=embed&mid=1_6SMyOGhQ6NzZ_PPkQx2opn4m_g\";\n\tconst linkedInLink = \"https://www.linkedin.com/in/jason-martin-8a19583/\";\n\tconst twitterLink = \"https://twitter.com/jmart004\";\n\tconst instagramLink = \"https://www.instagram.com/jmart00000100/?hl=en\";\n\n\taxios.all([\n\t\taxios.get(\"https://api.github.com/users/\"+gitUser+\"/repos?per_page=100\"),\n\t\taxios.get(\"https://api.github.com/users/\"+gitUser+\"/following\"),\n\t\taxios.get(\"https://api.github.com/users/\"+ gitUser+\"/followers\"),\n\t\taxios.get(\"https://api.github.com/users/\"+gitUser+\"/starred\")\n\t])\n\t\t.then(responseArray => {\n\t\t\tlet repositories = responseArray[0].data;\n\t\t\tconst repoNames = repositories.map(function (repo) {\n\t\t\t\treturn repo.name;\n\t\t\t});\n\t\t\tlet repoCount = repoNames.length;\n\t\t\tappendFileAsync(gitUser+\".pdf\",repoCount);\n\t\t\t// console.log(\"Reps \" + repoNames);\n\n\t\t\tlet usersFollowing = responseArray[1].data;\n\t\t\tconst following = usersFollowing.map(function (following) {\n\t\t\t\treturn following.login;\n\t\t\t});\n\t\t\tlet numberOfFollowing = following.length;\n\t\t\tappendFileAsync(gitUser+\".pdf\",numberOfFollowing);\n\t\t\t// console.log(following);\n\t\t\t// console.log(\"Number Following \" + numberOfFollowing);\n\n\t\t\tlet userfollowers = responseArray[2].data;\n\t\t\tconst followers = userfollowers.map(function (followers) {\n\t\t\t\treturn followers.login;\n\t\t\t});\n\t\t\tlet numberOfFollowers = followers.length;\n\t\t\tappendFileAsync(gitUser+\".pdf\",numberOfFollowers);\n\t\t\t// console.log(following);\n\t\t\t// console.log(\"Number of Followers \" + numberOfFollowers);\n\n\t\t\tlet starredRepos = responseArray[2].data;\n\t\t\tconst starred = starredRepos.map(function (starred) {\n\t\t\t\treturn starred;\n\t\t\t});\n\t\t\tlet numberOfStarredRepos = starred.length;\n\t\t\tappendFileAsync(gitUser+\".pdf\",numberOfStarredRepos);\n\t\t\t// console.log(\"Number of stars \" + starred.length);\n\n\t\t\tconst html = generateHTML(gitUser, repoCount, numberOfFollowing, numberOfFollowers, numberOfStarredRepos, gitLink, myName, locationLink, linkedInLink, twitterLink, instagramLink);\n\t\t\twriteFileAsync(\"index.html\", html);\n\t\t});\n}", "title": "" }, { "docid": "a842cf7d974cdfa3f62eaef7f32a500a", "score": "0.48124203", "text": "function ex(error){\n\tglobal.ex(error);\n}", "title": "" }, { "docid": "dbd1666a3463747ce89bc5ac1af11dee", "score": "0.48011354", "text": "async function getResponse(username) { \n repoDiv.innerHTML = '';\n mainEl.innerHTML = '';\n const resp = await fetch(APIURL + username);\n const respData = await resp.json();\n if(respData.message == \"Not Found\"){\n dosentExistAnymorePoorGuyHopeIsGoodInHeaven();\n }\n else{\n renderProfile(respData);\n getRepos(respData.login);\n }\n\n}", "title": "" }, { "docid": "a823ea0260d0f35c089ea6fa4e59703f", "score": "0.4797629", "text": "function urlToGitHubRepository(url) {\n if (!url) {\n throw \"No URL passed as parameter\";\n }\n\n const githubcom = url.match(/^https:\\/\\/github\\.com\\/([^\\/]*)\\/([^\\/]*)\\/?/);\n if (githubcom) {\n return { owner: githubcom[1], name: githubcom[2] };\n }\n\n const githubio = url.match(/^https:\\/\\/([^\\.]*)\\.github\\.io\\/([^\\/]*)\\/?/);\n if (githubio) {\n return { owner: githubio[1], name: githubio[2] };\n }\n\n const whatwg = url.match(/^https:\\/\\/([^\\.]*).spec.whatwg.org\\//);\n if (whatwg) {\n return { owner: \"whatwg\", name: whatwg[1] };\n }\n\n const tc39 = url.match(/^https:\\/\\/tc39.es\\/([^\\/]*)\\//);\n if (tc39) {\n return { owner: \"tc39\", name: tc39[1] };\n }\n\n const csswg = url.match(/^https?:\\/\\/drafts.csswg.org\\/([^\\/]*)\\/?/);\n if (csswg) {\n return { owner: \"w3c\", name: \"csswg-drafts\" };\n }\n\n const ghfxtf = url.match(/^https:\\/\\/drafts.fxtf.org\\/([^\\/]*)\\/?/);\n if (ghfxtf) {\n return { owner: \"w3c\", name: \"fxtf-drafts\" };\n }\n\n const houdini = url.match(/^https:\\/\\/drafts.css-houdini.org\\/([^\\/]*)\\/?/);\n if (houdini) {\n return { owner: \"w3c\", name: \"css-houdini-drafts\" };\n }\n\n const svgwg = url.match(/^https:\\/\\/svgwg.org\\/specs\\/([^\\/]*)\\/?/);\n if (svgwg) {\n return { owner: \"w3c\", name: \"svgwg\" };\n }\n if (url === \"https://svgwg.org/svg2-draft/\") {\n return { owner: \"w3c\", name: \"svgwg\" };\n }\n\n const webgl = url.match(/^https:\\/\\/www\\.khronos\\.org\\/registry\\/webgl\\//);\n if (webgl) {\n return { owner: \"khronosgroup\", name: \"WebGL\" };\n }\n\n return null;\n}", "title": "" }, { "docid": "022cf931965c4a94dd738b900bdda2c9", "score": "0.4795489", "text": "function handleNetworkError(e) {\n\tif (e.code===401) {\n\t\tlogin();\n\t} else {\n\t\terror(e);\n\t}\n}", "title": "" }, { "docid": "49eadf4ad5b1cdbf40c59ce6e0cf9500", "score": "0.47856244", "text": "async function checkRepos(org) {\n let repo = 1;\n let page = 1;\n let failed = false;\n\n while(true) {\n const repoList = await getRepoList(org, page);\n const repoListObject = JSON.parse(repoList);\n if (repoListObject.length != 0) {\n for (entry in repoListObject) {\n const curEntry = repoListObject[entry];\n if (curEntry.archived === false) {\n\t const travisUrl = `https://raw.githubusercontent.com/${org}/${curEntry.name}/HEAD/.travis.yml`\n\t try {\n\t const response = await got(travisUrl);\n\t if (response) {\n console.log('====================================================================');\n\t console.log('REPO:' + curEntry.name);\n console.log('--');\n\t console.log(response.body);\n console.log('====================================================================');\n }\n } catch (error) {\n\t }\n repo++;\n\t}\n }\n } else {\n break;\n }\n page++;\n }\n return(failed);\n}", "title": "" }, { "docid": "4e725732b345d6b1f00f2d4871f46e4a", "score": "0.47816014", "text": "function getFeedUrl() {\n console.log(\"get new feed url\");\n try {\n // get all feeds for this user\n $.ajax({type:'GET', dataType:'json', url: 'https://api.github.com/user', timeout:5000, success:saveFeedUrl, async: false, beforeSend: function (xhr){ xhr.setRequestHeader('Authorization', makeBaseAuth(localStorage[\"oauthToken\"], \"\"));}});\n } catch (e) {\n console.log(\"Error fetching feed list from Github. The server might be down or the api has changed. Will try it again the next time.\");\n }\n}", "title": "" }, { "docid": "05840b458fdfeada2514eae006606766", "score": "0.47750542", "text": "async function fetchRealGitHubOwnerName(username) {\n if (!userCache.has(username)) {\n const { data } = await octokit.users.getByUsername({ username });\n if (data.message) {\n // Alert when user does not exist\n throw res.message;\n }\n userCache.set(username, data.login);\n }\n return userCache.get(username);\n }", "title": "" }, { "docid": "abd8517862827fdc66943a13bb229cc7", "score": "0.4763801", "text": "function gitUser(username) {\n const data = axios.get(`https://api.github.com/users/${username}`);\n return data\n}", "title": "" }, { "docid": "37c0e10bf414c3a37219379b0d46eebe", "score": "0.47580048", "text": "function loadGitHubIssues() {\r\n\r\n $loader.show();\r\n\r\n if( !$openIssues.length ) {\r\n $openIssues = $issuesColMarkup({\r\n className: 'open',\r\n stage: 'Open',\r\n icon: 'issue-opened'\r\n });\r\n\r\n $openIssues.appendTo( $board );\r\n } else {\r\n emptyKanbanCol( $openIssues );\r\n }\r\n\r\n if( !$inProgressIssues.length ) {\r\n $inProgressIssues = $issuesColMarkup({\r\n className: 'in_progress',\r\n stage: 'In Progress',\r\n icon: 'flame'\r\n });\r\n\r\n $inProgressIssues.appendTo( $board );\r\n } else {\r\n emptyKanbanCol( $inProgressIssues );\r\n }\r\n\r\n if( !$codeReviewIssues.length ) {\r\n $codeReviewIssues = $issuesColMarkup({\r\n className: 'code_review',\r\n stage: 'Testing & Code Review',\r\n icon: 'comment-discussion'\r\n });\r\n\r\n $codeReviewIssues.appendTo( $board );\r\n } else {\r\n emptyKanbanCol( $codeReviewIssues );\r\n }\r\n\r\n if( !$closedIssues.length ) {\r\n $closedIssues = $issuesColMarkup({\r\n className: 'closed',\r\n stage: 'Closed',\r\n icon: 'issue-closed'\r\n });\r\n\r\n $closedIssues.appendTo( $board );\r\n } else {\r\n emptyKanbanCol( $closedIssues );\r\n }\r\n\r\n var github = new Github({\r\n token: config.token,\r\n auth: 'oauth'\r\n });\r\n\r\n var repo = github.getRepo(config.username, config.repo);\r\n var milestone;\r\n\r\n repo.listMilestones(function(err, milestones) {\r\n if( err ) {\r\n return;\r\n }\r\n\r\n milestones.forEach(function(ms) {\r\n if( !milestone || new Date(ms.due_on) < new Date(milestone.due_on) ) {\r\n milestone = ms;\r\n }\r\n });\r\n\r\n // Set the title\r\n $milestone.find('.gitban_milestone_name a')\r\n .text( 'Working On: ' + milestone.title );\r\n\r\n // Get time left\r\n var dayDiff = Math.floor( (new Date( milestone.due_on ) - new Date()) / 86400000 );\r\n var timeLeft = ( dayDiff <= 7 ) ? dayDiff + ' days' : Math.floor(dayDiff / 7) + ' weeks';\r\n\r\n // Set the open / closed\r\n $milestone.find('.milestone-meta-item')\r\n .html( '<span class=\"octicon octicon-calendar\"></span>' + ' Due in ' + timeLeft )\r\n\r\n // Set open/closed issues\r\n $milestone.find('.gitban_milestone_description p')\r\n .html( milestone.description );\r\n\r\n getIssues();\r\n });\r\n\r\n /**\r\n * Once we have our milestone load our issues.\r\n */\r\n function getIssues() {\r\n var closeMessageRegex = /((?:[Cc]los(?:e[sd]?|ing)|[Ff]ix(?:e[sd]|ing)?|[Rr]esolv(?:e[sd]?|ing)) +(?:(?:issues? +)?#\\d+(?:(?:, *| +and +)?))+)/g;\r\n var pullRequestedIssues = [];\r\n var prLinks = {};\r\n\r\n // Get the issue #'s referenced in open pull requests\r\n repo.listPulls('open', function(err, pullRequests) {\r\n if( err ) {\r\n return;\r\n }\r\n\r\n pullRequests.forEach(function(pr) {\r\n var matches = pr.title.match( closeMessageRegex );\r\n\r\n if( !matches ) return;\r\n\r\n matches.forEach(function(issueNum) {\r\n issueNum = Number( issueNum.replace(/\\D/g,'') );\r\n\r\n if( pullRequestedIssues.indexOf(issueNum) === -1 ) {\r\n pullRequestedIssues.push( issueNum );\r\n prLinks[issueNum] = pr.html_url;\r\n }\r\n });\r\n });\r\n });\r\n\r\n var opts = { user: config.username, repo: config.repo, milestone: milestone.number, state: 'all' };\r\n var issues = github.getIssues(config.username, config.repo);\r\n var colCount = [0,0,0,0];\r\n\r\n // Sort issues into kanban columns\r\n issues.list(opts, function(err, issues) {\r\n if( err ) {\r\n return;\r\n }\r\n\r\n issues.forEach(function(issue) {\r\n var $i = $issueMarkup( issue );\r\n\r\n // The issue is closed\r\n if( issue.state === 'closed' ) {\r\n $closedIssues.find('.gitban_issues_container').append( $i );\r\n colCount[3]++;\r\n\r\n // There's an open pull request referencing this issue\r\n } else if( pullRequestedIssues.indexOf( issue.number ) !== -1 ) {\r\n // Replace with PR link\r\n $i.find('.gitban_link a').attr('href', prLinks[issue.number] );\r\n $codeReviewIssues.find('.gitban_issues_container').append( $i );\r\n colCount[2]++;\r\n\r\n // Alternative for in progress column: the issue has been assigned\r\n // } else if( !!issue.assignee ) {\r\n\r\n // TODO: Don't hardcode \"in progress\" ?\r\n } else if( issue.labels.map(function(l) { return l.name; }).indexOf('in progress') !== -1 ) {\r\n $inProgressIssues.find('.gitban_issues_container').append( $i );\r\n colCount[1]++;\r\n\r\n // Otherwise it's open\r\n } else {\r\n $openIssues.find('.gitban_issues_container').append( $i );\r\n colCount[0]++;\r\n }\r\n });\r\n\r\n // Set 'total's for each column\r\n var $count = $('.gitban_count');\r\n colCount.forEach(function(num, i) {\r\n $count.eq(i).text( num );\r\n });\r\n\r\n $loader.hide();\r\n });\r\n }\r\n\r\n }", "title": "" }, { "docid": "df1e2ffecc09be5fb7c8657281dcbebc", "score": "0.47579136", "text": "function _profileGetByIdError(error) {\n console.log(error);\n }", "title": "" }, { "docid": "7f7e6d198c386982fd3f5f786a3b75bb", "score": "0.47547507", "text": "function github(req, res) {\n request.post({\n url: \"https://github.com/login/oauth/access_token\",\n qs: {\n client_id: process.env.GITHUB_API_KEY,\n client_secret: process.env.GITHUB_API_SECRET,\n code: req.body.code,\n },\n json: true\n })\n .then(function(response){\n return request.get({\n url: \"https://api.github.com/user\",\n qs: { access_token: response.access_token },\n headers: { 'User-Agent': 'Request-Promise' }\n });\n })\n .then(function(profile) {\n return User.findOne({ email: profile.email })\n .then(function(user) {\n if(user) {\n user.githubId = profile.id;\n user.profileImage = profile.avatar_url;\n }\n else {\n // if not, create a new user\n user = new User({\n name: profile.login,\n email: profile.email,\n githubId: profile.id,\n profileImage: profile.avatar_url\n });\n }\n return user.save();\n })\n })\n .then(function(user) {\n var payload = {\n _id: user._id,\n profileImage: user.profileImage,\n name: user.username\n };\n var token = jwt.sign(payload, secret, { expiresIn: '24h' });\n res.status(200).json({ token: token });\n });\n\n}", "title": "" }, { "docid": "83df4b4d4bbdcc21c5501772395612ec", "score": "0.4752559", "text": "function fetchRepoInfo (scopeName) {\n return fetchGitHubAPIWithPath(`/repos/${scopeName}`)\n}", "title": "" }, { "docid": "75e6a733ed7be35e0483e6bff013b265", "score": "0.4748211", "text": "function getIssues() {\r\n var closeMessageRegex = /((?:[Cc]los(?:e[sd]?|ing)|[Ff]ix(?:e[sd]|ing)?|[Rr]esolv(?:e[sd]?|ing)) +(?:(?:issues? +)?#\\d+(?:(?:, *| +and +)?))+)/g;\r\n var pullRequestedIssues = [];\r\n var prLinks = {};\r\n\r\n // Get the issue #'s referenced in open pull requests\r\n repo.listPulls('open', function(err, pullRequests) {\r\n if( err ) {\r\n return;\r\n }\r\n\r\n pullRequests.forEach(function(pr) {\r\n var matches = pr.title.match( closeMessageRegex );\r\n\r\n if( !matches ) return;\r\n\r\n matches.forEach(function(issueNum) {\r\n issueNum = Number( issueNum.replace(/\\D/g,'') );\r\n\r\n if( pullRequestedIssues.indexOf(issueNum) === -1 ) {\r\n pullRequestedIssues.push( issueNum );\r\n prLinks[issueNum] = pr.html_url;\r\n }\r\n });\r\n });\r\n });\r\n\r\n var opts = { user: config.username, repo: config.repo, milestone: milestone.number, state: 'all' };\r\n var issues = github.getIssues(config.username, config.repo);\r\n var colCount = [0,0,0,0];\r\n\r\n // Sort issues into kanban columns\r\n issues.list(opts, function(err, issues) {\r\n if( err ) {\r\n return;\r\n }\r\n\r\n issues.forEach(function(issue) {\r\n var $i = $issueMarkup( issue );\r\n\r\n // The issue is closed\r\n if( issue.state === 'closed' ) {\r\n $closedIssues.find('.gitban_issues_container').append( $i );\r\n colCount[3]++;\r\n\r\n // There's an open pull request referencing this issue\r\n } else if( pullRequestedIssues.indexOf( issue.number ) !== -1 ) {\r\n // Replace with PR link\r\n $i.find('.gitban_link a').attr('href', prLinks[issue.number] );\r\n $codeReviewIssues.find('.gitban_issues_container').append( $i );\r\n colCount[2]++;\r\n\r\n // Alternative for in progress column: the issue has been assigned\r\n // } else if( !!issue.assignee ) {\r\n\r\n // TODO: Don't hardcode \"in progress\" ?\r\n } else if( issue.labels.map(function(l) { return l.name; }).indexOf('in progress') !== -1 ) {\r\n $inProgressIssues.find('.gitban_issues_container').append( $i );\r\n colCount[1]++;\r\n\r\n // Otherwise it's open\r\n } else {\r\n $openIssues.find('.gitban_issues_container').append( $i );\r\n colCount[0]++;\r\n }\r\n });\r\n\r\n // Set 'total's for each column\r\n var $count = $('.gitban_count');\r\n colCount.forEach(function(num, i) {\r\n $count.eq(i).text( num );\r\n });\r\n\r\n $loader.hide();\r\n });\r\n }", "title": "" }, { "docid": "ff043678473981d248925cfedad8b3f8", "score": "0.47433907", "text": "async searchRepo(options) {\n const repo = `repo:${this.options.owner}/${this.options.repo}`;\n options.q = `${repo} ${options.q}`;\n this.logger.verbose.info(\"Searching repo using:\\n\", options);\n const result = await this.github.search.issuesAndPullRequests(options);\n this.logger.veryVerbose.info(\"Got response from search\\n\", result);\n this.logger.verbose.info(\"Searched repo on GitHub.\");\n return result.data;\n }", "title": "" }, { "docid": "cafed666aa5458f81f5f5501b76e0017", "score": "0.47427505", "text": "function getRepoContributors (repoOwner, repoName, cb) {\n\n var requestURL = \"https://\"+ GITHUB_USER + ':' + GITHUB_TOKEN + \"@api.github.com/repos/\" + repoOwner + \"/\" + repoName + \"/contributors\";\n\n var options = {\n url: requestURL,\n headers: {\n \"User-Agent\": \"GitHub Avatar Downloader - Student Project\"\n }\n };\n\n request (options, function (err, response, avatars) {\n\n if (err) {\n console.log(\"There was an error.\")\n return false;\n }\n\n if (response.statusCode < 400) {\n console.log(\"Should be working now\");\n console.log(response.statusMessage);\n console.log(response.statusCode);\n var body = JSON.parse(avatars);\n cb(body);\n\n } else {\n console.log(\"Something unexpected happened - Status Code 400 plus\");\n }\n\n });\n\n}", "title": "" }, { "docid": "d4452214d5165011c77410775b54b93a", "score": "0.47407624", "text": "function fetchUser() {\n\tvar username = document.getElementById(\"gitSearch\").value;\n\tvar url3 = \"https://api.github.com/users/\" + username;\n\tfetchJSON(url3, createNameDisplay, errorHandler);\n}", "title": "" } ]
5670a5aaabd0e1f112c0ea945b827438
Takes a node and tries to resolve a constant value from it. Returns undefined if no constant value can be resolved.
[ { "docid": "f8c2a9e5cc3032c59d89183919c9736a", "score": "0.51980466", "text": "function resolveNodeValue(node, context) {\n var e_1, _a, e_2, _b;\n var _c, _d;\n if (node == null)\n return undefined;\n var ts = context.ts, checker = context.checker;\n var depth = (context.depth || 0) + 1;\n // Always break when depth is larger than 10.\n // This ensures we cannot run into infinite recursion.\n if (depth > 10)\n return undefined;\n if (ts.isStringLiteralLike(node)) {\n return { value: node.text, node: node };\n }\n else if (ts.isNumericLiteral(node)) {\n return { value: Number(node.text), node: node };\n }\n else if (ts.isPrefixUnaryExpression(node)) {\n var value = (_c = resolveNodeValue(node.operand, __assign(__assign({}, context), { depth: depth }))) === null || _c === void 0 ? void 0 : _c.value;\n return { value: applyPrefixUnaryOperatorToValue(value, node.operator, ts), node: node };\n }\n else if (ts.isObjectLiteralExpression(node)) {\n var object = {};\n try {\n for (var _e = __values(node.properties), _f = _e.next(); !_f.done; _f = _e.next()) {\n var prop = _f.value;\n if (ts.isPropertyAssignment(prop)) {\n // Resolve the \"key\"\n var name_1 = ((_d = resolveNodeValue(prop.name, __assign(__assign({}, context), { depth: depth }))) === null || _d === void 0 ? void 0 : _d.value) || prop.name.getText();\n // Resolve the \"value\n var resolvedValue = resolveNodeValue(prop.initializer, __assign(__assign({}, context), { depth: depth }));\n if (resolvedValue != null && typeof name_1 === \"string\") {\n object[name_1] = resolvedValue.value;\n }\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_f && !_f.done && (_a = _e.return)) _a.call(_e);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return {\n value: object,\n node: node\n };\n }\n else if (node.kind === ts.SyntaxKind.TrueKeyword) {\n return { value: true, node: node };\n }\n else if (node.kind === ts.SyntaxKind.FalseKeyword) {\n return { value: false, node: node };\n }\n else if (node.kind === ts.SyntaxKind.NullKeyword) {\n return { value: null, node: node };\n }\n else if (node.kind === ts.SyntaxKind.UndefinedKeyword) {\n return { value: undefined, node: node };\n }\n // Resolve initializers for variable declarations\n if (ts.isVariableDeclaration(node)) {\n return resolveNodeValue(node.initializer, __assign(__assign({}, context), { depth: depth }));\n }\n // Resolve value of a property access expression. For example: MyEnum.RED\n else if (ts.isPropertyAccessExpression(node)) {\n return resolveNodeValue(node.name, __assign(__assign({}, context), { depth: depth }));\n }\n // Resolve [expression] parts of {[expression]: \"value\"}\n else if (ts.isComputedPropertyName(node)) {\n return resolveNodeValue(node.expression, __assign(__assign({}, context), { depth: depth }));\n }\n // Resolve initializer value of enum members.\n else if (ts.isEnumMember(node)) {\n if (node.initializer != null) {\n return resolveNodeValue(node.initializer, __assign(__assign({}, context), { depth: depth }));\n }\n else {\n return { value: node.parent.name.text + \".\" + node.name.getText(), node: node };\n }\n }\n // Resolve values of variables.\n else if (ts.isIdentifier(node) && checker != null) {\n var declarations = resolveDeclarations(node, { checker: checker, ts: ts });\n if (declarations.length > 0) {\n var resolved = resolveNodeValue(declarations[0], __assign(__assign({}, context), { depth: depth }));\n if (context.strict || resolved != null) {\n return resolved;\n }\n }\n return { value: node.getText(), node: node };\n }\n // Fallthrough\n // - \"my-value\" as string\n // - <any>\"my-value\"\n // - (\"my-value\")\n else if (ts.isAsExpression(node) || ts.isTypeAssertion(node) || ts.isParenthesizedExpression(node)) {\n return resolveNodeValue(node.expression, __assign(__assign({}, context), { depth: depth }));\n }\n // static get is() {\n // return \"my-element\";\n // }\n else if ((ts.isGetAccessor(node) || ts.isMethodDeclaration(node) || ts.isFunctionDeclaration(node)) && node.body != null) {\n try {\n for (var _g = __values(node.body.statements), _h = _g.next(); !_h.done; _h = _g.next()) {\n var stm = _h.value;\n if (ts.isReturnStatement(stm)) {\n return resolveNodeValue(stm.expression, __assign(__assign({}, context), { depth: depth }));\n }\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_h && !_h.done && (_b = _g.return)) _b.call(_g);\n }\n finally { if (e_2) throw e_2.error; }\n }\n }\n // [1, 2]\n else if (ts.isArrayLiteralExpression(node)) {\n return {\n node: node,\n value: node.elements.map(function (el) { var _a; return (_a = resolveNodeValue(el, __assign(__assign({}, context), { depth: depth }))) === null || _a === void 0 ? void 0 : _a.value; })\n };\n }\n return undefined;\n}", "title": "" } ]
[ { "docid": "88e337753e235aed3fda71f2d75b8cad", "score": "0.73378474", "text": "function resolvesToConstant(node) {\n if (Node.Type.isOperator(node) || Node.Type.isFunction(node)) {\n return node.args.every(\n (child) => resolvesToConstant(child));\n }\n else if (Node.Type.isParenthesis(node)) {\n return resolvesToConstant(node.content);\n }\n else if (Node.Type.isConstant(node, true)) {\n return true;\n }\n else if (Node.Type.isSymbol(node)) {\n return false;\n }\n else if (Node.Type.isUnaryMinus(node)) {\n return resolvesToConstant(node.args[0]);\n }\n else {\n throw Error('Unsupported node type: ' + node.type);\n }\n}", "title": "" }, { "docid": "6c8004ec570a468c26c9f002638debf3", "score": "0.5629738", "text": "getValue(node) {\n if (node == null) {\n return null\n } \n if (node.kind != null) {\n node = this.getValue(node.value)\n }\n if (typeof(node) === 'number') {\n return null\n }\n return node\n }", "title": "" }, { "docid": "0beb832a0eab109951c5a96714ae7a9c", "score": "0.55687624", "text": "function BaseConstant(value) {\n return {\n type: \"constant\",\n value: () => value\n }\n}", "title": "" }, { "docid": "a94e5e0a7bd41e0eafea03104fbebbcf", "score": "0.5513261", "text": "function constant(value) {\n return new Constant(value)\n}", "title": "" }, { "docid": "8f92d5406c61288375d4c35de24ac2f1", "score": "0.54564136", "text": "function constant(name) {\n\t\treturn getProperty(CONST, name);\n\t}", "title": "" }, { "docid": "dba685ca1c00f4602dcdb2de2d54db87", "score": "0.5454707", "text": "function getValue(node, version) {\n return resolver[node.type](node, version);\n}", "title": "" }, { "docid": "e85c60383f85a95373ebd66b2ddce3cd", "score": "0.5387521", "text": "function findNode(value, node) {\n var e_1, _a;\n if (value === node.value)\n return node;\n try {\n for (var _b = Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__values\"])(node.children), _c = _b.next(); !_c.done; _c = _b.next()) {\n var child = _c.value;\n var node_1 = findNode(value, child);\n if (node_1)\n return node_1;\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return null;\n}", "title": "" }, { "docid": "e85c60383f85a95373ebd66b2ddce3cd", "score": "0.5387521", "text": "function findNode(value, node) {\n var e_1, _a;\n if (value === node.value)\n return node;\n try {\n for (var _b = Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__values\"])(node.children), _c = _b.next(); !_c.done; _c = _b.next()) {\n var child = _c.value;\n var node_1 = findNode(value, child);\n if (node_1)\n return node_1;\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return null;\n}", "title": "" }, { "docid": "e85c60383f85a95373ebd66b2ddce3cd", "score": "0.5387521", "text": "function findNode(value, node) {\n var e_1, _a;\n if (value === node.value)\n return node;\n try {\n for (var _b = Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__values\"])(node.children), _c = _b.next(); !_c.done; _c = _b.next()) {\n var child = _c.value;\n var node_1 = findNode(value, child);\n if (node_1)\n return node_1;\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return null;\n}", "title": "" }, { "docid": "eb7c279c6fd80e110b7141f859195998", "score": "0.5372376", "text": "function findNode(value, node) {\n var e_1, _a;\n if (value === node.value)\n return node;\n try {\n for (var _b = Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__values\"])(node.children), _c = _b.next(); !_c.done; _c = _b.next()) {\n var child = _c.value;\n var node_1 = findNode(value, child);\n if (node_1)\n return node_1;\n }\n }\n catch (e_1_1) {\n e_1 = { error: e_1_1 };\n }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return))\n _a.call(_b);\n }\n finally {\n if (e_1)\n throw e_1.error;\n }\n }\n return null;\n}", "title": "" }, { "docid": "4ff11a4192fb0618daa5e4d9a971bd07", "score": "0.5355443", "text": "function testconstant(){\n\t//d=\"test1\" error assignment to constant variable\n\tconst d=\"test1\";\n\tconsole.log(d);\n}", "title": "" }, { "docid": "484996b6386f74af8834c9b9f7ba5fee", "score": "0.529827", "text": "function getStaticYAMLValue(node) {\n return getValue(node, null);\n}", "title": "" }, { "docid": "fae7a5d28f67b0c01bfb40deefe956a9", "score": "0.5227403", "text": "function const_lookup_nesting(nesting, name) {\n var i, ii, constant;\n\n if (nesting.length === 0) return;\n\n // If the nesting is not empty the constant is looked up in its elements\n // and in order. The ancestors of those elements are ignored.\n for (i = 0, ii = nesting.length; i < ii; i++) {\n constant = nesting[i].$$const[name];\n if (constant != null) {\n return constant;\n } else if (nesting[i].$$autoload && nesting[i].$$autoload[name]) {\n return handle_autoload(nesting[i], name);\n }\n }\n }", "title": "" }, { "docid": "cee3c39bc6a825640cdea7e4afcfa6a9", "score": "0.5224336", "text": "function findNode(value, node) {\n if (value === node.value) return node;\n\n var _iterator = Object(C_Users_Abid_Loqmen_Desktop_NGforce_thesis_node_modules_babel_runtime_helpers_esm_createForOfIteratorHelper__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(node.children),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var child = _step.value;\n\n var _node = findNode(value, child);\n\n if (_node) return _node;\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n return null;\n} // Return the path to the node with the given value using DFS", "title": "" }, { "docid": "87c855040a4f92d6d697e6f5875f7d7d", "score": "0.5197101", "text": "function CONST(key) {\n return exports.constants[key];\n}", "title": "" }, { "docid": "f6e03d6bc6e4d12b6d5569ef7dadecba", "score": "0.5166622", "text": "function constant(value) {\n return function() {\n return value;\n };\n }", "title": "" }, { "docid": "f6e03d6bc6e4d12b6d5569ef7dadecba", "score": "0.5166622", "text": "function constant(value) {\n return function() {\n return value;\n };\n }", "title": "" }, { "docid": "f6e03d6bc6e4d12b6d5569ef7dadecba", "score": "0.5166622", "text": "function constant(value) {\n return function() {\n return value;\n };\n }", "title": "" }, { "docid": "f6e03d6bc6e4d12b6d5569ef7dadecba", "score": "0.5166622", "text": "function constant(value) {\n return function() {\n return value;\n };\n }", "title": "" }, { "docid": "f6e03d6bc6e4d12b6d5569ef7dadecba", "score": "0.5166622", "text": "function constant(value) {\n return function() {\n return value;\n };\n }", "title": "" }, { "docid": "f6e03d6bc6e4d12b6d5569ef7dadecba", "score": "0.5166622", "text": "function constant(value) {\n return function() {\n return value;\n };\n }", "title": "" }, { "docid": "f6e03d6bc6e4d12b6d5569ef7dadecba", "score": "0.5166622", "text": "function constant(value) {\n return function() {\n return value;\n };\n }", "title": "" }, { "docid": "f6e03d6bc6e4d12b6d5569ef7dadecba", "score": "0.5166622", "text": "function constant(value) {\n return function() {\n return value;\n };\n }", "title": "" }, { "docid": "f6e03d6bc6e4d12b6d5569ef7dadecba", "score": "0.5166622", "text": "function constant(value) {\n return function() {\n return value;\n };\n }", "title": "" }, { "docid": "3ee8b143b50e67b1965e42a70d21762b", "score": "0.51611805", "text": "function findNode(value, node) {\n if (value === node.value)\n return node;\n for (const child of node.children) {\n const node = findNode(value, child);\n if (node)\n return node;\n }\n return null;\n}", "title": "" }, { "docid": "3ee8b143b50e67b1965e42a70d21762b", "score": "0.51611805", "text": "function findNode(value, node) {\n if (value === node.value)\n return node;\n for (const child of node.children) {\n const node = findNode(value, child);\n if (node)\n return node;\n }\n return null;\n}", "title": "" }, { "docid": "3ee8b143b50e67b1965e42a70d21762b", "score": "0.51611805", "text": "function findNode(value, node) {\n if (value === node.value)\n return node;\n for (const child of node.children) {\n const node = findNode(value, child);\n if (node)\n return node;\n }\n return null;\n}", "title": "" }, { "docid": "3ee8b143b50e67b1965e42a70d21762b", "score": "0.51611805", "text": "function findNode(value, node) {\n if (value === node.value)\n return node;\n for (const child of node.children) {\n const node = findNode(value, child);\n if (node)\n return node;\n }\n return null;\n}", "title": "" }, { "docid": "3ee8b143b50e67b1965e42a70d21762b", "score": "0.51611805", "text": "function findNode(value, node) {\n if (value === node.value)\n return node;\n for (const child of node.children) {\n const node = findNode(value, child);\n if (node)\n return node;\n }\n return null;\n}", "title": "" }, { "docid": "58beeea1f674ebc69734bb18fe531cac", "score": "0.5160426", "text": "function getNodeValue(node) {\n switch (node.type) {\n case 'array':\n return node.children.map(getNodeValue);\n case 'object':\n var obj = Object.create(null);\n for (var _i = 0, _a = node.children; _i < _a.length; _i++) {\n var prop = _a[_i];\n var valueNode = prop.children[1];\n if (valueNode) {\n obj[prop.children[0].value] = getNodeValue(valueNode);\n }\n }\n return obj;\n case 'null':\n case 'string':\n case 'number':\n case 'boolean':\n return node.value;\n default:\n return void 0;\n }\n}", "title": "" }, { "docid": "02c56dc31ef1919a2fb2fb0ab0a3310a", "score": "0.5129694", "text": "parseMaybeConst () {\n const constToken = this.getToken();\n if(constToken.type === this.lexerClass.RK_CONST) {\n this.pos++;\n const typeString = this.parseType();\n return this.parseDeclaration(typeString, true);\n } else if(this.isVariableType(constToken)) {\n const typeString = this.parseType();\n return this.parseDeclaration(typeString);\n } else {\n throw SyntaxErrorFactory.token_missing_list(\n [this.lexer.literalNames[this.lexerClass.RK_CONST]].concat(this.getTypeArray()), constToken);\n }\n\n }", "title": "" }, { "docid": "8dec43f87f004a62959e5f0899d96f4d", "score": "0.51099837", "text": "function const_lookup_nesting(nesting, name) {\n var i, ii, result, constant;\n\n if (nesting.length === 0) return;\n\n // If the nesting is not empty the constant is looked up in its elements\n // and in order. The ancestors of those elements are ignored.\n for (i = 0, ii = nesting.length; i < ii; i++) {\n constant = nesting[i].$$const[name];\n if (constant != null) return constant;\n }\n }", "title": "" }, { "docid": "82ae2b666b87946dc93dd7c3683aeca6", "score": "0.5106255", "text": "function commonJSRequireSource(node) {\n const args = node.arguments;\n if (\n node.callee.name === \"require\" &&\n args.length === 1 &&\n t.isStringLiteral(args[0])\n ) {\n return args[0].value;\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "a3397ed42790520bad3ab92cb3f1b6c8", "score": "0.50772274", "text": "function findNode(value,node){var e_1,_a;if(value===node.value)return node;try{for(var _b=Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__values\"])(node.children),_c=_b.next();!_c.done;_c=_b.next()){var child=_c.value;var node_1=findNode(value,child);if(node_1)return node_1;}}catch(e_1_1){e_1={error:e_1_1};}finally{try{if(_c&&!_c.done&&(_a=_b[\"return\"]))_a.call(_b);}finally{if(e_1)throw e_1.error;}}return null;}// Return the path to the node with the given value using DFS", "title": "" }, { "docid": "f3ecd55808f926aac9bad828612e71f2", "score": "0.50548375", "text": "function negativeCoefficient(node) {\n if (NodeType.isConstant(node)) {\n // Node is a constant\n node = NodeCreator.constant(0 - parseFloat(node.value));\n }\n else {\n // Node is a constant fraction\n const numeratorValue = 0 - parseFloat(node.args[0].value);\n node.args[0] = NodeCreator.constant(numeratorValue);\n }\n return node;\n}", "title": "" }, { "docid": "6880f2af3e538cd7966df958163bb2e2", "score": "0.50523704", "text": "function constant(value) {\n return function() {\n return value;\n };\n}", "title": "" }, { "docid": "75ac005020cc78b235b683e2d47d370d", "score": "0.49890083", "text": "function $Const(strConstant)\n{\n\tif (Vixen.Constants[strConstant] == undefined)\n\t{\n\t\tthrow(\"ERROR: constant: '\"+ strConstant +\"' is undefined\");\n\t\treturn;\n\t}\n\t\n\treturn Vixen.Constants[strConstant];\n}", "title": "" }, { "docid": "26376b556c773271f8c7c9544282473a", "score": "0.49775702", "text": "function get_const(n) {\n var t, c, p;\n t = const_tab[n];\n p = BigFloatEnv.prec;\n if (t && t.prec == p) {\n return t.val;\n } else {\n switch(n) {\n case 0: c = Float.exp(1); break;\n case 1: c = Float.log(10); break;\n// case 2: c = Float.log(2); break;\n case 3: c = 1/Float.log(2); break;\n case 4: c = 1/Float.log(10); break;\n// case 5: c = Float.atan(1) * 4; break;\n case 6: c = Float.sqrt(0.5); break;\n case 7: c = Float.sqrt(2); break;\n }\n if (p <= 1024) {\n const_tab[n] = { prec: p, val: c };\n }\n return c;\n }\n }", "title": "" }, { "docid": "972451953fe038542baf3d6496c0acc1", "score": "0.4973369", "text": "constant(name, value) {\n return this.singleton(name, () => value);\n }", "title": "" }, { "docid": "6911d542a7ba8f703a48224f96773912", "score": "0.49454415", "text": "function CONST_EXPR(expr) {\n return expr;\n}", "title": "" }, { "docid": "39abb407eff3538ec3ee1fe593b2314d", "score": "0.49426425", "text": "function LCA(node, val1, val2){\n\tvar right = exists(node.right, val1, val2);\n\tvar left = exists(node.left, val1, val2);\n\tif (right && left){\n\t\treturn node.value;\n\t}else if (right && !left){\n\t\tLCA(node.right, val1, val2);\n\t}else if(!right && left){\n\t\tLCA(node.left,val1, val2);\n\t}else{\n\t\treturn null;\n\t}\n}", "title": "" }, { "docid": "217226450c8ec927c6ddf82b6f6aaa62", "score": "0.49270532", "text": "function useConstant(fn) {\n var ref = __WEBPACK_IMPORTED_MODULE_0_react___default.a.useRef();\n\n if (!ref.current) {\n ref.current = {\n v: fn()\n };\n }\n\n return ref.current.v;\n}", "title": "" }, { "docid": "7c355247d4f4cfd62e87b73572df6bb9", "score": "0.49264053", "text": "function expresionValue(node)\n{\n let value;\n if(node.type=='Literal') {\n value= node.value;\n }\n else if(node.type=='Identifier') {\n value= node.name;\n }\n else if(node.type=='UnaryExpression') {\n value=node.operator + node.argument.value;\n }\n else if(node.type=='MemberExpression')\n {\n value= node.object.name+'['+expresrionPars(node.property)+']';\n }\n return value;\n}", "title": "" }, { "docid": "3d1943a7766b8d1f732bd4938b274567", "score": "0.48923883", "text": "function constant(c) {\n return function() {\n return c;\n };\n }", "title": "" }, { "docid": "dab00fc2e624ebc94d297dc55890923f", "score": "0.48689362", "text": "function parseRequireExpression(node) {\n if (t.isSequenceExpression(node)) {\n node = node.expressions[node.expressions.length - 1];\n }\n\n if (t.isCallExpression(node)) {\n const source = commonJSRequireSource(node);\n if (source) {\n return { source, symbol: \"<CJS>\" };\n }\n } else if (t.isMemberExpression(node) && t.isCallExpression(node.object)) {\n const source = commonJSRequireSource(node.object);\n if (!source) {\n return null;\n }\n let symbol;\n if (t.isIdentifier(node.property)) {\n symbol = node.property.name;\n } else if (t.isLiteral(node.property)) {\n symbol = node.property.value;\n } else {\n return null;\n }\n return { source, symbol };\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "3adce037c1f015a955e67c4e00abdc27", "score": "0.48496178", "text": "function valueOf(expr){\n // If it's a number, just return it.\n let x = parseInt(expr)\n if (!isNaN(x)){\n return x\n }\n\n // If the register exists, return its value\n if (expr in regs){\n return regs[expr]\n }\n\n // Reg must not exist yet, so create and initialize it.\n regs[expr] = 0\n return 0\n }", "title": "" }, { "docid": "2396cf5f9f49a1dbd3623a78d191c329", "score": "0.4848267", "text": "getConstFileLink(constName, containingNamespace) {\n const lowerName = constName === null || constName === void 0 ? void 0 : constName.toLowerCase();\n const constMap = this.getConstMap();\n let result = constMap.get(util_1.util.getFullyQualifiedClassName(lowerName, containingNamespace === null || containingNamespace === void 0 ? void 0 : containingNamespace.toLowerCase()));\n //if we couldn't find the constant by its full namespaced name, look for a global constant with that name\n if (!result) {\n result = constMap.get(lowerName);\n }\n return result;\n }", "title": "" }, { "docid": "4842c8b2a7ca9488140f09d94425a663", "score": "0.48375437", "text": "function findNode(value, node) {\n if (value === node.value) return node;\n\n var _iterator12 = _createForOfIteratorHelper(node.children),\n _step11;\n\n try {\n for (_iterator12.s(); !(_step11 = _iterator12.n()).done;) {\n var child = _step11.value;\n\n var _node = findNode(value, child);\n\n if (_node) return _node;\n }\n } catch (err) {\n _iterator12.e(err);\n } finally {\n _iterator12.f();\n }\n\n return null;\n } // Return the path to the node with the given value using DFS", "title": "" }, { "docid": "483931573aed09e17711d5a18227ef2f", "score": "0.4830917", "text": "function valueFromNode(node, onVariable) {\n if (onVariable === void 0) {\n onVariable = defaultValueFromVariable;\n }\n switch (node.kind) {\n case 'Variable':\n return onVariable(node);\n case 'NullValue':\n return null;\n case 'IntValue':\n return parseInt(node.value, 10);\n case 'FloatValue':\n return parseFloat(node.value);\n case 'ListValue':\n return node.values.map(function (v) {\n return valueFromNode(v, onVariable);\n });\n case 'ObjectValue':\n {\n var value = {};\n for (var _i = 0, _a = node.fields; _i < _a.length; _i++) {\n var field = _a[_i];\n value[field.name.value] = valueFromNode(field.value, onVariable);\n }\n return value;\n }\n default:\n return node.value;\n }\n}", "title": "" }, { "docid": "483931573aed09e17711d5a18227ef2f", "score": "0.4830917", "text": "function valueFromNode(node, onVariable) {\n if (onVariable === void 0) {\n onVariable = defaultValueFromVariable;\n }\n switch (node.kind) {\n case 'Variable':\n return onVariable(node);\n case 'NullValue':\n return null;\n case 'IntValue':\n return parseInt(node.value, 10);\n case 'FloatValue':\n return parseFloat(node.value);\n case 'ListValue':\n return node.values.map(function (v) {\n return valueFromNode(v, onVariable);\n });\n case 'ObjectValue':\n {\n var value = {};\n for (var _i = 0, _a = node.fields; _i < _a.length; _i++) {\n var field = _a[_i];\n value[field.name.value] = valueFromNode(field.value, onVariable);\n }\n return value;\n }\n default:\n return node.value;\n }\n}", "title": "" }, { "docid": "4cf760b3ea4f1b1b2b88403db2982ab2", "score": "0.48279524", "text": "function nodeVal(node) {\n\t node?.normalize();\n\t return (node && node.textContent) || \"\";\n\t}", "title": "" }, { "docid": "1eba03c8c5e1eecbbe058f368a6d6025", "score": "0.48251203", "text": "function constant(arg) {\n return function () {\n return arg;\n };\n }", "title": "" }, { "docid": "d66511017e53a29df047d48be1281cb1", "score": "0.48182866", "text": "function findNode(node)\n\t{\n \t\tif(m_xmlDOM.documentElement.querySelector)\n\t\t\t value = m_xmlDOM.documentElement.querySelector(node);\n\t\telse\n\t\t\t value = LumisPortalUtil.selectSingleNode(node.replace(\">\",\"/\"), m_xmlDOM.documentElement);\n \t\treturn value;\n\t}", "title": "" }, { "docid": "0e6bfac1a5ddef0df02548382b280dd4", "score": "0.47909355", "text": "function valueFromNode(node, onVariable) {\n if (onVariable === void 0) { onVariable = defaultValueFromVariable; }\n switch (node.kind) {\n case 'Variable':\n return onVariable(node);\n case 'NullValue':\n return null;\n case 'IntValue':\n return parseInt(node.value);\n case 'FloatValue':\n return parseFloat(node.value);\n case 'ListValue':\n return node.values.map(function (v) { return valueFromNode(v, onVariable); });\n case 'ObjectValue': {\n var value = {};\n for (var _i = 0, _a = node.fields; _i < _a.length; _i++) {\n var field = _a[_i];\n value[field.name.value] = valueFromNode(field.value, onVariable);\n }\n return value;\n }\n default:\n return node.value;\n }\n}", "title": "" }, { "docid": "31e1f4d869ba1cde4f8e271f6b845a78", "score": "0.47881833", "text": "function valueFromNode(node, onVariable) {\n if (onVariable === void 0) { onVariable = defaultValueFromVariable; }\n switch (node.kind) {\n case 'Variable':\n return onVariable(node);\n case 'NullValue':\n return null;\n case 'IntValue':\n return parseInt(node.value, 10);\n case 'FloatValue':\n return parseFloat(node.value);\n case 'ListValue':\n return node.values.map(function (v) { return valueFromNode(v, onVariable); });\n case 'ObjectValue': {\n var value = {};\n for (var _i = 0, _a = node.fields; _i < _a.length; _i++) {\n var field = _a[_i];\n value[field.name.value] = valueFromNode(field.value, onVariable);\n }\n return value;\n }\n default:\n return node.value;\n }\n}", "title": "" }, { "docid": "31e1f4d869ba1cde4f8e271f6b845a78", "score": "0.47881833", "text": "function valueFromNode(node, onVariable) {\n if (onVariable === void 0) { onVariable = defaultValueFromVariable; }\n switch (node.kind) {\n case 'Variable':\n return onVariable(node);\n case 'NullValue':\n return null;\n case 'IntValue':\n return parseInt(node.value, 10);\n case 'FloatValue':\n return parseFloat(node.value);\n case 'ListValue':\n return node.values.map(function (v) { return valueFromNode(v, onVariable); });\n case 'ObjectValue': {\n var value = {};\n for (var _i = 0, _a = node.fields; _i < _a.length; _i++) {\n var field = _a[_i];\n value[field.name.value] = valueFromNode(field.value, onVariable);\n }\n return value;\n }\n default:\n return node.value;\n }\n}", "title": "" }, { "docid": "31e1f4d869ba1cde4f8e271f6b845a78", "score": "0.47881833", "text": "function valueFromNode(node, onVariable) {\n if (onVariable === void 0) { onVariable = defaultValueFromVariable; }\n switch (node.kind) {\n case 'Variable':\n return onVariable(node);\n case 'NullValue':\n return null;\n case 'IntValue':\n return parseInt(node.value, 10);\n case 'FloatValue':\n return parseFloat(node.value);\n case 'ListValue':\n return node.values.map(function (v) { return valueFromNode(v, onVariable); });\n case 'ObjectValue': {\n var value = {};\n for (var _i = 0, _a = node.fields; _i < _a.length; _i++) {\n var field = _a[_i];\n value[field.name.value] = valueFromNode(field.value, onVariable);\n }\n return value;\n }\n default:\n return node.value;\n }\n}", "title": "" }, { "docid": "31e1f4d869ba1cde4f8e271f6b845a78", "score": "0.47881833", "text": "function valueFromNode(node, onVariable) {\n if (onVariable === void 0) { onVariable = defaultValueFromVariable; }\n switch (node.kind) {\n case 'Variable':\n return onVariable(node);\n case 'NullValue':\n return null;\n case 'IntValue':\n return parseInt(node.value, 10);\n case 'FloatValue':\n return parseFloat(node.value);\n case 'ListValue':\n return node.values.map(function (v) { return valueFromNode(v, onVariable); });\n case 'ObjectValue': {\n var value = {};\n for (var _i = 0, _a = node.fields; _i < _a.length; _i++) {\n var field = _a[_i];\n value[field.name.value] = valueFromNode(field.value, onVariable);\n }\n return value;\n }\n default:\n return node.value;\n }\n}", "title": "" }, { "docid": "31e1f4d869ba1cde4f8e271f6b845a78", "score": "0.47881833", "text": "function valueFromNode(node, onVariable) {\n if (onVariable === void 0) { onVariable = defaultValueFromVariable; }\n switch (node.kind) {\n case 'Variable':\n return onVariable(node);\n case 'NullValue':\n return null;\n case 'IntValue':\n return parseInt(node.value, 10);\n case 'FloatValue':\n return parseFloat(node.value);\n case 'ListValue':\n return node.values.map(function (v) { return valueFromNode(v, onVariable); });\n case 'ObjectValue': {\n var value = {};\n for (var _i = 0, _a = node.fields; _i < _a.length; _i++) {\n var field = _a[_i];\n value[field.name.value] = valueFromNode(field.value, onVariable);\n }\n return value;\n }\n default:\n return node.value;\n }\n}", "title": "" }, { "docid": "31e1f4d869ba1cde4f8e271f6b845a78", "score": "0.47881833", "text": "function valueFromNode(node, onVariable) {\n if (onVariable === void 0) { onVariable = defaultValueFromVariable; }\n switch (node.kind) {\n case 'Variable':\n return onVariable(node);\n case 'NullValue':\n return null;\n case 'IntValue':\n return parseInt(node.value, 10);\n case 'FloatValue':\n return parseFloat(node.value);\n case 'ListValue':\n return node.values.map(function (v) { return valueFromNode(v, onVariable); });\n case 'ObjectValue': {\n var value = {};\n for (var _i = 0, _a = node.fields; _i < _a.length; _i++) {\n var field = _a[_i];\n value[field.name.value] = valueFromNode(field.value, onVariable);\n }\n return value;\n }\n default:\n return node.value;\n }\n}", "title": "" }, { "docid": "31e1f4d869ba1cde4f8e271f6b845a78", "score": "0.47881833", "text": "function valueFromNode(node, onVariable) {\n if (onVariable === void 0) { onVariable = defaultValueFromVariable; }\n switch (node.kind) {\n case 'Variable':\n return onVariable(node);\n case 'NullValue':\n return null;\n case 'IntValue':\n return parseInt(node.value, 10);\n case 'FloatValue':\n return parseFloat(node.value);\n case 'ListValue':\n return node.values.map(function (v) { return valueFromNode(v, onVariable); });\n case 'ObjectValue': {\n var value = {};\n for (var _i = 0, _a = node.fields; _i < _a.length; _i++) {\n var field = _a[_i];\n value[field.name.value] = valueFromNode(field.value, onVariable);\n }\n return value;\n }\n default:\n return node.value;\n }\n}", "title": "" }, { "docid": "3134c76e63d7c231fd5d157ba22d3b1d", "score": "0.47874245", "text": "function collectConstantExponents(node) {\n // If we're multiplying constant nodes together, they all share the same\n // base. Get that from the first node.\n const baseNode = ConstantOrConstantPower.getBaseNode(node.args[0]);\n // The new exponent will be a sum of exponents (an operation, wrapped in\n // parens) e.g. 10^(3+4+5)\n const exponentNodeList = node.args.map(\n ConstantOrConstantPower.getExponentNode);\n const newExponent = Node.Creator.parenthesis(\n Node.Creator.operator('+', exponentNodeList));\n const newNode = Node.Creator.operator('^', [baseNode, newExponent]);\n return Node.Status.nodeChanged(\n ChangeTypes.COLLECT_CONSTANT_EXPONENTS, node, newNode);\n}", "title": "" }, { "docid": "69f57877f5cc6caf3b59938393fb1f35", "score": "0.47821257", "text": "get_value (parent, context, globals, node) {\n if (!this.root) {\n this.root = Node$1.create_root(this.nodes);\n }\n return this.root.get_value(parent, context, globals, node)\n }", "title": "" }, { "docid": "121f71d41dad5af6d5d28b75ff943607", "score": "0.4771729", "text": "function resolve (variable) {\n var value = values[Math.abs(variable)];\n if (value === undefined) return undefined;\n return variable < 0? value: !value;\n }", "title": "" }, { "docid": "9fd98e19015666c6e5eeac48eb6aac77", "score": "0.47675103", "text": "function dfs(node, val) {\n if (node === null) return 0;\n\n val = val * 2 + node.val;\n\n if (node.left === null && node.right === null) return val;\n return dfs(node.left, val) + dfs(node.right, val);\n }", "title": "" }, { "docid": "7adae65e57dfb0220f4df3bca317b69c", "score": "0.4766651", "text": "const(nameOrPrefix, rhs, _constant) {\n return this._def(scope_1.varKinds.const, nameOrPrefix, rhs, _constant);\n }", "title": "" }, { "docid": "dfee6bca99a884c2a3c32f0c7c0d3a68", "score": "0.47649053", "text": "function reduceLiteral(node, reducer) {\n var value = node.literals[0];\n updateRange(node, reducer, value, value);\n}", "title": "" }, { "docid": "b19207c45c8692e1cdd15cc0cc561ffc", "score": "0.4763436", "text": "function evaluateNodeWithValue(options) {\n options.logger.logNode(options.node, options.typescript, \"nodeWithValue\");\n const { node } = options, rest = __rest(options, [\"node\"]);\n // Until #37135 is resolved, isPropertyName will return false for PrivateIdentifiers (even though they are actually PropertyNames)\n if (options.typescript.isPropertyName(node) || options.typescript.isPrivateIdentifier(node)) {\n return evaluatePropertyName(Object.assign({ node }, rest));\n }\n throw new UnexpectedNodeError({ node, typescript: options.typescript });\n}", "title": "" }, { "docid": "7e0d9fd261517e19dea6c0f49d62cdfb", "score": "0.47311378", "text": "isConstant() {\n if (this.type == \"name\" && this.value == \"x\") {\n return false\n }\n if (this.left != undefined && !this.left.isConstant()) {\n return false\n }\n if (this.right != undefined && !this.right.isConstant()) {\n return false\n }\n return true\n }", "title": "" }, { "docid": "42e98985cc963a627f9c42af421a997b", "score": "0.47079083", "text": "static sanitizeNode(val, error) {\n switch (true) {\n case undefined === val:\n val = null;\n \n case null === val:\n case val instanceof Node:\n break;\n \n default:\n error && Node.throw(\"pointer\");\n return null;\n }\n \n return val;\n }", "title": "" }, { "docid": "ca1bbcfddb4e572adb6b9955291041f8", "score": "0.4697578", "text": "function getValue(node) {\n\treturn parseInt(node.textContent);\n}", "title": "" }, { "docid": "f214cd409537d8cff503582dac920adf", "score": "0.46939817", "text": "function checkExpression(node, contextualMapper) {\n var type;\n if (node.kind === 139 /* QualifiedName */) {\n type = checkQualifiedName(node);\n }\n else {\n var uninstantiatedType = checkExpressionWorker(node, contextualMapper);\n type = instantiateTypeWithSingleGenericCallSignature(node, uninstantiatedType, contextualMapper);\n }\n if (isConstEnumObjectType(type)) {\n // enum object type for const enums are only permitted in:\n // - 'left' in property access\n // - 'object' in indexed access\n // - target in rhs of import statement\n var ok = (node.parent.kind === 172 /* PropertyAccessExpression */ && node.parent.expression === node) ||\n (node.parent.kind === 173 /* ElementAccessExpression */ && node.parent.expression === node) ||\n ((node.kind === 69 /* Identifier */ || node.kind === 139 /* QualifiedName */) && isInRightSideOfImportOrExportAssignment(node));\n if (!ok) {\n error(node, ts.Diagnostics.const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment);\n }\n }\n return type;\n }", "title": "" }, { "docid": "3e1cf3624ab70d22373bd38f3e52aca0", "score": "0.46890804", "text": "function useConstant(init) {\n var ref = useRef(null);\n if (ref.current === null) {\n ref.current = init();\n }\n return ref.current;\n}", "title": "" }, { "docid": "86bd7bc785e4bd75ee9340ca995dfd07", "score": "0.46813464", "text": "function staticallyResolve(node, host, checker, foreignFunctionResolver) {\n return new StaticInterpreter(host, checker).visit(node, {\n absoluteModuleName: null,\n scope: new Map(), foreignFunctionResolver: foreignFunctionResolver,\n });\n }", "title": "" }, { "docid": "fffb84d3455817bbc5b2924ac0504913", "score": "0.4670047", "text": "function staticallyResolve(node, checker) {\n return new StaticInterpreter(checker, new Map(), 0 /* No */)\n .visit(node);\n }", "title": "" }, { "docid": "7b06ce7641c9ebeaa24809f929c1230f", "score": "0.46655935", "text": "function constant(x) {\n return function(y) {\n return x;\n };\n }", "title": "" }, { "docid": "7b06ce7641c9ebeaa24809f929c1230f", "score": "0.46655935", "text": "function constant(x) {\n return function(y) {\n return x;\n };\n }", "title": "" }, { "docid": "ed2b208b47565fd669bc2a220c27697f", "score": "0.4638453", "text": "function getReferencedDeclarationWithCollidingName(node) {\n var symbol = getReferencedValueSymbol(node);\n return symbol && isSymbolOfDeclarationWithCollidingName(symbol) ? symbol.valueDeclaration : undefined;\n }", "title": "" }, { "docid": "5c7180aea66e47486fa8b0134c0f0722", "score": "0.4625625", "text": "function getComponent(node) {\n return node.__c;\n}", "title": "" }, { "docid": "47cb4f0b3069abea43be35afa0cd8971", "score": "0.46080682", "text": "function getConstrainedTypeAtLocation(services, node) {\n const nodeType = services.getTypeAtLocation(node);\n const constrained = services.program\n .getTypeChecker()\n .getBaseConstraintOfType(nodeType);\n return constrained ?? nodeType;\n}", "title": "" }, { "docid": "7289d37814f82ff57c0c38d6c3867d9b", "score": "0.46004954", "text": "function useConst(initialValue) {\n // Use useRef to store the value because it's the least expensive built-in hook that works here\n // (we could also use `const [value] = React.useState(initialValue)` but that's more expensive\n // internally due to reducer handling which we don't need)\n var ref = react__WEBPACK_IMPORTED_MODULE_0__.useRef();\n if (ref.current === undefined) {\n // Box the value in an object so we can tell if it's initialized even if the initializer\n // returns/is undefined\n ref.current = {\n value: typeof initialValue === 'function' ? initialValue() : initialValue,\n };\n }\n return ref.current.value;\n}", "title": "" }, { "docid": "7289d37814f82ff57c0c38d6c3867d9b", "score": "0.46004954", "text": "function useConst(initialValue) {\n // Use useRef to store the value because it's the least expensive built-in hook that works here\n // (we could also use `const [value] = React.useState(initialValue)` but that's more expensive\n // internally due to reducer handling which we don't need)\n var ref = react__WEBPACK_IMPORTED_MODULE_0__.useRef();\n if (ref.current === undefined) {\n // Box the value in an object so we can tell if it's initialized even if the initializer\n // returns/is undefined\n ref.current = {\n value: typeof initialValue === 'function' ? initialValue() : initialValue,\n };\n }\n return ref.current.value;\n}", "title": "" }, { "docid": "df959eff8a96333434850327e969a0b9", "score": "0.45919108", "text": "function wrapConstant(value)\r\n {\r\n if (value == null)\r\n return function() { return null };\r\n else if (LABKEY.Utils.isFunction(value))\r\n return value;\r\n else\r\n return function (row) { return value };\r\n }", "title": "" }, { "docid": "56ae8b061a1c62db5582401426c79dd8", "score": "0.4590024", "text": "function findNode(node) {\n // if newValue > this.value, check if this.right is undefined\n if (newValue > node.value) {\n //if undefined, this.right = new node\n if (node.right === undefined) {\n node.right = newNode;\n } else {\n //if not, recurse through recursive function on the right\n findNode(node.right)\n }\n } else if (newValue < node.value) {\n //if undefined, that.left = new node\n if (node.left === undefined) {\n node.left = newNode;\n } else {\n //if not, recurse through recursive function on the left\n findNode(node.left);\n }\n }\n }", "title": "" }, { "docid": "73bc009a64343a509b276f5b4f289714", "score": "0.45862448", "text": "static getTextOfIdentifierOrLiteral(node) {\n // Compiler internal:\n // https://github.com/microsoft/TypeScript/blob/v3.2.2/src/compiler/utilities.ts#L2721\n return ts.getTextOfIdentifierOrLiteral(node);\n }", "title": "" }, { "docid": "4556fafb5c0088a5f9b97a3000617abc", "score": "0.4580153", "text": "_optimizeConstants(start, end) {\n let n = start;\n for (; n && n != end;) {\n if (n.kind == \"if\") {\n if (n.next.length > 1) {\n this._optimizeConstants(n.next[1], n.blockPartner);\n }\n }\n if (n.kind == \"const\" && n.assign.writeCount == 1 && !n.assign.addressable) {\n n.assign.isConstant = true;\n n.assign.constantValue = n.args[0];\n let n2 = n.next[0];\n Node.removeNode(n);\n n = n2;\n }\n else {\n /* for(let i = 0; i < n.args.length; i++) {\n let a = n.args[i];\n if (a instanceof Variable && a.isConstant && typeof(a.constantValue) == \"number\") {\n n.args[i] = a.constantValue;\n }\n } */\n n = n.next[0];\n }\n // TODO: Computations on constants can be optimized\n }\n }", "title": "" }, { "docid": "9de4e873698bad42c34e7a6b8fa9ffde", "score": "0.45778143", "text": "function constant(v) {\n return function() {\n return v;\n };\n}", "title": "" }, { "docid": "9de4e873698bad42c34e7a6b8fa9ffde", "score": "0.45778143", "text": "function constant(v) {\n return function() {\n return v;\n };\n}", "title": "" }, { "docid": "9de4e873698bad42c34e7a6b8fa9ffde", "score": "0.45778143", "text": "function constant(v) {\n return function() {\n return v;\n };\n}", "title": "" }, { "docid": "47e26ca830d0892e0878d70166d68a64", "score": "0.45746952", "text": "function valueFromAST(valueNode, type, variables) {\n if (!valueNode) {\n // When there is no node, then there is also no value.\n // Importantly, this is different from returning the value null.\n return;\n }\n\n if (valueNode.kind === _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_4__[\"Kind\"].VARIABLE) {\n var variableName = valueNode.name.value;\n\n if (variables == null || variables[variableName] === undefined) {\n // No valid return value.\n return;\n }\n\n var variableValue = variables[variableName];\n\n if (variableValue === null && Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_5__[\"isNonNullType\"])(type)) {\n return; // Invalid: intentionally return no value.\n } // Note: This does no further checking that this variable is correct.\n // This assumes that this query has been validated and the variable\n // usage here is of the correct type.\n\n\n return variableValue;\n }\n\n if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_5__[\"isNonNullType\"])(type)) {\n if (valueNode.kind === _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_4__[\"Kind\"].NULL) {\n return; // Invalid: intentionally return no value.\n }\n\n return valueFromAST(valueNode, type.ofType, variables);\n }\n\n if (valueNode.kind === _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_4__[\"Kind\"].NULL) {\n // This is explicitly returning the value null.\n return null;\n }\n\n if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_5__[\"isListType\"])(type)) {\n var itemType = type.ofType;\n\n if (valueNode.kind === _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_4__[\"Kind\"].LIST) {\n var coercedValues = [];\n\n for (var _i2 = 0, _valueNode$values2 = valueNode.values; _i2 < _valueNode$values2.length; _i2++) {\n var itemNode = _valueNode$values2[_i2];\n\n if (isMissingVariable(itemNode, variables)) {\n // If an array contains a missing variable, it is either coerced to\n // null or if the item type is non-null, it considered invalid.\n if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_5__[\"isNonNullType\"])(itemType)) {\n return; // Invalid: intentionally return no value.\n }\n\n coercedValues.push(null);\n } else {\n var itemValue = valueFromAST(itemNode, itemType, variables);\n\n if (itemValue === undefined) {\n return; // Invalid: intentionally return no value.\n }\n\n coercedValues.push(itemValue);\n }\n }\n\n return coercedValues;\n }\n\n var coercedValue = valueFromAST(valueNode, itemType, variables);\n\n if (coercedValue === undefined) {\n return; // Invalid: intentionally return no value.\n }\n\n return [coercedValue];\n }\n\n if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_5__[\"isInputObjectType\"])(type)) {\n if (valueNode.kind !== _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_4__[\"Kind\"].OBJECT) {\n return; // Invalid: intentionally return no value.\n }\n\n var coercedObj = Object.create(null);\n var fieldNodes = Object(_jsutils_keyMap_mjs__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(valueNode.fields, function (field) {\n return field.name.value;\n });\n\n for (var _i4 = 0, _objectValues2 = Object(_polyfills_objectValues_mjs__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(type.getFields()); _i4 < _objectValues2.length; _i4++) {\n var field = _objectValues2[_i4];\n var fieldNode = fieldNodes[field.name];\n\n if (!fieldNode || isMissingVariable(fieldNode.value, variables)) {\n if (field.defaultValue !== undefined) {\n coercedObj[field.name] = field.defaultValue;\n } else if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_5__[\"isNonNullType\"])(field.type)) {\n return; // Invalid: intentionally return no value.\n }\n\n continue;\n }\n\n var fieldValue = valueFromAST(fieldNode.value, field.type, variables);\n\n if (fieldValue === undefined) {\n return; // Invalid: intentionally return no value.\n }\n\n coercedObj[field.name] = fieldValue;\n }\n\n return coercedObj;\n } // istanbul ignore else (See: 'https://github.com/graphql/graphql-js/issues/2618')\n\n\n if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_5__[\"isLeafType\"])(type)) {\n // Scalars and Enums fulfill parsing a literal value via parseLiteral().\n // Invalid values represent a failure to parse correctly, in which case\n // no value is returned.\n var result;\n\n try {\n result = type.parseLiteral(valueNode, variables);\n } catch (_error) {\n return; // Invalid: intentionally return no value.\n }\n\n if (result === undefined) {\n return; // Invalid: intentionally return no value.\n }\n\n return result;\n } // istanbul ignore next (Not reachable. All possible input types have been considered)\n\n\n false || Object(_jsutils_invariant_mjs__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(0, 'Unexpected input type: ' + Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(type));\n} // Returns true if the provided valueNode is a variable which is not defined", "title": "" }, { "docid": "47e26ca830d0892e0878d70166d68a64", "score": "0.45746952", "text": "function valueFromAST(valueNode, type, variables) {\n if (!valueNode) {\n // When there is no node, then there is also no value.\n // Importantly, this is different from returning the value null.\n return;\n }\n\n if (valueNode.kind === _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_4__[\"Kind\"].VARIABLE) {\n var variableName = valueNode.name.value;\n\n if (variables == null || variables[variableName] === undefined) {\n // No valid return value.\n return;\n }\n\n var variableValue = variables[variableName];\n\n if (variableValue === null && Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_5__[\"isNonNullType\"])(type)) {\n return; // Invalid: intentionally return no value.\n } // Note: This does no further checking that this variable is correct.\n // This assumes that this query has been validated and the variable\n // usage here is of the correct type.\n\n\n return variableValue;\n }\n\n if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_5__[\"isNonNullType\"])(type)) {\n if (valueNode.kind === _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_4__[\"Kind\"].NULL) {\n return; // Invalid: intentionally return no value.\n }\n\n return valueFromAST(valueNode, type.ofType, variables);\n }\n\n if (valueNode.kind === _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_4__[\"Kind\"].NULL) {\n // This is explicitly returning the value null.\n return null;\n }\n\n if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_5__[\"isListType\"])(type)) {\n var itemType = type.ofType;\n\n if (valueNode.kind === _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_4__[\"Kind\"].LIST) {\n var coercedValues = [];\n\n for (var _i2 = 0, _valueNode$values2 = valueNode.values; _i2 < _valueNode$values2.length; _i2++) {\n var itemNode = _valueNode$values2[_i2];\n\n if (isMissingVariable(itemNode, variables)) {\n // If an array contains a missing variable, it is either coerced to\n // null or if the item type is non-null, it considered invalid.\n if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_5__[\"isNonNullType\"])(itemType)) {\n return; // Invalid: intentionally return no value.\n }\n\n coercedValues.push(null);\n } else {\n var itemValue = valueFromAST(itemNode, itemType, variables);\n\n if (itemValue === undefined) {\n return; // Invalid: intentionally return no value.\n }\n\n coercedValues.push(itemValue);\n }\n }\n\n return coercedValues;\n }\n\n var coercedValue = valueFromAST(valueNode, itemType, variables);\n\n if (coercedValue === undefined) {\n return; // Invalid: intentionally return no value.\n }\n\n return [coercedValue];\n }\n\n if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_5__[\"isInputObjectType\"])(type)) {\n if (valueNode.kind !== _language_kinds_mjs__WEBPACK_IMPORTED_MODULE_4__[\"Kind\"].OBJECT) {\n return; // Invalid: intentionally return no value.\n }\n\n var coercedObj = Object.create(null);\n var fieldNodes = Object(_jsutils_keyMap_mjs__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(valueNode.fields, function (field) {\n return field.name.value;\n });\n\n for (var _i4 = 0, _objectValues2 = Object(_polyfills_objectValues_mjs__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(type.getFields()); _i4 < _objectValues2.length; _i4++) {\n var field = _objectValues2[_i4];\n var fieldNode = fieldNodes[field.name];\n\n if (!fieldNode || isMissingVariable(fieldNode.value, variables)) {\n if (field.defaultValue !== undefined) {\n coercedObj[field.name] = field.defaultValue;\n } else if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_5__[\"isNonNullType\"])(field.type)) {\n return; // Invalid: intentionally return no value.\n }\n\n continue;\n }\n\n var fieldValue = valueFromAST(fieldNode.value, field.type, variables);\n\n if (fieldValue === undefined) {\n return; // Invalid: intentionally return no value.\n }\n\n coercedObj[field.name] = fieldValue;\n }\n\n return coercedObj;\n } // istanbul ignore else (See: 'https://github.com/graphql/graphql-js/issues/2618')\n\n\n if (Object(_type_definition_mjs__WEBPACK_IMPORTED_MODULE_5__[\"isLeafType\"])(type)) {\n // Scalars and Enums fulfill parsing a literal value via parseLiteral().\n // Invalid values represent a failure to parse correctly, in which case\n // no value is returned.\n var result;\n\n try {\n result = type.parseLiteral(valueNode, variables);\n } catch (_error) {\n return; // Invalid: intentionally return no value.\n }\n\n if (result === undefined) {\n return; // Invalid: intentionally return no value.\n }\n\n return result;\n } // istanbul ignore next (Not reachable. All possible input types have been considered)\n\n\n false || Object(_jsutils_invariant_mjs__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(0, 'Unexpected input type: ' + Object(_jsutils_inspect_mjs__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(type));\n} // Returns true if the provided valueNode is a variable which is not defined", "title": "" }, { "docid": "af0a385e6670ab3801aee55a053ba86f", "score": "0.45691627", "text": "function valueFromAST(valueNode, type, variables) {\n if (!valueNode) {\n // When there is no node, then there is also no value.\n // Importantly, this is different from returning the value null.\n return;\n }\n\n if (Object(_type_definition__WEBPACK_IMPORTED_MODULE_5__[\"isNonNullType\"])(type)) {\n if (valueNode.kind === _language_kinds__WEBPACK_IMPORTED_MODULE_4__[\"Kind\"].NULL) {\n return; // Invalid: intentionally return no value.\n }\n\n return valueFromAST(valueNode, type.ofType, variables);\n }\n\n if (valueNode.kind === _language_kinds__WEBPACK_IMPORTED_MODULE_4__[\"Kind\"].NULL) {\n // This is explicitly returning the value null.\n return null;\n }\n\n if (valueNode.kind === _language_kinds__WEBPACK_IMPORTED_MODULE_4__[\"Kind\"].VARIABLE) {\n var variableName = valueNode.name.value;\n\n if (!variables || Object(_jsutils_isInvalid__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(variables[variableName])) {\n // No valid return value.\n return;\n }\n\n var variableValue = variables[variableName];\n\n if (variableValue === null && Object(_type_definition__WEBPACK_IMPORTED_MODULE_5__[\"isNonNullType\"])(type)) {\n return; // Invalid: intentionally return no value.\n } // Note: This does no further checking that this variable is correct.\n // This assumes that this query has been validated and the variable\n // usage here is of the correct type.\n\n\n return variableValue;\n }\n\n if (Object(_type_definition__WEBPACK_IMPORTED_MODULE_5__[\"isListType\"])(type)) {\n var itemType = type.ofType;\n\n if (valueNode.kind === _language_kinds__WEBPACK_IMPORTED_MODULE_4__[\"Kind\"].LIST) {\n var coercedValues = [];\n var itemNodes = valueNode.values;\n\n for (var i = 0; i < itemNodes.length; i++) {\n if (isMissingVariable(itemNodes[i], variables)) {\n // If an array contains a missing variable, it is either coerced to\n // null or if the item type is non-null, it considered invalid.\n if (Object(_type_definition__WEBPACK_IMPORTED_MODULE_5__[\"isNonNullType\"])(itemType)) {\n return; // Invalid: intentionally return no value.\n }\n\n coercedValues.push(null);\n } else {\n var itemValue = valueFromAST(itemNodes[i], itemType, variables);\n\n if (Object(_jsutils_isInvalid__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(itemValue)) {\n return; // Invalid: intentionally return no value.\n }\n\n coercedValues.push(itemValue);\n }\n }\n\n return coercedValues;\n }\n\n var coercedValue = valueFromAST(valueNode, itemType, variables);\n\n if (Object(_jsutils_isInvalid__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(coercedValue)) {\n return; // Invalid: intentionally return no value.\n }\n\n return [coercedValue];\n }\n\n if (Object(_type_definition__WEBPACK_IMPORTED_MODULE_5__[\"isInputObjectType\"])(type)) {\n if (valueNode.kind !== _language_kinds__WEBPACK_IMPORTED_MODULE_4__[\"Kind\"].OBJECT) {\n return; // Invalid: intentionally return no value.\n }\n\n var coercedObj = Object.create(null);\n var fieldNodes = Object(_jsutils_keyMap__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(valueNode.fields, function (field) {\n return field.name.value;\n });\n var fields = Object(_polyfills_objectValues__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(type.getFields());\n\n for (var _i = 0; _i < fields.length; _i++) {\n var field = fields[_i];\n var fieldNode = fieldNodes[field.name];\n\n if (!fieldNode || isMissingVariable(fieldNode.value, variables)) {\n if (field.defaultValue !== undefined) {\n coercedObj[field.name] = field.defaultValue;\n } else if (Object(_type_definition__WEBPACK_IMPORTED_MODULE_5__[\"isNonNullType\"])(field.type)) {\n return; // Invalid: intentionally return no value.\n }\n\n continue;\n }\n\n var fieldValue = valueFromAST(fieldNode.value, field.type, variables);\n\n if (Object(_jsutils_isInvalid__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(fieldValue)) {\n return; // Invalid: intentionally return no value.\n }\n\n coercedObj[field.name] = fieldValue;\n }\n\n return coercedObj;\n }\n\n if (Object(_type_definition__WEBPACK_IMPORTED_MODULE_5__[\"isEnumType\"])(type)) {\n if (valueNode.kind !== _language_kinds__WEBPACK_IMPORTED_MODULE_4__[\"Kind\"].ENUM) {\n return; // Invalid: intentionally return no value.\n }\n\n var enumValue = type.getValue(valueNode.value);\n\n if (!enumValue) {\n return; // Invalid: intentionally return no value.\n }\n\n return enumValue.value;\n }\n\n if (Object(_type_definition__WEBPACK_IMPORTED_MODULE_5__[\"isScalarType\"])(type)) {\n // Scalars fulfill parsing a literal value via parseLiteral().\n // Invalid values represent a failure to parse correctly, in which case\n // no value is returned.\n var result;\n\n try {\n result = type.parseLiteral(valueNode, variables);\n } catch (_error) {\n return; // Invalid: intentionally return no value.\n }\n\n if (Object(_jsutils_isInvalid__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(result)) {\n return; // Invalid: intentionally return no value.\n }\n\n return result;\n } // Not reachable. All possible input types have been considered.\n\n /* istanbul ignore next */\n\n\n throw new Error(\"Unexpected input type: \\\"\".concat(Object(_jsutils_inspect__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(type), \"\\\".\"));\n} // Returns true if the provided valueNode is a variable which is not defined", "title": "" }, { "docid": "25e6eeefdfcf773776825ea8b37b0026", "score": "0.45549092", "text": "function constant(a) {\n return function () {\n return a;\n };\n}", "title": "" }, { "docid": "ed82bcebc62be782fc9f20cca5730e92", "score": "0.4548707", "text": "_detect_node(value, node) {\n if (node) {\n if (node.value < value) {\n return this._detect_node(value, node.right)\n } else if (node.value > value) {\n return this._detect_node(value, node.left)\n } else if (node.value == value) {\n return node;\n }\n }\n }", "title": "" }, { "docid": "4ce1f34b04a177690f1324e7e4b9ad5c", "score": "0.45405224", "text": "function getForInVariableSymbol(node) {\n var initializer = node.initializer;\n if (initializer.kind === 219 /* VariableDeclarationList */) {\n var variable = initializer.declarations[0];\n if (variable && !ts.isBindingPattern(variable.name)) {\n return getSymbolOfNode(variable);\n }\n }\n else if (initializer.kind === 69 /* Identifier */) {\n return getResolvedSymbol(initializer);\n }\n return undefined;\n }", "title": "" }, { "docid": "2b2b17c02bb486076c4fde75116b7963", "score": "0.45366716", "text": "function useConstant(init) {\n var ref = Object(external_React_[\"useRef\"])(null);\n if (ref.current === null) {\n ref.current = init();\n }\n return ref.current;\n}", "title": "" }, { "docid": "13f6ef4f8b0fd50f76d001476d239af5", "score": "0.45357296", "text": "function constant(v) {\n return function () {\n return v;\n };\n}", "title": "" }, { "docid": "dd3ce68e4912066fffaba782267c1fdc", "score": "0.45338184", "text": "function constant(v) {\n return function() {\n return v;\n };\n }", "title": "" }, { "docid": "74138629a817b27c61c6d273994590c7", "score": "0.45328015", "text": "function constant(expression, start, stop, tier, callback) {\n var value = expression.value();\n while (start < stop) {\n callback(start, value);\n start = tier.step(start);\n }\n callback(stop);\n }", "title": "" }, { "docid": "91ca3e31ae54a95eaa694c56a702238f", "score": "0.45240068", "text": "function resolveColor(value) {\n var originalValue = value;\n while (/^\\$/.test(value)) {\n value = cachedColors[value.substring(1)];\n }\n return value;\n}", "title": "" } ]
e80ef5a0a537b5690ce77b95131225c9
Don't do this JavaScript until the DOM is loaded Function for hiding the answers
[ { "docid": "b66b494d5cca3bb35582df3d196a2546", "score": "0.68977696", "text": "function hideAnswers(question, answers) {\n\tanswers.slideUp() // Hide the answers\n\tquestion.css(\"position\",\"static\") // Unfix the question (if applicable)\n\t$(\"body\").css(\"padding-top\",\"0\") // Remove the padding at the top (if applicable)\n\t$( window ).off(\"scroll\")\n}", "title": "" } ]
[ { "docid": "12cbbe7d26f1cb284313e5e0ea11f7f1", "score": "0.785485", "text": "function hideAnswers() {\n document.getElementById(\"ans\").style.display = \"none\"\n }", "title": "" }, { "docid": "fe53252e650e77b570d07762bc3fffc6", "score": "0.7736006", "text": "function hideAnswers() {\n\tArray.from(document.getElementsByClassName(\"answer-item\")).forEach(\n\t function(element) {\n\t element.style.visibility = \"hidden\";\n\t }\n\t);\n}", "title": "" }, { "docid": "9fc99716165ea452fb29d4d4b5e4c30d", "score": "0.7542451", "text": "function askQuestionsHide(){\n $(\"#quesBtn\").hide();\n $(\"#ans1\").hide();\n $(\"#ans2\").hide();\n $(\"#ans3\").hide();\n $(\"#ans4\").hide();\n }", "title": "" }, { "docid": "81d9b19fc1c1acf2e41446bb764d60f9", "score": "0.7372017", "text": "function hideTrivia () {\n $('#question').hide();\n $('#a1').hide();\n $('#a2').hide();\n $('#a3').hide();\n $('#a4').hide();\n $('#timer').hide();\n $('#scores').hide();\n }", "title": "" }, { "docid": "0f7737d60a8187d92fe85a63ae96a497", "score": "0.7309761", "text": "function hideQuestionPage() {\n questionPages.style.display = \"none\";\n}", "title": "" }, { "docid": "4af46011afa72bcb86c20dbdbae9ccc7", "score": "0.7289688", "text": "function showHiddenAnswer() {\n document.querySelector(\".ans.disable\").style.visibility = \"visible\";\n document.querySelector(\".ans.disable\").classList.remove(\"disable\");\n document.querySelector(\".ans.disable\").style.visibility = \"visible\";\n document.querySelector(\".ans.disable\").classList.remove(\"disable\");\n}", "title": "" }, { "docid": "eabf8594d250188a233e5018a309d962", "score": "0.72705424", "text": "function hideAnswer() {\n\t\t\t$answer_div.slideUp(\"fast\");\n\t\t\tif(menu_shown == false)\n\t\t\t{\n\t\t\t\tif($faq_overlay.hasClass('faq-overlay-dim')){\n\t\t\t\t\t$faq_overlay.toggleClass('faq-overlay-dim');\n\t\t\t\t}\n\t\t\t}\n\t\t\tfaq_answer_shown = false;\n\t\t}", "title": "" }, { "docid": "71b966377e39dd02ff4d22ccbe906908", "score": "0.72096205", "text": "function hideAnswersQuestionsCounters(){\r\n\tanswersClassHTML.hide();\r\n\tquestionClassHTML.hide();\r\n\tcounterClassHTML.hide();\r\n}", "title": "" }, { "docid": "b9fa07bb5ab757dd3a9c5f1f03972399", "score": "0.7116691", "text": "function hideQuiz() {\n // hide the quiz pop up\n document.getElementById('modal-wrapper').style.display='none'\n // Reset variables\n currentQuestionNumber = 0;\n numberOfRightAnswers = 0;\n\n}", "title": "" }, { "docid": "930c64b1741d1e26639ec881dede6b18", "score": "0.7093157", "text": "function hideAnswerBox(){\n\t\t$('.answer').fadeOut(500);\n\t\tclearAnswerBox();\n\t}", "title": "" }, { "docid": "3200348ab418b4ff80bca0975e135e7f", "score": "0.70894784", "text": "function initialize() {\r\n document.getElementById(\"inst\").style.display = \"none\";\r\n document.getElementById(\"lightbox\").style.display = \"none\";\r\n loadQuestion();\r\n}", "title": "" }, { "docid": "419d0c0a4d1aece25aa45397ab6cee65", "score": "0.7087385", "text": "function massHide(){\n $(\"#question, #timer, #picture, #question, #answers, #gameMessage, #tryAgain\").hide();\n}", "title": "" }, { "docid": "8d84e7c875d133528abf12be0bf43a8f", "score": "0.70454645", "text": "function showAnswer(){\n $('div.nD p').css('visibility','visible');\n}", "title": "" }, { "docid": "cd1aa2fd6d3980b143ec9c30d1e5d11d", "score": "0.7031743", "text": "function hideResults() {\n $(\"#answer-holder\").hide();\n $(\"#restart-holder\").hide();\n $('#correct-result').hide();\n $('#incorrect-result').hide();\n $('#unanswered-result').hide();\n $('#restart-result').hide();\n }", "title": "" }, { "docid": "a44a77f0de5ba860ce2dbe969887117c", "score": "0.69614", "text": "function hide() {\r\n\tluck = \"\";\r\n\t document.getElementById(\"spin\").style.visibility = \"hidden\"; \r\n\t document.getElementById(\"results\").style.visibility = \"hidden\"; \r\n\t document.getElementById(\"title\").style.visibility = \"hidden\"; \r\n\t document.getElementById(\"ui1\").style.visibility = \"hidden\"; \r\n\t document.getElementById(\"postForm\").style.visibility = \"hidden\"; \r\n\t document.getElementById(\"ui\").style.visibility = \"hidden\"; \r\n\t document.getElementById(\"bucks\").style.visibility = \"hidden\"; \r\n\t \r\n\r\n\t}", "title": "" }, { "docid": "8aa1cc9f279820a604283f168ca4701b", "score": "0.69303685", "text": "function pageLoad() {\n \n // Stop timer\n stopTimer();\n\n // Hide timer\n timer.hide();\n\n // Hide quiz section\n quiz.hide()\n\n // Hide results section\n showResults.hide();\n}", "title": "" }, { "docid": "f994fa382a2cc3db0fcadb4d1ba3a6ce", "score": "0.68909794", "text": "function showAnswer () {\n const hidden = document.querySelector(`.hidden`);\n hidden.classList.remove(`hidden`);\n const showans = document.querySelector(`.showans`);\n showans.classList.add(`hidden`);\n}", "title": "" }, { "docid": "693b5dfa988151cca307358c46a7ac21", "score": "0.6881202", "text": "function answerQuestion1() {\n $(\"#question1\").hide();\n $(\"#question2\").show();\n }", "title": "" }, { "docid": "df9b830d85ab3b000f6e3d9d2a49c974", "score": "0.68389964", "text": "function hideGame() {\r\n // get the html element corresponding to the question and score\r\n var mainGame = document.getElementById('mainGame');\r\n mainGame.style.display = \"none\"\r\n}", "title": "" }, { "docid": "41a657b5966a0f31b352edd729deca33", "score": "0.680142", "text": "function hidePageElements()\n{\n quizCaption.setAttribute(\"class\", \"hide-elements\");\n quizStartBtn.setAttribute(\"class\", \"hide-elements\");\n}", "title": "" }, { "docid": "8b1244dc7027dbd4eaca9c694f324c70", "score": "0.6794443", "text": "function hide_answers(question, hide) {\r\n\tvar indents, details, question_points, selec_ans_label, selec_ans, big_icon, labels;\r\n\tif (hide == true) {\r\n\t\t// hides question points\r\n\t\tquestion_points = question.querySelector(\".contentListRight\");\r\n\t\tif (question_points != null) {\r\n\t\t\tquestion_points.style.display = \"none\";\r\n\t\t}\r\n\t\t\r\n\t\t// saves details node\r\n\t\tdetails = question.querySelector(\".details\");\r\n\t\t\r\n\t\t// hides big correct/incorrect icon\r\n\t\tbig_icon = details.querySelector(\".reviewTestSubCellForIconBig\");\r\n\t\tif (big_icon != null) {\r\n\t\t\tbig_icon.style.display = \"none\";\r\n\t\t}\r\n\t\t\r\n\t\t// saves labels (selected answer, answers, response feedback, correct answer)\r\n\t\tlabels = details.querySelectorAll(\".label\");\r\n\t\t\r\n\t\t// checks if choices are available\r\n\t\tvar are_choices = false\r\n\t\tfor (var j = 0; j < labels.length; ++j) {\r\n\t\t\tif (labels[j].textContent == \"Answers:\") {\r\n\t\t\t\tare_choices = true;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// hides labels (selected answer, answers, response feedback, correct answer) and respective answers\r\n\t\tif (are_choices == true) {\r\n\t\t\tfor (var j = 0; j < labels.length; ++j) {\r\n\t\t\t\tif (labels[j].textContent.includes(\"Selected Answer\") || labels[j].textContent.includes(\"Response Feedback\") || labels[j].textContent.includes(\"Correct Answer\")) {\r\n\t\t\t\t\tlabels[j].parentElement.parentElement.style.display = \"none\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// hides small correct/incorrect icon and spacers\r\n\t\t\tindents = details.querySelectorAll(\".correctAnswerFlag, .incorrectAnswerFlag, .spacerImageHolder\");\r\n\t\t\tfor (var j = 0; j < indents.length; ++j) {\r\n\t\t\t\tindents[j].style.display = \"none\";\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tdetails.firstElementChild.rows[2].style.display = \"none\";\r\n\t\t}\t\t\r\n\t}\r\n\telse {\r\n\t\t// shows question points\r\n\t\tquestion_points = question.querySelector(\".contentListRight\");\r\n\t\tif (question_points != null) {\r\n\t\t\tquestion_points.style.display = \"inline\";\r\n\t\t}\r\n\t\t\r\n\t\t// saves details node\r\n\t\tdetails = question.querySelector(\".details\");\r\n\t\t\r\n\t\t// shows big correct/incorrect icon\r\n\t\tbig_icon = details.querySelector(\".reviewTestSubCellForIconBig\");\r\n\t\tif (big_icon != null) {\r\n\t\t\tbig_icon.style.display = \"table-cell\";\r\n\t\t}\r\n\t\t\r\n\t\t// saves labels (selected answer, answers, response feedback, correct answer)\r\n\t\tlabels = details.querySelectorAll(\".label\");\r\n\t\t\r\n\t\t// checks if choices are available\r\n\t\tvar are_choices = false\r\n\t\tfor (var j = 0; j < labels.length; ++j) {\r\n\t\t\tif (labels[j].textContent == \"Answers:\") {\r\n\t\t\t\tare_choices = true;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// shows labels (selected answer, answers, response feedback, correct answer) and respective answers\r\n\t\tif (are_choices == true) {\r\n\t\t\tfor (var j = 0; j < labels.length; ++j) {\r\n\t\t\t\tif (labels[j].textContent.includes(\"Selected Answer\") || labels[j].textContent.includes(\"Response Feedback\") || labels[j].textContent.includes(\"Correct Answer\")) {\r\n\t\t\t\t\tlabels[j].parentElement.parentElement.style.display = \"table-row\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// shows small correct/incorrect icon and spacers\r\n\t\t\tindents = details.querySelectorAll(\".correctAnswerFlag, .incorrectAnswerFlag, .spacerImageHolder\");\r\n\t\t\tfor (var j = 0; j < indents.length; ++j) {\r\n\t\t\t\tindents[j].style.display = \"inline\";\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tdetails.firstElementChild.rows[2].style.display = \"table-row\";\r\n\t\t}\r\n\t}\r\n}", "title": "" }, { "docid": "2797e62368aff782f821c9e4fb0aa6e6", "score": "0.67795414", "text": "function hideAnswer(element) {\n element.classList.add('hide')\n}", "title": "" }, { "docid": "2e40f88bbe5af3a0840fccc835135c63", "score": "0.677757", "text": "function hideAnswer() {\n\t$(\"#eqCard4\").flip(false); // Flip the answer card to its backside\n flip.play();\n}", "title": "" }, { "docid": "3e0ae044dfb256c5d5d5e626b8b49483", "score": "0.67708606", "text": "function hideScore() {\n $(document).find(\".result\").hide();\n}", "title": "" }, { "docid": "a56afb8ded11d5965610efc89cab0024", "score": "0.676143", "text": "function hideDetails() { \n $(\"#quiz-title\").attr('style', 'display:none;');\n $(\"#info\").attr('style', 'display:none;');\n $(\"#start\").attr('style', 'display:none;');\n}", "title": "" }, { "docid": "93b3926fb34a3269c418ebf2c3abf94d", "score": "0.67474854", "text": "function question5() {\n document.getElementById(\"question4\").style.display = \"none\";\n document.getElementById(\"question5\").style.display = \"block\";\n}", "title": "" }, { "docid": "3949c304526c62ee08f3cf1f0e126211", "score": "0.6708362", "text": "function hideAnswers() {\n if ($(window).width() <= breakWidth) {\n $('.answer').css('display','none');\n $('.question').addClass('question-hidden');\n $('.angle').css('display', 'inline-block');\n }\n else {\n $('.answer').css('display','block');\n $('.question').removeClass('question-hidden');\n $('.angle').css('display', 'none');\n $('.angle').removeClass('angle-rotated');\n }\n}", "title": "" }, { "docid": "f5ad44d76792cf22d4c3e728ec54ae5d", "score": "0.66924334", "text": "function allHide(){\n $(\"#timeRemaining\").hide();\n $(\"#timeUp\").hide();\n $(\"#answer\").hide();\n // $(\"#gameOverBoot\").addClass('d-none');\n }", "title": "" }, { "docid": "efbdeedf1bd4203a1d57fce57afa563d", "score": "0.6664887", "text": "function question3() {\n document.getElementById(\"question2\").style.display = \"none\";\n document.getElementById(\"question3\").style.display = \"block\";\n}", "title": "" }, { "docid": "f3c0b037e144ba6f7b51077f86be9713", "score": "0.66380024", "text": "function startQuiz() {\n mainContainer.setAttribute(\"style\", \"display: none;\")\n countDown()\n cycleQuestions()\n}", "title": "" }, { "docid": "ef122c6ca5b1da51b1116637daca07cd", "score": "0.66327095", "text": "function show_answers() {\n $(\".answers\").show(500);\n $(\".result-info\").show(500);\n }", "title": "" }, { "docid": "7e32af5cf61809040dd4e2ee8caf826d", "score": "0.66325593", "text": "function hideGameContainers() {\n $(\"#question\").hide();\n $(\"#choice-1\").hide();\n $(\"#choice-2\").hide();\n $(\"#choice-3\").hide();\n $(\"#choice-4\").hide();\n }", "title": "" }, { "docid": "32a76cf833d056895423182199d98745", "score": "0.6631694", "text": "function display_function() {\r\n\tif (this.hidden == true) {\r\n\t\thide_answers(this, false);\r\n\t\tthis.hidden = false;\r\n\t}\r\n\telse {\r\n\t\thide_answers(this, true);\r\n\t\tthis.hidden = true;\r\n\t}\r\n}", "title": "" }, { "docid": "029293d052361c3db19e0cf02e5d1ea8", "score": "0.66312575", "text": "function question4() {\n document.getElementById(\"question3\").style.display = \"none\";\n document.getElementById(\"question4\").style.display = \"block\";\n}", "title": "" }, { "docid": "29dc46fa453e80b2e3181fef414912b7", "score": "0.66291857", "text": "function hideQuizQuestionResults(tagName) {\n if (!tagName)\n tagName = 'testset_div';\n var ts = document.getElementById(tagName);\n if (ts) {\n var divs = ts.getElementsByTagName(\"div\");\n for ( var i = 0, t = divs.length; i < t; i++) {\n var d = divs[i];\n if (d.className == 'hm_question_def') {\n hideQuestionResult(d);\n }\n }\n processMathJax();\n }\n}", "title": "" }, { "docid": "058b36df7d3030276237a3037a200f12", "score": "0.6606576", "text": "function showAnswered() {\n $(\"#answerBtn\").hide();\n $(\"#callFeatures\").show();\n $(\"#incomingCallAlert\").hide().text(\"\");\n}", "title": "" }, { "docid": "d99433e531bec7ffcc36aa640d518ade", "score": "0.65983903", "text": "function questionOptions() {\n\tvar questionType = document.querySelector('input[name=\"question\"]:checked').value;\n\tdocument.getElementById(\"questionTypeDiv\").style.display='none';\n\tif (questionType === \"Question-Answer Pair\") {\n\t\tdocument.getElementById(\"textQuestion\").style.display='';\n\t} else if (questionType === \"Filler\") {\n\t\tdocument.getElementById(\"filler\").style.display='';\n\t} else if (questionType === \"No Answer\") {\n\t\tdocument.getElementById(\"noAnswer\").style.display='';\n\t}\n}", "title": "" }, { "docid": "84cb8e22075e708b4669034443ee5d7c", "score": "0.6596368", "text": "function showButtons(){\n\tdocument.getElementById('answerT').style.display=\"\";\n\tdocument.getElementById('answerF').style.display=\"\";\n}", "title": "" }, { "docid": "9f2f213c15eff66dcc941db8e06795e6", "score": "0.65780973", "text": "function hideBtns(){\n\t\t$( '.answer' ).hide();\n\t\t$( '#timer' ).hide();\n\t}", "title": "" }, { "docid": "cca41a3ebd2f55c8a967c2ef8470e58b", "score": "0.6576495", "text": "async function quiz_display() {\r\n var x = document.getElementById(\"quiz_outer\");\r\n if (x.style.display === \"none\") {\r\n x.style.display = \"block\";\r\n bg.style.filter = \"blur(6px)\";\r\n } else {\r\n x.style.display = \"none\";\r\n bg.style.filter = \"\";\r\n start();\r\n }\r\n}", "title": "" }, { "docid": "823317ec9acad6b9158f51153c27b434", "score": "0.6569391", "text": "function toggleYouthExplanationHide() {\n let youthDisplay = document.getElementById(\"toggle-please-explain\");\n youthDisplay.style.display = \"none\";\n}", "title": "" }, { "docid": "636f3429a860d6140ac339c4feb2bbec", "score": "0.6564998", "text": "noIntroduction(){\n document.getElementById('introduction').style.display='none';\n }", "title": "" }, { "docid": "6c87d6e82783ee866578a2ecbeec03c7", "score": "0.65616083", "text": "function hidePrompt() {\n var o = document.getElementById('oexchange-prompt');\n o.style.display = 'none';\n _addthis.cookie.sck('odbm',1);\n }", "title": "" }, { "docid": "d5ecad19ae70e6b7110e36ffc296812b", "score": "0.6559043", "text": "function prepquestions() {\n highscore.style.visibility = \"hidden\";\n landingpge.style.display = \"none\";\n testpge.style.display = \"inline\";\n timer.style.visibility = \"visible\";\n countdownTimer();\n}", "title": "" }, { "docid": "e2c11030d5c405b39cec002ff81d4a8d", "score": "0.6538301", "text": "function hideWelcome() {\n document.getElementById(\"questionChoices\").style.display = \"flex\";\n document.getElementById(\"Welcome-Page\").style.display = \"none\";\n}", "title": "" }, { "docid": "3d2764f4f10306b5d68a535e608ae947", "score": "0.653252", "text": "function clearArea() {\n var removeAnswer = document.getElementById(\"show-questions\");\n removeAnswer.style.display = \"none\";\n}", "title": "" }, { "docid": "95f95520aaab4bc37ee32afd73f8240f", "score": "0.65323204", "text": "function hideSuggestions()\n{\nvar oScroll = document.getElementById(\"scroll\");\noScroll.style.visibility = \"hidden\";\n}", "title": "" }, { "docid": "cd096b1b27800a27d9539876e0793421", "score": "0.65290153", "text": "function hideRandom(){\n\tdocument.getElementById('acceptRandoms').style.display='none';\n\tdocument.getElementById('randNumValues').style.display='none';\n\tdocument.getElementById('randTrig').style.display='none';\n\tdocument.getElementById('randRegOp').style.display='none';\n\tdocument.getElementById('finalRandField').style.display='none';\n}", "title": "" }, { "docid": "d684febcc1262fd757053cba365ed6a8", "score": "0.6523021", "text": "function getAnswers() {\n let answerArray = [0, 1, 2, 3];\n answerArray = answerArray.sort(() => Math.random() - 0.5);\n answerA.innerText = \"\";\n answerA.innerText = questionArray[indexFinder].answers[answerArray[0]];\n answerB.innerText = \"\";\n answerB.innerText = questionArray[indexFinder].answers[answerArray[1]];\n answerC.innerText = \"\";\n answerC.innerText = questionArray[indexFinder].answers[answerArray[2]];\n answerD.innerText = \"\";\n answerD.innerText = questionArray[indexFinder].answers[answerArray[3]];\n \n \n//Hide any empty answer boxes for T/F questions \n if(answerA.innerText === \"undefined\"){\n answerA.style.display = \"none\"\n }\n else{answerA.style.display = \"block\"};\n\n if(answerB.innerText === \"undefined\"){\n answerB.style.display = \"none\"\n }\n else{answerB.style.display = \"block\"};\n\n if (answerC.innerText === \"undefined\") {\n answerC.style.display = \"none\";\n } \n else {answerC.style.display = \"block\";};\n\n if (answerD.innerText === \"undefined\"){\n answerD.style.display = \"none\"\n }\n else{answerD.style.display = \"block\"};\n}", "title": "" }, { "docid": "96a5c21b99824ccbb0051c697f328675", "score": "0.6522774", "text": "function clearAnswerValidationMsg() {\n setTimeout(function () {\n document.querySelector(\".answer-wrapper\").classList.add(\"hide\");\n }, 2000);\n}", "title": "" }, { "docid": "4d01a86b1edcd2a323cad8f306c1fedd", "score": "0.6517714", "text": "function hideTrends() {\n\tdocument.getElementById('trend_block').innerHTML = \"\";\n}", "title": "" }, { "docid": "6b1a3e46a443c1c92c9f34996e024969", "score": "0.65029174", "text": "function invisible(){\n feedback.style.visibility = 'hidden';\n}", "title": "" }, { "docid": "660b07a6c24177955717f104282d980f", "score": "0.64984953", "text": "function hideQuiz () {\n quiz.setAttribute(\"class\", \"hide\")\n}", "title": "" }, { "docid": "213724092803ac50886951bc3e667472", "score": "0.6495079", "text": "function clearAnswer() {\n $(\"#result\").empty();\n $(\"#info\").empty();\n $(\"#answerImg\").empty();\n $(\"#nextQuestionTime\").hide();\n}", "title": "" }, { "docid": "476af43bb611b7ff1a51a765752687ca", "score": "0.64930123", "text": "function revealAnswer() {\n\n if (count === 0) {\n $(\".questionOne\").hide();\n $(\".answerOneTime\").show();\n array.push(\"firstQuestionAnswered\");\n nextQuestion();\n }\n}", "title": "" }, { "docid": "2805e89cdfb646fcb05bb0542ba454bb", "score": "0.64913976", "text": "function hide_educational()\n{\n change_educational('none', 'block')\n}", "title": "" }, { "docid": "7d1f2cc69e05ac37230e7be2cb62e8a8", "score": "0.64911", "text": "function hideQuestionsBox(paragraphName) {\n // trick for WAE\n $('#div_simpatico_block_description').show();\n var qBoxToRemove = document.getElementById(paragraphName + \"_questions\");\n qBoxToRemove.parentNode.removeChild(qBoxToRemove);\n }", "title": "" }, { "docid": "9703847a0dbcd4a602fb439c6bf01588", "score": "0.64888144", "text": "function closeDocAnswer() {\n document.getElementById(\"test\").style.display = \"none\";\n}", "title": "" }, { "docid": "0e2cc59f72f3610aa0dbdd01c9c4f64d", "score": "0.6484468", "text": "function hideButtons() {\n\ndocument.getElementById(\"errorDisplay\").style.visibility= \"hidden\";\ndocument.getElementById(\"scoreDisplay\").style.visibility= \"hidden\";\ndocument.getElementById(\"nextQuestion\").style.visibility= \"hidden\";\ndocument.getElementById(\"StartOver\").style.visibility= \"hidden\";\ndocument.getElementById(\"submitInitials\").style.visibility= \"hidden\";\ndocument.getElementById(\"clearHighScores\").style.visibility= \"hidden\";\n\n}", "title": "" }, { "docid": "41e0d8baf24cd2da486379efa3a6e8b0", "score": "0.64766425", "text": "function results() {\n calcResults();\n document.getElementById(\"question5\").style.display = \"none\";\n document.getElementById(\"results\").style.display = \"block\";\n}", "title": "" }, { "docid": "9b235f31da23f9d85e83f72221a5059e", "score": "0.64556926", "text": "function hideHints(){\n\t\t\t\t$(\"#posibilidadescontainer\").fadeOut('slow');\n\t\t\t}", "title": "" }, { "docid": "73c30a474d7f49de7a8d77b94e4f5c78", "score": "0.6445595", "text": "function whatHide(){\r\n\t\r\n\t\r\n\tdocument.querySelector(\".what-bookmarking-hide\").style.display=\"none\";\r\n\tdocument.querySelector(\".how-request-hide\").style.display=\"block\";\r\n\tdocument.querySelector(\".is-app-hide\").style.display=\"block\";\r\n\tdocument.querySelector(\".what-about-hide\").style.display=\"block\";\r\n\t// xs\r\n\tdocument.querySelector(\".what-bookmarking-hide-xs\").style.display=\"none\";\r\n\tdocument.querySelector(\".how-request-hide-xs\").style.display=\"block\";\r\n\tdocument.querySelector(\".is-app-hide-xs\").style.display=\"block\";\r\n\tdocument.querySelector(\".what-about-hide-xs\").style.display=\"block\";\r\n\t\r\n\tdocument.querySelector(\".what-bookmarking-show\").style.display=\"block\";\r\n\tdocument.querySelector(\".how-request-show\").style.display=\"none\";\r\n\tdocument.querySelector(\".is-app-show\").style.display=\"none\";\r\n\tdocument.querySelector(\".what-about-show\").style.display=\"none\";\r\n\t//xs\r\n\tdocument.querySelector(\".what-bookmarking-show-xs\").style.display=\"block\";\r\n\tdocument.querySelector(\".how-request-show-xs\").style.display=\"none\";\r\n\tdocument.querySelector(\".is-app-show-xs\").style.display=\"none\";\r\n\tdocument.querySelector(\".what-about-show-xs\").style.display=\"none\";\r\n\t\r\n\t}", "title": "" }, { "docid": "2ec93cf142e5ba8c5d35b82a904621ea", "score": "0.6428901", "text": "hide() {}", "title": "" }, { "docid": "14e69517812e9517aa9f2993c2e0d877", "score": "0.6425924", "text": "function question2() {\n document.getElementById(\"question1\").style.display = \"none\";\n document.getElementById(\"question2\").style.display = \"block\";\n}", "title": "" }, { "docid": "2f46be36b02f74023b5c71145ff19ad8", "score": "0.6423208", "text": "function displayQuestionOne() {\n $(\".questionOne\").show();\n\n}", "title": "" }, { "docid": "ce1fecd75e44d9eb5de8e5e90c74ebc9", "score": "0.64215755", "text": "function showQuestions(){\n $(\"#questionsList\").show(); \n $(\"#info\").hide();\n $(\"#infoBox\").hide();\n }", "title": "" }, { "docid": "79de1900429588c82fef47ac5f4b137d", "score": "0.64212215", "text": "function startQuiz() {\n homePage.style.display = \"none\";\n quizEl.style.display = \"block\";\n questionStat.style.display = \"block\";\n userStats.style.display = \"none\";\n tryAgainEl.style.display = \"none\";\n questionNum = 0;\n correctAnswer = 0;\n showQuestion();\n}", "title": "" }, { "docid": "65dca203420ca8610d9da289a5d1f9e0", "score": "0.64020526", "text": "function switch_to_q()\n{\n\tvar q = document.getElementById(\"quiz\");\n\tvar r = document.getElementById(\"reports\");\n\tvar qu = document.getElementById(\"game\");\n\tvar k = document.getElementById(\"sheets\");\n\tvar s = document.getElementById(\"settings\");\n\tvar l = document.getElementById(\"links\");\n\tvar a = document.getElementById(\"about\");\n\tvar m = document.getElementById(\"mnemonics\");\n\n\tm.style.display = \"none\";\n\ta.style.display = \"none\";\n\tl.style.display = \"none\";\n\tqu.style.display = \"none\";\n\tq.style.display = \"block\";\n\tr.style.display = \"none\";\n\tk.style.display = \"none\";\n\ts.style.display = \"none\";\n\n\tquiz_reset();\n}", "title": "" }, { "docid": "d1ed7b79bcc0bf47dd0b99a4b68cf878", "score": "0.63942134", "text": "function pageLoad() {\n //only show start page. Hide other content.\n highscoreScreen.setAttribute(\"class\", \"hide\");\n quizScreen.setAttribute(\"class\", \"hide\");\n scoreDisplay.setAttribute(\"class\", \"hide\");\n\n if (startQuiz == true){\n return;\n }\n\n}", "title": "" }, { "docid": "ab12ed708c25ce082720f16ec33fa1a4", "score": "0.63867444", "text": "function hideQuestionNextPopupLost(){\n\tif(SOUNDS_MODE){\n \t\taudioBack.play();\n \t}\n \t\n\tquestionNextPopupLostOKButton.removeEventListener('click', hideQuestionNextPopupLost);\n\t\n\tviewQuestionNext.remove(questionNextPopupLostAvatar);\n\tquestionNextPopupLostBackground.remove(questionNextPopupLostNameLabel);\n\tquestionNextPopupLostBackground.remove(questionNextPopupLostImage);\n\tquestionNextPopupLostBackground.remove(questionNextPlayerLostLabel);\n\tquestionNextPopupLostBackground.remove(questionNextPopupLostOKButton);\n\tviewQuestionNext.remove(questionNextPlayerLostScoreLabel);\n\tviewQuestionNext.remove(questionNextPlayerLostScoreValue);\n\t\n\tquestionNextPopupLostBackground.animate({transform:SCALE_ZERO, duration:300});\n\t\n\tquestionNextButtonRestart.show();\n\tquestionNextButtonReport.show();\n\tquestionNextButtonQuit.show();\n\tquestionNextWikipedia.show();\n\tviewQuestionNext.remove(questionNextPopupLostBackground);\n\t\n\tloserAudio = null;\n\tquestionNextPopupLostBackground = null;\n\tquestionNextPopupLostAvatar = null;\n\tquestionNextPopupLostNameLabel = null;\n\tquestionNextPopupLostImage = null;\n\tquestionNextPlayerLostLabel = null;\n\tquestionNextPopupLostOKButton = null;\n\tquestionNextPlayerLostScoreLabel = null;\n\tquestionNextPlayerLostScoreValue = null;\n}", "title": "" }, { "docid": "62c235ab3c047fc197c9182fe77cde1b", "score": "0.6379156", "text": "function beginQuiz() {\n startQuizEl.setAttribute(\"class\", \"hide\");\n questionsTitle.removeAttribute(\"class\", \"hide\");\n questionsAnswer.removeAttribute(\"class\", \"hide\");\n console.log(\"i did it!\");\n\n \n\n generateQuestion();\n}", "title": "" }, { "docid": "7d636215873b46f83d22439ca25674cc", "score": "0.6374135", "text": "function hideSelves() {\n els = $('div.hidden-results-self');\n els.hide();\n els.before(permanentMysteryHtml());\n}", "title": "" }, { "docid": "1c05bc24525658d7210e9ee74a64cde8", "score": "0.6368716", "text": "function hideAnswer(answerIdToHide, warningMessage) {\n const answerIdSelector = '#answer-' + answerIdToHide;\n $(answerIdSelector).wrapAll('<div class=\"vuln-codesnippet\"></div>');\n $(answerIdSelector).parent().append(\"\" +\n \"<div class='warning'>\" +\n \"<div class='header-icon'> </div>\" +\n \"<h3>This answer contains a vulnerable code snippet!</h3>\" +\n \"<p>\" +\n warningMessage +\n \"</p>\" +\n \"<button class='seecode clc-cp-sb--tall clc-cp-sb-learnmore clc-cp-sb-learnmore-button'>Okay, I just wanna see this code</button>\" +\n \" </div>\");\n\n $('.seecode').on('click', function () {\n const $vuln_cs = $(this).parent();\n $vuln_cs.addClass('animated bounceOut');\n $vuln_cs.prev().css('filter', 'blur(0px)');\n\n });\n}", "title": "" }, { "docid": "fad09aa2be73e825491acb536196c66e", "score": "0.63686645", "text": "function hideAdopt(){\n document.querySelector(\"#adopt-div\").style.display = \"none\"\n}", "title": "" }, { "docid": "38864b7a82f91bb675a83b663e9ae816", "score": "0.636199", "text": "function showLoader() {\n\tdocument.addEventListener(\"DOMContentLoaded\", () => {\n\t\tconst x = document.getElementById('x');\n\t\tconst questionStatus = document.getElementById(\"question-status\");\n\t\tx.style.display = \"none\";\n\t\tquestionStatus.style.display = \"none\";\n\t\tdocument.getElementById('share').style.display = \"none\";\n\t\tdocument.getElementById('playAgain').style.display = \"none\";\n\t\tdocument.getElementById('stats').style.display = \"none\";\n\t})\n}", "title": "" }, { "docid": "f4731a834c9336ad042c527177079060", "score": "0.63547903", "text": "function printResults() {\n $(\"#timeValue\").hide();\n $(\"#q\").hide();\n $(\"#c1\").hide();\n $(\"#c2\").hide();\n $(\"#c3\").hide();\n $(\"#c4\").hide();\n\n\n $(\"#correct\").html(\"<h1 class='mx-auto p-1'>Correct: \" + correct + \"</h1>\");\n $(\"#wrong\").html(\"<h1 class='mx-auto p-1'>Wrong: \" + wrong + \"</h1>\");\n $(\"#unanswered\").html(\"<h1 class='mx-auto p-1'>Unanswered: \" + notAnswered + \"</h1>\");\n $(\"#correct\").show();\n $(\"#wrong\").show();\n $(\"#unanswered\").show();\n $(\"#playagain\").show();\n $(\"#again\").show();\n}", "title": "" }, { "docid": "b3ac096c7316607afd62110245516f6b", "score": "0.6352759", "text": "function showAnswer() {\n document.getElementById(\"answer\").style.display = \"block\";\n}", "title": "" }, { "docid": "5d19f8c5b768f74d42076f3a318594d3", "score": "0.63487214", "text": "function hideQuestion(question_modal)\n {\n if (question_modal == null) {\n console.error(\"Could not hide the question - no modal defined!\");\n return;\n }\n\n question_modal.find('.content').first().find('.clue').first().html(\"\");\n\n if (jeopardy.admin_mode) {\n question_modal.find('.content').first().find('.answer').first().hide();\n question_modal.find('.content').first().find('.answer').first().find('.content').html(\"\");\n }\n\n question_modal.hide('fast');\n }", "title": "" }, { "docid": "bd96229843207012a17323c7e18996e2", "score": "0.63467413", "text": "function onLoad(){\n $(\".post-search\").hide();\n }", "title": "" }, { "docid": "8853e7d7c87298a0edb233ac936a8d77", "score": "0.6346417", "text": "function highScoresPage() {\n $(\"#finished\").hide();\n $(\"#scores\").show();\n $(\"#correctInput\").hide();\n $(\"#wrongInput\").hide();\n\n \n }", "title": "" }, { "docid": "607b4f14d87d59c0b427cb16dedf765d", "score": "0.6340755", "text": "function hide(){\n // document.getElementById(\"startPage\").style.display = \"none\";\n document.getElementById(\"startPage\").style.setProperty(\"visibility\", \"hidden\", null);\n // document.getElementById(\"Time\").style.display = \"inline\";\n // document.getElementById(\"Score\").style.display = \"inline\";\n // document.getElementById(\"Level\").style.display = \"inline\";\n needName();\n}", "title": "" }, { "docid": "1768d85c0365371921136e655abfa740", "score": "0.63352287", "text": "function finalQuest() {\n $(\"#question\").children().hide();\n $(\"#choices\").children().hide();\n $(\"#timer\").children().hide();\n $(\"#result\").children().hide();\n $(\"#answer\").empty()\n var answerResult = $(\"<h1>\");\n answerResult.css(\"margin-top\", \"60px\")\n answerResult.append(resultText.complete);\n $(\"#answer\").append(answerResult);\n printResult();\n\n }", "title": "" }, { "docid": "a0e3cb5175efe03e0aa1d63d4607f6b1", "score": "0.63340396", "text": "function hideTitleInfo() {\n\n // loop through each answer-style indicator div\n jQuery.each(indics, function (indic) {\n\n // hide each indicator\n indic.classList.remove('showing');\n });\n }", "title": "" }, { "docid": "14d346557c1982db250143d3fb331680", "score": "0.6324177", "text": "function hideChoise(){\n jQuery(\".input-choise, #output-choise\").css(\"display\", \"none\");\n}", "title": "" }, { "docid": "8ea20baf78f870331bd94a2ac694da2a", "score": "0.63232404", "text": "function fade_out() {\n $(\"#answer\").html(\"\");\n}", "title": "" }, { "docid": "483ea32ee96d68f2ede05300dbb358d5", "score": "0.6303096", "text": "function rightAnswer() {\n rightAnswerEl.style.display = \"block\";\n wrongAnswerEl.style.display = \"none\";\n}", "title": "" }, { "docid": "4605fa329303301f3fbcffc455c137e5", "score": "0.62952936", "text": "function clearAnswerBox(){\n\t\t$('.movie_info').find('.poster').empty();\n\t\t$('.movie_info').find(questions[questionCount].descriptionText).fadeOut(500);\n\t}", "title": "" }, { "docid": "4287a11251f52cd84588750ae16f359d", "score": "0.6283398", "text": "function final() {\n $(\"#cargando\").hide();\n }", "title": "" }, { "docid": "7e7d67d2dce788f91fd79532143459bc", "score": "0.62694633", "text": "function showQuestions () {\n\t$(\".questions\").show();\n\t$(\".start\").hide();\n\trun();\n}", "title": "" }, { "docid": "7b54c51ef203e82e8f746b736b84912f", "score": "0.6269068", "text": "function toggleAnswerBlock() {\n var da = $('.answer');\n if (answerStatus == true) {\n $(da).show();\n } else {\n $(da).hide();\n }\n}", "title": "" }, { "docid": "90a6d42c0e525585120aa5fd173a22b2", "score": "0.62679565", "text": "function _hideContent() {\n btn_intro_launchButton.style.display = \"none\";\n txt_intro_welcomeTxt1.style.display = \"none\";\n txt_intro_welcomeTxt2.style.display = \"none\";\n txt_intro_welcomeTxt3.style.display = \"none\";\n txt_intro_welcomeTxt4.style.display = \"none\";\n txt_intro_welcomeTxt5.style.display = \"none\";\n txt_intro_welcomeTxt6.style.display = \"none\";\n }", "title": "" }, { "docid": "2048c77f4fa54e1205437fba53f27fc0", "score": "0.6267382", "text": "function displayQuestions() {\n\n if (textcompletionquestions[questioncounter].correctanswer2) {\n $(\"#D\").hide();\n $(\"#E\").hide();\n $(\"#Dradio\").hide();\n $(\"#Eradio\").hide();\n }\n else{\n $(\"#D\").show();\n $(\"#E\").show();\n $(\"#Dradio\").show();\n $(\"#Eradio\").show()\n \n }\n\n $(\"#practice-question\").text(textcompletionquestions[questioncounter].question)\n $(\"#A\").text(textcompletionquestions[questioncounter].correctanswer1);\n $(\"#Aradio\").val(textcompletionquestions[questioncounter].correctanswer1);\n $(\"#B\").text(textcompletionquestions[questioncounter].wronganswerA1);\n $(\"#Bradio\").val(textcompletionquestions[questioncounter].wronganswerA1);\n $(\"#C\").text(textcompletionquestions[questioncounter].wronganswerB1);\n $(\"#Cradio\").val(textcompletionquestions[questioncounter].wronganswerB1);\n $(\"#D\").text(textcompletionquestions[questioncounter].wronganswerC1);\n $(\"#Dradio\").val(textcompletionquestions[questioncounter].wronganswerC1);\n $(\"#E\").text(textcompletionquestions[questioncounter].wronganswerD1);\n $(\"#Eradio\").val(textcompletionquestions[questioncounter].wronganswerD1);\n\n if (textcompletionquestions[questioncounter].correctanswer2) {\n $(\"#second-question-set\").show();\n $(\"#A2\").text(textcompletionquestions[questioncounter].correctanswer2);\n $(\"#A2radio\").val(textcompletionquestions[questioncounter].correctanswer2);\n $(\"#B2\").text(textcompletionquestions[questioncounter].wronganswerA2);\n $(\"#B2radio\").val(textcompletionquestions[questioncounter].wronganswerA2);\n $(\"#C2\").text(textcompletionquestions[questioncounter].wronganswerB2);\n $(\"#C2radio\").val(textcompletionquestions[questioncounter].wronganswerB2);\n }\n else{\n $(\"#second-question-set\").hide();\n }\n\n if (textcompletionquestions[questioncounter].correctanswer3) {\n $(\"#third-question-set\").show();\n $(\"#A3\").text(textcompletionquestions[questioncounter].correctanswer3);\n $(\"#A3radio\").val(textcompletionquestions[questioncounter].correctanswer3);\n $(\"#B3\").text(textcompletionquestions[questioncounter].wronganswerA3);\n $(\"#B3radio\").val(textcompletionquestions[questioncounter].wronganswerA3);\n $(\"#C3\").text(textcompletionquestions[questioncounter].wronganswerB3);\n $(\"#C3radio\").val(textcompletionquestions[questioncounter].wronganswerB3);\n }\n else{\n $(\"#third-question-set\").hide();\n }\n questioncounter=questioncounter+1;\n \n }", "title": "" }, { "docid": "905d9af3cdc4f4fd6f03d6c85cc2069a", "score": "0.62635916", "text": "function hideHighScores() {\n document.getElementById('highScores').style.display = 'none'\n}", "title": "" }, { "docid": "9a71143c15ae44d08d5be1d60963fc29", "score": "0.6262151", "text": "function results() {\n $(\"#questions\").hide();\n $(\"#options\").hide();\n $(\"#time-left\").hide();\n $(\"#results\").show();\n $(\"#correct\").html(\"Correct Answers:\" + correctAnswersCount);\n $(\"#incorrect\").html(\"Wrong Answers:\" + incorrectAnswersCount);\n\n\n}", "title": "" }, { "docid": "89a1132d229f70e8a4f21fb404828766", "score": "0.62613857", "text": "function renderQuestionPage() {\n\n question_container.style.display = \"block\";\n start_container.style.display = \"none\";\n}", "title": "" }, { "docid": "70ac8243ec77b6db09d8fb2639828df3", "score": "0.62594235", "text": "function revealAnswer() {\n clearInterval(intervalId);\n\n $(\"#correct-answser\").html(\"The Correct Answer was: \" + triviaQuestions[questionIndex].correctAnswerWord);\n $(\"#reveal-image\").html(triviaQuestions[questionIndex].image);\n\n $(\"#choice-A\").empty();\n $(\"#choice-B\").empty();\n $(\"#choice-C\").empty();\n $(\"#choice-D\").empty();\n questionIndex++;\n }", "title": "" }, { "docid": "3aacd9c8819b625876b3d7cff65193f9", "score": "0.6253659", "text": "function hideEverything() {\n hideNav();\n hideAllPosts();\n document.getElementById('tags').style.display = 'none';\n document.getElementById('all_posts_container').style.display = 'none';\n document.getElementById('close_tags').style.display = 'none';\n document.getElementById('clear_search_results').style.display = 'none';\n}", "title": "" }, { "docid": "b1768134cbaf73875b4ab53c3a68b6c5", "score": "0.62502664", "text": "function hideDialogue(){\n\tget(\"dialogue\").style.display = 'none';\n}", "title": "" }, { "docid": "60b20fe1d2143076f5af2854f4ec1192", "score": "0.6235338", "text": "function unhelp(){\n $(\"#main\").show();\n $(\"#logout\").show();\n $(\"#help\").show();\n let info= document.getElementById(\"info\");\n info.style.visibility=\"hidden\";\n \n }", "title": "" }, { "docid": "4f7fe6b2db4e5357444449e4aef39f4d", "score": "0.623284", "text": "function displayResults() {\n\n $(\"#time\").hide();\n $(\"#question1\").hide();\n $(\"#answer1\").hide();\n $(\"#question2\").hide();\n $(\"#answer2\").hide();\n $(\"#question3\").hide();\n $(\"#answer3\").hide();\n $(\"#question4\").hide();\n $(\"#answer4\").hide();\n $(\"#question5\").hide();\n $(\"#answer5\").hide();\n $(\"#question6\").hide();\n $(\"#answer6\").hide();\n $(\"#question7\").hide();\n $(\"#answer7\").hide();\n $(\"#question8\").hide();\n $(\"#answer8\").hide();\n $(\"#question9\").hide();\n $(\"#answer9\").hide();\n $(\"#question10\").hide();\n $(\"#answer10\").hide();\n $(\"#submit\").hide();\n\n $(\"#results\").html(\"<h3>All Done!</h3>\");\n $(\"#correct\").html(\"Correct!: \" + correctAnswers);\n $(\"#incorrect\").html(\"Incorrect: \" + incorrectAnswers);\n $(\"#unanswered\").html(\"Unanswered: \" + unanswered);\n}", "title": "" } ]
12079f471aa9fd44bf09a8def014482a
handle path data this is where all the geometry gets converted for the boundarys output
[ { "docid": "bfb00d1064485c378add96f8e0b1570c", "score": "0.53281844", "text": "addPath(d, node) {\n // http://www.w3.org/TR/SVG11/paths.html#PathData\n\n var tolerance2 = this.tolerance_squared;\n var totalMaxScale = this.matrixGetScale(node.xformToWorld);\n if (totalMaxScale != 0) {\n // adjust for possible transforms\n tolerance2 /= Math.pow(totalMaxScale, 2);\n // $().uxmessage('notice', \"tolerance2: \" + tolerance2.toString());\n }\n\n if (typeof d == \"string\") {\n // parse path string\n d = d.match(/([A-Za-z]|-?[0-9]+\\.?[0-9]*(?:e-?[0-9]*)?)/g);\n for (var i = 0; i < d.length; i++) {\n var num = parseFloat(d[i]);\n if (!isNaN(num)) {\n d[i] = num;\n }\n }\n }\n //$().uxmessage('notice', \"d: \" + d.toString());\n\n function nextIsNum() {\n return d.length > 0 && typeof d[0] === \"number\";\n }\n\n function getNext() {\n if (d.length > 0) {\n return d.shift(); // pop first item\n } else {\n $().uxmessage(\"error\", \"in addPath: not enough parameters\");\n return null;\n }\n }\n\n var x = 0;\n var y = 0;\n var cmdPrev = \"\";\n var xPrevCp;\n var yPrevCp;\n var subpath = [];\n\n while (d.length > 0) {\n var cmd = getNext();\n switch (cmd) {\n case \"M\": // moveto absolute\n // start new subpath\n if (subpath.length > 0) {\n node.path.push(subpath);\n subpath = [];\n }\n var implicitVerts = 0;\n while (nextIsNum()) {\n x = getNext();\n y = getNext();\n subpath.push([x, y]);\n implicitVerts += 1;\n }\n break;\n case \"m\": //moveto relative\n // start new subpath\n if (subpath.length > 0) {\n node.path.push(subpath);\n subpath = [];\n }\n if (cmdPrev == \"\") {\n // first treated absolute\n x = getNext();\n y = getNext();\n subpath.push([x, y]);\n }\n var implicitVerts = 0;\n while (nextIsNum()) {\n // subsequent treated realtive\n x += getNext();\n y += getNext();\n subpath.push([x, y]);\n implicitVerts += 1;\n }\n break;\n case \"Z\": // closepath\n case \"z\": // closepath\n // loop and finalize subpath\n if (subpath.length > 0) {\n subpath.push(subpath[0]); // close\n node.path.push(subpath);\n x = subpath[subpath.length - 1][0];\n y = subpath[subpath.length - 1][1];\n subpath = [];\n }\n break;\n case \"L\": // lineto absolute\n while (nextIsNum()) {\n x = getNext();\n y = getNext();\n subpath.push([x, y]);\n }\n break;\n case \"l\": // lineto relative\n while (nextIsNum()) {\n x += getNext();\n y += getNext();\n subpath.push([x, y]);\n }\n break;\n case \"H\": // lineto horizontal absolute\n while (nextIsNum()) {\n x = getNext();\n subpath.push([x, y]);\n }\n break;\n case \"h\": // lineto horizontal relative\n while (nextIsNum()) {\n x += getNext();\n subpath.push([x, y]);\n }\n break;\n case \"V\": // lineto vertical absolute\n while (nextIsNum()) {\n y = getNext();\n subpath.push([x, y]);\n }\n break;\n case \"v\": // lineto vertical realtive\n while (nextIsNum()) {\n y += getNext();\n subpath.push([x, y]);\n }\n break;\n case \"C\": // curveto cubic absolute\n while (nextIsNum()) {\n var x2 = getNext();\n var y2 = getNext();\n var x3 = getNext();\n var y3 = getNext();\n var x4 = getNext();\n var y4 = getNext();\n subpath.push([x, y]);\n this.addCubicBezier(\n subpath,\n x,\n y,\n x2,\n y2,\n x3,\n y3,\n x4,\n y4,\n 0,\n tolerance2\n );\n subpath.push([x4, y4]);\n x = x4;\n y = y4;\n xPrevCp = x3;\n yPrevCp = y3;\n }\n break;\n case \"c\": // curveto cubic relative\n while (nextIsNum()) {\n var x2 = x + getNext();\n var y2 = y + getNext();\n var x3 = x + getNext();\n var y3 = y + getNext();\n var x4 = x + getNext();\n var y4 = y + getNext();\n subpath.push([x, y]);\n this.addCubicBezier(\n subpath,\n x,\n y,\n x2,\n y2,\n x3,\n y3,\n x4,\n y4,\n 0,\n tolerance2\n );\n subpath.push([x4, y4]);\n x = x4;\n y = y4;\n xPrevCp = x3;\n yPrevCp = y3;\n }\n break;\n case \"S\": // curveto cubic absolute shorthand\n while (nextIsNum()) {\n var x2;\n var y2;\n if (cmdPrev.match(/[CcSs]/)) {\n x2 = x - (xPrevCp - x);\n y2 = y - (yPrevCp - y);\n } else {\n x2 = x;\n y2 = y;\n }\n var x3 = getNext();\n var y3 = getNext();\n var x4 = getNext();\n var y4 = getNext();\n subpath.push([x, y]);\n this.addCubicBezier(\n subpath,\n x,\n y,\n x2,\n y2,\n x3,\n y3,\n x4,\n y4,\n 0,\n tolerance2\n );\n subpath.push([x4, y4]);\n x = x4;\n y = y4;\n xPrevCp = x3;\n yPrevCp = y3;\n }\n break;\n case \"s\": // curveto cubic relative shorthand\n while (nextIsNum()) {\n var x2;\n var y2;\n if (cmdPrev.match(/[CcSs]/)) {\n x2 = x - (xPrevCp - x);\n y2 = y - (yPrevCp - y);\n } else {\n x2 = x;\n y2 = y;\n }\n var x3 = x + getNext();\n var y3 = y + getNext();\n var x4 = x + getNext();\n var y4 = y + getNext();\n subpath.push([x, y]);\n this.addCubicBezier(\n subpath,\n x,\n y,\n x2,\n y2,\n x3,\n y3,\n x4,\n y4,\n 0,\n tolerance2\n );\n subpath.push([x4, y4]);\n x = x4;\n y = y4;\n xPrevCp = x3;\n yPrevCp = y3;\n }\n break;\n case \"Q\": // curveto quadratic absolute\n while (nextIsNum()) {\n var x2 = getNext();\n var y2 = getNext();\n var x3 = getNext();\n var y3 = getNext();\n subpath.push([x, y]);\n this.addQuadraticBezier(\n subpath,\n x,\n y,\n x2,\n y2,\n x3,\n y3,\n 0,\n tolerance2\n );\n subpath.push([x3, y3]);\n x = x3;\n y = y3;\n }\n break;\n case \"q\": // curveto quadratic relative\n while (nextIsNum()) {\n var x2 = x + getNext();\n var y2 = y + getNext();\n var x3 = x + getNext();\n var y3 = y + getNext();\n subpath.push([x, y]);\n this.addQuadraticBezier(\n subpath,\n x,\n y,\n x2,\n y2,\n x3,\n y3,\n 0,\n tolerance2\n );\n subpath.push([x3, y3]);\n x = x3;\n y = y3;\n }\n break;\n case \"T\": // curveto quadratic absolute shorthand\n while (nextIsNum()) {\n var x2;\n var y2;\n if (cmdPrev.match(/[QqTt]/)) {\n x2 = x - (xPrevCp - x);\n y2 = y - (yPrevCp - y);\n } else {\n x2 = x;\n y2 = y;\n }\n var x3 = getNext();\n var y3 = getNext();\n subpath.push([x, y]);\n this.addQuadraticBezier(\n subpath,\n x,\n y,\n x2,\n y2,\n x3,\n y3,\n 0,\n tolerance2\n );\n subpath.push([x3, y3]);\n x = x3;\n y = y3;\n xPrevCp = x2;\n yPrevCp = y2;\n }\n break;\n case \"t\": // curveto quadratic relative shorthand\n while (nextIsNum()) {\n var x2;\n var y2;\n if (cmdPrev.match(/[QqTt]/)) {\n x2 = x - (xPrevCp - x);\n y2 = y - (yPrevCp - y);\n } else {\n x2 = x;\n y2 = y;\n }\n var x3 = x + getNext();\n var y3 = y + getNext();\n subpath.push([x, y]);\n this.addQuadraticBezier(\n subpath,\n x,\n y,\n x2,\n y2,\n x3,\n y3,\n 0,\n tolerance2\n );\n subpath.push([x3, y3]);\n x = x3;\n y = y3;\n xPrevCp = x2;\n yPrevCp = y2;\n }\n break;\n case \"A\": // eliptical arc absolute\n while (nextIsNum()) {\n var rx = getNext();\n var ry = getNext();\n var xrot = getNext();\n var large = getNext();\n var sweep = getNext();\n var x2 = getNext();\n var y2 = getNext();\n this.addArc(\n subpath,\n x,\n y,\n rx,\n ry,\n xrot,\n large,\n sweep,\n x2,\n y2,\n tolerance2\n );\n x = x2;\n y = y2;\n }\n break;\n case \"a\": // elliptical arc relative\n while (nextIsNum()) {\n var rx = getNext();\n var ry = getNext();\n var xrot = getNext();\n var large = getNext();\n var sweep = getNext();\n var x2 = x + getNext();\n var y2 = y + getNext();\n this.addArc(\n subpath,\n x,\n y,\n rx,\n ry,\n xrot,\n large,\n sweep,\n x2,\n y2,\n tolerance2\n );\n x = x2;\n y = y2;\n }\n break;\n }\n cmdPrev = cmd;\n }\n // finalize subpath\n if (subpath.length > 0) {\n node.path.push(subpath);\n subpath = [];\n }\n }", "title": "" } ]
[ { "docid": "accb99288f2f5af7e620d2152d2f4c3b", "score": "0.59014636", "text": "function processShape(m, s, c, path) {\n var k, l, g;\n switch (m.geo.type) {\n case 'Polygon':\n // TODO\n path(m.geo.coordinates[0], c, m);\n //path(m.geo.coordinates, c, m);\n break;\n case 'LineString':\n path(m.geo.coordinates, c, m);\n break;\n case 'MultiLineString':\n for (k = 0; k < m.geo.coordinates.length; ++k) {\n path(m.geo.coordinates[k], c, m);\n }\n break;\n case 'MultiPolygon':\n for (k = 0; k < m.geo.coordinates.length; ++k) {\n path(m.geo.coordinates[k][0], c, m);\n }\n break;\n case 'GeometryCollection':\n g = m.geo.geometries;\n for (l = 0; l < g.length; ++l) {\n if (s === 'Polygon') {\n switch (g[l].type) {\n case 'Polygon':\n // TODO\n path(g[l].coordinates[0], c, m);\n break;\n case 'MultiPolygon':\n for (k = 0; k < g[l].coordinates.length; ++k) {\n path(g[l].coordinates[k][0], c, m);\n }\n break;\n }\n }\n else {\n switch (g[l].type) {\n case 'LineString':\n path(g[l].coordinates, c, m);\n break;\n case 'MultiLineString':\n for (k = 0; k < g[l].coordinates.length; ++k) {\n path(g[l].coordinates[k], c, m);\n }\n break;\n }\n }\n }\n break;\n }\n }", "title": "" }, { "docid": "4f3fa50e8f1f607bd486b2ee161cb325", "score": "0.57672685", "text": "function process(areaStrings, flag) {\n\tvar i, j, thisBoundary, thisBoundaryString, theseCoords, points;\n\tthisBoundary = new Array(0);\n\tfor(i=0; i<areaStrings.length; i+= 1) {\n\t\tpoints = new Array(0);\n\t\tthisBoundaryString = areaStrings[i].split(\"\\n\");\n\t\tfor(j=1; j<thisBoundaryString.length; j+= 1) {\n\t\t\ttheseCoords = thisBoundaryString[j].split(/,\\s*|\\s+/);\n\t\t\tpoints.push([theseCoords[1], theseCoords[0]]);\n\t\t}\n\t\tthisBoundary.push(points);\n\t}\n\tpathData.push(thisBoundary);\n}", "title": "" }, { "docid": "45aecdef582845a3aecbe9e8cee34a77", "score": "0.5699637", "text": "function PathMap() {\n var PATH_USER_TYPE_1 = 'm {mx},{my} c 0.909,-0.845 1.594,-2.049 1.594,-3.385 0,-2.554 -1.805,-4.62199999 ' + '-4.357,-4.62199999 -2.55199998,0 -4.28799998,2.06799999 -4.28799998,4.62199999 0,1.348 ' + '0.974,2.562 1.89599998,3.405 -0.52899998,0.187 -5.669,2.097 -5.794,4.7560005 v 6.718 ' + 'h 17 v -6.718 c 0,-2.2980005 -5.5279996,-4.5950005 -6.0509996,-4.7760005 z' + 'm -8,6 l 0,5.5 m 11,0 l 0,-5';\n var PATH_USER_TYPE_2 = 'm {mx},{my} m 2.162,1.009 c 0,2.4470005 -2.158,4.4310005 -4.821,4.4310005 ' + '-2.66499998,0 -4.822,-1.981 -4.822,-4.4310005';\n var PATH_USER_TYPE_3 = 'm {mx},{my} m -6.9,-3.80 c 0,0 2.25099998,-2.358 4.27399998,-1.177 2.024,1.181 4.221,1.537 ' + '4.124,0.965 -0.098,-0.57 -0.117,-3.79099999 -4.191,-4.13599999 -3.57499998,0.001 ' + '-4.20799998,3.36699999 -4.20699998,4.34799999 z';\n /**\n * Contains a map of path elements\n *\n * <h1>Path definition</h1>\n * A parameterized path is defined like this:\n * <pre>\n * 'EVENT_TIMER_WH': {\n * d: 'M {mx},{my} l {e.x0},-{e.y0} m -{e.x0},{e.y0} l {e.x1},{e.y1} ',\n * height: 17.5,\n * width: 17.5,\n * heightElements: [2.5, 7.5],\n * widthElements: [2.5, 7.5]\n * }\n * </pre>\n * <p>It's important to specify a correct <b>height and width</b> for the path as the scaling\n * is based on the ratio between the specified height and width in this object and the\n * height and width that is set as scale target (Note x,y coordinates will be scaled with\n * individual ratios).</p>\n * <p>The '<b>heightElements</b>' and '<b>widthElements</b>' array must contain the values that will be scaled.\n * The scaling is based on the computed ratios.\n * Coordinates on the y axis should be in the <b>heightElement</b>'s array, they will be scaled using\n * the computed ratio coefficient.\n * In the parameterized path the scaled values can be accessed through the 'e' object in {} brackets.\n * <ul>\n * <li>The values for the y axis can be accessed in the path string using {e.y0}, {e.y1}, ....</li>\n * <li>The values for the x axis can be accessed in the path string using {e.x0}, {e.x1}, ....</li>\n * </ul>\n * The numbers x0, x1 respectively y0, y1, ... map to the corresponding array index.\n * </p>\n */\n\n this.pathMap = {\n // TASK DECORATOR\n 'TASK_TYPE_FOLDER': {\n d: 'm {mx},{my} l18,0 l0,12 l-18,0 l0,-12 m 2,0 l3,-4 l5,0 l3,4'\n },\n 'TASK_TYPE_CHEVRON': {\n d: 'm {mx},{my} l15,0 l6,6 l-6,6 l-15,0 l6,-6 l-6,-6'\n },\n 'TASK_TYPE_USER_1': {\n d: PATH_USER_TYPE_1\n },\n 'TASK_TYPE_USER_2': {\n d: PATH_USER_TYPE_2\n },\n 'TASK_TYPE_USER_3': {\n d: PATH_USER_TYPE_3\n },\n 'TASK_TYPE_MANUAL': {\n d: 'm {mx},{my} c 0.234,-0.01 5.604,0.008 8.029,0.004 0.808,0 1.271,-0.172 1.417,-0.752 0.227,-0.898 ' + '-0.334,-1.314 -1.338,-1.316 -2.467,-0.01 -7.886,-0.004 -8.108,-0.004 -0.014,-0.079 0.016,-0.533 0,-0.61 ' + '0.195,-0.042 8.507,0.006 9.616,0.002 0.877,-0.007 1.35,-0.438 1.353,-1.208 0.003,-0.768 -0.479,-1.09 ' + '-1.35,-1.091 -2.968,-0.002 -9.619,-0.013 -9.619,-0.013 v -0.591 c 0,0 5.052,-0.016 7.225,-0.016 ' + '0.888,-0.002 1.354,-0.416 1.351,-1.193 -0.006,-0.761 -0.492,-1.196 -1.361,-1.196 -3.473,-0.005 ' + '-10.86,-0.003 -11.0829995,-0.003 -0.022,-0.047 -0.045,-0.094 -0.069,-0.139 0.3939995,-0.319 ' + '2.0409995,-1.626 2.4149995,-2.017 0.469,-0.4870005 0.519,-1.1650005 0.162,-1.6040005 -0.414,-0.511 ' + '-0.973,-0.5 -1.48,-0.236 -1.4609995,0.764 -6.5999995,3.6430005 -7.7329995,4.2710005 -0.9,0.499 ' + '-1.516,1.253 -1.882,2.19 -0.37000002,0.95 -0.17,2.01 -0.166,2.979 0.004,0.718 -0.27300002,1.345 ' + '-0.055,2.063 0.629,2.087 2.425,3.312 4.859,3.318 4.6179995,0.014 9.2379995,-0.139 13.8569995,-0.158 ' + '0.755,-0.004 1.171,-0.301 1.182,-1.033 0.012,-0.754 -0.423,-0.969 -1.183,-0.973 -1.778,-0.01 ' + '-5.824,-0.004 -6.04,-0.004 10e-4,-0.084 0.003,-0.586 10e-4,-0.67 z'\n },\n 'TASK_TYPE_BUSINESS_RULE_HEADER': {\n d: 'm {mx},{my} 0,4 20,0 0,-4 z'\n },\n 'TASK_TYPE_BUSINESS_RULE_MAIN': {\n d: 'm {mx},{my} 0,12 20,0 0,-12 z' + 'm 0,8 l 20,0 ' + 'm -13,-4 l 0,8'\n },\n // EVENT LISTENER DECORATOR\n 'EVENT_TIMER_WH': {\n d: 'M {mx},{my} l {e.x0},-{e.y0} m -{e.x0},{e.y0} l {e.x1},{e.y1} ',\n height: 36,\n width: 36,\n heightElements: [10, 2],\n widthElements: [3, 7]\n },\n 'EVENT_TIMER_LINE': {\n d: 'M {mx},{my} ' + 'm {e.x0},{e.y0} l -{e.x1},{e.y1} ',\n height: 36,\n width: 36,\n heightElements: [10, 3],\n widthElements: [0, 0]\n },\n 'EVENT_USER_1': {\n d: PATH_USER_TYPE_1,\n height: 36,\n width: 36,\n heightElements: [],\n widthElements: []\n },\n 'EVENT_USER_2': {\n d: PATH_USER_TYPE_2,\n height: 36,\n width: 36,\n heightElements: [],\n widthElements: []\n },\n 'EVENT_USER_3': {\n d: PATH_USER_TYPE_3,\n height: 36,\n width: 36,\n heightElements: [],\n widthElements: []\n },\n // MARKERS\n 'MARKER_STAGE_EXPANDED': {\n d: 'm{mx},{my} m 2,7 l 10,0',\n height: 10,\n width: 10,\n heightElements: [],\n widthElements: []\n },\n 'MARKER_STAGE_COLLAPSED': {\n d: 'm{mx},{my} m 2,7 l 10,0 m -5,-5 l 0,10',\n height: 10,\n width: 10,\n heightElements: [],\n widthElements: []\n },\n 'MARKER_REQUIRED': {\n d: 'm{mx},{my} l 0,9 m 0,2 l0,3',\n height: 14,\n width: 3,\n heightElements: [],\n widthElements: []\n },\n 'MARKER_MANUAL_ACTIVATION': {\n d: 'm{mx}, {my} l 14,7 l -14,7 l 0,-14 z',\n height: 14,\n width: 14,\n heightElements: [],\n widthElements: []\n },\n 'MARKER_REPEATABLE': {\n d: 'm{mx},{my} m 3,0 l 0,14 m 6,-14 l 0,14 m -10,-10 l 14,0 m -14,6 l 14,0',\n height: 14,\n width: 14,\n heightElements: [],\n widthElements: []\n },\n 'MARKER_PLANNING_TABLE_EXPANDED': {\n d: 'm{mx},{my} m 0,12 l 30,0 m -20,-12 l 0, 24 m 10, -24 l 0, 24 m -10, -6 l 10,0',\n height: 24,\n width: 30,\n heightElements: [],\n widthElements: []\n },\n 'MARKER_PLANNING_TABLE_COLLAPSED': {\n d: 'm{mx},{my} m 0,12 l 30,0 m -20,-12 l 0, 24 m 10, -24 l 0, 24 m -10, -6 l 10,0 m -5, -6 l 0,12',\n height: 10,\n width: 10,\n heightElements: [],\n widthElements: []\n },\n 'DATA_OBJECT_PATH': {\n d: 'm 0,0 {e.x1},0 {e.x0},{e.y0} 0,{e.y1} -{e.x2},0 0,-{e.y2} {e.x1},0 0,{e.y0} {e.x0},0',\n height: 61,\n width: 51,\n heightElements: [10, 50, 60],\n widthElements: [10, 40, 50, 60]\n },\n 'TEXT_ANNOTATION': {\n d: 'm {mx}, {my} m 10,0 l -10,0 l 0,{e.y0} l 10,0',\n height: 30,\n width: 10,\n heightElements: [30],\n widthElements: [10]\n }\n };\n\n this.getRawPath = function getRawPath(pathId) {\n return this.pathMap[pathId].d;\n };\n /**\n * Scales the path to the given height and width.\n * <h1>Use case</h1>\n * <p>Use case is to scale the content of elements (event) based\n * on the element bounding box's size.\n * </p>\n * <h1>Why not transform</h1>\n * <p>Scaling a path with transform() will also scale the stroke and IE does not support\n * the option 'non-scaling-stroke' to prevent this.\n * Also there are use cases where only some parts of a path should be\n * scaled.</p>\n *\n * @param {String} pathId The ID of the path.\n * @param {Object} param <p>\n * Example param object scales the path to 60% size of the container (data.width, data.height).\n * <pre>\n * {\n * xScaleFactor: 0.6,\n * yScaleFactor:0.6,\n * containerWidth: data.width,\n * containerHeight: data.height,\n * position: {\n * mx: 0.46,\n * my: 0.2,\n * }\n * }\n * </pre>\n * <ul>\n * <li>targetpathwidth = xScaleFactor * containerWidth</li>\n * <li>targetpathheight = yScaleFactor * containerHeight</li>\n * <li>Position is used to set the starting coordinate of the path. M is computed:\n * <ul>\n * <li>position.x * containerWidth</li>\n * <li>position.y * containerHeight</li>\n * </ul>\n * Center of the container <pre> position: {\n * mx: 0.5,\n * my: 0.5,\n * }</pre>\n * Upper left corner of the container\n * <pre> position: {\n * mx: 0.0,\n * my: 0.0,\n * }</pre>\n * </li>\n * </ul>\n * </p>\n *\n */\n\n\n this.getScaledPath = function getScaledPath(pathId, param) {\n var rawPath = this.pathMap[pathId]; // positioning\n // compute the start point of the path\n\n var mx, my;\n\n if (param.abspos) {\n mx = param.abspos.x;\n my = param.abspos.y;\n } else {\n mx = param.containerWidth * param.position.mx;\n my = param.containerHeight * param.position.my;\n }\n\n var coordinates = {}; // map for the scaled coordinates\n\n if (param.position) {\n // path\n var heightRatio = param.containerHeight / rawPath.height * param.yScaleFactor;\n var widthRatio = param.containerWidth / rawPath.width * param.xScaleFactor; // Apply height ratio\n\n for (var heightIndex = 0; heightIndex < rawPath.heightElements.length; heightIndex++) {\n coordinates['y' + heightIndex] = rawPath.heightElements[heightIndex] * heightRatio;\n } // Apply width ratio\n\n\n for (var widthIndex = 0; widthIndex < rawPath.widthElements.length; widthIndex++) {\n coordinates['x' + widthIndex] = rawPath.widthElements[widthIndex] * widthRatio;\n }\n } // Apply value to raw path\n\n\n var path = format(rawPath.d, {\n mx: mx,\n my: my,\n e: coordinates\n });\n return path;\n };\n}", "title": "" }, { "docid": "48d74bd1da10db714637025b7134b9cd", "score": "0.56927425", "text": "function PathView(geometryModel) {\n var self = this;\n // events to link\n var events = [\n 'click',\n 'dblclick',\n 'mousedown',\n 'mouseover',\n 'mouseout',\n ];\n\n this._eventHandlers = {};\n this.model = geometryModel;\n this.points = [];\n\n \n\n var style = _.clone(geometryModel.get('style')) || {};\n\n this.geom = new GeoJSON (\n geometryModel.get('geojson'),\n style\n );\n\n /*_.each(this.geom._layers, function(g) {\n g.setStyle(geometryModel.get('style'));\n g.on('edit', function() {\n geometryModel.set('geojson', L.GeoJSON.toGeoJSON(self.geom));\n }, self);\n });\n */\n\n _.bindAll(this, '_updateModel');\n var self = this;\n\n function bindPath(p) {\n google.maps.event.addListener(p, 'insert_at', self._updateModel);\n /*\n google.maps.event.addListener(p, 'remove_at', this._updateModel);\n google.maps.event.addListener(p, 'set_at', this._updateModel);\n */\n }\n\n // TODO: check this conditions\n\n if(this.geom.getPaths) {\n var paths = this.geom.getPaths();\n\n if (paths && paths[0]) {\n // More than one path\n for(var i = 0; i < paths.length; ++i) {\n bindPath(paths[i]);\n }\n } else {\n // One path\n bindPath(paths);\n google.maps.event.addListener(this.geom, 'mouseup', this._updateModel);\n }\n } else {\n // More than one path\n if (this.geom.length) {\n for(var i = 0; i < this.geom.length; ++i) {\n bindPath(this.geom[i].getPath());\n google.maps.event.addListener(this.geom[i], 'mouseup', this._updateModel);\n }\n } else {\n // One path\n bindPath(this.geom.getPath());\n google.maps.event.addListener(this.geom, 'mouseup', this._updateModel);\n }\n }\n\n /*for(var i = 0; i < events.length; ++i) {\n var e = events[i];\n this.geom.on(e, self._eventHandler(e));\n }*/\n\n}", "title": "" }, { "docid": "7639d9db8763803a925e269761155f7d", "score": "0.56493247", "text": "resizeHandlePath (d) {\n d = d.type;\n const e = +(d === 'e'), x = e ? 1 : -1, y = this.effectiveHeight() / 3;\n return `M${0.5 * x},${y \n }A6,6 0 0 ${e} ${6.5 * x},${y + 6 \n }V${2 * y - 6 \n }A6,6 0 0 ${e} ${0.5 * x},${2 * y \n }Z` +\n `M${2.5 * x},${y + 8 \n }V${2 * y - 8 \n }M${4.5 * x},${y + 8 \n }V${2 * y - 8}`;\n }", "title": "" }, { "docid": "e16d00487a161555613515ee02a68177", "score": "0.56308407", "text": "function processDataFile(data, render_ms=false){\n //captura quantidade de pontos dada na primeira linha do conjunto de dados\n totalPoints = data[0]*1; \n // inicia variáveis de limites máx e min dos eixos X Y Z\n var maxX=0;\n var maxY=0;\n var maxZ=0;\n var minX=0;\n var minY=0;\n var minZ=0;\n\n // looping que percorre as linhas e monta o vetor de pontos\n for(let i=1; i<= totalPoints; i++){\n var vectorCoord = data[i].split(\" \");\n vectorCoord[2] = 0;// torna o objeto em 2D;\n var x = vectorCoord[0]*1;\n var y = vectorCoord[1]*1;\n var z = vectorCoord[2]*1;\n vectorCoord.push(\"1.0\");\n // atualiza variáveis de limites\n if(maxX<x) maxX = x;\n if(maxY<y) maxY = y;\n if(maxZ<z) maxZ = z;\n if(minX>x) minX = x;\n if(minY>y) minY = y;\n if(minZ>z) minZ = z;\n }\n console.log(\"maxX: \", maxX,\n \"minX: \", minX,\n \"maxZ: \", maxZ,\n \"minZ\", minZ);\n\n // armazena maior valor para montagem nos limites do quadrado\n if(minX<minY) {\n minY = minX;\n } else {\n minX = minY;\n }\n if(maxX>maxY) {\n maxY = maxX;\n } else {\n maxX = maxY;\n }\n // adiciona espaço ao redor do limites da figura\n let safet = .5;\n minX-= safet; maxX+= safet; minY-= safet; maxY+= safet;\n //cria as bordas do QuadTree\n let boundary = new qtree.Rectangle(minX, minY, maxX-minX, maxY-minY);\n // Inicia o QuadTree\n let qt = new qtree.QuadTree(boundary, totalPoints, 0);\n //qt.callPoints();\n // Adiciona os pontos ao qt\n for(let i = 1; i<=totalPoints; i++){\n let vectorCoord = data[i].split(\" \");\n let m = new qtree.Point(vectorCoord[0], vectorCoord[1], vectorCoord[2]);\n qt.insert(m);\n }\n // coleta os pontos do qt para processar os MPUs\n qt.collectPoints(qt);\n \n if(render_ms) qt.points = geraMarchingSquare(qt,minX,minY,maxX,maxY);\n //console.log(pts);\n // coleta pontos para que delimitam os quadrantes do QuadTree.\n //var rect = qt.arrayBoundary_fn(); // teste\n\n // imprime na tela os valores dos limites da figura\n var text = \"> <b>boundary:</b> <br/>\";\n text += \"maxX: \"+ maxX + \", \";\n text += \"minX: \"+ minX + \", \";\n text += \"maxY: \"+ maxY + \", \";\n text += \"minY: \"+ minY + \", \";\n var debug = document.getElementById(\"info\");\n debug.innerHTML = text;\n console.log(qt);\n //qt.rect = rect; // adiciona coordenadas dos retangulos como propriedades do objeto qt\n //retorna objeto qt para montagem do VBO\n return (qt);\n \n }", "title": "" }, { "docid": "41f7185f31bae303bf239ff8f4818419", "score": "0.56121266", "text": "convert(file_data) {\n let lines = file_data.split('\\n');\n\n if (lines.length > 1000000) {\n // five hundred thousand lines is a ton\n alert(\"File too big\");\n return \"\";\n }\n\n // console.log(lines);\n let objdata = new OBJData();\n let mapFloat = (e) => parseFloat(e);\n\n let index = 0;\n while (index < lines.length) {\n let line = lines[index];\n // console.log(line);\n\n if (line.startsWith(\"v \")) {\n // vertex\n let nums = line.split(/\\s+/).slice(1, 4).map(mapFloat);\n // console.log(`v: ${nums}`);\n objdata.addVertex(nums);\n } else if (line.startsWith(\"vt \")) {\n // texCoord\n let nums = line.split(/\\s+/).slice(1, 3).map(mapFloat);\n // console.log(`t: ${nums}`);\n objdata.addTexCoord(nums);\n } else if (line.startsWith(\"vn \")) {\n // normal\n let nums = line.split(/\\s+/).slice(1, 4).map(mapFloat);\n // console.log(`n: ${nums}`);\n objdata.addNormal(nums);\n } else if (line.startsWith(\"f \")) {\n // face\n let points = line.split(/\\s+/).slice(1).filter((e) => e.length > 0).map((e) => {\n return objdata.getPoint(e.split(\"/\").filter((e) => e.length > 0).map(mapFloat));\n });\n // console.log(points);\n\n\n let p_index = 1;\n while (p_index < points.length - 1) {\n objdata.addTriangle(points[0], points[p_index], points[p_index + 1]);\n p_index++;\n }\n\n }\n\n index++;\n }\n // console.log(objdata.string());\n // return objdata.string();\n\n let out_data = `solid ${this.file.slice(0, -4)}\\n`;\n\n let i = 0;\n while (i < objdata.triangles.length) {\n let tri = objdata.triangles[i];\n out_data += `facet normal ${tri.surfaceNormal.x} ${tri.surfaceNormal.y} ${tri.surfaceNormal.z}\\n`;\n // out_data += `facet normal 0 0 0\\n`;\n out_data += `outer loop\\n`;\n out_data += `vertex ${tri.p1.vertex.x} ${tri.p1.vertex.y} ${tri.p1.vertex.z}\\n`;\n out_data += `vertex ${tri.p2.vertex.x} ${tri.p2.vertex.y} ${tri.p2.vertex.z}\\n`;\n out_data += `vertex ${tri.p3.vertex.x} ${tri.p3.vertex.y} ${tri.p3.vertex.z}\\n`;\n out_data += `end loop\\n`;\n out_data += `endfacet\\n`;\n i++;\n }\n return out_data;\n }", "title": "" }, { "docid": "06f42602668a46ab57faee1d7efb59f4", "score": "0.55562973", "text": "function PathMap(){/**\n * Contains a map of path elements\n *\n * <h1>Path definition</h1>\n * A parameterized path is defined like this:\n * <pre>\n * 'GATEWAY_PARALLEL': {\n * d: 'm {mx},{my} {e.x0},0 0,{e.x1} {e.x1},0 0,{e.y0} -{e.x1},0 0,{e.y1} ' +\n '-{e.x0},0 0,-{e.y1} -{e.x1},0 0,-{e.y0} {e.x1},0 z',\n * height: 17.5,\n * width: 17.5,\n * heightElements: [2.5, 7.5],\n * widthElements: [2.5, 7.5]\n * }\n * </pre>\n * <p>It's important to specify a correct <b>height and width</b> for the path as the scaling\n * is based on the ratio between the specified height and width in this object and the\n * height and width that is set as scale target (Note x,y coordinates will be scaled with\n * individual ratios).</p>\n * <p>The '<b>heightElements</b>' and '<b>widthElements</b>' array must contain the values that will be scaled.\n * The scaling is based on the computed ratios.\n * Coordinates on the y axis should be in the <b>heightElement</b>'s array, they will be scaled using\n * the computed ratio coefficient.\n * In the parameterized path the scaled values can be accessed through the 'e' object in {} brackets.\n * <ul>\n * <li>The values for the y axis can be accessed in the path string using {e.y0}, {e.y1}, ....</li>\n * <li>The values for the x axis can be accessed in the path string using {e.x0}, {e.x1}, ....</li>\n * </ul>\n * The numbers x0, x1 respectively y0, y1, ... map to the corresponding array index.\n * </p>\n */this.pathMap={'EVENT_MESSAGE':{d:'m {mx},{my} l 0,{e.y1} l {e.x1},0 l 0,-{e.y1} z l {e.x0},{e.y0} l {e.x0},-{e.y0}',height:36,width:36,heightElements:[6,14],widthElements:[10.5,21]},'EVENT_SIGNAL':{d:'M {mx},{my} l {e.x0},{e.y0} l -{e.x1},0 Z',height:36,width:36,heightElements:[18],widthElements:[10,20]},'EVENT_ESCALATION':{d:'M {mx},{my} l {e.x0},{e.y0} l -{e.x0},-{e.y1} l -{e.x0},{e.y1} Z',height:36,width:36,heightElements:[20,7],widthElements:[8]},'EVENT_CONDITIONAL':{d:'M {e.x0},{e.y0} l {e.x1},0 l 0,{e.y2} l -{e.x1},0 Z '+'M {e.x2},{e.y3} l {e.x0},0 '+'M {e.x2},{e.y4} l {e.x0},0 '+'M {e.x2},{e.y5} l {e.x0},0 '+'M {e.x2},{e.y6} l {e.x0},0 '+'M {e.x2},{e.y7} l {e.x0},0 '+'M {e.x2},{e.y8} l {e.x0},0 ',height:36,width:36,heightElements:[8.5,14.5,18,11.5,14.5,17.5,20.5,23.5,26.5],widthElements:[10.5,14.5,12.5]},'EVENT_LINK':{d:'m {mx},{my} 0,{e.y0} -{e.x1},0 0,{e.y1} {e.x1},0 0,{e.y0} {e.x0},-{e.y2} -{e.x0},-{e.y2} z',height:36,width:36,heightElements:[4.4375,6.75,7.8125],widthElements:[9.84375,13.5]},'EVENT_ERROR':{d:'m {mx},{my} {e.x0},-{e.y0} {e.x1},-{e.y1} {e.x2},{e.y2} {e.x3},-{e.y3} -{e.x4},{e.y4} -{e.x5},-{e.y5} z',height:36,width:36,heightElements:[0.023,8.737,8.151,16.564,10.591,8.714],widthElements:[0.085,6.672,6.97,4.273,5.337,6.636]},'EVENT_CANCEL_45':{d:'m {mx},{my} -{e.x1},0 0,{e.x0} {e.x1},0 0,{e.y1} {e.x0},0 '+'0,-{e.y1} {e.x1},0 0,-{e.y0} -{e.x1},0 0,-{e.y1} -{e.x0},0 z',height:36,width:36,heightElements:[4.75,8.5],widthElements:[4.75,8.5]},'EVENT_COMPENSATION':{d:'m {mx},{my} {e.x0},-{e.y0} 0,{e.y1} z m {e.x1},-{e.y2} {e.x2},-{e.y3} 0,{e.y1} -{e.x2},-{e.y3} z',height:36,width:36,heightElements:[6.5,13,0.4,6.1],widthElements:[9,9.3,8.7]},'EVENT_TIMER_WH':{d:'M {mx},{my} l {e.x0},-{e.y0} m -{e.x0},{e.y0} l {e.x1},{e.y1} ',height:36,width:36,heightElements:[10,2],widthElements:[3,7]},'EVENT_TIMER_LINE':{d:'M {mx},{my} '+'m {e.x0},{e.y0} l -{e.x1},{e.y1} ',height:36,width:36,heightElements:[10,3],widthElements:[0,0]},'EVENT_MULTIPLE':{d:'m {mx},{my} {e.x1},-{e.y0} {e.x1},{e.y0} -{e.x0},{e.y1} -{e.x2},0 z',height:36,width:36,heightElements:[6.28099,12.56199],widthElements:[3.1405,9.42149,12.56198]},'EVENT_PARALLEL_MULTIPLE':{d:'m {mx},{my} {e.x0},0 0,{e.y1} {e.x1},0 0,{e.y0} -{e.x1},0 0,{e.y1} '+'-{e.x0},0 0,-{e.y1} -{e.x1},0 0,-{e.y0} {e.x1},0 z',height:36,width:36,heightElements:[2.56228,7.68683],widthElements:[2.56228,7.68683]},'GATEWAY_EXCLUSIVE':{d:'m {mx},{my} {e.x0},{e.y0} {e.x1},{e.y0} {e.x2},0 {e.x4},{e.y2} '+'{e.x4},{e.y1} {e.x2},0 {e.x1},{e.y3} {e.x0},{e.y3} '+'{e.x3},0 {e.x5},{e.y1} {e.x5},{e.y2} {e.x3},0 z',height:17.5,width:17.5,heightElements:[8.5,6.5312,-6.5312,-8.5],widthElements:[6.5,-6.5,3,-3,5,-5]},'GATEWAY_PARALLEL':{d:'m {mx},{my} 0,{e.y1} -{e.x1},0 0,{e.y0} {e.x1},0 0,{e.y1} {e.x0},0 '+'0,-{e.y1} {e.x1},0 0,-{e.y0} -{e.x1},0 0,-{e.y1} -{e.x0},0 z',height:30,width:30,heightElements:[5,12.5],widthElements:[5,12.5]},'GATEWAY_EVENT_BASED':{d:'m {mx},{my} {e.x0},{e.y0} {e.x0},{e.y1} {e.x1},{e.y2} {e.x2},0 z',height:11,width:11,heightElements:[-6,6,12,-12],widthElements:[9,-3,-12]},'GATEWAY_COMPLEX':{d:'m {mx},{my} 0,{e.y0} -{e.x0},-{e.y1} -{e.x1},{e.y2} {e.x0},{e.y1} -{e.x2},0 0,{e.y3} '+'{e.x2},0 -{e.x0},{e.y1} l {e.x1},{e.y2} {e.x0},-{e.y1} 0,{e.y0} {e.x3},0 0,-{e.y0} {e.x0},{e.y1} '+'{e.x1},-{e.y2} -{e.x0},-{e.y1} {e.x2},0 0,-{e.y3} -{e.x2},0 {e.x0},-{e.y1} -{e.x1},-{e.y2} '+'-{e.x0},{e.y1} 0,-{e.y0} -{e.x3},0 z',height:17.125,width:17.125,heightElements:[4.875,3.4375,2.125,3],widthElements:[3.4375,2.125,4.875,3]},'DATA_OBJECT_PATH':{d:'m 0,0 {e.x1},0 {e.x0},{e.y0} 0,{e.y1} -{e.x2},0 0,-{e.y2} {e.x1},0 0,{e.y0} {e.x0},0',height:61,width:51,heightElements:[10,50,60],widthElements:[10,40,50,60]},'DATA_OBJECT_COLLECTION_PATH':{d:'m {mx}, {my} '+'m 0 15 l 0 -15 '+'m 4 15 l 0 -15 '+'m 4 15 l 0 -15 ',height:61,width:51,heightElements:[12],widthElements:[1,6,12,15]},'DATA_ARROW':{d:'m 5,9 9,0 0,-3 5,5 -5,5 0,-3 -9,0 z',height:61,width:51,heightElements:[],widthElements:[]},'DATA_STORE':{d:'m {mx},{my} '+'l 0,{e.y2} '+'c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0 '+'l 0,-{e.y2} '+'c -{e.x0},-{e.y1} -{e.x1},-{e.y1} -{e.x2},0'+'c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0 '+'m -{e.x2},{e.y0}'+'c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0'+'m -{e.x2},{e.y0}'+'c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0',height:61,width:61,heightElements:[7,10,45],widthElements:[2,58,60]},'TEXT_ANNOTATION':{d:'m {mx}, {my} m 10,0 l -10,0 l 0,{e.y0} l 10,0',height:30,width:10,heightElements:[30],widthElements:[10]},'MARKER_SUB_PROCESS':{d:'m{mx},{my} m 7,2 l 0,10 m -5,-5 l 10,0',height:10,width:10,heightElements:[],widthElements:[]},'MARKER_PARALLEL':{d:'m{mx},{my} m 3,2 l 0,10 m 3,-10 l 0,10 m 3,-10 l 0,10',height:10,width:10,heightElements:[],widthElements:[]},'MARKER_SEQUENTIAL':{d:'m{mx},{my} m 0,3 l 10,0 m -10,3 l 10,0 m -10,3 l 10,0',height:10,width:10,heightElements:[],widthElements:[]},'MARKER_COMPENSATION':{d:'m {mx},{my} 7,-5 0,10 z m 7.1,-0.3 6.9,-4.7 0,10 -6.9,-4.7 z',height:10,width:21,heightElements:[],widthElements:[]},'MARKER_LOOP':{d:'m {mx},{my} c 3.526979,0 6.386161,-2.829858 6.386161,-6.320661 0,-3.490806 -2.859182,-6.320661 '+'-6.386161,-6.320661 -3.526978,0 -6.38616,2.829855 -6.38616,6.320661 0,1.745402 '+'0.714797,3.325567 1.870463,4.469381 0.577834,0.571908 1.265885,1.034728 2.029916,1.35457 '+'l -0.718163,-3.909793 m 0.718163,3.909793 -3.885211,0.802902',height:13.9,width:13.7,heightElements:[],widthElements:[]},'MARKER_ADHOC':{d:'m {mx},{my} m 0.84461,2.64411 c 1.05533,-1.23780996 2.64337,-2.07882 4.29653,-1.97997996 2.05163,0.0805 '+'3.85579,1.15803 5.76082,1.79107 1.06385,0.34139996 2.24454,0.1438 3.18759,-0.43767 0.61743,-0.33642 '+'1.2775,-0.64078 1.7542,-1.17511 0,0.56023 0,1.12046 0,1.6807 -0.98706,0.96237996 -2.29792,1.62393996 '+'-3.6918,1.66181996 -1.24459,0.0927 -2.46671,-0.2491 -3.59505,-0.74812 -1.35789,-0.55965 '+'-2.75133,-1.33436996 -4.27027,-1.18121996 -1.37741,0.14601 -2.41842,1.13685996 -3.44288,1.96782996 z',height:4,width:15,heightElements:[],widthElements:[]},'TASK_TYPE_SEND':{d:'m {mx},{my} l 0,{e.y1} l {e.x1},0 l 0,-{e.y1} z l {e.x0},{e.y0} l {e.x0},-{e.y0}',height:14,width:21,heightElements:[6,14],widthElements:[10.5,21]},'TASK_TYPE_SCRIPT':{d:'m {mx},{my} c 9.966553,-6.27276 -8.000926,-7.91932 2.968968,-14.938 l -8.802728,0 '+'c -10.969894,7.01868 6.997585,8.66524 -2.968967,14.938 z '+'m -7,-12 l 5,0 '+'m -4.5,3 l 4.5,0 '+'m -3,3 l 5,0'+'m -4,3 l 5,0',height:15,width:12.6,heightElements:[6,14],widthElements:[10.5,21]},'TASK_TYPE_USER_1':{d:'m {mx},{my} c 0.909,-0.845 1.594,-2.049 1.594,-3.385 0,-2.554 -1.805,-4.62199999 '+'-4.357,-4.62199999 -2.55199998,0 -4.28799998,2.06799999 -4.28799998,4.62199999 0,1.348 '+'0.974,2.562 1.89599998,3.405 -0.52899998,0.187 -5.669,2.097 -5.794,4.7560005 v 6.718 '+'h 17 v -6.718 c 0,-2.2980005 -5.5279996,-4.5950005 -6.0509996,-4.7760005 z'+'m -8,6 l 0,5.5 m 11,0 l 0,-5'},'TASK_TYPE_USER_2':{d:'m {mx},{my} m 2.162,1.009 c 0,2.4470005 -2.158,4.4310005 -4.821,4.4310005 '+'-2.66499998,0 -4.822,-1.981 -4.822,-4.4310005 '},'TASK_TYPE_USER_3':{d:'m {mx},{my} m -6.9,-3.80 c 0,0 2.25099998,-2.358 4.27399998,-1.177 2.024,1.181 4.221,1.537 '+'4.124,0.965 -0.098,-0.57 -0.117,-3.79099999 -4.191,-4.13599999 -3.57499998,0.001 '+'-4.20799998,3.36699999 -4.20699998,4.34799999 z'},'TASK_TYPE_MANUAL':{d:'m {mx},{my} c 0.234,-0.01 5.604,0.008 8.029,0.004 0.808,0 1.271,-0.172 1.417,-0.752 0.227,-0.898 '+'-0.334,-1.314 -1.338,-1.316 -2.467,-0.01 -7.886,-0.004 -8.108,-0.004 -0.014,-0.079 0.016,-0.533 0,-0.61 '+'0.195,-0.042 8.507,0.006 9.616,0.002 0.877,-0.007 1.35,-0.438 1.353,-1.208 0.003,-0.768 -0.479,-1.09 '+'-1.35,-1.091 -2.968,-0.002 -9.619,-0.013 -9.619,-0.013 v -0.591 c 0,0 5.052,-0.016 7.225,-0.016 '+'0.888,-0.002 1.354,-0.416 1.351,-1.193 -0.006,-0.761 -0.492,-1.196 -1.361,-1.196 -3.473,-0.005 '+'-10.86,-0.003 -11.0829995,-0.003 -0.022,-0.047 -0.045,-0.094 -0.069,-0.139 0.3939995,-0.319 '+'2.0409995,-1.626 2.4149995,-2.017 0.469,-0.4870005 0.519,-1.1650005 0.162,-1.6040005 -0.414,-0.511 '+'-0.973,-0.5 -1.48,-0.236 -1.4609995,0.764 -6.5999995,3.6430005 -7.7329995,4.2710005 -0.9,0.499 '+'-1.516,1.253 -1.882,2.19 -0.37000002,0.95 -0.17,2.01 -0.166,2.979 0.004,0.718 -0.27300002,1.345 '+'-0.055,2.063 0.629,2.087 2.425,3.312 4.859,3.318 4.6179995,0.014 9.2379995,-0.139 13.8569995,-0.158 '+'0.755,-0.004 1.171,-0.301 1.182,-1.033 0.012,-0.754 -0.423,-0.969 -1.183,-0.973 -1.778,-0.01 '+'-5.824,-0.004 -6.04,-0.004 10e-4,-0.084 0.003,-0.586 10e-4,-0.67 z'},'TASK_TYPE_INSTANTIATING_SEND':{d:'m {mx},{my} l 0,8.4 l 12.6,0 l 0,-8.4 z l 6.3,3.6 l 6.3,-3.6'},'TASK_TYPE_SERVICE':{d:'m {mx},{my} v -1.71335 c 0.352326,-0.0705 0.703932,-0.17838 1.047628,-0.32133 '+'0.344416,-0.14465 0.665822,-0.32133 0.966377,-0.52145 l 1.19431,1.18005 1.567487,-1.57688 '+'-1.195028,-1.18014 c 0.403376,-0.61394 0.683079,-1.29908 0.825447,-2.01824 l 1.622133,-0.01 '+'v -2.2196 l -1.636514,0.01 c -0.07333,-0.35153 -0.178319,-0.70024 -0.323564,-1.04372 '+'-0.145244,-0.34406 -0.321407,-0.6644 -0.522735,-0.96217 l 1.131035,-1.13631 -1.583305,-1.56293 '+'-1.129598,1.13589 c -0.614052,-0.40108 -1.302883,-0.68093 -2.022633,-0.82247 l 0.0093,-1.61852 '+'h -2.241173 l 0.0042,1.63124 c -0.353763,0.0736 -0.705369,0.17977 -1.049785,0.32371 -0.344415,0.14437 '+'-0.665102,0.32092 -0.9635006,0.52046 l -1.1698628,-1.15823 -1.5667691,1.5792 1.1684265,1.15669 '+'c -0.4026573,0.61283 -0.68308,1.29797 -0.8247287,2.01713 l -1.6588041,0.003 v 2.22174 '+'l 1.6724648,-0.006 c 0.073327,0.35077 0.1797598,0.70243 0.3242851,1.04472 0.1452428,0.34448 '+'0.3214064,0.6644 0.5227339,0.96066 l -1.1993431,1.19723 1.5840256,1.56011 1.1964668,-1.19348 '+'c 0.6140517,0.40346 1.3028827,0.68232 2.0233517,0.82331 l 7.19e-4,1.69892 h 2.226848 z '+'m 0.221462,-3.9957 c -1.788948,0.7502 -3.8576,-0.0928 -4.6097055,-1.87438 -0.7521065,-1.78321 '+'0.090598,-3.84627 1.8802645,-4.59604 1.78823,-0.74936 3.856881,0.0929 4.608987,1.87437 '+'0.752106,1.78165 -0.0906,3.84612 -1.879546,4.59605 z'},'TASK_TYPE_SERVICE_FILL':{d:'m {mx},{my} c -1.788948,0.7502 -3.8576,-0.0928 -4.6097055,-1.87438 -0.7521065,-1.78321 '+'0.090598,-3.84627 1.8802645,-4.59604 1.78823,-0.74936 3.856881,0.0929 4.608987,1.87437 '+'0.752106,1.78165 -0.0906,3.84612 -1.879546,4.59605 z'},'TASK_TYPE_BUSINESS_RULE_HEADER':{d:'m {mx},{my} 0,4 20,0 0,-4 z'},'TASK_TYPE_BUSINESS_RULE_MAIN':{d:'m {mx},{my} 0,12 20,0 0,-12 z'+'m 0,8 l 20,0 '+'m -13,-4 l 0,8'},'MESSAGE_FLOW_MARKER':{d:'m {mx},{my} m -10.5 ,-7 l 0,14 l 21,0 l 0,-14 z l 10.5,6 l 10.5,-6'}};this.getRawPath=function getRawPath(pathId){return this.pathMap[pathId].d;};/**\n * Scales the path to the given height and width.\n * <h1>Use case</h1>\n * <p>Use case is to scale the content of elements (event, gateways) based\n * on the element bounding box's size.\n * </p>\n * <h1>Why not transform</h1>\n * <p>Scaling a path with transform() will also scale the stroke and IE does not support\n * the option 'non-scaling-stroke' to prevent this.\n * Also there are use cases where only some parts of a path should be\n * scaled.</p>\n *\n * @param {String} pathId The ID of the path.\n * @param {Object} param <p>\n * Example param object scales the path to 60% size of the container (data.width, data.height).\n * <pre>\n * {\n * xScaleFactor: 0.6,\n * yScaleFactor:0.6,\n * containerWidth: data.width,\n * containerHeight: data.height,\n * position: {\n * mx: 0.46,\n * my: 0.2,\n * }\n * }\n * </pre>\n * <ul>\n * <li>targetpathwidth = xScaleFactor * containerWidth</li>\n * <li>targetpathheight = yScaleFactor * containerHeight</li>\n * <li>Position is used to set the starting coordinate of the path. M is computed:\n * <ul>\n * <li>position.x * containerWidth</li>\n * <li>position.y * containerHeight</li>\n * </ul>\n * Center of the container <pre> position: {\n * mx: 0.5,\n * my: 0.5,\n * }</pre>\n * Upper left corner of the container\n * <pre> position: {\n * mx: 0.0,\n * my: 0.0,\n * }</pre>\n * </li>\n * </ul>\n * </p>\n *\n */this.getScaledPath=function getScaledPath(pathId,param){var rawPath=this.pathMap[pathId];// positioning\n// compute the start point of the path\nvar mx,my;if(param.abspos){mx=param.abspos.x;my=param.abspos.y;}else{mx=param.containerWidth*param.position.mx;my=param.containerHeight*param.position.my;}var coordinates={};// map for the scaled coordinates\nif(param.position){// path\nvar heightRatio=param.containerHeight/rawPath.height*param.yScaleFactor;var widthRatio=param.containerWidth/rawPath.width*param.xScaleFactor;// Apply height ratio\nfor(var heightIndex=0;heightIndex<rawPath.heightElements.length;heightIndex++){coordinates['y'+heightIndex]=rawPath.heightElements[heightIndex]*heightRatio;}// Apply width ratio\nfor(var widthIndex=0;widthIndex<rawPath.widthElements.length;widthIndex++){coordinates['x'+widthIndex]=rawPath.widthElements[widthIndex]*widthRatio;}}// Apply value to raw path\nvar path=format(rawPath.d,{mx:mx,my:my,e:coordinates});return path;};}// helpers //////////////////////", "title": "" }, { "docid": "43550a0ad43a646ea3a6ac665745a6af", "score": "0.5542302", "text": "getPaths() {\n return this.state[POLYGON].getPaths()\n }", "title": "" }, { "docid": "36a15e5c706b90acc7e1a27bb9047ff0", "score": "0.552663", "text": "convertPolygons() {\n\n const items = this.getElements('polygon');\n\n for (let n = 0; n < (items || []).length; n++) {\n\n let node = items.item(n);\n\n console.log('Converting Polygon to Path');\n\n let points = node.getAttribute(\"points\").split(/\\s|,/),\n data = \"M\" + points[0] + \" \" + points[1];\n\n for (let i = 0, size = points.length - 2; i < size; i += 2) {\n data += \" L\" + points[i] + \" \" + points[i + 1];\n }\n\n const path = this.addPath();\n path.setAttribute(\"d\", data + \" Z\");\n path.setAttribute('class', node.getAttribute('class'));\n\n path.setAttribute(\n 'data-prevId',\n node.getAttribute('id') ||\n node.getAttribute('data-name') ||\n 'from-' + node.nodeName\n )\n\n if (node.getAttribute('transform')) {\n path.setAttribute(\n 'transform',\n node.getAttribute('transform')\n )\n }\n\n node.parentNode.insertBefore(path, node);\n }\n\n while ((items || []).length > 0) {\n items.item(0).parentNode.removeChild(items.item(0));\n }\n }", "title": "" }, { "docid": "5475770e06b8e2d9e7a3f93ce3ae5500", "score": "0.5514689", "text": "toSVG() {\n if (this.geometryObject &&\n (\n this.geometryObject.geometryIsVisible === false ||\n this.geometryObject.geometryIsHidden === true ||\n this.geometryObject.geometryIsConstaintDraw === true\n )\n ) {\n return '';\n }\n\n let shapePath = this.getSVGPath('scale', true, true);\n\n let fillAttributes = {\n d: shapePath,\n fill: this.fillColor,\n 'fill-opacity': this.fillOpacity,\n 'stroke-width': 0,\n 'stroke-opacity': 0,\n };\n\n let fillPath = '<path';\n for (let [key, value] of Object.entries(fillAttributes)) {\n fillPath += ' ' + key + '=\"' + value + '\"';\n }\n fillPath += '/>\\n';\n\n let totalStrokePath = '';\n this.segments.forEach(seg => {\n let segmentPath = seg.getSVGPath('scale', true);\n let segmentColor = seg.color ? seg.color : this.strokeColor;\n let strokeWidth = 1;\n if (seg.width != 1)\n strokeWidth = seg.width;\n else\n strokeWidth = this.strokeWidth\n\n let strokeAttributes = {\n d: segmentPath,\n stroke: segmentColor,\n 'fill-opacity': 0,\n 'stroke-width': this.strokeWidth,\n 'stroke-opacity': 1, // toujours à 1 ?\n };\n\n let strokePath = '<path';\n for (let [key, value] of Object.entries(strokeAttributes)) {\n strokePath += ' ' + key + '=\"' + value + '\"';\n }\n strokePath += '/>\\n';\n totalStrokePath += strokePath;\n });\n\n let pointToDraw = [];\n if (app.settings.areShapesPointed && this.name != 'silhouette') {\n if (this.isSegment())\n pointToDraw.push(this.segments[0].vertexes[0]);\n if (!this.isCircle())\n this.segments.forEach(\n (seg) => (pointToDraw.push(seg.vertexes[1])),\n );\n }\n\n this.segments.forEach((seg) => {\n //Points sur les segments\n seg.divisionPoints.forEach((pt) => {\n pointToDraw.push(pt);\n });\n });\n if (this.isCenterShown) pointToDraw.push(this.center);\n\n let point_tags = pointToDraw.filter(pt => {\n pt.visible &&\n pt.geometryIsVisible &&\n !pt.geometryIsHidden\n }).map(pt => pt.svg).join('\\n');\n\n let comment =\n '<!-- ' + this.name.replace('é', 'e').replace('è', 'e') + ' -->\\n';\n\n return comment + fillPath + totalStrokePath + point_tags + '\\n';\n }", "title": "" }, { "docid": "b8290c8e2c2ee1db85c23bcdccad42f4", "score": "0.5475382", "text": "processLine(data) {\n buildLine(data, this);\n for (let i2 = 0; i2 < data.holes.length; i2++)\n buildLine(data.holes[i2], this);\n }", "title": "" }, { "docid": "23a500609cf848cde24e067a1b161871", "score": "0.54699945", "text": "_drawPath(item, evt)\n {\n // item.value is the name of the path to visualize\n // item.config.mode or item.config.modekey selects draw mode from:\n // \"robot\": robot along path (animated)\n // \"robot (paused)\": robot along path (paused)\n // \"waypoints\": waypoints only (x,y,theta)\n // \"optspline\": after curvature optimization\n // \"spline\": prior to curvature optimization (samples)\n // \"splineCtls\": control points\n // \"optsplineCtls\": control points\n // time-constrained spline:\n // color-coding velocity\n // color-coding curvature\n let coords = null, fcoords = null;\n if(evt != undefined)\n {\n // has the side-effect of printing canvas coords, so do this before\n // return so we can see coordinates even with no path requested.\n coords = this.lastCanvasCoords;\n fcoords = this.lastFieldCoords;\n }\n if(!item.value) return; // this must follow _canvasToFieldCoords\n\n let path = app.getPathsRepo().getPath(item.value);\n if(path != null)\n {\n if(item.config.modekey)\n item.config.mode = app.getValue(item.config.modekey);\n if(!item.config.mode)\n item.config.mode = \"waypoints\";\n\n if(evt != undefined) // mouse moved\n {\n let p = path.intersect(item.config, fcoords[0], fcoords[1]);\n if(p)\n {\n item._intersect = {\n txt: p.asDetails(),\n coords: coords\n };\n }\n else\n item._intersect = undefined;\n }\n else\n {\n let ctx = this._drawFieldBegin();\n path.draw(ctx, item.config); // <------------------\n this._drawFieldEnd();\n if(item.config.label && item._intersect)\n {\n ctx.save();\n ctx.fillStyle = item.config.label.fillStyle;\n ctx.font = item.config.label.font;\n ctx.shadowColor = \"black\";\n ctx.shadowBlur = 0;\n ctx.shadowOffsetX = 2;\n ctx.shadowOffsetY = 2;\n let mtxt = ctx.measureText(item._intersect.txt);\n let x = item._intersect.coords[0]+10; \n let y;\n let height = parseInt(item.config.label.font, 10);\n if(item.config.mode == \"waypoints\")\n y = item._intersect.coords[1];\n else\n y = item._intersect.coords[1]+height+5;\n let rectY = Math.floor(y - .9*height);\n ctx.fillStyle = \"rgb(10,10,10)\";\n ctx.fillRect(x, rectY, mtxt.width, height);\n ctx.fillStyle = item.config.label.fillStyle;\n ctx.fillText(item._intersect.txt, x, y);\n ctx.restore();\n }\n }\n }\n else\n app.warning(\"missing path \" + item.value);\n }", "title": "" }, { "docid": "5902e3a97ac5d6df458128eab39e3a16", "score": "0.54668987", "text": "route_geometry(data) {\n var temp_geom = new THREE.BufferGeometry()\n var pos = []\n for (var i = 0; i < data.length; i++) {\n pos.push(Simulation.rn_nodes[data[i]][0])\n pos.push(Simulation.rn_nodes[data[i]][1])\n pos.push(0)\n }\n temp_geom.addAttribute('position', new THREE.Float32BufferAttribute(pos, 3))\n return temp_geom\n }", "title": "" }, { "docid": "201171fc26d2241b8a0f4ee31e13bee0", "score": "0.5456881", "text": "function handlePath(path) {\n var newPoints = [];\n var prev = path.pts[path.pts.length-1];\n var pts = [prev];\n for(var i = 0; i < path.pts.length; i++) {\n var p = path.pts[i];\n var line = new UTIL.Line(prev, p);\n\n // Get all points s in S intersecting the line in sorted order:\n var intersectionPoints = S\n .map(function(s) {return {p:s, intersection:line.lineSegmentPointIntersection(s)}})\n .filter(x => 0 < x.intersection && 1 > x.intersection)\n .sort((a, b) => a.intersection - b.intersection)\n .map(x => x.p)\n .filter((p, idx, a) => idx === 0 || !a[idx-1].equals(p));\n /*if(intersectionPoints.length) {\n console.log('Adding ' + intersectionPoints.length + ' points between ' + prev.x + ',' + prev.y + ' and ' + p.x + ',' + p.y + ':');\n intersectionPoints.forEach(p => console.log(' ' + p.x + ', ' + p.y));\n }//*/\n newPoints.push(...intersectionPoints);\n\n prev = p;\n newPoints.push(p);\n }\n ret.push(new UTIL.Path(newPoints, path.color));\n }", "title": "" }, { "docid": "fa2f8cb98b28500190c5470d050d57e3", "score": "0.54361075", "text": "function processGeometry( g ) {\n\n\t\t\tvar info = geometryInfo.get( g );\n\n\t\t\tif ( ! info ) {\n\n\t\t\t\t// convert the geometry to bufferGeometry if it isn't already\n\t\t\t\tvar bufferGeometry = g;\n\t\t\t\tif ( bufferGeometry instanceof Geometry ) {\n\n\t\t\t\t\tbufferGeometry = ( new BufferGeometry() ).fromGeometry( bufferGeometry );\n\n\t\t\t\t}\n\n\t\t\t\tvar meshid = `Mesh${ libraryGeometries.length + 1 }`;\n\n\t\t\t\tvar indexCount =\n\t\t\t\t\tbufferGeometry.index ?\n\t\t\t\t\t\tbufferGeometry.index.count * bufferGeometry.index.itemSize :\n\t\t\t\t\t\tbufferGeometry.attributes.position.count;\n\n\t\t\t\tvar groups =\n\t\t\t\t\tbufferGeometry.groups != null && bufferGeometry.groups.length !== 0 ?\n\t\t\t\t\t\tbufferGeometry.groups :\n\t\t\t\t\t\t[ { start: 0, count: indexCount, materialIndex: 0 } ];\n\n\t\t\t\tvar gnode = `<geometry id=\"${ meshid }\" name=\"${ g.name }\"><mesh>`;\n\n\t\t\t\t// define the geometry node and the vertices for the geometry\n\t\t\t\tvar posName = `${ meshid }-position`;\n\t\t\t\tvar vertName = `${ meshid }-vertices`;\n\t\t\t\tgnode += getAttribute( bufferGeometry.attributes.position, posName, [ 'X', 'Y', 'Z' ], 'float' );\n\t\t\t\tgnode += `<vertices id=\"${ vertName }\"><input semantic=\"POSITION\" source=\"#${ posName }\" /></vertices>`;\n\n\t\t\t\t// NOTE: We're not optimizing the attribute arrays here, so they're all the same length and\n\t\t\t\t// can therefore share the same triangle indices. However, MeshLab seems to have trouble opening\n\t\t\t\t// models with attributes that share an offset.\n\t\t\t\t// MeshLab Bug#424: https://sourceforge.net/p/meshlab/bugs/424/\n\n\t\t\t\t// serialize normals\n\t\t\t\tvar triangleInputs = `<input semantic=\"VERTEX\" source=\"#${ vertName }\" offset=\"0\" />`;\n\t\t\t\tif ( 'normal' in bufferGeometry.attributes ) {\n\n\t\t\t\t\tvar normName = `${ meshid }-normal`;\n\t\t\t\t\tgnode += getAttribute( bufferGeometry.attributes.normal, normName, [ 'X', 'Y', 'Z' ], 'float' );\n\t\t\t\t\ttriangleInputs += `<input semantic=\"NORMAL\" source=\"#${ normName }\" offset=\"0\" />`;\n\n\t\t\t\t}\n\n\t\t\t\t// serialize uvs\n\t\t\t\tif ( 'uv' in bufferGeometry.attributes ) {\n\n\t\t\t\t\tvar uvName = `${ meshid }-texcoord`;\n\t\t\t\t\tgnode += getAttribute( bufferGeometry.attributes.uv, uvName, [ 'S', 'T' ], 'float' );\n\t\t\t\t\ttriangleInputs += `<input semantic=\"TEXCOORD\" source=\"#${ uvName }\" offset=\"0\" set=\"0\" />`;\n\n\t\t\t\t}\n\n\t\t\t\t// serialize uvs\n\t\t\t\tif ( 'uv2' in bufferGeometry.attributes ) {\n\n\t\t\t\t\tvar uvName = `${ meshid }-texcoord1`;\n\t\t\t\t\tgnode += getAttribute( bufferGeometry.attributes.uv2, uvName, [ 'S', 'T' ], 'float' );\n\t\t\t\t\ttriangleInputs += `<input semantic=\"TEXCOORD\" source=\"#${ uvName }\" offset=\"1\" set=\"1\" />`;\n\n\t\t\t\t}\n\t\t\t\t// serialize uvs\n\t\t\t\tif ( 'uv3' in bufferGeometry.attributes ) {\n\n\t\t\t\t\tvar uvName = `${ meshid }-texcoord2`;\n\t\t\t\t\tgnode += getAttribute( bufferGeometry.attributes.uv3, uvName, [ 'S', 'T' ], 'float' );\n\t\t\t\t\ttriangleInputs += `<input semantic=\"TEXCOORD\" source=\"#${ uvName }\" offset=\"2\" set=\"2\" />`;\n\n\t\t\t\t}\n\n\t\t\t\t// // serialize uvs\n\t\t\t\t// if ( 'tangent' in bufferGeometry.attributes ) {\n\t\t\t\t//\n\t\t\t\t// \tvar uvName = `${ meshid }-tangent`;\n\t\t\t\t// \tgnode += getAttribute( bufferGeometry.attributes.tangent, uvName, [ 'S', 'T' ], 'float' );\n\t\t\t\t// \ttriangleInputs += `<input semantic=\"TANGENT\" source=\"#${ uvName }\" offset=\"0\" set=\"0\" />`;\n\t\t\t\t//\n\t\t\t\t// }\n\n\t\t\t\t// serialize colors\n\t\t\t\tif ( 'color' in bufferGeometry.attributes ) {\n\n\t\t\t\t\tvar colName = `${ meshid }-color`;\n\t\t\t\t\tgnode += getAttribute( bufferGeometry.attributes.color, colName, [ 'X', 'Y', 'Z' ], 'uint8' );\n\t\t\t\t\ttriangleInputs += `<input semantic=\"COLOR\" source=\"#${ colName }\" offset=\"0\" />`;\n\n\t\t\t\t}\n\n\t\t\t\tvar indexArray = null;\n\t\t\t\tif ( bufferGeometry.index ) {\n\n\t\t\t\t\tindexArray = attrBufferToArray( bufferGeometry.index );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tindexArray = new Array( indexCount );\n\t\t\t\t\tfor ( var i = 0, l = indexArray.length; i < l; i ++ ) indexArray[ i ] = i;\n\n\t\t\t\t}\n\n\t\t\t\tfor ( var i = 0, l = groups.length; i < l; i ++ ) {\n\n\t\t\t\t\tvar group = groups[ i ];\n\t\t\t\t\tvar subarr = subArray( indexArray, group.start, group.count );\n\t\t\t\t\tvar polycount = subarr.length / 3;\n\t\t\t\t\tgnode += `<triangles material=\"MESH_MATERIAL_${ group.materialIndex }\" count=\"${ polycount }\">`;\n\t\t\t\t\tgnode += triangleInputs;\n\n\t\t\t\t\tgnode += `<p>${ subarr.join( ' ' ) }</p>`;\n\t\t\t\t\tgnode += '</triangles>';\n\n\t\t\t\t}\n\n\t\t\t\tgnode += `</mesh></geometry>`;\n\n\t\t\t\tlibraryGeometries.push( gnode );\n\n\t\t\t\tinfo = { meshid: meshid, bufferGeometry: bufferGeometry };\n\t\t\t\tgeometryInfo.set( g, info );\n\n\t\t\t}\n\n\t\t\treturn info;\n\n\t\t}", "title": "" }, { "docid": "a499fb1559db73bae384c27c4a1af5a8", "score": "0.54352564", "text": "function getData(value_) {\n\tvar allCoordStrings = new Array(0);\n\tvar thisCoordString, theseCoordStrings, lle, newCoordString;\n\tpathData = new Array(0);\n\tvar rawPathData, rawPolygonData, thisPolygonData, point, points;\n\tvar placeData;\n\tvar h, i, j, k;\n\tvar inputText2, inputTextArray, lineStrings, theseCoords, areaStrings, descriptor;\n\tvar found = false, xmldoc;\n\tinputText = value_;\n\tif(inputText != \"\") {\n\t\tfound = true;\n\t}\n\tinputText2 = inputText.replace(/\\s*\\n\\s*/g,\"\\n\").replace(/^\\s*/,\"\").replace(/\\s*$/,\"\");\n\tprocess([\"L 1\\n\" + inputText2], \"path\");\n\treturn found;\n}", "title": "" }, { "docid": "ec417c814dc28d9b2b154d166a467958", "score": "0.5421027", "text": "function processGeometry( g ) {\n\n \t\t\tvar info = geometryInfo.get( g );\n\n \t\t\tif ( ! info ) {\n\n \t\t\t\t// convert the geometry to bufferGeometry if it isn't already\n \t\t\t\tvar bufferGeometry = g;\n \t\t\t\tif ( bufferGeometry instanceof Geometry ) {\n\n \t\t\t\t\tbufferGeometry = ( new BufferGeometry() ).fromGeometry( bufferGeometry );\n\n \t\t\t\t}\n\n \t\t\t\tvar meshid = \"Mesh\" + (libraryGeometries.length + 1);\n\n \t\t\t\tvar indexCount =\n \t\t\t\t\tbufferGeometry.index ?\n \t\t\t\t\t\tbufferGeometry.index.count * bufferGeometry.index.itemSize :\n \t\t\t\t\t\tbufferGeometry.attributes.position.count;\n\n \t\t\t\tvar groups =\n \t\t\t\t\tbufferGeometry.groups != null && bufferGeometry.groups.length !== 0 ?\n \t\t\t\t\t\tbufferGeometry.groups :\n \t\t\t\t\t\t[ { start: 0, count: indexCount, materialIndex: 0 } ];\n \t\t\t\tvar gname = g.name ? (\" name=\\\"\" + (g.name) + \"\\\"\") : '';\n \t\t\t\tvar gnode = \"<geometry id=\\\"\" + meshid + \"\\\"\" + gname + \"><mesh>\";\n\n \t\t\t\t// define the geometry node and the vertices for the geometry\n \t\t\t\tvar posName = meshid + \"-position\";\n \t\t\t\tvar vertName = meshid + \"-vertices\";\n \t\t\t\tgnode += getAttribute( bufferGeometry.attributes.position, posName, [ 'X', 'Y', 'Z' ], 'float' );\n \t\t\t\tgnode += \"<vertices id=\\\"\" + vertName + \"\\\"><input semantic=\\\"POSITION\\\" source=\\\"#\" + posName + \"\\\" /></vertices>\";\n\n \t\t\t\t// NOTE: We're not optimizing the attribute arrays here, so they're all the same length and\n \t\t\t\t// can therefore share the same triangle indices. However, MeshLab seems to have trouble opening\n \t\t\t\t// models with attributes that share an offset.\n \t\t\t\t// MeshLab Bug#424: https://sourceforge.net/p/meshlab/bugs/424/\n\n \t\t\t\t// serialize normals\n \t\t\t\tvar triangleInputs = \"<input semantic=\\\"VERTEX\\\" source=\\\"#\" + vertName + \"\\\" offset=\\\"0\\\" />\";\n \t\t\t\tif ( 'normal' in bufferGeometry.attributes ) {\n\n \t\t\t\t\tvar normName = meshid + \"-normal\";\n \t\t\t\t\tgnode += getAttribute( bufferGeometry.attributes.normal, normName, [ 'X', 'Y', 'Z' ], 'float' );\n \t\t\t\t\ttriangleInputs += \"<input semantic=\\\"NORMAL\\\" source=\\\"#\" + normName + \"\\\" offset=\\\"0\\\" />\";\n\n \t\t\t\t}\n\n \t\t\t\t// serialize uvs\n \t\t\t\tif ( 'uv' in bufferGeometry.attributes ) {\n\n \t\t\t\t\tvar uvName = meshid + \"-texcoord\";\n \t\t\t\t\tgnode += getAttribute( bufferGeometry.attributes.uv, uvName, [ 'S', 'T' ], 'float' );\n \t\t\t\t\ttriangleInputs += \"<input semantic=\\\"TEXCOORD\\\" source=\\\"#\" + uvName + \"\\\" offset=\\\"0\\\" set=\\\"0\\\" />\";\n\n \t\t\t\t}\n\n \t\t\t\t// serialize colors\n \t\t\t\tif ( 'color' in bufferGeometry.attributes ) {\n\n \t\t\t\t\tvar colName = meshid + \"-color\";\n \t\t\t\t\tgnode += getAttribute( bufferGeometry.attributes.color, colName, [ 'X', 'Y', 'Z' ], 'uint8' );\n \t\t\t\t\ttriangleInputs += \"<input semantic=\\\"COLOR\\\" source=\\\"#\" + colName + \"\\\" offset=\\\"0\\\" />\";\n\n \t\t\t\t}\n\n \t\t\t\tvar indexArray = null;\n \t\t\t\tif ( bufferGeometry.index ) {\n\n \t\t\t\t\tindexArray = attrBufferToArray( bufferGeometry.index );\n\n \t\t\t\t} else {\n\n \t\t\t\t\tindexArray = new Array( indexCount );\n \t\t\t\t\tfor ( var i = 0, l = indexArray.length; i < l; i ++ ) { indexArray[ i ] = i; }\n\n \t\t\t\t}\n\n \t\t\t\tfor ( var i = 0, l = groups.length; i < l; i ++ ) {\n\n \t\t\t\t\tvar group = groups[ i ];\n \t\t\t\t\tvar subarr = subArray( indexArray, group.start, group.count );\n \t\t\t\t\tvar polycount = subarr.length / 3;\n \t\t\t\t\tgnode += \"<triangles material=\\\"MESH_MATERIAL_\" + (group.materialIndex) + \"\\\" count=\\\"\" + polycount + \"\\\">\";\n \t\t\t\t\tgnode += triangleInputs;\n\n \t\t\t\t\tgnode += \"<p>\" + (subarr.join( ' ' )) + \"</p>\";\n \t\t\t\t\tgnode += '</triangles>';\n\n \t\t\t\t}\n\n \t\t\t\tgnode += \"</mesh></geometry>\";\n\n \t\t\t\tlibraryGeometries.push( gnode );\n\n \t\t\t\tinfo = { meshid: meshid, bufferGeometry: bufferGeometry };\n \t\t\t\tgeometryInfo.set( g, info );\n\n \t\t\t}\n\n \t\t\treturn info;\n\n \t\t}", "title": "" }, { "docid": "24443f4063aeaabeef08a3c0ef7ded13", "score": "0.54208773", "text": "function init(){ \n\t\t\t//Define path generator\n\t\t\tvar projection = d3.geoMercator()\n\t\t\t.translate([w/2, h/2])\n\t\t\t.center([-34.87986,-8.05596])\n\t\t\t.scale(projecao);\n\n\t\t\tvar path = d3.geoPath()\n\t\t\t\t.projection(projection);\n\n\t\t\t//Create SVG element\n\t\t\tvar svg = d3.select(\"body\")\n\t\t\t\t\t\t.append(\"svg\")\n\t\t\t\t\t\t.attr(\"width\", w)\n\t\t\t\t\t\t.attr(\"height\", h)\n\t\t\t\t\t\t.attr(\"transform\", \"translate(\" + margin.left + \",\" + margin.top + \")\");\n\n\t\t\t svg2 = d3.select(\"body\")\n\t\t\t\t\t\t.append(\"svg\")\n\t\t\t\t\t\t.attr(\"class\",\"painel2\")\n\t\t\t\t\t\t.attr(\"width\", w2+margin.left + margin.right)\n\t\t\t\t\t\t.attr(\"height\", h2+margin.bottom + margin.top)\n\t\t\t\t\t\t.append(\"g\")\n\t\t\t\t\t\t.attr(\"transform\", \"translate(\" + margin.left + \",\" + margin.top + \")\");\n\n\t\t\t\t\t\t\t\t\n\t\t\t svg2.append(\"g\")\n\t\t\t\t\t .attr(\"id\",\"xAxis\")\n\t\t\t\t\t .attr(\"transform\",\"translate(0,\" + h2 + \")\");\n \t\t\t \n \t\t\t svg2.append(\"g\")\n \t\t\t \t\t.attr(\"class\",\"histograma\")\n \t\t\t \t\t\n\n\t\t\td3.json(\"bairros.json\", function(json) {\n\t\t\t\t\tfor(var i =0;i<json.features.length;i++){\n\t\t\t\t\t\tvar obj = json.features[i];\n\t\t\t\t\t\t//console.log(typeof(obj),\" \" , obj);\n\t\t\t\t\t\tarrayJson.push(obj);\n\t\t\t\t\t\t//console.log(\"Tamanho de arrayJson eh \",arrayJson.length);\n\t\t\t\t\t}\n\t\t\t\t//Bind data and create one path per GeoJSON feature\n\t\t\t\tsvg.selectAll(\"path\")\n\t\t\t\t .data(json.features)\n\t\t\t\t .enter()\n\t\t\t\t .append(\"path\")\n\t\t\t\t .attr(\"d\", path)\n\t\t\t\t .attr(\"fill\",\"#87CEFA\")\n\t\t\t\t .attr(\"stroke\",\"white\");\n\t\t\n\t\t\t});\n\t\t\t\n\t\t\t\n\t\t\td3.json(\"acidentes-2014-11-novembro.json\",function(data){\n\t\t\t\tvar aux = data.features;\n\t\t\t\tfor (var i = 0; i < aux.length; i++) {\n\t\t\t\t\t\tvar cood = aux[i];\n\t\t\t\t\t\tacidentesNovembro.push(cood);\n\t\t\t\t}\n\t\t\t});\n\n\n\t\t\tvar svgall = d3.select(\"body\").select(\"svg\");\t\t \t\t\n\t\t\n\t\t\td3.select(\"svg\")\n\t\t\t.on(\"click\",function(d){\n\t\t\t\t//console.log(\"click \",state);\n\t\t\t\tvar p = d3.mouse( this);\n\t\t\t\tinitialMousePosition = p;\n\t\t\t\tif(state==\"pan\"){\n\t\t\t\t\tstate = \"idle\";\n\t\t\t\t}else{\n\t\t\t\t\tstate = \"pan\";\n\t\t\t\t}\n\t\t\t\td3.event.stopPropagation();\n\t\t\t\td3.event.preventDefault();\n\t\t\t\t//console.log(\"click\");\n\t\t\t})\n\t\t\t.on(\"mousemove\",function(d){\n\t\t\t\t//console.log(\"mousemove \",state);\n\t\t\t\tif(state === \"pan\"){\n\t\t\t\tvar p = d3.mouse( this),\n\t\t\t\t\tmove = {\n\t\t\t\t\t\tx : p[0] - initialMousePosition[0],\n\t\t\t\t\t\ty : p[1] - initialMousePosition[1]\n\t\t\t\t\t};\n\n\t\t\t\txOffset += (move.x);\n\t\t\t\tyOffset += (move.y);\n\t\t\t\tinitialMousePosition = p; \n\t\t\t\t\trenderDataset();\n\t\t\t\t}\n\t\t\t\td3.event.stopPropagation();\n\t\t\t\td3.event.preventDefault();\n\n\t\t\t\t \tvar s = svgall.select( \"rect\");\n\n\t\t\t if( !s.empty()) {\n\t\t\t var p = d3.mouse(this);\n\n\t\t\t var d = {\n\t\t\t \"x\" : parseInt( s.attr( \"x\"), 10),\n\t\t\t \"y\" : parseInt( s.attr( \"y\"), 10),\n\t\t\t \"width\" : parseInt( s.attr( \"width\"), 10),\n\t\t\t \"height\" : parseInt( s.attr( \"height\"), 10)\n\t\t\t };\n\t\t\t // console.log(\"valor de d eh \", d);\n\t\t\t var move = {\n\t\t\t \"x\" : p[0] - d.x,\n\t\t\t \"y\" : p[1] - d.y\n\t\t\t }\n\t\t\t ;\n\t\t\t //console.log(\"O valor de p eh \",p, \" o valor de move eh \", move);\n\t\t\t if( move.x < 1 || (move.x*2<d.width)) {\n\t\t\t d.x = p[0];\n\t\t\t d.width -= move.x;\n\t\t\t } else {\n\t\t\t d.width = move.x; \n\t\t\t }\n\n\t\t\t if( move.y < 1 || (move.y*2<d.height)) {\n\t\t\t d.y = p[1];\n\t\t\t d.height -= move.y;\n\t\t\t } else {\n\t\t\t d.height = move.y; \n\t\t\t }\n\t\t\t \n\t\t\t s.attr(\"x\",d.x).attr(\"y\",d.y).attr(\"width\",d.width).attr(\"height\",d.height);\n\t\t\t // console.log( \"valor de d por ultimo eh \",d);\n\t\t\t }\n\t\t\t})\n\t\t\t.on(\"mouseup\",function(d){\t\n\t\t\t\t//console.log(\"mouseup \",state);\n\t\t\t\t//state = \"idle\";\n\t\t\t\trenderDataset();\n\t\t\t\td3.event.stopPropagation();\n\t\t\t\td3.event.preventDefault();\n\t\t\t\tvar rect = svgall.select(\"rect\");\n\t\t\t var d = {\n\t\t\t \"x\" : parseInt( rect.attr( \"x\"), 10),\n\t\t\t \"y\" : parseInt( rect.attr( \"y\"), 10),\n\t\t\t \"width\" : parseInt( rect.attr( \"width\"), 10),\n\t\t\t \"height\" : parseInt( rect.attr( \"height\"), 10)\n\t\t\t };\n\t\t\t //console.log(\"variaveis do rect eh \", d );\n\t\t\t var largura = d.x + d.width;\n\t\t\t var comprimento = d.y + d.height;\n\t\t\t \tvar entrou = 0;\n\t\t\t var circles = d3.select(\"svg\").selectAll(\"circle\");\n\n\t\t\t circles.attr(\"opacity\", function(c){\n\t\t\t\t\tvar dx = d.x;\n\t\t\t \tvar dy = d.y;\n\t\t\t var cx = d3.select(this).attr(\"cx\");\n\t\t\t var cy = d3.select(this).attr(\"cy\");\n\n\t\t\t \tif(cx>=dx && cx <= largura && cy>=dy && cy <= comprimento ){\n\t\t\t \t\tentrou = 1;\n\t\t\t causasAcidentes[c.properties.tipo] = causasAcidentes[c.properties.tipo] +1;\n\t\t\t return 1;\n\t\t\t }\n\t\t\t \treturn 0.3;\n\t\t\t\t});\n\t\t \t/*.each(function(c){\n\t\t\t\tvar dx = d.x;\n\t\t \tvar dy = d.y;\n\t\t var cx = d3.select(this).attr(\"cx\");\n\t\t var cy = d3.select(this).attr(\"cy\");\n\n\t\t \tif(cx>=dx && cx <= largura && cy>=dy && cy <= comprimento ){\n\t\t \t\tentrou = 1;\n\t\t causasAcidentes[c.properties.tipo] = causasAcidentes[c.properties.tipo] +1;\n\t\t }\n\t\t });*/\n\t\t\t \tif(entrou===1){ //entao foi selecionado algum ponto\n\t\t\t \t\thistograma(1);\n\t\t\t \t\tentrou =0;\n\t\t\t \t}else {\n\t\t\t \t\t//console.log(\"nenhum selecionado\");\n\t\t\t \t\thistograma(0);\n\t\t\t \t}\n\t\t\t \t\tconsole.log(\"Total de acidentes por tipo : \")\n\t\t\t \t\tconsole.log(\"Automóveis e outros\",causasAcidentes[\"Automóveis e outros\"]);\n\t\t\t \t\tconsole.log(\"Ciclistas\",causasAcidentes[\"Ciclistas\"]);\n\t\t\t \t\tconsole.log(\"Ciclomotores\",causasAcidentes[\"Ciclomotores\"]);\n\t\t\t \t\tconsole.log(\"Motocicletas\",causasAcidentes[\"Motocicletas\"]);\n\t\t\t \t\tconsole.log(\"Pedestres\",causasAcidentes[\"Pedestres\"]);\n\n\t\t\t\t\tcausasAcidentes[\"Automóveis e outros\"] =0;\n\t\t\t\t\tcausasAcidentes[\"Ciclistas\"]=0;\n\t\t\t\t\tcausasAcidentes[\"Ciclomotores\"]=0;\n\t\t\t\t\tcausasAcidentes[\"Motocicletas\"]=0;\n\t\t\t\t\tcausasAcidentes[\"Pedestres\"]=0;\n\t\t\t\t rect.remove();\n\t\t\t})\n\t\t\t.on(\"wheel.zoom\",function(d){\n\t\t\t\t\t//console.log(\"zoom \",state);\n\t\t\t\t\td3.event.stopPropagation();\n\t\t\t\t\td3.event.preventDefault();\n\t\t\t\t\tif(d3.event.wheelDeltaY > 0)\n\t\t\t\t\tprojecao = projecao+(100000/2);\n\t\t\t\t\telse\n\t\t\t\t\tprojecao = projecao-(100000/2);\n\t\t\t\t\trenderDataset(); \n\t\t\t}).on(\"contextmenu\", function(d, i) {\n\t\t\t\t\t//console.log(\"left \",state);\n\t\t\t\t\td3.event.preventDefault();\n\t\t\t\t\tvar p = d3.mouse( this);\n\t\t\t\t svgall.append(\"rect\")\n\t\t\t\t .attr(\"x\",p[0])\n\t\t\t\t .attr(\"y\",p[1])\n\t\t\t\t .attr(\"rx\",\"6\")\n\t\t\t\t .attr(\"ry\",\"6\")\n\t\t\t\t\t.attr(\"width\",0)\n\t\t\t\t\t.attr(\"height\",0)\n\t\t\t\t .attr(\"stroke\",\"black\")\n\t\t\t\t .attr(\"stroke-width\",\"2px\")\n\t\t\t\t .attr(\"stroke-dasharray\", \"4px\")\n\t\t\t\t .attr(\"stroke-opacity\",\" 0.5\")\n\t\t\t\t .attr(\"fill\",\"transparent\")\n\t\t\t\t .attr(\"class\",\"selection\");\n\t\t\t});\n\t\n\n\t\td3.select(\"input\").on(\"change\", function(){\n\t\t\t//console.log(this.checked);\n\t\t\tif(this.checked){\n\t\t\t\tacidentes();\n\t\t\t}else {\n\t\t\t\tremoveAcidentes();\n\t\t\t}\n\t\t});\n\n}", "title": "" }, { "docid": "2f404c7a51261713ac0f21e96f707957", "score": "0.54055583", "text": "pathGenerator () {\r\n var path= d3.geoPath().projection(this.projection)\r\n return path\r\n }", "title": "" }, { "docid": "ac4fa7525924d15c1a91aa9eb828a021", "score": "0.5398785", "text": "function PathMap() {\n /**\n * Contains a map of path elements\n *\n * <h1>Path definition</h1>\n * A parameterized path is defined like this:\n * <pre>\n * 'GATEWAY_PARALLEL': {\n * d: 'm {mx},{my} {e.x0},0 0,{e.x1} {e.x1},0 0,{e.y0} -{e.x1},0 0,{e.y1} ' +\n '-{e.x0},0 0,-{e.y1} -{e.x1},0 0,-{e.y0} {e.x1},0 z',\n * height: 17.5,\n * width: 17.5,\n * heightElements: [2.5, 7.5],\n * widthElements: [2.5, 7.5]\n * }\n * </pre>\n * <p>It's important to specify a correct <b>height and width</b> for the path as the scaling\n * is based on the ratio between the specified height and width in this object and the\n * height and width that is set as scale target (Note x,y coordinates will be scaled with\n * individual ratios).</p>\n * <p>The '<b>heightElements</b>' and '<b>widthElements</b>' array must contain the values that will be scaled.\n * The scaling is based on the computed ratios.\n * Coordinates on the y axis should be in the <b>heightElement</b>'s array, they will be scaled using\n * the computed ratio coefficient.\n * In the parameterized path the scaled values can be accessed through the 'e' object in {} brackets.\n * <ul>\n * <li>The values for the y axis can be accessed in the path string using {e.y0}, {e.y1}, ....</li>\n * <li>The values for the x axis can be accessed in the path string using {e.x0}, {e.x1}, ....</li>\n * </ul>\n * The numbers x0, x1 respectively y0, y1, ... map to the corresponding array index.\n * </p>\n */\n this.pathMap = {\n 'EVENT_MESSAGE': {\n d: 'm {mx},{my} l 0,{e.y1} l {e.x1},0 l 0,-{e.y1} z l {e.x0},{e.y0} l {e.x0},-{e.y0}',\n height: 36,\n width: 36,\n heightElements: [6, 14],\n widthElements: [10.5, 21]\n },\n 'EVENT_SIGNAL': {\n d: 'M {mx},{my} l {e.x0},{e.y0} l -{e.x1},0 Z',\n height: 36,\n width: 36,\n heightElements: [18],\n widthElements: [10, 20]\n },\n 'EVENT_ESCALATION': {\n d: 'M {mx},{my} l {e.x0},{e.y0} l -{e.x0},-{e.y1} l -{e.x0},{e.y1} Z',\n height: 36,\n width: 36,\n heightElements: [20, 7],\n widthElements: [8]\n },\n 'EVENT_CONDITIONAL': {\n d: 'M {e.x0},{e.y0} l {e.x1},0 l 0,{e.y2} l -{e.x1},0 Z ' + 'M {e.x2},{e.y3} l {e.x0},0 ' + 'M {e.x2},{e.y4} l {e.x0},0 ' + 'M {e.x2},{e.y5} l {e.x0},0 ' + 'M {e.x2},{e.y6} l {e.x0},0 ' + 'M {e.x2},{e.y7} l {e.x0},0 ' + 'M {e.x2},{e.y8} l {e.x0},0 ',\n height: 36,\n width: 36,\n heightElements: [8.5, 14.5, 18, 11.5, 14.5, 17.5, 20.5, 23.5, 26.5],\n widthElements: [10.5, 14.5, 12.5]\n },\n 'EVENT_LINK': {\n d: 'm {mx},{my} 0,{e.y0} -{e.x1},0 0,{e.y1} {e.x1},0 0,{e.y0} {e.x0},-{e.y2} -{e.x0},-{e.y2} z',\n height: 36,\n width: 36,\n heightElements: [4.4375, 6.75, 7.8125],\n widthElements: [9.84375, 13.5]\n },\n 'EVENT_ERROR': {\n d: 'm {mx},{my} {e.x0},-{e.y0} {e.x1},-{e.y1} {e.x2},{e.y2} {e.x3},-{e.y3} -{e.x4},{e.y4} -{e.x5},-{e.y5} z',\n height: 36,\n width: 36,\n heightElements: [0.023, 8.737, 8.151, 16.564, 10.591, 8.714],\n widthElements: [0.085, 6.672, 6.97, 4.273, 5.337, 6.636]\n },\n 'EVENT_CANCEL_45': {\n d: 'm {mx},{my} -{e.x1},0 0,{e.x0} {e.x1},0 0,{e.y1} {e.x0},0 ' + '0,-{e.y1} {e.x1},0 0,-{e.y0} -{e.x1},0 0,-{e.y1} -{e.x0},0 z',\n height: 36,\n width: 36,\n heightElements: [4.75, 8.5],\n widthElements: [4.75, 8.5]\n },\n 'EVENT_COMPENSATION': {\n d: 'm {mx},{my} {e.x0},-{e.y0} 0,{e.y1} z m {e.x1},-{e.y2} {e.x2},-{e.y3} 0,{e.y1} -{e.x2},-{e.y3} z',\n height: 36,\n width: 36,\n heightElements: [6.5, 13, 0.4, 6.1],\n widthElements: [9, 9.3, 8.7]\n },\n 'EVENT_TIMER_WH': {\n d: 'M {mx},{my} l {e.x0},-{e.y0} m -{e.x0},{e.y0} l {e.x1},{e.y1} ',\n height: 36,\n width: 36,\n heightElements: [10, 2],\n widthElements: [3, 7]\n },\n 'EVENT_TIMER_LINE': {\n d: 'M {mx},{my} ' + 'm {e.x0},{e.y0} l -{e.x1},{e.y1} ',\n height: 36,\n width: 36,\n heightElements: [10, 3],\n widthElements: [0, 0]\n },\n 'EVENT_MULTIPLE': {\n d: 'm {mx},{my} {e.x1},-{e.y0} {e.x1},{e.y0} -{e.x0},{e.y1} -{e.x2},0 z',\n height: 36,\n width: 36,\n heightElements: [6.28099, 12.56199],\n widthElements: [3.1405, 9.42149, 12.56198]\n },\n 'EVENT_PARALLEL_MULTIPLE': {\n d: 'm {mx},{my} {e.x0},0 0,{e.y1} {e.x1},0 0,{e.y0} -{e.x1},0 0,{e.y1} ' + '-{e.x0},0 0,-{e.y1} -{e.x1},0 0,-{e.y0} {e.x1},0 z',\n height: 36,\n width: 36,\n heightElements: [2.56228, 7.68683],\n widthElements: [2.56228, 7.68683]\n },\n 'GATEWAY_EXCLUSIVE': {\n d: 'm {mx},{my} {e.x0},{e.y0} {e.x1},{e.y0} {e.x2},0 {e.x4},{e.y2} ' + '{e.x4},{e.y1} {e.x2},0 {e.x1},{e.y3} {e.x0},{e.y3} ' + '{e.x3},0 {e.x5},{e.y1} {e.x5},{e.y2} {e.x3},0 z',\n height: 17.5,\n width: 17.5,\n heightElements: [8.5, 6.5312, -6.5312, -8.5],\n widthElements: [6.5, -6.5, 3, -3, 5, -5]\n },\n 'GATEWAY_PARALLEL': {\n d: 'm {mx},{my} 0,{e.y1} -{e.x1},0 0,{e.y0} {e.x1},0 0,{e.y1} {e.x0},0 ' + '0,-{e.y1} {e.x1},0 0,-{e.y0} -{e.x1},0 0,-{e.y1} -{e.x0},0 z',\n height: 30,\n width: 30,\n heightElements: [5, 12.5],\n widthElements: [5, 12.5]\n },\n 'GATEWAY_EVENT_BASED': {\n d: 'm {mx},{my} {e.x0},{e.y0} {e.x0},{e.y1} {e.x1},{e.y2} {e.x2},0 z',\n height: 11,\n width: 11,\n heightElements: [-6, 6, 12, -12],\n widthElements: [9, -3, -12]\n },\n 'GATEWAY_COMPLEX': {\n d: 'm {mx},{my} 0,{e.y0} -{e.x0},-{e.y1} -{e.x1},{e.y2} {e.x0},{e.y1} -{e.x2},0 0,{e.y3} ' + '{e.x2},0 -{e.x0},{e.y1} l {e.x1},{e.y2} {e.x0},-{e.y1} 0,{e.y0} {e.x3},0 0,-{e.y0} {e.x0},{e.y1} ' + '{e.x1},-{e.y2} -{e.x0},-{e.y1} {e.x2},0 0,-{e.y3} -{e.x2},0 {e.x0},-{e.y1} -{e.x1},-{e.y2} ' + '-{e.x0},{e.y1} 0,-{e.y0} -{e.x3},0 z',\n height: 17.125,\n width: 17.125,\n heightElements: [4.875, 3.4375, 2.125, 3],\n widthElements: [3.4375, 2.125, 4.875, 3]\n },\n 'DATA_OBJECT_PATH': {\n d: 'm 0,0 {e.x1},0 {e.x0},{e.y0} 0,{e.y1} -{e.x2},0 0,-{e.y2} {e.x1},0 0,{e.y0} {e.x0},0',\n height: 61,\n width: 51,\n heightElements: [10, 50, 60],\n widthElements: [10, 40, 50, 60]\n },\n 'DATA_OBJECT_COLLECTION_PATH': {\n d: 'm {mx}, {my} ' + 'm 0 15 l 0 -15 ' + 'm 4 15 l 0 -15 ' + 'm 4 15 l 0 -15 ',\n height: 61,\n width: 51,\n heightElements: [12],\n widthElements: [1, 6, 12, 15]\n },\n 'DATA_ARROW': {\n d: 'm 5,9 9,0 0,-3 5,5 -5,5 0,-3 -9,0 z',\n height: 61,\n width: 51,\n heightElements: [],\n widthElements: []\n },\n 'DATA_STORE': {\n d: 'm {mx},{my} ' + 'l 0,{e.y2} ' + 'c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0 ' + 'l 0,-{e.y2} ' + 'c -{e.x0},-{e.y1} -{e.x1},-{e.y1} -{e.x2},0' + 'c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0 ' + 'm -{e.x2},{e.y0}' + 'c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0' + 'm -{e.x2},{e.y0}' + 'c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0',\n height: 61,\n width: 61,\n heightElements: [7, 10, 45],\n widthElements: [2, 58, 60]\n },\n 'TEXT_ANNOTATION': {\n d: 'm {mx}, {my} m 10,0 l -10,0 l 0,{e.y0} l 10,0',\n height: 30,\n width: 10,\n heightElements: [30],\n widthElements: [10]\n },\n 'MARKER_SUB_PROCESS': {\n d: 'm{mx},{my} m 7,2 l 0,10 m -5,-5 l 10,0',\n height: 10,\n width: 10,\n heightElements: [],\n widthElements: []\n },\n 'MARKER_PARALLEL': {\n d: 'm{mx},{my} m 3,2 l 0,10 m 3,-10 l 0,10 m 3,-10 l 0,10',\n height: 10,\n width: 10,\n heightElements: [],\n widthElements: []\n },\n 'MARKER_SEQUENTIAL': {\n d: 'm{mx},{my} m 0,3 l 10,0 m -10,3 l 10,0 m -10,3 l 10,0',\n height: 10,\n width: 10,\n heightElements: [],\n widthElements: []\n },\n 'MARKER_COMPENSATION': {\n d: 'm {mx},{my} 7,-5 0,10 z m 7.1,-0.3 6.9,-4.7 0,10 -6.9,-4.7 z',\n height: 10,\n width: 21,\n heightElements: [],\n widthElements: []\n },\n 'MARKER_LOOP': {\n d: 'm {mx},{my} c 3.526979,0 6.386161,-2.829858 6.386161,-6.320661 0,-3.490806 -2.859182,-6.320661 ' + '-6.386161,-6.320661 -3.526978,0 -6.38616,2.829855 -6.38616,6.320661 0,1.745402 ' + '0.714797,3.325567 1.870463,4.469381 0.577834,0.571908 1.265885,1.034728 2.029916,1.35457 ' + 'l -0.718163,-3.909793 m 0.718163,3.909793 -3.885211,0.802902',\n height: 13.9,\n width: 13.7,\n heightElements: [],\n widthElements: []\n },\n 'MARKER_ADHOC': {\n d: 'm {mx},{my} m 0.84461,2.64411 c 1.05533,-1.23780996 2.64337,-2.07882 4.29653,-1.97997996 2.05163,0.0805 ' + '3.85579,1.15803 5.76082,1.79107 1.06385,0.34139996 2.24454,0.1438 3.18759,-0.43767 0.61743,-0.33642 ' + '1.2775,-0.64078 1.7542,-1.17511 0,0.56023 0,1.12046 0,1.6807 -0.98706,0.96237996 -2.29792,1.62393996 ' + '-3.6918,1.66181996 -1.24459,0.0927 -2.46671,-0.2491 -3.59505,-0.74812 -1.35789,-0.55965 ' + '-2.75133,-1.33436996 -4.27027,-1.18121996 -1.37741,0.14601 -2.41842,1.13685996 -3.44288,1.96782996 z',\n height: 4,\n width: 15,\n heightElements: [],\n widthElements: []\n },\n 'TASK_TYPE_SEND': {\n d: 'm {mx},{my} l 0,{e.y1} l {e.x1},0 l 0,-{e.y1} z l {e.x0},{e.y0} l {e.x0},-{e.y0}',\n height: 14,\n width: 21,\n heightElements: [6, 14],\n widthElements: [10.5, 21]\n },\n 'TASK_TYPE_SCRIPT': {\n d: 'm {mx},{my} c 9.966553,-6.27276 -8.000926,-7.91932 2.968968,-14.938 l -8.802728,0 ' + 'c -10.969894,7.01868 6.997585,8.66524 -2.968967,14.938 z ' + 'm -7,-12 l 5,0 ' + 'm -4.5,3 l 4.5,0 ' + 'm -3,3 l 5,0' + 'm -4,3 l 5,0',\n height: 15,\n width: 12.6,\n heightElements: [6, 14],\n widthElements: [10.5, 21]\n },\n 'TASK_TYPE_USER_1': {\n d: 'm {mx},{my} c 0.909,-0.845 1.594,-2.049 1.594,-3.385 0,-2.554 -1.805,-4.62199999 ' + '-4.357,-4.62199999 -2.55199998,0 -4.28799998,2.06799999 -4.28799998,4.62199999 0,1.348 ' + '0.974,2.562 1.89599998,3.405 -0.52899998,0.187 -5.669,2.097 -5.794,4.7560005 v 6.718 ' + 'h 17 v -6.718 c 0,-2.2980005 -5.5279996,-4.5950005 -6.0509996,-4.7760005 z' + 'm -8,6 l 0,5.5 m 11,0 l 0,-5'\n },\n 'TASK_TYPE_USER_2': {\n d: 'm {mx},{my} m 2.162,1.009 c 0,2.4470005 -2.158,4.4310005 -4.821,4.4310005 ' + '-2.66499998,0 -4.822,-1.981 -4.822,-4.4310005 '\n },\n 'TASK_TYPE_USER_3': {\n d: 'm {mx},{my} m -6.9,-3.80 c 0,0 2.25099998,-2.358 4.27399998,-1.177 2.024,1.181 4.221,1.537 ' + '4.124,0.965 -0.098,-0.57 -0.117,-3.79099999 -4.191,-4.13599999 -3.57499998,0.001 ' + '-4.20799998,3.36699999 -4.20699998,4.34799999 z'\n },\n 'TASK_TYPE_MANUAL': {\n d: 'm {mx},{my} c 0.234,-0.01 5.604,0.008 8.029,0.004 0.808,0 1.271,-0.172 1.417,-0.752 0.227,-0.898 ' + '-0.334,-1.314 -1.338,-1.316 -2.467,-0.01 -7.886,-0.004 -8.108,-0.004 -0.014,-0.079 0.016,-0.533 0,-0.61 ' + '0.195,-0.042 8.507,0.006 9.616,0.002 0.877,-0.007 1.35,-0.438 1.353,-1.208 0.003,-0.768 -0.479,-1.09 ' + '-1.35,-1.091 -2.968,-0.002 -9.619,-0.013 -9.619,-0.013 v -0.591 c 0,0 5.052,-0.016 7.225,-0.016 ' + '0.888,-0.002 1.354,-0.416 1.351,-1.193 -0.006,-0.761 -0.492,-1.196 -1.361,-1.196 -3.473,-0.005 ' + '-10.86,-0.003 -11.0829995,-0.003 -0.022,-0.047 -0.045,-0.094 -0.069,-0.139 0.3939995,-0.319 ' + '2.0409995,-1.626 2.4149995,-2.017 0.469,-0.4870005 0.519,-1.1650005 0.162,-1.6040005 -0.414,-0.511 ' + '-0.973,-0.5 -1.48,-0.236 -1.4609995,0.764 -6.5999995,3.6430005 -7.7329995,4.2710005 -0.9,0.499 ' + '-1.516,1.253 -1.882,2.19 -0.37000002,0.95 -0.17,2.01 -0.166,2.979 0.004,0.718 -0.27300002,1.345 ' + '-0.055,2.063 0.629,2.087 2.425,3.312 4.859,3.318 4.6179995,0.014 9.2379995,-0.139 13.8569995,-0.158 ' + '0.755,-0.004 1.171,-0.301 1.182,-1.033 0.012,-0.754 -0.423,-0.969 -1.183,-0.973 -1.778,-0.01 ' + '-5.824,-0.004 -6.04,-0.004 10e-4,-0.084 0.003,-0.586 10e-4,-0.67 z'\n },\n 'TASK_TYPE_INSTANTIATING_SEND': {\n d: 'm {mx},{my} l 0,8.4 l 12.6,0 l 0,-8.4 z l 6.3,3.6 l 6.3,-3.6'\n },\n 'TASK_TYPE_SERVICE': {\n d: 'm {mx},{my} v -1.71335 c 0.352326,-0.0705 0.703932,-0.17838 1.047628,-0.32133 ' + '0.344416,-0.14465 0.665822,-0.32133 0.966377,-0.52145 l 1.19431,1.18005 1.567487,-1.57688 ' + '-1.195028,-1.18014 c 0.403376,-0.61394 0.683079,-1.29908 0.825447,-2.01824 l 1.622133,-0.01 ' + 'v -2.2196 l -1.636514,0.01 c -0.07333,-0.35153 -0.178319,-0.70024 -0.323564,-1.04372 ' + '-0.145244,-0.34406 -0.321407,-0.6644 -0.522735,-0.96217 l 1.131035,-1.13631 -1.583305,-1.56293 ' + '-1.129598,1.13589 c -0.614052,-0.40108 -1.302883,-0.68093 -2.022633,-0.82247 l 0.0093,-1.61852 ' + 'h -2.241173 l 0.0042,1.63124 c -0.353763,0.0736 -0.705369,0.17977 -1.049785,0.32371 -0.344415,0.14437 ' + '-0.665102,0.32092 -0.9635006,0.52046 l -1.1698628,-1.15823 -1.5667691,1.5792 1.1684265,1.15669 ' + 'c -0.4026573,0.61283 -0.68308,1.29797 -0.8247287,2.01713 l -1.6588041,0.003 v 2.22174 ' + 'l 1.6724648,-0.006 c 0.073327,0.35077 0.1797598,0.70243 0.3242851,1.04472 0.1452428,0.34448 ' + '0.3214064,0.6644 0.5227339,0.96066 l -1.1993431,1.19723 1.5840256,1.56011 1.1964668,-1.19348 ' + 'c 0.6140517,0.40346 1.3028827,0.68232 2.0233517,0.82331 l 7.19e-4,1.69892 h 2.226848 z ' + 'm 0.221462,-3.9957 c -1.788948,0.7502 -3.8576,-0.0928 -4.6097055,-1.87438 -0.7521065,-1.78321 ' + '0.090598,-3.84627 1.8802645,-4.59604 1.78823,-0.74936 3.856881,0.0929 4.608987,1.87437 ' + '0.752106,1.78165 -0.0906,3.84612 -1.879546,4.59605 z'\n },\n 'TASK_TYPE_SERVICE_FILL': {\n d: 'm {mx},{my} c -1.788948,0.7502 -3.8576,-0.0928 -4.6097055,-1.87438 -0.7521065,-1.78321 ' + '0.090598,-3.84627 1.8802645,-4.59604 1.78823,-0.74936 3.856881,0.0929 4.608987,1.87437 ' + '0.752106,1.78165 -0.0906,3.84612 -1.879546,4.59605 z'\n },\n 'TASK_TYPE_BUSINESS_RULE_HEADER': {\n d: 'm {mx},{my} 0,4 20,0 0,-4 z'\n },\n 'TASK_TYPE_BUSINESS_RULE_MAIN': {\n d: 'm {mx},{my} 0,12 20,0 0,-12 z' + 'm 0,8 l 20,0 ' + 'm -13,-4 l 0,8'\n },\n 'MESSAGE_FLOW_MARKER': {\n d: 'm {mx},{my} m -10.5 ,-7 l 0,14 l 21,0 l 0,-14 z l 10.5,6 l 10.5,-6'\n }\n };\n\n this.getRawPath = function getRawPath(pathId) {\n return this.pathMap[pathId].d;\n };\n /**\n * Scales the path to the given height and width.\n * <h1>Use case</h1>\n * <p>Use case is to scale the content of elements (event, gateways) based\n * on the element bounding box's size.\n * </p>\n * <h1>Why not transform</h1>\n * <p>Scaling a path with transform() will also scale the stroke and IE does not support\n * the option 'non-scaling-stroke' to prevent this.\n * Also there are use cases where only some parts of a path should be\n * scaled.</p>\n *\n * @param {String} pathId The ID of the path.\n * @param {Object} param <p>\n * Example param object scales the path to 60% size of the container (data.width, data.height).\n * <pre>\n * {\n * xScaleFactor: 0.6,\n * yScaleFactor:0.6,\n * containerWidth: data.width,\n * containerHeight: data.height,\n * position: {\n * mx: 0.46,\n * my: 0.2,\n * }\n * }\n * </pre>\n * <ul>\n * <li>targetpathwidth = xScaleFactor * containerWidth</li>\n * <li>targetpathheight = yScaleFactor * containerHeight</li>\n * <li>Position is used to set the starting coordinate of the path. M is computed:\n * <ul>\n * <li>position.x * containerWidth</li>\n * <li>position.y * containerHeight</li>\n * </ul>\n * Center of the container <pre> position: {\n * mx: 0.5,\n * my: 0.5,\n * }</pre>\n * Upper left corner of the container\n * <pre> position: {\n * mx: 0.0,\n * my: 0.0,\n * }</pre>\n * </li>\n * </ul>\n * </p>\n *\n */\n\n\n this.getScaledPath = function getScaledPath(pathId, param) {\n var rawPath = this.pathMap[pathId]; // positioning\n // compute the start point of the path\n\n var mx, my;\n\n if (param.abspos) {\n mx = param.abspos.x;\n my = param.abspos.y;\n } else {\n mx = param.containerWidth * param.position.mx;\n my = param.containerHeight * param.position.my;\n }\n\n var coordinates = {}; // map for the scaled coordinates\n\n if (param.position) {\n // path\n var heightRatio = param.containerHeight / rawPath.height * param.yScaleFactor;\n var widthRatio = param.containerWidth / rawPath.width * param.xScaleFactor; // Apply height ratio\n\n for (var heightIndex = 0; heightIndex < rawPath.heightElements.length; heightIndex++) {\n coordinates['y' + heightIndex] = rawPath.heightElements[heightIndex] * heightRatio;\n } // Apply width ratio\n\n\n for (var widthIndex = 0; widthIndex < rawPath.widthElements.length; widthIndex++) {\n coordinates['x' + widthIndex] = rawPath.widthElements[widthIndex] * widthRatio;\n }\n } // Apply value to raw path\n\n\n var path = format(rawPath.d, {\n mx: mx,\n my: my,\n e: coordinates\n });\n return path;\n };\n} // helpers //////////////////////", "title": "" }, { "docid": "bc426019e9a00fdeb0c6e72aa128b679", "score": "0.536215", "text": "async parseObject(cityObj, json) { \n if (json.CityObjects[cityObj].children != undefined) {\n return (json.CityObjects[cityObj].children)\n };\n \n //create geometry and empty list for the vertices\n var geom = new THREE.Geometry()\n \n //each geometrytype must be handled different\n var geomType = json.CityObjects[cityObj].geometry[0].type\n if (geomType == \"Solid\") {\n boundaries = json.CityObjects[cityObj].geometry[0].boundaries[0];\n } else if (geomType == \"MultiSurface\" || geomType == \"CompositeSurface\") {\n boundaries = json.CityObjects[cityObj].geometry[0].boundaries;\n } else if (geomType == \"MultiSolid\" || geomType == \"CompositeSolid\") {\n boundaries = json.CityObjects[cityObj].geometry[0].boundaries;\n }\n \n //needed for assocation of global and local vertices\n var verticeId = 0\n \n var vertices = [] //local vertices\n var indices = [] //global vertices\n var boundary = [];\n \n //contains the boundary but with the right verticeId\n for (var i = 0; i < boundaries.length; i++) {\n \n for (var j = 0; j < boundaries[i][0].length; j++) {\n \n //the original index from the json file\n var index = boundaries[i][0][j];\n \n //if this index is already there\n if (vertices.includes(index)) {\n \n var vertPos = vertices.indexOf(index)\n indices.push(vertPos)\n boundary.push(vertPos)\n \n } else {\n \n //add vertice to geometry\n var point = new THREE.Vector3(\n json.vertices[index][0],\n json.vertices[index][1],\n json.vertices[index][2]\n );\n geom.vertices.push(point)\n \n vertices.push(index)\n indices.push(verticeId)\n boundary.push(verticeId)\n \n verticeId = verticeId + 1\n }\n \n }\n \n /*\n console.log(\"Vert\", vertices);\n console.log(\"Indi\", indices);\n console.log(\"bound\", boundary);\n console.log(\"geom\", geom.vertices);\n */\n \n //create face\n //triangulated faces\n if (boundary.length == 3) {\n geom.faces.push(\n new THREE.Face3(boundary[0], boundary[1], boundary[2])\n )\n \n //non triangulated faces\n } else if (boundary.length > 3) {\n \n //create list of points\n var pList = []\n for (var j = 0; j < boundary.length; j++) {\n pList.push({\n x: json.vertices[vertices[boundary[j]]][0],\n y: json.vertices[vertices[boundary[j]]][1],\n z: json.vertices[vertices[boundary[j]]][2]\n })\n }\n //get normal of these points\n var normal = await this.get_normal_newell(pList)\n \n //convert to 2d (for triangulation)\n var pv = []\n for (var j = 0; j < pList.length; j++) {\n var re = await this.to_2d(pList[j], normal)\n pv.push(re.x)\n pv.push(re.y)\n }\n \n //triangulate\n var tr = await earcut(pv, null, 2);\n \n //create faces based on triangulation\n for (var j = 0; j < tr.length; j += 3) {\n geom.faces.push(\n new THREE.Face3(\n boundary[tr[j]],\n boundary[tr[j + 1]],\n boundary[tr[j + 2]]\n )\n )\n }\n \n }\n \n //reset boundaries\n boundary = []\n \n }\n \n //needed for shadow\n geom.computeFaceNormals();\n \n //add geom to the list\n var _id = cityObj\n this.geoms[_id] = geom\n \n return (\"\")\n \n }", "title": "" }, { "docid": "ed4eb45cf76c1692e5d1a8310092ad97", "score": "0.5357729", "text": "calculatePaths() {\n // Copy the entire original path to a new path object\n this.incoming = new paper.Path( this.path.segments );\n // Remove the second half of path segments from path copy\n // and place them in new path object - this creates an\n // \"incoming\" path and \"outgoing\" path, which are the two\n // parallel outlines on either side of the stroke\n this.outgoing = new paper.Path( this.incoming.removeSegments( this.incoming.segments.length / 2 ) );\n // Keep a record of the stroke length (using the incoming \n // path data for convenience)\n this.length = this.incoming.length;\n }", "title": "" }, { "docid": "161ed00bd2745f1d06f5678a2859fac4", "score": "0.5355171", "text": "function get_trans_shape_data () {\r\n var datastr = update_datastring();\r\n var shapes = [];\r\n var cw = domelement.width();\r\n var ch = domelement.height();\r\n if (datastr === \"\") {\r\n //console.log(\"no elements to attach\");\r\n return;\r\n }\r\n var shapes2 = datastr.split(\"|\");\r\n for (var i = 0; i < shapes2.length; i++) {\r\n var shape2 = shapes2[i];\r\n var type = shape2.split(\"::\")[0];\r\n type = type.toLowerCase();\r\n switch (type) {\r\n case \"lrect\":\r\n case \"mrect\":\r\n case \"rect\":\r\n // rectangle format: [x]73[y]196[w]187[h]201[fillc]#ffff00[fillo].5[strokec]#000000[strokeo]1[strokew]3[]\r\n var x = abs_dims(get_attr(shape2, \"x\", \"f\"), cw);\r\n var y = abs_dims(get_attr(shape2, \"y\", \"f\"), ch);\r\n var w = abs_dims(get_attr(shape2, \"w\", \"f\"), cw);\r\n var h = abs_dims(get_attr(shape2, \"h\", \"f\"), ch);\r\n var R = { \"X\": x, \"Y\": y, \"w\": w, \"h\": h, \"type\": \"rect\" };\r\n bounding_shapes += \"BOUNDRECT::[x]\" + (x / cw) + \"[y]\" + (y / ch) + \"[w]\" + (w / cw) + \"[h]\" + (h / ch) + \"[fillc]#000000[fillo]0[strokec]\" + get_attr(shape2, \"strokec\", 's') + \"[strokeo]\" + get_attr(shape2, \"strokeo\", 'f') + \"[strokew]\" + get_attr(shape2, \"strokew\", 'f') + \"[]|\";\r\n shapes.push(R);\r\n break;\r\n case \"lellipse\":\r\n case \"mellipse\":\r\n case \"ellipse\":\r\n // ellipse format: [cx]81[cy]131[rx]40[ry]27[fillc]#ffff00[fillo].5[strokec]#000000[strokeo]1[strokew]3[]\r\n var cx = abs_dims(get_attr(shape2, \"cx\", \"f\"), cw); // center x\r\n var cy = abs_dims(get_attr(shape2, \"cy\", \"f\"), ch); // center y\r\n var rx = abs_dims(get_attr(shape2, \"rx\", \"f\"), cw); // x-radius\r\n var ry = abs_dims(get_attr(shape2, \"ry\", \"f\"), ch); // y-radius\r\n var E = { \"cx\": cx, \"cy\": cy, \"rx\": rx, \"ry\": ry, \"type\": \"ellipse\" };\r\n bounding_shapes += \"BOUNDELLIPSE::[cx]\" + (cx / cw) + \"[cy]\" + (cy / ch) + \"[rx]\" + (rx / cw) + \"[ry]\" + (ry / ch) + \"[fillc]#000000[fillo]0[strokec]\" + get_attr(shape2, \"strokec\", 's') + \"[strokeo]\" + get_attr(shape2, \"strokeo\", 'f') + \"[strokew]\" + get_attr(shape2, \"strokew\", 'f') + \"[]|\";\r\n shapes.push(E);\r\n break;\r\n }\r\n }\r\n shapes_to_paths(shapes);\r\n }", "title": "" }, { "docid": "beaec519f83c05ce6355dac88bc2681e", "score": "0.53500885", "text": "subdivide(){\n\n\n this.divided = true;\n x = this.boundary.x;\n y = this.boundary.y;\n w = this.boundary.w / 2;\n h = this.boundary.h / 2;\n\n\n this._ne = new QuadTree(new Rectangle(x + w, y, w, h), this._config, this._points.slice());\n this._nw = new QuadTree(new Box(x, y, w, h), this._config, this._points.slice());\n this._se = new QuadTree(new Box(x + w, y + h, w, h), this._config, this._points.slice());\n this._sw = new QuadTree(new Box(x, y + h, w, h), this._config, this._points.slice());\n\n // We empty this node points\n this._points.length = 0;\n this._points = [];\n\n\n //algoritmo\n QuadTree qt_northeast, qt_northwest, qt_southeast, qt_southwest;\n\n //1.- Se crean cuatro QuadTrees, uno por cada cuadrante (qt_northeast, qt_northwest,\n //qt_southeast, qt_southwest) tener cuidado con el tamaño (boundary) de cada Quadtree.\n //2.- Asignar los QuadTree creados a cada hijo (this.northeast, this.northwest,\n //this.southeast, this.southwest), ejemplo:\n // this.northeast = qt_northeast;\n this.northeast = qt_northeast\n this.northeast = qt_northeast\n this.northeast = qt_northeast\n\n\n //3.- Cambiar el flag this.divided a true\n }", "title": "" }, { "docid": "ce6f96988e84a0549cb0d456ebf7d4c1", "score": "0.534377", "text": "function PathMap() {\n /**\n * Contains a map of path elements\n *\n * <h1>Path definition</h1>\n * A parameterized path is defined like this:\n * <pre>\n * 'GATEWAY_PARALLEL': {\n * d: 'm {mx},{my} {e.x0},0 0,{e.x1} {e.x1},0 0,{e.y0} -{e.x1},0 0,{e.y1} ' +\n '-{e.x0},0 0,-{e.y1} -{e.x1},0 0,-{e.y0} {e.x1},0 z',\n * height: 17.5,\n * width: 17.5,\n * heightElements: [2.5, 7.5],\n * widthElements: [2.5, 7.5]\n * }\n * </pre>\n * <p>It's important to specify a correct <b>height and width</b> for the path as the scaling\n * is based on the ratio between the specified height and width in this object and the\n * height and width that is set as scale target (Note x,y coordinates will be scaled with\n * individual ratios).</p>\n * <p>The '<b>heightElements</b>' and '<b>widthElements</b>' array must contain the values that will be scaled.\n * The scaling is based on the computed ratios.\n * Coordinates on the y axis should be in the <b>heightElement</b>'s array, they will be scaled using\n * the computed ratio coefficient.\n * In the parameterized path the scaled values can be accessed through the 'e' object in {} brackets.\n * <ul>\n * <li>The values for the y axis can be accessed in the path string using {e.y0}, {e.y1}, ....</li>\n * <li>The values for the x axis can be accessed in the path string using {e.x0}, {e.x1}, ....</li>\n * </ul>\n * The numbers x0, x1 respectively y0, y1, ... map to the corresponding array index.\n * </p>\n m1,1\n l 0,55.3\n c 29.8,19.7 48.4,-4.2 67.2,-6.7\n c 12.2,-2.3 19.8,1.6 30.8,6.2\n l 0,-54.6\n z\n */\n this.pathMap = {\n 'KNOWLEDGE_SOURCE': {\n d: 'm {mx},{my} ' + 'l 0,{e.y0} ' + 'c {e.x0},{e.y1} {e.x1},-{e.y2} {e.x2},-{e.y3} ' + 'c {e.x3},-{e.y4} {e.x4},{e.y5} {e.x5},{e.y6} ' + 'l 0,-{e.y7}z',\n width: 100,\n height: 65,\n widthElements: [29.8, 48.4, 67.2, 12.2, 19.8, 30.8],\n heightElements: [55.3, 19.7, 4.2, 6.7, 2.3, 1.6, 6.2, 54.6]\n },\n 'BUSINESS_KNOWLEDGE_MODEL': {\n d: 'm {mx},{my} l {e.x0},-{e.y0} l {e.x1},0 l 0,{e.y1} l -{e.x2},{e.y2} l -{e.x3},0z',\n width: 125,\n height: 45,\n widthElements: [13.8, 109.2, 13.8, 109.1],\n heightElements: [13.2, 29.8, 13.2]\n },\n 'TEXT_ANNOTATION': {\n d: 'm {mx}, {my} m 10,0 l -10,0 l 0,{e.y0} l 10,0',\n width: 10,\n height: 30,\n widthElements: [10],\n heightElements: [30]\n }\n };\n\n this.getRawPath = function getRawPath(pathId) {\n return this.pathMap[pathId].d;\n };\n /**\n * Scales the path to the given height and width.\n * <h1>Use case</h1>\n * <p>Use case is to scale the content of elements (event, gateways) based\n * on the element bounding box's size.\n * </p>\n * <h1>Why not transform</h1>\n * <p>Scaling a path with transform() will also scale the stroke and IE does not support\n * the option 'non-scaling-stroke' to prevent this.\n * Also there are use cases where only some parts of a path should be\n * scaled.</p>\n *\n * @param {String} pathId The ID of the path.\n * @param {Object} param <p>\n * Example param object scales the path to 60% size of the container (data.width, data.height).\n * <pre>\n * {\n * xScaleFactor: 0.6,\n * yScaleFactor:0.6,\n * containerWidth: data.width,\n * containerHeight: data.height,\n * position: {\n * mx: 0.46,\n * my: 0.2,\n * }\n * }\n * </pre>\n * <ul>\n * <li>targetpathwidth = xScaleFactor * containerWidth</li>\n * <li>targetpathheight = yScaleFactor * containerHeight</li>\n * <li>Position is used to set the starting coordinate of the path. M is computed:\n * <ul>\n * <li>position.x * containerWidth</li>\n * <li>position.y * containerHeight</li>\n * </ul>\n * Center of the container <pre> position: {\n * mx: 0.5,\n * my: 0.5,\n * }</pre>\n * Upper left corner of the container\n * <pre> position: {\n * mx: 0.0,\n * my: 0.0,\n * }</pre>\n * </li>\n * </ul>\n * </p>\n *\n */\n\n\n this.getScaledPath = function getScaledPath(pathId, param) {\n var rawPath = this.pathMap[pathId]; // positioning\n // compute the start point of the path\n\n var mx, my;\n\n if (param.abspos) {\n mx = param.abspos.x;\n my = param.abspos.y;\n } else {\n mx = param.containerWidth * param.position.mx;\n my = param.containerHeight * param.position.my;\n }\n\n var coordinates = {}; // map for the scaled coordinates\n\n if (param.position) {\n // path\n var heightRatio = param.containerHeight / rawPath.height * param.yScaleFactor;\n var widthRatio = param.containerWidth / rawPath.width * param.xScaleFactor; // Apply height ratio\n\n for (var heightIndex = 0; heightIndex < rawPath.heightElements.length; heightIndex++) {\n coordinates['y' + heightIndex] = rawPath.heightElements[heightIndex] * heightRatio;\n } // Apply width ratio\n\n\n for (var widthIndex = 0; widthIndex < rawPath.widthElements.length; widthIndex++) {\n coordinates['x' + widthIndex] = rawPath.widthElements[widthIndex] * widthRatio;\n }\n } // Apply value to raw path\n\n\n var path = format(rawPath.d, {\n mx: mx,\n my: my,\n e: coordinates\n });\n return path;\n };\n} // helpers //////////////////////", "title": "" }, { "docid": "c652f66691a12a8b382211c5107f7a29", "score": "0.5343398", "text": "defineGeometry() {\n // return a list of geometry objects to render\n return [];\n }", "title": "" }, { "docid": "92464c1400eed2918919c918c2d3f3e4", "score": "0.5333809", "text": "handleBoundaries() {\n //at the edges at 0, constrain from the size of the character/2\n //and at edges right and down, only with size because it looks\n //better\n if (state === \"Forest\") {\n this.x = constrain(this.x, 0 + this.charOff, this.endForestX);\n this.y = constrain(this.y, 0 + this.charOff, this.endForestY);\n } else {\n this.x = constrain(this.x, 0 + this.charOff, width - this.size);\n this.y = constrain(this.y, 0 + this.charOff, height - this.size);\n }\n }", "title": "" }, { "docid": "42acb5bc8d3648781ba60d1c06234b52", "score": "0.53326666", "text": "function processData(data){\n const formattedData = [] /* this array will eventually be populated with the contents of the spreadsheet's rows */\n const rows = data.feed.entry // this is the weird Google Sheet API format we will be removing\n // we start a for..of.. loop here \n for(const row of rows) { \n const formattedRow = {}\n for(const key in row) {\n // time to get rid of the weird gsx$ format...\n if(key.startsWith(\"gsx$\")) {\n formattedRow[key.replace(\"gsx$\", \"\")] = row[key].$t\n }\n }\n // add the clean data\n formattedData.push(formattedRow)\n }\n\n //create object and send to global array\n formattedData.forEach(createObject)\n\n // step 1: turn allPoints into a turf.js featureCollection\n thePoints = turf.featureCollection(allPoints)\n\n // step 2: run the spatial analysis\n getBoundary(boundaryLayer)\n}", "title": "" }, { "docid": "f7523563ad2381b775928139ab796994", "score": "0.5315968", "text": "function createTopology(raiseOnLoaded) {\n //declare needed variables\n let tooltipContent = '',\n labelFormat = '',\n labelValue = '',\n codeValue = '';\n\n //fill topology\n d3.json(folderPath + mapToRender + '.json', function (error, data) {\n //set current map\n renderedMap = mapToRender;\n\n //create topology data\n let topoData = topojson.feature(data, data.objects[mapToRender + '.geo']).features,\n bgData = mapType == 3 ? topojson.feature(data, data.objects['SC_' + mapToRender.substring(6, 8) + '.geo']).features : [];\n\n //merge background and map shapes\n topoData = bgData.concat(topoData);\n\n //create object for scaling and translating\n let objGeo = topojson.feature(data, {\n type: \"GeometryCollection\",\n geometries: data.objects[mapToRender + '.geo'].geometries\n });\n //set scale and translate of the projection\n projection.fitExtent([[0, 0], [map.plot.width, map.plot.height]], objGeo);\n\n //create path\n path = d3.geoPath().projection(projection);\n\n //build paths\n paths = pathG.append('g').selectAll('path')\n .data(topoData)\n .enter().append('path')\n .attr('stroke', 'rgb(255,255,255)')\n .attr('stroke-width', 0.5)\n .attr('width', map.plot.width)\n .attr('height', map.plot.width / 2)\n .on('mousemove', function (d, i) {\n //check whether tooltip enabled\n if (map.tooltip.format !== '') {\n //set default tooltip content\n tooltipContent = \"no data available\";\n //check whether current data exists\n if (d.currentData) {\n //get values from shape\n codeValue = mapName.length === 3 ? d.properties.postal : d.properties.iso_a2;\n labelValue = d.properties.name;\n\n //check whether the current data has iso_a3\n if (d.properties.iso_a3 !== null) {\n //check if iso_a3 = STP\n if (d.properties.iso_a3 === 'STP')\n labelValue = 'Sao Tome and Principe';\n else if (d.properties.iso_a3 === 'CIV')\n labelValue = 'Cote dIvoire';\n else if (d.properties.iso_a3 === 'BLM')\n labelValue = 'St-Barthelemy';\n else if (d.properties.iso_a3 === 'CUW')\n labelValue = 'Curacao';\n }\n //set tooltip content\n tooltipContent = map.tooltip.format.replaceAll('{code}', codeValue).replaceAll('{label}', labelValue);\n tooltipContent = map.getContent(d.currentData, map.series[0], tooltipContent);\n }\n //show tooltip\n map.showTooltip(tooltipContent);\n }\n })\n .on('mouseout', function (d) {\n //hide tooltip\n map.hideTooltip();\n });\n\n //check if labels are enabled\n //if (map.series[0].labelsEnabled && map.series[0].labelFormat !== '') {\n if (map.series[0].labelFormat !== '') {\n if (labelData) {\n for (let j = 0; j < topoData.length; j++) {\n for (let k = 0; k < labelData.length; k++) {\n if (topoData[j].properties.iso_a3 === labelData[k].properties.iso_a3) {\n topoData[j].properties.coordinates = labelData[k].geometry.coordinates;\n break;\n }\n }\n }\n }\n //create labels\n labels = pathG.append('g').selectAll('text')\n .data(topoData)\n .enter().append('text')\n .style(\"text-anchor\", \"middle\")\n .style('font-family', map.series[0].labelFontFamily)\n .style('font-style', map.series[0].labelFontStyle === 'bold' ? 'normal' : map.series[0].labelFontStyle)\n .style('font-weight', map.series[0].labelFontStyle === 'bold' ? 'bold' : 'normal')\n .attr(\"dy\", \".35em\")\n .on('mousemove', function (d, i) {\n //check whether tooltip enabled\n if (map.tooltip.format !== '') {\n //set default tooltip content\n tooltipContent = \"no data available\";\n //check whether current data exists\n if (d.currentData) {\n //get values from shape\n codeValue = mapName.length === 3 ? d.properties.postal : d.properties.iso_a2;\n labelValue = d.properties.name;\n\n //check whether the current data has iso_a3\n if (d.properties.iso_a3 !== null) {\n //check if iso_a3 = STP\n if (d.properties.iso_a3 === 'STP')\n labelValue = 'Sao Tome and Principe';\n else if (d.properties.iso_a3 === 'CIV')\n labelValue = 'Cote dIvoire';\n else if (d.properties.iso_a3 === 'BLM')\n labelValue = 'St-Barthelemy';\n else if (d.properties.iso_a3 === 'CUW')\n labelValue = 'Curacao';\n }\n //set tooltip content\n tooltipContent = map.tooltip.format.replaceAll('{code}', codeValue).replaceAll('{label}', labelValue);\n tooltipContent = map.getContent(d.currentData, map.series[0], tooltipContent);\n }\n //show tooltip\n map.showTooltip(tooltipContent);\n }\n })\n .on('mouseout', function (d) {\n //hide tooltip\n map.hideTooltip();\n });\n }\n\n //create zoom with defaults\n zoom = d3.zoom()\n .scaleExtent([projection.scale(), 8 * projection.scale()])\n .on(\"zoom\", zoomed);\n\n //append zoom\n pathG\n .call(zoom)\n .call(zoom.transform, d3.zoomIdentity\n .translate(projection.translate()[0], projection.translate()[1])\n .scale(projection.scale()));\n\n if (raiseOnLoaded) {\n //raise on loaded\n if (map.onLoaded) map.onLoaded();\n }\n\n //animate paths\n animatePaths();\n });\n }", "title": "" }, { "docid": "0117245dec6c10012418fc3abddeb070", "score": "0.53043395", "text": "function model_2_virtual_svg_path()\n {\n var step = xRange / xPointsNum;\n var svgp = '';\n var svgLowPath = [];\n var svgTopPath = [];\n var modelLowPath = [];\n\n var pathBack = '';\n\n var maxPath = '';\n var minPath = '';\n var absPath = '';\n var yNeighbourhoodMax = '';\n var yNeighbourhoodMin = '';\n\n var maxCur;\n var minCur;\n var absCur; \n for( var ix = 0; ix < xPointsNum; ix++ ) {\n var point = buldPoint( ix );\n var x = point[0];\n var yl = point[1];\n var yt = point[2];\n xArray[ix] = x;\n\n //.finds variation aground lim,\n //.secures the case that point1/point2 can be low/top or top/low\n var yyMax = Math.max( 0, Math.max( point[1], point[2] )-lim );\n var yyMin = Math.min( 0, Math.min( point[1], point[2] )-lim );\n\n if( ix === 0 || maxCur < yyMax ) {\n maxCur = yyMax;\n }\n if( ix === 0 || minCur > yyMin ) {\n minCur = yyMin;\n }\n //.gets abs value of variation\n var yyAbs = Math.max( Math.abs(maxCur), Math.abs(minCur) );\n if( ix === 0 || absCur < yyAbs ) {\n absCur = yyAbs;\n }\n //.stores max variation and min variation and abs variation\n yMax[ix] = maxCur;\n yMin[ix] = minCur;\n yAbsMax[ix] = absCur;\n\n modelLowPath[ix] = [x,yl];\n svgLowPath[ix] = xy2media(x,yl);\n svgTopPath[ix] = xy2media(x,yt);\n //.draws lower boundary of the set-function\n svgp += ' ' + xy2media(x,point[1]);\n //.draws upper boundary of the set-function\n pathBack = xy2media(x,point[2]) + ' ' + pathBack;\n\n //.draws variations in respect to real svg offsets\n //.should usually duplicate pathBack\n maxPath += ' ' + xy2media(x,yMax[ix]+lim);\n //.should usually duplicate svgp\n minPath += ' ' + xy2media(x,yMin[ix]+lim);\n //.draws pure abs-variation in respect to svg offsets\n absPath += ' ' + xy2media(x,yAbsMax[ix]);\n\n //.draws y-neighbourhoods boundaries\n yNeighbourhoodMax += ' ' + xy2media(x,lim + yAbsMax[ix]);\n yNeighbourhoodMin += ' ' + xy2media(x,lim - yAbsMax[ix]);\n }\n\n svgp += ' ' + pathBack;\n return {\n //.closed full graph of the set-function\n graph:svgp,\n\n max:maxPath, min:minPath, abs:absPath,\n\n //.y-neighbourhoods boundaries\n yNeighbourhoodMax:yNeighbourhoodMax, yNeighbourhoodMin:yNeighbourhoodMin,\n upperVariation : yMax,\n lowerVariation : yMin,\n absVariation : yAbsMax,\n xArray : xArray,\n svgLowPath : svgLowPath,\n svgTopPath : svgTopPath,\n modelLowPath : modelLowPath\n };\n\n function buldPoint( ix )\n {\n var x = xStart + step * ix;\n var y = lowBoundary( x*xScale );\n var yt = topBoundary( x*xScale );\n return [x,y,yt];\n }\n }", "title": "" }, { "docid": "93c828e5695f678730e854e00e97b810", "score": "0.52862465", "text": "function GeometryParser() { }", "title": "" }, { "docid": "6a7abe622bc4c9d47f70201202925331", "score": "0.528262", "text": "function onFormerData(dataset)\n\t{\n\t\tif(dataset.length > 0)\n\t\t{\n\t\t\tif(balloonInitialized == false)\n\t\t\t{\n\t\t\t\tballoon.setPosition(new google.maps.LatLng(dataset[dataset.length - 1].lat, dataset[dataset.length - 1].lon));\n\t\t\t\tmap.panTo(new google.maps.LatLng(dataset[dataset.length - 1].lat, dataset[dataset.length - 1].lon));\n\t\t\t\t\n\t\t\t\tballoonInitialized = true;\n\t\t\t}\n\t\t\n\t\t\t//Add former Points to Polygonline\n\t\t\n\t\t\tfor (var i = dataset.length - 1; i > 0 ; i--) \n\t\t\t{\n\t\t\t\tflightPath.getPath().insertAt(0, new google.maps.LatLng(dataset[i].lat, dataset[i].lon));\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "cccf94a18cd2ebd4d87df7440592754d", "score": "0.5280183", "text": "getPath() {\n return this.state[POLYGON].getPath()\n }", "title": "" }, { "docid": "2cb8fe9e388f33fae32297102161461d", "score": "0.5268564", "text": "function parseGeometry(data, startIndex, endIndex) {\n switch (data.type) {\n case 'Point':\n return pointToGeoJson(data, startIndex, endIndex);\n case 'LineString':\n return lineStringToGeoJson(data, startIndex, endIndex);\n case 'Polygon':\n return polygonToGeoJson(data, startIndex, endIndex);\n default:\n throw new Error(`Unsupported geometry type: ${data.type}`);\n }\n}", "title": "" }, { "docid": "f340a2915e05298e05369ebd83bcc345", "score": "0.52581626", "text": "function geometry() {\n\nnode_links = d3_geom_voronoi.links(pts);\nlink_geometry = [];\n\nconsole.log('geometry')\nfor (var i=0; i<node_links.length; i++) {\n\t\n\td = node_links[i];\n\t\n\tdist = Math.sqrt(Math.pow(d.source.x - d.target.x,2) + Math.pow(d.source.y - d.target.y,2));\n\tslp = (d.source.z - d.target.z) / dist;\n\twslp = (d.source.stage - d.target.stage) / dist;\n\t\n\tif (d.source.y == d.target.y) { w_ = dx; } else { w_ = Math.sqrt(dx*dx / 2); }\n\t\n\tmd = (d.source.depth + d.target.depth) / 2;\n\tif (md<0) { md = 0;};\n\tv_ = mannings(md, wslp);\n\t\n\tQ = md * w_ * v_ * Math.sign(wslp);\n\t\n// \tconsole.log(md,v_, wslp)\n\n\tlink_geometry.push({distance: dist,\n\t\t\t\t\t\tbed_slope: slp,\n\t\t\t\t\t\twater_slope: wslp,\n\t\t\t\t\t\twidth: w_,\n\t\t\t\t\t\tmid_depth: md,\n\t\t\t\t\t\tvelocity: v_,\n\t\t\t\t\t\tdischarge: Q});\n}\n\nfunction mannings(depth,slope) {\n\tn = 0.03;\n\tif (depth>0) {\n\t\tvelocity = (1/n) * Math.pow(depth, 2/3) * Math.pow(Math.abs(slope),1/2);\n\t} else {\n\tvelocity = 0;\n\t}\n\treturn velocity\n}\n\n\n}", "title": "" }, { "docid": "c0803808b26feb86994d637097e94e1a", "score": "0.5224403", "text": "function GeometryParser() {}", "title": "" }, { "docid": "c0803808b26feb86994d637097e94e1a", "score": "0.5224403", "text": "function GeometryParser() {}", "title": "" }, { "docid": "c0803808b26feb86994d637097e94e1a", "score": "0.5224403", "text": "function GeometryParser() {}", "title": "" }, { "docid": "074422b30c643a1388b90893ed95ccc3", "score": "0.5221923", "text": "_arrangeData() {\n\n this._shapeData = {\n type: this._tempResult.type,\n vertices: this._tempResult.vertices,\n normals: this._tempResult.normals,\n colors: this._tempResult.colors,\n surfaceProperties: this._tempResult.surfaceProperties,\n split: this._tempResult.split,\n error: this._tempResult.error,\n errorMessage: this._tempResult.errorMessage\n };\n\n var transfer = [\n this._shapeData.vertices.buffer,\n this._shapeData.colors.buffer\n ];\n\n if (this._shapeData.normals) {\n transfer.push(this._shapeData.normals.buffer);\n }\n\n if (this._shapeData.split) {\n this._shapeData.shapes = [\n { indices: this._tempResult.left.indices },\n { indices: this._tempResult.right.indices }\n ];\n\n transfer.push(\n this._tempResult.left.indices.buffer,\n this._tempResult.right.indices.buffer\n );\n } else {\n this._shapeData.shapes = [\n { indices: this._tempResult.indices }\n ];\n transfer.push(\n this._tempResult.indices.buffer\n );\n }\n\n // unroll colors if necessary\n if(this._shapeData.colors.length === 4) {\n this._unrollColors();\n }\n }", "title": "" }, { "docid": "752ef01dd877aa6891d3e81bf83b1495", "score": "0.5219963", "text": "function PathImporter(opts, reservedPoints) {\nopts = opts || {};\n\nvar bufSize = reservedPoints > 0 ? reservedPoints : 20000,\n xx = new Float64Array(bufSize),\n yy = new Float64Array(bufSize),\n buf = new Float64Array(1024),\n shapes = [],\n nn = [],\n collectionType = null,\n round = null,\n pathId = -1,\n shapeId = -1,\n pointId = 0,\n dupeCount = 0,\n skippedPathCount = 0;\n\nif (opts.precision) {\nround = getRoundingFunction(opts.precision);\n}\n\nfunction addShapeType(t) {\nif (!collectionType) {\n collectionType = t;\n} else if (t != collectionType) {\n collectionType = \"mixed\";\n}\n}\n\nfunction checkBuffers(needed) {\nif (needed > xx.length) {\n var newLen = Math.max(needed, Math.ceil(xx.length * 1.5));\n xx = MapShaper.extendBuffer(xx, newLen, pointId);\n yy = MapShaper.extendBuffer(yy, newLen, pointId);\n}\n}\n\nfunction getPointBuf(n) {\nvar len = n * 2;\nif (buf.length < len) {\n buf = new Float64Array(Math.ceil(len * 1.3));\n}\nreturn buf;\n}\n\nthis.startShape = function() {\nshapes[++shapeId] = null;\n};\n\nfunction appendToShape(part) {\nvar currShape = shapes[shapeId] || (shapes[shapeId] = []);\ncurrShape.push(part);\n}\n\nfunction appendPath(n, type) {\naddShapeType(type);\npathId++;\nnn[pathId] = n;\nappendToShape([pathId]);\n}\n\nfunction roundPoints(points, round) {\npoints.forEach(function(p) {\n p[0] = round(p[0]);\n p[1] = round(p[1]);\n});\n}\n\n// Import coordinates from an array with coordinates in format: [x, y, x, y, ...]\n//\nthis.importPathFromFlatArray = function(arr, type, len, start) {\nvar i = start || 0,\n end = i + len,\n n = 0,\n x, y, prevX, prevY;\n\ncheckBuffers(pointId + len);\nwhile (i < end) {\n x = arr[i++];\n y = arr[i++];\n if (round) {\n x = round(x);\n y = round(y);\n }\n if (i > 0 && x == prevX && y == prevY) {\n dupeCount++;\n } else {\n xx[pointId] = x;\n yy[pointId] = y;\n pointId++;\n n++;\n }\n prevY = y;\n prevX = x;\n}\n\nappendPath(n, type);\n\n};\n\n// Import an array of [x, y] Points\n//\nthis.importPath = function(points, type) {\nvar n = points.length,\n buf = getPointBuf(n),\n j = 0;\nfor (var i=0; i < n; i++) {\n buf[j++] = points[i][0];\n buf[j++] = points[i][1];\n}\nthis.importPathFromFlatArray(buf, type, j, 0);\n};\n\nthis.importPoints = function(points) {\naddShapeType('point');\nif (round) {\n roundPoints(points, round);\n}\npoints.forEach(appendToShape);\n};\n\nthis.importLine = function(points) {\nthis.importPath(points, 'polyline');\n};\n\nthis.importPolygon = function(points, isHole) {\nvar area = geom.getPlanarPathArea2(points);\n\nif (isHole === true && area > 0 || isHole === false && area < 0) {\n verbose(\"Warning: reversing\", isHole ? \"a CW hole\" : \"a CCW ring\");\n points.reverse();\n}\nthis.importPath(points, 'polygon');\n};\n\n// Return topological shape data\n// Apply any requested snapping and rounding\n// Remove duplicate points, check for ring inversions\n//\nthis.done = function() {\nvar arcs;\n\n// possible values: polygon, polyline, point, mixed, null\nif (collectionType == 'mixed') {\n stop(\"[PathImporter] Mixed feature types are not allowed\");\n} else if (collectionType == 'polygon' || collectionType == 'polyline') {\n\n if (dupeCount > 0) {\n verbose(utils.format(\"Removed %,d duplicate point%s\", dupeCount, utils.pluralSuffix(dupeCount)));\n }\n if (skippedPathCount > 0) {\n // TODO: consider showing details about type of error\n message(utils.format(\"Removed %,d path%s with defective geometry\", skippedPathCount, utils.pluralSuffix(skippedPathCount)));\n }\n\n if (pointId > 0) {\n if (pointId < xx.length) {\n xx = xx.subarray(0, pointId);\n yy = yy.subarray(0, pointId);\n }\n arcs = new ArcCollection(nn, xx, yy);\n\n // TODO: move shape validation after snapping (which may corrupt shapes)\n if (opts.auto_snap || opts.snap_interval) {\n T.start();\n MapShaper.snapCoords(arcs, opts.snap_interval);\n T.stop(\"Snapping points\");\n }\n MapShaper.cleanShapes(shapes, arcs, collectionType);\n } else {\n message(\"No geometries were imported\");\n collectionType = null;\n }\n} else if (collectionType == 'point' || collectionType === null) {\n // pass\n} else {\n error(\"Unexpected collection type:\", collectionType);\n}\n\n// TODO: remove empty arcs, collapsed arcs\n// ...\n\nreturn {\n arcs: arcs || null,\n info: {},\n layers: [{\n name: '',\n geometry_type: collectionType,\n shapes: shapes\n }]\n};\n};\n}", "title": "" }, { "docid": "4edc1096ff5f7ab46d6d9791b3372426", "score": "0.5211774", "text": "triangulate ( bound, isReal ) {\n\n if(bound.length < 2) {\n Log(\"BREAK ! the hole has less than 2 edges\");\n return;\n // if the hole is a 2 edges polygon, we have a big problem\n } else if(bound.length === 2) {\n Log(\"BREAK ! the hole has only 2 edges\");\n // DDLS.Debug.trace(\" - edge0: \" + bound[0].originVertex.id + \" -> \" + bound[0].destinationVertex.id,{ fileName : \"Mesh.hx\", lineNumber : 1404, className : \"DDLS.Mesh\", methodName : \"triangulate\"});\n // DDLS.Debug.trace(\" - edge1: \" + bound[1].originVertex.id + \" -> \" + bound[1].destinationVertex.id,{ fileName : \"Mesh.hx\", lineNumber : 1405, className : \"DDLS.Mesh\", methodName : \"triangulate\"});\n return;\n // if the hole is a 3 edges polygon:\n } else if(bound.length === 3) {\n\n let f = new Face();\n f.setDatas(bound[0], isReal);\n this._faces.push(f);\n bound[0].leftFace = f;\n bound[1].leftFace = f;\n bound[2].leftFace = f;\n bound[0].nextLeftEdge = bound[1];\n bound[1].nextLeftEdge = bound[2];\n bound[2].nextLeftEdge = bound[0];\n // if more than 3 edges, we process recursively:\n } else {\n let baseEdge = bound[0];\n let vertexA = baseEdge.originVertex;\n let vertexB = baseEdge.destinationVertex;\n let vertexC;\n let vertexCheck;\n let circumcenter = new Point();\n let radiusSquared = 0;\n let distanceSquared = 0;\n let isDelaunay = false;\n let index = 0;\n let _g1 = 2;\n let _g = bound.length;\n while(_g1 < _g) {\n let i1 = _g1++;\n vertexC = bound[i1].originVertex;\n if(Geom2D.getRelativePosition2(vertexC.pos,baseEdge) == 1) {\n index = i1;\n isDelaunay = true;\n //DDLS.Geom2D.getCircumcenter(vertexA.pos.x,vertexA.pos.y,vertexB.pos.x,vertexB.pos.y,vertexC.pos.x,vertexC.pos.y,circumcenter);\n Geom2D.getCircumcenter(vertexA.pos, vertexB.pos, vertexC.pos, circumcenter);\n radiusSquared = Squared(vertexA.pos.x - circumcenter.x, vertexA.pos.y - circumcenter.y);\n // for perfect regular n-sides polygons, checking strict delaunay circumcircle condition is not possible, so we substract EPSILON to circumcircle radius:\n radiusSquared -= EPSILON_SQUARED;\n let _g3 = 2;\n let _g2 = bound.length;\n while(_g3 < _g2) {\n let j = _g3++;\n if(j != i1) {\n vertexCheck = bound[j].originVertex;\n distanceSquared = Squared(vertexCheck.pos.x - circumcenter.x, vertexCheck.pos.y - circumcenter.y);\n if(distanceSquared < radiusSquared) {\n isDelaunay = false;\n break;\n }\n }\n }\n if(isDelaunay) break;\n }\n }\n \n if(!isDelaunay) {\n // for perfect regular n-sides polygons, checking delaunay circumcircle condition is not possible\n Log(\"NO DELAUNAY FOUND\");\n /*let s = \"\";\n let _g11 = 0;\n let _g4 = bound.length;\n while(_g11 < _g4) {\n let i2 = _g11++;\n s += bound[i2].originVertex.pos.x + \" , \";\n s += bound[i2].originVertex.pos.y + \" , \";\n s += bound[i2].destinationVertex.pos.x + \" , \";\n s += bound[i2].destinationVertex.pos.y + \" , \";\n }*/\n index = 2;\n }\n\n let edgeA, edgeAopp, edgeB, edgeBopp, boundA, boundB, boundM = [];\n\n if(index < (bound.length - 1)) {\n edgeA = new Edge();\n edgeAopp = new Edge();\n this._edges.push( edgeA, edgeAopp );\n //this._edges.push(edgeAopp);\n edgeA.setDatas(vertexA,edgeAopp,null,null,isReal,false);\n edgeAopp.setDatas(bound[index].originVertex,edgeA,null,null,isReal,false);\n boundA = bound.slice(index);\n boundA.push(edgeA);\n this.triangulate(boundA,isReal);\n }\n if(index > 2) {\n edgeB = new Edge();\n edgeBopp = new Edge();\n this._edges.push(edgeB, edgeBopp);\n //this._edges.push(edgeBopp);\n edgeB.setDatas(bound[1].originVertex,edgeBopp,null,null,isReal,false);\n edgeBopp.setDatas(bound[index].originVertex,edgeB,null,null,isReal,false);\n boundB = bound.slice(1,index);\n boundB.push(edgeBopp);\n this.triangulate(boundB,isReal);\n }\n \n if( index === 2 ) boundM.push( baseEdge, bound[1], edgeAopp ); \n else if( index === (bound.length - 1) ) boundM.push(baseEdge, edgeB, bound[index]); \n else boundM.push(baseEdge, edgeB, edgeAopp );\n \n this.triangulate( boundM, isReal );\n\n }\n\n // test\n //this.deDuplicEdge();\n\n }", "title": "" }, { "docid": "bc1dbf81dfe18150020ff860a4ecd87f", "score": "0.5200454", "text": "onMouseUp(event) {\n //this.ifInside(event.point);\n //var segmentCount = this.path.segments.length;\n if (this.ifIn) {\n // When the mouse is released, simplify it:\n if (this.drawing) {\n this.path.closed = true;\n this.path.simplify(10);\n\n for (let i = 0; i < this.multiPaths.length; i++) {\n if (this.multiPaths[i].selected) {\n //let tempCurve = this.multiPaths[i].subtract(this.path);\n //let tempCurve2 = this.multiPaths[i].intersect(this.path);\n //var copy = tempCurve.clone();\n //var copy2 = tempCurve2.clone();\n //copy.position.x += 0;\n //copy.fillColor = Color.random();\n\n //copy2.position.x += 0;\n //copy2.fillColor = \"blue\";\n this.multiPaths2.push(this.multiPaths[i].subtract(this.path));\n this.multiPaths2.push(this.multiPaths[i].intersect(this.path));\n this.multiPaths[i].remove();\n } else {\n //var copy3 = this.multiPaths[i].clone();\n //copy3.position.x += 0;\n //copy3.fillColor = Color.random();\n this.multiPaths2.push(this.multiPaths[i].clone());\n //this.multiPaths2.push(this.multiPaths[i]);\n //alert(this.multiPaths2.length);\n this.multiPaths[i].remove();\n }\n }\n\n //this.multiPaths2.length = 0;\n\n /* for (let i = 0; i < this.multiPaths.length; i++) {\n this.multiPaths[i].remove();\n\n } */\n\n this.multiPaths.length = 0;\n //this.multiPaths[0].scale(0);\n //this.multiPaths = this.multiPaths2;\n\n\n for (let j = 0; j < this.multiPaths2.length; j++) {\n //this.multiPaths2.push(this.multiPaths[i].divide(this.path));\n //this.multiPaths2[j].fillColor = Color.random();\n //var copy4=this.multiPaths2[j].clone();\n this.multiPaths.push(this.multiPaths2[j].clone());\n //\n //alert(i);\n }\n\n for (let j = 0; j < this.multiPaths2.length; j++) {\n this.multiPaths2[j].selected = false;\n this.multiPaths2[j].remove();\n }\n\n this.multiPaths2.length = 0;\n\n for (let i = 0; i < this.multiPaths.length; i++) {\n //this.multiPaths[i].fillColor = \"pink\";\n this.multiPaths[i].selected = false;\n this.multiPaths[i].fillColor = Color.random();\n //alert(i);\n }\n\n this.path.remove();\n\n //alert(this.multiPaths.length);\n }\n }\n }", "title": "" }, { "docid": "a57c6b1ca26219ec44bbb9130a42120a", "score": "0.5199694", "text": "function createPathProxyFromString(data) {\n if (!data) {\n return new PathProxy_1();\n } // var data = data.replace(/-/g, ' -')\n // .replace(/ /g, ' ')\n // .replace(/ /g, ',')\n // .replace(/,,/g, ',');\n // var n;\n // create pipes so that we can split the data\n // for (n = 0; n < cc.length; n++) {\n // cs = cs.replace(new RegExp(cc[n], 'g'), '|' + cc[n]);\n // }\n // data = data.replace(/-/g, ',-');\n // create array\n // var arr = cs.split('|');\n // init context point\n\n\n var cpx = 0;\n var cpy = 0;\n var subpathX = cpx;\n var subpathY = cpy;\n var prevCmd;\n var path = new PathProxy_1();\n var CMD = PathProxy_1.CMD; // commandReg.lastIndex = 0;\n // var cmdResult;\n // while ((cmdResult = commandReg.exec(data)) != null) {\n // var cmdStr = cmdResult[1];\n // var cmdContent = cmdResult[2];\n\n var cmdList = data.match(commandReg);\n\n for (var l = 0; l < cmdList.length; l++) {\n var cmdText = cmdList[l];\n var cmdStr = cmdText.charAt(0);\n var cmd; // String#split is faster a little bit than String#replace or RegExp#exec.\n // var p = cmdContent.split(valueSplitReg);\n // var pLen = 0;\n // for (var i = 0; i < p.length; i++) {\n // // '' and other invalid str => NaN\n // var val = parseFloat(p[i]);\n // !isNaN(val) && (p[pLen++] = val);\n // }\n\n var p = cmdText.match(numberReg) || [];\n var pLen = p.length;\n\n for (var i = 0; i < pLen; i++) {\n p[i] = parseFloat(p[i]);\n }\n\n var off = 0;\n\n while (off < pLen) {\n var ctlPtx;\n var ctlPty;\n var rx;\n var ry;\n var psi;\n var fa;\n var fs;\n var x1 = cpx;\n var y1 = cpy; // convert l, H, h, V, and v to L\n\n switch (cmdStr) {\n case 'l':\n cpx += p[off++];\n cpy += p[off++];\n cmd = CMD.L;\n path.addData(cmd, cpx, cpy);\n break;\n\n case 'L':\n cpx = p[off++];\n cpy = p[off++];\n cmd = CMD.L;\n path.addData(cmd, cpx, cpy);\n break;\n\n case 'm':\n cpx += p[off++];\n cpy += p[off++];\n cmd = CMD.M;\n path.addData(cmd, cpx, cpy);\n subpathX = cpx;\n subpathY = cpy;\n cmdStr = 'l';\n break;\n\n case 'M':\n cpx = p[off++];\n cpy = p[off++];\n cmd = CMD.M;\n path.addData(cmd, cpx, cpy);\n subpathX = cpx;\n subpathY = cpy;\n cmdStr = 'L';\n break;\n\n case 'h':\n cpx += p[off++];\n cmd = CMD.L;\n path.addData(cmd, cpx, cpy);\n break;\n\n case 'H':\n cpx = p[off++];\n cmd = CMD.L;\n path.addData(cmd, cpx, cpy);\n break;\n\n case 'v':\n cpy += p[off++];\n cmd = CMD.L;\n path.addData(cmd, cpx, cpy);\n break;\n\n case 'V':\n cpy = p[off++];\n cmd = CMD.L;\n path.addData(cmd, cpx, cpy);\n break;\n\n case 'C':\n cmd = CMD.C;\n path.addData(cmd, p[off++], p[off++], p[off++], p[off++], p[off++], p[off++]);\n cpx = p[off - 2];\n cpy = p[off - 1];\n break;\n\n case 'c':\n cmd = CMD.C;\n path.addData(cmd, p[off++] + cpx, p[off++] + cpy, p[off++] + cpx, p[off++] + cpy, p[off++] + cpx, p[off++] + cpy);\n cpx += p[off - 2];\n cpy += p[off - 1];\n break;\n\n case 'S':\n ctlPtx = cpx;\n ctlPty = cpy;\n var len = path.len();\n var pathData = path.data;\n\n if (prevCmd === CMD.C) {\n ctlPtx += cpx - pathData[len - 4];\n ctlPty += cpy - pathData[len - 3];\n }\n\n cmd = CMD.C;\n x1 = p[off++];\n y1 = p[off++];\n cpx = p[off++];\n cpy = p[off++];\n path.addData(cmd, ctlPtx, ctlPty, x1, y1, cpx, cpy);\n break;\n\n case 's':\n ctlPtx = cpx;\n ctlPty = cpy;\n var len = path.len();\n var pathData = path.data;\n\n if (prevCmd === CMD.C) {\n ctlPtx += cpx - pathData[len - 4];\n ctlPty += cpy - pathData[len - 3];\n }\n\n cmd = CMD.C;\n x1 = cpx + p[off++];\n y1 = cpy + p[off++];\n cpx += p[off++];\n cpy += p[off++];\n path.addData(cmd, ctlPtx, ctlPty, x1, y1, cpx, cpy);\n break;\n\n case 'Q':\n x1 = p[off++];\n y1 = p[off++];\n cpx = p[off++];\n cpy = p[off++];\n cmd = CMD.Q;\n path.addData(cmd, x1, y1, cpx, cpy);\n break;\n\n case 'q':\n x1 = p[off++] + cpx;\n y1 = p[off++] + cpy;\n cpx += p[off++];\n cpy += p[off++];\n cmd = CMD.Q;\n path.addData(cmd, x1, y1, cpx, cpy);\n break;\n\n case 'T':\n ctlPtx = cpx;\n ctlPty = cpy;\n var len = path.len();\n var pathData = path.data;\n\n if (prevCmd === CMD.Q) {\n ctlPtx += cpx - pathData[len - 4];\n ctlPty += cpy - pathData[len - 3];\n }\n\n cpx = p[off++];\n cpy = p[off++];\n cmd = CMD.Q;\n path.addData(cmd, ctlPtx, ctlPty, cpx, cpy);\n break;\n\n case 't':\n ctlPtx = cpx;\n ctlPty = cpy;\n var len = path.len();\n var pathData = path.data;\n\n if (prevCmd === CMD.Q) {\n ctlPtx += cpx - pathData[len - 4];\n ctlPty += cpy - pathData[len - 3];\n }\n\n cpx += p[off++];\n cpy += p[off++];\n cmd = CMD.Q;\n path.addData(cmd, ctlPtx, ctlPty, cpx, cpy);\n break;\n\n case 'A':\n rx = p[off++];\n ry = p[off++];\n psi = p[off++];\n fa = p[off++];\n fs = p[off++];\n x1 = cpx, y1 = cpy;\n cpx = p[off++];\n cpy = p[off++];\n cmd = CMD.A;\n processArc(x1, y1, cpx, cpy, fa, fs, rx, ry, psi, cmd, path);\n break;\n\n case 'a':\n rx = p[off++];\n ry = p[off++];\n psi = p[off++];\n fa = p[off++];\n fs = p[off++];\n x1 = cpx, y1 = cpy;\n cpx += p[off++];\n cpy += p[off++];\n cmd = CMD.A;\n processArc(x1, y1, cpx, cpy, fa, fs, rx, ry, psi, cmd, path);\n break;\n }\n }\n\n if (cmdStr === 'z' || cmdStr === 'Z') {\n cmd = CMD.Z;\n path.addData(cmd); // z may be in the middle of the path.\n\n cpx = subpathX;\n cpy = subpathY;\n }\n\n prevCmd = cmd;\n }\n\n path.toStatic();\n return path;\n} // TODO Optimize double memory cost problem", "title": "" }, { "docid": "f169e92fa8361e339b181383d481cb06", "score": "0.519063", "text": "function transform_routes(){\n // The d3 force edge bundling algorithm transforms and groups paths on a node-link graph so that readability is improved and overlap\n // reduced. It requires an input \"node_data\" dictionary defining the location of every node on the graph. Every field is an index \n // mapping to the x and y coordinate for a node.\n // It also requires an input \"edge_data\" array defining the links between nodes on the graph. \n // Every element is an object containing source and target information for drawing a link between. The values of the source and target \n // fields are the indexes used in node_data to identify x and y locations for a node. \n // airports_dict is a dictionary mapping airports to indexes. \n edge_data = [];\n attr_data = [];\n for(var i=0;i<data_routes_filt.length;i++){\n // Add elements to \"edge_data\" \n // Every element of data_routes_filt corresponds to a route between the airports specified in the \"airport_1\" and \"airport_2\"\n // fields (source and target respectively for \"edge_data\" array)\n // Identify the index in node_data for the source and the index in node_data for the target using airports_dict\n edge_data.push({\"source\":airports_dict[data_routes_filt[i].airport_1],\"target\":airports_dict[data_routes_filt[i].airport_2]});\n // Add elements to \"attr_data\"\n // \"attr_data\" contains a limited set of the attribute data from data_routes_filt for every element of \"edge_data\" \n attr_data.push({\"airport_1\":data_routes_filt[i].airport_1,\"airport_2\":data_routes_filt[i].airport_2,\"label\":data_routes_filt[i].label,\"percent_change_2018_2019\":data_routes_filt[i].percent_change_2018_2019});\n }\n // Set of all the indexes corresponding to nodes used in \"edge_data\" for sources and targets \n edge_data_set = new Set(edge_data.map(Object.values).flat())\n}", "title": "" }, { "docid": "c729df0261e5bdeaa53159eaa71de298", "score": "0.5178035", "text": "function reset() {\n var bounds = d3path.bounds(user2Points),\n topLeft = bounds[0],\n bottomRight = bounds[1];\n\n\n // here you're setting some styles, width, heigh etc\n // to the SVG. Note that we're adding a little height and\n // width because otherwise the bounding box would perfectly\n // cover our features BUT... since you might be using a big\n // circle to represent a 1 dimensional point, the circle\n // might get cut off.\n\n // text.attr(\"transform\",\n // function(d) {\n // return \"translate(\" +\n // applyLatLngToLayer(d).x + \",\" +\n // applyLatLngToLayer(d).y + \")\";\n // });\n\n\n // for the points we need to convert from latlong\n // to map units\n begend.attr(\"transform\",\n function(d) {\n return \"translate(\" +\n applyLatLngToLayer(d).x + \",\" +\n applyLatLngToLayer(d).y + \")\";\n });\n\n ptFeatures.attr(\"transform\",\n function(d) {\n return \"translate(\" +\n applyLatLngToLayer(d).x + \",\" +\n applyLatLngToLayer(d).y + \")\";\n });\n\n // again, not best practice, but I'm harding coding\n // the starting point\n\n marker.attr(\"transform\",\n function() {\n var y = featuresdata[0].geometry.coordinates[1]\n var x = featuresdata[0].geometry.coordinates[0]\n return \"translate(\" +\n map.latLngToLayerPoint(new L.LatLng(y, x)).x + \",\" +\n map.latLngToLayerPoint(new L.LatLng(y, x)).y + \")\";\n });\n\n\n // Setting the size and location of the overall SVG container\n svg2.attr(\"width\", bottomRight[0] - topLeft[0] + 120)\n .attr(\"height\", bottomRight[1] - topLeft[1] + 120)\n .style(\"left\", topLeft[0] - 50 + \"px\")\n .style(\"top\", topLeft[1] - 50 + \"px\");\n\n\n // linePath.attr(\"d\", d3path);\n linePath.attr(\"d\", toLine)\n // ptPath.attr(\"d\", d3path);\n g2.attr(\"transform\", \"translate(\" + (-topLeft[0] + 50) + \",\" + (-topLeft[1] + 50) + \")\");\n\n } // end reset", "title": "" }, { "docid": "6af5b97d7a4f14d76051bf6d93e0dabf", "score": "0.51683545", "text": "function ShapePath(){this.subPaths=[];this.currentPath=null;}", "title": "" }, { "docid": "234f26ad2d08a338469b35e740d9d754", "score": "0.51594484", "text": "function processMultiGeometry() {\n var subType = type.replace(Constants.geojsonTypes.MULTI_PREFIX, '');\n coordinates.forEach(function(subCoordinates, index) {\n var subFeature = {\n type: Constants.geojsonTypes.FEATURE,\n properties: geojson.properties,\n geometry: {\n type: subType,\n coordinates: subCoordinates\n }\n };\n supplementaryPoints = supplementaryPoints.concat(createSupplementaryPoints(subFeature, options, index));\n });\n }", "title": "" }, { "docid": "a531f3ad0580febd48fb89f14d017343", "score": "0.5159395", "text": "function initialize(){\n\n height100 = window.innerHeight\n width100 = window.innerWidth\n\n svg = d3.select(\"body\").append(\"svg\")\n .attr(\"id\", \"mapSVG\")\n .style({\"height\": height100, \"width\": width100, \"position\": \"absolute\"})\n \n //create map projection\n projection = d3.geo.albers()\n .center([2,38])\n .scale(height100*1.5)\n .translate([(width100)/2, (height100)/2]);\n\n function updateWindow(){\n x = window.innerWidth\n y = window.innerHeight\n svg.style({\"width\": x, \"height\": y});\n }\n window.onresize = updateWindow;\n\n var path = d3.geo.path()\n .projection(projection);\n\n u = svg.append(\"g\")\n b = svg.append(\"g\")\n\n queue()\n .defer(d3.json, \"na.json\")\n .defer(d3.json, \"urbanAreas.json\")\n .await(callback);\n\n function callback(error, na, urb){\n svg.call(zoom);\n\n b.selectAll('path')\n .data(topojson.feature(urb, urb.objects.urbs).features)\n .enter().append(\"path\")\n .attr(\"d\", path)\n .attr(\"class\", \"borders\")\n .attr(\"id\", function (d){\n var c = path.centroid(d)\n coords[d.properties.AFFGEOID10] = c\n return d.properties.AFFGEOID10\n })\n\n\n u.selectAll(\"path\")\n .data(topojson.feature(na, na.objects.na).features)\n .enter().append(\"path\")\n .attr(\"d\", path)\n .attr(\"class\", function (d){\n return d.properties.gu_a3\n })\n .attr(\"id\", function (d){\n return d.properties.postal\n })\n setData(); \n };\n \n}", "title": "" }, { "docid": "29527b8562badbcb9865b77da33ab5b8", "score": "0.51566994", "text": "convertPathToHolesInConvention(path){\n return path.map(point => ({\n X: point.X !== undefined ? point.X: point.x,\n Y: point.Y !== undefined ? point.Y: point.y,\n }));\n }", "title": "" }, { "docid": "c1e37a1e20c7cf69ed2ecf9dea825df5", "score": "0.51440465", "text": "function getBoundary(layer){\n fetch(layer)\n .then(response => {\n return response.json();\n })\n .then(boundary =>{\n // set the boundary to data\n // run the turf collect geoprocessing\n collected = turf.collect(boundary, thePoints, 'thisData', 'values'); \n // here is the geoJson of the `collected` result:\n L.geoJson(collected,{onEachFeature: onEachFeature,style:function(feature){\n if (feature.properties.values.length > 0) {\n return {color: \"orange\",stroke: true};\n }\n else{// make the polygon gray and blend in with basemap if it doesn't have any values\n return{opacity:0,color:\"#efefef\"};\n }\n }\n // add the geojson to the map\n }).addTo(map)\n }) \n}", "title": "" }, { "docid": "a5d1b32e42ac72d6f7704783edb27115", "score": "0.513779", "text": "_calculateBounds() {\n this.calculateVertices(), this._bounds.addQuad(this.vertexData);\n }", "title": "" }, { "docid": "5aec695c310b42795c32a9f92807bd21", "score": "0.5133459", "text": "function _calcGeometry(data) {\n let largBarra, percMargin, percBar; // Percentage of the margin in relation to the width occupied by the sector\n\n _barsArea.angleBar = _widthToAngle(_barsArea.widthBar + _barsArea.marginBar, _innerRadius);\n\n _barsArea.maxBars = Math.floor(360 / _barsArea.angleBar);\n _barsArea.angleBar = 360.0 / _barsArea.maxBars;\n _barsArea.numBars = model.data.nodes.dataNodes.length;\n _barsArea.startSector = Math.round((_barsArea.maxBars - _barsArea.numBars) / 2);\n\n if (_barsArea.numBars > _barsArea.maxBars) {\n percMargin = _barsArea.pMarginBar / (model.pWidthBar + _barsArea.pMarginBar);\n percBar = 1 - percMargin;\n _barsArea.angleBar = 360.0 / _barsArea.numBars;\n\n largBarra = _angleToWidth(_barsArea.angleBar, _innerRadius);\n _barsArea.widthBar = largBarra * percBar;\n _barsArea.marginBar = largBarra * percMargin;\n _barsArea.startSector = 0;\n }\n\n\n _vAngle = [];\n data.nodes.dataNodes.forEach(function (d, i) {\n _vAngle[i] = ((i + _barsArea.startSector) * _barsArea.angleBar + 180) % 360;\n });\n\n }", "title": "" }, { "docid": "1fae309883c109b6982e86cc1ab96afb", "score": "0.51328176", "text": "_process(_geojson) {\n return new Promise((resolve, reject) => {\n var style = this._options.style;\n\n // TODO: Convert to buffer and use transferrable objects\n if (typeof this._options.style === 'function') {\n style = Stringify.functionToString(this._options.style);\n }\n\n var pointGeometry = this._options.pointGeometry;\n\n // TODO: Convert to buffer and use transferrable objects\n if (typeof this._options.pointGeometry === 'function') {\n pointGeometry = Stringify.functionToString(this._options.pointGeometry);\n }\n\n var geojson = _geojson;\n var transferrables = [];\n\n var layers = [];\n\n if (this._options.layers) {\n layers = this._options.layers;\n }\n\n // TODO: Allow filter method to be run here\n if (typeof geojson !== 'string') {\n // TODO: De-dupe with non-object processing in next section\n var fc = GeoJSON.collectFeatures(geojson, layers, this._options.topojson);\n var features = fc.features;\n\n // Run filter, if provided\n if (this._options.filter) {\n fc.features = features.filter(this._options.filter);\n }\n\n if (this._options.onEachFeature) {\n var feature;\n for (var i = 0; i < features.length; i++) {\n feature = features[i];\n this._options.onEachFeature(feature);\n };\n }\n\n this._geojson = geojson = Buffer.stringToUint8Array(JSON.stringify(fc));\n transferrables.push(geojson.buffer);\n this._execWorker(geojson, this._options.topojson, this._options.headers, this._world._originPoint, style, this._options.interactive, pointGeometry, transferrables).then(() => {\n resolve();\n }).catch(reject);\n } else if (typeof this._options.filter === 'function' || typeof this._options.onEachFeature === 'function') {\n GeoJSONWorkerLayer.RequestGeoJSON(geojson).then((res) => {\n // if (this._aborted) {\n // resolve();\n // return;\n // }\n\n var fc = GeoJSON.collectFeatures(res, layers, this._options.topojson);\n var features = fc.features;\n\n // Run filter, if provided\n if (this._options.filter) {\n fc.features = features.filter(this._options.filter);\n }\n\n if (this._options.onEachFeature) {\n var feature;\n for (var i = 0; i < features.length; i++) {\n feature = features[i];\n this._options.onEachFeature(feature);\n };\n }\n\n this._geojson = geojson = Buffer.stringToUint8Array(JSON.stringify(fc));\n transferrables.push(geojson.buffer);\n\n this._execWorker(geojson, false, this._options.headers, this._world._originPoint, style, this._options.interactive, pointGeometry, transferrables).then(() => {\n resolve();\n }).catch(reject);\n });\n } else {\n this._execWorker(geojson, this._options.topojson, this._options.headers, this._world._originPoint, style, this._options.interactive, pointGeometry, transferrables).then(() => {\n resolve();\n }).catch(reject);\n }\n });\n }", "title": "" }, { "docid": "1596705bac5e3241314c0179fff51e49", "score": "0.51107097", "text": "function createPathProxyFromString(data) {\n if (!data) {\n return new PathProxy();\n } // var data = data.replace(/-/g, ' -')\n // .replace(/ /g, ' ')\n // .replace(/ /g, ',')\n // .replace(/,,/g, ',');\n // var n;\n // create pipes so that we can split the data\n // for (n = 0; n < cc.length; n++) {\n // cs = cs.replace(new RegExp(cc[n], 'g'), '|' + cc[n]);\n // }\n // data = data.replace(/-/g, ',-');\n // create array\n // var arr = cs.split('|');\n // init context point\n\n\n var cpx = 0;\n var cpy = 0;\n var subpathX = cpx;\n var subpathY = cpy;\n var prevCmd;\n var path = new PathProxy();\n var CMD = PathProxy.CMD; // commandReg.lastIndex = 0;\n // var cmdResult;\n // while ((cmdResult = commandReg.exec(data)) != null) {\n // var cmdStr = cmdResult[1];\n // var cmdContent = cmdResult[2];\n\n var cmdList = data.match(commandReg);\n\n for (var l = 0; l < cmdList.length; l++) {\n var cmdText = cmdList[l];\n var cmdStr = cmdText.charAt(0);\n var cmd; // String#split is faster a little bit than String#replace or RegExp#exec.\n // var p = cmdContent.split(valueSplitReg);\n // var pLen = 0;\n // for (var i = 0; i < p.length; i++) {\n // // '' and other invalid str => NaN\n // var val = parseFloat(p[i]);\n // !isNaN(val) && (p[pLen++] = val);\n // }\n\n var p = cmdText.match(numberReg) || [];\n var pLen = p.length;\n\n for (var i = 0; i < pLen; i++) {\n p[i] = parseFloat(p[i]);\n }\n\n var off = 0;\n\n while (off < pLen) {\n var ctlPtx;\n var ctlPty;\n var rx;\n var ry;\n var psi;\n var fa;\n var fs;\n var x1 = cpx;\n var y1 = cpy; // convert l, H, h, V, and v to L\n\n switch (cmdStr) {\n case 'l':\n cpx += p[off++];\n cpy += p[off++];\n cmd = CMD.L;\n path.addData(cmd, cpx, cpy);\n break;\n\n case 'L':\n cpx = p[off++];\n cpy = p[off++];\n cmd = CMD.L;\n path.addData(cmd, cpx, cpy);\n break;\n\n case 'm':\n cpx += p[off++];\n cpy += p[off++];\n cmd = CMD.M;\n path.addData(cmd, cpx, cpy);\n subpathX = cpx;\n subpathY = cpy;\n cmdStr = 'l';\n break;\n\n case 'M':\n cpx = p[off++];\n cpy = p[off++];\n cmd = CMD.M;\n path.addData(cmd, cpx, cpy);\n subpathX = cpx;\n subpathY = cpy;\n cmdStr = 'L';\n break;\n\n case 'h':\n cpx += p[off++];\n cmd = CMD.L;\n path.addData(cmd, cpx, cpy);\n break;\n\n case 'H':\n cpx = p[off++];\n cmd = CMD.L;\n path.addData(cmd, cpx, cpy);\n break;\n\n case 'v':\n cpy += p[off++];\n cmd = CMD.L;\n path.addData(cmd, cpx, cpy);\n break;\n\n case 'V':\n cpy = p[off++];\n cmd = CMD.L;\n path.addData(cmd, cpx, cpy);\n break;\n\n case 'C':\n cmd = CMD.C;\n path.addData(cmd, p[off++], p[off++], p[off++], p[off++], p[off++], p[off++]);\n cpx = p[off - 2];\n cpy = p[off - 1];\n break;\n\n case 'c':\n cmd = CMD.C;\n path.addData(cmd, p[off++] + cpx, p[off++] + cpy, p[off++] + cpx, p[off++] + cpy, p[off++] + cpx, p[off++] + cpy);\n cpx += p[off - 2];\n cpy += p[off - 1];\n break;\n\n case 'S':\n ctlPtx = cpx;\n ctlPty = cpy;\n var len = path.len();\n var pathData = path.data;\n\n if (prevCmd === CMD.C) {\n ctlPtx += cpx - pathData[len - 4];\n ctlPty += cpy - pathData[len - 3];\n }\n\n cmd = CMD.C;\n x1 = p[off++];\n y1 = p[off++];\n cpx = p[off++];\n cpy = p[off++];\n path.addData(cmd, ctlPtx, ctlPty, x1, y1, cpx, cpy);\n break;\n\n case 's':\n ctlPtx = cpx;\n ctlPty = cpy;\n var len = path.len();\n var pathData = path.data;\n\n if (prevCmd === CMD.C) {\n ctlPtx += cpx - pathData[len - 4];\n ctlPty += cpy - pathData[len - 3];\n }\n\n cmd = CMD.C;\n x1 = cpx + p[off++];\n y1 = cpy + p[off++];\n cpx += p[off++];\n cpy += p[off++];\n path.addData(cmd, ctlPtx, ctlPty, x1, y1, cpx, cpy);\n break;\n\n case 'Q':\n x1 = p[off++];\n y1 = p[off++];\n cpx = p[off++];\n cpy = p[off++];\n cmd = CMD.Q;\n path.addData(cmd, x1, y1, cpx, cpy);\n break;\n\n case 'q':\n x1 = p[off++] + cpx;\n y1 = p[off++] + cpy;\n cpx += p[off++];\n cpy += p[off++];\n cmd = CMD.Q;\n path.addData(cmd, x1, y1, cpx, cpy);\n break;\n\n case 'T':\n ctlPtx = cpx;\n ctlPty = cpy;\n var len = path.len();\n var pathData = path.data;\n\n if (prevCmd === CMD.Q) {\n ctlPtx += cpx - pathData[len - 4];\n ctlPty += cpy - pathData[len - 3];\n }\n\n cpx = p[off++];\n cpy = p[off++];\n cmd = CMD.Q;\n path.addData(cmd, ctlPtx, ctlPty, cpx, cpy);\n break;\n\n case 't':\n ctlPtx = cpx;\n ctlPty = cpy;\n var len = path.len();\n var pathData = path.data;\n\n if (prevCmd === CMD.Q) {\n ctlPtx += cpx - pathData[len - 4];\n ctlPty += cpy - pathData[len - 3];\n }\n\n cpx += p[off++];\n cpy += p[off++];\n cmd = CMD.Q;\n path.addData(cmd, ctlPtx, ctlPty, cpx, cpy);\n break;\n\n case 'A':\n rx = p[off++];\n ry = p[off++];\n psi = p[off++];\n fa = p[off++];\n fs = p[off++];\n x1 = cpx, y1 = cpy;\n cpx = p[off++];\n cpy = p[off++];\n cmd = CMD.A;\n processArc(x1, y1, cpx, cpy, fa, fs, rx, ry, psi, cmd, path);\n break;\n\n case 'a':\n rx = p[off++];\n ry = p[off++];\n psi = p[off++];\n fa = p[off++];\n fs = p[off++];\n x1 = cpx, y1 = cpy;\n cpx += p[off++];\n cpy += p[off++];\n cmd = CMD.A;\n processArc(x1, y1, cpx, cpy, fa, fs, rx, ry, psi, cmd, path);\n break;\n }\n }\n\n if (cmdStr === 'z' || cmdStr === 'Z') {\n cmd = CMD.Z;\n path.addData(cmd); // z may be in the middle of the path.\n\n cpx = subpathX;\n cpy = subpathY;\n }\n\n prevCmd = cmd;\n }\n\n path.toStatic();\n return path;\n} // TODO Optimize double memory cost problem", "title": "" }, { "docid": "1596705bac5e3241314c0179fff51e49", "score": "0.51107097", "text": "function createPathProxyFromString(data) {\n if (!data) {\n return new PathProxy();\n } // var data = data.replace(/-/g, ' -')\n // .replace(/ /g, ' ')\n // .replace(/ /g, ',')\n // .replace(/,,/g, ',');\n // var n;\n // create pipes so that we can split the data\n // for (n = 0; n < cc.length; n++) {\n // cs = cs.replace(new RegExp(cc[n], 'g'), '|' + cc[n]);\n // }\n // data = data.replace(/-/g, ',-');\n // create array\n // var arr = cs.split('|');\n // init context point\n\n\n var cpx = 0;\n var cpy = 0;\n var subpathX = cpx;\n var subpathY = cpy;\n var prevCmd;\n var path = new PathProxy();\n var CMD = PathProxy.CMD; // commandReg.lastIndex = 0;\n // var cmdResult;\n // while ((cmdResult = commandReg.exec(data)) != null) {\n // var cmdStr = cmdResult[1];\n // var cmdContent = cmdResult[2];\n\n var cmdList = data.match(commandReg);\n\n for (var l = 0; l < cmdList.length; l++) {\n var cmdText = cmdList[l];\n var cmdStr = cmdText.charAt(0);\n var cmd; // String#split is faster a little bit than String#replace or RegExp#exec.\n // var p = cmdContent.split(valueSplitReg);\n // var pLen = 0;\n // for (var i = 0; i < p.length; i++) {\n // // '' and other invalid str => NaN\n // var val = parseFloat(p[i]);\n // !isNaN(val) && (p[pLen++] = val);\n // }\n\n var p = cmdText.match(numberReg) || [];\n var pLen = p.length;\n\n for (var i = 0; i < pLen; i++) {\n p[i] = parseFloat(p[i]);\n }\n\n var off = 0;\n\n while (off < pLen) {\n var ctlPtx;\n var ctlPty;\n var rx;\n var ry;\n var psi;\n var fa;\n var fs;\n var x1 = cpx;\n var y1 = cpy; // convert l, H, h, V, and v to L\n\n switch (cmdStr) {\n case 'l':\n cpx += p[off++];\n cpy += p[off++];\n cmd = CMD.L;\n path.addData(cmd, cpx, cpy);\n break;\n\n case 'L':\n cpx = p[off++];\n cpy = p[off++];\n cmd = CMD.L;\n path.addData(cmd, cpx, cpy);\n break;\n\n case 'm':\n cpx += p[off++];\n cpy += p[off++];\n cmd = CMD.M;\n path.addData(cmd, cpx, cpy);\n subpathX = cpx;\n subpathY = cpy;\n cmdStr = 'l';\n break;\n\n case 'M':\n cpx = p[off++];\n cpy = p[off++];\n cmd = CMD.M;\n path.addData(cmd, cpx, cpy);\n subpathX = cpx;\n subpathY = cpy;\n cmdStr = 'L';\n break;\n\n case 'h':\n cpx += p[off++];\n cmd = CMD.L;\n path.addData(cmd, cpx, cpy);\n break;\n\n case 'H':\n cpx = p[off++];\n cmd = CMD.L;\n path.addData(cmd, cpx, cpy);\n break;\n\n case 'v':\n cpy += p[off++];\n cmd = CMD.L;\n path.addData(cmd, cpx, cpy);\n break;\n\n case 'V':\n cpy = p[off++];\n cmd = CMD.L;\n path.addData(cmd, cpx, cpy);\n break;\n\n case 'C':\n cmd = CMD.C;\n path.addData(cmd, p[off++], p[off++], p[off++], p[off++], p[off++], p[off++]);\n cpx = p[off - 2];\n cpy = p[off - 1];\n break;\n\n case 'c':\n cmd = CMD.C;\n path.addData(cmd, p[off++] + cpx, p[off++] + cpy, p[off++] + cpx, p[off++] + cpy, p[off++] + cpx, p[off++] + cpy);\n cpx += p[off - 2];\n cpy += p[off - 1];\n break;\n\n case 'S':\n ctlPtx = cpx;\n ctlPty = cpy;\n var len = path.len();\n var pathData = path.data;\n\n if (prevCmd === CMD.C) {\n ctlPtx += cpx - pathData[len - 4];\n ctlPty += cpy - pathData[len - 3];\n }\n\n cmd = CMD.C;\n x1 = p[off++];\n y1 = p[off++];\n cpx = p[off++];\n cpy = p[off++];\n path.addData(cmd, ctlPtx, ctlPty, x1, y1, cpx, cpy);\n break;\n\n case 's':\n ctlPtx = cpx;\n ctlPty = cpy;\n var len = path.len();\n var pathData = path.data;\n\n if (prevCmd === CMD.C) {\n ctlPtx += cpx - pathData[len - 4];\n ctlPty += cpy - pathData[len - 3];\n }\n\n cmd = CMD.C;\n x1 = cpx + p[off++];\n y1 = cpy + p[off++];\n cpx += p[off++];\n cpy += p[off++];\n path.addData(cmd, ctlPtx, ctlPty, x1, y1, cpx, cpy);\n break;\n\n case 'Q':\n x1 = p[off++];\n y1 = p[off++];\n cpx = p[off++];\n cpy = p[off++];\n cmd = CMD.Q;\n path.addData(cmd, x1, y1, cpx, cpy);\n break;\n\n case 'q':\n x1 = p[off++] + cpx;\n y1 = p[off++] + cpy;\n cpx += p[off++];\n cpy += p[off++];\n cmd = CMD.Q;\n path.addData(cmd, x1, y1, cpx, cpy);\n break;\n\n case 'T':\n ctlPtx = cpx;\n ctlPty = cpy;\n var len = path.len();\n var pathData = path.data;\n\n if (prevCmd === CMD.Q) {\n ctlPtx += cpx - pathData[len - 4];\n ctlPty += cpy - pathData[len - 3];\n }\n\n cpx = p[off++];\n cpy = p[off++];\n cmd = CMD.Q;\n path.addData(cmd, ctlPtx, ctlPty, cpx, cpy);\n break;\n\n case 't':\n ctlPtx = cpx;\n ctlPty = cpy;\n var len = path.len();\n var pathData = path.data;\n\n if (prevCmd === CMD.Q) {\n ctlPtx += cpx - pathData[len - 4];\n ctlPty += cpy - pathData[len - 3];\n }\n\n cpx += p[off++];\n cpy += p[off++];\n cmd = CMD.Q;\n path.addData(cmd, ctlPtx, ctlPty, cpx, cpy);\n break;\n\n case 'A':\n rx = p[off++];\n ry = p[off++];\n psi = p[off++];\n fa = p[off++];\n fs = p[off++];\n x1 = cpx, y1 = cpy;\n cpx = p[off++];\n cpy = p[off++];\n cmd = CMD.A;\n processArc(x1, y1, cpx, cpy, fa, fs, rx, ry, psi, cmd, path);\n break;\n\n case 'a':\n rx = p[off++];\n ry = p[off++];\n psi = p[off++];\n fa = p[off++];\n fs = p[off++];\n x1 = cpx, y1 = cpy;\n cpx += p[off++];\n cpy += p[off++];\n cmd = CMD.A;\n processArc(x1, y1, cpx, cpy, fa, fs, rx, ry, psi, cmd, path);\n break;\n }\n }\n\n if (cmdStr === 'z' || cmdStr === 'Z') {\n cmd = CMD.Z;\n path.addData(cmd); // z may be in the middle of the path.\n\n cpx = subpathX;\n cpy = subpathY;\n }\n\n prevCmd = cmd;\n }\n\n path.toStatic();\n return path;\n} // TODO Optimize double memory cost problem", "title": "" }, { "docid": "1596705bac5e3241314c0179fff51e49", "score": "0.51107097", "text": "function createPathProxyFromString(data) {\n if (!data) {\n return new PathProxy();\n } // var data = data.replace(/-/g, ' -')\n // .replace(/ /g, ' ')\n // .replace(/ /g, ',')\n // .replace(/,,/g, ',');\n // var n;\n // create pipes so that we can split the data\n // for (n = 0; n < cc.length; n++) {\n // cs = cs.replace(new RegExp(cc[n], 'g'), '|' + cc[n]);\n // }\n // data = data.replace(/-/g, ',-');\n // create array\n // var arr = cs.split('|');\n // init context point\n\n\n var cpx = 0;\n var cpy = 0;\n var subpathX = cpx;\n var subpathY = cpy;\n var prevCmd;\n var path = new PathProxy();\n var CMD = PathProxy.CMD; // commandReg.lastIndex = 0;\n // var cmdResult;\n // while ((cmdResult = commandReg.exec(data)) != null) {\n // var cmdStr = cmdResult[1];\n // var cmdContent = cmdResult[2];\n\n var cmdList = data.match(commandReg);\n\n for (var l = 0; l < cmdList.length; l++) {\n var cmdText = cmdList[l];\n var cmdStr = cmdText.charAt(0);\n var cmd; // String#split is faster a little bit than String#replace or RegExp#exec.\n // var p = cmdContent.split(valueSplitReg);\n // var pLen = 0;\n // for (var i = 0; i < p.length; i++) {\n // // '' and other invalid str => NaN\n // var val = parseFloat(p[i]);\n // !isNaN(val) && (p[pLen++] = val);\n // }\n\n var p = cmdText.match(numberReg) || [];\n var pLen = p.length;\n\n for (var i = 0; i < pLen; i++) {\n p[i] = parseFloat(p[i]);\n }\n\n var off = 0;\n\n while (off < pLen) {\n var ctlPtx;\n var ctlPty;\n var rx;\n var ry;\n var psi;\n var fa;\n var fs;\n var x1 = cpx;\n var y1 = cpy; // convert l, H, h, V, and v to L\n\n switch (cmdStr) {\n case 'l':\n cpx += p[off++];\n cpy += p[off++];\n cmd = CMD.L;\n path.addData(cmd, cpx, cpy);\n break;\n\n case 'L':\n cpx = p[off++];\n cpy = p[off++];\n cmd = CMD.L;\n path.addData(cmd, cpx, cpy);\n break;\n\n case 'm':\n cpx += p[off++];\n cpy += p[off++];\n cmd = CMD.M;\n path.addData(cmd, cpx, cpy);\n subpathX = cpx;\n subpathY = cpy;\n cmdStr = 'l';\n break;\n\n case 'M':\n cpx = p[off++];\n cpy = p[off++];\n cmd = CMD.M;\n path.addData(cmd, cpx, cpy);\n subpathX = cpx;\n subpathY = cpy;\n cmdStr = 'L';\n break;\n\n case 'h':\n cpx += p[off++];\n cmd = CMD.L;\n path.addData(cmd, cpx, cpy);\n break;\n\n case 'H':\n cpx = p[off++];\n cmd = CMD.L;\n path.addData(cmd, cpx, cpy);\n break;\n\n case 'v':\n cpy += p[off++];\n cmd = CMD.L;\n path.addData(cmd, cpx, cpy);\n break;\n\n case 'V':\n cpy = p[off++];\n cmd = CMD.L;\n path.addData(cmd, cpx, cpy);\n break;\n\n case 'C':\n cmd = CMD.C;\n path.addData(cmd, p[off++], p[off++], p[off++], p[off++], p[off++], p[off++]);\n cpx = p[off - 2];\n cpy = p[off - 1];\n break;\n\n case 'c':\n cmd = CMD.C;\n path.addData(cmd, p[off++] + cpx, p[off++] + cpy, p[off++] + cpx, p[off++] + cpy, p[off++] + cpx, p[off++] + cpy);\n cpx += p[off - 2];\n cpy += p[off - 1];\n break;\n\n case 'S':\n ctlPtx = cpx;\n ctlPty = cpy;\n var len = path.len();\n var pathData = path.data;\n\n if (prevCmd === CMD.C) {\n ctlPtx += cpx - pathData[len - 4];\n ctlPty += cpy - pathData[len - 3];\n }\n\n cmd = CMD.C;\n x1 = p[off++];\n y1 = p[off++];\n cpx = p[off++];\n cpy = p[off++];\n path.addData(cmd, ctlPtx, ctlPty, x1, y1, cpx, cpy);\n break;\n\n case 's':\n ctlPtx = cpx;\n ctlPty = cpy;\n var len = path.len();\n var pathData = path.data;\n\n if (prevCmd === CMD.C) {\n ctlPtx += cpx - pathData[len - 4];\n ctlPty += cpy - pathData[len - 3];\n }\n\n cmd = CMD.C;\n x1 = cpx + p[off++];\n y1 = cpy + p[off++];\n cpx += p[off++];\n cpy += p[off++];\n path.addData(cmd, ctlPtx, ctlPty, x1, y1, cpx, cpy);\n break;\n\n case 'Q':\n x1 = p[off++];\n y1 = p[off++];\n cpx = p[off++];\n cpy = p[off++];\n cmd = CMD.Q;\n path.addData(cmd, x1, y1, cpx, cpy);\n break;\n\n case 'q':\n x1 = p[off++] + cpx;\n y1 = p[off++] + cpy;\n cpx += p[off++];\n cpy += p[off++];\n cmd = CMD.Q;\n path.addData(cmd, x1, y1, cpx, cpy);\n break;\n\n case 'T':\n ctlPtx = cpx;\n ctlPty = cpy;\n var len = path.len();\n var pathData = path.data;\n\n if (prevCmd === CMD.Q) {\n ctlPtx += cpx - pathData[len - 4];\n ctlPty += cpy - pathData[len - 3];\n }\n\n cpx = p[off++];\n cpy = p[off++];\n cmd = CMD.Q;\n path.addData(cmd, ctlPtx, ctlPty, cpx, cpy);\n break;\n\n case 't':\n ctlPtx = cpx;\n ctlPty = cpy;\n var len = path.len();\n var pathData = path.data;\n\n if (prevCmd === CMD.Q) {\n ctlPtx += cpx - pathData[len - 4];\n ctlPty += cpy - pathData[len - 3];\n }\n\n cpx += p[off++];\n cpy += p[off++];\n cmd = CMD.Q;\n path.addData(cmd, ctlPtx, ctlPty, cpx, cpy);\n break;\n\n case 'A':\n rx = p[off++];\n ry = p[off++];\n psi = p[off++];\n fa = p[off++];\n fs = p[off++];\n x1 = cpx, y1 = cpy;\n cpx = p[off++];\n cpy = p[off++];\n cmd = CMD.A;\n processArc(x1, y1, cpx, cpy, fa, fs, rx, ry, psi, cmd, path);\n break;\n\n case 'a':\n rx = p[off++];\n ry = p[off++];\n psi = p[off++];\n fa = p[off++];\n fs = p[off++];\n x1 = cpx, y1 = cpy;\n cpx += p[off++];\n cpy += p[off++];\n cmd = CMD.A;\n processArc(x1, y1, cpx, cpy, fa, fs, rx, ry, psi, cmd, path);\n break;\n }\n }\n\n if (cmdStr === 'z' || cmdStr === 'Z') {\n cmd = CMD.Z;\n path.addData(cmd); // z may be in the middle of the path.\n\n cpx = subpathX;\n cpy = subpathY;\n }\n\n prevCmd = cmd;\n }\n\n path.toStatic();\n return path;\n} // TODO Optimize double memory cost problem", "title": "" }, { "docid": "10e130dbb8f31572106dc16957a2bc32", "score": "0.5110477", "text": "function parseShape(\nshape,\nshapeOffset)\n{var\n\ninTangents=\n\n\nshape.inTangents;var outTangents=shape.outTangents;var closed=shape.closed;\n\nvar vertices=\nshape.vertices.map(function(vertex){return[vertex[0]+shapeOffset[0],vertex[1]+shapeOffset[1]];});\nif(vertices.length===0){\nreturn[];\n}\n\nvar commands=[];\ncommands.push({\ncommand:'M',\nvertices:[vertices[0]]});\n\nvar currIndex=void 0;\nvar prevIndex=void 0;\n\nfor(var i=1;i<=vertices.length;++i){\nif(i===vertices.length){\nif(!closed){\ncontinue;\n}\nprevIndex=vertices.length-1;\ncurrIndex=0;\n}else{\nprevIndex=i-1;\ncurrIndex=i;\n}\nvar prevVertex=vertices[prevIndex];\nvar currVertex=vertices[currIndex];\nvar tangentCount=getTangentCount(outTangents[prevIndex],inTangents[currIndex]);\n\nif(tangentCount===2){\ncommands.push({\ncommand:'C',\nvertices:[\n[\nprevVertex[0]+outTangents[prevIndex][0],\nprevVertex[1]+outTangents[prevIndex][1]],\n\n[\ncurrVertex[0]+inTangents[currIndex][0],\ncurrVertex[1]+inTangents[currIndex][1]],\n\n[\ncurrVertex[0],\ncurrVertex[1]]]});\n\n\n\n}else if(tangentCount===1){\nif(hasTangent(outTangents[prevIndex])){\ncommands.push({\ncommand:'Q',\nvertices:[\n[\nprevVertex[0]+outTangents[prevIndex][0],\nprevVertex[1]+outTangents[prevIndex][1]],\n\n[\ncurrVertex[0],\ncurrVertex[1]]]});\n\n\n\n}else if(hasTangent(inTangents[currIndex])){\ncommands.push({\ncommand:'Q',\nvertices:[\n[\ncurrVertex[0]+inTangents[currIndex][0],\ncurrVertex[1]+inTangents[currIndex][1]],\n\n[\ncurrVertex[0],\ncurrVertex[1]]]});\n\n\n\n}\n}else if(tangentCount===0){\ncommands.push({\ncommand:'L',\nvertices:[\ncurrVertex]});\n\n\n}\n}\n\nreturn commands.map(function(command){return(\ncommand.command+command.vertices.map(function(v){return[v[0].toFixed(2),v[1].toFixed(2)];}).join(','));});\n\n}", "title": "" }, { "docid": "19beffd65c2db3c2eff62f32481a67b0", "score": "0.5100732", "text": "function drawData(){\n // Remove nodes and links in the node-link graph within the map\n d3.selectAll(\"#edges path\").remove();\n d3.selectAll(\"#nodes g\").remove();\n // Call d3 force edge bundling algorithm on the current node_data and edge_data arrays (contain data depending on user's current\n // selection of filters)\n var fbundling = d3.ForceEdgeBundling()\n .step_size(0.1)\n .compatibility_threshold(0.6)\n .nodes(node_data)\n .edges(edge_data);\n results = fbundling();\t\n // Change output from d3 force edge bundling algorithm into an array of objects with specified properties from attr_data, which\n // contains a limited selection of the properties from routes_data.csv \n transform_results(results);\n // d3 line generator using x and y properties of data\n var d3line = d3.svg.line()\n .x(function(d){ return d.x; })\n .y(function(d){ return d.y; })\n .interpolate(\"linear\");\n // Add lines to the map\n edges.selectAll(\"path\")\n .data(results)\n .enter()\n .append(\"path\")\n .attr(\"d\", function(d) {return d3line(d[\"segments\"])})\n // Stroke width depends on the value of the \"percent_change_2018_2019\" field\n .style(\"stroke-width\",function(d){\n return (d[\"percent_change_2018_2019\"]/20);\n })\n // Color of line depends on if the route being represented is a regional or major route\n .style(\"stroke\", function(d){\n if(d[\"label\"]=='Regional'){\n return \"#EA6A47\";\n } else if(d[\"label\"]=='Major'){\n return \"#0091D5\";\n }\n })\n .style(\"fill\", \"none\")\n .style('stroke-opacity',0.5)\n .attr(\"id\",function(d,i){\n return \"edge_\"+airports_dict[d[\"airport_2\"]];\n })\n // Mouseover event handler\n .on(\"mouseover\",function(d){\n var this_temp = this;\n onMouseOver(this_temp,d);}\n )\n // Mouseout event handler\n .on(\"mouseout\",function(d){\n var this_temp = this;\n onMouseOut(this_temp,d);}\n );\n // Add groups to draw the nodes on the map\n var nodes_g = nodes.selectAll('g')\n .data(d3.entries(node_data))\n .enter()\n .append(\"g\")\n .attr(\"id\",function(d){\n return \"nodeg_\"+d.key;\n })\n // Add circles for the nodes on the map\n nodes_g.append('circle')\n // If the node is the current origin airport or destination airport, the radius will be large (node_rad_extra)\n // Otherwise, the node radius will be small (node_rad_normal)\n .attr('r', function(d){\n if((airports_dict[airport_origin]==d.key) || (airports_dict[airport_dest]==d.key)){\n return node_rad_extra;\n } else{\n return node_rad_normal;\n }\n })\n .attr(\"class\",function(d){\n if((airports_dict[airport_origin]==d.key) || (airports_dict[airport_dest]==d.key)){\n return \"graph_over\";\n } \n })\n .attr('fill','#ffc107')\n .attr('cx', function(d){ return d.value.x;})\n .attr('cy', function(d){ return d.value.y;})\n .attr(\"id\",function(d){\n return \"node_\"+d.key;\n })\n // Add a text label for each node\n nodes_g.append(\"text\")\n .attr(\"id\",function(d){\n return \"nodeText_\"+d.key;\n })\n .attr(\"text-anchor\",\"middle\")\n .text(function(d){\n return airports_dict_rev[d.key];\n })\n .attr(\"x\",function(d){return d.value.x;})\n .attr(\"y\",function(d){return d.value.y+5;})\n // The text will be visible if the node is the current origin airport or destination airport\n // Otherwise, the text will be hidden\n .style(\"visibility\",function(d){\n if((airports_dict[airport_origin]==d.key) || (airports_dict[airport_dest]==d.key)){\n return \"visible\";\n } else{\n return \"hidden\";\n }\n });\n \n}", "title": "" }, { "docid": "5bbc41e9465c6a922b381d6f2be930d4", "score": "0.5099831", "text": "createGeometry() {\n let geo = new THREE.BufferGeometry();\n let vertsX = SEGS_X + 1;\n let vertsY = SEGS_Y + 1;\n\n this.verts = new Float32Array(vertsX * vertsY * 3);\n this.uvs = new Float32Array(vertsX * vertsY * 2);\n let v = 0;\n let uv = 0;\n let stepX = this.width / SEGS_X;\n let stepY = this.height / SEGS_Y;\n for (let j = 0; j < vertsY; ++j) {\n for (let i = 0; i < vertsX; ++i, v += 3, uv += 2) {\n let pos = {\n x: i * stepX,\n y: 0,\n z: j * stepY,\n };\n let noise = this.heightmap.getHeight(\n pos.x + this.position.x,\n pos.z + this.position.z,\n );\n pos.y = noise;\n if (pos.y < -15) {\n // let helper = new THREE.AxisHelper( 10 );\n // helper.position.set( pos.x + this.position.x, -15, pos.z + this.position.z );\n // window.flight.scene.add( helper );\n }\n this.verts[v] = pos.x;\n this.verts[v + 1] = pos.y;\n this.verts[v + 2] = pos.z;\n this.uvs[uv] = i / (vertsX - 1);\n this.uvs[uv + 1] = j / (vertsY - 1);\n }\n }\n\n let indices = new Uint32Array(SEGS_X * SEGS_Y * 6);\n\n for (let i = 0, t = 0, j = 0, v = 0; i < SEGS_Y; ++i, v = i * vertsX) {\n for (j = 0; j < SEGS_X; ++j, t += 6, v++) {\n indices[t] = v;\n indices[t + 1] = v + vertsX;\n indices[t + 2] = v + vertsX + 1;\n indices[t + 3] = v;\n indices[t + 4] = v + vertsX + 1;\n indices[t + 5] = v + 1;\n }\n }\n\n geo.addAttribute(\"position\", new THREE.BufferAttribute(this.verts, 3));\n geo.addAttribute(\"uv\", new THREE.BufferAttribute(this.uvs, 2));\n geo.setIndex(new THREE.BufferAttribute(indices, 1));\n geo.computeVertexNormals();\n return geo;\n }", "title": "" }, { "docid": "37c10f001477a96f7f3f9d9b8a6bae1a", "score": "0.5098484", "text": "polygonize(isolevel) {\n\n // Populate vertexList\n\n var vertexList = [];\n var normalList = [];\n var idx = 0;\n\n if (this['001'].isovalue < isolevel) idx |= 1;\n if (this['101'].isovalue < isolevel) idx |= 2;\n if (this['100'].isovalue < isolevel) idx |= 4;\n if (this['000'].isovalue < isolevel) idx |= 8;\n if (this['011'].isovalue < isolevel) idx |= 16;\n if (this['111'].isovalue < isolevel) idx |= 32;\n if (this['110'].isovalue < isolevel) idx |= 64;\n if (this['010'].isovalue < isolevel) idx |= 128;\n\n var edgeTableVal = LUT.EDGE_TABLE[idx];\n\n if (edgeTableVal == 0) return;\n\n if (edgeTableVal & 1) vertexList[0] = this.vertexInterpolation(isolevel, this['001'], this['101']);\n if (edgeTableVal & 2) vertexList[1] = this.vertexInterpolation(isolevel, this['101'], this['100']);\n if (edgeTableVal & 4) vertexList[2] = this.vertexInterpolation(isolevel, this['100'], this['000']);\n if (edgeTableVal & 8) vertexList[3] = this.vertexInterpolation(isolevel, this['000'], this['001']);\n if (edgeTableVal & 16) vertexList[4] = this.vertexInterpolation(isolevel, this['011'], this['111']);\n if (edgeTableVal & 32) vertexList[5] = this.vertexInterpolation(isolevel, this['111'], this['110']);\n if (edgeTableVal & 64) vertexList[6] = this.vertexInterpolation(isolevel, this['110'], this['010']);\n if (edgeTableVal & 128) vertexList[7] = this.vertexInterpolation(isolevel, this['010'], this['011']);\n if (edgeTableVal & 256) vertexList[8] = this.vertexInterpolation(isolevel, this['001'], this['011']);\n if (edgeTableVal & 512) vertexList[9] = this.vertexInterpolation(isolevel, this['101'], this['111']);\n if (edgeTableVal & 1024) vertexList[10] = this.vertexInterpolation(isolevel, this['100'], this['110']);\n if (edgeTableVal & 2048) vertexList[11] = this.vertexInterpolation(isolevel, this['000'], this['010']);\n\n // Populate vertPositions\n\n var i = 0;\n var j = idx * 16;\n var indices = [];\n\n while (LUT.TRI_TABLE[i + j] != -1) {\n indices.push(LUT.TRI_TABLE[i + j]);\n indices.push(LUT.TRI_TABLE[i + j + 1]);\n indices.push(LUT.TRI_TABLE[i + j + 2]);\n\n i += 3;\n }\n\n var vertPositions = [];\n var vertNormals = [];\n\n indices.forEach(function(ind) {\n vertPositions.push(vertexList[ind]);\n });\n\n // Populate vertNormals\n\n var epsilon = 0.01;\n\n // for (var k = 0; k < indices.length; k += 3) {\n // var p0 = vertPositions[k];\n // var p1 = vertPositions[k + 1];\n // var p2 = vertPositions[k + 2];\n\n // var n0 = new THREE.Vector3();\n // var n1 = new THREE.Vector3();\n // var n2 = new THREE.Vector3();\n\n // var u = p0.clone();\n // var v = p1.clone();\n // var w = p2.clone();\n\n // u.sub(p2);\n // v.sub(p1);\n // w.sub(p0);\n\n // vertNormals.push(n);\n // }\n\n return {\n vertPositions: vertPositions,\n vertNormals: vertNormals\n };\n }", "title": "" }, { "docid": "65ac59b1fd328dbeeefb48cb18e6cd0f", "score": "0.5098288", "text": "function lineConnHandlers(bbox) {\n return [\"M \" + (bbox.left - _constants.CANVAS_LEFT_MARGIN + bbox.width / 2 - _constants.ARROW_WIDTH / 2) + \", \" + (bbox.top - 35) + \" h \" + _constants.ARROW_WIDTH + \" L \" + (bbox.left - _constants.CANVAS_LEFT_MARGIN + bbox.width / 2) + \", \" + (bbox.top - 35 - _constants.ARROW_HEIGHT) + \" z\", \"M \" + (bbox.right - _constants.CANVAS_LEFT_MARGIN + 35) + \", \" + (bbox.top + bbox.height / 2 - _constants.ARROW_WIDTH / 2) + \" v \" + _constants.ARROW_WIDTH + \" L \" + (bbox.right - _constants.CANVAS_LEFT_MARGIN + 35 + _constants.ARROW_HEIGHT) + \", \" + (bbox.top + bbox.height / 2) + \" z\", \"M \" + (bbox.left - _constants.CANVAS_LEFT_MARGIN + bbox.width / 2 - _constants.ARROW_WIDTH / 2) + \", \" + (bbox.bottom + 35) + \" h \" + _constants.ARROW_WIDTH + \" L \" + (bbox.left - _constants.CANVAS_LEFT_MARGIN + bbox.width / 2) + \", \" + (bbox.bottom + 35 + _constants.ARROW_HEIGHT) + \" z\", \"M \" + (bbox.left - _constants.CANVAS_LEFT_MARGIN - 35) + \", \" + (bbox.top + bbox.height / 2 - _constants.ARROW_WIDTH / 2) + \" v \" + _constants.ARROW_WIDTH + \" L \" + (bbox.left - _constants.CANVAS_LEFT_MARGIN - 35 - _constants.ARROW_HEIGHT) + \", \" + (bbox.top + bbox.height / 2) + \" z\"];\n}", "title": "" }, { "docid": "afccb972672d3ab613ca273d3ac4213d", "score": "0.5096664", "text": "function buildGeom(data, dest) {\n dest[0] = data.translate[0] - data.scale[0];\n dest[1] = data.translate[1] - data.scale[1];\n dest[2] = data.translate[0] + data.scale[0];\n dest[3] = data.translate[1] + data.scale[1];\n return dest;\n}", "title": "" }, { "docid": "af3b051be5222c755159bfb8856304fe", "score": "0.5093901", "text": "function processMultiGeometry() {\n\t const subType = type.replace(Constants.geojsonTypes.MULTI_PREFIX, '');\n\t coordinates.forEach((subCoordinates, index) => {\n\t const subFeature = {\n\t type: Constants.geojsonTypes.FEATURE,\n\t properties: geojson.properties,\n\t geometry: {\n\t type: subType,\n\t coordinates: subCoordinates\n\t }\n\t };\n\t supplementaryPoints = supplementaryPoints.concat(createSupplementaryPoints(subFeature, options, index));\n\t });\n\t }", "title": "" }, { "docid": "da5f9c33c820c50d8c79d110a8cece00", "score": "0.50894296", "text": "function encodeData() {\n \tvar polylineEncoder = new PolylineEncoder(numLevels, zoomFactor, verySmall);\n \tvar i, j, k, latLngs;\n \t\n\tpathResults = new Array(0);\n \tif(pathData.length > 0) {\n \t\tminLat = maxLat = pathData[0][0][0][0];\n \t\tminLng = maxLng = pathData[0][0][0][1];\n \t}\n\n \tfor(i=0; i<pathData.length; i+= 1) {\n \t\tthisPathResults = new Array(0);\n \t\tfor(j=0; j<pathData[i].length; j+= 1) {\n \t\t\tlatLngs = new Array(0);\n \t\t\tfor(k=0; k<pathData[i][j].length; k+= 1) {\n \t\t\t\tlatLngs.push(new PolylineEncoder.latLng(pathData[i][j][k][0],pathData[i][j][k][1]));\n\t \t\t\tif(1*pathData[i][j][k][0] < 1*minLat) {\n\t \t\t\t\tminLat = pathData[i][j][k][0];\n\t \t\t\t}\n\t \t\t\tif(1*pathData[i][j][k][0] > 1*maxLat) {\n\t \t\t\t\tmaxLat = pathData[i][j][k][0];\n\t \t\t\t}\n\t \t\t\tif(1*pathData[i][j][k][1] < 1*minLng) {\n\t \t\t\t\tminLng = pathData[i][j][k][1];\n\t \t\t\t}\n\t \t\t\tif(1*pathData[i][j][k][1] > 1*maxLng) {\n\t \t\t\t\tmaxLng = pathData[i][j][k][1];\n\t \t\t\t}\n \t\t\t}\n \t\t\tthisPathResults.push(polylineEncoder.dpEncode(latLngs));\n \t\t}\n \t\tpathResults.push(thisPathResults);\n \t}\n\n}", "title": "" }, { "docid": "593ecee4a75f648928c342a373e9ecfa", "score": "0.508478", "text": "_calculateBounds() {\n this.finishPoly();\n const geometry = this._geometry;\n if (!geometry.graphicsData.length)\n return;\n const { minX, minY, maxX, maxY } = geometry.bounds;\n this._bounds.addFrame(this.transform, minX, minY, maxX, maxY);\n }", "title": "" }, { "docid": "9673d16888dd0aa75598cee29f8b4f07", "score": "0.50823957", "text": "function calculate_path() {\n if (ensta_path != null && ensta_path != undefined) {\n viewer.removeObject(ensta_path);\n }\n ensta_path = new ROS2D.TraceShape({\n maxPoses: 0,\n strokeSize: 0.2\n });\n var req = new ROSLIB.ServiceRequest({\n start: {\n header : {\n frame_id : '/map'\n },\n pose : robot_pose\n },\n goal: {\n header : {\n frame_id : '/map'\n },\n pose : ensta_pose\n }\n })\n\n glonalPlannerService.callService(req, function(result) {\n console.log(\"result from service status: \" )\n console.log(result);\n for (var x in result.plan.poses) {\n console.log(x);\n ensta_path.addPose(result.plan.poses[x].pose);\n }\n viewer.addObject(ensta_path);\n });\n}", "title": "" }, { "docid": "e71553a3223fad67f0199fe1056fd30a", "score": "0.50804895", "text": "subdivide() {\n let x = this.boundary.center.x;\n let y = this.boundary.center.y;\n let w = this.boundary.width / 2;\n let h = this.boundary.height / 2;\n\n //make all of the new quadrants of this quad \n let ne = new Rectangle(new Vec2(x + w / 2, y - h / 2), w, h);\n this.northeast = new QuadTree(ne, this.capacity);\n let nw = new Rectangle(new Vec2(x - w / 2, y - h / 2), w, h);\n this.northwest = new QuadTree(nw, this.capacity);\n let se = new Rectangle(new Vec2(x + w / 2, y + h / 2), w, h);\n this.southeast = new QuadTree(se, this.capacity);\n let sw = new Rectangle(new Vec2(x - w / 2, y + h / 2), w, h);\n this.southwest = new QuadTree(sw, this.capacity);\n\n //move all the points to their new home in those subdivisions\n for (let point of this.points) {\n if (this.northeast.push(point)) continue;\n if (this.northwest.push(point)) continue;\n if (this.southeast.push(point)) continue;\n if (this.southwest.push(point)) continue;\n }\n this.points = []; //empty this.points\n\n this.divided = true;\n }", "title": "" }, { "docid": "449b3de6b236de6623f2a484957b5088", "score": "0.5080113", "text": "async renderPolylines(route) {\n this.setState({ selectedRoute: route, isLoading: true, scrollPos: document.getElementsByClassName(\"routeList\")[0].scrollTop });\n const trips = await this.fetch.getTrip(route);\n const shape = trips.map((trip) => {\n const shapes = this.fetch.getPathsFromTrip(trip.shape_id);\n return shapes;\n });\n Promise.all(shape).then(values => {\n var mergedArrays = [];\n values.map(shapeArray => {\n shapeArray.map(sa => {\n mergedArrays.push({ lat: sa.shape_pt_lat, lng: sa.shape_pt_lon })\n return true;\n });\n return true;\n });\n this.setState({\n path: mergedArrays,\n center: mergedArrays[0],\n isLoading: false\n }, () => { this.setActiveRoute(route); })\n });\n }", "title": "" }, { "docid": "ecab3321a2d52f0d7598751902198ede", "score": "0.5068132", "text": "handle(pathData) {\n return !this._isFunction ?\n this._resolveDataPath(pathData) :\n () => this._resolveDataPath(pathData);\n }", "title": "" }, { "docid": "140235708d656f22ec3fe90713d258b8", "score": "0.5062625", "text": "finishPoly()\n {\n if (this.currentPath)\n {\n if (this.currentPath.points.length > 2)\n {\n this.drawShape(this.currentPath);\n this.currentPath = null;\n }\n else\n {\n this.currentPath.points.length = 0;\n }\n }\n }", "title": "" }, { "docid": "2243b5407ea44ee3788f9ac4edb12491", "score": "0.506125", "text": "function shape(lines,copying = false){\r\n\tvar myvec = new vec();\r\n\tthis.lines = lines;\r\n\tthis.color = \"#588de2\";\r\n\tthis.colliding =false;\r\n\tthis.type = \"polygon\";\r\n\tthis.alpha = 1;\r\n\tthis.origin = null;\r\n\tthis.savepos = null;\r\n\tthis.visible = true;\r\n\tthis.points = []; \r\n\tthis.lineWidth = 1;\r\n\tthis.border = false; // is the current shape a border?\r\n\tthis.ispath = false; //is this a path or a complete shape\r\n\tthis.Parent = null;\r\n\tthis.hide = false;\r\n\tthis.angle = 0;\r\n\tthis.iscontainer=false;\r\n\tthis.children = [];//for storing text and images\r\n\tthis.showpoints = false;// should the points be show?\r\n\tthis.iscenter = false;\r\n\t//drawing variables for connected shapes\r\n\tthis.color = \"#588de2\";\r\n\tthis.alpha = 1;\r\n\t//line variables\r\n\tthis.lcolor = \"#000000\";\r\n\tthis.lalpha = 1;\r\n\tthis.lsize = 1;\r\n\t//shadow variables\r\n\tthis.soffx = 0;\r\n\tthis.soffy = 0;\r\n\tthis.sblur = 0;\r\n\tthis.scolor = \"#131314\";\r\n\t//path motion variables\r\n\tthis.dir = 1;\r\n\tthis.index = 0;\r\n\tthis.path = [];\r\n\t\r\n\t//pattern action \r\n\tthis.linepos = null;\r\n\tthis.linevec = [0,0];\r\n\tthis.lineangle = 0;\r\n\t//function for manually manipulating shape dangerous!\r\n\tthis.setwidth = function(w){\r\n\t\t/*\r\n\t\tvar nx =this.get(0)[0] +w;\r\n\t\tvar ny = this.get(1)[1];\r\n\t\tthis.set([nx,ny],1,true);\r\n\t\t*/\r\n\t\tif(w<2){\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tvar po = this.get(0);\r\n\t\tvar xdir = 1;\r\n\t\tif(po[0]<0){\r\n\t\t\txdir = -1;\r\n\t\t}\r\n\t\tvar np = [(Math.abs(w/2)*xdir),po[1]];\r\n\t\tthis.set([np[0],np[1]],0,true);\r\n\t\tthis.Parent.recal();\r\n\t}\r\n\tthis.setheight = function(h){\r\n\t\t/*\r\n\t\tvar nx =this.get(3)[0];\r\n\t\tvar ny = this.get(0)[1]+h;\r\n\t\tthis.set([nx,ny],3,true);\r\n\t\t*/\r\n\t\tvar po = this.get(0);\r\n\t\tvar ydir = 1;\r\n\t\tif(po[1]<0){\r\n\t\t\tydir = -1;\r\n\t\t}\r\n\t\tvar np = [po[0],(Math.abs(h/2)*ydir)];\r\n\t\t//this.set([np[0],np[1]],0,true);\r\n\t\t//this.Parent.recal();\r\n\t}\r\n\tthis.getwidth = function(){\r\n\t\treturn myvec.length(this.get(0),this.get(1))/2;\r\n\t}\r\n\tthis.getheight = function(){\r\n\t\treturn myvec.length(this.get(1),this.get(2))/2;\r\n\t}\r\n\tthis.get = function(i=0){\r\n\t\tif(i<this.points.length){\r\n\t\t\treturn this.points[i].getpos();\r\n\t\t}\r\n\t\treturn null;\r\n\t}\r\n\tthis.set = function(pos,i=0,ad=false){\r\n\t\tif(i<this.points.length){\r\n\t\t\tthis.points[i].update(pos[0],pos[1],ad);\r\n\t\t}\r\n\t}\r\n\t//end\r\n\tthis.movepath = function(dl,dir=1){\r\n\t\tvar no = 0;\r\n\t\tvar limit = 50;\r\n\t\twhile(dl>0 && no<limit){\r\n\t\t\t//console.log(\"index is \" +this.index);\r\n\t\t\tvar ans = this.lines[this.index].pathmove(dl,this.linepos,dir);\r\n\t\t\t//console.log(\"ans is \" +ans);\r\n\t\t\tthis.linepos = ans[0];\r\n\t\t\tdl = ans[1];\r\n\t\t\tif(dl>0){\r\n\t\t\t\tthis.linepos = null;\r\n\t\t\t\tif(dir==-1){\r\n\t\t\t\t\tthis.index--;\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tthis.index++;\r\n\t\t\t\t}\r\n\t\t\t\tthis.adjindex();\r\n\t\t\t}\r\n\t\t\tno++;\r\n\t\t}\r\n\t\treturn this.linepos;\r\n\t}\r\n\tthis.adjindex = function(){\r\n\t\tif(this.index <0){\r\n\t\t\tthis.index += this.lines.length;\r\n\t\t}\r\n\t\tthis.index = this.index%this.lines.length;\r\n\t}\r\n\tthis.startpath = function(po,an=null){\r\n\t\tvar small = null;\r\n\t\tthis.index=0;\r\n\t\tfor(var i=0;i<this.lines.length;i++){\r\n\t\t\tvar ns = this.lines[i].startpoint(po,an);\r\n\t\t\tif(ns!=null){\r\n\t\t\t\tvar dist = myvec.length(ns,po);\r\n\t\t\t\tif(small== null || small>dist){\r\n\t\t\t\t\tsmall = dist;\r\n\t\t\t\t\tthis.linepos = ns;\r\n\t\t\t\t\tthis.index = i;\r\n\t\t\t\t\tthis.linevec = myvec.subtract(po,ns);\r\n\t\t\t\t\tthis.lineangle = this.lines[i].getangle();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn this.linepos;\r\n\t}\r\n\tthis.getpathpos = function(){\r\n\t\tif(this.linepos==null || this.linevec==null){\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tvar nl = this.lines[this.index];\r\n\t\t//var nan = nl.getangle() + myvec.getangle(this.linevec);\r\n\t\tvar nan = myvec.getangle(this.linevec) + this.getpathangle();\r\n\t\tvar nv = myvec.getvec(myvec.mag(this.linevec),nan);\r\n\t\treturn myvec.add(this.linepos,nv);\r\n\t}\r\n\tthis.getpathangle = function(){\r\n\t\tvar na = this.lines[this.index];\r\n\t\treturn (na.getangle()-this.lineangle);\r\n\t}\r\n\tthis.getpreview = function(){\r\n\t\treturn this.origin.preview;\r\n\t}\r\n\tthis.hasb = function(){\r\n\t\tfor(var i=0;i<this.lines.length;i++){\r\n\t\t\tif(this.lines[i].hasb()){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}\r\n\t//get more complex shape\r\n\tthis.getshape = function(){\r\n\t\treturn builder.drawshape(this.getpoints());\r\n\t}\r\n\t//path functions\r\n\tthis.initpath = function(){\r\n\t\tthis.clear();\r\n\t\tvar points = this.realpoints();\r\n\t\tfor(var i=0;i<points.length;i++){\r\n\t\t\tvar p = points[i].getpoint();\r\n\t\t\tthis.path.push(new point(p[0],p[1]));\r\n\t\t}\r\n\t\tthis.dir = this.getdir();\r\n\t}\r\n\tthis.getdir = function(){\r\n\t\tvar c1=0;\r\n\t\tvar c2=0;\r\n\t\tfor(var i=0;i<this.lines.length;i++){\r\n\t\t\tvar j = (i+1)%this.lines.length;\r\n\t\t\tvar d = this.linean(this.lines[i],this.lines[j]);\r\n\t\t\tif(d==1){\r\n\t\t\t\tc1++;\r\n\t\t\t}\r\n\t\t\tif(d==-1){\r\n\t\t\t\tc2++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(c2<c1){\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\treturn 1;\r\n\t}\r\n\tthis.linean = function(l1,l2){\r\n\t\tvar a1 = l1.getangle();\r\n\t\tvar a2 = l2.getangle();\r\n\t\tvar diff = a2-a1;\r\n\t\tif(diff<0){\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\tif(diff>0){\r\n\t\t\treturn 1;\r\n\t\t}\r\n\t\treturn 0;\r\n\t}\r\n\tthis.addafter = function(p,af = null){\r\n\t\tif(af==null){\r\n\t\t\tthis.path.push(p);\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tvar i = this.path.indexOf(af);\r\n\t\tvar ve = this.getvel();\r\n\t\tve = 1;\r\n\t\ti+=ve;\r\n\t\t//get the right location\r\n\t\twhile(true){\r\n\t\t\tif((ve>0 && i>=this.path.length) || (ve<0 && this.path.length<=0)){\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tvar l1 = myvec.length(af.getpoint(),this.path[i].getpoint());\r\n\t\t\t\tvar l2 = myvec.length(af.getpoint(),p.getpoint());\r\n\t\t\t\tif(l2<=l1){\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\telse if(!this.path[i].middle){\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\ti+=ve;\r\n\t\t\t\t\tif(i <0){\r\n\t\t\t\t\t\ti+= this.lines.length;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//i = i%this.lines.length;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis.path.splice(i,0,p);\r\n\t}\r\n\tthis.lookfor = function(p){\r\n\t\tvar po = p.getpoint();\r\n\t\tfor(var i=0;i<this.path.length;i++){\r\n\t\t\tif(myvec.length(po,this.path[i].getpoint())<0.00001){\r\n\t\t\t\treturn this.path[i];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}\r\n\tthis.lookpoint = function(po){\r\n\t\tvar points = this.realpoints();\r\n\t\tfor(var i=0;i<points.length;i++){\r\n\t\t\tif(myvec.length(po,points[i].getpoint())<0.00001){\r\n\t\t\t\treturn points[i];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}\r\n\tthis.find = function(p,mo=false){\r\n\t\tvar i = this.path.indexOf(p);\r\n\t\tif(i==-1){\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tthis.index = i;\r\n\t\tif(mo){\r\n\t\t\tthis.step();\r\n\t\t}\r\n\t\treturn p;\r\n\t}\r\n\t//\r\n\tthis.redirect = function(p,s2,ad=true){\r\n\t\tvar nex = this.step();\r\n\t\tthis.moveback();\r\n\t\tif(nex==null){\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t//Todo: use get vec for curves\r\n\t\tvar v = myvec.subtract(nex.getpoint(),p.getpoint());\r\n\t\t//v = myvec.mult(v,0.3);\r\n\t\tv = myvec.getvec(1,myvec.getangle(v));\r\n\t\tvar cp = myvec.add(p.getpoint(),v);\r\n\t\tconsole.log(collider.pointcollide(new point(cp[0],cp[1]),s2));\r\n\t\tif(collider.pointcollide(new point(cp[0],cp[1]),s2)){\r\n\t\t\tif(ad){\r\n\t\t\t\tthis.turn();\r\n\t\t\t}\r\n\t\t}\r\n\t\telse{\r\n\t\t\tif(!ad){\r\n\t\t\t\tthis.turn();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tthis.entering = function(p,s2){\r\n\t\tvar nex = this.step();\r\n\t\tthis.moveback();\r\n\t\tif(nex==null){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tconsole.log(\"passed\");\r\n\t\t//Todo: use get vec for curves\r\n\t\tvar v = myvec.subtract(nex.getpoint(),p.getpoint());\r\n\t\t//v = myvec.mult(v,0.3);\r\n\t\tv = myvec.getvec(1,myvec.getangle(v));\r\n\t\tvar cp = myvec.add(p.getpoint(),v);\r\n\t\tconsole.log(collider.pointcollide(new point(cp[0],cp[1]),s2));\r\n\t\tif(collider.pointcollide(new point(cp[0],cp[1]),s2)){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t\t\r\n\t}\r\n\t//change the direction of motion\r\n\tthis.turn = function(){\r\n\t\tif(this.dir==1){\r\n\t\t\tthis.dir = -1;\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tthis.dir = 1;\r\n\t}\r\n\tthis.step = function(){\r\n\t\tvar v = 1;\r\n\t\t//console.log(this.index);\r\n\t\tif(this.dir!=1){\r\n\t\t\tv=-1;\r\n\t\t}\r\n\t\tvar ans = this.path[this.index];\r\n\t\t//points[this.index].seen = true;\r\n\t\tthis.index +=v;\r\n\t\tthis.calindex();\r\n\t\tif(ans.seen){\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn ans;\r\n\t}\r\n\tthis.calindex = function(){\r\n\t\tif(this.index <0){\r\n\t\t\tthis.index += this.path.length;\r\n\t\t}\r\n\t\tthis.index = this.index%this.path.length;\r\n\t}\r\n\tthis.moveback = function(){\r\n\t\tvar v = 1;\r\n\t\tif(this.dir!=1){\r\n\t\t\tv=-1;\r\n\t\t}\r\n\t\tthis.index-=v;\r\n\t\tthis.calindex();\r\n\t}\r\n\tthis.clear = function(){\r\n\t\tfor(var i=0;i<this.path.length;i++){\r\n\t\t\tthis.path[i].seen = false;\r\n\t\t\tthis.path[i].middle = false;\r\n\t\t}\r\n\t\tthis.path = [];\r\n\t\tthis.index = 0;\r\n\t\tthis.dir = 1;\r\n\t\t\r\n\t}\r\n\tthis.semiclear = function(){\r\n\t\t\r\n\t}\r\n\tthis.getvel = function(){\r\n\t\tvar v = 1;\r\n\t\tif(this.dir!=1){\r\n\t\t\tv=-1;\r\n\t\t}\r\n\t\treturn v;\r\n\t}\r\n\t//end\r\n\tif(body){\r\n\t\tbody.lines.push(...this.lines);\r\n\t}\r\n\t\r\n\tthis.setconstraints = function(){\r\n\t\tfor(var i=0;i<this.lines.length;i++){\r\n\t\t\tvar j = (i+1)%this.lines.length;\r\n\t\t\tvar nc = new opposite(this.lines[i].h2,this.lines[j].h1);\r\n\t\t\tif(body){\r\n\t\t\t\tbody.constraint.push(nc);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t//add constraints\r\n\tif(this.lines.length>1){\r\n\t\tthis.setconstraints();\r\n\t}\r\n\t//getters and setters\r\n\tthis.setcolor = function(c){\r\n\t\tthis.color = c;\r\n\t\t//this.origin.color = c;\r\n\t}\r\n\tthis.setalpha = function(a){\r\n\t\tthis.alpha =a;\r\n\t\t//this.origin.alpha = a;\r\n\t}\r\n\tthis.getcolor = function(c){\r\n\t\treturn this.color;\r\n\t\t//return this.origin.color;\r\n\t}\r\n\tthis.getalpha = function(a){\r\n\t\treturn this.alpha;\r\n\t\t//return this.origin.alpha;\r\n\t}\r\n\tthis.addcollide = function(a){\r\n\t\tthis.origin.addcollide(a);\r\n\t}\r\n\tthis.setradius = function(v=0){\r\n\t\tvar points = this.realpoints();\r\n\t\tfor(var i=0;i<points.length;i++){\r\n\t\t\tpoints[i].r = v;\r\n\t\t}\r\n\t}\r\n\tthis.getradius = function(){\r\n\t\treturn this.realpoints()[0].r;\r\n\t}\r\n\t//line getters and setters\r\n\tthis.setlcolor = function(c){\r\n\t\tthis.lcolor = c;\r\n\t\t//this.origin.lcolor = c;\r\n\t}\r\n\tthis.setlalpha = function(a){\r\n\t\tthis.lalpha = a;\r\n\t\t//this.origin.lalpha = a;\r\n\t}\r\n\tthis.setlsize = function(a){\r\n\t\tthis.lsize = a;\r\n\t\t//this.origin.lsize = a;\r\n\t}\r\n\tthis.getlcolor = function(c){\r\n\t\treturn this.lcolor;\r\n\t\t//return this.origin.lcolor;\r\n\t}\r\n\tthis.getlalpha = function(a){\r\n\t\treturn this.lalpha;\r\n\t\t//return this.origin.lalpha;\r\n\t}\r\n\tthis.setshadow = function(x,y,bl,c=this.scolor){\r\n\t\tthis.soffx = x;\r\n\t\tthis.soffy = y;\r\n\t\tthis.sblur = bl;\r\n\t\tthis.scolor = c;\r\n\t}\r\n\tthis.getlsize = function(a){\r\n\t\treturn this.lsize;\r\n\t\t//return this.origin.lsize;\r\n\t}\r\n\t//end\r\n\tthis.mypoints = function(me=true){\r\n\t\treturn this.points;\r\n\t}\r\n\tthis.mylines = function(me=true){\r\n\t\treturn this.lines;\r\n\t}\r\n\tthis.myorigin = function(me=true){\r\n\t\treturn this.origin;\r\n\t}\r\n\t\r\n\tthis.setborder = function(co){\r\n\t\tvar points = this.realpoints();\r\n\t\tfor(var i=0;i<points.length;i++){\r\n\t\t\tpoints[i].container = co;\r\n\t\t}\r\n\t\tfor(var i=0;i<this.lines.length;i++){\r\n\t\t\tthis.lines[i].h1.container = co;\r\n\t\t\tthis.lines[i].h2.container = co;\r\n\t\t}\r\n\t\tthis.origin.oldcontainer = co;\r\n\t}\r\n\t//turn of bezier point\r\n\tthis.offbezier = function(){\r\n\t\tfor(var i=0;i<this.lines.length;i++){\r\n\t\t\tthis.lines[i].isb = false;\r\n\t\t}\r\n\t}\r\n\tthis.onborder = function(sh=null){\r\n\t\tvar points = this.realpoints();\r\n\t\tfor(var i=0;i<points.length;i++){\r\n\t\t\tpoints[i].atborder = true;\r\n\t\t\tpoints[i].myshape = sh;\r\n\t\t}\r\n\t}\r\n\t//add lines\r\n\tthis.addlines = function(nl){\r\n\t\tif(!this.ispath){\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t//this.lines.splice(0,1);\r\n\t\t//this.points.splice(this.points.length-1,1);\r\n\t\tif(nl.length>0){\r\n\t\t\tvar l = this.lastline();\r\n\t\t\t//var bl = new line(l.p2,nl[0].p2);\r\n\t\t\t//this.lines.push(bl);\r\n\t\t}\r\n\t\tfor(var i=1;i<nl.length;i++){\r\n\t\t\t//nl[i].reverse();\r\n\t\t\tvar bl = this.lastline();\r\n\t\t\tvar ol = nl[i].copy();\r\n\t\t\tif(bl!=null){\r\n\t\t\t\t//this.lockhandle(bl,ol);\r\n\t\t\t}\r\n\t\t\tthis.lines.push(ol);\r\n\t\t}\r\n\t\tthis.points = this.realpoints(); \r\n\t}\r\n\tthis.addpoints = function(pos){\r\n\t\tif(!this.ispath){\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tthis.lines.splice(this.lines.length-1,1);\r\n\t\tthis.points.splice(this.points.length-1,1);\r\n\t\tfor(var i=1;i<pos.length;i++){\r\n\t\t\tthis.push(pos[i]);\r\n\t\t}\r\n\t}\r\n\t//add a point to the end of the path\r\n\tthis.push = function(p,nor=true){\r\n\t\tif(!this.ispath){\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tvar pos = p.getpoint();\r\n\t\tvar l = this.getend();\r\n\t\tvar ep = this.pointcollide(pos[0],pos[1],false,true);\r\n\t\tvar over = false;\r\n\t\tif(nor && ep!=null && ep!=l && ep.end && this.points.length>2){\r\n\t\t\tp = ep;\r\n\t\t\tover = true;\r\n\t\t}\r\n\t\tif(this.ispath){\r\n\t\t\tl.end = false;\r\n\t\t\tp.end = true;\r\n\t\t\tif(!over){\r\n\t\t\t\tthis.points.push(p);\r\n\t\t\t\tvar l1 = this.lastline();\r\n\t\t\t\tthis.lines.push(new line(l,p));\r\n\t\t\t\tvar l2 = this.lastline();\r\n\t\t\t\tif(l1!=null){\r\n\t\t\t\t\tthis.lockhandle(l1,l2);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tthis.lines.splice(this.lines.length-1,1);\r\n\t\t\t\tthis.points.splice(this.points.length-1,1);\r\n\t\t\t\tl = this.getend();\r\n\t\t\t\tvar bl =this.lastline();\r\n\t\t\t\tthis.lines.push(new line(l,p));\r\n\t\t\t\tvar l1 = this.lastline();\r\n\t\t\t\tvar l2 = this.lines[0];\r\n\t\t\t\tif(bl!=null){\r\n\t\t\t\t\tthis.lockhandle(bl,l1);\r\n\t\t\t\t}\r\n\t\t\t\tif(l1!=null){\r\n\t\t\t\t\tthis.lockhandle(l1,l2);\r\n\t\t\t\t}\r\n\t\t\t\tbl.h2.adjust();\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tthis.removeorigin();\r\n\t\t\tthis.getorigin();\r\n\t\t\t/*\r\n\t\t\tif(this.Parent!=null){\r\n\t\t\t\tthis.Parent.addorigin(this.origin);\r\n\t\t\t}\r\n\t\t\t*/\r\n\t\t}\r\n\t\tif(over){\r\n\t\t\tthis.ispath = false;\r\n\t\t\tthis.showpoints = false;\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn p;\r\n\t}\r\n\t//get the last point added\r\n\tthis.getend = function(no=0){\r\n\t\treturn this.points[this.points.length-1-no];\r\n\t}\r\n\t//get the last line in the array\r\n\tthis.lastline = function(){\r\n\t\tif(this.lines.length ==0){\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn this.lines[this.lines.length-1];\r\n\t}\r\n\tthis.deleteend = function(){\r\n\t\tif(this.ispath){\r\n\t\t\tthis.lines.splice(this.lines.length-1,1);\r\n\t\t\tthis.points.splice(this.points.length-1,1);\r\n\t\t\tif(this.points.length>0){\r\n\t\t\t\tthis.points[this.points.length-1].end = true;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tthis.getlend = function(no=0){\r\n\t\tif((this.lines.length-no) <=0){\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn this.lines[this.lines.length-1-no];\r\n\t}\r\n\tthis.lockhandle = function(l1,l2){\r\n\t\tvar nc = new opposite(l1.h2,l2.h1);\r\n\t\tif(body){\r\n\t\t\tbody.constraint.push(nc);\r\n\t\t}\r\n\t}\r\n\t//functions\r\n\tthis.getpoints = function(off=false){\r\n\t\tvar ans = [];\r\n\t\tvar points = [];\r\n\t\tfor(var i=0;i<this.lines.length;i++){\r\n\t\t\tvar end = false;\r\n\t\t\tif(this.ispath && i == this.lines.length-1){\r\n\t\t\t\tend = true;\r\n\t\t\t}\r\n\t\t\tvar pos = this.lines[i].drawpoints(off,end);\r\n\t\t\tpoints.push(...pos);\r\n\t\t\t/*\r\n\t\t\tfor(var j=0;j<pos.length;j++){\r\n\t\t\t\tif(!ans.includes(pos[j])){\r\n\t\t\t\t\tans.push(pos[j]);\r\n\t\t\t\t\tpoints.push(...pos[j].getpoints());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t*/\r\n\t\t}\r\n\t\treturn points;\r\n\t}\r\n\t//get real point classes\r\n\tthis.realpoints = function(){\r\n\t\tvar ans = [];\r\n\t\tfor(var i=0;i<this.lines.length;i++){\r\n\t\t\tvar pos = this.lines[i].getpoints();\r\n\t\t\tfor(var j=0;j<pos.length;j++){\r\n\t\t\t\tif(!ans.includes(pos[j])){\r\n\t\t\t\t\tans.push(pos[j]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn ans;\r\n\t}\r\n\tthis.gethandles = function(){\r\n\t\tvar ans = [];\r\n\t\tvar al = false;\r\n\t\tif(body.tooltype == \"bezier\"){\r\n\t\t\tal = true;\r\n\t\t}\r\n\t\tfor(var i=0;i<this.lines.length;i++){\r\n\t\t\tans.push(...this.lines[i].gethandles(al));\r\n\t\t}\r\n\t\treturn ans;\r\n\t}\r\n\tthis.forcehandles = function(){\r\n\t\tvar ans = [];\r\n\t\tfor(var i=0;i<this.lines.length;i++){\r\n\t\t\tans.push(this.lines[i].h1);\r\n\t\t\tans.push(this.lines[i].h2);\r\n\t\t}\r\n\t\treturn ans;\r\n\t}\r\n\tif(body){\r\n\t\tbody.points.push(...this.realpoints());\r\n\t\tthis.points = this.realpoints();\r\n\t}\r\n\tthis.getorigin = function(){\r\n\t\tvar points = this.getpoints();\r\n\t\tvar sum = [0,0];\r\n\t\tvar count =0;\r\n\t\tfor(var i=0;i<points.length;i++){\r\n\t\t\tsum = myvec.add(sum,points[i]);\r\n\t\t\tcount++;\r\n\t\t}\r\n\t\tvar ans = [sum[0]/count,sum[1]/count];\r\n\t\tthis.origin = new point(ans[0],ans[1]);\r\n\t\tthis.addorigin(this.origin);\r\n\t}\r\n\t//point function\r\n\tthis.getpoint = function(){\r\n\t\tvar points = this.getpoints();\r\n\t\tvar sum = [0,0];\r\n\t\tvar count =0;\r\n\t\tfor(var i=0;i<points.length;i++){\r\n\t\t\tsum = myvec.add(sum,points[i]);\r\n\t\t\tcount++;\r\n\t\t}\r\n\t\treturn [sum[0]/count,sum[1]/count];\r\n\t}\r\n\tthis.getangle = function(){\r\n\t\tif(this.points.length>3){\r\n\t\t\tvar p1 = this.points[3].getpoint();\r\n\t\t\tvar p2 = this.points[0].getpoint();\r\n\t\t\tvar a = myvec.angle(p2,p1);\r\n\t\t\ta += (Math.PI/2);\r\n\t\t\treturn a;\r\n\t\t}\r\n\t\treturn this.origin.getangle();\r\n\t}\r\n\tthis.removeorigin = function(){\r\n\t\tvar points = this.realpoints();\r\n\t\tthis.angle = this.origin.getangle();//save angle\r\n\t\tfor(var i=0;i<points.length;i++){\r\n\t\t\tvar pos = points[i].getpoint();\r\n\t\t\tpoints[i].update(pos[0],pos[1]);\r\n\t\t\tpoints[i].removeconstraint(points[i].origin);\r\n\t\t\tpoints[i].origin = null;\r\n\t\t\tif(points[i].angle==0){\r\n\t\t\t\tpoints[i].angle = this.angle;//testing\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tthis.angle = points[i].angle;\r\n\t\t\t}\r\n\t\t\tvar ind = this.origin.children.indexOf(points[i]);\r\n\t\t\tbody.deleteEle(this.origin.children,ind);\r\n\t\t}\r\n\t\tthis.origin = null;\r\n\t}\r\n\tthis.ungroup = function(a=0){\r\n\t\tvar newa = a + this.angle;\r\n\t\tthis.removeorigin();\r\n\t\tthis.getorigin();\r\n\t\tthis.clearangle();//testing\r\n\t\tif(body){\r\n\t\t\tbody.bound(this,newa,false);\r\n\t\t}\r\n\t\t/*\r\n\t\tthis.origin.angle = newa;\r\n\t\tfor(var i=0;i<this.children.length;i++){\r\n\t\t\tthis.children[i].pos = this.origin;\r\n\t\t}\r\n\t\t*/\r\n\t}\r\n\tthis.clearangle = function(){\r\n\t\tvar points = this.realpoints();\r\n\t\tfor(var i=0;i<points.length;i++){\r\n\t\t\tpoints[i].angle = 0;\r\n\t\t}\r\n\t}\r\n\tthis.addorigin = function(ori,child= true){\r\n\t\tthis.origin = ori;\r\n\t\tvar points = this.realpoints();\r\n\t\tfor(var i=0;i<points.length;i++){\r\n\t\t\tvar pos = points[i].getpoint();\r\n\t\t\tvar np = myvec.subtract(pos,this.origin.getpoint());\r\n\t\t\tpoints[i].origin = this.origin;\r\n\t\t\tpoints[i].update(np[0],np[1]);\r\n\t\t}\r\n\t\tif(child){\r\n\t\t\tthis.origin.children.push(...points);\r\n\t\t}\r\n\t\t/*\r\n\t\tfor(var i=0;i<this.children.length;i++){\r\n\t\t\tthis.children[i].addorigin(this.origin);\r\n\t\t}\r\n\t\t*/\r\n\t\t\r\n\t}\r\n\tif(!copying){\r\n\t\tthis.getorigin();\r\n\t\tif(body){\r\n\t\t\tthis.origin.children.push(...this.realpoints());\r\n\t\t}\r\n\t}\r\n\t//transfer shape properties to self\r\n\tthis.transfer = function(ans){\r\n\t\tans.visible = this.visible;\r\n\t\t//copy properties\r\n\t\tans.color = this.color;\r\n\t\tans.alpha = this.alpha;\r\n\t\t//line variables\r\n\t\tans.lcolor = this.lcolor;\r\n\t\tans.lalpha = this.lalpha;\r\n\t\tans.lsize = this.lsize;\r\n\t\t//shadow variables\r\n\t\tans.soffx = this.soffx;\r\n\t\tans.soffy = this.soffy;\r\n\t\tans.sblur = this.sblur;\r\n\t\tans.scolor = this.scolor;\r\n\t}\r\n\tthis.beziertransfer = function(sh){\r\n\t\tfor(var a=0;a<this.lines.length;a++){\r\n\t\t\tfor(var b=0;b<sh.lines.length;b++){\r\n\t\t\t\tif(this.lines[a].hasb()){\r\n\t\t\t\t\tif(this.lines[a].isthesame(sh.lines[b])){\r\n\t\t\t\t\t\tthis.lines[a].transfer(sh.lines[b]);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(this.lines[a].risthesame(sh.lines[b])){\r\n\t\t\t\t\t\tthis.lines[a].rtransfer(sh.lines[b]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis.radiustransfer(sh);\r\n\t}\r\n\tthis.radiustransfer = function(sh){\r\n\t\tvar myp = this.realpoints();\r\n\t\tvar otp = sh.realpoints();\r\n\t\tfor(var a=0;a<myp.length;a++){\r\n\t\t\tfor(var b=0;b<otp.length;b++){\r\n\t\t\t\tif(myp[a].issame(otp[b])){\r\n\t\t\t\t\totp[b].r = myp[a].r;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tthis.copy = function(){\r\n\t\tvar lines = [];\r\n\t\tfor(var i=0;i<this.lines.length;i++){\r\n\t\t\tlines.push(this.lines[i].copy());\r\n\t\t}\r\n\t\tvar ori = this.origin.copy();\r\n\t\tvar ans = new shape(lines,true);\r\n\t\t//make good\r\n\t\tif(!this.visible){\r\n\t\t\tans = body.makesquare(this.origin.getpoint(),this.getwidth(),this.getheight(),false);\r\n\t\t}\r\n\t\tans.ispath = this.ispath;\r\n\t\tans.showpoints = this.showpoints;\r\n\t\tans.addorigin(ori);\r\n\t\t//clear copies\r\n\t\tthis.origin.clearcopy();\r\n\t\tvar points = this.realpoints();\r\n\t\tfor(var i=0;i<points.length;i++){\r\n\t\t\tpoints[i].clearcopy();\r\n\t\t}\r\n\t\tthis.transfer(ans);\r\n\t\t//this.beziertransfer(ans);\r\n\t\t//add children\r\n\t\tfor(var i=0;i<this.children.length;i++){\r\n\t\t\tthis.children[i].incopy(ans);\r\n\t\t}\r\n\t\treturn ans;\r\n\t}\r\n\tthis.getcopy = function(){\r\n\t\t//return this;\r\n\t\tvar ans = this.copy();\r\n\t\tif(this == body.tempshape){\r\n\t\t\tbody.storeshape = ans;\r\n\t\t\t//get temp pos\r\n\t\t\tif(body.temppos!=null){\r\n\t\t\t\tbody.storepos = this.lookpoint(body.temppos.getpoint());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\treturn ans;\r\n\t}\r\n\tthis.mirrowmove = function(axis){\r\n\t\t//mirrow handles\r\n\t\tfor(var i=0;i<this.lines.length;i++){\r\n\t\t\tthis.lines[i].mirrowhandle(axis);\r\n\t\t}\r\n\t\tvar points = this.realpoints();\r\n\t\tfor(var i=0;i<points.length;i++){\r\n\t\t\tpoints[i].mirrowmove(axis);\r\n\t\t}\r\n\t\tthis.origin.mirrowmove(axis);\r\n\t\tfor(var i=0;i<points.length;i++){\r\n\t\t\tpoints[i].addorigin(this.origin);\r\n\t\t}\r\n\t\t//consolidate handles\r\n\t\tfor(var i=0;i<this.lines.length;i++){\r\n\t\t\tthis.lines[i].fixhandles();\r\n\t\t}\r\n\t\t//mirrow shadow\r\n\t\tvar or = axis.p1.getpoint();\r\n\t\tvar sp = new point(this.soffx+or[0],this.soffy+or[1]);\r\n\t\tsp.mirrowmove(axis);\r\n\t\tsp = sp.getpoint();\r\n\t\tthis.soffx = sp[0]-or[0];\r\n\t\tthis.soffy = sp[1]-or[1];\r\n\t}\r\n\tthis.mirrow = function(axis){\r\n\t\tvar co = this.copy();\r\n\t\tco.mirrowmove(axis);\r\n\t\treturn co;\r\n\t}\r\n\tthis.move = function(dx,dy){\r\n\t\tthis.origin.move(dx,dy);\r\n\t}\r\n\tthis.rotatemove = function(dx,dy){\r\n\t\tthis.origin.rotatemove(dx,dy);\r\n\t}\r\n\tthis.dragmove = function(p1,p2){\r\n\t\tthis.origin.dragmove(p1,p2);\r\n\t}\r\n\tthis.findtext = function(){\r\n\t\tfor(var i=0;i<this.children.length;i++){\r\n\t\t\tif(this.children[i].name == \"text\"){\r\n\t\t\t\treturn this.children[i];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}\r\n\t//function\r\n\tthis.draw = function(){\r\n\t\tif(this.origin.preview){\r\n\t\t\t//draw all kids related\r\n\t\t\tfor(var i=0;i<this.children.length;i++){\r\n\t\t\t\tthis.children[i].draw();\r\n\t\t\t}\r\n\t\t\tif(this.children.length>0){\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t\tif(!this.visible){\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t\t//save\r\n\t\t\tvar ls = this.getlsize();\r\n\t\t\tvar lc = this.getlcolor();\r\n\t\t\tvar fs = this.getcolor();\r\n\t\t\t//setproperties\r\n\t\t\tthis.setlsize(2);\r\n\t\t\tthis.setcolor(\"#f8fc16\");\r\n\t\t\tthis.setlcolor(\"#f8fc16\");\r\n\t\t\t//draw\r\n\t\t\tvar points = this.getpoints();\r\n\t\t\tpoints = body.alltoscreen(points);//scale\r\n\t\t\tthis.doublestroke(points,\"#f8fc16\");\r\n\t\t\tcan.globalAlpha = 0.1;\r\n\t\t\tthis.fill(points);\r\n\t\t\tcan.globalAlpha = 1;\r\n\t\t\t//restore\r\n\t\t\tthis.setlsize(ls);\r\n\t\t\tthis.setcolor(fs);\r\n\t\t\tthis.setlcolor(lc);\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t//draw all kids related\r\n\t\tfor(var i=0;i<this.children.length;i++){\r\n\t\t\tthis.children[i].draw();\r\n\t\t}\r\n\t\tif(this.hide){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t//draw lines first\r\n\t\tvar points = this.getpoints();\r\n\t\tpoints = body.alltoscreen(points);//scale\r\n\t\tif(this.lineWidth>0){\r\n\t\t\tif(this.border){\r\n\t\t\t\tif(this.origin.colliding){\r\n\t\t\t\t\tthis.stroke(points,\"#a0a4aa\");\r\n\t\t\t\t\tthis.drawpoints(null,\"#a0a4aa\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tthis.doublestroke(points);\r\n\t\t\t\tif(this.showpoints){\r\n\t\t\t\t\tthis.drawpoints(null);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t//draw the polygon based on the points representing the shape\r\n\t\tif(this.visible && !this.ispath){\r\n\t\t\tcan.globalAlpha = this.getalpha();\r\n\t\t\tthis.fill(points);\r\n\t\t\tcan.globalAlpha = 1;\r\n\t\t\t//var po = this.origin.getpoint();\r\n\t\t\t//this.Point(po[0],po[1]);\r\n\t\t}\r\n\t\tif(!this.border){\r\n\t\t\tif(body.tooltype == \"bezier\"){\r\n\t\t\t\tthis.drawhandles();\r\n\t\t\t\tthis.drawselected();\r\n\t\t\t}\r\n\t\t\telse if(this.showpoints){\r\n\t\t\t\tthis.drawhandles();\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tthis.drawselected();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t}\r\n\tthis.drawhandles = function(){\r\n\t\tfor(var i=0;i<this.lines.length;i++){\r\n\t\t\tthis.lines[i].drawhandles(this.getlcolor());\r\n\t\t}\r\n\t}\r\n\tthis.fillshadow = function(){\r\n\t\tif(this.soffx!=0 || this.soffy!=0){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}\r\n\t//fill shape with a color\r\n\tthis.fill = function(points){\r\n\t\tcan.fillStyle=this.getcolor();\r\n\t\tif(this.fillshadow()){\r\n\t\t\tcan.shadowOffsetX = this.soffx;\r\n\t\t\tcan.shadowOffsetY = this.soffy;\r\n\t\t\tcan.shadowBlur = this.sblur;\r\n\t\t\tcan.shadowColor=this.scolor;\r\n\t\t}\r\n\t\tcan.beginPath();\r\n\t\tcan.moveTo(points[0][0],points[0][1]);\r\n\t\tfor(var i=0;i<points.length;i++){\r\n\t\t\tcan.lineTo(points[i][0],points[i][1]);\r\n\t\t}\r\n\t\tcan.fill();\r\n\t\tcan.closePath();\r\n\t\t//reset shadow\r\n\t\tcan.shadowOffsetX = 0;\r\n\t\tcan.shadowOffsetY = 0;\r\n\t\tcan.shadowBlur = 0;\r\n\t\t\r\n\t}\r\n\tthis.stroke = function(points,st=null){\r\n\t\tif(this.getlsize()==0){\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tcan.strokeStyle=\"black\";\r\n\t\tcan.lineWidth = this.lineWidth;\r\n\t\tvar ls = can.lineWidth;\r\n\t\tif(!this.iscontainer){\r\n\t\t\tcan.strokeStyle= this.getlcolor();\r\n\t\t\tcan.lineWidth = this.getlsize()*body.getscale();\r\n\t\t\tcan.globalAlpha = this.getlalpha();\r\n\t\t}\r\n\t\tif(st!=null){\r\n\t\t\tcan.strokeStyle=st;\r\n\t\t}\r\n\t\tcan.beginPath();\r\n\t\tcan.moveTo(points[0][0],points[0][1]);\r\n\t\tfor(var i=0;i<points.length;i++){\r\n\t\t\tcan.lineTo(points[i][0],points[i][1]);\r\n\t\t}\r\n\t\tif(!this.ispath){\r\n\t\t\tcan.lineTo(points[0][0],points[0][1]);\r\n\t\t}\r\n\t\tcan.stroke();\r\n\t\tcan.closePath();\r\n\t\tcan.globalAlpha = 1;\r\n\t\tcan.lineWidth = ls;\r\n\t}\r\n\tthis.doublestroke = function(points,st=null){\r\n\t\tthis.stroke(points,st);\r\n\t\tvar l = points.length;\r\n\t\tif(!this.ispath && l>2){\r\n\t\t\tvar np = [points[l-2],points[l-1]];\r\n\t\t\tfor(var i=0;i<points.length-2;i++){\r\n\t\t\t\tnp.push(points[i])\r\n\t\t\t}\r\n\t\t\tthis.stroke(np,st);\r\n\t\t}\r\n\t}\r\n\tthis.drawpoints = function(points=null,st=null){\r\n\t\tif(points==null){\r\n\t\t\tpoints = this.getpoints(true);\r\n\t\t\tpoints = body.alltoscreen(points);\r\n\t\t}\r\n\t\tfor(var i=0;i<points.length;i++){\r\n\t\t\t//var pos = points[i].getpoint();\r\n\t\t\tvar pos = points[i];\r\n\t\t\tthis.Point(pos[0],pos[1],st);\r\n\t\t}\r\n\t}\r\n\tthis.drawselected = function(){\r\n\t\tthis.drawpoints(this.selectedpoints());\r\n\t}\r\n\tthis.selectedpoints = function(){\r\n\t\tvar ans = [];\r\n\t\tvar points = this.realpoints();\r\n\t\tfor(var i=0;i<points.length;i++){\r\n\t\t\tif(points[i].colliding){\r\n\t\t\t\tans.push(points[i].getpoint());\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn ans;\r\n\t}\r\n\tthis.Point=function(x,y,st=null){\r\n\t can.fillStyle=\"black\";\r\n\t\tif(st!=null){\r\n\t\t\tcan.fillStyle=st;\r\n\t\t}\r\n\t\ts=4;\r\n\t\tcan.beginPath();\r\n\t\tcan.arc(x,y,s,0,2*Math.PI);\r\n\t\tcan.fill();\r\n\t\tcan.closePath();\r\n\t}\r\n\t//functions\r\n\tthis.shapecollide = function(sh){\r\n\t\treturn collider.collide(this,sh);\r\n\t}\r\n\t\r\n\tthis.collide = function(x,y){\r\n\t\tif(this.ispath){\r\n\t\t\tvar l = this.linecollide(x,y);\r\n\t\t\tif(l==null){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn collider.pointcollide(new point(x,y),this);\r\n\t}\r\n\tthis.linecollide = function(x,y){\r\n\t\tfor(var i=0;i<this.lines.length;i++){\r\n\t\t\tif(this.lines[i].collide([x,y])){\r\n\t\t\t\treturn this.lines[i];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}\r\n\tthis.reverse = function(){\r\n\t\tthis.points.reverse();\r\n\t\tthis.lines.reverse();\r\n\t\tfor(var i=0;i<this.lines.length;i++){\r\n\t\t\tthis.lines[i].reverse();\r\n\t\t}\r\n\t}\r\n\tthis.pointcollide = function(x,y,end=false,off=false){\r\n\t\tvar points = [];\r\n\t\t//add handles\r\n\t\tif(!off){\r\n\t\t\tpoints.push(...this.gethandles());\r\n\t\t}\r\n\t\t//add main points\r\n\t\tpoints.push(...this.realpoints());\r\n\t\tvar r = 9;\r\n\t\tfor(var i=0;i<points.length;i++){\r\n\t\t\tvar cu = new curve(points[i].getpoint(),r,r);\r\n\t\t\tif(collider.pointcurvecollide(new point(x,y),cu)){\r\n\t\t\t\tif(end){\r\n\t\t\t\t\tif(points[i].end){\r\n\t\t\t\t\t\treturn points[i];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\treturn points[i];\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}\r\n}", "title": "" }, { "docid": "4d0e2cb4d9890e206afc146964f0e9a9", "score": "0.50581557", "text": "function processGeoJSON(d, geo)\n {\n // reproject from spherical mercator to WGS84\n function reproject(c)\n {\n var i, lat, lon, pi180 = 180 / Math.PI, pi2 = Math.PI / 2,\n mercx = 180.0/20037508.34, way=[],\n maxlon = -Infinity, minlon = Infinity, w;\n\n for (i = 0; i < c.length; ++i) {\n lon = c[i][0] * mercx;\n lat = pi180 * (2.0 * Math.atan(Math.exp(c[i][1] * mercx / pi180)) - pi2);\n // exploit that OSM objects never cross the 180/-180 line\n if (lon > maxlon) maxlon = lon;\n if (lon < minlon) minlon = lon;\n // lattitude is not a problem\n if (lat > geo.maxlat) geo.maxlat = lat;\n if (lat < geo.minlat) geo.minlat = lat;\n way.push({ lat : lat, lon : lon });\n }\n\n // adjust the longitudinal extents\n if (!('maxlon' in geo) || !('maxlon' in geo)) {\n geo.maxlon = maxlon;\n geo.minlon = minlon;\n } else {\n w = [{ r: Math.max(geo.maxlon, maxlon), l: Math.min(geo.minlon, minlon) },\n { r: Math.max(geo.maxlon, maxlon + 360), l: Math.min(geo.minlon, minlon + 360)},\n { r: Math.max(geo.maxlon + 360, maxlon), l: Math.min(geo.minlon + 360, minlon)}];\n w.sort(function(a, b) { return (a.r - a.l) - (b.r - b.l); });\n geo.minlon = w[0].l;\n geo.maxlon = w[0].r;\n }\n return way;\n }\n\n function parsePolygon(p)\n {\n var area = { outer: [], inner: [] }, i;\n area.outer.push(reproject(p[0]));\n for (i=1; i<p.length; i++) {\n area.inner.push(reproject(p[i]));\n }\n\n if (geo.areas) {\n geo.areas.push(area);\n } else {\n geo.areas = [area];\n }\n }\n\n function parseLineString(l)\n {\n var ways = [ reproject(l) ];\n if (geo.ways) {\n geo.ways.push.apply(geo.ways, ways);\n } else {\n geo.ways = ways;\n }\n }\n\n function parseGeometry(g)\n {\n var i;\n switch (g.type)\n {\n case \"LineString\":\n parseLineString(g.coordinates);\n break;\n\n case \"MultiLineString\":\n for (i=0; i<g.coordinates.length; i++)\n parseLineString(g.coordinates[i]);\n break;\n\n case \"Polygon\":\n parsePolygon(g.coordinates);\n break;\n\n case \"MultiPolygon\":\n for (i=0; i<g.coordinates.length; i++)\n parsePolygon(g.coordinates[i]);\n break;\n }\n }\n // process different types\n var i;\n if (!('type' in d)) { return; }\n\n if (d.type == 'GeometryCollection')\n {\n for (i = 0; i < d.geometries.length; ++i) {\n parseGeometry(d.geometries[i]);\n }\n } else {\n parseGeometry(d);\n }\n }", "title": "" }, { "docid": "b9e2aef912bff6b3d01457516786f028", "score": "0.50558525", "text": "function reset() {\n var bounds = d3path.bounds(user1Points),\n topLeft = bounds[0],\n bottomRight = bounds[1];\n\n\n // here you're setting some styles, width, heigh etc\n // to the SVG. Note that we're adding a little height and\n // width because otherwise the bounding box would perfectly\n // cover our features BUT... since you might be using a big\n // circle to represent a 1 dimensional point, the circle\n // might get cut off.\n\n // text.attr(\"transform\",\n // function(d) {\n // return \"translate(\" +\n // applyLatLngToLayer(d).x + \",\" +\n // applyLatLngToLayer(d).y + \")\";\n // });\n\n\n // for the points we need to convert from latlong\n // to map units\n begend.attr(\"transform\",\n function(d) {\n return \"translate(\" +\n applyLatLngToLayer(d).x + \",\" +\n applyLatLngToLayer(d).y + \")\";\n });\n\n ptFeatures.attr(\"transform\",\n function(d) {\n return \"translate(\" +\n applyLatLngToLayer(d).x + \",\" +\n applyLatLngToLayer(d).y + \")\";\n });\n\n // again, not best practice, but I'm harding coding\n // the starting point\n\n marker.attr(\"transform\",\n function() {\n var y = featuresdata[0].geometry.coordinates[1]\n var x = featuresdata[0].geometry.coordinates[0]\n return \"translate(\" +\n map.latLngToLayerPoint(new L.LatLng(y, x)).x + \",\" +\n map.latLngToLayerPoint(new L.LatLng(y, x)).y + \")\";\n });\n\n\n // Setting the size and location of the overall SVG container\n svg1.attr(\"width\", bottomRight[0] - topLeft[0] + 120)\n .attr(\"height\", bottomRight[1] - topLeft[1] + 120)\n .style(\"left\", topLeft[0] - 50 + \"px\")\n .style(\"top\", topLeft[1] - 50 + \"px\");\n\n\n // linePath.attr(\"d\", d3path);\n linePath.attr(\"d\", toLine)\n // ptPath.attr(\"d\", d3path);\n g1.attr(\"transform\", \"translate(\" + (-topLeft[0] + 50) + \",\" + (-topLeft[1] + 50) + \")\");\n\n } // end reset", "title": "" }, { "docid": "3f248232ebae2b83a2a4e56512806a1f", "score": "0.505536", "text": "function borraDatosPolygonPorPartes(){\n\t\tfor (var i = 0; i < arrayDePolygon.length; i++) {\n\t\t\tfor (var j = 0; j< arrayDePolygon[i].getPath().length; j++) {\n\t\t\t\tarrayDePolygon[i].getPath().pop();\n\t\t\t}\n\t\t}\n\t\tarrayDePolygon.length=0;\n\t\tarrayDePath.length=0;\n\t\tposArrayPathPintadoMapa=0;\n\t}", "title": "" }, { "docid": "0a183f894c84bfc0af7dbabf4061d7ae", "score": "0.50513864", "text": "function handleFileSelect(evt) {\n\t\t\n\t\tvar routeFile = evt.target.files[0]; //Uploaded File\n\t\t\t\t\t\n\t\tif(routeFile){\n\t\t\treader.onload=function(){\n\t\t\tvar text = reader.result;\n\t\t\tconvertToDOM(text);\n\t\t}\n\n\t\treader.onerror=function(){\n\t\t\talert('File Could Not Be Read!');\n\t\t}\n\t\t\n\t\treader.readAsText(routeFile);\t\n\t\t}\n\t\n\t\n\t\tfunction convertToDOM(file){\n\t\t\t\n\t\t\tvar pathsArray=[]; //Holds The parsed GPX Coordinates\n\t\t\tvar lineColor;\n\t\t\t\n\t\t\txmlDoc = parser.parseFromString(file,\"text/xml\")//Parse Files\n\t\t\t\n\t\t\t//Get Track and Route Node List\n\t\t\tvar trkptNodeList=xmlDoc.getElementsByTagName('trkpt');\n\t\t\tvar rteptNodeList=xmlDoc.getElementsByTagName('rtept');\n\t\t\t\n\t\t\t//Add Track first if it exists\n\t\t\tif(trkptNodeList.length>1){\n\t\t\t\t//Orange for Tracks\n\t\t\t\tlineColor = [226,119,40];\n\t\t\t\tfor(var i =0;i<trkptNodeList.length;i++){\n\t\t\t\t\tvar lat=parseFloat(trkptNodeList[i].getAttribute(\"lat\"));\n\t\t\t\t\tvar lon=parseFloat(trkptNodeList[i].getAttribute(\"lon\"));\t\t\t\t\t\t\n\t\t\t\t\tpathsArray.push([lon,lat]);\n\t\t\t\t}\n\t\t\t//Add Route if Track doesn't exist\t\t\t\n\t\t\t}else if(rteptNodeList.length>1){\n\t\t\t\tlineColor = [0, 191, 255];\n\t\t\t\tfor(var i =0;i<rteptNodeList.length;i++){\n\t\t\t\t\tvar lat=parseFloat(rteptNodeList[i].getAttribute(\"lat\"));\n\t\t\t\t\tvar lon=parseFloat(rteptNodeList[i].getAttribute(\"lon\"));\t\t\t\t\t\t\n\t\t\t\t\tpathsArray.push([lon,lat]);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\talert('File Could Not Be Read!');\n\t\t\t}\n\t\t\t\n\t\t\t//Line Vectors\n\t\t\tvar polyline = {\n\t\t\t\ttype: \"polyline\", // autocasts as new Polyline()\n\t\t\t\tpaths:pathsArray \n\t\t\t\t};\n\n\t\t\t//Line Details\n\t\t\tlineSymbol = {\n\t\t\t type: \"simple-line\", // autocasts as SimpleLineSymbol()\n\t\t\t color: [226, 119, 40],\n\t\t\t width: 4\n\t\t\t};\n\n\t\t\t//Graphic Object(Vectors + Line Details)\n\t\t\tvar polylineGraphic = new Graphic({\n\t\t\t geometry: polyline,\n\t\t\t symbol: lineSymbol\n\t\t\t});\n\t\t\t\t\n\t\t\t//Coordinates to Move Camera Too\n\t\t\tvar goToLat=Number.parseFloat(pathsArray[0][1]).toFixed(2);\n\t\t\tvar goToLon=Number.parseFloat(pathsArray[0][0]).toFixed(2)\n\t\t\t\t\n\n\t\t\t//Camera Object(holds details of a View)\t\n\t\t\tvar cam = new Camera({\n\t\t\t\tposition: new Point({\n\t\t\t\t\tx: goToLon, // lon\n\t\t\t\t\ty: goToLat, // lat\n\t\t\t\t\tz: 30000, // elevation in meters\n\t\t\t\t}),\n\t\t\t\theading: 180, // facing due south\n\t\t\t\ttilt: 0 // bird's eye view\n\t\t\t});\n\n\t\t\t//Move Camera to route/trk added\t\n\t\t\tview.goTo(cam);\t\n\n\t\t\t//Add The route to the graphics layer\n\t\t\tgraphicsLayer.add(polylineGraphic);\n\t\t\t\n\n\n\t\t}\n\t}", "title": "" }, { "docid": "5a33a4113a33d9ac0a8e40f0f546c4ec", "score": "0.504874", "text": "_calculateBounds() {\n this.calculateVertices(), this._bounds.addVertexData(this.vertexData, 0, this.vertexData.length);\n }", "title": "" }, { "docid": "2ba7390b2d7cc340fca673b9d7e7eaf8", "score": "0.504781", "text": "function processor(node) {\n var pType = node.geometry.type;\n //ignore all the other details\n if(pType === 'Polygon' || pType === 'MultiPolygon'){\n //console.log(counter + ':');\n output = 'geoR:' + node.id + ' a geoV:AdministrativeArea ; ';\n output = output + 'geoV:level \"'+flickrLevels[node.properties.place_type]+'\"^^xsd:integer ; ';\n output = output + 'geoV:WOE \"\"\"' + node.properties.woe_id + '\"\"\" ; ';\n //extract the country name\n var tmpp = node.properties.label.split(',');\n var countryName = tmpp [tmpp.length-1];\n if(node.properties.place_type=='country'){\n output = output + 'dcterms:title \"\"\"' + node.properties.label + '\"\"\" ; ';\n }else{\n output = output + 'dcterms:title \"\"\"' + node.properties.label.replace(',' + countryName,'') + '\"\"\" ; ';\n }\n output = output + 'geoV:ISO \"\"\"' + convertInputToISO3(countryName) + '\"\"\" ; ';\n output = output + 'geoV:placeID \"\"\"' + node.properties.place_id + '\"\"\" ; ';\n output = output + 'dcterms:created \"' + node.geometry.created + '\" ; ';\n output = output + 'schema:downloadUrl <' + node.geometry.link.href+ '> ; ';\n output = output + 'ngeo:bbox \"BOX2D(' + node.geometry.bbox[0] +' '+ node.geometry.bbox[1] + ',' + node.geometry.bbox[2] +' '+node.geometry.bbox[3] + ')\"^^<http://www.openlinksw.com/schemas/virtrdf#Geometry> ; ';\n output = output + 'geoV:shapeType \"' + pType+ '\" ; ';\n if(pType === 'Polygon'){\n var tmpp = [];\n _.forEach(node.geometry.coordinates[0], function(coordinate, ii) {\n tmpp.push(coordinate.join(' '));\n });\n output = output + 'geo:geometry \"POLYGON((' + tmpp.join(',') + '))\"^^<http://www.openlinksw.com/schemas/virtrdf#Geometry> .';\n //console.log('POLYGON((' + tmpp.join(',') + '))');\n } else if(pType === 'MultiPolygon'){\n var tmppTop = [];\n _.forEach(node.geometry.coordinates, function(coordinateset, ii) {\n var tmpp = [];\n _.forEach(coordinateset[0], function(coordinate, iii) {\n tmpp.push(coordinate.join(' '));\n });\n tmppTop.push('((' + tmpp.join(',') + '))');\n });\n output = output + 'geo:geometry \"MULTIPOLYGON(' + tmppTop.join(',') + ')\"^^<http://www.openlinksw.com/schemas/virtrdf#Geometry> .';\n //console.log('MULTIPOLYGON(' + tmppTop.join(',') + ')');\n }\n console.log(output);\n }\n}", "title": "" }, { "docid": "393cc77a20e4a43a90058003086946f0", "score": "0.5037407", "text": "function handleData(data)\n{\n\t//An example of how to deal with the data - you will instead be creating graph elements\n\tfor (var i = 0; i < data.length; i++)\n\t{\n\t\tif (i ==0 ) //we ignore the first row, the header row\n\t\t\tcontinue;\n\t\t\n\t\t//In this loop - instead of just adding data to the page, use the data to create\n\t\t//shapes (or meshes) and position them according to their info\n\t\tvar div = document.createElement(\"div\");\n\t\t$(div).text(\"place: \" + data[i][0] + \" time: \" + data[i][3] + \"e: \" + data[i][6]);\n\t\t$('article.attachPoint').append(div);\n\t}\n\t\n}", "title": "" }, { "docid": "81a48943e4b921a6e20b544060a2a6bc", "score": "0.5035731", "text": "findArea(path) {\n\n // Clone path object before calling _findAreaRec because it is changed in \n return this._findAreaRec(new Path(path.toString()));\n \n }", "title": "" }, { "docid": "f40651c21d5fd6933bc452af3d281a59", "score": "0.50329685", "text": "getGeometry(outerShape, holes, options = {}) {\n\n options = Object.assign(extruder.getDefaultOptions(), options);\n extruder.convertInputToHolesInConvention(outerShape, holes);\n extruder.generateDebugLink(outerShape, holes, options)\n\n // get the topology 2D paths by depth\n const data = extruder.getDataByDepth(outerShape, holes);\n const outerPathsByDepth = data.outerPathsByDepth;\n const innerPathsByDepth = data.innerPathsByDepth;\n const horizontalPathsByDepth = data.horizontalPathsByDepth;\n\n if (options.doNotBuild) {\n pathHelper.scaleUpPaths(options.doNotBuild);\n extruder.markAsForbidden(outerPathsByDepth, options.doNotBuild);\n extruder.markAsForbidden(innerPathsByDepth, options.doNotBuild);\n }\n\n uvHelper.mapVertical(outerPathsByDepth, outerShape, options);\n\n const res = {};\n\n if (options.frontMesh) {\n res.frontMesh = extruder.getHorizontalGeom(horizontalPathsByDepth,innerPathsByDepth, [0], 0, !options.doNotInvertFrontNormal);\n uvHelper.mapHorizontal(innerPathsByDepth, outerShape, res.frontMesh, options);\n }\n if (options.backMesh) {\n res.backMesh = extruder.getHorizontalGeom(horizontalPathsByDepth, innerPathsByDepth, [horizontalPathsByDepth.length - 1], 0, options.invertBackNormal);\n uvHelper.mapHorizontal(innerPathsByDepth, outerShape, res.backMesh, options);\n }\n if (options.inMesh) {\n uvHelper.mapVertical(innerPathsByDepth, outerShape, options);\n res.inMesh = extruder.getVerticalGeom(innerPathsByDepth, 0, true, options.mergeVerticalGeometries);\n }\n if (options.horizontalMesh) {\n const indexes = [];\n for (let i = 1; i < horizontalPathsByDepth.length - 1; i++) {\n indexes.push(i);\n }\n const meshHor = extruder.getHorizontalGeom(horizontalPathsByDepth, innerPathsByDepth, indexes, 0);\n if (meshHor) {\n uvHelper.mapHorizontal(innerPathsByDepth, outerShape, meshHor, options);\n }\n res.horizontalMesh = meshHor;\n }\n if (options.outMesh) {\n const outMesh = extruder.getVerticalGeom(outerPathsByDepth, 0, true, options.mergeVerticalGeometries);\n res.outMesh = outMesh;\n }\n\n return res;\n }", "title": "" }, { "docid": "c2a1bf1042ddac2b8b4110589b8494ea", "score": "0.50293124", "text": "function handleDrawing(e) {\n var docUrl = baseUrl+db+\"/_design/geoTrips/_geo/geo\"; // Basis Dokument URL\n\n // Abfrage des Typs der Zeichnung\n if(e.layerType == \"circle\") {\n docUrl += '?radius='+e.layer._mRadius+'&lon='+e.layer._latlng.lng+'&lat='+e.layer._latlng.lat+'&relation=contains&limit=200&include_docs=true'; // Cloudant Geo doesn't accept LatLong, instead it's LongLat for some reason...\n }else if( (e.layerType == \"rectangle\") || (e.layerType == \"polygon\") ) {\n docUrl += '?g=POLYGON( ('; // Cloudant Geo Polygon\n // Füge für jeden Punkt Lat und Lng ein\n e.layer._latlngs.forEach(function(latlng) {\n docUrl += latlng.lng+'%20'+latlng.lat+',';\n });\n docUrl += e.layer._latlngs[0].lng+'%20'+e.layer._latlngs[0].lat // The first Point needs to be the last as well\n docUrl += '))&relation=contains&include_docs=true'; // Alle Punkte die innerhalt des Polygons sind anzeigen\n }else if(e.layerType == \"marker\"){\n getLocation(e);\n }\n\n if(e.handler == \"edit\") {\n swal(\"Error\", \"Editing is not supported right now\", \"error\")\n }\n\n if( (e.layerType == \"circle\") || (e.layerType == \"rectangle\") || (e.layerType == \"polygon\") ) {\n\n function parse (data) { // After the call is done\n var doc = JSON.parse(data); // Parse JSON Data into Obj. doc\n var myMarkers = Array();\n\n for(var i=0; i < doc.rows.length; i++) { // Go through each Document and insert into Dropdown\n var point_id = doc.rows[i].doc.id;\n console.log(point_id);\n var popupContent = '<input type=\"button\" value=\"Test\">'\n var myMarker = L.marker([doc.rows[i].doc.geometry.coordinates[1], doc.rows[i].doc.geometry.coordinates[0]], {clickable:true, riseOnHover:true}).bindPopup(popupContent);;\n myMarker.routeNumber = i;\n myMarker.on(\"mousedown\", function(e) {\n $('#routes_combo :nth-child('+e.target.routeNumber+')').prop('selected', true); // To select via index\n $('#routes_combo :nth-child('+e.target.routeNumber+')').change(); // Trigger the change event\n e.id = point_id; // Save the point ID in the event\n createCirclePopup(e);\n });\n myMarkers.push(myMarker);\n\n if(doc.bookmark) {\n if(doc.bookmark != currentBookmark) {\n ajaxGet(docUrl+\"&bookmark=\"+doc.bookmark, parse);\n currentBookmark = doc.bookmark;\n }else{\n searchFinished = true;\n }\n }\n };\n\n if(searchFinished) {\n pickupMarkerGroup = L.layerGroup(myMarkers).addTo(map);\n searchFinished = false;\n }\n };\n\n ajaxGet(docUrl, parse);\n }\n }", "title": "" }, { "docid": "d7c5f9f5b7d89a398770b7b6b4cbe6d0", "score": "0.5026386", "text": "function draw(data,map_svg,path,source,z)\n\t{\n\n\t\tvar subset = map_svg.insert(\"g\",\":first-child\")\n\t\t\t\t\t\t\t.attr(\"z\",z)\n\t\t\t\t\t\t\t.order('z')\n\t\t\t\t\t\t\t.attr(\"id\",source);\n\t\tsubset.selectAll(\"path\")\n\t\t\t\t.data(data.features)\n\t\t\t\t.enter()\n\t\t\t\t.append(\"path\")\n\t\t\t\t.attr(\"d\", path);\t\n\t}", "title": "" }, { "docid": "d7e8e80b76d95f0555ee6ab85d2da753", "score": "0.50192744", "text": "function render(land, data, type, path) {\n // standard colors from seaborn\n const colors = [\"#4c72b0\",\"#dd8452\",\"#55a868\",\"#c44e52\",\"#8172b3\",\"#937860\",\"#da8bc3\",\"#8c8c8c\",\"#ccb974\",\"#64b5cd\",\n \"#2e456b\",\"#865032\",\"#34663f\",\"#772f32\",\"#4e456d\",\"#59493a\",\"#845476\",\"#666666\",\"#7c7046\",\"#3d6e7c\",\n \"#9b59b6\",\"#3498db\",\"#95a5a6\",\"#e74c3c\",\"#34495e\",\"#2ecc71\"];\n\n // get svg\n const map_svg = d3.select(\"#visualization-svg\")\n\n // rendering of sphere with countries\n map_svg.select(\"#land\")\n .datum(land)\n .attr(\"d\", path);\n\n // rendering of data\n // the render functions are loaded from visualization-render-func.js (loaded in HTML file)\n switch (type) {\n case \"broker-bg\":\n renderDataBrokerBG(data, colors, path);\n break;\n case \"broker-dis-gb-events\":\n renderDataBrokerDisGB(data, colors, path);\n break;\n case \"broker-dis-gb-subscriptions\":\n renderDataBrokerDisGB(data, colors, path);\n break;\n case \"broker-flooding-events\":\n renderDataBrokerDisGB(data, colors, path);\n break;\n case \"broker-flooding-subscriptions\":\n renderDataBrokerDisGB(data, colors, path);\n break;\n case \"broker-gqps\":\n renderDataBrokerGQPS(data, colors, path);\n break;\n case \"broker-dht\":\n renderDataBrokerDHT(data, colors, path);\n break;\n default: // no-data\n break;\n }\n}", "title": "" }, { "docid": "ba2e1e3b3de68199abcbb18659f48b9e", "score": "0.50187844", "text": "function processMultiGeometry() {\n const subType = type.replace(Constants.geojsonTypes.MULTI_PREFIX, '');\n coordinates.forEach((subCoordinates, index) => {\n const subFeature = {\n type: Constants.geojsonTypes.FEATURE,\n properties: geojson.properties,\n geometry: {\n type: subType,\n coordinates: subCoordinates\n }\n };\n supplementaryPoints = supplementaryPoints.concat(createSupplementaryPoints(subFeature, options, index));\n });\n }", "title": "" }, { "docid": "4c2dbd78836df59c6a1200bba3d5353a", "score": "0.5014479", "text": "updatePathFollowingInfos(path) {\n if (path.segments.length < 3)\n return;\n const geom = this.geom;\n const pre = path.segments[path.segments.length - 3];\n const last = path.segments[path.segments.length - 2];\n const polylines = geom.findPath(pre, last);\n if (polylines.length > 0) {\n this.pathToFollowInfos = {index: -1, polylines: polylines, p1: pre.point, p2: last.point};\n\n } else {\n this.pathToFollowInfos = null;\n\n }\n this.updateCommands();\n }", "title": "" }, { "docid": "bf58d56f21096940d29ef68994e1a1d0", "score": "0.50141734", "text": "drawGeoPolygons(layer,features,pathFunction) {\n layer.selectAll(\"path\")\n .data(features)\n .enter().append(\"path\")\n .attr(\"class\",function(d,i){\n return \"regionPolygon region\"+d[\"properties\"][this.indexColumnName];\n }.bind(this))\n .attr(\"d\",pathFunction)\n .attr(\"stroke-linejoin\",\"round\")\n .attr(\"stroke\",this.regionStrokeColor[0])\n .attr(\"stroke-width\",this.regionStrokeWidth[0]/this.currentZoomK);\n }", "title": "" }, { "docid": "bec1b821d562a2b6e14af11e13b3dc3e", "score": "0.5013551", "text": "function createPathString2(data) {\n\t\t\t\n\t\t\t var points = data.charts[data.current].points;\n\t\t\t\n\t\t\t \n\t\t\t\tvar path = 'M 25 291 L ' + data.xOffset + ' ' + (data.yOffset - points[0].value);\n\t\t\t\tvar prevY = data.yOffset - points[0].value;\n\t\t\t\n\t\t\t\tfor (var i = 1, length = points.length; i < length; i++) {\n\t\t\t\t\tpath += ' L ';\n\t\t\t\t\tpath += data.xOffset + (i * data.xDelta) + ' ';\n\t\t\t\t\t\n\t\t\t\t\tpath += (data.yOffset - points[i].value);\n\t\t\t\n\t\t\t\t\tprevY = data.yOffset - points[i].value;\n\t\t\t\t}\n\t\t\t\t//path += ' L 989 291 Z';\n\t\t\t\tpath += ' L 450 291 Z';\n\t\t\t\treturn path;\n\t\t\t}", "title": "" }, { "docid": "bad1dc9ed8040a6c9464cd8ba98e4a0b", "score": "0.50119805", "text": "postProcess() {\n this.x1 = Math.round(this.x1);\n this.y1 = Math.round(this.y1);\n\n this.x2 = Math.round(this.x2);\n this.y2 = Math.round(this.y2);\n\n this.x3 = Math.round(this.x3);\n this.y3 = Math.round(this.y3);\n\n this.x4 = Math.round(this.x4);\n this.y4 = Math.round(this.y4);\n }", "title": "" }, { "docid": "bad1dc9ed8040a6c9464cd8ba98e4a0b", "score": "0.50119805", "text": "postProcess() {\n this.x1 = Math.round(this.x1);\n this.y1 = Math.round(this.y1);\n\n this.x2 = Math.round(this.x2);\n this.y2 = Math.round(this.y2);\n\n this.x3 = Math.round(this.x3);\n this.y3 = Math.round(this.y3);\n\n this.x4 = Math.round(this.x4);\n this.y4 = Math.round(this.y4);\n }", "title": "" }, { "docid": "bad1dc9ed8040a6c9464cd8ba98e4a0b", "score": "0.50119805", "text": "postProcess() {\n this.x1 = Math.round(this.x1);\n this.y1 = Math.round(this.y1);\n\n this.x2 = Math.round(this.x2);\n this.y2 = Math.round(this.y2);\n\n this.x3 = Math.round(this.x3);\n this.y3 = Math.round(this.y3);\n\n this.x4 = Math.round(this.x4);\n this.y4 = Math.round(this.y4);\n }", "title": "" }, { "docid": "22739040b57a945ae8bd204247956159", "score": "0.5011362", "text": "function createPolygonPath(data, color, artboardName, boundingBoxes, currentPathIndex) {\n return createPath(data, color, artboardName, boundingBoxes, currentPathIndex);\n}", "title": "" }, { "docid": "4b7f8383c4c5c944f99d9b598ff4bd6b", "score": "0.5000778", "text": "static Process(geojson, topojson, headers, originPoint, _style, _properties, _pointGeometry) {\n return new Promise((resolve, reject) => {\n GeoJSONWorkerLayer.ProcessGeoJSON(geojson, headers).then((res) => {\n var geojson = res;\n\n if (!geojson.features) {\n // Collects features into a single FeatureCollection\n //\n // Also converts TopoJSON to GeoJSON if instructed\n geojson = GeoJSON.collectFeatures(geojson, topojson);\n }\n\n // TODO: Check that GeoJSON is valid / usable\n\n var features = geojson.features;\n\n // TODO: Run filter, if provided (must be static)\n\n var pointScale;\n var polygons = [];\n var polylines = [];\n var points = [];\n\n // Deserialise style function if provided\n if (typeof _style === 'string') {\n _style = Stringify.stringToFunction(_style);\n }\n\n // Assume that a style won't be set per feature\n var style = _style;\n\n var pointGeometry;\n // Deserialise pointGeometry function if provided\n if (typeof _pointGeometry === 'string') {\n pointGeometry = Stringify.stringToFunction(_pointGeometry);\n }\n\n var feature;\n for (var i = 0; i < features.length; i++) {\n feature = features[i];\n\n var geometry = feature.geometry;\n var coordinates = (geometry.coordinates) ? geometry.coordinates : null;\n\n if (!coordinates || !geometry) {\n return;\n }\n\n // Get per-feature style object, if provided\n if (typeof _style === 'function') {\n style = extend({}, GeoJSON.defaultStyle, _style(feature));\n // console.log(feature, style);\n }\n\n if (geometry.type === 'Polygon' || geometry.type === 'MultiPolygon') {\n coordinates = (PolygonLayer.isSingle(coordinates)) ? [coordinates] : coordinates;\n\n var converted = coordinates.map(_coordinates => {\n return _coordinates.map(ring => {\n return ring.map(coordinate => {\n return LatLon(coordinate[1], coordinate[0]);\n });\n });\n });\n\n var point;\n var projected = converted.map((_coordinates) => {\n return _coordinates.map((ring) => {\n return ring.map((latlon) => {\n point = Geo.latLonToPoint(latlon)._subtract(originPoint);\n\n if (!pointScale) {\n pointScale = Geo.pointScale(latlon);\n }\n\n return point;\n });\n });\n });\n\n var polygon = {\n projected: projected,\n options: {\n pointScale: pointScale,\n style: style\n }\n };\n\n if (_properties) {\n polygon.properties = feature.properties;\n }\n\n polygons.push(polygon);\n }\n\n if (geometry.type === 'LineString' || geometry.type === 'MultiLineString') {\n coordinates = (PolylineLayer.isSingle(coordinates)) ? [coordinates] : coordinates;\n\n var converted = coordinates.map(_coordinates => {\n return _coordinates.map(coordinate => {\n return LatLon(coordinate[1], coordinate[0]);\n });\n });\n\n var point;\n var projected = converted.map((_coordinates) => {\n return _coordinates.map((latlon) => {\n point = Geo.latLonToPoint(latlon)._subtract(originPoint);\n\n if (!pointScale) {\n pointScale = Geo.pointScale(latlon);\n }\n\n return point;\n });\n });\n\n var polyline = {\n projected: projected,\n options: {\n pointScale: pointScale,\n style: style\n }\n };\n\n if (_properties) {\n polyline.properties = feature.properties;\n }\n\n polylines.push(polyline);\n }\n\n if (geometry.type === 'Point' || geometry.type === 'MultiPoint') {\n if (!pointGeometry) {\n console.warn('Skipping point geometry as no function provided');\n continue;\n }\n\n coordinates = (PointLayer.isSingle(coordinates)) ? [coordinates] : coordinates;\n\n var converted = coordinates.map(coordinate => {\n return LatLon(coordinate[1], coordinate[0]);\n });\n\n var point;\n var projected = converted.map((latlon) => {\n point = Geo.latLonToPoint(latlon)._subtract(originPoint);\n\n if (!pointScale) {\n pointScale = Geo.pointScale(latlon);\n }\n\n return point;\n });\n\n var point = {\n projected: projected,\n options: {\n pointGeometry: pointGeometry(feature),\n pointScale: pointScale,\n style: style\n }\n };\n\n if (_properties) {\n point.properties = feature.properties;\n }\n\n points.push(point);\n }\n };\n\n var polygonBufferPromises = [];\n var polylineBufferPromises = [];\n var pointBufferPromises = [];\n\n var polygon;\n for (var i = 0; i < polygons.length; i++) {\n polygon = polygons[i];\n polygonBufferPromises.push(PolygonLayer.SetBufferAttributes(polygon.projected, polygon.options));\n };\n\n var polyline;\n for (var i = 0; i < polylines.length; i++) {\n polyline = polylines[i];\n polylineBufferPromises.push(PolylineLayer.SetBufferAttributes(polyline.projected, polyline.options));\n };\n\n var point;\n for (var i = 0; i < points.length; i++) {\n point = points[i];\n pointBufferPromises.push(PointLayer.SetBufferAttributes(point.projected, point.options));\n };\n\n var data = {};\n var transferrables = [];\n\n // TODO: Make this work with polylines too\n // TODO: Make this so it's not a nest of promises\n GeoJSONWorkerLayer.ProcessPolygons(polygonBufferPromises, polygons, _properties).then((result) => {\n data.polygons = result.data;\n transferrables = transferrables.concat(result.transferrables);\n\n GeoJSONWorkerLayer.ProcessPolylines(polylineBufferPromises, polylines, _properties).then((result) => {\n data.polylines = result.data;\n transferrables = transferrables.concat(result.transferrables);\n\n GeoJSONWorkerLayer.ProcessPoints(pointBufferPromises, points, _properties).then((result) => {\n data.points = result.data;\n transferrables = transferrables.concat(result.transferrables);\n\n resolve({\n data: data,\n transferrables: transferrables\n });\n });\n });\n });\n }).catch(reject);\n });\n }", "title": "" }, { "docid": "9e9750962862ebe96c0a4a8ce2d010b5", "score": "0.49983978", "text": "async function q$4(d,p){const g=K$3(t$w(d));if(\"wosr\"===g.fileType){const e=await(p.cache?p.cache.loadWOSR(g.url,p):h$9(g.url,p)),t=A$9(e,p);return {lods:[t],referenceBoundingBox:t.boundingBox,isEsriSymbolResource:!1,isWosr:!0,remove:e.remove}}const h=await(p.cache?p.cache.loadGLTF(g.url,p):u$d(new n$9(p.streamDataRequester),g.url,p)),v=w$9(h.model.meta,\"ESRI_proxyEllipsoid\");h.meta.isEsriSymbolResource&&u$h(v)&&-1!==h.meta.uri.indexOf(\"/RealisticTrees/\")&&function(e$1,t){for(let m=0;m<e$1.model.lods.length;++m){const d=e$1.model.lods[m];e$1.customMeta.esriTreeRendering=!0;for(const p of d.parts){const d=p.attributes.normal;if(t$p(d))return;const g=p.attributes.position,h=g.count,v=n$b(),M=n$b(),w=n$b(),R=r$h(x$7,h),y=r$h(a$h,h),B=h$a(e(),p.transform);for(let r=0;r<h;r++){g.getVec(r,M),d.getVec(r,v),I$7(M,M,p.transform),c$d(w,M,t.center),i$o(w,w,t.radius);const o=w[2],c=s$9(w),f=Math.min(.45+.55*c*c,1);i$o(w,w,t.radius),I$7(w,w,B),j$7(w,w),m+1!==e$1.model.lods.length&&e$1.model.lods.length>1&&y$6(w,w,v,o>-1?.2:Math.min(-4*o-3.8,1)),y.setVec(r,w),R.set(r,0,255*f),R.set(r,1,255*f),R.set(r,2,255*f),R.set(r,3,255);}p.attributes.normal=y,p.attributes.color=R;}}}(h,v);const M=h.meta.isEsriSymbolResource?{usePBR:p.usePBR,isSchematic:!1,treeRendering:h.customMeta.esriTreeRendering,mrrFactors:[0,1,.2]}:{usePBR:!0,isSchematic:!1,mrrFactors:[0,1,.5]},w={...p.materialParamsMixin,treeRendering:h.customMeta.esriTreeRendering};if(null!=g.specifiedLodIndex){const e=Q$3(h,M,w,g.specifiedLodIndex);let t=e[0].boundingBox;if(0!==g.specifiedLodIndex){t=Q$3(h,M,w,0)[0].boundingBox;}return {lods:e,referenceBoundingBox:t,isEsriSymbolResource:h.meta.isEsriSymbolResource,isWosr:!1,remove:h.remove}}const R=Q$3(h,M,w);return {lods:R,referenceBoundingBox:R[0].boundingBox,isEsriSymbolResource:h.meta.isEsriSymbolResource,isWosr:!1,remove:h.remove}}", "title": "" }, { "docid": "883bd2898a7da4e3c07398bf6a17d2a6", "score": "0.49953675", "text": "finishPoly() {\n this.currentPath && (this.currentPath.points.length > 2 ? (this.drawShape(this.currentPath), this.currentPath = null) : this.currentPath.points.length = 0);\n }", "title": "" }, { "docid": "f0256b2141dce764a62cd227cf77f086", "score": "0.499402", "text": "function buildPathTopology(xx, yy, pathData) {\n var pointCount = xx.length,\n index = new ArcIndex(pointCount, MapShaper.xyToUintHash),\n typedArrays = !!(xx.subarray && yy.subarray),\n slice, array;\n\n var pathIds = initPathIds(pointCount, pathData);\n\n if (typedArrays) {\n array = Float64Array;\n slice = xx.subarray;\n } else {\n array = Array;\n slice = Array.prototype.slice;\n }\n\n T.start();\n var chainIds = initPointChains(xx, yy, pathIds, MapShaper.xyToUintHash);\n T.stop(\"Find matching vertices\");\n\n T.start();\n var pointId = 0;\n var paths = Utils.map(pathData, function(pathObj) {\n var pathLen = pathObj.size,\n arcs = pathObj.isNull ? null : convertPath(pointId, pointId + pathLen - 1);\n pointId += pathLen;\n return arcs;\n });\n T.stop(\"Find topological boundaries\")\n\n var sharedArcFlags = index.getSharedArcFlags();\n if (typedArrays) {\n sharedArcFlags = new Uint8Array(sharedArcFlags)\n }\n\n return {\n paths: paths,\n arcs: index.getArcs(),\n sharedArcFlags: sharedArcFlags\n };\n\n function nextPoint(id) {\n var partId = pathIds[id];\n if (pathIds[id+1] === partId) {\n return id + 1;\n }\n var len = pathData[partId].size;\n return sameXY(id, id - len + 1) ? id - len + 2 : -1;\n }\n\n function prevPoint(id) {\n var partId = pathIds[id];\n if (pathIds[id - 1] === partId) {\n return id - 1;\n }\n var len = pathData[partId].size;\n return sameXY(id, id + len - 1) ? id + len - 2 : -1;\n }\n\n function sameXY(a, b) {\n return xx[a] == xx[b] && yy[a] == yy[b];\n }\n\n\n // Convert a non-topological path to one or more topological arcs\n // @start, @end are ids of first and last points in the path\n //\n function convertPath(start, end) {\n var arcIds = [],\n firstNodeId = -1,\n arcStartId;\n\n // Visit each point in the path, up to but not including the last point\n //\n for (var i = start; i < end; i++) {\n if (pointIsArcEndpoint(i)) {\n if (firstNodeId > -1) {\n arcIds.push(addEdge(arcStartId, i));\n } else {\n firstNodeId = i;\n }\n arcStartId = i;\n }\n }\n\n // Identify the final arc in the path\n //\n if (firstNodeId == -1) {\n // Not in an arc, i.e. no nodes have been found...\n // Assuming that path is either an island or is congruent with one or more rings\n arcIds.push(addRing(start, end));\n }\n else if (firstNodeId == start) {\n // path endpoint is a node;\n if (!pointIsArcEndpoint(end)) {\n error(\"Topology error\"); // TODO: better error handling\n }\n arcIds.push(addEdge(arcStartId, i));\n } else {\n // final arc wraps around\n arcIds.push(addEdge(arcStartId, end, start + 1, firstNodeId))\n }\n\n return arcIds;\n };\n\n // @a and @b are ids of two points with same x, y coords\n // Return false if adjacent points match, either in fw or rev direction\n //\n function brokenEdge(a, b) {\n var xarr = xx, yarr = yy; // local vars: faster\n var aprev = prevPoint(a),\n anext = nextPoint(a),\n bprev = prevPoint(b),\n bnext = nextPoint(b);\n if (aprev == -1 || anext == -1 || bprev == -1 || bnext == -1) {\n return true;\n }\n else if (xarr[aprev] == xarr[bnext] && xarr[anext] == xarr[bprev] &&\n yarr[aprev] == yarr[bnext] && yarr[anext] == yarr[bprev]) {\n return false;\n }\n else if (xarr[aprev] == xarr[bprev] && xarr[anext] == xarr[bnext] &&\n yarr[aprev] == yarr[bprev] && yarr[anext] == yarr[bnext]) {\n return false;\n }\n return true;\n }\n\n // Test if a point @id is an endpoint of a topological path\n //\n function pointIsArcEndpoint(id) {\n var chainId = chainIds[id];\n if (chainId == id) {\n // point is unique -- point is arc endpoint iff it is start or end of an open path\n return nextPoint(id) == -1 || prevPoint(id) == -1;\n }\n do {\n if (brokenEdge(id, chainId)) {\n // there is a discontinuity at @id -- point is arc endpoint\n return true;\n }\n chainId = chainIds[chainId];\n } while (id != chainId);\n // path parallels all adjacent paths at @id -- point is not arc endpoint\n return false;\n }\n\n\n function mergeArcParts(src, startId, endId, startId2, endId2) {\n var len = endId - startId + endId2 - startId2 + 2,\n dest = new array(len),\n j = 0, i;\n for (i=startId; i <= endId; i++) {\n dest[j++] = src[i];\n }\n for (i=startId2; i <= endId2; i++) {\n dest[j++] = src[i];\n }\n if (j != len) error(\"mergeArcParts() counting error.\");\n return dest;\n }\n\n function addEdge(startId1, endId1, startId2, endId2) {\n var splitArc = endId2 != null,\n start = startId1,\n end = splitArc ? endId2 : endId1,\n arcId, xarr, yarr;\n\n // Look for previously identified arc, in reverse direction (normal topology)\n arcId = index.findArcNeighbor(xx, yy, start, end, nextPoint);\n if (arcId >= 0) return ~arcId;\n\n // Look for matching arc in same direction\n // (Abnormal topology, but we're accepting it because real-world Shapefiles\n // sometimes have duplicate paths)\n arcId = index.findArcNeighbor(xx, yy, end, start, prevPoint);\n if (arcId >= 0) return arcId;\n\n if (splitArc) {\n xarr = mergeArcParts(xx, startId1, endId1, startId2, endId2);\n yarr = mergeArcParts(yy, startId1, endId1, startId2, endId2);\n } else {\n xarr = slice.call(xx, startId1, endId1 + 1);\n yarr = slice.call(yy, startId1, endId1 + 1);\n }\n return index.addArc(xarr, yarr);\n }\n\n //\n //\n function addRing(startId, endId) {\n var chainId = chainIds[startId],\n pathId = pathIds[startId],\n arcId;\n\n while (chainId != startId) {\n if (pathIds[chainId] < pathId) {\n break;\n }\n chainId = chainIds[chainId];\n }\n\n if (chainId == startId) {\n return addEdge(startId, endId);\n }\n\n for (var i=startId; i<endId; i++) {\n arcId = index.findArcNeighbor(xx, yy, i, i, nextPoint);\n if (arcId >= 0) return ~arcId;\n\n arcId = index.findArcNeighbor(xx, yy, i, i, prevPoint);\n if (arcId >= 0) return arcId;\n }\n\n error(\"Unmatched ring.\")\n }\n}", "title": "" }, { "docid": "d13c670e4798e5d6dde9a7e240d5910d", "score": "0.49925885", "text": "function draw_path() {\n BOUNDING_BOXES.forEach(([xMin, xMax, yMin, yMax]) => {\n ctx.beginPath();\n ctx.rect(xMin, yMin, xMax - xMin, yMax - yMin);\n ctx.stroke();\n });\n TELEPORT_BOXES.forEach(([xl, xh, yl, yh]) => {\n ctx.beginPath();\n ctx.rect(xl, yl, xh - xl, yh - yl);\n ctx.stroke();\n });\n}", "title": "" }, { "docid": "c7632811d12107f24810f35cda9eaa0b", "score": "0.49885026", "text": "function createPath(data, color, artboardName, boundingBoxes, currentPathIndex) {\n var startX = boundingBoxes[artboardName].paths[currentPathIndex].xPos;\n var startY = boundingBoxes[artboardName].paths[currentPathIndex].yPos;\n var width = boundingBoxes[artboardName].paths[currentPathIndex].width;\n var height = boundingBoxes[artboardName].paths[currentPathIndex].height;\n\n var result = '<NineGridPath StartX=\"' + startX + '\" StartY=\"' + startY;\n result += '\" Width=\"' + width + '\" Height=\"' + height + '\" Color=\"' + color + '\" Data=\"' + data + '\" />';\n\n return new XML(result);\n}", "title": "" }, { "docid": "a970802f97b26071389ef943d16ff85a", "score": "0.49870884", "text": "function getTempJson() {\n var currentDrawerWidth = $userForm.find('#drawer-width').val(),\n currentDrawerDepth = $userForm.find('#drawer-depth').val(),\n cdw = parseFloat(currentDrawerWidth)*100,\n cdd= parseFloat(currentDrawerDepth)*100;\n\n var currentJson= $.parseJSON(tempJson);\n //draw outer wall\n buildOuterwall(\"outerWall\");\n $.each(currentJson.paths, function(i, path) {\n var x1 = parseFloat(path.x1)*cdw,\n y1 = parseFloat(path.y1)*cdd,\n x2 = parseFloat(path.x2)*cdw,\n y2 = parseFloat(path.y2)*cdd,\n roundX1 = roundMultiple(x1, roundTo),\n roundY1 = roundMultiple(y1, roundTo),\n roundX2 = roundMultiple(x2, roundTo),\n roundY2 = roundMultiple(y2, roundTo);\n if (\n (x1==0 && x2==cdw && y1==0 && y2==0)\n ||(x1==0 && x2==0 && y1==cdd && y2==0)\n ||(x1==cdw && x2==cdw && y1==0 && y2==cdd)\n ||(x1==cdw && x2==0 && y1==cdd && y2==cdd)\n ) {\n } else if(x1 != 0 && x2 >= cdw){\n var p = s.line(\n roundX1, roundY1, cdw, roundY2\n ).attr({\n stroke: \"#999\",\n strokeWidth: lineThickness,\n \"fill-opacity\": \"0\"\n });\n\n p.addHandles();\n } else if(x1 == 0 && x2 >= cdw){\n var p = s.line(\n 0, roundY1, cdw, roundY2\n ).attr({\n stroke: \"#999\",\n strokeWidth: lineThickness,\n \"fill-opacity\": \"0\"\n });\n\n p.addHandles();\n } else if(y1 != 0 && y2 >= cdd){\n var p = s.line(\n roundX1, roundY1, roundX2, cdd\n ).attr({\n stroke: \"#999\",\n strokeWidth: lineThickness,\n \"fill-opacity\": \"0\"\n });\n\n p.addHandles();\n } else if(y1 == 0 && y2 >= cdd){\n var p = s.line(\n roundX1, 0, roundX2, cdd\n ).attr({\n stroke: \"#999\",\n strokeWidth: lineThickness,\n \"fill-opacity\": \"0\"\n });\n\n p.addHandles();\n } else if(y1 == 0 && y2 != 0){\n var p = s.line(\n roundX1, 0, roundX2, roundY2\n ).attr({\n stroke: \"#999\",\n strokeWidth: lineThickness,\n \"fill-opacity\": \"0\"\n });\n\n p.addHandles();\n }else{\n var p = s.line(\n roundX1, roundY1, roundX2, roundY2\n ).attr({\n stroke: \"#999\",\n strokeWidth: lineThickness,\n \"fill-opacity\": \"0\"\n });\n\n p.addHandles();\n }\n\n });//end each\n }", "title": "" }, { "docid": "54c47e3f1b30e915e1c6b56cb4982c6b", "score": "0.4977947", "text": "function addLine(){\n if(currentIndexSeg > -1 && currentIndexSeg < map.Segments.length && map.Segments[currentIndexSeg].Paths[0].Type === 'refLine'){\n var temp = jQuery.extend(true, {} , map.Segments[currentIndexSeg].Paths[0]);\n var len = temp.Points.length;\n var rank = parseInt(document.getElementById('newNum').value);\n var width = parseFloat(document.getElementById('newWidth').value);\n var realWidth = rank * width;\n var len = temp.Points.length;\n if(len > 1){//6\n var pathLane = new TrunkPath('lane');\n var x = temp.Points[0].X * 2 - temp.Points[1].X;\n var y = temp.Points[0].Y * 2 - temp.Points[1].Y;\n var ppp = generatePoint(x,y,temp.Points[1].X,temp.Points[1].Y,realWidth);\n ppp.X += temp.Points[0].X;\n ppp.Y += temp.Points[0].Y;\n pathLane.Points.push(ppp);\n for (var j=1; j< len - 1; j++){//5\n var pp = generatePoint(temp.Points[j-1].X,temp.Points[j-1].Y,temp.Points[j + 1].X,temp.Points[j + 1].Y,realWidth);\n pp.X += temp.Points[j].X;\n pp.Y += temp.Points[j].Y;\n pathLane.Points.push(pp);\n }//5p\n x= temp.Points[len - 1].X * 2 - temp.Points[len - 2].X;\n y = temp.Points[len - 1].Y * 2 - temp.Points[len - 2].Y;\n var pppp = generatePoint(temp.Points[len - 2].X,temp.Points[len - 2].Y,x,y,realWidth);\n pppp.X += temp.Points[len - 1].X;\n pppp.Y += temp.Points[len - 1].Y;\n pathLane.Points.push(pppp);\n map.Segments[currentIndexSeg].Paths.push(pathLane);\n }//6\n }\n}", "title": "" } ]
4846c93adce66b70d94b035bd872d638
Add Attribute variables here, these variables are the types associated with a VAO Each Attribute needs a "name" element, and a "type" element Variable types are (vec2, vec3, mat4, float) If an array is required, add the element (array=(number)) These attributes will end up as 'out' variables in the Vertex Shader and 'in' variables in the fragment shader.
[ { "docid": "c80a29252dc39f5b46295850e6ad3f63", "score": "0.5623524", "text": "function getPassAttributes(){\n var pass=[\n {\n \"type\":\"vec2\",\n \"name\":\"pass_textureCoords\"\n }\n ];\n return pass;\n}", "title": "" } ]
[ { "docid": "d0b5eb2378b47f95c07249796c192239", "score": "0.66215324", "text": "initAttributes() {\n this.positionLocation = this.gl.getAttribLocation(this.program, 'a_position');\n this.colorLocation = this.gl.getAttribLocation(this.program, 'a_color');\n this.matrixLocation = this.gl.getUniformLocation(this.program, 'u_matrix');\n }", "title": "" }, { "docid": "485d28e1d634973562796c02d59040d6", "score": "0.65528905", "text": "function setUpAttributesAndUniforms() {\n \"use strict\";\n // finds the index of the variable in the program || überschreibt ctx.aVertexPositionId\n ctx.aVertexPositionId = gl.getAttribLocation(\n ctx.shaderProgram,\n \"aVertexPosition\"\n );\n ctx.colorId = gl.getAttribLocation(\n ctx.shaderProgram,\n \"color\"\n );\n // ctx.uColorId = gl.getUniformLocation(ctx.shaderProgram, \"uColor\")\n}", "title": "" }, { "docid": "df7d69455be97a1eea7d765e8eb79d4f", "score": "0.6448781", "text": "setAttributeLocations(attributes) {\n attributes.forEach(attribute => {\n this[attribute] = this.gl.getAttribLocation(this.program, attribute);\n });\n }", "title": "" }, { "docid": "90af9d58523a7f2661fc1cb9ce1c86cd", "score": "0.6441708", "text": "function getAttributes(){\n var attributes=[\n {\n \"type\":\"vec3\",\n \"name\":\"position\"\n },\n {\n \"type\":\"vec2\",\n \"name\":\"textureCoords\"\n },\n {\n \"type\":\"vec3\",\n \"name\":\"normal\"\n }\n ];\n return attributes;\n}", "title": "" }, { "docid": "4b9e1bad7068f6008afbe8813248c1f1", "score": "0.6428149", "text": "writeAttribUniLogs() {\n console.log(\"Attributes: \");\n const numAttribs = this.gl.getProgramParameter(\n this.program,\n this.gl.ACTIVE_ATTRIBUTES\n );\n for (let i = 0; i < numAttribs; ++i) {\n const info = this.gl.getActiveAttrib(this.program, i);\n console.log(\"name:\", info.name, \"type:\", info.type, \"size:\", info.size);\n }\n console.log(\"Uniforms: \");\n const numUniforms = this.gl.getProgramParameter(\n this.program,\n this.gl.ACTIVE_UNIFORMS\n );\n for (let i = 0; i < numUniforms; ++i) {\n const info = this.gl.getActiveUniform(this.program, i);\n console.log(\"name:\", info.name, \"type:\", info.type, \"size:\", info.size);\n }\n console.log(\"vertColor location:\", this.gl.getAttribLocation(this.program, \"vertColor\"))\n }", "title": "" }, { "docid": "1dc44936791bb0d23a03e1197b060a85", "score": "0.6396724", "text": "function createAttributeWrapper(gl, program, attributes, doLink) {\n var obj = {}\n for(var i=0, n=attributes.length; i<n; ++i) {\n var a = attributes[i]\n var name = a.name\n var type = a.type\n var location = gl.getAttribLocation(program, name)\n \n switch(type) {\n case 'bool':\n case 'int':\n case 'float':\n addVectorAttribute(gl, program, location, 1, obj, name, doLink)\n break\n \n default:\n if(type.indexOf('vec') >= 0) {\n var d = type.charCodeAt(type.length-1) - 48\n if(d < 2 || d > 4) {\n throw new Error('gl-shader: Invalid data type for attribute ' + name + ': ' + type)\n }\n addVectorAttribute(gl, program, location, d, obj, name, doLink)\n } else {\n throw new Error('gl-shader: Unknown data type for attribute ' + name + ': ' + type)\n }\n break\n }\n }\n return obj\n}", "title": "" }, { "docid": "567400c479a4082bf4d1ea7f29621c12", "score": "0.63906765", "text": "function initAttributes() {\n attribPos = gl.getAttribLocation(program, \"position\");\n attribColor = gl.getAttribLocation(program, \"color\");\n\n uTranslation = gl.getUniformLocation(program, \"translation\");\n uAngle = gl.getUniformLocation(program, \"angle\");\n gl.enableVertexAttribArray(attribPos);\n gl.enableVertexAttribArray(attribColor);\n\n}", "title": "" }, { "docid": "b3dc6644397ffc68ddcf1ed9bd96fce5", "score": "0.6365508", "text": "function setUpAttributesAndUniforms(){\n \"use strict\";\n ctx.aVertexPositionId = gl.getAttribLocation(ctx.shaderProgram, \"aVertexPosition\");\n ctx.uColorId = gl.getUniformLocation(ctx.shaderProgram, \"uColor\");\n ctx.uProjectionMatId = gl.getUniformLocation(ctx.shaderProgram, \"uProjectionMat\");\n ctx.uModelViewMat = gl.getUniformLocation(ctx.shaderProgram, \"uModelViewMat\");\n}", "title": "" }, { "docid": "16dc8770cd6b81c0d26ece1890191920", "score": "0.6359143", "text": "function setUpAttributesAndUniforms(){\n \"use strict\";\n ctx.aVertexPositionId = gl.getAttribLocation(ctx.shaderProgram, \"aVertexPosition\");\n ctx.uColorId = gl.getUniformLocation(ctx.shaderProgram, \"uColor\");\n ctx.uModelMatId = gl.getUniformLocation(ctx.shaderProgram, \"uModelMat\");\n ctx.uProjectionMatId = gl.getUniformLocation(ctx.shaderProgram, \"uProjectionMat\");\n}", "title": "" }, { "docid": "4955a1e7a8fe151375c5647020d76ce7", "score": "0.63225985", "text": "function t(t,d){1===d.attributeTextureCoordinates&&(t.attributes.add(\"uv0\",\"vec2\"),t.varyings.add(\"vuv0\",\"vec2\"),t.vertex.code.add(_shaderModules_interfaces_js__WEBPACK_IMPORTED_MODULE_0__[\"glsl\"]`\n void forwardTextureCoordinates() {\n vuv0 = uv0;\n }\n `)),2===d.attributeTextureCoordinates&&(t.attributes.add(\"uv0\",\"vec2\"),t.varyings.add(\"vuv0\",\"vec2\"),t.attributes.add(\"uvRegion\",\"vec4\"),t.varyings.add(\"vuvRegion\",\"vec4\"),t.vertex.code.add(_shaderModules_interfaces_js__WEBPACK_IMPORTED_MODULE_0__[\"glsl\"]`\n void forwardTextureCoordinates() {\n vuv0 = uv0;\n vuvRegion = uvRegion;\n }\n `)),0===d.attributeTextureCoordinates&&t.vertex.code.add(_shaderModules_interfaces_js__WEBPACK_IMPORTED_MODULE_0__[\"glsl\"]`\n void forwardTextureCoordinates() {}\n `)}", "title": "" }, { "docid": "93771ac870d4bdeef4c30d06602e0353", "score": "0.6315836", "text": "setGenericValues( location, v0, v1, v2, v3 ) {\n const { gl } = this;\n switch ( arguments.length - 1 ) {\n case 1: gl.vertexAttrib1f( location, v0 ); break;\n case 2: gl.vertexAttrib2f( location, v0, v1 ); break;\n case 3: gl.vertexAttrib3f( location, v0, v1, v2 ); break;\n case 4: gl.vertexAttrib4f( location, v0, v1, v2, v3 ); break;\n default: assert( false );\n }\n\n // assert(gl instanceof WebGL2RenderingContext, 'WebGL2 required');\n // Looks like these will check how many arguments were supplied?\n // gl.vertexAttribI4i(location, v0, v1, v2, v3);\n // gl.vertexAttribI4ui(location, v0, v1, v2, v3);\n }", "title": "" }, { "docid": "a0422934b16d734548e610b644d8d608", "score": "0.6302904", "text": "function setUpAttributesAndUniforms(){\n \"use strict\";\n ctx.aVertexPositionId = gl.getAttribLocation(ctx.shaderProgram, \"aVertexPosition\");\n ctx.uColorId = gl.getUniformLocation(ctx.shaderProgram, \"uColor\");\n ctx.uProjectionMatId = gl.getUniformLocation(ctx.shaderProgram, \"uProjectionMat\");\n}", "title": "" }, { "docid": "3af0bae3a9f07466c25af597e523346e", "score": "0.6215515", "text": "bindAttribs() {\n if (this.indices == null)\n throw \"indices are not loaded\";\n let n = this.attribs.length;\n this.gl.bindBuffer(this.gl.ARRAY_BUFFER, this.buffer); //making the buffer of this class the current buffer\n for (let i = 0; i < n; i++) {\n this.gl.enableVertexAttribArray(this.indices[i]); //enable the Attribute\n this.gl.vertexAttribPointer(this.indices[i], this.attribs[i].float32Count, this.gl.FLOAT, false, this.stride, this.offsets[i]); //creates a pointer and structure for this attribute\n }\n }", "title": "" }, { "docid": "efcdd4152f7af9e87e6f8c18275466b5", "score": "0.62093043", "text": "function setUpAttributesAndUniforms(){\n \"use strict\";\n ctx.aVertexColor = gl.getAttribLocation(ctx.shaderProgram, \"aVertexColor\");\n ctx.aVertexPositionId = gl.getAttribLocation(ctx.shaderProgram, \"aVertexPosition\");\n ctx.aVertexTextureCoord = gl.getAttribLocation(ctx.shaderProgram, \"aVertexTextureCoord\");\n\n ctx.uProjectionMatrix = gl.getUniformLocation(ctx.shaderProgram, \"uProjectionMatrix\");\n ctx.uModelMat = gl.getUniformLocation(ctx.shaderProgram, \"uModelMat\");\n ctx.uModelViewMatrix = gl.getUniformLocation(ctx.shaderProgram, \"uModelViewMatrix\");\n ctx.uTextureEnabled = gl.getUniformLocation(ctx.shaderProgram, \"uTextureEnabled\");\n ctx.uSampler2DId = gl.getUniformLocation(ctx.shaderProgram, \"uSampler2D\");\n}", "title": "" }, { "docid": "407e5e8b7b7713fd87c54606bfbc1ce9", "score": "0.6206055", "text": "function initAttributeVariable(gl, a_attribute, buffer) {\n gl.bindBuffer(gl.ARRAY_BUFFER, buffer);\n gl.vertexAttribPointer(a_attribute, buffer.num, buffer.type, false, 0, 0);\n gl.enableVertexAttribArray(a_attribute);\n}", "title": "" }, { "docid": "407e5e8b7b7713fd87c54606bfbc1ce9", "score": "0.6206055", "text": "function initAttributeVariable(gl, a_attribute, buffer) {\n gl.bindBuffer(gl.ARRAY_BUFFER, buffer);\n gl.vertexAttribPointer(a_attribute, buffer.num, buffer.type, false, 0, 0);\n gl.enableVertexAttribArray(a_attribute);\n}", "title": "" }, { "docid": "7a14e1b414109f673a614ee7f0c50bfe", "score": "0.61779124", "text": "function addVectorAttribute(gl, program, location, dimension, obj, name, doLink) {\n var constFuncArgs = [ \"gl\", \"v\" ]\n var varNames = []\n for(var i=0; i<dimension; ++i) {\n constFuncArgs.push(\"x\"+i)\n varNames.push(\"x\"+i)\n }\n constFuncArgs.push([\n \"if(x0.length===undefined){return gl.vertexAttrib\", dimension, \"f(v,\", varNames.join(\",\"), \")}else{return gl.vertexAttrib\", dimension, \"fv(v,x0)}\"\n ].join(\"\"))\n var constFunc = Function.apply(undefined, constFuncArgs)\n var attr = new ShaderAttribute(gl, program, location, dimension, name, constFunc, doLink)\n Object.defineProperty(obj, name, {\n set: function(x) {\n gl.disableVertexAttribArray(attr._location)\n constFunc(gl, attr._location, x)\n return x\n }\n , get: function() {\n return attr\n }\n , enumerable: true\n })\n}", "title": "" }, { "docid": "7a14e1b414109f673a614ee7f0c50bfe", "score": "0.61779124", "text": "function addVectorAttribute(gl, program, location, dimension, obj, name, doLink) {\n var constFuncArgs = [ \"gl\", \"v\" ]\n var varNames = []\n for(var i=0; i<dimension; ++i) {\n constFuncArgs.push(\"x\"+i)\n varNames.push(\"x\"+i)\n }\n constFuncArgs.push([\n \"if(x0.length===undefined){return gl.vertexAttrib\", dimension, \"f(v,\", varNames.join(\",\"), \")}else{return gl.vertexAttrib\", dimension, \"fv(v,x0)}\"\n ].join(\"\"))\n var constFunc = Function.apply(undefined, constFuncArgs)\n var attr = new ShaderAttribute(gl, program, location, dimension, name, constFunc, doLink)\n Object.defineProperty(obj, name, {\n set: function(x) {\n gl.disableVertexAttribArray(attr._location)\n constFunc(gl, attr._location, x)\n return x\n }\n , get: function() {\n return attr\n }\n , enumerable: true\n })\n}", "title": "" }, { "docid": "064e72f288a121ca4f110e5322ffbf91", "score": "0.61670315", "text": "map_attribute_name_to_buffer_name( name ) // The shader will pull single entries out of the vertex arrays, by their data fields'\r\n { // names. Map those names onto the arrays we'll pull them from. This determines\r\n // which kinds of Shapes this Shader is compatible with. Thanks to this function, \r\n // Vertex buffers in the GPU can get their pointers matched up with pointers to \r\n // attribute names in the GPU. Shapes and Shaders can still be compatible even\r\n // if some vertex data feilds are unused. \r\n return { object_space_pos: \"positions\", color: \"colors\" }[ name ]; // Use a simple lookup table.\r\n }", "title": "" }, { "docid": "6123fc594ac2f4cd1b4195dac3f1a6f9", "score": "0.61619186", "text": "map_attribute_name_to_buffer_name( name ) // The shader will pull single entries out of the vertex arrays, by their data fields'\r\n { // names. Map those names onto the arrays we'll pull them from. This determines\r\n // which kinds of Shapes this Shader is compatible with. Thanks to this function, \r\n // Vertex buffers in the GPU can get their pointers matched up with pointers to \r\n // attribute names in the GPU. Shapes and Shaders can still be compatible even\r\n // if some vertex data feilds are unused. \r\n return { object_space_pos: \"positions\" }[ name ]; // Use a simple lookup table.\r\n }", "title": "" }, { "docid": "6123fc594ac2f4cd1b4195dac3f1a6f9", "score": "0.61619186", "text": "map_attribute_name_to_buffer_name( name ) // The shader will pull single entries out of the vertex arrays, by their data fields'\r\n { // names. Map those names onto the arrays we'll pull them from. This determines\r\n // which kinds of Shapes this Shader is compatible with. Thanks to this function, \r\n // Vertex buffers in the GPU can get their pointers matched up with pointers to \r\n // attribute names in the GPU. Shapes and Shaders can still be compatible even\r\n // if some vertex data feilds are unused. \r\n return { object_space_pos: \"positions\" }[ name ]; // Use a simple lookup table.\r\n }", "title": "" }, { "docid": "837f8c41cf54224ea13dc631095f1ff3", "score": "0.6153155", "text": "function addVectorAttribute(gl, program, location, dimension, obj, name, doLink) {\n var constFuncArgs = [ 'gl', 'v' ]\n var varNames = []\n for(var i=0; i<dimension; ++i) {\n constFuncArgs.push('x'+i)\n varNames.push('x'+i)\n }\n constFuncArgs.push([\n 'if(x0.length===void 0){return gl.vertexAttrib', dimension, 'f(v,', varNames.join(), ')}else{return gl.vertexAttrib', dimension, 'fv(v,x0)}'\n ].join(''))\n var constFunc = Function.apply(undefined, constFuncArgs)\n var attr = new ShaderAttribute(gl, program, location, dimension, name, constFunc, doLink)\n Object.defineProperty(obj, name, {\n set: function(x) {\n gl.disableVertexAttribArray(attr._location)\n constFunc(gl, attr._location, x)\n return x\n }\n , get: function() {\n return attr\n }\n , enumerable: true\n })\n}", "title": "" }, { "docid": "e0ff52f0410f776623b336388a7c9a4a", "score": "0.6134792", "text": "_setGenericFloatArray( location, array ) {\n const { gl } = this;\n switch ( array.length ) {\n case 1: gl.vertexAttrib1fv( location, array ); break;\n case 2: gl.vertexAttrib2fv( location, array ); break;\n case 3: gl.vertexAttrib3fv( location, array ); break;\n case 4: gl.vertexAttrib4fv( location, array ); break;\n default: assert( false );\n }\n }", "title": "" }, { "docid": "a5c64a77c503d17968b3feae09886a85", "score": "0.6061772", "text": "function a(a){const s=new o$2,{vertex:d,fragment:u}=s;v$3(d,a);const{isAttributeDriven:n,usesHalfFloat:l}=a;return s.attributes.add(O$4.POSITION,\"vec3\"),s.attributes.add(O$4.UV0,\"vec2\"),n&&(s.attributes.add(O$4.FEATUREATTRIBUTE,\"float\"),s.varyings.add(\"attributeValue\",\"float\")),l&&s.constants.add(\"compressionFactor\",\"float\",.25),s.varyings.add(\"unitCirclePos\",\"vec2\"),d.uniforms.add(new o$4(\"radius\",(({resolutionForScale:e,searchRadius:i},{camera:o,screenToWorldRatio:r})=>2*i*(0===e?1:e/r)*o.pixelRatio/o.fullViewport[2]))),d.code.add(n$4`\n void main() {\n unitCirclePos = uv0;\n\n vec4 posProj = proj * (view * vec4(${O$4.POSITION}, 1.0));\n vec4 quadOffset = vec4(unitCirclePos * radius, 0.0, 0.0);\n\n ${n?n$4`attributeValue = ${O$4.FEATUREATTRIBUTE};`:\"\"}\n gl_Position = posProj + quadOffset;\n }\n `),u.code.add(n$4`\n void main() {\n float radiusRatioSquared = dot(unitCirclePos, unitCirclePos);\n if (radiusRatioSquared > 1.0) {\n discard;\n }\n\n float oneMinusRadiusRatioSquared = 1.0 - radiusRatioSquared;\n float density = oneMinusRadiusRatioSquared * oneMinusRadiusRatioSquared ${n?n$4` * attributeValue`:\"\"} ${l?n$4` * compressionFactor`:\"\"};\n gl_FragColor = vec4(density);\n }\n `),s}", "title": "" }, { "docid": "a8a5263910a134098d04fa699bac3a8e", "score": "0.6059595", "text": "function v(v,o){o.vvInstancingEnabled&&(o.vvSize||o.vvColor)&&v.attributes.add(\"instanceFeatureAttribute\",\"vec4\"),o.vvSize?(v.vertex.uniforms.add(\"vvSizeMinSize\",\"vec3\"),v.vertex.uniforms.add(\"vvSizeMaxSize\",\"vec3\"),v.vertex.uniforms.add(\"vvSizeOffset\",\"vec3\"),v.vertex.uniforms.add(\"vvSizeFactor\",\"vec3\"),v.vertex.uniforms.add(\"vvSymbolRotationMatrix\",\"mat3\"),v.vertex.uniforms.add(\"vvSymbolAnchor\",\"vec3\"),v.vertex.code.add(_shaderModules_interfaces_js__WEBPACK_IMPORTED_MODULE_0__[\"glsl\"]`\n vec3 vvScale(vec4 _featureAttribute) {\n return clamp(vvSizeOffset + _featureAttribute.x * vvSizeFactor, vvSizeMinSize, vvSizeMaxSize);\n }\n\n vec4 vvTransformPosition(vec3 position, vec4 _featureAttribute) {\n return vec4(vvSymbolRotationMatrix * ( vvScale(_featureAttribute) * (position + vvSymbolAnchor)), 1.0);\n }\n `),v.vertex.code.add(_shaderModules_interfaces_js__WEBPACK_IMPORTED_MODULE_0__[\"glsl\"]`\n const float eps = 1.192092896e-07;\n vec4 vvTransformNormal(vec3 _normal, vec4 _featureAttribute) {\n vec3 vvScale = clamp(vvSizeOffset + _featureAttribute.x * vvSizeFactor, vvSizeMinSize + eps, vvSizeMaxSize);\n return vec4(vvSymbolRotationMatrix * _normal / vvScale, 1.0);\n }\n\n ${o.vvInstancingEnabled?_shaderModules_interfaces_js__WEBPACK_IMPORTED_MODULE_0__[\"glsl\"]`\n vec4 vvLocalNormal(vec3 _normal) {\n return vvTransformNormal(_normal, instanceFeatureAttribute);\n }\n\n vec4 localPosition() {\n return vvTransformPosition(position, instanceFeatureAttribute);\n }`:\"\"}\n `)):v.vertex.code.add(_shaderModules_interfaces_js__WEBPACK_IMPORTED_MODULE_0__[\"glsl\"]`\n vec4 localPosition() { return vec4(position, 1.0); }\n\n vec4 vvLocalNormal(vec3 _normal) { return vec4(_normal, 1.0); }\n `),o.vvColor?(v.vertex.defines.addInt(\"VV_COLOR_N\",8),v.vertex.code.add(_shaderModules_interfaces_js__WEBPACK_IMPORTED_MODULE_0__[\"glsl\"]`\n uniform float vvColorValues[VV_COLOR_N];\n uniform vec4 vvColorColors[VV_COLOR_N];\n\n vec4 vvGetColor(vec4 featureAttribute, float values[VV_COLOR_N], vec4 colors[VV_COLOR_N]) {\n float value = featureAttribute.y;\n if (value <= values[0]) {\n return colors[0];\n }\n\n for (int i = 1; i < VV_COLOR_N; ++i) {\n if (values[i] >= value) {\n float f = (value - values[i-1]) / (values[i] - values[i-1]);\n return mix(colors[i-1], colors[i], f);\n }\n }\n return colors[VV_COLOR_N - 1];\n }\n\n ${o.vvInstancingEnabled?_shaderModules_interfaces_js__WEBPACK_IMPORTED_MODULE_0__[\"glsl\"]`\n vec4 vvColor() {\n return vvGetColor(instanceFeatureAttribute, vvColorValues, vvColorColors);\n }`:\"\"}\n `)):v.vertex.code.add(_shaderModules_interfaces_js__WEBPACK_IMPORTED_MODULE_0__[\"glsl\"]`\n vec4 vvColor() { return vec4(1.0); }\n `)}", "title": "" }, { "docid": "93c440766a382e433e3133cff8adf47a", "score": "0.6031938", "text": "function GlslProgramJavascriptVars() {\n\t\tthis.uniform = {};\n\t\tthis.attribute = {};\n\t\tthis.varying = {};\n\t}", "title": "" }, { "docid": "8495329cee2c2a9b36ebf00d9c59aff1", "score": "0.5959617", "text": "function addVectorAttribute(\n gl\n , wrapper\n , index\n , locations\n , dimension\n , obj\n , name) {\n\n //Construct constant function\n var constFuncArgs = [ 'gl', 'v' ]\n var varNames = []\n for(var i=0; i<dimension; ++i) {\n constFuncArgs.push('x'+i)\n varNames.push('x'+i)\n }\n constFuncArgs.push(\n 'if(x0.length===void 0){return gl.vertexAttrib' +\n dimension + 'f(v,' +\n varNames.join() +\n ')}else{return gl.vertexAttrib' +\n dimension +\n 'fv(v,x0)}')\n var constFunc = Function.apply(null, constFuncArgs)\n\n //Create attribute wrapper\n var attr = new ShaderAttribute(\n gl\n , wrapper\n , index\n , locations\n , dimension\n , constFunc)\n\n //Create accessor\n Object.defineProperty(obj, name, {\n set: function(x) {\n gl.disableVertexAttribArray(locations[index])\n constFunc(gl, locations[index], x)\n return x\n }\n , get: function() {\n return attr\n }\n , enumerable: true\n })\n}", "title": "" }, { "docid": "8495329cee2c2a9b36ebf00d9c59aff1", "score": "0.5959617", "text": "function addVectorAttribute(\n gl\n , wrapper\n , index\n , locations\n , dimension\n , obj\n , name) {\n\n //Construct constant function\n var constFuncArgs = [ 'gl', 'v' ]\n var varNames = []\n for(var i=0; i<dimension; ++i) {\n constFuncArgs.push('x'+i)\n varNames.push('x'+i)\n }\n constFuncArgs.push(\n 'if(x0.length===void 0){return gl.vertexAttrib' +\n dimension + 'f(v,' +\n varNames.join() +\n ')}else{return gl.vertexAttrib' +\n dimension +\n 'fv(v,x0)}')\n var constFunc = Function.apply(null, constFuncArgs)\n\n //Create attribute wrapper\n var attr = new ShaderAttribute(\n gl\n , wrapper\n , index\n , locations\n , dimension\n , constFunc)\n\n //Create accessor\n Object.defineProperty(obj, name, {\n set: function(x) {\n gl.disableVertexAttribArray(locations[index])\n constFunc(gl, locations[index], x)\n return x\n }\n , get: function() {\n return attr\n }\n , enumerable: true\n })\n}", "title": "" }, { "docid": "8495329cee2c2a9b36ebf00d9c59aff1", "score": "0.5959617", "text": "function addVectorAttribute(\n gl\n , wrapper\n , index\n , locations\n , dimension\n , obj\n , name) {\n\n //Construct constant function\n var constFuncArgs = [ 'gl', 'v' ]\n var varNames = []\n for(var i=0; i<dimension; ++i) {\n constFuncArgs.push('x'+i)\n varNames.push('x'+i)\n }\n constFuncArgs.push(\n 'if(x0.length===void 0){return gl.vertexAttrib' +\n dimension + 'f(v,' +\n varNames.join() +\n ')}else{return gl.vertexAttrib' +\n dimension +\n 'fv(v,x0)}')\n var constFunc = Function.apply(null, constFuncArgs)\n\n //Create attribute wrapper\n var attr = new ShaderAttribute(\n gl\n , wrapper\n , index\n , locations\n , dimension\n , constFunc)\n\n //Create accessor\n Object.defineProperty(obj, name, {\n set: function(x) {\n gl.disableVertexAttribArray(locations[index])\n constFunc(gl, locations[index], x)\n return x\n }\n , get: function() {\n return attr\n }\n , enumerable: true\n })\n}", "title": "" }, { "docid": "8495329cee2c2a9b36ebf00d9c59aff1", "score": "0.5959617", "text": "function addVectorAttribute(\n gl\n , wrapper\n , index\n , locations\n , dimension\n , obj\n , name) {\n\n //Construct constant function\n var constFuncArgs = [ 'gl', 'v' ]\n var varNames = []\n for(var i=0; i<dimension; ++i) {\n constFuncArgs.push('x'+i)\n varNames.push('x'+i)\n }\n constFuncArgs.push(\n 'if(x0.length===void 0){return gl.vertexAttrib' +\n dimension + 'f(v,' +\n varNames.join() +\n ')}else{return gl.vertexAttrib' +\n dimension +\n 'fv(v,x0)}')\n var constFunc = Function.apply(null, constFuncArgs)\n\n //Create attribute wrapper\n var attr = new ShaderAttribute(\n gl\n , wrapper\n , index\n , locations\n , dimension\n , constFunc)\n\n //Create accessor\n Object.defineProperty(obj, name, {\n set: function(x) {\n gl.disableVertexAttribArray(locations[index])\n constFunc(gl, locations[index], x)\n return x\n }\n , get: function() {\n return attr\n }\n , enumerable: true\n })\n}", "title": "" }, { "docid": "8495329cee2c2a9b36ebf00d9c59aff1", "score": "0.5959617", "text": "function addVectorAttribute(\n gl\n , wrapper\n , index\n , locations\n , dimension\n , obj\n , name) {\n\n //Construct constant function\n var constFuncArgs = [ 'gl', 'v' ]\n var varNames = []\n for(var i=0; i<dimension; ++i) {\n constFuncArgs.push('x'+i)\n varNames.push('x'+i)\n }\n constFuncArgs.push(\n 'if(x0.length===void 0){return gl.vertexAttrib' +\n dimension + 'f(v,' +\n varNames.join() +\n ')}else{return gl.vertexAttrib' +\n dimension +\n 'fv(v,x0)}')\n var constFunc = Function.apply(null, constFuncArgs)\n\n //Create attribute wrapper\n var attr = new ShaderAttribute(\n gl\n , wrapper\n , index\n , locations\n , dimension\n , constFunc)\n\n //Create accessor\n Object.defineProperty(obj, name, {\n set: function(x) {\n gl.disableVertexAttribArray(locations[index])\n constFunc(gl, locations[index], x)\n return x\n }\n , get: function() {\n return attr\n }\n , enumerable: true\n })\n}", "title": "" }, { "docid": "891bb6515933a60084465386900aef87", "score": "0.5920006", "text": "function createAttributeWrapper(gl, wrapper, attributes, locations) {\n var obj = {};\n for (var i = 0, n = attributes.length; i < n; ++i) {\n var a = attributes[i];\n var name = a.name;\n var type = a.type;\n var locs = a.locations;\n\n switch (type) {\n case \"bool\":\n case \"int\":\n case \"float\":\n addVectorAttribute(gl, wrapper, locs[0], locations, 1, obj, name);\n break;\n\n default:\n if (type.indexOf(\"vec\") >= 0) {\n var d = type.charCodeAt(type.length - 1) - 48;\n if (d < 2 || d > 4) {\n throw new Error(\n \"gl-shader: Invalid data type for attribute \" + name + \": \" + type\n );\n }\n addVectorAttribute(gl, wrapper, locs[0], locations, d, obj, name);\n } else if (type.indexOf(\"mat\") >= 0) {\n var d = type.charCodeAt(type.length - 1) - 48;\n if (d < 2 || d > 4) {\n throw new Error(\n \"gl-shader: Invalid data type for attribute \" + name + \": \" + type\n );\n }\n addMatrixAttribute(gl, wrapper, locs, locations, d, obj, name);\n } else {\n throw new Error(\n \"gl-shader: Unknown data type for attribute \" + name + \": \" + type\n );\n }\n break;\n }\n }\n return obj;\n}", "title": "" }, { "docid": "c61c69dbc7bb056c4b74f53f368ab242", "score": "0.59163034", "text": "function createAttributeWrapper(gl, program, attributes, doLink) {\n var obj = {}\n for(var i=0, n=attributes.length; i<n; ++i) {\n var a = attributes[i]\n var name = a.name\n var type = a.type\n var location = gl.getAttribLocation(program, name)\n \n switch(type) {\n case \"bool\":\n case \"int\":\n case \"float\":\n addVectorAttribute(gl, program, location, 1, obj, name, doLink)\n break\n \n default:\n if(type.indexOf(\"vec\") >= 0) {\n var d = type.charCodeAt(type.length-1) - 48\n if(d < 2 || d > 4) {\n throw new Error(\"Invalid data type for attribute \" + name + \": \" + type)\n }\n addVectorAttribute(gl, program, location, d, obj, name, doLink)\n } else {\n throw new Error(\"Unknown data type for attribute \" + name + \": \" + type)\n }\n break\n }\n }\n return obj\n}", "title": "" }, { "docid": "c61c69dbc7bb056c4b74f53f368ab242", "score": "0.59163034", "text": "function createAttributeWrapper(gl, program, attributes, doLink) {\n var obj = {}\n for(var i=0, n=attributes.length; i<n; ++i) {\n var a = attributes[i]\n var name = a.name\n var type = a.type\n var location = gl.getAttribLocation(program, name)\n \n switch(type) {\n case \"bool\":\n case \"int\":\n case \"float\":\n addVectorAttribute(gl, program, location, 1, obj, name, doLink)\n break\n \n default:\n if(type.indexOf(\"vec\") >= 0) {\n var d = type.charCodeAt(type.length-1) - 48\n if(d < 2 || d > 4) {\n throw new Error(\"Invalid data type for attribute \" + name + \": \" + type)\n }\n addVectorAttribute(gl, program, location, d, obj, name, doLink)\n } else {\n throw new Error(\"Unknown data type for attribute \" + name + \": \" + type)\n }\n break\n }\n }\n return obj\n}", "title": "" }, { "docid": "0443928ba6716ebb63752eb16caf8c59", "score": "0.5915251", "text": "function addVectorAttribute(\n gl,\n wrapper,\n index,\n locations,\n dimension,\n obj,\n name\n) {\n //Construct constant function\n var constFuncArgs = [\"gl\", \"v\"];\n var varNames = [];\n for (var i = 0; i < dimension; ++i) {\n constFuncArgs.push(\"x\" + i);\n varNames.push(\"x\" + i);\n }\n constFuncArgs.push(\n \"if(x0.length===void 0){return gl.vertexAttrib\" +\n dimension +\n \"f(v,\" +\n varNames.join() +\n \")}else{return gl.vertexAttrib\" +\n dimension +\n \"fv(v,x0)}\"\n );\n var constFunc = Function.apply(null, constFuncArgs);\n\n //Create attribute wrapper\n var attr = new ShaderAttribute(\n gl,\n wrapper,\n index,\n locations,\n dimension,\n constFunc\n );\n\n //Create accessor\n Object.defineProperty(obj, name, {\n set: function (x) {\n gl.disableVertexAttribArray(locations[index]);\n constFunc(gl, locations[index], x);\n return x;\n },\n get: function () {\n return attr;\n },\n enumerable: true,\n });\n}", "title": "" }, { "docid": "ef248b578112b72cb6da045dcf77acc1", "score": "0.5862788", "text": "function createAttributeWrapper(\n gl\n , wrapper\n , attributes\n , locations) {\n\n var obj = {}\n for(var i=0, n=attributes.length; i<n; ++i) {\n\n var a = attributes[i]\n var name = a.name\n var type = a.type\n var locs = a.locations\n\n switch(type) {\n case 'bool':\n case 'int':\n case 'float':\n addVectorAttribute(\n gl\n , wrapper\n , locs[0]\n , locations\n , 1\n , obj\n , name)\n break\n \n default:\n if(type.indexOf('vec') >= 0) {\n var d = type.charCodeAt(type.length-1) - 48\n if(d < 2 || d > 4) {\n throw new Error('gl-shader: Invalid data type for attribute ' + name + ': ' + type)\n }\n addVectorAttribute(\n gl\n , wrapper\n , locs[0]\n , locations\n , d\n , obj\n , name)\n } else if(type.indexOf('mat') >= 0) {\n var d = type.charCodeAt(type.length-1) - 48\n if(d < 2 || d > 4) {\n throw new Error('gl-shader: Invalid data type for attribute ' + name + ': ' + type)\n }\n addMatrixAttribute(\n gl\n , wrapper\n , locs\n , locations\n , d\n , obj\n , name)\n } else {\n throw new Error('gl-shader: Unknown data type for attribute ' + name + ': ' + type)\n }\n break\n }\n }\n return obj\n}", "title": "" }, { "docid": "b0227415ac5185b298bbd14bfde7240e", "score": "0.58319366", "text": "uniforms(uniforms) {\n const gl = this.gl;\n gl.useProgram(this.program);\n for (const name in uniforms) {\n const location = this.uniformLocations[name] || gl.getUniformLocation(this.program, name);\n // !location && console.warn(name + ' uniform is not used in shader')\n if (!location)\n continue;\n this.uniformLocations[name] = location;\n let value = uniforms[name];\n const info = this.uniformInfos[name];\n {\n // TODO: better errors\n if (gl.SAMPLER_2D == info.type || gl.SAMPLER_CUBE == info.type || gl.INT == info.type) {\n if (1 == info.size) {\n assert(Number.isInteger(value));\n }\n else {\n assert(isIntArray(value) && value.length == info.size, 'value must be int array if info.size != 1');\n }\n }\n assert(gl.FLOAT != info.type || ((1 == info.size && 'number' === typeof value) || isFloatArray(value)));\n assert(gl.FLOAT_VEC3 != info.type ||\n ((1 == info.size && value instanceof V3) ||\n (Array.isArray(value) && info.size == value.length && assertVectors(...value))));\n assert(gl.FLOAT_VEC4 != info.type || 1 != info.size || (isFloatArray(value) && value.length == 4));\n assert(gl.FLOAT_MAT4 != info.type || value instanceof M4, () => value.toSource());\n assert(gl.FLOAT_MAT3 != info.type || value.length == 9 || value instanceof M4);\n }\n if (value instanceof V3) {\n value = value.toArray();\n }\n if (gl.FLOAT_VEC4 == info.type && info.size != 1) {\n if (value instanceof Float32Array || value instanceof Float64Array) {\n gl.uniform4fv(location, value instanceof Float32Array ? value : Float32Array.from(value));\n }\n else {\n gl.uniform4fv(location, value.concatenated());\n }\n }\n else if (gl.FLOAT == info.type && info.size != 1) {\n gl.uniform1fv(location, value);\n }\n else if (gl.FLOAT_VEC3 == info.type && info.size != 1) {\n gl.uniform3fv(location, V3.pack(value));\n }\n else if (value.length) {\n switch (value.length) {\n case 1:\n gl.uniform1fv(location, value);\n break;\n case 2:\n gl.uniform2fv(location, value);\n break;\n case 3:\n gl.uniform3fv(location, value);\n break;\n case 4:\n gl.uniform4fv(location, value);\n break;\n // Matrices are automatically transposed, since WebGL uses column-major\n // indices instead of row-major indices.\n case 9:\n // prettier-ignore\n gl.uniformMatrix3fv(location, false, new Float32Array([\n value[0], value[3], value[6],\n value[1], value[4], value[7],\n value[2], value[5], value[8],\n ]));\n break;\n case 16:\n // prettier-ignore\n gl.uniformMatrix4fv(location, false, new Float32Array([\n value[0], value[4], value[8], value[12],\n value[1], value[5], value[9], value[13],\n value[2], value[6], value[10], value[14],\n value[3], value[7], value[11], value[15],\n ]));\n break;\n default:\n throw new Error('don\\'t know how to load uniform \"' + name + '\" of length ' + value.length);\n }\n }\n else if ('number' == typeof value) {\n if (gl.SAMPLER_2D == info.type || gl.SAMPLER_CUBE == info.type || gl.INT == info.type) {\n gl.uniform1i(location, value);\n }\n else {\n gl.uniform1f(location, value);\n }\n }\n else if ('boolean' == typeof value) {\n gl.uniform1i(location, +value);\n }\n else if (value instanceof M4) {\n const m = value.m;\n if (gl.FLOAT_MAT4 == info.type) {\n // prettier-ignore\n gl.uniformMatrix4fv(location, false, [\n m[0], m[4], m[8], m[12],\n m[1], m[5], m[9], m[13],\n m[2], m[6], m[10], m[14],\n m[3], m[7], m[11], m[15]\n ]);\n }\n else if (gl.FLOAT_MAT3 == info.type) {\n // prettier-ignore\n gl.uniformMatrix3fv(location, false, [\n m[0], m[4], m[8],\n m[1], m[5], m[9],\n m[2], m[6], m[10]\n ]);\n }\n else if (gl.FLOAT_MAT2 == info.type) {\n // prettier-ignore\n gl.uniformMatrix2fv(location, false, new Float32Array([\n m[0], m[4],\n m[1], m[5]\n ]));\n }\n else {\n throw new Error(`Can't assign M4 to ${info.type}`);\n }\n }\n else {\n throw new Error('attempted to set uniform \"' + name + '\" to invalid value ' + value);\n }\n }\n return this;\n }", "title": "" }, { "docid": "ce0da6627c920e955e4bbd135117da50", "score": "0.5829935", "text": "function o(o){o.attributes.add(\"position\",\"vec3\"),o.vertex.code.add(_shaderModules_interfaces_js__WEBPACK_IMPORTED_MODULE_0__[\"glsl\"]`\n vec3 positionModel() { return position; }\n `)}", "title": "" }, { "docid": "b8732e7afe1b5e161856cc24e5d63283", "score": "0.5817349", "text": "_initialize(){\n let gl = this.gl;\n let len = this.attributes.length;\n let vaos = this.vaos;\n\n for(var i = 0; i < 2; ++i){\n\n vaos[i].bind();\n\n for(var i = 0; i < len; ++i){\n let attrib = this.attributes[i];\n\n attrib.vbos[i].bind();\n gl.vertexAttribPointer(i,attrib.size,attrib.type,attrib.normalized,attrib.stride,attrib.offset);\n gl.enableVertexAttribArray(i)\n attrib.vbos[i].unbind();\n }\n\n }\n\n // if it's in the for loop, vaos array becomes undefined for some reason.\n vaos[0].unbind()\n vaos[1].unbind()\n }", "title": "" }, { "docid": "41b4a3c66a32fba42cf74ad0cc8f230e", "score": "0.57126826", "text": "apply_attributes() {\n\t\tlet stride = this.total_stride;\n\t\tlet current_offset = 0;\n\t\tthis.attributes.forEach(function(a) {\n\t\t\t// Get the size\n\t\t\tlet size = a.byte_length();\n\t\t\tgl.vertexAttribPointer(a.attribute, a.item_count, a.type, a.normalize, stride, current_offset);\n\t\t\tgl.enableVertexAttribArray(a.attribute);\n\t\t\t\n\t\t\t// Update our stride\n\t\t\tcurrent_offset += size;\n\t\t});\n\t\t\n\t\t// TODO: Disable all other attributes\n\t}", "title": "" }, { "docid": "97f11ffae7ce021619ad5a21e22d85d4", "score": "0.57119095", "text": "addVertexBuffer(name, attribute) {\n assert(!this.vertexBuffers[attribute], 'Buffer ' + attribute + ' already exists.');\n //assert(!this[name])\n this.hasBeenCompiled = false;\n assert('string' == typeof name);\n assert('string' == typeof attribute);\n const buffer = (this.vertexBuffers[attribute] = new Buffer$$1(WGL$1.ARRAY_BUFFER, Float32Array));\n buffer.name = name;\n this[name] = [];\n return this;\n }", "title": "" }, { "docid": "3732aa4eb5f360388a80ff35c6ee774f", "score": "0.56642413", "text": "function updateAttrib(gl, program, name, components) {\n var loc = gl.getAttribLocation(program, name);\n gl.enableVertexAttribArray(loc);\n gl.vertexAttribPointer(loc, components, gl.FLOAT, false, 0, 0);\n }", "title": "" }, { "docid": "f37fd07e439f7df691ecb4ce4c7c3a97", "score": "0.5622429", "text": "function enableAttribs(gl, prog) {\n\tfor (var i in prog.vs_attr) {\n\t\tgl.enableVertexAttribArray(gl.getAttribLocation(prog, i));\n\t\tvar buffer = prog.attributes[i];\n\t\tvar loc = gl.getAttribLocation(prog, i);\n\t\tgl.bindBuffer(gl.ARRAY_BUFFER, buffer);\n\t\t// alert(\"Setting buffer \" + buffer + \" to \" + i);\n gl.vertexAttribPointer(loc, buffer.itemSize, gl.FLOAT, false, 0, 0);\n\t}\n}", "title": "" }, { "docid": "276c31e9dd654906045d772f1f730cdb", "score": "0.5600827", "text": "function u(u,a){u.include(_TextureCoordinateAttribute_glsl_js__WEBPACK_IMPORTED_MODULE_1__[\"TextureCoordinateAttribute\"],a),u.fragment.code.add(_shaderModules_interfaces_js__WEBPACK_IMPORTED_MODULE_0__[\"glsl\"]`\n struct TextureLookupParameter {\n vec2 uv;\n ${a.supportsTextureAtlas?\"vec2 size;\":\"\"}\n } vtc;\n `),1===a.attributeTextureCoordinates&&u.fragment.code.add(_shaderModules_interfaces_js__WEBPACK_IMPORTED_MODULE_0__[\"glsl\"]`\n vec4 textureLookup(sampler2D tex, TextureLookupParameter params) {\n return texture2D(tex, params.uv);\n }\n `),2===a.attributeTextureCoordinates&&(u.include(_util_TextureAtlasLookup_glsl_js__WEBPACK_IMPORTED_MODULE_2__[\"TextureAtlasLookup\"]),u.fragment.code.add(_shaderModules_interfaces_js__WEBPACK_IMPORTED_MODULE_0__[\"glsl\"]`\n vec4 textureLookup(sampler2D tex, TextureLookupParameter params) {\n return textureAtlasLookup(tex, params.size, params.uv, vuvRegion);\n }\n `))}", "title": "" }, { "docid": "155204ccd1f2bd559aa4c5e8f04f7719", "score": "0.5599049", "text": "set(name, x, y = null, z = null, w = null) {\r\n\t\tif (!this.uniforms_type.hasOwnProperty(name)) return;\r\n\t\tthis.gl.useProgram(this.program);\r\n\t\tswitch (this.uniforms_type[name]) {\r\n\t\t\tcase \"int\":\r\n\t\t\t\tif (typeof (x) !== \"number\") throw new TypeError();\r\n\t\t\t\tthis.gl.uniform1i(this.uniforms_location[name], x);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"ivec2\":\r\n\t\t\t\tif ((typeof (x) !== \"number\") || (typeof (y) !== \"number\")) throw new TypeError();\r\n\t\t\t\tthis.gl.uniform2i(this.uniforms_location[name], x, y);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"ivec3\":\r\n\t\t\t\tif ((typeof (x) !== \"number\") || (typeof (y) !== \"number\") || (typeof (z) !== \"number\")) throw new TypeError();\r\n\t\t\t\tthis.gl.uniform3i(this.uniforms_location[name], x, y, z);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"ivec4\":\r\n\t\t\t\tif ((typeof (x) !== \"number\") || (typeof (y) !== \"number\") || (typeof (z) !== \"number\") || (typeof (w) !== \"number\")) throw new TypeError();\r\n\t\t\t\tthis.gl.uniform4i(this.uniforms_location[name], x, y, z, w);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"float\":\r\n\t\t\t\tif (typeof (x) !== \"number\") throw new TypeError();\r\n\t\t\t\tthis.gl.uniform1f(this.uniforms_location[name], x);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"vec2\":\r\n\t\t\t\tif ((typeof (x) !== \"number\") || (typeof (y) !== \"number\")) throw new TypeError();\r\n\t\t\t\tthis.gl.uniform2f(this.uniforms_location[name], x, y);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"vec3\":\r\n\t\t\t\tif ((typeof (x) !== \"number\") || (typeof (y) !== \"number\") || (typeof (z) !== \"number\")) throw new TypeError();\r\n\t\t\t\tthis.gl.uniform3f(this.uniforms_location[name], x, y, z);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"vec4\":\r\n\t\t\t\tif ((typeof (x) !== \"number\") || (typeof (y) !== \"number\") || (typeof (z) !== \"number\") || (typeof (w) !== \"number\")) throw new TypeError();\r\n\t\t\t\tthis.gl.uniform4f(this.uniforms_location[name], x, y, z, w);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"mat2\":\r\n\t\t\t\tthis.gl.uniformMatrix2fv(this.uniforms_location[name], false, x);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"mat3\":\r\n\t\t\t\tthis.gl.uniformMatrix3fv(this.uniforms_location[name], false, x);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"mat4\":\r\n\t\t\t\tthis.gl.uniformMatrix4fv(this.uniforms_location[name], false, x);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"sampler2D\":\r\n\t\t\t\tif (!(x instanceof Texture)) throw new TypeError();\r\n\t\t\t\tif (x.texture_buffer === null) throw new ReferenceError(\"this texture is empty.\");\r\n\t\t\t\tthis.gl.activeTexture(this.gl[\"TEXTURE\" + this.texture_unit_num[name].toString()]);\r\n\t\t\t\tthis.gl.bindTexture(this.gl.TEXTURE_2D, x.texture_buffer);\r\n\t\t\t\tthis.gl.uniform1i(this.uniforms_location[name], this.texture_unit_num[name]);\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\treturn;\r\n\t}", "title": "" }, { "docid": "3a341ad4f08862f356258964b82bed36", "score": "0.5598077", "text": "_setProperties() {\n\t\tlet ii;\n\n\t\t// uniforms\n\t\tconst uniformNumber = this._gl.getProgramParameter(this._program, ACTIVE_UNIFORMS);\n\n\t\tthis._uniform = {};\n\t\tfor (ii = 0; ii < uniformNumber; ii++) {\n\t\t\tlet uniform = this._gl.getActiveUniform(this._program, ii);\n\t\t\tlet uLocation = this._gl.getUniformLocation(this._program, uniform.name);\n\n\t\t\tlet typeName;\n\t\t\t/**\n\t\t\t * https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Constants\n\t\t\t * */\n\t\t\tswitch (uniform.type) {\n\t\t\t\tcase FLOAT:\n\t\t\t\t\ttypeName = 'float';\n\t\t\t\t\tbreak;\n\t\t\t\tcase FLOAT_VEC2:\n\t\t\t\t\ttypeName = 'vec2';\n\t\t\t\t\tbreak;\n\t\t\t\tcase FLOAT_VEC3:\n\t\t\t\t\ttypeName = 'vec3';\n\t\t\t\t\tbreak;\n\t\t\t\tcase FLOAT_VEC4:\n\t\t\t\t\ttypeName = 'vec4';\n\t\t\t\t\tbreak;\n\t\t\t\tcase FLOAT_MAT2:\n\t\t\t\t\ttypeName = 'mat2';\n\t\t\t\t\tbreak;\n\t\t\t\tcase FLOAT_MAT3:\n\t\t\t\t\ttypeName = 'mat3';\n\t\t\t\t\tbreak;\n\t\t\t\tcase FLOAT_MAT4:\n\t\t\t\t\ttypeName = 'mat4';\n\t\t\t\t\tbreak;\n\t\t\t\tcase SAMPLER_2D:\n\t\t\t\t\ttypeName = 'sampler2D';\n\t\t\t\t\tbreak; // TODO Do we need to some method or not\n\t\t\t}\n\n\t\t\tthis._uniform[uniform.name] = {\n\t\t\t\tlocation: uLocation,\n\t\t\t\ttype: uniform.type,\n\t\t\t\ttypeName: typeName,\n\t\t\t\tsize: uniform.size\n\t\t\t};\n\t\t}\n\n\t\t//attributes\n\t\tconst attributreNumber = this._gl.getProgramParameter(this._program, ACTIVE_ATTRIBUTES);\n\t\tthis._attrib = {};\n\t\tfor (ii = 0; ii < attributreNumber; ii++) {\n\t\t\tlet attrib = this._gl.getActiveAttrib(this._program, ii);\n\t\t\tthis._attrib[attrib.name] = {\n\t\t\t\tlocation: this._gl.getAttribLocation(this._program, attrib.name),\n\t\t\t\ttype: attrib.type,\n\t\t\t\tsize: attrib.size\n\t\t\t};\n\t\t}\n\n\t\treturn this;\n\t}", "title": "" }, { "docid": "80c106070461c9512ac71267bb61623b", "score": "0.55871683", "text": "function t(o,r){o.include(_PositionAttribute_glsl_js__WEBPACK_IMPORTED_MODULE_5__[\"PositionAttribute\"]),o.vertex.include(_util_DoublePrecision_glsl_js__WEBPACK_IMPORTED_MODULE_4__[\"DoublePrecision\"],r),o.varyings.add(\"vPositionWorldCameraRelative\",\"vec3\"),o.varyings.add(\"vPosition_view\",\"vec3\"),o.vertex.uniforms.add(\"uTransform_WorldFromModel_RS\",\"mat3\"),o.vertex.uniforms.add(\"uTransform_WorldFromModel_TH\",\"vec3\"),o.vertex.uniforms.add(\"uTransform_WorldFromModel_TL\",\"vec3\"),o.vertex.uniforms.add(\"uTransform_WorldFromView_TH\",\"vec3\"),o.vertex.uniforms.add(\"uTransform_WorldFromView_TL\",\"vec3\"),o.vertex.uniforms.add(\"uTransform_ViewFromCameraRelative_RS\",\"mat3\"),o.vertex.uniforms.add(\"uTransform_ProjFromView\",\"mat4\"),o.vertex.code.add(_shaderModules_interfaces_js__WEBPACK_IMPORTED_MODULE_3__[\"glsl\"]`\n // compute position in world space orientation, but relative to the camera position\n vec3 positionWorldCameraRelative() {\n vec3 rotatedModelPosition = uTransform_WorldFromModel_RS * positionModel();\n\n vec3 transform_CameraRelativeFromModel = dpAdd(\n uTransform_WorldFromModel_TL,\n uTransform_WorldFromModel_TH,\n -uTransform_WorldFromView_TL,\n -uTransform_WorldFromView_TH\n );\n\n return transform_CameraRelativeFromModel + rotatedModelPosition;\n }\n\n // position in view space, that is relative to the camera position and orientation\n vec3 position_view() {\n return uTransform_ViewFromCameraRelative_RS * positionWorldCameraRelative();\n }\n\n // compute gl_Position and forward related varyings to fragment shader\n void forwardPosition() {\n vPositionWorldCameraRelative = positionWorldCameraRelative();\n vPosition_view = position_view();\n gl_Position = uTransform_ProjFromView * vec4(vPosition_view, 1.0);\n }\n\n vec3 positionWorld() {\n return uTransform_WorldFromView_TL + vPositionWorldCameraRelative;\n }\n `),o.fragment.uniforms.add(\"uTransform_WorldFromView_TL\",\"vec3\"),o.fragment.code.add(_shaderModules_interfaces_js__WEBPACK_IMPORTED_MODULE_3__[\"glsl\"]`\n vec3 positionWorld() {\n return uTransform_WorldFromView_TL + vPositionWorldCameraRelative;\n }\n `)}", "title": "" }, { "docid": "ad9454d581a71603adc4d9890d555c3b", "score": "0.5582077", "text": "function l(l,e){0===e.normalType||1===e.normalType?(l.include(_NormalAttribute_glsl_js__WEBPACK_IMPORTED_MODULE_1__[\"NormalAttribute\"],e),l.varyings.add(\"vNormalWorld\",\"vec3\"),l.varyings.add(\"vNormalView\",\"vec3\"),l.vertex.uniforms.add(\"uTransformNormal_GlobalFromModel\",\"mat3\"),l.vertex.uniforms.add(\"uTransformNormal_ViewFromGlobal\",\"mat3\"),l.vertex.code.add(_shaderModules_interfaces_js__WEBPACK_IMPORTED_MODULE_0__[\"glsl\"]`\n void forwardNormal() {\n vNormalWorld = uTransformNormal_GlobalFromModel * normalModel();\n vNormalView = uTransformNormal_ViewFromGlobal * vNormalWorld;\n }\n `)):2===e.normalType?(l.include(_VertexPosition_glsl_js__WEBPACK_IMPORTED_MODULE_2__[\"VertexPosition\"],e),l.varyings.add(\"vNormalWorld\",\"vec3\"),l.vertex.code.add(_shaderModules_interfaces_js__WEBPACK_IMPORTED_MODULE_0__[\"glsl\"]`\n void forwardNormal() {\n vNormalWorld = ${1===e.viewingMode?_shaderModules_interfaces_js__WEBPACK_IMPORTED_MODULE_0__[\"glsl\"]`normalize(vPositionWorldCameraRelative);`:_shaderModules_interfaces_js__WEBPACK_IMPORTED_MODULE_0__[\"glsl\"]`vec3(0.0, 0.0, 1.0);`}\n }\n `)):l.vertex.code.add(_shaderModules_interfaces_js__WEBPACK_IMPORTED_MODULE_0__[\"glsl\"]`\n void forwardNormal() {}\n `)}", "title": "" }, { "docid": "d8f6451307fdaa20715da2b5042d4687", "score": "0.55676883", "text": "function vertexShader(attributes, uniforms, vColor, vLight) {\n mustBeDefined('attributes', attributes);\n mustBeDefined('uniforms', uniforms);\n mustBeBoolean('vColor', vColor);\n mustBeBoolean('vLight', vLight);\n var lines = [];\n lines.push(\"// vertex shader generated by EIGHT\");\n // The precision is implicitly highp for vertex shaders.\n // So there is no need to add preamble for changing the precision unless\n // we want to lower the precision.\n for (var aName in attributes) {\n lines.push(ATTRIBUTE + attributes[aName].glslType + SPACE + getAttribVarName(attributes[aName], aName) + SEMICOLON);\n }\n for (var uName in uniforms) {\n lines.push(UNIFORM + uniforms[uName].glslType + SPACE + getUniformCodeName(uniforms, uName) + SEMICOLON);\n }\n if (vColor) {\n lines.push(\"varying highp vec4 vColor;\");\n }\n if (vLight) {\n lines.push(\"varying highp vec3 vLight;\");\n }\n lines.push(\"void main(void) {\");\n var glPosition = [];\n glPosition.unshift(SEMICOLON);\n if (attributes[GraphicsProgramSymbols.ATTRIBUTE_POSITION]) {\n switch (attributes[GraphicsProgramSymbols.ATTRIBUTE_POSITION].glslType) {\n case 'float': {\n // This case would be unusual; just providing an x-coordinate.\n // We must provide defaults for the y-, z-, and w-coordinates.\n glPosition.unshift(RPAREN);\n glPosition.unshift('1.0');\n glPosition.unshift(COMMA);\n glPosition.unshift('0.0');\n glPosition.unshift(COMMA);\n glPosition.unshift('0.0');\n glPosition.unshift(COMMA);\n glPosition.unshift(getAttribVarName(attributes[GraphicsProgramSymbols.ATTRIBUTE_POSITION], GraphicsProgramSymbols.ATTRIBUTE_POSITION));\n glPosition.unshift(LPAREN);\n glPosition.unshift('vec4');\n break;\n }\n case 'vec2': {\n // This case happens when the user wants to work in 2D.\n // We must provide a value for the homogeneous w-coordinate,\n // as well as the z-coordinate.\n glPosition.unshift(RPAREN);\n glPosition.unshift('1.0');\n glPosition.unshift(COMMA);\n glPosition.unshift('0.0');\n glPosition.unshift(COMMA);\n glPosition.unshift(getAttribVarName(attributes[GraphicsProgramSymbols.ATTRIBUTE_POSITION], GraphicsProgramSymbols.ATTRIBUTE_POSITION));\n glPosition.unshift(LPAREN);\n glPosition.unshift('vec4');\n break;\n }\n case 'vec3': {\n // This is probably the most common case, 3D but only x-, y-, z-coordinates.\n // We must provide a value for the homogeneous w-coordinate.\n glPosition.unshift(RPAREN);\n glPosition.unshift('1.0');\n glPosition.unshift(COMMA);\n glPosition.unshift(getAttribVarName(attributes[GraphicsProgramSymbols.ATTRIBUTE_POSITION], GraphicsProgramSymbols.ATTRIBUTE_POSITION));\n glPosition.unshift(LPAREN);\n glPosition.unshift('vec4');\n break;\n }\n case 'vec4': {\n // This happens when the use is working in homodeneous coordinates.\n // We don't need to use the constructor function at all.\n glPosition.unshift(getAttribVarName(attributes[GraphicsProgramSymbols.ATTRIBUTE_POSITION], GraphicsProgramSymbols.ATTRIBUTE_POSITION));\n break;\n }\n }\n }\n else {\n glPosition.unshift(\"vec4(0.0, 0.0, 0.0, 1.0)\");\n }\n // Reflections are applied first.\n if (uniforms[GraphicsProgramSymbols.UNIFORM_REFLECTION_ONE_MATRIX]) {\n glPosition.unshift(TIMES);\n glPosition.unshift(getUniformCodeName(uniforms, GraphicsProgramSymbols.UNIFORM_REFLECTION_ONE_MATRIX));\n }\n if (uniforms[GraphicsProgramSymbols.UNIFORM_REFLECTION_TWO_MATRIX]) {\n glPosition.unshift(TIMES);\n glPosition.unshift(getUniformCodeName(uniforms, GraphicsProgramSymbols.UNIFORM_REFLECTION_TWO_MATRIX));\n }\n if (uniforms[GraphicsProgramSymbols.UNIFORM_MODEL_MATRIX]) {\n glPosition.unshift(TIMES);\n glPosition.unshift(getUniformCodeName(uniforms, GraphicsProgramSymbols.UNIFORM_MODEL_MATRIX));\n }\n if (uniforms[GraphicsProgramSymbols.UNIFORM_VIEW_MATRIX]) {\n glPosition.unshift(TIMES);\n glPosition.unshift(getUniformCodeName(uniforms, GraphicsProgramSymbols.UNIFORM_VIEW_MATRIX));\n }\n if (uniforms[GraphicsProgramSymbols.UNIFORM_PROJECTION_MATRIX]) {\n glPosition.unshift(TIMES);\n glPosition.unshift(getUniformCodeName(uniforms, GraphicsProgramSymbols.UNIFORM_PROJECTION_MATRIX));\n }\n glPosition.unshift(ASSIGN);\n glPosition.unshift(\"gl_Position\");\n glPosition.unshift(' ');\n lines.push(glPosition.join(''));\n if (uniforms[GraphicsProgramSymbols.UNIFORM_POINT_SIZE]) {\n lines.push(\" gl_PointSize = \" + getUniformCodeName(uniforms, GraphicsProgramSymbols.UNIFORM_POINT_SIZE) + \";\");\n }\n if (vColor) {\n if (attributes[GraphicsProgramSymbols.ATTRIBUTE_COLOR]) {\n var colorAttribVarName = getAttribVarName(attributes[GraphicsProgramSymbols.ATTRIBUTE_COLOR], GraphicsProgramSymbols.ATTRIBUTE_COLOR);\n switch (attributes[GraphicsProgramSymbols.ATTRIBUTE_COLOR].glslType) {\n case 'vec4':\n {\n lines.push(\" vColor = \" + colorAttribVarName + SEMICOLON);\n }\n break;\n case 'vec3':\n {\n lines.push(\" vColor = vec4(\" + colorAttribVarName + \", 1.0);\");\n }\n break;\n default: {\n throw new Error(\"Unexpected type for color attribute: \" + attributes[GraphicsProgramSymbols.ATTRIBUTE_COLOR].glslType);\n }\n }\n }\n else if (uniforms[GraphicsProgramSymbols.UNIFORM_COLOR]) {\n var colorUniformVarName = getUniformCodeName(uniforms, GraphicsProgramSymbols.UNIFORM_COLOR);\n switch (uniforms[GraphicsProgramSymbols.UNIFORM_COLOR].glslType) {\n case 'vec4':\n {\n lines.push(\" vColor = \" + colorUniformVarName + SEMICOLON);\n }\n break;\n case 'vec3':\n {\n lines.push(\" vColor = vec4(\" + colorUniformVarName + \", 1.0);\");\n }\n break;\n default: {\n throw new Error(\"Unexpected type for color uniform: \" + uniforms[GraphicsProgramSymbols.UNIFORM_COLOR].glslType);\n }\n }\n }\n else {\n lines.push(\" vColor = vec4(1.0, 1.0, 1.0, 1.0);\");\n }\n }\n if (vLight) {\n if (uniforms[GraphicsProgramSymbols.UNIFORM_DIRECTIONAL_LIGHT_COLOR] && uniforms[GraphicsProgramSymbols.UNIFORM_DIRECTIONAL_LIGHT_DIRECTION] && uniforms[GraphicsProgramSymbols.UNIFORM_NORMAL_MATRIX] && attributes[GraphicsProgramSymbols.ATTRIBUTE_NORMAL]) {\n lines.push(\" vec3 L = normalize(\" + getUniformCodeName(uniforms, GraphicsProgramSymbols.UNIFORM_DIRECTIONAL_LIGHT_DIRECTION) + \");\");\n lines.push(\" vec3 N = normalize(\" + getUniformCodeName(uniforms, GraphicsProgramSymbols.UNIFORM_NORMAL_MATRIX) + \" * \" + getAttribVarName(attributes[GraphicsProgramSymbols.ATTRIBUTE_NORMAL], GraphicsProgramSymbols.ATTRIBUTE_NORMAL) + \");\");\n lines.push(\" // The minus sign arises because L is the light direction, so we need dot(N, -L) = -dot(N, L)\");\n lines.push(\" float \" + DIRECTIONAL_LIGHT_COSINE_FACTOR_VARNAME + \" = max(-dot(N, L), 0.0);\");\n if (uniforms[GraphicsProgramSymbols.UNIFORM_AMBIENT_LIGHT]) {\n lines.push(\" vLight = \" + getUniformCodeName(uniforms, GraphicsProgramSymbols.UNIFORM_AMBIENT_LIGHT) + \" + \" + DIRECTIONAL_LIGHT_COSINE_FACTOR_VARNAME + \" * \" + getUniformCodeName(uniforms, GraphicsProgramSymbols.UNIFORM_DIRECTIONAL_LIGHT_COLOR) + \";\");\n }\n else {\n lines.push(\" vLight = \" + DIRECTIONAL_LIGHT_COSINE_FACTOR_VARNAME + \" * \" + getUniformCodeName(uniforms, GraphicsProgramSymbols.UNIFORM_DIRECTIONAL_LIGHT_COLOR) + \";\");\n }\n }\n else {\n if (uniforms[GraphicsProgramSymbols.UNIFORM_AMBIENT_LIGHT]) {\n lines.push(\" vLight = \" + getUniformCodeName(uniforms, GraphicsProgramSymbols.UNIFORM_AMBIENT_LIGHT) + \";\");\n }\n else {\n lines.push(\" vLight = vec3(1.0, 1.0, 1.0);\");\n }\n }\n }\n lines.push(\"}\");\n var code = lines.join(\"\\n\");\n return code;\n }", "title": "" }, { "docid": "14043dd9e8108e4ebcf0842c3cb1f424", "score": "0.5539072", "text": "map_attribute_name_to_buffer_name( name ) // We'll pull single entries out per vertex by field name. Map\r\n { // those names onto the vertex array names we'll pull them from.\r\n return { object_space_pos: \"positions\", tex_coord: \"texture_coords\" }[ name ]; }", "title": "" }, { "docid": "c13c9fe9b389a5896c5b755d769927af", "score": "0.55369973", "text": "initArrayBuffer(attribute, data, type, num) {\r\n\t\tconst buffer = this.gl.createBuffer();\r\n\t\tif (!buffer) {\r\n\t\t\tconsole.log('Failed to init array buffer');\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tthis.gl.bindBuffer(this.gl.ARRAY_BUFFER, buffer);\r\n\t\tthis.gl.bufferData(this.gl.ARRAY_BUFFER, data, this.gl.STATIC_DRAW);\r\n\r\n\t\tconst a_attribute = this.gl.getAttribLocation(this.gl.program, attribute);\r\n\t\tif (a_attribute < 0) {\r\n\t\t\tconsole.log('Failed to locate attribute ' + attribute);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tthis.gl.vertexAttribPointer(a_attribute, num, type, false, 0, 0);\r\n\t\tthis.gl.enableVertexAttribArray(a_attribute);\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "1f298ca14ddec96a8820a1dfdd90fe96", "score": "0.5522658", "text": "render() {\n\n useShader(gl,this.shader)\n\n if(this.ve == null)\n {\n gl.enable(gl.DEPTH_TEST);\n // Init 32 bit arrays\n this.ve = new Float32Array(this.vertices.length*3)\n this.colors = new Float32Array(this.vertices.length*4)\n this.uvs = new Float32Array(this.vertices.length*2)\n\n // Set arrays\n for (var i = 0; i < this.vertices.length; i++) {\n this.ve[i*3] = (this.vertices[i].points.elements[0])\n this.ve[i*3 + 1] = (this.vertices[i].points.elements[1])\n this.ve[i*3 + 2] = (this.vertices[i].points.elements[2])\n\n this.colors[i*4] = this.color[0]\n this.colors[i*4 + 1] = this.color[1]\n this.colors[i*4 + 2] = this.color[2]\n this.colors[i*4 + 3] = this.color[3]\n\n this.uvs[i*2] = this.vertices[i].uv[0]\n this.uvs[i*2 + 1] = this.vertices[i].uv[1]\n }\n\n\n //sendAttributeBufferToGLSL(this.ve, this.ve.length/3, 'a_Position')\n //sendAttributeBufferToGLSL(this.uvs, this.uvs.length/2, 'a_TexCoord')\n //sendAttributeBufferToGLSL(this.colors, this.colors.length/4, 'a_Color')\n\n this.vecBuff = gl.createBuffer()\n this.texBuff = gl.createBuffer()\n this.colBuff = gl.createBuffer()\n\n this.vec_pos = gl.getAttribLocation(gl.program, 'a_Position')\n this.tex_pos = gl.getAttribLocation(gl.program, 'a_TexCoord')\n this.col_pos = gl.getAttribLocation(gl.program, 'a_Color')\n\n // Get the storage location of u_MvpMatrix\n this.u_MvpMatrix = gl.getUniformLocation(gl.program, 'u_MvpMatrix');\n this.u_Sampler = gl.getUniformLocation(gl.program, 'u_Sampler')\n this.glTextureUnit = eval(\"gl.TEXTURE\" + 0)\n }\n\n // Calculate the model view projection matrix\n this.mvpMatrix.set(camera.projectionMatrix).multiply(camera.viewMatrix).multiply(this.modelMatrix);\n // Pass the model view projection matrix to u_MvpMatrix\n gl.uniformMatrix4fv(this.u_MvpMatrix, false, this.mvpMatrix.elements)\n\n gl.bindBuffer(gl.ARRAY_BUFFER, this.vecBuff)\n gl.bufferData(gl.ARRAY_BUFFER, this.ve, gl.STATIC_DRAW)\n gl.vertexAttribPointer(this.vec_pos, 3, gl.FLOAT, false, 0, 0)\n gl.enableVertexAttribArray(this.vec_pos)\n\n gl.bindBuffer(gl.ARRAY_BUFFER, this.texBuff)\n gl.bufferData(gl.ARRAY_BUFFER, this.uvs, gl.STATIC_DRAW)\n gl.vertexAttribPointer(this.tex_pos, 2, gl.FLOAT, false, 0, 0)\n gl.enableVertexAttribArray(this.tex_pos)\n\n gl.bindBuffer(gl.ARRAY_BUFFER, this.colBuff)\n gl.bufferData(gl.ARRAY_BUFFER, this.colors, gl.STATIC_DRAW)\n gl.vertexAttribPointer(this.col_pos, 4, gl.FLOAT, false, 0, 0)\n gl.enableVertexAttribArray(this.col_pos)\n\n gl.activeTexture(this.glTextureUnit)\n\n gl.bindTexture(gl.TEXTURE_2D, this.texture)\n\n gl.uniform1i(this.u_Sampler, this.textureUnit)\n\n tellGLSLToDrawCurrentBuffer(this.ve.length/3)\n\n }", "title": "" }, { "docid": "f1bafba35a5e9753a9eda0765fc61bd8", "score": "0.5515446", "text": "function addUv(i) {\n if (op.uv[i].toString() == \"0\") geo.uvs.push(0.0, 0.0);\n if (op.uv[i].toString() == \"1\") geo.uvs.push(0.0, op.vp);\n if (op.uv[i].toString() == \"2\") geo.uvs.push(op.up, 0.0);\n }", "title": "" }, { "docid": "b142a89ddc4e98441002da1b3681c733", "score": "0.54836375", "text": "load(attributes, uniforms) {\n this.useProgram();\n this.setAttributeLocations(attributes);\n this.setUniformLocations(uniforms);\n }", "title": "" }, { "docid": "88def7f0275332ac8c02495aa875fe00", "score": "0.54731965", "text": "setData(array) {\n if (this.attribs == null)\n throw \"set attributes first\";\n this.numVertices = array.length / (this.stride / 4);\n this.gl.bindBuffer(this.gl.ARRAY_BUFFER, this.buffer);\n this.gl.bufferData(this.gl.ARRAY_BUFFER, new Float32Array(array), this.gl.DYNAMIC_DRAW);\n //not necessary an in webgl2 anymore to rebind the same last buffer (which is achieved by giving a null buffer), after buffer is changed. Removed it on all other occasions\n // this.gl.bindBuffer(this.gl.ARRAY_BUFFER, null); \n }", "title": "" }, { "docid": "99364390b7aa60b7a626ab0cb3dbcb20", "score": "0.5461935", "text": "function getAttributesUniforms (shaderString) {\n // All attribute and uniform definitions come before\n // the void statement\n var voidIndex = shaderString.indexOf(' void ')\n\n var shaderBeforeVoid = shaderString.substring(0, voidIndex)\n\n // Split the shader into individual statements\n var shaderStatements = shaderBeforeVoid.split(';')\n\n // Find all of the uniforms and attributes in each statement in the shader\n // statements end with a semicolon `;`\n return shaderStatements.reduce(function (attrsAndUniforms, statement) {\n // Find the location of our defined attribute or uniform in this particular statement\n // We know that the type and name come right after this part of the statement\n // see: test/get-attributes-uniforms for examples\n var attribLocation = statement.indexOf(' attribute ')\n var uniformLocation = statement.indexOf(' uniform ')\n\n // If we have an attribute or a uniform in this statement we add it to our list\n if (attribLocation !== -1) {\n // Remove any comment lines that come before our attribute declaration\n statement = statement.substring(Math.min(statement.lastIndexOf('\\n'), attribLocation))\n\n // Tokenize the attribute declaration.. ex: [attribute, vec3, position]\n var attributeStatementTokens = statement.trim().replace('\\n', ' ').split(/[ ]+/)\n // The token that is one spot after `attribute` is the type (ex: vec2, vec4, ... etc)\n // The token that comes two spots after our `attribute` is the name (ex: aVertexPosition, aVertexNormal...)\n // So this turns into ex: attributes['position'] = 'vec3'\n attrsAndUniforms.attributes[attributeStatementTokens[2]] = attributeStatementTokens[1]\n } else if (uniformLocation !== -1) {\n // Remove any comment lines that come before our uniform declaration\n statement = statement.substring(Math.min(statement.lastIndexOf('\\n'), uniformLocation))\n\n var uniformStatementTokens = statement.trim().replace('\\n', ' ').split(/[ ]+/)\n // The token that is one spot after `uniform` is the type (ex: vec2, vec4, ... etc)\n // Find the token that comes two spots after our `uniform` (the name)\n attrsAndUniforms.uniforms[uniformStatementTokens[2]] = uniformStatementTokens[1]\n }\n\n return attrsAndUniforms\n }, {attributes: {}, uniforms: {}})\n}", "title": "" }, { "docid": "8f395e1a84d713bee0bc3da04eccd807", "score": "0.5430193", "text": "function r(r,e){e.attributeColor?(r.attributes.add(\"color\",\"vec4\"),r.varyings.add(\"vColor\",\"vec4\"),r.vertex.code.add(_shaderModules_interfaces_js__WEBPACK_IMPORTED_MODULE_0__[\"glsl\"]`\n void forwardVertexColor() { vColor = color; }\n `),r.vertex.code.add(_shaderModules_interfaces_js__WEBPACK_IMPORTED_MODULE_0__[\"glsl\"]`\n void forwardNormalizedVertexColor() { vColor = color * 0.003921568627451; }\n `)):r.vertex.code.add(_shaderModules_interfaces_js__WEBPACK_IMPORTED_MODULE_0__[\"glsl\"]`\n void forwardVertexColor() {}\n void forwardNormalizedVertexColor() {}\n `)}", "title": "" }, { "docid": "282498fffcfc2b5237cbed5d6e3e7c9c", "score": "0.5416274", "text": "setAttribs(attribs) {\n this.attribs = attribs;\n this.offsets = [];\n this.stride = 0;\n let n = attribs.length;\n for (let i = 0; i < n; i++) {\n this.offsets.push(this.stride);\n this.stride += attribs[i].float32Count * Float32Array.BYTES_PER_ELEMENT; // 32bit float Bytes are a constant of 4\n }\n }", "title": "" }, { "docid": "9162d4fe1afae8e7d68cf18b72abac00", "score": "0.5369025", "text": "function createAttributes(positions) {\n if (positions.length > 0) {\n const v = positions[0];\n if (v === undefined || v === null) {\n throw Error(\"Empty element in positions\");\n }\n const positionVec = new Array();\n const positionVecLow = new Array();\n const addHPValue = (...values) => {\n for (const value of values) {\n const major = Math.fround(value);\n positionVecLow.push(value - major);\n positionVec.push(major);\n }\n };\n const addHPVector = (vec) => {\n addHPValue(vec.x, vec.y, vec.z);\n };\n const vAny = v;\n if (vAny.z !== undefined) {\n positions.forEach(vec => {\n addHPVector(vec);\n });\n }\n else {\n if (positionVec.length % 3 !== 0) {\n throw Error(\"Positions must be 3D, not 2D\");\n }\n positions.forEach((n) => {\n addHPValue(n);\n });\n }\n return {\n positionHigh: new three_1.Float32BufferAttribute(positionVec, 3),\n positionLow: new three_1.Float32BufferAttribute(positionVecLow, 3)\n };\n }\n else {\n return {\n positionHigh: new three_1.Float32BufferAttribute([], 3),\n positionLow: new three_1.Float32BufferAttribute([], 3)\n };\n }\n }", "title": "" }, { "docid": "d43c3b1dc23ebc89334d498cd9694f0b", "score": "0.53386426", "text": "function bindAttribData (gl, data, target, format, dataLength) {\n let buffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, buffer);\n gl.bufferData(gl.ARRAY_BUFFER, data, gl.STATIC_DRAW);\n gl.vertexAttribPointer(target, dataLength, format, false, 0, 0);\n gl.enableVertexAttribArray(target);\n}", "title": "" }, { "docid": "d43c3b1dc23ebc89334d498cd9694f0b", "score": "0.53386426", "text": "function bindAttribData (gl, data, target, format, dataLength) {\n let buffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, buffer);\n gl.bufferData(gl.ARRAY_BUFFER, data, gl.STATIC_DRAW);\n gl.vertexAttribPointer(target, dataLength, format, false, 0, 0);\n gl.enableVertexAttribArray(target);\n}", "title": "" }, { "docid": "1429e8088e37cc54a659b232b70eba88", "score": "0.53116876", "text": "function bindAttribData (gl, data, target) {\n let buffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, buffer);\n gl.bufferData(gl.ARRAY_BUFFER, data, gl.STATIC_DRAW);\n gl.vertexAttribPointer(target, 3, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(target);\n}", "title": "" }, { "docid": "022ee772dc2370d7b3454f7092ffeb45", "score": "0.530572", "text": "function setupVertexAttributes(material, program, geometry, startIndex, indices) {\n\n var programAttributes = program.attributes;\n var programAttributesKeys = program.attributesKeys;\n\n //Those two need to be unequal to begin with...\n var boundBuffer = 0;\n var interleavedBuffer;\n\n\n if (indices) {\n // indices (they can have a VBO even if the geometry part is streamed)\n if (!indices.buffer && geometry.streamingDraw) {\n var buffer = _dynamicBuffers.index;\n if (!buffer) {\n buffer = _gl.createBuffer();\n _dynamicBuffers.index = buffer;\n }\n\n //_gl.bindBuffer( _gl.ELEMENT_ARRAY_BUFFER, null);\n _gl.bindBuffer(_gl.ELEMENT_ARRAY_BUFFER, buffer);\n _gl.bufferData(_gl.ELEMENT_ARRAY_BUFFER, indices.array || geometry.ib, _gl.DYNAMIC_DRAW);\n }\n else\n _gl.bindBuffer(_gl.ELEMENT_ARRAY_BUFFER, geometry.ibbuffer || indices.buffer);\n }\n\n\n //Set attributes\n for (var i = 0, len = programAttributesKeys.length; i < len; i++) {\n\n var key = programAttributesKeys[i];\n var programAttribute = programAttributes[key];\n\n if (programAttribute >= 0) {\n\n var geometryAttribute = geometry.attributes[key];\n\n if (geometryAttribute) {\n\n var isInterleaved = (geometryAttribute.itemOffset !== undefined);\n\n var stride, itemOffset;\n\n if (isInterleaved) {\n\n stride = geometry.vbstride;\n itemOffset = geometryAttribute.itemOffset;\n\n if (boundBuffer !== interleavedBuffer) {\n if (geometry.streamingDraw) {\n\n boundBuffer = bindDynamic('interleavedVB', geometry.vb);\n\n } else {\n\n boundBuffer = geometry.vbbuffer;\n _gl.bindBuffer(_gl.ARRAY_BUFFER, boundBuffer);\n\n }\n\n interleavedBuffer = boundBuffer;\n }\n\n } else {\n\n stride = geometryAttribute.itemSize;\n itemOffset = 0;\n\n if (geometry.streamingDraw) {\n\n boundBuffer = bindDynamic(key, geometryAttribute.array);\n\n } else {\n\n boundBuffer = geometryAttribute.buffer;\n _gl.bindBuffer(_gl.ARRAY_BUFFER, boundBuffer);\n\n }\n }\n\n var type = _gl.FLOAT;\n var itemWidth = geometryAttribute.bytesPerItem || 4;\n if (itemWidth === 1) {\n type = _gl.UNSIGNED_BYTE;\n } else if (itemWidth === 2) {\n type = _gl.UNSIGNED_SHORT;\n }\n\n if (isInterleaved)\n itemWidth = 4; //our interleaved buffers define stride in multiples of 4 bytes\n\n state.enableAttribute(programAttribute);\n _gl.vertexAttribPointer(programAttribute, geometryAttribute.itemSize, type, geometryAttribute.normalize, stride * itemWidth, (itemOffset + startIndex * stride) * itemWidth);\n\n if (_glExtensionInstancedArrays && geometry.numInstances)\n _glExtensionInstancedArrays.vertexAttribDivisorANGLE(programAttribute, geometryAttribute.divisor || 0);\n\n\n } else if (material.defaultAttributeValues) {\n\n var attr = material.defaultAttributeValues[key];\n\n if (attr && attr.length === 2) {\n\n _gl.vertexAttrib2fv(programAttribute, material.defaultAttributeValues[key]);\n\n } else if (attr && attr.length === 3) {\n\n _gl.vertexAttrib3fv(programAttribute, material.defaultAttributeValues[key]);\n\n }\n\n }\n }\n }\n\n state.disableUnusedAttributes();\n\n }", "title": "" }, { "docid": "ff7668835ae67870f06a1cd5c35572dd", "score": "0.5287962", "text": "function createEmptyArrayBuffer(a_attribute, num, type) {\r\n var buffer = gl.createBuffer(); // Create a buffer object\r\n if (!buffer) {\r\n console.log('Failed to create the buffer object');\r\n return null;\r\n }\r\n gl.bindBuffer(gl.ARRAY_BUFFER, buffer);\r\n gl.vertexAttribPointer(a_attribute, num, type, false, 0, 0); // Assign the buffer object to the attribute variable\r\n gl.enableVertexAttribArray(a_attribute); // Enable the assignment\r\n \r\n return buffer;\r\n}", "title": "" }, { "docid": "9c44d417aec37e09a9948ea7e74a510a", "score": "0.5271506", "text": "_setProperties() {\n let ii;\n let context = { texIndex: 0 };\n\n // ============\n // uniforms\n // ============\n\t\n const uniformNumber = this._gl.getProgramParameter(this._program, this._gl.ACTIVE_UNIFORMS);\n\n /**\n * @member {object}\n */\n this.uniform = {};\n for (ii = 0; ii < uniformNumber; ii++) {\n let uniformInfo = this._gl.getActiveUniform(this._program, ii);\n this.uniform[uniformInfo.name] = new Uniform(this._gl, this._program, uniformInfo, context);\n }\n\n // ============\n // attributes\n // ============\n\n const attributreNumber = this._gl.getProgramParameter(this._program, this._gl.ACTIVE_ATTRIBUTES);\n /**\n * @member {object}\n */\n this.attrib = {};\n for (ii = 0; ii < attributreNumber; ii++) {\n let attrib = this._gl.getActiveAttrib(this._program, ii);\n this.attrib[attrib.name] = {\n location: this._gl.getAttribLocation(this._program, attrib.name),\n type: attrib.type,\n size: attrib.size\n };\n }\n\n return this;\n }", "title": "" }, { "docid": "ffbaea2409887143267485135ee65855", "score": "0.52700686", "text": "setShaderBuffer(vertexBuffer, indexBuffer, colorBuffer, vertexSize,\n coordinatesParam, colorParam) {\n let webGL = this.webGL;\n let shaderProgram = this.shaderProgram;\n //Bind vertex buffer object\n //Bind index buffer object\n //Get the attribute location\n //point an attribute to the currently bound VBO\n //Enable the attribute\n webGL.bindBuffer(webGL.ARRAY_BUFFER, vertexBuffer);\n webGL.bindBuffer(webGL.ELEMENT_ARRAY_BUFFER, indexBuffer);\n\n let coord = webGL.getAttribLocation(shaderProgram, coordinatesParam);\n webGL.vertexAttribPointer(coord, vertexSize, webGL.FLOAT, false, 0, 0);\n webGL.enableVertexAttribArray(coord);\n\n\n // bind the color buffer\n // get the attribute location\n // point attribute to the volor buffer object\n // enable the color attribute\n webGL.bindBuffer(webGL.ARRAY_BUFFER, colorBuffer);\n let color = webGL.getAttribLocation(shaderProgram, colorParam);\n webGL.vertexAttribPointer(color, 3, webGL.FLOAT, false, 0, 0);\n webGL.enableVertexAttribArray(color);\n }", "title": "" }, { "docid": "b0dd3b2379f353e11bfff667b835af12", "score": "0.52608204", "text": "static __int__() {\n //var gl: WebGLRenderingContext = LayaGL.instance;\n MeshQuadTexture._fixattriInfo = [5126 /*gl.FLOAT*/, 4, 0,\n 5121 /*gl.UNSIGNED_BYTE*/, 4, 16,\n 5121 /*gl.UNSIGNED_BYTE*/, 4, 20];\n }", "title": "" }, { "docid": "2025235ae1c2671f88091ca85d99ca15", "score": "0.525566", "text": "function enableProgram0(){\r\n gl.enableVertexAttribArray(shaderProgram[0].vertexPositionAttribute);\r\n gl.enableVertexAttribArray(shaderProgram[0].vertexNormalAttribute);\r\n gl.enableVertexAttribArray(shaderProgram[0].vertexColorAttribute);\r\n gl.enableVertexAttribArray(shaderProgram[0].vertexTexCoordsAttribute); \r\n}", "title": "" }, { "docid": "d3f7d66a4c0f1d60de62b901198785f2", "score": "0.52542734", "text": "function n(e,r){r.instanced&&r.instancedDoublePrecision&&(e.attributes.add(\"modelOriginHi\",\"vec3\"),e.attributes.add(\"modelOriginLo\",\"vec3\"),e.attributes.add(\"model\",\"mat3\"),e.attributes.add(\"modelNormal\",\"mat3\")),r.instancedDoublePrecision&&(e.vertex.include(_util_DoublePrecision_glsl_js__WEBPACK_IMPORTED_MODULE_3__[\"DoublePrecision\"],r),e.vertex.uniforms.add(\"viewOriginHi\",\"vec3\"),e.vertex.uniforms.add(\"viewOriginLo\",\"vec3\"));const n=[_shaderModules_interfaces_js__WEBPACK_IMPORTED_MODULE_1__[\"glsl\"]`\n vec3 calculateVPos() {\n ${r.instancedDoublePrecision?\"return model * localPosition().xyz;\":\"return localPosition().xyz;\"}\n }\n `,_shaderModules_interfaces_js__WEBPACK_IMPORTED_MODULE_1__[\"glsl\"]`\n vec3 subtractOrigin(vec3 _pos) {\n ${r.instancedDoublePrecision?_shaderModules_interfaces_js__WEBPACK_IMPORTED_MODULE_1__[\"glsl\"]`\n vec3 originDelta = dpAdd(viewOriginHi, viewOriginLo, -modelOriginHi, -modelOriginLo);\n return _pos - originDelta;`:\"return vpos;\"}\n }\n `,_shaderModules_interfaces_js__WEBPACK_IMPORTED_MODULE_1__[\"glsl\"]`\n vec3 dpNormal(vec4 _normal) {\n ${r.instancedDoublePrecision?\"return normalize(modelNormal * _normal.xyz);\":\"return normalize(_normal.xyz);\"}\n }\n `,_shaderModules_interfaces_js__WEBPACK_IMPORTED_MODULE_1__[\"glsl\"]`\n vec3 dpNormalView(vec4 _normal) {\n ${r.instancedDoublePrecision?\"return normalize((viewNormal * vec4(modelNormal * _normal.xyz, 1.0)).xyz);\":\"return normalize((viewNormal * _normal).xyz);\"}\n }\n `,r.vertexTangets?_shaderModules_interfaces_js__WEBPACK_IMPORTED_MODULE_1__[\"glsl\"]`\n vec4 dpTransformVertexTangent(vec4 _tangent) {\n ${r.instancedDoublePrecision?\"return vec4(modelNormal * _tangent.xyz, _tangent.w);\":\"return _tangent;\"}\n\n }\n `:_shaderModules_interfaces_js__WEBPACK_IMPORTED_MODULE_1__[\"glsl\"]``];e.vertex.code.add(n[0]),e.vertex.code.add(n[1]),e.vertex.code.add(n[2]),2===r.output&&e.vertex.code.add(n[3]),e.vertex.code.add(n[4])}", "title": "" }, { "docid": "db670a1d65c706f8496c2c67f5aec55f", "score": "0.52321714", "text": "function Attribute() {\n /**\n * The attribute semantic. The following semantics have defined behavior:\n * <ul>\n * <li>POSITION: per-vertex position</li>\n * <li>NORMAL: per-vertex normal</li>\n * <li>TANGENT: per-vertex tangent</li>\n * <li>TEXCOORD_0: per-vertex texture coordinates (first set)</li>\n * <li>TEXCOORD_1: per-vertex texture coordinates (second set)</li>\n * <li>COLOR_0: per-vertex colors</li>\n * <li>JOINTS_0: per-vertex joint IDs for skinning</li>\n * <li>WEIGHTS_0: per-vertex joint weights for skinning</li>\n * <li>_FEATURE_ID_0: per-vertex or per-instance feature IDs (first set)</li>\n * <li>_FEATURE_ID_1: per-vertex or per-instance feature IDs (second set)</li>\n * <li>TRANSLATION: per-instance translation</li>\n * <li>ROTATION: per-instance rotation</li>\n * <li>SCALE: per-instance scale</li>\n * </ul>\n *\n * @type {String}\n * @private\n */\n this.semantic = undefined;\n\n /**\n * The component data type of the attribute, e.g. ComponentDatatype.FLOAT.\n *\n * @type {ComponentDatatype}\n * @private\n */\n this.componentDatatype = undefined;\n\n /**\n * The type of the attribute, e.g. AttributeType.VEC3.\n *\n * @type {AttributeType}\n * @private\n */\n this.type = undefined;\n\n /**\n * Whether the attribute is normalized.\n *\n * @type {Boolean}\n * @default false\n * @private\n */\n this.normalized = false;\n\n /**\n * The number of elements.\n *\n * @type {Number}\n * @private\n */\n this.count = undefined;\n\n /**\n * Minimum value of each component in the attribute.\n *\n * @type {Number|Cartesian2|Cartesian3|Cartesian4|Matrix2|Matrix3|Matrix4}\n * @private\n */\n this.min = undefined;\n\n /**\n * Maximum value of each component in the attribute.\n *\n * @type {Number|Cartesian2|Cartesian3|Cartesian4|Matrix2|Matrix3|Matrix4}\n * @private\n */\n this.max = undefined;\n\n /**\n * A constant value used for all elements when typed array and buffer are undefined.\n *\n * @type {Number|Cartesian2|Cartesian3|Cartesian4|Matrix2|Matrix3|Matrix4}\n * @private\n */\n this.constant = undefined;\n\n /**\n * Information about the quantized attribute.\n *\n * @type {ModelComponents.Quantization}\n * @private\n */\n this.quantization = undefined;\n\n /**\n * A typed array containing tightly-packed attribute values.\n *\n * @type {Uint8Array|Int8Array|Uint16Array|Int16Array|Uint32Array|Int32Array|Float32Array}\n * @private\n */\n this.typedArray = undefined;\n\n /**\n * A vertex buffer containing attribute values. Attribute values are accessed using byteOffset and byteStride.\n *\n * @type {Buffer}\n * @private\n */\n this.buffer = undefined;\n\n /**\n * The byte offset of elements in the buffer.\n *\n * @type {Number}\n * @default 0\n * @private\n */\n this.byteOffset = 0;\n\n /**\n * The byte stride of elements in the buffer. When undefined the elements are tightly packed.\n *\n * @type {Number}\n * @private\n */\n this.byteStride = undefined;\n}", "title": "" }, { "docid": "0c6e34c422722b6cb646758f38610423", "score": "0.5226474", "text": "function initArrayBuffer(attribute, data, num, type, stride = 0, offset = 0) {\n var buffer = gl.createBuffer()\n gl.bindBuffer(gl.ARRAY_BUFFER, buffer)\n gl.bufferData(gl.ARRAY_BUFFER, data, gl.STATIC_DRAW)\n var a_attribute = gl.getAttribLocation(gl.program, attribute)\n gl.vertexAttribPointer(a_attribute, num, type, false, stride, offset)\n gl.enableVertexAttribArray(a_attribute)\n gl.bindBuffer(gl.ARRAY_BUFFER, null)\n return true\n}", "title": "" }, { "docid": "83d0d65c26178b9ce10041c07a61ca92", "score": "0.5223944", "text": "function DrawBuffer(type, verArray, n, noprogram) {\n var triangleVertexBufferObject = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, triangleVertexBufferObject);\n\n var vPosition = gl.getAttribLocation(noprogram, 'vPosition');\n var vColor = gl.getAttribLocation(noprogram, 'vColor');\n\n gl.vertexAttribPointer(\n vPosition, // variabel yang memegang posisi attribute di shader\n 2, // jumlah elemen per atribut\n gl.FLOAT, // tipe data atribut\n gl.FALSE,\n 5 * Float32Array.BYTES_PER_ELEMENT, // ukuran byte tiap vertex \n 0 // offset dari posisi elemen di array\n );\n gl.vertexAttribPointer(\n vColor,\n 3,\n gl.FLOAT,\n gl.FALSE,\n 5 * Float32Array.BYTES_PER_ELEMENT,\n 2 * Float32Array.BYTES_PER_ELEMENT\n );\n gl.enableVertexAttribArray(vPosition);\n gl.enableVertexAttribArray(vColor);\n\n var vPosition = gl.getAttribLocation(noprogram, 'vPosition');\n var vColor = gl.getAttribLocation(noprogram, 'vColor');\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(verArray), gl.STATIC_DRAW);\n gl.drawArrays(type, 0, n);\n }", "title": "" }, { "docid": "afe97ed34c71b0fd324dd766d55f420a", "score": "0.5219952", "text": "function L(L){const M=new _views_3d_webgl_engine_core_shaderModules_ShaderBuilder_js__WEBPACK_IMPORTED_MODULE_2__[\"ShaderBuilder\"],j=M.vertex.code,O=M.fragment.code;return M.vertex.uniforms.add(\"proj\",\"mat4\").add(\"view\",\"mat4\").add(\"camPos\",\"vec3\").add(\"localOrigin\",\"vec3\"),M.include(_views_3d_webgl_engine_core_shaderLibrary_attributes_PositionAttribute_glsl_js__WEBPACK_IMPORTED_MODULE_16__[\"PositionAttribute\"]),M.varyings.add(\"vpos\",\"vec3\"),M.include(_views_3d_webgl_engine_core_shaderLibrary_shading_VisualVariables_glsl_js__WEBPACK_IMPORTED_MODULE_4__[\"VisualVariables\"],L),M.include(_views_3d_webgl_engine_core_shaderLibrary_attributes_InstancedDoublePrecision_glsl_js__WEBPACK_IMPORTED_MODULE_11__[\"InstancedDoublePrecision\"],L),M.include(_views_3d_webgl_engine_core_shaderLibrary_attributes_VerticalOffset_glsl_js__WEBPACK_IMPORTED_MODULE_6__[\"VerticalOffset\"],L),0!==L.output&&7!==L.output||(M.include(_views_3d_webgl_engine_core_shaderLibrary_attributes_NormalAttribute_glsl_js__WEBPACK_IMPORTED_MODULE_15__[\"NormalAttribute\"],L),M.include(_views_3d_webgl_engine_core_shaderLibrary_Transform_glsl_js__WEBPACK_IMPORTED_MODULE_1__[\"Transform\"],{linearDepth:!1}),L.offsetBackfaces&&M.include(_views_3d_webgl_engine_core_shaderLibrary_Offset_glsl_js__WEBPACK_IMPORTED_MODULE_14__[\"Offset\"]),L.instancedColor&&M.attributes.add(\"instanceColor\",\"vec4\"),M.varyings.add(\"vNormalWorld\",\"vec3\"),M.varyings.add(\"localvpos\",\"vec3\"),M.include(_views_3d_webgl_engine_core_shaderLibrary_attributes_TextureCoordinateAttribute_glsl_js__WEBPACK_IMPORTED_MODULE_12__[\"TextureCoordinateAttribute\"],L),M.include(_views_3d_webgl_engine_core_shaderLibrary_ForwardLinearDepth_glsl_js__WEBPACK_IMPORTED_MODULE_9__[\"ForwardLinearDepth\"],L),M.include(_views_3d_webgl_engine_core_shaderLibrary_attributes_SymbolColor_glsl_js__WEBPACK_IMPORTED_MODULE_17__[\"SymbolColor\"],L),M.include(_views_3d_webgl_engine_core_shaderLibrary_attributes_VertexColor_glsl_js__WEBPACK_IMPORTED_MODULE_7__[\"VertexColor\"],L),M.vertex.uniforms.add(\"externalColor\",\"vec4\"),M.varyings.add(\"vcolorExt\",\"vec4\"),j.add(_views_3d_webgl_engine_core_shaderModules_interfaces_js__WEBPACK_IMPORTED_MODULE_0__[\"glsl\"]`\n void main(void) {\n forwardNormalizedVertexColor();\n vcolorExt = externalColor;\n ${L.instancedColor?\"vcolorExt *= instanceColor;\":\"\"}\n vcolorExt *= vvColor();\n vcolorExt *= getSymbolColor();\n forwardColorMixMode();\n\n if (vcolorExt.a < ${_views_3d_webgl_engine_core_shaderModules_interfaces_js__WEBPACK_IMPORTED_MODULE_0__[\"glsl\"].float(_views_3d_webgl_engine_core_shaderLibrary_util_AlphaDiscard_glsl_js__WEBPACK_IMPORTED_MODULE_5__[\"symbolAlphaCutoff\"])}) {\n gl_Position = vec4(1e38, 1e38, 1e38, 1.0);\n }\n else {\n vpos = calculateVPos();\n localvpos = vpos - view[3].xyz;\n vpos = subtractOrigin(vpos);\n vNormalWorld = dpNormal(vvLocalNormal(normalModel()));\n vpos = addVerticalOffset(vpos, localOrigin);\n gl_Position = transformPosition(proj, view, vpos);\n ${L.offsetBackfaces?\"gl_Position = offsetBackfacingClipPosition(gl_Position, vpos, vNormalWorld, camPos);\":\"\"}\n }\n forwardLinearDepth();\n forwardTextureCoordinates();\n }\n `)),7===L.output&&(M.include(_views_3d_webgl_engine_core_shaderLibrary_Slice_glsl_js__WEBPACK_IMPORTED_MODULE_3__[\"Slice\"],L),M.include(_views_3d_webgl_engine_core_shaderLibrary_util_AlphaDiscard_glsl_js__WEBPACK_IMPORTED_MODULE_5__[\"DiscardOrAdjustAlpha\"],L),M.fragment.uniforms.add(\"camPos\",\"vec3\").add(\"localOrigin\",\"vec3\").add(\"opacity\",\"float\").add(\"layerOpacity\",\"float\"),M.fragment.uniforms.add(\"view\",\"mat4\"),L.hasColorTexture&&M.fragment.uniforms.add(\"tex\",\"sampler2D\"),M.fragment.include(_views_3d_webgl_engine_core_shaderLibrary_util_MixExternalColor_glsl_js__WEBPACK_IMPORTED_MODULE_21__[\"MixExternalColor\"]),O.add(_views_3d_webgl_engine_core_shaderModules_interfaces_js__WEBPACK_IMPORTED_MODULE_0__[\"glsl\"]`\n void main() {\n discardBySlice(vpos);\n ${L.hasColorTexture?_views_3d_webgl_engine_core_shaderModules_interfaces_js__WEBPACK_IMPORTED_MODULE_0__[\"glsl\"]`\n vec4 texColor = texture2D(tex, vuv0);\n ${L.textureAlphaPremultiplied?\"texColor.rgb /= texColor.a;\":\"\"}\n discardOrAdjustAlpha(texColor);`:_views_3d_webgl_engine_core_shaderModules_interfaces_js__WEBPACK_IMPORTED_MODULE_0__[\"glsl\"]`vec4 texColor = vec4(1.0);`}\n ${L.attributeColor?_views_3d_webgl_engine_core_shaderModules_interfaces_js__WEBPACK_IMPORTED_MODULE_0__[\"glsl\"]`\n float opacity_ = layerOpacity * mixExternalOpacity(vColor.a * opacity, texColor.a, vcolorExt.a, int(colorMixMode));`:_views_3d_webgl_engine_core_shaderModules_interfaces_js__WEBPACK_IMPORTED_MODULE_0__[\"glsl\"]`\n float opacity_ = layerOpacity * mixExternalOpacity(opacity, texColor.a, vcolorExt.a, int(colorMixMode));\n `}\n\n gl_FragColor = vec4(opacity_);\n }\n `)),0===L.output&&(M.include(_views_3d_webgl_engine_core_shaderLibrary_Slice_glsl_js__WEBPACK_IMPORTED_MODULE_3__[\"Slice\"],L),M.include(_views_3d_webgl_engine_core_shaderLibrary_shading_EvaluateSceneLighting_glsl_js__WEBPACK_IMPORTED_MODULE_20__[\"EvaluateSceneLighting\"],L),M.include(_views_3d_webgl_engine_core_shaderLibrary_shading_EvaluateAmbientOcclusion_glsl_js__WEBPACK_IMPORTED_MODULE_19__[\"EvaluateAmbientOcclusion\"],L),M.include(_views_3d_webgl_engine_core_shaderLibrary_util_AlphaDiscard_glsl_js__WEBPACK_IMPORTED_MODULE_5__[\"DiscardOrAdjustAlpha\"],L),L.receiveShadows&&M.include(_views_3d_webgl_engine_core_shaderLibrary_shading_ReadShadowMap_glsl_js__WEBPACK_IMPORTED_MODULE_8__[\"ReadShadowMap\"],L),M.fragment.uniforms.add(\"camPos\",\"vec3\").add(\"localOrigin\",\"vec3\").add(\"ambient\",\"vec3\").add(\"diffuse\",\"vec3\").add(\"opacity\",\"float\").add(\"layerOpacity\",\"float\"),M.fragment.uniforms.add(\"view\",\"mat4\"),L.hasColorTexture&&M.fragment.uniforms.add(\"tex\",\"sampler2D\"),M.include(_views_3d_webgl_engine_core_shaderLibrary_shading_PhysicallyBasedRenderingParameters_glsl_js__WEBPACK_IMPORTED_MODULE_13__[\"PhysicallyBasedRenderingParameters\"],L),M.include(_views_3d_webgl_engine_core_shaderLibrary_shading_PhysicallyBasedRendering_glsl_js__WEBPACK_IMPORTED_MODULE_10__[\"PhysicallyBasedRendering\"],L),M.fragment.include(_views_3d_webgl_engine_core_shaderLibrary_util_MixExternalColor_glsl_js__WEBPACK_IMPORTED_MODULE_21__[\"MixExternalColor\"]),O.add(_views_3d_webgl_engine_core_shaderModules_interfaces_js__WEBPACK_IMPORTED_MODULE_0__[\"glsl\"]`\n void main() {\n discardBySlice(vpos);\n ${L.hasColorTexture?_views_3d_webgl_engine_core_shaderModules_interfaces_js__WEBPACK_IMPORTED_MODULE_0__[\"glsl\"]`\n vec4 texColor = texture2D(tex, vuv0);\n ${L.textureAlphaPremultiplied?\"texColor.rgb /= texColor.a;\":\"\"}\n discardOrAdjustAlpha(texColor);`:_views_3d_webgl_engine_core_shaderModules_interfaces_js__WEBPACK_IMPORTED_MODULE_0__[\"glsl\"]`vec4 texColor = vec4(1.0);`}\n vec3 viewDirection = normalize(vpos - camPos);\n ${1===L.pbrMode?\"applyPBRFactors();\":\"\"}\n float ssao = evaluateAmbientOcclusionInverse();\n ssao *= getBakedOcclusion();\n\n float additionalAmbientScale = _oldHeuristicLighting(vpos + localOrigin);\n vec3 additionalLight = ssao * lightingMainIntensity * additionalAmbientScale * ambientBoostFactor * lightingGlobalFactor;\n ${L.receiveShadows?\"float shadow = readShadowMap(vpos, linearDepth);\":1===L.viewingMode?\"float shadow = lightingGlobalFactor * (1.0 - additionalAmbientScale);\":\"float shadow = 0.0;\"}\n vec3 matColor = max(ambient, diffuse);\n ${L.attributeColor?_views_3d_webgl_engine_core_shaderModules_interfaces_js__WEBPACK_IMPORTED_MODULE_0__[\"glsl\"]`\n vec3 albedo_ = mixExternalColor(vColor.rgb * matColor, texColor.rgb, vcolorExt.rgb, int(colorMixMode));\n float opacity_ = layerOpacity * mixExternalOpacity(vColor.a * opacity, texColor.a, vcolorExt.a, int(colorMixMode));`:_views_3d_webgl_engine_core_shaderModules_interfaces_js__WEBPACK_IMPORTED_MODULE_0__[\"glsl\"]`\n vec3 albedo_ = mixExternalColor(matColor, texColor.rgb, vcolorExt.rgb, int(colorMixMode));\n float opacity_ = layerOpacity * mixExternalOpacity(opacity, texColor.a, vcolorExt.a, int(colorMixMode));\n `}\n ${_views_3d_webgl_engine_core_shaderModules_interfaces_js__WEBPACK_IMPORTED_MODULE_0__[\"glsl\"]`\n vec3 shadedNormal = normalize(vNormalWorld);\n albedo_ *= 1.2;\n vec3 viewForward = - vec3(view[0][2], view[1][2], view[2][2]);\n float alignmentLightView = clamp(dot(-viewForward, lightingMainDirection), 0.0, 1.0);\n float transmittance = 1.0 - clamp(dot(-viewForward, shadedNormal), 0.0, 1.0);\n float treeRadialFalloff = vColor.r;\n float backLightFactor = 0.5 * treeRadialFalloff * alignmentLightView * transmittance * (1.0 - shadow);\n additionalLight += backLightFactor * lightingMainIntensity;`}\n ${1===L.pbrMode||2===L.pbrMode?1===L.viewingMode?_views_3d_webgl_engine_core_shaderModules_interfaces_js__WEBPACK_IMPORTED_MODULE_0__[\"glsl\"]`vec3 normalGround = normalize(vpos + localOrigin);`:_views_3d_webgl_engine_core_shaderModules_interfaces_js__WEBPACK_IMPORTED_MODULE_0__[\"glsl\"]`vec3 normalGround = vec3(0.0, 0.0, 1.0);`:_views_3d_webgl_engine_core_shaderModules_interfaces_js__WEBPACK_IMPORTED_MODULE_0__[\"glsl\"]``}\n ${1===L.pbrMode||2===L.pbrMode?_views_3d_webgl_engine_core_shaderModules_interfaces_js__WEBPACK_IMPORTED_MODULE_0__[\"glsl\"]`\n float additionalAmbientIrradiance = additionalAmbientIrradianceFactor * lightingMainIntensity[2];\n vec3 shadedColor = evaluateSceneLightingPBR(shadedNormal, albedo_, shadow, 1.0 - ssao, additionalLight, viewDirection, normalGround, mrr, emission, additionalAmbientIrradiance);`:\"vec3 shadedColor = evaluateSceneLighting(shadedNormal, albedo_, shadow, 1.0 - ssao, additionalLight);\"}\n gl_FragColor = highlightSlice(vec4(shadedColor, opacity_), vpos);\n ${L.OITEnabled?\"gl_FragColor = premultiplyAlpha(gl_FragColor);\":\"\"}\n }\n `)),M.include(_views_3d_webgl_engine_core_shaderLibrary_default_DefaultMaterialAuxiliaryPasses_glsl_js__WEBPACK_IMPORTED_MODULE_18__[\"DefaultMaterialAuxiliaryPasses\"],L),M}", "title": "" }, { "docid": "1b66e8129a7d91c65d3ff881bc33fc83", "score": "0.52186155", "text": "setData(array) {\n this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER, this.buffer);\n this.gl.bufferData(this.gl.ELEMENT_ARRAY_BUFFER, new Int16Array(array), this.gl.DYNAMIC_DRAW);\n this.count = array.length;\n }", "title": "" }, { "docid": "3477fda774567ca2a444e873d763f274", "score": "0.5218472", "text": "function initVertexBuffers(gl) {\n var vertices = new Float32Array([\n 0, 0.5, -0.5, -0.5, 0.5, -0.5\n ]);\n var n = 3;\n var vertexBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, vertexBuffer);\n //write data into the buffer object\n gl.bufferData(gl.ARRAY_BUFFER, vertices, gl.STATIC_DRAW);\n //get attribute a_Position address in vertex shader\n var a_Position = gl.getAttribLocation(gl.program, 'a_Position');\n gl.vertexAttribPointer(a_Position, 2, gl.FLOAT, false, 0, 0);\n //enalbe a_Positon variable\n gl.enableVertexAttribArray(a_Position);\n return n;\n}", "title": "" }, { "docid": "66356e418521787079794ad083bd998f", "score": "0.521795", "text": "function setupVAO(material, program, geometry, uvChannel) {\n\n var vao;\n\n if (geometry.streamingDraw) {\n geometry.vaos = null;\n return false;\n }\n\n if (geometry.offsets && geometry.offsets.length > 1) {\n geometry.vaos = null;\n return false;\n }\n\n if (!_glExtensionVAO) {\n geometry.vaos = null;\n return false;\n }\n\n if (geometry.vaos === undefined)\n geometry.vaos = [];\n\n //Set up a VAO for this object\n vao = _glExtensionVAO.createVertexArrayOES();\n geometry.vaos.push({ geomhash: program.id, uv: uvChannel, vao: vao });\n _glExtensionVAO.bindVertexArrayOES(vao);\n\n //bind the index buffer\n var index = geometry.attributes.index;\n if (index)\n _gl.bindBuffer(_gl.ELEMENT_ARRAY_BUFFER, geometry.ibbuffer || index.buffer);\n\n\n //Bind the vertex attributes used by the current program\n var boundBuffer = null;\n var programAttributes = program.attributes;\n var programAttributesKeys = program.attributesKeys;\n\n var stride = geometry.vbstride;\n var startIndex = (geometry.offsets && geometry.offsets.length) ? geometry.offsets[0].index : 0;\n\n //Set up vertex attributes\n for (var i = 0, len = programAttributesKeys.length; i < len; i++) {\n\n var key = programAttributesKeys[i];\n var programAttribute = programAttributes[key];\n\n if (programAttribute >= 0) {\n\n var geometryAttribute = geometry.attributes[key];\n\n // Override 'uv' attribute mapping if uvChannel is specified\n // (account for the 1-based indexing used for the additional UV channel attributes)\n if (key === 'uv' && uvChannel) {\n geometryAttribute = geometry.attributes['uv' + (uvChannel + 1)];\n }\n\n if (geometryAttribute) {\n\n var type = _gl.FLOAT;\n var itemWidth = geometryAttribute.bytesPerItem || 4;\n if (itemWidth === 1) {\n type = _gl.UNSIGNED_BYTE;\n } else if (itemWidth === 2) {\n type = _gl.UNSIGNED_SHORT;\n }\n\n _gl.enableVertexAttribArray(programAttribute);\n\n if (geometryAttribute.itemOffset !== undefined) //it's part of the interleaved VB, so process it here\n {\n if (boundBuffer != geometry.vbbuffer) {\n _gl.bindBuffer(_gl.ARRAY_BUFFER, geometry.vbbuffer);\n boundBuffer = geometry.vbbuffer;\n }\n\n _gl.vertexAttribPointer(programAttribute, geometryAttribute.itemSize, type, !!geometryAttribute.normalize, stride * 4, (geometryAttribute.itemOffset + startIndex * stride) * 4);\n }\n else {\n _gl.bindBuffer(_gl.ARRAY_BUFFER, geometryAttribute.buffer);\n boundBuffer = geometryAttribute.buffer;\n\n _gl.vertexAttribPointer(programAttribute, geometryAttribute.itemSize, type, !!geometryAttribute.normalize, 0, startIndex * geometryAttribute.itemSize * itemWidth); // 4 bytes per Float32\n }\n\n if (_glExtensionInstancedArrays && geometry.numInstances)\n _glExtensionInstancedArrays.vertexAttribDivisorANGLE(programAttribute, geometryAttribute.divisor || 0);\n\n } else {\n\n //Default material attributes cannot be set in VAO, so we have to abort the VAO setup\n //and fall back to the regular setupVertexAttributes in draw loop way.\n //This is hopefully very rare.\n _glExtensionVAO.bindVertexArrayOES(null);\n\n for (var j = 0; j < geometry.vaos.length; j++)\n _glExtensionVAO.deleteVertexArrayOES(geometry.vaos[j].vao);\n\n geometry.vaos = null; //Flag it so we don't pass through here again.\n\n return false;\n }\n\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "40df03faeca7243d18625889e86eb5f4", "score": "0.5208651", "text": "function o(o,d){0===d.normalType&&(o.attributes.add(\"normal\",\"vec3\"),o.vertex.code.add(_shaderModules_interfaces_js__WEBPACK_IMPORTED_MODULE_0__[\"glsl\"]`\n vec3 normalModel() {\n return normal;\n }\n `)),1===d.normalType&&(o.include(_util_DecodeNormal_glsl_js__WEBPACK_IMPORTED_MODULE_1__[\"DecodeNormal\"]),o.attributes.add(\"normalCompressed\",\"vec2\"),o.vertex.code.add(_shaderModules_interfaces_js__WEBPACK_IMPORTED_MODULE_0__[\"glsl\"]`\n vec3 normalModel() {\n return decodeNormal(normalCompressed);\n }\n `)),3===d.normalType&&(o.extensions.add(\"GL_OES_standard_derivatives\"),o.fragment.code.add(_shaderModules_interfaces_js__WEBPACK_IMPORTED_MODULE_0__[\"glsl\"]`\n vec3 screenDerivativeNormal(vec3 positionView) {\n return normalize(cross(dFdx(positionView), dFdy(positionView)));\n }\n `))}", "title": "" }, { "docid": "5d644e9887872f63d164f8ccceba3caf", "score": "0.5205696", "text": "onContextChange()\n {\n const gl = this.renderer.gl;\n\n if (this.renderer.legacy)\n {\n this.MAX_TEXTURES = 1;\n }\n else\n {\n // step 1: first check max textures the GPU can handle.\n this.MAX_TEXTURES = Math.min(gl.getParameter(gl.MAX_TEXTURE_IMAGE_UNITS), settings.SPRITE_MAX_TEXTURES);\n\n // step 2: check the maximum number of if statements the shader can have too..\n this.MAX_TEXTURES = checkMaxIfStatmentsInShader(this.MAX_TEXTURES, gl);\n }\n\n this.shader = generateMultiTextureShader(gl, this.MAX_TEXTURES);\n\n // create a couple of buffers\n this.indexBuffer = glCore.GLBuffer.createIndexBuffer(gl, this.indices, gl.STATIC_DRAW);\n\n // we use the second shader as the first one depending on your browser may omit aTextureId\n // as it is not used by the shader so is optimized out.\n\n this.renderer.bindVao(null);\n\n const attrs = this.shader.attributes;\n\n for (let i = 0; i < this.vaoMax; i++)\n {\n /* eslint-disable max-len */\n const vertexBuffer = this.vertexBuffers[i] = glCore.GLBuffer.createVertexBuffer(gl, null, gl.STREAM_DRAW);\n /* eslint-enable max-len */\n\n // build the vao object that will render..\n const vao = this.renderer.createVao()\n .addIndex(this.indexBuffer)\n .addAttribute(vertexBuffer, attrs.aVertexPosition, gl.FLOAT, false, this.vertByteSize, 0)\n .addAttribute(vertexBuffer, attrs.aTextureCoord, gl.UNSIGNED_SHORT, true, this.vertByteSize, 2 * 4)\n .addAttribute(vertexBuffer, attrs.aColor, gl.UNSIGNED_BYTE, true, this.vertByteSize, 3 * 4);\n\n if (attrs.aTextureId)\n {\n vao.addAttribute(vertexBuffer, attrs.aTextureId, gl.FLOAT, false, this.vertByteSize, 4 * 4);\n }\n\n vao.addAttribute(vertexBuffer, attrs.aShadow, gl.FLOAT, true, this.vertByteSize, 5 * 4)\n .addAttribute(vertexBuffer, attrs.aStroke, gl.FLOAT, true, this.vertByteSize, 6 * 4)\n .addAttribute(vertexBuffer, attrs.aFill, gl.FLOAT, true, this.vertByteSize, 7 * 4)\n .addAttribute(vertexBuffer, attrs.aGamma, gl.FLOAT, true, this.vertByteSize, 8 * 4)\n .addAttribute(vertexBuffer, attrs.aShadowColor, gl.UNSIGNED_BYTE, true, this.vertByteSize, 9 * 4)\n .addAttribute(vertexBuffer, attrs.aStrokeColor, gl.UNSIGNED_BYTE, true, this.vertByteSize, 10 * 4)\n .addAttribute(vertexBuffer, attrs.aFillColor, gl.UNSIGNED_BYTE, true, this.vertByteSize, 11 * 4)\n .addAttribute(vertexBuffer, attrs.aShadowOffset, gl.FLOAT, true, this.vertByteSize, 12 * 4)\n .addAttribute(vertexBuffer, attrs.aShadowEnable, gl.FLOAT, true, this.vertByteSize, 14 * 4)\n .addAttribute(vertexBuffer, attrs.aStrokeEnable, gl.FLOAT, true, this.vertByteSize, 15 * 4)\n .addAttribute(vertexBuffer, attrs.aFillEnable, gl.FLOAT, true, this.vertByteSize, 16 * 4)\n .addAttribute(vertexBuffer, attrs.aShadowBlur, gl.FLOAT, true, this.vertByteSize, 17 * 4);\n\n this.vaos[i] = vao;\n }\n\n this.vao = this.vaos[0];\n this.currentBlendMode = 99999;\n\n this.boundTextures = new Array(this.MAX_TEXTURES);\n }", "title": "" }, { "docid": "277c7dceef95c555e44ecf59dcda4dfc", "score": "0.52012825", "text": "function i(r,i=_DefaultVertexBufferLayouts_js__WEBPACK_IMPORTED_MODULE_4__[\"Pos2\"],l=_DefaultVertexAttributeLocations_js__WEBPACK_IMPORTED_MODULE_0__[\"Default3D\"],m=-1,f=1){let u=null;switch(i){case _DefaultVertexBufferLayouts_js__WEBPACK_IMPORTED_MODULE_4__[\"Pos2Tex\"]:u=new Float32Array([m,m,0,0,f,m,1,0,m,f,0,1,f,f,1,1]);break;case _DefaultVertexBufferLayouts_js__WEBPACK_IMPORTED_MODULE_4__[\"Pos2\"]:default:u=new Float32Array([m,m,f,m,m,f,f,f])}return new _webgl_VertexArrayObject_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"](r,l,{geometry:i},{geometry:_webgl_BufferObject_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].createVertex(r,35044,u)})}", "title": "" }, { "docid": "19650bb041a5c968991e1f11e3e416e7", "score": "0.52006316", "text": "prepareUniforms(uName, uType) {\n if (arguments.length % 2 !== 0) {\n console.log(\"prepareUniforms needs arguments to be in pairs.\");\n return this;\n }\n\n let loc = 0;\n for (let i = 0; i < arguments.length; i += 2) {\n loc = gl.getUniformLocation(this.program, arguments[i]);\n if (loc !== null) this._UniformList[arguments[i]] = {loc: loc, type: arguments[i + 1]};\n else console.log(\"Uniform not found \" + arguments[i]);\n }\n return this;\n }", "title": "" }, { "docid": "f99cb0861e75228e06f3fbd9c9ba2bf5", "score": "0.518909", "text": "function createEmptyArrayBuffer(gl, a_attribute, num, type) {\n let buffer = gl.createBuffer();\n if (!buffer) {\n console.log('Failed to create the buffer object');\n return null;\n }\n gl.bindBuffer(gl.ARRAY_BUFFER, buffer);\n // Assign the buffer object to the attribute variable\n gl.vertexAttribPointer(a_attribute, num, type, false, 0, 0);\n // Enable the assignment\n gl.enableVertexAttribArray(a_attribute);\n // Keep the information necessary to assign to the attribute variable later\n buffer.num = num;\n buffer.type = gl.FLOAT;\n\n return buffer;\n}", "title": "" }, { "docid": "834ff8d16f54d4baa568533e64cff7d7", "score": "0.5186445", "text": "prepareUniforms(uName,uType){\n\t\t\tif(arguments.length % 2 != 0 ){ console.log(\"prepareUniforms needs arguments to be in pairs.\"); return this; }\n\t\t\t\n\t\t\tvar loc = 0;\n\t\t\tfor(var i=0; i < arguments.length; i+=2){\n\t\t\t\tloc = gl.getUniformLocation(this.program,arguments[i]);\n\t\t\t\tif(loc != null) this._UniformList[arguments[i]] = {loc:loc,type:arguments[i+1]};\n\t\t\t\telse console.log(\"Uniform not found \" + arguments[i]);\n\t\t\t}\n\t\t\treturn this;\n\t\t}", "title": "" }, { "docid": "c2ffada443c7ac16fce95f74b04aee15", "score": "0.51482594", "text": "function setValueV2a( gl, v ) {\n\t\n\t\t\tgl.uniform2fv( this.addr, flatten( v, this.size, 2 ) );\n\t\n\t\t}", "title": "" }, { "docid": "c2ffada443c7ac16fce95f74b04aee15", "score": "0.51482594", "text": "function setValueV2a( gl, v ) {\n\t\n\t\t\tgl.uniform2fv( this.addr, flatten( v, this.size, 2 ) );\n\t\n\t\t}", "title": "" }, { "docid": "d9600a070a515936daf2a43c19f51fd5", "score": "0.5141783", "text": "constructor(nname, agl, shaderloader, nnbTex, nnbLights) {\r\n\t\t// attributes\r\n\t\t// -------------------------------------------------\r\n\t\tsuper(nname);\r\n\t\t// nbTex\r\n\t\tthis.nbTex = nnbTex;\r\n\t\t// nbLights\r\n\t\tthis.nbLight = nnbLights;\r\n\t\t// program shader\r\n\t\tthis.program;\r\n\r\n\t\t// attributes\r\n\t\t// --------------------------\r\n\t\tthis.vertexPositionAttribute;\r\n\t\tthis.vertexNormalAttribute;\r\n\t\tthis.vertexColorAttribute;\r\n\t\tthis.texCoordAttribute;\r\n\t\t// uniforms\r\n\t\t// --------------------------\r\n\t\t// uniform Matrices\r\n\t\tthis.pMatrixUniform;\r\n\t\tthis.mvMatrixUniform;\r\n\t\tthis.nMatrixUniform;\r\n\t\t// light\r\n\t\tthis.ambientColorUniform;\r\n\t\tthis.pointLightLocationUniform = [];\r\n\t\tthis.pointLightColorUniform = [];\r\n\t\t// texture -sampler\r\n\t\tthis.samplerUniform = [];\r\n\t\t// time\r\n\t\tthis.time;\r\n\t\t\r\n\t\tthis.build(agl, shaderloader);\r\n\t}", "title": "" }, { "docid": "7f058250370d7c6d75a805dae6d826ba", "score": "0.51368225", "text": "function bindAttribute (index, current, next, size) {\n size = next.size || size\n if (current.equals(next, size)) {\n return\n }\n if (!next.pointer) {\n if (current.pointer) {\n gl.disableVertexAttribArray(index)\n }\n gl.vertexAttrib4f(index, next.x, next.y, next.z, next.w)\n } else {\n if (!current.pointer) {\n gl.enableVertexAttribArray(index)\n }\n if (current.buffer !== next.buffer) {\n next.buffer.bind()\n }\n gl.vertexAttribPointer(\n index,\n size,\n next.type,\n next.normalized,\n next.stride,\n next.offset)\n var extInstancing = extensions.angle_instanced_arrays\n if (extInstancing) {\n extInstancing.vertexAttribDivisorANGLE(index, next.divisor)\n }\n }\n current.set(next, size)\n }", "title": "" }, { "docid": "a871e1cb447ad162fbcb3bb461f3aebe", "score": "0.51266694", "text": "function setValueV2a( gl, v ) {\n\n\tgl.uniform2fv( this.addr, flatten( v, this.size, 2 ) );\n\n}", "title": "" }, { "docid": "a871e1cb447ad162fbcb3bb461f3aebe", "score": "0.51266694", "text": "function setValueV2a( gl, v ) {\n\n\tgl.uniform2fv( this.addr, flatten( v, this.size, 2 ) );\n\n}", "title": "" }, { "docid": "a871e1cb447ad162fbcb3bb461f3aebe", "score": "0.51266694", "text": "function setValueV2a( gl, v ) {\n\n\tgl.uniform2fv( this.addr, flatten( v, this.size, 2 ) );\n\n}", "title": "" }, { "docid": "a871e1cb447ad162fbcb3bb461f3aebe", "score": "0.51266694", "text": "function setValueV2a( gl, v ) {\n\n\tgl.uniform2fv( this.addr, flatten( v, this.size, 2 ) );\n\n}", "title": "" }, { "docid": "a871e1cb447ad162fbcb3bb461f3aebe", "score": "0.51266694", "text": "function setValueV2a( gl, v ) {\n\n\tgl.uniform2fv( this.addr, flatten( v, this.size, 2 ) );\n\n}", "title": "" }, { "docid": "a871e1cb447ad162fbcb3bb461f3aebe", "score": "0.51266694", "text": "function setValueV2a( gl, v ) {\n\n\tgl.uniform2fv( this.addr, flatten( v, this.size, 2 ) );\n\n}", "title": "" }, { "docid": "a871e1cb447ad162fbcb3bb461f3aebe", "score": "0.51266694", "text": "function setValueV2a( gl, v ) {\n\n\tgl.uniform2fv( this.addr, flatten( v, this.size, 2 ) );\n\n}", "title": "" }, { "docid": "a871e1cb447ad162fbcb3bb461f3aebe", "score": "0.51266694", "text": "function setValueV2a( gl, v ) {\n\n\tgl.uniform2fv( this.addr, flatten( v, this.size, 2 ) );\n\n}", "title": "" }, { "docid": "4ddf2ce1ca29be6aeed1ac47b33770e3", "score": "0.51195276", "text": "function setValueV2a(gl, v) {\n gl.uniform2fv(this.addr, flatten(v, this.size, 2));\n}", "title": "" }, { "docid": "4145e84472af28930183cf8188526ce1", "score": "0.5110974", "text": "static getStandardAttribLocations(gl, program) {\n return {\n position: gl.getAttribLocation(program, ATTR_POSITION_NAME),\n norm: gl.getAttribLocation(program, ATTR_NORMAL_NAME),\n uv: gl.getAttribLocation(program, ATTR_UV_NAME)\n };\n }", "title": "" }, { "docid": "dc96206b8d8a3262f166196c410b287e", "score": "0.51098555", "text": "function setValueV2a( gl, v ) {\n\n gl.uniform2fv( this.addr, flatten( v, this.size, 2 ) );\n\n }", "title": "" }, { "docid": "dc96206b8d8a3262f166196c410b287e", "score": "0.51098555", "text": "function setValueV2a( gl, v ) {\n\n gl.uniform2fv( this.addr, flatten( v, this.size, 2 ) );\n\n }", "title": "" }, { "docid": "dc96206b8d8a3262f166196c410b287e", "score": "0.51098555", "text": "function setValueV2a( gl, v ) {\n\n gl.uniform2fv( this.addr, flatten( v, this.size, 2 ) );\n\n }", "title": "" }, { "docid": "ce705a598dee271e02687660d9c92d4c", "score": "0.5107722", "text": "calculatePositions(attribute) {\n const {vertexCount} = this.state;\n const {xMin, xMax, yMin, yMax, xResolution, yResolution, getZ} = this.props;\n\n // step between samples\n const xDelta = (xMax - xMin) / (xResolution - 1);\n const yDelta = (yMax - yMin) / (yResolution - 1);\n\n // calculate z range\n let zMin = Infinity;\n let zMax = -Infinity;\n\n const value = new Float32Array(vertexCount * attribute.size);\n\n let i = 0;\n for (let yIndex = 0; yIndex < yResolution; yIndex++) {\n for (let xIndex = 0; xIndex < xResolution; xIndex++) {\n const x = xIndex * xDelta + xMin;\n const y = yIndex * yDelta + yMin;\n let z = getZ(x, y);\n const isZFinite = isFinite(z);\n if (!isZFinite) {\n z = 0;\n }\n\n zMin = Math.min(zMin, z);\n zMax = Math.max(zMax, z);\n\n // swap z and y: y is up in the default viewport\n value[i++] = x;\n value[i++] = z;\n value[i++] = y;\n value[i++] = isZFinite ? 0 : 1;\n }\n }\n\n attribute.value = value;\n this._setBounds([[xMin, xMax], [zMin, zMax], [yMin, yMax]]);\n }", "title": "" } ]
da9f5920d8c19d81a61c9498ee8cd0ce
Reset function switches back the zoom to normal globe in 3D when you zoom out from a country also works when changing the projection from 2D to 3D
[ { "docid": "c6b25d5f72e82e9df4c8dcd81a3bcbc0", "score": "0.7124854", "text": "function reset() {\n active.classed(\"active\", false);\n active = d3.select(null);\n\n // Remove everything from map which is not selected anymore\n svg.selectAll('.plot-point').remove();\n\n svg.transition()\n .duration(750)\n .call(zoom_3D.transform, d3.zoomIdentity);\n\n // Change the toggle back to enabled\n document.getElementById(\"checked3D\").disabled = false;\n document.getElementById(\"checked2D\").disabled = false;\n\n \n\n countryName.innerHTML = \"World\";\n previousCountryClicked = 'WLD';\n \n current_unmet_need = 100 - data_c[previousCountryClicked];\n change_percentage_animation(data_c[previousCountryClicked], current_unmet_need);\n lineGraphObject.updateGraph(previousCountryClicked);\n}", "title": "" } ]
[ { "docid": "6e02d6533043425301601b47265bbd8f", "score": "0.73077464", "text": "function resetZoomAll() {\n resetZoom('x');\n resetZoom('y');\n resetZoom('z');\n}", "title": "" }, { "docid": "7d3ad3bfe39b87f96a0b31467d449552", "score": "0.7222858", "text": "resetView() {\n if (this.is3DEnabled()) {\n var camera = this.getWebGLCamera();\n if (camera) {\n var resolution = this.zoomToResolution(3);\n var distance = camera.calcDistanceForResolution(resolution, 0);\n camera.flyTo(/** @type {!osx.map.FlyToOptions} */ ({\n range: distance,\n center: [0, 0],\n heading: 0,\n pitch: 0\n }));\n }\n } else {\n var map = this.getMap();\n var view = map.getView();\n assert(view !== undefined);\n view.setRotation(0);\n view.setCenter(osMap.DEFAULT_CENTER);\n view.setZoom(3);\n }\n\n Metrics.getInstance().updateMetric(metrics.keys.Map.RESET_VIEW, 1);\n }", "title": "" }, { "docid": "3f41899685e199d882e32565623528e4", "score": "0.69598925", "text": "function resetMap() {\r\n\t map.setCenter(originalCenter);\r\n\t map.setZoom(originalZoom);\r\n\t}", "title": "" }, { "docid": "70c3635df6299e3d3bcef6660c1097fb", "score": "0.68869376", "text": "function reset() {\n active.classed(\"active\", false);\n active = d3.select(null);\n\n map.selectAll(\".temp\").remove();\n\n map.transition()\n .duration(750)\n .attr(\"transform\", \"\");\n\n d3.select(\".zoomGuide\")\n .style(\"display\", \"none\");\n\n var toShade = map.selectAll(\"*\");\n\n toShade.transition()\n .duration(750)\n .style(\"opacity\", \"1\");\n\n zoom.on(\"zoom\", zoomed);\n zoom.translate([0, 0]).scale(1);\n}", "title": "" }, { "docid": "a21a60cc724ca77b906c38c7de7c208a", "score": "0.687066", "text": "function resetZoom() {\n options.domainWidth = options.domainWidthStep;\n options.graphWidth = options.initialGraphWidth;\n options.scaleX = 1;\n options.scaleY = 1;\n options.translateX = 0;\n options.translateY = 0;\n zoom.translate([0, 0]);\n }", "title": "" }, { "docid": "e968573df21c4fc70766c87c41204695", "score": "0.6865794", "text": "function resetZoom(dim) {\n // Prevent zoom reset while spatial search is being performed/displayed\n if(spatialSearchOn || ssHighlighted) {\n return;\n }\n \n // Reset fov to maximum\n $('#view-' + dim).attr('fieldOfView', MAX_FOV);\n \n // Resetting camera locations, max pan from center\n if(dim == 'x') {\n camXPos = [0, 0, X_CAM_DIST];\n $('#view-x').attr('position', camXPos[0] + ',' + camXPos[1] + ',' + camXPos[2]);\n maxPanX = [0, 0];\n } else if(dim == 'y') {\n camYPos = [0, 0, Y_CAM_DIST];\n $('#view-y').attr('position', camYPos[0] + ',' + camYPos[1] + ',' + camYPos[2]);\n maxPanY = [0, 0];\n } else {\n camZPos = [0, 0, Z_CAM_DIST];\n $('#view-z').attr('position', camZPos[0] + ',' + camZPos[1] + ',' + camZPos[2]);\n maxPanZ = [0, 0];\n }\n \n // Update blue selection lines (see windows.js)\n updateLines();\n \n // Update brown projection markers (see maxProj.js)\n updateProjMarkers();\n \n // Allowing spatial search if all windows are fully-zoomed out\n if(checkZoomedOut()) {\n $('#ss-start-btn').prop('disabled', false);\n $('#ss-zoom-warning').css('display', 'none');\n }\n}", "title": "" }, { "docid": "036d755dc033af8f99163c20d1dea24f", "score": "0.6857847", "text": "function reseted() {\r\n\t\t svg.transition().duration(750).call(\r\n\t\t zoom.transform,\r\n\t\t d3.zoomIdentity,\r\n\t\t d3.zoomTransform(svg.node()).invert([width / 2, height / 2])\r\n\t\t );\r\n\t\t}", "title": "" }, { "docid": "f51a3be2b50826f4d0248dfb550a35d3", "score": "0.6841415", "text": "resetZoom() {\n const self = this;\n self.transform.translateX = 0;\n self.transform.translateY = 0;\n self.transform.scaleX = 1;\n self.transform.scaleY = 1;\n // Redraw matrix with a smooth transition\n d3.transition()\n .duration(300)\n .call(function () {\n self.render();\n });\n }", "title": "" }, { "docid": "e54bec23a50e9defadaef582e89d1e16", "score": "0.681567", "text": "function resetCamera() {\n var w = container.width(),\n h = container.height(),\n iw = bgCanvas[0].width,\n ih = bgCanvas[0].height;\n\n if(iw === 0) {\n setTimeout(resetCamera, 100);\n } else {\n zoomLevel = minZoom = Math.min( w / iw, h / ih );\n drawingCenter[0] = w/2;\n drawingCenter[1] = h/2;\n redrawImage();\n }\n }", "title": "" }, { "docid": "586005a6f97a4c7c0c8304edf166324c", "score": "0.6798759", "text": "function resetMap() {\n removeGrids();\n $('.layer-checks input').prop(\"checked\", false);\n $('.legends,.nitr_grid_switch,.regress_grid_switch,#export-file').hide();\n $('#hexbin_size,#coeff').val('')\n map.fitBounds([[-92.75,42.4],[-86.86,47]], {padding: {top: 100, bottom: 0, left: 200, right: 200} });\n map.setLayoutProperty('nitrate_wells', 'visibility', 'none');\n map.setLayoutProperty('cancer_tracts', 'visibility', 'visible');\n $('.cancer_tracts_switch input').prop( \"checked\", true );\n $('.tract-legend').show();\n $('.reset-btn').addClass('disabled');\n}", "title": "" }, { "docid": "9d37b533ee04006d82ee88be6e65e82f", "score": "0.67087054", "text": "resetZoom() {\r\n this.i.j2();\r\n }", "title": "" }, { "docid": "a85289da9bbeb99eef2737fe6e280b7a", "score": "0.6689118", "text": "function resetPoly(event) {\n\t//one.setMap(null);\t\n}", "title": "" }, { "docid": "30d182811a0b5280910311eb3a3bf802", "score": "0.663752", "text": "function zoomReset() {\n\tif (graph.nodes.length === 0) {\n\t\treturn;\n\t}\n\tconst nodeXVals = graph.nodes.map( n => n.graphics.x );\n\tconst nodeYVals = graph.nodes.map( n => n.graphics.y );\n\tconst minX = Math.min(...nodeXVals);\n\tconst maxX = Math.max(...nodeXVals);\n\tconst minY = Math.min(...nodeYVals);\n\tconst maxY = Math.max(...nodeYVals);\n\tconst cWidth = $(window).width();\n\tconst cHeight = $(window).height()-$(\"#header\").height();\n\tlet scale = 0.8 * Math.min( cWidth / (maxX-minX), cHeight / (maxY-minY));\n\tif (graph.nodes.length === 1) {\n\t\tscale = 1;\n\t}\n\tscale = clamp(scale, MIN_ZOOM, 1);\n\tviewport.scale.x = scale;\n\tviewport.scale.y = scale;\n\tviewport.position.x = cWidth/2 - (minX + maxX)/2*scale;\n\tviewport.position.y = cHeight/2 - (minY + maxY)/2*scale;\n\n}", "title": "" }, { "docid": "9240cec75ac378b82ff277f8cf0e0b1c", "score": "0.66038007", "text": "function reset() {\n\t\tcountries.reset();\n\t\tview.reset();\n\t\tpickBufferUpdate.execute();\n\t\tmapUpdate.execute();\n\t}", "title": "" }, { "docid": "77864d043a0ac1a2f942f598acb15a2e", "score": "0.65864486", "text": "reset() {\n this.offsetX = 0;\n this.offsetY = 0;\n this.zoom = 1;\n }", "title": "" }, { "docid": "697a4d675902a8579849b5d12b66cd02", "score": "0.65394115", "text": "function resetCamera(){\n\tcamera.x = 0;\n\tcamera.y = 0;\n\n\tif((kyle.x > (map[0].length * size) - (canvas.width / 2)))\n\t\tcamera.x = (map[0].length * size) - canvas.width;\n\n\tif((kyle.y > (map.length * size) - (canvas.height / 2)))\n\t\tcamera.y = (map.length * size) - canvas.height;\n}", "title": "" }, { "docid": "7040505c6533cb695ef3172d55d63c08", "score": "0.65169185", "text": "function resetted() {\n console.log(\"hello\")\n svg.transition()\n .duration(750)\n .call(zoom.transform, d3.zoomIdentity);\n }", "title": "" }, { "docid": "70b67a17a7a30f3656b3dea1b05bafe8", "score": "0.6476766", "text": "function resetCamera() {\n nearGround = false;\n holder.position.set(0, 0, params.PlanetRadius * params.CameraMax);\n holder.rotation.set(0, 0, 0);\n holder.lookAt(0, 0, 0);\n tiltCameraTo(0);\n }", "title": "" }, { "docid": "6a0c5199e5b99ca382716936676b4e33", "score": "0.6463204", "text": "function reset() {\n zoomOutBtn.click();\n zoomedIn = false;\n ctx.strokeStyle = \"#000000\";\n ctx.fillStyle = '#000000';\n ctx.clearRect(0, 0, canvasWidth, canvasHeight);\n displaySecondsElapsed.innerHTML = '0';\n xCoordDisplay.innerHTML = '0';\n circles = [];\n scaleFactor = 10000 / interval;\n tickCounter = 0;\n secondCounter = 0;\n // accelerationRate = 0;\n acceleration = 0;\n startingPos = 100;\n x = startingPos;\n drawGrid();\n drawObject();\n}", "title": "" }, { "docid": "a4229916291e3ed7dce147a911fafcf2", "score": "0.6443889", "text": "function clearAllProjections() {\n projections.clear();\n (0, _transforms.clear)();\n}", "title": "" }, { "docid": "75c065f2879552e362438adf09201b9a", "score": "0.6443575", "text": "function clearAllProjections() {\n clear();\n transforms_clear();\n}", "title": "" }, { "docid": "431a7f16cc354baab5a80b0a5435801a", "score": "0.63993955", "text": "function reset() {\n\t\t\t\t\n\t\t\t\tvar bottomLeft = project(bounds[0]),\n\t\t\t\t\ttopRight = project(bounds[1]);\n\t\t\t\t\t\n\t\t\t\tchoropleth.svg.attr(\"width\", topRight[0] - bottomLeft[0])\n\t\t\t\t\t.attr(\"height\", bottomLeft[1] - topRight[1])\n\t\t\t\t\t.style(\"margin-left\", bottomLeft[0] + \"px\")\n\t\t\t\t\t.style(\"margin-top\", topRight[1] + \"px\");\n\n\t\t\t\t choropleth.g.attr(\"transform\", \"translate(\" + -bottomLeft[0] + \",\" + -topRight[1] + \")\");\n\n\t\t\t\t feature.attr(\"d\", path);\n\n\t\t\t}", "title": "" }, { "docid": "e422e1f16ae361633af1d817e82a61f3", "score": "0.6372965", "text": "function clearAllProjections() {\n (0, _projections.clear)();\n (0, _transforms.clear)();\n}", "title": "" }, { "docid": "120ab71d06aafeeffa0edca6a54892ee", "score": "0.6367562", "text": "resetViewport() {\n this.scale = 1.0;\n this.pan = { x: 0, y: 0 };\n }", "title": "" }, { "docid": "c7efac1ed9b20ada6754773c4f297547", "score": "0.636005", "text": "function clearGeoJsonLayer(){\r\n layerGeoJsonProj.clearLayers();\r\n mymap.setView(L.latLng(centr_lat, centr_lon), 2);\r\n}", "title": "" }, { "docid": "bc3fe23ceb923543adda57c49b58e02d", "score": "0.6354434", "text": "function clearCountry(e) {\n geojson.setStyle(mapStyle);\n info.update(); \n}", "title": "" }, { "docid": "a7ca74393da988dd4485c0a0c98d2cc8", "score": "0.6316082", "text": "function resetScene() {\n if (alldata != null) {\n obj3d.forEach(obj => {\n if (obj.name == \"Custom3D\"){\n obj[0].dispose();\n } else {\n obj.dispose();\n }\n });\n obj3d = [];\n alldata = null;\n\n }\n}", "title": "" }, { "docid": "66de13a0e1f09fe2e45ba6441ff4f13c", "score": "0.6314071", "text": "function onZoomReset() {\n\n\tvar fPImg = document.getElementById(\"floorPlanImg\"); \n\t\n\thideContextMenu();\n\t\n\t/* Left and top margins may be been changed as a result of moving the image */\n\tfPImg.style.marginLeft = \"\";\n\tfPImg.style.marginTop = \"\";\n\t\n\t// Set new zoom level\n\tuiState.setZoomLevel(1.0);\n\t\n\t// Calculate and update image width with the new zoom level\n\tfPImg.style.width = coordConv.floorToDisp(0, fPImg.naturalWidth, uiState.getZoomLevel()) + \"px\"; \n\n\t// Calculate and update POI locations on screen\n\tupdatePOIsLocationsOnScreen(); \n}", "title": "" }, { "docid": "ae083b83475532604dba7710445d8bf3", "score": "0.62811595", "text": "function resetView(){\n if (globalControls !== undefined){\n globalControls.target.copy(new THREE.Vector3(0,0,0));\n } \n}", "title": "" }, { "docid": "00c5824bb3f3d7f86efe135c7ad45322", "score": "0.6281059", "text": "function restoreZoom() {\n stopWatchPage.classList.remove('zoom-out');\n lapListPage.classList.remove('visible');\n }", "title": "" }, { "docid": "155a0809f0bff42e8f6b3bd50c93418d", "score": "0.62681776", "text": "function reset() {\r\n \r\n\t\t\tbounds = path.bounds(geoShape);\r\n\r\n\t\t\tvar topLeft = bounds[0],\r\n\t\t\t\tbottomRight = bounds[1];\r\n\r\n\t\t\tsvg .attr(\"width\", bottomRight[0] - topLeft[0])\r\n\t\t\t\t.attr(\"height\", bottomRight[1] - topLeft[1])\r\n\t\t\t\t.style(\"left\", topLeft[0] + \"px\")\r\n\t\t\t\t.style(\"top\", topLeft[1] + \"px\");\r\n\r\n\t\t\tg .attr(\"transform\", \"translate(\" + -topLeft[0] + \",\" \r\n\t\t\t + -topLeft[1] + \")\");\r\n\r\n\t\t\t// initialize the path data\t\r\n\t\t\td3_features.attr(\"d\", path)\r\n\t\t\t\t.style(\"fill-opacity\", 0.7)\r\n\t\t\t\t.attr('fill','blue');\r\n\t\t}", "title": "" }, { "docid": "1ae5935d7ddf8f639b11dbd79efba587", "score": "0.625004", "text": "zoomOut() {\n this.zoomTo(this.zoom * Camera.ZOOM_FACTOR);\n }", "title": "" }, { "docid": "d86054b30c11ac3f12fcd7db9e60906d", "score": "0.62456155", "text": "function resetMap() {\r\n /* we want to center the map based on the markers, but if there is only one marker, we don't want to go too low */\r\n if (vm.appCntl.showMap && vm.appCntl.tab === MAP_TAB) {\r\n $log.debug(\"do reset map\");\r\n if (vm.mapMarkers.length > 0) {\r\n var bounds = new google.maps.LatLngBounds();\r\n for (var i=0; i < vm.mapMarkers.length; i++) {\r\n if (vm.mapMarkers[i].type === google.maps.drawing.OverlayType.MARKER ) {\r\n bounds.extend(vm.mapMarkers[i].position);\r\n } else if (vm.mapMarkers[i].type === google.maps.drawing.OverlayType.POLYGON ) {\r\n vm.mapMarkers[i].getPaths().forEach(function(path, index){\r\n path.getArray().forEach(function(latLng, index){\r\n bounds.extend(latLng); //path.locId = newShape.locId; //put our locId on the path, so we can use it to move datapoints.\r\n }); });\r\n } else if (vm.mapMarkers[i].type === google.maps.drawing.OverlayType.POLYLINE) {\r\n vm.mapMarkers[i].getPath().forEach(function(latLng, index){\r\n bounds.extend(latLng); //path.locId = newShape.locId; //put our locId on the path, so we can use it to move datapoints.\r\n });\r\n }\r\n }\r\n vm.map.mapControl.getGMap().fitBounds(bounds); \r\n var zoom = vm.map.mapControl.getGMap().getZoom();\r\n $log.debug(zoom);\r\n if (zoom > RESET_ZOOM_LEVEL) {\r\n zoom = RESET_ZOOM_LEVEL;\r\n\r\n }\r\n vm.map.mapControl.getGMap().setZoom(zoom);\r\n $log.debug(zoom);\r\n } else {\r\n $log.debug('no markers - center on toronto');\r\n vm.map.mapControl.getGMap().setZoom(10);\r\n vm.map.mapControl.getGMap().setCenter(MAP_CENTER); \r\n }\r\n \r\n CommonInfoWindow.close();\r\n }\r\n }", "title": "" }, { "docid": "f1f751ceb4ea643d99c0becf92e934f8", "score": "0.624264", "text": "function clearAllProjections() {\n (0,_proj_projections_js__WEBPACK_IMPORTED_MODULE_2__.clear)();\n (0,_proj_transforms_js__WEBPACK_IMPORTED_MODULE_3__.clear)();\n}", "title": "" }, { "docid": "471da69d43b7787640940a65a5421e95", "score": "0.62364054", "text": "reset() {\n this.x = 0;\n this.y = 0;\n this.z = 0;\n this.xD = 0;\n this.yD = 0;\n this.zD = 0;\n\n this.rotateX = 0;\n this.rotateY = 0;\n this.rotateZ = 0;\n this.rotateXD = 0;\n this.rotateYD = 0;\n this.rotateZD = 0;\n\n this.scaleX = 1;\n this.scaleY = 1;\n this.scaleZ = 1;\n\n this.projected.x = 0;\n this.projected.y = 0;\n }", "title": "" }, { "docid": "c0299981a0ac0906b8af2d7cddefdb22", "score": "0.62255234", "text": "function reset() {\n\n // Reset the calculation statistics text\n stat.text(\"\");\n\n // Create the cartogram features (without any scaling)\n var cartoFeatures = carto.features(topology, geometries),\n path = d3.geoPath()\n .projection(proj);\n\n // Redraw the features with a transition\n mapFeatures.data(cartoFeatures)\n .transition()\n .duration(750)\n .ease(\"linear\")\n .attr(\"fill\", \"#ddd\")\n .attr(\"d\", path);\n}", "title": "" }, { "docid": "0cdf2a816f25299beca97e6d000b25a4", "score": "0.6224357", "text": "function resetView() {\n // Reset scaling a center the MB set\n renderer.scaling = 1;\n renderer.resetView();\n renderer.setAutoIterations();\n // Reset resolution and rerender\n renderer.resolutionScaling = 1;\n renderer.setCanvasSize();\n renderer.render();\n}", "title": "" }, { "docid": "45cbd05731a7f33849d47bf45ae636a9", "score": "0.6208159", "text": "resetRotation() {\n if (this.is3DEnabled()) {\n var camera = this.getWebGLCamera();\n if (camera) {\n camera.flyTo({\n range: camera.getDistanceToCenter(),\n center: camera.getCenter(),\n heading: 0,\n pitch: 0,\n roll: 0\n });\n }\n } else {\n var map = this.getMap();\n var view = map.getView();\n assert(view !== undefined);\n view.setRotation(0);\n }\n\n Metrics.getInstance().updateMetric(metrics.keys.Map.RESET_ROTATION, 1);\n }", "title": "" }, { "docid": "1337c96ab9d3744a240b2dec7644e825", "score": "0.6203574", "text": "function reset() {\n _map.clearOverlays();\n $(\"#results\").empty();\n}", "title": "" }, { "docid": "6449b6d7f7e4201fa2c3072218ec1ff2", "score": "0.6167578", "text": "function clearAllProjections() {\n _proj_projections_js__WEBPACK_IMPORTED_MODULE_7__[\"clear\"]();\n Object(_proj_transforms_js__WEBPACK_IMPORTED_MODULE_8__[\"clear\"])();\n}", "title": "" }, { "docid": "6449b6d7f7e4201fa2c3072218ec1ff2", "score": "0.6167578", "text": "function clearAllProjections() {\n _proj_projections_js__WEBPACK_IMPORTED_MODULE_7__[\"clear\"]();\n Object(_proj_transforms_js__WEBPACK_IMPORTED_MODULE_8__[\"clear\"])();\n}", "title": "" }, { "docid": "6449b6d7f7e4201fa2c3072218ec1ff2", "score": "0.6167578", "text": "function clearAllProjections() {\n _proj_projections_js__WEBPACK_IMPORTED_MODULE_7__[\"clear\"]();\n Object(_proj_transforms_js__WEBPACK_IMPORTED_MODULE_8__[\"clear\"])();\n}", "title": "" }, { "docid": "1596dadc9e19b0786b96f89c94c75bc8", "score": "0.616485", "text": "function clearAllProjections() {\n Object(_proj_projections_js__WEBPACK_IMPORTED_MODULE_8__[\"clear\"])();\n Object(_proj_transforms_js__WEBPACK_IMPORTED_MODULE_7__[\"clear\"])();\n}", "title": "" }, { "docid": "9e98d0030b9deaba2bf9cdb420148aac", "score": "0.6153025", "text": "function reset() {\n var bounds = d3path.bounds(data)\n topLeft = [bounds[0][0] + 10, bounds[0][1] - 10]\n bottomRight = [bounds[1][0] + 10, bounds[1][1] + 10];\n\n // Setting the size and location of the overall SVG container\n svg_map\n .attr(\"width\", bottomRight[0] - topLeft[0])\n .attr(\"height\", bottomRight[1] - topLeft[1])\n .style(\"left\", topLeft[0] + \"px\")\n .style(\"top\", topLeft[1] + \"px\");\n\n g.attr(\"transform\", \"translate(\" + (-topLeft[0]) + \",\" + (-topLeft[1]) + \")\");\n\n feature.attr(\"transform\",\n function (d) {\n return \"translate(\" +\n applyLatLngToLayer(d).x + \",\" +\n applyLatLngToLayer(d).y + \")\";\n });\n }", "title": "" }, { "docid": "2ca5719a48a4e2fa0fe8a7b7d9e2151e", "score": "0.6151993", "text": "function reset() {\r\n\t\t active.classed(\"active\", false);\r\n\t\t active = d3.select(null);\r\n\r\n\t\t svg.transition()\r\n\t\t .duration(300)\r\n\t\t // .call( zoom.transform, d3.zoomIdentity.translate(0, 0).scale(1) ); // not in d3 v4\r\n\t\t .call( zoom.transform, d3.zoomIdentity ); // updated for d3 v4\r\n\t\t}", "title": "" }, { "docid": "164335821619a50e885d6356d6c40674", "score": "0.6151131", "text": "function reset() {\n\n // d3 has bounds function to give the rectangluar bounds of a path\n bounds = path.bounds(geoShape);\n\n var topLeft = bounds[0],\n\tbottomRight = bounds[1];\n\n svg.attr(\"width\", bottomRight[0] - topLeft[0])\n .attr(\"height\", bottomRight[1] - topLeft[1])\n .style(\"left\", topLeft[0] + \"px\")\n .style(\"top\", topLeft[1] + \"px\");\n\n g.attr(\"transform\", \"translate(\" + -topLeft[0] + \",\"\n\t + -topLeft[1] + \")\");\n\n // initialize the path data\n d3_features.attr(\"d\", path)\n .style(\"fill-opacity\", 0.7)\n .attr('fill','blue');\n }", "title": "" }, { "docid": "eb1124ffa982248e00c8579fd49d2924", "score": "0.61443627", "text": "function resetMap(){\n clearMap();\n map.setCenter(center);\n map.setZoom(defaultZoom);\n selectedStreet.value = \"Choose a street\"\n document.getElementById('selectTime').value = \"Start time\"\n document.getElementById('selectDay').value = \"Choose day\"\n}", "title": "" }, { "docid": "9bca6400e336697ad5acb4183449fa65", "score": "0.6129945", "text": "function clearAllProjections() {\n __WEBPACK_IMPORTED_MODULE_7__proj_projections_js__[\"b\" /* clear */]();\n Object(__WEBPACK_IMPORTED_MODULE_8__proj_transforms_js__[\"b\" /* clear */])();\n}", "title": "" }, { "docid": "8c061a77c93c2127f44422ad8b0245b6", "score": "0.6125194", "text": "function zoomCameraOut() {\n\tTWEEN.removeAll();\n\n\tnew TWEEN.Tween(camera.position)\n\t\t.to({\n\t\t\tx: lastCameraPosition.x,\n\t\t\ty: lastCameraPosition.y,\n\t\t\tz: lastCameraPosition.z\n\t\t}, 3000)\n\t\t.easing( TWEEN.Easing.Linear.None )\n\t .onUpdate( function() {\n\t \tconsole.log(\"tweening camera out\");\n\t \tcamera.lookAt(scene.position);\n\t \trenderer.render(scene, camera);\n\t })\n\t .onComplete( function() {\n\t \tconsole.log(\"done zooming out\");\n\t \tselectedProject = null;\n\t\t\tprojectInView = false;\n\t\t\tTWEEN.removeAll();\n\t\t\tspheresToRandom();\n\t })\n\t .start();\n}", "title": "" }, { "docid": "acac109a0f92b5a9ebcea4ecb8bab28e", "score": "0.6100563", "text": "function ReSet(){\n\ttransform.position.x = ((tempLon * 20037508.34 / 180)/100)-iniRef.x;\n\ttransform.position.z = System.Math.Log(System.Math.Tan((90 + tempLat) * System.Math.PI / 360)) / (System.Math.PI / 180);\n\ttransform.position.z = ((transform.position.z * 20037508.34 / 180)/100)-iniRef.z; \n\tif(!freeCam){\n\t\tcam.position.x = transform.position.x;\n\t\tcam.position.z = transform.position.z;\n\t}\n\tif(triDView==false && centering){\n\t\tcentered=true;\n\t\tautoCenter=true;\n\t\tcentering=false;\n\t}\n}", "title": "" }, { "docid": "3930cca8034bc3a846e5584bd18a08c0", "score": "0.60988784", "text": "resetView () {\n if (this.isMapLoaded() && !this.state.region.loading) {\n this.flyToRegion(this.state.region);\n }\n }", "title": "" }, { "docid": "1a84c0fc0c015171119f8fb6078bbb55", "score": "0.6087283", "text": "resetTransformations () {\n this.displayPanel.zoomHandler.restoreTransformation();\n setOpacityFromSlider();\n }", "title": "" }, { "docid": "fd54fe635cf5d5670f1dd2fe64f517fa", "score": "0.60866255", "text": "function zoomElemtents_reset() {\n\t\t\tzoom.marker = { 1 : { placed:false }, 2 : { placed:false} };\n\t\t\t$('div[id^=\"zoom-\"]').not('#zoom-menu').each( function () {\n\t\t\t\t$(this).removeAttr('style');\n\t\t\t});\n\t\t\t$(\"#zoom-box\").off();\n\t\t\t$(\"#zoom-box\").css({ cursor:'crosshair', width:zoom.box.width + 'px', height:zoom.box.height + 'px', top:zoom.box.top+'px', left:zoom.box.left+'px' });\n\t\t\t$(\"#zoom-box\").bind('contextmenu', function(e) { zoomContextMenu_show(e); return false;} );\n\t\t\t$(\"#zoom-area\").off().css({ top:zoom.box.top+'px', height:zoom.box.height+'px' });\n\t\t\t$(\".zoom-area-excluded\").off();\n\t\t\t$(\".zoom-area-excluded\").bind('contextmenu', function(e) { zoomContextMenu_show(e); return false;} );\n\t\t\t$(\".zoom-area-excluded\").bind('click', function(e) { zoomContextMenu_hide(); return false;} );\n\t\t\t$(\".zoom-marker-arrow-up\").css({ top:(zoom.box.height-6) + 'px' });\n\t\t\t$(\".zoom-marker-tooltip-value\").disableSelection();\n\t\t}", "title": "" }, { "docid": "914038d439fe4c125e05e9c3ac65aeba", "score": "0.6038363", "text": "resetTilt() {\n if (this.is3DEnabled()) {\n var camera = this.getWebGLCamera();\n if (camera) {\n camera.flyTo({\n range: camera.getDistanceToCenter(),\n center: camera.getCenter(),\n pitch: 0\n });\n }\n }\n\n Metrics.getInstance().updateMetric(metrics.keys.Map.RESET_TILT, 1);\n }", "title": "" }, { "docid": "04fb4692dea496a2f354aa5f6696ce72", "score": "0.603418", "text": "function zoomOut(){\n\tmap.setZoom(map.getZoom() - 1);\n\tsetTimeout(\"returnToEquator()\",1000);\n}", "title": "" }, { "docid": "c9ba179526433a0e9b28f82ef561ff99", "score": "0.6031287", "text": "reset() {\n this.viewport.reset();\n this.mouse.reset();\n this.mouseWheel.reset();\n this.keyboard.reset();\n }", "title": "" }, { "docid": "168424a542c1460447ac3561b3716e3e", "score": "0.60195905", "text": "function handle_btn_reset () {\n for (var i = 0; i < proj.length; i++) {\n plot[0].axis.y1.proj[0][i] = proj[i][1];\t// sources\n plot[0].axis.y1.proj[1][i] = proj[i][2];\n plot[0].axis.y1.proj[2][i] = -proj[i][4];\t// sinks\n plot[0].axis.y1.proj[3][i] = -proj[i][5];\n }\n plot[1].axis.y1.proj = [ [], [], [], [] ];\n draw_plots ();\n}\t// function handle_btn_reset", "title": "" }, { "docid": "b3f6d3a17064e608f2d9b11ab5007339", "score": "0.59786916", "text": "function reset() {\n body.classed(\"updating\", false);\n\n var features = carto.features(topology, geometries),\n path = d3.geo.path()\n .projection(proj);\n\n states.data(features)\n .transition()\n .duration(750)\n .ease(\"linear\")\n .attr(\"fill\", \"#fff\")\n .attr(\"d\", path);\n\n states.select(\"title\")\n .text(function(d) {\n return d.properties.NAME;\n });\n}", "title": "" }, { "docid": "70854e5d5cf88484af968f55a7e20f9a", "score": "0.59699345", "text": "function zoomOut() {\r\t\r\tif(zoom ==2){\r\t\tadjustViewArea(1, -180, -90, 360, 180);\r\t}\r\tif(zoom==3){\r\t\t//go to zoom 2\r\t\tadjustViewArea(2, -50, -25, 180, 90);\r\t}\r\tif(zoom==4){\r\t\t//go to zoom 3\r\t\tadjustViewArea(3, -20, -10, 80, 40);\r\t}\r\tif(zoom==5){\r\t\t//go to zoom 4\r\t\tadjustViewArea(4, -10, -5, 40, 20);\r\t}\r\tif(zoom==6){\r\t\t//go to zoom 5\r\t\tadjustViewArea(5, -9, -4, 20, 10);\r\t}\r}", "title": "" }, { "docid": "6e99ab431a46004f5385507d0f980857", "score": "0.5961378", "text": "clearMap() {\n\n this.mapCanvas.selectAll(\".countries\").attr(\"class\", \"countries\");\n d3.select(\".gold\").remove();\n d3.select(\".silver\").remove();\n\n }", "title": "" }, { "docid": "d2b682716d0633bf8b51b2b0052e7a7b", "score": "0.5952128", "text": "function resetPositions() {\n // add element to animate when back to position\n window.pulseTL.play();\n TweenMax.to([window.settings.hotspots.hotspots, '#tap-to-discover-copy'], 0.25, { autoAlpha: 1 });\n TweenMax.set(window.settings.hotspots.hotspots, { pointerEvents: 'auto', delay: 0.55 });\n\n window.gwd3dModel.setTargetZoom(1500); // update the position of the 3d model\n window.gwd3dModel.setTargetLocalPan(0,0,0);\n window.gwd3dModel.setTargetPivot(1, -3, -1.8);\n window.gwd3dModel.setTargetYaw(-24);\n window.gwd3dModel.setTargetPitch(0);\n\n clearTimeout(window.endframeTimeout);\n setEndframeTimeout();\n}", "title": "" }, { "docid": "4292c56161fd6a48aa636201385d7fb7", "score": "0.59460646", "text": "function reset() {\n\tmarkers(initialMarkers);\n\tmarkerNames(initialMarkerNames);\n\tsetAllMarkers(map);\n\tmap.setCenter(startingPos);\n\tinfowindow.close();\n\ttypes(initialTypes);\n\tsearchResultsArray(initialSearchResultsArray);\n}", "title": "" }, { "docid": "d06439ca4b7c8cd07916d6a3117c8b62", "score": "0.5945592", "text": "function reset() {\n // Ensure nothing is \n if (!myObject.loadedStates.hasDrawableFeatures())\n return;\n\n // these d3 function are needed to properly project the paths onto the map\n var transform = d3.geo.transform({point: projectPoint}),\n path = d3.geo.path().projection(transform),\n bounds = path.bounds(myObject.loadedStates);\n\n var topLeft = bounds[0],\n bottomRight = bounds[1];\n\n // adjust SVG size and position\n myObject.svg.style(\"width\", bottomRight[0]-topLeft[0] + \"px\")\n .style(\"height\", bottomRight[1]-topLeft[1] + \"px\")\n .style(\"left\", topLeft[0] + \"px\")\n .style(\"top\", topLeft[1] + \"px\");\n\n // apply transform to SVG group\n myObject.svg.selectAll('g').attr(\"transform\", \"translate(\" + -topLeft[0] + \",\" + -topLeft[1] + \")\");\n\n // draw paths with updates transformations\n myObject.svg.selectAll('g').selectAll('path').attr('d', path);\n }", "title": "" }, { "docid": "b17b5c520925f52db522aff2fa4c8428", "score": "0.59373635", "text": "function resetCamera(){\n setPosition(camera,CAMERA_ORIGIN_POSITION);\n}", "title": "" }, { "docid": "b10324e8ea368e2bc078102a964b64cf", "score": "0.59302664", "text": "draw3D()\n {\n RPM.renderer.clear();\n if (this.mapProperties.sceneBackground !== null)\n {\n RPM.renderer.render(this.mapProperties.sceneBackground, this\n .mapProperties.cameraBackground);\n }\n RPM.renderer.render(this.scene, this.camera.threeCamera);\n }", "title": "" }, { "docid": "9a5505cc7c719992a3ce6e8f3b0718a9", "score": "0.5928991", "text": "function clearMap(){\n map.graphics.clear();\n sketchGraphics.clear();\n\n for (var i=0;i<map.graphicsLayerIds.length;i++){\n map.getLayer(map.graphicsLayerIds[i]).clear();\n }\n\n //Once Clear All Graphics button is clicked, it should clear all temporary graphics, map graphic layers. Plus, the Search results and More Info panel to be reverted to main Search page.\n if ($('#search-results.ui-panel-open').is(':visible') || $('#search-results-2.ui-panel-open').is(':visible')){\n $('#search-panel').panel('open');\n }\n\n}", "title": "" }, { "docid": "b38d9cc58f2592fb0a32572e136c2927", "score": "0.5928677", "text": "function resetLayers() {\n \n cpEasementsLayer.eachLayer(function(layer) {\n layer.setStyle({\n opacity: 1,\n fillOpacity: 1\n })\n })\n $(\"#Acreage span\").html(\"54,984\")\n }", "title": "" }, { "docid": "8215f2cd9bdf5482c00ccbdb31262b20", "score": "0.5926327", "text": "function resetCameraAndControls() {\n var origin = new THREE.Vector3(0,0,0);\n //TODO: make a new field for Tours or Renders called initial_camera_position\n var initial_cam_pos = new THREE.Vector3(1000,1000,1000);\n camAndCtrlTransition(initial_cam_pos, origin);\n}", "title": "" }, { "docid": "024ac2404e4780b4ed3a888933811f31", "score": "0.5917511", "text": "function reset_polygons() {\n while(polygons[0]) {\n polygons.pop().setMap(null);\n }\n}", "title": "" }, { "docid": "a0ab0908e02318e8e89b11280b68f0b9", "score": "0.5901434", "text": "function reset() {\n active.classed(\"active\", false);\n active = d3.select(null);\n\n activeClick.style(\"fill\", \"blue\");\n activeClick = d3.select(null);\n\n breweryDiv\n .style(\"opacity\", 0)\n\n svg.transition()\n .duration(750)\n .call(zoom.translate([0, 0]).scale(1).event);\n}", "title": "" }, { "docid": "0a56021bb1146ae6fc36fd0ef616b3fb", "score": "0.59010655", "text": "function reset() {\n var bounds = path.bounds(topojson.feature(data.annexations, data.annexations.objects[\"annex_\" + current.year])),\n topLeft = bounds[0],\n bottomRight = bounds[1];\n\n svg.attr(\"width\", bottomRight[0] - topLeft[0])\n .attr(\"height\", bottomRight[1] - topLeft[1])\n .style(\"left\", topLeft[0] + \"px\")\n .style(\"top\", topLeft[1] + \"px\");\n\n g.attr(\"transform\", \"translate(\" + -topLeft[0] + \",\" + -topLeft[1] + \")\");\n\n feature.attr(\"d\", path);\n }", "title": "" }, { "docid": "675c51c09583b60f183f5ec96c6b5805", "score": "0.589898", "text": "function clearMap(){\n\t\n\ttry{\n\t\tmap.removeLayer(positionIcon);\n\t}catch (e) {\n //\n }\n\tvideo.pause();\n\tlinesLayer.clearLayers();\n\tpointsLayer.clearLayers();\n\t\n\tsingleFeatureSelection = false;\n\tsingleCoveredArea(\"none\");\n\tcoveredAreasDisplayed = true; //fake\n\tdisplayCoveredAreas();\n\tfov_polygons.clearLayers();\n}", "title": "" }, { "docid": "fa256d0f9fc710f3c04605a19b7910f1", "score": "0.5885942", "text": "function zoom_out(){\r\n\tgmap.setCenter(new google.maps.LatLng(46.151241,14.995462999999972));\r\n\tgmap.setZoom(2);\r\n}", "title": "" }, { "docid": "f77f78a58dd855e137b8bfbdd4236aa6", "score": "0.5879504", "text": "function resetMap() {\n map = new google.maps.Map(document.getElementById('map'), {\n zoom: 3,\n center: { lat: 37.50, lng: -95.35 }\n });\n \n $('#galleryName').text('');\n $('#galleryAddr').text('');\n}", "title": "" }, { "docid": "798fa1abbe281c883d2d823ec58dcf9b", "score": "0.5874764", "text": "function reset() {\n // remove active class from current region\n active.classed(\"active\", false);\n active = d3.select(null);\n\n g.selectAll(\"circle\")\n .transition()\n .duration(1000)\n .attr(\"r\", 0)\n .remove();\n\n g.selectAll(\"path.region\")\n // no transition here, it's already in the function\n .call(setMapAttr);\n\n g.selectAll(\".regionLabel\")\n .transition()\n .duration(750)\n .style(\"opacity\", 1);\n\n g.transition()\n // .delay(750)\n .duration(1000)\n .style(\"stroke-width\", \"1.5px\")\n .attr(\"transform\", \"\");\n}", "title": "" }, { "docid": "b710cf555809717e9391e2df27efe584", "score": "0.58660764", "text": "function reload(e) {\n bounds = map.getBounds();\n zoomLevel = map.getZoom();\n mapCenter = map.getCenter();\n setCookie('mapCenter', mapCenter.lat+','+mapCenter.lng);\n setCookie('zoomLevel', zoomLevel);\n $('#zoomLevel').val(zoomLevel);\n mainloop();\n } // end reload()", "title": "" }, { "docid": "d785d077c36847ddb87f6deb8650cc73", "score": "0.58621335", "text": "function reset() {\n\n // Reset the calculation statistics text\n stat.text(\"\");\n\n // Create the cartogram features (without any scaling)\n var cartoFeatures = carto.features(topology, geometries),\n path = d3.geo.path()\n .projection(proj);\n\t\t\n\t // Prepare the values and determine minimum and maximum values\n\t var value = function(d) {\n\t\treturn getValue(d);\n\t },\n values = mapFeatures.data()\n .map(value)\n .filter(function(n) {\n return !isNaN(n);\n })\n .sort(d3.ascending),\n lo = values[0],\n hi = values[values.length - 1];\n\n // Determine the colors within the range\n var color = d3.scale.linear()\n .range(colors)\n .domain(lo < 0\n ? [lo, 0, hi]\n : [lo, d3.median(values), hi]);\n var myColor = d3.scale.linear().domain([lo, hi])\n .range([\"lightsteelblue\", \"darkblue\"])\n\n // Redraw the features with a transition\n mapFeatures.data(cartoFeatures)\n .transition()\n .duration(750)\n .ease(\"linear\")\n .attr(\"fill\", function(d) {\n return myColor(value(d));\n })\n .attr(\"d\", path);\n}", "title": "" }, { "docid": "e2d3a86e1c920c9f2a47df06c0eaaec7", "score": "0.5855497", "text": "function resetHighlight(){\n //reset poly features individually\n for (var i = 0, l = polyLayer.length; i < l; i++) {\n var nm = polyLayer[i],\n resStyle = window[nm].options.style;\n window[nm].setStyle(resStyle);\n }\n resetIconhighlights();\n\n}", "title": "" }, { "docid": "038f7abe54530bfe63c6413870c97965", "score": "0.58509976", "text": "function reset_scene() {\r\n backgroundColor = [1,1,1];\r\n fov = 0;\r\n eye = {\r\n x: 0,\r\n y: 0,\r\n z: 0,\r\n };\r\n let u;\r\n let v;\r\n let w;\r\n ambientLight = [1,1,1];\r\n pointLights = [];\r\n spheres = [];\r\n areaLights = [];\r\n disks = [];\r\n}", "title": "" }, { "docid": "3b373deb199f0b83d92f0dba3355ef95", "score": "0.5839666", "text": "function initMapState(){\n \n var lat = lcly.conversionModule.getMetaParam('lat'); \n var lng = lcly.conversionModule.getMetaParam('lng');\n var zoom = parseInt(lcly.conversionModule.getMetaParam('zoom'));\n \n if (lat && lng){\n \n lcly.mapModule.setCoords(lat, lng, 0);\n }\n \n if (zoom) {\n \n lcly.mapModule.setZoom(zoom);\n }\n }", "title": "" }, { "docid": "7839d98826833fadc784c248cd3faefd", "score": "0.5836197", "text": "saveReset() {\n this.rotationCenter0.copy(this.rotationCenter);\n this.position0.copy(this.object.position);\n this.up0.copy(this.object.up);\n this.zoom0 = this.object.zoom;\n }", "title": "" }, { "docid": "5aa9534123ef2c2f0a2246d43105de98", "score": "0.58333266", "text": "function switchProjection(proj, overlay) {\n switch(proj) {\n case 0:\n params = gmrt_params.merc;\n break;\n case 1:\n params = gmrt_params.sp;\n break;\n case 2:\n params = gmrt_params.np;\n break;\n }\n\n if (map.getView().getProjection() == params.projection) return;\n map.getView().setZoom(params.zoom);\n map.removeLayer(gmrtLayer);\n\n var this_zoom = params.zoom;\n if (url_params.menu_id == overlay.menu_id)\n this_zoom = url_params.zoom;\n\n view = new ol.View({\n center: params.center,\n zoom: this_zoom,\n minZoom: 2,\n projection: params.projection,\n extent: params.view_extent,\n enableRotation: false\n });\n map.setView(view);\n \n gmrtLayer = new ol.layer.Tile({\n type: 'base',\n title: \"GMRT Synthesis\",\n source: new ol.source.TileWMS({\n url: gmrtMapUrl + params.url_ext,\n params: {\n layers: params.layer\n }, \n crossOrigin: \"Anonymous\"\n })\n });\n\n if (proj == 0) {\n map.addLayer(gmrtLayer);\n }\n\n //replace the overview map\n var layers = [];\n if (proj == 1) {\n layers = map.getLayers(); \n }\n else {\n layers = [gmrtLayer];\n }\n\n var layerGroup = new ol.layer.Group({\n layers: layers\n });\n\n overviewMapControl.getOverviewMap().set('view',\n new ol.View({\n center: params.overview_center,\n projection: params.projection,\n extent: params.view_extent,\n }));\n overviewMapControl.getOverviewMap().set('layergroup', layerGroup);\n\n map.getControls().forEach(function (control) {\n if (control instanceof ol.control.OverviewMap) {\n map.removeControl(control);\n }\n });\n\n map.addControl(overviewMapControl);\n\n //update projection of hidden map too\n map2.setView(view);\n \n //set listener of center change (ie panning)\n view.on('change:center', constrainPan);\n}", "title": "" }, { "docid": "30fe42b2a2ca29cc5aa99af456d50ae0", "score": "0.58288646", "text": "function zoom() {\n mapXY.translate(d3.event.translate)\n .scale(d3.event.scale);\n pathsLayer.selectAll(\"path\")\n .attr(\"d\", path);\n }", "title": "" }, { "docid": "f4eedcc4ee1ceef084229602bfad6e2c", "score": "0.5817437", "text": "function init() {\n //Create the google earth instance\n google.earth.createInstance('map3d', initCB, failureCB);\n\n //declare buttons\n $('#time').button();\n $('#switch').button();\n $('#change').button();\n $('#remove').button();\n $(\"#gcm\").select2();\n $(\"#rcp\").select2({\n placeholder: \"rcp45\"\n });\n $('#sidebar-iframe').hide();\n\n $('#page-welcome').height(pageHeight - navigationHeight)\n .offset({\n top: 50\n });\n //Hide the sidebar when the user scrolls off the map\n $( window ).scroll(function() {\n\tif($(\"#sidebar-wrapper\").hasClass(\"active\")) {\n\t $(\"#menu-close\").trigger(\"click\");\n\t}\n });\n //toggle function for the time button\n $('#time button').click(function () {\n //if the time value is 'current' call the current function\n //otherwise call future function\n $('#time button').addClass('active').not(this).removeClass('active');\n //$(this).val() == \"current\" ? current_int() : current_future();\n switchTime();\n });\n\t\n\t$('#rcp').on(\"change\", function() { switchLayer();})\n\t$('#gcm').on(\"change\", function() { switchLayer();})\n\n legend('growth.png');\n\n //Run through the checkboxes to find reference layers to display\n $('input.ref').click(function () {\n $('input.ref:checkbox').each(function () {\n var layer = $(this).val();\n this.checked ? setRefLayer(layer, true) : setRefLayer(layer, false);\n });\n });\n\n $('input.little').click(function () {\n this.checked ? setLittleMap(true) : setLittleMap(false);\n });\n\n $('input.test').click(function () {\n if (this.checked) {\n $('#time').hide();\n $('#period').show();\n $('#time-slider').show();\n\t\t\tswitchLayer();\n //setTimeSlice(true);\n } else {\n $('#time-slider').hide();\n $('#period').hide();\n $('#time').show();\n } //setTimeSlice(false);\n });\n\n $(\"input[name=species]:radio\").change(function () {\n switchLayer();\n\t\tif ($('#little').is(':checked') == true) {\n\t\tchangeLittleMap();\n\t\t} \n });\n\n $(\"#cycleMaps\").change(function () {\n if (this.checked) {\n myTimer = setInterval('cycleLayers()', 1200);\n } else {\n clearInterval(myTimer);\n }\n });\n\n //try jquery slider function... probably looks better than googles\n $(function () {\n $('#slider-container').slider({\n orientation: \"horizontal\",\n range: \"min\",\n min: 0,\n max: 100,\n value: 60,\n slide: function (event, ui) {\n $('#amount').val(ui.value + '%');\n\n activeFolder.setOpacity(ui.value / 100);\n\n\n\n }\n });\n $('#amount').val($('#slider-container').slider(\"value\") + \"%\");\n\n });\n\n $(function () {\n $('#time-slider').slider({\n orientation: \"horizontal\",\n range: \"min\",\n min: 1,\n max: 8,\n value: 1,\n step: 1,\n slide: function (event, ui) {\n $('#period').val('20' + ui.value + '1');\n\t\t\t\tmapIndex = ui.value;\n\t\t\t\tswitchTime();\n\n //setTimeSlice('20'+ ui.value +'0');\n\n }\n });\n $('#period').val('20' + $('#time-slider').slider(\"value\") + '1');\n });\n\n $(\"#menu-close\").click(function (e) {\n\t//e.preventDefault();\n\t$(\"sidebar-wrapper\").removeClass(\"active\");\n\t$(\"#menu-toggle\").show();\n\t$(\"#sidebar-iframe\").hide();\n });\n \n $(\"#menu-toggle\").click(function (e) {\n//\te.preventDefault();\n\t$(\"#sidebar-wrapper\").addClass(\"active\");\n\t$(\"#menu-toggle\").hide();\n\t$(\"#sidebar-iframe\").show();\n });\n\n\n //end init function\n}", "title": "" }, { "docid": "d207055f1d2426e76860ea145c5a97cf", "score": "0.5816782", "text": "function drawMap() {\n\n const zoom = d3.zoom()\n .scaleExtent([1, 8])\n .on('zoom', (e) => {\n g.attr('transform', e.transform);\n });\n \n //Code adapted from sreen020\n // ------------------------------------------------------------------------------------\n //Gets topojson from url and draws the paths of the townships with it\n d3$1.json('https://cartomap.github.io/nl/wgs84/gemeente_2020.topojson').then(\n (data) => {\n const townships = topojson.feature(data, data.objects.gemeente_2020);\n \n g\n .selectAll('path')\n .data(townships.features)\n .enter().append('path')\n \t.attr('d', pathGenerator)\n .append('title')\n .text((d) => `${d.properties.statnaam}`);\n // ------------------------------------------------------------------------------------\n \n //Handels the reset button \n // source: https://stackoverflow.com/questions/53056320/html-d3-js-how-to-zoom-from-the-mouse-cursor-rather-than-top-left-corner\n \t\tresetButton\n \t.attr('cursor', 'pointer')\n \t.text('Reset Kaart')\n \t.on('click', function(){\n \tg.transition()\n \t\t\t.duration(750)\n \t\t.call(zoom.transform, d3.zoomIdentity);\n \t});\n \n svg.call(zoom);\n \t}\n );}", "title": "" }, { "docid": "e7d2bf9552f43e77c442355abcd6cf2c", "score": "0.58102036", "text": "function viewReset() {\n\n var bounds = path.bounds(district_features),\n topLeft = bounds[0],\n bottomRight = bounds[1];\n\n svg .attr(\"width\", bottomRight[0] - topLeft[0])\n .attr(\"height\", bottomRight[1] - topLeft[1])\n .style(\"left\", topLeft[0] + \"px\")\n .style(\"top\", topLeft[1] + \"px\");\n\n g.attr(\"transform\", \"translate(\" + -topLeft[0] + \",\" + -topLeft[1] + \")\");\n\n feature.attr(\"d\", path);\n }", "title": "" }, { "docid": "5ece61028c5f9891793a99d87964e01e", "score": "0.5802271", "text": "set zoom(newZoom) {\r\n newZoom = Object(_math_scalar__WEBPACK_IMPORTED_MODULE_0__[\"clamp\"])(newZoom, this.options.minZoom, this.options.maxZoom);\r\n if (newZoom !== this._zoom) {\r\n this._zoom = newZoom;\r\n this._computeDistanceToCenter();\r\n // Constraints on tilt may have changed, we need to recompute it.\r\n this._tilt = this._constrainTilt(this._tilt);\r\n this._worldToPxFactor = 2.0 / (ZOOM_0_WORLD_CSS_PIXEL_SIZE * Math.pow(2, newZoom));\r\n this._setDirtyBits(1 /* VIEW_PROJ_MATRIX */ | 2 /* VISIBLE_QUADRILATERAL */);\r\n }\r\n }", "title": "" }, { "docid": "1f06e59fa74820e9fef6304ab89e194b", "score": "0.5789399", "text": "function backToProjectView() {\n\t$(\".project-details, .project-intro, .canvas\").removeClass(\"active\");\n\tzoomCameraOut();\n\trotateCamera = false;\n}", "title": "" }, { "docid": "5b0ad3e1286f247585fd49d4da746b8e", "score": "0.5783729", "text": "function clearMap() {\n\n vector_layer.getSource().clear();\n if (select_interaction) {\n select_interaction.getFeatures().clear();\n }\n $('#data').val('');\n }", "title": "" }, { "docid": "cf1a0bd6083041e6730c6b275d273e5f", "score": "0.578316", "text": "function initialize() {\n proj.scale(27000);\n proj.translate([799, 5010]);\n}", "title": "" }, { "docid": "0e48301b2ce05f0352111b8d67617b0e", "score": "0.5780288", "text": "function restoreDefaultMap() {\n\t//g.selectAll('circle.node').style(\"visibility\", \"hidden\");\n\tg.selectAll(\"circle.node\")\n \t\t .filter(function(d) { return isDefaultTopType(d)})\n \t\t .classed('node', true) \n\t\t .attr(\"r\", function(d) { return topTypeSizes.get(d.topType)})\n \t\t .style(\"visibility\", \"visible\"); \n\n \tg.selectAll(\"path\").style(\"visibility\", \"visible\"); //to restore after search \n \tg.selectAll('path').classed('path-shortest', false);\n \tshowAllPaths(); // to restore after voronoi \n \tremoveZoneClasses(); \n}", "title": "" }, { "docid": "5a5ecd84665b29669b52af4a63160e0a", "score": "0.577875", "text": "function setZoom() {\r\n startGame();\r\n\tzoomMode = true;\r\n zoom = 2.0;\r\n insertName();\r\n}", "title": "" }, { "docid": "136bd24a29cb9ff6fdbedc3e0b1137a8", "score": "0.57667255", "text": "function goktm(){\r\n\tmap.setView([27.6964, 85.3338], 14);\r\n}", "title": "" }, { "docid": "ef1f449045dfcd0b401ba1fdcf3b75b4", "score": "0.57593244", "text": "clearMap() {\n\n // ******* TODO: PART V*******\n // Clear the map of any colors/markers; You can do this with inline styling or by\n // defining a class style in styles.css\n\n // Hint: If you followed our suggestion of using classes to style\n // the colors and markers for hosts/teams/winners, you can use\n // d3 selection and .classed to set these classes on and off here.\n var color = d3.select('#map').selectAll('.countries');\n color.attr('class', 'countries');\n color.classed('host', false);\n color.classed('team', false);\n color.classed('countries', true);\n d3.selectAll('#finalist').remove();\n\n }", "title": "" }, { "docid": "4065aeb5de0b0465ee7a1807eba64dcd", "score": "0.5753169", "text": "function resetCorner()\n{\n resetButton.disabled = true;\n saveButton.disabled = true;\n undoButton.disabled = true;\n currentRegion.removeAllMarker();\n currentRegion.resetCorner();\n currentRegion.showPolygon(map, setting.polygon);\n}", "title": "" }, { "docid": "01c33f44d2d389bccbbc37469017acf0", "score": "0.5747423", "text": "async resetFog() {\n\t\tif ( CONFIG.debug.fog ) console.debug(\"SightLayer | Resetting fog of war exploration for Scene.\");\n\t\tgame.socket.emit(\"resetFog\", canvas.scene.id, getDocumentClass(\"FogExploration\")._onResetFog);\n\t}", "title": "" }, { "docid": "6079f669a7c801a7de5b6b00b830b91b", "score": "0.57472026", "text": "resetRoll() {\n if (this.is3DEnabled()) {\n var camera = this.getWebGLCamera();\n if (camera) {\n camera.flyTo({\n range: camera.getDistanceToCenter(),\n center: camera.getCenter(),\n heading: 0\n });\n }\n } else {\n var map = this.getMap();\n var view = map.getView();\n assert(view !== undefined);\n view.setRotation(0);\n }\n\n Metrics.getInstance().updateMetric(metrics.keys.Map.RESET_ROLL, 1);\n }", "title": "" }, { "docid": "ff5d5be511b9a545cf52a843c317f353", "score": "0.5729231", "text": "function resetScene() {\n if (wireframe != undefined) scene.remove(wireframe);\n if (mesh != undefined) scene.remove(mesh);\n wireframe = paper.wireframe(edgeMaterial);\n mesh = paper.mesh(meshMaterial);\n var activeUi = getActiveMode();\n //if (activeUi == \"edge\" || activeUi == \"file\") {\n scene.add(mesh, wireframe);\n //} else {\n //\tscene.add(mesh);\n //}\n createEdgeCylinders();\n}", "title": "" }, { "docid": "4a4ef7206fb7ad35976174ddb568872b", "score": "0.57287204", "text": "function clearMap() {\n\n\t\tif ( displayedLesionPolygon) {\n\t\t\tdisplayedLesionPolygon.remove();\n\t\t\tdisplayedLesionPolygon = null;\n\t\t}\n\n\t\tresizeUI();\t\n\t}", "title": "" }, { "docid": "2ec9603e4621a51e0cea38abb7956745", "score": "0.5727902", "text": "function zoom(px, py, pz, tx, ty, tz) {\r\n // From v1.2.9 a global offset value was applied. So adjust for\r\n // this here, rather than changing the hardcoded camera/target\r\n // coordinates\r\n\r\n var off = viewer.model.getData().globalOffset;\r\n\r\n // Make sure our up vector is correct for this model\r\n var camera = viewer.autocamCamera;\r\n camera.up = new THREE.Vector3(0, 0, 1);\r\n\r\n // This performs a smooth view transition (we might also use\r\n // setView() to get there more directly)\r\n viewer.navigation.setRequestTransitionWithUp(\r\n true, new THREE.Vector3(px - off.x, py - off.y, pz - off.z),\r\n new THREE.Vector3(tx - off.x, ty - off.y, tz - off.z),\r\n camera.fov, camera.up\r\n );\r\n}", "title": "" } ]
89c1954c8e94bc1a159078d196077029
Decode hex string to binary string
[ { "docid": "7a4264ed7808a1c6df42bc9efdde0627", "score": "0.0", "text": "function hexToString(hex) {\n var i, bytes = [];\n\n for (i = 0; i < hex.length - 1; i += 2)\n bytes.push(parseInt(hex.substr(i, 2), 16));\n\n return String.fromCharCode.apply(String, bytes);\n}", "title": "" } ]
[ { "docid": "26490a200eada97d1db28856731e1bb1", "score": "0.69831", "text": "function hex2bytes(s){ return Crypto.util.hexToBytes(s); }", "title": "" }, { "docid": "e29db7a3b796a04bda0d736af181165e", "score": "0.69197154", "text": "function hexString2bin (str) {\n let result = '';\n str.split(' ').forEach(str => {\n result += hex2bin(str);\n });\n return result;\n}", "title": "" }, { "docid": "99f014042c3152390530f3a7cff131cc", "score": "0.6829835", "text": "function hexToBinaryHwAddr(s)\n{\n // Get an array of strings by splitting at every 2 characters, and\n // then parse each pair of hex characters into an integer. Finally\n // combine those 8-bit numbers back into a string, assuming each\n // 8-bit number is the byte value\n return Buffer.from(s.split(\":\").map(v => parseInt(v, 16)));\n}", "title": "" }, { "docid": "b073eb43aede976f25063d85cbfa3c23", "score": "0.651259", "text": "function frombinary(binarystring) {\r\n\tvar letters = [];\r\n\tvar purebinary = binarystring.replace(spaceregex, '');\r\n\tvar lettercount = Math.floor(purebinary.length / 8);\r\n\tfor (var l = 0; l < lettercount; l++) {\r\n\t\tletters.push(parseInt(purebinary.substr(l << 3, 8), 2));\r\n\t}\r\n\treturn String.fromCharCode.apply(String, letters);\r\n}", "title": "" }, { "docid": "c789aee865a550a9f4ed1f805f213e00", "score": "0.65027803", "text": "function getBinaryFromHex(hex) {\n let output = '';\n for (const c of hex) {\n output += parseInt(c, 16).toString(2).padStart(4, '0');\n }\n return output;\n }", "title": "" }, { "docid": "08beef3ccdc7946076f054afe19271b9", "score": "0.65018785", "text": "function frombinary(binarystring) {\n\tvar letters = [];\n\tvar lettercount = Math.floor(binarystring.length / 8);\n\tfor (var l = 0; l < lettercount; l++) {\n\t\tletters.push(parseInt(binarystring.substr(l << 3, 8), 2));\n\t}\n\treturn String.fromCharCode.apply(String, letters);\n}", "title": "" }, { "docid": "5ec06eabbb483aadd423240ccd718e70", "score": "0.64965194", "text": "function decodeHexString(hex) {\n var bytes = [];\n for (var i = 0; i < hex.length - 1; i += 2) {\n bytes.push(parseInt(hex.substr(i, 2), 16));\n }\n return Buffer.from(bytes);\n}", "title": "" }, { "docid": "f4548830386e3a59f65ba1869b9a59cf", "score": "0.6456631", "text": "function hexToBin(str, buf, offset) {\n\n //TODO: Add utility function that goes directly from packed to bin,\n //instead of unopack, then convert to bin\n var s = str.length === 10 ? unpackHexString(str) : str;\n\n var j = offset;\n for (var _i = 0; _i < s.length; _i += 2) {\n var d1 = hexToDec(s.charCodeAt(_i));\n var d2 = hexToDec(s.charCodeAt(_i + 1));\n buf[j++] = d1 << 4 | d2;\n }\n}", "title": "" }, { "docid": "32466945139792f0a3dcc5ea940feeb8", "score": "0.64453685", "text": "function hexToBinary( hex )\n{\n\tlet result = \"\";\n\n\t// Split by each hex character\n\thex.split( \"\" ).forEach( str =>\n\t{\n\t\t// Parse the character into an integer.\n\t\t// Convert the integer into a binary string representation.\n\t\t// Pad with leading zeros for four bits (each hex character is a nibble).\n\t\tresult += ( parseInt( str, 16 ).toString( 2 ) ).padStart( 4, '0' );\n\t} );\n\n\treturn result;\n}", "title": "" }, { "docid": "518b7201b9aa59ad96523f2ea5cd0494", "score": "0.6429987", "text": "function hex2bin(str) {\n\t\tvar bin = \"\",\n\t\t\tnum,\n\t\t\ti\n\n\t\t// Iterate over the string in reverse order.\n\t\tfor (i = str.length - 1; i >= 0; i--) {\n\t\t\t// Convert the current character to a hex number.\n\t\t\tnum = parseInt(str[i], 16)\n\n\t\t\t// If the value is an invalid number, throw error.\n\t\t\tif (isNaN(num)) {\n\t\t\t\tthrow new Error(\"Invalid hex character.\")\n\t\t\t}\n\n\t\t\t// Convert the number to binary and to make it four bits long.\n\t\t\t// Then, add the new string to the front of the binary representation.\n\t\t\tbin = padLeft(num.toString(2), 4) + bin \t\t\n\t\t}\n\n\t\treturn bin\n\t}", "title": "" }, { "docid": "ca6ab701ce51931a7ea1d518facaa2b9", "score": "0.64059454", "text": "function completeBinary(str) {\n\tlet a = str;\n\twhile (a.length % 8 !== 0) {\n\t\ta = \"0\" + a;\n\t}\n\treturn a;\n}", "title": "" }, { "docid": "713b79b9b94c57dcf94fd7ba62eb481f", "score": "0.6293511", "text": "unpack(str) {\n var bytes = [];\n for(var i = 0; i < str.length; i++) {\n var char = str.charCodeAt(i);\n bytes.push(char >>> 8);\n bytes.push(char & 0xFF);\n }\n return bytes;\n }", "title": "" }, { "docid": "34b6511a09e5648acd35b97377604fcb", "score": "0.62855184", "text": "function hexStringToByte(str) {\n if (!str) {\n return new Uint8Array();\n }\n \n var a = [];\n for (var i = 0, len = str.length; i < len; i += 2) {\n a.push(parseInt(str.substr(i, 2), 16));\n }\n \n return new Uint8Array(a);\n }", "title": "" }, { "docid": "65dc43e9d100c5047c21ebf3f19b36c8", "score": "0.6277214", "text": "function unhexlify(hexstr) {\r\n if (hexstr.length % 2 == 1)\r\n throw new TypeError(\"Invalid hex string\");\r\n\r\n var bytes = new Uint8Array(hexstr.length / 2);\r\n for (var i = 0; i < hexstr.length; i += 2)\r\n bytes[i/2] = parseInt(hexstr.substr(i, 2), 16);\r\n\r\n return bytes;\r\n}", "title": "" }, { "docid": "bef24e7a0666feebeb2d465d6c40e149", "score": "0.626353", "text": "function hex2base64(s){ return Crypto.util.bytesToBase64(hex2bytes(s)) }", "title": "" }, { "docid": "a7a35ccc1c218bdadf35983b770d8a88", "score": "0.6257744", "text": "function base32hex_decode(str) {\n var strUp = str.toUpperCase()\n var utf8str = base32_decode_data(strUp, strUp.length, b32h)\n return decodeURIComponent(escape(utf8str))\n}", "title": "" }, { "docid": "b50bba7a559259fe618510902c39b573", "score": "0.62499577", "text": "function binaryToString(str) {\n // Removes the spaces from the binary string\n str = str.replace(/\\s+/g, '');\n // Pretty (correct) print binary (add a space every 8 characters)\n str = str.match(/.{1,8}/g).join(\" \");\n\n let newBinary = str.split(\" \");\n let binaryCode = [];\n\n for (let i = 0; i < newBinary.length; i++) {\n binaryCode.push(String.fromCharCode(parseInt(newBinary[i], 2)));\n }\n\n return binaryCode.join(\"\");\n}", "title": "" }, { "docid": "3f178f8bd15f6c57c5fe01d153c7758a", "score": "0.62332654", "text": "function fromHex(encoded) {\n if (encoded.length % 2 !== 0) {\n throw new Error(\"Hex encoded strings must have an even number length\");\n }\n var out = new Uint8Array(encoded.length / 2);\n for (var i = 0; i < encoded.length; i += 2) {\n var encodedByte = encoded.substr(i, 2).toLowerCase();\n if (encodedByte in HEX_TO_SHORT) {\n out[i / 2] = HEX_TO_SHORT[encodedByte];\n }\n else {\n throw new Error(\"Cannot decode unrecognized sequence \" + encodedByte + \" as hexadecimal\");\n }\n }\n return out;\n}", "title": "" }, { "docid": "3f178f8bd15f6c57c5fe01d153c7758a", "score": "0.62332654", "text": "function fromHex(encoded) {\n if (encoded.length % 2 !== 0) {\n throw new Error(\"Hex encoded strings must have an even number length\");\n }\n var out = new Uint8Array(encoded.length / 2);\n for (var i = 0; i < encoded.length; i += 2) {\n var encodedByte = encoded.substr(i, 2).toLowerCase();\n if (encodedByte in HEX_TO_SHORT) {\n out[i / 2] = HEX_TO_SHORT[encodedByte];\n }\n else {\n throw new Error(\"Cannot decode unrecognized sequence \" + encodedByte + \" as hexadecimal\");\n }\n }\n return out;\n}", "title": "" }, { "docid": "3f178f8bd15f6c57c5fe01d153c7758a", "score": "0.62332654", "text": "function fromHex(encoded) {\n if (encoded.length % 2 !== 0) {\n throw new Error(\"Hex encoded strings must have an even number length\");\n }\n var out = new Uint8Array(encoded.length / 2);\n for (var i = 0; i < encoded.length; i += 2) {\n var encodedByte = encoded.substr(i, 2).toLowerCase();\n if (encodedByte in HEX_TO_SHORT) {\n out[i / 2] = HEX_TO_SHORT[encodedByte];\n }\n else {\n throw new Error(\"Cannot decode unrecognized sequence \" + encodedByte + \" as hexadecimal\");\n }\n }\n return out;\n}", "title": "" }, { "docid": "976a4cd0d4729459a047c2449aaa954a", "score": "0.6212565", "text": "function binary2string(binary) {\n let val = \"\"\n for (let i = 0; i < binary.length / 8; i++) {\n val += String.fromCharCode(parseInt(binary.substring(8 * i, 8 * i + 8), 2))\n }\n console.log('2进制转字符串:' + hex + '->' + val)\n return val\n}", "title": "" }, { "docid": "607b75b58990f39df0b2693d5c7e2ab3", "score": "0.6211221", "text": "function hexToString(str) {\n var msg = Buffer.from(str, 'hex');\n return msg.toString('utf8');\n}", "title": "" }, { "docid": "7462d6defc43974740a0c1160da058e7", "score": "0.62078106", "text": "function ParseHex(str) {\n var result = [];\n while (str.length >= 2) {\n result.push(parseInt(str.substring(0, 2), 16));\n str = str.substring(2, str.length);\n }\n var buf = new Buffer(result);\n return buf;\n}", "title": "" }, { "docid": "679e19db0b9e6263522762ed79190d88", "score": "0.6195809", "text": "static convertBinary2Hex(binaryString){\n let bin2hexTable = {\n '0000':'0', '0001':'1', '0010':'2', '0011':'3', '0100':'4',\n '0101':'5', '0110':'6', '0111':'7', '1000':'8', '1001':'9',\n '1010':'a', '1011':'b', '1100':'c', '1101':'d',\n '1110':'e', '1111':'f'\n };\n let hex = '';\n for(let i = 0; i < binaryString.length; i+=4){\n let nibble = binaryString.substr(i, 4);\n hex += bin2hexTable[nibble];\n }\n return hex;\n }", "title": "" }, { "docid": "7629b368855c98ef05629586735aa9ee", "score": "0.6175548", "text": "function string2binary(str) {\n let val = \"\"\n for (let i = 0; i < str.length; i++) {\n val += str.charCodeAt(i).toString(2)\n }\n console.log('[' + str + ']' + '转2进制串:' + val)\n return val\n}", "title": "" }, { "docid": "75a661e95e77b58969de286498b879de", "score": "0.61097497", "text": "function hex_str_to_byte_array(in_str) {\n var i\n var out = []\n var str = in_str.replace(/\\s|0x/g, \"\")\n for (i = 0; i < str.length; i += 2) {\n if (i + 1 > str.length) {\n out.push(get_dec_from_hexchar(str.charAt(i)) * 16)\n } else {\n out.push(\n get_dec_from_hexchar(str.charAt(i)) * 16 +\n get_dec_from_hexchar(str.charAt(i + 1))\n )\n }\n }\n return out\n }", "title": "" }, { "docid": "675ab33744600ee50648386baf9a6be6", "score": "0.61085564", "text": "function hex2bin (hex) {\n return ('00000000' + (parseInt(hex, 16)).toString(2)).substr(-8);\n}", "title": "" }, { "docid": "52da76ffeb810ca55e8255197a0077ed", "score": "0.6096633", "text": "function hextobin(hexstr) {\n buf = new Buffer(hexstr.length / 2);\n\n for(var i = 0; i < hexstr.length/2 ; i++)\n {\n buf[i] = (parseInt(hexstr[i * 2], 16) << 4) + (parseInt(hexstr[i * 2 + 1], 16));\n }\n\n return buf;\n }", "title": "" }, { "docid": "95141a345b5cf388b7def5b26a1470a6", "score": "0.60931015", "text": "function hexStrToBytes(str) {\n var result = [];\n while (str.length >= 2) { \n result.push(parseInt(str.substring(0, 2), 16));\n str = str.substring(2, str.length);\n }\n\n return result;\n }", "title": "" }, { "docid": "854eeafd1e44092c486518726a3d3f44", "score": "0.6092452", "text": "function decode(input, binary) {\r\n\t\tbinary = (binary != null) ? binary : false;\r\n\t\tvar output = \"\";\r\n\t\tvar chr1, chr2, chr3;\r\n\t\tvar enc1, enc2, enc3, enc4;\r\n\t\tvar i = 0;\r\n\r\n\t\tinput = input.replace(/[^A-Za-z0-9\\+\\/\\=]/g, \"\");\r\n\r\n\t\twhile (i < input.length) {\r\n\r\n\t\t\tenc1 = this._keyStr.indexOf(input.charAt(i++));\r\n\t\t\tenc2 = this._keyStr.indexOf(input.charAt(i++));\r\n\t\t\tenc3 = this._keyStr.indexOf(input.charAt(i++));\r\n\t\t\tenc4 = this._keyStr.indexOf(input.charAt(i++));\r\n\r\n\t\t\tchr1 = (enc1 << 2) | (enc2 >> 4);\r\n\t\t\tchr2 = ((enc2 & 15) << 4) | (enc3 >> 2);\r\n\t\t\tchr3 = ((enc3 & 3) << 6) | enc4;\r\n\r\n\t\t\toutput = output + String.fromCharCode(chr1);\r\n\r\n\t\t\tif (enc3 != 64) {\r\n\t\t\t\toutput = output + String.fromCharCode(chr2);\r\n\t\t\t}\r\n\t\t\tif (enc4 != 64) {\r\n\t\t\t\toutput = output + String.fromCharCode(chr3);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\tif (!binary) {\r\n\t\t\toutput = _utf8_decode(output);\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\r\n\t}", "title": "" }, { "docid": "3e7ebc301e00a74288f85aaaa0561651", "score": "0.6043319", "text": "function base642hex(s){ return bytes2hex(Crypto.util.base64ToBytes(s)) }", "title": "" }, { "docid": "f80c57227d42053d871c2c56f2c7c378", "score": "0.6036052", "text": "function unpackHexString(s) {\n var res = s.length === 10 ? tmpArr20 : [];\n\n for (var i = 0; i < s.length; i++) {\n var bytes = s.charCodeAt(i);\n res[2 * i] = TO_HEX[bytes & 0xff];\n res[2 * i + 1] = TO_HEX[bytes >> 8 & 0xff];\n }\n\n return res.join(\"\");\n}", "title": "" }, { "docid": "11dcb4330d452af670baf209df45da50", "score": "0.60236526", "text": "function hex2uint8(str)\n{\n var ret = new Uint8Array(str.length/2|0), code;\n for(var t=0;t<str.length;t+=2)\n {\n code = parseInt(str.substr(t, 2), 16);\n if (isNaN(code)) throw 'Not a hex string.';\n\n ret[t/2] = code;\n }\n return ret;\n}", "title": "" }, { "docid": "cd2e93d5acf3b115313be5a17cafb10c", "score": "0.6017619", "text": "function binaryAgent(str) {\n\n let binaryString = '';\n\n str.split(' ').map(binary => binaryString += String.fromCharCode(parseInt(binary, 2)));\n\n return binaryString;\n}", "title": "" }, { "docid": "f6a67f9ac6a323f6b92efab4d1afe83a", "score": "0.6001819", "text": "function text2Binary(string) {\n return string.split('').map(function(char) {\n return char.charCodeAt(0).toString(2);\n }).join(' ');\n}", "title": "" }, { "docid": "c255dd66797dd9defeadf971f6cd1332", "score": "0.5991038", "text": "function stringToBinary(str) {\n function zeroPad(num) {\n return \"00000000\".slice(String(num).length) + num;\n }\n\n return str.replace(/[\\s\\S]/g, str => zeroPad(str.charCodeAt().toString(2)));\n}", "title": "" }, { "docid": "2123ddf6b37d37adc2603e16fe907828", "score": "0.5986417", "text": "function Hex2Bin(n) { if (!checkHex(n)) return 0; var binstr = \"\"; for (var i = 0; i < n.length; i += 2) { binstr += parseInt(n[i] + n[i + 1], 16).toString(2); } return binstr; }", "title": "" }, { "docid": "aa667a768a5e1d61666955ed4bfdbadf", "score": "0.5985453", "text": "function getBinaryFromInputStr(inputStr) {\n const hex = getKnotHash(inputStr);\n return getBinaryFromHex(hex);\n }", "title": "" }, { "docid": "db3f44a351fa231327882c4b4f2e5bc3", "score": "0.5969814", "text": "function byteStringToDecString(str) {\r\n var decimal = '';\r\n var toThePower = '1';\r\n for (var i = str.length - 1; i >= 0; i--) {\r\n decimal = addBigInt(decimal, numberTimesBigInt(byteAt(str, i), toThePower));\r\n toThePower = numberTimesBigInt(256, toThePower);\r\n }\r\n return decimal.split('').reverse().join('');\r\n }", "title": "" }, { "docid": "5605fae0f23786df6d564f4113be64f3", "score": "0.5967544", "text": "function fromHex(hex, binary, offset) {\n var length = hex.length / 2;\n if (offset === undefined) {\n offset = 0;\n if (binary === undefined) binary = create(length);\n }\n var j = 0;\n for (var i = 0; i < length; i++) {\n binary[offset + i] = (codeToNibble(hex.charCodeAt(j++)) << 4)\n | codeToNibble(hex.charCodeAt(j++));\n }\n return binary;\n}", "title": "" }, { "docid": "9604e62ea9adf2be1fbe72ef21e46ab3", "score": "0.5965368", "text": "function BinaryConverter(str) { \n return parseInt(str, 2);\n}", "title": "" }, { "docid": "e3329cf5be9a2f223cfacd139951b203", "score": "0.5965359", "text": "function decode(string) {\n\t var buffer = new Buffer(base58.decode(string))\n\n\t var payload = buffer.slice(0, -4)\n\t var checksum = buffer.slice(-4)\n\t var newChecksum = sha256x2(payload).slice(0, 4)\n\n\t assert.deepEqual(newChecksum, checksum, 'Invalid checksum')\n\n\t return payload\n\t}", "title": "" }, { "docid": "ffd15adcf8e70b1a53b0b0ac4e221287", "score": "0.59620327", "text": "function convertBinToHex(binary){\n\tvar result = \"\";\n\tvar binaryString = binary;\n\n\twhile(binaryString.length != 0){\n\t\t// convert binary to hexadecimal four digits at a time, from the left\n\t\tlastFour = binaryString.substr(-4);\n\t\tbinaryString = binaryString.slice(0,-4);\n\n\t\tlastFour = zeroPad(lastFour, 4);\n\t\tlastFour = convertBinToDec(lastFour);\t// convert to decimal\n\t\tlastFour = decToHex(lastFour);\t\t\t// convert to hexadecimal\n\n\t\tresult = lastFour + result;\t\t\t\t// add to output\n\t}\n\treturn result;\n}", "title": "" }, { "docid": "88ad2c43422b469d6085779855964acd", "score": "0.5960171", "text": "function parseBinary(str) {\n\t// SPEED IMPROVEMENT: Although it is cleaner to parse \n\t// the encoding this way, it might've been faster to\n\t// implement a parser like this:\n\t//\n\t// return parseInt(str.replace(/[BR]/g, \"1\").replace(/[LF]/g, \"0\"), 2)\n\tlet x = 0;\n\tfor (var i=0; i<str.length; i++) {\n\t\tswitch (str[i]) {\n\t\t\tcase \"B\":\n\t\t\tcase \"R\":\n\t\t\t\tx |= 1;\n\t\t\t\tbreak;\n\t\t}\n\t\tx <<= 1;\n\t}\n\treturn x >> 1;\n}", "title": "" }, { "docid": "aa26a6edc3aa704e87203fe9ceb92e5c", "score": "0.5956598", "text": "function _hexDecode(data) {\n var j\n , hexes = data.match(/.{1,4}/g) || []\n , back = \"\"\n ;\n\n for (j = 0; j < hexes.length; j++) {\n back += String.fromCharCode(parseInt(hexes[j], 16));\n }\n\n return back;\n }", "title": "" }, { "docid": "c4141386592e9b445bdd95093499a75f", "score": "0.5954141", "text": "parseStringToBinary(string) {\n\t\tconst ss = string.split(\"\");\n\t\tconst a = [\"\"];\n\n\t\tss.forEach(l => {\n\t\t\tswitch (l) {\n\t\t\t\tcase \"a\":\n\t\t\t\t\ta.push(\"01100001\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"b\":\n\t\t\t\t\ta.push(\"01100010\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"c\":\n\t\t\t\t\ta.push(\"01100011\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"d\":\n\t\t\t\t\ta.push(\"01100100\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"e\":\n\t\t\t\t\ta.push(\"01100101\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"f\":\n\t\t\t\t\ta.push(\"01100110\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"g\":\n\t\t\t\t\ta.push(\"01100111\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"h\":\n\t\t\t\t\ta.push(\"01101000\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"i\":\n\t\t\t\t\ta.push(\"01101001\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"j\":\n\t\t\t\t\ta.push(\"01101010\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"k\":\n\t\t\t\t\ta.push(\"01101011\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"l\":\n\t\t\t\t\ta.push(\"01101100\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"m\":\n\t\t\t\t\ta.push(\"01101101\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"n\":\n\t\t\t\t\ta.push(\"01101110\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"o\":\n\t\t\t\t\ta.push(\"01101111\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"p\":\n\t\t\t\t\ta.push(\"01110000\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"q\":\n\t\t\t\t\ta.push(\"01110001\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"r\":\n\t\t\t\t\ta.push(\"01110010\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"s\":\n\t\t\t\t\ta.push(\"01110011\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"t\":\n\t\t\t\t\ta.push(\"01110100\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"u\":\n\t\t\t\t\ta.push(\"01110101\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"v\":\n\t\t\t\t\ta.push(\"01110110\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"w\":\n\t\t\t\t\ta.push(\"01110111\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"x\":\n\t\t\t\t\ta.push(\"01111000\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"y\":\n\t\t\t\t\ta.push(\"01111001\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"z\":\n\t\t\t\t\ta.push(\"01111010\");\n\t\t\t\t\tbreak;\n\t\t\t\t///////////////\n\t\t\t\tcase \"A\":\n\t\t\t\t\ta.push(\"01000001\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"B\":\n\t\t\t\t\ta.push(\"01000010\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"C\":\n\t\t\t\t\ta.push(\"01000011\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"D\":\n\t\t\t\t\ta.push(\"01000100\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"E\":\n\t\t\t\t\ta.push(\"01000101\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"F\":\n\t\t\t\t\ta.push(\"01000110\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"G\":\n\t\t\t\t\ta.push(\"01000111\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"H\":\n\t\t\t\t\ta.push(\"01001000\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"I\":\n\t\t\t\t\ta.push(\"01001001\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"J\":\n\t\t\t\t\ta.push(\"01001010\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"K\":\n\t\t\t\t\ta.push(\"01001011\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"L\":\n\t\t\t\t\ta.push(\"01001100\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"M\":\n\t\t\t\t\ta.push(\"01001101\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"N\":\n\t\t\t\t\ta.push(\"01001110\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"O\":\n\t\t\t\t\ta.push(\"01001111\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"P\":\n\t\t\t\t\ta.push(\"01010000\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"Q\":\n\t\t\t\t\ta.push(\"01010001\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"R\":\n\t\t\t\t\ta.push(\"01010010\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"S\":\n\t\t\t\t\ta.push(\"01010011\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"T\":\n\t\t\t\t\ta.push(\"01010100\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"U\":\n\t\t\t\t\ta.push(\"01010101\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"V\":\n\t\t\t\t\ta.push(\"01010110\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"W\":\n\t\t\t\t\ta.push(\"01010111\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"X\":\n\t\t\t\t\ta.push(\"01011000\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"Y\":\n\t\t\t\t\ta.push(\"01011001\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"Z\":\n\t\t\t\t\ta.push(\"01011010\");\n\t\t\t\t\tbreak;\n\t\t\t\t///////////////\n\t\t\t\tcase \"0\":\n\t\t\t\t\ta.push(\"00110000\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"1\":\n\t\t\t\t\ta.push(\"00110001\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"2\":\n\t\t\t\t\ta.push(\"00110010\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"3\":\n\t\t\t\t\ta.push(\"00110011\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"4\":\n\t\t\t\t\ta.push(\"00110100\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"5\":\n\t\t\t\t\ta.push(\"00110101\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"6\":\n\t\t\t\t\ta.push(\"00110110\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"7\":\n\t\t\t\t\ta.push(\"00110111\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"8\":\n\t\t\t\t\ta.push(\"00111000\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"9\":\n\t\t\t\t\ta.push(\"00111001\");\n\t\t\t\t\tbreak;\n\t\t\t\t///////////////\n\t\t\t\tcase \"`\":\n\t\t\t\t\ta.push(\"01100000\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"~\":\n\t\t\t\t\ta.push(\"01111110\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"!\":\n\t\t\t\t\ta.push(\"00100001\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"@\":\n\t\t\t\t\ta.push(\"01000000\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"#\":\n\t\t\t\t\ta.push(\"00100011\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"$\":\n\t\t\t\t\ta.push(\"00100100\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"%\":\n\t\t\t\t\ta.push(\"00100101\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"^\":\n\t\t\t\t\ta.push(\"01011110\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"&\":\n\t\t\t\t\ta.push(\"00100110\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"*\":\n\t\t\t\t\ta.push(\"00101010\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"(\":\n\t\t\t\t\ta.push(\"00101000\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \")\":\n\t\t\t\t\ta.push(\"00101001\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"-\":\n\t\t\t\t\ta.push(\"00101101\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"_\":\n\t\t\t\t\ta.push(\"01011111\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"=\":\n\t\t\t\t\ta.push(\"00111101\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"+\":\n\t\t\t\t\ta.push(\"00101011\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"[\":\n\t\t\t\t\ta.push(\"01011011\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"{\":\n\t\t\t\t\ta.push(\"01111011\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"]\":\n\t\t\t\t\ta.push(\"01011101\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"}\":\n\t\t\t\t\ta.push(\"01111101\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \";\":\n\t\t\t\t\ta.push(\"00111011\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \":\":\n\t\t\t\t\ta.push(\"00111010\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"'\":\n\t\t\t\t\ta.push(\"00100111\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase '\"':\n\t\t\t\t\ta.push(\"00100010\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"\\\\\":\n\t\t\t\t\ta.push(\"01011100\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"|\":\n\t\t\t\t\ta.push(\"01111100\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \",\":\n\t\t\t\t\ta.push(\"00101100\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"<\":\n\t\t\t\t\ta.push(\"00111100\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \".\":\n\t\t\t\t\ta.push(\"00101110\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \">\":\n\t\t\t\t\ta.push(\"00111110\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"/\":\n\t\t\t\t\ta.push(\"00101111\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"?\":\n\t\t\t\t\ta.push(\"00111111\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \" \":\n\t\t\t\t\ta.push(\"00100000\");\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new Error(`BINERROR -> Invalid character -> '${l}'`);\n\t\t\t};\n\t\t});\n\t\ta.shift();\n\t\treturn a.join(\" \");\n\t}", "title": "" }, { "docid": "9c60bf865df355c0559138211849aee8", "score": "0.5952135", "text": "function hexStr2byteArray(str) {\n var byteArray = Array();\n var d = 0;\n var i = 0;\n var j = 0;\n var k = 0;\n\n for (i = 0; i < str.length; i++) {\n var c = str.charAt(i);\n if (isHexChar(c)) {\n d <<= 4;\n d += hexChar2byte(c);\n j++;\n if (0 == (j % 2)) {\n byteArray[k++] = d;\n d = 0;\n }\n }\n }\n return byteArray;\n }", "title": "" }, { "docid": "c137528e57d2b32291369104857f96a6", "score": "0.5946099", "text": "function decode(str) {\n var num = BigInteger.valueOf(0)\n\n var leading_zero = 0\n var seen_other = false\n\n for (var i=0; i<str.length; ++i) {\n var chr = str[i]\n var bi = alphabetMap[chr]\n\n // if we encounter an invalid character, decoding fails\n if (bi === undefined) {\n throw new Error('invalid base58 string: ' + str)\n }\n\n num = num.multiply(base).add(bi)\n\n if (chr === '1' && !seen_other) {\n ++leading_zero\n } else {\n seen_other = true\n }\n }\n\n var bytes = num.toByteArrayUnsigned()\n\n // remove leading zeros\n while (leading_zero-- > 0) {\n bytes.unshift(0)\n }\n\n return new Buffer(bytes)\n}", "title": "" }, { "docid": "feeb490df5ec37042b419bc5aab3847f", "score": "0.59276533", "text": "function hexStr2byteArray(str) {\n var a = [];\n for(var i = 0; i < str.length; i += 2) {\n a.push(parseInt(\"0x\" + str.substr(i, 2),16));\n }\n return a;\n}", "title": "" }, { "docid": "7944789b256a223c7721d52824d95b2b", "score": "0.59224236", "text": "function HEXtoBIN(input){\n\t\tvar cap_length = input.split('').length*4; var result = [];\n\t\tvar HEXarray = input.split('');\n\n\t\tvar temp = [];\n\t\tfor(var a = 0; a < HEXarray.length; a++){\n\t\t\ttemp = (parseInt(HEXarray[a],16) >> 0).toString(2).split('');\n\t\t\twhile(temp.length < 4){temp.unshift(\"0\");}\n\t\t\tfor(var b = 0; b < 4; b++){result.push(temp[b]);}\n\t\t}\n\n\t\treturn result.join('');\n\t}", "title": "" }, { "docid": "34f88ec5c3143f3e7f1bb62f42012bac", "score": "0.59114176", "text": "function decodeUTF8(aBinary)\n {\n var result,\n plainStart,\n i,\n found,\n charCode;\n trace(\"decodeUTF8\", arguments);\n REGEXP_UTF8.lastIndex = 0;\n found = aBinary.search(REGEXP_UTF8);\n if (found < 0) {\n return aBinary;\n }\n result = \"\";\n plainStart = 0;\n i = 0;\n for (; found >= 0; found = aBinary.substr(i).search(REGEXP_UTF8)) {\n result += aBinary.substr(plainStart, found);\n i += found;\n charCode = aBinary.charCodeAt(i);\n if ((charCode >= 0xC0) && (charCode < 0xE0)) {\n charCode = ((charCode & 0x1f) << 6) | (aBinary.charCodeAt(i + 1) & 0x3f);\n i += 2;\n } else if (charCode < 0xF0) {\n charCode = ((charCode & 0x0f) << 12) |\n ((aBinary.charCodeAt(i + 1) & 0x3f) << 6) |\n (aBinary.charCodeAt(i + 2) & 0x3f);\n i += 3;\n } else if (charCode < 0xF8) {\n charCode = ((charCode & 0x07) << 18) |\n ((aBinary.charCodeAt(i + 1) & 0x3f) << 12) |\n ((aBinary.charCodeAt(i + 2) & 0x3f) << 6) |\n (aBinary.charCodeAt(i + 3) & 0x3f);\n i += 4;\n } else {\n throw new HttpError(\"Invalid UTF-8 sequence\");\n }\n if (charCode < 0x10000) {\n result += String.fromCharCode(charCode);\n } else {\n // use surrogate pairs to represent high code points\n result += String.fromCharCode((charCode >> 10) | 0xD800) +\n String.fromCharCode((charCode & 0x3FF) | 0xDC00);\n }\n plainStart = i;\n }\n result += aBinary.substring(plainStart);\n return result;\n }", "title": "" }, { "docid": "3681350f40dd305d46aba67b5d631e19", "score": "0.58995545", "text": "function asciiDecode(asciiBinary) {\n var result = '';\n var i=0;\n while(i < asciiBinary.length){\n var block = asciiBinary.substring(i, i+=8);\n console.log(String.fromCharCode(parseInt(block,2)), parseInt(block,2));\n result += String.fromCharCode(parseInt(block,2));\n }\n console.log(result);\n return result;\n}", "title": "" }, { "docid": "e97f444f19518bd9570c3b919eda9822", "score": "0.58987087", "text": "function strToBin(str) {\n return Uint8Array.from(atob(str), c => c.charCodeAt(0));\n}", "title": "" }, { "docid": "e1752895976e470f9e1c5090f57e5d06", "score": "0.58846277", "text": "function decodeString(value) {\n return Buffer.from(value, \"base64\");\n}", "title": "" }, { "docid": "cbbe77c00b86d95de687c2d874e81cf4", "score": "0.5878899", "text": "function hexdec(hex) {\n return hex.toLowerCase().split('').reduce( (result, ch) =>\n result * 16 + '0123456789abcdefgh'.indexOf(ch), 0);\n}", "title": "" }, { "docid": "4c9d2c497ddfbb3561c7d727e2cfb1e2", "score": "0.58774984", "text": "function byteStringToDecString(str) {\n var decimal = '';\n var toThePower = '1';\n for (var i = str.length - 1; i >= 0; i--) {\n decimal = addBigInt(decimal, numberTimesBigInt(byteAt(str, i), toThePower));\n toThePower = numberTimesBigInt(256, toThePower);\n }\n return decimal.split('').reverse().join('');\n}", "title": "" }, { "docid": "4c9d2c497ddfbb3561c7d727e2cfb1e2", "score": "0.58774984", "text": "function byteStringToDecString(str) {\n var decimal = '';\n var toThePower = '1';\n for (var i = str.length - 1; i >= 0; i--) {\n decimal = addBigInt(decimal, numberTimesBigInt(byteAt(str, i), toThePower));\n toThePower = numberTimesBigInt(256, toThePower);\n }\n return decimal.split('').reverse().join('');\n}", "title": "" }, { "docid": "4c9d2c497ddfbb3561c7d727e2cfb1e2", "score": "0.58774984", "text": "function byteStringToDecString(str) {\n var decimal = '';\n var toThePower = '1';\n for (var i = str.length - 1; i >= 0; i--) {\n decimal = addBigInt(decimal, numberTimesBigInt(byteAt(str, i), toThePower));\n toThePower = numberTimesBigInt(256, toThePower);\n }\n return decimal.split('').reverse().join('');\n}", "title": "" }, { "docid": "4c9d2c497ddfbb3561c7d727e2cfb1e2", "score": "0.58774984", "text": "function byteStringToDecString(str) {\n var decimal = '';\n var toThePower = '1';\n for (var i = str.length - 1; i >= 0; i--) {\n decimal = addBigInt(decimal, numberTimesBigInt(byteAt(str, i), toThePower));\n toThePower = numberTimesBigInt(256, toThePower);\n }\n return decimal.split('').reverse().join('');\n}", "title": "" }, { "docid": "4c9d2c497ddfbb3561c7d727e2cfb1e2", "score": "0.58774984", "text": "function byteStringToDecString(str) {\n var decimal = '';\n var toThePower = '1';\n for (var i = str.length - 1; i >= 0; i--) {\n decimal = addBigInt(decimal, numberTimesBigInt(byteAt(str, i), toThePower));\n toThePower = numberTimesBigInt(256, toThePower);\n }\n return decimal.split('').reverse().join('');\n}", "title": "" }, { "docid": "4c9d2c497ddfbb3561c7d727e2cfb1e2", "score": "0.58774984", "text": "function byteStringToDecString(str) {\n var decimal = '';\n var toThePower = '1';\n for (var i = str.length - 1; i >= 0; i--) {\n decimal = addBigInt(decimal, numberTimesBigInt(byteAt(str, i), toThePower));\n toThePower = numberTimesBigInt(256, toThePower);\n }\n return decimal.split('').reverse().join('');\n}", "title": "" }, { "docid": "4c9d2c497ddfbb3561c7d727e2cfb1e2", "score": "0.58774984", "text": "function byteStringToDecString(str) {\n var decimal = '';\n var toThePower = '1';\n for (var i = str.length - 1; i >= 0; i--) {\n decimal = addBigInt(decimal, numberTimesBigInt(byteAt(str, i), toThePower));\n toThePower = numberTimesBigInt(256, toThePower);\n }\n return decimal.split('').reverse().join('');\n}", "title": "" }, { "docid": "4c9d2c497ddfbb3561c7d727e2cfb1e2", "score": "0.58774984", "text": "function byteStringToDecString(str) {\n var decimal = '';\n var toThePower = '1';\n for (var i = str.length - 1; i >= 0; i--) {\n decimal = addBigInt(decimal, numberTimesBigInt(byteAt(str, i), toThePower));\n toThePower = numberTimesBigInt(256, toThePower);\n }\n return decimal.split('').reverse().join('');\n}", "title": "" }, { "docid": "4c9d2c497ddfbb3561c7d727e2cfb1e2", "score": "0.58774984", "text": "function byteStringToDecString(str) {\n var decimal = '';\n var toThePower = '1';\n for (var i = str.length - 1; i >= 0; i--) {\n decimal = addBigInt(decimal, numberTimesBigInt(byteAt(str, i), toThePower));\n toThePower = numberTimesBigInt(256, toThePower);\n }\n return decimal.split('').reverse().join('');\n}", "title": "" }, { "docid": "4e4be58cbad9c300f6086242e574c0ae", "score": "0.5865528", "text": "function decode(input) {\n return atob(input);\n}", "title": "" }, { "docid": "452f7f5b4d798887788f9c1c65391aca", "score": "0.5860464", "text": "parseBinaryFromString(string) {\n\t\tconst cs = string.split(\" \");\n\t\tvar a = [\"\"];\n\n\t\tcs.forEach(num => {\n\t\t\tswitch (num) {\n\t\t\t\tcase \"01100001\":\n\t\t\t\t\ta.push(\"a\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"01100010\":\n\t\t\t\t\ta.push(\"b\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"01100011\":\n\t\t\t\t\ta.push(\"c\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"01100100\":\n\t\t\t\t\ta.push(\"d\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"01100101\":\n\t\t\t\t\ta.push(\"e\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"01100110\":\n\t\t\t\t\ta.push(\"f\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"01100111\":\n\t\t\t\t\ta.push(\"g\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"01101000\":\n\t\t\t\t\ta.push(\"h\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"01101001\":\n\t\t\t\t\ta.push(\"i\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"01101010\":\n\t\t\t\t\ta.push(\"j\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"01101011\":\n\t\t\t\t\ta.push(\"k\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"01101100\":\n\t\t\t\t\ta.push(\"l\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"01101101\":\n\t\t\t\t\ta.push(\"m\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"01101110\":\n\t\t\t\t\ta.push(\"n\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"01101111\":\n\t\t\t\t\ta.push(\"o\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"01110000\":\n\t\t\t\t\ta.push(\"p\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"01110001\":\n\t\t\t\t\ta.push(\"q\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"01110010\":\n\t\t\t\t\ta.push(\"r\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"01110011\":\n\t\t\t\t\ta.push(\"s\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"01110100\":\n\t\t\t\t\ta.push(\"t\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"01110101\":\n\t\t\t\t\ta.push(\"u\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"01110110\":\n\t\t\t\t\ta.push(\"v\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"01110111\":\n\t\t\t\t\ta.push(\"w\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"01111000\":\n\t\t\t\t\ta.push(\"x\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"01111001\":\n\t\t\t\t\ta.push(\"y\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"01111010\":\n\t\t\t\t\ta.push(\"z\");\n\t\t\t\t\tbreak;\n\t\t\t\t////////////////\n\t\t\t\tcase \"01000001\":\n\t\t\t\t\ta.push(\"A\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"01000010\":\n\t\t\t\t\ta.push(\"B\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"01000011\":\n\t\t\t\t\ta.push(\"C\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"01000100\":\n\t\t\t\t\ta.push(\"D\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"01000101\":\n\t\t\t\t\ta.push(\"E\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"01000110\":\n\t\t\t\t\ta.push(\"F\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"01000111\":\n\t\t\t\t\ta.push(\"G\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"01001000\":\n\t\t\t\t\ta.push(\"H\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"01001001\":\n\t\t\t\t\ta.push(\"I\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"01001010\":\n\t\t\t\t\ta.push(\"J\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"01001011\":\n\t\t\t\t\ta.push(\"K\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"01001100\":\n\t\t\t\t\ta.push(\"L\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"01001101\":\n\t\t\t\t\ta.push(\"M\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"01001110\":\n\t\t\t\t\ta.push(\"N\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"01001111\":\n\t\t\t\t\ta.push(\"O\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"01010000\":\n\t\t\t\t\ta.push(\"P\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"01010001\":\n\t\t\t\t\ta.push(\"Q\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"01010010\":\n\t\t\t\t\ta.push(\"R\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"01010011\":\n\t\t\t\t\ta.push(\"S\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"01010100\":\n\t\t\t\t\ta.push(\"T\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"01010101\":\n\t\t\t\t\ta.push(\"U\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"01010110\":\n\t\t\t\t\ta.push(\"V\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"01010111\":\n\t\t\t\t\ta.push(\"W\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"01011000\":\n\t\t\t\t\ta.push(\"X\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"01011001\":\n\t\t\t\t\ta.push(\"Y\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"01011010\":\n\t\t\t\t\ta.push(\"Z\");\n\t\t\t\t\tbreak;\n\t\t\t\t////////////////\n\t\t\t\tcase \"00110000\":\n\t\t\t\t\ta.push(\"0\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"00110001\":\n\t\t\t\t\ta.push(\"1\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"00110010\":\n\t\t\t\t\ta.push(\"2\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"00110011\":\n\t\t\t\t\ta.push(\"3\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"00110100\":\n\t\t\t\t\ta.push(\"4\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"00110101\":\n\t\t\t\t\ta.push(\"5\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"00110110\":\n\t\t\t\t\ta.push(\"6\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"00110111\":\n\t\t\t\t\ta.push(\"7\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"00111000\":\n\t\t\t\t\ta.push(\"8\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"00111001\":\n\t\t\t\t\ta.push(\"9\");\n\t\t\t\t\tbreak;\n\t\t\t\t////////////////\n\t\t\t\tcase \"01100000\":\n\t\t\t\t\ta.push(\"`\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"01111110\":\n\t\t\t\t\ta.push(\"~\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"00100001\":\n\t\t\t\t\ta.push(\"!\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"01000000\":\n\t\t\t\t\ta.push(\"@\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"00100011\":\n\t\t\t\t\ta.push(\"#\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"00100100\":\n\t\t\t\t\ta.push(\"$\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"00100101\":\n\t\t\t\t\ta.push(\"%\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"01011110\":\n\t\t\t\t\ta.push(\"^\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"00100110\":\n\t\t\t\t\ta.push(\"&\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"00101010\":\n\t\t\t\t\ta.push(\"*\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"00101000\":\n\t\t\t\t\ta.push(\"(\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"00101001\":\n\t\t\t\t\ta.push(\")\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"00101101\":\n\t\t\t\t\ta.push(\"-\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"01011111\":\n\t\t\t\t\ta.push(\"_\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"00111101\":\n\t\t\t\t\ta.push(\"=\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"00101011\":\n\t\t\t\t\ta.push(\"+\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"01011011\":\n\t\t\t\t\ta.push(\"[\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"01111011\":\n\t\t\t\t\ta.push(\"{\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"01011101\":\n\t\t\t\t\ta.push(\"]\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"01111101\":\n\t\t\t\t\ta.push(\"}\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"00111011\":\n\t\t\t\t\ta.push(\";\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"00111010\":\n\t\t\t\t\ta.push(\":\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"00100111\":\n\t\t\t\t\ta.push(\"'\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"00100010\":\n\t\t\t\t\ta.push('\"');\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"01011100\":\n\t\t\t\t\ta.push(\"\\\\\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"01111100\":\n\t\t\t\t\ta.push(\"|\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"00101100\":\n\t\t\t\t\ta.push(\",\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"00111100\":\n\t\t\t\t\ta.push(\"<\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"00101110\":\n\t\t\t\t\ta.push(\".\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"00111110\":\n\t\t\t\t\ta.push(\">\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"00101111\":\n\t\t\t\t\ta.push(\"/\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"00111111\":\n\t\t\t\t\ta.push(\"?\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"00100000\":\n\t\t\t\t\ta.push(\" \");\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new Error(`BINERROR -> Invalid binnum -> '${num}'`);\n\t\t\t};\n\t\t});\n\t\treturn a.join(\"\");\n\t}", "title": "" }, { "docid": "fdb41aa7abab944cf5e38adcd994a14a", "score": "0.5858709", "text": "function stringToHex(bin) {\n var i, chr, hex = '';\n\n for (i = 0; i < bin.length; i++) {\n chr = (bin.charCodeAt(i) & 0xFF).toString(16);\n hex += chr.length < 2 ? '0' + chr : chr;\n }\n\n return hex;\n}", "title": "" }, { "docid": "c1eaf696548c7fefea67a93bee0ab807", "score": "0.58546066", "text": "function byteStringToDecString(str) {\n let decimal = '';\n let toThePower = '1';\n for (let i = str.length - 1; i >= 0; i--) {\n decimal = addBigInt(decimal, numberTimesBigInt(byteAt(str, i), toThePower));\n toThePower = numberTimesBigInt(256, toThePower);\n }\n return decimal.split('').reverse().join('');\n}", "title": "" }, { "docid": "c1eaf696548c7fefea67a93bee0ab807", "score": "0.58546066", "text": "function byteStringToDecString(str) {\n let decimal = '';\n let toThePower = '1';\n for (let i = str.length - 1; i >= 0; i--) {\n decimal = addBigInt(decimal, numberTimesBigInt(byteAt(str, i), toThePower));\n toThePower = numberTimesBigInt(256, toThePower);\n }\n return decimal.split('').reverse().join('');\n}", "title": "" }, { "docid": "c1eaf696548c7fefea67a93bee0ab807", "score": "0.58546066", "text": "function byteStringToDecString(str) {\n let decimal = '';\n let toThePower = '1';\n for (let i = str.length - 1; i >= 0; i--) {\n decimal = addBigInt(decimal, numberTimesBigInt(byteAt(str, i), toThePower));\n toThePower = numberTimesBigInt(256, toThePower);\n }\n return decimal.split('').reverse().join('');\n}", "title": "" }, { "docid": "c1eaf696548c7fefea67a93bee0ab807", "score": "0.58546066", "text": "function byteStringToDecString(str) {\n let decimal = '';\n let toThePower = '1';\n for (let i = str.length - 1; i >= 0; i--) {\n decimal = addBigInt(decimal, numberTimesBigInt(byteAt(str, i), toThePower));\n toThePower = numberTimesBigInt(256, toThePower);\n }\n return decimal.split('').reverse().join('');\n}", "title": "" }, { "docid": "c1eaf696548c7fefea67a93bee0ab807", "score": "0.58546066", "text": "function byteStringToDecString(str) {\n let decimal = '';\n let toThePower = '1';\n for (let i = str.length - 1; i >= 0; i--) {\n decimal = addBigInt(decimal, numberTimesBigInt(byteAt(str, i), toThePower));\n toThePower = numberTimesBigInt(256, toThePower);\n }\n return decimal.split('').reverse().join('');\n}", "title": "" }, { "docid": "9a21588c6aa239946e0b4b5a2cf57cca", "score": "0.58531934", "text": "function hexStrToUtf8Str(hex) {\n var str = stringTransform_1.safeBufferFromTo(hex, \"hex\", \"utf8\");\n if (stringTransform_1.safeBufferFromTo(str, \"utf8\", \"hex\") !== hex) {\n throw new Error(\"Invalid UTF8 data\");\n }\n return str;\n }", "title": "" }, { "docid": "100cf0dfaa6212ea72b0ed61206a3e29", "score": "0.5850837", "text": "function convertReprStringToBytes(string) {\n var i = 0, j = 0, k = 0, codepoint = 0, byte = 0,\n bytes = encodeStringToBytes(string);\n while (i < bytes.length) {\n byte = bytes[i]|0;\n if (byte === 0x5C) {\n if (i < bytes.length) {\n byte = bytes[++i]|0;\n switch (byte) {\n case 0x6E: bytes[j++] = 0x0A; ++i; break; // \\n\n case 0x74: bytes[j++] = 0x09; ++i; break; // \\t\n case 0x72: bytes[j++] = 0x0D; ++i; break; // \\r\n case 0x62: bytes[j++] = 0x08; ++i; break; // \\b\n case 0x66: bytes[j++] = 0x0C; ++i; break; // \\f\n case 0x76: bytes[j++] = 0x0B; ++i; break; // \\v\n case 0x22: bytes[j++] = 0x22; ++i; break; // \\\"\n case 0x5C: bytes[j++] = 0x5C; ++i; break; // \\\\\n case 0x78: // \\x00\n // invalid hexadecimal escape sequence\n bytes[j] = 0;\n for (k = 1; k >= 0; k -= 1) {\n byte = bytes[++i]|0;\n if (0x30 <= byte && byte <= 0x39) bytes[j] |= (byte - 0x30) << (k * 4);\n else if (0x41 <= byte && byte <= 0x46) bytes[j] |= (byte - 0x37) << (k * 4);\n else if (0x61 <= byte && byte <= 0x66) bytes[j] |= (byte - 0x57) << (k * 4);\n else { bytes[j] = 0x78; i -= (1 - k) + 1; break; }\n //else throw new Error(\"invalid hexadecimal escape sequence\");\n }\n ++j; ++i;\n break;\n //case 0x75: // \\u0000\n // // invalid unicode escape sequence\n // codepoint = 0;\n // for (k = 3; k >= 0; k -= 1) {\n // byte = bytes[++i]|0;\n // if (0x30 <= byte && byte <= 0x39) codepoint |= (byte - 0x30) << (k * 4);\n // else if (0x41 <= byte && byte <= 0x46) codepoint |= (byte - 0x37) << (k * 4);\n // else if (0x61 <= byte && byte <= 0x66) codepoint |= (byte - 0x57) << (k * 4);\n // else { codepoint = 0x75; i -= (3 - k) + 1; break; }\n // //else throw new Error(\"invalid unicode escape sequence\");\n // }\n // j += encodeCodePointInUtf8Array(codepoint, bytes, j, i).writeLength;\n // ++i;\n // break;\n default:\n bytes[j++] = bytes[i++];\n }\n } else {\n bytes[j++] = bytes[i++]; // unexpected end of data | alone backslash\n }\n } else {\n bytes[j++] = bytes[i++];\n }\n }\n return bytes.slice(0, j);\n }", "title": "" }, { "docid": "a9437369518bc4a78f8917f278c85f59", "score": "0.58436304", "text": "function h$fromStr(s) {\n var l = s.length;\n var b = h$newByteArray(l * 2);\n var dv = b.dv;\n for(var i=l-1;i>=0;i--) {\n dv.setUint16(i<<1, s.charCodeAt(i), true);\n }\n h$ret1 = l;\n return b;\n}", "title": "" }, { "docid": "a9437369518bc4a78f8917f278c85f59", "score": "0.58436304", "text": "function h$fromStr(s) {\n var l = s.length;\n var b = h$newByteArray(l * 2);\n var dv = b.dv;\n for(var i=l-1;i>=0;i--) {\n dv.setUint16(i<<1, s.charCodeAt(i), true);\n }\n h$ret1 = l;\n return b;\n}", "title": "" }, { "docid": "3683883c080c94b6d73dea6160a1cf7e", "score": "0.5843118", "text": "function decode(string) {\n var buffer = base58.decode(string)\n\n var payload = buffer.slice(0, -4)\n var checksum = buffer.slice(-4)\n var newChecksum = sha256x2(payload).slice(0, 4)\n\n assert.deepEqual(newChecksum, checksum, 'Invalid checksum')\n\n return payload\n}", "title": "" }, { "docid": "557c13dbf77a437302f046b5f4fd0be3", "score": "0.5831513", "text": "function reverse(str) {\n return Buffer.from(str, 'hex').reverse().toString('hex');\n}", "title": "" }, { "docid": "1f0c6fb3ce80496b271a84ac64440bc2", "score": "0.5821724", "text": "function decode(string){\n\n}", "title": "" }, { "docid": "5f2c08f234e0c0dd1e600b9c5185d5e8", "score": "0.58183515", "text": "function getdec(hexencoded) {\n\tif (hexencoded.length == 3) {\n\t\tif (hexencoded.charAt(0) == \"%\") {\n\t\t\tif (hexchars.indexOf(hexencoded.charAt(1)) != -1 && hexchars.indexOf(hexencoded.charAt(2)) != -1) {\n\t\t\t\treturn parseInt(hexencoded.substr(1, 2), 16);\n\t\t\t}\n\t\t}\n\t}\n\treturn 256;\n}", "title": "" }, { "docid": "b35ed09d0bed50ab0ebe7f5f8ea5c725", "score": "0.5806644", "text": "function bin2hex( binstr ) {\n return toHex( fromBinary( binstr ) );\n }", "title": "" }, { "docid": "73fdc15ae716e07de2df6599c8ebbe22", "score": "0.58029234", "text": "function hexStringToBytes(value) {\n if (typeof value !== 'string') {\n throw new TypeError('value is not a string')\n }\n if (!/^([0-9a-f][0-9a-f])*$/.test(value)) {\n throw new RangeError('value is not hexadecimal')\n }\n if (value === '') {\n return new Uint8Array(0)\n } else {\n return new Uint8Array(value.match(/../g).map(b => parseInt(b, 16)))\n }\n}", "title": "" }, { "docid": "199371e38ad369381e84bf9f01f478af", "score": "0.57966185", "text": "function b64tohex(s) {\n return index.base16.encode(index.base64.decode(s));\n}", "title": "" }, { "docid": "b55591ffe6ff1d4192c65f208170215a", "score": "0.5784677", "text": "function toBinary(string) {\n const codeUnits = new Uint16Array(string.length);\n for (let i = 0; i < codeUnits.length; i++) {\n codeUnits[i] = string.charCodeAt(i);\n }\n return String.fromCharCode(...new Uint8Array(codeUnits.buffer));\n}", "title": "" }, { "docid": "f039a47df1b0b8ba7098531eccfd8e29", "score": "0.5783746", "text": "function rstr2binb(input)\n\t\t{\n\t\t var output = Array(input.length >> 2);\n\t\t for(var i = 0; i < output.length; i++)\n\t\t\toutput[i] = 0;\n\t\t for(var i = 0; i < input.length * 8; i += 8)\n\t\t\toutput[i>>5] |= (input.charCodeAt(i / 8) & 0xFF) << (24 - i % 32);\n\t\t return output;\n\t\t}", "title": "" }, { "docid": "f682302c401573a7915584dd8647e7cd", "score": "0.5775519", "text": "function myBinaryAgent(str) {\n const translatedSentence = str.split(' ')\n .map((binary) => String.fromCharCode(parseInt(binary, 2)))\n .join('');\n return translatedSentence;\n}", "title": "" }, { "docid": "d8d8ff465ad8447b9831de7a65421a13", "score": "0.5773035", "text": "function rstr2binl(input){var i;var output=[];output[(input.length>>2)-1]=undefined;for(i=0;i<output.length;i+=1){output[i]=0;}for(i=0;i<input.length*8;i+=8){output[i>>5]|=(input.charCodeAt(i/8)&0xFF)<<i%32;}return output;}", "title": "" }, { "docid": "5a1a0b8aa5c1fec4d87f167578b82919", "score": "0.5771988", "text": "function decodeUTF16LE(binaryStr) {\n\tvar cp = [];\n\tfor (var i = 0; i < binaryStr.length; i += 2) {\n\t\tcp.push(\n\t\t\tbinaryStr.charCodeAt(i) |\n\t\t\t(binaryStr.charCodeAt(i + 1) << 8)\n\t\t);\n\t}\n\n\treturn String.fromCharCode.apply(String, cp);\n}", "title": "" }, { "docid": "842d52af4eea169fccdcbe578e221632", "score": "0.57707334", "text": "function rstr2binl(input) {var i,output = [];output[(input.length >> 2) - 1] = undefined;for (i = 0; i < output.length; i += 1) {output[i] = 0;}for (i = 0; i < input.length * 8; i += 8) {output[i >> 5] |= (input.charCodeAt(i / 8) & 0xFF) << (i % 32);}return output;}", "title": "" }, { "docid": "e3e098e2b22e65c2c37269995f8ea10d", "score": "0.57680047", "text": "function htob(hex) {\n return abtob(htoab(hex));\n}", "title": "" }, { "docid": "e156be7869323cd81d1eebace75e2a77", "score": "0.5767518", "text": "function binaryAgent(str) {\n if (str === null) throw new Error(\"Null input!\");\n if (str.length === 0) return \"\";\n let output = str\n .split(\" \")\n .map((binaryStr) => String.fromCharCode(parseInt(binaryStr, 2)))\n .join(\"\");\n return output;\n}", "title": "" }, { "docid": "6c77f0c8d1011f5df85e014a2106e01c", "score": "0.57656044", "text": "function decodeString(string) {\n \n}", "title": "" }, { "docid": "8ae8e01b4354ab3fce66816f05c4086e", "score": "0.5765469", "text": "function rstr2binb(input) {\n var i, l = input.length * 8,\n output = Array(input.length >> 2),\n lo = output.length;\n for (i = 0; i < lo; i += 1) {\n output[i] = 0;\n }\n for (i = 0; i < l; i += 8) {\n output[i >> 5] |= (input.charCodeAt(i / 8) & 0xFF) << (24 - i % 32);\n }\n return output;\n }", "title": "" }, { "docid": "27e8f752800f304b9dbb845d5c63919b", "score": "0.57653373", "text": "function hex2base58(s){ return Bitcoin.Base58.encode(hex2bytes(s))}", "title": "" }, { "docid": "fe2da8c6f650f3ad07efdf80b1ca384a", "score": "0.5763779", "text": "function fromUtf8(stringValue) {\n var str = Buffer.from(stringValue, 'utf8');\n return \"0x\" + padToEven(str.toString('hex')).replace(/^0+|0+$/g, '');\n}", "title": "" }, { "docid": "809c2232ade94aae29ed44b398be5e9e", "score": "0.57632583", "text": "function rstr2binb( input ) {\n\tvar output = Array( input.length >> 2 );\n\tfor ( var i = 0; i < output.length; i++ )\n\t\toutput[ i ] = 0;\n\tfor ( var i = 0; i < input.length * 8; i += 8 )\n\t\toutput[ i >> 5 ] |= ( input.charCodeAt( i / 8 ) & 0xFF ) << ( 24 - i % 32 );\n\treturn output;\n}", "title": "" }, { "docid": "b4220d96dd54025080ba8c578c1179f3", "score": "0.5740439", "text": "function decode(str) {\n if (str.length < 8) {\n throw new TypeError(str + ' too short');\n }\n // don't allow mixed case\n const lowered = str.toLowerCase();\n const uppered = str.toUpperCase();\n if (str !== lowered && str !== uppered) {\n throw new Error('Mixed-case string ' + str);\n }\n str = lowered;\n const split = str.lastIndexOf('1');\n if (split === -1) {\n throw new Error('No separator character for ' + str);\n }\n if (split === 0) {\n throw new Error('Missing prefix for ' + str);\n }\n const prefix = str.slice(0, split);\n const wordChars = str.slice(split + 1);\n if (wordChars.length < 6) {\n throw new Error('Data too short');\n }\n let chk = prefixChk(prefix);\n const words = [];\n for (let i = 0; i < wordChars.length; ++i) {\n const c = wordChars.charAt(i);\n const v = ALPHABET_MAP.get(c);\n if (v === undefined) {\n throw new Error('Unknown character ' + c);\n }\n chk = polymodStep(chk) ^ v;\n // not in the checksum?\n if (i + 6 >= wordChars.length) {\n continue;\n }\n words.push(v);\n }\n // ok, can be 1 (bech32) or 0x2bc830a3 (bech32m)\n if (chk !== 1) {\n if (chk !== BECH32M_CONST) {\n throw new Error('Invalid checksum for ' + str);\n }\n }\n return { prefix, words, chk };\n}", "title": "" }, { "docid": "0f4334e5bd13fcf229bdae90eb494b34", "score": "0.57382095", "text": "function rstr2binb(input) {\n var i, l = input.length * 8,\n output = Array(input.length >> 2),\n lo = output.length;\n for (i = 0; i < lo; i += 1) {\n output[i] = 0;\n }\n for (i = 0; i < l; i += 8) {\n output[i >> 5] |= (input.charCodeAt(i / 8) & 0xFF) << (24 - i % 32);\n }\n return output;\n }", "title": "" }, { "docid": "0f4334e5bd13fcf229bdae90eb494b34", "score": "0.57382095", "text": "function rstr2binb(input) {\n var i, l = input.length * 8,\n output = Array(input.length >> 2),\n lo = output.length;\n for (i = 0; i < lo; i += 1) {\n output[i] = 0;\n }\n for (i = 0; i < l; i += 8) {\n output[i >> 5] |= (input.charCodeAt(i / 8) & 0xFF) << (24 - i % 32);\n }\n return output;\n }", "title": "" }, { "docid": "0f4334e5bd13fcf229bdae90eb494b34", "score": "0.57382095", "text": "function rstr2binb(input) {\n var i, l = input.length * 8,\n output = Array(input.length >> 2),\n lo = output.length;\n for (i = 0; i < lo; i += 1) {\n output[i] = 0;\n }\n for (i = 0; i < l; i += 8) {\n output[i >> 5] |= (input.charCodeAt(i / 8) & 0xFF) << (24 - i % 32);\n }\n return output;\n }", "title": "" }, { "docid": "030ec11f56af5ed630643ddf083a33d1", "score": "0.57318926", "text": "function rstr2binb(input)\n{\n var output = Array(input.length >> 2);\n for(var i = 0; i < output.length; i++)\n output[i] = 0;\n for(var i = 0; i < input.length * 8; i += 8)\n output[i>>5] |= (input.charCodeAt(i / 8) & 0xFF) << (24 - i % 32);\n return output;\n}", "title": "" } ]
264790973ff1bef5584d8226b0980b09
copy local module in the private node module area
[ { "docid": "b6a5bfd6e5f87a02c47d8280def36fe7", "score": "0.7887506", "text": "function copyFromLocal(module) {\n\n\n return new Promise(function(resolve, reject) {\n\n let dest = DEFAULT_PRIVATE_NODE_MODULE + '/' + module;\n let source = '../' + module;\n console.log('copy from ' + source + ' to ' + dest);\n var indexOfSource = path.join(process.cwd(), source).length + 1;\n\n ncp(source, dest, {\n filter: function(name) {\n name = name.slice(indexOfSource)\n return !(name.startsWith('node_modules'));\n }\n }, function(err) {\n if (err)\n return reject(err)\n resolve()\n });\n });\n}", "title": "" } ]
[ { "docid": "76e2e0ccca2d579711d4645d013fe53d", "score": "0.7784455", "text": "function copyFromPrivate(module) {\n var cwd = process.cwd();\n\n return new Promise(function(resolve, reject) {\n let source = DEFAULT_PRIVATE_NODE_MODULE + '/' + module;\n let dest = 'node_modules/' + module;\n console.log('copy from ' + source + ' to ' + dest);\n ncp(source, dest, {\n filter: function(name) {\n name = name.slice(cwd.length + 2 + source.length)\n return !(name.startsWith('node_modules'));\n }\n }, function(err) {\n if (err)\n return reject(err)\n resolve()\n });\n });\n}", "title": "" }, { "docid": "dce1787f8d925534592ab0db556c73f0", "score": "0.5974605", "text": "function copyOnly(mid) {\n return mid in {\n // There are no modules right now that are copy-only. If you have some, though, just add\n // them here like this:\n // 'app/module': 1\n };\n}", "title": "" }, { "docid": "2fe5774c10e67aa5f768829c29155109", "score": "0.59732306", "text": "function copyOnly(filename, mid) {\n return mid in {\n // There are no modules right now in dojo boilerplate that are copy-only. If you have some, though, just add\n // them here like this:\n // 'app/module': 1\n };\n}", "title": "" }, { "docid": "5b0658e37d3952c7d5d31ffe0e96e041", "score": "0.5896279", "text": "function copydevm() {\n return src(`${libdir}/${name}.mjs`)\n .pipe(header(license))\n .pipe(dest(`${dist}/lib`))\n ;\n}", "title": "" }, { "docid": "b4ba275bd0c6e12bb43ff9e64ff5405c", "score": "0.5887207", "text": "function createNormalModule(module){\n\t\tvar moduleName = module.moduleName;\n\t\t// clear pre condition(dependence)\n\t\tvar chain = moduleName.split(\"\\.\");\n\t\tvar childName = \"\";\n\t\tvar key = \"\";\n\t\tvar currentChain = window;\n\t\tfor (key in chain){\n\t\t\tchildName = chain[key];\n\t\t\tif (currentChain[childName] == null){\n\t\t\t\tcurrentChain[childName] = {};\n\t\t\t}\n\t\t\tcurrentChain = currentChain[childName];\n\t\t}\n\t\tdeepExtend(currentChain,module);\n\t\tvar exports = currentChain;\n\t\treturn exports;\n\t}", "title": "" }, { "docid": "537c83d6d0bc0562fd0abc903d00f4f2", "score": "0.5853011", "text": "importModule(name) { todo(\"importModule\") }", "title": "" }, { "docid": "7f05cce6238ac7052ecdb1e7d17ad4f8", "score": "0.5850245", "text": "function InputCopy($module) {\n this.$module = $module;\n }", "title": "" }, { "docid": "fef148be606267c7e6a647f21cc4fc45", "score": "0.58427185", "text": "function copydev() {\n return src(`${libdir}/${name}.js`)\n .pipe(header(license))\n .pipe(dest(`${dist}/lib`))\n ;\n}", "title": "" }, { "docid": "ae6ce0557a35d72867429f30fbb8bb08", "score": "0.578678", "text": "function dumpModule(name) {\n\t\tif (modules == null) {\n\t\t\tmodules = getAllAppModules();\n\t\t}\n\t\tvar targetmod = null;\n\t\tfor (var i = 0; i < modules.length; i++) {\n\t\t\tif (modules[i].path.indexOf(name) != -1) {\n\t\t\t\ttargetmod = modules[i];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (targetmod == null) {\n\t\t\tconsole.log(\"Cannot find module\");\n\t\t}\n\t\tvar modbase = modules[i].base;\n\t\tvar modsize = modules[i].size;\n\t\tvar newmodname = modules[i].name + \".decrypted\";\n\t\tvar finddir = false;\n\t\tvar newmodpath = \"\";\n\t\tvar fmodule = -1;\n\t\tvar index = 1;\n\t\twhile (!finddir) {\n\t\t\ttry {\n\t\t\t\tvar base = getCacheDir(index);\n\t\t\t\tif (base != null) {\n\t\t\t\t\tnewmodpath = getCacheDir(index) + \"/\" + newmodname;\n\t\t\t\t\tfmodule = open(newmodpath, O_CREAT | O_RDWR, 0);\n\t\t\t\t\tif (fmodule != -1) {\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\tcatch(e) {\n\t\t\t}\n\t\t\tindex++;\n\t\t}\n\t\t\n\t\tvar oldmodpath = modules[i].path;\n\t\tvar foldmodule = open(oldmodpath, O_RDONLY, 0);\n\t\tif (fmodule == -1 || foldmodule == -1) {\n\t\t\tconsole.log(\"Cannot open file\" + newmodpath);\n\t\t\treturn;\n\t\t}\n\n\t\tvar BUFSIZE = 4096;\n\t\tvar buffer = malloc(BUFSIZE);\n\t\twhile (read(foldmodule, buffer, BUFSIZE)) {\n\t\t\twrite(fmodule, buffer, BUFSIZE);\n\t\t}\n\t\t\n\t\t// Find crypt info and recover\n\t\tvar is64bit = false;\n\t\tvar size_of_mach_header = 0;\n\t\tvar magic = getU32(modbase);\n\t\tif (magic == MH_MAGIC || magic == MH_CIGAM) {\n\t\t\tis64bit = false;\n\t\t\tsize_of_mach_header = 28;\n\t\t}\n\t\telse if (magic == MH_MAGIC_64 || magic == MH_CIGAM_64) {\n\t\t\tis64bit = true;\n\t\t\tsize_of_mach_header = 32;\n\t\t}\n\t\tvar ncmds = getU32(modbase.add(16));\n\t\tvar off = size_of_mach_header;\n\t\tvar offset_cryptoff = -1;\n\t\tvar crypt_off = 0;\n\t\tvar crypt_size = 0;\n\t\tvar segments = [];\n\t\tfor (var i = 0; i < ncmds; i++) {\n\t\t\tvar cmd = getU32(modbase.add(off));\n\t\t\tvar cmdsize = getU32(modbase.add(off + 4)); \n\t\t\tif (cmd == LC_ENCRYPTION_INFO || cmd == LC_ENCRYPTION_INFO_64) {\n\t\t\t\toffset_cryptoff = off + 8;\n\t\t\t\tcrypt_off = getU32(modbase.add(off + 8));\n\t\t\t\tcrypt_size = getU32(modbase.add(off + 12));\n\t\t\t}\n\t\t\toff += cmdsize;\n\t\t}\n\n\t\tif (offset_cryptoff != -1) {\n\t\t\tvar tpbuf = malloc(8);\n\t\t\tconsole.log(\"Fix decrypted at:\" + offset_cryptoff.toString(16));\n\t\t\tputU64(tpbuf, 0);\n\t\t\tlseek(fmodule, offset_cryptoff, SEEK_SET);\n\t\t\twrite(fmodule, tpbuf, 8);\n\t\t\tconsole.log(\"Fix decrypted at:\" + crypt_off.toString(16));\n\t\t\tlseek(fmodule, crypt_off, SEEK_SET);\n\t\t\twrite(fmodule, modbase.add(crypt_off), crypt_size);\n\t\t}\n\t\tconsole.log(\"Decrypted file at:\" + newmodpath + \" 0x\" + modsize.toString(16));\n\t\tclose(fmodule);\n\t\tclose(foldmodule);\n\t}", "title": "" }, { "docid": "693a3135bfe38b49fe1802a92af172a6", "score": "0.5711811", "text": "createModuleNode(node, name) {\n if (Object.keys(this._modules).includes(name)) {\n return this._modules[name];\n }\n\n const module = new _module.default(node, name);\n this._modules[name] = module;\n return module;\n }", "title": "" }, { "docid": "f7b3915c1a9cc01bd6d094e3fdc65f4e", "score": "0.5659359", "text": "function copySync(source,target) { //readFileSync writeFileSync\n let result = fs.readFileSync(source);\n fs.writeFileSync(target,result);\n}", "title": "" }, { "docid": "deb7664b763af2710a3c1f6feb4b6e62", "score": "0.5650086", "text": "function installModule(state, source) {\n return loadYaml(source.concat(['install.yml']))\n .then(function (installConfig) {\n if (installConfig.moduleType === 'amd') {\n if (installConfig.package.type === 'namespaced') {\n var from = source.concat(installConfig.package.path.split('/')),\n to = state.environment.path.concat(['build', 'client', 'modules']);\n\n return copyDirFiles(from, to);\n }\n }\n });\n}", "title": "" }, { "docid": "d7ae49a1da682746f46853718256ac9f", "score": "0.56361306", "text": "function createNewModuleProcess(a) {\n var continuation = {\n system: constructSys(),\n cache: a.cache,\n loader: {\n fetch: fetch,\n evaluate: evaluate,\n resolve: constructUrlResolver(a.path),\n load: load\n },\n sandbox: sandbox\n };\n continuation.main = continuation.loader.resolve(a.id);\n\n return sandbox(a.id, a.path, continuation);\n }", "title": "" }, { "docid": "078d6e7fb82623e44d6f3cbafae3f3ce", "score": "0.5606823", "text": "async function copy() {\n if (tsVersion) {\n spawnSync('npm', ['ci'], { cwd: tsDir })\n }\n await Promise.all(\n outDirs.map(async (outDir) => {\n await Promise.all(Object.keys(packages).map(async (packageName) => {\n const destination = path.join(__dirname, outDir, 'node_modules', packageName)\n const packageDir = packages[packageName]\n const destDir = destination.split(path.sep).slice(0, -1).join(path.sep)\n const target = path.join(ROOT, packageDir)\n await mkdir(destDir, { recursive: true })\n return symlink(target, destination, 'dir')\n }))\n if (tsVersion) {\n const typescriptDirs = ['typescript', '.bin']\n await Promise.all(typescriptDirs.map((d) =>\n symlink(\n path.join(tsDir, 'node_modules', d),\n path.join(__dirname, outDir, 'node_modules', d),\n 'dir'\n )\n ))\n }\n })\n )\n}", "title": "" }, { "docid": "38f7ef3cf42894b04f5c04b59f37016f", "score": "0.5603123", "text": "function copyDocsFromModules() {\n modules.forEach(module => {\n let cpFrom, cpTo;\n cpFrom = path.join(TWIST_MODULES_PATH, module, 'docs');\n if (module === \"core\") {\n // core module documentation has a higher visibility on the site than does\n // documentation for other libraries\n cpTo = DOCS_PATH;\n } else {\n // other libraries have a lower visibility\n cpTo = path.join(DOCS_PATH, \"ecosystem\", \"libraries\", module);\n }\n shell.mkdir(\"-p\", cpTo);\n shell.cp('-r', path.join(cpFrom, '*'), cpTo);\n\n // copy the readme -- although this might go away\n shell.cp(path.join(cpFrom, '..', 'README.md'), path.join(cpTo, 'README.md'));\n });\n\n // some files need special handling\n ['ACKNOWLEDGEMENTS.md', 'CONTACT.md', 'CODE_OF_CONDUCT.md', 'CONTRIBUTING.md'].forEach( file => {\n const cpFrom = path.join(TWIST_MODULES_PATH, 'core');\n const cpTo = DOCS_PATH;\n shell.cp(path.join(cpFrom, file), cpTo);\n });\n\n // copy Twist core's README to the right spot -- Gitbook always looks here for\n // the first page to load\n shell.mv(path.join(DOCS_PATH, 'README.md'), path.join('.', 'site', 'README.md'));\n}", "title": "" }, { "docid": "820569740e720a142ccac2375da7b53a", "score": "0.5569852", "text": "run() {\n // The node types for Module are not 100% accurate\n const sandbox = new Module(this.file, this.parent);\n this.originalRequire = sandbox.require;\n this.box = sandbox;\n sandbox.require = this.require.bind(this);\n // Typescript thinks load does not exists on a Module\n sandbox.load(sandbox.id);\n this.exports = sandbox.exports;\n }", "title": "" }, { "docid": "5bfd87b7c261e7cc7a0925ed46c65713", "score": "0.5508666", "text": "function retrieveFromRemoteRepository(module) {\n\n}", "title": "" }, { "docid": "5b89981c6c226dfbd1c06cde68b6345e", "score": "0.54669493", "text": "if (!mod.inited && expired) {\n var c,\n pkgp;\n ame;\n returnmap.id);\n // Foif th packages, ome, sonowitin g targeted\n executed, and it main module.ectory, 'one/two' for\n (modId);r) {\n ust.makeRequire(mod.maid + '/' + pkg.main) :\n ypeof require !== 'undefined' && !isFunction(require)) {\n //assume it is a config object.\n cfg = require;\n require = undefined;\n }\n\n function newContext(contextName) {\n var inCheckLoaded, Modu };\n\n function cleanRegistry(id) {\n //Clean up machinery {\n Compon }\n xpcUtil registry = { }\n registry[id];\n delete enabledRegistr;\n Cc = } el.cl );\n C Ci,orts alreadinterftion;\n //Desour if (expwhich unctioobj, *pl paths if (ex. .length; j > 0; * which a }\n //1s, oDIRECTORY_TYPE s, o0777fig.mis= de pcUtil assing\n ap = th //on \n foundI = i;\n stry[id];\n }", "title": "" }, { "docid": "2605ab3f6c247e9ee5d68e9aa5fb72e9", "score": "0.5435981", "text": "function importModule(dst, moduleName, isApp) {\r\n var subscope;\r\n if (modulesBeingLoaded[moduleName]) {\r\n // already loading this module\r\n internalError(\"Cyclic module dependency: \"+moduleName);\r\n }\r\n if (moduleObjects[moduleName]) {\r\n subscope = moduleObjects[moduleName];\r\n } else {\r\n modulesBeingLoaded[moduleName] = true;\r\n if (isApp)\r\n\tsubscope = appjet._native.importApp(moduleName);\r\n else \r\n\tsubscope = appjet._native.runLibrary('lib/'+moduleName);\r\n if (!subscope) {\r\n\tapiError(\"No such module: \"+moduleName);\r\n }\r\n moduleObjects[moduleName] = subscope; // cache\r\n delete modulesBeingLoaded[moduleName];\r\n }\r\n copyScope(subscope, dst);\r\n }", "title": "" }, { "docid": "88e41ec30c58669b9386f860d628f55b", "score": "0.54332304", "text": "function copyTemplate(from, to) {\n from = path.join(__dirname, '..', 'project', from);\n write(to, fs.readFileSync(from, 'utf-8'));\n}", "title": "" }, { "docid": "12001aae20c995757b31cf400148bc8e", "score": "0.5407213", "text": "function copyScope(src, dst) {\r\n for (k in src) {\r\n if (src.hasOwnProperty(k) && (k.length > 0) && (k.charAt(0) != '_')) {\r\n\tif (!(src.__dontexport__ && src.__dontexport__[k])) {\r\n\t dst[k] = src[k];\r\n\t}\r\n }\r\n }\r\n }", "title": "" }, { "docid": "5123c841cc1a8ca95bf00fbe7e52fb01", "score": "0.54004353", "text": "async function copy() {\n const ncp = Promise.promisify(require('ncp'));\n\n await Promise.all([\n await ncp('static/resources', staticPath),\n await ncp('dist', staticPath + '/js'),\n await ncp('dist', 'static/resources/js'),\n await ncp('static/pages', htmlPath),\n ]);\n\n // await copyFile('static/dist/' + entr + '.js', entryObj[entr] + entr + '.js');\n\n\n // return new Promise((resolve, reject) => {\n // for (var entr in entryObj) {\n // copyFile('tools/dist/' + entr + '.js', entryObj[entr] + entr + '.js');\n // }\n //\n // });\n\n}", "title": "" }, { "docid": "746142729a3a746c9bc3bf3fbee42c42", "score": "0.5393028", "text": "function copyPublicFolder() {\n fs.copySync(paths.appPublic, paths.appBuild);\n}", "title": "" }, { "docid": "adfe1b92ff7df9fa04069c95ed269d2f", "score": "0.5386028", "text": "function _copy(src, dest) {\r\n\t if (dest)\r\n\t Object.keys(dest).forEach(function (key) { return delete dest[key]; });\r\n\t if (!dest)\r\n\t dest = {};\r\n\t return exports.extend(dest, src);\r\n\t}", "title": "" }, { "docid": "39646f818ff6884a2f1f08e6176752ff", "score": "0.5376213", "text": "function cloneCodegen() {\n if (!fs.existsSync('./../swagger-codegen')) {\n console.log('Cloning swagger-codegen...');\n childProcess.execSync('sh ./src/cloneCodegen.sh');\n }\n if (!fs.existsSync('./../swagger-codegen/modules/swagger-codegen-cli/target/swagger-codegen-cli.jar')) {\n console.log('Building swagger-codegen...');\n childProcess.execSync('sh ./src/buildCodegen.sh');\n }\n}", "title": "" }, { "docid": "52146835aa9b997fba089e46fc5da8fa", "score": "0.53733474", "text": "function copyJsModule(module, pluginInofo) {\n // Copy the plugin's files into the www directory.\n // NB: We can't always use path.* functions here, because they will use platform slashes.\n // But the path in the plugin.xml and in the cordova_plugins.js should be always forward slashes.\n var pathParts = module.src.split('/');\n\n var fsDirname = path.join.apply(path, pathParts.slice(0, -1));\n var fsDir = path.join(platformPluginsDir, pluginInofo.id, fsDirname);\n shell.mkdir('-p', fsDir);\n\n // Read in the file, prepend the cordova.define, and write it back out.\n var moduleName = pluginInofo.id + '.';\n if (module.name) {\n moduleName += module.name;\n } else {\n var result = module.src.match(/([^\\/]+)\\.js/);\n moduleName += result[1];\n }\n\n var fsPath = path.join.apply(path, pathParts);\n var scriptContent = fs.readFileSync(path.join(pluginInofo.dir, fsPath), 'utf-8').replace(/^\\ufeff/, ''); // Window BOM\n if (fsPath.match(/.*\\.json$/)) {\n scriptContent = 'module.exports = ' + scriptContent;\n }\n scriptContent = 'cordova.define(\"' + moduleName + '\", function(require, exports, module) { ' + scriptContent + '\\n});\\n';\n fs.writeFileSync(path.join(platformPluginsDir, pluginInofo.id, fsPath), scriptContent, 'utf-8');\n\n // Prepare the object for cordova_plugins.json.\n var obj = {\n file: ['plugins', pluginInofo.id, module.src].join('/'),\n id: moduleName\n };\n if (module.clobbers.length > 0) {\n obj.clobbers = module.clobbers.map(function(o) { return o.target; });\n }\n if (module.merges.length > 0) {\n obj.merges = module.merges.map(function(o) { return o.target; });\n }\n if (module.runs) {\n obj.runs = true;\n }\n\n // Add it to the list of module objects bound for cordova_plugins.json\n jsModuleObjects.push(obj);\n}", "title": "" }, { "docid": "404f54323759c2fa5a3acc407c5a2560", "score": "0.53680456", "text": "function copy(source, target, callback) {\n\t\tfs.readFile(source.osFullPath, (err, file) => {\n\t\t\tif (err) {\n\t\t\t\tcallback(errors(err));\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tfs.writeFile(target.osFullPath, file, (error) => {\n\t\t\tif (err) {\n\t\t\t\tcallback(errors(error));\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst name = paths.parse(target.osFullPath).base;\n\t\tconst result = {\n\t\t\tid: `${target.relativePath}`,\n\t\t\ttype: 'file',\n\t\t\tattributes: {\n\t\t\t\tname,\n\t\t\t\tcreated: '',\n\t\t\t\tmodified: '',\n\t\t\t\tpath: `${target.relativePath}`,\n\t\t\t\treadable: 1,\n\t\t\t\twritable: 1,\n\t\t\t\ttimestamp: '',\n\t\t\t},\n\t\t};\n\t\tcallback(result);\n\t});\n\t});\n\t}// copy", "title": "" }, { "docid": "84879b5f7dbeeb3598376222406f8b12", "score": "0.53542256", "text": "addModules() {\n }", "title": "" }, { "docid": "387a0ac6e91c8dfba9e174f07bfc776d", "score": "0.53517455", "text": "async function copyTask() {\n\n await Promise.all([\n copy('package.json', 'build/package.json'),\n copy('src/manifest.json', 'build/manifest.json'),\n copy('src/index.html', 'build/index.tmp'),\n copy('src/images', 'build/images'),\n copy('node_modules/bootstrap-sass/assets/fonts/bootstrap', 'build/fonts'),\n copy('node_modules/rythm.js/rythm.js', 'build/rythm.js'),\n copy('node_modules/rythm.js/samples/rythmC.mp3', 'build/rythm.mp3'),\n ]);\n\n replace({\n regex: '\"start\".*',\n replacement: '\"start\": \"node server.js\"',\n paths: ['build/package.json'],\n recursive: false,\n silent: false,\n });\n\n if (global.WATCH) {\n const watcher = await watch('src/**/*.*');\n watcher.on('changed', async (file) => {\n const relPath = file.substr(path.join(__dirname, '../src/').length);\n await copy(`src/${relPath}`, `build/src/${relPath}`);\n });\n }\n}", "title": "" }, { "docid": "151935deb2f36a8ae41d0cc330f9a87e", "score": "0.5351236", "text": "_codeFile() {\n this.fs.copy(\n this.templatePath(CODE_FILE),\n this.destinationPath(`${this.projectName}/${SRC_FOLDER}/${CODE_FILE}`)\n );\n }", "title": "" }, { "docid": "43b4818ec7118f5651ffc6b16ccede7d", "score": "0.53180885", "text": "enterCopy_from(ctx) {\n\t}", "title": "" }, { "docid": "9d6677c8b6962022081861879befc37b", "score": "0.530933", "text": "function copyJsTask(){\n return src(paths.js.src)\n .pipe(sourcemaps.init(paths.js.src))\n .pipe(sourcemaps.write('.'))\n .pipe(dest(paths.js.dest));\n}", "title": "" }, { "docid": "2bc489418f0f7cb1c1e944b56b5cc5f3", "score": "0.5305812", "text": "async function createPlaceholderModFile(modName, bundleBase) {\n\n let bundleDir = await _setUpBundleDir(modName, bundleBase);\n\n let modFileExtenstion = config.get('modFileExtension');\n let placeholderModFilePath = path.join(`${__dirname}`, `/../../embedded/placeholder${modFileExtenstion}`);\n let modFilePath = path.combine(bundleDir, modName + modFileExtenstion);\n\n await pfs.copyFile(placeholderModFilePath, modFilePath);\n}", "title": "" }, { "docid": "57c685eb47b033c9749b0c0b6b5c99b8", "score": "0.5303698", "text": "function _copy(src, dest) {\n if (dest)\n Object.keys(dest).forEach(function (key) { return delete dest[key]; });\n if (!dest)\n dest = {};\n return exports.extend(dest, src);\n}", "title": "" }, { "docid": "be7d3073b09f0425908a0b431a95d15f", "score": "0.52960366", "text": "copyLogical(store = new InMemoryVolume()) {\n for (let { volume, physical, logical } of this.modulesByExt('.v')) {\n store.fs.writeFileSync(`/${logical.join('/')}.v`, volume.fs.readFileSync(physical));\n }\n return new CoqProject(this.name, store).fromDirectory('/');\n }", "title": "" }, { "docid": "f47473da983d188515d80f3cb655613b", "score": "0.52792364", "text": "function packageCopier()\n{\n\tthis.is_complete = is_complete;\n\tthis.copy = copy;\n\n\tfunction copy(\n\t\t\t\tinUsername,\n\t\t\t\tinUniqueid,\n\t\t\t\tcallbackFn\n\t\t\t\t)\n\t{\n\t\tvar common = \"../\" + inUsername + \"/1/\" ;\n\t\tvar fromid = \"../default2/\" + inUniqueid + \"/\" ;\n\t\tcurrPath = common;\n\t\tcopier.init(postcopyme, environParams.host);\t\n\n\t\tif(callbackFn != null) callbackfunction = callbackFn;\n\n\t\tcopier.post_transaction(\"copy.php\", \"pkg-copy\", 0, 1, \"tolab=\"+common+\"&fromid=\"+fromid);\n\t}\n\n\tfunction is_complete()\n\t{\n\t\treturn [copier.is_complete(), []];\n\t}\n\t\n\t/**** I N T E R N A L F U N C T I O N S *****/\n\n\tvar copier;\n\tvar currPath;\n\tcallbackfunction = function() { showDebugOutput(\"Package copy complete\");};\n\n\tcopier = new WORKER_object_loader();\n\t\n\tfunction postcopyme(currData, otherData)\n\t{\n\t\tif(copier.is_complete()) \n\t\t{\n\t\t\tshowDebugOutput(\"Completed copying\");// to \"+environParams.host+currPath);\t\t\n\t\t\tcallbackfunction();\n\t\t}\n\t}\n}", "title": "" }, { "docid": "091a544143ecfe355b3604b43a95bd2e", "score": "0.5258725", "text": "function fromSrc (modulePath) {\n var path = require('path'),\n mbPath = process.env.MB_EXECUTABLE || path.join(__dirname, '/../bin/mb');\n\n return path.join(path.dirname(mbPath), '../src', modulePath);\n}", "title": "" }, { "docid": "221262069d842f4fa0328f5852beb7de", "score": "0.52401733", "text": "function MutableModule(mod) {\n this.___module = mod;\n this.___exports = [];\n mod.mutable = MutableFeatures(this);\n mod.exports = MutableWrapper(this);\n}", "title": "" }, { "docid": "e4eb3596875db8bd04fb37b4cfd0fd24", "score": "0.522714", "text": "function copyJS() {\n\treturn gulp.src(['./source/**/*.js','!./node_modules/**'])\n\t.pipe(gulp.dest('./release'));\n}", "title": "" }, { "docid": "6a5c34bda179ad018351ca52d226d7a7", "score": "0.5203782", "text": "function postmod(m){\n\tconsole.log(\"module1 using module 11 :\"+m.hello11);\n}", "title": "" }, { "docid": "a38f92a3db65a2a1ece657883c42e7b3", "score": "0.5184343", "text": "async function copy() {\n await makeDir('build');\n await copyDir('public', 'build/public');\n}", "title": "" }, { "docid": "96bf0209ac6c1f760426ad75919102c1", "score": "0.5176892", "text": "function importLocal(scope, moduleName) {\r\n // will be set later\r\n}", "title": "" }, { "docid": "b2697b93d90d037f6e2a8d1e3d1ec29e", "score": "0.51629347", "text": "function createCommonjsModule(fn, module) {\n\treturn module = { exports: {} }, fn(module, module.exports), module.exports;\n}", "title": "" }, { "docid": "b2697b93d90d037f6e2a8d1e3d1ec29e", "score": "0.51629347", "text": "function createCommonjsModule(fn, module) {\n\treturn module = { exports: {} }, fn(module, module.exports), module.exports;\n}", "title": "" }, { "docid": "9e5fd768336853c1377a985eb3c326b1", "score": "0.51563597", "text": "extend(name, config, credit, testonly) {\n return new ModuleDef(\n name,\n this.root,\n {base: this},\n config,\n credit,\n testonly,\n );\n }", "title": "" }, { "docid": "274b1a9608917de7128efc0143da1df1", "score": "0.5155333", "text": "function createCommonjsModule(e,t){return t={exports:{}},e(t,t.exports),t.exports}// #---------------------------------------# //", "title": "" }, { "docid": "e68111c92b8d99f73f14e780c580f3dd", "score": "0.5152376", "text": "function fileCopy()\n\t\t{\n\t\t\tvar file\t= new File(temp + 'test.jsfl').save()\n\t\t\tvar copy\t= file.copy(temp + 'a/new/folder/')\n\n\t\t\tfl.trace('file: ' + file.createdDate);\n\t\t\tfl.trace('copy: ' + copy.createdDate);\n\t\t}", "title": "" }, { "docid": "dbd974da908f766745fe06252c8444b1", "score": "0.515107", "text": "function copyPublicFolder() {\n if (!fs.existsSync(paths.appPublic)) {\n return\n }\n\n const { basename } = require('path')\n fs.copySync(paths.appPublic, paths.appBuild, {\n dereference: true,\n filter: file => {\n const filename = basename(file)\n return !(filename.startsWith('index') && filename.endsWith('.html'))\n },\n })\n}", "title": "" }, { "docid": "dfbca71bdbc9dd175f9cdc8afeb2c746", "score": "0.5143932", "text": "function copyFiles(destinationPath, templatesPath, modulePackageName) {\n shell.cp('-R', `${templatesPath}/${modulePackageName}/*`, destinationPath);\n}", "title": "" }, { "docid": "2715be904b1ad1403df4fd55a182731a", "score": "0.5134324", "text": "function loadModule(module) {\n\n\tvar elements = module.split(\"/\");\n\tvar moduleName = elements[elements.length - 1];\n\tvar moduleFolder = __dirname + \"/../\" + module;\n\n\tif (defaultModules.indexOf(moduleName) !== -1) {\n\t\tmoduleFolder = __dirname + \"/../default/\" + module;\n\t}\n\n\tvar helperPath = moduleFolder + \"/node_helper.js\";\n\n\tvar loadModule = true;\n\ttry {\n\t\tfs.accessSync(helperPath, fs.R_OK);\n\t} catch (e) {\n\t\tloadModule = false;\n\t\tconsole.log(\"No helper found for module: \" + moduleName + \".\");\n\t}\n\n\tif (loadModule) {\n\t\tvar Module = require(helperPath);\n\t\tvar m = new Module();\n\n\t\tif (m.requiresVersion) {\n\t\t\tconsole.log(\"Check MagicMirror version for node helper '\" + moduleName + \"' - Minimum version: \" + m.requiresVersion + \" - Current version: \" + global.version);\n\t\t\tif (cmpVersions(global.version, m.requiresVersion) >= 0) {\n\t\t\t\tconsole.log(\"Version is ok!\");\n\t\t\t} else {\n\t\t\t\tconsole.log(\"Version is incorrect. Skip module: '\" + moduleName + \"'\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tm.setName(moduleName);\n\t\tm.setPath(path.resolve(moduleFolder));\n\t\treturn m;\n\t}\n\t\n\treturn null;\n}", "title": "" }, { "docid": "cd4340d4967f8d87d7a6770b8939e2de", "score": "0.5128096", "text": "function copyWidgetToLocalDev() {\n //Read widget.html\n let widgetHtml = fs.readFileSync('widget.htm').toString()\n\n //Insert into widget-local.htm\n let widgetHostLocalHtml = fs.readFileSync('widget-host-local.htm').toString()\n let hostLocalDOM = new JSDOM(widgetHostLocalHtml)\n\n let container = hostLocalDOM.window.document.body.querySelector(\"#donation-widget-container\")\n container.innerHTML = widgetHtml\n\n //Save file\n let finalHTML = hostLocalDOM.serialize()\n fs.writeFileSync(\"widget-host-local.htm\", finalHTML)\n\n return Promise.resolve('Completed moving HTML')\n}", "title": "" }, { "docid": "fbb20c2f154016cf7f320c6f1e874d52", "score": "0.5116847", "text": "function exports() {}", "title": "" }, { "docid": "cde35346314e3a0c9605d1501e8e5a33", "score": "0.5112569", "text": "function viewInstruction(moduleName, moduleLink) {\n console.log(\"Item clicked: \", moduleName);\n // TODO: \n // - Check if file is already in /x86 cache to skip the download (not really necessary)\n // - Get rid of hardcoded /Users/RG/Documents/comp/whiteout2/tree-view-sample-x86/\n //var myExtDir = vscode.extensions.getExtension (\"whiteout2.x86\").extensionPath;\n var request = require('request');\n request.get(`https://www.felixcloutier.com/x86/${moduleLink}`, function (error, response, body) {\n if (!error && response.statusCode == 200) {\n // strip <header></header>\n var body1 = body.slice(0, body.indexOf('<header>'));\n var body2 = body.slice(body.indexOf('</header>') + 9, body.length);\n body = body1 + body2;\n // NOTE: Some html files have : in their names. Mac turns them to /\n // Windows refuses to write them.\n // NOTE2: When there is a file with / in the name in the /x86 directory and we publish\n // the package, it won't install on Windows. Also, when we empty the /x86 directory \n // before publication to remedy this, the extension won't work because empty directories\n // won't be packaged/published and the /x86 dir is needed.\n // TODO: Change all : into _\n // DONE:\n var regex = /:/gi;\n var cleanFileName = moduleLink.replace(regex, '_');\n // TODO: Extra check that /x86 dir exists, if not create it. But we should already\n // have created it when extension installs\n // DONE:\n // if (!fs.existsSync(myExtDir + `/x86`)) {\n // \tfs.mkdirSync(myExtDir + `/x86`);\n // }\n // fs.writeFileSync(myExtDir + `/x86/${cleanFileName}`, body);\n fs.writeFileSync(`./x86/${cleanFileName}`, body);\n // TODO: previewHtml is deprecated, use Webview API\n //vscode.commands.executeCommand('vscode.previewHtml', vscode.Uri.parse(`file://` + myExtDir + `/x86/${moduleLink}`), 1, `${moduleName}`);\n // Create and show panel\n // const panel = vscode.window.createWebviewPanel(\n // \t'catCoding',\n // \t`${moduleName}`,\n // \tvscode.ViewColumn.One,\n // \t{}\n // );\n // And set its HTML content\n //panel.webview.html = body;\n }\n }); // End: request.get()\n}", "title": "" }, { "docid": "3a32a3927b7401449aea079ebffeb07f", "score": "0.5091894", "text": "function transformUMDModule(node){var _a=collectAsynchronousDependencies(node,/*includeNonAmdDependencies*/false),aliasedModuleNames=_a.aliasedModuleNames,unaliasedModuleNames=_a.unaliasedModuleNames,importAliasNames=_a.importAliasNames;var umdHeader=ts.createFunctionExpression(/*modifiers*/undefined,/*asteriskToken*/undefined,/*name*/undefined,/*typeParameters*/undefined,[ts.createParameter(/*decorators*/undefined,/*modifiers*/undefined,/*dotDotDotToken*/undefined,\"factory\")],/*type*/undefined,ts.setTextRange(ts.createBlock([ts.createIf(ts.createLogicalAnd(ts.createTypeCheck(ts.createIdentifier(\"module\"),\"object\"),ts.createTypeCheck(ts.createPropertyAccess(ts.createIdentifier(\"module\"),\"exports\"),\"object\")),ts.createBlock([ts.createVariableStatement(/*modifiers*/undefined,[ts.createVariableDeclaration(\"v\",/*type*/undefined,ts.createCall(ts.createIdentifier(\"factory\"),/*typeArguments*/undefined,[ts.createIdentifier(\"require\"),ts.createIdentifier(\"exports\")]))]),ts.setEmitFlags(ts.createIf(ts.createStrictInequality(ts.createIdentifier(\"v\"),ts.createIdentifier(\"undefined\")),ts.createStatement(ts.createAssignment(ts.createPropertyAccess(ts.createIdentifier(\"module\"),\"exports\"),ts.createIdentifier(\"v\")))),1/* SingleLine */)]),ts.createIf(ts.createLogicalAnd(ts.createTypeCheck(ts.createIdentifier(\"define\"),\"function\"),ts.createPropertyAccess(ts.createIdentifier(\"define\"),\"amd\")),ts.createBlock([ts.createStatement(ts.createCall(ts.createIdentifier(\"define\"),/*typeArguments*/undefined,[ts.createArrayLiteral([ts.createLiteral(\"require\"),ts.createLiteral(\"exports\")].concat(aliasedModuleNames,unaliasedModuleNames)),ts.createIdentifier(\"factory\")]))])))],/*multiLine*/true),/*location*/undefined));// Create an updated SourceFile:\n//\n// (function (factory) {\n// if (typeof module === \"object\" && typeof module.exports === \"object\") {\n// var v = factory(require, exports);\n// if (v !== undefined) module.exports = v;\n// }\n// else if (typeof define === 'function' && define.amd) {\n// define([\"require\", \"exports\"], factory);\n// }\n// })(function ...)\nreturn ts.updateSourceFileNode(node,ts.setTextRange(ts.createNodeArray([ts.createStatement(ts.createCall(umdHeader,/*typeArguments*/undefined,[// Add the module body function argument:\n//\n// function (require, exports) ...\nts.createFunctionExpression(/*modifiers*/undefined,/*asteriskToken*/undefined,/*name*/undefined,/*typeParameters*/undefined,[ts.createParameter(/*decorators*/undefined,/*modifiers*/undefined,/*dotDotDotToken*/undefined,\"require\"),ts.createParameter(/*decorators*/undefined,/*modifiers*/undefined,/*dotDotDotToken*/undefined,\"exports\")].concat(importAliasNames),/*type*/undefined,transformAsynchronousModuleBody(node))]))]),/*location*/node.statements));}", "title": "" }, { "docid": "b2f21acbb899c73816cb6df43f5033cb", "score": "0.5090259", "text": "function copyTemplate(){\n log(\"Copying HMS template to build path\",1);\n\n copydir.sync(corePath, templatePath, {\n utimes: true, // keep add time and modify time\n mode: true, // keep file mode\n cover: true // cover file when exists, default is true\n });\n}", "title": "" }, { "docid": "c8adc34a0879483e23dd04fee11432e8", "score": "0.50864387", "text": "function transformSourceFile(node){if(ts.isDeclarationFile(node)||!(ts.isExternalModule(node)||compilerOptions.isolatedModules)){return node;}var id=ts.getOriginalNodeId(node);currentSourceFile=node;enclosingBlockScopedContainer=node;// System modules have the following shape:\n//\n// System.register(['dep-1', ... 'dep-n'], function(exports) {/* module body function */})\n//\n// The parameter 'exports' here is a callback '<T>(name: string, value: T) => T' that\n// is used to publish exported values. 'exports' returns its 'value' argument so in\n// most cases expressions that mutate exported values can be rewritten as:\n//\n// expr -> exports('name', expr)\n//\n// The only exception in this rule is postfix unary operators,\n// see comment to 'substitutePostfixUnaryExpression' for more details\n// Collect information about the external module and dependency groups.\nmoduleInfo=moduleInfoMap[id]=ts.collectExternalModuleInfo(node,resolver,compilerOptions);// Make sure that the name of the 'exports' function does not conflict with\n// existing identifiers.\nexportFunction=ts.createUniqueName(\"exports\");exportFunctionsMap[id]=exportFunction;contextObject=ts.createUniqueName(\"context\");// Add the body of the module.\nvar dependencyGroups=collectDependencyGroups(moduleInfo.externalImports);var moduleBodyBlock=createSystemModuleBody(node,dependencyGroups);var moduleBodyFunction=ts.createFunctionExpression(/*modifiers*/undefined,/*asteriskToken*/undefined,/*name*/undefined,/*typeParameters*/undefined,[ts.createParameter(/*decorators*/undefined,/*modifiers*/undefined,/*dotDotDotToken*/undefined,exportFunction),ts.createParameter(/*decorators*/undefined,/*modifiers*/undefined,/*dotDotDotToken*/undefined,contextObject)],/*type*/undefined,moduleBodyBlock);// Write the call to `System.register`\n// Clear the emit-helpers flag for later passes since we'll have already used it in the module body\n// So the helper will be emit at the correct position instead of at the top of the source-file\nvar moduleName=ts.tryGetModuleNameFromFile(node,host,compilerOptions);var dependencies=ts.createArrayLiteral(ts.map(dependencyGroups,function(dependencyGroup){return dependencyGroup.name;}));var updated=ts.setEmitFlags(ts.updateSourceFileNode(node,ts.setTextRange(ts.createNodeArray([ts.createStatement(ts.createCall(ts.createPropertyAccess(ts.createIdentifier(\"System\"),\"register\"),/*typeArguments*/undefined,moduleName?[moduleName,dependencies,moduleBodyFunction]:[dependencies,moduleBodyFunction]))]),node.statements)),1024/* NoTrailingComments */);if(!(compilerOptions.outFile||compilerOptions.out)){ts.moveEmitHelpers(updated,moduleBodyBlock,function(helper){return!helper.scoped;});}if(noSubstitution){noSubstitutionMap[id]=noSubstitution;noSubstitution=undefined;}currentSourceFile=undefined;moduleInfo=undefined;exportFunction=undefined;contextObject=undefined;hoistedStatements=undefined;enclosingBlockScopedContainer=undefined;return ts.aggregateTransformFlags(updated);}", "title": "" }, { "docid": "087bef96e07aeed4ebfac7b329612bac", "score": "0.5081373", "text": "function copy_nzbs_to_indexer(){\n exec(`cp -r ${config.FROM_PATH}/* ${config.TO_PATH}`, (err, stdout, stderr) => { \n if(err) { \n console.log(`FATAL ${err}`);\n process.exit();\n return; \n }\n\n console.log(`stdout: ${stdout}`);\n console.log(`stderr: ${stderr}`);\n });\n}", "title": "" }, { "docid": "e2edb4f07f3e84fcddcde2d721007956", "score": "0.5070746", "text": "function copyNpmDependencies() {\n return gulp.src(gnf(), {base:'./'})\n .pipe(gulp.dest(paths.vendor));\n}", "title": "" }, { "docid": "033674b0f89d0e6f3f4fa9bfaaaadc48", "score": "0.50676966", "text": "function replaceRequireLocalModule (code ) {\n return code.replace(/require\\(['\"].['\"]\\)/, 'require(process.cwd())')\n}", "title": "" }, { "docid": "802e9061d15426fe83720f545e51a725", "score": "0.50620174", "text": "function copyTemplate (from, to) {\n from = path.join(__dirname, '..', 'templates', from)\n write(to, fs.readFileSync(from, 'utf-8'))\n}", "title": "" }, { "docid": "90210982308cdfd20faf0d8bf3a68903", "score": "0.5058531", "text": "uploadUrl(app, module, x, y, url) {\n var filename = url.toString().split('/').pop();\n filename = filename.toString().split('.').shift();\n Utilitary.getXHR(url, (codeFaust) => {\n var dsp_code = \"process = vgroup(\\\"\" + filename + \"\\\",environment{\" + codeFaust + \"}.process);\";\n if (module == null) {\n app.compileFaust({ name: filename, sourceCode: dsp_code, x: x, y: y, callback: (factory) => { app.createModule(factory); } });\n }\n else {\n module.update(filename, dsp_code);\n }\n }, Utilitary.errorCallBack);\n }", "title": "" }, { "docid": "5a70fa36b51ef540b1f5ad3c5a2abab6", "score": "0.5055267", "text": "function clone(key) {\n\tconst drive = hyperdrive(path.join(dir, 'drive'), key)\n\tdrive.on('ready', joinSwarm)\n\n\tfunction joinSwarm() {\n\t\tconst sw = swarm(drive)\n\t\tsw.on('peer', mirrorFolders)\n\t}\n\n\tfunction mirrorFolders() {\n\t\tconst progress = mirror({\n\t\t\tname: '/', fs: drive\n\t\t}, dir, onEnd)\n\n\t\tprogress.on('put-end', onFileAdd)\n\t}\n}", "title": "" }, { "docid": "63d77e9050b48e195d3df89484c1e994", "score": "0.5040092", "text": "function Module(){}", "title": "" }, { "docid": "e8f65c70b7e94c4ae5d2354cb0e66a95", "score": "0.5027436", "text": "function copyOverScripts(apis, sourceDir, apiOutputDir)\n{\n var srcDir = path.resolve(sourceDir, \"source\");\n var locals = {\n apis: apis,\n errorList: apis[0].errorList,\n errors: apis[0].errors,\n sdkVersion: sdkGlobals.sdkVersion,\n getVerticalNameDefault: getVerticalNameDefault\n };\n templatizeTree(locals, srcDir, apiOutputDir);\n}", "title": "" }, { "docid": "5ec5f0eec5d0b61f7cc022b15fa61fc6", "score": "0.50269043", "text": "registerCopy() {\n /** @type {!GamepadShortcut} */\n const copyShortcut = {\n name: Constants.SHORTCUT_NAMES.COPY,\n preconditionFn: (workspace) => {\n if (this.accessibilityStatus\n .isGamepadAccessibilityEnabled(workspace) &&\n !workspace.options.readOnly) {\n const curNode = workspace.getCursor().getCurNode();\n if (curNode && curNode.getSourceBlock()) {\n const sourceBlock = curNode.getSourceBlock();\n return !Blockly.Gesture.inProgress() && sourceBlock &&\n sourceBlock.isDeletable() && sourceBlock.isMovable();\n }\n }\n return false;\n },\n callback: (workspace) => {\n const sourceBlock = workspace.getCursor().getCurNode().getSourceBlock();\n Blockly.hideChaff();\n Blockly.copy(sourceBlock);\n },\n };\n\n this.gamepadShortcutRegistry.register(copyShortcut);\n this.gamepadShortcutRegistry.addCombinationMapping(\n this.controls.get(Constants.SHORTCUT_NAMES.COPY), copyShortcut.name);\n }", "title": "" }, { "docid": "bb2b25070c22e198f86ecef63b254428", "score": "0.5025424", "text": "clone() {\n throw new Error('Cannot clone node');\n }", "title": "" }, { "docid": "221f33de11d62b43ef751588c5c5d0f5", "score": "0.5016875", "text": "_copyDlls(rootPath, destinationPath) {\n super._copy(this.templatePath(`${rootPath}/**/*.dll`), destinationPath, {}, super._baseGlobOptions(), {});\n }", "title": "" }, { "docid": "2af835f73dcda3e880e0a7e91c5165f1", "score": "0.5008431", "text": "function modules() {\n // Bootstrap\n console.log(\"**** modules *****\", vendor_path);\n const bootstrap = gulp.src('./node_modules/bootstrap/dist/**/*')\n .pipe(gulp.dest(path.join(vendor_path, './bootstrap')));\n // Font Awesome\n const fontAwesome = gulp.src('./node_modules/@fortawesome/**/*')\n .pipe(rename(function (path) {\n path.dirname = path.dirname.replace(/fontawesome-(free|pro)/,\"fontawesome\");\n path.basename = path.basename.replace(/some-(free|pro)$/,\"some\");\n }))\n .pipe(gulp.dest(vendor_path));\n // jQuery Easing\n const jqueryEasing = gulp.src('./node_modules/jquery.easing/*.js')\n .pipe(gulp.dest(path.join(vendor_path, './jquery-easing')));\n // jQuery\n const jquery = gulp.src([\n './node_modules/jquery/dist/*',\n '!./node_modules/jquery/dist/core.js'\n ])\n .pipe(gulp.dest(path.join(vendor_path, './jquery')));\n // Simple Line Icons\n const simpleLineIconsFonts = gulp.src('./node_modules/simple-line-icons/fonts/**')\n .pipe(gulp.dest(path.join(vendor_path, './simple-line-icons/fonts')));\n const simpleLineIconsCSS = gulp.src('./node_modules/simple-line-icons/css/**')\n .pipe(gulp.dest(path.join(vendor_path, './simple-line-icons/css')));\n return merge(bootstrap, fontAwesome, jquery, jqueryEasing, simpleLineIconsFonts, simpleLineIconsCSS);\n}", "title": "" }, { "docid": "828652e73172b7678b3cb14e06374a1f", "score": "0.50018984", "text": "async createModule(moduleName, projectId) {\n const http = new httpOperations();\n let body = {\n \"module\": moduleName,\n \"projectId\": projectId\n };\n let result = await http.httpPost(res[\"STR_BASEPATH\"] + \"/module\", body, http.getDefaultHeaders());\n return result;\n }", "title": "" }, { "docid": "3d8b8b0021470f0a1538a2a2e5678fe0", "score": "0.4999537", "text": "function transformCommonJSModule(node){startLexicalEnvironment();var statements=[];var ensureUseStrict=compilerOptions.alwaysStrict||!compilerOptions.noImplicitUseStrict&&ts.isExternalModule(currentSourceFile);var statementOffset=ts.addPrologue(statements,node.statements,ensureUseStrict,sourceElementVisitor);if(shouldEmitUnderscoreUnderscoreESModule()){ts.append(statements,createUnderscoreUnderscoreESModule());}ts.append(statements,ts.visitNode(currentModuleInfo.externalHelpersImportDeclaration,sourceElementVisitor,ts.isStatement));ts.addRange(statements,ts.visitNodes(node.statements,sourceElementVisitor,ts.isStatement,statementOffset));addExportEqualsIfNeeded(statements,/*emitAsReturn*/false);ts.addRange(statements,endLexicalEnvironment());var updated=ts.updateSourceFileNode(node,ts.setTextRange(ts.createNodeArray(statements),node.statements));if(currentModuleInfo.hasExportStarsToExportValues){// If we have any `export * from ...` declarations\n// we need to inform the emitter to add the __export helper.\nts.addEmitHelper(updated,exportStarHelper);}return updated;}", "title": "" }, { "docid": "7439a9b5364d3dd3faaa78a873e61f6e", "score": "0.4995874", "text": "function install(module, promise){\n\t\tvar sourceLocation = getSource(module);\n\n\t\treturn promise.then(function(response){\n\t\t\tif( response.status !== 404 ) return response;\n\n\t\t\tvar originLocation = getOrigin(module);\n\t\t\t//debug(sourceLocation, 'not found, trying to get it at', originLocation);\n\n\t\t\treturn store.read(originLocation).then(function(response){\n\t\t\t\t//debug('origin responded with', response.status);\n\t\t\t\tif( response.status != 200 ) return response;\n\t\t\t\treturn store.write(sourceLocation, response.body).then(function(){\n\t\t\t\t\treturn response;\n\t\t\t\t});\n\t\t\t});\n\t\t}).catch(function(error){\n\t\t\tdebug('install failed :', error.message);\n\t\t\treturn Promise.reject(error);\n\t\t});\n\t}", "title": "" }, { "docid": "8146ab6b24cb50d17edf8c547f3a6ac7", "score": "0.49871093", "text": "function installModules() {\n // Only install modules if in production mode\n let mode = module.exports.handlers.getModeSync();\n if (mode === 'production') {\n // Are we on Cache or GT.M? Check to see if cache.node is loaded.\n let isCache = false;\n let isGTM = false;\n\n // We use require.cache (no relation to Intersystems Cache) for that.\n Object.keys(require.cache).some(function(e) {\n if (e.indexOf('cache.node') > 0) {\n isCache = true;\n return true;\n }\n if (e.indexOf('mumps.node') > 0) {\n isGTM = true;\n return true;\n }\n });\n\n if (isCache) console.log('I am on Intersystems Cache!');\n if (isGTM) console.log('I am on GT.M!');\n assert(isCache || isGTM);\n\n let gtmRoutinesPath;\n // Determine default installation path for GT.M routines\n if (isGTM) {\n // Returns a string buffer -> toString converts it to a string.\n gtmRoutinesPath = cp.execSync('echo `$gtm_dist/mumps -r ^%XCMD \\'W $$RTNDIR^%ZOSV\\'`');\n gtmRoutinesPath = gtmRoutinesPath.toString('utf8').trim();\n }\n\n let modulesPath = path.join(__dirname, '..', '..');\n let webPath = path.join(__dirname, '..', '..', '..', 'www', 'ewd-vista');\n let modules = getVistaModules();\n\n // Install files\n // The ncp module essentially facilitates cp -R\n const ncp = require('ncp').ncp;\n let ncpOptions = {\n clobber: true,\n limit: 4\n };\n\n modules.forEach(function(module) {\n // Install Mumps routines (only supported for GT.M fow now)\n if (isGTM) {\n let moduleRoutinesPath = path.join(modulesPath, module.module, 'routines');\n\n if (fs.existsSync(moduleRoutinesPath)) {\n let routines = fs.readdirSync(moduleRoutinesPath);\n\n routines.forEach(function(routine) {\n let sourcePath = path.join(moduleRoutinesPath, routine);\n let targetPath = path.join(gtmRoutinesPath, routine);\n\n cp.execSync(`cp ${sourcePath} ${targetPath}`);\n });\n }\n }\n\n // If service only module, don't try to copy anything.\n if (module.service) return true;\n\n // Install web assets\n // Only works if the following exist:\n // ~/qewd/www/ewd-vista/index.html\n // ~/qewd/www/ewd-vista/assets/javascripts/bundle.js\n let sourcePath = path.join(modulesPath, module.module, 'www');\n\n ncp(sourcePath, webPath, ncpOptions, function(err) {\n if (err) {\n console.log('NCP Error:');\n console.log(err);\n }\n });\n }); // End ~ modules.forEach\n } // End ~ check for production mode\n} // End ~ installModules()", "title": "" }, { "docid": "3dfa2d3dae9d5f40b13b4ed4063003fc", "score": "0.49862543", "text": "module(name) {\n\t\tif (name.startsWith('global:'))\n\t\t\treturn \"require('\"+name.slice(7)+\"')\"\n\t\treturn this.MOPUS + \"('\" + name + \"')\"\n\t}", "title": "" }, { "docid": "95fb827d0f55621037d53ce8d7d65cbd", "score": "0.4984692", "text": "function url2mod (callGraph, node) {\n const url = node.url\n let pkgName\n let modName\n\n if (url === '') return\n if (!url.startsWith('/')) return\n\n const match = url.match(/.*\\/node_modules\\/([^/]*)\\/(.*)/)\n if (match) {\n pkgName = match[1]\n modName = match[2]\n } else {\n pkgName = '(app)'\n modName = path.basename(url)\n }\n\n let pkg = callGraph.packages.get(pkgName)\n if (pkg == null) {\n pkg = new Package(pkgName)\n callGraph.packages.set(pkgName, pkg)\n }\n\n let mod = pkg.modules.get(modName)\n if (mod == null) {\n mod = new Module(pkg, modName, node)\n pkg.modules.set(modName, mod)\n }\n\n return mod\n}", "title": "" }, { "docid": "750bf3742d1726241234d56b7a723d4b", "score": "0.4983847", "text": "_setupSrc () {}", "title": "" }, { "docid": "f058e0d0210191503b46f2eb7775effb", "score": "0.49782395", "text": "function copyReadmeMd(sourceReadmeMd) {\n const libReadmeFile = path.resolve(__dirname, '../src/ngx-slider/README.md');\n\n const sourceReadme = fs.readFileSync(sourceReadmeMd, { encoding: 'utf8'});\n fs.writeFileSync(libReadmeFile, sourceReadme, {encoding: 'utf8'});\n}", "title": "" }, { "docid": "6f23be7fcda8fe2d66c1321978f80c2e", "score": "0.49729455", "text": "static get systemCopyBuffer() {}", "title": "" }, { "docid": "6f23be7fcda8fe2d66c1321978f80c2e", "score": "0.49729455", "text": "static get systemCopyBuffer() {}", "title": "" }, { "docid": "fdc41bb1552dd91adb8358d28c521e85", "score": "0.49714625", "text": "function Module_alloc(){}", "title": "" }, { "docid": "f6e223f19f4780cb9de3bf330c223207", "score": "0.4971001", "text": "function _copyToRelease(/*String*/prefixName, /*String*/prefixPath, /*Object*/kwArgs){\r\n\t//summary: copies modules and supporting files from the prefix path to the release\r\n\t//directory. Also adds code guards to module resources.\r\n\tvar releasePath = kwArgs.releaseDir + \"/\" + prefixName.replace(/\\./g, \"/\");\r\n\tvar copyRegExp = /./;\r\n\t\r\n\t//Use the copyRegExp to filter out tests if requested.\r\n\tif(!kwArgs.copyTests){\r\n\t\tcopyRegExp = new RegExp(prefixName.replace(/\\\\/g, \"/\") + \"/(?!tests)\");\r\n\t}\r\n\r\n\tlogger.info(\"Copying: \" + prefixPath + \" to: \" + releasePath);\r\n\tfileUtil.copyDir(prefixPath, releasePath, copyRegExp);\r\n\t\r\n\t//Put in code guards for each resource, to protect against redifinition of\r\n\t//code in the layered build cases. Do this here before the layers are built.\r\n\tbuildUtil.addGuards(releasePath);\r\n}", "title": "" }, { "docid": "3c53476389323fa6a7e93240636ef979", "score": "0.49628732", "text": "function copy(source, target) {\n _Object__WEBPACK_IMPORTED_MODULE_6__[/* each */ \"d\"](source, function (key, value) {\n target[key] = value;\n });\n return target;\n}", "title": "" }, { "docid": "4430ae5a612ca52485e2efda153a67b0", "score": "0.4954991", "text": "function domodule() {\n let exportM = '\\n// -- Export\\n';\n exportM += `export default ${ES6GLOB}.${libname};`;\n\n return src(`${destination}/${'generic'}.js`)\n .pipe(replace('{{lib:es6:define}}', `const ${ES6GLOB} = {};`))\n .pipe(replace('{{lib:es6:link}}', ES6GLOB))\n .pipe(replace('{{lib:es6:export}}', exportM))\n .pipe(concat(`${name}.mjs`))\n .pipe(dest(destination))\n ;\n}", "title": "" }, { "docid": "344b14eea51ac25183beaa0488250c1d", "score": "0.49470487", "text": "function Module() {}", "title": "" }, { "docid": "344b14eea51ac25183beaa0488250c1d", "score": "0.49470487", "text": "function Module() {}", "title": "" }, { "docid": "02356723e19187b7f11f2a32e1d1842d", "score": "0.49446595", "text": "checkout() {\n return Object(_operations_js__WEBPACK_IMPORTED_MODULE_7__[\"spPost\"])(this.clone(File, \"checkout\"));\n }", "title": "" }, { "docid": "36733012165add4668a56e11a1b9650f", "score": "0.4935017", "text": "function internalRequire (moduleId) {\n // use cached module.exports if module is already instantiated\n if (moduleCache.has(moduleId)) {\n const moduleExports = moduleCache.get(moduleId).exports\n return moduleExports\n }\n\n // load and validate module metadata\n // if module metadata is missing, throw an error\n const moduleData = loadModuleData(moduleId)\n if (!moduleData) {\n const err = new Error('Cannot find module \\'' + moduleId + '\\'')\n err.code = 'MODULE_NOT_FOUND'\n throw err\n }\n if (moduleData.id === undefined) {\n throw new Error('LavaMoat - moduleId is not defined correctly.')\n }\n\n // parse and validate module data\n const { package: packageName, source: moduleSource } = moduleData\n if (!packageName) throw new Error(`LavaMoat - invalid packageName for module \"${moduleId}\"`)\n const packagePolicy = getPolicyForPackage(lavamoatConfig, packageName)\n\n // create the moduleObj and initializer\n const { moduleInitializer, moduleObj } = prepareModuleInitializer(moduleData, packagePolicy)\n\n // cache moduleObj here\n // this is important to inf loops when hitting cycles in the dep graph\n // must cache before running the moduleInitializer\n moduleCache.set(moduleId, moduleObj)\n\n // validate moduleInitializer\n if (typeof moduleInitializer !== 'function') {\n throw new Error(`LavaMoat - moduleInitializer is not defined correctly. got \"${typeof moduleInitializer}\"\\n${moduleSource}`)\n }\n\n // initialize the module with the correct context\n const initializerArgs = prepareModuleInitializerArgs(requireRelativeWithContext, moduleObj, moduleData)\n moduleInitializer.apply(moduleObj.exports, initializerArgs)\n const moduleExports = moduleObj.exports\n\n return moduleExports\n\n // this is passed to the module initializer\n // it adds the context of the parent module\n // this could be replaced via \"Function.prototype.bind\" if its more performant\n function requireRelativeWithContext (requestedName) {\n const parentModuleExports = moduleObj.exports\n const parentModuleData = moduleData\n const parentPackagePolicy = packagePolicy\n const parentModuleId = moduleId\n return requireRelative({ requestedName, parentModuleExports, parentModuleData, parentPackagePolicy, parentModuleId })\n }\n }", "title": "" }, { "docid": "8a93dac67f97f0686a4b37f12fb949de", "score": "0.49344954", "text": "function $32ea97b83cf5d752$export$f09e6d5146bb6da1(fs, packageManager, modules, filePath, projectRoot, options) {\n modules = modules.map((request)=>({\n name: (0, $kXqrB.default)(request.name),\n range: request.range\n })); // Wrap PromiseQueue and track modules that are currently installing.\n // If a request comes in for a module that is currently installing, don't bother\n // enqueuing it.\n let modulesToInstall = modules.filter((m)=>!$32ea97b83cf5d752$var$modulesInstalling.has($32ea97b83cf5d752$var$getModuleRequestKey(m)));\n if (modulesToInstall.length) {\n for (let m of modulesToInstall)$32ea97b83cf5d752$var$modulesInstalling.add($32ea97b83cf5d752$var$getModuleRequestKey(m));\n $32ea97b83cf5d752$var$queue.add(()=>$32ea97b83cf5d752$var$install(fs, packageManager, modulesToInstall, filePath, projectRoot, options).then(()=>{\n for (let m of modulesToInstall)$32ea97b83cf5d752$var$modulesInstalling.delete($32ea97b83cf5d752$var$getModuleRequestKey(m));\n })).then(()=>{}, ()=>{});\n }\n return $32ea97b83cf5d752$var$queue.run();\n}", "title": "" }, { "docid": "4a01e0ad56e6c9c9f082091c7d319714", "score": "0.49340975", "text": "function htmlboilerplate(root) {\n const module = 'node_modules/html5-boilerplate/dist/'\n const loc = find_loc_1(module)\n if(!loc) throw 'Failed to find html5-boilerplate module'\n let html = read(path.join(loc, 'index.html'))\n if(root) copy_referenced_files_1(html, loc, root)\n return html\n\n\n /* outcome/\n * Look for the requested module up the directory tree\n */\n function find_loc_1(m) {\n let curr = __dirname\n let prev\n while(prev != curr) {\n let loc = path.join(curr, m)\n prev = curr\n curr = path.join(curr, '..')\n try {\n let si = fs.lstatSync(loc)\n if(si.isDirectory()) return loc\n } catch(e) {\n /* ignore */\n }\n }\n }\n\n\n function copy_referenced_files_1(html, src, dst) {\n let refs = find_refs_1(html)\n for(let i = 0;i < refs.length;i++) {\n let curr = refs[i].split('/')\n let name = curr.pop()\n let src_ = path.join(src, curr.join(path.sep), name)\n let dst_ = path.join(dst, curr.join(path.sep), name)\n if(fs.existsSync(dst_)) continue\n else copy(src_, dst_)\n }\n }\n\n /* outcome/\n * Find references that match 'href' or 'src' in the html\n */\n function find_refs_1(html) {\n return refs_1('href').concat(refs_1('src'))\n\n function refs_1(t) {\n let rx = new RegExp(`${t}=\"(.*)\"`,'g')\n return Array.from(html.matchAll(rx), m => m[1]).filter(match => !match.startsWith('http'))\n }\n }\n}", "title": "" }, { "docid": "0fa4231bcbf7282fa17770fef163d69b", "score": "0.4929729", "text": "function copy(done) {\n gulp.src(paths.bower + '/inkjs/ink.iife.js')\n .pipe(gulp.dest('./assets/js'))\n done();\n}", "title": "" }, { "docid": "8943477898dbb505f2b50a55c4657835", "score": "0.49240592", "text": "function copyToJsCpd() {\n return gulp.src(['src/**/*', '!src/**/*.wxss', '!src/artifacts/**/*']).pipe(gulp.dest('jscpd'));\n}", "title": "" }, { "docid": "2ef3335affb6e6953ee59ab540b09441", "score": "0.4919959", "text": "function copyFile(src, dest){\n\t\tvar data = fs.readFileSync(src);\n\t\tfs.writeFileSync(dest, data);\n\t}", "title": "" }, { "docid": "37a30f28765857824e2553179c96e7b7", "score": "0.49170154", "text": "copy () {\n const clone = new DAGNode()\n if (this.data && this.data.length > 0) {\n const buf = new Buffer(this.data.length)\n this.data.copy(buf)\n clone.data = buf\n }\n\n if (this.links.length > 0) {\n clone.links = this.links.slice()\n }\n\n return clone\n }", "title": "" }, { "docid": "f7e51c6127874bb07dc58ee3885e467a", "score": "0.49166068", "text": "function testModul(){\n console.log('这是一个模块的入口文件')\n \n}", "title": "" }, { "docid": "6678544463a773050924c6f41d01295e", "score": "0.4916361", "text": "imports(memory, createImports, instantiateSync, binary) {\n let result; // Imports can reference this\n const myImports = {\n // put your web assembly imports here, and return the module\n };\n result = instantiateSync(binary, createImports(myImports));\n // return the entire result object from the loader\n return result;\n }", "title": "" }, { "docid": "f420ba0f15697107b4cadcd21cde3b77", "score": "0.49123445", "text": "function specialCopy (source, destination) {\n fs.mkdirSync(destination);\n var currentDir = fs.readdirSync(source)\n currentDir.forEach(function (item) {\n if (fs.statSync(path.join(source, item)).isFile()) {\n var fd = fs.readFileSync(path.join(source, item), {encoding: 'utf8'});\n fs.writeFileSync(path.join(destination, item), fd, {encoding: 'utf8'});\n } else {\n //Recurse!! Because it is a folder.\n // But make sure it is a directory first.\n if (fs.statSync(path.join(source, item)).isDirectory()) {\n specialCopy(path.join(source, item), path.join(destination, item));\n }\n }\n });\n }", "title": "" }, { "docid": "51ccbd833f80f680120a7417e426d22e", "score": "0.4909579", "text": "function copyFiles(product, name) {\n\n console.log('Copying ' + name + ' files...');\n\n // Copy the files over to shim repo\n fs.readdir('build/dist/' + product + '/js/', function (err, files) {\n if (err) {\n throw err;\n }\n\n files.forEach(function (src) {\n if (src.indexOf('.') !== 0) {\n fs.copy(\n 'build/dist/' + product + '/js/' + src,\n '../' + product + '-release/' + src,\n function (err) {\n if (err) {\n throw err;\n }\n }\n );\n }\n });\n });\n }", "title": "" }, { "docid": "2356c5fbefcc120990b04086aef4057d", "score": "0.49026963", "text": "function v(t){\n/******/ // Check if module is in cache\n/******/if(n[t])\n/******/return n[t].exports;\n/******/\n/******/ // Create a new module (and put it into the cache)\n/******/var e=n[t]={\n/******/ // no module.id needed\n/******/ // no module.loaded needed\n/******/exports:{}\n/******/};\n/******/\n/******/ // Execute the module function\n/******/\n/******/\n/******/ // Return the exports of the module\n/******/return r[t].call(e.exports,e,e.exports,v),e.exports;\n/******/}", "title": "" }, { "docid": "6f3509ce6b65100935693e1dc49b0ba4", "score": "0.49008483", "text": "clone() {\n throw new Error('Cannot clone node');\n }", "title": "" }, { "docid": "0e57a25b6a8ef0beccc2dbcbe2428efc", "score": "0.49006748", "text": "function transformCommonJSModule(node) {\n startLexicalEnvironment();\n var statements = [];\n var ensureUseStrict = ts.getStrictOptionValue(compilerOptions, \"alwaysStrict\") || (!compilerOptions.noImplicitUseStrict && ts.isExternalModule(currentSourceFile));\n var statementOffset = factory.copyPrologue(node.statements, statements, ensureUseStrict && !ts.isJsonSourceFile(node), topLevelVisitor);\n if (shouldEmitUnderscoreUnderscoreESModule()) {\n ts.append(statements, createUnderscoreUnderscoreESModule());\n }\n if (ts.length(currentModuleInfo.exportedNames)) {\n var chunkSize = 50;\n for (var i = 0; i < currentModuleInfo.exportedNames.length; i += chunkSize) {\n ts.append(statements, factory.createExpressionStatement(ts.reduceLeft(currentModuleInfo.exportedNames.slice(i, i + chunkSize), function (prev, nextId) { return factory.createAssignment(factory.createPropertyAccessExpression(factory.createIdentifier(\"exports\"), factory.createIdentifier(ts.idText(nextId))), prev); }, factory.createVoidZero())));\n }\n }\n ts.append(statements, ts.visitNode(currentModuleInfo.externalHelpersImportDeclaration, topLevelVisitor, ts.isStatement));\n ts.addRange(statements, ts.visitNodes(node.statements, topLevelVisitor, ts.isStatement, statementOffset));\n addExportEqualsIfNeeded(statements, /*emitAsReturn*/ false);\n ts.insertStatementsAfterStandardPrologue(statements, endLexicalEnvironment());\n var updated = factory.updateSourceFile(node, ts.setTextRange(factory.createNodeArray(statements), node.statements));\n ts.addEmitHelpers(updated, context.readEmitHelpers());\n return updated;\n }", "title": "" }, { "docid": "0e57a25b6a8ef0beccc2dbcbe2428efc", "score": "0.49006748", "text": "function transformCommonJSModule(node) {\n startLexicalEnvironment();\n var statements = [];\n var ensureUseStrict = ts.getStrictOptionValue(compilerOptions, \"alwaysStrict\") || (!compilerOptions.noImplicitUseStrict && ts.isExternalModule(currentSourceFile));\n var statementOffset = factory.copyPrologue(node.statements, statements, ensureUseStrict && !ts.isJsonSourceFile(node), topLevelVisitor);\n if (shouldEmitUnderscoreUnderscoreESModule()) {\n ts.append(statements, createUnderscoreUnderscoreESModule());\n }\n if (ts.length(currentModuleInfo.exportedNames)) {\n var chunkSize = 50;\n for (var i = 0; i < currentModuleInfo.exportedNames.length; i += chunkSize) {\n ts.append(statements, factory.createExpressionStatement(ts.reduceLeft(currentModuleInfo.exportedNames.slice(i, i + chunkSize), function (prev, nextId) { return factory.createAssignment(factory.createPropertyAccessExpression(factory.createIdentifier(\"exports\"), factory.createIdentifier(ts.idText(nextId))), prev); }, factory.createVoidZero())));\n }\n }\n ts.append(statements, ts.visitNode(currentModuleInfo.externalHelpersImportDeclaration, topLevelVisitor, ts.isStatement));\n ts.addRange(statements, ts.visitNodes(node.statements, topLevelVisitor, ts.isStatement, statementOffset));\n addExportEqualsIfNeeded(statements, /*emitAsReturn*/ false);\n ts.insertStatementsAfterStandardPrologue(statements, endLexicalEnvironment());\n var updated = factory.updateSourceFile(node, ts.setTextRange(factory.createNodeArray(statements), node.statements));\n ts.addEmitHelpers(updated, context.readEmitHelpers());\n return updated;\n }", "title": "" } ]
67b0073b0c06520b6cafc7a57210b6d1
Game Logic // //////////////// Game Object
[ { "docid": "76be503ffbdc3a567553d2c3ee0daf91", "score": "0.0", "text": "function game(codeWidth) {\n this.codeWidth = codeWidth;\n this.createGame = function(codeWidth) {\n for (i=0; i < 10; i++) {\n var gameLine = \"<div class='flat-line'>\";\n for (j=0; j < codeWidth; j++) {\n gameLine += \"<div class='flat-block' style='width:\" + (100/codeWidth) + \"%'></div>\"\n }\n gameLine += \"</div>\";\n $(\"div.board\").append(gameLine);\n }\n }\n this.start = function() {\n $(\"div.pre-question\").hide();\n $(\"div.game\").show();\n }\n this.clear = function() {\n $(\"div.board\").empty();\n $(\"div.game\").hide();\n $(\"div.pre-question\").show();\n }\n this.generateCode = function (codeWidth) {\n // Create the Code object\n var generatedCode = [];\n for(i=0; i < codeWidth; i++) {\n // Generate the code and push it to the array\n generatedCode.push(Math.floor((Math.random() * 6) + 1));\n }\n return generatedCode;\n }\n this.active = true;\n}", "title": "" } ]
[ { "docid": "898db7409ba92bd5c1e399ed0a0e0753", "score": "0.7356691", "text": "function Game() { }", "title": "" }, { "docid": "ccbdeaba40a704bb6720f934e00ddbf9", "score": "0.7268507", "text": "function Game(){\n\t}", "title": "" }, { "docid": "8a2139b2b14b258425172cc8b4ea63d7", "score": "0.7258225", "text": "function game (){\n render();\n // also need the game to update scores and refresh\n update();\n}", "title": "" }, { "docid": "53aa11f3cf14ea03fb9c63b37a256d07", "score": "0.72442704", "text": "function gameEngine() {\n // Updating the snake array and food\n isCollided(snakeArray);\n // Display the snake\n snakeDisplay();\n // Display the food\n foodDisplay();\n // Eating food\n foodEaten();\n // Updating the score\n setHighScore();\n // displaying the score\n displayScores();\n // moving the snake\n moveSnake();\n}", "title": "" }, { "docid": "a419fffa64369c58db2a49aff844e7ca", "score": "0.72133505", "text": "function game()\n{\n\tupdate();\n\trender();\n}", "title": "" }, { "docid": "7be6405f16b47d350da582b51017c428", "score": "0.7186727", "text": "function GameState() {\n}", "title": "" }, { "docid": "1b8f164030deac82e56723b885a11105", "score": "0.71852547", "text": "function engine() {\n \n if(actualState == gameStates.play){\n //novo comando de movimento\n avatar.velocidade = 0;\n avatar.booster = 0;\n if(keyState[\"w\"] || keyState[\"ArrowUp\"]){\n avatar.speedUp();\n };\n\n if(keyState[\"s\"] || keyState[\"ArrowDown\"]){\n avatar.speedDown();\n };\n atualiza();\n };\n if(keyState[\"Escape\"]){\n actualState = gameStates.pause;\n };\n if(keyState[\"Enter\"] && actualState == gameStates.pause){\n actualState = gameStates.play;\n };\n if(keyState[\"Enter\"] && actualState == gameStates.lose){\n actualState = gameStates.start;\n };\n if(actualState == gameStates.lose){\n clear();\n score = 0;\n };\n desenha();\n window.requestAnimationFrame(engine);\n}", "title": "" }, { "docid": "1aa0d4be723c23dbd2c702788c3b49bb", "score": "0.7169843", "text": "function game() {\n dessinerSerpent();\n dessinerPomme();\n detectionCollision();\n verifMangerPomme();\n gestionVieSerpent();\n gestionBonus();\n }", "title": "" }, { "docid": "184d72b80113623706ffd28b67d52d02", "score": "0.71610504", "text": "function game() {\n audio.play();\n gameOver();\n \n \n player.draw();\n player2.draw();\n\n player.movePlayer();\n player2.movePlayer();\n\n player.updatePoints();\n player2.updatePoints();\n\n //---------------------------------BARRERAS \n barriers.draw();\n barriers.collision(player); \n barriers2.draw();\n barriers2.collision(player);\n barriers4.draw();\n barriers4.collision(player);\n barriers5.draw();\n barriers5.collision(player);\n barriers6.draw();\n barriers6.collision(player);\n barriers7.draw();\n barriers7.collision(player);\n barriers8.draw();\n barriers8.collision(player);\n barriers9.draw();\n barriers9.collision(player);\n barriers10.draw();\n barriers10.collision(player);\n barriers11.draw();\n barriers11.collision(player);\n barriers12.draw();\n barriers12.collision(player);\n //---------------------------------OBJETOS DE DAMAGE\n dmgOb[0].draw();\n dmgOb[0].collision(player); \n dmgOb[1].draw();\n dmgOb[1].collision(player);\n dmgOb[2].draw();\n dmgOb[2].collision(player);\n dmgOb[3].draw();\n dmgOb[3].collision(player);\n dmgOb[4].draw();\n dmgOb[4].collision(player);\n dmgOb[5].draw();\n dmgOb[5].collision(player);\n dmgOb[6].draw();\n dmgOb[6].collision(player);\n dmgOb[7].draw();\n dmgOb[7].collision(player);\n //---------------------------------OBJETOS DE HEAL\n healthOb[0].draw();\n healthOb[0].collision(player); \n healthOb[1].draw();\n healthOb[1].collision(player);\n healthOb[2].draw();\n healthOb[2].collision(player);\n healthOb[3].draw();\n healthOb[3].collision(player);\n healthOb[4].draw();\n healthOb[4].collision(player);\n healthBottle.draw();\n healthBottle.collision(player);\n //---------------------------------OBJETOS VARIOS\n fastPill.draw();\n fastPill.collision(player);\n portal.draw();\n portal.collision(player);\n portal2.draw();\n portal2.collision(player);\n slowButton.draw();\n slowButton.collision(player);\n slowButton2.draw();\n slowButton2.collision(player);\n stoper();\n \n \n\n // ctx.fillText(\"p1_x: \" + player.x, 10,20);\n // ctx.fillText(\"p1_y: \" + player.y, 10,35);\n // ctx.fillText(\"Health: \" + player.health, 10,50);\n // ctx.fillText(\"p2_x: \" + player2.x, 400,20);\n // ctx.fillText(\"p2_y: \" + player2.y, 400,35);\n // ctx.fillText(\"Health: \" + player2.health, 400,50);\n}", "title": "" }, { "docid": "088fa682da23a52bdceaf164f4c4c76f", "score": "0.71465415", "text": "function Logic(game) {\n this.game = game;\n this.gameFinished = false;\n //this.gameFinished = false;\n\n this.init = function () {\n game.init();\n }\n\n this.resetGame = function () {\n this.game = new Game(this.game.canvas)\n //this.game.init();\n }\n\n this.stopGame = function () {\n this.game.stop();\n }\n\n this.updateMovement = function (input) {\n //console.log(this.game.players)\n //left\n if (input[37]) {\n for( var i = 0; i < this.game.players.length; i++){\n if(this.game.players[i].id==0) {\n this.game.players[i].speedX += -1;\n }\n }\n }\n //right\n if (input[39]) {\n for( var i = 0; i < this.game.players.length; i++){\n if(this.game.players[i].id==0) {\n this.game.players[i].speedX += 1;\n }\n }\n }\n //up\n if (input[38]) {\n for( var i = 0; i < this.game.players.length; i++){\n if(this.game.players[i].id==0) {\n this.game.players[i].speedY += -1;\n }\n }\n }\n //down\n if (input[40]) {\n for( var i = 0; i < this.game.players.length; i++){\n if(this.game.players[i].id==0) {\n this.game.players[i].speedY += 1;\n }\n }\n }\n\n if (input[32]) {\n var player;\n for( var i = 0; i < this.game.players.length; i++){\n if(this.game.players[i].id==0) {\n player = this.game.players[i];\n }\n }\n var hasBomb = false;\n var flag = false;\n var c = getGridPlayerPosition(player, this.game);\n\n for (var k = 0; k < this.game.players.length; k++) {\n for (var m = 0; m < this.game.players[k].bombs.length; m++) {\n var p = getGridPlayerPosition(this.game.players[k].bombs[m], this.game);\n if (c == p) {\n flag = true;\n }\n }\n }\n if (!flag) {\n\n var bombCoords = getGridTilePoint(c, this.game.xTiles, this.game.yTiles, this.game.gridSize.w, this.game.gridSize.h);\n console.log(bombCoords)\n console.log(player);\n player.plantBomb(bombCoords[0], bombCoords[1], this.game.gridSize);\n }\n }\n\n //player 2\n if (input[65]) {\n for( var i = 0; i < this.game.players.length; i++){\n if(this.game.players[i].id==1) {\n this.game.players[i].speedX += -1;\n }\n }\n }\n //d\n if (input[68]) {\n for( var i = 0; i < this.game.players.length; i++){\n if(this.game.players[i].id==1) {\n this.game.players[i].speedX += 1;\n }\n }\n }\n //w\n if (input[87]) {\n for( var i = 0; i < this.game.players.length; i++){\n if(this.game.players[i].id==1) {\n this.game.players[i].speedY += -1;\n }\n }\n }\n //s\n if (input[83]) {\n for( var i = 0; i < this.game.players.length; i++){\n if(this.game.players[i].id==1) {\n this.game.players[i].speedY += 1;\n }\n }\n }\n\n if (input[48]) {\n var player;\n for( var i = 0; i < this.game.players.length; i++){\n if(this.game.players[i].id==1) {\n player = this.game.players[i];\n break;\n }\n }\n var hasBomb = false;\n var flag = false;\n var c = getGridPlayerPosition(player, this.game);\n\n for (var k = 0; k < this.game.players.length; k++) {\n for (var m = 0; m < this.game.players[k].bombs.length; m++) {\n var p = getGridPlayerPosition(this.game.players[k].bombs[m], this.game);\n if (c == p) {\n flag = true;\n }\n }\n }\n if (!flag) {\n var bombCoords = getGridTilePoint(c, this.game.xTiles, this.game.yTiles, this.game.gridSize.w, this.game.gridSize.h);\n player.plantBomb(bombCoords[0], bombCoords[1], this.game.gridSize);\n }\n }\n }\n\n\n // Update the animation conter\n this.updateAnimationCounter = function (animation) {\n // update to the next frame if it is time\n if (animation.counter == (animation.frameSpeed - 1))\n animation.currentFrame = (animation.currentFrame + 1) % animation.animationSequence.length;\n // update the counter\n animation.counter = (animation.counter + 1) % animation.frameSpeed;\n }\n\n this.updateGameStep = function () {\n if (this.game.gameRunning) {\n for (var i = 0; i < this.game.players.length; i++) {\n if (!this.game.players[i].alive && !this.game.players[i].removed) {\n this.killPlayer(this.game.players[i]);\n this.game.players[i].direction = 5;\n }\n if (this.game.players[i].alive) {\n if (this.game.players[i] instanceof Bot) {\n //get bot moves\n var nextMove = this.game.players[i].botAI.getNextMove(this.game);\n this.game.players[i].speedX = nextMove[0];\n this.game.players[i].speedY = nextMove[1];\n //wants to plant bomb\n if (nextMove[2]) {\n var c = getGridPlayerPosition(this.game.players[i], this.game);\n var bombCoords = getGridTilePoint(c, this.game.xTiles, this.game.yTiles, this.game.gridSize.w,\n this.game.gridSize.h);\n\n var flag = false;\n var p = getGridPlayerPosition(this.game.players[i], this.game);\n\n for (var k = 0; k < this.game.players.length; k++) {\n for (var m = 0; m < this.game.players[k].bombs.length; m++) {\n var c = getGridPlayerPosition(this.game.players[k].bombs[m], this.game);\n if (c == p) {\n flag = true;\n }\n }\n }\n if (!flag) {\n this.game.players[i].plantBomb(bombCoords[0], bombCoords[1], this.game.gridSize);\n }\n }\n }\n //calculate potential movement direction and adjust for lateral lines\n // if movement is lateral, sqrt the value\n var total = Math.abs(this.game.players[i].speedX) + Math.abs(this.game.players[i].speedY);\n if (total != 0) {\n var scalar = Math.sqrt(total) / total;\n this.game.players[i].speedX *= (this.game.moveSize * scalar) * this.game.players[i].speed;\n this.game.players[i].speedY *= (this.game.moveSize * scalar) * this.game.players[i].speed;\n }\n //check for collisions\n this.checkForCollisions(this.game.players[i], this.game);\n\n //update player animation\n this.updateAnimationCounter(this.game.players[i].animations[this.game.players[i].direction]);\n if (this.game.players[i] instanceof Bot) {\n if (this.game.players[i].x == this.game.players[i].botAI.previousX &&\n this.game.players[i].y == this.game.players[i].botAI.previousY) {\n this.game.players[i].moving = false;\n }\n }\n }\n }\n\n //check if boxes have been destroyed\n for (var i = 0; i < this.game.destroyableArea.length; i++) {\n var desArea = this.game.destroyableArea[i];\n //update destroyable are animation\n this.updateAnimationCounter(desArea.sprite);\n if (desArea.triggered && !desArea.exploding) {\n desArea.explode();\n }\n else if (desArea.exploded) {\n this.game.destroyableArea.splice(this.game.destroyableArea.indexOf(desArea), 1);\n }\n\n }\n\n //check for all bombs and damage to players and surronding\n for (var i = 0; i < this.game.players.length; i++) {\n for (var j = 0; j < this.game.players[i].bombs.length; j++) {\n this.updateAnimationCounter(this.game.players[i].bombs[j].sprite);\n ///////////////////////////////////////////////////\n var bombb = this.game.players[i].bombs[j];\n bombb.update();\n if (bombb.timer <= 0 && !bombb.exploding) {\n bombb.explode();\n this.game.bombSound.play();\n }\n //TODO restore this\n else if (bombb.exploded) {\n this.game.players[i].bombs.splice(this.game.players[i].bombs.indexOf(bombb), 1);\n bombb.alive = false;\n }\n //login here to injure player/destroy wall\n else if (bombb.exploding) {\n for (var q = 0; q < bombb.fire.length; q++) {\n if (bombb.fire[q] != null) {\n //bombb.fire[q].update()\n removeFlag = false;\n for (var x = 0; x < this.game.players.length; x++) {\n if (getGridPosition(this.game.players[x], this.game) ==\n getGridPosition(bombb.fire[q], this.game)) {\n //window.alert(\"you died\")\n //TODO restore this if\n if(this.game.players[x].godMode){\n continue;\n }\n this.game.players[x].alive = false\n this.game.players[x].direction = 5;\n //flag for removal of objects\n removeFlag = true;\n }\n }\n\n for (var x = 0; x < this.game.destroyableArea.length; x++) {\n if (bombb.fire[q] != null && !this.game.destroyableArea[x].triggered &&\n getGridPosition(this.game.destroyableArea[x], this.game) ==\n getGridPosition(bombb.fire[q], this.game)) {\n this.game.destroyableArea[x].triggered = true;\n //random perk\n var rand = Math.floor(Math.random() * 3);\n //odds of getting a perk\n var perkOdds = Math.random();\n if (perkOdds < 0.3) {\n this.game.perks.push(new Perk(this.game.destroyableArea[x].x,\n this.game.destroyableArea[x].y, this.game.context, this.game.gridSize, rand));\n }\n removeFlag = true;\n }\n }\n\n for (var x = 0; x < this.game.solidArea.length; x++) {\n if (getGridPosition(this.game.solidArea[x], this.game) ==\n getGridPosition(bombb.fire[q], this.game)) {\n removeFlag = true;\n }\n }\n\n if (removeFlag) {\n //set to null to keep positioning of all fires\n bombb.fire[q] = null;\n //bombb.fire.splice(bombb.fire.indexOf(bombb.fire[q]), 1)\n }\n if (bombb.fire[q] != null) {\n this.updateAnimationCounter(bombb.fire[q].sprite);\n }\n }\n }\n\n }\n\n }\n }\n\n //remove destroyed players\n var counter = 0;\n for (var i = 0; i < this.game.players.length; i++) {\n if (this.game.players[i].removed) {\n counter++;\n console.log(this.game.players, i)\n this.game.players.splice(i, 1);\n console.log(this.game.players)\n return;\n }\n }\n //console.log(counter);\n\n //check if anyone still alive\n var counter = 0;\n if (this.game.players.length <= 1) {\n if (!this.gameFinished) {\n this.gameFinished = true;\n this.endGame();\n return;\n }\n }\n }\n }\n\n this.endGame = function () {\n var self = this;\n setTimeout(function () {\n self.game.gameRunning = false;\n self.game.gameloopSound.stop();\n self.gameFinished = false;\n console.log(\"stopping game\");\n //self.game = null;\n }, 1000)\n };\n\n this.killPlayer = function (player) {\n setTimeout(function () {\n player.removed = true;\n //console.log(\"getting rid of player\")\n }, 1000)\n }\n\n this.checkForCollisions = function (player) {\n if (player.id === 0) {\n }\n //check for collisions here\n var moveX = true;\n var moveY = true;\n for (var i = 0; i < this.game.players.length; i++) {\n for (var j = 0; j < this.game.players[i].bombs.length; j++) {\n if (player.bombs.indexOf(this.game.players[i].bombs[j]) != -1) {\n continue;\n }\n //test for bombs for each player\n var crash = this.crashWithRectangele(player, this.game.players[i].bombs[j]);\n if (crash == 0) {\n player.speedY = Math.max(player.speedY, 0);\n }\n if (crash == 1) {\n player.speedX = Math.min(player.speedX, 0);\n }\n if (crash == 2) {\n player.speedY = Math.min(player.speedY, 0);\n }\n if (crash == 3) {\n player.speedX = Math.max(player.speedX, 0);\n }\n }\n\n //skip if found itself\n if (player.id == this.game.players[i].id) {\n continue;\n }\n var crash = this.crashWithRectangele(player, this.game.players[i]);\n if (crash == 0) {\n player.speedY = Math.max(player.speedY, 0);\n }\n if (crash == 1) {\n player.speedX = Math.min(player.speedX, 0);\n }\n if (crash == 2) {\n player.speedY = Math.min(player.speedY, 0);\n }\n if (crash == 3) {\n player.speedX = Math.max(player.speedX, 0);\n }\n }\n\n for (var i = 0; i < this.game.destroyableArea.length; i++) {\n var crash = this.crashWithRectangele(player, this.game.destroyableArea[i]);\n if (crash == 0) {\n player.speedY = Math.max(player.speedY, 0);\n }\n if (crash == 1) {\n player.speedX = Math.min(player.speedX, 0);\n }\n if (crash == 2) {\n player.speedY = Math.min(player.speedY, 0);\n }\n if (crash == 3) {\n player.speedX = Math.max(player.speedX, 0);\n }\n }\n\n for (var i = 0; i < this.game.solidArea.length; i++) {\n var crash = this.crashWithRectangele(player, this.game.solidArea[i]);\n if (crash == 0) {\n player.speedY = Math.max(player.speedY, 0);\n }\n if (crash == 1) {\n player.speedX = Math.min(player.speedX, 0);\n }\n if (crash == 2) {\n player.speedY = Math.min(player.speedY, 0);\n }\n if (crash == 3) {\n player.speedX = Math.max(player.speedX, 0);\n }\n }\n\n for (var i = 0; i < this.game.perks.length; i++) {\n var crash = this.crashWithRectangele(player, this.game.perks[i]);\n if (crash >= 0) {\n //play sound\n this.game.powerupSound.play();\n player.addPerk(this.game.perks[i]);\n this.game.perks.splice(this.game.perks.indexOf(this.game.perks[i]), 1);\n }\n }\n\n\n this.updatePlayerLocation(player)\n }\n ;\n\n this.updatePlayerLocation = function (player) {\n player.x += player.speedX;\n player.y += player.speedY;\n\n //set player direction for animation\n if (player.speedX == 0 && player.speedY > 0) {\n player.direction = 1;\n }\n else if (player.speedX < 0 && player.speedY > 0) {\n player.direction = 2;\n }\n else if (player.speedX < 0 && player.speedY == 0) {\n player.direction = 3;\n }\n else if (player.speedX < 0 && player.speedY < 0) {\n player.direction = 4;\n }\n else if (player.speedX == 0 && player.speedY < 0) {\n player.direction = 5;\n }\n else if (player.speedX > 0 && player.speedY < 0) {\n player.direction = 6;\n }\n else if (player.speedX > 0 && player.speedY == 0) {\n player.direction = 7;\n }\n else if (player.speedX > 0 && player.speedY > 0) {\n player.direction = 8;\n }\n else player.direction = 0;\n //reset values\n player.speedX = 0;\n player.speedY = 0;\n }\n\n this.crashWithRectangele = function (player, otherobj) {\n var mytop = (player.y + player.speedY) + (player.size.h / 3)\n var mybottom = player.y + player.speedY + (player.size.h) - (player.size.h / 3);\n var myleft = (player.x + player.speedX) + (player.size.w / 3);\n var myright = player.x + player.speedX + (player.size.w) - (player.size.w / 3);\n var othertop = otherobj.y;\n var otherbottom = otherobj.y + (otherobj.size.h);\n var otherleft = otherobj.x;\n var otherright = otherobj.x + (otherobj.size.w);\n if (\n (myright <= otherleft) ||\n (myleft >= otherright) ||\n (mybottom <= othertop) ||\n (mytop >= otherbottom)) {\n }\n else {\n var l = Math.abs(myleft - otherright);\n var r = Math.abs(myright - otherleft);\n var t = Math.abs(mytop - otherbottom);\n var b = Math.abs(mybottom - othertop);\n var min = Math.min(l, r, t, b);\n\n if (t == min) {\n return 0;\n }\n if (r == min) {\n return 1;\n }\n if (b == min) {\n return 2;\n }\n if (l == min) {\n return 3;\n }\n return -1;\n }\n };\n\n this.crashWithCircle = function (player, otherobj) {\n var mytop = player.y;\n var mybottom = player.y + player.speedY + (player.size.h);\n var myleft = player.x + player.speedX;\n var myright = player.x + player.speedX + (player.size.w);\n var othertop = otherobj.y - (otherobj.radius);\n var otherbottom = otherobj.y + (otherobj.radius);\n var otherleft = otherobj.x - (otherobj.radius);\n var otherright = otherobj.x + (otherobj.radius);\n //var crash = -1\n if (\n (myright <= otherleft) ||\n (myleft >= otherright) ||\n (mybottom <= othertop) ||\n (mytop >= otherbottom)) {\n }\n else {\n var l = Math.abs(myleft - otherright);\n var r = Math.abs(myright - otherleft);\n var t = Math.abs(mytop - otherbottom);\n var b = Math.abs(mybottom - othertop);\n var min = Math.min(l, r, t, b);\n\n if (t == min) {\n return 0;\n }\n if (r == min) {\n return 1;\n }\n if (b == min) {\n return 2;\n }\n if (l == min) {\n return 3;\n }\n return -1;\n }\n }\n\n\n}", "title": "" }, { "docid": "d3c5e2847406065f1c76fc13ce1ad5a9", "score": "0.7096554", "text": "function Game() {\n\n // establecen los parametros iniciales del juego\n this.config = {\n bombRate: 0.1, //cantidad de bombas que se lanzan\n bombMinVelocity: 60,//velocidades de las bombas\n bombMaxVelocity: 60,\n invaderInitialVelocity: 30,//velocidad a la que se mueven los aliens\n invaderAcceleration: 0,\n invaderDropDistance: 20,\n rocketVelocity: 120,//velovidad de los metioritos\n rocketMaxFireRate: 2,\n gameWidth: 600,\n gameHeight: 300,\n fps: 50,\n debugMode: false,\n invaderRanks: 3,//columnas de aliens\n invaderFiles: 8,//filas de aliens\n shipSpeed: 140,//velocidad de disparo\n levelDifficultyMultiplier: 0.4,//por cada nivel se incrementara en un 0.4\n pointsPerInvader: 5,//puntos por matar\n limitLevelIncrease: 25,\n \n };\n\n \n\n // los parametos iniciales del juego.\n this.lives = 5;//cantidad de vidas\n this.width = 0;\n this.height = 0;\n this.gameBounds = {left: 0, top: 0, right: 0, bottom: 0};\n this.intervalId = 0;\n this.score = 0;\n this.level = 1;\n\n \n this.stateStack = [];\n\n \n this.pressedKeys = {};\n this.gameCanvas = null;\n\n \n this.sounds = null;\n\n // variable que guardara la posision anterior\n this.previousX = 0;\n}", "title": "" }, { "docid": "bea42e20453475fe773930239797db9a", "score": "0.70807314", "text": "function game()\n{\n update();\n render();\n}", "title": "" }, { "docid": "2dc966a502fe4c71fd24dfb0f513ae5b", "score": "0.7071146", "text": "winGame() {\n gameWon();\n }", "title": "" }, { "docid": "0ae7520c734be57554ed9bf6f569a67b", "score": "0.70692366", "text": "function Game() {\n}", "title": "" }, { "docid": "64dbfc1ba3b4bdef2ec5f424ddadb967", "score": "0.7021649", "text": "init() {\r\n //const result = this.isGameEnd([4],gameModeStevenl.wining_positions);\r\n //console.log(result);\r\n\r\n this.assignPlayer();\r\n gameView.init();\r\n }", "title": "" }, { "docid": "b865c91e7039dfca95c495d335950957", "score": "0.7019216", "text": "function game() {\n update();\n paint();\n}", "title": "" }, { "docid": "c33d7b46fe5641256b73690e040ecc55", "score": "0.6975413", "text": "updateGame(){\n //Update state of objectives\n this.isObjectiveTaken();\n //Update if game is over \n this.isOver();\n\n //check whether game is over\n if(!this.gameOver){\n //updates all players data\n this.updatePlayers();\n }\n }", "title": "" }, { "docid": "ae2d76a33e8588c10e811a0c1da142e9", "score": "0.6955756", "text": "function GameEngine() {\r\n\r\n this.allMaps = [];\r\n // Entities of the Game\r\n this.entities = []; // All entities of the game\r\n this.weapons = []; // All the weapons of the game\r\n this.items = [];\r\n this.villains = []; // All the Zombies | TODO ? Get rid or change ?\r\n this.players = []; // All the Players | TODO ? Get rid or change ?\r\n this.gameRunning = true;\r\n this.musicPlaying = true;\r\n this.deadPlayers = [];\r\n\r\n // This is the x and y of the game, they control the rotation of the player\r\n this.x;\r\n this.y;\r\n\r\n this.map = null;\r\n //this.menuMode = \"Game\";\r\n this.menuMode = \"Start\";\r\n this.hasSeenIntro = false;\r\n\r\n this.zombieCooldownNumInitial = 3; // how often a zombie will appear initially\r\n this.zombieCooldown = this.zombieCooldownNumInitial; // the cooldown until the next zombie appears\r\n \r\n \r\n this.spiderCooldownNumInitial = 2; // how often a spider will appear\r\n this.spiderCooldown = this.zombieCooldownNumInitial; // the cooldown until the next spider appears\r\n \r\n this.skeletonCooldownNumInitial = 4; // how often a skeleton will appear\r\n this.skeletonCooldown = this.zombieCooldownNumInitial; // the cooldown until the next skeleton appears\r\n\r\n this.kills = 0; // this is the number of kills that the player has total\r\n\r\n this.showOutlines = false; // this shows the outline of the entities\r\n this.ctx = null; // this is the object being used to draw on the map\r\n this.click = null; // this is the click value (if null, not being clicked)\r\n\r\n this.mouse = {x:0, y:0, mousedown:false}; // this is the mouse coordinates and whether the mouse is pressed or not\r\n\r\n this.surfaceWidth = null; // the width of the canvas\r\n this.surfaceHeight = null; // the height of the canvas\r\n\r\n // var source= document.createElement('source');\r\n // source.type= 'audio/ogg';\r\n // source.src= \"./sound/backgroundmusic1.ogg\";\r\n // this.backgroundaudio.appendChild(source);\r\n // source= document.createElement('source');\r\n // source.type= 'audio/mpeg';\r\n // source.src= \"./sound/fastfoot.mp3\";\r\n // this.backgroundaudio.appendChild(source);\r\n // console.log(this.backgroundaudio);\r\n this.setupSounds();\r\n\r\n \r\n this.attributePoints = 0;\r\n // FOREST MAP\r\n // this.worldWidth = 1600; // the width of the world within the canvas FOREST\r\n // this.worldHeight = 1600; // the height of the world within the canvas FOREST\r\n\r\n // this.mapRatioWidth = 1600; //\r\n // this.mapRationHeight = 1600;\r\n\r\n // HOSPITAL MAP\r\n // this.worldWidth = 1400; // the width of the world within the canvas HOSPITAL\r\n // this.worldHeight = 1350; // the height of the world within the canvas HOSPITAL\r\n\r\n // this.mapRatioWidth = 400;\r\n // this.mapRatioHeight = 400;\r\n\r\n this.windowX = 0; // This is the x-coordinate of the top left corner of the canvas currently\r\n this.windowY = 0; // This is the y-coordinate of the top left corner of the canvas currently\r\n\r\n // Quinn's Additions\r\n this.timer = new Timer(); // this creates the Object Timer for the Game Engine\r\n this.keyState = {}; // this is the current keystate which is an object that is nothing\r\n\r\n this.expToLevelUp = 10;\r\n this.level = 1;\r\n this.expEarned = 0;\r\n\r\n this.menuBackground = ASSET_MANAGER.getAsset(menuBackground);\r\n this.aura = false;\r\n\r\n this.maxHalo = 10;\r\n this.halo = this.maxHalo;\r\n}", "title": "" }, { "docid": "d1bd9a2c209b0a6c046803100f296372", "score": "0.6948416", "text": "function draw(game)\n{\n game.draw();\n\n\n}", "title": "" }, { "docid": "9437ca1277242d2f04711c316823d0a3", "score": "0.69456106", "text": "launchGame() {\n this.grid.generate()\n this.grid.generateWalls()\n this.grid.generateWeapon('axe', this.grid.giveRandomCase())\n this.grid.generateWeapon('pickaxe', this.grid.giveRandomCase())\n this.grid.generateWeapon('sword', this.grid.giveRandomCase())\n this.grid.generateWeapon('rod', this.grid.giveRandomCase())\n \n this.shears = new Weapon('shears', 10)\n this.sword = new Weapon('sword', 20)\n this.axe = new Weapon('axe', 30)\n this.pickaxe = new Weapon('pickaxe', 40)\n this.rod = new Weapon('rod', 50)\n\n var position_player1 = -1\n var position_player2 = -1\n\n do {\n position_player1 = this.grid.generatePlayer('1')\n this.player1.setPosition(position_player1)\n } while (position_player1 == -1)\n\n do {\n position_player2 = this.grid.generatePlayer('2')\n this.player2.setPosition(position_player2)\n } while (position_player2 == -1 || this.grid.isNextToPlayer(position_player2))\n\n this.game_status = $('#game_status')\n this.game_status.html('Recherche d\\'armes pour les deux joueurs...')\n }", "title": "" }, { "docid": "62c60401a904feb0d7c812903b07d2af", "score": "0.6944768", "text": "function Game(){\n\n\t// PROTECTED\n\tvar game = this; // this is an evil thing\n\tvar isRunning = false;\n\n\t// temporary hack\n\tthis.canvas = document.getElementById('myCanvas');\n\n\t// PUBLIC\n\tthis.stage = new Stage(this.canvas);\n\tthis.eventManager = new EventManager();\n\tthis.loader = new Loader();\n\n\t// Lookup tables\n\tthis.assets = {};\n\tthis.colors = {};\n\n\t// Components\n\tthis.scenes = [];\n\tthis.currentScene = null;\n\n\tthis.encounters = [];\n\tthis.currentEncounter = null;\n\n\tthis.mode = \"SCENE\"; // SCENE, INVENTORY/PLACE_OBJECT (?) or ENCOUNTER\n\n\tthis.addColor = function(name,style){\n\t\tthis.colors[name] = style;\n\t};\n\n\tthis.getColor = function(name){\n\n\t\tvar style = this.colors[name] || \"rgba(255,0,0,0.5)\";\n\t\treturn style;\n\t};\n\n\tthis.addScene = function(scene){\n\n\t\tscene.game = game;\n\n\t\tif(game.scenes.indexOf(scene) === -1){\n\t\t\tconsole.log(\"Game: Adding new scene,\",scene.name);\n\t\t\tscene.load();\n\t\t\tgame.scenes.push(scene);\n\t\t}\n\n\t\tif(game.currentScene === null) game.currentScene = scene;\n\t};\n\n\t// MAKING PROTECTED - trigger via event!\n\tvar gotoScene = function(sceneName){\n\n\t\tgame.eventManager.finished('gotoScene');\n\n\t\tfor(var i=0;i<game.scenes.length;i++){\n\t\t\tvar scene = game.scenes[i];\n\n\t\t\tif(scene.name == sceneName){\n\t\t\t\tif(game.currentScene) game.currentScene.unload();\n\t\t\t\tgame.currentScene = scene;\n\t\t\t\tgame.currentScene.load();\n\t\t\t\tgame.mode = \"SCENE\";\n\t\t\t\treturn scene;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t};\n\n\tthis.addEncounter = function(encounter){\n\n\t\tencounter.game = game;\n\n\t\tif(game.encounters.indexOf(encounter) === -1){\n\t\t\tconsole.log(\"Game: Adding new encounter,\",encounter.name);\n\t\t\tencounter.load();\n\t\t\tgame.encounters.push(encounter);\n\t\t}\n\n\t};\n\n\t// PROTECTED !!!\n\tvar startEncounter = function(encounterName){\n\n\t\tfor(var i=0;i<game.encounters.length;i++){\n\t\t\tvar encounter = game.encounters[i];\n\n\t\t\tif(encounter.name == encounterName){\n\t\t\t\tif(game.currentEncounter) game.currentEncounter.unload();\n\t\t\t\tgame.currentEncounter = encounter;\n\t\t\t\tgame.currentEncounter.load();\n\t\t\t\tgame.mode = \"ENCOUNTER\";\n\t\t\t\treturn encounter;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t};\n\n\tthis.start = function(){\n\n\t\tconsole.log(\"\\n\\nStarting game...\\n\");\n\n\t\t// ADD EVENT HANDLERS for SCENE & ENCOUNTER\n\t\tgame.eventManager.on(\"gotoScene\",gotoScene,game);\n\t\tgame.eventManager.on(\"startEncounter\",startEncounter,game);\n\n\n\t\trequestAnimationFrame(game.update);\n\t};\n\n\tthis.update = function(){\n\t\t// Update animation timer\n\t\tgame.eventManager.send('Tick',Date.now(),game);\n\t\trequestAnimationFrame(game.update);\n\t};\n\n\t// EVENT HANDLER - click/drag by STATE --- TO DO - drag events\n\t// put these handlers in the STAGE!!! TODO\n\n\tvar canvas = game.canvas;\n\tcanvas.addEventListener('click',clickHandler,true);\n\n\tfunction clickHandler(e){\n\t\tvar event = {};\n\t\tevent.x = e.clientX;\n\t\tevent.y = e.clientY;\n\n\t\tconsole.log(\"Clicked at:\",event.x,event.y);\n\n\t\tswitch(game.mode){\n\n\t\t\tcase \"SCENE\":\n\t\t\t\tgame.eventManager.send('click:'+game.currentScene.name,event,game);\n\t\t\t\tbreak;\n\t\t\tcase \"ENCOUNTER\":\n\t\t\t\tgame.eventManager.send('click:'+game.currentEncounter.name,event,game);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tconsole.log(\"Do nothing for mode:\",game.mode);\n\t\t}\n\t}\n}", "title": "" }, { "docid": "82c46a337e13f27d6ea016a142b2cf0c", "score": "0.6943152", "text": "function createGame () {}", "title": "" }, { "docid": "0cea32c81210ed6aaad7dcc00baee068", "score": "0.69422084", "text": "function ClassicGame(){}", "title": "" }, { "docid": "845f8c8ff5820e3c4b4d4c9c2b09f990", "score": "0.6935017", "text": "function main() {\n var game;\n var splashScreen;\n var gameOverScreen;\n\n // SPLASH SCREEN\n function createSplashScreen() {\n splashScreen = buildDom(`\n <main>\n <h1>Eternal Enemies</h1>\n <button>Start</button>\n </main>`);\n\n document.body.appendChild(splashScreen);\n\n var startButton = splashScreen.querySelector(\"button\");\n\n startButton.addEventListener(\"click\", function() {\n startGame();\n });\n }\n\n function removeSplashScreen() {\n splashScreen.remove(); // remove() is an HTML method that removes the element entirely\n }\n\n //\n // GAME SCREEN\n function createGameScreen() {\n var gameScreen = buildDom(`\n <main class=\"game container\">\n <header>\n <div class=\"lives\">\n <span class=\"label\">Lives:</span>\n <span class=\"value\"></span>\n </div>\n <div class=\"score\">\n <span class=\"label\">Score:</span>\n <span class=\"value\"></span>\n </div>\n </header>\n <div class=\"canvas-container\">\n <canvas></canvas>\n </div>\n </main>\n `);\n\n document.body.appendChild(gameScreen);\n\n return gameScreen;\n }\n\n function removeGameScreen() {\n game.gameScreen.remove(); // We will implement it in the game object\n }\n\n //\n // GAME OVER SCREEN\n function createGameOverScreen(score) {\n gameOverScreen = buildDom(`\n <main>\n <h1>Game over</h1>\n <p>Your score: <span>${score}</span></p>\n <button>Restart</button>\n </main>\n `);\n\n document.body.appendChild(gameOverScreen);\n\n var button = gameOverScreen.querySelector(\"button\");\n\n button.addEventListener(\"click\", startGame);\n }\n\n function removeGameOverScreen() {\n if (gameOverScreen !== undefined) {\n // if it exists saved in a variable\n gameOverScreen.remove();\n }\n }\n\n //\n // SETTING GAME STATE\n function startGame() {\n removeSplashScreen();\n removeGameOverScreen();\n\n game = new Game();\n game.gameScreen = createGameScreen();\n\n // Start the game\n game.start();\n game.passGameOverCallback(gameOver);\n\n // End the game\n }\n\n function gameOver() {\n removeGameScreen();\n createGameOverScreen(); // <--\n\n console.log(\"GAME OVER IN MAIN\");\n }\n\n // Initialize the start screen\n createSplashScreen();\n}", "title": "" }, { "docid": "fd3d8d9bab6b9fd29c1daecb2626124c", "score": "0.6923189", "text": "function playGame()\n{\n soundtruck.play();\n\n gameObjects[BACKGROUND] = new ScrollingBackgroundImage(backgroundImage, backgroundNightImage, backgroundJungleImage, 25);\n gameObjects[player] = new Player(playerImage, canvas.width/2, canvas.height - 75);\n gameObjects[POINTS_INFO] = new ScorePoints(points, 800);\n gameObjects[BULLET_INFO] = new BulletsControler(availableBullets, 1500);\n gameObjects[BAG] = new Bonus(bagImage, nothingImg, ammunationSound, Math.random() * (canvas.width - 60), -90, 55, 75, 90, 7000, 8, 8);\n\n let mumia_delay = 200;\n let skeleton_delay = 3000;\n let coin_delay = 5500;\n for(let i = 0; i<4; i++) {\n mumies[numberOfMumies] = new Mumia(mumiaImage, nothingImg, Math.random() * (canvas.width - 60), -90, 85, 85, 50, mumia_delay );\n mumies[numberOfMumies].start();\n numberOfMumies++;\n mumia_delay+=4500;\n }\n for(let i = 0; i<3; i++) {\n skeletons[numberOfSkeletons] = new Skeleton(skeletonImage, nothingImg, Math.random() * (canvas.width - 60), -90, 85, 85, 50, skeleton_delay );\n skeletons[numberOfSkeletons].start();\n numberOfSkeletons++;\n skeleton_delay+=5500;\n }\n for(let k = 0; k<2; k++) {\n coins[numberOfCoins] = new Bonus(coinImage, nothingImg, bonusSound, Math.random() * (canvas.width - 60), -90, 35, 35, 90, coin_delay, 6, 6);\n coins[numberOfCoins].start();\n numberOfCoins++;\n coin_delay+=7000;\n }\n\n let game = new CriminalCanvasGame();\n\n game.start();\n\n document.addEventListener(\"keydown\", function (e)\n {\n if (e.keyCode === 37) // left\n {\n gameObjects[player].setDirection(LEFT);\n soundtruck.play();\n }\n else if (e.keyCode === 38) // up\n {\n gameObjects[player].setDirection(UP);\n soundtruck.play();\n }\n else if (e.keyCode === 39) // right\n {\n gameObjects[player].setDirection(RIGHT);\n soundtruck.play();\n }\n /* else if (e.keyCode === 40) // down\n {\n gameObjects[player].setDirection(DOWN);\n } */\n else if (e.keyCode === 32 ) // space bar\n {\n fire();\n soundtruck.play();\n }\n });\n document.addEventListener(\"click\", function ()\n {\n fire();\n soundtruck.play();\n });\n\n acl.addEventListener('reading', () => {\n var move = 0;\n var threshold = 0.5;\n\n if (acl.x > threshold) {\n move = 0; // left\n }\n else if (acl.x < -threshold) {\n move = 1; // right\n }\n else {\n move = 2; // up\n }\n\n if (move == 0 && left_move === false) {\n left_move = true;\n right_move = false;\n gameObjects[player].setDirection(LEFT);\n }\n else if (move == 1 && right_move === false) {\n left_move = false;\n right_move = true;\n gameObjects[player].setDirection(RIGHT);\n }\n else if (move == 2) {\n if (left_move || right_move) {\n gameObjects[player].setDirection(UP);\n }\n\n left_move = false;\n right_move = false;\n }\n });\n acl.start();\n\n}", "title": "" }, { "docid": "c3edd5dc3b8838afc0c0257699a33706", "score": "0.6913862", "text": "function gamePlay() {\n collisionDetection();\n moveVerticalPlatform();\n movePlayer();\n updateScreen();\n moveBullets();\n moveMonsterBullets();\n moveMonsters();\n}", "title": "" }, { "docid": "cf701c68aff1633fcfdc47ac77aab6e4", "score": "0.6913206", "text": "draw(ctx) {\n [...this.gameobjs, ...this.Brick].forEach(object => (object.draw(ctx)\n ));\n \n //displays the pause event\n if (this.gamestate === GAMESTATE.PAUSED) {\n ctx.rect(0, 0, this.gameWidth, this.gameHeight);\n ctx.fillStyle = \"rgba(0,0,0,0.5)\";\n ctx.fill();\n\n ctx.font = \" 100px Arial\";\n ctx.fillStyle = \"white\";\n ctx.textAlign = \"center\";\n ctx.fillText(\"PAUSED\", this.gameWidth / 2, this.gameHeight / 2);\n ctx.font = \"50px Arial\";\n ctx.fillText(\"Press enter to continue\", this.gameWidth / 2, this.gameHeight / 2 + 100)\n ctx.font = \"30px Arial\";\n ctx.fillText(\"You have \" + this.live +\n \" lives remaining\", this.gameWidth / 2, this.gameHeight / 2 + 200)\n };\n\n //displays the menu canvas\n if (this.gamestate === GAMESTATE.MENU) {\n ctx.rect(0, 0, this.gameWidth, this.gameHeight);\n ctx.fillStyle = \"rgba(0,0,0,1)\";\n ctx.fill();\n\n ctx.font = \" 50px Arial\";\n ctx.fillStyle = \"orange\";\n ctx.textAlign = \"center\";\n ctx.fillText(\"BLOCK BREAKER GAME\", this.gameWidth / 2, this.gameHeight / 2 - 150);\n ctx.fillStyle = \"white\";\n ctx.font = \"30px Arial\";\n ctx.fillText(\"Press SHIFT to Continue\", this.gameWidth / 2, this.gameHeight / 2 + 50)\n \n ctx.font = \"25px Arial\";\n ctx.fillStyle = \"grey\";\n ctx.textAlign = \"right\";\n ctx.fillText(\"Powered by Greenfonts\",\n this.gameWidth / 2 + 300, this.gameHeight / 2 + 250)\n\n }\n //displays the gameover canvas\n if (this.gamestate === GAMESTATE.GAMEOVER) {\n ctx.rect(0, 0, this.gameWidth, this.gameHeight);\n ctx.fillStyle = \"rgba(0,0,0,1)\";\n ctx.fill();\n\n ctx.font = \" 50px Arial\";\n ctx.fillStyle = \"orange\";\n ctx.textAlign = \"center\";\n ctx.fillText(\"GAME OVER\", this.gameWidth / 2, this.gameHeight / 2 - 150);\n ctx.fillStyle = \"white\";\n ctx.font = \"30px Arial\";\n ctx.fillText(\"Start New Game\", this.gameWidth / 2, this.gameHeight / 2 + 100)\n\n }\n if (this.gamestate === GAMESTATE.INSTRUCTIONS) {\n ctx.rect(0, 0, this.gameWidth, this.gameHeight);\n ctx.fillStyle = \"rgba(0,0,0,1)\";\n ctx.fill();\n\n ctx.font = \" 50px Arial\";\n ctx.fillStyle = \"orange\";\n ctx.textAlign = \"center\";\n ctx.fillText(\"INSTRUCTIONS\", this.gameWidth / 2, this.gameHeight / 2 - 150);\n\n ctx.fillStyle = \"white\";\n ctx.font = \"25px Arial\";\n ctx.fillText(\"Please read the instructions carefully\", this.gameWidth / 2, this.gameHeight / 2 - 80);\n \n ctx.textAlign = \"left\";\n ctx.fillStyle = \"white\";\n ctx.font = \"25px Arial\";\n ctx.fillText( \"* \" + \"You have 3 lives in the Game\",\n this.gameWidth / 2 - 350, this.gameHeight / 2 + 50)\n \n ctx.fillText(\"* \" +\"Press Enter to Pause the Game\", this.gameWidth / 2 - 350, this.gameHeight / 2 + 100)\n \n ctx.fillText(\"* \" + \"Press SPACEBAR to Start the Game\", this.gameWidth / 2 - 350, this.gameHeight / 2 + 150)\n \n\n }\n \n if (this.gamestate === GAMESTATE.MENUTONXTLEVEL) {\n ctx.rect(0, 0, this.gameWidth, this.gameHeight);\n ctx.fillStyle = \"rgba(0,0,0,1)\";\n ctx.fill();\n\n ctx.font = \" 30px Arial\";\n ctx.fillStyle = \"orange\";\n ctx.textAlign = \"center\";\n ctx.fillText(\"Press SPACEBAR to Continue to Level \" + (this.currentlevel + 1), this.gameWidth / 2, this.gameHeight / 2);\n \n }\n }", "title": "" }, { "docid": "7731a0252594cfa36bc8be871618bf40", "score": "0.69113404", "text": "function updateGameLogic() {\n\tupdate_scores();\n\tif (gameState == \"READY\") {\n\t\tif (level == 0)\n\t\t\tdrawText(\"Click to hunt ducks!\",true);\n\t\telse {\n\t\t\tdrawText(\"Level \" + (level+1).toString() + \"!(click screen to start)\",true);\n\t\t}\n\t}\n\telse if (gameState == \"PLAY\") {\n\t\tflapCount++;\n\t\ttargetChange++;\n\n\t\t//Determines if the targets should be changed\n\t\t//Decently high mod value so the ducks don't change targets too quickly\n\t\tif (targetChange % 50 == 0)\n\t\t\tupdateTargets();\n\n\t\t//move and redraw the canvas for the level\n\t\tmoveDucks();\n\t\tdrawDucks();\n\t\tdrawLives();\n\n\t\t//Acts as the timer for the game to end\n\t\tgameTime--;\n\n\t\tif (gameTime == 0 || shots <= 0) {\n\t\t\tgameState = \"GAMEOVER\";\n\t\t\tducksFly();\n\t\t}\n\t}\n\telse if (gameState == \"GAMEOVER\") {\n\t\t//Update count for flap animation\n\t\tflapCount++;\n\t\t//Move ducks off screen\n\t\tmoveDucks();\n\t\tdrawDucks();\n\t\tdrawText(\"Game Over! Final Score: \" + score + \"!\" , false);\n\n\t}\n}", "title": "" }, { "docid": "cff4e46e907946c0c18a539d9df8d708", "score": "0.6905324", "text": "function game() {\n canvasContext.clearRect(0, 0, getCanvasContainer.width, getCanvasContainer.height);\n createBall();\n createPalette();\n createBricks();\n detectBricks();\n createScore();\n gameFinished();\n\n initialValueX += moveX;\n initialValueY += moveY;\n\n\n\n if (initialValueY + moveY < radiusOfBall) {\n moveY = -moveY;\n //checking collision with ceil\n } else if (initialValueY + moveY > getCanvasContainer.height - radiusOfBall) {\n if (initialValueX > paletteValueX && initialValueX < paletteWidth + paletteValueX) {\n moveY = -moveY;\n //checking collision with palette\n } else {\n alert('Game over!');\n document.location.reload();\n //checking collision with floor and game over\n }\n }\n\n if (initialValueX + moveX + radiusOfBall > getCanvasContainer.width || initialValueX + moveX < radiusOfBall) {\n moveX = -moveX;\n //checking collision with left and right walls\n }\n\n if (keyPressRight && paletteValueX + paletteWidth < getCanvasContainer.width) {\n paletteValueX += 7;\n //move palette right\n }\n\n\n if (keyPressLeft && paletteValueX + getCanvasContainer.width > getCanvasContainer.width) {\n paletteValueX -= 7;\n //move palette left\n }\n requestAnimationFrame(game);\n\n }", "title": "" }, { "docid": "da11f73f91cdb1e0ada7c6cb1a1e5e43", "score": "0.69003624", "text": "function Game(){\nif(shaman.hp==0) finishGame();\n\nshaman.mp+=shaman.mp_reg;\nif (shaman.mp>shaman.max_mp) shaman.mp = shaman.max_mp;\n\tgenWave();\n\tfor(var k=0; k<shaman.debuffs.length; k++){\n\t\tshaman.debuffs[k].action(k);\n\t}\n\tfor(var j = 0; j<Spells.length; j++){\n\t\tSpells[j].action();\n\t}\n\tfor(var i = 0; i<Enemies.length; i++){\n\t\tEnemies[i].action();\n\t}\n\tdrawGame();\n}", "title": "" }, { "docid": "9dddb72cc217a7a7f3af25fadcd1aa39", "score": "0.68911606", "text": "function gamePlay() {\r\n // Check whether the player is on a platform\r\n var isOnPlatform = player.isOnPlatform();\r\n \r\n // Update player position\r\n var displacement = new Point();\r\n\r\n // Move left or right\r\n if (player.motion == motionType.LEFT)\r\n displacement.x = -MOVE_DISPLACEMENT;\r\n if (player.motion == motionType.RIGHT)\r\n displacement.x = MOVE_DISPLACEMENT;\r\n\r\n // Fall\r\n if (!isOnPlatform && player.verticalSpeed <= 0) {\r\n displacement.y = -player.verticalSpeed;\r\n player.verticalSpeed -= VERTICAL_DISPLACEMENT;\r\n }\r\n\r\n // Jump\r\n if (player.verticalSpeed > 0) {\r\n displacement.y = -player.verticalSpeed;\r\n player.verticalSpeed -= VERTICAL_DISPLACEMENT;\r\n if (player.verticalSpeed <= 0)\r\n player.verticalSpeed = 0;\r\n }\r\n\r\n // Get the new position of the player\r\n var position = new Point();\r\n position.x = player.position.x + displacement.x;\r\n position.y = player.position.y + displacement.y;\r\n\r\n // Check collision with platforms and screen\r\n player.collidePlatform(position);\r\n player.collideScreen(position);\r\n\r\n // Set the location back to the player object (before update the screen)\r\n player.position = position;\r\n\r\n player.checkEnterPortal(position)\r\n updateScreen();\r\n\r\n processCoin(player.findCoin(player.position))\r\n if(!cheatMode && bumpIntoGhost(player.position)!=-1){\r\n gameOver()\r\n console.log(\"bumpIntoGhost\")\r\n }\r\n\r\n if (player.findExit(player.position)){\r\n proceedToNextRound()\r\n }\r\n}", "title": "" }, { "docid": "46f41eaab22b479f61a0fefffde2e561", "score": "0.6883651", "text": "function monitorGame(){\n //cheack the eggs in player\n checkContainer();\n checkTnt();\n checkPirate();\n checkPirateHit();\n checkCarrierHit();\n checkPlayerHit();\n dead();\n}", "title": "" }, { "docid": "d559fd1d384ba7c1f026a2c9180d3b42", "score": "0.6879152", "text": "newGame () {}", "title": "" }, { "docid": "906f807580572c8591e2f41567d8f63b", "score": "0.68681306", "text": "function game() {\n\n /**\n * De movement van de AI\n */\n if (!may_control) {\n getAIMovementKeys();\n }\n getAIMovement(); \n\n /**\n * Het updaten van de tekst op het scherm\n */\n var score = document.getElementById(\"score\");\n score.innerHTML = \"Jouw huidige score: \"+ this.score;\n\n var score_ai = document.getElementById(\"score_ai\");\n score_ai.innerHTML = \"Jouw tegenstander's score: \"+ this.score_ai;\n\n var event = document.getElementById(\"event\");\n\n event.innerHTML = \"Laatste gebeurtenis \"+ this.event+\" <br>\";\n \n /**\n * Het updaten van de speler positie wanneer deze uit het scherm gaat, net zoals\n * bij de ai\n */\n player_position_x += player_movement_x;\n player_position_y += player_movement_y;\n if (player_position_x < 0) {\n player_position_x = tilecount_x - 1;\n }\n if (player_position_x > tilecount_x - 1) {\n player_position_x = 0;\n }\n if (player_position_y < 0) {\n player_position_y = tilecount_y - 1;\n }\n if (player_position_y > tilecount_y - 1) {\n player_position_y = 0;\n }\n\n /**\n * Het scherm opvullen met een zwarte kleur canvas\n */\n canvas_2d.fillStyle = \"black\";\n canvas_2d.fillRect(0, 0, canvas.width, canvas.height);\n \n /**\n * Een loop van trail en vult deze met een rectangle, met de kleur die eerder is aangegeven\n */\n for (var i = 0; i < trail.length; i++) {\n canvas_2d.fillStyle = trail[i].col;\n canvas_2d.fillRect(trail[i].x * gridsize, trail[i].y * gridsize, gridsize - 2, gridsize - 2);\n \n /**\n * De tail resetten wanneer de speler op zijn eigen staart komt te staan, waardoor hij ook\n * al zijn punten verliest\n */\n if (trail[i].x == player_position_x && trail[i].y == player_position_y) {\n\n /**\n * Wanneer nog geen score bekend is, wordt gezegd dat je met de pijltjes toetsen kan\n * bewegen\n */\n if (this.score == 0) {\n this.event = \"Je kunt bewegen met de pijltjes toetsen!\";\n } else {\n this.event = \"Jij bent tegen jezelf aan gebotst, 100 punten weg!\";\n }\n\n /**\n * Je staart wordt gereset naar de default size\n */\n tail = tail_default_size;\n \n /**\n * Score wordt gereset naar 0\n */\n this.score = 0;\n } \n }\n \n\n /**\n * Zelfde bij de AI als bij de speler zelf\n */\n for (var i = 0; i < trail_ai.length; i++) {\n /**\n * Vullen van de rechthoek met een kleur\n */\n canvas_2d.fillStyle = trail_ai[i].col;\n canvas_2d.fillRect(trail_ai[i].x * gridsize, trail_ai[i].y * gridsize, gridsize - 2, gridsize - 2);\n \n /**\n * De tail resetten wanneer speler op zijn eigen staart komt\n */\n if (trail_ai[i].x == ai_position_x && trail_ai[i].y == ai_position_y) {\n tail_ai = tail_default_size_ai;\n \n if (may_control) {\n this.score_ai = 0;\n this.tail_ai = tail_default_size;\n }\n \n this.event = \"De AI/tegenstander botst tegen zichzelf aan\";\n }\n }\n \n /**\n * Laat de snake van de speler en de ai lopen, waardoor steeds nieuwe deeltjes in de array worden gezet\n */\n trail.push({ col: getRandomColor(true), x: player_position_x, y: player_position_y });\n\n trail_ai.push({ col: getRandomColor(false), x: ai_position_x, y: ai_position_y });\n \n /**\n * Laat de snake verkleinen bij het bewegen\n */\n while (trail.length > tail) {\n trail.shift();\n }\n\n /**\n * Laat de ai verkleinen bij het bewegen\n */\n while (trail_ai.length > tail_ai) {\n trail_ai.shift();\n }\n \n\n \n\n /**\n * Een loop van de apples die in het spelletje worden gemarkeerd als rood, bij het vangen van deze\n * punten, dan gaat de appel weg en krijg je dus 50 punten. de ai krijgt meer punten.\n * De staart wordt langer en er worden 3 nieuwe appels in het spel toegekend.\n */\n for (var b = 0; b < apple_positions.length; b++) {\n // console.log(apple_positions[b].x+\" \"+apple_positions[b].y);\n if (apple_positions[b].x == player_position_x && apple_positions[b].y == player_position_y) {\n tail++;\n \n /**\n * Het event zegt dat 50 punten zijn gevangen.\n */\n this.event = \"Jij hebt een appel gevangen, 50 punten!\";\n\n /**\n * Een score van 50 wordt toegekend aan de speler\n */\n this.score += 50;\n \n /**\n * De oude appel wordt niet verwijderd, maar wordt op een andere plek gezet\n */\n apple_positions[b].x = Math.floor(Math.random() * tilecount_x);\n apple_positions[b].y = Math.floor(Math.random() * tilecount_y);\n \n /**\n * 3 nieuwe appels komen in het spel terecht\n */\n apple_positions.push({x : getRandomXTile(), y : getRandomYTile()});\n apple_positions.push({x : getRandomXTile(), y : getRandomYTile()});\n apple_positions.push({x : getRandomXTile(), y : getRandomYTile()});\n\n } else if(apple_positions[b].x == ai_position_x && apple_positions[b].y == ai_position_y) {\n /**\n * idem dito.\n */\n \n this.event = \"De AI/tegenstander heeft een appel gevangen, 100 punten!\";\n\n tail_ai++;\n\n if (may_control) {\n this.score_ai += 50;\n } else {\n this.score_ai += 100;\n }\n\n apple_positions[b].x = Math.floor(Math.random() * tilecount_x);\n apple_positions[b].y = Math.floor(Math.random() * tilecount_y);\n \n apple_positions.push({x : getRandomXTile(), y : getRandomYTile()});\n } \n\n /**\n * Het vullen van de appels met een rode kleur\n */\n canvas_2d.fillStyle = \"red\";\n canvas_2d.fillRect(apple_positions[b].x * gridsize, apple_positions[b].y * gridsize, gridsize - 2, gridsize - 2);\n }\n \n /**\n * Botsen tegen elkaar, loopt en kijkt dan of in de trail de coords zijn\n * in de coords van de andere\n */\n for (var snake_one = 0; snake_one < trail.length; snake_one++) {\n for (var snake_two = 0; snake_two < trail_ai.length; snake_two++) {\n\n if (trail[snake_one].x == trail_ai[snake_two].x &&\n trail[snake_one].y == trail_ai[snake_two].y) {\n\n /**\n * Gaat nu checken wie de foute is\n * \n * Wanneer het hoofdje van de snake in de ander zijn trail is, dan is de snake met het hoofdje\n * die er in komt fout.\n * \n * Andersom idem dito.\n */\n for (var snake_one_head = 0; snake_one_head < trail.length; snake_one_head++) {\n for (var snake_two_head = 0; snake_two_head < trail_ai.length; snake_two_head++) {\n\n \n if (ai_position_x == trail[snake_one_head].x && ai_position_y == trail[snake_one_head].y) {\n //de ai is nu de foute\n \n this.tail_ai = tail_default_size;\n if (may_control) {\n if (this.score_ai - 500 > 0) {\n this.score_ai -= 500;\n } else {\n this.score_ai = 0;\n }\n }\n this.event = \"De tegenstander is tegen jou aan gebotst!\";\n // console.log(\"De tegenstander is tegen jou aan gebotst!\");\n } else if (player_position_x == trail_ai[snake_two_head].x && player_position_y == trail_ai[snake_two_head].y) {\n \n this.event = \"Jij bent tegen de tegenstander aangebotst! 500 punten weg!\";\n // console.log(\"Jij bent tegen de tegenstander aangebotst! 500 punten weg!\");\n \n // console.log(snake_one_head);\n this.tail = tail_default_size;\n \n if (this.score - 500 > 0) {\n this.score -= 500;\n } else {\n this.score = 0;\n }\n }\n \n }\n }\n }\n }\n } \n /**\n * De bonus punten die als paars worden aangeven, deze worden random in het spel toegevoegd en geven meer punten\n * dan normale appels, bij het ontvangen krijg je 100 score en word je staart iets langer met 3 blokjes, hierna wordt een nieuw bonus punt\n * en het oude gerelocated\n * \n * de ai heeft hetzelfde principe\n */\n for (var b = 0; b < bonus_points.length; b++) {\n // console.log(apple_positions[b].x+\" \"+apple_positions[b].y);\n if (bonus_points[b].x == player_position_x && bonus_points[b].y == player_position_y) {\n tail += 3;\n \n this.event = \"Jij hebt een ongelooflijke goede appel gevangen, 100 punten!\";\n\n this.score += 100;\n \n bonus_points[b].x = Math.floor(Math.random() * tilecount_x);\n bonus_points[b].y = Math.floor(Math.random() * tilecount_y);\n \n bonus_points.push({x : getRandomXTile(), y : getRandomYTile()});\n\n } else if(bonus_points[b].x == ai_position_x && bonus_points[b].y == ai_position_y) {\n tail_ai++;\n\n if (may_control) {\n this.score_ai += 100;\n } else {\n this.score_ai += 200;\n }\n\n this.event = \"De AI heeft een ongelooflijke goede appel gevangen, 200 punten!\";\n\n bonus_points[b].x = Math.floor(Math.random() * tilecount_x);\n bonus_points[b].y = Math.floor(Math.random() * tilecount_y);\n \n bonus_points.push({x : getRandomXTile(), y : getRandomYTile()});\n apple_positions.push({x : getRandomXTile(), y : getRandomYTile()});\n apple_positions.push({x : getRandomXTile(), y : getRandomYTile()});\n } \n canvas_2d.fillStyle = \"purple\";\n canvas_2d.fillRect(bonus_points[b].x * gridsize, bonus_points[b].y * gridsize, gridsize - 2, gridsize - 2);\n }\n \n /**\n * Het random aanmaken van de spikes, die punten daling geven en het aanmaken van de\n * bonus punten, die juist een punten toename geven\n */\n if (Math.floor(Math.random() * 20) == 0) {\n dead_spikes.push({x : getRandomXTile(), y : getRandomYTile()});\n }\n\n if (Math.floor(Math.random() * 100) == 0) {\n bonus_points.push({x : getRandomXTile(), y : getRandomYTile()});\n }\n \n /**\n * Een loop van de dead spikes, deze spikes geven een punten daling bij de speler, maar niet bij de ai\n * De kleur wordt hier aan geven van wit\n */\n for (var b = 0; b < dead_spikes.length; b++) { \n canvas_2d.fillStyle = \"white\";\n canvas_2d.fillRect(dead_spikes[b].x * gridsize, dead_spikes[b].y * gridsize, gridsize - 2, gridsize - 2);\n \n // console.log(apple_positions[b].x+\" \"+apple_positions[b].y);\n if (dead_spikes[b].x == player_position_x && dead_spikes[b].y == player_position_y) {\n trail.shift();\n \n this.event = \"Jij bent tegen een rotte appel gevallen, 250 punten weg!\";\n\n if (this.score - 250 >= 0) {\n this.score -= 250;\n } else if (this.score - 250 < 0) {\n this.score = 0;\n }\n delete dead_spikes[b].x, dead_spikes[b].y;\n \n // while (dead_spikes.length > 0) {\n // dead_spikes.pop();\n // }\n } else if(dead_spikes[b].x == ai_position_x && dead_spikes[b].y == ai_position_y) {\n trail_ai.shift();\n\n this.event = \"De AI is tegen een rotte appel gevallen!\";\n \n // if (this.score_ai - 100 >= 0) {\n // this.score_ai -= 100;\n // }\n\n if (may_control) {\n if (this.score_ai - 250 >= 0) {\n this.score_ai -= 250;\n }\n }\n\n delete dead_spikes[b].x, dead_spikes[b].y;\n }\n }\n }", "title": "" }, { "docid": "51bb82a944aedfd082895b178a3a78ca", "score": "0.68578297", "text": "function game() {\n endMyGame();\n frames++;\n move();\n hit();\n draw();\n ball.goal();\n ball.drawScore();\n clock.parseTime();\n clock.drawTime();\n}", "title": "" }, { "docid": "03024469dfbfe8f98b2a47b5e57fa928", "score": "0.68489575", "text": "mine() {\n console.log(\"ARE WE MINING\");\n GameService.updateCount();\n _draw();\n }", "title": "" }, { "docid": "88f54a1336de0bc16fb66962650ec76e", "score": "0.6847025", "text": "function GameEngine() {\n this.sceneManager = new SceneManager(this);\n this.collisionBox = {\n ground: [],\n };\n this.ui = [];\n this.entities = [];\n this.big = [];\n this.mid = [];\n this.small = [];\n this.food = [];\n this.ctx = null;\n this.surfaceWidth = null;\n this.surfaceHeight = null;\n\n this.movedAmount = 0;\n\n //events\n this.mouse = {click: false,\n x: undefined,\n y: undefined,\n width: 1,\n height: 1,\n pressed: false,\n reset: function() {\n this.click = false;\n // this.pressed = false;\n }};\n this.events = {\n }\n this.save = false;\n this.load = false;\n}", "title": "" }, { "docid": "33d3a9807754917c2a9eaeb1ebc4dc6e", "score": "0.68336135", "text": "init(game) {\n\n }", "title": "" }, { "docid": "730273f9c67df7ac023363c42304baf1", "score": "0.6832809", "text": "function startGame() { }", "title": "" }, { "docid": "a2164f0758a169e8c6a2e241d91569b3", "score": "0.68264127", "text": "function draw() {\n\n\n if (gameState === 0) { // display starting screen\n imageMode(CORNER);\n image(front, 0, 0, width, height);\n }\n // when game starts\n else if (gameState === 1) {\n imageMode(CORNER);\n image(background, 0, 0, windowWidth, windowHeight); // display background\n\n // display fuctions\n donkey.handleInput(); // key control for donkey\n elephant.handleInput(); // key control for elephant\n\n donkey.move(); // movement of donkey\n elephant.move(); // movement of elephant\n // movement of elites\n\n donkey.display(); // display donkey\n elephant.display(); // display elephant\n\n // for donkey and elephant to call boss, and change votes\n donkey.bossConnect(boss1.bossEat, boss1.bossManipulation);\n elephant.bossConnect(boss2.bossEat, boss2.bossManipulation);\n\n // tracking if candidates failed\n donkey.checkState();\n elephant.checkState();\n // check elites power and update\n\n\n boss1.keyControl(); // boss key control\n boss1.display(); // display\n boss1.bossPower(); // boss power\n boss2.keyControl();\n boss2.display();\n boss2.bossPower();\n\n // sounds effects\n //music when boss is called\n boss1.bossMusic(bossMusic);\n\n // pause music when no key is pressed\n boss2.bossMusic(bossMusic);\n if (boss1.bossManipulation === false && boss2.bossManipulation === false) {\n bossMusic.pause();\n\n }\n\n cheerleader[1].musicPlay(clSound);\n cheerleader1[1].musicPlay(clSound);\n\n // pause music when no key is pressed\n if (cheerleader[1].activeState === false && cheerleader1[1].activeState === false) {\n clSound.pause();\n\n }\n\n\n\n instruction(); // show instruction\n gameOver(); //check if game over and display text when it is true\n\n\n for (let i = 0; i < voter.length; i++) {\n // display votes\n // And for each one, move it and display it\n voter[i].move();\n voter[i].display();\n // reduce votes'speed when cheerleader is called\n voter[i].mesmerizing(random(3, 10), 88, 78, cheerleader[1].sober, cheerleader1[1].sober);\n // reduce prey's speed when cheerleader is active\n\n donkey.gainVote(voter[i], voteSound); // increase votes for donkey\n elephant.gainVote(voter[i], voteSound); // increase votes for elephant\n boss1.bossGain(voter[i]); // for donkey,use boss to increase votes\n boss2.bossGain(voter[i]); // for elephant, use boss to increase votes\n\n\n }\n\n // display cheerleader for donkey\n for (let n = 0; n < cheerleader.length; n++) {\n // And for each one, move it and display it\n\n cheerleader[n].display();\n cheerleader[n].keyControl();\n cheerleader[n].move(1.5); // set cheerleader movemnet on X\n\n\n }\n\n\n // display cheerleader for elephant\n for (let m = 0; m < cheerleader.length; m++) {\n // And for each one, move it and display it\n\n cheerleader1[m].display();\n cheerleader1[m].keyControl();\n cheerleader1[m].move(-1.5); // set cheerleader movemnet on X\n\n\n }\n\n\n // display elites\n for (let k = 0; k < elites.length; k++) {\n\n elites[k].display();\n elites[k].move();\n elites[k].elitesPowerUpdate(); // changeable power\n elites[k].handleVote(elephant, elitesSound); // when elephant gets elites\n elites[k].handleVote(donkey, elitesSound); // when donkey gets elites\n elites[k].checkElites(); // check if the elites is active\n boss1.bossGain(elites[k]); // boss to get elites as vote\n boss2.bossGain(elites[k]); // // boss to get elites as vote\n\n }\n\n\n }\n\n // set up display when games end\n else if (gameState === 2) {\n\n getWinner();\n setupEnd();\n instruction();\n }\n}", "title": "" }, { "docid": "6af73df66fe1d797a3b489586556a3bf", "score": "0.68187416", "text": "function initGame(){\n resetGameStats()\n setLevel()\n gBoard = buildBoard()\n renderBoard(gBoard)\n gGame.isOn = true\n\n}", "title": "" }, { "docid": "36c29bfdaee53a80167a0a9a0ab4c144", "score": "0.678085", "text": "function gamePlay() {\n //draw the grid\n drawMap();\n\n //Update and display player and check for input\n player.display();\n player.handleInput();\n //Check for collisions with trash and handle scoring\n player.handleScoring(trash);\n //Display trash\n trash.display();\n //Check the score of the player to determine if they've won yet\n checkScores();\n\n //Call all display and movement functions for kids in the kids array\n for (let i = 0; i < kids.length; i++) {\n kids[i].update();\n kids[i].display();\n kids[i].handleDamage(player)\n }\n\n}", "title": "" }, { "docid": "e47d7c9978a56903e06561fce3a8c483", "score": "0.677509", "text": "function Game() {\n \n this.initialize = function() {\n var game = this;\n game.started = false;\n game.allow_input = false;\n game.paused = true;\n game.defeated = false;\n game.limit = 30000; //milliseconds\n game.score = 60;\n game.steve = new Steve(game);\n game.fireball = new Fireball(game);\n game.input = new Input(game);\n game.timer = new Timer(game);\n \n game.steve.initialize();\n game.fireball.initialize();\n game.input.initialize();\n game.timer.initialize();\n \n game.show_hud(\"intro\");\n $(\"#defeat\").hide();\n };\n \n this.show_hud = function(page) {\n var game = this;\n $(\"#hud\").show();\n $(\"#hud .content\").html( $(\"#\"+page).html() );\n if (page == \"intro\") {\n $(\".help\").unbind(\"click\").click(function(){ game.show_hud(\"help\"); });\n } else if (page == \"help\") {\n $(\".start\").unbind(\"click\").click(function(){ game.start(); });\n } else if (page == \"results\") {\n $(\".score\").html(\"<strong>\" + this.score + \"</strong><span>emails sent!</span><span class='caption'>\" + this.get_caption(this.score) + \"</span>\");\n $(\".try_again\").unbind(\"click\").click(function(){ game.reset(); });\n this.initialize_sharing();\n }\n };\n \n this.hide_hud = function() {\n $(\"#hud\").hide();\n };\n \n this.start = function() {\n this.hide_hud();\n $(\"#game\").show();\n this.render();\n };\n\n this.pause = function() {\n console.log(\"PAUSED!\");\n this.allow_input = false;\n this.paused = true;\n this.fireball.stop();\n };\n\n this.resume = function() { \n this.allow_input = true;\n this.paused = false;\n this.start_typing();\n };\n \n this.start_typing = function() {\n this.paused = false;\n this.fireball.start();\n };\n \n this.stop_typing = function() {\n this.fireball.stop();\n };\n\n this.stop = function() {\n $(\"#game\").hide();\n this.show_hud(\"results\");\n this.allow_input = false;\n this.steve.stop();\n this.fireball.stop();\n this.timer.stop();\n };\n \n this.defeat = function() {\n if (this.defeated==false) {\n var game = this;\n $(\"#game\").hide();\n $(\"#defeat\").show();\n $(\".try_again\").unbind(\"click\").click(function(){ game.reset(); });\n this.defeated = true;\n this.allow_input = false;\n this.steve.stop();\n this.steve.angry();\n this.fireball.stop();\n this.timer.stop(); \n }\n };\n \n this.reset = function() { \n this.initialize();\n };\n \n this.render = function() {\n this.allow_input = true;\n this.steve.render();\n this.input.render();\n this.timer.render();\n };\n \n this.increment_score = function() {\n $(\"#email_sent\").animate({opacity:1.0},300,function(){ $(this).css(\"opacity\",0.0); });\n this.score+=1;\n };\n \n this.initialize_sharing = function() {\n var game = this;\n \n $(\".share\").click(function(){\n FB.ui({\n method : 'stream.publish',\n attachment: {\n name : 'From the Desk of Steve Jobs',\n caption: 'I wrote ' + game.score + ' emails from the desk of Steve Jobs!',\n description : ( game.score + \" emails sent in \" + game.max_time + \" seconds, averaging \" + (game.score/game.max_time) + \" emails/second.\" ),\n href: 'http://stevejobs.syndeolabs.com/'\n },\n action_links: [\n { text: 'Go, Fireball!', href: 'http://stevejobs.syndeolabs.com/' }\n ]\n },\n function(response) {\n if (response && response.post_id) {\n alert('Post was published.');\n } else {\n alert('Post was not published.');\n }\n }\n );\n }); \n\n };\n \n this.initialize_behaviours = function() {\n var game = this;\n $(\"#bttn_play\").click(function(){\n game.show_help();\n $(\"#intro\").fadeOut();\n });\n };\n \n this.get_caption = function(score) {\n \n if (score > 70) {\n return \"Is that you, Gruber?\";\n } else if (score > 50 && score <= 69) {\n return \"You're an Apple Genius!\";\n } else if (score > 40 && score <= 49) {\n return \"You took the words right out of Steve's mouth.\";\n } else if (score > 30 && score <= 39) {\n return \"Not bad, for a dog.\";\n } else if (score > 20 && score <= 29) {\n return \"You've been spending too much time with Outlook.\";\n } else if (score > 10 && score <= 19) {\n return \"Type faster, Fireball!\";\n } else if (score > 5 && score <= 9) {\n return \"Too slow, Fireball. Keep trying.\"\n } else if (score < 4) {\n return \"You're a Flash fan aren't you?\";\n }\n \n };\n}", "title": "" }, { "docid": "43c621530e662538e072fbf916721385", "score": "0.6770351", "text": "run(){\n if(!this.gameData.isDestoyed){\n this.update();\n this.render();\n }\n }", "title": "" }, { "docid": "663b850b6219c077388d591353723ef6", "score": "0.6766166", "text": "function game_model(){\n\tthis.game = true;\n\tthis.directionRight = true;\n\tthis.moveDownLevel = false;\n\tthis.invaders=[];\n\tthis.airballs=[];\n\tthis.running=false;\n\tthis.startTime = 0;\n\tthis.theStraw = new straw();\n\tthis.update = function(){\n\t\t// Change Bubble direction if one runs into an edge!\n\t\tfor(var i = 0; i < this.invaders.length; i++){\n\t\t\tvar bubb = this.invaders[i];\n\t\t\tif (bubb.x<bubb.r && bubb.active) {\n\t\t\t\tthis.directionRight = true;\n\t\t\t\tthis.moveDownLevel = true;\n\t\t\t} else if (bubb.x>100-bubb.r && bubb.active) {\n\t\t\t\tthis.directionRight = false;\n\t\t\t\tthis.moveDownLevel = true;\n\t\t\t}\n\t\t}\n\t\tfor(var i = 0; i < this.invaders.length; i++){\n\t\t\tvar bubb = this.invaders[i];\n\t\t\tif(bubb.y<=0 && bubb.active && gm.game){\n\t\t\t\talert(\"You lose the game silly, press restart game to try again, ya dunce\");\n\t\t\t\tgm.game = !gm.game;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// to update the model just update all of the bubbles\n\t\tfor(var i=0; i<this.invaders.length; i++){\n\t\t\tthis.invaders[i].update();\n\t\t}\n\t\tthis.moveDownLevel = false;\n\t\t/*\n\t\tif (this.moveDownLevel) {\n\t\t\tthis.moveDownLevel = false;\n\t\t\tfor(var i=0; i<this.bubbles.length; i++){\n\t\t\t\tthis.bubbles[i].update();\n\t\t\t}\n\t\t}\n\t\t*/\n\t\t// check for collisions\n\t\tvar airballList = this.airballs;\n\t\tfor(var i=airballList.length-1; i>=0; i--){\n\t\t\tvar a = this.airballs[i];\n\t\t\ta.update();\n\t\t\tfor(var j=0; j<this.invaders.length; j++){\n\t\t\t\tvar b = this.invaders[j];\n\t\t\t\t//console.log(\"test intersection \"+[a,b])\n\t\t\t\tif (a.intersects(b)){\n\t\t\t\t\tb.active=false;\n\t\t\t\t\t//console.log(\"intersect!!! \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (a.y > 95 || a.x<5 || a.x > 95) {\n\t\t\t\tthis.airballs = this.airballs.slice(0,i).concat(this.airballs.slice(i+1));\n\t\t\t\t// remove element a from airballList\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\tkills=0;\n\t\t\n\t\tfor(var i=0;i<gm.invaders.length;i++){\n\t\t\tif(!gm.invaders[i].active){\n\t\t\t\tkills++;\n\t\t\t\twindow.localStorage.setItem(\"kills\", kills);\n\t\t\t\tvar score = window.localStorage.getItem(\"kills\");//just to see if it worked without having to win the game\n\t\t\t\tconsole.log(score);\n\n\t\t\t}\n\t\t\tif(kills==gm.invaders.length && gm.game){\n\t\t\t\talert(\"You are winner! Press the Restart Game button to enjoy the experience again!!!!\");\n\t\t\t\tgm.game = !gm.game;\n\t\t\t\tvar score = window.localStorage.getItem(\"kills\");\n\t\t\t\tconsole.log(score);\n\n\t\t\t}\n\t\t}\n\t}\n\n\tfor(var i=0;i<6;i++){\n\t\tvar bx= 10 + (i*15);\n\t\tvar by=100;\n\t\tthis.invaders.push(new invader(bx,by,4) );\n\t}\n\tfor(var i=0;i<6;i++){\n\t\tvar bx= 10 + (i*15);\n\t\tvar by=90;\n\t\tthis.invaders.push(new invader(bx,by,4) );\n\t}\n\tfor(var i=0;i<6;i++){\n\t\tvar bx= 10 + (i*15);\n\t\tvar by=80;\n\t\tthis.invaders.push(new invader(bx,by,4) );\n\t}\n\tfor(var i=0;i<6;i++){\n\t\tvar bx= 10 + (i*15);\n\t\tvar by=70;\n\t\tthis.invaders.push(new invader(bx,by,4) );\n\t}\n\t/*\t\n\tfor(var i=0; i<4;i++){\n\t\tvar bx=Math.round(Math.random()*100);\n\t\tvar by=35;\n\t\tvar b = new bubble(bx,by,1);\n\t\t//b.vx *= 4; b.vy*=4;\n\t\tthis.airballs.push(b);\n\t}\n\t*/\n}", "title": "" }, { "docid": "fcbdab8466622a8b3cd6b25fb2f998cc", "score": "0.67548734", "text": "create () {\n /****game.var adds a new \"class variable\" to game state, like in other languages****/\n\n //create background\n var background = game.add.sprite(game.world.centerX, game.world.centerY, 'background');\n background.anchor.set(0.5);\n background.width = game.screenWidth;\n background.height = 700;\n\n game.boardHeight = 102\n game.boardOffset = 15\n game.pieceWidth = 38\n game.pieceHeight = 25\n\n game.squareSize = 50\n //the size of the board, i.e nxn board, 3x3 for tictactoe\n game.n = 3\n game.isXTurn = true\n game.isDraw = false\n game.magicSquare = false\n game.firstTime = true\n\n\n game.turns = 0\n game.linesToAnimate = 0\n\n game.boardTurns = [];\n for (var i=0; i < game.n; i++) {\n game.boardTurns[i]=new Array(game.n)\n }\n\n for (var i=0; i < game.n; i++)\n {\n for (var j=0; j < game.n; j++)\n {\n game.boardTurns[i][j] = 0\n }\n }\n\n console.log(\"First Time\")\n\n //the top left coordinate to place the whole board at, we will make game\n //not hardcoded in the furture to center the board, but I believe we need jQuery\n //to get window size and I didn't feel like learning that right now\n game.startingX = game.screenWidth/2 - game.cache.getImage('board').width / 1.2\n game.startingY = 80\n\n //intialize waiting status to false, update accordingly later if multiplayer\n game.waiting = false\n\n //record of the pieces that have been placed\n game.placedPieces = []\n\n //record of the big pieces that have been placed\n game.bigPlacedPieces = []\n\n game.bigBoardLogic = []\n for (var i=0; i < game.n; i++) {\n game.bigBoardLogic[i]=new Array(game.n)\n }\n\n for (var i=0; i < game.n; i++)\n {\n for (var j=0; j < game.n; j++)\n {\n game.bigBoardLogic[i][j] = \"open\"\n }\n }\n\n game.magicBoardLogic = []\n for (var i=0; i < game.n; i++) {\n game.magicBoardLogic[i]=new Array(game.n)\n }\n\n for (var i=0; i < game.n; i++)\n {\n for (var j=0; j < game.n; j++)\n {\n game.magicBoardLogic[i][j] = \"null\"\n }\n }\n\n //asign functions ot the game object, so they can be called by the client\n this.assignFunctions()\n\n game.cursorSquares = []\n for (var i=0; i < game.n; i++) {\n game.cursorSquares[i]=new Array(game.n)\n }\n\n game.redSquares = []\n for (var i=0; i < game.n; i++) {\n game.redSquares[i]=new Array(game.n)\n for (var j=0; j < game.n; j++)\n {\n game.redSquares[i][j]=new Array(game.n)\n for (var k=0; k < game.n; k++)\n {\n game.redSquares[i][j][k]=new Array(game.n)\n }\n }\n }\n\n for (var i=0; i < game.n; i++)\n {\n for (var j=0; j < game.n; j++)\n {\n game.cursorSquares[i][j] = game.addSpriteWithWidth(game.startingX + i*game.squareSize*3, game.startingY + j*game.squareSize*3, 'greensquare', game.squareSize*3, game.squareSize*3)\n game.cursorSquares[i][j].alpha = 0\n for (var k=0; k < game.n; k++)\n {\n for (var l=0; l < game.n; l++)\n {\n game.redSquares[i][j][k][l] = game.addSprite(game.startingX + i*game.squareSize*3 + k*game.squareSize, game.startingY + j * game.squareSize*3 + l*game.squareSize, 'redsquare')\n game.redSquares[i][j][k][l].alpha = 0\n }\n }\n }\n }\n game.firstTime = false\n\n //create an internal representation of the board as a 2D array\n game.board = game.makeBoardAsArray(game.n)\n //create the board on screen and makes each square clickable\n game.makeBoardOnScreen()\n //add messages that display turn status, connection statuses\n this.addTexts()\n //folloowing logic is for multiplayer games\n if(game.singleplayer || game.vsAi)\n return\n\n game.previousPiece = \"\"\n //if this is the first play against an opponent, create a new player on the server\n game.startMultiplayer()\n\n }", "title": "" }, { "docid": "6609a6c7d168af5bbc9010eb69eac23c", "score": "0.6751241", "text": "function main() {\n\n // Get our time delta information which is required if the game requires smooth animation.\n var now = Date.now(),\n dt = (now - lastTime) / 1000;\n\n //Call our update/render functions, pass along the time delta to\n //our update function.\n update(dt);\n render();\n\n //Set our lastTime variable which is used to determine the time delta\n //for the next time this function is called.\n lastTime = now;\n\n //Use the browser's requestAnimationFrame function to call this\n //function again as soon as the browser is able to draw another frame.\n if (player.youWin === true) {\n win.cancelAnimationFrame(gameOver);\n modal.classList.toggle('visible');\n } else {\n gameOver = win.requestAnimationFrame(main);\n }\n }", "title": "" }, { "docid": "88c4dd69c47f19fdb77daff72a26cdb4", "score": "0.6748118", "text": "function game(){\n if(status==\"menu\"){\n render();\n }else\n if(status==\"game\"){\n update();\n render();\n }\n //update();\n //render();\n}", "title": "" }, { "docid": "b1b058b9a68b3031bd2a5c4ba4cf1a8c", "score": "0.6747727", "text": "function GameUI() {}", "title": "" }, { "docid": "7ade5c619d24374591abe828b8b974e7", "score": "0.67469823", "text": "function playGame() {\n}", "title": "" }, { "docid": "89832f4a980e47111b114481b61249a4", "score": "0.6746864", "text": "function game(){\n\tupdate(); // Updating physics, positions and other stuff except shapes\n\trender(); // Drawing shapes\n\n\trequestAnimationFrame(game);\n}", "title": "" }, { "docid": "fd60f1319b020a868f12f0dcfab66d5f", "score": "0.6745021", "text": "create() {\n // Add audio SFX.\n this.bgMusic = this.sound.add('ambience', {volume: 0.5, loop:true});\n this.hitSound = this.sound.add('hitSound');\n\n // Add images.\n this.bg = this.add.tileSprite(0, 0, 400, 300, 'bg').setOrigin(0, 0);\n this.base = this.physics.add.staticImage(200, 265, 'base');\n this.player = this.physics.add.sprite(100, 206, 'player').setScale(0.375).setBounce(0.3);\n this.enemy = this.physics.add.sprite(600, 206, 'enemy').setScale(0.375).setAlpha(0.75);\n // Add first 3 lifes.\n this.lifes = this.physics.add.staticGroup({\n key: 'life',\n repeat: this._lifeLeft - 1,\n setXY: {\n x: 320,\n y: 30,\n stepX: 25,\n stepY: 0\n },\n setScale: {\n x: 0.25,\n y: 0.25\n }\n });\n\n // PlayButton onClick=> start the game.\n this.playBtn = this.add.image(200, 150, 'playBtn').setScale(0.5);\n this.playBtn.setInteractive(); // Mustbe enables for interactivity.\n this.playBtn.on('pointerdown', this.startGame, this);\n\n // Score Label.\n this.scoreText = this.add.text(20, 20, `SCORE: ${this._lScore}`);\n\n // Game Physics and Collissions.\n this.physics.world.setBounds(0, 0, 400, 230, false, false, false, true);\n this.enemy.setCollideWorldBounds();\n this.physics.add.collider(this.player, this.base);\n this.physics.add.collider(this.player, this.enemy, this.hitEnemy, null, this);\n\n // Player Jump on click.\n this.input.on('pointerdown', this.jump, this);\n\n // Camera for game.\n this.cam = this.cameras.main\n\n // Show high score of the player.\n document.querySelector('th').innerHTML = `BEST : ${this._hScore}`;\n\n }", "title": "" }, { "docid": "7c82be675782b44e137f4f4f439274d1", "score": "0.6744054", "text": "Collision()\n {\n this.ResetGame();\n this.NumberOfLives();\n }", "title": "" }, { "docid": "fd60608750884e8b238fe4a9c9ea2c82", "score": "0.6741544", "text": "function GameManager() {\n\n /**\n * The current scene data.\n * @property sceneData\n * @type Object\n */\n this.sceneData = {};\n\n /**\n * The scene viewport containing all visual objects which are part of the scene and influenced\n * by the in-game camera.\n * @property sceneViewport\n * @type gs.Object_Viewport\n */\n this.sceneViewport = null;\n\n /**\n * The list of common events.\n * @property commonEvents\n * @type gs.Object_CommonEvent[]\n */\n this.commonEvents = [];\n\n /**\n * Indicates if the GameManager is initialized.\n * @property commonEvents\n * @type gs.Object_CommonEvent[]\n */\n this.initialized = false;\n\n /**\n * Temporary game settings.\n * @property tempSettings\n * @type Object\n */\n this.tempSettings = {\n skip: false,\n skipTime: 5,\n loadMenuAccess: true,\n menuAccess: true,\n backlogAccess: true,\n saveMenuAccess: true,\n messageFading: {\n animation: {\n type: 1\n },\n duration: 15,\n easing: null\n }\n\n /**\n * Temporary game fields.\n * @property tempFields\n * @type Object\n */\n };\n this.tempFields = null;\n\n /**\n * Stores default values for backgrounds, pictures, etc.\n * @property defaults\n * @type Object\n */\n this.defaults = {\n background: {\n \"duration\": 30,\n \"origin\": 0,\n \"zOrder\": 0,\n \"loopVertical\": 0,\n \"loopHorizontal\": 0,\n \"easing\": {\n \"type\": 0,\n \"inOut\": 1\n },\n \"animation\": {\n \"type\": 1,\n \"movement\": 0,\n \"mask\": {\n \"graphic\": null,\n \"vague\": 30\n }\n },\n \"motionBlur\": {\n \"enabled\": 0,\n \"delay\": 2,\n \"opacity\": 100,\n \"dissolveSpeed\": 3\n }\n },\n picture: {\n \"appearDuration\": 30,\n \"disappearDuration\": 30,\n \"origin\": 0,\n \"zOrder\": 0,\n \"appearEasing\": {\n \"type\": 0,\n \"inOut\": 1\n },\n \"disappearEasing\": {\n \"type\": 0,\n \"inOut\": 1\n },\n \"appearAnimation\": {\n \"type\": 1,\n \"movement\": 0,\n \"mask\": {\n \"graphic\": null,\n \"vague\": 30\n }\n },\n \"disappearAnimation\": {\n \"type\": 1,\n \"movement\": 0,\n \"mask\": {\n \"graphic\": null,\n \"vague\": 30\n }\n },\n \"motionBlur\": {\n \"enabled\": 0,\n \"delay\": 2,\n \"opacity\": 100,\n \"dissolveSpeed\": 3\n }\n },\n character: {\n \"expressionDuration\": 0,\n \"appearDuration\": 40,\n \"disappearDuration\": 40,\n \"origin\": 0,\n \"zOrder\": 0,\n \"appearEasing\": {\n \"type\": 2,\n \"inOut\": 2\n },\n \"disappearEasing\": {\n \"type\": 1,\n \"inOut\": 1\n },\n \"appearAnimation\": {\n \"type\": 1,\n \"movement\": 0,\n \"mask\": {\n \"graphic\": null,\n \"vague\": 30\n }\n },\n \"disappearAnimation\": {\n \"type\": 1,\n \"movement\": 0,\n \"mask\": {\n \"graphic\": null,\n \"vague\": 30\n }\n },\n \"motionBlur\": {\n \"enabled\": 0,\n \"delay\": 2,\n \"opacity\": 100,\n \"dissolveSpeed\": 3\n },\n \"changeAnimation\": {\n \"type\": 1,\n \"movement\": 0,\n \"fading\": 0,\n \"mask\": {\n \"graphic\": null,\n \"vague\": 30\n }\n },\n \"changeEasing\": {\n \"type\": 2,\n \"inOut\": 2\n }\n },\n text: {\n \"appearDuration\": 30,\n \"disappearDuration\": 30,\n \"positionOrigin\": 0,\n \"origin\": 0,\n \"zOrder\": 0,\n \"appearEasing\": {\n \"type\": 0,\n \"inOut\": 1\n },\n \"disappearEasing\": {\n \"type\": 0,\n \"inOut\": 1\n },\n \"appearAnimation\": {\n \"type\": 1,\n \"movement\": 0,\n \"mask\": {\n \"graphic\": null,\n \"vague\": 30\n }\n },\n \"disappearAnimation\": {\n \"type\": 1,\n \"movement\": 0,\n \"mask\": {\n \"graphic\": null,\n \"vague\": 30\n }\n },\n \"motionBlur\": {\n \"enabled\": 0,\n \"delay\": 2,\n \"opacity\": 100,\n \"dissolveSpeed\": 3\n }\n },\n video: {\n \"appearDuration\": 30,\n \"disappearDuration\": 30,\n \"origin\": 0,\n \"zOrder\": 0,\n \"appearEasing\": {\n \"type\": 0,\n \"inOut\": 1\n },\n \"disappearEasing\": {\n \"type\": 0,\n \"inOut\": 1\n },\n \"appearAnimation\": {\n \"type\": 1,\n \"movement\": 0,\n \"mask\": {\n \"graphic\": null,\n \"vague\": 30\n }\n },\n \"disappearAnimation\": {\n \"type\": 1,\n \"movement\": 0,\n \"mask\": {\n \"graphic\": null,\n \"vague\": 30\n }\n },\n \"motionBlur\": {\n \"enabled\": 0,\n \"delay\": 2,\n \"opacity\": 100,\n \"dissolveSpeed\": 3\n }\n },\n live2d: {\n \"motionFadeInTime\": 1000,\n \"appearDuration\": 30,\n \"disappearDuration\": 30,\n \"zOrder\": 0,\n \"appearEasing\": {\n \"type\": 0,\n \"inOut\": 1\n },\n \"disappearEasing\": {\n \"type\": 0,\n \"inOut\": 1\n },\n \"appearAnimation\": {\n \"type\": 1,\n \"movement\": 0,\n \"mask\": {\n \"graphic\": null,\n \"vague\": 30\n }\n },\n \"disappearAnimation\": {\n \"type\": 1,\n \"movement\": 0,\n \"mask\": {\n \"graphic\": null,\n \"vague\": 30\n }\n }\n },\n messageBox: {\n \"appearDuration\": 30,\n \"disappearDuration\": 30,\n \"zOrder\": 0,\n \"appearEasing\": {\n \"type\": 0,\n \"inOut\": 1\n },\n \"disappearEasing\": {\n \"type\": 0,\n \"inOut\": 1\n },\n \"appearAnimation\": {\n \"type\": 0,\n \"movement\": 3,\n \"mask\": {\n \"graphic\": null,\n \"vague\": 30\n }\n },\n \"disappearAnimation\": {\n \"type\": 0,\n \"movement\": 3,\n \"mask\": {\n \"graphic\": null,\n \"vague\": 30\n }\n }\n },\n audio: {\n \"musicFadeInDuration\": 0,\n \"musicFadeOutDuration\": 0,\n \"musicVolume\": 100,\n \"musicPlaybackRate\": 100,\n \"soundVolume\": 100,\n \"soundPlaybackRate\": 100,\n \"voiceVolume\": 100,\n \"voicePlaybackRate\": 100\n }\n };\n\n /**\n * The game's backlog.\n * @property backlog\n * @type Object[]\n */\n this.backlog = [];\n\n /**\n * Character parameters by character ID.\n * @property characterParams\n * @type Object[]\n */\n this.characterParams = [];\n\n /**\n * The game's chapter\n * @property chapters\n * @type gs.Document[]\n */\n this.chapters = [];\n\n /**\n * The game's current displayed messages. Especially in NVL mode the messages \n * of the current page are stored here.\n * @property messages\n * @type Object[]\n */\n this.messages = [];\n\n /**\n * Count of save slots. Default is 100.\n * @property saveSlotCount\n * @type number\n */\n this.saveSlotCount = 100;\n\n /**\n * The index of save games. Contains the header-info for each save game slot.\n * @property saveGameSlots\n * @type Object[]\n */\n this.saveGameSlots = [];\n\n /**\n * Stores global data like the state of persistent game variables.\n * @property globalData\n * @type Object\n */\n this.globalData = null;\n\n /**\n * Indicates if the game runs in editor's live-preview.\n * @property inLivePreview\n * @type Object\n */\n this.inLivePreview = false;\n }", "title": "" }, { "docid": "e2b058ecc8afaca46aaa6fcedf762277", "score": "0.6740994", "text": "function GameManager() {\n\n /**\n * The current scene data.\n * @property sceneData\n * @type Object\n */\n this.sceneData = {};\n\n /**\n * The scene viewport containing all visual objects which are part of the scene and influenced\n * by the in-game camera.\n * @property sceneViewport\n * @type gs.Object_Viewport\n */\n this.sceneViewport = null;\n\n /**\n * The list of common events.\n * @property commonEvents\n * @type gs.Object_CommonEvent[]\n */\n this.commonEvents = [];\n\n /**\n * Indicates if the GameManager is initialized.\n * @property commonEvents\n * @type gs.Object_CommonEvent[]\n */\n this.initialized = false;\n\n /**\n * Temporary game settings.\n * @property tempSettings\n * @type Object\n */\n this.tempSettings = {\n skip: false,\n skipTime: 5,\n loadMenuAccess: true,\n menuAccess: true,\n backlogAccess: true,\n saveMenuAccess: true,\n messageFading: {\n animation: {\n type: 1\n },\n duration: 15,\n easing: null\n }\n\n /**\n * Temporary game fields.\n * @property tempFields\n * @type Object\n */\n };\n this.tempFields = null;\n\n /**\n * Stores default values for backgrounds, pictures, etc.\n * @property defaults\n * @type Object\n */\n this.defaults = {\n background: {\n \"duration\": 30,\n \"origin\": 0,\n \"zOrder\": 0,\n \"loopVertical\": 0,\n \"loopHorizontal\": 0,\n \"easing\": {\n \"type\": 0,\n \"inOut\": 1\n },\n \"animation\": {\n \"type\": 1,\n \"movement\": 0,\n \"mask\": {\n \"graphic\": null,\n \"vague\": 30\n }\n },\n \"motionBlur\": {\n \"enabled\": 0,\n \"delay\": 2,\n \"opacity\": 100,\n \"dissolveSpeed\": 3\n }\n },\n picture: {\n \"appearDuration\": 30,\n \"disappearDuration\": 30,\n \"origin\": 1,\n \"zOrder\": 0,\n \"appearEasing\": {\n \"type\": 0,\n \"inOut\": 1\n },\n \"disappearEasing\": {\n \"type\": 0,\n \"inOut\": 1\n },\n \"appearAnimation\": {\n \"type\": 1,\n \"movement\": 0,\n \"mask\": {\n \"graphic\": null,\n \"vague\": 30\n }\n },\n \"disappearAnimation\": {\n \"type\": 1,\n \"movement\": 0,\n \"mask\": {\n \"graphic\": null,\n \"vague\": 30\n }\n },\n \"motionBlur\": {\n \"enabled\": 0,\n \"delay\": 2,\n \"opacity\": 100,\n \"dissolveSpeed\": 3\n }\n },\n character: {\n \"expressionDuration\": 0,\n \"appearDuration\": 40,\n \"disappearDuration\": 40,\n \"origin\": 1,\n \"zOrder\": 0,\n \"appearEasing\": {\n \"type\": 2,\n \"inOut\": 2\n },\n \"disappearEasing\": {\n \"type\": 1,\n \"inOut\": 1\n },\n \"appearAnimation\": {\n \"type\": 1,\n \"movement\": 0,\n \"mask\": {\n \"graphic\": null,\n \"vague\": 30\n }\n },\n \"disappearAnimation\": {\n \"type\": 1,\n \"movement\": 0,\n \"mask\": {\n \"graphic\": null,\n \"vague\": 30\n }\n },\n \"motionBlur\": {\n \"enabled\": 0,\n \"delay\": 2,\n \"opacity\": 100,\n \"dissolveSpeed\": 3\n },\n \"changeAnimation\": {\n \"type\": 1,\n \"movement\": 0,\n \"fading\": 0,\n \"mask\": {\n \"graphic\": null,\n \"vague\": 30\n }\n },\n \"changeEasing\": {\n \"type\": 2,\n \"inOut\": 2\n }\n },\n text: {\n \"appearDuration\": 30,\n \"disappearDuration\": 30,\n \"positionOrigin\": 0,\n \"origin\": 0,\n \"zOrder\": 0,\n \"appearEasing\": {\n \"type\": 0,\n \"inOut\": 1\n },\n \"disappearEasing\": {\n \"type\": 0,\n \"inOut\": 1\n },\n \"appearAnimation\": {\n \"type\": 1,\n \"movement\": 0,\n \"mask\": {\n \"graphic\": null,\n \"vague\": 30\n }\n },\n \"disappearAnimation\": {\n \"type\": 1,\n \"movement\": 0,\n \"mask\": {\n \"graphic\": null,\n \"vague\": 30\n }\n },\n \"motionBlur\": {\n \"enabled\": 0,\n \"delay\": 2,\n \"opacity\": 100,\n \"dissolveSpeed\": 3\n }\n },\n video: {\n \"appearDuration\": 30,\n \"disappearDuration\": 30,\n \"origin\": 0,\n \"zOrder\": 0,\n \"appearEasing\": {\n \"type\": 0,\n \"inOut\": 1\n },\n \"disappearEasing\": {\n \"type\": 0,\n \"inOut\": 1\n },\n \"appearAnimation\": {\n \"type\": 1,\n \"movement\": 0,\n \"mask\": {\n \"graphic\": null,\n \"vague\": 30\n }\n },\n \"disappearAnimation\": {\n \"type\": 1,\n \"movement\": 0,\n \"mask\": {\n \"graphic\": null,\n \"vague\": 30\n }\n },\n \"motionBlur\": {\n \"enabled\": 0,\n \"delay\": 2,\n \"opacity\": 100,\n \"dissolveSpeed\": 3\n }\n },\n live2d: {\n \"motionFadeInTime\": 1000,\n \"appearDuration\": 30,\n \"disappearDuration\": 30,\n \"zOrder\": 0,\n \"appearEasing\": {\n \"type\": 0,\n \"inOut\": 1\n },\n \"disappearEasing\": {\n \"type\": 0,\n \"inOut\": 1\n },\n \"appearAnimation\": {\n \"type\": 1,\n \"movement\": 0,\n \"mask\": {\n \"graphic\": null,\n \"vague\": 30\n }\n },\n \"disappearAnimation\": {\n \"type\": 1,\n \"movement\": 0,\n \"mask\": {\n \"graphic\": null,\n \"vague\": 30\n }\n }\n },\n messageBox: {\n \"appearDuration\": 30,\n \"disappearDuration\": 30,\n \"zOrder\": 0,\n \"appearEasing\": {\n \"type\": 0,\n \"inOut\": 1\n },\n \"disappearEasing\": {\n \"type\": 0,\n \"inOut\": 1\n },\n \"appearAnimation\": {\n \"type\": 0,\n \"movement\": 3,\n \"mask\": {\n \"graphic\": null,\n \"vague\": 30\n }\n },\n \"disappearAnimation\": {\n \"type\": 0,\n \"movement\": 3,\n \"mask\": {\n \"graphic\": null,\n \"vague\": 30\n }\n }\n },\n audio: {\n \"musicFadeInDuration\": 0,\n \"musicFadeOutDuration\": 0,\n \"musicVolume\": 100,\n \"musicPlaybackRate\": 100,\n \"soundVolume\": 100,\n \"soundPlaybackRate\": 100,\n \"voiceVolume\": 100,\n \"voicePlaybackRate\": 100\n }\n };\n\n /**\n * The game's backlog.\n * @property backlog\n * @type Object[]\n */\n this.backlog = [];\n\n /**\n * Character parameters by character ID.\n * @property characterParams\n * @type Object[]\n */\n this.characterParams = [];\n\n /**\n * The game's chapter\n * @property chapters\n * @type gs.Document[]\n */\n this.chapters = [];\n\n /**\n * The game's current displayed messages. Especially in NVL mode the messages\n * of the current page are stored here.\n * @property messages\n * @type Object[]\n */\n this.messages = [];\n\n /**\n * Count of save slots. Default is 100.\n * @property saveSlotCount\n * @type number\n */\n this.saveSlotCount = 100;\n\n /**\n * The index of save games. Contains the header-info for each save game slot.\n * @property saveGameSlots\n * @type Object[]\n */\n this.saveGameSlots = [];\n\n /**\n * Stores global data like the state of persistent game variables.\n * @property globalData\n * @type Object\n */\n this.globalData = null;\n\n /**\n * Indicates if the game runs in editor's live-preview.\n * @property inLivePreview\n * @type Object\n */\n this.inLivePreview = false;\n }", "title": "" }, { "docid": "020e59c7068f7f3ccf281b18c1fd4d94", "score": "0.6740916", "text": "function gameInit(){\n groundTile.onload = function(){//ensures all image files are loaded\n $('.title-music')[0].addEventListener('ended', function(){\n this.currentTime=0;\n this.play();\n },false);\n $('.title-music')[0].volume = .5;\n $('.title-music')[0].play();\n // if(startPlayer2){\n // addPlayer();\n // }\n gameStart = true;\n startPlayer2 = true;\n addPlayer();\n player1.img = player1.runRight;\n player1.x = play1.width /2;\n player1.y = play1.height - groundTile.height - 65;\n player2.img = player2.runRight;\n player2.x = play2.width/2 -30;\n player2.y = play2.height - groundTile.height - 60;\n player2.dead = true\n gameStart= false;\n startPlayer2 = false;\n spawnEnemy(randomNum(70, 20));\n for(var i=0;i<currentEnemy.length; i++){//cycle through currentEnemy array\n currentEnemy[i].img = currentEnemy[i].runRight;\n currentEnemy[i].x = play1.width /2 + randomNum(800, 200);\n currentEnemy[i].y = play2.height - groundTile.height - randomNum(80, 60);\n currentEnemy[i].update();//update from SPRITE object\n currentEnemy[i].render();//draw that zombro\n };\n $('.player1').on('click', function(){\n startPlayer2 = false;\n playGame();\n $('.button').hide();\n })\n $('.player2').on('click', function(){\n startPlayer2 = true;\n player2.dead = false;\n playGame();\n $('.button').hide();\n })\n createBackgroundDetail();\n createGround();\n gameLoop();\n }\n}", "title": "" }, { "docid": "ce310fef812f0d21ec62c8a7c71e4c9a", "score": "0.6740832", "text": "tickCaller(game){\n game.tick();\n }", "title": "" }, { "docid": "dc16e6d2aad8d5ceb8ec63690cdeb925", "score": "0.67333937", "text": "function loop() {\n //this function controls most of the game\n gameStart = true; //flag for the controller to take inputs for the game and not the menu\n draw.clear(); //for animation\n\n player.draw(); //initialize the player to be drawn and take input to move up/down\n player.move();\n\n wall1.draw(); //draw walls\n wall2.draw();\n\n for (var i = 0; i < rectangleList.length; i++) {\n rec = rectangleList[i]; //push the rectangles to be randomly generated and move\n rec.draw();\n rec.move();\n }\n for (var i = 0; i < powerupList.length; i++) {\n pow = powerupList[i]; //push the powerups to be created\n pow.draw();\n pow.move();\n }\n for (var i = 0; i < debuffList.length; i++) {\n deb = debuffList[i]; //push the debuffs to be created\n deb.draw();\n deb.move();\n }\n\n TimeMe.startTimer(\"game\"); //starts the timer at 0 for a new game\n\n time = TimeMe.getTimeOnPageInSeconds(\"game\").toFixed(2); //sets the time to seconds with 2 decimal places\n score = Math.ceil(powerUpScore + (time * 1.5)); //score is always increasing by 1.5 of time\n }", "title": "" }, { "docid": "0ef1aec7a7cb23ad0ae206f44a89c9be", "score": "0.67311275", "text": "run(){\n\t\tthis.maybeEnemy();\n\t\tthis.move();\n\t\tthis.update();\n\t\tthis.checkEdges();\n\t\tthis.checkIfDead();\n\t\tthis.display();\n\t}", "title": "" }, { "docid": "cfe1978495a09bb42766fd5bed5d30ad", "score": "0.6729753", "text": "function Gamestate() {\n this.eventEmitter;\n this.minPlayers;\n this.started = false;\n \n this.init = function(eventEmitter) {\n this.eventEmitter = eventEmitter;\n }\n \n \n // singleWorld or multipleWorld\n this.type = 'multipleWorld';\n //turnBased or realTime\n this.timing = 'turnBased';\n //if games can end (the games dont persist and/or have a \"win\" condition)\n this.endable = true;\n \n //returns the players in the game \n this.getPlayers = function() {\n return this.players; \n }\n \n //Sends a message to all players in a game\n\t//accepts an object and a socket\n\t//Sends the object to the clients via the socket\n\tthis.sendAllPlayers = function(obj, socket) {\n this.players.forEach(function(player) {\n\t\t\tsocket.clients[player.sessionId].send(obj);\n\t\t});\n\t}\n \n this.getPlayerBySessionId = function(sessionId) {\n var returnPlayer;\n this.players.forEach(function(player) {\n if (player.sessionId == sessionId) {\n returnPlayer = player;\n }\n });\n return returnPlayer;\n }\n\t\n\t//Sends a message to a single player in a game\n\t//accepts an object and the players sessionId, and a socket\n\t//Sends the object to the client via the socket\n\tthis.sendPlayer = function(obj, player, socket) {\n\t\tif (typeof player != 'object') {\n player = this.getPlayerBySessionId(player);\n }\n socket.clients[player.sessionId].send(obj);\n\t}\n \n //sends a game over event to the players and sends out the event\n this.gameOver = function(obj) {\n if (this.endable) {\n obj.players = this.players;\n this.sendAllPlayers({type: 'gameOver', args: {winner: obj.winner}}, obj.socket);\n this.eventEmitter.emit('gameEnd', obj);\n }\n else {\n throw new Error('gameEnd command sent on a non-endable game type')\n }\n }\n \n /*\n *Adds a player to the game. If the game is full, begins the game\n *\n *@arg obj.\n * client client object\n * socket the socket object\n * connectedUsers connectedUsers obj, keyed by sessionId\n */\n this.addPlayer = function(obj) {\n //add the player to the game\n this.players.push({sessionId: obj.client.sessionId});\n //if the game has the min players, start it\n if (this.players.length == this.minPlayers) {\n this.startGame(obj)\n }\n }\n \n /*\n *Notified when a player in this game disconnects from the service\n *\n *@arg obj.\n * client client object\n * socket the socket object\n * connectedUsers connectedUsers obj, keyed by sessionId\n */\n this.userDisconnect = function(obj) {\n var game = this;\n var i = 0;\n var toDelete = null;\n this.players.forEach(function(player) {\n if (player.sessionId != obj.client.sessionId) {\n //telling player disco happened\n game.sendPlayer({type: 'opponentDisconnect', args: {opponentDisconnect: obj.client.sessionId}}, player.sessionId, obj.socket);\n }\n if (player.sessionId == obj.client.sessionId) {\n //found a player to delete\n toDelete = i;\n }\n i++;\n });\n this.players.remove(toDelete);\n this.checkGameEnd(obj);\n }\n \n /*\n *Required on all Gamestates, function to determine if the game has ended. \n *Should either return a winning player object, the string 'tie' or the bool false\n *\n *@arg obj.\n * client client object\n * socket the socket object\n * connectedUsers connectedUsers obj, keyed by sessionId\n */\n this.checkGameEnd = function(obj) {\n return false;\n }\n}", "title": "" }, { "docid": "3287141887370e8ff2991edbb09a37ff", "score": "0.6724631", "text": "function HostGame() {\n\t// Your code goes here for hosting a game\n\tprint(\"Complete this method in Multiplayer.js\");\n}", "title": "" }, { "docid": "9b5415836287ebaa74ec5c7c6f2dd33f", "score": "0.67154133", "text": "function Game()\r\n\t{\r\n\r\n\t\tthis.debugId = Math.random() * 100;\r\n\r\n\t\tthis.stage = $('.game-stage')[0];\r\n\r\n\t\t// The total width of the game screen. Since our grid takes up the entire screen\r\n\t\t// this is just the width of a tile times the width of the grid\r\n\t\tthis.width = function() {\r\n\t\t\treturn $(this.stage).parent().width();\r\n\t\t\t//return this.map_grid.width * this.map_grid.tile.width;\r\n\t\t};\r\n\r\n\t\t// The total height of the game screen. Since our grid takes up the entire screen\r\n\t\t// this is just the height of a tile times the height of the grid\r\n\t\tthis.height = function() {\r\n\t\t\treturn $(this.stage).parent().height();\r\n\t\t\t//return this.map_grid.height * this.map_grid.tile.height;\r\n\t\t};\r\n\r\n\t\tthis.zIndex = {\r\n\t\t\tworldLayerGround: 100,\r\n\t\t\tworldLayerBelowCharacter: 200,\r\n\t\t\tworldLayerCharacter: 300,\r\n\t\t\tworldLayerAboveCharacter: 400,\r\n\t\t\tworldLayerTop: 800\r\n\t\t};\r\n\r\n\t\t// Separate the numbers by 100 in case someone wants to add a state in between without having to increment the subsequent\r\n\t\tthis.statusEnum = {\r\n\t\t\t'not-started': 0,\r\n\t\t\t'started': 100,\r\n\t\t\t'complete': 200\r\n\t\t};\r\n\r\n\t\tthis.status = this.statusEnum['not-started'];\r\n\r\n\r\n\t\tthis.popRestartGameDialogue = function(message, showPlayAgain) {\r\n\t\t\t// Make the default true if they don't provide it explicitly\r\n\t\t\tshowPlayAgain = showPlayAgain == null ? true : showPlayAgain;\r\n\r\n\t\t\tvar $statusBox = $('.game-ui').find('.game-status-box');\r\n\t\t\t\r\n\t\t\tvar content = '<h1 class=\"game-status-box-message\">' + message + '</h1>';\r\n\t\t\tif(showPlayAgain) {\r\n\t\t\t\tcontent += '<button class=\"play-again\">Play Again?</button>';\r\n\r\n\t\t\t\tcontent += '<div class=\"credits-box\">';\r\n\t\t\t\t\tcontent += '<div>Developed by <a href=\"http://ericeastwood.com/\">Eric Eastwood</a></div>';\r\n\t\t\t\t\tcontent += '<hr />';\r\n\t\t\t\t\tcontent += '<div><strong>Assets:</strong></div>';\r\n\t\t\t\t\tcontent += '<ul class=\"credits-box-attribution\">';\r\n\t\t\t\t\t\tcontent += '<li><strong><a href=\"http://opengameart.org/users/remaxim\">remaxim:</strong> <a href=\"http://opengameart.org/content/win-sound-2\">Sound Effects</a></li>';\r\n\t\t\t\t\t\tcontent += '<li><strong><a href=\"http://opengameart.org/users/prinsu-kun\">Prinsu-Kun:</strong> <a href=\"http://opengameart.org/content/retro-deaddestroyeddamaged-sound\">Sound Effects</a></li>';\r\n\t\t\t\t\t\tcontent += '<li><strong><a href=\"http://opengameart.org/users/caeles\">caeles:</strong> <a href=\"http://opengameart.org/content/shadowless-lpc-food\">Sprites</a></li>';\r\n\t\t\t\t\tcontent += '</ul>';\r\n\t\t\t\tcontent += '</div>';\r\n\t\t\t}\r\n\r\n\t\t\tvar $statusContents = $(content).appendTo($statusBox);\r\n\t\t\t$statusContents.filterFind('.play-again').on('click', function() {\r\n\t\t\t\t// Restart the game\r\n\t\t\t\tCrafty.scene('Game');\r\n\r\n\t\t\t\t// Get these out of the way since they restarted the game\r\n\t\t\t\t$statusContents.remove();\r\n\t\t\t});\r\n\t\t};\r\n\r\n\t\tthis.clearGameDialogue = function() {\r\n\t\t\tvar $statusBox = $('.game-ui').find('.game-status-box');\r\n\r\n\t\t\t// Clear it out\r\n\t\t\t$statusBox.html('');\r\n\t\t};\r\n\r\n\r\n\t\t// Initialize and start our game\r\n\t\tthis.start = function() {\r\n\t\t\tvar self = this;\r\n\r\n\t\t\t// Start crafty and set a background color so that we can see it's working\r\n\t\t\t// Passing `null, null` as the first paramaters causes fullscreen (see crafty source)\r\n\t\t\t// Instead of passing in a stage element as the last parameter of `init`,\r\n\t\t\t// you can add a element with the id of `cr-stage ` or even leave it out to have it auto-generated\r\n\t\t\tCrafty.init(null, null, this.stage);\r\n\t\t\tCrafty.background('#fff7b5');\r\n\r\n\t\t\t// Add the right click context menu back\r\n\t\t\tCrafty.settings.modify(\"stageContextMenu\", true);\r\n\r\n\t\t\t// Simply start the \"Loading\" scene to get things going\r\n\t\t\tCrafty.scene('Loading');\r\n\t\t};\r\n\t}", "title": "" }, { "docid": "aaefa41eb934ea36b56fd524d293d140", "score": "0.67094034", "text": "function GameComponent (width, height, color, x, y, type, context) {\n this.type = type;\n this.width = width;\n this.height = height;\n this.pos = {\n x: x, y: y\n }\n this.speed = {\n x: 0, y: 0\n }\n this.gravity = 0;\n\n if (this.type == \"player\") {\n this.gravity = 0.05;\n }\n\n this.context = context;\n this.context.fillStyle = color;\n this.context.fillRect(this.pos.x, this.pos.y, this.width, this.height);\n\n this.update = function() {\n this.speed.y += this.gravity;\n if (this.type == \"player\") {\n //Check if next step of movement will put player out of bounds\n if ( !this.willExitBounds(this.pos.x + this.speed.x, this.pos.y) ) {\n this.pos.x += this.speed.x;\n } else {\n this.speed.x *= -0.5; //If so, bounce off wall according to speed\n }\n if ( !this.willExitBounds(this.pos.x, this.pos.y + this.speed.y)) {\n this.pos.y += this.speed.y;\n } else {\n this.speed.y *= -0.5;\n }\n } else {\n this.pos.x += this.speed.x;\n this.pos.y += this.speed.y;\n }\n\n context.fillStyle = color;\n\n if (this.type == \"text\") {\n this.context.font = this.width + \" \" + this.height; //Janky\n this.context.fillText(this.text, this.pos.x, this.pos.y);\n } else {\n context.fillRect(this.pos.x, this.pos.y, this.width, this.height);\n }\n }\n\n this.move = function(dir) {\n switch(dir) {\n case 'up': { this.speed.y -= 10; break; }\n case 'down': { this.speed.y += 10; break; }\n case 'left': { this.speed.x -= 10; break; }\n case 'right': { this.speed.x += 10; break; }\n default: { break; }\n }\n }\n\n this.isIntersecting = function(other) {\n let bounds = {\n left: this.pos.x,\n right: this.pos.x + this.width,\n top: this.pos.y,\n bottom: this.pos.y + this.height\n };\n let otherBounds = {\n left: other.pos.x,\n right: other.pos.x + other.width,\n top: other.pos.y,\n bottom: other.pos.y + other.height\n }\n\n return !(\n bounds.bottom < otherBounds.top ||\n bounds.top > otherBounds.bottom ||\n bounds.right < otherBounds.left ||\n bounds.left > otherBounds.right\n )\n }\n\n this.willExitBounds = function(dx, dy) {\n return (\n dy > this.context.canvas.height - this.height ||\n dy < 0 ||\n dx > this.context.canvas.width - this.width ||\n dx < 0\n );\n }\n}", "title": "" }, { "docid": "f6950df696ce6e3572e932951dd757f4", "score": "0.67080265", "text": "function initGame() {\r\n renderLevels()\r\n gGame = {\r\n isOn: true,\r\n isFirstClick: true,\r\n\r\n }\r\n gBoard = buildBoard();\r\n renderBoard(gBoard);\r\n startTimer()\r\n\r\n}", "title": "" }, { "docid": "3807754213deffc056e03eb29ee0f6af", "score": "0.6702319", "text": "run() {\n let background = new PIXI.extras.TilingSprite(\n PIXI.loader.resources.blocks.textures.background, \n this.app.renderer.width,\n this.app.renderer.height);\n this.app.stage.addChild(background);\n \n this.key = new Keyboard();\n this.scores = new ScoreTable();\n \n // define available game states\n this.addState('play', new GamePlay(this));\n this.addState('pause', new GamePaused(this));\n this.addState('menu', new GameMenu(this));\n this.addState('gameover', new GameOver(this));\n \n // set initial state\n this.setState('menu');\n \n // start the updates\n this.app.ticker.add(this.update, this);\n }", "title": "" }, { "docid": "d419c40db75092f85cdf08d7927e4dd7", "score": "0.6699908", "text": "playGame() {\n\t\tthis.container.removeEventListener('click', this.playGame);\n\n\t\tthis.isStart = false;\n\n\t\tthis.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);\n\n\t\tthis.world = new World(this.ctx);\n\t\tthis.world.init();\n\n\t\tthis.bird = new Bird(this.ctx, CANVAS_HEIGHT / 2);\n\t\tthis.bird.drawBird();\n\t\tthis.bird.frameCount();\n\n\t\tthis.generatePipe();\n\n\t\tthis.drawScore();\n\n\t\tthis.update();\n\n\t\tthis.container.addEventListener('click', this.canvasClick);\n\t\tdocument.addEventListener('keydown', this.canvasSpaceKey);\n\t}", "title": "" }, { "docid": "0b51ae42531f470d7fd53c1a83652f13", "score": "0.6696353", "text": "function render (game){\n\t \t}", "title": "" }, { "docid": "69c2e460049fb9ed7463f70fbf45615b", "score": "0.66933817", "text": "function GameState() {\n\tvar playerProjectiles = new jaws.SpriteList()\n\tvar enemies\n\t// var test = new Star({\n\t// x : 100,\n\t// y : 100,\n\t// speed_vector: {x: 2, y: 0},\n\t// affectedByGravity: false,\n\t// range: 30\n\t// })\n\tvar playerMoved = false\n\t\n\tvar background = new jaws.Sprite({\n\t\timage : \"background2.png\",\n\t\tx : 0,\n\t\ty : 0\n\t})\n\tvar alarmRaised = false\n\n\tthis.setup = function() {\n\t\tjaws.on_keydown(\"esc\", function() {\n\t\t\tjaws.switchGameState(MenuState)\n\t\t})\n\t\tjaws.preventDefaultKeys([ \"left\", \"right\", \"space\" ])\n\n\t\tcurrentStage = game.stageList.currentStage()\n\t\t\n\t\tgame.player = new Player({\n\t\t\tx : 100,\n\t\t\tspeed : game.playerSpeed\n\t\t})\n\t\tgame.player.can_fire = true\n\t\tgame.player.weapon = allWeapons.SealWeapon\n\n\t\tenemies = currentStage.enemies()\n\t\tonscreenEnemies = enemies\n\t}\n\n\tthis.draw = function() {\n\t\t// Clear screen\n\t\tjaws.context.fillStyle = game.backgroundColor\n\t\tjaws.context.fillRect(0, 0, jaws.width, jaws.height)\n\t\tbackground.draw()\n\n//\t\tthis.drawGround()\n\t\tgame.player.draw()\n\t\tenemies.draw()\n\t\tplayerProjectiles.draw()\n\t}\n\n\tthis.drawGround = function() {\n\t\tjaws.context.strokeStyle = \"white\"\n\t\tjaws.context.fillStyle = \"blue\"\n\t\tjaws.context.lineWidth = 1\n\t\t// jaws.context.fillRect(game.ground.x, game.ground.y,\n\t\t// game.ground.width, game.ground.height)\n\t\tjaws.context.strokeRect(game.ground.x, game.ground.y,\n\t\t\t\tgame.ground.width, game.ground.height)\n\t}\n\n\tthis.levelMarkCleared = function() {\n\t\tcurrentStage = game.stageList.currentStage()\n\t\tcurrentStage.nextLevelMarkCleared()\n\t\tif (currentStage.isCleared()) {\n\t\t\tjaws.switchGameState(StageClearedState)\n\t\t} else {\n\t\t\t// Stage not yet cleared, has more levels.\n\t\t\tjaws.switchGameState(GameState)\n\t\t}\n\t}\n\n\tthis.update = function() {\n\t\tvar player = game.player\n\t\tvar dxdy\n\t\tif (jaws.pressed(\"left\")) {\n\t\t\tplayerMoved = true\n\t\t\tif(player.rect().x > game.gameAreaMinX) {\n\t\t\t\tdxdy = direction_keys['left']\n\t\t\t\tplayer.move(dxdy)\n\t\t\t}\n\t\t}\n\t\tif (jaws.pressed(\"right\")) {\n\t\t\tplayerMoved = true\n\t\t\tdxdy = direction_keys['right']\n\t\t\tplayer.move(dxdy)\n\t\t}\n\t\tif (jaws.pressed(\"space\")) {\n\t\t\tplayerMoved = true\n\t\t\tif (player.can_fire) {\n\t\t\t\tbullet = player.weapon.projectile(player)\n\t\t\t\tbullet.logFired()\n\t\t\t\tplayerProjectiles.push(bullet)\n\t\t\t\tplaySoundTag('fire2')\n\t\t\t\tplayer.can_fire = false\n\t\t\t\tsetTimeout(function() {\n\t\t\t\t\tgame.player.can_fire = true\n\t\t\t\t}, game.player.weapon.cooldown)\n\t\t\t}\n\t\t}\n\t\tif(playerMoved && !alarmRaised) {\n\t\t\talarmRaised = true\n\t\t\tconsole.log('Alarum!')\n\t\t\tenemies.forEach(function(ea) { \n\t\t\t\tea.showAlarm = true \n\t\t\t})\n\t\t\t\n\t\t\tsetTimeout(function() {\n\t\t\t\tonscreenEnemies.forEach(function(ea) {\n\t\t\t\t\tea.setInMotion()\n\t\t\t\t})\n\t\t\t}, 420)\n\t\t}\n\t\tplayerProjectiles.update()\n\t\tplayerProjectiles.removeIf(Projectile.isOutsideRange)\n\t\tjaws.collideManyWithMany(playerProjectiles, enemies).forEach(\n\t\t\t\tfunction(pair, index) {\n\t\t\t\t\tbullet = pair[0]\n\t\t\t\t\tenemy = pair[1]\n\t\t\t\t\tbullet.doCollideWith(enemy)\n\t\t\t\t\tenemy.doCollideWith(bullet)\n\t\t\t\t});\n\t\tplayerProjectiles.removeIf(Thing.isDead)\n\n\t\tenemies.update()\n\n\t\tjaws.collideOneWithMany(player, enemies).forEach(function(enemy) {\n\t\t\tplaySoundTag('sizzle')\n\t\t\tconsole.log(player.name() + ' collided with ' + enemy.name())\n\t\t\tvar touchDamage = enemy.damageTo(player)\n\t\t\tplayer.takeDamageFrom(touchDamage, enemy)\n\t\t\tplayer.knockBack(10)\n\t\t})\n\t\tenemies.removeIf(Thing.isDead)\n\t\tif (!player.isAlive()) {\n\t\t\tjaws.switchGameState(GameOverState)\n\t\t}\n\t\tif (enemies.length == 0) {\n\t\t\tthis.levelMarkCleared()\n\t\t}\n\t}\n}", "title": "" }, { "docid": "52bdc608b7d78b2ef1e3eb8fc9516e32", "score": "0.6680948", "text": "function playGame(){\n\n\t\tif(moveLeft && !moveRight){\n\t\t\t//cannon move to left side\n\t\t\tcannon.vx=-8;\n\t\t}\n\n\t\tif(moveRight && !moveLeft){\n\t\t\t//cannon move to right side\n\t\t\tcannon.vx=8;\n\t\t}\n\n\t\tif(!moveLeft && !moveRight){\n\t\t\t//cannon stops moving\n\t\t\tcannon.vx=0;\n\t\t}\n\n\t\t//cannon fire missiles\n\t\tif(shoot){\n\t\t\tfireMissile();\n\t\t\tshoot=false;//Prevent more than one shot being fired\n\t\t}\n\t\t//update cannon movements\n\n\t\tcannon.x= Math.max(0,Math.min(cannon.x+cannon.vx,canvas.width-cannon.width));\n\n\t\t//move the missile\n\t\tfor(var i=0;i<missiles.length;i++){\n\t\t\tvar missile = missiles[i];\n\n\t\t\t//move missile up the screen\n\t\t\tmissile.y += missile.vy;\n\n\t\t\t//remove missile if out of top screen\n\t\t\t if(missile.y < 0 - missile.height){\n\t\t\t\t//remove missile from missiles array\n\t\t\t\tremoveObject(missile,missiles);\n\t\t\t\t//remove missile from sprites array\n\t\t\t\tremoveObject(missile,sprites);\n\t\t\t\ti--;//reduce the loop counter by one to compensate for the removed element\n\t\t\t}\n\n\t\t}\n\n\t\t//Add one to the alienTimer\n\t\talienTimer++;\n\n\t\t//make a new alien if alienTimer equals alienFrequency\n\t\tif(alienTimer==alienFrequency){\n\t\t\tmakeAlien();\n\t\t\talienTimer=0;//reset alienTimer\n\n\t\t\t//Reduce the alienFrequency by one to gradually increase the frequency that aliens are created\n\t\t\t//aliens will appear faster by time\n\t\t\tif(alienFrequency>2){\n\t\t\t\talienFrequency--;\n\t\t\t}\n\n\t\t}\n\n\t\t//move aliens\n\t\tfor(var i=0;i<aliens.length;i++){\n\t\t\tvar alien=aliens[i];\n\t\t\tif(alien.state=alien.NORMAL){\n\t\t\t\t//move current alien if its state is normal\n\t\t\t\talien.y+=alien.vy;\n\n\t\t\t}\n\t\t\t//check if the alien has crossed the bottom of the screen\n\t\t\tif(alien.y > canvas.height+alien.height){\n\t\t\t\t//End game if an alien reached earth\n\t\t\t\tgameState= gameOver;\n\t\t\t}\n\t\t}\n\n\t\t//check if alien has collision with missile\n\t\tfor(var i=0;i<aliens.length;i++){\n\n\t\t\tvar alien = aliens[i];\n\t\t\tfor(var j=0;j<aliens.length;j++){\n\t\t\t\tvar missile = missiles[i];\n\t\t\t\tif(missile && alien && hitTestRectangle(alien,missile) && alien.state === alien.NORMAL){\n\n\t\t\t\t\t//missile hit alien and destory it\n\t\t\t\t\tdestoryAlien(alien);\n\t\t\t\t\tscore++;\n\t\t\t\t\tscoreDisplay.text=score;\n\n\t\t\t\t\t//remove missile\n\t\t\t\t\tremoveObject(missile,missiles);\n\t\t\t\t\tremoveObject(missile,sprites);\n\n\t\t\t\t\tif(score===scoreNeededToWin){\n\t\t\t\t\t\tgameState = gameOver;\n\t\t\t\t\t}\n\n\n\t\t\t\t\t//Subtract 1 from the loop counter to compensate for the removed missile\n\t\t\t\t\tj--;\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\t}", "title": "" }, { "docid": "9e945bac97f273327d5cf05ba19dbe6d", "score": "0.6677006", "text": "function gameCheck(){\n\n}", "title": "" }, { "docid": "7d8c9eabaad3bc33c1a9af887dfeaa49", "score": "0.6674468", "text": "function draw() {\n //~~~ intro 1 ~~~//\n if (gameState === \"intro1\") {\n // play the ambient sound effect\n ambience.play();\n //display the screen\n introScreen1.display();\n\n //~~~ intro 2 ~~~//\n } else if (gameState === \"intro2\") {\n // play the ambient sound effect\n ambience.play();\n //play the siren sound effect\n siren.play();\n //display the screen\n introScreen2.display();\n\n //~~~ playing ~~~//\n } else if (gameState === \"playing\") {\n ambience.play();\n //display the background image\n background(backgroundImage);\n //display the destination planet\n planetAmazon.display();\n //display the enemies\n displayEnemies();\n //display the explosions\n displayExplosions();\n // Handle movment of the player\n player.move();\n // display the phazers, and check for collision with enemies\n handlePhazers();\n //detects if player has collided with enemy\n player.detectCollision();\n //displays the player's crosshairs, and the ship\n player.display();\n\n\n //~~~ game Over ~~~//\n } else if (gameState === \"gameOver\") {\n //play the gameover bells\n gameOverBells.play();\n //play the evil evilLaugh\n evilLaugh.play();\n //display the game over screen\n gameOverScreen.display();\n //remove any stray enemies\n for (let e = 0; e < enemies.length; e++) {\n enemies.splice(e, 1);\n }\n }\n\n //~~~ game won ~~~//\n else if (gameState === \"gameWon\") {\n gameWonScreen.display()\n //remove any stray enemies\n for (let e = 0; e < enemies.length; e++) {\n enemies.splice(e, 1);\n console.log(enemies.length);\n }\n }\n}", "title": "" }, { "docid": "ba2ab5ff9cc27dddb539a0f89ac511a0", "score": "0.66659474", "text": "function startGame() {\n myGameArea.start();\n}", "title": "" }, { "docid": "673e3a4433987897fe0a21c0b16c540b", "score": "0.66574204", "text": "create()\n {\n //add bg\n this.add.sprite(240, 320, \"bg\");\n player = new Player(this,355,500,\"player\").setScale(.8);\n\n //create bullets\n gameState.bullet = this.physics.add.group();\n\n //for ground platform\n const platforms = this.physics.add.staticGroup();\n platforms.create(335,640,\"platform\");\n gameState.cursors = this.input.keyboard.createCursorKeys();\n\n //player score\n playerScore = new Score();\n currentScore = playerScore.getScore;\n gameState.scoreText = this.add.text(325, 620, `Score: ${currentScore}`, {fontSize: '15px', fill: '#000000'});\n\n //helps to detect collision btw the platform and player\n player.setCollideWorldBounds(true);\n this.physics.add.collider(player, platforms);\n\n //create the group bugs\n gameState.bugs = this.physics.add.group();\n gameState.bugRed = this.physics.add.group();\n bugList = ['bugGreen','bugRed', 'bugYellow'];\n\n //creating green bugs\n greenBug = () => {\n const xCoord = Math.random() * 640\n let randomBug = bugList[Math.floor(Math.random() * 1)]\n gameState.bugs.create(xCoord, 2, randomBug);\n //gameState.bugs.rotation += 90;\n }\n\n greenBugLoop = this.time.addEvent({\n delay: 1300,\n callback: greenBug,\n loop: true,\n });\n\n //generate red bug\n generateRedbug = () =>\n {\n redBug = () => {\n const xCoord = Math.random() * 640\n let randomBug = bugList[1];\n gameState.bugRed.create(xCoord, 2, randomBug)\n }\n\n redBugLoop = this.time.addEvent({\n delay: 1300,\n callback: redBug,\n loop: true,\n });\n }\n //green bug collide with platform\n this.physics.add.collider(gameState.bugs, platforms, (bug) => {\n bug.destroy();\n playerScore.setScore = 2;\n currentScore = playerScore.getScore;\n gameState.scoreText.setText(`Score: ${playerScore.getScore}`);\n\n })\n\n //Red bug collide with platform\n this.physics.add.collider(gameState.bugRed, platforms, (bug) => {\n bug.destroy();\n playerScore.setScore = 1;\n currentScore = playerScore.getScore;\n gameState.scoreText.setText(`Score: ${playerScore.getScore}`)\n })\n\n //for bullets collide with green bug\n this.physics.add.collider(gameState.bugs,gameState.bullet, (bug, bullet)=> {\n bug.destroy();\n bullet.destroy();\n playerScore.setScore = 1;\n currentScore = playerScore.getScore;\n gameState.scoreText.setText(`Score: ${playerScore.getScore}`)\n });\n\n //for bullets collide with red bug\n this.physics.add.collider(gameState.bugRed,gameState.bullet, (bug, bullet)=> {\n bug.destroy();\n bullet.destroy();\n playerScore.setScore = 1;\n currentScore = playerScore.getScore;\n gameState.scoreText.setText(`Score: ${playerScore.getScore}`)\n\n });\n\n\n //for green bug collide with player\n this.physics.add.collider(gameState.bugs,player, () => {\n greenBugLoop.destroy();\n this.physics.pause();\n this.endScene()\n});\n\n //for red bug collide with player\nthis.physics.add.collider(gameState.bugRed,player, () => {\n redBugLoop.destroy();\n this.physics.pause();\n this.endScene()\n});\n\n //time counter for generating red bug and destroy green\n timer = setInterval(() => {\n console.log(\"time A \" + seconds);\n seconds--;\n if (seconds < 0) {\n greenBugLoop.destroy();\n generateRedbug();\n clearInterval(timer);\n this.timer2();\n }\n }, 10000);\n }", "title": "" }, { "docid": "77c569cf76c4d6c916050da84222ea58", "score": "0.6655986", "text": "function game_loop(){\n\tif (pauseenabled == 0){\n\tclear();\n\tdraw_blob();\n\tdraw_coins();\n\tdraw_specials();\n\tdraw_rocks();\n\tdraw_info();\n\tcolide();\n\t}\n\t\n\t}", "title": "" }, { "docid": "cc1c1a40ff101e230308ad4762d0c4a4", "score": "0.6655743", "text": "function startGame() {\n\tupdateGameState()\n\tmoveTetroDown()\n}", "title": "" }, { "docid": "4f1786cd0a846817d54be2e9ddb0f309", "score": "0.6654457", "text": "function gameLoop(){\r\n // console.log(\"Game Loop Running\");\r\n draw();\r\n update();\r\n\r\n}", "title": "" }, { "docid": "cdb695f837005eb871114bbccdfc0ae3", "score": "0.66531587", "text": "createObjects() {\n\t\tgame.level_frame = 0;\n\t\tlet l = window.app.level.split( '|' ).map( ( a ) => {\n\t\t\treturn a.split( ',' );\n\t\t} );\n\t\tterrain.set();\n\t\tlet obj = {\n\t\t\tw: ( arr ) => { //wait\n\t\t\t\tlet s = new GameControl( pInt( arr[ 1 ] ) );\n\t\t\t\ts.loc = arr[ 5 ];\n\t\t\t\ts.wait = arr[ 2 ];\n\t\t\t\ts.type = arr[ 6 ];\n\t\t\t\ts.level = arr[ 7 ];\n\t\t\t\ts.amt = arr[ 8 ];\n\t\t\t\tgame.a.push( s );\n\t\t\t},\n\t\t\tu: ( arr ) => { //uplink\n\t\t\t\tgame.a.push( new Plug( 'plug', pInt( arr[ 1 ] ), pInt( arr[ 2 ] ) , arr[ 3 ] ) );\n\t\t\t},\n\t\t\tc: ( arr ) => { //cache\n\t\t\t\t//game.a.push( new GroundCache( ...arr.slice( 1 ) ) );\n\t\t\t\tgame.a.push( new GroundCache( arr[ 1 ], arr[ 2 ], arr[ 3 ], arr[ 4 ] ) );\n\t\t\t},\n\t\t\tp: ( arr ) => { //pause\n\t\t\t\tlet s = new GameControl( pInt( arr[ 1 ] ) );\n\t\t\t\ts.pscds = pInt( arr[ 2 ] );\n\t\t\t\tgame.a.push( s );\n\t\t\t},\n\t\t\ts: ( arr ) => { //spawn\n\t\t\t\t// [ \"s\", 32, \"c\", \"a\", 1, \"12\" ]\n\t\t\t\tlet s = new GameControl( pInt( arr[ 1 ] ) );\n\t\t\t\ts.loc = arr[ 2 ];\n\t\t\t\ts.type = arr[ 3 ];\n\t\t\t\ts.level = arr[ 4 ];\n\t\t\t\ts.amt = arr[ 5 ];\n\t\t\t\tgame.a.push( s );\n\t\t\t},\n\t\t\tg: ( arr ) => { //ground\n\t\t\t\tgame.a.push( new GroundTank( 'ground' + arr[ 3 ], arr[ 1 ], arr[ 2 ] ) );\n\t\t\t},\n\t\t\tt: ( arr ) => { //text particle, permanent\n\t\t\t\tgame.a.push( new TextParticle( arr[ 3 ], arr[ 1 ] * 25, arr[ 2 ] * 32, true ) );\n\t\t\t},\n\t\t\tbl: ( arr ) => { //begin level\n\t\t\t\tlet s = new GameControl( pInt( arr[ 1 ] ) );\n\t\t\t\ts.blvl = arr[ 2 ];\n\t\t\t\ts.amt = 0;\n\t\t\t\ts.y = pInt( arr[ 1 ] );\n\t\t\t\ts.x = 0;\n\t\t\t\tgame.a.push( s );\n\t\t\t},\n\t\t\tsl: ( arr ) => { //end level\n\t\t\t\tlet s = new GameControl( pInt( arr[ 1 ] ) );\n\t\t\t\ts.elvl = arr[ 2 ];\n\t\t\t\tgame.a.push( s );\n\t\t\t}\n\t\t};\n\n\t\tl.forEach( ( arr ) => {\n\t\t\tobj[ arr[ 0 ] ]( arr );\n\t\t} );\n\t}", "title": "" }, { "docid": "4c4f8ee04797962c9fc9eab1728a93f3", "score": "0.66386074", "text": "function newGame( e ) {\n if( checkCollisionPoint( copButton, e.clientX, e.clientY ) ) {\n //player is a cop\n playerType = \"cop\";\n playerChar = new Character( \"Cop 1\", gridCellSize, gridCellSize, engine.canv.width/2, engine.canv.height/2, copSrc, animationFrames );\n\n //put two robbers, the player, and the other cop into the agents array so turn order is correct\n agents.push( new Character( \"Robber 1\", gridCellSize, gridCellSize, engine.canv.width/2, engine.canv.height/2, robSrc, animationFrames ) );\n agents.push( new Character( \"Robber 2\", gridCellSize, gridCellSize, engine.canv.width/2, engine.canv.height/2, robSrc, animationFrames ) );\n agents.push( playerChar );\n agents.push( new Character( \"Cop 2\", gridCellSize, gridCellSize, engine.canv.width/2, engine.canv.height/2, copSrc, animationFrames ) );\n\n } else if ( checkCollisionPoint( robberButton, e.clientX, e.clientY ) ) {\n //player is a robber\n playerType = \"robber\";\n playerChar = new Character( \"Robber 1\", gridCellSize, gridCellSize, engine.canv.width/2, engine.canv.height/2, robSrc, animationFrames );\n\n //put the player, the other robber, and two cops into the agents array so turn order is correct\n agents.push( playerChar );\n agents.push( new Character( \"Robber 1\", gridCellSize, gridCellSize, engine.canv.width/2, engine.canv.height/2, robSrc, animationFrames ) );\n agents.push( new Character( \"Cop 1\", gridCellSize, gridCellSize, engine.canv.width/2, engine.canv.height/2, copSrc, animationFrames ) );\n agents.push( new Character( \"Cop 2\", gridCellSize, gridCellSize, engine.canv.width/2, engine.canv.height/2, copSrc, animationFrames ) );\n\n } else {\n //didn't click on either button\n return;\n }\n\n if( firstGame == false ) {\n //clear out the dancers\n for( var i = 0; i < gridSize; i++ ) {\n for( var j = 0; j < gridSize; j++ ) {\n engine.removeObject( danceArray[i][j] );\n danceArray[i][j] = null;\n grid[i][j].occupiedBy = null;\n }\n }\n engine.removeObject( winnerText );\n }\n\n gameStarted = true;\n //the player is human and uses controls\n playerChar.human = true;\n playerChar.onKeyDown[\"arrowdown\"] = playerMove;\n playerChar.onKeyDown[\"arrowup\"] = playerMove;\n playerChar.onKeyDown[\"arrowleft\"] = playerMove;\n playerChar.onKeyDown[\"arrowright\"] = playerMove;\n //space lets you pass your turn to prevent getting stuck\n playerChar.onKeyDown[\" \"] = playerMove;\n\n //the player clicked on a button. remove the buttons and start the game and stuff\n engine.removeObject( copButton );\n engine.removeObject( robberButton );\n engine.removeObject( characterSelectText );\n\n for( var i = 0; i < agents.length; i++ ) {\n engine.addObject( agents[i] );\n randomlyPlace( agents[i] );\n }\n //true if the agent is a cop\n agents[0].cop = false;\n agents[1].cop = false;\n agents[2].cop = true;\n agents[3].cop = true;\n\n //start writing the turn number and whose turn it is\n engine.addObject( whoseTurnText );\n engine.addObject( currentTurnText );\n //start the turn based cycle thing going\n currentAgent = agents.length;\n currentTurn = 0;\n incrementCurrentAgent();\n\n}", "title": "" }, { "docid": "3af81ad86295ebfdd479f21b6e88c834", "score": "0.66336167", "text": "gameOverAction() {\n\n }", "title": "" }, { "docid": "3d0947d0733666f8b54f6a8a7d64f686", "score": "0.6628224", "text": "function render(){\n\tif (gameStatus) {\n\t\tmessage();\n\t\tplayerMove();\n\t}\n}", "title": "" }, { "docid": "58eeca1410b02e9ad38dda793616d225", "score": "0.6626483", "text": "update() {\n // On every win\n win();\n // If player goes outside\n this.outsideCanvas();\n }", "title": "" }, { "docid": "e4ac71c98498a20e2dbac31cf8caf49b", "score": "0.66233337", "text": "function Game() {\n // Module constants and variables\n var _this = this;\n _this.gameObjects = {};\n /**\n * Initialize the Game and call the custom init function if a custom\n * init function is connected to the Game.\n *\n * @function init\n * @param {number} FPS The game's frames per second.\n * @param {object} ctx The 2D context of the game canvas.\n * @param {object} canvas The game canvas.\n */\n function init(FPS, ctx, canvas) {\n _this.FPS = FPS;\n _this.ctx = ctx;\n _this.canvas = canvas;\n // Call the custom init function if it is defined\n if (_this.customInit) {\n _this.customInit(_this.ctx);\n }\n }\n /**\n * Reset the Game and call the custom reset function if a custom reset\n * function is connected to the Game.\n *\n * @function reset\n */\n function reset() {\n // Clear all the GameObjects\n Object.keys(_this.gameObjects).forEach(function (type) {\n _this.gameObjects[type] = [];\n });\n // Call the custom reset function if it is defined\n if (_this.customReset) {\n _this.customReset();\n }\n }\n /**\n * Delete a conrete GameObject from the Game if it is flaged for\n * removal.\n *\n * @private\n * @function handleDelete\n * @param {object} gameObject The concrete GameObject.\n * @param {string} type The concrete GameObject's type.\n */\n function handleDelete(gameObject, type) {\n if (gameObject.canDelete()) {\n _this.gameObjects[type].splice(\n _this.gameObjects[type].indexOf(gameObject),\n 1\n );\n }\n }\n /**\n * Update the Game and call the custom update function if a custom\n * update function is connected to the Game.\n *\n * @function update\n */\n function update() {\n // Call the custom update function if it is defined\n if (_this.customUpdate) {\n _this.customUpdate(_this.FPS, _this.canvas);\n }\n // Update all of the GameObjects and handle GameObject deletion\n Object.keys(_this.gameObjects).forEach(function (type) {\n _this.gameObjects[type].forEach(function (obj) {\n obj.update(_this.FPS);\n handleDelete(obj, type);\n });\n });\n }\n /**\n * Render the Game and call the custom render function if a custom\n * render function is connected to the Game.\n *\n * @function render\n */\n function render() {\n // Clear the canvas prior to rendering\n _this.ctx.clearRect(0, 0, _this.canvas.width, _this.canvas.height);\n // Call the custom render function if it is defined\n if (_this.customRender) {\n _this.customRender(_this.ctx, _this.canvas);\n }\n // Render all of the GameObjects in order of their render priority\n $.map(_this.gameObjects, function (value) {\n return value;\n }).sort(function (gameObjA, gameObjB) {\n return gameObjA.getDrawPriority() - gameObjB.getDrawPriority();\n }).forEach(function (obj) {\n obj.render(_this.ctx);\n });\n }\n /**\n * Return the Game's collection of GameObjects specified by type, if the\n * collection of GameObjects do not exist for the specified type return\n * an empty array.\n *\n * @function getGameObjects\n * @param {string} type The Type of GameObjects to return.\n * @return {object} The GameObjects.\n */\n function getGameObjects(type) {\n return _this.gameObjects[type] || [];\n }\n /**\n * Add a concrete GameObject with a specific type to the Game.\n *\n * @function addGameObject\n * @param {object} gameObject The concrete GameObject.\n * @param {string} type The concrete GameObject's type.\n */\n function addGameObject(gameObject, type) {\n // If array of specific objects doesn't exist then create it\n if (Object.keys(_this.gameObjects).indexOf(type) < 0) {\n // Create an new array of items\n _this.gameObjects[type] = [];\n }\n _this.gameObjects[type].push(gameObject);\n }\n /**\n * Connect a custom Init function to the Game.\n *\n * @function connectCustomInit\n * @param {function} customInit The custom init function.\n */\n function connectCustomInit(customInit) {\n _this.customInit = customInit;\n }\n /**\n * Connect a custom reset function to the Game.\n *\n * @function connectCustomReset\n * @param {function} customReset The custom reset function.\n */\n function connectCustomReset(customReset) {\n _this.customReset = customReset;\n }\n /**\n * Connect a custom update function to the Game.\n *\n * @function connectCustomUpdate\n * @param {function} customUpdate The custom update function.\n */\n function connectCustomUpdate(customUpdate) {\n _this.customUpdate = customUpdate;\n }\n /**\n * Connect a custom render function to the Game.\n *\n * @function connectCustomRender\n * @param {function} customRender The custom render function.\n */\n function connectCustomRender(customRender) {\n _this.customRender = customRender;\n }\n /**\n * Abstract function that defines the Game's mouse click event. This\n * function needs to be overriden.\n *\n * @abstract\n * @function mouseClickEvent\n * @throws {Error} Abstract function.\n */\n function mouseClickEvent() {\n throw new Error(\"Cannot call abstract function!\");\n }\n /**\n * Abstract function that defines the Game's mouse release event. This\n * function needs to be overriden.\n *\n * @abstract\n * @function mouseReleaseEvent\n * @throws {Error} Abstract function.\n */\n function mouseReleaseEvent() {\n throw new Error(\"Cannot call abstract function!\");\n }\n /**\n * Abstract function that defines the Game's mouse movement event. This\n * function needs to be overriden.\n *\n * @abstract\n * @function mouseMoveEvent\n * @throws {Error} Abstract function.\n */\n function mouseMoveEvent() {\n throw new Error(\"Cannot call abstract function!\");\n }\n /**\n * Abstract function that defines the Game's keyboard press event. This\n * function needs to be overriden.\n *\n * @abstract\n * @function keyPressEvent\n * @throws {Error} Abstract function.\n */\n function keyPressEvent() {\n throw new Error(\"Cannot call abstract function!\");\n }\n /**\n * Abstract function that defines the Game's keyboard release event.\n * This function needs to be overriden.\n *\n * @abstract\n * @function keyReleaseEvent\n * @throws {Error} Abstract function.\n */\n function keyReleaseEvent() {\n throw new Error(\"Cannot call abstract function!\");\n }\n // Functions returned by the module\n return {\n init: init,\n reset: reset,\n update: update,\n render: render,\n addGameObject: addGameObject,\n keyPressEvent: keyPressEvent,\n mouseMoveEvent: mouseMoveEvent,\n getGameObjects: getGameObjects,\n mouseClickEvent: mouseClickEvent,\n keyReleaseEvent: keyReleaseEvent,\n mouseReleaseEvent: mouseReleaseEvent,\n connectCustomInit: connectCustomInit,\n connectCustomReset: connectCustomReset,\n connectCustomRender: connectCustomRender,\n connectCustomUpdate: connectCustomUpdate\n };\n }", "title": "" }, { "docid": "6a1e62885e9fa1f9a05ba5c624547e03", "score": "0.66211975", "text": "function Game(container, ms)\n {\n this.container=document.querySelector(\"#canvas\");\n \n this.ms = ms,\n this.width = this.container.width,\n this.height = this.container.height,\n this.ctx = this.container.getContext(\"2d\"),\n this.play = true,\n \n this.rightDown = false,\n this.leftDown = false,\n this.topDown = false,\n this.bottomDown = false,\n this.spaceDown = false,\n \n this.init = function()\n { \n this.initKeys();\n //stocking the IntervalWorker so we can kill it when game has to end up\n IntervalWorker = setInterval(this.mainLoop, this.ms);\n \n },\n \n this.initKeys = function()\n {\n document.addEventListener('keydown', keyDown);\n document.addEventListener('keyup', keyUp);\n \n function keyDown(e){\n if (game.play === true)\n {\n if (e.keyCode === 39)\n game.rightDown = true;\n else if (e.keyCode === 37)\n game.leftDown = true;\n else if (e.keyCode === 38)\n game.topDown = true;\n else if (e.keyCode === 40)\n game.bottomDown = true;\n }\n }\n \n \n function keyUp(e){\n if (game.play === true)\n {\n if (e.keyCode === 39)\n game.rightDown = false;\n else if (e.keyCode === 37)\n game.leftDown = false;\n else if (e.keyCode === 38)\n game.topDown = false;\n else if (e.keyCode === 40)\n game.bottomDown = false;\n }\n }\n \n },\n \n\n //HERE THE MAIN LOOP FUNCTION FOR OUR GAME \n this.mainLoop = function() \n {\n\n if (game.play === true)\n { \n //console.log(`GAME IS TRUE YET ${game.play} .`)\n game.ctx.clearRect(0, 0, game.width, game.height);\n firstLevel.generate();\n \n \n player.create(\"./img/pacman.png\");\n player.move();\n\n redGhost.create(\"./img/redghost.png\");\n redGhost.move(2);\n \n blueGhost.create(\"./img/blueghost.png\");\n blueGhost.move(3);\n\n //update the score element\n document.querySelector(\"#score\").innerHTML= player.score\n \n if (player.score >= maxScore)\n {\n document.querySelector(\"#game_over\").style.color= \"green\"\n document.querySelector(\"#game_over\").innerHTML= \"You Won \"\n let end_time = performance.now();\n let start_time = t0;\n let game_duration = ((end_time - start_time) / 1000).toFixed(2)\n let game_points = (player.score / game_duration).toFixed(2)\n game_over.play();\n console.log(`La partie a pris ${game_duration} SECONDES.`);\n \n setTimeout(\n alert(`👏 BRAVO! Tu as gagné avec un score de ${player.score} et ça t'a pris exactement ${game_duration} secondes ! \\n tu as ${game_points} Points dans le classement`), \n 7000);\n\n clearInterval(IntervalWorker)\n }\n }\n\n if(game.play === false)\n {\n //console.log(\"Entered in game False\")\n document.querySelector(\"#game_over\").innerHTML= \"Game Over\";\n let end_time = performance.now();\n let start_time = t0;\n let game_duration = ((end_time - start_time) / 1000).toFixed(2)\n let game_points = (player.score / game_duration).toFixed(2)\n game_over.play();\n console.log(`TU AS PERDU... 😑 , la partie a durée ${game_duration} SECONDES.`)\n \n setTimeout(\n alert(`OOPS, Tu as Perdu... 😑 , la partie a durée ${game_duration} secondes! \\n tu as ${game_points} Points dans le classement`),\n 3000);\n clearInterval(IntervalWorker)\n }\n \n game.keyManager();\n },\n \n this.keyManager = function()\n {\n if (game.rightDown)\n player.direction = 0;\n if (game.leftDown)\n player.direction = 1;\n if (game.topDown)\n player.direction = 2;\n if (game.bottomDown)\n player.direction = 3;\n };\n }", "title": "" }, { "docid": "4fe6f691c5c20fac67aac4265feadcbc", "score": "0.66202164", "text": "function startGame() {\n //init the game\n gWorld = new gameWorld(6);\n gWorld.w = cvs.width;\n gWorld.h = cvs.height;\n \n gWorld.state = 'RUNNING';\n gWorld.addObject(makeGround(gWorld.w, gWorld.h));\n gWorld.addObject(makeCanopy(gWorld.w));\n gWorld.addObject(makeWalker(gWorld.w, gWorld.h));\n gWorld.addObject(makeWalker(gWorld.w, gWorld.h,true));\n gWorld.addObject(makePlayer());\n \n startBox.active = false;\n pauseBtn.active = true;\n soundBtn.active = true;\n touchRightBtn.active = true;\n touchLeftBtn.active = true;\n replayBtn.active = false;\n \n gameLoop();\n }", "title": "" }, { "docid": "6e087c334ce401f5a4d191f45c833931", "score": "0.6619922", "text": "play() {\r\n /*Display \"Simulating Battle*/\r\n console.log(\"Simulating Battle\");\r\n /*Call the \"createMinions\" function to create the minions.\r\n *Call the \"createPlayers\" function to create the players. */\r\n this.createMinions();\r\n this.createPlayers();\r\n /*create commenceBattle*/\r\n this.commenceBattle();\r\n }", "title": "" }, { "docid": "72c7ebb8dfce7dbd2185a14b75e58517", "score": "0.6619094", "text": "init() {\n let g = this,\n _main = window._main;\n window.addEventListener(\"keydown\", function (event) {\n g.keydowns[event.keyCode] = \"down\";\n });\n window.addEventListener(\"keyup\", function (event) {\n g.keydowns[event.keyCode] = \"up\";\n });\n g.registerAction = function (key, callback) {\n g.actions[key] = callback;\n };\n // Set polling timer\n g.timer = setInterval(function () {\n g.setTimer(_main);\n }, 1000 / g.fps);\n // Register mouse movement events\n document.getElementById(\"canvas\").onmousemove = function (event) {\n let e = event || window.event,\n scrollX =\n document.documentElement.scrollLeft ||\n document.body.scrollLeft,\n scrollY =\n document.documentElement.scrollTop ||\n document.body.scrollTop,\n x = e.pageX || e.clientX + scrollX,\n y = e.pageY || e.clientY + scrollY;\n // Set current mouse coordinate position\n g.mouseX = x;\n g.mouseY = y;\n };\n // Start game button click event\n document.getElementById(\"js-startGame-btn\").onclick = function () {\n menuBackground.loop = true;\n menuBackground.play();\n document.getElementById(\"restartGame\").style.display = \"block\";\n document.getElementById(\"goHome\").style.display = \"block\";\n document.getElementsByClassName(\"cards-list\")[0].style.display =\n \"block\";\n\n // Play Start animation\n g.state = g.stateStart;\n // Set a timer to switch to the start game state\n setTimeout(function () {\n g.state = g.stateRunning;\n // Show control buttons\n document.getElementById(\"goHome\").className += \" show\";\n document.getElementById(\"restartGame\").className += \" show\";\n document.getElementsByClassName(\"systemSun\")[0].style.display =\n \"block\";\n // Set the global sun and zombie timer\n _main.clearTiemr();\n _main.setTimer();\n }, 3000);\n // Display card list information\n document.getElementsByClassName(\"cards-list\")[0].className +=\n \" show\";\n // Show control button menu\n document.getElementsByClassName(\"menu-box\")[0].className += \" show\";\n // Hide start game button, game introduction, view update log button\n document.getElementById(\"js-startGame-btn\").style.display = \"none\";\n };\n // Plant card click event\n document.querySelectorAll(\".cards-item\").forEach(function (card, idx) {\n card.onclick = function () {\n let plant = null, // Mouse to place plant objects\n cards = _main.cards;\n // When the card is clickable\n if (cards[idx].canClick) {\n // Set the current plant category with the mouse\n g.cardSection = this.dataset.section;\n // Can draw plants with mouse\n g.canDrawMousePlant = true;\n // Set the idx of the currently selected plant card and the amount of sunlight required\n g.cardSunVal = {\n idx: idx,\n val: cards[idx].sunVal,\n };\n }\n };\n });\n // Mouse click on canvas event\n document.getElementById(\"canvas\").onclick = function (event) {\n let plant = null, // Mouse to place plant objects\n cards = _main.cards,\n x = g.mouseX,\n y = g.mouseY,\n plant_info = {\n // Initialization information of mouse placed plant object\n type: \"plant\",\n section: g.cardSection,\n x: _main.plants_info.x + 80 * (g.mouseCol - 1),\n y: _main.plants_info.y + 100 * (g.mouseRow - 1),\n row: g.mouseRow,\n col: g.mouseCol,\n canSetTimer: g.cardSection === \"sunflower\" ? true : false,\n };\n // Determine whether plants can be placed at the current location\n for (let item of _main.plants) {\n if (g.mouseRow === item.row && g.mouseCol === item.col) {\n g.canLayUp = false;\n g.mousePlant = null;\n }\n }\n // When placed, draw plants\n if (g.canLayUp && g.canDrawMousePlant) {\n let cardSunVal = g.cardSunVal;\n if (cardSunVal.val <= _main.allSunVal) {\n // Draw when there is enough sunlight\n // Disable the current card\n cards[cardSunVal.idx].canClick = false;\n // Change the clickable state of the card regularly\n cards[cardSunVal.idx].changeState();\n // draw countdown\n cards[cardSunVal.idx].drawCountDown();\n // Place corresponding plants\n plant = Plant.new(plant_info);\n _main.plants.push(plant);\n // Change the amount of sunlight\n _main.sunnum.changeSunNum(-cardSunVal.val);\n // Prohibit drawing plants that move with the mouse\n g.canDrawMousePlant = false;\n } else {\n // Insufficient sunshine\n // Prohibit drawing plants that move with the mouse\n g.canDrawMousePlant = false;\n // Clear to move plant objects with the mouse\n g.mousePlant = null;\n }\n } else {\n // Prohibit drawing plants that move with the mouse\n g.canDrawMousePlant = false;\n // Clear to move plant objects with the mouse\n g.mousePlant = null;\n }\n };\n // Takes to the game screen again!\n document.getElementById(\"goHome\").onclick = function (event) {\n _main.clearTiemr();\n clearInterval(g.timer);\n\n window.level = 1;\n window.takeMeHome();\n };\n // Restart game button event\n document.getElementById(\"restartGame\").onclick = function (event) {\n _main.clearTiemr();\n clearInterval(g.timer);\n window.takeMeHome();\n };\n }", "title": "" }, { "docid": "5cafd6311233998a0df0e063b8a35867", "score": "0.6618937", "text": "onLoad() {\n cc.director.getPhysicsManager().enabled = true;\n cc.director.getPhysicsManager().gravity = cc.v2(0, -3000);\n cc.director.getCollisionManager().enabled = true;\n\t\t//cc.director.getCollisionManager().enabledDebugDraw = true;\n\t\t//cc.director.setDisplayStats(true);\n\t\t\n SCREEN_WIDTH = this.node.width;\n SCREEN_HEIGHT = this.node.height;\n\n var self = this;\n\n this.node.on(cc.Node.EventType.TOUCH_START, function (event) {\n self.onTouchStart(event);\n }, this.node);\n\n this.OBSTACLE_DISTANCE_FLY_MODE = SCREEN_WIDTH * OBSTACLE_DISTANCE_K_FLY_MODE;\n this.OBSTACLE_DISTANCE_TRUCK_MODE = SCREEN_WIDTH * OBSTACLE_DISTANCE_K_TRUCK_MODE;\n this.OBSTACLE_DISTANCE_TRUCK_MODE_FIRST_TIME = SCREEN_WIDTH * OBSTACLE_DISTANCE_K_TRUCK_MODE_FIRST_TIME;\n\n this.OBSTACLE_SPACE = SCREEN_WIDTH * OBSTACLE_SPACE_K;\n\n this.obstacles = [];\n\t\t\n window.g_scrGameplay = this;\n\n this.score = 0;\n this.best = cc.sys.localStorage.getItem(\"best\");\n if (this.best == null) this.best = 0;\n\n this.character = cc.sys.localStorage.getItem(\"character\");\n if (this.character == null) this.character = \"ant\";\n\t\t\n\t\tif (cc.sys.isNative && ENABLE_ADMOB) {\n\t\t\tif (!initializedAdmob) {\n\t\t\t\tsdkbox.PluginAdMob.init();\n sdkbox.PluginAdMob.cache(\"gameover\");\n\t\t\t\tinitializedAdmob = true;\n\t\t\t}\n\t\t}\n }", "title": "" }, { "docid": "52c69133e7b9b1250a9eddf939f7d91b", "score": "0.66187036", "text": "function playGame() {\n if (game) {\n board.updateGrid();\n }\n}", "title": "" }, { "docid": "072b066e3c4e764430e94a51ad40c9e3", "score": "0.6617816", "text": "init (game) {\n this.game = game;\n this.anim = this.getComponent('Move').anim;\n this.inputEnabled = false;\n this.isAttacking = false;\n this.isAlive = true;\n this.nextPoseSF = null;\n this.registerInput();\n this.spArrow.active = false;\n this.atkTargetPos = cc.p(0,0);\n this.isAtkGoingOut = false;\n this.validAtkRect = cc.rect(25, 25, (cc.director.getVisibleSize().width - 50), (cc.director.getVisibleSize().height - 120));\n cc.log(\"valid rect, width: %s, height: %s\", cc.director.getVisibleSize().width, cc.director.getVisibleSize().height);\n this.oneSlashKills = 0;\n this.totalScore = 0;\n\n this.node.setScale(0.85);\n this.playStand();\n }", "title": "" }, { "docid": "2601b3ea917d4925e17a2142986d713d", "score": "0.6614336", "text": "function handleEndGame() {\n\n}", "title": "" }, { "docid": "f730d310c629f895a41f13e917a210af", "score": "0.6613663", "text": "function gameWinState() {\n crazySpace.update();\n }", "title": "" }, { "docid": "d8a1d2f28c178a199b1138b956d0d517", "score": "0.6611182", "text": "function game() {\r\n if (!gameover) {\r\n update();\r\n render();\r\n }else{\r\n drawText(\"GAME OVER\", canvas.width / 8, canvas.height / 2);\r\n }\r\n}", "title": "" }, { "docid": "18c26fe4dea0176fc8a1d2f78cf9bc8e", "score": "0.6608526", "text": "runGame(){\n\t\t\tthis.scene.runGame();\n\t\t}", "title": "" }, { "docid": "59180d45025dafca53dcf285cb233001", "score": "0.6604747", "text": "physicsEngine(){\n this.ctx.clearRect(0,0,800,700);\n this.background.render();\n this.plane.shotsFired.forEach((shot,shotIndex) => {\n if(shot.y <= 0) {\n this.plane.shotsFired.splice(shotIndex, 1);\n }\n }); \n this.obstacles.forEach((obstacle,obstacleIndex) => {\n if(obstacle.y >= 800) {\n this.obstacles.splice(obstacleIndex, 1);\n }\n }); \n this.plane.move();\n this.plane.shot();\n this.drawEverything();\n this.obstacles.forEach(obstacle => {\n this.plane.checkIfCollide(obstacle);\n });\n this.plane.shotsFired.forEach((shot,shotIndex) => {\n this.obstacles.forEach(obstacle => {\n if(obstacle.checkIfHit(shot) === true) {\n this.plane.shotsFired.splice(shotIndex, 1);\n }\n if(obstacle.checkIfHit(shot) === false) {\n this.plane.shotsFired.splice(shotIndex, 1);\n }\n })\n })\n if(defeat) {\n let img = new Image;\n img.src = \"./images/gameOver.png\"\n this.ctx.drawImage(img, 50, 330, 700, 80);\n }\n if(theScore >= 20) {\n let img = new Image;\n img.src = \"./images/congratulations.png\"\n this.ctx.drawImage(img, 50, 330, 700, 80);\n }\n this.frames++\n window.requestAnimationFrame(this.physicsEngine.bind(this));\n }", "title": "" }, { "docid": "6f18c2629f158f070f1820ff6f069cb9", "score": "0.66031086", "text": "function draw() {\n background(\"white\");\n\n //conditions for GAMESTATE to change from 0 to 1 to 2\n if (playerCount === 4 && carsAtFinishLine < 4) {\n /*\n function call to change existing value of gameState to a \n new one based on the value of paramter passed in the database\n */\n gameObj.updateState(1);\n }\n if (carsAtFinishLine == 4) {\n /*\n function call to change existing value of gameState to a \n new one based on the value of paramter passed in the database\n */\n gameObj.updateState(2);\n }\n if (gameState === 0) {\n image(WIMG, 0, -displayHeight * 0, displayWidth, displayHeight * 1);\n }\n if (gameState === 1) {\n clear();\n /*\n function call to activate the game to START 1 mode and \n aligned all players to starting positions at the start line\n */\n gameObj.play();\n }\n if (gameState == 2) {\n clear();\n gameObj.end();\n }\n\n}", "title": "" }, { "docid": "0cbd1f5ce91c6ca91a773aa10b49ee49", "score": "0.6593521", "text": "function draw() {\r\n background(\"white\");\r\n\r\n //conditions for GAMESTATE to change from 0 to 1 to 2\r\n if (playerCount === 4) {\r\n /*\r\n function call to change existing value of gameState to a \r\n new one based on the value of paramter passed in the database\r\n */\r\n gameObj.updateState(1);\r\n }\r\n else if (carsAtFinishLine === 4){\r\n /*\r\n function call to change existing value of gameState to a \r\n new one based on the value of paramter passed in the database\r\n */\r\n gameObj.updateState(2);\r\n }\r\n\r\n if (gameState === 1) {\r\n clear();\r\n /*\r\n function call to activate the game to START 1 mode and \r\n aligned all players to starting positions at the start line\r\n */\r\n gameObj.play();\r\n }\r\n else if (gameState == 2) {\r\n clear();\r\n /*\r\n function call to end the game from gameState 1 to 2 and display leaderboard with ranks for each player\r\n */\r\n gameObj.end();\r\n }\r\n\r\n}", "title": "" }, { "docid": "9f419ecc78e33ba1917e6f7c4afa4faf", "score": "0.6592096", "text": "function main() {\n constructDisplay()\n gameBoard = new Board()\n timer()\n autoMove()\n update()\n}", "title": "" }, { "docid": "a167e6cec1a9ac1ba63b39425032000c", "score": "0.6587885", "text": "function theGameLoop() {\n\t\n\tcurrent_time = new Date().getTime();\n\tcurrent_tick_ms = BABYLON.Tools.GetDeltaTime();\n\tdeltaTime = current_tick_ms/1000; // divide by 1000 to get per second\n\tif (deltaTime > 0.25) { // this makes deltaTime stick to above 4fps\n\t\tdeltaTime = 0.25;\n\t} else if (deltaTime < 0.01) { // this makes deltaTime stick to below 100fps\n\t\tdeltaTime = 0.01;\n\t}\n\t\n\tvar moved = false;\n\tvar input_this_time = [];\n\t\n\tvar x_dir = 0;\n\tvar y_dir = 0;\n\t\n\tif (moveForward && !moveReverse) {\n\t\tinput_this_time.push('u');\n\t\ty_dir += speed * deltaTime;\n\t\tmoved = true;\n\t}\n\t\n\tif (!moveForward && moveReverse) {\n\t\tinput_this_time.push('d');\n\t\ty_dir -= speed * deltaTime;\n\t\tmoved = true;\n\t}\n\t\n\tif (rotateLeft && !rotateRight) {\n\t\tinput_this_time.push('l');\n\t\tx_dir += speed * deltaTime;\n\t\tmoved = true;\n\t}\n\t\n\tif (!rotateLeft && rotateRight) {\n\t\tinput_this_time.push('r');\n\t\tx_dir -= speed * deltaTime;\n\t\tmoved = true;\n\t}\n\t\n\tif (moved) {\n\t\t\n\t\t//console.log('doing physics for you');\n\t\t\n\t\t// this is for client-side prediction\n\t\tplayer_origin.position.x += x_dir;\n\t\tplayer_origin.position.y += y_dir;\n\t\tplayer_origin.position.x = player_origin.position.x.toFixed(5) * 1;\n\t\tplayer_origin.position.y = player_origin.position.y.toFixed(5) * 1;\n\t\t\n\t\t// see if we've collided with anyone!\n\t\tif (Object.keys(other_clients).length > 0) {\n\t\t\tfor (var other_id in other_clients) {\n\t\t\t\tif (other_clients[other_id].ball == undefined) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (circleCollision({x: player_origin.position.x, y: player_origin.position.y, r: 0.5}, {x: other_clients[other_id].ball.position.x, y: other_clients[other_id].ball.position.y, r: 0.5})) {\n\t\t\t\t\t// bounce backwards from each other...\n\t\t\t\t\t//console.log(client_id + ' and ' + other_client_id + ' collided!');\n\t\t\t\t\tplayer_origin.position.x += -x_dir;\n\t\t\t\t\tplayer_origin.position.y += -y_dir;\n\t\t\t\t\tplayer_origin.position.x = player_origin.position.x.toFixed(5) * 1;\n\t\t\t\t\tplayer_origin.position.y = player_origin.position.y.toFixed(5) * 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// see if we've collided with the world!\n\t\t// for this usage, stay between 15 and -15 in a square\n\t\tif (player_origin.position.x > 15) {\n\t\t\tplayer_origin.position.x = 15;\n\t\t} else if (player_origin.position.x < -15) {\n\t\t\tplayer_origin.position.x = -15;\n\t\t}\n\t\tif (player_origin.position.y > 15) {\n\t\t\tplayer_origin.position.y = 15;\n\t\t} else if (player_origin.position.y < -15) {\n\t\t\tplayer_origin.position.y = -15;\n\t\t}\n\t\t\n\t\tclient_last_position = { x: player_origin.position.x, y: player_origin.position.y };\n\t\t//console.log('new position: ');\n\t\t//console.log({ seq: input_seq, pos: client_last_position });\n\t\tpositions.push( { seq: input_seq, pos: client_last_position, ct: current_time } );\n\t\t\n\t\t// send these inputs to the server to see what it does\n\t\tvar latest_inputs = { i: input_this_time, seq: input_seq, dt: deltaTime, ct: current_time };\n\t\tsocket.emit('new-inputs', latest_inputs);\n\t\tinput_seq++;\n\t}\n\t\n\t// go through and show other clients\n\tif (Object.keys(other_clients).length > 0) {\n\t\t//console.log('doing physics for other players');\n\t\t\n\t\t// turn back time\n\t\tcurrent_time -= 100;\n\t\t\n\t\tfor (var other_id in other_clients) {\n\t\t\t\n\t\t\tif (other_clients[other_id].ball == undefined) {\n\t\t\t\tother_clients[other_id].ball = BABYLON.Mesh.CreateSphere(\"player-\"+other_clients[other_id].id, 5, 1.0, scene);\n\t\t\t\tother_clients[other_id].ball.material = new BABYLON.StandardMaterial(\"other-player-texture\", scene);\n\t\t\t\tother_clients[other_id].ball.material.diffuseColor = new BABYLON.Color3(1, 0, 0);\n\t\t\t\tother_clients[other_id].ball.position.x = other_clients[other_id].positions[0].pos.x;\n\t\t\t\tother_clients[other_id].ball.position.y = other_clients[other_id].positions[0].pos.y;\n\t\t\t}\n\t\t\t\n\t\t\tvar pos_length = other_clients[other_id].positions.length;\n\t\t\t\n\t\t\tif (pos_length == 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t// old way -- just move them to the latest position\n\t\t\t// other_clients[other_id].ball.position.x = other_clients[other_id].positions[pos_length-1].pos.x;\n\t\t\t// other_clients[other_id].ball.position.y = other_clients[other_id].positions[pos_length-1].pos.y;\n\t\t\t\n\t\t\t// new way -- we need to move them between two old position updates\n\t\t\t// find those updates and lerp between them based on where the clients' current time is between them\n\t\t\tvar prev_pos;\n\t\t\tvar next_pos;\n\t\t\tfor (var i = 0; i < pos_length - 1; i++) {\n\t\t\t\tif (current_time > other_clients[other_id].positions[i].ct && current_time < other_clients[other_id].positions[i+1].ct) {\n\t\t\t\t\tprev_pos = other_clients[other_id].positions[i];\n\t\t\t\t\tnext_pos = other_clients[other_id].positions[i+1];\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (prev_pos == undefined && next_pos == undefined) {\n\t\t\t\t// move them the old fashioned way... snap to latest\n\t\t\t\t//other_clients[other_id].ball.position.x = other_clients[other_id].positions[pos_length-1].pos.x;\n\t\t\t\t//other_clients[other_id].ball.position.y = other_clients[other_id].positions[pos_length-1].pos.y;\n\t\t\t\tother_clients[other_id].ball.position.x = other_clients[other_id].position.x;\n\t\t\t\tother_clients[other_id].ball.position.y = other_clients[other_id].position.y;\n\t\t\t} else {\n\t\t\t\t// lerp between positions\n\t\t\t\t// how far are we between current time and the previous time?\n\t\t\t\t// what's the spatial distance between the previous position and the next one?\n\t\t\t\t// move the other player \n\t\t\t\tvar time_percentage = (current_time - prev_pos.ct) / (next_pos.ct - prev_pos.ct);\n\t\t\t\tvar x_distance = next_pos.pos.x - prev_pos.pos.x;\n\t\t\t\tvar y_distance = next_pos.pos.y - prev_pos.pos.y;\n\t\t\t\t// lerp = (start + percent*(end - start));\n\t\t\t\tother_clients[other_id].ball.position.x = prev_pos.pos.x + (x_distance * time_percentage);\n\t\t\t\tother_clients[other_id].ball.position.y = prev_pos.pos.y + (y_distance * time_percentage);\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// always do this\n\t\t\tother_clients[other_id].ball.position.x = other_clients[other_id].ball.position.x.toFixed(5) * 1;\n\t\t\tother_clients[other_id].ball.position.y = other_clients[other_id].ball.position.y.toFixed(5) * 1;\n\t\t\tother_clients[other_id].position.x = other_clients[other_id].ball.position.x;\n\t\t\tother_clients[other_id].position.y = other_clients[other_id].ball.position.y;\n\t\t}\n\t}\n\t\n}", "title": "" }, { "docid": "fa30f133d8276e6a99a641175d2827f3", "score": "0.6586531", "text": "function Game(cols,rows){\n started=false\n /* Initialize the snake and the food location */\n this.init = function(){\n this.score=0\n this.snake = new Snake()\n this.pickFoodLocation();\n }\n /* Start the game */\n this.start = function(){\n this.started = true;\n }\n /* Pick a random position and put a coin there */\n this.pickFoodLocation = function() {\n this.food = createVector(floor(random(cols)), floor(random(rows)))\n this.food.mult(ITEMS_SCALE)\n }\n \n this.manageInput=function(keyCode){\n if (keyCode === UP_ARROW) {\n this.snake.dir(0, -1);\n } else if (keyCode === DOWN_ARROW) {\n this.snake.dir(0, 1);\n } else if (keyCode === RIGHT_ARROW) {\n this.snake.dir(1, 0);\n } else if (keyCode === LEFT_ARROW) {\n this.snake.dir(-1, 0);\n }\n }\n \n /* Draw the components of the game */\n this.draw = function(){\n if (this.snake.eat(this.food)) {\n this.pickFoodLocation();\n if (coin_sound.isPlaying()) {\n coin_sound.stop();\n }\n coin_sound.play();\n this.score += BASIC_FOOD_SCORE\n }\n if(this.started){\n this.snake.update();\n }\n if(this.snake.checkSelfCollision()){\n if (game_over_sound.isPlaying()) {\n game_over_sound.stop();\n }\n game_over_sound.play();\n this.started = false;\n }\n \n textFont(game_font);\n textSize(height / 6);\n textAlign(CENTER, CENTER);\n fill(20,200,200);\n text(this.score+'', width*0.8, 0, width*0.2, height/6);\n this.snake.show();\n fill(255, 200, 0);\n rect(this.food.x, this.food.y, ITEMS_SCALE, ITEMS_SCALE);\n }\n}", "title": "" }, { "docid": "945d1262b27a5f15c49c50e6b6fa7f9b", "score": "0.6586246", "text": "initGame() {\n\n this.state = 'stopped';\n this.bugsSpeeds = []; // empty bug speed with every init\n\n // change the state and create entities depending on the choosed lvl\n switch(this.level) {\n case 'Easy':\n this.numOfBugs = 4;\n\n this.allBugs = Enemy.createMultiple(this.numOfBugs, this.numRows);\n this.allGems = Gem.createMultiple(this.gemColor.length+2, this.winWidth, this.gemColor, this.numCols);\n this.allRocks = [];\n // for caching original bug speed as it'll be stoped or zerolized [= 0] upon pause state\n for (let bug of this.allBugs) {\n this.bugsSpeeds.push(bug.speed);\n }\n\n this.changeState(this.state, this.bugsSpeeds);\n break;\n case 'Medium':\n this.numOfBugs = 5;\n this.numOfRocks = 2;\n\n this.allBugs = Enemy.createMultiple(this.numOfBugs, this.numRows);\n this.allGems = Gem.createMultiple(this.numCols/1.6, this.winWidth, this.gemColor, this.numCols);\n this.allRocks = Rock.createMultiple(this.numOfRocks, this.winWidth, this.numRows, this.numCols);\n \n for (let bug of this.allBugs) {\n this.bugsSpeeds.push(bug.speed);\n }\n\n this.changeState(this.state, this.bugsSpeeds);\n break;\n case 'Hard':\n this.numOfBugs = 7;\n this.numOfRocks = 3;\n\n this.allBugs = Enemy.createMultiple(this.numOfBugs, this.numRows);\n this.allGems = Gem.createMultiple(this.numCols-1, this.winWidth, this.gemColor, this.numCols);\n this.allRocks = Rock.createMultiple(this.numOfRocks, this.winWidth, this.numRows, this.numCols);\n \n for (let bug of this.allBugs) {\n this.bugsSpeeds.push(bug.speed);\n }\n\n this.changeState(this.state, this.bugsSpeeds);\n break;\n };\n // random img for game states to show in modal\n this.randomWinImg = this.winnerImg[Math.floor(Math.random() * ((this.winnerImg.length-1)-0) + 1) + 0];\n this.randomLoseImg = this.loserImgs[Math.floor(Math.random() * ((this.loserImgs.length-1)-0) + 1) + 0];\n this.randomPauseImg = this.zzz[Math.floor(Math.random() * (this.zzz.length-1)-0)/* + 0) + 0*/];\n // let randomDefaultImg = this.players[Math.floor(Math.random() * (this.players.length-1) - 0) + 0];\n\n }", "title": "" }, { "docid": "547a2dccad0c548a2406d08c72af83ab", "score": "0.6579749", "text": "runGame() {\r\n this.resetGame();\r\n this.setMouseListener();\r\n }", "title": "" } ]
d1e66c2bf4625c3531d29516c8e08aec
Life cycle method gets called before the component mounts Fetches all the works using the GET API call /api/v1/workers
[ { "docid": "3121a240ca84ebe50faf60ed62e30b39", "score": "0.6242705", "text": "componentDidMount() {\n this.props.onFetchWorkers();\n }", "title": "" } ]
[ { "docid": "a50919d7248f8d9ba4352840282ea871", "score": "0.6571519", "text": "componentDidMount(){\n const data = this.getWorklist();\n }", "title": "" }, { "docid": "7529dc75954d1b88d884c74116e15550", "score": "0.6527365", "text": "function getAllWorkers() {\n \n $.get('https://unorganisedsectorbackbnd.herokuapp.com/API/workers/')\n\t .then(workerData => console.log(workerData)\n\t\n\t)\n\t.catch(function(err){\n\t\tconsole.log(err);\n\t})\n\n}", "title": "" }, { "docid": "a68493dec818a853e77d60f9aed7d76e", "score": "0.6160792", "text": "__init17() {this.workers = []}", "title": "" }, { "docid": "b134fe91ee3b16db0b2bb2f04bcef9b7", "score": "0.6110057", "text": "static async fetchAllMandatoryTrainings(establishmentId) {\n // Fetch all saved mandatory training\n const mandatoryTrainingDetails = await MandatoryTraining.fetch(establishmentId);\n if (mandatoryTrainingDetails && mandatoryTrainingDetails.mandatoryTraining.length > 0) {\n let mandatoryTraining = mandatoryTrainingDetails.mandatoryTraining;\n for (let i = 0; i < mandatoryTraining.length; i++) {\n let tempWorkers = [];\n let jobs = mandatoryTraining[i].jobs;\n for (let j = 0; j < jobs.length; j++) {\n const thisWorker = await models.worker.findAll({\n attributes: ['id', 'uid', 'NameOrIdValue'],\n where: {\n establishmentFk: establishmentId,\n archived: false,\n MainJobFkValue: jobs[j].id,\n },\n });\n if (thisWorker && thisWorker.length > 0) {\n thisWorker.forEach(async (worker) => {\n tempWorkers.push({\n id: worker.id,\n uid: worker.uid,\n NameOrIdValue: worker.NameOrIdValue,\n mainJob: { jobId: jobs[j].id, title: jobs[j].title },\n });\n });\n }\n }\n delete mandatoryTraining[i].jobs;\n mandatoryTraining[i].workers = [];\n if (tempWorkers.length > 0) {\n mandatoryTraining[i].workers = await Training.getAllRequiredCounts(\n establishmentId,\n tempWorkers,\n mandatoryTraining[i].trainingCategoryId,\n );\n }\n }\n }\n delete mandatoryTrainingDetails.mandatoryTrainingCount;\n delete mandatoryTrainingDetails.allJobRolesCount;\n return mandatoryTrainingDetails;\n }", "title": "" }, { "docid": "cf9e8d9c4c04cb0067db70bee14c9d12", "score": "0.606754", "text": "$onInit() {\n this.$http.get('/api/works')\n .then(response => {\n this.workThings = response.data;\n this.socket.syncUpdates('work', this.workThings);\n return console.log(\"Initialized Work Week\");\n });\n }", "title": "" }, { "docid": "14be100972bb48875293f63f1f14dcf6", "score": "0.59919673", "text": "get workers() {\n return [\n [\n \"ab-card\",\n {\n worker: this._worker_index_card,\n },\n ],\n ];\n }", "title": "" }, { "docid": "eeaf4922e9a3cc5bfa182dabe15f1a3d", "score": "0.594325", "text": "constructor() {\n super();\n\n this.reloadable = true;\n this.runlevel = 5;\n this.name = 'workers';\n this.henri = undefined;\n\n this.workers = {};\n this.files = [];\n\n this.init = this.init.bind(this);\n this.stop = this.stop.bind(this);\n this.reload = this.reload.bind(this);\n this.getFiles = this.getFiles.bind(this);\n }", "title": "" }, { "docid": "d56ad3dc8b5b2b9aaf5650550749ccb5", "score": "0.5929609", "text": "componentDidMount() {\n // makes a get request directly to the API backend, thus it won't be used with Redux\n //this.populateTripsData();\n\n this.props.getAllTrips();\n }", "title": "" }, { "docid": "d0d863ded20ad4a0220ff9b9668bf69b", "score": "0.5898407", "text": "initAllWorkers() {\n const config = sails.config[this.configKey];\n this.workers = {};\n const workers = requireAll({\n dirname: config.dirname,\n filter: /(.+Queue)\\.js$/,\n recursive: true,\n });\n Object.keys(workers).forEach((key) => {\n const worker = defaults(workers[key], {\n prefetch: config.defaultPrefetch,\n durable: true,\n name: key,\n });\n this.workers[key] = worker;\n this.createChannel()\n .then((channel) => {\n channel.prefetch(worker.prefetch);\n channel.assertQueue(worker.name, { durable: worker.durable })\n .then(() => {\n channel.consume(worker.name, this.wrapWorker(worker, channel));\n });\n });\n });\n }", "title": "" }, { "docid": "9b43b7c5f66fbdc52cac146b52cc3ee4", "score": "0.588989", "text": "componentDidMount() {\n this.fetchTasks();\n }", "title": "" }, { "docid": "8f3efd2267672554a094c330e2cd8556", "score": "0.58802986", "text": "componentDidMount() {\n this.fetchTasks();\n }", "title": "" }, { "docid": "69df60adc1282037f302b26b330bda97", "score": "0.5756186", "text": "componentDidMount() {\n this.getTasks();\n }", "title": "" }, { "docid": "c6db9107970341ef93e2e3741f45bf0a", "score": "0.5755354", "text": "setupWorker() {\n this.worker = new WebWorker(worker);\n this.worker.addEventListener('message', e => {\n switch (e.data.type) {\n case 'dataResp':\n // Got data; update state here and let the main component know\n this.fetchDataHandler(e.data.data);\n this.stateUpdateHandler();\n break;\n case 'error':\n // Error requesting data, report it to the main component.\n if (this.stateUpdateHandler)\n this.stateUpdateHandler({ err: e.data.data, currency: e.data.currency });\n break;\n case 'iterationDone':\n // Done looping through our set of currencies for the given iteration\n // Refresh wallets to make sure we are synced\n this.refreshWallets((err) => {\n this.stateUpdateHandler({err});\n })\n break;\n default:\n break;\n }\n })\n this.worker.postMessage({ type: 'setup', data: constants.GRIDPLUS_CLOUD_API })\n this.worker.postMessage({ type: 'setAddresses', data: this.addresses });\n }", "title": "" }, { "docid": "30eb75131f5c361fd33a44021f2f0e8b", "score": "0.5746705", "text": "async _work() {\n\t\t// main loop\n\t\twhile (this.connected) {\n\t\t\t// check if reserved jobs are too many\n\t\t\tif (this.processing_jobs_counter >= this.max_processing_jobs) {\n\t\t\t\tawait bb.delay(50);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tlet job;\n\t\t\ttry {\n\t\t\t\tawait this._onBeforeJobReserved();\n\t\t\t\tjob = await this.client.reserve_with_timeoutAsync(this.reserve_timeout);\n\t\t\t\tawait this._onAfterJobReserved(job);\n\t\t\t} catch (reserve_error) {\n\t\t\t\t// reserve timeout\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// increate reserved counter\n\t\t\tthis.processing_jobs_counter++;\n\n\t\t\t// asynchonously processing the job\n\t\t\tthis._processJob(job).catch((e) => {\n\t\t\t\t// emit the error outside\n\t\t\t\tthis.emit('error', e);\n\t\t\t});\n\n\t\t\t// idle 50 milliseconds\n\t\t\tawait bb.delay(50);\n\t\t}\n\t}", "title": "" }, { "docid": "6d2d21a4ca72fc54520f7848c1448d06", "score": "0.5734394", "text": "fetchProcessors() {\n const {topologyVersion, topologyTimeSec, topologyName} = this.state;\n TopologyREST.getAllNodes(this.topologyId, topologyVersion, 'processors').then((processor) => {\n if (processor.responseMessage !== undefined) {\n FSReactToastr.error(\n <CommonNotification flag=\"error\" content={processor.responseMessage}/>, '', toastOpt);\n } else {\n this.topologyConfig[\"topology.message.timeout.secs\"] = topologyTimeSec;\n if (processor.entities.length > 0) {\n this.processorSlideInterval(processor.entities);\n } else {\n this.tempIntervalArr = [];\n this.setState({\n mapTopologyConfig: this.topologyConfig,\n mapSlideInterval: this.tempIntervalArr\n }, () => {\n this.setTopologyConfig(topologyName, topologyVersion);\n });\n }\n }\n });\n }", "title": "" }, { "docid": "b7faca8d3f053289fa8b35ef3667cbd3", "score": "0.5702181", "text": "async get_work_data() {\n let response = this.api.request({\n endpoint: \"get_work\",\n data: {\n eppn: this.state.selected_creator,\n work: this.state.selected_work,\n },\n response_type: \"raw\",\n });\n\n return await response;\n }", "title": "" }, { "docid": "883d524284ae60a7decf38a50d237ce2", "score": "0.5679831", "text": "_registerWorker() {\n\n //Create Worker, check if already created\n if (typeof (this._worker) == \"undefined\") {\n this._worker = new Worker(\"./model/worker.js\");\n }\n\n //Callback when messages received from web worker\n this._worker.onmessage = event => {\n\n //Update the GridStep with the latest from the DB\n this._actualGridStep = event.data;\n //redraw grid with the latest pixelMap\n this._redrawGrid(this._actualGridStep.pixelMap);\n\n };\n }", "title": "" }, { "docid": "6977fde60760e03fa517593dfc103b15", "score": "0.5677213", "text": "async componentDidMount() {\n /**Inner Component data manager Function */\n this.fetchData();\n }", "title": "" }, { "docid": "0f84d9f04d8b4b58ef79d9a6e9edc05d", "score": "0.567681", "text": "addWorkers(workersList) {\n if (!Array.isArray(workersList)) {\n throw TypeError('Workers list must be an Array, halt!')\n }\n workersList.forEach(this.addWorker, this)\n // first service may have last one as require - just retry\n this.repeatResolving()\n this.pendingRestarter()\n // for log sys\n if (this.reportsState.isDebuggEnabled){\n this.messagerBus('debugger', { message : `layer ${this.name} add workers done!` })\n }\n return this\n }", "title": "" }, { "docid": "bacf5048f9a503a810561ec3d46685ae", "score": "0.5673483", "text": "function Worker() {\n const locationOrigin = null;\n const sharedMethods = {\n orderStack: {},\n init: (args) => {\n this.locationOrigin = args[0];\n },\n fetch: (args) => {\n const options = args[0];\n ajax(options);\n },\n };\n // ajax fetch ------------------------------\n let syncResponse = {};\n const syncRequestStack = [];\n function sendBack(options) {\n if (options.sync === true) {\n // store in the response store -----------------\n syncResponse[options.hash] = options;\n // loop in the requests ----------------\n while (syncRequestStack.length > 0) {\n if (syncRequestStack[0].abort === true) {\n execute(\"onAbort\", [syncRequestStack[0]]);\n syncRequestStack.shift();\n }\n else {\n if (syncResponse[syncRequestStack[0].hash] === undefined) {\n break;\n }\n else {\n const r = syncResponse[syncRequestStack[0].hash];\n execute(\"onDone\", [r]);\n syncRequestStack.shift();\n }\n }\n }\n // clean the syncResponse\n if (syncRequestStack.length === 0) {\n syncResponse = {};\n execute(\"clean\", []);\n }\n }\n else {\n execute(\"onDone\", [options]);\n }\n }\n function ajaxRequestStackPush(options) {\n if (options.sync === true) {\n for (const i of syncRequestStack) {\n if (options.id === i.id || options.hash === i.hash) {\n i.abort = true;\n }\n }\n syncRequestStack.push(options);\n }\n }\n function ajax(options) {\n const fetchReturn = {\n id: options.id,\n url: options.url,\n status: 404,\n returnType: options.returnType,\n statusText: \"Error on Ajax-Worker!\",\n data: null,\n headers: [],\n redirected: false,\n urlRedirected: null,\n errorMessage: null,\n error: false,\n sync: options.sync,\n hash: options.hash,\n };\n // sync ----------------------------\n // fetch ---------------------------\n ajaxRequestStackPush(options);\n const fetchPromise = fetch(options.url, options)\n .then((response) => {\n fetchReturn.status = response.status;\n fetchReturn.statusText = response.statusText;\n fetchReturn.urlRedirected = response.url;\n fetchReturn.redirected = (fetchReturn.urlRedirected !== fetchReturn.url);\n fetchReturn.headers = response.headers;\n fetchReturn.headers = [];\n response.headers.forEach((value, key) => {\n fetchReturn.headers.push([key, value]);\n });\n const headerContentType = response.headers.get(\"content-type\");\n let contentType = \"text\";\n if (headerContentType && (headerContentType.includes(\"application/json\") || headerContentType.includes(\"text/json\"))) {\n contentType = \"json\";\n }\n else {\n contentType = \"text\";\n }\n // -------------------------------\n if (contentType === \"text\") {\n fetchReturn.returnType = \"text\";\n return response.text();\n }\n else if (contentType === \"json\") {\n fetchReturn.returnType = \"json\";\n return response.json();\n }\n })\n .then((data) => {\n fetchReturn.data = data;\n sendBack(fetchReturn);\n })\n .catch((error) => {\n fetchReturn.errorMessage = error;\n fetchReturn.error = true;\n sendBack(fetchReturn);\n });\n }\n // same functions here\n function execute(actionName, args) {\n self.postMessage({\n method: actionName,\n args,\n });\n }\n self.onmessage = (event) => {\n const args = event.data.args;\n sharedMethods[event.data.method](args);\n };\n }", "title": "" }, { "docid": "e666251f147ee57e8269614e7804424c", "score": "0.5669786", "text": "componentDidMount() {\n this.props.fetchDishes();\n this.props.fetchComments();\n this.props.fetchPromos();\n this.props.fetchLeaders();\n // this ensures that when the main component is mounted then I'll go and fetch all these from that server\n }", "title": "" }, { "docid": "57323d73576df481f63a8a9ce80a0e13", "score": "0.5667121", "text": "async componentDidMount() {\n // Get and init the worker that is used for async training\n this.worker = new TrainingWorker(worker);\n this.worker.onmessage = this.onmessage;\n this.worker.postMessage({\n cmd: 'init',\n params: {\n type: this.props.training.dataTypes,\n noise: this.props.training.noise,\n size: this.props.training.dataSetSize,\n stepSize: this.props.training.stepSize,\n },\n });\n this.reset();\n }", "title": "" }, { "docid": "fb27505f09d622b5c4da71d3596d8a03", "score": "0.56560296", "text": "componentDidMount() {\n\n let request_state = this.state.request_state;\n let kind = this.props.kind;\n let url;\n let search_id = \"\";\n let search_lastname = \"\";\n\n if(!kind || typeof kind === \"undefined\" || this.props === \"undefined\"){\n this.setState({request_state:true});\n }\n else {\n if (kind === \"ID\") {\n search_id = this.props.search_id;\n url = `http://localhost:8080/api/v1/workforce/${search_id}`;\n } else {\n search_lastname = this.props.search_lastName;\n url = `http://localhost:8080/api/v1/workforce/${search_lastname}`;\n }\n\n //Sending request to back-end - based on criterias used\n fetch(url)\n .then(response => response.json())\n .then(data => {\n this.setState({worker_info: data}, ()=> {\n if(typeof data.message !== \"undefined\")\n request_state = true;\n\n this.setState({isLoading:false, request_state:request_state});\n });\n },\n (error) => {\n this.setState({request_state: true});\n });\n }\n }", "title": "" }, { "docid": "898133952cd17cb50d0bd4ada27c6907", "score": "0.56548685", "text": "async componentDidMount() {\n const jobs = await JoblyApi.getJobs();\n this.setState({ jobs, loading: false });\n }", "title": "" }, { "docid": "88f2aea45ee8632e9edfdf59d91dc9c4", "score": "0.56407565", "text": "componentWillMount(){\n\t\tthis.getAllTask();\n\t}", "title": "" }, { "docid": "4a6d0539c0ea4819c394bef3c21d7890", "score": "0.5630472", "text": "async _fetch() {\n this.currentlyFetching = true;\n\n log.debug(\"Fetching board games in collection...\");\n try {\n await this._processBoardGameCollection();\n } catch (error) {\n log.error(\"_processBoardGameCollection\", error);\n }\n\n log.debug(\"Fetching board games in wishlist...\");\n try {\n await this._processBoardGameWishlist();\n } catch (error) {\n log.error(\"_processBoardGameWishlist\", error);\n }\n\n this.currentlyFetching = false;\n log.debug(\"Completed fetching board games\");\n }", "title": "" }, { "docid": "70961ae9c6030cfab4cab56c9e99254e", "score": "0.56218153", "text": "static async fetchMandatoryTrainingForWorker(workerUid) {\n const fetchWorker = await models.worker.findOne({\n attributes: ['establishmentFk', 'MainJobFkValue'],\n where: {\n WorkerUID: workerUid,\n },\n });\n if (!fetchWorker) {\n throw new Error('Worker ' + workerUid + ' doesnt exist');\n }\n const fetchMandatoryTrainingResults = await models.MandatoryTraining.findAll({\n include: [\n {\n model: models.workerTrainingCategories,\n as: 'workerTrainingCategories',\n attributes: ['id', 'category'],\n },\n ],\n where: {\n establishmentFK: fetchWorker.establishmentFk,\n jobFK: fetchWorker.MainJobFkValue,\n },\n });\n return fetchMandatoryTrainingResults;\n }", "title": "" }, { "docid": "264e999517e396d05ee857696bf2c76b", "score": "0.5616976", "text": "getApiJobs() {\n _api.get('jobs')\n .then(res => {\n let jobData = res.data.data.map(j => new Job(j))\n setState('jobs', jobData)\n })\n }", "title": "" }, { "docid": "1388df3e7fce2cbec0438ed8f09dd02e", "score": "0.5615878", "text": "addWorker() {\n this.props.onCreateWorker();\n }", "title": "" }, { "docid": "3ef8af9c9b4583e0dae42e0f6d096cb4", "score": "0.56108123", "text": "componentDidMount() {\n \n this.loadWines();\n // this.loadProducers();\n }", "title": "" }, { "docid": "c1bb0a3514e898412e8efd27fd28ee6a", "score": "0.56054413", "text": "refreshWorkerList() {\n let nodeList = this.getWorkerList();\n let ref = this;\n nodeList.forEach(el => {\n if (!(el in ref.workerSet)) {\n ref.workerSet[el] = new Worker(el);\n let targetNode = ref.workerSet[el];\n if (this.gpuDictionary[targetNode.gpu_Capacity]) {\n let dictionary = this.gpuDictionary[targetNode.gpu_Capacity];\n if (!dictionary.nodeDictionary[el]) {\n dictionary.nodeDictionary[el] = el;\n }\n }\n else {\n this.gpuDictionary[targetNode.gpu_Capacity] = {\n number: targetNode.gpu_Capacity,\n nodeDictionary: {}\n };\n this.gpuDictionary[targetNode.gpu_Capacity].nodeDictionary[el] = el;\n }\n }\n });\n }", "title": "" }, { "docid": "6c753ed7d4f9162a96fb927cd6b903ef", "score": "0.55942565", "text": "componentDidMount() {\n this.fetchBusiness();\n }", "title": "" }, { "docid": "6d0480054aff7dd6df5c2d5276d24434", "score": "0.5578496", "text": "componentDidMount() {\n this.getComputers();\n this.getDepartments();\n }", "title": "" }, { "docid": "24717ba86bfe659b40f104049ce89d0c", "score": "0.55770844", "text": "componentDidMount() {\n this.fetchFests();\n }", "title": "" }, { "docid": "8d2dbad56e8c7ffedab4cecc2c64e44a", "score": "0.5575418", "text": "componentDidMount() {\n this.loadTasks();\n }", "title": "" }, { "docid": "c1416f0f7b14fb91d7f25b8224e90f0d", "score": "0.55630124", "text": "async subscribe() {\n const worksServices = this.ctx.service.works;\n\n if (!await worksServices.isActive()) {\n await worksServices.beginWork();\n }\n }", "title": "" }, { "docid": "0feeede278738ea83c7f773b68465f11", "score": "0.55577666", "text": "function loadWorklist() {\n var params = {id: $stateParams.worklistID};\n Worklist.get(params).$promise.then(function(result) {\n $scope.worklist = result;\n Worklist.loadContents(result, true);\n });\n }", "title": "" }, { "docid": "b59dfd4be4e57da2e87069cd2ba7c9ec", "score": "0.55562824", "text": "async componentDidMount() {\n await this.getFamily();\n await this.getLists();\n }", "title": "" }, { "docid": "a1c0b85412be72629a0592306557916b", "score": "0.5551942", "text": "_load() {\n if (this._loading === undefined) this._loading = false;\n if (this._loading) return;\n this._loading = true;\n this._table().children('caption').addClass('updating');\n Fwk.web_service_GET(\n \"/replication/config\",\n {version: Common.RestAPIVersion},\n (data) => {\n let workers = [];\n for (let i in data.config.workers) {\n workers.push(data.config.workers[i].name);\n }\n this._set_workers(workers);\n this._load_histograms();\n },\n (msg) => {\n console.log('request failed', this.fwk_app_name, msg);\n this._table().children('caption').html('<span style=\"color:maroon\">No Response</span>');\n this._table().children('caption').removeClass('updating');\n this._loading = false;\n }\n );\n }", "title": "" }, { "docid": "9acffcd16a0afc9585dcee831ddd0c3f", "score": "0.5544883", "text": "async function fetchJobs() {\n console.log(\"In Jobs, made it into fetchJobs\")\n try {\n let resp = await JoblyApi.request(`jobs?search=${searchTerm}`);\n setJobsList(resp.jobs);\n\n } catch (err) {\n console.log(err);\n }\n }", "title": "" }, { "docid": "8ed78896a90c582b2e624e4703309552", "score": "0.5538899", "text": "componentData() {\n db.transaction((tx) => {\n tx.executeSql('SELECT * FROM table_tools_workers JOIN table_tools ON table_tools.tool_id = table_tools_workers.tool_id JOIN table_worker ON table_worker.worker_id = table_tools_workers.worker_id', [], (tx, results) => {\n this._isMounted = true;\n\n if (this._isMounted) {\n let rows = results.rows.raw();\n this.setState({ data: rows, isLoading: false });\n this.arrayholder = rows;\n }\n });\n });\n }", "title": "" }, { "docid": "c9e336b59f75019bee0877442d3fa53e", "score": "0.5527633", "text": "startWebWorkers() {\n while (this.workers.length < this.props.workers) {\n this.addWebWorker();\n }\n }", "title": "" }, { "docid": "6d10b042cb4b549754b3ae2357c22c07", "score": "0.55200356", "text": "run() {\n for (let name in this.queueProcessors) {\n this.runWorker(`${name}`);\n }\n }", "title": "" }, { "docid": "173ed38f9a82c81a64efb225b048fd77", "score": "0.5490883", "text": "function initWorkers() {\n return cpus\n .map((cpu, index) => {\n return index === 0 \n ? new Worker({ childProcess: false, id: index })\n : new Worker({ childProcess: true, id: index })\n })\n}", "title": "" }, { "docid": "dd4ddabafac2219091a0de4c496d3b50", "score": "0.5488083", "text": "liftWorker(){\n\n let worker = this.cluster.fork();\n console.log(`The worker ${worker.id} is started.`);\n\n }", "title": "" }, { "docid": "541991a1c626e7a7ac0e78fe771f3de4", "score": "0.5481719", "text": "componentDidMount() {\n this.fetchingClients();\n this.fetchingDoctors();\n }", "title": "" }, { "docid": "6536468972ce5ff476c8788985411117", "score": "0.5474124", "text": "initList() {\n this.props.communication.requestInstances(this);\n }", "title": "" }, { "docid": "111fdefee7a50de5e0c44932c9018c93", "score": "0.54689974", "text": "componentDidMount() {\n\t\tthis.getListings();\n\t}", "title": "" }, { "docid": "c244ad6940b7f4454738cc8e106b39ea", "score": "0.54672253", "text": "componentDidMount() {\n this.getProjects();\n // use component did mount to dispatch an action to request the projectList from the API\n }", "title": "" }, { "docid": "f77c7e869eff6953c97c8bd607cb5837", "score": "0.54629856", "text": "function _loadWorkers(_message) {\n var message = _message;\n var grid = $(\"#workers\");\n\n // parse workers from JSON message\n //console.log(message);\n var obj = [];\n if (message.length > 0) {\n obj = JSON.parse(message);\n }\n\n // collect existing workers cards in page\n var old_list = [];\n var k = 0;\n $(grid).children(\"paper-card\").each(function () {\n var nodeId = $(this).attr(\"id\");\n if (nodeId && nodeId != \"workers-stats\") { // add existing worker card into old_list\n old_list[\"\\'w-\" + nodeId + \"\\'\"] = $(this);\n// } else if (nodeId == \"workers-stats\") {\n// console.info(\"skip #workers-stats\");\n }\n });\n\n // check whether the received object has an array of workers\n var w;\n if (obj.hasOwnProperty(\"workers\")) {\n // add a new card for new workers\n // or update existing ones with new data\n for (i = 0; i < obj.workers.length; i++) {\n w = obj.workers[i];\n var curNode = document.getElementById(w.workerID);\n if (!curNode && !old_list[\"\\'w-\" + w.workerID + \"\\'\"]) { // there is no node associated to worker ID\n // prepare worker data for template injection\n var workerData = {\n workerID: w.workerID,\n workerCPU: w.cpuLoad,\n workerMaxMB: w.maxHeap,\n workerFreeMB: w.availableheapmemory,\n workerUsedMB: w.busyheapmemory,\n workerIP: w.ip,\n workerSlots: w.slots\n }\n\n // retrieve and populate worker template\n var html;\n // this call must be synchronous or else callbacks\n // containing the same node will cumulate and insert\n // it several times\n $.ajax({\n url: \"../fragments/worker.html\",\n async: false, // DO NOT MAKE ASYNC\n success: function (value) {\n var workerTemplate = $.templates(value);\n html = workerTemplate.render(workerData);\n\n // inject populated worker template\n $(grid).append(html);\n }\n });\n\n } else { // update existing worker node\n // console.log(\"Updating worker \" + w.workerID + \"...\");\n delete old_list[\"\\'w-\" + w.workerID + \"\\'\"];\n\n $(\"#w-cpu-\" + w.workerID).children(\".worker-data\").text(w.cpuLoad);\n $(\"#w-max-heap-\" + w.workerID).children(\".worker-data\").text(w.maxHeap);\n $(\"#w-heap-available-\" + w.workerID).children(\".worker-data\").text(w.availableheapmemory);\n $(\"#w-heap-use-\" + w.workerID).children(\".worker-data\").text(w.busyheapmemory);\n $(\"#w-slots-\" + w.workerID).children(\".worker-data\").text(w.slots);\n } // end if ... else ...\n } // end for\n } // end if\n\n // remove old existing nodes from grid\n if (Object.keys(old_list).length > 0) {\n for (var i = 0; i < old_list.length; i++) {\n $(old_list[i]).remove();\n }\n }\n\n // grid.innerHTML = tiles;\n load_tiles_monitoring();\n updateWorkerStats();\n}", "title": "" }, { "docid": "3cb22c8dc60db5d3ff2ecb6df687be89", "score": "0.54507476", "text": "_checkStopEmptyWorker() {\n if (!this._editorWorkerClient) {\n return;\n }\n let models = this._modelService.getModels();\n if (models.length === 0) {\n // There are no more models => nothing possible for me to do\n this._editorWorkerClient.dispose();\n this._editorWorkerClient = null;\n }\n }", "title": "" }, { "docid": "b5035245de5312ddb3f88e6ae7a0ff79", "score": "0.5445584", "text": "fetch () {\n this._makeRequest('GET', resources);\n }", "title": "" }, { "docid": "922f728772c6bf1bc3e6f85a3ebd59c4", "score": "0.54413956", "text": "run() {\n const workForever = (id) => {\n logger.info('Starting worker %s', id);\n\n const config = deepCopy(this.config);\n\n config.workdir = Path.join(this.config.workdir, `${id}`);\n\n if (this.stopped) {\n return id;\n }\n\n return this.pool.exec('work', [config])\n .then(() => {\n logger.info('Worker %s exited gracefully', id);\n return id;\n })\n .catch((error) => {\n logger.error('Worker %s died...', id, error);\n return workForever(id);\n });\n };\n\n const ids = Array.from(Array(this.processes).keys());\n\n // offload a function to a worker\n const workers = Promise.map(ids, workForever)\n .then(() => logger.info('All workers finished'))\n .then(() => this.pool.terminate());\n const monitor = this.monitor();\n\n return Promise.all([workers, monitor]);\n }", "title": "" }, { "docid": "158d67b392cfce8dbaa213d344dabbd6", "score": "0.5440345", "text": "function Worker() {\n EventEmitter.call(this);\n this.status = \"new\";\n this.listeners = {};\n this.isEnabled=true;\n this.id=uuid();\n}", "title": "" }, { "docid": "13d41c024823c15492adda2e8f8e7dfd", "score": "0.54374397", "text": "componentDidMount() {\n this.getTraining()\n }", "title": "" }, { "docid": "af604e99e63435b06bf92cc6f247e28a", "score": "0.54265136", "text": "componentDidMount(){\n this.getBeers();\n }", "title": "" }, { "docid": "b93b0e6bf94b6ddb496c296e96883ca1", "score": "0.54222214", "text": "placeInitialWorker(existingWorkers) {\n return this.infLoop;\n }", "title": "" }, { "docid": "f7bc3c2764f29ab32860d38948e409c8", "score": "0.5420798", "text": "async componentDidMount() {\n this.fetchData()\n }", "title": "" }, { "docid": "7b9708a4e8bd01b764404cdceca7b3b7", "score": "0.5418011", "text": "componentDidMount() {\r\n\t\tthis.getData().then(_ => {\r\n\t\t\t// Re-fetch every minute\r\n\t\t\t// AJ | IT WILL LEAD TO MEMORY LEAK, YOU SHOULD ALWAYS CLEAR INTERVAL ON UNMOUNT\r\n\t\t\tthis.interval = setInterval(this.getData, 600000);\r\n\t\t});\r\n\t}", "title": "" }, { "docid": "fc0ea75a332e1c91b239cbc75114a529", "score": "0.541615", "text": "componentDidMount() {\n try {\n this.api.loadCategories();\n this.api.loadListings();\n this.api.loadItems();\n } catch (error) {\n console.log(\"SERVER DOWN\");\n }\n }", "title": "" }, { "docid": "fac7c55c1c9f78772d2904a9da930f3b", "score": "0.5411559", "text": "componentWillMount() {\n this.fetchData();\n }", "title": "" }, { "docid": "fac7c55c1c9f78772d2904a9da930f3b", "score": "0.5411559", "text": "componentWillMount() {\n this.fetchData();\n }", "title": "" }, { "docid": "4929fc9fdfea308829e123e7d6e24f9b", "score": "0.5405017", "text": "componentWillMount() {\n this.fetchData();\n }", "title": "" }, { "docid": "ea3108a71b154444951a25ee6efeea61", "score": "0.5404644", "text": "async componentDidMount() {\n this.getList();\n }", "title": "" }, { "docid": "57c84fd66cf2657386fc475506379eee", "score": "0.53862345", "text": "componentDidMount(){\n this.fetchBackendData()\n }", "title": "" }, { "docid": "79605a5e8e32510b760b4ee253ef9c3e", "score": "0.5385831", "text": "onFetchData() {\n storage.getAll((error, data) => {\n if (data && data.hasOwnProperty('gitlab-master-options') && data.hasOwnProperty('gitlab-master-status')) {\n this.setState({\n status: data['gitlab-master-status'],\n options: {\n gitlabPort: data['gitlab-master-options'].gitlabPort || DEFAULT_OPTIONS.gitlabPort,\n helperPort: data['gitlab-master-options'].helperPort || DEFAULT_OPTIONS.helperPort,\n rootPassword: data['gitlab-master-options'].rootPassword || DEFAULT_OPTIONS.rootPassword,\n ip: data['gitlab-master-options'].ip || DEFAULT_OPTIONS.ip\n }\n });\n if (data['gitlab-master-status'] === 'RUNNING') {\n startHelper(data['gitlab-master-options']);\n }\n }\n });\n }", "title": "" }, { "docid": "086045d3eb31df669f00837559c30cb9", "score": "0.53793436", "text": "componentDidMount(){\n\t\tthis.props.switchActive(\"batches\");\n\t\tthis.loadCompounds();\n\t\tthis.loadCrystals();\n\t\tthis.loadExistingBatches();\n\t\tthis.loadCombinations();\n\t}", "title": "" }, { "docid": "e757dec598918b035bd022c259870963", "score": "0.5347228", "text": "componentDidMount() {\n this.fetchCurrentData();\n }", "title": "" }, { "docid": "81889269ca50bf3bf829d40e8c78d632", "score": "0.53462005", "text": "componentDidMount() {\n this.monitors.forEach(monitor => monitor.monitoring(this.monitoringStore))\n }", "title": "" }, { "docid": "cedd2733ed5f83e2bed8cb3fa98aad35", "score": "0.53287184", "text": "componentDidMount() {\n this.fetchData()\n }", "title": "" }, { "docid": "669e7631d61bec0771f8cac16fcffaf5", "score": "0.53250074", "text": "componentDidMount() {\n this.fetchData()\n }", "title": "" }, { "docid": "e49abd57b33de2f6a910b38f24c6d3e6", "score": "0.53140956", "text": "componentDidMount() {\n this.fetchStocks()\n }", "title": "" }, { "docid": "9ddacd6123c3e1d4871180f71dd734ce", "score": "0.5313705", "text": "componentDidMount() {\n\t\tlet queries = fetchAPICall(\"solution\", this.props.solutions);\n\n\t\tPromise.all(queries).then(returnData => {\n\t\t\tthis.setState({\n\t\t\t\tsolutions:returnData\n\t\t\t})\n\t\t})\n\t}", "title": "" }, { "docid": "02ae14c580851f220216908a332d6f79", "score": "0.53114396", "text": "fetchTrainsData(component) {\n\t\taxios\n\t\t\t.get(ENVIRONMENT.trainRestUrl)\n\t\t\t.then(response => {\n\t\t\t\tcomponent.setState( {trains: response.data.results} );\n\t\t\t\tconsole.log(\"Train loaded\");\n\t\t\t}).catch(error => {\n\t\t\t console.log(error);\n\t\t\t});\t\t\n\t}", "title": "" }, { "docid": "f1a0e357417da4efcf5b85f0183b4d88", "score": "0.53099036", "text": "static async fetch(establishmentId) {\n const allMandatoryTrainingRecords = [];\n const fetchResults = await models.MandatoryTraining.findAll({\n include: [\n {\n model: models.workerTrainingCategories,\n as: 'workerTrainingCategories',\n attributes: ['id', 'category'],\n },\n {\n model: models.job,\n as: 'job',\n attributes: ['id', 'title'],\n },\n ],\n order: [['updated', 'DESC']],\n where: {\n establishmentFK: establishmentId,\n },\n });\n\n if (fetchResults) {\n fetchResults.forEach((result) => {\n if (allMandatoryTrainingRecords.length > 0) {\n const foundCategory = allMandatoryTrainingRecords.filter(\n (el) => el.trainingCategoryId === result.trainingCategoryFK,\n );\n if (foundCategory.length === 0) {\n allMandatoryTrainingRecords.push({\n establishmentId: result.establishmentFK,\n trainingCategoryId: result.trainingCategoryFK,\n category: result.workerTrainingCategories.category,\n jobs: [{ id: result.jobFK, title: result.job.title }],\n });\n } else {\n foundCategory[0].jobs.push({ id: result.jobFK, title: result.job.title });\n }\n } else {\n allMandatoryTrainingRecords.push({\n establishmentId: result.establishmentFK,\n trainingCategoryId: result.trainingCategoryFK,\n category: result.workerTrainingCategories.category,\n jobs: [{ id: result.jobFK, title: result.job.title }],\n });\n }\n });\n }\n\n let lastUpdated = null;\n if (fetchResults && fetchResults.length === 1) {\n lastUpdated = fetchResults[0];\n } else if (fetchResults && fetchResults.length > 1) {\n lastUpdated = fetchResults.reduce((a, b) => {\n return a.updated > b.updated ? a : b;\n });\n }\n\n const allJobRoles = await models.job.findAll();\n if (allJobRoles) {\n const response = {\n mandatoryTrainingCount: allMandatoryTrainingRecords.length,\n allJobRolesCount: allJobRoles.length,\n lastUpdated: lastUpdated ? lastUpdated.updated.toISOString() : undefined,\n mandatoryTraining: allMandatoryTrainingRecords,\n };\n\n return response;\n }\n }", "title": "" }, { "docid": "0d9fb9e0d61242655a4a3d818dbc053a", "score": "0.53097486", "text": "componentDidMount() {\n this.fetchImages();\n this.fetchCats();\n this.fetchCities();\n this.fetchWater();\n }", "title": "" }, { "docid": "dd72ae5188137a954a8787ab5c370883", "score": "0.53034145", "text": "componentDidMount() {\n this._ensureDataFetched();\n }", "title": "" }, { "docid": "cd7cccae6787fa008b7f07eabc6e8ea4", "score": "0.5287223", "text": "function loadDashboardWorkerList(walletAddress) {\n return $.ajax(API + \"pools/\" + currentPool + \"/miners/\" + walletAddress)\n .done(function(data) {\n var workerList = \"\";\n if (data.performance) {\n var workerCount = 0;\n $.each(data.performance.workers, function(index, value) {\n workerCount++;\n workerList += \"<tr>\";\n workerList += \"<td>\" + workerCount + \"</td>\";\n if (index.length === 0) {\n workerList += \"<td>Unnamed</td>\";\n } else {\n workerList += \"<td>\" + index + \"</td>\";\n }\n workerList += \"<td>\" + _formatter(value.hashrate, 5, \"H/s\") + \"</td>\";\n workerList +=\n \"<td>\" + _formatter(value.sharesPerSecond, 5, \"S/s\") + \"</td>\";\n workerList += \"</tr>\";\n });\n } else {\n workerList += '<tr><td colspan=\"4\">None</td></tr>';\n }\n $(\"#workerCount\").text(workerCount);\n $(\"#workerList\").html(workerList);\n })\n .fail(function() {\n $.notify(\n {\n message: \"Error: No response from API.<br>(loadDashboardWorkerList)\"\n },\n {\n type: \"danger\",\n timer: 3000\n }\n );\n });\n}", "title": "" }, { "docid": "59fc3874ffa89d4e63297f881ec27d34", "score": "0.5283394", "text": "componentDidMount() {\n this.fetchData();\n }", "title": "" }, { "docid": "59fc3874ffa89d4e63297f881ec27d34", "score": "0.5283394", "text": "componentDidMount() {\n this.fetchData();\n }", "title": "" }, { "docid": "59fc3874ffa89d4e63297f881ec27d34", "score": "0.5283394", "text": "componentDidMount() {\n this.fetchData();\n }", "title": "" }, { "docid": "d0299fd7611ddd700aad254c99f33fe2", "score": "0.5279473", "text": "componentDidMount() {\n this.getQuizzes();\n this.getTeachers();\n this.getResponses();\n }", "title": "" }, { "docid": "078aa79e404fca1a7d95941667eec0e7", "score": "0.52775884", "text": "componentDidMount() {\n this.fetchData();\n }", "title": "" }, { "docid": "078aa79e404fca1a7d95941667eec0e7", "score": "0.52775884", "text": "componentDidMount() {\n this.fetchData();\n }", "title": "" }, { "docid": "078aa79e404fca1a7d95941667eec0e7", "score": "0.52775884", "text": "componentDidMount() {\n this.fetchData();\n }", "title": "" }, { "docid": "078aa79e404fca1a7d95941667eec0e7", "score": "0.52775884", "text": "componentDidMount() {\n this.fetchData();\n }", "title": "" }, { "docid": "f683ceb10fa9f658f85e7ca0a881b7a0", "score": "0.527354", "text": "render() {\n const workList = this.state.work.map(work => {\n return (\n <div class={style.work} >\n <WorkCard\n id={work.nid[0].value}\n title={work.title[0].value}\n body={work.body[0].value} \n image={work.field_image[0].url} \n />\n </div>\n );\n });\n\n\t\treturn (\n <div class={`${style.portfolio} page`}>\n {this.state.work.length === 0 &&\n <h1>Loading...</h1>\n } \n {workList}\n\t\t\t</div>\n\t\t);\n\t}", "title": "" }, { "docid": "7e1632e6c126aee3f0c04f740b5babaf", "score": "0.5271045", "text": "worker() {\n return this._make;\n }", "title": "" }, { "docid": "00ab28f851f87d23c95043da4859b6d1", "score": "0.5261639", "text": "componentDidMount() {\n this.fetchPeople()\n }", "title": "" }, { "docid": "50a572e581b717acfade190209f6afa3", "score": "0.52551717", "text": "_preloadWorkspaceData() {\n return __awaiter(this, void 0, void 0, function* () {\n this._apiManager.getProjects().then((response) => {\n this._projects = response;\n });\n this._apiManager.getTags().then((response) => {\n this._tags = response;\n });\n this._apiManager\n .getDailySummary()\n .then((response) => dailySummary.set(response));\n });\n }", "title": "" }, { "docid": "61fa7e887764dc023fb82b36ea263d5d", "score": "0.5250431", "text": "componentDidUpdate(prevProps, prevState){\n this.sendWorkerInit(prevProps.code);\n }", "title": "" }, { "docid": "2a603077fbe90bc781ff012ee0672ed5", "score": "0.5240912", "text": "run() {\n if ( cluster.isMaster ) {\n new Master(this.opts, this.bridge);\n return;\n }\n\n new Worker(this.opts, this.bridge);\n }", "title": "" }, { "docid": "c0540addbd25a2f3a69a7985ac7c2bb1", "score": "0.5237915", "text": "async fetch () {\n if (this.#fetchPromise) {\n return this.#fetchPromise.then(() => {\n return this.#stickersList;\n });\n }\n\n if (!this.#stickersList && !this.#tryGetFromLS()) {\n try {\n this.#fetchPromise = this.#fetchFromServer();\n\n await this.#fetchPromise;\n\n this.#fetchPromise = null;\n } catch (error) {\n throw new Error('Cannot get stickers!');\n }\n }\n\n return this.#stickersList;\n }", "title": "" }, { "docid": "1d29b6447d06b63d83d1acdbaba337fd", "score": "0.52348346", "text": "function spawnWorker() {\n const workerUrl = createBlob(workerFunction);\n const worker = new StatefulWorker(workerUrl);\n worker.addEventListener('message', handleMessageFromWorker);\n worker.postMessage({type: 'import', data: includes});\n workers.push(worker);\n }", "title": "" }, { "docid": "f59a8f601b5ae82a53d72dbf83d57d4e", "score": "0.5230418", "text": "__init18() {this.masterWorker = null}", "title": "" }, { "docid": "16e872764ee0505aa40c0a53f8861f2e", "score": "0.52292335", "text": "componentDidMount(){\n this.fetchData();\n }", "title": "" }, { "docid": "7740e345a624f2417a20bde6b087614d", "score": "0.5228365", "text": "activateLoaderWorker() {\n const workerIdx = this.addLoaderWorker();\n if (workerIdx === -1) return;\n\n const workerObj = this.loaderWorkers[workerIdx];\n this.inputWorker.postMessage({\n action: \"loaderWorkerReady\",\n data: {\n id: workerObj.id\n }\n });\n }", "title": "" }, { "docid": "9c91ccf9153508ffef50383c939787bf", "score": "0.5224295", "text": "async loadJobs() {\n try {\n const response = await axios.get(`${baseUrl}/api/getJobs`);\n\n if (response) {\n this.commit('SET_JOBS', response.data);\n } else {\n throw new Error('Resoponse is empty');\n }\n } catch (e) {\n throw new Error('Can not fetch jobs list');\n }\n }", "title": "" }, { "docid": "b72d66668eda0d9917a4c8709f749cbb", "score": "0.5224157", "text": "get work () {\n var results = [];\n for (var id in shiftsCache) {\n shiftsCache[id].work.forEach(function(x, i, a) {\n if (x.taskId) {\n var tmp = angular.copy(x);\n tmp.taskRef = TaskList.findId(x.taskId);\n tmp.weekDay = tmp.started.getDay();\n results.push(tmp);\n }\n });\n }\n return results;\n }", "title": "" }, { "docid": "47777d161196d14c36eaa32e8a2ce995", "score": "0.5223393", "text": "componentWillMount() {\n this.props.FetchTrucks();\n }", "title": "" } ]
cfca7758dbc6fa206c657142eb65df64
date from string and array of format strings
[ { "docid": "ead8c2e0857e0902c2ab3d4ddf80fb59", "score": "0.0", "text": "function configFromStringAndArray(config) {\n var tempConfig, bestMoment, scoreToBeat, i, currentScore;\n\n if (config._f.length === 0) {\n (0, _parsingFlags.default)(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = (0, _constructor.copyConfig)({}, config);\n\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n\n tempConfig._f = config._f[i];\n (0, _fromStringAndFormat.configFromStringAndFormat)(tempConfig);\n\n if (!(0, _valid.isValid)(tempConfig)) {\n continue;\n } // if there is any input that was not parsed add a penalty for that format\n\n\n currentScore += (0, _parsingFlags.default)(tempConfig).charsLeftOver; //or tokens\n\n currentScore += (0, _parsingFlags.default)(tempConfig).unusedTokens.length * 10;\n (0, _parsingFlags.default)(tempConfig).score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n (0, _extend.default)(config, bestMoment || tempConfig);\n}", "title": "" } ]
[ { "docid": "579ca415e239846cd1f1468bab9983a9", "score": "0.6992324", "text": "function makeDateFromStringAndArray(string, formats) {\n var output,\n inputParts = string.match(parseMultipleFormatChunker) || [],\n formattedInputParts,\n scoreToBeat = 99,\n i,\n currentDate,\n currentScore;\n for (i = 0; i < formats.length; i++) {\n currentDate = makeDateFromStringAndFormat(string, formats[i]);\n formattedInputParts = formatMoment(new Moment(currentDate), formats[i]).match(parseMultipleFormatChunker) || [];\n currentScore = compareArrays(inputParts, formattedInputParts);\n if (currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n output = currentDate;\n }\n }\n return output;\n }", "title": "" }, { "docid": "579ca415e239846cd1f1468bab9983a9", "score": "0.6992324", "text": "function makeDateFromStringAndArray(string, formats) {\n var output,\n inputParts = string.match(parseMultipleFormatChunker) || [],\n formattedInputParts,\n scoreToBeat = 99,\n i,\n currentDate,\n currentScore;\n for (i = 0; i < formats.length; i++) {\n currentDate = makeDateFromStringAndFormat(string, formats[i]);\n formattedInputParts = formatMoment(new Moment(currentDate), formats[i]).match(parseMultipleFormatChunker) || [];\n currentScore = compareArrays(inputParts, formattedInputParts);\n if (currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n output = currentDate;\n }\n }\n return output;\n }", "title": "" }, { "docid": "579ca415e239846cd1f1468bab9983a9", "score": "0.6992324", "text": "function makeDateFromStringAndArray(string, formats) {\n var output,\n inputParts = string.match(parseMultipleFormatChunker) || [],\n formattedInputParts,\n scoreToBeat = 99,\n i,\n currentDate,\n currentScore;\n for (i = 0; i < formats.length; i++) {\n currentDate = makeDateFromStringAndFormat(string, formats[i]);\n formattedInputParts = formatMoment(new Moment(currentDate), formats[i]).match(parseMultipleFormatChunker) || [];\n currentScore = compareArrays(inputParts, formattedInputParts);\n if (currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n output = currentDate;\n }\n }\n return output;\n }", "title": "" }, { "docid": "ca815f323312d9c0a50f309ef6ea116e", "score": "0.6977206", "text": "function makeDateFromStringAndArray(string, formats) {\n var output,\n inputParts = string.match(parseMultipleFormatChunker),\n formattedInputParts,\n scoreToBeat = 99,\n i,\n currentDate,\n currentScore;\n for (i = 0; i < formats.length; i++) {\n currentDate = makeDateFromStringAndFormat(string, formats[i]);\n formattedInputParts = formatMoment(new Moment(currentDate), formats[i]).match(parseMultipleFormatChunker);\n currentScore = compareArrays(inputParts, formattedInputParts);\n if (currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n output = currentDate;\n }\n }\n return output;\n }", "title": "" }, { "docid": "69ca567ebf5ffd9aab7f655087a82073", "score": "0.68982226", "text": "function makeDateFromStringAndFormat(string, format) {\n var datePartArray = [0, 0, 1, 0, 0, 0, 0],\n config = {\n tzh : 0, // timezone hour offset\n tzm : 0 // timezone minute offset\n },\n tokens = format.match(formattingTokens),\n i, parsedInput;\n\n for (i = 0; i < tokens.length; i++) {\n parsedInput = (getParseRegexForToken(tokens[i]).exec(string) || [0])[0];\n string = string.replace(getParseRegexForToken(tokens[i]), '');\n addTimeToArrayFromToken(tokens[i], parsedInput, datePartArray, config);\n }\n // handle am pm\n if (config.isPm && datePartArray[3] < 12) {\n datePartArray[3] += 12;\n }\n // if is 12 am, change hours to 0\n if (config.isPm === false && datePartArray[3] === 12) {\n datePartArray[3] = 0;\n }\n // handle timezone\n datePartArray[3] += config.tzh;\n datePartArray[4] += config.tzm;\n // return\n return config.isUTC ? new Date(Date.UTC.apply({}, datePartArray)) : dateFromArray(datePartArray);\n }", "title": "" }, { "docid": "84d70c0d6219045b4725ae208f29ce82", "score": "0.6868389", "text": "function makeDateFromStringAndFormat(string, format) {\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n // We store some additional data on the array for validation\n // datePartArray[7] is true if the Date was created with `Date.UTC` and false if created with `new Date`\n // datePartArray[8] is false if the Date is invalid, and undefined if the validity is unknown.\n var datePartArray = [0, 0, 1, 0, 0, 0, 0],\n config = {\n tzh : 0, // timezone hour offset\n tzm : 0 // timezone minute offset\n },\n tokens = format.match(formattingTokens),\n i, parsedInput;\n\n for (i = 0; i < tokens.length; i++) {\n parsedInput = (getParseRegexForToken(tokens[i]).exec(string) || [])[0];\n if (parsedInput) {\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n }\n // don't parse if its not a known token\n if (formatTokenFunctions[tokens[i]]) {\n addTimeToArrayFromToken(tokens[i], parsedInput, datePartArray, config);\n }\n }\n // handle am pm\n if (config.isPm && datePartArray[3] < 12) {\n datePartArray[3] += 12;\n }\n // if is 12 am, change hours to 0\n if (config.isPm === false && datePartArray[3] === 12) {\n datePartArray[3] = 0;\n }\n // return\n return dateFromArray(datePartArray, config.isUTC, config.tzh, config.tzm);\n }", "title": "" }, { "docid": "84d70c0d6219045b4725ae208f29ce82", "score": "0.6868389", "text": "function makeDateFromStringAndFormat(string, format) {\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n // We store some additional data on the array for validation\n // datePartArray[7] is true if the Date was created with `Date.UTC` and false if created with `new Date`\n // datePartArray[8] is false if the Date is invalid, and undefined if the validity is unknown.\n var datePartArray = [0, 0, 1, 0, 0, 0, 0],\n config = {\n tzh : 0, // timezone hour offset\n tzm : 0 // timezone minute offset\n },\n tokens = format.match(formattingTokens),\n i, parsedInput;\n\n for (i = 0; i < tokens.length; i++) {\n parsedInput = (getParseRegexForToken(tokens[i]).exec(string) || [])[0];\n if (parsedInput) {\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n }\n // don't parse if its not a known token\n if (formatTokenFunctions[tokens[i]]) {\n addTimeToArrayFromToken(tokens[i], parsedInput, datePartArray, config);\n }\n }\n // handle am pm\n if (config.isPm && datePartArray[3] < 12) {\n datePartArray[3] += 12;\n }\n // if is 12 am, change hours to 0\n if (config.isPm === false && datePartArray[3] === 12) {\n datePartArray[3] = 0;\n }\n // return\n return dateFromArray(datePartArray, config.isUTC, config.tzh, config.tzm);\n }", "title": "" }, { "docid": "84d70c0d6219045b4725ae208f29ce82", "score": "0.6868389", "text": "function makeDateFromStringAndFormat(string, format) {\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n // We store some additional data on the array for validation\n // datePartArray[7] is true if the Date was created with `Date.UTC` and false if created with `new Date`\n // datePartArray[8] is false if the Date is invalid, and undefined if the validity is unknown.\n var datePartArray = [0, 0, 1, 0, 0, 0, 0],\n config = {\n tzh : 0, // timezone hour offset\n tzm : 0 // timezone minute offset\n },\n tokens = format.match(formattingTokens),\n i, parsedInput;\n\n for (i = 0; i < tokens.length; i++) {\n parsedInput = (getParseRegexForToken(tokens[i]).exec(string) || [])[0];\n if (parsedInput) {\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n }\n // don't parse if its not a known token\n if (formatTokenFunctions[tokens[i]]) {\n addTimeToArrayFromToken(tokens[i], parsedInput, datePartArray, config);\n }\n }\n // handle am pm\n if (config.isPm && datePartArray[3] < 12) {\n datePartArray[3] += 12;\n }\n // if is 12 am, change hours to 0\n if (config.isPm === false && datePartArray[3] === 12) {\n datePartArray[3] = 0;\n }\n // return\n return dateFromArray(datePartArray, config.isUTC, config.tzh, config.tzm);\n }", "title": "" }, { "docid": "7c83ebbd029fa2bdf81b70eb258863b7", "score": "0.67375225", "text": "function makeDateFromStringAndFormat(config) {\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var tokens = config._f.match(formattingTokens),\n string = config._i,\n i, parsedInput;\n\n config._a = [];\n\n for (i = 0; i < tokens.length; i++) {\n parsedInput = (getParseRegexForToken(tokens[i]).exec(string) || [])[0];\n if (parsedInput) {\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n }\n // don't parse if its not a known token\n if (formatTokenFunctions[tokens[i]]) {\n addTimeToArrayFromToken(tokens[i], parsedInput, config);\n }\n }\n // handle am pm\n if (config._isPm && config._a[3] < 12) {\n config._a[3] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[3] === 12) {\n config._a[3] = 0;\n }\n // return\n dateFromArray(config);\n }", "title": "" }, { "docid": "9e719923867a13f268f0ad345d7a4b3a", "score": "0.67109895", "text": "function makeDateFromStringAndFormat(config) {\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var tokens = config._f.match(formattingTokens),\n string = config._i,\n i, parsedInput;\n\n config._a = [];\n\n for (i = 0; i < tokens.length; i++) {\n parsedInput = (getParseRegexForToken(tokens[i], config).exec(string) || [])[0];\n if (parsedInput) {\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n }\n // don't parse if its not a known token\n if (formatTokenFunctions[tokens[i]]) {\n addTimeToArrayFromToken(tokens[i], parsedInput, config);\n }\n }\n\n // add remaining unparsed input to the string\n if (string) {\n config._il = string;\n }\n\n // handle am pm\n if (config._isPm && config._a[3] < 12) {\n config._a[3] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[3] === 12) {\n config._a[3] = 0;\n }\n // return\n dateFromArray(config);\n }", "title": "" }, { "docid": "9e719923867a13f268f0ad345d7a4b3a", "score": "0.67109895", "text": "function makeDateFromStringAndFormat(config) {\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var tokens = config._f.match(formattingTokens),\n string = config._i,\n i, parsedInput;\n\n config._a = [];\n\n for (i = 0; i < tokens.length; i++) {\n parsedInput = (getParseRegexForToken(tokens[i], config).exec(string) || [])[0];\n if (parsedInput) {\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n }\n // don't parse if its not a known token\n if (formatTokenFunctions[tokens[i]]) {\n addTimeToArrayFromToken(tokens[i], parsedInput, config);\n }\n }\n\n // add remaining unparsed input to the string\n if (string) {\n config._il = string;\n }\n\n // handle am pm\n if (config._isPm && config._a[3] < 12) {\n config._a[3] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[3] === 12) {\n config._a[3] = 0;\n }\n // return\n dateFromArray(config);\n }", "title": "" }, { "docid": "9e719923867a13f268f0ad345d7a4b3a", "score": "0.67109895", "text": "function makeDateFromStringAndFormat(config) {\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var tokens = config._f.match(formattingTokens),\n string = config._i,\n i, parsedInput;\n\n config._a = [];\n\n for (i = 0; i < tokens.length; i++) {\n parsedInput = (getParseRegexForToken(tokens[i], config).exec(string) || [])[0];\n if (parsedInput) {\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n }\n // don't parse if its not a known token\n if (formatTokenFunctions[tokens[i]]) {\n addTimeToArrayFromToken(tokens[i], parsedInput, config);\n }\n }\n\n // add remaining unparsed input to the string\n if (string) {\n config._il = string;\n }\n\n // handle am pm\n if (config._isPm && config._a[3] < 12) {\n config._a[3] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[3] === 12) {\n config._a[3] = 0;\n }\n // return\n dateFromArray(config);\n }", "title": "" }, { "docid": "e130342ad332faa35a50a00964561963", "score": "0.6588876", "text": "function makeDateFromStringAndFormat(config) {\n\t\n\t config._a = [];\n\t config._pf.empty = true;\n\t\n\t // This array is used to make a Date, either with `new Date` or `Date.UTC`\n\t var lang = getLangDefinition(config._l),\n\t string = '' + config._i,\n\t i, parsedInput, tokens, token, skipped,\n\t stringLength = string.length,\n\t totalParsedInputLength = 0;\n\t\n\t tokens = expandFormat(config._f, lang).match(formattingTokens) || [];\n\t\n\t for (i = 0; i < tokens.length; i++) {\n\t token = tokens[i];\n\t parsedInput = (getParseRegexForToken(token, config).exec(string) || [])[0];\n\t if (parsedInput) {\n\t skipped = string.substr(0, string.indexOf(parsedInput));\n\t if (skipped.length > 0) {\n\t config._pf.unusedInput.push(skipped);\n\t }\n\t string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n\t totalParsedInputLength += parsedInput.length;\n\t }\n\t // don't parse if it's not a known token\n\t if (formatTokenFunctions[token]) {\n\t if (parsedInput) {\n\t config._pf.empty = false;\n\t }\n\t else {\n\t config._pf.unusedTokens.push(token);\n\t }\n\t addTimeToArrayFromToken(token, parsedInput, config);\n\t }\n\t else if (config._strict && !parsedInput) {\n\t config._pf.unusedTokens.push(token);\n\t }\n\t }\n\t\n\t // add remaining unparsed input length to the string\n\t config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n\t if (string.length > 0) {\n\t config._pf.unusedInput.push(string);\n\t }\n\t\n\t // handle am pm\n\t if (config._isPm && config._a[HOUR] < 12) {\n\t config._a[HOUR] += 12;\n\t }\n\t // if is 12 am, change hours to 0\n\t if (config._isPm === false && config._a[HOUR] === 12) {\n\t config._a[HOUR] = 0;\n\t }\n\t\n\t dateFromConfig(config);\n\t checkOverflow(config);\n\t }", "title": "" }, { "docid": "cdeca56d1da73793a72783a9a37e2ee2", "score": "0.65863997", "text": "function makeDateFromStringAndFormat(config) {\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var lang = getLangDefinition(config._l),\n string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, lang).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (getParseRegexForToken(token, config).exec(string) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "title": "" }, { "docid": "cdeca56d1da73793a72783a9a37e2ee2", "score": "0.65863997", "text": "function makeDateFromStringAndFormat(config) {\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var lang = getLangDefinition(config._l),\n string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, lang).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (getParseRegexForToken(token, config).exec(string) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "title": "" }, { "docid": "cdeca56d1da73793a72783a9a37e2ee2", "score": "0.65863997", "text": "function makeDateFromStringAndFormat(config) {\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var lang = getLangDefinition(config._l),\n string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, lang).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (getParseRegexForToken(token, config).exec(string) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "title": "" }, { "docid": "95a268226bf41f3c00e3f6964c1461a7", "score": "0.6581951", "text": "function parseDate(input, format) {\n format = format || 'yyyy-mm-dd'; // default format\n var parts = input.match(/(\\d+)/g),\n i = 0, fmt = {};\n // extract date-part indexes from the format\n format.replace(/(yyyy|dd|mm)/g, function(part) { fmt[part] = i++; });\n\n return new Date(parts[fmt['yyyy']], parts[fmt['mm']]-1, parts[fmt['dd']]);\n}", "title": "" }, { "docid": "154a666aeb8bb40caff35e2e14d380f5", "score": "0.65736145", "text": "function makeDateFromStringAndFormat(config) {\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var lang = getLangDefinition(config._l),\n string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, lang).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "title": "" }, { "docid": "154a666aeb8bb40caff35e2e14d380f5", "score": "0.65736145", "text": "function makeDateFromStringAndFormat(config) {\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var lang = getLangDefinition(config._l),\n string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, lang).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "title": "" }, { "docid": "154a666aeb8bb40caff35e2e14d380f5", "score": "0.65736145", "text": "function makeDateFromStringAndFormat(config) {\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var lang = getLangDefinition(config._l),\n string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, lang).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "title": "" }, { "docid": "154a666aeb8bb40caff35e2e14d380f5", "score": "0.65736145", "text": "function makeDateFromStringAndFormat(config) {\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var lang = getLangDefinition(config._l),\n string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, lang).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "title": "" }, { "docid": "154a666aeb8bb40caff35e2e14d380f5", "score": "0.65736145", "text": "function makeDateFromStringAndFormat(config) {\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var lang = getLangDefinition(config._l),\n string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, lang).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "title": "" }, { "docid": "154a666aeb8bb40caff35e2e14d380f5", "score": "0.65736145", "text": "function makeDateFromStringAndFormat(config) {\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var lang = getLangDefinition(config._l),\n string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, lang).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "title": "" }, { "docid": "154a666aeb8bb40caff35e2e14d380f5", "score": "0.65736145", "text": "function makeDateFromStringAndFormat(config) {\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var lang = getLangDefinition(config._l),\n string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, lang).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "title": "" }, { "docid": "7f208011af7ae9f1daeb59e28938af51", "score": "0.6543608", "text": "parseFormat(dateString){\n\t\tlet format;\n\t\tlet validFormats = new Set(Object.getOwnPropertyNames(FORMAT));\n\t\tvalidFormats.forEach(valid => {\n\t\t\tlet regex = new RegExp(FORMAT[valid]['regex'], 'g');\n\t\t\tif(regex.test(dateString)){\n\t\t\t\tformat = valid;\n\t\t\t}\n\t\t});\n\t\tif(! format) \n\t\t\tthrow new Error(`Invalid Format: The given \"${dateString}\" does not conform to acceptable formats.`);\n\n\t\treturn format ; \n\t}", "title": "" }, { "docid": "cec4b7650b59b880af340e0e69e0c3b5", "score": "0.64849424", "text": "function makeDateFromStringAndArray(config) {\n var tempConfig, bestMoment, scoreToBeat, i, currentScore;\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n if (!isValid(tempConfig)) {\n continue;\n }\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n tempConfig._pf.score = currentScore;\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n extend(config, bestMoment || tempConfig);\n }", "title": "" }, { "docid": "a5619170f5235880db7670d563f2844a", "score": "0.6478832", "text": "function makeDateFromStringAndArray(config) {\n\t var tempConfig,\n\t bestMoment,\n\t\n\t scoreToBeat,\n\t i,\n\t currentScore;\n\t\n\t if (config._f.length === 0) {\n\t config._pf.invalidFormat = true;\n\t config._d = new Date(NaN);\n\t return;\n\t }\n\t\n\t for (i = 0; i < config._f.length; i++) {\n\t currentScore = 0;\n\t tempConfig = extend({}, config);\n\t initializeParsingFlags(tempConfig);\n\t tempConfig._f = config._f[i];\n\t makeDateFromStringAndFormat(tempConfig);\n\t\n\t if (!isValid(tempConfig)) {\n\t continue;\n\t }\n\t\n\t // if there is any input that was not parsed add a penalty for that format\n\t currentScore += tempConfig._pf.charsLeftOver;\n\t\n\t //or tokens\n\t currentScore += tempConfig._pf.unusedTokens.length * 10;\n\t\n\t tempConfig._pf.score = currentScore;\n\t\n\t if (scoreToBeat == null || currentScore < scoreToBeat) {\n\t scoreToBeat = currentScore;\n\t bestMoment = tempConfig;\n\t }\n\t }\n\t\n\t extend(config, bestMoment || tempConfig);\n\t }", "title": "" }, { "docid": "342ffd53c3fbea28478fd1e06c83e80a", "score": "0.64605933", "text": "function makeDateFromString(config) {\n var i,\n string = config._i;\n if (isoRegex.exec(string)) {\n config._f = 'YYYY-MM-DDT';\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \" Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._d = new Date(string);\n }\n }", "title": "" }, { "docid": "7e1f0c65d6d90983fe64a32a1f608580", "score": "0.6419801", "text": "function makeDateFromString(config) {\n var i,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n // match[2] should be \"T\" or undefined\n config._f = 'YYYY-MM-DD' + (match[2] || \" \");\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \" Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._d = new Date(string);\n }\n }", "title": "" }, { "docid": "7e1f0c65d6d90983fe64a32a1f608580", "score": "0.6419801", "text": "function makeDateFromString(config) {\n var i,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n // match[2] should be \"T\" or undefined\n config._f = 'YYYY-MM-DD' + (match[2] || \" \");\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \" Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._d = new Date(string);\n }\n }", "title": "" }, { "docid": "7e1f0c65d6d90983fe64a32a1f608580", "score": "0.6419801", "text": "function makeDateFromString(config) {\n var i,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n // match[2] should be \"T\" or undefined\n config._f = 'YYYY-MM-DD' + (match[2] || \" \");\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \" Z\";\n }\n makeDateFromStringAndFormat(config);\n } else {\n config._d = new Date(string);\n }\n }", "title": "" }, { "docid": "ab4d4efb86aa3b05ffb927fe39514fe4", "score": "0.64187133", "text": "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "title": "" }, { "docid": "81b42b0b353240abe4e8d54cf8a088b5", "score": "0.6411174", "text": "function parseDate(input, format) {\n if(typeof input !== \"undefined\" && input.length) {\n format = format || 'yyyy-mm-dd'; // default format\n var parts = input.match(/(\\d+)/g),\n i = 0, fmt = {};\n // extract date-part indexes from the format\n format.replace(/(yyyy|dd|mm)/g, function(part) { fmt[part] = i++; });\n\n //return Date.UTC(parts[fmt['yyyy']], parts[fmt['mm']]-1, parts[fmt['dd']]);\n return Date.parse(month[parseInt(parts[fmt['mm']]-1, 10)] + ' ' + parts[fmt['dd']] + ', ' + parts[fmt['yyyy']]);\n }\n}", "title": "" }, { "docid": "6b9562146a46d98639f1b24ceea5f376", "score": "0.640779", "text": "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = extend({}, config);\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "title": "" }, { "docid": "6b9562146a46d98639f1b24ceea5f376", "score": "0.640779", "text": "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = extend({}, config);\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "title": "" }, { "docid": "6b9562146a46d98639f1b24ceea5f376", "score": "0.640779", "text": "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = extend({}, config);\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "title": "" }, { "docid": "6b9562146a46d98639f1b24ceea5f376", "score": "0.640779", "text": "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = extend({}, config);\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "title": "" }, { "docid": "6b9562146a46d98639f1b24ceea5f376", "score": "0.640779", "text": "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = extend({}, config);\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "title": "" }, { "docid": "6b9562146a46d98639f1b24ceea5f376", "score": "0.640779", "text": "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = extend({}, config);\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "title": "" }, { "docid": "6b9562146a46d98639f1b24ceea5f376", "score": "0.640779", "text": "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = extend({}, config);\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "title": "" }, { "docid": "6b9562146a46d98639f1b24ceea5f376", "score": "0.640779", "text": "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = extend({}, config);\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "title": "" }, { "docid": "6b9562146a46d98639f1b24ceea5f376", "score": "0.640779", "text": "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = extend({}, config);\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "title": "" }, { "docid": "6b9562146a46d98639f1b24ceea5f376", "score": "0.640779", "text": "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = extend({}, config);\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "title": "" }, { "docid": "6b9562146a46d98639f1b24ceea5f376", "score": "0.640779", "text": "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = extend({}, config);\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "title": "" }, { "docid": "6b9562146a46d98639f1b24ceea5f376", "score": "0.640779", "text": "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = extend({}, config);\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "title": "" }, { "docid": "6b9562146a46d98639f1b24ceea5f376", "score": "0.640779", "text": "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = extend({}, config);\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "title": "" }, { "docid": "33247f01433230d5d11799ae9a77d43a", "score": "0.6394892", "text": "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n } else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n } else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "title": "" }, { "docid": "5eab5c2b210f4729e195b35595a6ed17", "score": "0.6393603", "text": "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = extend({}, config);\n initializeParsingFlags(tempConfig);\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "title": "" }, { "docid": "5eab5c2b210f4729e195b35595a6ed17", "score": "0.6393603", "text": "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = extend({}, config);\n initializeParsingFlags(tempConfig);\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "title": "" }, { "docid": "5eab5c2b210f4729e195b35595a6ed17", "score": "0.6393603", "text": "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = extend({}, config);\n initializeParsingFlags(tempConfig);\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "title": "" }, { "docid": "5eab5c2b210f4729e195b35595a6ed17", "score": "0.6393603", "text": "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = extend({}, config);\n initializeParsingFlags(tempConfig);\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "title": "" }, { "docid": "5eab5c2b210f4729e195b35595a6ed17", "score": "0.6393603", "text": "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = extend({}, config);\n initializeParsingFlags(tempConfig);\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "title": "" }, { "docid": "73903f1c82c7b60db753e1755e164eb7", "score": "0.6371693", "text": "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "title": "" }, { "docid": "73903f1c82c7b60db753e1755e164eb7", "score": "0.6371693", "text": "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "title": "" }, { "docid": "73903f1c82c7b60db753e1755e164eb7", "score": "0.6371693", "text": "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "title": "" }, { "docid": "73903f1c82c7b60db753e1755e164eb7", "score": "0.6371693", "text": "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "title": "" }, { "docid": "73903f1c82c7b60db753e1755e164eb7", "score": "0.6371693", "text": "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "title": "" }, { "docid": "73903f1c82c7b60db753e1755e164eb7", "score": "0.6371693", "text": "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "title": "" }, { "docid": "73903f1c82c7b60db753e1755e164eb7", "score": "0.6371693", "text": "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n\n dateFromConfig(config);\n checkOverflow(config);\n }", "title": "" }, { "docid": "acd40f6e4822a9b65cc35cad7bd3bea9", "score": "0.6369927", "text": "function dateFromString(stringToParse) {\n //check text to see if ex, (2nd), (22nd) found\n //and remove it from the text ex, (2nd > 2), (22nd > 22)\n var ndType = stringToParse.match(/[0-9]{1,2}(?:(?:nd)|(?:th))/);\n if (ndType && ndType[0]) {\n var typeR = ndType[0];\n stringToParse = stringToParse.replace(\n typeR,\n typeR.substring(0, typeR.length - 2)\n );\n }\n\n //here we check for date\n //example 3/21/2020\n var date;\n var ssdate = stringToParse.match(\n /(\\d{4})\\/(\\d{1,2})\\/(\\d{1,2})\\s+(\\d{2}):(\\d{2})/\n );\n\n if (!ssdate) ssdate = stringToParse.match(/(\\d{4})\\/(\\d{1,2})\\/(\\d{1,2})/);\n if (!ssdate) ssdate = stringToParse.match(/(\\d{1,2})\\/(\\d{1,2})\\/(\\d{4})/);\n\n if (!ssdate) ssdate = stringToParse.match(/(\\d{4})-(\\d{1,2})-(\\d{1,2})/);\n if (!ssdate) ssdate = stringToParse.match(/(\\d{1,2})-(\\d{1,2})-(\\d{14})/);\n\n if (ssdate) {\n ssdate[2] -= 1;\n date = new Date(Date.UTC.apply(this, ssdate.slice(1)));\n if (date.toString().includes(\"1909\")) {\n date = new Date(ssdate.slice(1));\n }\n }\n\n //here we check for date\n //example mon feb 4 2020\n if (!date) {\n ssdate = stringToParse.match(\n /\\b(?:(?:mon)|(?:tues?)|(?:wed(?:nes)?)|(?:thur?s?)|(?:fri)|(?:sat(?:ur)?)|(?:sun))(?:day)?\\b[:\\-,]?\\s*(?:(?:jan|feb)?r?(?:uary)?|mar(?:ch)?|apr(?:il)?|may|june?|july?|aug(?:ust)?|oct(?:ober)?|(?:sept?|nov|dec)(?:ember)?)\\s+\\d{1,2}\\s*,?\\s*\\d{4}/i\n );\n if (ssdate) date = new Date(ssdate);\n }\n\n //here we check for date\n //example 2020 feb 4\n if (!date) {\n ssdate = stringToParse.match(\n /\\s*,?\\s*\\d{4}\\s*(?:(?:jan|feb)?r?(?:uary)?|mar(?:ch)?|apr(?:il)?|may|june?|july?|aug(?:ust)?|oct(?:ober)?|(?:sept?|nov|dec)(?:ember)?)\\s+\\d{1,2}/i\n );\n if (ssdate) date = new Date(ssdate);\n }\n\n //here we check for date\n //example feb 4 2020\n if (!date) {\n ssdate = stringToParse.match(\n /\\s+\\d{1,2}\\s*,?\\s*\\d{4}\\b(?:(?:mon)|(?:tues?)|(?:wed(?:nes)?)|(?:thur?s?)|(?:fri)|(?:sat(?:ur)?)|(?:sun))(?:day)?\\b[:\\-,]?\\s*(?:(?:jan|feb)?r?(?:uary)?|mar(?:ch)?|apr(?:il)?|may|june?|july?|aug(?:ust)?|oct(?:ober)?|(?:sept?|nov|dec)(?:ember)?)/i\n );\n if (ssdate) date = new Date(ssdate);\n }\n\n //here we check for date\n //example cot 3 2020\n if (!date) {\n ssdate = stringToParse.match(\n /\\b[:\\-,]?\\s*[a-zA-Z]{3,9}\\s+\\d{1,2}\\s*,?\\s*\\d{4}/\n );\n if (ssdate) date = new Date(ssdate);\n }\n\n //here we check for nav date\n //example today,tomorrow,yesterday\n if (!date) date = parseNavDate(stringToParse);\n\n //here we check for week month date\n //example (next week), (next month), (actual week,month,year in time)\n if (!date) date = parseWeekMonthDate(stringToParse);\n return \"\" + date;\n}", "title": "" }, { "docid": "bc34d3a1cae455b975820b34305b9fea", "score": "0.6365795", "text": "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n config._a = [];\n config._pf.empty = true;\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i, i, parsedInput, tokens, token, skipped, stringLength = string.length, totalParsedInputLength = 0;\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n } else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n } else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle am pm\n if (config._isPm && config._a[HOUR] < 12) {\n config._a[HOUR] += 12;\n }\n // if is 12 am, change hours to 0\n if (config._isPm === false && config._a[HOUR] === 12) {\n config._a[HOUR] = 0;\n }\n dateFromConfig(config);\n checkOverflow(config);\n }", "title": "" }, { "docid": "8cdf7bab268d1be1846ce9379c510df5", "score": "0.6364184", "text": "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "title": "" }, { "docid": "8cdf7bab268d1be1846ce9379c510df5", "score": "0.6364184", "text": "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "title": "" }, { "docid": "8cdf7bab268d1be1846ce9379c510df5", "score": "0.6364184", "text": "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "title": "" }, { "docid": "8cdf7bab268d1be1846ce9379c510df5", "score": "0.6364184", "text": "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "title": "" }, { "docid": "8cdf7bab268d1be1846ce9379c510df5", "score": "0.6364184", "text": "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "title": "" }, { "docid": "8cdf7bab268d1be1846ce9379c510df5", "score": "0.6364184", "text": "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "title": "" }, { "docid": "8cdf7bab268d1be1846ce9379c510df5", "score": "0.6364184", "text": "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "title": "" }, { "docid": "8cdf7bab268d1be1846ce9379c510df5", "score": "0.6364184", "text": "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "title": "" }, { "docid": "8cdf7bab268d1be1846ce9379c510df5", "score": "0.6364184", "text": "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "title": "" }, { "docid": "8cdf7bab268d1be1846ce9379c510df5", "score": "0.6364184", "text": "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "title": "" }, { "docid": "8cdf7bab268d1be1846ce9379c510df5", "score": "0.6364184", "text": "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "title": "" }, { "docid": "8cdf7bab268d1be1846ce9379c510df5", "score": "0.6364184", "text": "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "title": "" }, { "docid": "8cdf7bab268d1be1846ce9379c510df5", "score": "0.6364184", "text": "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "title": "" }, { "docid": "8cdf7bab268d1be1846ce9379c510df5", "score": "0.6364184", "text": "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "title": "" }, { "docid": "8cdf7bab268d1be1846ce9379c510df5", "score": "0.6364184", "text": "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "title": "" }, { "docid": "8cdf7bab268d1be1846ce9379c510df5", "score": "0.6364184", "text": "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "title": "" }, { "docid": "8cdf7bab268d1be1846ce9379c510df5", "score": "0.6364184", "text": "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "title": "" }, { "docid": "8cdf7bab268d1be1846ce9379c510df5", "score": "0.6364184", "text": "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "title": "" }, { "docid": "8cdf7bab268d1be1846ce9379c510df5", "score": "0.6364184", "text": "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "title": "" }, { "docid": "8cdf7bab268d1be1846ce9379c510df5", "score": "0.6364184", "text": "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "title": "" }, { "docid": "8cdf7bab268d1be1846ce9379c510df5", "score": "0.6364184", "text": "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "title": "" }, { "docid": "8cdf7bab268d1be1846ce9379c510df5", "score": "0.6364184", "text": "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "title": "" }, { "docid": "8cdf7bab268d1be1846ce9379c510df5", "score": "0.6364184", "text": "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "title": "" }, { "docid": "8cdf7bab268d1be1846ce9379c510df5", "score": "0.6364184", "text": "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "title": "" }, { "docid": "67aa456f0b260212e98e29efd5b61b26", "score": "0.6350513", "text": "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR],\n config._meridiem);\n dateFromConfig(config);\n checkOverflow(config);\n }", "title": "" }, { "docid": "67aa456f0b260212e98e29efd5b61b26", "score": "0.6350513", "text": "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR],\n config._meridiem);\n dateFromConfig(config);\n checkOverflow(config);\n }", "title": "" }, { "docid": "67aa456f0b260212e98e29efd5b61b26", "score": "0.6350513", "text": "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR],\n config._meridiem);\n dateFromConfig(config);\n checkOverflow(config);\n }", "title": "" }, { "docid": "67aa456f0b260212e98e29efd5b61b26", "score": "0.6350513", "text": "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR],\n config._meridiem);\n dateFromConfig(config);\n checkOverflow(config);\n }", "title": "" }, { "docid": "67aa456f0b260212e98e29efd5b61b26", "score": "0.6350513", "text": "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR],\n config._meridiem);\n dateFromConfig(config);\n checkOverflow(config);\n }", "title": "" }, { "docid": "67aa456f0b260212e98e29efd5b61b26", "score": "0.6350513", "text": "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR],\n config._meridiem);\n dateFromConfig(config);\n checkOverflow(config);\n }", "title": "" }, { "docid": "67aa456f0b260212e98e29efd5b61b26", "score": "0.6350513", "text": "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR],\n config._meridiem);\n dateFromConfig(config);\n checkOverflow(config);\n }", "title": "" }, { "docid": "67aa456f0b260212e98e29efd5b61b26", "score": "0.6350513", "text": "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR],\n config._meridiem);\n dateFromConfig(config);\n checkOverflow(config);\n }", "title": "" }, { "docid": "67aa456f0b260212e98e29efd5b61b26", "score": "0.6350513", "text": "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR],\n config._meridiem);\n dateFromConfig(config);\n checkOverflow(config);\n }", "title": "" }, { "docid": "67aa456f0b260212e98e29efd5b61b26", "score": "0.6350513", "text": "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR],\n config._meridiem);\n dateFromConfig(config);\n checkOverflow(config);\n }", "title": "" }, { "docid": "67aa456f0b260212e98e29efd5b61b26", "score": "0.6350513", "text": "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR],\n config._meridiem);\n dateFromConfig(config);\n checkOverflow(config);\n }", "title": "" }, { "docid": "67aa456f0b260212e98e29efd5b61b26", "score": "0.6350513", "text": "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR],\n config._meridiem);\n dateFromConfig(config);\n checkOverflow(config);\n }", "title": "" }, { "docid": "6cf947e2989c569f7156af1a5db1dee0", "score": "0.6349301", "text": "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR],\n config._meridiem);\n dateFromConfig(config);\n checkOverflow(config);\n }", "title": "" }, { "docid": "6cf947e2989c569f7156af1a5db1dee0", "score": "0.6349301", "text": "function makeDateFromStringAndFormat(config) {\n if (config._f === moment.ISO_8601) {\n parseISO(config);\n return;\n }\n\n config._a = [];\n config._pf.empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i, parsedInput, tokens, token, skipped,\n stringLength = string.length,\n totalParsedInputLength = 0;\n\n tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n config._pf.unusedInput.push(skipped);\n }\n string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n config._pf.empty = false;\n }\n else {\n config._pf.unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n }\n else if (config._strict && !parsedInput) {\n config._pf.unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n config._pf.charsLeftOver = stringLength - totalParsedInputLength;\n if (string.length > 0) {\n config._pf.unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (config._pf.bigHour === true && config._a[HOUR] <= 12) {\n config._pf.bigHour = undefined;\n }\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR],\n config._meridiem);\n dateFromConfig(config);\n checkOverflow(config);\n }", "title": "" }, { "docid": "0b887867dc6ea476ca291f0162a91c97", "score": "0.6349246", "text": "function makeDateFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n\n scoreToBeat,\n i,\n currentScore;\n\n if (config._f.length === 0) {\n config._pf.invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < config._f.length; i++) {\n currentScore = 0;\n tempConfig = copyConfig({}, config);\n tempConfig._pf = defaultParsingFlags();\n tempConfig._f = config._f[i];\n makeDateFromStringAndFormat(tempConfig);\n\n if (!isValid(tempConfig)) {\n continue;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += tempConfig._pf.charsLeftOver;\n\n //or tokens\n currentScore += tempConfig._pf.unusedTokens.length * 10;\n\n tempConfig._pf.score = currentScore;\n\n if (scoreToBeat == null || currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }", "title": "" }, { "docid": "f6b52b1b0de8cd7927e238f7d0b5f66a", "score": "0.6342695", "text": "function makeDateFromString(config) {\n var i,\n string = config._i,\n match = isoRegex.exec(string);\n\n if (match) {\n for (i = 4; i > 0; i--) {\n if (match[i]) {\n // match[5] should be \"T\" or undefined\n config._f = isoDates[i - 1] + (match[6] || \" \");\n break;\n }\n }\n for (i = 0; i < 4; i++) {\n if (isoTimes[i][1].exec(string)) {\n config._f += isoTimes[i][0];\n break;\n }\n }\n if (parseTokenTimezone.exec(string)) {\n config._f += \" Z\";\n }\n makeDateFromStringAndFormat(config);\n }\n else {\n config._d = new Date(string);\n }\n }", "title": "" } ]
30629d8c167680d0faa44e1f97e8131c
Use function string name to check builtin types, because a simple equality check will fail when running across different vms / iframes.
[ { "docid": "d102abe92242f35a52ec07b39ffeda63", "score": "0.0", "text": "function getType (fn) {\n var match = fn && fn.toString().match(/^\\s*function (\\w+)/);\n return match ? match[1] : ''\n}", "title": "" } ]
[ { "docid": "487235ab794205927b842a571231bb19", "score": "0.62212604", "text": "function is_builtin_function(fun) {\n return is_tagged_object(fun, \"builtin\");\n}", "title": "" }, { "docid": "9a7226f4d7d8b3555ceac2d9075976b2", "score": "0.6173487", "text": "function i(t){return\"function\"===typeof t}", "title": "" }, { "docid": "912e3c8d70c82d3a49107edc7de0c8c2", "score": "0.6163006", "text": "function isBuiltin(wat, className) {\n return objectToString.call(wat) === `[object ${className}]`;\n}", "title": "" }, { "docid": "912e3c8d70c82d3a49107edc7de0c8c2", "score": "0.6163006", "text": "function isBuiltin(wat, className) {\n return objectToString.call(wat) === `[object ${className}]`;\n}", "title": "" }, { "docid": "fb457872b18c8268d285cdae87c946a8", "score": "0.6115028", "text": "function x(t){return\"function\"==typeof t}", "title": "" }, { "docid": "38bbf7f1a7d98ce9043fe35e6267abcb", "score": "0.6091027", "text": "function is_func(func) {\n return Object.prototype.toString.call(func) == \"[object Function]\";\n }", "title": "" }, { "docid": "dfcc2338132e7c1f0231f48166a619f9", "score": "0.60479647", "text": "function isSameType(x, y) {\n var tX = type(x)\n var tY = type(y)\n\n return tX === tY\n || (isFunction(x) && x.name === tY)\n || (isFunction(y) && y.name === tX)\n}", "title": "" }, { "docid": "85b2429b5392739139387b3632184fab", "score": "0.6041247", "text": "function i(t){return\"function\"==typeof t}", "title": "" }, { "docid": "87a9d5688483c3a5171cf34c0322b8f2", "score": "0.5937434", "text": "function IsFunction(strArg)\r\n{\r\n var idx = 0;\r\n\r\n\tstrArg = strArg.toUpperCase();\r\n\tfor (idx = 0; idx < lstFuncOps.length; idx++)\r\n\t{\r\n\t if (strArg == lstFuncOps[idx])\r\n\t return true;\r\n\t}\r\n\treturn false;\r\n}", "title": "" }, { "docid": "d30202d9d320189ddf79232d5ae9c334", "score": "0.59367496", "text": "function e(t) {\n return (\n (\"undefined\" !== typeof Function && t instanceof Function) ||\n \"[object Function]\" === Object.prototype.toString.call(t)\n );\n }", "title": "" }, { "docid": "4837079c53c0f94a8426acc92b42d71f", "score": "0.59110695", "text": "function lolspace_is_func(funcname)\n{\n for (var i=0; i<lolspace_user_functions.length; i++)\n {\n if (lolspace_user_functions[i].name == funcname)\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "37ee9ac3a11ae8e9d8530d7a98aa3fd3", "score": "0.59099245", "text": "function t(e){return typeof Function!==\"undefined\"&&e instanceof Function||Object.prototype.toString.call(e)===\"[object Function]\"}", "title": "" }, { "docid": "38e47d667813d3a02a1cd01fe7561797", "score": "0.5880007", "text": "function st(t){return\"string\"==typeof t}", "title": "" }, { "docid": "287809a5d82b54f0c3563aaff4296640", "score": "0.58643556", "text": "function checkType(value, type, name) {\n checkDefined(value, name);\n checkDefined(type, 'Type');\n\n if (typeof type === 'function' && value instanceof type || typeof type === 'string' && typeof value === type) {\n return true;\n }\n throw new Error(['Expected', name || value, 'to have type', type].join(' '));\n}", "title": "" }, { "docid": "be21ef0ecfe2837f47d3ceb37a3260b1", "score": "0.58549", "text": "function t(e){return\"undefined\"!=typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "title": "" }, { "docid": "be21ef0ecfe2837f47d3ceb37a3260b1", "score": "0.58549", "text": "function t(e){return\"undefined\"!=typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "title": "" }, { "docid": "be21ef0ecfe2837f47d3ceb37a3260b1", "score": "0.58549", "text": "function t(e){return\"undefined\"!=typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "title": "" }, { "docid": "be21ef0ecfe2837f47d3ceb37a3260b1", "score": "0.58549", "text": "function t(e){return\"undefined\"!=typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "title": "" }, { "docid": "be21ef0ecfe2837f47d3ceb37a3260b1", "score": "0.58549", "text": "function t(e){return\"undefined\"!=typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "title": "" }, { "docid": "be21ef0ecfe2837f47d3ceb37a3260b1", "score": "0.58549", "text": "function t(e){return\"undefined\"!=typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "title": "" }, { "docid": "be21ef0ecfe2837f47d3ceb37a3260b1", "score": "0.58549", "text": "function t(e){return\"undefined\"!=typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "title": "" }, { "docid": "be21ef0ecfe2837f47d3ceb37a3260b1", "score": "0.58549", "text": "function t(e){return\"undefined\"!=typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "title": "" }, { "docid": "be21ef0ecfe2837f47d3ceb37a3260b1", "score": "0.58549", "text": "function t(e){return\"undefined\"!=typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "title": "" }, { "docid": "be21ef0ecfe2837f47d3ceb37a3260b1", "score": "0.58549", "text": "function t(e){return\"undefined\"!=typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "title": "" }, { "docid": "be21ef0ecfe2837f47d3ceb37a3260b1", "score": "0.58549", "text": "function t(e){return\"undefined\"!=typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "title": "" }, { "docid": "3af0e14d07da496d6f6e51bd922399dd", "score": "0.58506316", "text": "function is(a,b){ return (typeof a == b) ? true : false; }", "title": "" }, { "docid": "53f7d6e47a747b4d6b3ae587ab3c6787", "score": "0.58402765", "text": "function m(e,t){return typeof e===t}", "title": "" }, { "docid": "ad3223ed83f0a6b7bc2a9ef6a44c71ee", "score": "0.583947", "text": "function e(t){return\"undefined\"!==typeof Function&&t instanceof Function||\"[object Function]\"===Object.prototype.toString.call(t)}", "title": "" }, { "docid": "ad3223ed83f0a6b7bc2a9ef6a44c71ee", "score": "0.583947", "text": "function e(t){return\"undefined\"!==typeof Function&&t instanceof Function||\"[object Function]\"===Object.prototype.toString.call(t)}", "title": "" }, { "docid": "ad3223ed83f0a6b7bc2a9ef6a44c71ee", "score": "0.583947", "text": "function e(t){return\"undefined\"!==typeof Function&&t instanceof Function||\"[object Function]\"===Object.prototype.toString.call(t)}", "title": "" }, { "docid": "ad3223ed83f0a6b7bc2a9ef6a44c71ee", "score": "0.583947", "text": "function e(t){return\"undefined\"!==typeof Function&&t instanceof Function||\"[object Function]\"===Object.prototype.toString.call(t)}", "title": "" }, { "docid": "ad3223ed83f0a6b7bc2a9ef6a44c71ee", "score": "0.583947", "text": "function e(t){return\"undefined\"!==typeof Function&&t instanceof Function||\"[object Function]\"===Object.prototype.toString.call(t)}", "title": "" }, { "docid": "ad3223ed83f0a6b7bc2a9ef6a44c71ee", "score": "0.583947", "text": "function e(t){return\"undefined\"!==typeof Function&&t instanceof Function||\"[object Function]\"===Object.prototype.toString.call(t)}", "title": "" }, { "docid": "ad3223ed83f0a6b7bc2a9ef6a44c71ee", "score": "0.583947", "text": "function e(t){return\"undefined\"!==typeof Function&&t instanceof Function||\"[object Function]\"===Object.prototype.toString.call(t)}", "title": "" }, { "docid": "ad3223ed83f0a6b7bc2a9ef6a44c71ee", "score": "0.583947", "text": "function e(t){return\"undefined\"!==typeof Function&&t instanceof Function||\"[object Function]\"===Object.prototype.toString.call(t)}", "title": "" }, { "docid": "ad3223ed83f0a6b7bc2a9ef6a44c71ee", "score": "0.583947", "text": "function e(t){return\"undefined\"!==typeof Function&&t instanceof Function||\"[object Function]\"===Object.prototype.toString.call(t)}", "title": "" }, { "docid": "ad3223ed83f0a6b7bc2a9ef6a44c71ee", "score": "0.583947", "text": "function e(t){return\"undefined\"!==typeof Function&&t instanceof Function||\"[object Function]\"===Object.prototype.toString.call(t)}", "title": "" }, { "docid": "ad3223ed83f0a6b7bc2a9ef6a44c71ee", "score": "0.583947", "text": "function e(t){return\"undefined\"!==typeof Function&&t instanceof Function||\"[object Function]\"===Object.prototype.toString.call(t)}", "title": "" }, { "docid": "ad3223ed83f0a6b7bc2a9ef6a44c71ee", "score": "0.583947", "text": "function e(t){return\"undefined\"!==typeof Function&&t instanceof Function||\"[object Function]\"===Object.prototype.toString.call(t)}", "title": "" }, { "docid": "ad3223ed83f0a6b7bc2a9ef6a44c71ee", "score": "0.583947", "text": "function e(t){return\"undefined\"!==typeof Function&&t instanceof Function||\"[object Function]\"===Object.prototype.toString.call(t)}", "title": "" }, { "docid": "ad3223ed83f0a6b7bc2a9ef6a44c71ee", "score": "0.583947", "text": "function e(t){return\"undefined\"!==typeof Function&&t instanceof Function||\"[object Function]\"===Object.prototype.toString.call(t)}", "title": "" }, { "docid": "ad3223ed83f0a6b7bc2a9ef6a44c71ee", "score": "0.583947", "text": "function e(t){return\"undefined\"!==typeof Function&&t instanceof Function||\"[object Function]\"===Object.prototype.toString.call(t)}", "title": "" }, { "docid": "ad3223ed83f0a6b7bc2a9ef6a44c71ee", "score": "0.583947", "text": "function e(t){return\"undefined\"!==typeof Function&&t instanceof Function||\"[object Function]\"===Object.prototype.toString.call(t)}", "title": "" }, { "docid": "ad3223ed83f0a6b7bc2a9ef6a44c71ee", "score": "0.583947", "text": "function e(t){return\"undefined\"!==typeof Function&&t instanceof Function||\"[object Function]\"===Object.prototype.toString.call(t)}", "title": "" }, { "docid": "ad3223ed83f0a6b7bc2a9ef6a44c71ee", "score": "0.583947", "text": "function e(t){return\"undefined\"!==typeof Function&&t instanceof Function||\"[object Function]\"===Object.prototype.toString.call(t)}", "title": "" }, { "docid": "ad3223ed83f0a6b7bc2a9ef6a44c71ee", "score": "0.583947", "text": "function e(t){return\"undefined\"!==typeof Function&&t instanceof Function||\"[object Function]\"===Object.prototype.toString.call(t)}", "title": "" }, { "docid": "ad3223ed83f0a6b7bc2a9ef6a44c71ee", "score": "0.583947", "text": "function e(t){return\"undefined\"!==typeof Function&&t instanceof Function||\"[object Function]\"===Object.prototype.toString.call(t)}", "title": "" }, { "docid": "f3fccac1f6f57d14c96bfc8c929ab18f", "score": "0.58394414", "text": "function a(e){return typeof Function!==\"undefined\"&&e instanceof Function||Object.prototype.toString.call(e)===\"[object Function]\"}", "title": "" }, { "docid": "b20bc0f79fb7e2524e1ec376073afc17", "score": "0.5828471", "text": "function typeCheck(obj, type)\n{\n var res = false;\n if (typeof (type) == \"string\")\n {\n if (typeof (obj) == type)\n res = true;\n }\n else if (typeof (type) == \"function\")\n {\n if (obj instanceof type)\n res = true;\n }\n return res;\n}", "title": "" }, { "docid": "845909e38118c8e9ec3f92deb78fba31", "score": "0.57969075", "text": "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "title": "" }, { "docid": "845909e38118c8e9ec3f92deb78fba31", "score": "0.57969075", "text": "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "title": "" }, { "docid": "845909e38118c8e9ec3f92deb78fba31", "score": "0.57969075", "text": "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "title": "" }, { "docid": "845909e38118c8e9ec3f92deb78fba31", "score": "0.57969075", "text": "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "title": "" }, { "docid": "845909e38118c8e9ec3f92deb78fba31", "score": "0.57969075", "text": "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "title": "" }, { "docid": "845909e38118c8e9ec3f92deb78fba31", "score": "0.57969075", "text": "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "title": "" }, { "docid": "845909e38118c8e9ec3f92deb78fba31", "score": "0.57969075", "text": "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "title": "" }, { "docid": "845909e38118c8e9ec3f92deb78fba31", "score": "0.57969075", "text": "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "title": "" }, { "docid": "845909e38118c8e9ec3f92deb78fba31", "score": "0.57969075", "text": "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "title": "" }, { "docid": "845909e38118c8e9ec3f92deb78fba31", "score": "0.57969075", "text": "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "title": "" }, { "docid": "845909e38118c8e9ec3f92deb78fba31", "score": "0.57969075", "text": "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "title": "" }, { "docid": "845909e38118c8e9ec3f92deb78fba31", "score": "0.57969075", "text": "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "title": "" }, { "docid": "845909e38118c8e9ec3f92deb78fba31", "score": "0.57969075", "text": "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "title": "" }, { "docid": "845909e38118c8e9ec3f92deb78fba31", "score": "0.57969075", "text": "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "title": "" }, { "docid": "845909e38118c8e9ec3f92deb78fba31", "score": "0.57969075", "text": "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "title": "" }, { "docid": "845909e38118c8e9ec3f92deb78fba31", "score": "0.57969075", "text": "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "title": "" }, { "docid": "845909e38118c8e9ec3f92deb78fba31", "score": "0.57969075", "text": "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "title": "" }, { "docid": "845909e38118c8e9ec3f92deb78fba31", "score": "0.57969075", "text": "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "title": "" }, { "docid": "845909e38118c8e9ec3f92deb78fba31", "score": "0.57969075", "text": "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "title": "" }, { "docid": "845909e38118c8e9ec3f92deb78fba31", "score": "0.57969075", "text": "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "title": "" }, { "docid": "845909e38118c8e9ec3f92deb78fba31", "score": "0.57969075", "text": "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "title": "" }, { "docid": "845909e38118c8e9ec3f92deb78fba31", "score": "0.57969075", "text": "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "title": "" }, { "docid": "845909e38118c8e9ec3f92deb78fba31", "score": "0.57969075", "text": "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "title": "" }, { "docid": "845909e38118c8e9ec3f92deb78fba31", "score": "0.57969075", "text": "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "title": "" }, { "docid": "845909e38118c8e9ec3f92deb78fba31", "score": "0.57969075", "text": "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "title": "" }, { "docid": "845909e38118c8e9ec3f92deb78fba31", "score": "0.57969075", "text": "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "title": "" }, { "docid": "845909e38118c8e9ec3f92deb78fba31", "score": "0.57969075", "text": "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "title": "" }, { "docid": "845909e38118c8e9ec3f92deb78fba31", "score": "0.57969075", "text": "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "title": "" }, { "docid": "845909e38118c8e9ec3f92deb78fba31", "score": "0.57969075", "text": "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "title": "" }, { "docid": "845909e38118c8e9ec3f92deb78fba31", "score": "0.57969075", "text": "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "title": "" }, { "docid": "845909e38118c8e9ec3f92deb78fba31", "score": "0.57969075", "text": "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "title": "" }, { "docid": "845909e38118c8e9ec3f92deb78fba31", "score": "0.57969075", "text": "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "title": "" }, { "docid": "845909e38118c8e9ec3f92deb78fba31", "score": "0.57969075", "text": "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "title": "" }, { "docid": "845909e38118c8e9ec3f92deb78fba31", "score": "0.57969075", "text": "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "title": "" }, { "docid": "845909e38118c8e9ec3f92deb78fba31", "score": "0.57969075", "text": "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "title": "" }, { "docid": "845909e38118c8e9ec3f92deb78fba31", "score": "0.57969075", "text": "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "title": "" }, { "docid": "845909e38118c8e9ec3f92deb78fba31", "score": "0.57969075", "text": "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "title": "" }, { "docid": "845909e38118c8e9ec3f92deb78fba31", "score": "0.57969075", "text": "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "title": "" }, { "docid": "845909e38118c8e9ec3f92deb78fba31", "score": "0.57969075", "text": "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "title": "" }, { "docid": "845909e38118c8e9ec3f92deb78fba31", "score": "0.57969075", "text": "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "title": "" }, { "docid": "845909e38118c8e9ec3f92deb78fba31", "score": "0.57969075", "text": "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "title": "" }, { "docid": "845909e38118c8e9ec3f92deb78fba31", "score": "0.57969075", "text": "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "title": "" }, { "docid": "845909e38118c8e9ec3f92deb78fba31", "score": "0.57969075", "text": "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "title": "" }, { "docid": "845909e38118c8e9ec3f92deb78fba31", "score": "0.57969075", "text": "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "title": "" }, { "docid": "845909e38118c8e9ec3f92deb78fba31", "score": "0.57969075", "text": "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "title": "" }, { "docid": "845909e38118c8e9ec3f92deb78fba31", "score": "0.57969075", "text": "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "title": "" }, { "docid": "845909e38118c8e9ec3f92deb78fba31", "score": "0.57969075", "text": "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "title": "" }, { "docid": "845909e38118c8e9ec3f92deb78fba31", "score": "0.57969075", "text": "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "title": "" }, { "docid": "845909e38118c8e9ec3f92deb78fba31", "score": "0.57969075", "text": "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "title": "" }, { "docid": "845909e38118c8e9ec3f92deb78fba31", "score": "0.57969075", "text": "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "title": "" }, { "docid": "845909e38118c8e9ec3f92deb78fba31", "score": "0.57969075", "text": "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "title": "" }, { "docid": "845909e38118c8e9ec3f92deb78fba31", "score": "0.57969075", "text": "function t(e){return\"undefined\"!==typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}", "title": "" } ]
65a72221e94fc93df264b6638a92e74f
Retrieves the bookmarks of the specified user.
[ { "docid": "270b66c66781b002df47e8edc42214f6", "score": "0.5956664", "text": "async getUserBookmarks(baseURL, username, authToken) {\n return getUserBookmarks(client.baseURL, username, authToken);\n }", "title": "" } ]
[ { "docid": "332915e59db90f3c7e7dc70d92406c3c", "score": "0.65190965", "text": "function getProfileBookmark(req, res){\n var userId = req.params.id;\n User.getBookmarkedUser(userId).then(function(user){\n\n res.json(user)\n \n }, function(err) {\n res.json(err)\n })\n \n }", "title": "" }, { "docid": "0b3327700edbcc6af1cf6723a5331d5c", "score": "0.6097573", "text": "userBookmarks(userId, type = 'illust', restrict = 'public') {\n if (type === 'illust') {\n return this.userBookmarksIllust(userId, restrict);\n } else if (type === 'novel') {\n return this.userBookmarksNovel(userId, restrict);\n } else {\n return Promise.reject(new Error('wrong param \"type\" input'));\n }\n }", "title": "" }, { "docid": "55412f7dde5dfab313cc1d16280985cf", "score": "0.60616595", "text": "function homeBookmarkSite(req, res){\n var user = req.user;\n if(user) {\n User.getBookmarkedUser(user._id).then(function(user){\n res.json(user)\n \n }, function(err) {\n res.json(err)\n })\n } \n }", "title": "" }, { "docid": "8d633fae381fc8cf06b8ee5b414032f1", "score": "0.60485905", "text": "function showUserBookmarks() {\r\n\t\tif (TB36.O[20] != '1') return;\r\n\t\tremoveElement($g(\"userbookmarksTT\"));\r\n\t\tremoveElement($g(\"userbookmarks\"));\r\n\t\taTb = getUserBookmarksTable();\r\n\t\tif (TB36.O[71] == '0' && TB36.O[21] == '1') aTb.style.display = 'none';\r\n\t\tif (TB36.O[21] != '1') {\r\n\t\t\tparBM = $g(\"parBM\");\r\n\t\t\tif (!parBM) {parBM = $e(\"P\"); $at(parBM, [['id', 'parBM']]); TB36.nTAUb.appendChild(parBM);};\r\n\t\t\tparBM.appendChild(aTb);\r\n\t\t} else {\r\n\t\t\tuBminWidth = 215;\r\n\t\t\tvar ubXY = TB36.O[76].split(\"|\");\r\n\t\t\t$df(uBminWidth, ubXY[0], ubXY[1], T('MARCADORES'), 'userbookmarks', \"userbookmarksTT\", true).appendChild(aTb);\r\n\t\t};\r\n\t\tplayerLinks(\"userbookmarks\");\r\n\t\taTb = $g('userbookmarks');\r\n\t\tif (aTb && TB36.O[21] == '1') adjustFloatDiv(aTb, uBminWidth, \"userbookmarks\");\r\n\t\t\r\n\t\tfunction getUserBookmarksTable() {\r\n\t\t\tvar aTb = $t([['id', 'userbookmarks']]);\r\n\t\t\t//header row\r\n\t\t\tvar uHr = $r();\r\n\t\t\tuHr.appendChild(getUserBookmarksHeader());\r\n\t\t\taTb.appendChild(uHr);\r\n\t\t\t//bookmarks string\r\n\t\t\tvar strBM = getGMcookie(\"marcadores\", false);\r\n\t\t\tif (strBM == \"false\") {setGMcookie(\"marcadores\", '', false); strBM = '';};\r\n\r\n\t\t\tif (strBM != ''){\r\n\t\t\t\tmarcadores = new Array();\r\n\t\t\t\tstrBM = strBM.split(\"$$\");\r\n\t\t\t\tfor (var i = 0; i < strBM.length; i++) marcadores[i] = strBM[i].split(\"$\");\r\n\t\t\t\tfor (var i = 0; i < marcadores.length; i++) {\r\n\t\t\t\t\tbmRow = $r();\r\n\t\t\t\t\tstrBookmark = marcadores[i][0];\r\n\t\t\t\t\tif (TB36.O[82] != \"1\") {\r\n\t\t\t\t\t\tvar aDel = $a(gIc[\"del\"], [['href', jsVoid]]);\r\n\t\t\t\t\t\taDel.addEventListener(\"click\", removeGMcookieValue(\"marcadores\", i, false, showUserBookmarks, false), 0);\r\n\t\t\t\t\t\taC = $c(\"\");\r\n\t\t\t\t\t\taC.appendChild(aDel);\r\n\t\t\t\t\t\tbmRow.appendChild(aC);\r\n\r\n\t\t\t\t\t\tbmRow.appendChild($c(\"&nbsp;\"));\r\n\r\n\t\t\t\t\t\tupC = $c(\"\");\r\n\t\t\t\t\t\tif (i > 0) {aUp = $a(\"\", [['href', jsVoid]]); aUp.appendChild($img([['src', image[\"aup\"]]])); aUp.addEventListener(\"click\", moveUserBookmark(i, -1), false); upC.appendChild(aUp);};\r\n\t\t\t\t\t\tbmRow.appendChild(upC);\r\n\r\n\t\t\t\t\t\tdownC = $c(\"\");\r\n\t\t\t\t\t\tif (i < marcadores.length - 1) {var aDown = $a(\"\", [['href', jsVoid]]); aDown.appendChild($img([['src', image[\"adn\"]]])); aDown.addEventListener(\"click\", moveUserBookmark(i, 1), false); downC.appendChild(aDown);};\r\n\t\t\t\t\t\tbmRow.appendChild(downC);\r\n\t\t\t\t\t\tbmRow.appendChild($c(\"&nbsp;\"));\r\n\t\t\t\t\t\teC = $c(\"\");\r\n\t\t\t\t\t\taEdit = $a(\"\", [['href', jsVoid]]);\r\n\t\t\t\t\t\taEdit.appendChild($img([['src', image[\"editbookmark\"]], ['title', T('EDIT')]]));\r\n\t\t\t\t\t\taEdit.addEventListener(\"click\", editUserBookmark(i), false);\r\n\t\t\t\t\t\teC.appendChild(aEdit);\r\n\t\t\t\t\t\tbmRow.appendChild(eC);\r\n\t\t\t\t\t\tbmRow.appendChild($c(\"&nbsp;\"));\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\taCl = 'noact';\r\n\t\t\t\t\t\tif (marcadores[i][1] == crtPage) aCl = 'act';\r\n\t\t\t\t\t\tvar aC = $c(\"<span>&#8226;&nbsp;&nbsp;</span>\", [['class', aCl]]);\r\n\t\t\t\t\t\tbmRow.appendChild(aC);\r\n\t\t\t\t\t};\r\n\t\t\t\t\t//fr3nchlover\r\n\t\t\t\t\tif (marcadores[i][1].indexOf(\"*\") != -1) {\r\n\t\t\t\t\t\tiL = $a(strBookmark + \" \", [['href', marcadores[i][1].substring(0, marcadores[i][1].length-1)], ['target','_blank']]);\r\n\t\t\t\t\t\tiL.appendChild($img([['src', image[\"external\"]]]));\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tiL = $a(strBookmark);\r\n\t\t\t\t\t\tif (marcadores[i][1] != \"#\") $at(iL, [['href', marcadores[i][1].substring(0, marcadores[i][1].length)]]);\r\n\t\t\t\t\t};\r\n\t\t\t\t\tbmC = $c(\"\");\r\n\t\t\t\t\tbmC.appendChild(iL);\r\n\t\t\t\t\tbmRow.appendChild(bmC);\r\n\t\t\t\t\taTb.appendChild(bmRow);\r\n\t\t\t\t};\r\n\t\t\t};\r\n\t\t\treturn aTb;\r\n\r\n\t\t\tfunction getUserBookmarksHeader() {\r\n\t\t\t\tvar hText = $e(\"B\", T('MARCADORES') + ':');\r\n\t\t\t\tvar aL = new Array();\r\n\t\t\t\taL[0] = $a(\"\",[['href', jsVoid]]);\r\n\t\t\t\taL[0].appendChild($img([['src', image[\"addbookmark\"]], ['title', T('ANYADIR')]]));\r\n\t\t\t\taL[0].addEventListener(\"click\", function() {addUserBookmark();}, 0);\r\n\t\t\t\taL[1] = $a(\"\",[['href', jsVoid]]);\r\n\t\t\t\taL[1].appendChild($img([['src', image[\"addbmthispage\"]], ['title', T('ADDCRTPAGE')]]));\r\n\t\t\t\taL[1].addEventListener(\"click\", function() {addUserBookmark(window.location.href);}, 0);\r\n\t\t\t\taL[2] = $a(\"\", [['href', jsVoid]]);\r\n\t\t\t\taL[2].appendChild($img([['src', image[\"addbmspacer\"]], ['title', T('SPACER')]]));\r\n\t\t\t\taL[2].addEventListener(\"click\", function() {addGMcookieValue(\"marcadores\", [\"<hr size='2' width='100%' noshade color=darkgrey>\", \"#\"], false); showUserBookmarks();}, 0);\r\n\t\t\t\tvar dI = (TB36.O[82] != \"1\" ? [\"unlocked\" + docDir[0].substring(0, 1), '82.L', \"1\", '8'] : [\"locked\", '82.U', \"0\", '2']);\r\n\t\t\t\taL[3] = $a(\"\", [['href', jsVoid]]);\r\n\t\t\t\taL[3].appendChild($img([['src', image[dI[0]]], ['title', T(dI[1])]]));\r\n\t\t\t\taL[3].addEventListener(\"click\", function() {TB36.O[82] = dI[2]; setGMcookieV2('TB3Setup', TB36.O, 'SETUP'); showUserBookmarks(); }, false);\r\n\t\t\t\tvar hCell = $c(\"\", [['colspan', dI[3]]]);\r\n\t\t\t\thCell.appendChild(hText);\r\n\t\t\t\tfor (var i = 0; i < 4; i++) {hCell.appendChild(document.createTextNode(\" \" + (i > 0 ? '| ' : ' '))); hCell.appendChild(aL[i]);};\r\n\t\t\t\thText = null; aL = null;\r\n\t\t\t\treturn hCell;\r\n\t\t\t};\r\n\t\t};\r\n\r\n\t\tfunction addUserBookmark(ubURL) {\r\n\t\t\tif (!ubURL) {ubURL = prompt(T('UBU'), TB36.BrT); if (!ubURL || ubURL == '') return;};\r\n\t\t\tvar ubL = prompt(T('UBT'), TB36.BrT);\r\n\t\t\tif (!ubL || ubL == '') return;\r\n\t\t\taddGMcookieValue(\"marcadores\", [ubL, ubURL], false);\r\n\t\t\tshowUserBookmarks();\r\n\t\t\tubL = null;\r\n\t\t};\r\n\r\n\t\tfunction moveUserBookmark(i, updown) {\r\n\t\t\treturn function(){\r\n\t\t\t\tvar ubC = getGMcookie(\"marcadores\", false);\r\n\t\t\t\tvar arrUbC = ubC.split(\"$$\");\r\n\t\t\t\tvar tmpUb = arrUbC[i + updown];\r\n\t\t\t\tarrUbC[i + updown] = arrUbC[i];\r\n\t\t\t\tarrUbC[i] = tmpUb;\r\n\t\t\t\tubC = arrUbC.join(\"$$\");\r\n\t\t\t\tsetGMcookie(\"marcadores\", ubC, false);\r\n\t\t\t\tshowUserBookmarks();\r\n\t\t\t\tubC = null; arrUbC = null; tmpUb = null;\r\n\t\t\t};\r\n\t\t};\r\n\r\n\t\tfunction editUserBookmark(i) {\r\n\t\t\treturn function() {\r\n\t\t\t\tvar ubC = getGMcookie(\"marcadores\", false);\r\n\t\t\t\tvar arrUbC = ubC.split(\"$$\");\r\n\t\t\t\tvar tmpUb = arrUbC[i].split(\"$\");\r\n\t\t\t\tvar ubLabel = prompt(T('UBT'), tmpUb[0]);\r\n\t\t\t\tvar ubURL = null;\r\n\t\t\t\tif (ubLabel != '') ubURL = prompt(T('UBU'), tmpUb[1]);\r\n\t\t\t\tif (!ubLabel) ubLabel = tmpUb[0];\r\n\t\t\t\tif (!ubURL) ubURL = tmpUb[1];\r\n\t\t\t\tif (ubLabel != '' && ubURL != '' && (ubLabel != tmpUb[0] || ubURL != tmpUb[1])) {arrUbC[i] = ubLabel + \"$\" + ubURL; ubC = arrUbC.join(\"$$\"); setGMcookie(\"marcadores\", ubC, false); showUserBookmarks();};\r\n\t\t\t\tubC = null; arrUbC = null; utLabel = null; ubURL = null;\r\n\t\t\t};\r\n\t\t};\r\n\t}", "title": "" }, { "docid": "00290eb0dc50e8c536ad08ca61917530", "score": "0.59964895", "text": "function getBookmarks() {\n return listApiFetch(`${baseURL}`);\n}", "title": "" }, { "docid": "fb7328cd43ec2881914df40c4f27bfcc", "score": "0.5939429", "text": "function getBookmarksOfHouses() {\n getBookmarksOfUser(user).then(getBookmarksOfHousesHandler);\n\n function getBookmarksOfHousesHandler(bookmarks) {\n addBookmarksToHouses(bookmarks, vm.houses)\n }\n\n function addBookmarksToHouses(bookmarks, houses) {\n houses.forEach(function (house) {\n bookmarks.forEach(function (bookmark) {\n if (bookmark.house_id == house.id) {\n house.bookmark = true;\n house.bookmark_id = bookmark.id;\n }\n });\n });\n }\n }", "title": "" }, { "docid": "fb7328cd43ec2881914df40c4f27bfcc", "score": "0.5939429", "text": "function getBookmarksOfHouses() {\n getBookmarksOfUser(user).then(getBookmarksOfHousesHandler);\n\n function getBookmarksOfHousesHandler(bookmarks) {\n addBookmarksToHouses(bookmarks, vm.houses)\n }\n\n function addBookmarksToHouses(bookmarks, houses) {\n houses.forEach(function (house) {\n bookmarks.forEach(function (bookmark) {\n if (bookmark.house_id == house.id) {\n house.bookmark = true;\n house.bookmark_id = bookmark.id;\n }\n });\n });\n }\n }", "title": "" }, { "docid": "67d49b5cef61c36a53b8fe1e3fbcfdfd", "score": "0.5673373", "text": "function getBookmarks() {\n var db = getDatabase();\n var respath=\"\";\n db.transaction(function(tx) {\n var rs = tx.executeSql('SELECT * FROM bookmarks ORDER BY bookmarks.title;');\n for (var i = 0; i < rs.rows.length; i++) {\n // For compatibility reasons with older versions\n if (rs.rows.item(i).agent) modelUrls.append({\"title\" : rs.rows.item(i).title, \"url\" : rs.rows.item(i).url, \"agent\" : rs.rows.item(i).agent});\n else modelUrls.append({\"title\" : rs.rows.item(i).title, \"url\" : rs.rows.item(i).url, \"agent\" : \"Mozilla/5.0 (Maemo; Linux; Jolla; Sailfish; Mobile) AppleWebKit/534.13 (KHTML, like Gecko) NokiaBrowser/8.5.0 Mobile Safari/534.13\"});\n //console.debug(\"Get Bookmarks from db:\" + rs.rows.item(i).title, rs.rows.item(i).url)\n }\n })\n}", "title": "" }, { "docid": "fe35a49add70b524355b8a3d20d23c73", "score": "0.5568157", "text": "function getBookmarks(req, res) {\n\n let bookmark = new Bookmark(\"url\", \"description\");\n \n res.json([bookmark]);\n}", "title": "" }, { "docid": "6d6973cfdc4f477ea664b39be2a18d1e", "score": "0.5407506", "text": "getBookmarks(e){\n const userId = this.props.user.id;\n\n axios.get(url + `api/bookmarks/${userId}`).then(response => {\n this.setState({\n bookmarks: response.data,\n \n })\n\n \n })\n }", "title": "" }, { "docid": "7cd1b1518362b32724c40c39e3b7da9b", "score": "0.5381751", "text": "function grabUserPrefs(user, force) {\n\tif(user == null) user = G.user;\n\tif(!force && user.prefs) return user.prefs;\t\n\tvar req = new Request(FETCH_USER_PREFS, G.user.session, user.id());\n\treq.send(true);\n\tuser.prefs = req.result();\n\treturn user.prefs;\n}", "title": "" }, { "docid": "60c9a62c40edef66d1a1d3405154be18", "score": "0.53797954", "text": "function fetchBookmarks() {\n if (localStorage.getItem('bookmarks')) {\n bookmarks = JSON.parse(localStorage.getItem('bookmarks'));\n } else {\n bookmarks = [{\n name: \"Google\",\n url: \"https://google.com\"\n }];\n localStorage.setItem('bookmarks', JSON.stringify(bookmarks));\n }\n console.log(bookmarks);\n buildBookmarks();\n}", "title": "" }, { "docid": "553172f30eabba0f37b45d8594ec07e9", "score": "0.52593666", "text": "function getBookmarks() {\r\n let bookmarks = JSON.parse(localStorage.getItem('bookmarks'));\r\n\r\n if(!bookmarks) {\r\n bookmarks = [];\r\n }\r\n\r\n bookmarks.forEach(bookmark => {\r\n const markup = `<div class=\"bookmark-card\">\r\n <p>${bookmark.text}<span id=\"bookmark_id\">${bookmark.id}</span></p>\r\n <p id=\"date\">Added On: ${bookmark.date}</p>\r\n <a href=\"${bookmark.url}\" class=\"btn btn-primary\" target=\"_black\">View</a>\r\n <a href=\"#\" id=\"delete_bookmark\" class=\"btn btn-danger\">Delete</a>\r\n </div>`;\r\n\r\n bookmarkList.insertAdjacentHTML('afterbegin', markup);\r\n });\r\n\r\n}", "title": "" }, { "docid": "b95787c4df6212eaf3ad5d41b89f8815", "score": "0.51974255", "text": "function getListsByUser(userId) {\r\n return listStore.get(userId);\r\n}", "title": "" }, { "docid": "1dc9ed621af6424eaa7380556c0629cb", "score": "0.5194114", "text": "function fetchBookmarks(){\n\n if(localStorage.getItem('bookmarks')){\n bookmarks = JSON.parse(localStorage.getItem('bookmarks'));\n }else{\n // Create array and set to lacal storage\n bookmarks = [{\n name:'Mohammad Design',\n url:'test.com'\n }];\n localStorage.setItem('bookmarks',JSON.stringify(bookmarks));\n }\n buildBookmarks();\n}", "title": "" }, { "docid": "dfa73dd31dad2e8e3fc391726c1ff3fb", "score": "0.51739776", "text": "function cacheBookmarks ({data}) {\n bookmarks = data;\n return bookmarks;\n }", "title": "" }, { "docid": "b12de742742f4a6d2b69abaf483db360", "score": "0.5169472", "text": "async index (req, res) {\n const {songId, userId} = req.query\n try {\n const bookmark = await Bookmark.findOne({where: {$and: {SongId: songId, UserId: userId}}})\n if (bookmark) {\n res.json({result: bookmark})\n } else {\n res.json({result: false})\n }\n } catch (err) {\n res.status(500).json({error: 'An error occurred while getting bookmarks.'})\n }\n }", "title": "" }, { "docid": "6334305be04fd3ba7fb9245773802f74", "score": "0.5120772", "text": "function getFeedData(user, cb) {\n var userData = readDocument('users', user);\n var feedData = readDocument('feeds', userData.feed);\n // While map takes a callback, it is synchronous, not asynchronous.\n // It calls the callback immediately.\n feedData.contents = feedData.contents.map(getFeedItemSync);\n // Return FeedData with resolved references.\n return feedData;\n}", "title": "" }, { "docid": "e3ce7e6df0396b06151b9f1d7f9d8554", "score": "0.50982475", "text": "function GetBookshelf(username) {\n return lib.BookshelfJSON2Obj(bookshelf.LayRaMotTuSach(username));\n}", "title": "" }, { "docid": "bc9402a3076e3cbe9953e9320709a278", "score": "0.5083509", "text": "function getFavs(user){\n return database.query(\"SELECT hotel_id FROM favorites WHERE user_id=?\", [\"\" + user.userID])\n}", "title": "" }, { "docid": "14b7ee16f5252902b297e9784dfd0568", "score": "0.5074827", "text": "function getSavedAdsByUserId(userId, limit, offset, callback){\n let ids = [];\n if(userId === null) callback(new Error('userId cannot be null'), null);\n getUserById(userId, function(err, result){\n if(err) callback(err, null);\n else if(result.saved_ads === null || offset === null || limit === null) callback(err, null);\n const ids = result.saved_ads;\n models.Ad.find({_id: {$in: ids}}).skip(offset).limit(limit).exec(function(err, result){\n if(err) callback(err, null);\n callback(null, result);\n });\n });\n}", "title": "" }, { "docid": "458d9c818a4fe1258efaebc11c94ff60", "score": "0.5067293", "text": "function fetchBookMarks(){\n\t// Get bookmarks from localStorage (where you want to retrieve)\n\tvar bookmarks = JSON.parse(localStorage.getItem('bookmarks'));\n\n\t// Get the output id (where you want to put the bookmarks)\n\tvar bookmarksResult = document.querySelector('#bookmarksResult');\n\n\t// Build Output\n\tbookmarksResult.innerHTML='';\n\n\t// Loop through bookmarks\n\tfor (var i=0; i<bookmarks.length; i++){\n\t\tvar name = bookmarks[i].name;\n\t\tvar url = bookmarks[i].url;\n\n\t\t// Buttons to either visit or delete bookmarks\n\t\tbookmarksResult.innerHTML +=\n\t\t'<li class=\"list-group-item book\">' +\n\t\t\t\t'<h3>' + name + '</h3>' +\n\t\t\t\t'<a class=\"btn btn-success\" href=\"' +url + '\">Visit</a> ' +\n\t\t\t\t'<a class=\"btn btn-danger\" onclick=\"deleteBookmark(\\'' +url+ '\\')\" href=\"#\">Delete</a>' +\n\t\t'</li>'\t\t\t\n\t}\n}", "title": "" }, { "docid": "3ec9bcb1c36a4ff1bb9450b23badecec", "score": "0.5030646", "text": "function loadBookmarks(query) {\n var bookmarkTreeNodes = chrome.bookmarks.getTree(\n function(bookmarkTreeNodes) {\n $('#bookmarks').append(loadTreeNodes(bookmarkTreeNodes, query));\n });\n}", "title": "" }, { "docid": "39d35f6125042556d1619920319ba3eb", "score": "0.49393326", "text": "getKidsbyUser(currentUserId) {\n console.log(`http://localhost:8088/kids_users/?userId=${currentUserId}`)\n return fetch(\n `http://localhost:8088/kids_users/?userId=${currentUserId}&expand=kid`\n ).then(response => response.json());\n }", "title": "" }, { "docid": "df480bc9f012b208788de6d441136df3", "score": "0.49350584", "text": "function searchUsers(userFragment, callback) {\n GETRequest(cfg.url+'rest/api/2/user/search/?username='+userFragment)\n .auth(cfg.user, cfg.password)\n .end(function(res) {\n var users;\n if (!res.ok) return console.log(\n res.body.errorMessages.join('\\n')\n );\n users = res.body;\n callback(users);\n });\n}", "title": "" }, { "docid": "69f0978034bd15bee5a68be9b13b86a6", "score": "0.4933587", "text": "async getBookmark(cursor) {\n const matches = await this.client('bookmark').select('*').orderBy('time', 'desc').limit(1).offset(cursor);\n return new Bookmark(matches[0]);\n }", "title": "" }, { "docid": "25a90167f19f45b2745bfff8fdb97179", "score": "0.49279085", "text": "async function fetchBookmarks() {\n try {\n return AssetCache(\n `https://api.pinboard.in/v1/posts/all?format=json&auth_token=${process.env.PINBOARD_API_TOKEN}`,\n {\n duration: \"10m\",\n type: \"json\"\n }\n );\n } catch (error) {\n console.error(`Error: ${error}`);\n return [];\n }\n}", "title": "" }, { "docid": "93a7dff1cb73075c752ca01197e60265", "score": "0.49253705", "text": "getFavoriteShowsByUserId() {\n\t\tfetch(`http://localhost:3004/shows`)\n\t\t\t.then(data => data.json())\n\t\t\t.then(shows => this.setState({ shows }));\n\t}", "title": "" }, { "docid": "291d1d5424bd5a6ca78a74b80099fe4e", "score": "0.49124736", "text": "function getUserOrders(user_id, success, fail) {\n request(\"GET\", `/api/v1/order/user/${user_id}/list`, success, fail);\n}", "title": "" }, { "docid": "5e6e22094a1d5c737b1b32de55355a0d", "score": "0.4901338", "text": "getFavoriteBooks(userId) {\n this.userId = userId;\n // Check if user is in database\n const usersData = readData(usersFile);\n const userIndex = findUser(userId);\n if (userIndex < 0) return { statusCode: '402', message: 'Unauthenticated user' };\n\n // Check if user has favorite books\n if (!usersData.users[userIndex].favorites) return { statusCode: '404', message: 'Favorites not found' };\n\n // Push each favorite book to favorites book array\n const booksData = readData(booksFile);\n const favoritesArray = usersData.users[userIndex].favorites;\n let favoriteBooks = [];\n favoritesArray.forEach((fav) => {\n const bookObject = booksData.books.filter(book => book.id === fav);\n favoriteBooks = [...favoriteBooks, ...bookObject];\n });\n return { statusCode: '200', message: favoriteBooks };\n }", "title": "" }, { "docid": "dd224bf911b08af2d5d8a21bbcfb50ce", "score": "0.48970175", "text": "function getBillsByUserID(userid) {\n console.log(wsTxt + ' sending query bills by userID msg');\n ws.send(JSON.stringify({ type: 'queryByUserID', version: 1, hdrid: userid}));\n}", "title": "" }, { "docid": "3eae6da0fde93db00e41e5b89a005ecf", "score": "0.4892839", "text": "function handleMyBookmarksClick(e){\n\tclickedElement = e.currentTarget;\n\theaderIconClicked(\"my-bookmarks\");\n\n\tif(!isIconActive(clickedElement)){\n\t\tconditions.bookmarksFrom = currentUser.username;\n\t}\n\n\tdisplayFeed();\n\tresetConditions();\n}", "title": "" }, { "docid": "810578c333a8c06b97cba3cd03e89d69", "score": "0.4879635", "text": "function fetchUsers(user) {\n let ROOT_URL = \"https://api.github.com/search/users?q=\"\n fetch(`${ROOT_URL}${user}`)\n .then(res => res.json())\n .then(usersObj => {\n usersObj.items.forEach(turnUsersObjToHtml);\n });\n}", "title": "" }, { "docid": "d9319f28b68da635b8867fb4a7367e46", "score": "0.4876733", "text": "getUser(id, callback) {\n let result = {};\n return User.findByPk(id, {\n include: [\n {\n model: Folder,\n as: 'folders',\n required: false,\n where: { userId: id },\n include: [{\n model: Bookmark,\n as: 'bookmarks',\n required: false\n }] \n }\n ]\n })\n .then((user) => {\n result['user'] = user;\n console.log('USER DATA', user)\n console.log(result);\n callback(null, result) \n }) \n }", "title": "" }, { "docid": "18f55456921982f4217ece8c12e182fe", "score": "0.48744956", "text": "function getUserPreferences() {\n var userPreferences = {};\n var prefs = jsonUtils.toObject(preferences.value);\n return prefs;\n}", "title": "" }, { "docid": "7b72a1cab9cf85b59e424ddedb863540", "score": "0.48698673", "text": "getFavorites(userId, pageNumber) {\n return Favorite.find({ userId: userId }).sort({ timestamp: 'desc' }).skip((pageNumber - 1) * 10).limit(10);\n }", "title": "" }, { "docid": "ad98d92d1d65306870c7f8557151ccd9", "score": "0.48692998", "text": "function getUserData(user) {\n var githubEndpoint = 'https://api.github.com/users/' + user;\n return axios.get(githubEndpoint);\n}", "title": "" }, { "docid": "21dabb92007efb8657d1ff5ef191d1b7", "score": "0.4792599", "text": "function exportBookmarks() {\n\tvar folderName = prompt(chrome.i18n.getMessage(\"editExportPrompt\"));\n\n\t// If the cancel button was pressed\n\tif (folderName === null) {\n\t\tdocument.getElementById(\"export-button\").blur();\n\t\treturn;\n\t}\n\n\t// Default folder name if none is specified\n\tif (folderName === \"\") folderName = \"Tab Loadouts\";\n\n var totalBookmarks = 0;\n LOADOUTS.forEach(function(loadout) {\n if (loadout) totalBookmarks += loadout.links.length;\n });\n\n var folderIndex = 0;\n\tchrome.bookmarks.create({title: folderName}, function(mainFolder) {\n LOADOUTS.forEach(function(loadout, i) {\n if (!loadout) return;\n\n chrome.bookmarks.create({title: loadout.name || String(indexToLoadoutNumber(i)), index: folderIndex++, parentId: mainFolder.id}, function(loadoutFolder) {\n loadout.links.forEach(function(link, j) {\n chrome.bookmarks.create({title: loadout.titles[j], url: link, index: j, parentId: loadoutFolder.id}, function() {\n totalBookmarks--;\n if (totalBookmarks === 0) {\n // Opens a new tab at the chrome bookmarks page\n \t\tchrome.tabs.create({url: \"chrome://bookmarks\"});\n }\n });\n });\n });\n\n });\n\n\t});\n}", "title": "" }, { "docid": "976feeee05cb96f63e91b168c4dfdf2a", "score": "0.47885165", "text": "getWalletsByUserId(userId) {\n return http.get(`/wallet/${userId}`);\n }", "title": "" }, { "docid": "dd344016eb8ecb3fca86568728a044ab", "score": "0.4777029", "text": "async function fetchUserKycFaqs(userFound) {\n if (\n userFound !== null &&\n userFound !== undefined &&\n Object.keys(userFound.toJSON()).length !== 0 &&\n userFound.userKyc.status !== \"Completed\"\n ) {\n const kycCategory = await Category.findOne({ categoryName: \"KYC\" }).exec();\n return await getFaqsFromCategory(kycCategory);\n }\n return [];\n}", "title": "" }, { "docid": "8ad48876264b34211209fd611614144e", "score": "0.47735506", "text": "function loadBookmarks (allBookmarks) {\n let bookmarks = allBookmarks.allBookmarks\n for (let i = 0; i < bookmarks.length; i++) {\n browser.bookmarks.create({\n parentId: bookmarks[i].parentId,\n title: bookmarks[i].title,\n url: bookmarks[i].url\n })\n }\n\n console.log('Bookmarks inserted.')\n}", "title": "" }, { "docid": "216295f7e9fe36ef9ec3d840ccd12dfc", "score": "0.47581744", "text": "function dumpBookmarks(query) {\r\n var bookmarkTreeNodes = chrome.bookmarks.getTree(\r\n function(bookmarkTreeNodes) {\r\n $('#bookmarks').append(dumpTreeNodes(bookmarkTreeNodes, query));\r\n });\r\n}", "title": "" }, { "docid": "5b091266d6503041269d30dc428c3737", "score": "0.4750092", "text": "function follows(userId){\n var follows = [];\n data[userId].follows.forEach(x =>\n follows.push(x)\n );\n return follows;\n}", "title": "" }, { "docid": "852ce31041062dbe3fffb9f5fe0546d5", "score": "0.4735639", "text": "function getFriends() {\n\t\ttrace(\"Get Friends of logged in user\");\n\t\t\n\t\tset_ready();\n\t\t\n\t\tFB.api({\n\t\t\t\tmethod: 'friends.get'\n\t\t\t}, function(result) {\n\t\t\t\ttrace(_s.FRIENDS_GET);\n\n\t\t\t\t//trace(result);\n\t\t\t\t//inspect(result);\n\n\t\t\t\tif(!$.isArray(result))\n\t\t\t\t\tresult = [];\n\n\t\t\t\tdispatchEvent(_s.FRIENDS_GET, result);\n\t\t});\t\t\n\t}", "title": "" }, { "docid": "5f84cdbc3c4897c71dad73d2fa3cc671", "score": "0.4730572", "text": "function findByUser(id){\n return db('preferences').where('user_id', '=', id)\n}", "title": "" }, { "docid": "db6d65543d5294e9c5f5f999b1f7d0f6", "score": "0.47148016", "text": "function getDashboardsByUser(currentUser, findNameMask, finalCallback) {\n var params = {$and: []};\n\n if(findNameMask) {\n params.$and.push(\n {title : new RegExp(findNameMask, \"i\")}\n );\n }\n\n permissionsUtils.getAppObjectByUser(currentUser, Dashboard, consts.APP_ENTITY_TYPE.DASHBOARD, params, \n function(err, foundDashboards, findUserTags, findObjectTags) {\n if(err) {\n finalCallback(err, null);\n } else {\n finalCallback(null, getDashboardsByCollection(foundDashboards));\n }\n });\n\n}", "title": "" }, { "docid": "114be2a7c5b87efd7c21b6ec360df48d", "score": "0.46907645", "text": "function getBookmarkByID(bookmarkId) {\r\n return jQuery.grep(bookmarkShowcaseState.bookmarks, function (bookmark) { return bookmark.name === bookmarkId })[0];\r\n}", "title": "" }, { "docid": "782c8d3dd5192c1f56bf07cc12a9678f", "score": "0.46818832", "text": "function getReviews(userId){\n return new Promise(resolve => {\n jQuery.get(reviewURL + \"/userId/\" + userId, function(data){\n reviews = data;\n resolve();\n });\n });\n}", "title": "" }, { "docid": "57c7b71e7dd350a63aab648c5153fad7", "score": "0.46744695", "text": "function getGistsOfUser(user, callback) {\n github.gists.getFromUser({\n user: user\n }, function(err, data){\n callback(err, data);\n });\n}", "title": "" }, { "docid": "9812b7de487f4f9d7559c5fe59150e15", "score": "0.4670399", "text": "function getWaitBillsByUserID(userid) {\n console.log(wsTxt + ' sending query wait bills by userID msg');\n ws.send(JSON.stringify({ type: 'queryMyWaitBill', version: 1, edree: userid}));\n}", "title": "" }, { "docid": "e3bc028503d5c2a172e72abf3b947b48", "score": "0.4656126", "text": "function getUrlsForUserById (user) {\n let usersShorUrls = {};\n for (let shortUrl in urlDatabase) {\n if (urlDatabase[shortUrl].userID === user) {\n usersShorUrls[shortUrl] = urlDatabase[shortUrl];\n }\n }\n return usersShorUrls;\n}", "title": "" }, { "docid": "9d1b13b054b7adba12920e039096ae6b", "score": "0.4653729", "text": "function fetchBookmarks() {\n // Get bookmarks from LS\n let bookmarks = JSON.parse(localStorage.getItem('bookmarks'));\n console.log(bookmarks);\n // Build output\n bookmarksResults.innerHTML = '';\n\n // Loop through into bookmarks with for loop\n for (let i = 0; i < bookmarks.length; i++) {\n let name = bookmarks[i].name;\n let url = bookmarks[i].url;\n\n bookmarksResults.innerHTML +=\n '<div class=\"newElmt\">' +\n '<h2>' +\n name +\n '</h2>' +\n '<button><a href=' +\n url +\n ' target=\"_blank\">Visit</a></button>' +\n '<button class=\"delete\"><a onclick=\"deleteBookmark(\\'' +\n url +\n '\\')\" href=\"#\">Delete</a></button>' +\n '</div>';\n }\n}", "title": "" }, { "docid": "69fad1ec67a40b2a32f75fffa93e4b3f", "score": "0.46519923", "text": "function getStoryboardsByUser(user) {\n return new Promise((resolve, reject) => {\n mustBeInArray2(storyboards, user)\n .then(storyboard => resolve(storyboard))\n .catch(err => reject(err))\n })\n}", "title": "" }, { "docid": "ade5cb6c63429c74b1490ebb48b914b4", "score": "0.46322748", "text": "function createBookmarksList(bookmarks) {\r\n\r\n // Reset next bookmark ID\r\n bookmarkShowcaseState.nextBookmarkId = 1;\r\n\r\n // Set bookmarks array to the report's fetched bookmarks\r\n bookmarkShowcaseState.bookmarks = bookmarks;\r\n\r\n // Build the bookmarks list HTML code\r\n bookmarkShowcaseState.bookmarks.forEach(function (element) {\r\n bookmarksList.append(buildBookmarkElement(element));\r\n });\r\n\r\n // Set first bookmark active\r\n if (bookmarksList.length) {\r\n let firstBookmark = $(\"#\" + bookmarkShowcaseState.bookmarks[0].name);\r\n\r\n // Apply first bookmark state\r\n onBookmarkClicked(firstBookmark[0]);\r\n }\r\n}", "title": "" }, { "docid": "30879093f5c52344f7231d19455aeeab", "score": "0.46253633", "text": "async function getHomeFeed(user, state){\r\n\tvar idToken = await user.getIdToken();\r\n\tgetFeed(URL_SERVER + '/getHomeFeed?idToken=' + idToken, state);\r\n}", "title": "" }, { "docid": "8f2c9f18bc86f7275fa67435ed08aef4", "score": "0.46198958", "text": "get(user) {\n\t\tconsole.log(\"user: \", user);\n\t}", "title": "" }, { "docid": "e4623feac4a6e06cacd762eca80fe0d0", "score": "0.46157286", "text": "function getlistaUser(user, callback){\n callback = callback || angular.noop;\n return GetListaUser.list(user, function(data){\n return callback(data);\n }).$promise;\n }", "title": "" }, { "docid": "cddc66800a52cfc0a4354ba295b2507c", "score": "0.4597193", "text": "function getNotes(user) {\n userId = user || \"\";\n if (userId) {\n userId = \"/?user_id=\" + userId;\n }\n $.get(\"/api/notes\" + userId, function (data) {\n console.log(\"Notes\", data);\n notes = data;\n if (!notes || !notes.length) {\n displayEmpty(user);\n }\n else {\n initializeRows();\n }\n });\n }", "title": "" }, { "docid": "4f23ff547aa8a431a04fdb6a25dea1be", "score": "0.45950955", "text": "getByUserId(userId) {\n // verify required parameter 'userId' is not null or undefined\n if (userId === null || userId === undefined) {\n throw new Error('Required parameter userId was null or undefined when calling getByUserId.');\n }\n let queryParameters = {};\n if (userId !== undefined)\n queryParameters['userId'] = userId;\n let headerParams = this.defaultHeaders;\n let isFile = false;\n let formParams = {};\n return this.execute('GET', '/api/user/v1/account/get-by-user-id', queryParameters, headerParams, formParams, isFile, false, undefined);\n }", "title": "" }, { "docid": "fe0adb5ce680097ea38399247f72b1eb", "score": "0.45944074", "text": "function handleGotBookmark( bookmarks ) {\n console.log(bookmarks);\n\n var prm_l_windows = browser.windows.getAll({\n populate: true,\n windowTypes: [\"normal\"]\n });\n var prm_got_windows = prm_l_windows.then( handleGotWindows, reportError);\n\n var d_contexts_urls = {};\n G_s_root_bookmark_id = bookmarks[0].id;\n console.log(`G_s_root_bookmark_id: ${G_s_root_bookmark_id}`);\n for (let o_context in bookmarks[0].children) {\n if (o_context.children) {\n for (let o_tab in o_context.children) {\n if (! d_contexts_urls[o_context.title] ) {\n d_contexts_urls[o_context.title] = [];\n }\n d_contexts_urls[o_context.title] += [o_tab.url]\n }\n }\n }\n\n prm_got_windows.then( (d_windows_urls, d_contexts_urls) => compareWindowsToContexts(d_windows_urls, d_contexts_urls) )\n .then( l_diffs => createBM(l_diffs) );\n}", "title": "" }, { "docid": "e9a26be68590b66f669b687abb340286", "score": "0.45839113", "text": "function listMarkers(logUser){\n //find in user id for the user logged in\n db.users.where(\"username\").equals(logUser).first().then\n (function (thisUser) {\n var userId = JSON.stringify(thisUser.userId);\n //find where user located\n db.locations.where(\"userId\")\n .equals(userId)\n .first().then(function(drawing){\n //find user drawing\n getDrawings(drawing);\n })\n })\n}", "title": "" }, { "docid": "0068f60b539d03b0c9b750f4bd971741", "score": "0.45660394", "text": "getRequests(user, callback) {\n this.pool.getConnection((err, connection) => {\n if (err) {\n callback(err);\n return;\n }\n connection.query(\n \"SELECT friends.user AS email, user.nombre AS nombre, user.img AS img, friends.state AS state \" +\n \"FROM user LEFT JOIN friends ON friends.user = user.email \" +\n \"WHERE friends.friend = ? AND friends.state = 'pedida'\",\n [user],\n (err, rows) => {\n if (err) {\n callback(err);\n return;\n }\n connection.release();\n if (rows.length === 0) {\n callback(null, undefined);\n } else {\n callback(null, rows);\n }\n }\n );\n });\n }", "title": "" }, { "docid": "89a687f2337b3cf12fead7fa411c9351", "score": "0.4564446", "text": "function singleUserBookings(req, res) {\n return _booktable2.default.find({ 'user': req.user._id }, {}).populate('user', '-salt -password').exec().then(respondWithResult(res)).catch(handleError(res));\n}", "title": "" }, { "docid": "30846bd5cb9304f561f701e35971f134", "score": "0.4533374", "text": "function urlsForUser(userId) {\n var urlsUserList = {};\n for (const shortURL in urlDatabase) {\n if (urlDatabase[shortURL].userId === userId) {\n urlsUserList[shortURL] = urlDatabase[shortURL]\n }\n }\n return urlsUserList;\n}", "title": "" }, { "docid": "516a679d9c60ccc92b24fd3fddab2c46", "score": "0.45323172", "text": "function getReference(user) {\n var result;\n connection.query('SELECT * FROM citations WHERE user = ?', [user], function(err, rows) {\n if (err) throw err;\n if (rows)\n result = JSON.stringify(rows);\n });\n return result;\n}", "title": "" }, { "docid": "c92bce4d4dc2dcba6453f10729eb275c", "score": "0.45323092", "text": "static findAllByUserId(user_id) {\n var rows = helpers.getRows('SELECT * FROM blog WHERE user_id = ?', [user_id])\n return rows\n }", "title": "" }, { "docid": "f94c93454eb0142a1987ce0044bd256d", "score": "0.45319223", "text": "function getRepositories(user) {\r\n getRepositories(user.gitHubUsername, getCommits);\r\n}", "title": "" }, { "docid": "6761520310dda2faff9a3bfb0f6b2caa", "score": "0.45312193", "text": "async function getOtherUsersFavorites(userId){\n const query = \"SELECT DISTINCT b.bname AS 'Band' FROM Bands b JOIN Favorites f ON f.band_id = b.bid JOIN `User` u ON u.uid = f.uid WHERE u.uid IN (SELECT u.uid FROM `User` u2 JOIN Favorites f2 ON f2.uid = u2.uid JOIN Bands b2 ON b2.bid = f2.band_id WHERE u2.uid != ? AND b2.bname IN (SELECT b2.bname FROM `User` u3 JOIN Favorites f3 ON f3.uid = u3.uid JOIN Bands b3 ON b3.bid = f3.band_id WHERE u3.uid = ?)) AND b.bname NOT IN (SELECT b4.bname FROM `User` u4 JOIN Favorites f4 ON f4.uid = u4.uid JOIN Bands b4 ON b4.bid = f4.band_id WHERE u4.uid = ?);\";\n try {\n const [rows] = await conn.execute(query, [userId, userId, userId]);\n return rows;\n } catch (err) {\n console.error(err);\n return [];\n }\n }", "title": "" }, { "docid": "70293943d166c42112bfe2e86fd1f425", "score": "0.45306745", "text": "getAllMaintainace(userId){\r\n console.log(userId)\r\n console.log(\"All users being called\")\r\n return axios.get(`${USER_AP_URL}/${userId}/maintainance`)\r\n }", "title": "" }, { "docid": "b095384ec9af43d21336d7d3741bb3ac", "score": "0.453022", "text": "static async getForCheckout(userId) {\n const bucket = await this.where({ id_users: userId, status_bucket: BucketStatus.ADDED }).fetch({\n withRelated: ['promo', 'items.product', 'items.shipping'],\n });\n if (!bucket) throw getBucketError('bucket', 'not_found');\n return bucket;\n }", "title": "" }, { "docid": "a27d7183130b5ce2465bf183de091b25", "score": "0.45283243", "text": "async getItemsUser(userId) {\n return await firebase\n .firestore()\n .collection(\"offers\")\n .where(\"user\", \"==\", userId)\n .get();\n }", "title": "" }, { "docid": "08354782c88d573bb885efc674e2cc55", "score": "0.4526164", "text": "function getIDs(user_id, callback) {\n\n T.get('application/rate_limit_status', function(e, status) {\n\n // if error, fire callback immediately\n if (e) {\n callback(e, {});\n return null;\n }\n\n // get current follower id rate status\n var status = status.resources.friends['/friends/ids'];\n\n // if necessary, defer collection of ids until rate reset\n wait(status, function() {\n // once rate limit reset, collect ids\n T.get(\n 'friends/ids',\n { user_id: user_id },\n function (err, data, resp) {\n callback(err, {\n \"user\" : user_id,\n \"friends\" : data && data.ids || []\n });\n }\n ); // T.get('friends/ids', ...)\n\n }); // wait(...)\n\n }); // T.get('application/rate_limit_status', ...)\n\n }", "title": "" }, { "docid": "902b5cc1272c5955206fa69097a10a0b", "score": "0.45163348", "text": "function GetUser() {\n\n\tvar client = new SpiderDocsClient(SpiderDocsConf);\n\n\tclient.GetUser('administrator', 'Welcome1')\n\t\n .then(function (user) {\n debugger;\n console.log(user);\n });\n}", "title": "" }, { "docid": "a965845cc92ca65357a71a0a944850f7", "score": "0.451596", "text": "function get_users(){\r\n const q = datastore.createQuery(USER);\r\n return datastore.runQuery(q).then( (entities) => {\r\n var result = entities[0].map(ds.fromDatastore);\r\n return result; \r\n });\r\n}", "title": "" }, { "docid": "7926894d233e221517ad9008cdc2c5ee", "score": "0.45131242", "text": "function urlsForUser(userId) {\n let userUrlsCollection = [];\n for (let shortUrl in urlDatabase) {\n if (userId === urlDatabase[shortUrl].userId) {\n userUrlsCollection.push(urlDatabase[shortUrl]);\n }\n }\n return userUrlsCollection;\n}", "title": "" }, { "docid": "9921cbf2ac75f94f66835fdd394505e5", "score": "0.45103395", "text": "getFavoriteKeys() {\n\t\treturn apiFetch(\n\t\t\t{\n\t\t\t\tpath: '/vtblocks/v1/layouts/favorites',\n\t\t\t\tmethod: 'GET',\n\t\t\t}\n\t\t).then(\n\t\t\tfavorite_keys => {\n\t\t\t\treturn favorite_keys;\n\t\t\t}\n\t\t).catch(\n\t\t\terror => console.error( error )\n\t\t);\n\t}", "title": "" }, { "docid": "0995b13c7d72d35ba5b75266e582e181", "score": "0.4507058", "text": "fetchUserBinaries(user_id) {\n return store.dispatch(fetchUserBinaries(user_id));\n }", "title": "" }, { "docid": "d0b9eeaac9c1f7b12baa7ffc00011e8f", "score": "0.4493821", "text": "function getHighlights(userId, callback) {\n return fetch('' + _Constants.HIGHLIGHTS_API + userId + '/highlights_tray/', {\n accept: 'application/json',\n credentials: 'include'\n }).then(checkStatus).then(parseJSON).then(callback);\n}", "title": "" }, { "docid": "93066af210169e31394fcb158f68f649", "score": "0.44926608", "text": "'kenniscentrum.getFavorites'(userId) {\n check(userId, String)\n const user = Meteor.users.findOne({_id: userId})\n\n const files = Files.find({_id: {$in: user.favoriteFiles}}, {\n transform: null,\n fields: {\n _id: 1,\n fileName: 1,\n fileType: 1,\n fileUrl: 1,\n folderId: 1\n }\n }).fetch()\n const folders = Folders.find({_id: {$in: user.favoriteFolders}}, {\n transform: null,\n fields: {\n _id: 1,\n folderName: 1,\n parentFolder: 1,\n folderId: 1\n }\n }).fetch()\n const result = files.concat(folders)\n return result\n }", "title": "" }, { "docid": "b55585b52ff1cd573b570edc3fc4cee8", "score": "0.44905627", "text": "function printFavorites(userFavorites) {\n\tvar div = document.getElementById('saved');\n\tdiv.innerHTML = '';\n\n\tfor (var i = 0; i < userFavorites.gistLinks.length; i++) {\n\t\tvar ul = document.createElement('ul');\n\t\tvar li = document.createElement('li');\n\t\tvar a = document.createElement('a');\n\t\tvar link = userFavorites.gistLinks[i].url;\n\t\ta.setAttribute('href', link);\n\t\ta.innerHTML = userFavorites.gistLinks[i].anchorText;\n\t\tli.appendChild(a);\n\t\tul.appendChild(li);\n\t\tdiv.appendChild(ul);\n\t}\n\tfavButtons();\n}", "title": "" }, { "docid": "88036108848a0eea7545b78d4f7a86e3", "score": "0.44874042", "text": "fetchByUser(userId) {\n\t\t\treturn FruitRating.collection().query(qb => {\n\t\t\t\tqb.where('user_id', userId);\n\t\t\t\tqb.orderBy('created_at', 'desc');\n\t\t\t}).fetch({\n\t\t\t\twithRelated: [\n\t\t\t\t\t'fruit'\n\t\t\t\t]\n\t\t\t});\n\t\t}", "title": "" }, { "docid": "45c90a8e342493419c235817e3e3dceb", "score": "0.4483087", "text": "function getStick(userId, stickId){\n\t\t\t\n\t\tvar invocationData = {\n\t\t\tadapter : 'StickerStore',\n\t\t\tprocedure : 'getStick',\n\t\t\tparameters : [userId, stickId]\n\t\t};\n\n\t\tWL.Client.invokeProcedure(invocationData,{\n\t\t\tonSuccess : getStickSuccess,\n\t\t\tonFailure : getStickFailure\n\t\t});\n\t}", "title": "" }, { "docid": "f4400911ab9784cc99b943d6a996339d", "score": "0.44773766", "text": "function getFavorites(username){\n\t$.ajax({\n\t url: Url+'/getfavs?Username='+username,\n\t type: \"GET\",\n\t success: listFavorites,\n\t error: displayError,\n\t})\n}", "title": "" }, { "docid": "b896d9e5e924def2657c03e98e6a9368", "score": "0.44773224", "text": "function getUrlsForUser(userId){\n let urls = {};\n for(let key in urlDatabase){\n if(urlDatabase[key].userID===userId){\n urls[key] = {\n \"shortURL\": urlDatabase[key].shortURL,\n \"longURL\": urlDatabase[key].longURL\n }\n }\n }\n return urls;\n}", "title": "" }, { "docid": "6be0527c97986fdfead1686b350d62cf", "score": "0.4475705", "text": "function getSingleUser(userFragment, callback) {\n var request = 'Found multiple users, choose one by typing a number and hitting return';\n searchUsers(userFragment, function(users) {\n if (users.length <= 1) {\n callback(users[0]);\n }\n else if (users.length > 1) {\n users.forEach(function(u, i) {\n console.log((i + 1) + ' ' + formatUser(u));\n });\n askFor([request], function(results) {\n var userIndex = parseInt(results[request], 10) - 1;\n if (!(userIndex in users)) {\n return console.log('Invalid user selection.');\n }\n callback(users[userIndex]);\n });\n }\n });\n}", "title": "" }, { "docid": "c61d66e1d2ec264216af34d3f623c6c7", "score": "0.44704878", "text": "function loadDashboard(bz, user) {\n return cache(fetchAll, {maxAge: 1000 * 60 * 2})(bz, user);\n}", "title": "" }, { "docid": "a92e11c84f853dc51395df085a867bfc", "score": "0.44624907", "text": "function getCoachUser(user_param) {\n\n var url_params = 'user_id=' + user_param;\n\n $http.get('http://localhost:3000/api/v1' + '/users?' + url_params)\n .then(success, error);\n\n // success\n function success(resp) {\n console.log('User result: ', resp);\n $scope.users = resp.data.data;\n }\n // error\n function error(resp) {\n console.log(resp);\n }\n }", "title": "" }, { "docid": "e4ce916ea41db494378e949a1622b35f", "score": "0.44579306", "text": "function LoadList (callback) {\n\t// query {\"user.id\":1}\n\tgetByUserId(UserId, function(data){\n\t\tUserId = data._id;\n\t\tcallback(data);\n\t});\n}", "title": "" }, { "docid": "4c019f1a64af084ca8a6d92824b16349", "score": "0.44534728", "text": "function getAll(callback){\n $.ajax({\n url: \"http://localhost:3000/rest/bookmarks\",\n complete: function(data){\n callback(data.responseJSON);\n }\n });\n}", "title": "" }, { "docid": "8c2ecad1a4a3fba7d023311763e5590a", "score": "0.44504017", "text": "getUser(user) {\n // get user's information\n fetch(`https://api.github.com/users/${user}?client_id=${this.client_id}&client_secret=${this.client_secret}`)\n .then((res) => {\n return res.json();\n })\n .then((data) => {\n if (data.message === 'Not Found') {\n // show alert\n UI.showAlert();\n } else {\n // show profile\n UI.showProfile(data);\n }\n });\n // get user's repos\n fetch(`https://api.github.com/users/${user}/repos?per_page=${this.repos_count}&sort=${this.repos_sort}?client_id=${this.client_id}&client_secret=${this.client_secret}`)\n .then((res) => {\n return res.json();\n })\n .then((data) => {\n UI.showRepos(data);\n });\n }", "title": "" }, { "docid": "dca039703dc8f2804327a8ea44cb306b", "score": "0.44501817", "text": "async function getActiveShelfBookmark() {\n\n // try-catch wrapper to make Chrome happy\n try {\n console.log(`getActiveShelfBookmark`);\n\n let found = false;\n let children = await browser.bookmarks.getChildren(SHELVES_ROOT_ID);\n if (children.length) {\n for (let item of children) {\n // console.log(` ${item.title} ${item.id} ${item.parentId}`);\n if (item.type === \"bookmark\" && item.url === BOOKMARK_URL) {\n // found:\n return item.title\n }\n }\n }\n if (!found) {\n // console.log(` Could not find an active shelf`);\n return\n }\n\n } catch (error) {\n console.error(`An error occurred during getActiveShelfBookmark: ${error.message}`);\n }\n}", "title": "" }, { "docid": "5a97ba0ace63fdcb2b192d3c3ede995d", "score": "0.44434607", "text": "function loadBookmarks(){\n\tHeadingArray = getBookmarkHeadingArray();\n\tURLArray = getBookmarkURLArray();\n\t//deleting all bookmarks\n\tvar mainBookmarksDisplay = document.getElementById(\"bookmarks\");\n\twhile (mainBookmarksDisplay.hasChildNodes()) {\n mainBookmarksDisplay.removeChild(mainBookmarksDisplay.lastChild);\n }\n\tfor(var i = 0; i<HeadingArray.length; i++){\n\t displayBookmark(HeadingArray[i],URLArray[i]);\n\t}\n}", "title": "" }, { "docid": "6170da2a05a395148b205092a28b9e3c", "score": "0.44334888", "text": "function retrieveBookmark(url,bookmarkId) {\n //console.log(\"Bookmark found at ID: \"+bookmarkId+\" with url: \"+url);\n bkmkurl=url;\n bkmkid=bookmarkId;\n chrome.notifications.create(\"opensaved\",\n { \n type: 'basic',\n iconUrl: 'icon.png',\n title: \"You opened a bookmark!\",\n message: \"Would you like to open the saved version of this bookmark?\",\n buttons: [{\n title: \"Yes!\"\n }, {\n title: \"No!\"\n }],\n isClickable: true,\n requireInteraction: true\n\n }\n );\n}", "title": "" }, { "docid": "43bcd8722086900ad81f6dd6731c1a69", "score": "0.44305313", "text": "function getUserLists() {\n Follow.get({follower_id: AuthService.getUserId()})\n Vouch.get({voucher_id: AuthService.getUserId()})\n }", "title": "" }, { "docid": "1c1d23d06db6bc665ff61836c495989a", "score": "0.4425453", "text": "function urlsForUser(user_id) {\n let urls = {};\n for (shortURL in urlDatabase) {\n if (user_id === urlDatabase[shortURL].userID) {\n urls[shortURL] = urlDatabase[shortURL];\n }\n }\n return urls;\n}", "title": "" }, { "docid": "76a97f35c53d3bb6e46bf726292f3f58", "score": "0.4425272", "text": "function getFromStorage(){\n chrome.storage.sync.get(\"data\", function(theData){\n console.log(\"Value of the theData\", theData);\n console.log(\"Value of the theData.data\", theData.data);\n if (theData.data != undefined){\n bookmarks = theData.data;\n }\n console.log(\"The bookmarks variable updated from the storage\",\n bookmarks);\n });\n}", "title": "" }, { "docid": "eea480949800a959ee62bb7030caa303", "score": "0.44184154", "text": "function getAllSharedForUser(db, user_email, callback) {\n console.log('Attempting to get all the SHARED Rules for a User (' + user_email + ')!');\n\n getForUser(db, user_email, true, callback);\n}", "title": "" }, { "docid": "7c417cb3a4a72883f0b9ab2bd6a7b60b", "score": "0.44168192", "text": "function getAvailableArtItemsForUser(userId) {\n var deferred = $q.defer();\n $http\n .get(\"/api/project/user/\" + userId +\"/art\")\n .success(function(response) {\n deferred.resolve(response);\n });\n return deferred.promise;\n }", "title": "" }, { "docid": "fa2d7d9986c1ada234d250ba4aae918b", "score": "0.4408742", "text": "function getUserData(){\n $http.get(\"http://34.216.149.88:5001/SemanticApi/getUserDetails?userId=\" + $scope.userId).success(function(res) {\n\t$scope.placesList = res.resultList[0].visitedPlaces;\n\tconsole.log($scope.placesList);\n\n }).error(function(error) {\n console.error(error);\n })\n }", "title": "" }, { "docid": "9f8692f13a563d35c3a3d1e751f70eaf", "score": "0.440678", "text": "function getUserData() {\n app.get(\"api/user/:id\", function(data) {\n db.bank\n .findAll({\n include: [db.userRoutes]\n })\n .then(function(dbUser) {\n res.json(dbUser);\n });\n });\n }", "title": "" } ]
e9240a499d06a2478720f9e5d17e3e8d
deletes all posts and replies from a single user can be used in deletion of a user to ensure all their posts/replies are cleared.
[ { "docid": "51cd4e27dbf6b8cbcbac16d7286e565d", "score": "0.75923", "text": "function deleteAllPostsRepliesByUser(user) {\n const posts = getAllPosts();\n Object.keys(posts).forEach((key) => {\n if (posts[key].user === user) {\n posts[key].deleted = true;\n delete posts[key].user;\n delete posts[key].postDate;\n delete posts[key].title;\n delete posts[key].postContent;\n delete posts[key].imageName;\n }\n Object.keys(posts[key].replies).forEach((k) => {\n if (posts[key].replies[k].user === user) {\n posts[key].replies[k].deleted = true;\n delete posts[key].replies[k].user;\n delete posts[key].replies[k].postDate;\n delete posts[key].replies[k].content;\n }\n });\n });\n setPosts(posts);\n}", "title": "" } ]
[ { "docid": "b6a41f5ba34c4024a7102844590b32da", "score": "0.6712816", "text": "function deleteEntries(user_id){\n\tEntry.remove({\"user_id\":user_id}, function(err) {\n\t\tif(err) console.log(err);\n\t});\n\tUser.update({\"_id\":user_id}, {\"entries\":[]},function(err, response){\n\t\tif(err) console.log(err);\n\t})\n}", "title": "" }, { "docid": "1326208d9c4a90915c6d5fb478bc4e28", "score": "0.6665598", "text": "removeReviewUser() {\n this.__reviewUser.remove();\n this.__reviewUser = undefined;\n }", "title": "" }, { "docid": "7c7d688f8d40f70015f4e032d1b71e8c", "score": "0.65596455", "text": "async deleteAnswersByUser (userKey) {\n const answers = await this.getAnswersByUser(userKey)\n for (let i = 0; i < answers.length; i++) {\n await this.deleteAnswer(answers[i]._key)\n }\n }", "title": "" }, { "docid": "01e28d2146d43193e6618a24d9845387", "score": "0.6503697", "text": "function destroyUser() {\n auth.$unauth(); \n }", "title": "" }, { "docid": "01ebd08193223e2128e7f3792f2aff54", "score": "0.6424483", "text": "deleteUser(user) {\n users = users.filter(u=> {\n return u.email !== user.email;\n });\n }", "title": "" }, { "docid": "81823d74a21aaba1a953c563b91e36ab", "score": "0.64049184", "text": "function DeleteAllMobActionFootprintsForUser(user) {\n var promise = new Parse.Promise();\n\n var mobActionFootprintQuery = new Parse.Query(\"MobActionFootprint\");\n mobActionFootprintQuery.equalTo(\"user\", user);\n mobActionFootprintQuery.find(\n\tfunction(results) {\n\t Parse.Object.destroyAll(results).then(\n\t\tfunction() {\n promise.resolve();\n\t\t},\n\t\tfunction(error) {\n\t\t promise.reject(error);\n\t\t}\n\t );\n\t},\n\tfunction(error) {\n promise.reject(error);\t\t\n\t}\n );\n\n return promise;\n}", "title": "" }, { "docid": "30002419c716dac2ea1c5745d77de19a", "score": "0.6376937", "text": "delete({ user }, res) {\n\t\t\tuser.isDeleted = true;\n\t\t\tuser.save((err) => {\n\t\t\t\tif(err) throw err;\n\t\t\t\tres.sendStatus(204);\n\t\t\t});\n\n\t\t}", "title": "" }, { "docid": "9df5e6ac09af248b88b609f24e8b7dac", "score": "0.6344797", "text": "delete({ user }, res) {\n\t\tusers.splice(users.indexOf(user), 1);\n\t\tres.sendStatus(204);\n\t}", "title": "" }, { "docid": "e4e5850201e06bdd1b54345f54df5317", "score": "0.6314833", "text": "delete({ user }, res) {\n user.del().then((status) => {\n res.sendStatus(204);\n });\n }", "title": "" }, { "docid": "f791fa2e7517589204c01a57f773bf00", "score": "0.62884843", "text": "function delPost(user, id) {\n\tvar urlD = \"/deletePost?userName=\" + user + \"&postId=\" + id;\n\t$.ajax({\n\t\turl: urlD,\n\t\ttype: \"DELETE\",\n\t\tdataType: \"JSON\",\n\t\tsuccess: function(response) {\n\t\t\t// $('#post' + user + id).remove();\n\t\t\twindow.location.reload();\n\t\t},\n\t\terror: function(xhr){\n\t\t\talert(xhr.responseText);\n\t\t}\n\t});\n}", "title": "" }, { "docid": "51a323fd2c1f4f3981a78279d58b0556", "score": "0.62854224", "text": "function destroyPost(id, body) {\n const destroyPost = {\n id: id,\n user_id: body.user_id,\n }\n return store.destroyPost(TABLA, destroyPost);\n }", "title": "" }, { "docid": "ea7cb2cd0f6630734beab31768a04c89", "score": "0.6237342", "text": "deleteThisUser() {\n this.user.remove(this.props.user.user._id)\n }", "title": "" }, { "docid": "a1a53cd977da21e2dfd5803ddded884a", "score": "0.6230483", "text": "removeUser(user) {\n const mentorID = Users.getID(user);\n this._collection.remove({ mentorID });\n }", "title": "" }, { "docid": "0c25e723bd6b49f23cce7f691c782abd", "score": "0.6224958", "text": "async delete(req, res) {\n // Deletion of all user and role bindings\n await models.UserRole.destroy({ where: { userId: req.params.id }, raw: true });\n // Deletion of all provinces belongs to the user\n await models.UserProvince.destroy({ where: { userId: req.params.id }, raw: true });\n // Deletion of a user\n models.User.destroy({ where: { id: req.params.id } })\n // Succeeded\n .then(() => { res.sendStatus(200); })\n // Failed\n .catch(error => res.status(502).json(error));\n }", "title": "" }, { "docid": "76e98963f45c2b79ec50b1492f51b43a", "score": "0.62216187", "text": "destroy(req, res) {\n User.findByIdAndRemove(req.params.id, function(err, user) {\n if (err) return perf.ProcessResponse(res).send(500, err);\n return perf.ProcessResponse(res).send(204);\n });\n }", "title": "" }, { "docid": "687cdc6622e42f37fe5963c1509c5b12", "score": "0.6212421", "text": "deleteProfile(userId) {\n console.log(\"User Id issssssssssss........\" + userId);\n return new Promise(async (resolve, reject) => {\n var res = {\n success: false\n }\n try {\n Users.findOne({\n where: {\n id: userId,\n deletedAt: null\n }\n }).then(async user => {\n if (user) {\n\n Answer.destroy({\n where: {\n [Op.or]: [{ userId: userId }, { matchId: userId }]\n }\n }).catch(err => {\n console.log(\"unable to delete ANSWERS !\")\n })\n\n Matches.destroy({\n where: {\n [Op.or]: [{ fromId: userId }, { toId: userId }]\n }\n }).catch(err => {\n console.log(\"UNABLE TO DELETE MATCHES !\")\n })\n\n Chat.destroy({\n where: {\n [Op.or]: [{ from_id: userId }, { to_id: userId }]\n }\n }).catch(err => {\n console.log(\"UNABLE TO DELETE CHATS\")\n })\n\n tokenRecords.destroy({\n where: {\n userId: userId\n }\n }).catch(err => {\n console.log(\"UNABLE TO DELETE TOKEN RECORDS\")\n })\n\n usersPurchases.destroy({\n where: {\n userId: userId\n }\n }).catch(err => {\n console.log(\"UNABLE TO DELETE USER PURCHASES\")\n })\n\n Swipecounter.destroy({\n where: {\n userId: userId\n }\n }).catch(err => {\n console.log(\"UNABLE TO DELETE SWIPES\")\n })\n\n CallRequests.destroy({\n where: {\n [Op.or]: [{ fromId: userId }, { toId: userId }]\n }\n }).catch(err => {\n console.log(\"UNABLE TO DELETE CALLREQUESTS\")\n })\n\n Reactions.destroy({\n where: {\n [Op.or]: [{ fromId: userId }, { toId: userId }]\n }\n }).catch(err => {\n console.log(\"UNABLE TO DELETE REACTIONS\")\n })\n\n Login.destroy(\n {\n where:\n {\n userId: userId\n }\n }).catch(err => {\n console.log(\"UNABLE TO DELETE LOGINS\")\n })\n\n Peoples.destroy({\n where:\n {\n userId: userId\n }\n }).catch(err => {\n console.log(\"UNABLE TO DELETE PEOPLES\")\n })\n\n Image.destroy({\n where:\n {\n userId: userId\n }\n }).catch(err => {\n console.log(\"UNABLE TO DELETE IMAGES\")\n })\n\n Otp.destroy({\n where:\n {\n userId: userId\n }\n }).catch(err => {\n console.log(\"UNABLE TO DELETE OTP DATA\")\n })\n\n\n Reports.destroy({\n where: {\n [Op.or]: [{ reportedBy: userId }, { reportedFor: userId }]\n }\n }).catch(err => {\n console.log(\"UNABLE TO DELETE REPORTS\")\n })\n\n\n Selfies.destroy(\n {\n where:\n {\n userId: userId\n }\n }).catch(err => {\n console.log(\"UNABLE TO DELETE SELFIES\")\n })\n\n Subscription.destroy(\n {\n where:\n {\n userId: userId\n }\n }).catch(err => {\n console.log(\"UNABLE TO DELETE \")\n })\n\n\n Users.destroy({\n where:\n {\n id: userId\n }\n }).then(lastuser => {\n res.message = \"USER PROFILE DELETED SUCCESFULLY\"\n resolve(res)\n }).catch(err => {\n console.log(\"Unable to delete Users data\", err)\n // res.error = err\n reject(res)\n })\n\n } else {\n res.message = 'User Profile not found.'\n reject(res)\n }\n }).catch(err => {\n res.message = 'Something went wrong 1.'\n // res.error = err\n console.log(\"Error issssssss................\" + err)\n reject(res)\n })\n } catch (err) {\n res.message = 'Something went wrong 2.'\n // res.error = err\n reject(res)\n }\n })\n }", "title": "" }, { "docid": "6f18917cda47eea3d2608e2020e9ba19", "score": "0.61611485", "text": "function deleteUser(userId) {\n return Person.remove({_id: userId});\n }", "title": "" }, { "docid": "db30f564fbe4f35848a3c262b64c827b", "score": "0.61128414", "text": "deleteUserActions(userId) {\n this.database.collection(\"posts\").where(\"userId\", \"==\", userId).get()\n .then((querySnapshot) => {\n querySnapshot.forEach((doc) => {\n //deletes own posts of user\n this.storage.ref().child(doc.id).delete();\n doc.ref.delete();\n });\n this.database.collection(\"posts\").where(\"favourites\",\n \"array-contains\", userId).get().then((querySnapshot) => {\n querySnapshot.forEach((doc) => {\n let fav = doc.data().favourites;\n for (let i = 0; i < fav.length; i++) {\n if (fav[i] === userId) {\n //removes favouring of user, who deletes account\n fav.splice(i, 1);\n }\n }\n //updates list of users, who favoured this specific post\n doc.ref.update({\n favourites: fav,\n });\n });\n this.notifyAll(new Event(Config.FIREBASE_DB.EVENT\n .POST_DELETED));\n });\n }).catch(() => {\n sendError(this, Config.FIREBASE_DB.DB_POSTS_DELETION_FAIL);\n });\n }", "title": "" }, { "docid": "c8ae7299a06edbaa2164a74b217ebe96", "score": "0.61072856", "text": "function deleteUser(user) {\n ref\n // similar to addUser, we delete a user from our FSDB using the .doc() method\n .doc(user.id)\n .delete()\n .catch((err) => {\n console.error(err)\n });\n }", "title": "" }, { "docid": "bbf3de8a63d234a66f8319ff302be6b6", "score": "0.6098316", "text": "function del(req, res) {\n User.where('id', req.params.id)\n .destroy()\n .then((deletedUser) => {\n res.status(200).json({ success: 'User has been deleted' });\n });\n}", "title": "" }, { "docid": "5160c4869ce4d11e10d99e6d698dd8aa", "score": "0.6088404", "text": "function delete_users() {\n\n let connection = database.get_db();\n try {\n connection.db(\"HumansAgainstCards\")\n .collection(\"user\")\n .deleteMany({temp:true},\n (err) => {\n if ( err ) throw err;\n });\n } catch (e) {\n console.log(\n f_header,\n color.red,\n \"Deleting all users auth with name function failed !\\n\",\n color.white,\n e);\n }\n}", "title": "" }, { "docid": "37bc914826abc3368ca0b10ecfab52dc", "score": "0.6066845", "text": "delete(){\n userList.del(this.user);\n return true;\n }", "title": "" }, { "docid": "2e508b695ee74b2812e0ce9cc3cd6db7", "score": "0.6066161", "text": "delete(req, res) {\n let queryVars = req.query;\n User.destroy({\n where: {\n id: queryVars.id\n }\n })\n .then(function (deletedRecords) {\n res.status(200).json(deletedRecords);\n })\n .catch(function (error){\n res.status(500).json(error);\n });\n }", "title": "" }, { "docid": "c2d51b54a5eeabafb7448291852a3e22", "score": "0.6041531", "text": "async deleteData()\n {\n await User.deleteMany({});\n await Activity.deleteMany({});\n await Track.deleteMany({});\n }", "title": "" }, { "docid": "043d136c4fb79a9178d7c9f09f4e4a2e", "score": "0.5986324", "text": "function deleteUser (req, res) {\n User.remove({ _id: req.params.id }, (err, result) => {\n res.json({ message: 'User successfully deleted!', result })\n })\n}", "title": "" }, { "docid": "232dc6b36acaa42ff084aa138855ffde", "score": "0.5979992", "text": "async function destroyUser(user_id) {\n const deletedUser = await db(\"users\").where({ id: user_id }).del();\n return deletedUser;\n}", "title": "" }, { "docid": "e680e2cde23e631cbad9cf6b0c44a78d", "score": "0.5963361", "text": "function deleteUser(userId)\n {\n //todo\n }", "title": "" }, { "docid": "b94e367d7c7d9cbda0ed770c301830f4", "score": "0.59611195", "text": "deleteUser(userNumber){\n // if(this.isAdmin == true || this.userName == userName)\n // userList = userList.filter(item => item !== userName)\n delete userList[userNumber]\n console.log(\"User #\", userNumber, \" removed\")\n }", "title": "" }, { "docid": "5e6fc070bdf9b06470a417235f9f2146", "score": "0.59318686", "text": "function deleteUser(req, res) {\n User.remove({_id : req.params.id}, (err, result) => {\n res.json({ message: \"User successfully deleted!\", result });\n });\n}", "title": "" }, { "docid": "da1768882194532f9f5a39de7b40fc9f", "score": "0.5930715", "text": "function removeAll(req, res) {\n const { authorId, postId } = req.body;\n let condition = authorId ? { author: authorId } : {};\n if (postId) {\n condition.post = postId;\n }\n\n Comment.deleteMany(condition)\n .then((data) => {\n res.send({\n message: `${data.deletedCount} Comments were deleted successfully!`,\n });\n })\n .catch((err) => {\n res.status(500).send({\n message: err.message || \"Some error occurred while removing all posts.\",\n });\n });\n}", "title": "" }, { "docid": "6facf376030cd9ab30c607bc06b5f2bb", "score": "0.5918757", "text": "function removeAll(req, res) {\n const authorId = req.body.authorId;\n let condition = authorId ? { author: authorId } : {};\n\n Post.deleteMany(condition)\n .then((data) => {\n res.send({\n message: `${data.deletedCount} Posts were deleted successfully!`,\n });\n })\n .catch((err) => {\n res.status(500).send({\n message:\n err.message || \"Some error occurred while removing all comments.\",\n });\n });\n}", "title": "" }, { "docid": "c1e0ba1c084b63d469d0ebed11b404f7", "score": "0.5918695", "text": "async function clearCollections() {\n await User.deleteMany({})\n await Post.deleteMany({})\n await Comment.deleteMany({})\n await Reply.deleteMany({})\n}", "title": "" }, { "docid": "f28677c1da958918cd7fcd657033253f", "score": "0.59131503", "text": "function clearUser() {\n service.myself = null;\n service.amAdmin = null;\n LocalStorageService.removeToken();\n\n $rootScope.$broadcast('logout');\n }", "title": "" }, { "docid": "58d255b23a0bfff35793b1035538f91f", "score": "0.59022593", "text": "function deleteUser(req, res){\n User.findByIdAndDelete(req.user._id, \n function(err, data){\n if(err) return res.status(422).json({error: err});\n\n res.status(200).json(success(`successfully Deleted!! ${data}`))\n })\n}", "title": "" }, { "docid": "a26927b8adaa009c6d9f427aa493464a", "score": "0.58924913", "text": "function deleteAuthenticatedUser() {\n localStorage.removeItem('jwtToken');\n localStorage.removeItem('userid');\n localStorage.removeItem('username');\n localStorage.removeItem('firstName');\n localStorage.removeItem('lastName');\n}", "title": "" }, { "docid": "2e75235637679d309690070716db6c68", "score": "0.5882583", "text": "function deactiveUsers() {\n async function deactiveUsers() {\n try {\n if (req.body && req.body.type) {\n let model;\n if (req.body.type === \"admin\" || req.body.type === \"user\") {\n model = users;\n } else if (req.body.type === \"salon\") {\n model = salons;\n }\n\n let condition = { _id: mongoose.Types.ObjectId(req.body._id) };\n let updateCondition = { isActive: false };\n let changeStatus = await commonQuery.updateOneDocument(\n model,\n condition,\n updateCondition\n );\n if (!changeStatus) {\n res.json(\n Response(constant.ERROR_CODE, constant.FAILED_TO_PROCESS, null)\n );\n } else {\n res.json(\n Response(\n constant.SUCCESS_CODE,\n constant.USER_UPDATED,\n finalServiceArr\n )\n );\n }\n }\n } catch (error) {\n return res.json(\n Response(constant.ERROR_CODE, constant.REQURIED_FIELDS_NOT, error)\n );\n }\n }\n deactiveUsers().then(function() {});\n}", "title": "" }, { "docid": "93ee66ebfdbf48b7558828ca789509c1", "score": "0.5874149", "text": "removeUser(user) {\n this.store.remove(this.collection, user);\n this.store.save();\n }", "title": "" }, { "docid": "294cee767da49f7d5cbfcefd0d253924", "score": "0.58725595", "text": "function deletePost(req, res, next) {\n let user_id = req.session.user._id;\n let family_id = req.body.family_id;\n let post_id = req.body.post_id;\n\n // Find post\n Post.findById(post_id, function (err, post) {\n if (err) {\n console.error(\"Database find post error: \" + err);\n return next(err);\n }\n\n // Delete all comments\n Comment.deleteMany(\n {_id: {$in: post.comments}},\n function (err) {\n if (err) {\n console.error(\"Database delete comments error: \" + err);\n return next(err);\n }\n\n // Remove post itself\n post.remove(function (err) {\n if (err) {\n console.error(\"Database delete post error: \" + err);\n return next(err);\n }\n // Update user\n User.findOneAndUpdate(\n {_id: user_id},\n {$pull: {posts: post_id}},\n function (err) {\n if (err) {\n console.error(\"Database update user error: \" + err);\n return next(err);\n }\n // User updated\n if (!family_id) {\n // All done\n return res.send({errMsg: \"\"});\n }\n // Need to update family\n Family.findOneAndUpdate(\n {_id: family_id},\n {$pull: {posts: post_id}},\n function (err) {\n if (err) {\n console.error(\"Database update family error: \" + err);\n return next(err);\n }\n // All done\n return res.send({errMsg: \"\"});\n });\n });\n });\n }\n );\n });\n\n}", "title": "" }, { "docid": "a44999a7b0c83c737de246a57ea69fc9", "score": "0.5871974", "text": "static deleteUserData() {\n repository.write(() => {\n let User = repository.objects(UserModel.name);\n repository.delete(User);\n\n });\n }", "title": "" }, { "docid": "9725b00ebcd11647255321d796dc4cd2", "score": "0.5866968", "text": "deleteUser(userId) {\n const url = this.authUrl('/users/' + userId);\n return requestDelete(url);\n }", "title": "" }, { "docid": "ddcceba1a1f218a0f95024a22290820b", "score": "0.58550894", "text": "async delete(id) {\n\t\tconst records = await this.getAll();\n\t\t// 使用filter method保留数组中与要删除的id不同的elements\n\t\tconst remainingRecords = records.filter(record => record.id !== id);\n\t\tconsole.log(\">>>>>>>>>> DELETING USER!\");\n\t\tawait this.writeAll(remainingRecords);\n\t}", "title": "" }, { "docid": "9c74a6f448e145ddabd92e526abd3169", "score": "0.58375645", "text": "function del(objDelete) {\n\n return objDelete.usersCollection.deleteOne({_id: ObjectId(objDelete.id)})\n}", "title": "" }, { "docid": "3700761af4510e1785ae37a43f99962e", "score": "0.5831603", "text": "function logoutUser() {\n setUser(null);\n setToken(null);\n localStorage.setItem(\"token\", null);\n }", "title": "" }, { "docid": "8273e442390cf3410a835328d18bc813", "score": "0.5826544", "text": "function deleteUser( userId ) {\n\n return fetch( `${self.url}/${userId}`,\n { method: 'DELETE'});\n\n }", "title": "" }, { "docid": "ef1004bdcabf774f28bfae036a744cd9", "score": "0.5821612", "text": "logout() {\n this._token = null;\n this._user = null;\n this._clearUser();\n }", "title": "" }, { "docid": "89f3a460ff0bb9fbbdc521f00e27d5b5", "score": "0.58071107", "text": "function deleteUser(req, res) {\n\tUser.findById(req.params.id)\n\t.then((user)=> {\n\t\tuser.destroy()\n\t})\n\t.then(()=> {\n\t\tres.send('User has been deleted')\n\t})\n}", "title": "" }, { "docid": "798f68b01b7718d8867c9c3bbac4bf35", "score": "0.5805995", "text": "function destroy(req, res){\n return users\n .findOne({where: {id: parseInt(req.params.userId)}})\n .then(user => {\n if(!user){\n return res.status(201).send({message: 'User Not Found'});\n }\n\n return user\n .destroy()\n .then(() => res.status(200).send({message: 'Success! User Deleted.'}))\n .catch(error => res.status(400).send(error));\n });\n}", "title": "" }, { "docid": "454c0f166e0f1fae9645c620015a2141", "score": "0.5798801", "text": "delete(req, res) {\n\t\tUser.destroy({\n\t\t\twhere: {\n\t\t\t\tid: req.params.id\n\t\t\t}\n\t\t})\n\t\t\t.then(function (deletedRecords) {\n\t\t\t\tres.status(200).json(deletedRecords);\n\t\t\t})\n\t\t\t.catch(function (error){\n\t\t\t\tres.status(500).json(error);\n\t\t\t});\n\t}", "title": "" }, { "docid": "0d14325591b1d7708cb4e4f5ae4c8629", "score": "0.579823", "text": "function deleteUser(request, response, data) {\n // Sanity check the data\n if (!data.user) {\n commonLib.sendResponse(request, response, 400, 'application/json', JSON.stringify({\n message: 'Username missing',\n id: 'missingParams',\n }));\n }\n\n if (!(data.user in users)) {\n commonLib.sendResponse(request, response, 400, 'application/json', JSON.stringify({\n message: 'Invalid username',\n id: 'invalidParams',\n }));\n }\n\n // Delete the user, as well as any of their active sessions\n users[data.user] = null;\n for (let i = sessions.length - 1; i >= 1; --i) {\n if (sessions[i] === data.user) {\n sessions[i] = sessions[sessions.length - 1];\n sessions.length -= 1;\n }\n }\n\n commonLib.sendResponse(request, response, 204, null, null);\n}", "title": "" }, { "docid": "b505ad64b3c636c8b2a8caa477d8faf1", "score": "0.57936317", "text": "function _deleteUser(next){\n var client = getClient();\n binder(client,function(err){\n if(err) return next(err);\n var dsn = getDSN(req.param('uid'))\n client.del(dsn,function(err){\n client.unbind()\n if(err && err.name !== undefined && err.name==='NoSuchObjectError')\n return next();\n return next(err)\n });\n return null;\n })\n return null;\n }", "title": "" }, { "docid": "351a0892fd7f00cf67d799f4ad0ca92d", "score": "0.5781097", "text": "function deleteall (req, res){\n\tdatabase.delAllRecords (function (e,o){\n\t\tconsole.log (\"deleted everything\");\n\t\tuserHandler.createUser (\"dad\", \"dad\", \"[email protected]\",\n\t\t\t\"M\", true, false, function(data) {\n\t\t\tuserHandler.createUser (\"dkd\", \"dkd\", \"[email protected]\" , \n\t\t\t\"ALL\", true, true, function(data){\n\t\t\t\t\t\tconsole.log (\"got user data\");\n\t\t\t\t\t\thelper.renderPage (req, res, 'login.jade', \t{\n\t\t\t\t\t\t\ttitle:\"Logga in\", \n\t\t\t\t\t\t\tmessage:\"Tog bort hela databasen. \"+\n\t\t\t\t\t\t\t\t\t\"Återskapade adminkontot:\" +\n\t\t\t\t\t\t\t\t\t\"Namn: \"+data.user + \n\t\t\t\t\t\t\t\t\t\"Pass: \"+data.password +\n\t\t\t\t\t\t\t\t\t\"Email: \"+data.email +\n\t\t\t\t\t\t\t\t\t\"Dadmin: \"+data.dadmin +\n\t\t\t\t\t\t\t\t\t\"Admin: \"+data.admin\n\t\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t});\n\t});\n\t\n}", "title": "" }, { "docid": "9d16395f3196f86c5c74f1a5d2a8dee8", "score": "0.5779331", "text": "removeUser(id) {\n return this.userResource.remove({ id: id });\n }", "title": "" }, { "docid": "08f994ccc639dd0106e4cd6dffc0fc73", "score": "0.57791936", "text": "function clearUserTable() {\r\n while(usersTable.children[1]) {\r\n usersTable.removeChild(usersTable.children[1]);\r\n }\r\n}", "title": "" }, { "docid": "41029c96f4d4a525d63c743269e289f7", "score": "0.5776753", "text": "async function deleteUser({userId}) {\n const result = await users.findOneAndDelete({\n _id: ObjectID(userId)\n })\n\n return result\n }", "title": "" }, { "docid": "8939801d525317701414c5b043d87889", "score": "0.57743645", "text": "function clearDB() {\n\tconsole.log(\"Deleting Old Data...\");\n\n\t// Clear all the three collections\n\treturn Promise.all([User.remove(), Poll.remove(), Reply.remove()])\n\t .then(() => console.log(\"Data Deleted Successfully!\"));\n}", "title": "" }, { "docid": "6488c94c359f72ce333a7882f359dc81", "score": "0.57646227", "text": "function clearUserList() {\n // delete all user names\n $('#users tbody tr').remove();\n}", "title": "" }, { "docid": "2ec4fc6abd89db3c1888ef31baa8f226", "score": "0.57578146", "text": "async deleteUsers(req, res) {\n try {\n await User.destroy({where: {}}).then(function () {});\n return res.json('Users deleted')\n } catch (err) {\n return res.json(err)\n }\n }", "title": "" }, { "docid": "90c6a78c4fce1bf81fd3ff7e953232b2", "score": "0.5749933", "text": "async function userDeleteAll(req, res, next) {\n try {\n const validPhone = req.user.phone; //Phone number of the User\n //Find a real and active balance with this User\n let balance = await Balance.findOne({ phone: validPhone, isActive: true }).exec();\n\n //If no balance exists\n if (!balance) {\n console.log('User has no balances!');\n return res.status(409).json({\n message: \"User has no balances!\"\n });\n //Else\n } else {\n //Set all balances with this User as inactive\n await Balance.updateMany({ phone: validPhone }, { $set: { isActive: false } }).exec();\n\n console.log('Balances deleted!');\n return res.status(201).json({\n message: \"Balances deleted!\"\n });\n }\n } catch (err) {\n throwErr(res, err);\n }\n}", "title": "" }, { "docid": "7947769e71801337120ba660451bedc0", "score": "0.5745793", "text": "static deleteAllNotifications(idUser) {\n return (db.execute('DELETE FROM t_notification WHERE notif_idUser = ?;', [idUser]));\n }", "title": "" }, { "docid": "85c257d8fb43f5faaa84d7156de86fb8", "score": "0.57432574", "text": "deleteUser(id){\n\n\n\n }", "title": "" }, { "docid": "55b357309587f175ac9398bd40994492", "score": "0.57395333", "text": "delete(req, res) {\n db.users.destroy({\n where: {\n id: parseInt(req.params.id)\n }\n })\n .then(user => {\n res.json({\n msg: \"Successful DELETE to '/users' route\",\n id: req.params.id\n });\n });\n }", "title": "" }, { "docid": "2dad9c52798f35388cbb73358a2023c6", "score": "0.5733254", "text": "function deleteUser(userId) {\n let baseUrl = getBaseUrl()\n let url = baseUrl + \"user/delete/\" + userId\n fetch(url, {\"method\": \"post\"})\n .then(function () {\n updateScoreTable()\n })\n}", "title": "" }, { "docid": "2dad9c52798f35388cbb73358a2023c6", "score": "0.5733254", "text": "function deleteUser(userId) {\n let baseUrl = getBaseUrl()\n let url = baseUrl + \"user/delete/\" + userId\n fetch(url, {\"method\": \"post\"})\n .then(function () {\n updateScoreTable()\n })\n}", "title": "" }, { "docid": "baeacae8fa71de8b2a75012b7e12ab6a", "score": "0.57062757", "text": "function destroy(req, res) {\n User.destroy({\n where: {\n id: req.params.id\n }\n })\n .then(function (deletedRecords) {\n res.status(200).json(deletedRecords);\n })\n .catch(function (error){\n res.status(500).json(error);\n });\n}", "title": "" }, { "docid": "c934b1d288040ff2b29e5e2d3ab209c8", "score": "0.5697085", "text": "async deleteById(id, user) {\n const coWorking = await this.coWorkingRepository.findById(id, {\n include: [{ relation: 'rooms' }],\n });\n if (user[security_1.securityId].localeCompare(coWorking.userId)) {\n throw new rest_1.HttpErrors.Unauthorized();\n }\n if (coWorking.rooms) {\n for (let r of coWorking.rooms) {\n const room = await this.roomRepository.deleteRoom(r.id);\n }\n }\n delete coWorking.rooms;\n file_upload_1.deleteFiles(coWorking.photo);\n await this.coWorkingRepository.delete(coWorking);\n // console.log(coWorking);\n }", "title": "" }, { "docid": "b5a3679901e6b582f6fea951a7058afa", "score": "0.5696982", "text": "function destroy(req, res){\n // check that user exists\n return checkUserExists(req.params.userId)\n .then(result => {\n if(result instanceof Error){\n return res.status(404).send({message: result.message});\n }\n\n return UserSpecialties\n .findAll({where: {userId: parseInt(req.params.userId)}})\n .then(userSpecialties => {\n const deletedSpecialties = userSpecialties.map(userSpecialty => {\n return userSpecialty\n .destroy()\n .then(() => ({message: `User ${req.params.userId} specialty deleted.`}))\n .catch(error => error);\n });\n\n return deletedSpecialties;\n })\n .then(action => {\n return Promise\n .all(action)\n .then(results => res.status(200).send(results))\n .catch(error => res.status(400).send(error));\n });\n });\n}", "title": "" }, { "docid": "de1c941183b0d58ffa8879f96d700c6d", "score": "0.56952584", "text": "async deleteUserById(userId) {\n return this.repository.deleteUser(userId);\n }", "title": "" }, { "docid": "774414dc2e5803a9dd628c7b18175dee", "score": "0.5693287", "text": "static remove(userId) {\n let userPath = \"/users/\" + userId + \"/details\";\n return firebase.database().ref(userPath).remove().then(function () {\n firebase.auth().currentUser.delete()\n }).catch(function (error) {\n console.log(error)\n });\n }", "title": "" }, { "docid": "d4b83a489934bed4aa3652fb259618f7", "score": "0.5690133", "text": "function deleteUser(userId, callback) {\n let url = this.url + '/users/' + userId;\n fetch(url, {\n method: 'DELETE',\n headers: {\n 'content-type': 'application/json'\n }\n }).then(callback)\n }", "title": "" }, { "docid": "c8aac8e1cb6b6f04d8991a4d10784041", "score": "0.56877613", "text": "logout () {\n this._clearAuth();\n this.request = this.$q.reject();\n if(this.user) {\n this.DS.clear();\n this.user = null;\n }\n this.onLogout();\n }", "title": "" }, { "docid": "3c7ad40e991c8c9be84e3e6b8c383970", "score": "0.5681442", "text": "function deleteUser() {\n return agconnect.auth().deleteUser();\n}", "title": "" }, { "docid": "7d6e3f05c114f86388c15bd4cc79615b", "score": "0.5678925", "text": "delete(){\n console.log(userService.currentUser.user_id);\n userService\n .deleteUser(userService.currentUser.user_id)\n .then(() => {\n localStorage.setItem(\"token\", \"\");\n if(userService.currentUser){\n userService.currentUser = null;\n Alert.success(\"Sletting gikk fint\");\n history.push(\"/login\");\n }\n })\n }", "title": "" }, { "docid": "e0c8923c0af152fea882f5d7000025f7", "score": "0.5676652", "text": "removeAllUser() {\n this.users = []\n }", "title": "" }, { "docid": "79c87114dcce46f8a6b21906821aecf0", "score": "0.56752074", "text": "deletePost(post) {\n // grab that specific post's reference in firebase\n var postRef = firebase.database().ref(\"Users/\" + firebase.auth().currentUser.uid + \"/saved/\" + post.key);\n\n // remove it from firebase\n postRef.remove();\n }", "title": "" }, { "docid": "6fbfe8908b9d0b1f1f2459c2dc3b6f6f", "score": "0.5673106", "text": "function deleteUser(){\n let userId = parseInt(event.target.dataset.id)\n\n fetch(`${BASE_URL}/users/${userId}`, {\n method: 'DELETE'\n })\n\n this.location.reload()\n }", "title": "" }, { "docid": "f330efc32d459437173fa354d4fc865f", "score": "0.56702876", "text": "logout() {\n this.userData = null;\n cache.remove(\"user\");\n }", "title": "" }, { "docid": "b46018fb2793f73997161cd2f46a216d", "score": "0.5667557", "text": "function deleteUser() {\n let userId = parseInt(event.target.dataset.id)\n\n fetch(`${BASE_URL}/users/${userId}`, {\n method: 'DELETE'\n })\n\n this.location.reload()\n }", "title": "" }, { "docid": "45058dd98af1c7e0acacc431a82965a4", "score": "0.5661303", "text": "function deleteUser(req, res) {\n User.remove({_id: req.params.id}, (err, result) => {\n if (err) {\n return res.status(400).json({success: false, message: err.toString(), err});\n } else if (result.result.n > 0) {\n return res.json({success: true, message: config.USER_DELETED, result});\n } else {\n return res.status(404).json({success: false, message: config.USER_NOT_FOUND, result});\n }\n });\n}", "title": "" }, { "docid": "0f717eba9480c807b260e3e283b8b7a6", "score": "0.56594783", "text": "async function deleteUser(userId) {\n const options = { useFindAndModify: false };\n return User.findByIdAndRemove(userId, options, function (err, deletedDoc) {\n if (err) {\n console.log(err);\n } else {\n // console.log(`Deleted Doc: ${deletedDoc}`);\n return deletedDoc;\n }\n });\n}", "title": "" }, { "docid": "92c51601a141dbeb61b93712ae0b32fe", "score": "0.56590027", "text": "destroy(user) {\n// return this.isAllowed('update', article);\n return this.isAdmin()\n }", "title": "" }, { "docid": "cc778d06921ef3cc601af62b99ea0742", "score": "0.5649997", "text": "function deleteUser(userId) {\n\n var deferred = q.defer();\n\n UserModel.remove({_id:userId}, function (err) {\n if(err) {\n logger.error(\"Can not delete user with id \" + userId + \" Error: \" + err);\n deferred.reject(err);\n }\n else {\n deferred.resolve(200);\n }\n });\n\n return deferred.promise;\n }", "title": "" }, { "docid": "60102c59289c3a2e2eb2ab4a1cb05def", "score": "0.5644824", "text": "function deleteUserAccount(){\r\n\tdb.splice(this.id,1);\r\n\tshowAccounts();\r\n\r\n}", "title": "" }, { "docid": "135515751fff9dc8845bff568b987c68", "score": "0.5643859", "text": "function destroyUserKeys()\n{\n\tif(Object.keys(userKeys).length > 0)\n\t{\n\t\tserver.log(\"destroying user keys...\");\n\t\tfor(const username of allowedUsers)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tkeyManager.deleteKey(username, port);\n\t\t\t}\n\t\t\tcatch(error)\n\t\t\t{\n\t\t\t\tconsole.error(error.message);\n\t\t\t}\n\t\t}\n\t\tserver.log(\"finished destroying user keys\");\n\t}\n}", "title": "" }, { "docid": "85c60bde40e074e67fc4e7b0e736f7c3", "score": "0.5639918", "text": "function deleteUser(u, type = \"\") {\n userDb = userDb.filter(e => e.username != u)\n fillData(userDb, type)\n}", "title": "" }, { "docid": "c67030bb11e486c5184e9165b83b4b0e", "score": "0.5635469", "text": "async function deleteUser(req, res) {\n await User.findOneAndDelete({ _id: req.params.userId });\n res.sendStatus(200);\n}", "title": "" }, { "docid": "b0eb130f609a57613dc28b22f4445774", "score": "0.5630154", "text": "function unregister() {\n UserService\n .deleteUser(id) //id is in $routeParams\n .then(\n //success will log you out and delete user\n function (response) {\n $location.url(\"/login\");\n },\n\n //user not found to even delete\n function (error) {\n vm.error = error.data;\n });\n }", "title": "" }, { "docid": "91c337ca8ac2a2f9c666714260937905", "score": "0.56299174", "text": "function destroy(req, res) {\n return user_model_1.default.findByIdAndRemove(req.params.id).exec()\n .then(function () {\n res.status(204).end();\n })\n .catch(handleError(res));\n}", "title": "" }, { "docid": "034af233f306668f50c70c9067d4c391", "score": "0.5629238", "text": "function deletingUsers() {\n deleteUserBtns = document.querySelectorAll('.get-users__delete');\n deleteUserBtns.forEach(elem => {\n elem.addEventListener('click', function() {\n let li = elem.closest('li');\n let login = li.innerText;\n if (users.indexOf(login) >= 0) {\n users.splice(users.indexOf(login), 1);\n }\n li.remove();\n // console.log(users);\n });\n });\n }", "title": "" }, { "docid": "a06fd4fb5ec712c60f62e09b4062b781", "score": "0.5610894", "text": "async deleteUserCreatedPost(input, context) {\n\n const { postid, userid } = input;\n const userID = this._getAuthUserID();\n\n if (!userID) throw new Error('User not authenticated');\n\n try {\n const deletedPostID = await context.model.postModel.deletePost(postid);\n const postList = await context.model.postModel.getPostByUser(userid);\n const loggedUserInfo = this._getAuthUserInfo();\n await this.model.findOneAndUpdate(\n { _id: userid },\n {\n $pull: {\n usersavedpost: mongoose.Types.ObjectId(postid)\n }\n },\n { runValidators: true, new: true }\n );\n const userData = await this.model.findOne({ _id: userid }).populate('usersavedpost').populate({ path: 'usersavedpost', populate: 'user' });\n const userPostCount = await context.model.postModel.getPostCountByUser(userid);\n return {\n userData,\n postcount: userPostCount,\n postInfo: postList,\n loggedUserInfo: loggedUserInfo ? loggedUserInfo : null,\n message: 'Post deleted successfully'\n }\n }\n catch (err) {\n throw new Error(err.message);\n }\n\n }", "title": "" }, { "docid": "c790838e8dd8ce1037eed636e536ac3e", "score": "0.56101537", "text": "async function deleteUser(id) {\n let responseMessage;\n\n // delete all orders with a specific user id\n await fetch('http://localhost:3001/orders_admin?user_id=' + id, {method: \"DELETE\"})\n .then(response => responseMessage = response)\n .then(response => response.json());\n\n if(responseMessage.status === 200) {\n // delete all offers with a specific user id\n await fetch('http://localhost:3001/offers_admin?user_id=' + id, {method: \"DELETE\"})\n .then(response => responseMessage = response)\n .then(response => response.json());\n\n if(responseMessage.status === 200) {\n // delete user with a specific id\n await fetch('http://localhost:3001/users?user_id=' + id, {method: \"DELETE\"})\n .then(response => responseMessage = response)\n .then(response => response.json());\n\n if(responseMessage.status === 200)\n fetchAllUsers();\n }\n }\n }", "title": "" }, { "docid": "e04d53d24068e8f36bd03529b1be3a59", "score": "0.5607091", "text": "function removeUser(userId){\n util.debug(\"removing user\");\n util.debug(userId);\n\n var query = 'delete from rdc01hn4hfiuo1rv.usercate where user_id = ' + userId + ';';\n\n function usercateCB(err,data){\n var query = 'delete from rdc01hn4hfiuo1rv.usermed where user_id = ' + userId + ';';\n function usermedCB(err,data){\n var query = 'delete from rdc01hn4hfiuo1rv.user where user_id = ' + userId + ';';\n util.queryDB(query);\n }\n util.queryDB(query,usermedCB);\n }\n\n util.queryDB(query,usercateCB);\n}", "title": "" }, { "docid": "995a3996eb5c42e7c1afe08f8a04852a", "score": "0.5604157", "text": "function deleteData(form){\n database.ref('users/' + form.userId.value).remove()\n .then(function(){\n console.log(\"Remove succeeded\")\n })\n .catch(function(error){\n console.log(\"Remove failed: \" + error.message)\n });\n}", "title": "" }, { "docid": "063014328958c09c930b8e745d1388f8", "score": "0.55987936", "text": "function cleanupUi() {\n // Remove all previously displayed posts.\n\n // Stop all currently listening Firebase listeners.\n listeningFirebaseRefs.forEach(function(ref) {\n ref.off();\n });\n listeningFirebaseRefs = [];\n}", "title": "" }, { "docid": "1fb9e07ee242ac1d7f42b6130e3f3dd9", "score": "0.5595001", "text": "deleteuser(userObj ,response){\n RegisterUser.findOneAndRemove({id:userObj.id}, function (err, docs) {\n if(err){\n response.send(\"some error occured\");\n }\n else{\n response.status(200).json({\n status: \"200 \",\n docs: docs\n });\n }\n });\n}", "title": "" }, { "docid": "b0aeda54405683f1081be7cb7dcfd33c", "score": "0.5585736", "text": "function json_user_delete(id) {\n\n\tvar self = this;\n\n\t// self.model('user').Schema;\n\t// framework.model('user').Schema;\n\tvar User = MODEL('user').Schema;\n\n\tconsole.log('delete ->', id);\n\n\t// What is it? https://github.com/totaljs/examples/tree/master/changes\n\tself.change('user: deleted, id: ' + id);\n\n\tUser.findById(id, function(err, doc) {\n\t\t// Please do not remove a document (THANKS :-))\n\t\t// doc.remove();\n\t\tself.json({ r: true });\n\t});\n\n}", "title": "" }, { "docid": "696465648ff979399647e1a7f420237d", "score": "0.5584563", "text": "async deleteUser(req, res) {\n const { userId } = req.params;\n let updateData = userData\n const filteredArr = userData.filter((element) => {\n if (element.id === parseInt(userId)) {\n for (let i = 0; i > userData.length; i++) {\n if (userData[i].id === element.id) {\n userData.splice(i, 1, \"\")\n }\n }\n return false\n } else {\n return true\n }\n })\n\n\n if (filteredArr.length === 0) {\n res.sendStatus(404)\n } else {\n res.status(200).send(filteredArr)\n }\n \n }", "title": "" }, { "docid": "f6b91ad6b190ddf6e208e257733ca726", "score": "0.5584534", "text": "static deleteAll(){\n\t\tlet kparams = {};\n\t\treturn new kaltura.RequestBuilder('userloginpin', 'deleteAll', kparams);\n\t}", "title": "" }, { "docid": "bf73d2a4dc5f3550d7224c412ecc29e5", "score": "0.5576293", "text": "deleteUser({params}, res){\n User.findOneAndDelete({ _id: params.id})\n .then(dbUserData => {\n if (!dbUserData) {\n res.status(404).json({message: 'No User found with this id!'});\n }\n res.json(dbUserData);\n return Thought.deleteMany({_id: {$in: dbUserData.thoughts}});\n })\n .then(dbUserData => res.json(dbUserData))\n .catch(err => res.json(err));\n }", "title": "" }, { "docid": "094979364fa9587aa6b790185fae6e4f", "score": "0.55635524", "text": "function unregisterUser(req, res)\n {\n var uid = req.params.uid;\n for(var u in users) {\n if(users[u]._id == uid) {\n users.splice(u, 1);\n }\n }\n res.send(200);\n }", "title": "" }, { "docid": "6d74f7da9567371e44acf9f6a8878308", "score": "0.5556342", "text": "function destroy(req, res, next) {\n console.log(req.user)\n const id = req.user.userid;\n console.log(`Data : ${req.body}`);\n const data ={ \n deletedBy: req.body.deleteddBy,\n isDeleted:req.body.isDeleted \n } \n User.update(data, {where: {id:id}}).then((result)=>{\n res.status(201).json({\n message: \"DELETE succesfully\"\n });\n }).catch((err)=> {\n res.status(500).json({\n message: \"Something went wrong\",\n error: error \n }); \n }); \n}", "title": "" } ]
32a7afe9ce9ee1d8da05ff10f42f022a
worked with a mentor go through each box and check if it's empty if we find an empty box, the answer is false and it is not a draw
[ { "docid": "02c5350a64c038a4bdda0a36014dcbf5", "score": "0.79639417", "text": "function boxesAreAllFull() {\n result = true\n gameBoard.boxes.forEach((box) => {\n if(box.innerHTML === \" \") {\n result = false\n }\n })\n // we went the through the loop and now we're outside of it\n // and so if we haven't found an empty box, that means all of the boxes are full\n // and then it is a draw\n return result\n}", "title": "" } ]
[ { "docid": "b629473d4aa91c3ea0ca3c119112a7a9", "score": "0.69710124", "text": "function isEmpty(box){\n return !box.hasClass('box-filled-1') && !box.hasClass('box-filled-2');\n }", "title": "" }, { "docid": "1f9420bdfd71db6c36dd82e5c47e2dae", "score": "0.69282824", "text": "function isFull(boxes) {\n for (var i = 0; i < boxes.length; i++) {\n if (boxes[i].textContent.length == 0) return false;\n }\n return true;\n }", "title": "" }, { "docid": "d30b1e5d75cf283098d3834a97f937d2", "score": "0.6917594", "text": "checkDraw() {\n const boxes = this.board.virtualBoard;\n \n for (let i = 0; i < boxes.length; i++) {\n if (boxes[i] === null) return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "40c79827e20b82b88fcc0adb7ec7a7b3", "score": "0.6834262", "text": "function isBoardFull(){\n let board = $box.map((index, currBox) => {\n let $currBox = $(currBox);\n return isEmpty($currBox);\n });\n return !board.get().includes(true);\n }", "title": "" }, { "docid": "e152a01e777086ccf8a0f058cc96bb6a", "score": "0.6670435", "text": "function isFull(){\r\n for (let i = 0; i < gameField.length; i++){\r\n for (let j = 0; j < gameField[i].length; j++){\r\n if (gameField[i][j] === \"\"){\r\n return false;\r\n }\r\n }\r\n }\r\n return true;\r\n}", "title": "" }, { "docid": "84e30e147ce66fc53f2861af763c6f47", "score": "0.6576831", "text": "isBoxValid(index) {\n return (\n !this.boxes[index].classList.contains(\"wall\") &&\n !this.boxes[index].classList.contains(\"start\") &&\n !this.boxes[index].classList.contains(\"wall\")\n );\n }", "title": "" }, { "docid": "9f44b9b98700397b84cde104ff1b2198", "score": "0.6571926", "text": "function hasEmptyCells() {\n // scan through all cells, looking at text content for empty spaces\n var empty_spaces = 0\n for (let i = 0; i < 9; i++) {\n if (all_squares[i].textContent == ''){\n // return true if an empty cell is identified\n empty_spaces += 1\n } \n }\n if (empty_spaces == 0){\n document.getElementById(\"winMsg\").textContent = \"It's a draw! The board is filled\";\n } else {\n console.log(`${empty_spaces} cells remain`)\n }\n}", "title": "" }, { "docid": "d972ad820b05af7bcd60ba558e026e52", "score": "0.649289", "text": "function checkGridComplete() {\n // Make an array of all squares in the grid to look through\n let squares = qsa(\".square\");\n // Make an empty array to store empty squares in\n let emptySquares = [];\n for (let i = 0; i < squares.length; i++) {\n // Define a variable to show the content of the squares within the squares array\n let squareContent = squares[i].textContent;\n // If the sqaure's content is an empty string\n if (squareContent === \"\") {\n // All empty squares are pushed onto the emptySquares array\n emptySquares.push(squareContent);\n }\n }\n // If the array is empty, the game is won. Else the game continues\n if (emptySquares.length === 0) {\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "3228ea4e4704189ddd314638e9176cae", "score": "0.6491292", "text": "check_beside(){\n\t\tvar obstacle_num = 0;\n\t\tvar box_num = 0;\n\t\tfor(var i=0;i<this.stage.squares.length;i++){\n\t\t\tif (this.stage.squares[i] != this){\n\t\t\t\t// the following expression is left || right || above || below. If all of them are false, two squares must intersect.\n\t\t\t\tif (!( this.position.x + this.length < this.stage.squares[i].x || this.position.x > this.stage.squares[i].x + this.stage.squares[i].length || \n\t\t\t\t\t\tthis.position.y > this.stage.squares[i].y + this.stage.squares[i].length || this.position.y + this.length < this.stage.squares[i].y )){\n\t\t\t\t\t// two squares intersect (the dog is next to something)\n\t\t\t\t\tif (this.stage.squares[i].type == \"obstacle\"){\n\t\t\t\t\t\t// the dog is next to the obstacle\n\t\t\t\t\t\tobstacle_num += 1;\n\t\t\t\t\t} else if (this.stage.squares[i].type == \"box\"){\n\t\t\t\t\t\t// the dog is next to the box\n\t\t\t\t\t\tbox_num += 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn [obstacle_num, box_num];\n\t}", "title": "" }, { "docid": "4c8b541e7d6cf98ed3985ab7d88fc4f2", "score": "0.6471026", "text": "function isBoardFilled() {\n for (let i = 0; i < squares.length; i++) {\n if (squares[i].innerText === '') {\n return false;\n }\n }\n \n return true;\n}", "title": "" }, { "docid": "98214383a48eba872e8eb7fc2bc03fd6", "score": "0.6469085", "text": "function checkDraw() {\n for(i = 0; i < 7; i++){\n for(j = 0; j < 6; j++){\n if(grid[i][j] == null) \n return false;\n }\n }\n return true;\n}", "title": "" }, { "docid": "d38530f6a5489bdff19e9ae4133b601f", "score": "0.64312446", "text": "function isFull() {\n for(let i in square) {\n if(square[i] === '') {\n return false;\n }\n }\n return true;\n}", "title": "" }, { "docid": "07a81069199a893a1bdf2303ee5f69e6", "score": "0.62835336", "text": "function checkMove(){\n var iMove = gMan.i + gDirec.i;\n var jMove = gMan.j + gDirec.j;\n var canMove = true;\n \n \n if (gArr[iMove][jMove]=== 'W') return false; //` into wall box\n // var nextCellWAllObj = isElsInPos(iMove,jMove,'W');//` into wall box\n // if( nextCellWAllObj !=null ) return false;\n var nextCellBoxObj = isElsInPos(iMove,jMove,'B');\n if (nextCellBoxObj !=null ){ //` pusshing box\n if (gArr[iMove+ gDirec.i][jMove+ gDirec.j]=== 'W') return false; //` into wall box\n //var wall = isElsInPos(iMove+ gDirec.i,jMove+ gDirec.j,'W');//` into wall box\n var box = isElsInPos(iMove+ gDirec.i,jMove+ gDirec.j,'B');//` into another box\n if(box !=null ){\n return false;\n }else{\n objsToMove.push(nextCellBoxObj); \n }\n }\n return true\n}", "title": "" }, { "docid": "31df43b0322a9cbb81daee1e203a991d", "score": "0.6273343", "text": "function checkMultiplayerVictory(){\n if((box1.innerHTML === \"X\" && box2.innerHTML === \"X\" && box3.innerHTML === \"X\") ||\n (box4.innerHTML === \"X\" && box5.innerHTML === \"X\" && box6.innerHTML === \"X\") ||\n (box7.innerHTML === \"X\" && box8.innerHTML === \"X\" && box9.innerHTML === \"X\") ||\n (box1.innerHTML === \"X\" && box4.innerHTML === \"X\" && box7.innerHTML === \"X\") ||\n (box2.innerHTML === \"X\" && box5.innerHTML === \"X\" && box8.innerHTML === \"X\") ||\n (box3.innerHTML === \"X\" && box6.innerHTML === \"X\" && box9.innerHTML === \"X\") ||\n (box1.innerHTML === \"X\" && box5.innerHTML === \"X\" && box9.innerHTML === \"X\") ||\n (box3.innerHTML === \"X\" && box5.innerHTML === \"X\" && box7.innerHTML === \"X\")){\n alert(\"Jogador 1 é o vencedor!\")\n cont = 0\n blockBox1 = 0\n blockBox2 = 0\n blockBox3 = 0\n blockBox4 = 0\n blockBox5 = 0\n blockBox6 = 0\n blockBox7 = 0\n blockBox8 = 0\n blockBox9 = 0\n box1.innerHTML = \"\"\n box2.innerHTML = \"\"\n box3.innerHTML = \"\"\n box4.innerHTML = \"\"\n box5.innerHTML = \"\"\n box6.innerHTML = \"\"\n box7.innerHTML = \"\"\n box8.innerHTML = \"\"\n box9.innerHTML = \"\"\n }else if((box1.innerHTML === \"O\" && box2.innerHTML === \"O\" && box3.innerHTML === \"O\") ||\n (box4.innerHTML === \"O\" && box5.innerHTML === \"O\" && box6.innerHTML === \"O\") ||\n (box7.innerHTML === \"O\" && box8.innerHTML === \"O\" && box9.innerHTML === \"O\") ||\n (box1.innerHTML === \"O\" && box4.innerHTML === \"O\" && box7.innerHTML === \"O\") ||\n (box2.innerHTML === \"O\" && box5.innerHTML === \"O\" && box8.innerHTML === \"O\") ||\n (box3.innerHTML === \"O\" && box6.innerHTML === \"O\" && box9.innerHTML === \"O\") ||\n (box1.innerHTML === \"O\" && box5.innerHTML === \"O\" && box9.innerHTML === \"O\") ||\n (box3.innerHTML === \"O\" && box5.innerHTML === \"O\" && box7.innerHTML === \"O\")){\n alert(\"Jogador 2 é o vencedor!\")\n cont = 0\n blockBox1 = 0\n blockBox2 = 0\n blockBox3 = 0\n blockBox4 = 0\n blockBox5 = 0\n blockBox6 = 0\n blockBox7 = 0\n blockBox8 = 0\n blockBox9 = 0\n box1.innerHTML = \"\"\n box2.innerHTML = \"\"\n box3.innerHTML = \"\"\n box4.innerHTML = \"\"\n box5.innerHTML = \"\"\n box6.innerHTML = \"\"\n box7.innerHTML = \"\"\n box8.innerHTML = \"\"\n box9.innerHTML = \"\"\n }else{\n if(cont>=9){\n document.getElementById(\"infoGame\").innerHTML= \"Jogo Finalizado!\"\n alert(\"Jogo Empatado!\")\n cont = 0\n blockBox1 = 0\n blockBox2 = 0\n blockBox3 = 0\n blockBox4 = 0\n blockBox5 = 0\n blockBox6 = 0\n blockBox7 = 0\n blockBox8 = 0\n blockBox9 = 0\n box1.innerHTML = \"\"\n box2.innerHTML = \"\"\n box3.innerHTML = \"\"\n box4.innerHTML = \"\"\n box5.innerHTML = \"\"\n box6.innerHTML = \"\"\n box7.innerHTML = \"\"\n box8.innerHTML = \"\"\n box9.innerHTML = \"\"\n }\n }\n}", "title": "" }, { "docid": "2348badf774d606fced4edb3b54c5b52", "score": "0.62561595", "text": "function checkGameFinished() {\r\n if (getScore(PLAYER) == 0) return true;\r\n for (var i = 0; i < field_height; i++)\r\n for (var j = 0; j < field_width; j++)\r\n if (game_field[i][j] == EMPTY) return false;\r\n return true;\r\n}", "title": "" }, { "docid": "03c90dcc47f91b6059906bf45ba4892a", "score": "0.62501717", "text": "function check_border() {\n for (let i = 0; i < invaders.length; i++) {\n return invaders[i].x <= 0 || invaders[i].x >= 155;\n }\n}", "title": "" }, { "docid": "de595e01c7d8158edfd5ff34ab24fa9a", "score": "0.6231179", "text": "checkBoardFullness() {\n return Object.values(this.state.board).every(arr => Object.values(arr).every(value => value !== \"\"));\n }", "title": "" }, { "docid": "03497b35f6ef3170b4853d59eef64271", "score": "0.6222609", "text": "isComplete() {\n for (let i = 0; i < this.rounds.length; i++) {\n for (let j = 0; j < this.rounds[i].length; j++) {\n if (this.rounds[i][j] == \"\") {\n return false;\n }\n }\n }\n return true;\n }", "title": "" }, { "docid": "8fd981c469756a5206b94d213bf92da2", "score": "0.6194655", "text": "function verifyCompletion(){\n ballTube = document.getElementsByClassName(\"ballContainer\")\n for (const elem of ballTube){\n if(elem.childElementCount == 0){continue}\n else if(elem.childElementCount < 4){return false}\n else if(sameColor(elem) == false) {return false}\n }\n return true\n\n}", "title": "" }, { "docid": "1de2cd7689ee92dcbfd093265992d620", "score": "0.6186951", "text": "function notInBox(props) {\n let solution = props.solution.slice();\n for (let y = 0; y < 3; y++) {\n for (let x = 0; x < 3; x++) {\n if (solution[props.row + y][props.col + x] === props.num) {\n return false;\n }\n }\n }\n return true;\n}", "title": "" }, { "docid": "490dd332e40d577bab8ee057caaa4a21", "score": "0.61852235", "text": "isClear(positions) {\n const minX = min(positions.map(piece => piece.x));\n const maxX = max(positions.map(piece => piece.x));\n const minY = min(positions.map(piece => piece.y));\n const maxY = max(positions.map(piece => piece.y));\n\n if (minX < 0) { return false; }\n if (minY < 0) { return false; }\n if (maxX >= this.width) { return false; }\n if (maxY >= this.height) { return false; }\n\n return !some(positions, (position, a, b) => {\n if (this.getSquare(position.x, position.y)) { return true; }\n });\n }", "title": "" }, { "docid": "454c0a31fabb96897d94d6a22501b5cd", "score": "0.6162231", "text": "boxDetection() {\r\n // For loop, loops through all spaces on the game board\r\n for (let i = this.gameMap.length - 1; i >= 0; i--) {\r\n // For loop, loops through all this.tetrominos for collision detection on a piece of the game board\r\n for (let z = this.tetrominos.length - 1; z >= 0; z--) {\r\n // Check for an intersection between a piece and a board square\r\n if (rectIntersect1(this.tetrominos[z], this.gameMap[i]) || rectIntersect2(this.tetrominos[z], this.gameMap[i]) ||\r\n rectIntersect3(this.tetrominos[z], this.gameMap[i]) || rectIntersect4(this.tetrominos[z], this.gameMap[i])) {\r\n // First case, tetromino hits bottom of board, Check coords and if the tetromino\r\n // is dropping or placed\r\n if (this.tetrominos[z].y1 == height - 40 && this.tetrominos[z].isPlaced == false ||\r\n this.tetrominos[z].y2 == height - 40 && this.tetrominos[z].isPlaced == false ||\r\n this.tetrominos[z].y3 == height - 40 && this.tetrominos[z].isPlaced == false ||\r\n this.tetrominos[z].y4 == height - 40 && this.tetrominos[z].isPlaced == false) {\r\n // Place the dropping tetromino, create a new one\r\n this.tetrominos[z].isPlaced = true;\r\n this.tetrominos[z].isDropping = false;\r\n this.placePiece();\r\n // Second case, tetromino lands on another tetromino, check if theres is a tetromino\r\n // present underneath the dropping tetromino by checking 10 spaces ahead of dropping\r\n // this.tetrominos coords\r\n } else if (this.tetrominos[z].isPlaced == false && this.tetrominos[z].y1 + 40 == this.gameMap[i + 10].y &&\r\n this.gameMap[i + 10].boxUsed == true ||\r\n this.tetrominos[z].isPlaced == false && this.tetrominos[z].y2 + 40 == this.gameMap[i + 10].y &&\r\n this.gameMap[i + 10].boxUsed == true || this.tetrominos[z].isPlaced == false &&\r\n this.tetrominos[z].y3 + 40 == this.gameMap[i + 10].y && this.gameMap[i + 10].boxUsed == true ||\r\n this.tetrominos[z].isPlaced == false && this.tetrominos[z].y4 + 40 == this.gameMap[i + 10].y &&\r\n this.gameMap[i + 10].boxUsed == true) {\r\n // Place the dropping tetromino, create a new one\r\n this.tetrominos[z].isPlaced = true;\r\n this.tetrominos[z].isDropping = false;\r\n this.placePiece();\r\n }\r\n // After placing the tetromino with either case, set the squares the tetromino is\r\n // placed on to used\r\n if (this.tetrominos[z].isPlaced == true) {\r\n this.gameMap[i].boxUsed = true;\r\n }\r\n // Check if a piece lands and is above the game board and reset game\r\n if (this.tetrominos[z].isPlaced == true && this.tetrominos[z].y1 == 0 ||\r\n this.tetrominos[z].isPlaced == true && this.tetrominos[z].y2 == 0 ||\r\n this.tetrominos[z].isPlaced == true && this.tetrominos[z].y3 == 0 ||\r\n this.tetrominos[z].isPlaced == true && this.tetrominos[z].y4 == 0) {\r\n // Reset the game.\r\n this.tetrominos = [];\r\n this.gameMap = [];\r\n setup();\r\n // Reset z variable instead of changing loops because lazy\r\n z = this.tetrominos.length;\r\n }\r\n }\r\n }\r\n }\r\n }", "title": "" }, { "docid": "f838100320f87a3a043091f6425af15f", "score": "0.61440724", "text": "function isValidMove(boxes) {\n\n }", "title": "" }, { "docid": "1e8dcbcae239d470ae7ed9321af1f47b", "score": "0.61179304", "text": "function IsDraw(cells) {\n // return cells.filter(c => c === null).length == 0;\n}", "title": "" }, { "docid": "ad7f08cb25782e42a18e93a351682002", "score": "0.6111703", "text": "function isNeedDivide(playerID){\r\n\t\t\t\t\tvar count = 0;\r\n\t\t\t\t\tfor(i=1;i<6;++i){\r\n\t\t\t\t\t\tif(squares[playerID][i].getNumStone() == 0)\r\n\t\t\t\t\t\t++count;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(count == 5)\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\telse \r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t}", "title": "" }, { "docid": "d9e9dc0f3feb708853b5c484c902be5a", "score": "0.6084481", "text": "function checkForDraw () {\n\tif (usedBoxes.length === 9 && player1.hasWon === false && player2.hasWon === false) {\n\t\t$('#board').hide();\n\t\t$('.draw').show();\n\t}\n}", "title": "" }, { "docid": "dc1fa0be5363316344df893c281d6cbf", "score": "0.60791224", "text": "function checkDraw() {\n return playerOSelections.length + playerXSelections.length >= cells.length\n}", "title": "" }, { "docid": "2d5a6bdf695d46de8516a3e0f52981a4", "score": "0.6070292", "text": "function boardHasEmptySpaces() {\n let $emptySpaces = emptyBoardSpaceElements();\n return $emptySpaces.length > 0;\n}", "title": "" }, { "docid": "9edde2a58ff91c4a075666eaf1302b94", "score": "0.6058934", "text": "function checkFull() {\n let counter = 0;\n for (var i=0;i<4;i++){\n for (var j=0;j<4;j++){\n if (checkNotZero(positionList[i][j])){\n counter++;\n }\n }\n }\n if (counter === 16){\n return true;\n }else {return false;}\n }", "title": "" }, { "docid": "89e1a3948965ab9978152f1afdf0087f", "score": "0.60384417", "text": "function check(piece) {\n var empty = true;\n var r, c;\n for (var i = 0; i < piece.length; i++) {\n r = piece[i][0];\n c = piece[i][1];\n if (grid[r][c] === BORDER || grid[r][c] !== -1) {\n empty = false;\n }\n }\n return empty;\n}", "title": "" }, { "docid": "a0186eae3248a46a6c0b8e80d044f0dd", "score": "0.60189164", "text": "function doneOrNot(board) {\n let score = 0;\n let columnScore = 0;\n let rowCounter = 0;\n let boxScore = 0;\n let rowObject = {\n 1: [],\n 2: [],\n 3: [],\n 4: [],\n 5: [],\n 6: [],\n 7: [],\n 8: [],\n 9: []\n };\n let columnObject = {\n };\n let boxObject = {\n 1: [],\n 2: [],\n 3: [],\n 4: [],\n 5: [],\n 6: [],\n 7: [],\n 8: [],\n 9: []\n };\n for (let j = 0; j < board.length; j++) {\n for (let i = 0; i < board[j].length; i++) {\n if (rowObject[board[j][i]]) {\n rowObject[board[j][i]].push(board[j][i]);\n };\n if (i < 3) {\n boxObject[(1 + rowCounter).toString()].push(board[j][i]);\n } else if ( i >= 3 && i < 6) {\n boxObject[(2 + rowCounter).toString()].push(board[j][i]);\n } else if (i >= 6) {\n boxObject[(3 + rowCounter).toString()].push(board[j][i]);\n };\n if (columnObject[i]) {\n columnObject[i].push(board[j][i]);\n } else {\n columnObject[i] = [];\n columnObject[i].push(board[j][i]);\n };\n if (rowCounter < 4 && boxObject[(3 + rowCounter).toString()].length === 9) {\n rowCounter += 3;\n };\n };\n };\n for (let number of Object.keys(rowObject)) {\n if (rowObject[number].length === 9) {\n score += 1;\n };\n };\n for (let column of Object.keys(columnObject)) {\n if (columnObject[column].includes(1) && columnObject[column].includes(2) && columnObject[column].includes(3) && columnObject[column].includes(4) && columnObject[column].includes(5) && columnObject[column].includes(6) && columnObject[column].includes(7) && columnObject[column].includes(8) && columnObject[column].includes(9)) {\n columnScore += 1;\n };\n };\n for (let box of Object.keys(boxObject)) {\n if (boxObject[box].includes(1) && boxObject[box].includes(2) && boxObject[box].includes(3) && boxObject[box].includes(4) && boxObject[box].includes(5) && boxObject[box].includes(6) && boxObject[box].includes(7) && boxObject[box].includes(8) && boxObject[box].includes(9)) {\n boxScore += 1;\n };\n };\n if (score === 9 && columnScore === 9 && boxScore === 9) {\n return \"Finished!\";\n } else {\n return \"Try again!\";\n };\n }", "title": "" }, { "docid": "7903afeda4009c1f40d6afacbcc35a01", "score": "0.6017224", "text": "function checkDestroy() {\n for (let i = 0; i < height; i++) {\n let cnt = 0;\n for (let j = 0; j < width; j++) {\n if (gameBoardData[i][j]) cnt++;\n }\n if (cnt != 10) continue\n for (let j = 0; j < 10; j++) {\n gameBoard.removeChild(allShapePos[i][j]);\n allShapePos[i][j] = null;\n gameBoardData[i][j] = 0;\n }\n for (let y = i; y > 0; y--) {\n for (let x = 0; x < width; x++) {\n if (allShapePos[y - 1][x] != null) {\n allShapePos[y][x] = allShapePos[y - 1][x];\n allShapePos[y - 1][x] = null;\n allShapePos[y][x].y += cellSize;\n }\n }\n }\n \n for (let y = i; y > 0; y--) {\n for (let x = 0; x < width; x++) {\n if (allShapePos[y][x] != null) {\n gameBoardData[y][x] = 1;\n } else {\n gameBoardData[y][x] = 0;\n }\n }\n }\n }\n}", "title": "" }, { "docid": "b5b030c18f607570ee14da839dfe9c8b", "score": "0.60042274", "text": "isFilled(i_check, j_check){\n let currentView = this.state.layout.length-1;\n if(i_check>=8 || j_check>=8 || i_check<0 || j_check<0){\n return \"stop\";\n }\n let square_value = this.state.layout[currentView][i_check][j_check];\n if(square_value === 32){\n return \"empty\";\n }\n if(this.state.whitesMove){\n if(square_value < 9818 ) {\n return \"stop\";\n }else{\n return \"capture\";\n }\n }else{\n if(square_value >= 9818){\n return \"stop\";\n }else{\n return \"capture\";\n }\n }\n\n }", "title": "" }, { "docid": "c77feaf83a52dbe5978f32e2f641953e", "score": "0.5995704", "text": "_checkBottomColision() {\n\n let block = false;\n let absPos;\n\n for (let row = 3; row >= 0; row--) {\n\n if (block) return false; // ==== se han comprobado todos los bloques de abajo ====>>>\n for (let col = 0; col < 4; col++) {\n\n if (this[row][col] === 0) continue;\n\n block = true;\n absPos = this._getAbsolutePosition(row, col);\n\n if (absPos.row === 19) return true; //==== un bloque esta eb el fondo =====>>\n }\n }\n }", "title": "" }, { "docid": "aafedbb5f33623ee475b8882ec687a2a", "score": "0.59780294", "text": "function checkDraw() {\n\n\tif ( !($('.box').hasClass('free')) ) {\n\t\talert(\"Draw! Try playing again!\");\n\t\tresetGame();\n\t}\n}", "title": "" }, { "docid": "3ad62c1118cb7ee4985997d0d02d0d63", "score": "0.5953813", "text": "function ifGameEnded()\r\n{\r\n /* checking if the heaf of the snake collied with any of the body parts. */\r\n for(let i=4; i<snake.length; i++)\r\n {\r\n const collided = snake[i].x === snake[0].x && snake[i].y === snake[0].y;\r\n if(collided)\r\n {\r\n return true;\r\n }\r\n }\r\n /* checking the boundry walls */\r\n const hit_left_wall = snake[0].x < 0;\r\n const hit_top_wall = snake[0].y < 0;\r\n const hit_right_wall = snake[0].x > snake_board.width -10;\r\n const hit_bottom_wall = snake[0].y > snake_board.height -10;\r\n return hit_left_wall || hit_top_wall || hit_right_wall || hit_bottom_wall;\r\n \r\n}", "title": "" }, { "docid": "9c54e3b1e3c10ed211a978fb61e495cd", "score": "0.5947648", "text": "function allLocked(boxes) {\r\n for (let i = 0; i < boxes.length; i++) {\r\n if (!(boxes[i].classList.contains(\"locked\"))) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n}", "title": "" }, { "docid": "fe1eda8207d92f572b50ddd990c11994", "score": "0.5928055", "text": "usedInBox(grid, boxStartRow, boxStartCol, num) {\n for (let row = 0; row < 3; row++) {\n for (let col = 0; col < 3; col++) {\n if (grid[row + boxStartRow][col + boxStartCol] === num) {\n return true;\n }\n }\n }\n return false;\n }", "title": "" }, { "docid": "7673e956d0877f42cf53b53f30e0166e", "score": "0.5927655", "text": "function emptyBoxes() {\n $(\"#extremalBox\").empty();\n $(\"#diffBox\").empty();\n $(\"#spearmanBox\").empty();\n $(\"#serialBox\").empty();\n}", "title": "" }, { "docid": "699a1f05d265719ddcb1c1f49eb8fefa", "score": "0.59239316", "text": "boardIsFull()\n {\n\n for (var i = 0; i < this.state.board.length; i++) {\n if (this.state.board[i] === \"\") {\n return false;\n }\n }\n return true;\n }", "title": "" }, { "docid": "a659edf14cfbb6faad6397221ebddfd0", "score": "0.5921554", "text": "function unUsedInBox(solutionGrid, rowStart, colStart, num) \n { \n for (let i = 0; i<3; i++) \n for (let j = 0; j<3; j++) \n if (solutionGrid[rowStart+i][colStart+j]==num) \n return false; \n\n return true; \n }", "title": "" }, { "docid": "aa5d81ca039eadc10cdee30e2e3f8ae1", "score": "0.5917559", "text": "function checkWinnerTtt (){\n\n var matchedFirstRow = boxes[0].innerHTML && boxes[0].innerHTML === boxes[1].innerHTML && boxes[0].innerHTML === boxes[2].innerHTML && boxes[0].innerHTML === boxes[3].innerHTML\n\n var matchedSecondRow = boxes[4].innerHTML && boxes[4].innerHTML === boxes[5].innerHTML && boxes[4].innerHTML === boxes[6].innerHTML && boxes[4].innerHTML === boxes[7].innerHTML\n\n var matchedThirdRow = boxes[8].innerHTML && boxes[8].innerHTML === boxes[9].innerHTML && boxes[8].innerHTML === boxes[10].innerHTML && boxes[8].innerHTML === boxes[11].innerHTML\n\n var matchedFourthRow = boxes[12].innerHTML && boxes[12].innerHTML === boxes[13].innerHTML && boxes[12].innerHTML === boxes[14].innerHTML && boxes[12].innerHTML === boxes[15].innerHTML\n\n var matchedFirstColumn = boxes[0].innerHTML && boxes[0].innerHTML === boxes[4].innerHTML && boxes[0].innerHTML === boxes[8].innerHTML && boxes[0].innerHTML === boxes[12].innerHTML\n\n var matchedSecondColumn = boxes[1].innerHTML && boxes[1].innerHTML === boxes[5].innerHTML && boxes[1].innerHTML === boxes[9].innerHTML && boxes[1].innerHTML === boxes[13].innerHTML\n\n var matchedThirdColumn = boxes[2].innerHTML && boxes[2].innerHTML === boxes[6].innerHTML && boxes[2].innerHTML === boxes[10].innerHTML && boxes[2].innerHTML === boxes[14].innerHTML\n\n var matchedFourthcolumn = boxes[3].innerHTML && boxes[3].innerHTML === boxes[7].innerHTML && boxes[3].innerHTML === boxes[11].innerHTML && boxes[3].innerHTML === boxes[15].innerHTML\n\n var matchedFirstDiagonal = boxes[0].innerHTML && boxes[0].innerHTML === boxes[5].innerHTML && boxes[0].innerHTML === boxes[10].innerHTML && boxes[0].innerHTML === boxes[15].innerHTML\n\n var matchedSecondDiagonal = boxes[3].innerHTML && boxes[3].innerHTML === boxes[6].innerHTML && boxes[3].innerHTML === boxes[9].innerHTML && boxes[3].innerHTML === boxes[12].innerHTML\n\n if(matchedFirstRow || matchedSecondRow || matchedThirdRow || matchedFourthRow || matchedFirstColumn || matchedSecondColumn || matchedThirdColumn ||\n matchedFourthcolumn || matchedFirstDiagonal || matchedSecondDiagonal) {\n currentPlayer.score = currentPlayer.score +1;\n console.log(\"currentPlayer\");\n alert(currentPlayer.name + \" \" + \"wins! \\n Proceed to next challenge! Player One goes first.\");\n switchTurns()\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "d839924e74a85a2c3a34e2df58063816", "score": "0.5908418", "text": "valid(p) {\n return p.shape.every((row, dy) => {\n return row.every((value, dx) => {\n let x = p.x + dx;\n let y = p.y + dy;\n return (\n value === 0 ||\n (this.insideWalls(x) &&\n this.aboveFloor(y) && this.notOccupied(x, y))\n )});\n });\n }", "title": "" }, { "docid": "04ce871677d9fb096ff28b997f6223ea", "score": "0.5907524", "text": "function isBoxAllowed(matrix, row, column, number) {\n \n //this code make 9 boxes with same (initial) values for rows and cols in each\n //for rows 0, 1, 2 value is 0 etc.\n row = Math.floor(row / 3) * 3;\n column = Math.floor(column / 3) * 3;\n \n for (let i = 0; i < 3; i ++) {\n for (let j = 0; j < 3; j ++) {\n if (matrix[row + i][column + j] === number) {\n return false;\n }\n }\n }\n return true;\n }", "title": "" }, { "docid": "e8a981248addf6fbf674e9898da87372", "score": "0.5876773", "text": "checkCompletedBoard(){\n let totalSquares = board.columnCount * board.rowCount;\n let dustedSquaresCount = 0;\n for(let checkColumn=0; checkColumn<board.columnCount; checkColumn++) {\n for(let checkRow=0; checkRow<board.rowCount; checkRow++) {\n let s = board.squares[checkColumn][checkRow];\n if (board.squares[checkColumn][checkRow].dusted===1) {\n dustedSquaresCount++;\n }\n }\n }\n if (dustedSquaresCount===totalSquares){\n level.boardFinished();\n }\n }", "title": "" }, { "docid": "205d6298c251d0bb62573c1040e5c416", "score": "0.587203", "text": "function allFilled() {\n\treturn boards[0].every((val) => val != null); //Return true if td is filled else return false\n}", "title": "" }, { "docid": "0f69b7f1447ec8a7f1f23d96688c2d33", "score": "0.5865481", "text": "function gallEmptyCheck(){\n if($('.galleryWrapper > div.galleryItemActive').length != 0){\n emptyGallMessageOff();\n }else{\n emptyGallMessageActive();\n }\n}", "title": "" }, { "docid": "edf1b23574eca79774ec4dabac916488", "score": "0.5863149", "text": "function in_box(x, y, box) {\n return (\n x >= box.x - trial.box_linewidth &&\n x <= box.x + box.w + trial.box_linewidth * 2 &&\n y >= box.y - trial.box_linewidth &&\n y <= box.y + box.h + trial.box_linewidth * 2\n );\n }", "title": "" }, { "docid": "d193e99716353c51b46fb76c22474ebf", "score": "0.58478534", "text": "isEmpty(x, y) {\n if (0 <= x && x < this.width && 0 <= y && y < this.height) {\n return !this.covered[x][y]\n }\n return false\n }", "title": "" }, { "docid": "c5b20f48016434bc0e84c142696d1aeb", "score": "0.58440757", "text": "gameIsFinished() {\n return this.rows[0].some(\n cell => cell.filled \n );\n }", "title": "" }, { "docid": "2f498ed1ec3b9d1419d5c14c80bd3671", "score": "0.58420813", "text": "function isGameOver(){\r\n\tfor (var i = 0; i < size; i++) { \r\n\t\tfor (var j = 0; j < size; j++) { \r\n\t\t\tif(grid[i][j]==0){\r\n\t\t\t\treturn false;//If any block has zero return false\r\n\t\t\t}\r\n\t\t\t//If any consecutive blocks are same return false\r\n\t\t\tif(i!== (size-1) && grid[i][j] == grid[i+1][j]){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t//If any consecutive blocks are same return false\r\n\t\t\tif(j!== (size-1) && grid[i][j] == grid[i][j+1]){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t}\r\n\t\r\n\treturn true;\r\n}", "title": "" }, { "docid": "40060b063ad488f36a3e36fd397a210d", "score": "0.5839205", "text": "function checkForWin() {\n var hiddenBlanks = 0;\n var unMarkedMines = 0;\n\n for(var b = 0; b < board.cells.length; b++){\n if(board.cells[b].hidden == true && board.cells[b].isMine == false){\n hiddenBlanks++;}\n if(board.cells[b].isMine == true && board.cells[b].isMarked == false){\n unMarkedMines++;}\n }\n if(hiddenBlanks == 0 && unMarkedMines == 0){\n lib.displayMessage('You win!');\n }\n}", "title": "" }, { "docid": "e08655a6ce9e44f4c84e521856e660e9", "score": "0.5839049", "text": "function boxes() {\n\tthis.innerHTML = HUplayer;\n\tthis.removeEventListener('click', boxes);\n\tcheckWinner();\n\tendGameChecker();\n\tlet emptySlots = checkerForEmpty();\n\tif (emptySlots.length > 0 && !endGame) {\n\t\tlet oneEmptySlot = emptySlots[Math.floor(Math.random() * emptySlots.length)];\n\t\toneEmptySlot.innerHTML = AI;\n\t\toneEmptySlot.removeEventListener('click', boxes);\n\t\tcheckWinner();\n\t}\n}", "title": "" }, { "docid": "d5b3db5e0347926af76fd4f485d2dc70", "score": "0.58346784", "text": "function IsDraw(cells) {\n return cells.filter(c => c === null).length === 0;\n}", "title": "" }, { "docid": "dfe9977f8adcad85088aebf7b8010807", "score": "0.58336574", "text": "function moveBox(k){\n var id = k;\n //console.log(\"Inside move box!!: \"+id);\n //gameOver condition has to be fixed as \n //its not accurate condition for game over\n if( (players[id].bottomMostX == 1 || players[id].bottomMostX == 0) && checkOccupiedBlock(id) == true){\n gameOver(id);\n }\n else if(players[id].bottomMostX == gridHeight-1 || (checkOccupiedBlock(id)) == true){\n selectNextPiece(id);\n \n //for storing the shape data\n if(players[id].replayMode == false){\n //console.log(\"inside move box players[id].replayMode == false\");\n setTheAllShapesUsedInGame(id,players[id].shapeType,players[id].anyColor);\n }\n eraseNextShape(id);\n randomBlockGenerator(id);\n \n //for storing the next shape data\n if(players[id].replayMode == false){\n //console.log(\"inside move box players[id].replayMode == false\");\n setTheAllNextShapesUsedInGame(id,players[id].nextPiece,players[id].nextColor);\n }\n checkRowCompletion(id);\n moveShapeToInitialPos(id);\n moveNextShapeToInitialPos(id);\n colorNextShape(id);\n }\n \n else if((checkOccupiedBlock(id)) == false){\n makeBlockUnoccupied(id);\n eraseShape(id);\n moveShapeDown(id);\n makeBlockOccupied(id);\n colorTheShape(id);\n }\n }", "title": "" }, { "docid": "69756676ca1f40b9655536c66b0a614c", "score": "0.58334064", "text": "function inbox(point_x, point_y, box_x, box_y, box_width, box_height) {\n return (point_x >= box_x && point_x <= box_x + box_width && point_y >= box_y && point_y <= box_y + box_height);\n}", "title": "" }, { "docid": "a1f2e54838b4b98c4bee2caca2e67c05", "score": "0.5828684", "text": "function checkdraw() {\n //recall board is 7x6\n for (var row = 0; row < 6; row++) {\n for (var col = 0; col < 7; col++) {\n if (board[row][col] == 0) {\n return false;\n }\n }\n }\n //else board is filled and game is draw\n return true;\n}", "title": "" }, { "docid": "4cb448d4e44a106465f4d4147f3070a3", "score": "0.58257705", "text": "function fillBox(cord1, cord2) {\n let row = cord1;\n let col = cord2;\n while (row < (cord1 + 3)) { //keeps us inside our box\n let x = Math.floor((Math.random() * 9) + 1);\n while (col < cord2 + 3) {\n if (!checkBox(x, row, col)) { // Calls the check box function to see if the number already appeared in the box\n x = Math.floor((Math.random() * 9) + 1); // Fill the box with random numbers.\n } else {\n puzzleArray[row][col] = x;\n col++;\n }\n }\n row++;\n col = cord2;\n }\n}", "title": "" }, { "docid": "e2215c65d55710f00c253471b762a476", "score": "0.58241045", "text": "collides(box) {\n if(box instanceof Rectangle) {\n box = [...box];\n box[2] = Math.ceil((box[0] + box[2]) / this.tw);\n box[3] = Math.ceil((box[1] + box[3]) / this.th);\n box[0] = Math.floor(box[0] / this.tw);\n box[1] = Math.floor(box[1] / this.th);\n } else if(box instanceof Circle) {\n const {x, y, r} = box;\n box[0] = Math.floor(x - r);\n box[1] = Math.floor(y - r);\n box[2] = Math.ceil(x + r);\n box[3] = Math.ceil(y + r);\n }\n for(let i = box[0]; i < box[2]; ++i) {\n for(let j = box[1]; j < box[3]; ++j) {\n if(this[COLLISIONS][j] && this[COLLISIONS][j][i]) { return true; }\n }\n }\n return false;\n }", "title": "" }, { "docid": "ccd5301cc74900664de2a8ee1e046823", "score": "0.58201563", "text": "checkForDraw() {\n let b = this.state.board;\n let boardFull = false;\n let col0Full = false;\n let col1Full = false;\n let col2Full = false;\n let col3Full = false;\n \n // column checks\n if (b[0][0] !== 0) {\n col0Full = true;\n }\n if (b[0][1] !== 0) {\n col1Full = true;\n }\n if (b[0][2] !== 0) {\n col2Full = true;\n }\n if (b[0][3] !== 0) {\n col3Full = true;\n }\n\n this.setState({\n col0Full: col0Full,\n col1Full: col1Full,\n col2Full: col2Full,\n col3Full: col3Full\n })\n\n // whole board check\n if (col0Full && col1Full && col2Full && col3Full) {\n boardFull = true;\n }\n\n if (boardFull) {\n this.setState({\n gameStatus: \"Its a draw!\",\n buttonsDisabled: true,\n playAgainDisplay: 'inline',\n gameActive: false\n });\n }\n else {\n this.initBotsMove();\n }\n }", "title": "" }, { "docid": "069bf80487690019e54dbd03806d5eda", "score": "0.5818513", "text": "function victoryCheck(size){\n var counter = 0;\n for(i = 0; i < size * size; i++){\n if(document.getElementById(i).className == 'firstState'){\n counter++;//count green elements\n };\n };\n if (counter == size * size || counter == 0){//if all elements are green or yellow = victory\n removeCubesFromGrid(size);\n gameView('victory');\n };\n}", "title": "" }, { "docid": "3aacbf46275e8874dd83788c8a32663c", "score": "0.5812302", "text": "function checkForWin () {\n for (var i = 0; i < board.cells.length; i++) {\n if (!board.cells[i].isMine && board.cells[i].hidden) {return}\n if (board.cells[i].isMine && !board.cells[i].isMarked) {return}\n }\nlib.displayMessage('no rabies for you!')\n }", "title": "" }, { "docid": "8d9e0ffb100a9d12c2260a3d0c7caf43", "score": "0.5806313", "text": "function tieYet(XandO,notify=false){\r\n let countBlank = 0;\r\n for (let i = 0; i < 3; i++)\r\n for (let j = 0; j < 3; j++)\r\n if (XandO[i][j] == null)\r\n countBlank++;\r\n if(countBlank==0&&notify){\r\n const notify_square=document.getElementsByClassName('square');\r\n for(let i=0;i<9;i++){\r\n square[i].classList.toggle('highlight'); //highlight the tie\r\n }\r\n }\r\n return countBlank == 0;\r\n }", "title": "" }, { "docid": "659732989b7650532f5d3b912a5bf685", "score": "0.58021575", "text": "function checkForWinner(){\n let boardState = [];\n function updateBoardState (filledClass) {\n //Check Columns\n for(let i = 0; i < 3; i++){\n boardState.push($box.eq(i).hasClass(filledClass) && $box.eq(i+3).hasClass(filledClass) && $box.eq(i+6).hasClass(filledClass));\n }\n //Check Rows\n for(let i = 0; i < 7; i += 3){\n boardState.push($box.eq(i).hasClass(filledClass) && $box.eq(i+1).hasClass(filledClass) && $box.eq(i+2).hasClass(filledClass));\n }\n //Check Diagonals\n boardState.push($box.eq(0).hasClass(filledClass) && $box.eq(4).hasClass(filledClass) && $box.eq(8).hasClass(filledClass));\n boardState.push($box.eq(2).hasClass(filledClass) && $box.eq(4).hasClass(filledClass) && $box.eq(6).hasClass(filledClass));\n }\n updateBoardState('box-filled-1');\n updateBoardState('box-filled-2');\n\n //Check if all boxes have been selected\n function isBoardFull(){\n let board = $box.map((index, currBox) => {\n let $currBox = $(currBox);\n return isEmpty($currBox);\n });\n return !board.get().includes(true);\n }\n\n if(boardState.includes(true)){\n if($('.active').attr('id') === 'player1'){\n $('#finish').addClass('screen-win-one');\n $('.message').append('Winner');\n $('#finish').show();\n } else {\n $('#finish').addClass('screen-win-two');\n $('.message').append('Winner');\n $('#finish').show();\n }\n } else if(isBoardFull()) {\n $('.message').append('It\\'s a Tie!');\n $('#finish').addClass('screen-win-tie');\n $('#finish').show();\n }\n }", "title": "" }, { "docid": "2416e0783f8e98f9a76ff5b559616c61", "score": "0.5792507", "text": "checkWinningPattern() {\n for (let pattern of winningPattern) {\n let sameElement = false;\n let initialElement = boxCollection[pattern[0]].boxObject.innerHTML;\n for (let i = 1; i < this.totalRow; i++) {\n let nextElement = boxCollection[pattern[i]].boxObject.innerHTML;\n if (initialElement == nextElement && initialElement != \"\") {\n sameElement = true;\n initialElement = nextElement\n } else {\n sameElement = false;\n break;\n }\n }\n if (sameElement) {\n this.win = true;\n break;\n }\n }\n }", "title": "" }, { "docid": "509f0970693841d13da489b955445efb", "score": "0.5789453", "text": "function checkWinner() {\r\n\t\t//check rows, cols, diags\r\n\t\t//if empty is 9, then we declare draw and end the game\r\n\r\n\t\tfor(var i = 0; i < winCombo.length; i++) {\r\n\t\t\tif(board[winCombo[i][0]].innerHTML != \" \" &&\r\n\t\t\t\tboard[winCombo[i][0]].innerHTML == board[winCombo[i][1]].innerHTML &&\r\n\t\t\t\tboard[winCombo[i][1]].innerHTML == board[winCombo[i][2]].innerHTML ) {\r\n\t\t\t\tboard[winCombo[i][0]].style.color = \"red\";\r\n\t\t\t\tboard[winCombo[i][1]].style.color = \"red\";\r\n\t\t\t\tboard[winCombo[i][2]].style.color = \"red\";\r\n\t\t\t\tcleanBgColor();\r\n\t\t\t\tdocument.getElementById(\"message\").innerHTML = board[winCombo[i][0]].innerHTML + \" wins!\";\r\n\t\t\t\tendGame();\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t\r\n\t\t//check if the game is a draw \r\n\t\tif (empty == 0) {\r\n\t\t\tdocument.getElementById(\"message\").innerHTML = \"It's a draw.\";\r\n\t\t\tendGame();\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "eb3d967d3f3fe47e30e8120422ef8230", "score": "0.57868135", "text": "function checkEndGame(){\r\n\t\t\t\t\tif (squares[0][0].getNumStone() == 0 && squares[1][0].getNumStone()==0){\r\n\t\t\t\t\t\tendGame = true;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tendGame = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}", "title": "" }, { "docid": "2890ef48f858d317da2a572360dba27b", "score": "0.57849103", "text": "function isRectangle() {\r\n // The total number of size 1x1 fields (in piece space) that\r\n // are occupied by the selected pieces:\r\n var occupiedFields = 0;\r\n for (var i in that.pieces) {\r\n var piece = that.pieces[i];\r\n occupiedFields += piece.widthP * piece.heightP;\r\n }\r\n return (occupiedFields == that.widthP * that.heightP);\r\n }", "title": "" }, { "docid": "d85d2e5cd30b786d6125a8b7d90174b6", "score": "0.5784797", "text": "function checkBottom(){\n var count = 0\n var y = Game.Renderer.canvas.height()-blockheight\n //Loop through board bottom blocks\n for(var x=0; x<Game.Renderer.canvas.width(); x+=blockwidth){\n //Loop through taken blocks and count bottom one\n for(var b=0; b<field.length; b++){\n if (field[b][0]===x && field[b][1]===y) {\n count++\n }\n }\n }\n \n if (count===10) {return true}\n return false\n \n }", "title": "" }, { "docid": "9e2b75c2d573e0a45868552b29776dc1", "score": "0.57787335", "text": "function check_block() {\n var moved = false;\n reset_counts();\n check_counts(\"X\");\n\n if (countdiag1 == 2 && !moved) {\n for (i = 0; i < 3; i++) {\n moved = take_space(i * 3 + i);\n }\n }\n if (countdiag2 == 2 && !moved) {\n for (i = 0; i < 3; i++) {\n moved = take_space(i * 2 + 2);\n }\n }\n if (countrow0 == 2) {\n for (i = 0; i < 3; i++) {\n moved = take_space(i);\n }\n }\n if (countrow1 == 2 && !moved) {\n for (i = 0; i < 3; i++) {\n moved = take_space(3 + i);\n }\n }\n if (countrow2 == 2 && !moved) {\n for (i = 0; i < 3; i++) {\n moved = take_space(6 + i);\n }\n }\n if (countcol0 == 2 && !moved) {\n for (i = 0; i < 3; i++) {\n moved = take_space(i * 3);\n }\n }\n if (countcol1 == 2 && !moved) {\n for (i = 0; i < 3; i++) {\n moved = take_space(i * 3 + 1);\n }\n }\n if (countcol2 == 2 && !moved) {\n for (i = 0; i < 3; i++) {\n moved = take_space(i * 3 + 2);\n }\n }\n return moved;\n}", "title": "" }, { "docid": "0c7b6a4559c3f222ee4fb5eb82de7f00", "score": "0.57772493", "text": "function checkForWin () {\n\nvar areAllMinesMarked = true;\n\n for(i = 0; i< board.cells.length; i++) {\n\n if(board.cells[i].hidden === true) {\n return;\n }\n\n var isMine = board.cells[i].isMine;\n var isMarked = board.cells[i].isMarked;\n\n if (isMine === true && isMarked === false ) {\n areAllMinesMarked = false;\n }\n }\n\n if(areAllMinesMarked === true) {\n lib.displayMessage('You win!');\n\n }\n\n}", "title": "" }, { "docid": "6ea1d522eeaaf1fd5b8172fcb8e364ed", "score": "0.57731867", "text": "magicDeck() {\n return this.drawPile.concat(this.discardPile).length === 0;\n }", "title": "" }, { "docid": "1b7b66fe708969fb25e0edd91351d9d1", "score": "0.57718205", "text": "function checkDraw() {\n return currentCells.every(function (element) { return typeof element === 'string'; })\n}", "title": "" }, { "docid": "82874731ff07db37d59046154b2b2ed9", "score": "0.5769383", "text": "function emptySquares() {\r\n // to see with x o is not empty but with no. is empty\r\n return origBoard.filter(s => typeof s == 'number');\r\n}", "title": "" }, { "docid": "7f569ff252b77f2403f90540adf0f06b", "score": "0.57633656", "text": "isEmpty() {\n\t\treturn this.#hiddenLevels.length === this.#hiddenSize;\n\t}", "title": "" }, { "docid": "6da6a6b9de8ee72adbd6bf4d265399ca", "score": "0.5762622", "text": "function checkPlacement() {\r\n for(index of shipArray) {\r\n if(boardObj.message[index].ship != \"none\") { //If there is already a ship here...\r\n shipArray = finalShipArray.slice();\r\n return false; //...don't move the ship here!\r\n }\r\n }\r\n return true; //If all cells at the indices of shipArray are empty, then return true\r\n}", "title": "" }, { "docid": "7b77e4a555dfcf9e9fb86bcde96252dc", "score": "0.5762259", "text": "function checkDraw(board) {\n if (availPos(board).length == 0) {\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "27e4a09fd1d212c54cf23645769c6476", "score": "0.5758949", "text": "function win()\n{\n //horizontal win checks\n if((boxes[0].val + boxes[1].val + boxes[2].val) == 3 || (boxes[0].val + boxes[1].val + boxes[2].val) == 15)\n {\n console.log('someone win');\n line(boxes[0].xpos,boxes[0].ypos+50,boxes[2].xpos+100,boxes[2].ypos+50)\n end = true;\n }\n if((boxes[3].val + boxes[4].val + boxes[5].val) == 3 || (boxes[3].val + boxes[4].val + boxes[5].val) == 15)\n {\n console.log('someone win');\n line(boxes[3].xpos,boxes[3].ypos+50,boxes[5].xpos+100,boxes[5].ypos+50)\n end = true;\n }\n if((boxes[6].val + boxes[7].val + boxes[8].val) == 3 || (boxes[6].val + boxes[7].val + boxes[8].val) == 15)\n {\n console.log('someone win');\n line(boxes[6].xpos,boxes[6].ypos+50,boxes[8].xpos+100,boxes[8].ypos+50)\n end = true;\n }\n \n //vertical win checks\n if((boxes[0].val + boxes[3].val + boxes[6].val) == 3 || (boxes[0].val + boxes[3].val + boxes[6].val) == 15)\n {\n console.log('someone win');\n line(boxes[0].xpos+50,boxes[0].ypos,boxes[6].xpos+50,boxes[6].ypos+100)\n end = true;\n }\n if((boxes[1].val + boxes[4].val + boxes[7].val) == 3 || (boxes[1].val + boxes[4].val + boxes[7].val) == 15)\n {\n console.log('someone win');\n line(boxes[1].xpos+50,boxes[1].ypos,boxes[7].xpos+50,boxes[7].ypos+100)\n end = true;\n }\n if((boxes[2].val + boxes[5].val + boxes[8].val) == 3 || (boxes[2].val + boxes[5].val + boxes[8].val) == 15)\n {\n console.log('someone win');\n line(boxes[2].xpos+50,boxes[2].ypos,boxes[8].xpos+50,boxes[8].ypos+100)\n end = true;\n }\n //diagonal win check \n if((boxes[0].val + boxes[4].val + boxes[8].val) == 3 || (boxes[0].val + boxes[4].val + boxes[8].val) == 15)\n {\n console.log('someone win');\n line(boxes[0].xpos,boxes[0].ypos,boxes[8].xpos+100,boxes[8].ypos+100)\n end = true;\n }\n if((boxes[2].val + boxes[4].val + boxes[6].val) == 3 || (boxes[2].val + boxes[4].val + boxes[6].val) == 15)\n {\n console.log('someone win');\n line(boxes[2].xpos+100,boxes[2].ypos,boxes[6].xpos,boxes[6].ypos+100)\n end = true;\n }\n \n \n}", "title": "" }, { "docid": "89b07111acdb9956b0105319965a47fb", "score": "0.57543963", "text": "function isFull(position)\n{\n\treturn(board[position]==null);\n}", "title": "" }, { "docid": "edb8a50421cc49f6f8404daf7f232621", "score": "0.5747822", "text": "drawBoard() {\n for (let y = 0; y < this.tetris.board.height; y++) {\n for (let x = 0; x < this.tetris.board.width; x++) {\n let id = this.tetris.board.getCell(x, y);\n if (id !== this.tetris.board.EMPTY) {\n this.drawBlock(this.ctxGame, id, x * this.size, y * this.size);\n }\n }\n }\n }", "title": "" }, { "docid": "e8538c8cb428073c71ca363921218300", "score": "0.5747282", "text": "hasCollision() {\n const { y: pieceY, x: pieceX, blocks } = this.activePiece;\n\n for (let y = 0; y < blocks.length; y++) {\n for (let x = 0; x < blocks[y].length; x++) {\n if (\n blocks[y][x] && \n ((this.playfield[pieceY + y] === undefined || this.playfield[pieceY + y][pieceX + x] === undefined) ||\n this.playfield[pieceY + y][pieceX + x])\n ) {\n return true;\n }\n }\n }\n return false;\n }", "title": "" }, { "docid": "2e6df30d91ddd73df02a469238cd8195", "score": "0.5745684", "text": "function checkForFullRow() {\r\n\tvar full = true;\r\n\tfor(var i = minColl; i <= maxColl; i++) {\r\n\t\tif(matrix[maxRow][i] !== 1) full = false;\r\n\t}\r\n\tif(full) {\r\n\t\tclearLastRow();\r\n\t\trepositionBlocks();\r\n\t}\r\n}", "title": "" }, { "docid": "b8d5bfed75c3cf334bf075f56d927055", "score": "0.5744885", "text": "function gameIsDraw() {\n for (var y = 0; y <= 5; y++) {\n for (var x = 0; x <= 6; x++) {\n if (board[y][x] === 0) {\n return false;\n }\n }\n }\n // No locations were empty. Return true to indicate that the game is a draw.\n return true;\n}", "title": "" }, { "docid": "4b94f51fe45b5a7a2e7c835d1074f157", "score": "0.5744586", "text": "function isSquareOccupied(i, j) {\n var sq = document.getElementById(String(i) + String(j));\n if (sq.querySelector(\".piece\") != null) {\n return true; // square occupied\n }\n return false; // square empty\n}", "title": "" }, { "docid": "fbbc129b22e6731a30dc6f69aa865779", "score": "0.57373345", "text": "function isFull (grid) {\n for(var i = 0; i < NB_ROW; i++){\n if(canDropToken(grid, i)){\n return false;\n }\n }\n return true;\n}", "title": "" }, { "docid": "817986c2f8ccca8437e7281d43b49ce7", "score": "0.57354534", "text": "function checkGameOver() {\r\n for (var i = 0; i < gBoard.length; i++) {\r\n for (var j = 0; j < gBoard[i].length; j++) {\r\n var cell = gBoard[i][j]\r\n if (!cell.isShown) {\r\n if (cell.isMarked) {\r\n if (!cell.isMine) return false;\r\n } else {\r\n return false\r\n }\r\n }\r\n }\r\n }\r\n return true\r\n}", "title": "" }, { "docid": "d5275786dd4206ff962345ac6a34fb1e", "score": "0.5733633", "text": "function clickBox() {\nvar id = []\n\n\tid.push(document.getElementById(\"c1_r1\").innerHTML)\n\tid.push(document.getElementById(\"c2_r1\").innerHTML)\n\tid.push(document.getElementById(\"c3_r1\").innerHTML)\n\tid.push(document.getElementById(\"c1_r2\").innerHTML) \n\tid.push(document.getElementById(\"c2_r2\").innerHTML)\n\tid.push(document.getElementById(\"c3_r2\").innerHTML)\n\tid.push(document.getElementById(\"c1_r3\").innerHTML)\n\tid.push(document.getElementById(\"c2_r3\").innerHTML)\n\tid.push(document.getElementById(\"c3_r3\").innerHTML) \n\n// Who is the winner? horizontal wins only\n\tif((id[0] == id[1] && id[1] == id[2]) && id[0] != \"\") {\n\t\tgameEnd();\n\t}\n\n\tif((id[3] == id[4] && id[4] == id[5]) && id[3] != \"\") {\n\t\tgameEnd();\n\t}\n\n\tif((id[6] == id[7] && id[7] == id[8]) && id[6] !=\"\") {\n\t\tgameEnd();\n\t}\n//vertical wins\n\t\n\tif((id[0] == id[3] && id[3] == id[6]) && id[0] !=\"\") {\n\t\tgameEnd();\n\t}\n\n\tif((id[1] == id[4] && id[4] == id[7]) && id[1] !=\"\") {\n\t \tgameEnd();\n\t }\n\n\tif((id[2] == id[5] && id[5] == id[8]) && id[2] !=\"\") {\n\t \tgameEnd();\n\t}\n//diagonal wins\n\tif((id[0] == id[4] && id[4] == id[8]) && id[0] !=\"\") {\n\t\tgameEnd();\n\t}\n\tif((id[2] == id[4] && id[4] == id[6]) && id[2] !=\"\") {\n\t\tgameEnd();\n\t}\n}", "title": "" }, { "docid": "89e1c0373a034a2c7fd6c6214460c5c4", "score": "0.57307535", "text": "function check_for_isolated_squares(squares_pos) {\r\n\t//console.log(squares_pos);\r\n\tlet isolated = false;\r\n\tfor(let i in squares_pos) {\r\n\t\tif(squares_pos[i].x == -1 || squares_pos[i].y == -1) {\r\n\t\t\tconsole.log(\"Isolated square: \" + i);\r\n\t\t\tisolated = true;\r\n\t\t}\r\n\t}\r\n\treturn isolated;\r\n}", "title": "" }, { "docid": "809c8411ae9808c804af2aea62fecb28", "score": "0.5727266", "text": "function CornerCheck() {\n //comprobando las esquinas\n if (\n selected[0][0] &&\n called[0][0] &&\n selected[0][3] &&\n called[0][3] &&\n selected[3][0] &&\n called[3][0] &&\n selected[3][3] &&\n called[3][3]\n ) {\n hasWon = true;\n console.log(\"gano en las esquinas\");\n msg = \"Ganaste en las esquinas!\";\n return true;\n }\n}", "title": "" }, { "docid": "09bdba18b768f90e7ee0887224a2fc23", "score": "0.5723313", "text": "function checkPosition() {\n // Für Ameise Schwarz\n for (let i = 0; i < Sem.ant.length; i++) {\n let a = Sem.ant[i];\n // Wenn Ameisen Position auf X - Achse zwischen 567 & 750 \n if (a.x >= 567 && a.x <= 750) {\n // Wenn Ameisen Position auf Y - Achse zwischen 245 & 429\n if (a.y >= 245 && a.y <= 429) {\n // Ruft Funktion für Game Over Screen auf\n gameLost();\n }\n }\n }\n // Für Ameise Braun\n for (let i = 0; i < Sem.antBrown.length; i++) {\n let b = Sem.antBrown[i];\n // Wenn Ameisen Position auf X - Achse zwischen 567 & 750\n if (b.x >= 567 && b.x <= 750) {\n // Wenn Ameisen Position auf Y - Achse zwischen 245 & 429\n if (b.y >= 245 && b.y <= 429) {\n // Ruft Funktion für Game Over Screen auf\n gameLost();\n }\n }\n }\n // Für Ameise Rot\n for (let i = 0; i < Sem.antRed.length; i++) {\n let r = Sem.antRed[i];\n // Wenn Ameisen Position auf X - Achse zwischen 567 & 750\n if (r.x >= 567 && r.x <= 750) {\n // Wenn Ameisen Position auf Y - Achse zwischen 245 & 429\n if (r.y >= 245 && r.y <= 429) {\n // Ruft Funktion für Game Over Screen auf\n gameLost();\n }\n }\n }\n }", "title": "" }, { "docid": "f9f8ab5d032d0cd3d79bb3ad59be3041", "score": "0.57171124", "text": "checkLeftColision() {\n let block = false; // booleano que comprueba si hay un bloque en la columna\n let absPos; // tendra los valores absolutos del bloque\n\n for (let col = 0; col < 4; col++) {\n\n for (let row = 0; row < 4; row++) {\n\n if (this[row][col] === 0) continue; //==== no hay bloque que comprobar ====>>> \n\n block = true; //==== hay un bloque en la columna ====>>>>\n absPos = this._getAbsolutePosition(row, col);\n\n if (this.board[absPos.row][absPos.col - 1] !== 0) return false; //==== un bloque ha chocado con algo ====>>\n }\n\n if (block) return true; //==== todos los bloques han sido testeados y ninguno ha chocado con nada ====>>>>\n }\n }", "title": "" }, { "docid": "b893b875975394a6c17d91b305d0ac6d", "score": "0.57098985", "text": "function isClear(e) {\n try {\n var x = parseInt(e.clientX / particleSize, 10);\n var y = parseInt(e.clientY / particleSize, 10);\n return particles[x][y].fresh=='empty';\n } catch(e) { return true; }\n }", "title": "" }, { "docid": "69cbc5405585982720fa9586b8af3b11", "score": "0.57090193", "text": "function valid_placement(x, y, piece, cell_num)\n{\n if(!cell_num)\n {\n cell_num = 1;\n }\n var hor_step = 0;\n var vert_step = 0;\n if(piece.orientation === \"vert\")\n {\n vert_step = 1;\n }\n else\n {\n hor_step = 1;\n }\n if(on_board(x, y) && PS.data(x, y) === 0)\n { //if empty coord on board\n if(cell_num < piece.hits.length)\n {\n return valid_placement(x + hor_step, y + vert_step, piece, cell_num + 1); //check the next bead in line\n }\n else return true; //last bead checked, all clear\n }\n else\n {\n PS.statusText(\"Fails at \" + x + \",\" + y);\n return false;//not a free space\n }\n}", "title": "" }, { "docid": "5e8e540eea92d3f323349819623777b8", "score": "0.57081074", "text": "checkHobbies() {\r\n if (this.posX < this.width * 0.37 && this.posY < 150) {\r\n return true;\r\n }\r\n return false;\r\n }", "title": "" }, { "docid": "533f60da92384e80d77b5bbe50a70d6f", "score": "0.5706974", "text": "function all_boxes_filled(theForm){\n var length = theForm.length; // whoa, my intuition from 40 is to pull this out of\n // the loop for performance...but does it\n // matter for web stuff?\n for (var i = 0; i < length; i++) {\n if (theForm.elements[i].value == \"\") {\n return false;\n }\n }\n return true;\n}", "title": "" }, { "docid": "313f49d7f5e586646f4ae905da860ca5", "score": "0.57038766", "text": "isBagEmpty() {\n return this.bag.length == 0\n }", "title": "" }, { "docid": "71087c1f5071f71cea6810f8e98f4269", "score": "0.57002145", "text": "function rc(){\n \n var boxes=document.getElementsByClassName('box');\n var tar=document.querySelectorAll('.it');\n \n let grid=[[tar[0],tar[1],tar[2],tar[3],tar[4]],\n [tar[5],tar[6],tar[7],tar[8],tar[9]],\n [tar[10],tar[11],tar[12],tar[13],tar[14]],\n [tar[15],tar[16],tar[17],tar[18],tar[19]],\n [tar[20],tar[21],tar[22],tar[23],tar[24]]\n ]\n\n for(let i=0;i<5;++i){\n for(let j=0;j<5;++j){\n if(grid[i][j]===ob1){\n x= [i , j ];}\n } \n } \n \n //var chk=document.querySelector('#empty');\n var chk=ob2;\n for(let i=0;i<5;++i){\n for(let j=0;j<5;++j){\n if(grid[i][j]===chk){\n y= [i , j ];} \n }\n }\n }", "title": "" }, { "docid": "85380f6db5fcb02eb7d14bd2870eb26e", "score": "0.56967324", "text": "function checkGameBoardIsFull()\n {\n var isFull = true;\n \n $('.game-cell-input').each(function(){\n isFull = !!($(this).val()) && isFull;\n });\n \n return isFull;\n }", "title": "" }, { "docid": "edf8b0a15396a120c2cdc3fb36b5671e", "score": "0.5694336", "text": "function find_box(blue_piece_object)\n{\n $(\"#in_function\").html(\"find_box\");\n var return_val=null;\n var extra_space=4;\n\n //iterate through all the div boxes\n $(\"div.box\").each(function(index,value)\n {\n //variables\n var boxL=value.offsetLeft;\n var boxT=value.offsetTop;//-$(\"#checkers\").offset().top;\n var boxWidth=value.offsetWidth;\n var pieceL=blue_piece_object.left;\n var pieceT=blue_piece_object.top;\n\n //compare if the left and top positions of the blue-pieve are within one of the boxes\n if(pieceL>(boxL-extra_space) && (pieceL+blue_piece_object.width)<=(boxL+boxWidth+extra_space))\n {\n if((boxT-extra_space)<pieceT && (boxT+boxWidth+extra_space)>=(pieceT+blue_piece_object.width))\n {\n //alert(value.id+\": Collision\");\n\n return_val=value.id;\n $(\"#on_box\").html(\"Box: \"+return_val);\n }\n }\n });\n\n //if(return_val==null)\n // alert(\"Move to your correct spot!\");\n\n return return_val;\n}", "title": "" }, { "docid": "fc9d01268ccad64e8aac15645d951140", "score": "0.56938744", "text": "function isFull() {\n for (var i = 0; i < 4; i++) {\n for (var j = 0; j < 4; j++) {\n // not full if there is a 0\n if (all_numbers[i][j] === 0) {\n return false;\n }\n }\n }\n return true;\n}", "title": "" } ]
b59d6defe3bc2be98ca3f2b8e17d9c53
return all 3x3 sub matrices of a given matrix
[ { "docid": "3df2405b28cc1240c9e43621ab7e7f11", "score": "0.84539753", "text": "function allThreeByThree(matrix){\n let result = []; //stores all submatrix\n let submatrix = []; //stores all resulting submatrices of a given row\n for(let col = 0; col < matrix.length - 2; col++){\n for(let row = 0; row < matrix[col].length - 2; row++){\n submatrix.push(threeByThree(matrix,row,col));\n }\n result.push(submatrix);\n submatrix = [];\n }\n return result;\n }", "title": "" } ]
[ { "docid": "74c72236f76b17c52a2cb157063f06f7", "score": "0.67795384", "text": "function threeByThree(matrix, row, col){\n let result = []; //stores final result\n let r = []; // temporary variable to store an entire row\n for(let i = col; i < col + 3; i++){\n for(let j = row; j < row + 3; j++){\n r.push(matrix[i][j]);\n }\n result.push(r);\n r = [];\n }\n return result;\n }", "title": "" }, { "docid": "a09f63356005bbf39c139c1f9620400d", "score": "0.6580667", "text": "function subMatrix(A, row, column){\n var subMatrix = [];\n for(var i = 0; i<A.length-1; i++){\n subMatrix[i]=[];\n for(var j = 0; j<A[0].length-1; j++){\n subMatrix[i][j]=A[i+((i<row)?0:1)][j+((j<column)?0:1)];\n }\n }\n return(subMatrix);\n}", "title": "" }, { "docid": "7f028134eaabd418657a1aea3d5e026d", "score": "0.61689794", "text": "function get_subtris(tri,M) {\n return [\n [M,tri[1],tri[2]],\n [M,tri[2],tri[0]],\n [M,tri[0],tri[1]]];\n }", "title": "" }, { "docid": "c55370a1e08403b7b5c377f2edcfad84", "score": "0.6060119", "text": "function matrix(x, y, z) {\n\tlet yz=[];\n\tlet result=[];\n\t\tfor(let r=1;r<=y;r++){ \n\t\t\t// y argument Number of items contained within each subarray(s).\n // z argument: Item contained within each subarray(s).\n\t\t\t\t\tyz.push(z);\n\t\t}\n for(let i=1;i<=x;i++){ // x Number of subarrays contained within the main array.\n\t\t result.push(yz);\n\t}\n\treturn result;\n}", "title": "" }, { "docid": "9b0bf6c45d84dbd7de4f1a6c20c0ab10", "score": "0.5868764", "text": "submatrix(row, column) {\n if (row < 0 || row >= this.size) {\n throw new Error(`Invalid row: ${row}`);\n }\n\n if (column < 0 || column >= this.size) {\n throw new Erro(`Invalid column: ${column}`);\n }\n\n let cells = [];\n\n for (let r = 0; r < this.size; ++r) {\n if (r === row) {\n continue;\n }\n let row_cells = [];\n for (let c = 0; c < this.size; ++c) {\n if (c === column) {\n continue;\n }\n row_cells.push(this.cells[r][c]);\n }\n cells.push(row_cells);\n }\n return new Matrix(cells);\n }", "title": "" }, { "docid": "990de9f8c66c782a143e441547efbabf", "score": "0.5812058", "text": "static GetAsMatrix3x3(matrix) {\r\n\t return new Float32Array([\r\n\t matrix.m[0], matrix.m[1], matrix.m[2],\r\n\t matrix.m[4], matrix.m[5], matrix.m[6],\r\n\t matrix.m[8], matrix.m[9], matrix.m[10]\r\n\t ]);\r\n\t }", "title": "" }, { "docid": "990de9f8c66c782a143e441547efbabf", "score": "0.5812058", "text": "static GetAsMatrix3x3(matrix) {\r\n\t return new Float32Array([\r\n\t matrix.m[0], matrix.m[1], matrix.m[2],\r\n\t matrix.m[4], matrix.m[5], matrix.m[6],\r\n\t matrix.m[8], matrix.m[9], matrix.m[10]\r\n\t ]);\r\n\t }", "title": "" }, { "docid": "638c16c5c0ffead1cf8c0926895c4175", "score": "0.5803321", "text": "function sub(arr)\n{\n var subset = [];\n for (var m = 0; m < arr.length-1; m++)\n {\n for (var n = m+1; n<arr.length; n++)\n {\n subset.push([arr[n],arr[m]]);\n }\n }\n return subset;\n}", "title": "" }, { "docid": "207698a24ec2fab169cb14f52292a410", "score": "0.58028215", "text": "static GetAsMatrix3x3(matrix) {\n const m = matrix.m;\n const arr = [\n m[0], m[1], m[2],\n m[4], m[5], m[6],\n m[8], m[9], m[10]\n ];\n return PerformanceConfigurator.MatrixUse64Bits ? arr : new Float32Array(arr);\n }", "title": "" }, { "docid": "3a461343964f517383ebaf9e0a0e74f1", "score": "0.5727207", "text": "function createSubMatrix(theMatrix, startPosition) {\r\n\tsubMatrix = new Array(theMatrix.length - 1);\r\n\tfor (let i = 0; i < subMatrix.length; i++) {\r\n\t\tsubMatrix[i] = new Array(theMatrix.length - 1);\r\n\t\tlet k = 0;\r\n\t\tfor (let j = 0; j <= subMatrix[i].length; j++) {\r\n\t\t\tif (startPosition != j) {\r\n\t\t\t\tsubMatrix[i][k] = theMatrix[i + 1][j];\r\n\t\t\t\tk++;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn subMatrix;\r\n}", "title": "" }, { "docid": "eb0cd09bf8137837dcf761e002e50d9d", "score": "0.55584395", "text": "function subArr(arr,j) {\n\tconst n = arr.length;\n\tlet ans = [];\n\tfor (let r = 1; r < n; r++) {\n\t\tlet row = [];\n\t\tfor (let c = 0; c < n; c++) {\n\t\t\tif (c == j) continue;\n\t\t\trow.push(arr[r][c]);\n\t\t}\n\t\tans.push(row);\n\t}\n\treturn ans;\n}", "title": "" }, { "docid": "eb0cd09bf8137837dcf761e002e50d9d", "score": "0.55584395", "text": "function subArr(arr,j) {\n\tconst n = arr.length;\n\tlet ans = [];\n\tfor (let r = 1; r < n; r++) {\n\t\tlet row = [];\n\t\tfor (let c = 0; c < n; c++) {\n\t\t\tif (c == j) continue;\n\t\t\trow.push(arr[r][c]);\n\t\t}\n\t\tans.push(row);\n\t}\n\treturn ans;\n}", "title": "" }, { "docid": "4576ca1e7997432a7881d53b94ba0d17", "score": "0.5474667", "text": "function clone(mat) {\n\t let result = [];\n\t for (let i = 0; i < mat.length; i++) {\n\t result.push(mat[i].slice(0));\n\t }\n\t return result;\n\t}", "title": "" }, { "docid": "eabd1603db9f818baf4d04d8698803ef", "score": "0.5448509", "text": "function magicMatrices(matrix) {\n let rowSum = [];\n let colSum = [];\n for (let i = 0; i < matrix.length; i++) {\n let row = matrix[i];\n let sum = row.reduce((acc, val) => (acc + val), 0);\n rowSum.push(sum);\n }\n\n\n for (let i = 0; i < matrix.length; i++) {\n let row = matrix[i];\n let newRow = [];\n\n for (let j = 0; j < matrix.length; j++) {\n let index = matrix.length - 1 - j;\n newRow.push(matrix[index][i]);\n }\n let sum = newRow.reduce((acc, val) => (acc + val), 0);\n colSum.push(sum);\n }\n return rowSum.concat(colSum).every((el, i, arr) => el === arr[0]);\n}", "title": "" }, { "docid": "23ea184e81d5d721384b7da2bbbf8353", "score": "0.54237056", "text": "getThreeByThree(i, j) {\n let r = [];\n for (let x = 0; x < 3; x++) {\n for (let y = 0; y < 3; y++) {\n r.push(this.current[x + 3 * i][y + 3 * j])\n }\n }\n return r\n }", "title": "" }, { "docid": "c93781ee80318771ce3d27183a9665e5", "score": "0.5355207", "text": "function flatten (matrix) {\n return matrix.reduce((acc, el, i) => {\n return acc.concat(Array.isArray(el) ? flatten(el) : el )\n }, [])\n}", "title": "" }, { "docid": "fd68892ad29c175fca7d0ca526b2817b", "score": "0.5324675", "text": "function getSubGrid(grid, row, col, n){\n let sub = Grid(n);\n for(let i = row; i < row + n; i++){\n for(let j = col; j < col + n; j++){\n sub[i-row][j-col] = grid[i][j];\n }\n }\n return sub;\n}", "title": "" }, { "docid": "76ffe80578ced7f763d3d79a84b3085b", "score": "0.52995193", "text": "getSubArray(c){\n checkIntArgs(c);\n const data = MeshGrid.allocate(this.length, this.type);\n for(let i = 0; i < this.length; ++i)\n data[i] = this.data[i * this.channels + c];\n return data;\n }", "title": "" }, { "docid": "b940b2c31abca5e185d4aea80821f5ba", "score": "0.5298957", "text": "function subGridGenerator (value) {\n for (let i = value * 3; i < (value * 3) + 3; i++) {\n let curArray = sudokuGrid[i];\n temporaryGrid.push(curArray)\n }\n \n for (let j = 0; j < temporaryGrid.length; j++) {\n let curArray2 = temporaryGrid[j];\n let startIdx = x * 3\n let endIdx = startIdx + 3\n let finalArray = curArray2.slice(startIdx, endIdx);\n finalSubGrid = finalSubGrid.concat(...finalArray)\n }\n return finalSubGrid;\n }", "title": "" }, { "docid": "882f64b2a902b0f733f13d983d1c47aa", "score": "0.5292472", "text": "function findSubsets(arr) {\n let subsets = [];\n subsets.push([]);\n for (let i = 0; i < arr.length; i++) {\n let currentNumber = arr[i];\n let n = subsets.length;\n for (let j = 0; j < n; j++) {\n let subsetsCopy = subsets[j].slice(0);\n subsetsCopy.push(currentNumber);\n subsets.push(subsetsCopy);\n }\n }\n return subsets;\n}", "title": "" }, { "docid": "1e8f48d2aa4aa7a5b0f206d48627b9c1", "score": "0.5286413", "text": "function arraySubsets(arr) {\n\n}", "title": "" }, { "docid": "dc61832a65edcb1bf451b825c29de015", "score": "0.52470195", "text": "function subsets(arr){\n if (arr.length === 0) { \n return [[]];\n } \n\n let arrSub = []; \n let arrWithoutFirst = arr.slice(1);\n let arrWithoutFirstSub = subsets(arrWithoutFirst);\n\n for (let i = 0; i < arrWithoutFirstSub.length; i++){\n arrSub.push(arrWithoutFirstSub[i]);\n arrSub.push([arr[0]].concat(arrWithoutFirstSub[i]));\n }\n return arrSub;\n}", "title": "" }, { "docid": "76be43756334c6736ad965927fe7681e", "score": "0.52416235", "text": "function spiralTraversal (matrix) {\n var temp = [];\n var clone = matrix.slice();\n var result = [];\n function recurse (array) {\n if(array.length > 0){\n for(var i = 0; i < array[0].length; i++){\n temp.push(array[0][i]);\n }\n }\n array.shift();\n if(array.length > 0){\n for(var i = 0; i < array.length; i++){\n temp.push(array[i][array[i].length - 1]);\n array[i].pop();\n }\n }\n if(array.length > 0){\n for(var i = array[array.length-1].length - 1; i >= 0; i--){\n temp.push(array[array.length-1][i]);\n }\n }\n array.pop();\n if(array.length > 0){\n for(var i = array.length - 1; i >= 0; i--){\n temp.push(array[i][0]);\n array[i].shift();\n }\n }\n if(array.length > 0){\n recurse(array);\n }\n }\n recurse(matrix);\n for(var i = 0; i < (clone.length * clone[0].length); i++){\n result.push(temp[i]);\n }\n return result;\n}", "title": "" }, { "docid": "88d9f559dedce8897bc587b209865145", "score": "0.5180831", "text": "function cubeMatrix(m, n, r, offset) {\r\n let boxes = new THREE.Object3D();\r\n let side = 1.0;\r\n offset = offset !== undefined ? offset : 2.0;\r\n let geom = new THREE.CubeGeometry(side, side, side);\r\n mat = new THREE.MeshLambertMaterial({transparent: true});\r\n let xMin = -offset * ((m-1) / 2.0);\r\n let yMin = -offset * ((n-1) / 2.0);\r\n let zMin = -offset * ((r-1) / 2.0);\r\n for (let i = 0, x = xMin; i < m; i++, x += offset) {\r\n for (let j = 0, y = yMin; j < n; j++, y += offset) {\r\n for (let k = 0, z = zMin; k < r; k++, z += offset) {\r\n let box = new THREE.Mesh(geom, mat)\r\n box.position.x = x;\r\n box.position.y = y;\r\n box.position.z = z;\r\n boxes.add(box);\r\n }\r\n }\r\n }\r\n return boxes;\r\n}", "title": "" }, { "docid": "f7a47113ef82e2dffca60ed49be6d6c0", "score": "0.517119", "text": "function cutArray(array, left, top, right, bottom) {\n var cutArray = Array.matrix(right-left, bottom-top, undefined);\n var i,j;\n\n for(i = left; i < right; i++) {\n for(j = top; j < bottom; j++) {\n cutArray[i-left][j-top] = array[i][j];\n }\n }\n \n return cutArray;\n}", "title": "" }, { "docid": "326ff1fcc92cee216adc56deec0cc2f2", "score": "0.51601475", "text": "function rotateMatrix(x){\n\n var arraylength = x.length\n var subArraylength = x[0].length\n\n for(i=0;i<arraylength-Math.floor(arraylength/2);i++){\n\n for(j=0;j<subArraylength;j++){\n \n temp = x[i][j]\n x[i][j] = x[arraylength-i-1][j]\n x[arraylength-i-1][j] = temp\n \n } \n\n }\n console.log(x)\n\n var count = 0\n \n for(i=0;i<arraylength-1;i++){\n\n for(j=0;j<subArraylength;j++){\n\n if( j+count == subArraylength ){\n\n break;\n\n }\n\n temp = x[i][j+count]\n x[i][j+count] = x[j+count][i]\n x[j+count][i] = temp\n\n }\n\n count++\n \n }\n console.log(x)\n\n if( arraylength > subArraylength ){\n\n\n for(i=0;i<subArraylength;i++){\n\n x[i][subArraylength] = x[arraylength-1][i]\n\n }\n\n x.pop();\n\n }\n\n // if ( arraylength < subArraylength ){\n\n // var count = 0\n\n // for(i=0;i<subArraylength;i++){\n\n // for(j=0;j<arraylength;j++){\n\n // temp = x[i][j]\n // x[i][j] = x[j][i]\n // x[j][i] = temp\n \n // }\n\n\n // }\n // }\n\n return x;\n\n}", "title": "" }, { "docid": "b9afe34d8221327994f85a600c277e32", "score": "0.5153933", "text": "function slice3d_(x, begin, size) {\n const $x = (0, _tensor_util_env.convertToTensor)(x, 'x', 'slice3d');\n util.assert($x.rank === 3, () => `slice3d expects a rank-3 tensor, but got a rank-${$x.rank} tensor`);\n return slice($x, begin, size);\n}", "title": "" }, { "docid": "377bf9da5593af1362de5de2b8aa6fea", "score": "0.513767", "text": "flatten(matrix) {\n return matrix.reduce((flat, el) => {\n if(typeof el === 'object') {\n return flat.concat(this.flatten(el));\n }\n\n return flat.concat(el);\n }, []); \n }", "title": "" }, { "docid": "1393d12eb501b239f744f67d0978a238", "score": "0.5118159", "text": "function embed(mat, rows, cols) {\r\n var r = mat.rows;\r\n var c = mat.columns;\r\n if ((r === rows) && (c === cols)) {\r\n return mat;\r\n } else {\r\n var resultat = Matrix.zeros(rows, cols);\r\n resultat = resultat.setSubMatrix(mat, 0, 0);\r\n return resultat;\r\n }\r\n }", "title": "" }, { "docid": "16b7b5b202506aec232d9c0614e23e45", "score": "0.5104783", "text": "function matrixOfCofactors(matrix) {\n for (ii = 0; ii < matrix.length; ii++) {\n for (jj = 0; jj < matrix[ii].length; jj++) {\n if ((ii + jj)%2 != 0) {\n matrix[ii][jj] *= -1\n }\n }\n }\n return matrix\n}", "title": "" }, { "docid": "bc947fda3dd76cbc7cda0524f5f5515f", "score": "0.50915784", "text": "function checkConflicts(matrix) {\n markAllWithoutConflict(matrix)\n\n // check horizontal lines\n for (let i = 0; i < 9; i++) {\n let arr = [];\n for (let j = 0; j < 9; j++) {\n arr.push(matrix[i][j])\n }\n checkSubset(arr)\n }\n\n // check vertical lines\n for (let j = 0; j < 9; j++) {\n let arr = [];\n for (let i = 0; i < 9; i++) {\n arr.push(matrix[i][j])\n }\n checkSubset(arr)\n }\n\n // check squares\n let c = matrix\n checkSubset([c[0][0], c[0][1], c[0][2], c[1][0], c[1][1], c[1][2], c[2][0], c[2][1], c[2][2]])\n checkSubset([c[3][0], c[3][1], c[3][2], c[4][0], c[4][1], c[4][2], c[5][0], c[5][1], c[5][2]])\n checkSubset([c[6][0], c[6][1], c[6][2], c[7][0], c[7][1], c[7][2], c[8][0], c[8][1], c[8][2]])\n\n checkSubset([c[0][3], c[0][4], c[0][5], c[1][3], c[1][4], c[1][5], c[2][3], c[2][4], c[2][5]])\n checkSubset([c[3][3], c[3][4], c[3][5], c[4][3], c[4][4], c[4][5], c[5][3], c[5][4], c[5][5]])\n checkSubset([c[6][3], c[6][4], c[6][5], c[7][3], c[7][4], c[7][5], c[8][3], c[8][4], c[8][5]])\n\n checkSubset([c[0][6], c[0][7], c[0][8], c[1][6], c[1][7], c[1][8], c[2][6], c[2][7], c[2][8]])\n checkSubset([c[3][6], c[3][7], c[3][8], c[4][6], c[4][7], c[4][8], c[5][6], c[5][7], c[5][8]])\n checkSubset([c[6][6], c[6][7], c[6][8], c[7][6], c[7][7], c[7][8], c[8][6], c[8][7], c[8][8]])\n}", "title": "" }, { "docid": "b5c2d0bd723b9b7e3af23a70d77d24d6", "score": "0.50887233", "text": "function matrixSubtraction(matrix, matrix2) {\n var newMatrix = [] ;\n for (i = 0; i < matrix.length; i++) {\n\tnewMatrix[i] = [] ;\n for (j = 0; j < matrix2[0].length; j++) {\n \t var calculus = 0 ;\n\t for (k = 0; k < matrix[0].length; k++) {\n calculus = matrix2[i][j] - matrix[i][j] ;\n\t }\n\t newMatrix[i][j] = calculus ;\n }\n }\n return newMatrix\n}", "title": "" }, { "docid": "d60d0536c2d3325e65d4c839b19902f0", "score": "0.5079217", "text": "function matrix_flatten(M)\r\n{\r\n return ([].concat.apply([], M));\r\n}", "title": "" }, { "docid": "d60d0536c2d3325e65d4c839b19902f0", "score": "0.5079217", "text": "function matrix_flatten(M)\r\n{\r\n return ([].concat.apply([], M));\r\n}", "title": "" }, { "docid": "854ab749f5464b062b0830306bd142d6", "score": "0.50772554", "text": "function getAllSubsets(array) {\n\n const result = [];\n\n rec(0, array, [], result);\n\n return result;\n}", "title": "" }, { "docid": "b363c8b6a5bb0650aa9ec86484e0c3a5", "score": "0.5068715", "text": "static get matrix() {}", "title": "" }, { "docid": "51d59611af86c69b268edbd1bf522540", "score": "0.5064527", "text": "function transpose(matrix) {\n let result = matrix[0].slice()\n return result.map((element, colIndex) => matrix.map((value, rowIndex) => matrix[rowIndex][colIndex]));\n}", "title": "" }, { "docid": "b5c15bd8f834c26eb18a930389face9e", "score": "0.50557876", "text": "function transpose(matrix) {\n \n const COLUMN = matrix.length;\n const ROW = matrix[0].length;\n\n let newMatrix = [];\n for (let index = 0; index < ROW; index += 1) {\n let subMatrix = [];\n for (let subIndex = 0; subIndex < COLUMN; subIndex += 1) {\n subMatrix.push(matrix[subIndex][index]);\n }\n newMatrix.push(subMatrix);\n }\n return newMatrix;\n}", "title": "" }, { "docid": "3ca2436f8183b0290fdd5171dc6aa290", "score": "0.5054711", "text": "function subArr(arr) {\n let result = [];\n\n for(let subArrLen = 1; subArrLen <= arr.length; subArrLen++) {\n for(let subArrStart = 0; subArrStart+subArrLen <= arr.length; subArrStart++) {\n result.push(arr.slice(subArrStart, subArrStart+subArrLen));\n }\n }\n\n return result;\n}", "title": "" }, { "docid": "7fd35f07d01c427b5bec77c959666e0e", "score": "0.5042804", "text": "function matrix_flatten(M)\n{\n return ([].concat.apply([], M));\n}", "title": "" }, { "docid": "7fd35f07d01c427b5bec77c959666e0e", "score": "0.5042804", "text": "function matrix_flatten(M)\n{\n return ([].concat.apply([], M));\n}", "title": "" }, { "docid": "7fd35f07d01c427b5bec77c959666e0e", "score": "0.5042804", "text": "function matrix_flatten(M)\n{\n return ([].concat.apply([], M));\n}", "title": "" }, { "docid": "af175232360d8211a42d6ee8a8349181", "score": "0.50304836", "text": "function getSection(puzzle, colNum, rowNum) {\n let array = [];\n\n for (let i = rowNum * 3; i < (rowNum + 1) * 3; i++) {\n for (let j = colNum * 3; j < (colNum + 1) * 3; j++) {\n array.push(puzzle[i][j]);\n }\n }\n return array;\n}", "title": "" }, { "docid": "cf7f5e6a7457a4b366f48986c51bbde6", "score": "0.50136095", "text": "testSub() {\n console.info('test Matrix3.sub()')\n const a = [\n 1, 2, 3,\n 4, 5, 6,\n 7, 8, 9\n ]\n const b = [\n 10, 11, 12,\n 13, 14, 15,\n 16, 17, 18\n ]\n const expected = [\n -9, -9, -9,\n -9, -9, -9,\n -9, -9, -9\n ]\n const m = new Matrix3(a)\n m.sub(b)\n const actual = m.elements\n this.assertIdentical(actual, expected)\n }", "title": "" }, { "docid": "35a47e5bba0dd2d8fbd6cfe3fbdf1357", "score": "0.5003582", "text": "function formMatrixArray(width, height) {\n\n var ret = [];\n\n for (var x = 0; x < width; x += 1) {\n\n var sub_array = [];\n for (var y = 0; y < height; y += 1) {\n sub_array.push(0);\n }\n\n ret.push(sub_array);\n }\n\n return ret;\n}", "title": "" }, { "docid": "9db08ec2e425740df7cb52528834ac25", "score": "0.49914262", "text": "function rotateLayer(matrix, layer) {\n let top = layer\n let right = matrix.length - 1 - layer\n let bottom = matrix.length - 1 - layer\n let left = i = matrix.length - 1 - layer\n while (top < matrix.length - layer) {\n //console.log(matrix[right][matrix.length - 1 - layer]) // top\n //console.log(matrix[layer][top]) // right\n //console.log(matrix[matrix.length - 1 - layer][bottom]) // bottom\n //console.log(matrix[left][layer]) // left\n let temp_top = matrix[layer][top]\n matrix[layer][top] = matrix[right][matrix.length - 1 - layer] // set top to right\n matrix[right][matrix.length - 1 - layer] = temp_top // set right to top\n\n let temp_left = matrix[left][layer]\n matrix[left][layer] = matrix[matrix.length - 1 - layer][bottom] // set left to bottom\n matrix[matrix.length - 1 - layer][bottom] = temp_left // set bottom to left\n\n console.log(matrix)\n top++\n right--\n bottom--\n left--\n }\n}", "title": "" }, { "docid": "bcf260841daaff02bb93ee898397d4c9", "score": "0.498341", "text": "function chunk(arr, size) {\n var multidimArray = [];\n for (i = 0; i < arr.length / size; ++i) {\n multidimArray[i] = [];\n for (j = 0; j < size; ++j) {\n if (arr[i*size +j] === undefined) {\n return multidimArray;\n }\n multidimArray[i][j] = arr[(i * size) + j];\n }\n }\n return multidimArray;\n}", "title": "" }, { "docid": "9c16847ebb4a6a3b80c46be4fc6db3b4", "score": "0.4979126", "text": "function subsets(arr) {\n if (arr.length === 0) {return [[]]};\n\n let first = arr[0];\n let subs = subsets(arr.slice(1));\n let newSubs = subs.map( sub => sub.concat([first]));\n return subs.concat(newSubs);\n}", "title": "" }, { "docid": "fd93b49c9dee0bb175890ca1ea2badf2", "score": "0.49586147", "text": "function matrixize(array, size) {\n var matrix = [];\n for (var i = 0; i < array.length; i += size) matrix.push(array.slice(i, i + size));\n return matrix;\n}", "title": "" }, { "docid": "3983cd1a5c1d73ecfbb7e398205f89ca", "score": "0.4955154", "text": "function matrix(n) {\n\tlet result = [];\n\tfor (let i =0; i < n; i++) {\n\t\tresult.push([]);\n\t}\n\tlet counter = n*n;\n\tlet startRow = 0;\n\tlet endRow = n - 1;\n\tlet startCol = 0;\n\tlet endCol = n -1;\n\n\twhile(startRow <= endRow && startCol <= endCol) {\n\t\tfor(let col = startCol; col <= endCol; col++) {\n\t\t\tresult[startRow][col] = counter;\n\t\t\tcounter--;\n\t\t}\n\t\tstartRow++;\n\t\tfor(let row = startRow; row <= endRow; row++) {\n\t\t\tresult[row][endCol] = counter;\n\t\t\tcounter--;\n\t\t}\n\t\tendCol--;\n\t\tfor(let col = endCol; col >= startCol; col--) {\n\t\t\tresult[endRow][col] = counter;\n\t\t\tcounter--;\n\t\t}\n\t\tendRow--;\n\t\tfor(let row = endRow; row >= startRow; row--) {\n\t\t\tresult[row][startCol] = counter;\n\t\t\tcounter--;\n\t\t}\n\t\tstartCol++;\n\t}\n\treturn result;\n}", "title": "" }, { "docid": "0083a9874e011f0050353f51b9e4fe77", "score": "0.494966", "text": "function selectSubMatrix(start, end) {\n $(\".input-cell.selected\").removeClass(\"selected top-selected down-selected left-selected right-selected\");\n for (let i = Math.min(start.rowID, end.rowID); i <= Math.max(start.rowID, end.rowID); i++) {\n for (let j = Math.min(start.colID, end.colID); j <= Math.max(start.colID, end.colID); j++) {\n let [top, left, down, right] = getAdjacentCells(i, j);\n let currentCell = $(`#row-${i}-col-${j}`)[0];\n selectCell(currentCell, { ctrlKey: true }, top, left, down, right);\n }\n }\n}", "title": "" }, { "docid": "81b52154553824301a11b382c2610cbf", "score": "0.49463826", "text": "function printArray3d(arr) {\r\n // convert in one-dimensional array from 3 dimensional array\r\n let arr1 = [];\r\n for (let i = 0; i < arr.length; i++) {\r\n for (let j = 0; j < arr[i].length; j++) {\r\n for (let k = 0; k < arr[j].length; k++) {\r\n // arr1.push(arr[i][j][k]);\r\n arr1 = arr[i][j][k];\r\n console.log(arr1);\r\n }\r\n }\r\n }\r\n}", "title": "" }, { "docid": "37f4f2fceb8a425eab808c21ccf8882f", "score": "0.49438995", "text": "function subsets (array) {\n if (array.length === 0) {\n return [[]];\n }\n\n let prev = subsets(array.slice(0, array.length - 1));\n return prev.concat(prev.map(el => el.concat(array[array.length - 1])));\n}", "title": "" }, { "docid": "c3ed835690f54e67888a5e3ad1052cad", "score": "0.49349892", "text": "function rotateMatrix(matrix) {\n\tfor (var i = 0; i < matrix.length / 2; i++) {\n\t\tvar last = matrix.length - 1 - i;\n\t\tfor (var j = i; j < last; j++) {\n\t\t\tvar offset = j - i;\n\t\t\tvar top = matrix[i][j];\n\t\t\tmatrix[i][j] = matrix[last - offset][i];\n\t\t\tmatrix[last - offset][i] = matrix[last][last - offset];\n\t\t\tmatrix[last][last - offset] = matrix[j][last];\n\t\t\tmatrix[j][last] = top;\n\t\t}\n\t}\n\n\treturn matrix;\n}", "title": "" }, { "docid": "37e3df83ea4a0fc0ac7cee87f355aafc", "score": "0.49281427", "text": "function matrixDivision(matrix, matrix2) {\n var newMatrix = [] ;\n for (i = 0; i < matrix.length; i++) {\n\tnewMatrix[i] = [] ;\n for (j = 0; j < matrix2[0].length; j++) {\n \t var calculus = 0 ;\n\t for (k = 0; k < matrix[0].length; k++) {\n calculus = matrix2[i][j] / matrix[i][j] ;\n\t }\n\t newMatrix[i][j] = calculus ;\n }\n }\n return newMatrix\n}", "title": "" }, { "docid": "d1bd972b534fb78c6a7548e8011c7349", "score": "0.4925734", "text": "static putMatrix3D(matrix) {\n if (matrix) Pool.sMatrices3D[Pool.sMatrices3D.length] = matrix\n }", "title": "" }, { "docid": "5375c43dd88d95087145e789166dd5df", "score": "0.49248138", "text": "function split(){\n if(N > 3){\n return;\n }\n let next_cubes = [];\n for(let j = 0; j < cubes.length; ++j){\n let cube = cubes[j];\n let new_cubes = cube.split();\n for(let k = 0; k < new_cubes.length; ++k){\n next_cubes.push(new_cubes[k]);\n }\n }\n cubes = next_cubes;\n}", "title": "" }, { "docid": "ed3cc2b716b02abfe92a97778599e59e", "score": "0.49238107", "text": "static transpose(matrix){\n \tlet height = matrix.length\n let width = matrix[0].length\n if(width == undefined){\n \twidth = height\n \theight = 1\n matrix = [matrix]\n }\n let result = Vector.make_matrix(width, height)\n for(var i = 0; i < width; i++){\n \tfor(var j = 0; j < height; j++){\n \t\tresult[i][j] = matrix[j][i]\n \t}\n }\n if(result.length == 1){\n \treturn result[0]\n }else{\n \treturn result\n }\n }", "title": "" }, { "docid": "c1b0ba526c5d30a8b883c0633118718e", "score": "0.49196264", "text": "function subsets(nums) {\n const sets = [];\n generateSets([], 0);\n\n function generateSets(curr, index) {\n sets.push(curr);\n for (let i = index; i < nums.length; i++)\n generateSets([...curr, nums[i]], i + 1);\n }\n return sets;\n}", "title": "" }, { "docid": "51b2309e35529472f5ace456a2386a75", "score": "0.49131882", "text": "function embed(mat, rows, cols) {\n var r = mat.rows;\n var c = mat.columns;\n\n if (r === rows && c === cols) {\n return mat;\n } else {\n var resultat = AbstractMatrix.zeros(rows, cols);\n resultat = resultat.setSubMatrix(mat, 0, 0);\n return resultat;\n }\n } // Make sure both matrices are the same size.", "title": "" }, { "docid": "7f169fa818de6b940c428e22c93de36b", "score": "0.48962244", "text": "function transpose(matrix) {\n var newMatrix = []\n for (var ii = 0; ii < matrix.length; ii++) {\n newMatrix.push([])\n for (var jj = 0; jj < matrix.length; jj++) {\n newMatrix[ii].push(matrix[jj][ii])\n }\n }\n return newMatrix\n}", "title": "" }, { "docid": "f2070ba0e454e20ff180b33262471951", "score": "0.48942056", "text": "function rotateMatrix(matrix) {\n var min = 0;\n var max = matrix.length - 1;\n while (min < max ) {\n var top = [];\n for (var i = min; i < max; i++) {\n top = matrix[min][i];\n matrix[min][i] = matrix[max - i + min][min];\n matrix[max - i + min][min] = matrix[max][max - i + min];\n matrix[max][max - i + min] = matrix[i][max];\n matrix[i][max] = top;\n }\n min++;\n max--;\n }\n return matrix;\n}", "title": "" }, { "docid": "e6eb368e0bda65ed8b83ec9e85cedd5c", "score": "0.48928294", "text": "function matrix(n) {\n // Create empty array of arrays\n const results = [];\n\n for(let i = 0; i < n; i++) {\n results.push([]);\n }\n\n // Create counter, start/end column, start/end row variables\n let counter = 1;\n let startColumn = 0;\n let endColumn = n - 1;\n let startRow = 0;\n let endRow = n - 1;\n\n // While start column <= end column and start row <= end row\n while(startColumn <= endColumn && startRow <= endRow) {\n // 4 for loops will be responsible for each side\n\n // Top row (left to right)\n for(let i = startColumn; i <= endColumn; i++) {\n results[startRow][i] = counter;\n counter++;\n }\n // Increment start row\n startRow++;\n\n // Right column (top to bottom)\n for(let i = startRow; i <= endRow; i++) {\n results[i][endColumn] = counter;\n counter++;\n }\n // Decrement end column\n endColumn--;\n\n // Bottom row (right to left)\n for(let i = endColumn; i >= startColumn; i--) {\n results[endRow][i] = counter;\n counter++;\n }\n // Decrement end row\n endRow--;\n\n // Left column (bottom up)\n for(let i = endRow; i >= startRow; i--) {\n results[i][startColumn] = counter;\n counter++;\n }\n startColumn++;\n }\n\n return results;\n}", "title": "" }, { "docid": "1a944343b57317d186a0e320eb8e6650", "score": "0.4886987", "text": "function matrixToArray(matrix) {\n var newArr = [];\n newArr = matrix.reduce(function(accumulator, currentValue) {\n return newArr.concat(accumulator, currentValue)\n });\n return newArr;\n}", "title": "" }, { "docid": "b7756ef2c8731d9ad29fd32c2a00e261", "score": "0.4880328", "text": "function rowSlice(rows, lastIndex){\n return rows.map(row =>{\n let initialIndex = lastIndex - 3\n return row.slice(initialIndex, lastIndex)\n })\n }", "title": "" }, { "docid": "f6c3f7188567500646379032feb12a7b", "score": "0.4873693", "text": "function myTranspose(matrix) {\n const outLength = matrix[0].length;\n const outWidth = matrix.length;\n const outArray = [];\n for (let i = 0; i < outLength; i++) {\n const row = [];\n for (let j = 0; j < outWidth; j++) {\n row.push(matrix[j][i]);\n }\n outArray.push(row);\n }\n return outArray;\n}", "title": "" }, { "docid": "8b33986d96e313d8407c873f26b31095", "score": "0.4867061", "text": "function checkSubSudoku(matrix) {\n for (let i = 0; i < matrix.length ; i++){\n const horizontalVisited = {}\n const verticalVisited = {}\n let horizontalNode, verticalNode\n for(let j = 0; j < matrix.length; j++){\n horizontalNode = matrix[i][j]\n verticalNode = matrix[j][i]\n if(horizontalVisited[horizontalNode] || verticalVisited[verticalNode] || horizontalNode < 1 || horizontalNode > matrix.length){\n return \"INVALID\"\n }else{\n horizontalVisited[horizontalNode] = true\n verticalVisited[verticalNode] = true\n }\n }\n }\n return \"VALID\";\n}", "title": "" }, { "docid": "d7ead16886dbb1b88cd3a1471d49cce2", "score": "0.48623344", "text": "static transpose(matrix) {\n let matrixWidth = matrix.height;\n let matrixHeight = matrix.width;\n let newMatrix = new Matrix(matrixWidth, matrixHeight);\n\n for(let j = 0; j < matrixHeight; j++) {\n for(let i = 0; i < matrixWidth; i++) {\n newMatrix.matrix[i][j] = matrix._matrix[j][i];\n }\n }\n\n return newMatrix\n }", "title": "" }, { "docid": "1ba9f01b5e547f957140834b760d64b7", "score": "0.48552945", "text": "function printMatrix(myMatrix) {\r\n for (var i = 0; i < myMatrix.length; i++) {\r\n for (var j = 0; j < myMatrix[i].length; j++) {\r\n console.log(myMatrix[i][j])\r\n }\r\n }\r\n}", "title": "" }, { "docid": "e5cb59df1eb3bc64060391f887478e10", "score": "0.48540154", "text": "function matrixOfMinors(matrix) {\n var newMatrix = []\n for (var ii = 0; ii < matrix.length; ii++) {\n newMatrix.push([])\n for (var jj = 0; jj < matrix[ii].length; jj++) {\n newMatrix[ii].push(determinant(minor(matrix, ii, jj)))\n }\n }\n return newMatrix\n}", "title": "" }, { "docid": "fcefdda528af70999b373b6790518fba", "score": "0.48438844", "text": "function trans(mat) {\n\t let input = mat;\n\t let s = size(mat);\n\t let output = [];\n\t for (let i = 0; i < s[0]; i++) {\n\t for (let j = 0; j < s[1]; j++) {\n\t if (Array.isArray(output[j])) {\n\t output[j].push(input[i][j]);\n\t } else {\n\t output[j] = [input[i][j]];\n\t }\n\t }\n\t }\n\t return output;\n\t}", "title": "" }, { "docid": "9918b91796730af52b273d4a4565a6bb", "score": "0.4837338", "text": "function rotateMatrix (matrix) {\n var m = matrix.length;\n var n = matrix[0].length;\n var rotated = [];\n matrix.forEach((row, i) => {\n rotated.push([]);\n row.forEach((val, j) => rotated[i][j] = matrix[n - j - 1][i]);\n });\n return rotated;\n}", "title": "" }, { "docid": "87630761e261d278283dcf07e9a090f8", "score": "0.48258945", "text": "function matrixToArray(matrix) {\n \t\treturn matrix.substr(7, matrix.length - 8).split(', ');\n\t\t}", "title": "" }, { "docid": "d40ec4f8171d1a323cd61ed0693a6e63", "score": "0.48234463", "text": "function rankItems(matrix){\n var rankmatrix= new Array(matrix.length);\n for(var i=0; i<matrix.length; i++){\n rankmatrix[i]=rankItem(i,matrix);\n }\n return rankmatrix;\n}", "title": "" }, { "docid": "9a235927966f43e72299dd005bd3351a", "score": "0.48214155", "text": "function matrix(n) {\n var result = Array(n).fill().map(()=> Array(n));\n var counter = 1;\n // console.log(result)\n for(var i = 0; i < Math.round(n / 2 + 0.2); i++){\n //Top\n for(var t = i; t < n - i ; t++){\n result[i][t] = counter++;\n }\n // console.log(result)\n //Right\n for(var r = i+1 ; r < n - i ; r++){\n result[r][n - i - 1] = counter++;\n }\n // console.log(result)\n\n //Bottom\n for(var b = n - i - 2 ; b >= i ; b--){\n result[n - i - 1][b] = counter++;\n }\n // console.log(result)\n //left\n for(var l = n - i -2 ; l >= i + 1; l--){\n result[l][i] = counter++;\n }\n // console.log(result)\n\n\n }\n return result;\n \n}", "title": "" }, { "docid": "60e9d1cd0137a4da146337dce3315d3a", "score": "0.48146224", "text": "function rotate(matrix) {\n\tconst N = matrix.length - 1;\n\tconst result = matrix.map((row, i) =>\n\t\trow.map((val, j) => matrix[N - j][i])\n\t);\n\t// at the input is the matrix, and at the output we also give the matrix\n\treturn result;\n}", "title": "" }, { "docid": "e2a8a23b843f9c51f24dfa8bf921c654", "score": "0.48054293", "text": "function matriz(x) { //x=2\n z = []; //z=[2,2]\n z.push(x);\n z.pop();\n z.push(x);\n z.push(x);\n return z; //[2,2]\n}", "title": "" }, { "docid": "624730c3d407a4eb5bf198661a9f5eda", "score": "0.47974342", "text": "function rotateMatrix(matrix){\n let newMatrix = []\n let j = 0\n\n while(j < matrix.length){\n let row = []\n let i = matrix.length - 1\n for (let k = 0; k < matrix.length; k++){\n row[k] = matrix[i][j]\n i--\n }\n newMatrix.push(row)\n j++\n }\n\n return newMatrix\n\n}", "title": "" }, { "docid": "db50eb34c6e511999812365813607325", "score": "0.478839", "text": "function square(matrix, startCol, startRow) {\r\n let square = [\r\n [],\r\n []\r\n ];\r\n square[0][0] = matrix[startCol][startRow];\r\n square[0][1] = matrix[startCol][startRow + 1];\r\n square[1][0] = matrix[startCol + 1][startRow];\r\n square[1][1] = matrix[startCol + 1][startRow + 1];\r\n return square;\r\n }", "title": "" }, { "docid": "6e53781f10aaab479f0e26da9770f5f6", "score": "0.47814354", "text": "subsequences() {\n return M_List.Cons(M_List.Nil())(this.nonEmptySubsequences());\n }", "title": "" }, { "docid": "07f0343bbde6b1b76b134db23d376e62", "score": "0.4776409", "text": "function kronecker(matrix, matrix2) {\n var newMatrix = [] ;\n for (i = 0; i < matrix.length; i++) {\n newMatrix[i] = [] ;\n for (j = 0; j < matrix2[0].length; j++) {\n var calculus = 0 ;\n for (k = 0; k < matrix[0].length; k++) {\n calculus = matrix[0][i] * matrix2[j][0] ;\n \t }\n \t newMatrix[i][j] = calculus ;\n \t}\n }\n return newMatrix\n}", "title": "" }, { "docid": "3a995baf8a06220de14373bd473919ab", "score": "0.4772704", "text": "function multiplyMatrix2Recursive(A,B,ai,aj,bi,bj,n,n0,imb) {\n //imb = inputMatrixBool\n //multiplies square slice of matrix A containing A_ai,aj up to A_ai+n,aj+n\n let C = createSquareMatrix(n);\n if (n <= 64) {\n //Threshold for falling back to classic algorithm \n C = multiplyMatrixHelper(A,B,ai,aj,bi,bj,n);\n }\n else {\n //first partition\n //A11 = A[ai...ai+n/2 - 1][aj...aj+n/2 - 1], A12 = A[ai...ai+n/2 - 1][aj+n/2...aj+n-1]\n //A21 = A[ai + n/2...ai + n - 1][aj...aj+n/2 - 1], A22 = A[ai+n/2...ai+n-1, aj+n/2...aj+n-1]\n \n //STEP 2\n let S1 = subtractMatrix(B,B,bi,bj+n/2,bi+n/2,bj+n/2,n/2,n0,[imb[1],imb[1]]); //B12 - B22\n let S2 = addMatrix(A,A,ai,aj,ai,aj+n/2,n/2,n0,[imb[0],imb[0]]); //A11 + A12\n let S3 = addMatrix(A,A,ai+n/2,aj,ai+n/2,aj+n/2,n/2,n0,[imb[0],imb[0]]); //A21 + A22\n let S4 = subtractMatrix(B,B,bi+n/2,bj,bi,bj,n/2,n0,[imb[1],imb[1]]); //B21-B11\n let S5 = addMatrix(A,A,ai,aj,ai+n/2,aj+n/2,n/2,n0,[imb[0],imb[0]]); //A11+A22\n let S6 = addMatrix(B,B,bi,bj,bi+n/2,bj+n/2,n/2,n0,[imb[1],imb[1]]); //B11+B22\n let S7 = subtractMatrix(A,A,ai,aj+n/2,ai+n/2,aj+n/2,n/2,n0,[imb[0],imb[0]]); //A12-A22\n let S8 = addMatrix(B,B,bi+n/2,bj,bi+n/2,bj+n/2,n/2,n0,[imb[1],imb[1]]); //B21+B22\n let S9 = subtractMatrix(A,A,ai,aj,ai+n/2,aj,n/2,n0,[imb[0],imb[0]]); //A11-A21\n let S10 = addMatrix(B,B,bi,bj,bi,bj+n/2,n/2,n0,[imb[1],imb[1]]); //B11+B12\n \n //STEP 3\n let P1 = multiplyMatrix2Recursive(A,S1,ai,aj,0,0,n/2,n0,[imb[0],false]); //A11*S1\n let P2 = multiplyMatrix2Recursive(S2,B,0,0,bi+n/2,bj+n/2,n/2,n0,[false,imb[1]]); //S2*B22\n let P3 = multiplyMatrix2Recursive(S3,B,0,0,bi,bj,n/2,n0,[false,imb[1]]); //S3*B11\n let P4 = multiplyMatrix2Recursive(A,S4,ai+n/2,aj+n/2,0,0,n/2,n0,[imb[0], false]); //A22*S4\n let P5 = multiplyMatrix2Recursive(S5,S6,0,0,0,0,n/2,n0,[false,false]); //S5*S6\n let P6 = multiplyMatrix2Recursive(S7,S8,0,0,0,0,n/2,n0,[false,false]); //S7*S8\n let P7 = multiplyMatrix2Recursive(S9,S10,0,0,0,0,n/2,n0,[false,false]); //S9*S10\n \n //STEP 4\n for (let i = 0; i < n/2; i++) {\n for (let j = 0; j < n/2; j++) {\n C[i][j] = P5[i][j] + P4[i][j] - P2[i][j] + P6[i][j];\n }\n }\n for (let i = 0; i < n/2; i++) {\n for (let j = n/2; j < n; j++) {\n C[i][j] = P1[i][j-n/2] + P2[i][j-n/2];\n }\n }\n for (let i = n/2; i < n; i++) {\n for (let j = 0; j < n/2; j++) {\n C[i][j] = P3[i-n/2][j] + P4[i-n/2][j];\n }\n }\n for (let i = n/2; i < n; i++) {\n for (let j = n/2; j < n; j++) {\n C[i][j] = P5[i-n/2][j-n/2] + P1[i-n/2][j-n/2] - P3[i-n/2][j-n/2] - P7[i-n/2][j-n/2];\n }\n }\n \n }\n return C;\n}", "title": "" }, { "docid": "7ea6536b36307d507e9334eda7d51120", "score": "0.47654697", "text": "static inverse(matrix){\n \tlet result\n \tlet dim = Vector.matrix_dimensions(matrix)\n if (dim[0] == 2 && dim[1] == 2){\n \tresult = [[matrix[1][1], -matrix[1][0]], [-matrix[0][1], matrix[0][0]]]\n result = Vector.multiply(1/Vector.determinant(matrix), result)\n }else if(dim[0] == 3 && dim[1] == 3){\n \t//Source: University of Massachusetts Lowell - MECH 5960 Mechanics of Composite Materials\n \tlet a, b, c, d, e, f, g, h, i, A, B, C, D, E, F, G, H, I\n a = matrix[0][0]\n b = matrix[0][1]\n c = matrix[0][2]\n d = matrix[1][0]\n e = matrix[1][1]\n f = matrix[1][2]\n g = matrix[2][0]\n h = matrix[2][1]\n i = matrix[2][2]\n \n A = Vector.determinant([[e, f], [h, i]])\n B = -Vector.determinant([[d, f], [g, i]])\n C = Vector.determinant([[d, e], [g, h]])\n D = -Vector.determinant([[b, c], [h, i]])\n E = Vector.determinant([[a, c], [g, i]])\n F = -Vector.determinant([[a, b], [g, h]])\n G = Vector.determinant([[b, c], [e, f]])\n H = -Vector.determinant([[a, c], [d, f]])\n I = Vector.determinant([[a, b], [d, e]])\n \n result = [[A, B, C], [D, E, F], [G, H, I]]\n result = Vector.multiply(1/Vector.determinant(matrix), result)\n }else if(dim[0] == 4 && dim[1] == 4){\n \t// Source: http://www.cg.info.hiroshima-cu.ac.jp/~miyazaki/knowledge/teche23.html\n let a11, a12, a13, a14, a21, a22, a23, a24, a31, a32, a33, a34, a41, a42, a43, a44\n let b11, b12, b13, b14, b21, b22, b23, b24, b31, b32, b33, b34, b41, b42, b43, b44\n a11 = matrix[0][0]\n a12 = matrix[0][1]\n a13 = matrix[0][2]\n a14 = matrix[0][3]\n a21 = matrix[1][0]\n a22 = matrix[1][1]\n a23 = matrix[1][2]\n a24 = matrix[1][3]\n a31 = matrix[2][0]\n a32 = matrix[2][1]\n a33 = matrix[2][2]\n a34 = matrix[2][3]\n a41 = matrix[3][0]\n a42 = matrix[3][1]\n a43 = matrix[3][2]\n a44 = matrix[3][3]\n \t\n b11 = a22*a33*a44 + a23*a34*a42 + a24*a32*a43 - a22*a34*a43 - a23*a32*a44 - a24*a33*a42\n b12 = a12*a34*a43 + a13*a32*a44 + a14*a33*a42 - a12*a33*a44 - a13*a34*a42 - a14*a32*a43\n b13 = a12*a23*a44 + a13*a24*a42 + a14*a22*a43 - a12*a24*a43 - a13*a22*a44 - a14*a23*a42\n b14 = a12*a24*a33 + a13*a22*a34 + a14*a23*a32 - a12*a23*a34 - a13*a24*a32 - a14*a22*a33\n \n b21 = a21*a34*a43 + a23*a31*a44 + a24*a33*a41 - a21*a33*a44 - a23*a34*a41 - a24*a31*a43\n b22 = a11*a33*a44 + a13*a34*a41 + a14*a31*a43 - a11*a34*a43 - a13*a31*a44 - a14*a33*a41\n b23 = a11*a24*a43 + a13*a21*a44 + a14*a23*a41 - a11*a23*a44 - a13*a24*a41 - a14*a21*a43\n b24 = a11*a23*a34 + a13*a24*a31 + a14*a21*a33 - a11*a24*a33 - a13*a21*a34 - a14*a23*a31\n \n b31 = a21*a32*a44 + a22*a34*a41 + a24*a31*a42 - a21*a34*a42 - a22*a31*a44 - a24*a32*a41\n b32 = a11*a34*a42 + a12*a31*a44 + a14*a32*a41 - a11*a32*a44 - a12*a34*a41 - a14*a31*a42\n b33 = a11*a22*a44 + a12*a24*a41 + a14*a21*a42 - a11*a24*a42 - a12*a21*a44 - a14*a22*a41\n b34 = a11*a24*a32 + a12*a21*a34 + a14*a22*a31 - a11*a22*a34 - a12*a24*a31 - a14*a21*a32\n \n b41 = a21*a33*a42 + a22*a31*a43 + a23*a32*a41 - a21*a32*a43 - a22*a33*a41 - a23*a31*a42\n b42 = a11*a32*a43 + a12*a33*a41 + a13*a31*a42 - a11*a33*a42 - a12*a31*a43 - a13*a32*a41\n b43 = a11*a23*a42 + a12*a21*a43 + a13*a22*a41 - a11*a22*a43 - a12*a23*a41 - a13*a21*a42\n b44 = a11*a22*a33 + a12*a23*a31 + a13*a21*a32 - a11*a23*a32 - a12*a21*a33 - a13*a22*a31\n \n result = [[b11, b12, b13, b14], [b21, b22, b23, b24], [b31, b32, b33, b34], [b41, b42, b43, b44]]\n result = Vector.multiply(1/Vector.determinant(matrix),result)\n }else{\n \tresult = matrix_invert(matrix)\n }\n return result\n }", "title": "" }, { "docid": "e5cc45c23615db35a4a0411c1706c246", "score": "0.4758865", "text": "function mixSudokuQuiz(matrix)\n{\n let numEntries = 20 + Math.floor((Math.random() * 8)); // Number of entries to be kept\n mixRowsAndColumns(matrix); // Mix board\n keepSomeEntries(matrix, numEntries); // Keep some random Entries\n return matrix;\n}", "title": "" }, { "docid": "57505f97b84f8f026ff641a8c4d55ae8", "score": "0.47453028", "text": "function spiralTraversal (matrix) {\n // Write your code here, and\n // return your final answer.\n var result = [];\n \n if(matrix === null || matrix.length === 0 || matrix[0].length === 0){\n return result;\n }\n \n var rows = matrix.length;\n var cols = matrix[0].length;\n\n var x = 0;\n var y = 0;\n\n while(rows > 0 && cols > 0){\n if(rows === 1){\n for(var i = 0; i < cols; i++){\n result.push(matrix[x][y++]);\n }\n return result;\n } else if(cols === 1){\n for(i = 0; i < rows; i++){\n result.push(matrix[x++][y]);\n }\n return result;\n }\n \n for(i = 0; i < cols - 1; i++){\n result.push(matrix[x][y++]);\n }\n for(i = 0; i < rows - 1; i++){\n result.push(matrix[x++][y]);\n }\n for(i = 0; i < cols - 1; i++){\n result.push(matrix[x][y--]);\n }\n for(i = 0; i < rows - 1; i++){\n result.push(matrix[x--][y]);\n }\n \n x++;\n y++;\n cols -= 2;\n rows -= 2;\n }\n \n return result;\n}", "title": "" }, { "docid": "1f8ee5777f7d6ec973aa77dd3212c2c2", "score": "0.4741055", "text": "function transpose(matrix) {\n return matrix[0].map((col, i) => matrix.map(row => row[i]));\n}", "title": "" }, { "docid": "870a91eb30277b0ee77858c7246d6b1d", "score": "0.4738975", "text": "function subtractMatrices() {\n matrices = createMatrix();\n\n matrixLeft = matrices[0];\n matrixRight = matrices[1];\n\n var result = [];\n var row = [];\n\n for (i = 0; i < currentSize; i++) {\n for (k = 0; k < currentSize; k++) {\n row.push(parseInt(matrixLeft[i][k]) - parseInt(matrixRight[i][k]));\n }\n result.push(row);\n row = [];\n }\n\n console.log(result);\n document.getElementById(\"resultBox2\").innerHTML = printMatrix(result);\n}", "title": "" }, { "docid": "be9052cc275a3adaf116bfcba68e9092", "score": "0.47318557", "text": "function flattenBox(row, col) {\n return [].concat(...[\n grid[row+0].slice(col,col+3),\n grid[row+1].slice(col,col+3),\n grid[row+2].slice(col,col+3) ]);\n }", "title": "" }, { "docid": "b01e747743de37849f8e88bcaf537c20", "score": "0.47244403", "text": "function getMazeBlocks(m) {\n var rows = [];\n for (var j = 0; j < m.x * 2 + 1; j++) {\n var row = [];\n if (0 == j % 2)\n for (var k = 0; k < m.y * 4 + 1; k++)\n if (0 == k % 4)\n row[k] = 1;\n else\n if (j > 0 && m.verti[j / 2 - 1][Math.floor(k / 4)])\n row[k] = 0;\n else\n row[k] = 2;\n else\n for (var k = 0; k < m.y * 4 + 1; k++)\n if (0 == k % 4)\n if (k > 0 && m.horiz[(j - 1) / 2][k / 4 - 1])\n row[k] = 0;\n else\n row[k] = 3;\n else\n row[k] = 0;\n if (0 == j) row[1] = row[2] = row[3] = 0;\n if (m.x * 2 - 1 == j) row[4 * m.y] = 0;\n rows.push(row);\n }\n return rows;\n }", "title": "" }, { "docid": "6cd211750d2c45eeb99065da814c3212", "score": "0.47232646", "text": "function subset(array, size) {\n\tif (array.length < size) {\n\t\treturn [];\n\t}\n\tvar result = [];\n\thelper(result, array, size, [], 0);\n\treturn result;\n}", "title": "" }, { "docid": "3734525ff822436ea7072655f5ae0308", "score": "0.47094387", "text": "function matrizid(n) {\n var data = Array.from(Array(n), () => new Array(n));\n for (var i = 0; i < n; i++) {\n for (var j = 0; j < n; j++) {\n if (i === j) { data[i][j] = 1; }\n else { data[i][j] = 0; }\n }\n }\n return matriz(data);\n}", "title": "" }, { "docid": "a3d68654c481b7613ce09b014e2cf5a4", "score": "0.47073764", "text": "function matrix(n) {\n const matrix_result = [];\n for (let i = 0; i < n; i++) {\n single_array = [];\n matrix_result.push(single_array);\n }\n let count = 1;\n let start_column = 0;\n let end_column = n - 1;\n let start_row = 0;\n let end_row = n - 1;\n while ((start_column <= end_column) && (start_row <= end_row)) {\n for (let i = start_column; i <= end_column; i++) {\n matrix_result[start_row][i] = count;\n count++;\n }\n start_row++;\n for (i = start_row; i <= end_row; i++) {\n matrix_result[i][end_column] = count;\n count++;\n }\n end_column--;\n for (i = end_column; i >= start_column; i--) {\n matrix_result[end_row][i] = count;\n count++;\n }\n end_row--;\n for (i = end_row; i >= start_row; i--) {\n matrix_result[i][start_column] = count;\n count++;\n }\n start_column++;\n }\n console.log(matrix_result);\n return matrix_result;\n}", "title": "" }, { "docid": "296fae53efe45160754814279b3930e8", "score": "0.4706944", "text": "function getElemsInQuadrant(i, j) {\r\n var elems = [];\r\n for (var a = 0; a < 3; a++) {\r\n for (var b = 0; b < 3; b++) {\r\n var iIndex = a + 3 * i;\r\n var jIndex = b + 3 * j;\r\n elems.push(getElemAt(iIndex, jIndex));\r\n }\r\n }\r\n return elems;\r\n }", "title": "" }, { "docid": "3c4862b777e429a450ea87f88fe5c48e", "score": "0.470488", "text": "function transposeMatrix (matrix) {\r\n\r\n //Argumenten pruefung\r\n if (matrix.isArray === false) throw 'function transposeMatrix: Error, arg is not an Array!';\r\n \r\n var matrixT = matrix[0].map(function(col, i) { \r\n return matrix.map(function(row) { \r\n return row[i] \r\n })\r\n });\r\n \r\n console.log(matrixT);\r\n return matrixT;\r\n}", "title": "" }, { "docid": "8c3ccfc12f7e55c8611f385c86334137", "score": "0.46957564", "text": "function sliceAllSubArrays(firstExtrationString){\n\n let arrayRegexed = [];\n let result = [];\n arrayRegexed = firstExtrationString.split(',');\n //Slice all 5 SubArray's\n var tmpArray = [];\n tmpArray = arrayRegexed.slice(0, 300);\n result.push(tmpArray);\n tmpArray = arrayRegexed.slice(300, 599);\n result.push(tmpArray);\n tmpArray = arrayRegexed.slice(599, 898);\n result.push(tmpArray);\n tmpArray = arrayRegexed.slice(898, 1197);\n result.push(tmpArray);\n tmpArray = arrayRegexed.slice(1197, 1496);\n result.push(tmpArray);\n\n return result;\n}", "title": "" }, { "docid": "f114e86f0fd0e247df3a88cd5219b1e4", "score": "0.46938753", "text": "function getCofactorFrom(matrixO, row, column) {\n let matrix = copy(matrixO);\n for (let i = 0; i < matrix.length; i++) {\n matrix[i].splice(column, 1);\n }\n matrix.splice(row, 1);\n\n return matrix;\n}", "title": "" }, { "docid": "6796f945529bbd909df659f4cb72ac46", "score": "0.46925634", "text": "function matrix(n) {\n const res = Array.from(new Array(n)).map(x => Array.from(new Array(n)))\n let counter = 1;\n let startRow = 0;\n let endRow = n - 1;\n let startCol = 0;\n let endCol = n - 1;\n\n while(startRow <= endRow || startCol <= endCol) {\n // top\n for (let i = startCol; i <= endCol; i++) {\n res[startRow][i] = counter;\n counter++;\n }\n startRow++;\n \n // right\n for (let i = startRow; i <= endRow; i++) {\n res[i][endCol] = counter;\n counter++;\n }\n endCol--;\n\n // bottom\n for (let i = endCol; i >= startCol; i--) {\n res[endRow][i] = counter;\n counter++;\n }\n endRow--;\n\n // left\n for (let i = endRow; i >= startRow; i--) {\n res[i][startCol] = counter;\n counter++;\n }\n startCol++;\n }\n return res;\n}", "title": "" }, { "docid": "de8f8641419bc7861e78dea2b028d32d", "score": "0.4692496", "text": "function rotateClockwise(matrix, n) {\n if (!matrix || !n) { console.log('Missing an Argument.'); return; }\n\n // for each layer of the matrix /* First Loop */\n for (var layer = 0; layer < n / 2; layer++) { // layer = 0; layer < 2; layer++\n // set indices for outer the various layers\n var first = layer; // first = 0\n var last = n - 1 - layer; // last = 3\n // n = 4\n // for each of the chars in the first layer\n for (var i = first; i < last; i++) {\n var offset = i - first; // offset = 0\n // save the top left corner -> temp\n var top = matrix[first][first + offset]; // top = matrix[0][0 + 0] = A\n // bottom left -> top left;\n matrix[first][i] = matrix[last - offset][first]; // matrix[0][0] = matrix[3][0]\n // bottom right -> bottom left;\n matrix[last - offset][first] = matrix[last][last - offset]; // matrix[3][0] = matrix[3][3]\n // top right -> bottom right;\n matrix[last][last - offset] = matrix[i][last]; // matrix[3][3] = matrix[0][3]\n // top left -> top right;\n matrix[i][last] = top; // matrix[3][0] = top\n }\n }\n console.log(matrix);\n return;\n}", "title": "" }, { "docid": "600f09ee25b403788c1f255807fb8a6d", "score": "0.46812493", "text": "function clockWise(matrix) {\n var newMatrix = [\n [],\n [],\n []\n ];\n for ( var i = 0; i < matrix.length; i++) {\n for (var j = 0; j < matrix[i].length; j++) {\n newMatrix[j][matrix.length - 1 - i] = matrix[i][j];\n } \n }\n console.log(newMatrix);\n return newMatrix;\n}", "title": "" }, { "docid": "cece082d7553ddc04808f64e15991fec", "score": "0.46808425", "text": "function transpose(matrix) {\n return matrix[0].map((col, i) => matrix.map(row => row[i]))\n}", "title": "" } ]
49caf6438d4dda4247fc61d57fd222cd
Check a point is in range w.r.t to given range
[ { "docid": "486a8de4188d2201a55d4d76027df382", "score": "0.7376221", "text": "function inRange(a, b) {\n if (type === 'circle') {\n return calcDist(a, b, x, y) <= x1;\n }\n return a >= x1 && a <= x2 && b >= y1 && b <= y2;\n }", "title": "" } ]
[ { "docid": "e07d4818a5a7f90e86a17657366d1274", "score": "0.80301857", "text": "function has(range, point) {\r\n return (point.row >= range.start.row &&\r\n point.column >= range.start.column &&\r\n point.row <= range.end.row &&\r\n point.column <= range.end.column);\r\n}", "title": "" }, { "docid": "1b02919c91a21bd6829023cf50f366dd", "score": "0.75091624", "text": "function isInRange(num, range) {\n return ((num >= range.min) && (num <= range.max )) ;\n}", "title": "" }, { "docid": "40ca4d80a3274cd3ec436fe88d6945e4", "score": "0.7401004", "text": "isInRange(point, center, rangeX, rangeY) {\n\t\tif (arguments.length < 4)\n\t\trangeY = rangeX;\n\n\t\tif ((point.x > (center.x - rangeX)\n\t\t\t&& (point.x < (center.x + rangeX)\n\t\t\t&& (point.y > (center.y - rangeY)\n\t\t\t&& (point.y < (center.y + rangeY))))))\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "title": "" }, { "docid": "06776e1749bb953e06786570c3d3363b", "score": "0.7389483", "text": "function inRange(data, x, y) {\n if (x < y) {\n return greaterOrEqual(data, x) && data <= y;\n }\n\n return lessOrEqual(data, x) && data >= y;\n }", "title": "" }, { "docid": "6bb7c047f42087d1690f769af0e0fa20", "score": "0.7382884", "text": "function inRange(x, lowRange, highRange) {\n if (x >= lowRange && x <= highRange) {\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "e29962733679302a1511976389ddbf04", "score": "0.7360556", "text": "function inRange(x, min, max) {\n return (min <= x && x <= max);\n }", "title": "" }, { "docid": "fcc362b4754de1cd76644a4aebfab7af", "score": "0.7349596", "text": "function isInRange(num, range) {\n return range.min <= num && range.max >= num;\n}", "title": "" }, { "docid": "6dd26a99652695ea883da779ed065839", "score": "0.7348308", "text": "function inRange (data, x, y) {\n if (x < y) {\n return greaterOrEqual(data, x) && lessOrEqual(data, y);\n }\n\n return lessOrEqual(data, x) && greaterOrEqual(data, y);\n }", "title": "" }, { "docid": "a0b7179f8fe326d00b5cd42e73420348", "score": "0.7343233", "text": "function inRange(x, min, max) {\n return (min <= x && x <= max);\n }", "title": "" }, { "docid": "b8fb5237b7e38d20ae55096c99505f34", "score": "0.73153764", "text": "inRange (number, start, end){\r\n number;\r\n start;\r\n end;\r\n let temp = 0;\r\n\r\n if(end === undefined){\r\n end = start;\r\n start = 0;\r\n }\r\n if(start > end){\r\n temp = start;\r\n start = end;\r\n end = temp;\r\n }\r\n let isInRange = ((start <= number) && (number < end)) ? true: false\r\n return isInRange;\r\n }", "title": "" }, { "docid": "5a3617307efd1f8727e2f80ebb01e47e", "score": "0.73041564", "text": "function rangeContainsPointWithEndExclusive (range, point) {\n range.start.isLessThanOrEqual(point) && range.end.isGreaterThan(point)\n}", "title": "" }, { "docid": "9c8936be89c51fc558132c544c44b704", "score": "0.72767824", "text": "inRange(number, start, end){\n if(end === undefined) {\n end = start;\n start = 0;\n } if(start > end){\n var temp = end;\n end = start;\n start = temp;\n }\n var isInRange = start <= number && number < end\n return isInRange\n }", "title": "" }, { "docid": "3002dc08b8687574fe3f7521fc826a74", "score": "0.72460896", "text": "containsRange(range) {\n return this._min <= range.min && this._max >= range.max;\n }", "title": "" }, { "docid": "14162bb02ec052a8931ccc9ded038bb7", "score": "0.7229296", "text": "function isInRange(pos, start, end) {\n if (typeof pos != 'number') {\n // Assume it is a cursor position. Get the line number.\n pos = pos.line;\n }\n if (start instanceof Array) {\n return inArray(pos, start);\n } else {\n if (end) {\n return (pos >= start && pos <= end);\n } else {\n return pos == start;\n }\n }\n }", "title": "" }, { "docid": "14162bb02ec052a8931ccc9ded038bb7", "score": "0.7229296", "text": "function isInRange(pos, start, end) {\n if (typeof pos != 'number') {\n // Assume it is a cursor position. Get the line number.\n pos = pos.line;\n }\n if (start instanceof Array) {\n return inArray(pos, start);\n } else {\n if (end) {\n return (pos >= start && pos <= end);\n } else {\n return pos == start;\n }\n }\n }", "title": "" }, { "docid": "14162bb02ec052a8931ccc9ded038bb7", "score": "0.7229296", "text": "function isInRange(pos, start, end) {\n if (typeof pos != 'number') {\n // Assume it is a cursor position. Get the line number.\n pos = pos.line;\n }\n if (start instanceof Array) {\n return inArray(pos, start);\n } else {\n if (end) {\n return (pos >= start && pos <= end);\n } else {\n return pos == start;\n }\n }\n }", "title": "" }, { "docid": "14162bb02ec052a8931ccc9ded038bb7", "score": "0.7229296", "text": "function isInRange(pos, start, end) {\n if (typeof pos != 'number') {\n // Assume it is a cursor position. Get the line number.\n pos = pos.line;\n }\n if (start instanceof Array) {\n return inArray(pos, start);\n } else {\n if (end) {\n return (pos >= start && pos <= end);\n } else {\n return pos == start;\n }\n }\n }", "title": "" }, { "docid": "59cacd4c0dd365651f790b3b9f0e5207", "score": "0.7216195", "text": "inRange(number, start, end){\n if (end === undefined){\n end = start\n start = 0\n }\n \n if (start > end){\n let temp = end\n end = start\n start = temp\n }\n let isInRange = start <= number && number < end\n return isInRange;\n // Task 10: test inRange methode.\n }", "title": "" }, { "docid": "dfe47dadcd5ff73b62087651cc4809b4", "score": "0.71756005", "text": "inRange(number, start, end) {\n if (end == null) {\n end = start\n start = 0\n };\n if (start > end) {\n temp = end\n end = start\n start = temp\n };\n var isInRange = start <= number && number < end;\n return isInRange\n }", "title": "" }, { "docid": "2c42bd6b918e1ba896374183eb1e382e", "score": "0.7162431", "text": "function isInRange(pos,start,end) {\n if (typeof pos != 'number') {\n // Assume it is a cursor position. Get the line number.\n pos = pos.line;\n }\n if (start instanceof Array) {\n return inArray(pos,start);\n } else {\n if (end) {\n return (pos >= start && pos <= end);\n } else {\n return pos == start;\n }\n }\n }", "title": "" }, { "docid": "8712fc9b336be0fb216734cac6b2e93a", "score": "0.712695", "text": "function inRange(value, range) {\n let [min, max] = range; max < min ? [min, max] = [max, min] : [min, max]\n return value >= min && value <= max\n}", "title": "" }, { "docid": "c54d7107130bd10fee43c6a3d464578b", "score": "0.71083343", "text": "function checkRange(a, b){\n if(a >=40 && a <=60 && b >=40 && b <= 60\n ||\n a >=70 && a <=100 && b >=70 && b <=100 ){\n return true\n }else{\n return false\n }\n}", "title": "" }, { "docid": "2127b1373f0d52bbca0d8529510dd14a", "score": "0.7088599", "text": "function isWithin(num, range1, range2) {\r\n if (num > range1 && num < range2 || num < range1 && num > range2) {\r\n return true;\r\n }\r\n else {\r\n return false;\r\n }\r\n }", "title": "" }, { "docid": "8d3f91885f6eea3bb15a237a787f6476", "score": "0.70807827", "text": "function inRange(num, low, hi){\r\n if(num>=low && num<hi)\r\n return true;\r\n}", "title": "" }, { "docid": "87e8020c114ec5063c4f4fa492089725", "score": "0.707612", "text": "inRange(number, start, end) {\n if(end === undefined) {\n end = start;\n start = 0;\n }\n\n if(start > end) {\n let temp = end;\n end = start;\n start = temp;\n }\n\n if (number < start) {\n return false;\n }else if (number >= end) {\n return false;\n }else {\n return true;\n }\n }", "title": "" }, { "docid": "17846aa1050b8140bbffc1d5a8b67b4c", "score": "0.70620275", "text": "function inRange(num1,num2){\n if (num1-num2<40 || num2-num1<40){\n return true\n }\n else{return false;}\n}", "title": "" }, { "docid": "9589846710983a59a8e5c91a94e7fcea", "score": "0.7061977", "text": "inRange(num, start, end = 0) {\n // switch start and end if start > end, incl with default end value of 0\n if (start > end) [start, end] = [end, start];\n return num >= start && num < end;\n }", "title": "" }, { "docid": "837e7587e58f0f9554502669d58fa7f6", "score": "0.7054448", "text": "async isInRange() {\n return this._hasState('in-range');\n }", "title": "" }, { "docid": "3838c9166315477d98dbca339e2efe53", "score": "0.7053666", "text": "function isInRange(number, min, max) {\r\n return number >= min && number <= max;\r\n}", "title": "" }, { "docid": "598ad05c36b4fc10027cc5f82e568cc7", "score": "0.70423716", "text": "function inRange(index, range) {\n return index > range[0] && index <= range[1];\n}", "title": "" }, { "docid": "c0872684e89cfcc9ecc19df1cf5e06df", "score": "0.6991985", "text": "function insideBounds(x, y) {\n return (x >= 0 && x < 8 && y >= 0 && y < 8);\n}", "title": "" }, { "docid": "e6463848b21abeebed6f7224f52de1cf", "score": "0.69530874", "text": "function inRange(number, start, end) {\n if (end === undefined) {\n end = start;\n start = 0;\n }\n return baseInRange(+number, +start, +end);\n}", "title": "" }, { "docid": "571e9a085d8d188156b9b1a8abd96f17", "score": "0.6952487", "text": "function valueInRange (start, value, finish) {\n return (start <= value) && (value <= finish);\n}", "title": "" }, { "docid": "571e9a085d8d188156b9b1a8abd96f17", "score": "0.6952487", "text": "function valueInRange (start, value, finish) {\n return (start <= value) && (value <= finish);\n}", "title": "" }, { "docid": "b1048e0080fa1c4400af057cc67f2e57", "score": "0.69511646", "text": "function inRange(number, low, high){\n\n\tif (number >= low && number <= high){\n\t\treturn true;\n\t}\n\telse{\n\t\treturn false;\n\t}\n\n}", "title": "" }, { "docid": "4e4b0b0e086216faa73248568834432d", "score": "0.69493014", "text": "function inRange(rangeStart, rangeStop, value) {\n if ((value > rangeStart) && (value < rangeStop)) {\n return true;\n }\n else {\n return false;\n }\n}", "title": "" }, { "docid": "1f7def206e5d81a95e3bd254b4af9b6e", "score": "0.69389814", "text": "function inRange(val, min, max){\n return (val > min && val < max);\n}", "title": "" }, { "docid": "4a228a5c53164f1ff5cb0cb39770e402", "score": "0.69310504", "text": "function checkExtentRange(x,y){\n return true;\n}", "title": "" }, { "docid": "06e71a6399c22932b75e93ee9af3f16e", "score": "0.6900855", "text": "function withinRangeInclusive(min, max, number){\n\tif(min <= number && number <= max){\n\t\treturn true;\n\t}else{\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "db7d48752911ac696acecb977988d77c", "score": "0.6884845", "text": "inRange(type, point) {\n\t\treturn this.insideBoard(point) && this.getPiece(point) == type;\n\t}", "title": "" }, { "docid": "02135e606b3b78361f1ce7d8ad13aab9", "score": "0.6884506", "text": "function isInRange(x,minx,maxx)\r\n{\r\n\tif (minx<=x && x<maxx) return true;\r\n\tif (x<180000000) x+=360000000; else x-=360000000;\r\n\tif (minx<=x && x<maxx) return true;\r\n\treturn false;\r\n}", "title": "" }, { "docid": "02135e606b3b78361f1ce7d8ad13aab9", "score": "0.6884506", "text": "function isInRange(x,minx,maxx)\r\n{\r\n\tif (minx<=x && x<maxx) return true;\r\n\tif (x<180000000) x+=360000000; else x-=360000000;\r\n\tif (minx<=x && x<maxx) return true;\r\n\treturn false;\r\n}", "title": "" }, { "docid": "739f3a0172c532a7377863de66705c3d", "score": "0.6882767", "text": "function inRange(id) {\n var id = id.split('_')[2];\n\n var minmax = $('#minmax_' + id).attr('value').split('|');\n var value = $('#calc_grade_' + id).attr('value');\n\n var min = parseFloat(minmax[0]);\n var max = parseFloat(minmax[1]);\n\n if (value >= min && value <= max) {\n hideError(id);\n\n return true;\n } else {\n showError(id);\n\n return false;\n }\n}", "title": "" }, { "docid": "fa6313b02b6787c855ef931b75ecfbe7", "score": "0.6875172", "text": "function valueInRange (start, value, finish) {\n\t return (start <= value) && (value <= finish);\n\t}", "title": "" }, { "docid": "fa6313b02b6787c855ef931b75ecfbe7", "score": "0.6875172", "text": "function valueInRange (start, value, finish) {\n\t return (start <= value) && (value <= finish);\n\t}", "title": "" }, { "docid": "630c8e82fe3af24b059cf232522f10bb", "score": "0.6860667", "text": "function inRange(num,a,b){\n return (a <= num && num <= b);\n}", "title": "" }, { "docid": "3d6c99d65baac817c2ed927141703d31", "score": "0.68540114", "text": "function checkIfInRange(number, range1, range2) {\n var min = Math.min.apply(Math, [range1, range2]);\n var max = Math.max.apply(Math, [range1, range2]);\n return (number > min) && (number < max);\n }", "title": "" }, { "docid": "12f2e7fc3b3ff01f98ce996c8b683f2d", "score": "0.6849319", "text": "function isBetweenX(p1, p2, x, y) {\n if((x >= p1.x && x <= p2.x) || (x <= p1.x && x >= p2.x))\n return true; \n \n return false;\n}", "title": "" }, { "docid": "9af394b522063720972b9fee8f8f2da8", "score": "0.68488693", "text": "function inRange(a, r1, r2) {\n return a >= r1 && a <= r2;\n }", "title": "" }, { "docid": "2ffa7fdae14c4dd549142c3080ba0b7d", "score": "0.6834175", "text": "intersects(range) {\n return this._max >= range.min && range.max >= this._min;\n }", "title": "" }, { "docid": "20bd08abe95284f84dd35a2ceb06ddf6", "score": "0.6824058", "text": "function range(num1, num2) {\n if ((num1 >= 40 && num1 <= 60 && num2 >= 40 && num2 <= 60) || (num1 >= 70 && num1 <= 100 && num2 >= 70 && num2 <= 100))\n {\n return true;\n } \n else \n {\n return false;\n }\n}", "title": "" }, { "docid": "da2026c39308e59d3c19cf7b9e7cf129", "score": "0.68026614", "text": "function checkRange(param,min,max){\n\tif(param>=min && param <= max ){\n\t\n\treturn true;\n\t\n }else{\n\t\talert('Invalid value: '+param );\n }\t\n\n}", "title": "" }, { "docid": "2ff4b934e02d54306e1c0e46bb6d553b", "score": "0.6784204", "text": "function inRange(val, min, max, threshold){\n threshold = threshold || 0;\n return (val + threshold >= min && val - threshold <= max);\n }", "title": "" }, { "docid": "2ff4b934e02d54306e1c0e46bb6d553b", "score": "0.6784204", "text": "function inRange(val, min, max, threshold){\n threshold = threshold || 0;\n return (val + threshold >= min && val - threshold <= max);\n }", "title": "" }, { "docid": "68e9c196999ba7c5e66d33eafca67500", "score": "0.67840767", "text": "function isWithin(value, min, max) {\n return ((value <= min) && (value >= max));\n}", "title": "" }, { "docid": "3b80115f1ec618b4fdc86bedc49118b4", "score": "0.6771957", "text": "checkWithinExtent(x, y, range = 0) {\r\n return x >= this.rect.x - range && x < this.rect.x + this.rect.width + range &&\r\n y >= this.rect.y - range && y < this.rect.y + this.rect.height + range;\r\n }", "title": "" }, { "docid": "8c2e2ba016b96c0f7c5d0b4e6b39d8bd", "score": "0.6758511", "text": "function isBetweenRange(low,high,numb) {\n\tvar numb_int = parseInt(numb);\n\n\tif (numb_int >= low && numb_int <= high)\n\t\treturn true;\n\n\treturn false;\n\n}", "title": "" }, { "docid": "c2db86d88a6944a705c7a228baca6a22", "score": "0.67456704", "text": "function eventContainsRange(event, start, end) {\n\t\tvar eventStart = event.start.clone().stripZone();\n\t\tvar eventEnd = t.getEventEnd(event).stripZone();\n\n\t\treturn start >= eventStart && end <= eventEnd;\n\t}", "title": "" }, { "docid": "e561b77925f0b595e8c744eedbb681a0", "score": "0.6740043", "text": "function range()\n{\n\tvar p = document.getElementById(\"fnum\").value;\n\tvar q = document.getElementById(\"snum\").value;\n\tif((p>=40 && p<=60) || (q>=40 && q<=60)||(p>=70 && p<=100) || (q>=70 && q<=100))\n\t\t{\n\t\t\talert(\"correct\");\n\t\t}\n\telse\n\t\t{\n\t\t\talert(\"wrong\");\n\t\t}\n}", "title": "" }, { "docid": "8513c8a70ffc4dbeb10215ba0817c1ce", "score": "0.6732997", "text": "function range(a,b){\n if((a>=50&&a<=99)||(b<=50&&b>=99))\n return true;\n else\n return false;\n}", "title": "" }, { "docid": "2b873f379c8cad941be7dce0bc27d6ce", "score": "0.6713226", "text": "function inRange(num, leftLim, rightLim){\n return num >= leftLim && num <= rightLim;\n}", "title": "" }, { "docid": "0c1881531c46b0b53beb1bd7675dd1de", "score": "0.67107844", "text": "function isBetween(value, start, end)\n{\n //Gelijk of hoger aan start of lager (of gelijk aan) dan eind\n return value > start && value <= end;\n}", "title": "" }, { "docid": "623f4369f781e1cbcf395dd4f515e0b0", "score": "0.6704828", "text": "function isInS(x,y){\n return x>=300 && x<=350 && y>=200 && y<=250\n }", "title": "" }, { "docid": "99fef4ee9e003ae8dcdea1b22942fbb6", "score": "0.67000955", "text": "inRange(start, end) {\n return this.addValidator({\n message: (value, label) => `Expected ${label} to be in range [${start}..${end}], got ${value}`,\n validator: value => is_1.default.inRange(value, [start, end])\n });\n }", "title": "" }, { "docid": "867b29fead297c495a06d350a990b87c", "score": "0.6699411", "text": "function isBetween( value, start, end ) {\n return ( value >= start && value <= end );\n}", "title": "" }, { "docid": "d0a01d11ca0636e678eddd06e84ef3ad", "score": "0.6677838", "text": "_isBetween(value, min, max) {\n return value >= min && value <= max\n }", "title": "" }, { "docid": "acd2e824a382e5c8e6281dbc4bba041c", "score": "0.66768885", "text": "function pointRect(arr){\n let x = arr[0];\n let y = arr[1];\n\n let minX = arr[2];\n let maxX = arr[3];\n\n let minY = arr[4];\n let maxY = arr[5];\n\n if(x < minX || x > maxX || y < minY || y > maxY){\n console.log(\"outside\");\n } else{\n console.log(\"inside\");\n }\n}", "title": "" }, { "docid": "c8858c563740fe2c82404005ca90931f", "score": "0.6673565", "text": "function inrange(value, range, left, right) {\n let r0 = range[0],\n r1 = range[range.length - 1],\n t;\n\n if (r0 > r1) {\n t = r0;\n r0 = r1;\n r1 = t;\n }\n\n left = left === undefined || left;\n right = right === undefined || right;\n return (left ? r0 <= value : r0 < value) && (right ? value <= r1 : value < r1);\n}", "title": "" }, { "docid": "34a586c6abf3efc5934b47c080d892da", "score": "0.66650623", "text": "function validateRange(){\n\t\tvar outcome = (xmax > xmin);\n\t\tvalidate(inputXmax, outcome);\n\t\tvalidate(inputXmin, outcome);\n\t\treturn outcome;\n\t\t\n\t}", "title": "" }, { "docid": "09c8b2f49cd49b6fd6057499bb912bda", "score": "0.6646945", "text": "function inrange(value, range, left, right) {\n var r0 = range[0], r1 = range[range.length-1], t;\n if (r0 > r1) {\n t = r0;\n r0 = r1;\n r1 = t;\n }\n left = left === undefined || left;\n right = right === undefined || right;\n\n return (left ? r0 <= value : r0 < value) &&\n (right ? value <= r1 : value < r1);\n}", "title": "" }, { "docid": "54421bfde60c1f57a2305018493b8613", "score": "0.66433173", "text": "_isInRange(n, min, max) {\n\t\treturn min < n && n < max;\n\t}", "title": "" }, { "docid": "b24243c52ee12685b65a267b933e5903", "score": "0.66420674", "text": "function between(number, start, end) {\n if (end === undefined) {\n end = start;\n start = 0;\n }\n return number >= start && number <= end;\n}", "title": "" }, { "docid": "6c1a2d7ab44ba1e44584ee1c1e56116c", "score": "0.66322297", "text": "function isInRange(num){\n return (1900<num) && (num < 2018)\n}", "title": "" }, { "docid": "1b791718f24a613864a9662291f50c25", "score": "0.6630777", "text": "function between(x, min, max) {\n\treturn x >= min && x <= max;\n}", "title": "" }, { "docid": "c764735b644fc42b2fbc1a202a4e4187", "score": "0.6626921", "text": "function checkBounds(x, y) {\n return ((0<=x) && (x<=maxX) && (0<=y) && (y<=maxY));\n}", "title": "" }, { "docid": "532153dd332474c3d6475c0363d67f5a", "score": "0.66248167", "text": "function between(v, start, end) {\n return v < start ^ v < end;\n}", "title": "" }, { "docid": "0210b67a7d5edb545a047705ee3f1548", "score": "0.6624422", "text": "function inRange(date, min, max) {\n return clamp(date, min, max) === date;\n}", "title": "" }, { "docid": "d8e6b95b09c8b257ecfb4b20c9950381", "score": "0.66234833", "text": "function insideOf(n, rangeStart, rangeEnd, inclusive) {\n\n}", "title": "" }, { "docid": "ce5a0ee015ca0105a9e5a9cb11531bc9", "score": "0.6621596", "text": "isAtPoint(x, y) {\n \n return (\n this.adjustedX <= x &&\n x <= this.adjustedX + this.width &&\n this.adjustedY <= y &&\n y <= this.adjustedY + this.height\n );\n }", "title": "" }, { "docid": "b7e0d42b391ddcb6be6cb5a67f96587e", "score": "0.66181993", "text": "inRect(point, rect) {\n [x, y] = point;\n [ax, ay, bx, by, dx, dy] = rect;\n const bax = bx - ax;\n const bay = by - ay;\n const dax = dx - ax;\n const day = dy - ay;\n\n if ((x - ax) * bax + (y - ay) * bay < 0.0) {\n return false;\n }\n if ((x - bx) * bax + (y - by) * bay > 0.0) {\n return false;\n }\n if ((x - ax) * dax + (y - ay) * day < 0.0) {\n return false;\n }\n if ((x - dx) * dax + (y - dy) * day > 0.0) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "b1f4fa2ea8f0664745df0b71e958aaae", "score": "0.6613409", "text": "function findPointInBounds(bounds, points) {\n for (var i = 0; i < points.length; i++) {\n var point = points[i];\n if (bounds.contains(point)) {\n return true;\n }\n }\n return false;\n}", "title": "" }, { "docid": "9f089008bcd288dc838b904ec1ca2f38", "score": "0.66081095", "text": "function _isInRange(value, min, max) {\n return value >= min && value <= max;\n}", "title": "" }, { "docid": "5bb32f0cb0ef1017aff2cee4e2c3bdc5", "score": "0.6602295", "text": "function onBounds(point, bounds, tolerance) {\r\n\t\t\t\tif(!tolerance) tolerance = .0005;\r\n\t\t\t\t\r\n\t\t\t\tlet between = function between(x, a, b){\r\n\t\t\t\t\treturn (x >= a && x <= b) || (x <= a && x >= b);\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t\treturn point != null && (\r\n\t\t\t\t\t(Math.abs(bounds.min.x - point.x) < tolerance) && between(point.y, bounds.min.y, bounds.max.y) ||\r\n\t\t\t\t\t Math.abs(bounds.min.y - point.y) < tolerance && between(point.x, bounds.min.x, bounds.max.x) ||\r\n\t\t\t\t\t Math.abs(bounds.max.x - point.x) < tolerance && between(point.y, bounds.min.y, bounds.max.y) ||\r\n\t\t\t\t\t Math.abs(bounds.max.y - point.y) < tolerance && between(point.x, bounds.min.x, bounds.max.x)\r\n\t\t\t\t);\r\n\t\t\t}", "title": "" }, { "docid": "06ababd1fbd201bfe64f465b4110933d", "score": "0.6598322", "text": "function inRange(offset, range, includeEdge) {\n\t\treturn range[0] <= offset && (includeEdge ? range[1] >= offset : range[1] > offset);\n\t}", "title": "" }, { "docid": "247760cd3be3d9e6a465fb66446eb33d", "score": "0.657118", "text": "function isInE(x,y){\n return x>=750 && x<=800 && y>=200 && y<=250\n }", "title": "" }, { "docid": "b3164979606bdb056f12d38b9c101793", "score": "0.65702105", "text": "onSegment(testPoint, a, b){\n\t\tif(testPoint.x <= Math.max(a.x, b.x) && testPoint.x >= Math.min(a.x, b.x) &&\n\t\t\ttestPoint.y <= Math.max(a.y, b.y) && testPoint.y >= Math.min(a.y, b.y)){\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\tfalse\n\t\t}\n\t}", "title": "" }, { "docid": "60d74b3c09b4e2965bd6fd688bb88e39", "score": "0.6566018", "text": "function areWithin(valueArray, boundsArray) {\n var pass = true;\n for(var i = 0, len = valueArray.length; i < len; i++) {\n var value = valueArray[i];\n var bounds = boundsArray[i];\n if(value < bounds.min || value > bounds.max) {\n pass = false;\n break;\n }\n }\n return pass;\n}", "title": "" }, { "docid": "b8cc6c430294495630e4e36577a8bb48", "score": "0.65654266", "text": "function outsideOf(n, rangeStart, rangeEnd, inclusive) {\n\n}", "title": "" }, { "docid": "a030076793294451a64d2199a8dca65d", "score": "0.6548193", "text": "function getRangeBetween(x, y) {\n\n}", "title": "" }, { "docid": "ebc6c25e8ee03a63a89a8d008a7dd506", "score": "0.65475273", "text": "inBounds({ x, y }) {\n const { top, left, bottom, right } = this.element.getBoundingClientRect();\n return x >= left && x <= right && y >= top && y <= bottom;\n }", "title": "" }, { "docid": "6996d7943df81855f42d928611c12dd5", "score": "0.65449065", "text": "boundsCheck(xM, yM, x, y, w, h){ \n if(xM > x && xM < x + w && yM > y && yM < y+ h){\n return true;\n }else{\n return false;\n }\n}", "title": "" }, { "docid": "33a87c1a1e79d6833dfe8305d4ad506a", "score": "0.6537994", "text": "function inRange(start, end, date) {\n if (start && date.isBefore(start)) { return false; }\n if (end && date.isAfter(end)) { return false; }\n return true;\n }", "title": "" }, { "docid": "24e1a49b10e6007eb1306d8dcb756fcb", "score": "0.6526832", "text": "function isBetween(x,a,b){\n if( (x >= a) && (x <= b) ){\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "80cd11442633ea8f83e81ce365cfebd8", "score": "0.65228313", "text": "function range(a, b) {\n return(a >= 50 && a <= 99 || b >= 50 && b <= 99)\n}", "title": "" }, { "docid": "32b71151d0c5de55b7b074969eb6336b", "score": "0.65197533", "text": "function shouldBeBetween(param, inf, sup) {\n\t\treturn (param >= inf && param <= sup);\n\t}", "title": "" }, { "docid": "0d43c31cf2ec6841087399678b7f0c6c", "score": "0.65018755", "text": "function inRange(num1,range1,range2) {\n var isInRange;\n if (((range1 <= num1) && (num1 <= range2)) || ((range1 >= num1) && (num1 >= range2))) {\n isInRange = true;\n } else {\n isInRange = false\n }\n console.log(isInRange)\n return(isInRange)\n}", "title": "" }, { "docid": "03baefae45322191c18a705c79d12fc2", "score": "0.65004754", "text": "function checkRangeNumber(min, max, number) {\r\n var result = false;\r\n if(number >= min && number <= max) {\r\n result = true;\r\n }\r\n return result;\r\n}", "title": "" }, { "docid": "03baefae45322191c18a705c79d12fc2", "score": "0.65004754", "text": "function checkRangeNumber(min, max, number) {\r\n var result = false;\r\n if(number >= min && number <= max) {\r\n result = true;\r\n }\r\n return result;\r\n}", "title": "" }, { "docid": "599c45a20fb99262be36c80deab579bf", "score": "0.64981127", "text": "function is_within(x, y, perc) {\n /* is x +/- %perc of y? */\n var perc = perc / 100;\n var plus_minus = y * perc;\n var flag = false;\n if (x <= y + plus_minus && x >= y - plus_minus) flag = true;\n return flag;\n}", "title": "" }, { "docid": "c53e84af9c0e71b237ae5015304b93a3", "score": "0.64847225", "text": "function checkRange(low, high, list) {\n list.forEach(function(v) {\n if ( v < low || v > high ) {\n throw Error('Value should be in range ' + low + ' to ' + high);\n }\n });\n }", "title": "" } ]
570b9af0960803a36e47678da06781a8
GET EXERCISES get exercise
[ { "docid": "1630a3688a92cf449c74710831301bcd", "score": "0.0", "text": "function getallexercises(id) {\n var li = '';\n var li0 = '';\n var lix = '';\n var cont = 0;\n var typeoa =$('select#oaexerciseSelect option:selected').val();\n\n var book_name = $('#book_select_id').text();\n\n var dir = book_name +'&#47'+ id;\n // alert(dir);\n\n $.getJSON(\"../v1/exercises/\"+id, function (data) {\n if (!data.error) {\n\n $.each(data.exercise, function (i, object) {\n \n cont = cont +1;\n // alert(object.exercise_type) ;\n if(object.exercise_type == 'Ejercicio (pregunta abierta + imagen )' && typeoa == 'videoquiz'){\n\n li0 += '<li class=\" btn btn-default btn-lg\" data-toggle=\"tooltip\" title=\"\"' + ' id=' + object.exercise_id +'>' +\n '<span class=\"badge\">' + object.exercise_id +'</span><h4 align=\"left\">'+ 'Videoquiz(Video)' +' </h4></li>';\n\n $('button#option5').addClass('invisible');\n }\n else {\n\n li += '<li class=\" btn btn-default btn-xs\" data-toggle=\"tooltip\" title=\"\"' + ' id=' + object.exercise_id +'>' +\n '<span class=\"badge\">' + object.exercise_id +'</span><h5 align=\"left\">'+ object.exercise_type +' </h5></li>';\n }\n\n\n\n });\n\n $('ul#videoquiz').html(li0);\n $('ul#videoquiz li').on('click', function () {\n /* $('ul#videoquiz li').removeClass('btn-press');\n $(this).addClass('btn-press');*/\n\n // var select = $(this).text();\n var select = $(this).prop('id');\n $('button#option7').attr('value', select);\n $('button#option7').removeClass('invisible');\n $('button#option8').removeClass('invisible');\n $('#option9').text($(this).attr('id'));\n\n\n });\n\n $('ul#exercises').html(li);\n $('ul#exercises li').on('click', function () {\n $('ul#exercises li').removeClass('btn-press');\n $(this).addClass('btn-press');\n\n // var select = $(this).text();\n var select = $(this).prop('id');\n $('button#option7').attr('value', select);\n $('button#option7').removeClass('invisible');\n $('button#option8').removeClass('invisible');\n $('#option9').text($(this).attr('id'));\n\n\n });\n // $('ul#exer').html(lix);\n\n }else{\n $('#alert-exercise-resource').append('<div class=\"alert alert-success alert-dismissible\" role=\"alert\">' +\n '<strong>Importante!</strong><p>' + 'El objeto de aprendizaje seleccionado no contiene ningun elemento'+'</p></div>');\n window.setTimeout(function() {\n $(\".alert-dismissible\").fadeTo(500, 0).slideUp(500, function(){\n $(this).remove();11\n });\t}, 3000);\n\n }\n\n // $('#scrollMsj').scrollTop($('#scrollMsj').prop(\"scrollHeight\"));\n }).done(function () {\n\n }).fail(function () {\n\n lix += '<li class=\" btn btn-block btn-default\"' + '<h2 align=\"left\">'+ 'El OA tiene cero elementos, agrega ejercios y/ recursos multimedia' +' </h2></li>';\n li0 += '<li class=\" h5\"<h5 align=\"left\"></h5></li>';\n\n $('ul#videoquiz').html(lix);\n $('ul#exercises').html(li0);\n $('button#option6').addClass('invisible');\n\n\n $('#alert-exercise-resource').append('<div class=\"alert alert-warning alert-dismissible\" role=\"alert\">' +\n '<strong>Importante!</strong><p>' + 'Existe un error en lectura de contenido del Objeto de Aprendizaje - revisar que el OA contenga al menos de un elemento '+'</p></div>');\n window.setTimeout(function() {\n $(\".alert-dismissible\").fadeTo(200, 0).slideUp(200, function(){\n $(this).remove();11\n });\t}, 2000);\n\n }).always(function () {\n\n });\n}", "title": "" } ]
[ { "docid": "29a0bd27afe07c6642adf79c46091be5", "score": "0.58167225", "text": "function exercise06() {\n console.log(\"Desestruturação 6\");\n}", "title": "" }, { "docid": "f6ef1b743b2ace62c8eb55865d3cba53", "score": "0.5769548", "text": "function getExercisesToShow() {\n var chaptersToShow = userSettings.chaptersToShow;\n if (userSettings.useLastChapter && lastChapter > 0) { chaptersToShow = [lastChapter]; }\n var selectedTypes = userSettings.includedExerciseTypes;\n var exercises = [];\n\n for(var i=0; i < chaptersToShow.length; i++)\n {\n var chapter = data.chapters[chaptersToShow[i]];\n\n for(var j=0; j < chapter.exercises.length; j++)\n {\n var exercise = chapter.exercises[j];\n var type = exercise.type;\n\n if (selectedTypes.indexOf(type) !== -1) {\n exercises.push(exercise);\n }\n }\n }\n\n return exercises;\n }", "title": "" }, { "docid": "15dd3b6eb9b9a44701a94110796dba32", "score": "0.5757178", "text": "static async listExercises({ user }) {\n if (!user) {\n throw new UnauthorizedError(`No user logged in.`)\n }\n\n const results = await db.query(`\n SELECT id, user_id AS \"userId\", name, category, duration, intensity, date\n FROM exercise\n WHERE user_id = (\n SELECT id FROM users WHERE username = $1\n );\n `, [user.username]\n )\n return results.rows\n }", "title": "" }, { "docid": "64990cf65a2e12dee3b32a4935af81a2", "score": "0.57223725", "text": "function getExhibitions() {\n fetch('http://webapp.jais-e.dk/wp-json/wp/v2/posts?_embed&categories=6')\n .then(function(response) {\n return response.json();\n })\n .then(function(exhibition) {\n appendMovies(exhibition);\n });\n exhibitStart = exhibition.acf.opens;\n activityTime = exhibition.acf.recommended;\n}", "title": "" }, { "docid": "f480b4ba4c89569a788abccbdfc7c1b1", "score": "0.5708181", "text": "function exercise13() {\n // YOUR CODE GOES HERE\n }", "title": "" }, { "docid": "937428da9242e564943979bf49a4011c", "score": "0.5637634", "text": "function exercise11() {\n // YOUR CODE GOES HERE\n }", "title": "" }, { "docid": "44a095ac05cde164b04eff03587967dc", "score": "0.56182677", "text": "function Exam(name, ectsPoints) {\n this.getCourseName = function() {return name}\n this.getEctsPoints = function() {return ectsPoints}\n this.toString = function() {return name + ectsPoints}\n}", "title": "" }, { "docid": "3636fa1a13575d043fc6f1706c1fda4f", "score": "0.5617169", "text": "function exercise10() {}", "title": "" }, { "docid": "14f9ca320afe4d73bc2ff050ad6d73fd", "score": "0.5603074", "text": "function main() {\n //\n // From this main() function we will call each of our solutions each in their own function\n //\n\n // Exercise 1\n console.log(\"Exercise 1\");\n console.log(ex1(45, 65)); // get numbers from 45 - 65)\n\n\n // Exercise 2\n console.log(\"Exercise 2\");\n ex2(); // Print a multiplication table for 1 - 10\n\n // Exercise 3\n console.log(\"Exercise 3\");\n ex3(12); // Print a list of the products from 1 - 10 for the number provided as a parameter\n\n // Exercise 4\n console.log(\"Exercise 4\");\n ex4(); // Print all numbers from 1 - 500 that are divisible by 23\n\n console.log(\"Exercise 5\");\n // Exercise 5 - Print the larger of 2 numbers passed in\n console.log(ex5_max(2112, 9001)); // success case. 1st parm greater than 2nd parm\n console.log(ex5_max(9001, 9001)); // fail case. Both numbers the same\n}", "title": "" }, { "docid": "6d40a6d770d4a0c8b0ebb3a82702de50", "score": "0.54705924", "text": "function Exps() {}", "title": "" }, { "docid": "04e1c3f5218b28437a493a85df5933d7", "score": "0.5446305", "text": "getData() {\n const db = this.props.expt.dbInfo.db;\n const studyName = this.props.expt.dbInfo.col.split(\"-\")[0];\n const exptName = this.props.expt.dbInfo.col.split(\"-\")[1];\n this.props.getExpt(db, studyName, exptName);\n }", "title": "" }, { "docid": "dbc23ae6797e275566f602e81bc49bdf", "score": "0.53196687", "text": "function Exercise(title,category,youtubeLink,youtubeEmbedLink) {\n\tthis.title = title,\n\tthis.category = category,\n\tthis.youtubeLink = youtubeLink,\n\tthis.youtubeEmbedLink = youtubeEmbedLink\n}", "title": "" }, { "docid": "de8318cf99bde3c582b00dd514450f7d", "score": "0.5309478", "text": "function exercise03() {\n const { projetos } = getUser();\n alert(`projetos: ${projetos}`);\n}", "title": "" }, { "docid": "c9ec310eec945a42aa589f3e4afec686", "score": "0.53004074", "text": "function loadExerciseUri(){\n if(window.localStorage[\"fitmus-app-exercises\"]){\n exerciseSources = JSON.parse(window.localStorage[\"fitmus-app-exercises\"]);\n }\n }", "title": "" }, { "docid": "d95505eb5538bb22a18cd02ccab9d563", "score": "0.5263318", "text": "function getExamples() {\n return new Promise(resolve => {\n glob(examplesDir + '**/*.purs', (err, files) =>\n resolve(\n // Return the path relative from the examples directory\n files.map(\n x => x.substring(examplesDir.length))))\n })\n}", "title": "" }, { "docid": "35f8a007f229956e76075c8f6d99f629", "score": "0.52004844", "text": "function getAllExams() {\n return new Promise((resolve, reject) => {\n connectFcn().then(() => {\n Exams.find().then(exam => {\n if (exam) {\n resolve(exam)\n } else {\n reject(new Error(\"can not find this exam\"))\n }\n\n }).catch(error => {\n reject(error)\n })\n\n }).catch(error => {\n reject(error)\n })\n\n })\n}", "title": "" }, { "docid": "54017823cfb9988efc039248058726d1", "score": "0.516895", "text": "function getInterviewExperience() {\n student.getExperience($routeParams.experience_id).then(function (data) {\n console.log(data);\n if(data.data.success) {\n app.experience = data.data.experience;\n app.fetchedInterviewExperience = true;\n } else {\n app.errorMsg = data.data.message;\n app.fetchedInterviewExperience = true;\n }\n });\n }", "title": "" }, { "docid": "3961bfe53e91c674fa348d0d8c08000e", "score": "0.51336247", "text": "listRoutineExercises(request, response) {\n const isTrainer = accounts.userIsTrainer(request);\n const routineId = request.params.id;\n logger.info('Routine id: ' + routineId);\n const viewData = {\n title: 'Trainer Routine Exercises',\n routine: fitnessStore.getProgrammeById(routineId),\n isTrainer: isTrainer,\n userId: accounts.getCurrentUser(request).id,\n user: accounts.getCurrentUser(request),\n };\n response.render('fitnessExercises', viewData);\n }", "title": "" }, { "docid": "e0df72d9a8651b4e1ec9ce15c0566108", "score": "0.5103637", "text": "function getQuestionList() {\n\n var questions = [\n// PCO training questions\n\n// problems 101-106 were used in exp 6\n \nnew Question( 101, \"PCO\", \"meals\", \"friends\", \"meal\", \"friend\",\n // as of exp 7, changed \"person\" to \"friend\" in sentences 2-3\n \"<p>A group of friends is eating at a restaurant. Each friend chooses a meal from the menu. (It is possible for multiple friends to choose the same meal.)</p><p>In how many different ways can the friends choose their meals, if there are {0} {1} and {2} {3}?</p>\" ), \n\nnew Question( 102, \"PCO\", \"pizza brands\", \"consumers\", \"pizza brand\", \"consumer\",\n \"<p>A marketing research company conducts a taste test survey. Several consumers are each asked to choose their favorite from among several pizza brands. (It is possible for multiple consumers to choose the same brand.)</p><p>How many different results of the survey are possible, if there are {0} {1} and {2} {3}?</p>\" ), \n\nnew Question( 103, \"PCO\", \"majors\", \"students\", \"major\", \"student\",\n \"<p>Several college freshmen are discussing what they want to study in college. Each of them has to choose a major from a list of available majors. (Of course, it is possible for more than one to choose the same major.)</p><p>In how many different ways can the students choose their majors, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 104, \"PCO\", \"types of toy\", \"children\", \"toy\", \"child\",\n \"<p>During playtime at a kindergarten, the teacher offers the children a number of different types of toy. Each child has to choose one type of toy. (There are enough toys of each type that more than one child, or even all of them, can choose the same type.)</p><p>In how many different ways can the children choose their toys, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 105, \"PCO\", \"stocks\", \"bankers\", \"stock\", \"banker\",\n \"<p>Amy has decided to invest in one of several stocks. She asks several bankers for their advice, and each banker chooses one of the stocks to advise her to buy. (It is possible for more than one banker to choose the same stock.)</p><p>In how many different ways can the bankers choose stocks, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 106, \"PCO\", \"trails\", \"hikers\", \"trail\", \"hiker\",\n // changed \"choose the same\" to \"hike on the same\" in the parenthetical expression\n \"<p>Several hikers go hiking at a national park that has numerous hiking trails. Each hiker chooses one of the trails to hike on. (It is possible for more than one hiker to hike on the same trail.)</p><p>In how many different ways can the hikers choose trails, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 107, \"PCO\", \"horses\", \"gamblers\", \"horse\", \"gambler\",\n \"<p>Several gamblers are watching a horse race. Each of them bets on one of the horses to win. (More than one gambler can bet on the same horse.)</p><p>In how many different ways can the gamblers place their bets, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 108, \"PCO\", \"signs\", \"fans\", \"sign\", \"fan\",\n \"<p>Fans attending the basketball game are given a sign with admission to the game. Each fan chooses from several different signs offered, such as \\\"D-fense,\\\" \\\"play hard,\\\" \\\"get loud,\\\" etc. (The same sign can be chosen by more than one fan.)</p><p>In how many different ways can the fans choose their signs, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 109, \"PCO\", \"songs\", \"singers\", \"song\", \"singer\",\n \"<p>At an audition for singers, several singers receive a list of songs, and each one has to pick one of the songs to sing. (It is possible for more than one singer to choose the same song.)</p><p>In how many different ways can the singers pick their songs, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 110, \"PCO\", \"spa packages\", \"vacationers\", \"package\", \"vacationer\",\n \"<p>A group of vacationers go to their resort spa, where various spa packages are offered. Each person chooses a spa package. (It is possible for multiple people to choose the same spa package.)</p><p>In how many different ways can the vacationers pick their spa packages, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 111, \"PCO\", \"types of bat\", \"players\", \"bat\", \"player\",\n \"<p>During batting practice for a baseball team, the coach offers the players a variety of different bats to use, e.g. wood, aluminum, hybrid, etc. Each player picks out one of these. (There are enough bats of each type that more than one player, or even all of them, can choose the same type.)</p><p>In how many different ways can the baseball team pick their bat, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 112, \"PCO\", \"essays\", \"judges\", \"essay\", \"judge\",\n \"<p>A local organization is holding an essay competition. To determine which essay will qualify for the next round, the judges of the competition must each vote for their favorite essay. (It is possible for a single essay to receive more than one vote, but each judge has only one vote.)</p><p>In how many ways can the judges cast their votes, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 113, \"PCO\", \"parts available\", \"actors trying out\", \"part\", \"actor\",\n \"<p>Several actors come to try out for a play, and there are several parts available. However, a given actor can only try out for one part. (It is possible for more than one actor to try out for the same part.)</p><p>In how many different ways can the actors try out for parts, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 114, \"PCO\", \"star ratings\", \"critics\", \"star\", \"critic\",\n \"<p>Several restaurant critics all rate the same restaurant using a star rating system, i.e. from one star to the maximum number of stars. Each critic rates the restaurant separately (but it is possible that more than one critic might give the same rating).</p><p>In how many different ways can the critics rate the restaurant, if there are {0} {1} and {2} {3}?</p>\" ),\n \nnew Question( 115, \"PCO\", \"issues\", \"candidates\", \"issue\", \"candidate\",\n \"<p>In a primary election for a political party, there are several hot political issues, such as reducing crime, improving education, reining in the deficit, and so on. Each candidate in the primary decides to focus on one of these issues as the center of their campaign. (More than one candidate might focus on the same issue.)</p><p>In how many different ways can the issues be selected by the candidates, if there are {0} {1} and {2} {3}?</p>\" ),\n \nnew Question( 116, \"PCO\", \"textbooks\", \"history teachers\", \"textbook\", \"teacher\",\n \"<p>In a certain high school, there are several different textbooks used for a world history course. Each history teacher can use whichever textbook he or she prefers. (The same textbook can be used by more than one teacher.)</p><p>In how many different ways can textbooks be selected by the history teachers, if there are {0} {1} and {2} {3}?</p>\" ),\n \nnew Question( 117, \"PCO\", \"crimes\", \"journalists\", \"crime\", \"journalist\",\n \"<p>In a certain city, several major crimes occurred in the past week. The crime journalists working at the city's newspapers each must decide which of these crimes to report on. (The journalists work at different newspapers, so more than one could report on the same crime.)</p><p>In how many different ways can the journalists report on the crimes, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 118, \"PCO\", \"presentations occurring at the same time\", \"professors\", \"presentation\", \"professor\",\n \"<p>Several professors from the same university are attending a conference. There are several presentations occurring at the same time, so each professor can only attend one of them. (However, more than one professor can attend the same presentation.)</p><p>In how many different ways can the professors attend the presentations, if there are {0} {1} and {2} {3}?</p>\" ),\n \nnew Question( 119, \"PCO\", \"topics\", \"contestants\", \"topic\", \"contestant\",\n \"<p>On a TV game show, during each round, each contestant must answer a trivia question correctly in order to move on to the next round. The contestants can pick the topic of the question they will answer from the topics available. (The same topic can be chosen by more than one contestant.)</p><p>In a given round, in how many different ways can the contestants pick their topics, if there are {0} {1} and {2} {3}?</p>\" ),\n \nnew Question( 120, \"PCO\", \"famous buildings\", \"painters\", \"building\", \"painter\",\n \"<p>Several painters visit a city famous for its beautiful architecture. Each painter paints one of the famous buildings in the city. (More than one of them might paint the same building.)</p><p>In how many different ways can the painters select which buildings to paint, if there are {0} {1} and {2} {3}?</p>\" ), \n \n// OSS training questions\n\nnew Question( 201, \"OSS\", \"hotels that she likes\", \"trips to Berlin\", \"hotel\", \"trip\",\n \"<p>Sheila goes to Berlin on business several times each year, and each time she goes, she stays at one of several hotels that she likes. (There might be more than one time when she stays at the same hotel.)</p><p>In how many different ways could she plan her hotel stays this year, if there are {0} {1} and {2} {3}?</p>\" ),\n \nnew Question( 202, \"OSS\", \"plot elements\", \"scenes in a script\", \"element\", \"scene\",\n \"<p>ScriptWriter Pro is a software that helps script writers come up with movie scripts by randomly generating script outlines. A script outline contains a certain number of scenes, with each scene containing a single plot element, such as \\\"exposition,\\\" \\\"action,\\\" \\\"suspense,\\\" and so on. (The same plot element could be used more than once in a script outline.)</p><p>How many different script outlines are possible, if there are {0} {1} and {2} {3}?</p>\" ),\n \nnew Question( 203, \"OSS\", \"moves that she has learned\", \"moves in one message\", \"move\", \"position\",\n \"<p>Felicia is learning flag semaphore, a system for sending messages by making different moves with flags held in each hand. She can send different messages by making different moves in different sequences. (It is possible to make the same move more than once in a message.)</p><p>How many different messages can Felicia send, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 204, \"OSS\", \"games on his phone\", \"hours to kill\", \"game\", \"hour\",\n \"<p>Suppose Jose has several hours to kill. He spends each hour playing one of the games on his phone. (He might play the same game on more than one hour.)</p><p>In how many different ways can he kill the time, if there are {0} {1} and {2} {3}?</p>\" ),\n \nnew Question( 205, \"OSS\", \"distinct hieroglyphs\", \"hieroglyphs in each sentence\", \"hieroglyph\", \"sentence position\",\n \"<p>Archaeologists discover records of an ancient language whose writing system was based on hieroglyphs. Strangely, each sentence in the language contained the same number of hieroglyphs (and a given hieroglyph could be repeated multiple times within a sentence).</p><p>How many different sentences were possible in this language, if there were {0} {1} and {2} {3}?</p>\" ),\n \n// problems 206-212 were used in exp 6\n \nnew Question( 206, \"OSS\", \"shops in the shopping center\", \"pages in a booklet\", \"shop\", \"page\",\n \"<p>A clerk at a shopping center passes out coupon booklets to shoppers. Each page of the booklets contains a coupon for one of the shops in the center, selected randomly. (It is possible for more than one page to contain coupons for the same shop.)</p><p>How many different coupon booklets are possible, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 207, \"OSS\", \"keys in the set\", \"notes in each melody\", \"key\", \"note\",\n \"<p>A piano student, when bored, plays random melodies on the piano. Each melody is the same number of notes long, and uses only keys from a fixed set of keys. (It is possible to play the same key more than once in a sequence.)</p><p>How many different melodies are possible, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 208, \"OSS\", \"allowable letters\", \"letters in each password\", \"letter\", \"position\",\n \"<p>A website generates user passwords by selecting a certain number of letters randomly from a set of allowable letters. (It is possible to use the same letter more than once in a password.)</p><p>How many different passwords are possible, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 209, \"OSS\", \"buttons\", \"flashes per sequence\", \"button\", \"flash\", \n \"<p>The game Simon uses a disk with several different-colored buttons. The buttons flash in sequence and then the player has to push the buttons in the same sequence - otherwise they get a shock. (It is possible for the same button to flash more than once in a sequence.)</p><p>How many different sequences are possible, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 210, \"OSS\", \"permissible numbers\", \"numbers on each ticket\", \"number\", \"position\",\n \"<p>In a certain city, municipal lottery tickets are printed using series of numbers chosen randomly from a list of permissible numbers. (It is possible for the same number to appear at more than one position in a series.)</p><p>How many different lottery tickets are possible, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 211, \"OSS\", \"answers for each question\", \"questions on the exam\", \"answer\", \"question\",\n \"<p>A student is taking a multiple choice exam. Each question has the same number of answers and the student just chooses an answer randomly. (It is possible for him to choose the same answer for more than one question.)</p><p>In how many different ways can he fill out the exam, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 212, \"OSS\", \"dresses\", \"days with dances\", \"dress\", \"day\",\n \"<p>Elizabeth is going to attend a dance every day for the next several days. Each day, she chooses a dress to wear to the dance. (It is possible for her to choose the same dress on more than one day.)</p><p>In how many different ways can she choose her dresses, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 213, \"OSS\", \"modes of transport\", \"legs of the trip\", \"mode\", \"leg\",\n \"<p>Tonia is taking a trip from Chicago to Los Angeles, passing through several cities on the way. On each leg of the trip, she can use any of several modes of transport, such as bus, train, or airplane. (There might be more than one leg of the trip for which she uses the same mode of transport.)</p><p>In how many different ways can she travel from Chicago to Los Angeles, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 214, \"OSS\", \"controller buttons\", \"button presses per combination\", \"controller button\", \"button press\",\n \"<p>In a video game about martial arts fighting, you can make a character do cool moves by pressing several buttons on the controller in a certain order, such as \\\"up-left-down-...\\\". Each combination consists of the same number of button presses. (The same button might need to be pressed more than once in a given combination.)</p><p>How many different combinations are possible, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 215, \"OSS\", \"possible hand gestures\", \"gestures in a handshake\", \"possible movement\", \"movement position\",\n \"<p>The Gamma Gamma Gamma fraternity wants to invent a special handshake for fraternity brothers. The handshake will involve a series of hand gestures such as bumping fists, high five, or thumbs-up. (It is possible to repeat the same gesture more than once during the handshake.)</p><p>How many different handshakes are possible, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 216, \"OSS\", \"different words\", \"words per line\", \"word\", \"position\",\n \"<p>Suppose Phil owns a \\\"magnetic poetry\\\" set which can be used to create lines of poetry by sticking magnetic words onto the refrigerator. Suppose he creates different lines which all contain the same number of words. (He has an unlimited supply of each word, so he can use the same word more than once in a single line.)</p><p>How many different lines of poetry can Phil create if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 217, \"OSS\", \"bead materials\", \"beads on each bracelet\", \"material\", \"bead\",\n \"<p>A jeweler makes bracelets by stringing together beads made of different materials, such as gold, silver, titanium, etc. Each bracelet has the same number of beads on it. (It is possible for the same bead material to be repeated more than once on a single bracelet.)</p><p>How many different bracelets are possible, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 218, \"OSS\", \"flavors\", \"layers in each cake\", \"flavor\", \"layer\",\n \"<p>A baker is making layer cakes by selecting various flavors of cakes to stack in layers. He chooses the layer flavors randomly from the selection of flavors he has in his store, such as chocolate, vanilla, red velvet, etc. (It is possible to use the same flavor more than once in a cake.)</p><p>How many different layer cakes are possible if there are {0} {1} and {2} {3}?</p>\" ),\n \nnew Question( 219, \"OSS\", \"breeds of flower\", \"flowers per row\", \"breed\", \"flower\",\n \"<p>A large mansion grows many breeds of flower, like roses, pansies, and irises, which are used to decorate the mansion. The housekeeper places a row of flowers on each window sill, using the same number of flowers in each row, but varying the specific breeds and their order. (The same breed can be used more than once in a row.)</p><p>How many different rows of flowers are possible, if there are {0} {1} and {2} {3}?</p>\" ),\n \nnew Question( 220, \"OSS\", \"cellphone models\", \"phones in each row\", \"model\", \"position\",\n \"<p>Each display case in a cellphone store contains a row of cellphones selected from the models currently on sale. The cases are all the same size, so there are the same number of phones in each row. (A given cellphone model might appear multiple times in a single row, for example if it is a very popular phone.)</p><p>How many different ways are there to fill a display case, if there are {0} {1} and {2} {3}?</p>\" ),\n\n// TFR training questions\n\nnew Question( 301, \"TFR\", \"fonts\", \"document styles\", \"font\", \"document style\",\n \"<p>In Microsoft Word, different document styles are used to format text in different parts of the document, such as \\\"title,\\\" \\\"chapter heading,\\\" \\\"sub-section heading,\\\" etc. A font must be assigned to each document style. (It is possible to assign the same font to more than one document style.)</p><p>In how many ways can fonts be assigned to document styles, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 302, \"TFR\", \"ring tones\", \"types of ring\", \"ring tone\", \"type of ring\",\n \"<p>A smartphone comes pre-loaded with various ring tones. For each type of ring, such as \\\"incoming call,\\\" \\\"alarm,\\\" \\\"new mail,\\\" etc., you can set any of the ring tones. (It is possible to set the same ring tone for multiple types of ring.)</p><p>In how many different ways can types of ring be set with ring tones, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 303, \"TFR\", \"icons\", \"triggers\", \"icon\", \"trigger\",\n \"<p>Suppose the settings on a computer allow one to set what kind of icon is used for the mouse pointer, e.g. an arrow, a hand, a vertical line, etc. Icons can be set separately for a variety of \\\"triggers,\\\" like \\\"clicking something,\\\" \\\"hovering over a link,\\\" \\\"waiting for something,\\\" and so on. (The same icon could be set for more than one trigger.)</p><p>In how many different ways can icons be set for triggers, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 304, \"TFR\", \"devices\", \"activities\", \"device\", \"activity\",\n \"<p>Sharon owns many different electronic devices, like a desktop computer, laptop computer, smartphone, etc., which she uses for activities like homework, surfing the net, and email. For a given activity, she always uses the same device. (She might use the same device for more than one activity.)</p><p>In how many different ways can she choose devices for activities, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 305, \"TFR\", \"shapes\", \"occasions\", \"shape\", \"occasion\",\n \"<p>Tanisha the baker makes cakes for all occasions, like birthdays, weddings, and anniversaries. She likes to make cakes in different shapes, e.g. round, square, or oval, but for any given occasion, she always uses the same shape. (However, there might be more than one occasion for which she uses the same shape.)</p><p>In how many different ways could she assign shapes of cake to occasions, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 306, \"TFR\", \"screen savers\", \"types of software\", \"screen saver\", \"software\",\n \"<p>Alma's new computer comes with multiple different screen savers. The screen saver can be set separately depending on what kind of software is open on the computer, so that, for example, Alma could set one screen saver to activate when using Office software, another for internet browsers, another for games, and so on. (It is also possible to set the same screen saver for more than one type of software.)</p><p>In how many different ways can the screen savers be set up, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 307, \"TFR\", \"types of bark\", \"kinds of truffle\", \"bark\", \"truffle\",\n \"<p>Darren is training his dog to hunt truffles. He trains it to bark differently depending on what kind of truffle it finds: for example, a sharp yip for white truffles, a loud bark for black truffles, a growl for burgundy truffles, and so on. (However, he might train the dog to make the same bark for more than one kind of truffle.)</p><p>In how many different ways can Darren train his dog, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 308, \"TFR\", \"weapons\", \"enemies\", \"weapon\", \"enemy\",\n \"<p>Brandi plays an Orc Barbarian in World of Warcraft. She has many weapons, like axe, sword, and spear, but she always uses the same weapon for a particular kind of enemy, such as humans, elves, and dwarves. (There might be more than one kind of enemy for which she uses the same weapon.)</p><p>In how many different ways can Brandi choose weapons for different enemies, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 309, \"TFR\", \"pairs of sneakers\", \"sports that he plays\", \"pair of sneakers\", \"sport\",\n \"<p>Virgil owns many pairs of sneakers and decides which one to wear depending on what sport he is going to play. For example, he might wear one pair for jogging, another for basketball, another for tennis, and so on. (There might be more than one sport for which he wears the same pair of sneakers.)</p><p>In how many different ways could he match sneakers with sports, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 310, \"TFR\", \"sets of china\", \"types of guest\", \"set\", \"guest\",\n \"<p>A rich family has several sets of china to use for meals. For each type of guest, there is a particular set of china they use, e.g. one set of china for family, one for friends, and one for business acquaintances. (There might be more than one type of guest for which they use the same set of china.)</p><p>In how many different ways could sets of china be matched to types of guests, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 311, \"TFR\", \"paper grades\", \"document categories\", \"grade\", \"category\",\n \"<p>A print shop has several different grades of paper, and uses a particular grade of paper for each category of document that it prints, e.g. glossy paper for posters, book paper for business documents, bond paper for resumes, etc. (The same paper grade could be used for more than one document category.)</p><p>In how many different ways could paper grades be matched to document categories, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 312, \"TFR\", \"knives\", \"different foods\", \"knife\", \"food\",\n \"<p>Russell has a few different knives in his kitchen, such as a chef's knife, a paring knife, a cleaver, etc. For a given food, like vegetables, bread, or meat, he always cuts it with the same knife (but he might use the same knife for more than one food).</p><p>In how many different ways could Russell use knives for food, if there are {0} {1} and {2} {3}?</p>\" ),\n \nnew Question( 313, \"TFR\", \"fragrances\", \"product variants\", \"fragrance\", \"variant\",\n \"<p>A company that makes personal care products is launching a new line of soap that includes several product variants, e.g. anti-perspirant soap, soap for sensitive skin, refreshing soap, and so on. The product designer must give each product variant a fragrance, like lemon, lavender, or mint. (More than one product variant could get the same fragrance.)</p><p>How many ways are there to pair fragrances with product variants, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 314, \"TFR\", \"types of symbol\", \"types of building\", \"symbol\", \"building\",\n \"<p>Suppose you are designing a map and you have several types of symbol which can be used to represent different types of building. For example, red hearts could represent hospitals, yellow rectangles could represent schools, and so on. (The same type of symbol could represent more than one type of building, since you might not need to distinguish between some types of building.)</p><p>In how many ways could symbols be matched to buildings, if there are {0} {1} and {2} {3}?</p>\" ),\n \nnew Question( 315, \"TFR\", \"bags\", \"types of outing\", \"bag\", \"outing\",\n \"<p>Milton owns several different bags, like a backpack, a suitcase, a duffel bag, and so on. For a given type of outing, like going to school, going camping, or traveling, he always takes the same bag. (However, there might be more than one type of outing for which he takes the same bag.)</p><p>In how many different ways could Milton match up bags with types of outing, if there are {0} {1} and {2} {3}?</p>\" ),\n \nnew Question( 316, \"TFR\", \"kinds of chart\", \"data sets\", \"chart\", \"data set\",\n \"<p>Suppose you are preparing a report about the population of a certain city, which will include various data sets about things like sex, age, and income. Each data set should be displayed using one of several kinds of chart, such as pie chart, bar chart, or line graph. (Of course, more than one data set can be displayed using the same kind of chart.)</p><p>In how many different ways could data sets be matched up with kinds of chart, if there are {0} {1} and {2} {3}?</p>\" ),\n \nnew Question( 317, \"TFR\", \"destinations\", \"holidays\", \"destination\", \"holiday\",\n \"<p>A travel agency holds a promotion during several holidays during the year, like Thanksgiving, Christmas, Spring Break, etc. For each holiday, they offer discounted travel to one out of of several possible travel destinations. (They might give discounts to the same destination for more than one holiday.)</p><p>In how many different ways could the agency match destinations to holidays, if there are {0} {1} and {2} {3}?</p>\" ),\n \nnew Question( 318, \"TFR\", \"competing companies\", \"development projects\", \"company\", \"project\",\n \"<p>A city government is planning several urban development projects, including a new bridge, a library, and a park. For each project, the government will contract with one of several construction companies to carry it out. (They might contract with the same company for more than one project.)</p><p>In how many different ways could the government assign contracts for the projects, if there are {0} {1} and {2} {3}?</p>\" ),\n \nnew Question( 319, \"TFR\", \"email addresses\", \"kinds of website\", \"address\", \"website\",\n \"<p>Brandon has several email addresses. When he enters his email address in a website, he always uses the same address for a given type of website, so he could use one address for social networks, a different one for online banking, and so on. (However, he could use the same address for more than one kind of website.)</p><p>In how many different ways could Brandon pair up addresses with kinds of website, if there are {0} {1} and {2} {3}?</p>\" ),\n \nnew Question( 320, \"TFR\", \"kinds of diagram\", \"concepts\", \"diagram\", \"concept\",\n \"<p>A teacher is presenting a lesson involving many difficult concepts, so she illustrates each concept with a diagram, e.g. a Venn diagram, a tree diagram, a flowchart, etc. (She could illustrate more than one concept with the same kind of diagram.)</p><p>In how many different ways could she assign diagrams to concepts, if there are {0} {1} and {2} {3}?</p>\" ),\n\n// test set 1\n\n// all of these problems were used in exp 6\n\nnew Question( 421, \"OAPlc\", \"colors\", \"rooms\", \"color\", \"room\",\n \"<p>A homeowner is going to repaint several rooms in her house. She chooses one color of paint for the living room, one for the dining room, one for the family room, and so on. (It is possible for multiple rooms to be painted the same color.)</p><p>In how many different ways can she paint the rooms, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 422, \"CAE\", \"categories\", \"paranormal events\", \"category\", \"event\",\n \"<p>An FBI agent is investigating several paranormal events. She must write a report classifying each event into a category such as Possession, Haunting, Werewolf, and so on.</p><p>In how many different ways can she write her report, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 423, \"OAPpl\", \"employees\", \"prizes\", \"employee\", \"prize\",\n \"<p>A prize drawing is held at a small office party, and each of several prizes is awarded to one of the employees. (It is possible for multiple prizes to be awarded to the same employee.)</p><p>In how many different ways can the prizes be awarded, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 424, \"PCO\", \"fishing spots\", \"fishermen\", \"spot\", \"fisherman\",\n \"<p>Several fishermen go fishing in the same lake, and each of them chooses one of several spots at which to fish. (It is possible for more than one fisherman to choose the same spot.)</p><p>In how many different ways can the fishermen choose their spots, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 425, \"OSS\", \"types of wine\", \"courses in the meal\", \"type of wine\", \"course\",\n \"<p>A gourmet chef is preparing a fancy several-course meal. There are several types of wine available, and the chef needs to choose one wine to serve with each course. (It is possible for the same wine to be served with more than one course.)</p><p>In how many different ways can the wines be chosen, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 426, \"OAPpl\", \"sons\", \"houses\", \"son\", \"house\",\n \"<p>A wealthy old woman is writing her will. She owns several houses, and wishes to leave each house to one of her sons. (It is possible for her to leave more than one house to the same son.)</p><p>In how many different ways can she write this part of her will, if there are {0} {1} and {2} {3}?</p>\" ),\n\n// test set 2\n\n// all of these problems were used in exp 6\n\nnew Question( 527, \"OAPlc\", \"crops\", \"fields\", \"crop\", \"field\",\n \"<p>A farmer is planning what crops he will plant this year. He chooses one crop for each of several fields. (It is possible for multiple fields to receive the same crop.)</p><p>In how many different ways can the farmer plant his crops, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 528, \"CAE\", \"categories\", \"weather events\", \"category\", \"event\", \n \"<p>A meteorologist must write a report classifying each extreme weather event which occurred in the past year into a category such as Hurricane, Tropical Storm, etc.</p><p>In how many different ways can he write his report, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 529, \"OAPpl\", \"children\", \"provinces\", \"child\", \"province\",\n \"<p>An aging king plans to divide his lands among his heirs. Each province of the kingdom will be assigned to one of his many children. (It is possible for multiple provinces to be assigned to the same child.)</p><p>In how many different ways can the provinces be assigned, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 530, \"PCO\", \"treatments\", \"doctors\", \"treatment\", \"doctor\",\n \"<p>There are several possible treatments for a certain rare disease. A patient with this disease consults several doctors, and each doctor recommends one of the possible treatments. (It is possible for more than one doctor to recommend the same treatment.)</p><p>In how many different ways can the doctors make their recommendations, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 531, \"OSS\", \"colognes to choose from\", \"dates\", \"cologne\", \"date\", \n \"<p>Don Juan has one date with each of a merchant's daughters. For each date, he puts on a cologne he thinks that daughter will like. (It is possible for him to choose the same cologne for more than one date.)</p><p>In how many different ways can he choose colognes for his dates, if there are {0} {1} and {2} {3}?</p>\" ),\n\nnew Question( 532, \"OAPpl\", \"detectives\", \"cases\", \"detective\", \"case\", \n \"<p>A police department receives several new cases in one day. Each new case is assigned to one of the detectives. (It is possible for multiple cases to be assigned to the same detective.)</p><p>In how many different ways can the cases be assigned, if there are {0} {1} and {2} {3}?</p>\" )\n \n ];\n \n return questions;\n\n}", "title": "" }, { "docid": "262a40a29c7efcc4ad3edcd8ac4c99bd", "score": "0.5078851", "text": "fetchExperiments() {\n return __awaiter(this, void 0, void 0, function* () {\n const url = this.baseUrl + '/experiments';\n return yield rest_client_1.RestClient.get(url);\n });\n }", "title": "" }, { "docid": "b9c5a4e9fc3c1f670536b2cd9666497d", "score": "0.505421", "text": "function getDomObjExercise(prevEx = null, exType = \"modifier\") {\n console.log(\"in getDomObjExercise\");\n let exInfo = new ExerciseInfo();\n let arrToCheck = null;\n if (exType === \"modifier\") {\n exInfo.reason = \"most recent DOM object modified in run log\";\n exInfo.codeType = \"modifier\";\n arrToCheck = modifiers;\n } else { /** exercise type === user */\n exInfo.reason = \"most recent DOM object used in run log\";\n exInfo.codeType = \"user\";\n arrToCheck = users;\n }\n\n for (let s = allSnippets.length - 1; s >= 0; s--) {\n for (let o = 0; o < domObjects.length; o++) {\n if (allSnippets[s].includes(domObjects[o])) {\n /** snippets look like: \n * '\\n' +\n '/ * $map.css({:71:74 * /\\n' +\n ' $map.css({\\n' +\n ' left: position[0],\\n' +\n ' top: position[1]\\n' +\n ' });\\n' +\n '\\n' \n below we are extracting the start/end line numbers from the \n value at the top of the snippet in block comments to compare its \n unique key to the keys present in codeTypes (which are based on the \n same source code line location data), which look like: \"$remove_121_121\"\n\n @TODO possible problem (figure out if this could actually ever happen since\n we are using the same location data to create both keys...) is that these \n numbers have to be exact matches and they may not be.. so you basically \n need to use the larger numbers of the two keys as bounding numbers to \n search through instances with. \n EX: if a key from the runLog code snippet was \"$map.css({:70:75\" and the \n key from the codeType modifer array was \"$map_71_74\", this is still the\n correct element to be in the exercise. \n */\n let currSnippetKey = parseSnippetKey(allSnippets[s]);\n let currCodeTypeKey = parseCodeTypeKey(domObjects[o], currSnippetKey, true);\n if (arrToCheck.includes(currCodeTypeKey) && !visited[currSnippetKey]) {\n exInfo.code = allSnippets[s];\n exInfo.arrayLoc = s;\n exInfo.domObj = domObjects[o];\n let currElems = prevEx ? prevEx.otherElemsIncluded : [];\n exInfo.otherElemsIncluded = findIncludedDomElems(allSnippets[s], currElems);\n visited[currSnippetKey] = true;\n return exInfo;\n }\n }\n }\n }\n /** if we never find another dom object exercise */\n return null;\n}", "title": "" }, { "docid": "be3c61ccf6266c3a4514e9794d7fb04d", "score": "0.5028734", "text": "function exercise14(value) {\n // YOUR CODE GOES HERE\n }", "title": "" }, { "docid": "c93614945d3dc0efde518304660024bc", "score": "0.502596", "text": "function massageExercises() {\n for(var i=0; i < data.chapters.length; i++)\n {\n var chapter = data.chapters[i];\n\n if (chapter.exercises !== undefined) {\n for(var j=0; j < chapter.exercises.length; j++)\n {\n var exercise = chapter.exercises[j];\n exercise.chapterId = i;\n exercise.chapterTitle = chapter.title;\n }\n } else {\n // There are no exercises, create one\n var newExercise = {\n type: \"Normal\",\n page: chapter.page,\n answerPage: chapter.answerPage,\n first: chapter.first,\n last: chapter.last,\n chapterId: i,\n chapterTitle: chapter.title\n };\n\n chapter.exercises = [newExercise];\n }\n }\n }", "title": "" }, { "docid": "5bd9ad2631427b2bae0e9621eb82b041", "score": "0.5017392", "text": "function getExamIDs(){\n\tvar JSONNOOP={}\n\tJSONNOOP = wrapJson(JSONNOOP, \"getExamIDs\");\n\tsubmitMiddle(JSONNOOP, displayExamIDs);\n\n}", "title": "" }, { "docid": "5ae30d555772006a5b3902ce9b4760fa", "score": "0.49844033", "text": "getCourse(index){\n describe(\"GET\", function (){\n it(\"Return courses\", function(done){\n request(url)\n .get(\"/course/\" + index)\n .auth(\"[email protected]\", \"123qwe\")\n .expect(200)\n .end(function(err, res){\n if (err) return done(err);\n done();\n });\n });\n });\n }", "title": "" }, { "docid": "1aac7f051d40571aa5b66f2536dfc739", "score": "0.49745032", "text": "static async getInitialProps() {\n\t\tconst res = await fetch('https://yoga-exercises-api.herokuapp.com/poses');\n\t\tconst statusCode = res.status > 200 ? res.status : false;\n\t\tconst data = await res.json();\n\t\tconsole.log(`Yoga exercises data fetched. Count: ${data.length}`);\n\n\t\treturn {\n\t\t\t// poses : data.map((entry) => entry.pose)\n\t\t\tposes : data,\n\t\t\tstatusCode\n\t\t};\n\t}", "title": "" }, { "docid": "ee359f7e57853891f1690c58643eacee", "score": "0.49703676", "text": "function singleExercise(exerciseID) {\n this.exerciseID = exerciseID;\n this.set = [];\n this.addSet = addSet;\n}", "title": "" }, { "docid": "1d102497dd4bf232c8f5731d1f1337b7", "score": "0.49485448", "text": "function gather() {\n const epochs = fs.readdirSync(dirs.jobs())\n\n // Bail if empty experiment set\n if (epochs.length == 0) {\n log.error(\"This experiment set is empty.\")\n process.exit(1)\n }\n\n const metadata = loadYAML(\"experiments/metadata/expset.yml\")\n\n const experiments = _.map(epochs, experiment);\n\n const vc = vcInfo(experiments)\n\n const machine = machineInfo(experiments)\n\n return {\n id: metadata.uuid,\n desc: metadata.description,\n vc: vc,\n machine: machine,\n experiments: experiments,\n }\n}", "title": "" }, { "docid": "9da164d0c26d60cafb9545ae76aecc77", "score": "0.4937965", "text": "function genExpSeq() {\n \"use strict\";\n\n let exp = [];\n\n exp.push(fullscreen(true));\n exp.push(browser_check(CANVAS_SIZE));\n exp.push(resize_browser());\n exp.push(welcome_message());\n exp.push(vpInfoForm(\"/Common7+/vpInfoForm_de.html\"));\n exp.push(mouseCursor(false));\n\n exp.push(WELCOME_INSTRUCTIONS);\n exp.push(TASK_INSTRUCTIONS1);\n exp.push(TASK_INSTRUCTIONS_MAPPING);\n exp.push(TASK_INSTRUCTIONS2);\n\n for (let blk = 0; blk < PRMS.nblks; blk++) {\n exp.push(BLOCK_START);\n\n let blk_timeline;\n if (blk === 0) {\n blk_timeline = { ...TRIAL_TIMELINE_TRAINING_SAFE };\n } else if (blk === 1) {\n blk_timeline = { ...TRIAL_TIMELINE_TRAINING_RISKY };\n } else {\n blk_timeline = { ...TRIAL_TIMELINE_EXP };\n }\n let ntrls = [0, 1].includes(blk) ? PRMS.ntrls_training : PRMS.ntrls_exp;\n blk_timeline.sample = {\n type: \"fixed-repetitions\",\n size: ntrls / blk_timeline.timeline_variables.length,\n };\n exp.push(blk_timeline); // trials within a block\n exp.push(BLOCK_FEEDBACK);\n }\n\n // debrief\n exp.push(mouseCursor(true));\n exp.push(END_SCREEN);\n exp.push(EMAIL_OPTION);\n\n // save data\n exp.push(SAVE_DATA);\n\n // debrief\n exp.push(mouseCursor(true));\n exp.push(end_message());\n exp.push(fullscreen(false));\n\n return exp;\n}", "title": "" }, { "docid": "9b1417cdb20461c2039cc5c9ef1b3a94", "score": "0.49350858", "text": "async getExamplePage(_lastEvalKey) {\n let params = {\n TableName: this.testTable,\n };\n if(_lastEvalKey) {\n params = {...params, ExclusiveStartKey: _lastEvalKey}\n }\n const response = await this._scan(params);\n return [response.Items, response.LastEvaluatedKey];\n }", "title": "" }, { "docid": "bee1c743735d0045354c27c238e84835", "score": "0.49284473", "text": "function exercise12(array) {\n // YOUR CODE GOES HERE\n }", "title": "" }, { "docid": "030381b9c08af4ccac394c8ed12a6dab", "score": "0.4924384", "text": "function Exercises() {\n return (\n <div>\n <h2>Exercises!</h2>\n </div>\n );\n}", "title": "" }, { "docid": "b0869f5b83a1270f8c2b5a564fe289eb", "score": "0.49175027", "text": "function showExerciseSet() {\n\t\tif (exerciseSetObject) {\n\t\t\tObject.getOwnPropertyNames(exerciseSetObject).forEach((val) => {\n\t\t\t\texerciseSetDisplay.forEach((input) => {\n\t\t\t\t\tinput.innerHTML += `<p class=\"exercise_set\">${val}: ${exerciseSetObject[val]}</p>`;\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\t}", "title": "" }, { "docid": "bf536d6892735f10cb23ca8d11b5b321", "score": "0.49073943", "text": "fetchExperiment(expUUID) {\n return __awaiter(this, void 0, void 0, function* () {\n const url = this.baseUrl + '/experiments/' + expUUID;\n return yield rest_client_1.RestClient.get(url);\n });\n }", "title": "" }, { "docid": "885092a173361ed944c70ff6bbb95782", "score": "0.49042135", "text": "function getExerciseClass(){\n \tvar exClass = \"\";\n \t\n \tswitch(exerciseType) {\n \t\n \tcase \"Running\":\n \tcase \"Kickboxing\":\n \tcase \"Swimming\":\n \tcase \"Bicycling\":\n \tcase \"Rowing\":\n \tcase \"Jump Rope\":\n \t\texClass = \"Aerobics\";\n \t\tbreak;\n \t\t\n \tcase \"Squats\":\n \tcase \"Leg Extensions\":\n \tcase \"Dumbbell Curls\":\n \tcase \"Bench Press\":\n \tcase \"Tricep Extensions\":\n \tcase \"Bent Over Rows\":\n \t\texClass = \"Anaerobics\";\n \t\tbreak;\n \t\t\n \tcase \"Jumping Jacks\":\n \tcase \"Lunges\":\n \tcase \"Dips\":\n \tcase \"Crunches\":\n \tcase \"Pull Ups\":\n \tcase \"Push Ups\":\n \t\texClass = \"Calisthenics\";\n \t\tbreak;\n \t\t\n \tcase \"Hip Flexor Stretch\":\n \tcase \"Piriformis Stretch\":\n \tcase \"Hamstring Stretch\":\n \tcase \"Quad Stretch\":\n \tcase \"Back Stretch\":\n \tcase \"Shoulder Stretch\":\n \t\texClass = \"Flexibility\";\n \t\tbreak;\n \t\t\n \tcase \"Walking\":\n \tcase \"Side Lunges\":\n \tcase \"Step Ups\":\n \tcase \"Lite Swimming\":\n \tcase \"Lying Abduction\":\n \tcase \"Wall Squats\":\n \t\texClass = \"Maternity\";\n \t\tbreak;\n \t\t\n \t\tdefault:\n \t\t\tbreak;\n \t};\n \n \treturn exClass;\n }", "title": "" }, { "docid": "7c0dfbcad14e4984486080b523d13e36", "score": "0.49035874", "text": "function exercise11() {\n return {\n myNumber: 42,\n myString: 'hello',\n myArray: [1, 2, 3]\n };\n }", "title": "" }, { "docid": "ec2cc8fed84d52a6a1d0d0de0711626c", "score": "0.48938367", "text": "function viewAllEmployees() {\n db.query(`SELECT * FROM employee `, \n function(err, res) {\n if (err) throw err\n console.table(res);\n startQuestion();\n })\n}", "title": "" }, { "docid": "a7263a8701c099170a4d7621cbac8455", "score": "0.48915583", "text": "function getExerciseTypes() {\n var types = [];\n\n for(var i=0; i < data.chapters.length; i++)\n {\n var chapter = data.chapters[i];\n if (chapter.exercises === undefined) { continue; }\n\n for(var j=0; j < chapter.exercises.length; j++)\n {\n var type = chapter.exercises[j].type;\n\n if (types.indexOf(type) === -1) {\n types.push(type);\n }\n }\n }\n\n return types;\n }", "title": "" }, { "docid": "194dcbf11d943ec95aab1153b358cd36", "score": "0.4889753", "text": "function getUsersExercises(queryString, callback) {\n var query = ExerciseModel.find({userId: queryString.userId});\n\n if (queryString.from && queryString.to) {\n query.and({\n date: {\n $gte: new Date(queryString.from),\n $lte: new Date(queryString.to)\n }\n });\n }\n\n if (queryString.limit) {\n query.limit(Number(queryString.limit));\n }\n\n query.select({userId: 1, description: 1, duration: 1, date: 1});\n\n query.exec(callback);\n}", "title": "" }, { "docid": "9e67bf4095b52d8963f3c15602b8e9c0", "score": "0.48781097", "text": "function updateExercises() {\n\t//first get and parce array from local storage\n\tconst localJSON = localStorage.getItem(\"exercises\");\n\tconst exerciseSetObject = JSON.parse(localJSON);\n\t// display current exercise set values taken from local storage\n\tfunction showExerciseSet() {\n\t\tif (exerciseSetObject) {\n\t\t\tObject.getOwnPropertyNames(exerciseSetObject).forEach((val) => {\n\t\t\t\texerciseSetDisplay.forEach((input) => {\n\t\t\t\t\tinput.innerHTML += `<p class=\"exercise_set\">${val}: ${exerciseSetObject[val]}</p>`;\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\t}\n\tshowExerciseSet();\n}", "title": "" }, { "docid": "c08390362b6aeabdd4d8f8218ede3760", "score": "0.48723158", "text": "function exercise(workout) {\n function doExercise() {\n return `Today's exercise : ${workout}`\n }\n return doExercise;\n // return (`Today's exercise : ${workout}`)\n}", "title": "" }, { "docid": "b2ae8dab67da98fa4db81402acaefc04", "score": "0.48639986", "text": "function getDifficulty() {\n const properties = [\n {\n name: 'difficulty',\n description: colors.cyan('Enter a difficulty (1-5)'),\n type: 'integer',\n pattern: /[1-5]/,\n message: 'You must enter a number between 1 and 5',\n hidden: false,\n required: true \n }\n ];\n return new Promise((resolve, reject) => {\n prompt.get(properties, (err, res) => {\n if (err) reject(err);\n resolve(res);\n })\n })\n}", "title": "" }, { "docid": "1013814dc6b1f220dedfae8b81ac9131", "score": "0.48529428", "text": "function viewEmployees() {\r\n var query = \"SELECT * FROM employee\";\r\n connection.query(query, function (err, res) {\r\n if (err) throw err;\r\n console.table(res);\r\n questions();\r\n });\r\n}", "title": "" }, { "docid": "849bfe9a99c76ffe13afbd75fdeda0c4", "score": "0.48525783", "text": "function addExercise(exercise, workout_id) {\n return db('exercises')\n .insert(exercise, \"id\")\n .then(ids => {\n return db('workout-exercises')\n .insert({exercise_id: ids[0], workout_id}, \"id\")\n .then(id => {\n return id[0]\n })\n })\n}", "title": "" }, { "docid": "3bf138980c8ce0336128f729fb5c3614", "score": "0.48479363", "text": "function getAllExamples() {\n\n\tvar params = \"method=getAllExamples\";\n\t$.ajax({\n\t\ttype : \"GET\",\n\t\turl : \"backend/getExamples.php?\" + params,\n\t\tbeforeSend : function(xhr) {\n\t\t\txhr.overrideMimeType(\"text/plain; charset=x-user-defined\");\n\t\t}\n\t}).done(function(data) {\n\t\tjsonArray = $.parseJSON(data);\n\t\tdrawExamples(jsonArray);\n\t});\n}", "title": "" }, { "docid": "135a3097d646857c760e24734aa8da87", "score": "0.48425996", "text": "function genExpSeq() {\n 'use strict';\n\n let exp = [];\n\n /* exp.push(fullscreen(true)); */\n /* exp.push(browser_check(PRMS.screenRes)); */\n /* exp.push(resize_browser()); */\n /* exp.push(welcome_message()); */\n /* exp.push(vpInfoForm('/Common7+/vpInfoForm_de.html')); */\n /* exp.push(mouseCursor(false)); */\n\n exp.push(WELCOME_INSTRUCTIONS);\n exp.push(COUNT_DOTS);\n\n exp.push(TASK_INSTRUCTIONS);\n\n let blk_type;\n if (VERSION === 1) {\n blk_type = repeatArray(['easy', 'hard'], PRMS.nBlks / 2);\n } else if (VERSION === 2) {\n blk_type = repeatArray(['hard', 'easy'], PRMS.nBlks / 2);\n }\n\n for (let blk = 0; blk < PRMS.nBlks; blk += 1) {\n let blk_timeline;\n if (blk_type[blk] === 'easy') {\n blk_timeline = { ...TRIAL_TIMELINE_EASY };\n } else if (blk_type[blk] === 'hard') {\n blk_timeline = { ...TRIAL_TIMELINE_HARD };\n }\n blk_timeline.sample = {\n type: 'fixed-repetitions',\n size: PRMS.nTrls / TRIAL_TABLE_EASY.length,\n };\n exp.push(blk_timeline); // trials within a block\n exp.push(BLOCK_FEEDBACK); // show previous block performance\n }\n\n // save data\n exp.push(SAVE_DATA);\n\n // debrief\n exp.push(mouseCursor(true));\n exp.push(END_SCREEN);\n exp.push(end_message());\n exp.push(fullscreen(false));\n\n return exp;\n}", "title": "" }, { "docid": "13cfce29eeff6895f39bd766e55247ab", "score": "0.48371455", "text": "async function exercise18() {\n return await fetch(\"https://jsonplaceholder.typicode.com/users/1\")\n .then(response => response.json())\n .then(data => displayContents(data))\n}", "title": "" }, { "docid": "d55c77556c34dc6c685328ca81fa6364", "score": "0.48270333", "text": "function get_selected_practices() {\n\t\tvar oTT = TableTools.fnGetInstance('practice-result');\n\t return oTT.fnGetSelectedData();\n\t}", "title": "" }, { "docid": "b7201146839f99eb83978e436ebd612e", "score": "0.481201", "text": "function genExpSeq() {\n \"use strict\";\n\n let exp = [];\n\n // setup\n exp.push(fullscreen(true));\n exp.push(browser_check(PRMS.screenRes));\n exp.push(resize_browser());\n exp.push(welcome_message());\n exp.push(vpInfoForm(\"/Common7+/vpInfoForm_de.html\"));\n exp.push(mouseCursor(false));\n\n exp.push(COUNT_DOTS);\n exp.push(PRELOAD);\n\n // instructions\n exp.push(WELCOME_INSTRUCTIONS);\n exp.push(TASK_INSTRUCTIONS1);\n exp.push(TASK_INSTRUCTIONS2);\n exp.push(TASK_INSTRUCTIONS3);\n exp.push(TASK_INSTRUCTIONS4);\n\n for (let blk = 0; blk < PRMS.nBlks; blk += 1) {\n exp.push(BLOCK_START);\n let blk_timeline;\n blk_timeline = { ...TRIAL_TIMELINE };\n blk_timeline.sample = {\n type: \"fixed-repetitions\",\n size: PRMS.nTrls / TRIAL_TABLE.length,\n };\n exp.push(blk_timeline); // trials within a block\n if (blk < PRMS.nBlks - 1) {\n exp.push(BLOCK_END);\n }\n exp.push(SAVE_DATA_BLOCKWISE);\n }\n\n // debrief\n exp.push(mouseCursor(true));\n exp.push(END_SCREEN);\n exp.push(EMAIL_OPTION);\n\n // save data\n exp.push(SAVE_DATA);\n\n exp.push(end_message());\n exp.push(fullscreen(false));\n\n return exp;\n}", "title": "" }, { "docid": "214595262b9b0147d42563812934e0bc", "score": "0.47971803", "text": "get() {\n getTasks()\n .then((tasks) => {\n console.table(tasks);\n rl.prompt();\n })\n }", "title": "" }, { "docid": "9cb137d7e0dfc14ad5cce376e4274927", "score": "0.47953907", "text": "function exerciseListService(caller, callback) {\n var request = makeRequest(caller, 'exerciselist', []);\n\n function exerciseListCallback (result) {\n var exercises = [];\n var i;\n for (i = 0; i < result.length; i++) {\n exercises[i] = new Exercise( result[i].description\n , result[i].exerciseid\n , result[i].status );\n }\n callback(exercises);\n }\n\n serviceCall(request, exerciseListCallback);\n}", "title": "" }, { "docid": "316d5137b654093bf0703f52aa6d7989", "score": "0.47837403", "text": "function _getTourExampleByUrl (_url) {\n\t\t\t\t\t\t\t\t\t\t\tvar _tourExamplesMap = _getTourExampleByUrl._map;\n\t\t\t\t\t\t\t\t\t\t\tif (!_tourExamplesMap) {\n\t\t\t\t\t\t\t\t\t\t\t\t_tourExamplesMap = _getTourExampleByUrl._map = {};\n\t\t\t\t\t\t\t\t\t\t\t\tUize.forEach (\n\t\t\t\t\t\t\t\t\t\t\t\t\tUizeSite.Examples (),\n\t\t\t\t\t\t\t\t\t\t\t\t\tfunction (_tourExample) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t_tourExamplesMap [Uize.Url.from (_tourExample.path).fileName] = _tourExample;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\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\treturn _tourExamplesMap [Uize.Url.from (_url).fileName];\n\t\t\t\t\t\t\t\t\t\t}", "title": "" }, { "docid": "f32b642de3bc44c824f48636bec9470e", "score": "0.47809887", "text": "async createExercise(exercise) {\n return await this.request({\n endpoint: `exercise/create`,\n method: `POST`,\n data: exercise,\n });\n }", "title": "" }, { "docid": "59ad2636c1490c748afa5ec7f220e5ac", "score": "0.47774202", "text": "function getEventies() {\n // return storageService.query('eventi')\n // return httpService.get(`eventi`)\n}", "title": "" }, { "docid": "2067f5ebc751ff0a75642322bc0329ba", "score": "0.47722495", "text": "function genExpSeq() {\n 'use strict';\n\n let exp = [];\n\n exp.push(fullscreen_on);\n exp.push(welcome_de);\n exp.push(resize_de);\n // exp.push(vpInfoForm_de);\n exp.push(hideMouseCursor);\n exp.push(screenInfo);\n exp.push(task_instructions);\n\n for (let blk = 0; blk < prms.nBlks; blk += 1) {\n let blk_timeline = { ...trial_timeline };\n blk_timeline.sample = { \n type: 'fixed-repetitions', \n size: blk === 0 ? prms.nTrlsP / 48 : prms.nTrlsE / 48 \n };\n exp.push(blk_timeline); // trials within a block\n exp.push(block_feedback); // show previous block performance\n exp.push(iti);\n }\n\n // save data\n exp.push(save_data);\n exp.push(save_code);\n\n // debrief\n exp.push(debrief_de);\n exp.push(showMouseCursor);\n exp.push(alphaNum);\n exp.push(fullscreen_off);\n\n return exp;\n}", "title": "" }, { "docid": "02b63eca8216c2a3ec535f27bd022a04", "score": "0.47448674", "text": "async function initExercise() {\n let workout;\n // check if there is a workout id in the url parameters\n if (location.search.split(\"=\")[1] === undefined) {\n // if not, create a new empty workout\n workout = await API.createWorkout()\n console.log(workout)\n }\n // if a new workout was created, navigate to that workout\n if (workout) {\n location.search = \"?id=\" + workout._id;\n }\n}", "title": "" }, { "docid": "5723594326d876d3c645fec27ae36822", "score": "0.47333306", "text": "function exercise07() {\n const { name: nameTest } = getStudents()[1];\n\n alert(`Terceiro elemento: ${nameTest}`);\n}", "title": "" }, { "docid": "45a23717325a93300e642f11aa61db52", "score": "0.47302252", "text": "quickFacts(){\n console.log(`${this._name} educates ${this._numberOfStudents} students at the ${this._level} school level.`);\n }", "title": "" }, { "docid": "09b28296fec3f2177805e1f7b8391e1c", "score": "0.47301525", "text": "function getPositions() {\n var exercises = Exercises.getExercises();\n //Creates all positions from exercises\n var positions = exercises.reduce((positions, exercise, mainIndex) => {\n positions.push({\n big: true,\n main: mainIndex,\n sub: 0,\n active: exercise.active\n });\n\n var subs = exercise.subs.map((sub, subIndex) => {\n return {\n big: false,\n main: mainIndex,\n sub: subIndex,\n active: exercise.active\n };\n });\n\n return positions.concat(subs);\n }, []);\n\n var currentIndex = indexOfPosition(Exercises.getCurrentPosition());\n\n //Keeps only positions close to current position\n return positions.filter((pos, posIndex) => {\n var diff = posIndex - currentIndex;\n return diff <= 5 && diff >= -4;\n });\n\n function indexOfPosition(targetPos) {\n var i;\n var position;\n\n for (i = 0; i < positions.length; i++) {\n position = positions[i];\n if (position.sub === targetPos.sub && position.main === targetPos.main) {\n return i;\n }\n }\n\n return -1;\n }\n }", "title": "" }, { "docid": "87d666fd98b067380e8f20e6cb71dfeb", "score": "0.47167647", "text": "function getContent() {\n const requestOne = axiosInstance().get(`/usersets/`);\n const requestTwo = axiosInstance().get(`/saved/`);\n const requestThree = axiosInstance().get(`/usercompleted/`);\n axios\n .all([requestOne, requestTwo, requestThree])\n .then(\n axios.spread((...res) => {\n setExerciseSetList(res[0].data);\n setSavedList(res[1].data);\n setCompletedList(res[2].data);\n })\n )\n .catch((e) => {\n return e;\n });\n }", "title": "" }, { "docid": "5983744d2548ff6c60a0326618a72aaa", "score": "0.47165182", "text": "function getExercise() {\n let randomIndex = Math.floor(Math.random() * exerciseOptions.length);\n let replacementExercise = exerciseOptions[randomIndex];\n req.body.workout.exercises.splice(removeExerciseIndex, 1, replacementExercise);\n res.status(200).json({\n newExercise: replacementExercise\n });\n }", "title": "" }, { "docid": "f0f03a103d8250b3647f432abf2b45e6", "score": "0.47155216", "text": "function getSteps() {\n return [\n \"Register your study\",\n \"Upload file for analysis\",\n \"Register file metadata\",\n ];\n }", "title": "" }, { "docid": "6dbb035591681b81735a7a9596e962d3", "score": "0.47150666", "text": "function composeExercise() {\n var exercise = {};\n exercise.name = $scope.exerciseName;\n exercise.weight = $scope.exerciseWeight;\n exercise.rep = $scope.exerciseRep;\n exercise.time = $scope.exerciseTime;\n\n return exercise;\n }", "title": "" }, { "docid": "7b1062aad78b2a0f542e1833af5f418d", "score": "0.47132733", "text": "function fetchExamples(next) {\n $.getJSON('examples.json', function(result) {\n EXAMPLES = result;\n next();\n });\n}", "title": "" }, { "docid": "653ba36c1131d4e27bd133c37682be79", "score": "0.47089732", "text": "function automatedReadabilityIndex(letters, numbers, words, sentences) {\n return (4.71 * ((letters + numbers) / words))\n + (0.5 * (words / sentences))\n - 21.43;\n\n}", "title": "" }, { "docid": "fb845595363f24613ad5aabb173c1e0d", "score": "0.4705205", "text": "quickFacts() {\n console.log(`${this._name} educates ${this._numberOfStudents} students at the ${this._level} school level.`);\n }", "title": "" }, { "docid": "147da85dcbc888c0f88f6ab37f6d7f33", "score": "0.46992347", "text": "function saveExercise(exercise){\n console.log(\"Todo - save into db\")\n}", "title": "" }, { "docid": "7eb55c3ae50fc7c84230febb17746591", "score": "0.4680449", "text": "function getQuestions(){\n return new Promise((resolve)=>{\n https.get('https://leetcode.com/api/problems/all/', (res) => {\n res.setEncoding('utf8');\n let rawData = '';\n res.on('data', (chunk) => { \n rawData += chunk;\n });\n res.on('end', () => {\n try {\n const parsedData = JSON.parse(rawData);\n resolve(parsedData);\n } catch (e) {\n console.error(e.message);\n }\n });\n }).on('error', (e) => {\n console.error(`出现错误: ${e.message}`);\n });\n });\n}", "title": "" }, { "docid": "8b05c95fd0814b9b9206f19b2c3178aa", "score": "0.4677197", "text": "getTestResponses(testID) {\n const responses = this.getTest(testID, true).responses\n return responses\n }", "title": "" }, { "docid": "38275b03d4417cefcecfc0add455929c", "score": "0.46743944", "text": "function readCorrect() {\n var exercise;\n \n for (var i = 0; i < $scope.exercises.length; i++) {\n exercise = $scope.exercises[i];\n if (STORAGE.isCorrect(exercise.title)) {\n exercise.correct = true;\n }\n }\n }", "title": "" }, { "docid": "b12e06c48d6f191d52c4e6178d6e08d5", "score": "0.46721405", "text": "function takeInstructions() {\n let analyzedInstructions = []\n for (let i = 0; i < document.querySelectorAll(\".anInstructions\").length; i++) {\n const element = document.querySelectorAll(\".anInstructions\")[i];\n analyzedInstructions.push({number: i, step: element.value})\n }\n return analyzedInstructions\n }", "title": "" }, { "docid": "ae92ef209311e5dfef48161b6698beee", "score": "0.4671999", "text": "function getTrialSpecs( parameters ) {\n\n //// use condition to determine which question objects will serve as the basis for the trial\n \n var question_list = getQuestionList();\n var question_idxs = getPairIdxs( question_list.length )[ parameters.condition ];\n var question_pair = [ question_list[question_idxs[0]], question_list[question_idxs[1]] ];\n \n //// First create the text block which will appear in the trial\n \n // use parameters for term order and base_num / exp_num to instantiate the question objects\n // (i.e. fill in their text templates with actual text, see instantiate below)\n question_pair[0].instantiate( parameters.q1_term_order, parameters.q1_base_num, parameters.q1_exp_num );\n question_pair[1].instantiate( parameters.q2_term_order, parameters.q2_base_num, parameters.q2_exp_num );\n \n // use parameters.question_order to select which questions will be displayed first and second\n if ( parameters.question_order==0 ) {\n var questions = [ question_pair[0], question_pair[1] ];\n } else if ( parameters.question_order==1 ) {\n var questions = [ question_pair[1], question_pair[0] ];\n }\n\n // put the questions into a 2-column table and add a question prompt at the end\n var text = \"<table class='trial_text_table'><tr>\"\n + \"<td><p><strong>Problem A:</strong></p>\" + questions[0].text + \"</td>\"\n + \"<td><p><strong>Problem B:</strong></p>\" + questions[1].text + \"</td>\"\n + \"</tr></table>\"\n + \"<p>Click on the button which best describes the way the elements of the two problems correspond to each other.</p>\";\n \n //// Next create the answers that will appear on the buttons underneath the above text block\n \n // an \"answer\" is an html string describing one way of mapping correspondences between terms in questions\n var createAnswer = function( q1_n1, q2_n1, q1_n2, q2_n2 ) {\n var result = \"<table class='matching_response'>\";\n result += \"<tr><td>\" + q1_n1 + \"<td>correspond to</td><td>\" + q2_n1 + \"</td></tr>\";\n result += \"<tr><td>\" + q1_n2 + \"<td>correspond to</td><td>\" + q2_n2 + \"</td></tr>\";\n result += \"</table>\";\n return result;\n }\n \n // the terms on the left side of the answers come from whichever question was displayed on the left in \"text\" above\n // and they appear in the same order as was used to instantiate the question above\n // the terms on the right side of the answers come from the other of the two questions,\n // with one answer (the correct one) displaying them in the order corresponding to that used for the first question,\n // and the other answer (incorrect) displaying the terms in the opposite order\n if ( parameters.question_order==0 ) {\n var left_order = parameters.q1_term_order;\n } else if ( parameters.question_order==1 ) {\n var left_order = parameters.q2_term_order;\n }\n \n // create two answers, one correct and one incorrect\n if ( left_order==0 ) {\n var ans_correct = createAnswer( questions[0].base_noun, questions[1].base_noun, questions[0].exp_noun, questions[1].exp_noun );\n var ans_incorrect = createAnswer( questions[0].base_noun, questions[1].exp_noun, questions[0].exp_noun, questions[1].base_noun );\n } else if ( left_order==1 ) {\n var ans_correct = createAnswer( questions[0].exp_noun, questions[1].exp_noun, questions[0].base_noun, questions[1].base_noun );\n var ans_incorrect = createAnswer( questions[0].exp_noun, questions[1].base_noun, questions[0].base_noun, questions[1].exp_noun );\n }\n \n // use parameters.answer_order to put the answers in order, and record answer key\n if ( parameters.answer_order==0 ) {\n var answers = [ ans_correct, ans_incorrect ];\n } else if ( parameters.answer_order==1 ) {\n var answers = [ ans_incorrect, ans_correct ];\n }\n var key = parameters.answer_order;\n \n //// finally create a data object for the trial and return\n var data = {\n \"q1_quesID\": question_pair[0].quesID, \"q1_schema\": question_pair[0].schema,\n \"q1_base_noun\": question_pair[0].base_noun, \"q1_exp_noun\": question_pair[0].exp_noun,\n \"q2_quesID\": question_pair[1].quesID, \"q2_schema\": question_pair[1].schema,\n \"q2_base_noun\": question_pair[1].base_noun, \"q2_exp_noun\": question_pair[1].exp_noun,\n \"key\": parameters.answer_order\n };\n\n return { \"text\": text, \"answers\": answers, \"key\": key, \"data\": data };\n \n}", "title": "" }, { "docid": "52227da681f3ebed457a0d34dda061fb", "score": "0.46711546", "text": "async function runExample() {\n\ttry {\n\n\t\t// Put together some options to use in each test\n\t\tconst options = require('./generate_pa11y.json');\n options['log'] = {\n debug: console.log,\n error: console.error,\n info: console.log\n }\n\n identity = (x) => x;\n urls = options['urls']\n\n\t\t// Run tests against multiple URLs\n run = [];\n for (let i = 0; i < urls.length; i++) {\n options1 = Object.assign({}, options);\n options1.actions = options.actions.map(identity);\n options1.actions.push('navigate to ' + urls[i]);\n run.push(pa11y(urls[i], options1));\n }\n\t\tconst results = await Promise.all(run);\n\n const report = {\"total\": results.length,\"passes\": 0,\"errors\": 0, \"results\": {} }\n for (let i = 0; i < results.length; i++) {\n console.log(results[i].pageUrl);\n report.results[results[i].pageUrl] = results[i].issues;\n }\n\n const stream = fs.createWriteStream(\"pa11y-ci-results.json\");\n stream.once('open', function(fd) {\n stream.write(new Buffer.from(JSON.stringify(report)));\n stream.end();\n });\n\n\t} catch (error) {\n\n\t\t// Output an error if it occurred\n\t\tconsole.error(error.message);\n\n\t}\n}", "title": "" }, { "docid": "09b8751e63078fce6d40c7cd0cd20aa1", "score": "0.4669937", "text": "function TangensExercise() {\n const a = tangensGeneratevars();\n this.txt = \"Udregn tangens i radianer\";\n this.type = \"trigonometri\";\n this.point = 5;\n this.tegn = '';\n this.exerciseVars = {trigonometri: `tan ${a}`}\n this.facit = tangensFacit(a);\n}", "title": "" }, { "docid": "91e6b65aef5c04f1b17fceeb6a8a7912", "score": "0.46673363", "text": "getQuestions() {\n let ret = {};\n // Open a database connection\n sqlite3.connect('./db/SWOdb.db', (err) => {\n if (err) {\n return console.error(err.message);\n }\n console.log('[questions.getQuestions] Connected to the SQlite file database.');\n });\n\n\n\n let sql = \"select * from Questions\";\n ret = sqlite3.run(sql);\n\n sqlite3.close();\n return ret;\n }", "title": "" }, { "docid": "5700b88571632d8c1ce76e8ccce00a3a", "score": "0.46629745", "text": "function genExpSeq() {\n 'use strict';\n\n let exp = [];\n\n exp.push(fullscreen_on);\n exp.push(check_screen);\n exp.push(welcome_de);\n exp.push(resize_de);\n exp.push(vpInfoForm_de);\n exp.push(hideMouseCursor);\n exp.push(screenInfo);\n exp.push(task_instructions1);\n\n // Gain version followed by loss version\n if ([1, 2].includes(version)) {\n // Gain version\n exp.push(task_instructions_gain);\n\n // 96 trials in each block\n // first phase: learning block (description vs. experience)\n if (version === 1) {\n exp.push(block_start);\n exp.push(trial_timeline_description_gain);\n exp.push(short_break);\n exp.push(block_start);\n exp.push(trial_timeline_experience_gain);\n } else if (version === 2) {\n exp.push(block_start);\n exp.push(trial_timeline_experience_gain);\n exp.push(short_break);\n exp.push(block_start);\n exp.push(trial_timeline_description_gain);\n }\n\n // second phase: 3 experiment block of 96 trials\n for (let blk = 0; blk < 3; blk++) {\n exp.push(short_break);\n exp.push(block_start);\n exp.push(trial_timeline_experiment_gain);\n }\n\n exp.push(half_break);\n\n // Loss version\n exp.push(task_instructions_loss);\n\n // 96 trials in each block\n // first phase: learning block (description vs. experience)\n if (version === 1) {\n exp.push(block_start);\n exp.push(trial_timeline_description_loss);\n exp.push(short_break);\n exp.push(block_start);\n exp.push(trial_timeline_experience_loss);\n } else if (version === 2) {\n exp.push(block_start);\n exp.push(trial_timeline_experience_loss);\n exp.push(short_break);\n exp.push(block_start);\n exp.push(trial_timeline_description_loss);\n }\n\n // second phase: 3 experiment block of 96 trials\n for (let blk = 0; blk < 3; blk++) {\n exp.push(short_break);\n exp.push(block_start);\n exp.push(trial_timeline_experiment_loss);\n }\n }\n\n // Loss version followed by gain version\n if ([3, 4].includes(version)) {\n // Loss version\n exp.push(task_instructions_loss);\n\n // 96 trials in each block\n // first phase: learning block (description vs. experience)\n if (version === 3) {\n exp.push(block_start);\n exp.push(trial_timeline_description_loss);\n exp.push(short_break);\n exp.push(block_start);\n exp.push(trial_timeline_experience_loss);\n } else if (version === 4) {\n exp.push(block_start);\n exp.push(trial_timeline_experience_loss);\n exp.push(short_break);\n exp.push(block_start);\n exp.push(trial_timeline_description_loss);\n }\n\n // second phase: 3 experiment block of 96 trials\n for (let blk = 0; blk < 3; blk++) {\n exp.push(short_break);\n exp.push(block_start);\n exp.push(trial_timeline_experiment_loss);\n }\n\n exp.push(half_break);\n\n // Gain version\n exp.push(task_instructions_gain);\n\n // 96 trials in each block\n // first phase: learning block (description vs. experience)\n if (version === 3) {\n exp.push(block_start);\n exp.push(trial_timeline_description_gain);\n exp.push(short_break);\n exp.push(block_start);\n exp.push(trial_timeline_experience_gain);\n } else if (version === 4) {\n exp.push(block_start);\n exp.push(trial_timeline_experience_gain);\n exp.push(short_break);\n exp.push(block_start);\n exp.push(trial_timeline_description_gain);\n }\n\n // second phase: 3 experiment block of 96 trials\n for (let blk = 0; blk < 3; blk++) {\n exp.push(short_break);\n exp.push(block_start);\n exp.push(trial_timeline_experiment_gain);\n }\n }\n\n exp.push(showMouseCursor);\n\n // email\n exp.push(showMouseCursor);\n exp.push(email_option_instructions);\n exp.push(email_option);\n\n // save data\n exp.push(save_data);\n exp.push(save_interaction_data);\n exp.push(save_code);\n\n // de-brief\n exp.push(alphaNum);\n exp.push(debrief_de);\n exp.push(fullscreen_off);\n\n return exp;\n}", "title": "" }, { "docid": "4e02a334e581d4411c68b3af5eb79b7d", "score": "0.46622348", "text": "function initExp() {\r\n\r\n // instruction image location\r\n var task_instruct_page1 = '<div class = centerbox><p class = block-text>Welcome to the choose-and-solve task!</p></div>';\r\n var task_instruct_page2 =\r\n '<div class = centerbox><p class = block-text>This task consists of four parts.</p> ' +\r\n '<p class = block-text>Your performance-based cash bonus will be determined in the last block of 140 trials.</p>' +\r\n '<p class = block-text>1. Word practice (12 problems)</p>' +\r\n '<p class = block-text>2. Math practice (12 problems)</p>' +\r\n '<p class = block-text>3. Choose-and-solve practice (28 trials)</p>' +\r\n '<p class = block-text>4. Five blocks of choose-and-solve trials (140 trials)</p></div>'\r\n var task_instruct_page = {\r\n type: 'poldrack-instructions',\r\n data: {\r\n exp_stage: 'task_instruction',\r\n participant: sbj_id,\r\n },\r\n pages: [task_instruct_page1, task_instruct_page2],\r\n allow_keys: false,\r\n show_clickable_nav: true,\r\n timing_post_trial: 1000\r\n };\r\n\r\n // NOTE that the functions used below are defined in `choose-and-solve_main.js` for readability\r\n var maadm_experiment = [];\r\n maadm_experiment.push(task_instruct_page);\r\n maadm_experiment.push({\r\n timeline: sequence_word_practice\r\n });\r\n maadm_experiment.push({\r\n timeline: sequence_math_practice\r\n });\r\n maadm_experiment.push({\r\n timeline: sequence_practice_choice\r\n });\r\n maadm_experiment.push(enter_mainexp_page);\r\n for (var ii = 0; ii < num_block; ii++) {\r\n maadm_experiment.push({\r\n timeline: generate_main_block(ii)\r\n });\r\n }\r\n\r\n jsPsych.init({\r\n display_element: \"getDisplayElement\",\r\n timeline: maadm_experiment,\r\n fullscreen: true,\r\n\r\n on_finish: function () {\r\n\r\n /* Change 4: Summarize the data */\r\n\r\n var cnt_trial_type = {};\r\n // for math trials\r\n cnt_trial_type[\"me0\"] = 0; // # of hard math chosen / solved when 2 vs 2\r\n cnt_trial_type[\"me2\"] = 0; // no choice trials, easy reward 2\r\n cnt_trial_type[\"mh0\"] = 0; // # of hard math chosen / solved when 2 vs 2\r\n cnt_trial_type[\"mh1\"] = 0; // when 3 vs 2\r\n cnt_trial_type[\"mh2\"] = 0; // when 4 vs 2\r\n cnt_trial_type[\"mh3\"] = 0; // when 5 vs 2\r\n cnt_trial_type[\"mh4\"] = 0; // when 6 vs 2\r\n cnt_trial_type[\"mh5\"] = 0; // no choice trials, hard reward 5\r\n // for word trials\r\n cnt_trial_type[\"we0\"] = 0; // # of hard word chosen / solved when 2 vs 2\r\n cnt_trial_type[\"we2\"] = 0; // no choice trials, easy reward 2\r\n cnt_trial_type[\"wh0\"] = 0; // # of hard word chosen / solved when 2 vs 2\r\n cnt_trial_type[\"wh1\"] = 0; // when 3 vs 2\r\n cnt_trial_type[\"wh2\"] = 0; // when 4 vs 2\r\n cnt_trial_type[\"wh3\"] = 0; // when 5 vs 2\r\n cnt_trial_type[\"wh4\"] = 0; // when 6 vs 2\r\n cnt_trial_type[\"wh5\"] = 0; // no choice trials, hard reward 5\r\n // count the me, mh, we, wh trials\r\n cnt_trial_type[\"me_cnt\"] = 0;\r\n cnt_trial_type[\"mh_cnt\"] = 0;\r\n cnt_trial_type[\"we_cnt\"] = 0;\r\n cnt_trial_type[\"wh_cnt\"] = 0;\r\n // count correct trials\r\n cnt_trial_type[\"me_corr\"] = 0; // # of correct for easy math\r\n cnt_trial_type[\"mh_corr\"] = 0; // for hard math\r\n cnt_trial_type[\"we_corr\"] = 0; // for easy word\r\n cnt_trial_type[\"wh_corr\"] = 0; // for hard word\r\n // adding problem-solving RTs to get the average\r\n cnt_trial_type[\"me_rt\"] = 0;\r\n cnt_trial_type[\"mh_rt\"] = 0;\r\n cnt_trial_type[\"we_rt\"] = 0;\r\n cnt_trial_type[\"wh_rt\"] = 0;\r\n\r\n for (var ii = 0; ii < choice_main.length; ii++) {\r\n // counting the # of trial types to get the choice probabilities\r\n // all the problem types need to be defined above.\r\n cnt_trial_type[choice_main[ii]]++;\r\n // add up the # of corrects and RT\r\n let curr_type = choice_main[ii].substring(0, 2);\r\n cnt_trial_type[curr_type + \"_cnt\"]++;\r\n cnt_trial_type[curr_type + \"_corr\"] += correct_main[ii];\r\n cnt_trial_type[curr_type + \"_rt\"] += solvetime_main[ii];\r\n }\r\n\r\n var mwlevel = {}; // based on history_hard\r\n mwlevel[\"m\"] = 0;\r\n mwlevel[\"w\"] = 0;\r\n for (var ii = 0; ii < choice_level.length; ii++) {\r\n mwlevel[choice_level[ii][0]] += Number(choice_level[ii][1]);\r\n }\r\n var rtsum = 0;\r\n for (var ii = 0; ii < solvetime_main.length; ii++) {\r\n // add all the problem-solving RT to see how much time P spent\r\n rtsum += solvetime_main[ii];\r\n }\r\n\r\n\r\n /* Change 5: Saving the trial-level data and finishing up */\r\n\r\n // Overall\r\n Qualtrics.SurveyEngine.setEmbeddedData(\"points\", point_main);\r\n Qualtrics.SurveyEngine.setEmbeddedData(\"bonus\", point_main); // 1 cent/point\r\n\r\n // easy_math_cnt, easy_acc_math, easy_RT_math \r\n Qualtrics.SurveyEngine.setEmbeddedData(\"easy_math_cnt\", cnt_trial_type[\"me_cnt\"] );\r\n Qualtrics.SurveyEngine.setEmbeddedData(\"easy_acc_math\", (cnt_trial_type[\"me_corr\"]/cnt_trial_type[\"me_cnt\"]).toFixed(4) );\r\n Qualtrics.SurveyEngine.setEmbeddedData(\"easy_RT_math\", Math.round(cnt_trial_type[\"me_rt\"]/cnt_trial_type[\"me_cnt\"]) );\r\n\r\n // easy_word_cnt, easy_acc_word, easy_RT_word\r\n Qualtrics.SurveyEngine.setEmbeddedData(\"easy_word_cnt\", cnt_trial_type[\"we_cnt\"] );\r\n Qualtrics.SurveyEngine.setEmbeddedData(\"easy_acc_word\", (cnt_trial_type[\"we_corr\"]/cnt_trial_type[\"we_cnt\"]).toFixed(4) );\r\n Qualtrics.SurveyEngine.setEmbeddedData(\"easy_RT_word\", Math.round(cnt_trial_type[\"we_rt\"]/cnt_trial_type[\"we_cnt\"]) );\r\n\r\n // hard_math_cnt, hard_level_math, hard_acc_math, hard_RT_math\r\n Qualtrics.SurveyEngine.setEmbeddedData(\"hard_math_cnt\", cnt_trial_type[\"mh_cnt\"] );\r\n Qualtrics.SurveyEngine.setEmbeddedData(\"hard_level_math\", (mwlevel[\"m\"]/cnt_trial_type[\"mh_cnt\"]).toFixed(4) );\r\n Qualtrics.SurveyEngine.setEmbeddedData(\"hard_acc_math\", (cnt_trial_type[\"mh_corr\"]/cnt_trial_type[\"mh_cnt\"]).toFixed(4) );\r\n Qualtrics.SurveyEngine.setEmbeddedData(\"hard_RT_math\", Math.round(cnt_trial_type[\"mh_rt\"]/cnt_trial_type[\"mh_cnt\"]) );\r\n\r\n // hard_word_cnt, hard_level_word, hard_acc_word, hard_RT_word \r\n Qualtrics.SurveyEngine.setEmbeddedData(\"hard_word_cnt\", cnt_trial_type[\"wh_cnt\"] );\r\n Qualtrics.SurveyEngine.setEmbeddedData(\"hard_level_word\", (mwlevel[\"w\"]/cnt_trial_type[\"wh_cnt\"]).toFixed(4) );\r\n Qualtrics.SurveyEngine.setEmbeddedData(\"hard_acc_word\", (cnt_trial_type[\"wh_corr\"]/cnt_trial_type[\"wh_cnt\"]).toFixed(4) );\r\n Qualtrics.SurveyEngine.setEmbeddedData(\"hard_RT_word\", Math.round(cnt_trial_type[\"wh_rt\"]/cnt_trial_type[\"wh_cnt\"]) );\r\n\r\n // hard choice probabilities of math trials : hcp_h2e2_math, hcp_h3e2_math, hcp_h4e2_math, hcp_h5e2_math, hcp_h6e2_math, hcp_h456e2_math\r\n let numPerCond = 2*num_block;\r\n Qualtrics.SurveyEngine.setEmbeddedData(\"hcp_h2e2_math\", (cnt_trial_type[\"mh0\"]/numPerCond).toFixed(4) );\r\n Qualtrics.SurveyEngine.setEmbeddedData(\"hcp_h3e2_math\", (cnt_trial_type[\"mh1\"]/numPerCond).toFixed(4) );\r\n Qualtrics.SurveyEngine.setEmbeddedData(\"hcp_h4e2_math\", (cnt_trial_type[\"mh2\"]/numPerCond).toFixed(4) );\r\n Qualtrics.SurveyEngine.setEmbeddedData(\"hcp_h5e2_math\", (cnt_trial_type[\"mh3\"]/numPerCond).toFixed(4) );\r\n Qualtrics.SurveyEngine.setEmbeddedData(\"hcp_h6e2_math\", (cnt_trial_type[\"mh4\"]/numPerCond).toFixed(4) );\r\n Qualtrics.SurveyEngine.setEmbeddedData(\"hcp_h456e2_math\",\r\n ((cnt_trial_type[\"mh2\"]+cnt_trial_type[\"mh3\"]+cnt_trial_type[\"mh4\"])/(3*numPerCond)).toFixed(4) );\r\n\r\n // hard choice probabilities of word trials : hcp_h2e2_word, hcp_h3e2_word, hcp_h4e2_word, hcp_h5e2_word, hcp_h6e2_word, hcp_h456e2_word\r\n Qualtrics.SurveyEngine.setEmbeddedData(\"hcp_h2e2_word\", (cnt_trial_type[\"wh0\"]/numPerCond).toFixed(4) );\r\n Qualtrics.SurveyEngine.setEmbeddedData(\"hcp_h3e2_word\", (cnt_trial_type[\"wh1\"]/numPerCond).toFixed(4) );\r\n Qualtrics.SurveyEngine.setEmbeddedData(\"hcp_h4e2_word\", (cnt_trial_type[\"wh2\"]/numPerCond).toFixed(4) );\r\n Qualtrics.SurveyEngine.setEmbeddedData(\"hcp_h5e2_word\", (cnt_trial_type[\"wh3\"]/numPerCond).toFixed(4) );\r\n Qualtrics.SurveyEngine.setEmbeddedData(\"hcp_h6e2_word\", (cnt_trial_type[\"wh4\"]/numPerCond).toFixed(4) );\r\n Qualtrics.SurveyEngine.setEmbeddedData(\"hcp_h456e2_word\",\r\n ((cnt_trial_type[\"wh2\"]+cnt_trial_type[\"wh3\"]+cnt_trial_type[\"wh4\"])/(3*numPerCond)).toFixed(4) );\r\n\r\n Qualtrics.SurveyEngine.setEmbeddedData(\"cnt_per_cond\", numPerCond );\r\n\r\n // finishing up\r\n function sleep(time) {\r\n return new Promise((resolve) => setTimeout(resolve, time));\r\n }\r\n\r\n sleep(500).then(() => {\r\n // clear the stage\r\n jQuery('.display_stage').remove();\r\n jQuery('.display_stage_background').remove();\r\n\r\n // simulate click on Qualtrics \"next\" button, making use of the Qualtrics JS API\r\n qthis.clickNextButton();\r\n });\r\n }\r\n });\r\n }", "title": "" }, { "docid": "d041014a26b8eddc6b26acddb4323f59", "score": "0.46571746", "text": "exerciseList() {\n \n \n return this.state.exercises.map(currentexercise => {\n return <Exercise exercise={currentexercise} deleteExercise={this.deleteExercise} key={currentexercise._id} statusChange={this.statusChange} status={currentexercise.status} checkTick={this.checkTick}/>\n \n \n })\n }", "title": "" }, { "docid": "2700b156a4259720ec50e7ff0c4c81fc", "score": "0.46528324", "text": "function getContext() {\n return {\n muscles,\n exercises,\n exercise,\n category,\n editMode,\n exercisesByMuscles: getExercisesByMuscles(),\n onCreate: handleExerciseCreate,\n onSelect: handleExerciseSelect,\n onCategorySelect: handleCategorySelect,\n onEdit: handleExerciseEdit,\n onSelectEdit: handleExerciseSelectEdit,\n onDelete: handleExerciseDelete\n };\n }", "title": "" }, { "docid": "8e28fd60818a83d9eac5e77a4964f68d", "score": "0.46522263", "text": "function getCourses() {\n var course_list = [\"Intermediate Programming with Java\",\n \"This course is a rigorous introduction to the fundamental concepts and techniques of computer programming using the Java programming language.\",\n \"A\",\n \"Discrete Structures for Computer Science\",\n \"The purpose of this course is to understand and use (abstract) discrete structures that are backbones of computer science. In particular, this class is meant to introduce logic, proofs, sets, relations, functions, counting, and probability, with an emphasis on applications in computer science.\",\n \"A\",\n \"Data Structure\",\n \"This course emphasizes the study of the basic data structures of computer science (stacks, queues, trees, lists, graphs) and their implementations using the Java language. Included in this study are programming techniques which use recursion and reference variables. Students in this course are also introduced to various searching and sorting methods and are also expected to develop an intuitive understanding of the complexity of these algorithms.\",\n \"B\",\n \"Computer Organization and Assembly Language\",\n \"The purpose of this course is to study the components of computing systems common to most computer architectures. In particular, this class is meant to introduce data representation, types of processors (e.g., RISC V. CISC), memory types and hierarchy, assembly language, linking and loading, and an introduction to device drivers.\",\n \"A-\",\n \"Introduction to Systems Software\",\n \"This course will introduce the students to the important systems language, C, and to several topics related to the hardware and software environment. These are issues related to device interfaces and hardware synchronization at the lowest level of the operating system, the linkage of operating system services to application software, and the fundamental mechanisms for computer communications.\",\n \"A\",\n \"Algorithm Implementation\",\n \"This course covers a broad range of the most commonly used algorithms. Some examples include algorithms for sorting, searching, encryption, compression and local search. The students will implement and test several algorithms. The course is programming intensive.\",\n \"B+\",\n \"Formal Methods in Computer Science\",\n \"The goals of the course are to develop student skills in modeling problems using discrete mathematics, to introduce students to new discrete structures, to further develop students' mathematical and algorithmic reasoning skills, and to introduce students to the theoretical study of information and computations as a physical phenomenon. Topics covered will include: discrete mathematics; algorithm analysis, including asymptotic notation, finding run times of iterative programs with nested loops, and using recurrence relations to find run times of recursive programs; and theory of computation, including finite state machines, regular languages, Kleene's Theorem, Church-Turing Thesis, and non-computability of the Halting Problem.\",\n \"B\",\n \"Introduction to Operating Systems\",\n \"The purpose of this course is to understand and use the basic concepts of operating systems, common to most computer systems, which interfaces the machine with the programmer. In particular, this class is meant to introduce processes such as the processing unit, process management, concurrency, communication, memory management and protection, and file systems.\",\n \"B\",\n \"Software Quality Assurance\",\n \"This course provides students with a broad understanding of modern software testing and quality assurance. Although it will cover testing theory, the emphasis is on providing practical skills in software testing currently used in industry. To that end, it will cover: manual and automated tests, test- driven and behavior-driven development, performance testing, and understanding and developing a testing process. The course is project-oriented, with students working in groups on specific deliverables on various software products, as would be expected in an industry setting.\",\n \"A\",\n \"Data Communication and Computer Networks\",\n \"The course emphasizes basic principles and topics of computer communications. The first part of the course provides an overview of interfaces that interconnect hardware and software components, describes the procedures and rules involved in the communication process and most importantly the software which controls computers communication. The second part of the course discusses network architectures and design principles, and describes the basic protocol suites. The third part of the course introduces the concept of internetworking, a powerful abstraction that deals with the complexity of multiple underlying communication technologies.\",\n \"TBD\",\n \"Software Engineering\",\n \"The purpose of this course is to provide a general survey of software engineering. Some of the topics covered include: project planning and management, design techniques, verification and validation, and software maintenance. Particular emphasis is on a group project in which a group of 2 students implement a system from its specification.\",\n \"TBD\"];\n return course_list;\n}", "title": "" }, { "docid": "97b5791ab262dcc123b0f5294facaed0", "score": "0.46397457", "text": "function getExhibit(name) {\n for(i = 0; i < $scope.exhibits.length; i++) {\n if ($scope.exhibits[i].ExhibitName == name) {\n return $scope.exhibits[i];\n }\n }\n }", "title": "" }, { "docid": "1deb0a6a7ee6a206dc1d8af8cef1f18f", "score": "0.46346855", "text": "function genExpSeq() {\n \"use strict\";\n\n let exp = [];\n\n exp.push(fullscreen(true));\n exp.push(browser_check(PRMS.screenRes));\n exp.push(PRELOAD);\n exp.push(resize_browser());\n exp.push(welcome_message());\n exp.push(vpInfoForm(\"/Common7+/vpInfoForm_de.html\"));\n exp.push(mouseCursor(false));\n\n exp.push(WELCOME_INSTRUCTIONS);\n exp.push(WAIT_BLANK);\n\n // audio calibration\n exp.push(TASK_INSTRUCTIONS_CALIBRATION);\n exp.push(WAIT_BLANK);\n exp.push(TRIAL_TIMELINE_CALIBRATION);\n\n // check block\n exp.push(TASK_INSTRUCTIONS_CHECK);\n exp.push(WAIT_BLANK);\n exp.push(TRIAL_TIMELINE_CHECK);\n\n // start of experiment blocks\n exp.push(TASK_INSTRUCTIONS_RESP_MAPPING);\n exp.push(WAIT_BLANK);\n\n for (let blk = 0; blk < PRMS.nBlksExp; blk++) {\n // manipulation instructions at very start or half way\n exp.push(TASK_INSTRUCTIONS_BLOCK_START);\n exp.push(WAIT_BLANK); // blank before 1st trial start\n\n let blk_timeline = { ...TRIAL_TIMELINE_EXP };\n blk_timeline.sample = {\n type: \"alternate-groups\",\n groups: [\n repeatArray([0, 1, 2, 3, 4, 5, 6, 7], PRMS.nTrlsExp / TRIALS_EXP.length),\n repeatArray([8, 9, 10, 11, 12, 13, 14, 15], PRMS.nTrlsExp / TRIALS_EXP.length),\n ],\n randomize_group_order: true,\n };\n exp.push(blk_timeline);\n\n // After the break of block 5\n if (blk === 4) {\n exp.push(TRIAL_TIMELINE_CHECK);\n }\n\n // between block feedback\n exp.push(BLOCK_FEEDBACK);\n exp.push(WAIT_BLANK);\n }\n\n // save data\n exp.push(SAVE_DATA);\n\n // debrief\n exp.push(mouseCursor(true));\n exp.push(end_message());\n exp.push(fullscreen(false));\n\n return exp;\n}", "title": "" }, { "docid": "dcf26f1871e53aa2c681501e64d1013a", "score": "0.463154", "text": "function viewEmployees() {\r\n inquirer.prompt(\r\n {\r\n type: 'list',\r\n name: 'how',\r\n message: 'How would you like to view employees',\r\n choices: [\r\n 'view all employees',\r\n 'view employees by manager',\r\n 'view employees by department',\r\n 'Exit'\r\n ]\r\n }\r\n )\r\n .then(res => {\r\n switch (res.how) {\r\n case 'view all employees':\r\n return viewAllEmployees();\r\n break;\r\n case 'view employees by manager':\r\n return viewEmployeesByManager();\r\n break;\r\n case 'view employees by department':\r\n return viewEmployeesByDepartment();\r\n break;\r\n default:\r\n connection.end();\r\n break;\r\n }\r\n })\r\n}", "title": "" }, { "docid": "d1a12ca379271327756e3203f5f60c77", "score": "0.46314704", "text": "function getQuestion() {\r\n var currentQuestion = questions[currentQuestionIndex];\r\n var questEl = document.getElementById(\"quest\")\r\n questEl.textContent = currentQuestion.quest;\r\n getAnswers()\r\n}", "title": "" }, { "docid": "b168f5e4f04d9d6e01776f5513674682", "score": "0.46284693", "text": "function exploration() {\n\tpopulationSize = 40;\n\tmaxIterations = 20; \n\t// taux de pheromones initiale\n\tip = 1;\n\talpha = 1;\n\tbeta = 5;\n\tQ = 500; // trail deposit coefficient\n\tmax_iteration = 20;\n\tevaporate = 0.5;\n\tnodes = get_town('test.txt');\n\tdistances = init_distance(nodes);\n\tgraph = new Graph (nodes, distances, nodes.length) ;\n\n\tcolony = new Colony(populationSize, maxIterations, graph, alpha, beta, ip, Q, evaporate);\n\tcolony.initialise();\n\t//colony.iterate();\n\tlet tabTour = colony.exploration();\n\n\trate = [];\n\tgenoma = []; \n\tfor(i = 0; i < tabTour.length; i++) {\n\t\tgenoma[i] = new Genoma(tabTour[i]); \n\t\trate.push(genoma[i].obtain_engagementRate(); \n\t} \n\n\tlet pos = colony.updateDistance(rate);\n\tlet pherom = colony.updatePheromones();\n\treturn {colony, rate};\n}", "title": "" }, { "docid": "0a5a0e4f7e689d9abce4ac15b9c5d621", "score": "0.46240962", "text": "function exercise(varExercise) {\n \n console.log(varExercise);\n\n $.ajax({\n url: `https://trackapi.nutritionix.com/v2/natural/exercise`,\n headers: {\n \"x-app-id\": \"263ad9b6\",\n \"x-app-key\": \"125ecacb1d54725e8b4bc6cdea6f0e53\",\n \"Content-Type\": \"application/json\",\n },\n type: \"POST\",\n dataType: \"json\",\n processData: false,\n data: JSON.stringify({\n query: varExercise,\n gender: gender,\n weight_kg: weight,\n height_cm: height,\n age: age,\n }),\n success: function (response) {\n console.log(response);\n var exer = $(\"<p>\");\n exer.text(\n \"To burn extra \" +\n extraWeight +\n \" Calories\" +\n \", \" +\n choosenExercise +\n \", \" +\n response.exercises[0].nf_calories\n );\n $(\"#msgExercise\").append(exer);\n },\n });\n }", "title": "" }, { "docid": "f64daadda6b6c0462f1e150eac175380", "score": "0.4619932", "text": "function includedExerciseTypesFromHtml() {\n var typesArray = document.getElementsByName(\"exercise[]\");\n var types = [];\n\n if (typesArray.length === 0) {\n // No exercise boxes are show, always select default exercises.\n return [\"Normal\"];\n }\n\n for(var i=0; i< typesArray.length; i++)\n {\n var checkbox = typesArray[i];\n if (checkbox.checked) { types.push(checkbox.getAttribute('data-type')); }\n }\n\n return types;\n }", "title": "" }, { "docid": "86fea0a452449b2abac33dfceab3f7bb", "score": "0.4619727", "text": "getExaminerTests(userID) {\n output = []\n for (i in test_db) {\n if (test_db[i].examinerID == userID) {\n output.push(test_db[i])\n }\n }\n return output\n }", "title": "" }, { "docid": "9be25a4b77e3227abc6525ee47e35f4b", "score": "0.46127564", "text": "function advent() {\n return runTests().then(function () {\n return helpers_1.getInput(\"input.txt\").then(function (input) {\n var layers = helpers_1.parseIntoLayers(input, 25, 6);\n var shortestLayer = searchShortestLayer(layers);\n console.log(shortestLayer);\n console.log(calculateOutput(shortestLayer));\n return;\n });\n });\n}", "title": "" }, { "docid": "2f6b780a1f3e03815050e13071032dc0", "score": "0.4607087", "text": "function seeInstructions() {\n\talert(instructions);\n}", "title": "" }, { "docid": "02705f97af7de1e7d419b2240d47ad7a", "score": "0.46063608", "text": "function teach(sub) {\n //...\n console.log('teach start..');\n var notes = sub + \"-notes\";\n\n function learn() {\n console.log('learning ' + sub + \" with \" + notes);\n }\n // learn();\n console.log('teach ends');\n return learn;\n}", "title": "" }, { "docid": "7ebd759c3306a31651b5201974bf97b1", "score": "0.46058077", "text": "static async getAncestries() {\n try {\n const response = await cachedFetch(`https://esi.evetech.net/latest/universe/ancestries/?datasource=tranquility&language=en-us`);\n if (!response.ok) {\n throw Error(response.statusText);\n }\n \n return response.json();\n }\n catch (error) {\n console.log(error);\n }\n }", "title": "" }, { "docid": "af58979015abc46475a0dbc74d5e1b94", "score": "0.46048328", "text": "function updateExerciseArea(exercises){\n\tLungo.dom('#language_new_routine_exercises_list').empty();\n\tfor(var i = 0, len = exercises.length; i < len; i++){\n\t\tvar name = exercises[i].name;\n\t\tvar description = exercises[i].description;\t\t\t\t\t\t\n\t\tLungo.dom('#language_new_routine_exercises_list').append('<li class=\"arrow\">' + name + ' ' + description + '</li>');\n\t}\t\n}", "title": "" }, { "docid": "c03ea544a38ac5e32841ca13257b304b", "score": "0.4602175", "text": "function getSteps() {\n return ['Training Details', 'Assign Tasks', 'Assign Employees'];\n }", "title": "" }, { "docid": "d18dfc486b7b13a07ead16981d0d8ba8", "score": "0.45974377", "text": "getById(knex, id){\n return knex\n .from('gainz_exercises')\n .select('*')\n .where('id', id)\n .first();\n }", "title": "" }, { "docid": "b2fc09a3c418421463ee026f8b27704a", "score": "0.45930213", "text": "function getMenu() {\n httpservice.get('./data/training_step_sample.json', false)\n .then(function(res) {\n vm.trainingStep = res.data;\n vm.selectedStep = vm.trainingStep[0];\n vm.selectedStep.stepIndex = 0;\n }, function(err) {\n console.log(\"Error in fetching data from json: \" + err);\n });\n }", "title": "" }, { "docid": "da39cda2f7c10a15545e9c8926a4580a", "score": "0.45918885", "text": "function getexistingrecs(){\n\tconst Http = new XMLHttpRequest();\n\tconst url=\"http://\"+location.hostname+\":8082\"+\"/exercise\";\n\tHttp.open(\"GET\", url);\n\tHttp.onreadystatechange = function(e){\n\t if (Http.readyState==4){\n\t\t var maintable = document.getElementById(\"AllExBody\");\n\t\t maintable.innerHTML=\"\";\n\t data=JSON.parse(Http.responseText);\n\t data.forEach(function(item){\n\t\t var weekday=document.getElementById(item.weekday+\"Body\");\n\t\t var musclegroup=document.createElement(\"td\");\n\t\t var exerciseid=document.createElement(\"td\");\n\t\t var exercise=document.createElement(\"td\");\n\t\t// var sets=document.createElement(\"td\");\n\t\t// var reps=document.createElement(\"td\");\n\t\t// var weight=document.createElement(\"td\");\n\t\t var buttonDel = document.createElement(\"td\");\n\t\t var buttonUpd = document.createElement(\"td\");\n\t\t musclegroup.innerHTML=item.musclegroup;\n\t\t exerciseid.innerHTML=item.exerciseid;\n\t\t exercise.innerHTML=item.exercise;\n\t\t// sets.innerHTML=item.sets;\n\t\t// reps.innerHTML=item.reps;\n\t\t// weight.innerHTML=item.weight;\n\t\t \n\n\t\t let button = document.createElement(\"button\");\n\t\t button.innerHTML= \"X\";\n\t\t button.type=\"button\";\n\t\t button.className = \"btn tableDel\";\n\t\t button.addEventListener(\"click\", function() {\n\t\t\t deleteData(item.exerciseid);\n\t\t });\n\t\t buttonDel.appendChild(button);\n\n\t\t let buttonU = document.createElement(\"button\");\n\t\t buttonU.innerHTML= \"Edit\";\n\t\t buttonU.type=\"button\";\n\t\t buttonU.className = \"btn tableUpd\";\n\t\t buttonU.addEventListener(\"click\", function() {\n\t\t\t EditExercise();\n\t\t\t idUP = item.exerciseid;\n\t\t });\n\t\t buttonUpd.appendChild(buttonU);\n\t\t \n\t\t let mainRow=document.createElement(\"tr\");\n\t\t \n\t\t mainRow.appendChild(musclegroup);\n\t\t\tmainRow.appendChild(exerciseid);\n\t\t\tmainRow.appendChild(exercise);\n\t\t\t// mainRow.appendChild(sets);\n\t\t\t// mainRow.appendChild(reps);\n\t\t\t// mainRow.appendChild(weight);\n\t\t\tmainRow.appendChild(buttonDel);\n\t\t\tmainRow.appendChild(buttonUpd);\n\t\t maintable.appendChild(mainRow);\n\t\t \n\t\t let x=mainRow.cloneNode(true);\n\t\t weekday.appendChild(x);\n\n\n\t });\n\t}\n\t}\n\tHttp.send();\n\t}", "title": "" }, { "docid": "fa761b036c32e8a8ee547033350350c3", "score": "0.4571883", "text": "function getSteps(){\n return ['Personal Information','Education Information'];\n }", "title": "" }, { "docid": "9051e431564e316e33cf22b3033f4341", "score": "0.45699972", "text": "function ViewInformation() {\r\n inquirer\r\n .prompt({\r\n name: \"action\",\r\n type: \"rawlist\",\r\n message: \"What would you like to do?\",\r\n choices: [\r\n \"View all employees\",\r\n \"View all departments\",\r\n \"View all roles\",\r\n \"View employees by manager\",\r\n \"View employees by department\"\r\n ]\r\n })\r\n .then(function(answer) {\r\n switch (answer.action) {\r\n case \"View all employees\":\r\n employeeSearch();\r\n break;\r\n\r\n case \"View all employees by manager\":\r\n employeeByManagerSearch();\r\n break;\r\n\r\n case \"View all departments\":\r\n departmentSearch();\r\n break;\r\n\r\n case \"View all roles\":\r\n rolesSearch();\r\n break;\r\n\r\n case \"View employees by department\":\r\n employeeByDepartmentSearch();\r\n break;\r\n }\r\n });\r\n}", "title": "" }, { "docid": "aa5348c6e784fbef86b57554a926df2a", "score": "0.45693967", "text": "function getGroupExamens(id, callback){\n return $.get(\n getFinalURL(id, \"examens\"),\n function (result) {\n callback(result);\n }\n );\n}", "title": "" }, { "docid": "f9383be9701533450a6085fe3e7e4055", "score": "0.45691642", "text": "function getSecurityQuestions() {\n return [\n \"What is your favorite food?\",\n \"Which football team do you support?\",\n \"How many languages do you speak?\",\n \"Who is your best musician?\",\n \"What is the brand of your first car?\"\n ];\n}", "title": "" } ]
9ff39059d7b971f4b951ff5b037fb198
Renames an object's key
[ { "docid": "67096e818a74f64726e7a5736f81c8d1", "score": "0.78451324", "text": "static renameObjectKey (o, oldKey, newKey) {\n if (oldKey !== newKey) {\n Object.defineProperty(o, newKey,\n Object.getOwnPropertyDescriptor(o, oldKey))\n delete o[oldKey]\n }\n }", "title": "" } ]
[ { "docid": "3067577d4cbce45bd89bc217341c8147", "score": "0.70137", "text": "renameKey (oldPath, newPath) {\n let model = this.asset.value;\n if(newPath.length === 0)\n throw new Error('Empty key are not allowed');\n if (!_.has(model, oldPath))\n throw new Error(`${oldPath} does not exists`);\n if (_.has(model, newPath))\n throw new Error(`${newPath} already exists`);\n\n _.set(model, newPath, _.cloneDeep(_.get(model, oldPath)));\n _.unset(model, oldPath);\n\n let msg = `Rename ${oldPath} to ${newPath}`;\n console.debug(msg);\n this.transaction.log(msg).then(() => this.updateStates(true));\n }", "title": "" }, { "docid": "909c8611cbd19a8f8ca01af1d6bf38de", "score": "0.6537951", "text": "function renameUserMetadataKey(key, newKey) {\n transformUserMetadata(meta => {\n meta[newKey] = meta[key];\n delete meta[key];\n return meta;\n });\n }", "title": "" }, { "docid": "6fa46317d418c67dbe4e3c90ef2861ae", "score": "0.6451093", "text": "function renameKeyValues ( originalData, newData ) {\n for (var property in newData) {\n originalData[property] = newData[property];\n }\n for (var property in originalData) {\n if(originalData[property] !== newData[property] && !angular.isObject(originalData[property])) {\n delete originalData[property];\n }\n }\n }", "title": "" }, { "docid": "27fa198faaa7aea6d9fe74fd03fe576b", "score": "0.6377419", "text": "function changeName(obj) {\n obj.name = \"coder\";\n}", "title": "" }, { "docid": "9c8d52655a06522cdf11d5520d65c461", "score": "0.63572854", "text": "function changeName(obj) {\n obj.name = 'Coder';\n }", "title": "" }, { "docid": "8ccc987909125b31cb77929135784862", "score": "0.63441044", "text": "function renameKeys(object) {\n // go through each key in the object\n var newObject = {};\n for (var key in object) {\n //only do the non-prototyped keys\n\n if (object.hasOwnProperty(key)) {\n console.log(object)\n if (typeof object[key] === 'object') {\n console.log(\"digdig\")\n console.log(\"key: \" + key)\n\n newObject[key] = renameKeys(object[key]);\n }\n if (object[key].hasOwnProperty(\"name\")) {\n // console.log(JSON.stringify(object[key])+ \" has 'name'\")\n console.log(\"has name\")\n console.log(object[key])\n //has to add property to parent object of name:namelessObject\n var newName = object[key].name.replace(/['\"*!:.?|[\\]\\/]+/g, '')\n // console.log(JSON.stringify(object))\n // console.log(JSON.stringify(object[key]))\n\n Object.defineProperty(object, newName,\n Object.getOwnPropertyDescriptor(object, key));\n Object.defineProperty(newObject, newName,\n Object.getOwnPropertyDescriptor(object, key));\n delete newObject[key]\n \n delete object[key]\n console.log('added renamed to oldObj')\n console.log(JSON.stringify(object, null, 2))\n console.log('added renamed to newObj')\n console.log(JSON.stringify(newObject, null, 2))\n // console.log(object instanceof Array)\n // console.log(key)\n // console.log(\"added \"+newName+ \" to \"+JSON.stringify(object[key]));\n\n }\n\n\n\n // console.log(object[key])\n\n\n }\n }\n // console.log(newObject)\n // console.log(\"from\")\n // console.log(object)\n // console.log(JSON.stringify(object))\n return newObject\n}", "title": "" }, { "docid": "c924c928cc6acb755d6fe27861e28a83", "score": "0.63329256", "text": "function renameProperties(obj, keyMap) {\n Object.keys(keyMap).forEach(function (oldKey) {\n if (oldKey in obj) {\n var newKey = keyMap[oldKey];\n // The old key's value takes precedence over the new key's value.\n obj[newKey] = obj[oldKey];\n delete obj[oldKey];\n }\n });\n}", "title": "" }, { "docid": "cc71b8d0d485c5dd0b5a49a7121a0486", "score": "0.6288765", "text": "function deleteFromObjectByKey(object, key) {\n var newObject = Object.assign({}, object, [key]);\n newObject.key='1';\n delete newObject[key];\n return newObject;\n}", "title": "" }, { "docid": "c70486f195a8aa6586cbaf693c44fbac", "score": "0.6218071", "text": "function changeName(obj){\n obj.name = 'coder';\n}", "title": "" }, { "docid": "56f99961e4d522be60f385e0cc9c0457", "score": "0.6187142", "text": "function changeName(obj){\n obj.name=\"sagar1\";\n}", "title": "" }, { "docid": "babac0b9e6f5d99e4c9451ef27cd26c7", "score": "0.6177357", "text": "function changeName(obj){\n obj.name = \"coder\";\n}", "title": "" }, { "docid": "f504754c996066964400baea8d33dd0a", "score": "0.6100499", "text": "function updateObject(object, key, value) {\n//take object, key, and value update the key of object with new value\n//check if object contains key\n\nobject[key] = value;\n\nreturn object;\n\n}", "title": "" }, { "docid": "1c22160028c5023e41073abe9598eaf0", "score": "0.60552204", "text": "function addKey(object, key) {\n if (object[key] === undefined) {\n object[key] = {};\n }\n }", "title": "" }, { "docid": "90489d60f62797217fa73ee52e0a4fe9", "score": "0.5974785", "text": "function deleteFromObjectByKey(obj, key) {\n return Object.assign({}, obj, key);\n}", "title": "" }, { "docid": "41e561179e0fa144e740f801a5a8f3ce", "score": "0.5966912", "text": "function removeKey(obj, key) {\n let newObj = { ...obj }\n delete newObj[key]\n return newObj\n}", "title": "" }, { "docid": "6f7c69d8a18f7a639de9ff884662c002", "score": "0.596076", "text": "function changeName(obj) {\n obj.name = \"min\";\n}", "title": "" }, { "docid": "5586c23d5978bda1a96e457e963ada7b", "score": "0.59504044", "text": "function changeName(obj){\n obj.name = 'programmer';\n}", "title": "" }, { "docid": "fa27df427701a9a55ed1ff299314da52", "score": "0.59408927", "text": "function updateName(obj) {\n const newObj = { ...obj };\n\n newObj.name = 'Harry Kane';\n\n return newObj;\n}", "title": "" }, { "docid": "88a895850d14e0a25605719f533a974a", "score": "0.5938231", "text": "_deleteKey(objName /*: string */\n , key /*: string */ = '') /*: void */{\n let obj /*: InternalMap */ = Ember.get(this, objName);\n if (obj.hasOwnProperty(key)) delete obj[key];\n let c /*: ChangesetDef */ = this;\n c.notifyPropertyChange(`${objName}.${key}`);\n c.notifyPropertyChange(objName);\n }", "title": "" }, { "docid": "d476fbcc672aecfa53c89ad5ede4db22", "score": "0.5932559", "text": "function deleteFromObjectByKey(object, key){\n var newObj = Object.assign({}, object)\n delete newObj[key]\n return newObj\n}", "title": "" }, { "docid": "610d20663ab2762c48a650d181c721ec", "score": "0.59161204", "text": "function updateObject(object, key, value) {\n //create if statements\n //check if the porperty of key is object\n //then reassign key on object to value\n //\nif(object.hasOwnProperty(key)) {\n object[key] = value;\n \n } else {\n object[key] = value;\n }\n return object;\n}", "title": "" }, { "docid": "3a468241551dbbf3a7d7b60cad55a36c", "score": "0.5909841", "text": "function camelcaseKeys(obj) {\n Object.keys(obj).forEach(key => {\n const newKey = camelCase(key)\n if (newKey !== key) {\n obj[newKey] = obj[key]\n delete obj[key]\n }\n })\n return obj\n}", "title": "" }, { "docid": "d1f2d9cb6ee12a68dd78deb601137665", "score": "0.58955127", "text": "function removeKey(obj, key) {\n let newObj = { ...obj};\n delete newObj[key];\n return newObj;\n}", "title": "" }, { "docid": "2724f4ada34a4a0905bf920dcda7fb09", "score": "0.5892482", "text": "function removeKey(obj, key) {\n let newObj = {...obj};\n delete newObj[key];\n return newObj;\n}", "title": "" }, { "docid": "53279769c073cd5c3529d3a0fdbf8569", "score": "0.58774084", "text": "map_single_key(entry, entryKeys, newVal, newKey) {\n\n if (entryKeys.includes(newVal)) {\n newVal = entry[newVal];\n if (newVal.toLowerCase() !== newKey.toLowerCase()) {\n delete entry[newVal];\n }\n }\n entry[newKey] = newVal;\n\n if (_.isString(entry[newKey])) {\n entry[newKey] = entry[newKey].trim();\n }\n\n // console.log(\"entrykeys: \", entryKeys, \" oldProp: \", oldProp, \" newProp: \", newProp, \" replaceKeyName: \", replaceKeyName, \" addPropertyAsConstant: \", addPropertyAsConstant);\n\n return entry;\n\n }", "title": "" }, { "docid": "bfa6dcd9a18a2aca7b2af213c265676a", "score": "0.5876015", "text": "function deleteFromObjectByKey(object, key) {\n var newObj = Object.assign({}, object)\n delete newObj[key]\n return newObj\n}", "title": "" }, { "docid": "571852f6e97c209aa8e12925c81e8dac", "score": "0.5861382", "text": "function temporarilyReplace (obj, key, replacement, action) {\n const name = (obj && (obj.name || obj.constructor.name)) || ''\n const description = name ? `${name}.${key}` : key\n console.log(`Monkeypatching ${description}`)\n const original = obj[key]\n const originallyHad = apply(hasOwnProperty, obj, [ key ])\n try {\n if (originallyHad) {\n delete obj[key]\n }\n defineProperty(\n obj,\n key,\n {\n get () {\n return replacement(description, original, this)\n },\n set (x) {\n throw new Error(`Trying to set ${description}`)\n },\n enumerable: true,\n configurable: true\n })\n } catch (ignored) {\n // Reporting the error can help diagnosis but makes the log output\n // differ on different Node versions.\n }\n try {\n return action()\n } finally {\n console.log(`Monkeyunpatching ${description}`)\n try {\n delete obj[key]\n if (originallyHad) {\n obj[key] = original\n }\n } catch (ignored) {\n // Reporting the error can help diagnosis but makes the log output\n // differ on different Node versions.\n }\n }\n}", "title": "" }, { "docid": "42d9aaab7d54f3cc607024528aafdc6b", "score": "0.580644", "text": "function Rename(item) {\n if (item.key===key){\n return item.text=message;\n }\n }", "title": "" }, { "docid": "1790d43226e8fa4ab92ca4c3a0e33f9f", "score": "0.57960117", "text": "function updateObject(object, key, value) {\n//add the valeu param to the key param of the object param\n object[key] = value;\n//return the object\n return object;\n\n}", "title": "" }, { "docid": "4ce89aaeda77651ee1117dcd79112426", "score": "0.5794042", "text": "function setHashKey(obj, h) {\n if (h) {\n obj.$$hashKey = h;\n }\n else {\n delete obj.$$hashKey;\n }\n}", "title": "" }, { "docid": "4ce89aaeda77651ee1117dcd79112426", "score": "0.5794042", "text": "function setHashKey(obj, h) {\n if (h) {\n obj.$$hashKey = h;\n }\n else {\n delete obj.$$hashKey;\n }\n}", "title": "" }, { "docid": "4ce89aaeda77651ee1117dcd79112426", "score": "0.5794042", "text": "function setHashKey(obj, h) {\n if (h) {\n obj.$$hashKey = h;\n }\n else {\n delete obj.$$hashKey;\n }\n}", "title": "" }, { "docid": "4ce89aaeda77651ee1117dcd79112426", "score": "0.5794042", "text": "function setHashKey(obj, h) {\n if (h) {\n obj.$$hashKey = h;\n }\n else {\n delete obj.$$hashKey;\n }\n}", "title": "" }, { "docid": "4ce89aaeda77651ee1117dcd79112426", "score": "0.5794042", "text": "function setHashKey(obj, h) {\n if (h) {\n obj.$$hashKey = h;\n }\n else {\n delete obj.$$hashKey;\n }\n}", "title": "" }, { "docid": "4ce89aaeda77651ee1117dcd79112426", "score": "0.5794042", "text": "function setHashKey(obj, h) {\n if (h) {\n obj.$$hashKey = h;\n }\n else {\n delete obj.$$hashKey;\n }\n}", "title": "" }, { "docid": "4ce89aaeda77651ee1117dcd79112426", "score": "0.5794042", "text": "function setHashKey(obj, h) {\n if (h) {\n obj.$$hashKey = h;\n }\n else {\n delete obj.$$hashKey;\n }\n}", "title": "" }, { "docid": "4ce89aaeda77651ee1117dcd79112426", "score": "0.5794042", "text": "function setHashKey(obj, h) {\n if (h) {\n obj.$$hashKey = h;\n }\n else {\n delete obj.$$hashKey;\n }\n}", "title": "" }, { "docid": "b1a5633c18e222625c6c86a8ff3f8d85", "score": "0.5788266", "text": "function setHashKey(obj, h) {\n if (h) {\n obj.$$hashKey = h;\n } else {\n delete obj.$$hashKey;\n }\n}", "title": "" }, { "docid": "b1a5633c18e222625c6c86a8ff3f8d85", "score": "0.5788266", "text": "function setHashKey(obj, h) {\n if (h) {\n obj.$$hashKey = h;\n } else {\n delete obj.$$hashKey;\n }\n}", "title": "" }, { "docid": "b1a5633c18e222625c6c86a8ff3f8d85", "score": "0.5788266", "text": "function setHashKey(obj, h) {\n if (h) {\n obj.$$hashKey = h;\n } else {\n delete obj.$$hashKey;\n }\n}", "title": "" }, { "docid": "b1a5633c18e222625c6c86a8ff3f8d85", "score": "0.5788266", "text": "function setHashKey(obj, h) {\n if (h) {\n obj.$$hashKey = h;\n } else {\n delete obj.$$hashKey;\n }\n}", "title": "" }, { "docid": "b1a5633c18e222625c6c86a8ff3f8d85", "score": "0.5788266", "text": "function setHashKey(obj, h) {\n if (h) {\n obj.$$hashKey = h;\n } else {\n delete obj.$$hashKey;\n }\n}", "title": "" }, { "docid": "b1a5633c18e222625c6c86a8ff3f8d85", "score": "0.5788266", "text": "function setHashKey(obj, h) {\n if (h) {\n obj.$$hashKey = h;\n } else {\n delete obj.$$hashKey;\n }\n}", "title": "" }, { "docid": "b1a5633c18e222625c6c86a8ff3f8d85", "score": "0.5788266", "text": "function setHashKey(obj, h) {\n if (h) {\n obj.$$hashKey = h;\n } else {\n delete obj.$$hashKey;\n }\n}", "title": "" }, { "docid": "b1a5633c18e222625c6c86a8ff3f8d85", "score": "0.5788266", "text": "function setHashKey(obj, h) {\n if (h) {\n obj.$$hashKey = h;\n } else {\n delete obj.$$hashKey;\n }\n}", "title": "" }, { "docid": "b1a5633c18e222625c6c86a8ff3f8d85", "score": "0.5788266", "text": "function setHashKey(obj, h) {\n if (h) {\n obj.$$hashKey = h;\n } else {\n delete obj.$$hashKey;\n }\n}", "title": "" }, { "docid": "b1a5633c18e222625c6c86a8ff3f8d85", "score": "0.5788266", "text": "function setHashKey(obj, h) {\n if (h) {\n obj.$$hashKey = h;\n } else {\n delete obj.$$hashKey;\n }\n}", "title": "" }, { "docid": "b1a5633c18e222625c6c86a8ff3f8d85", "score": "0.5788266", "text": "function setHashKey(obj, h) {\n if (h) {\n obj.$$hashKey = h;\n } else {\n delete obj.$$hashKey;\n }\n}", "title": "" }, { "docid": "b1a5633c18e222625c6c86a8ff3f8d85", "score": "0.5788266", "text": "function setHashKey(obj, h) {\n if (h) {\n obj.$$hashKey = h;\n } else {\n delete obj.$$hashKey;\n }\n}", "title": "" }, { "docid": "b1a5633c18e222625c6c86a8ff3f8d85", "score": "0.5788266", "text": "function setHashKey(obj, h) {\n if (h) {\n obj.$$hashKey = h;\n } else {\n delete obj.$$hashKey;\n }\n}", "title": "" }, { "docid": "b1a5633c18e222625c6c86a8ff3f8d85", "score": "0.5788266", "text": "function setHashKey(obj, h) {\n if (h) {\n obj.$$hashKey = h;\n } else {\n delete obj.$$hashKey;\n }\n}", "title": "" }, { "docid": "b1a5633c18e222625c6c86a8ff3f8d85", "score": "0.5788266", "text": "function setHashKey(obj, h) {\n if (h) {\n obj.$$hashKey = h;\n } else {\n delete obj.$$hashKey;\n }\n}", "title": "" }, { "docid": "b1a5633c18e222625c6c86a8ff3f8d85", "score": "0.5788266", "text": "function setHashKey(obj, h) {\n if (h) {\n obj.$$hashKey = h;\n } else {\n delete obj.$$hashKey;\n }\n}", "title": "" }, { "docid": "b1a5633c18e222625c6c86a8ff3f8d85", "score": "0.5788266", "text": "function setHashKey(obj, h) {\n if (h) {\n obj.$$hashKey = h;\n } else {\n delete obj.$$hashKey;\n }\n}", "title": "" }, { "docid": "b1a5633c18e222625c6c86a8ff3f8d85", "score": "0.5788266", "text": "function setHashKey(obj, h) {\n if (h) {\n obj.$$hashKey = h;\n } else {\n delete obj.$$hashKey;\n }\n}", "title": "" }, { "docid": "b1a5633c18e222625c6c86a8ff3f8d85", "score": "0.5788266", "text": "function setHashKey(obj, h) {\n if (h) {\n obj.$$hashKey = h;\n } else {\n delete obj.$$hashKey;\n }\n}", "title": "" }, { "docid": "b1a5633c18e222625c6c86a8ff3f8d85", "score": "0.5788266", "text": "function setHashKey(obj, h) {\n if (h) {\n obj.$$hashKey = h;\n } else {\n delete obj.$$hashKey;\n }\n}", "title": "" }, { "docid": "b1a5633c18e222625c6c86a8ff3f8d85", "score": "0.5788266", "text": "function setHashKey(obj, h) {\n if (h) {\n obj.$$hashKey = h;\n } else {\n delete obj.$$hashKey;\n }\n}", "title": "" }, { "docid": "b1a5633c18e222625c6c86a8ff3f8d85", "score": "0.5788266", "text": "function setHashKey(obj, h) {\n if (h) {\n obj.$$hashKey = h;\n } else {\n delete obj.$$hashKey;\n }\n}", "title": "" }, { "docid": "b1a5633c18e222625c6c86a8ff3f8d85", "score": "0.5788266", "text": "function setHashKey(obj, h) {\n if (h) {\n obj.$$hashKey = h;\n } else {\n delete obj.$$hashKey;\n }\n}", "title": "" }, { "docid": "b1a5633c18e222625c6c86a8ff3f8d85", "score": "0.5788266", "text": "function setHashKey(obj, h) {\n if (h) {\n obj.$$hashKey = h;\n } else {\n delete obj.$$hashKey;\n }\n}", "title": "" }, { "docid": "b1a5633c18e222625c6c86a8ff3f8d85", "score": "0.5788266", "text": "function setHashKey(obj, h) {\n if (h) {\n obj.$$hashKey = h;\n } else {\n delete obj.$$hashKey;\n }\n}", "title": "" }, { "docid": "b1a5633c18e222625c6c86a8ff3f8d85", "score": "0.5788266", "text": "function setHashKey(obj, h) {\n if (h) {\n obj.$$hashKey = h;\n } else {\n delete obj.$$hashKey;\n }\n}", "title": "" }, { "docid": "b1a5633c18e222625c6c86a8ff3f8d85", "score": "0.5788266", "text": "function setHashKey(obj, h) {\n if (h) {\n obj.$$hashKey = h;\n } else {\n delete obj.$$hashKey;\n }\n}", "title": "" }, { "docid": "b1a5633c18e222625c6c86a8ff3f8d85", "score": "0.5788266", "text": "function setHashKey(obj, h) {\n if (h) {\n obj.$$hashKey = h;\n } else {\n delete obj.$$hashKey;\n }\n}", "title": "" }, { "docid": "b1a5633c18e222625c6c86a8ff3f8d85", "score": "0.5788266", "text": "function setHashKey(obj, h) {\n if (h) {\n obj.$$hashKey = h;\n } else {\n delete obj.$$hashKey;\n }\n}", "title": "" }, { "docid": "b1a5633c18e222625c6c86a8ff3f8d85", "score": "0.5788266", "text": "function setHashKey(obj, h) {\n if (h) {\n obj.$$hashKey = h;\n } else {\n delete obj.$$hashKey;\n }\n}", "title": "" }, { "docid": "b1a5633c18e222625c6c86a8ff3f8d85", "score": "0.5788266", "text": "function setHashKey(obj, h) {\n if (h) {\n obj.$$hashKey = h;\n } else {\n delete obj.$$hashKey;\n }\n}", "title": "" }, { "docid": "b1a5633c18e222625c6c86a8ff3f8d85", "score": "0.5788266", "text": "function setHashKey(obj, h) {\n if (h) {\n obj.$$hashKey = h;\n } else {\n delete obj.$$hashKey;\n }\n}", "title": "" }, { "docid": "b1a5633c18e222625c6c86a8ff3f8d85", "score": "0.5788266", "text": "function setHashKey(obj, h) {\n if (h) {\n obj.$$hashKey = h;\n } else {\n delete obj.$$hashKey;\n }\n}", "title": "" }, { "docid": "b1a5633c18e222625c6c86a8ff3f8d85", "score": "0.5788266", "text": "function setHashKey(obj, h) {\n if (h) {\n obj.$$hashKey = h;\n } else {\n delete obj.$$hashKey;\n }\n}", "title": "" }, { "docid": "b1a5633c18e222625c6c86a8ff3f8d85", "score": "0.5788266", "text": "function setHashKey(obj, h) {\n if (h) {\n obj.$$hashKey = h;\n } else {\n delete obj.$$hashKey;\n }\n}", "title": "" }, { "docid": "b1a5633c18e222625c6c86a8ff3f8d85", "score": "0.5788266", "text": "function setHashKey(obj, h) {\n if (h) {\n obj.$$hashKey = h;\n } else {\n delete obj.$$hashKey;\n }\n}", "title": "" }, { "docid": "b1a5633c18e222625c6c86a8ff3f8d85", "score": "0.5788266", "text": "function setHashKey(obj, h) {\n if (h) {\n obj.$$hashKey = h;\n } else {\n delete obj.$$hashKey;\n }\n}", "title": "" }, { "docid": "b1a5633c18e222625c6c86a8ff3f8d85", "score": "0.5788266", "text": "function setHashKey(obj, h) {\n if (h) {\n obj.$$hashKey = h;\n } else {\n delete obj.$$hashKey;\n }\n}", "title": "" }, { "docid": "c54b0478233a35d9a2c0268e155d34ef", "score": "0.5780366", "text": "Rekey () {\n this.k = REKEY(this.k)\n }", "title": "" }, { "docid": "e28f40403015806f6e3bbd6446926252", "score": "0.5772175", "text": "function setHashKey(obj, h) {\n if (h) {\n obj.$$hashKey = h;\n } else {\n delete obj.$$hashKey;\n }\n }", "title": "" }, { "docid": "e28f40403015806f6e3bbd6446926252", "score": "0.5772175", "text": "function setHashKey(obj, h) {\n if (h) {\n obj.$$hashKey = h;\n } else {\n delete obj.$$hashKey;\n }\n }", "title": "" }, { "docid": "8b5b1ec08d7cdf858d7e381100befe4f", "score": "0.5761995", "text": "function setKeyValue ( data, setting ) {\n var cloneData = {};\n for (var property in setting ) {\n if (setting.hasOwnProperty(property)) {\n if (typeof setting[property] == 'object') {\n setKeyValue(data[property], setting[property]);\n }\n else {\n cloneData[setting[property]] = data[property];\n }\n }\n }\n renameKeyValues(data, cloneData);\n }// setKeyValue", "title": "" }, { "docid": "67a7aa5ee25f21e985aa5bbbe897d0c2", "score": "0.57599324", "text": "function createKey(object) {\n\t\tlet key;\n\t\tif (object.channel) {\n\t\t\tkey = `${object.channel}:${object.type}:${object.id}`;\n\t\t} else {\n\t\t\tkey = `${object.type}:${object.id}`;\n\t\t}\n\n\t\treturn {\n\t\t\tkey: key.slice(0, -2),\n\t\t\tid: key.slice(-2)\n\t\t};\n\t}", "title": "" }, { "docid": "f428642c3a24e5b807b8acad3a26f4e6", "score": "0.5758945", "text": "function getCacheKey(object) {\n\treturn object.pos.x + \"_\" + object.pos.y;\n}", "title": "" }, { "docid": "1a2f9f62e634f8251611ea849b7a9d4d", "score": "0.57566214", "text": "renamenx(key, newKey) {\n return this.redisClientProxy('renamenx', arguments);\n }", "title": "" }, { "docid": "aa96f949d2d1efe605b885f0a61954d5", "score": "0.575103", "text": "function changeGreeting(obj) {\n obj.greeting = 'Hola';\n}", "title": "" }, { "docid": "21d58d07438fc404ff46c35f7a0d56e1", "score": "0.57339424", "text": "function getKey(object, key) {\n return object[key];\n }", "title": "" }, { "docid": "7064a2630151c1723cc6ff1972ac1ced", "score": "0.5725959", "text": "objectKeyName(obj) {\n return obj._id;\n }", "title": "" }, { "docid": "8cc6e4ea6516d541a8b1203c69832d56", "score": "0.5720971", "text": "function updateObject(obj, key, value){\n obj[key] = value;\n return obj;\n}", "title": "" }, { "docid": "76e755b9cffde8e784a32545de7c30b0", "score": "0.5717921", "text": "updateKeyName(oldKey, newKey) {\r\n let current = this.state.data;\r\n\r\n if (current[newKey] == undefined && newKey != \"\") {\r\n current[newKey] = \"\";\r\n\r\n // Delete `oldKey` if provided.\r\n if (oldKey !== undefined) {\r\n delete Object.assign(current, { [newKey]: current[oldKey] })[oldKey];\r\n }\r\n this.setState({ data: current }, () => {\r\n this.props.updateFunc(this.state.data);\r\n });\r\n } else if (newKey === \"\") {\r\n messenger.notify(\"OpenToast\", { msg: `Cannot set an empty Key`, warn: true });\r\n } else {\r\n messenger.notify(\"OpenToast\", { msg: `Cannot set key ${oldKey} to ${newKey} as it already exists.`, warn: true });\r\n }\r\n }", "title": "" }, { "docid": "4ff8c902dafa082593c0d644beabf30a", "score": "0.5701357", "text": "function updateObject(object, key, value) {\n//bracket notation to update the object with a key on value\nobject[key] = value;\n\nreturn object;\n \n}", "title": "" }, { "docid": "9abbb9f18d9ff5a5dc80f0d8148ef761", "score": "0.5698406", "text": "function updateObject(object, key, value) {\n if(!object[key]){\n object[key] = value;\n } else {\n object[key] = value;\n }\n return object;\n}", "title": "" }, { "docid": "2f7630226fed41ea520febf000eb09f3", "score": "0.5692532", "text": "function swapkeyval(json){\n var ret = {};\n for(var key in json){\n if (json.hasOwnProperty(key)) {\n ret[json[key]] = key;\n }\n }\n return ret;\n}", "title": "" }, { "docid": "08137243c60c4ca48a7e46538f40e685", "score": "0.5670603", "text": "function rename(from, to) {\n // There is no need to do any type coercion. Maintain fidelity by using the\n // string type, because everything in and out of config is derivative of\n // of the string type.\n const value = config.read_string(from);\n\n // Avoid creating the new key if the value is undefined. If the value is\n // undefined then rename devolves into a remove decorator. Note that due to\n // the strictness of this check, empty strings are retained, even though they\n // are not visibly different from undefined in devtools\n if (typeof value !== 'undefined') {\n config.write_string(to, value);\n }\n\n config.remove(from);\n}", "title": "" }, { "docid": "d1c495435ad0ce961581dbe5eebdfceb", "score": "0.5669383", "text": "function destructivelyDeleteFromObjectByKey(object, key) {\n object.key='1';\n delete object[key];\n return object; \n}", "title": "" }, { "docid": "999c638fe7b769a84bebd844aeda1dcd", "score": "0.56680787", "text": "function updateUserMetadataKey(key, value) {\n transformUserMetadata(old => {\n old[key] = value;\n return old;\n });\n }", "title": "" }, { "docid": "bd9c2919b18e38d246bd37c232935b37", "score": "0.5665908", "text": "function getKey(object, key) {\n return object[key];\n}", "title": "" }, { "docid": "6abad8ed7738d75ac331569c7a33f626", "score": "0.5661623", "text": "function setHashKey(obj, h) {\n\t if (h) {\n\t obj.$$hashKey = h;\n\t } else {\n\t delete obj.$$hashKey;\n\t }\n\t}", "title": "" }, { "docid": "6abad8ed7738d75ac331569c7a33f626", "score": "0.5661623", "text": "function setHashKey(obj, h) {\n\t if (h) {\n\t obj.$$hashKey = h;\n\t } else {\n\t delete obj.$$hashKey;\n\t }\n\t}", "title": "" }, { "docid": "6abad8ed7738d75ac331569c7a33f626", "score": "0.5661623", "text": "function setHashKey(obj, h) {\n\t if (h) {\n\t obj.$$hashKey = h;\n\t } else {\n\t delete obj.$$hashKey;\n\t }\n\t}", "title": "" }, { "docid": "6abad8ed7738d75ac331569c7a33f626", "score": "0.5661623", "text": "function setHashKey(obj, h) {\n\t if (h) {\n\t obj.$$hashKey = h;\n\t } else {\n\t delete obj.$$hashKey;\n\t }\n\t}", "title": "" }, { "docid": "39c64a606f8094ba35d60a1814303e47", "score": "0.56394786", "text": "updatePropertyName(id, name) {\n const oldName = this.propertyIndex[id].propertyName;\n this.model[name] = this.model[oldName];\n this.propertyIndex[id].propertyName = name;\n delete this.model[oldName];\n this.propertyIndex = Object.assign({}, this.propertyIndex);\n this.modelChange.emit(this.model);\n }", "title": "" }, { "docid": "d62d3890ba8a2cc5a5b1ef9a43f7377d", "score": "0.5637243", "text": "function changeGreeting(obj) {\r\n obj.greeting = \"Hola\";\r\n}", "title": "" } ]
b56b85ed13ad68de4b1746cbcd047f5b
Clears all the geometry within the scene.
[ { "docid": "3b642406f4429cb0a5f95745c68171d4", "score": "0.7526801", "text": "clearGeometry() {\n this.geometries = []\n gl.clear (gl.COLOR_BUFFER_BIT)\n }", "title": "" } ]
[ { "docid": "dc81b15e2106f76d65222ff3903209c3", "score": "0.7851838", "text": "function clear() {\n if (currentObjects.length > 0) {\n for (var i = 0; i < currentObjects.length; i++) {\n scene.remove(currentObjects[i]);\n scene.remove(currentEdges[i]);\n }\n }\n }", "title": "" }, { "docid": "84a45b17721d782d8a2db81f106e791a", "score": "0.7806753", "text": "function clearScene() {\n // Clear the map so we don't waste space\n meshes.clear();\n // Must iterate backwards when deleting scene children\n for (let i = scene.children.length - 1; i >= 0; i -= 1) {\n // Only remove mesh objects so we dont delete the camera/lights\n if (scene.children[i].type === 'Mesh') {\n scene.remove(scene.children[i]);\n }\n }\n}", "title": "" }, { "docid": "1f787ed12ba5e23a9f771ce44e500205", "score": "0.77824116", "text": "clear() {\n\t\tfor (var i = this._box.length - 1; i >= 0; i--) {\n\t\t\tscene.remove(this._box[i]);\n\t\t}\n\t}", "title": "" }, { "docid": "20a61bed33706936b4136e81106d28ee", "score": "0.77738094", "text": "clearScene() {\n for (let i = this.scene.children.length - 1; i >= 0; i--) {\n const object = this.scene.children[i];\n if (object.type === 'Mesh') {\n object.geometry.dispose();\n object.material.dispose();\n this.scene.remove(object);\n }\n }\n }", "title": "" }, { "docid": "6d6fa52e651817ee51c59e388ddb22ce", "score": "0.7734333", "text": "function clearGeometry() {\n graphicsLayer.removeAll();\n }", "title": "" }, { "docid": "6164444c5f92ed5db4bc8892513f456a", "score": "0.7617583", "text": "function clearCanvas() { \n //Removes all geometric objects from the scene then immediately rendrs \n currScene.clearGeometry(); \n render(); \n}", "title": "" }, { "docid": "3e063360d60d863d0c20f7dccf46875a", "score": "0.75298274", "text": "clearGeometry() {\n //\n // YOUR CODE HERE\n //\n\n // Recommendations: It would be best to call this.render() at the end of\n // this call.\n this.geometries = [];\n this.render();\n }", "title": "" }, { "docid": "2c0958f68d292b52fa6dbb3c8d335015", "score": "0.74603057", "text": "function clearGeometry() {\n sketchGeometry = null;\n sketchViewModel.cancel();\n sketchLayer.removeAll();\n bufferLayer.removeAll();\n clearHighlighting();\n clearCharts();\n document.getElementById(\"count\").innerHTML = \"0\";\n resultDiv.style.display = \"none\";\n }", "title": "" }, { "docid": "966cc77e5b4f58102a06835680c89494", "score": "0.73523736", "text": "function clearScene() {\n 'use strict';\n\n context.clearRect(0,0,scene.width,scene.height);\n context.beginPath();\n }", "title": "" }, { "docid": "05a55e6ffd2343113e60c848de68756b", "score": "0.7316201", "text": "function Clear() {\n paper.clear();\n Places = {};\n Trans = {};\n Arcs = [];\n }", "title": "" }, { "docid": "cc81b67439915016e81b4b459bca355e", "score": "0.7294294", "text": "function clearCanvas() {\n scene.clearGeometry();\n gl.clear(gl.COLOR_BUFFER_BIT);\n}", "title": "" }, { "docid": "0107095a53b8d4373975c86e3e10bf1f", "score": "0.72910887", "text": "function clear() {\n gameScene.removeChildren();\n}", "title": "" }, { "docid": "cbbba91477304f2cca28a0c6013459cd", "score": "0.7236501", "text": "function cleanGeo() {\n // console.log( \"\" );\n // console.log( \"CLEAN GEO \" );\n for( var i = 0; i < currentEQ.length; i++ ) {\n var temp = currentEQ[i];\n scene.remove( temp );\n temp.geometry.dispose();\n }\n currentEQ = [];\n}", "title": "" }, { "docid": "7f3afe2552d671b80d210adf216b6d9c", "score": "0.7129632", "text": "function resetCurrentScene(){\n // clear all graphs\n all_graphs = removeArrayObjectsFromScene(all_graphs);\n\n // clear all labels\n all_labels = removeArrayObjectsFromScene(all_labels);\n\n // clear hotspots\n all_hotspots = removeArrayObjectsFromScene(all_hotspots);\n\n // clear grid\n scene.remove(grid_object);\n grid_object = undefined;\n\n // clear data\n all_data_values = [];\n}", "title": "" }, { "docid": "ffac29b952b66d7a127679b71ab021c3", "score": "0.70930594", "text": "function clear() {\n while(meshes.length > 0) {\n meshes_size--;\n scene.remove(meshes[meshes_size]);\n meshes.pop();\n }\n}", "title": "" }, { "docid": "d25ed60de3c3f856a6828ee1af565592", "score": "0.70647436", "text": "function clearScene() {\n\tremovableItems = []\n\tscene.children.forEach(function (obj) {\n\t\tif (obj.type === \"Line\" && obj.material != materials.beam) {\n\t\t\tremovableItems.push(obj);\n\t\t}\n\n\n\n\t});\n\twhile (removableItems.length > 0) {\n\t\tscene.remove(removableItems[0]);\n\t\tremovableItems.shift();\n\t}\n\n}", "title": "" }, { "docid": "a79569d349111ad7757e009309af083e", "score": "0.7050268", "text": "function clearShape() {\n\t\t\tgroup.remove(mesh);\n\t\t}", "title": "" }, { "docid": "0ae57f78b0076e1e6eebe576df36284f", "score": "0.6976742", "text": "function cleanScene() {\n gl.clearColor(0.3, 0.3, 0.3, 1.0); // Clear to black, fully opaque\n gl.clearDepth(1.0); // Clear everything\n gl.enable(gl.DEPTH_TEST); // Enable depth testing\n gl.depthFunc(gl.LEQUAL); // Near things obscure far things\n\n // Clear the canvas before we start drawing on it.\n gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\n}", "title": "" }, { "docid": "2c32e96c9e7cbcb6856aede4f5bd8f17", "score": "0.6928094", "text": "function clearCanvas(gl) {\n\tscene.clearGeometry();\n}", "title": "" }, { "docid": "2c32e96c9e7cbcb6856aede4f5bd8f17", "score": "0.6928094", "text": "function clearCanvas(gl) {\n\tscene.clearGeometry();\n}", "title": "" }, { "docid": "dcc0b47dc7772c56bfde1fa81805219a", "score": "0.68428093", "text": "function clear() {\n points = [];\n tree = new KDTree();\n redraw();\n}", "title": "" }, { "docid": "fa2b5cff86edf358765e97d26346cf63", "score": "0.6777586", "text": "clear() {\n for (var i = 0; i < this.layers.length; i++) {\n this.layers[i].clearMeshInstances(true);\n }\n\n // reuse graph nodes\n const temp = this.freeGraphNodes;\n this.freeGraphNodes = this.usedGraphNodes;\n this.usedGraphNodes = temp;\n\n this.layers.length = 0;\n }", "title": "" }, { "docid": "1c1c94c39274f7f7fa6aa8308176b4f4", "score": "0.6777539", "text": "clearGeometries() {\n this.geometries = [];\n }", "title": "" }, { "docid": "b275a72fa51c23be36507d04ff49fd73", "score": "0.67386955", "text": "clearRegions() {\n this.leftWidgets.length = 0;\n this.topWidgets.length = 0;\n this.rightWidgets.length = 0;\n this.bottomWidgets.length = 0;\n }", "title": "" }, { "docid": "b74afc3a83ae015ecb15d03052113a2e", "score": "0.6715748", "text": "deleteObjects() {\n while (this.scene.children.length > 0) {\n this.scene.remove(this.scene.children[0]);\n }\n this.controls.reset();\n }", "title": "" }, { "docid": "e3fecef1c20b47850fd1b21220ef1138", "score": "0.66954213", "text": "function clearScene(event) {\r\n event.preventDefault();\r\n sceneContainer.innerText = '';\r\n}", "title": "" }, { "docid": "110c8b795f281801befe2c7a877a8933", "score": "0.66810846", "text": "clear() {\n this.layers.objects.forEach(x => {\n this.removeNativeChildOfObject(x);\n });\n this.layers.clear();\n this.clean();\n }", "title": "" }, { "docid": "6e53326691a7874b33c5dc21fc92c830", "score": "0.6658109", "text": "_clearAll() {\n const self = this;\n self.ctx.clearRect(0, 0, self.width, self.height);\n }", "title": "" }, { "docid": "1325cc11f87d4f1a7a1443a248cc1464", "score": "0.66572773", "text": "function clear() {\n vertex_arr.length = 0;\n vertex_map = Object.create(null);\n edge_indexes.length = 0;\n face_indexes.length = 0;\n }", "title": "" }, { "docid": "0a607c737d5cff93fcba5dbcf59a8bd3", "score": "0.6621994", "text": "function clear() {\n svgPC.selectAll(\"*\").remove();\n svgSP.selectAll(\"*\").remove();\n}", "title": "" }, { "docid": "ac6300ec1451edff53971bf344cb6614", "score": "0.66087025", "text": "clear(){\n this.g.selectAll(\"*\").remove();\n this.nodesData = {};\n this.nodesPos = {};\n this.flowsData = {};\n //this.hideTags = {};\n }", "title": "" }, { "docid": "87d3cdc0bbc66b776aa23ffb7956d041", "score": "0.6602929", "text": "cleanAndUpdateScene() {\n const scene = this.get('scene');\n\n removeAllChildren(scene);\n\n function removeAllChildren(entity) {\n for (let i = entity.children.length - 1; i >= 0; i--) {\n let child = entity.children[i];\n\n removeAllChildren(child);\n\n if (child.type !== 'AmbientLight' && child.type !== 'SpotLight' && child.type !== 'DirectionalLight') {\n if (child.type !== 'Object3D') {\n child.geometry.dispose();\n child.material.dispose();\n }\n entity.remove(child);\n }\n }\n }\n this.populateScene();\n }", "title": "" }, { "docid": "928e7d7d07091e01eab0a7151649743e", "score": "0.6562527", "text": "clearCanvas() {\n this.shapes = [];\n this.context.clearRect(0, 0, this.dimensions.width, this.dimensions.height);\n }", "title": "" }, { "docid": "67853ecc926c7aedb51b2a4fb4ee573d", "score": "0.6508672", "text": "clear () {\n for (var i = 0; i < this.nodes.length; i++) {\n this.nodes[i].clear();\n }\n\n this.objects = [];\n this.nodes = [];\n return true;\n }", "title": "" }, { "docid": "5ad2c249fc34f6602142943445069f64", "score": "0.65063095", "text": "function clearStage () {\n\tfor (var i = app.stage.children.length - 1; i >= 0; i--) {\n\t\tapp.stage.removeChild(app.stage.children[i])\n\t}\n}", "title": "" }, { "docid": "74d4c4049914672853141e9d26fa27e4", "score": "0.649965", "text": "function reset () {\n var forest = d3.select('#forest');\n // Geometry count does not seem to go down...\n forest.selectAll('*').remove();\n}", "title": "" }, { "docid": "1eb7737bcc2ef7ab209d0ee5777abae3", "score": "0.6497516", "text": "function clearAndEmptyCanvas() {\n drawio.ctx.clearRect(0, 0, drawio.canvas.width, drawio.canvas.height);\n drawio.selectedElement = null;\n drawio.shapes = [];\n}", "title": "" }, { "docid": "1eef7905d3c5ce2f03c0f6d5685c9bfb", "score": "0.6491592", "text": "function clear(){\n\t\t_Context.clearRect (0, 0, _Width, _Height);\n\t}", "title": "" }, { "docid": "3766748931a77544e6c6737b35a07029", "score": "0.64838153", "text": "function clear() {\n\t\td3.select(\"svg\").remove();\n\t\t// stop loop\n\t\tclearInterval(module.interval);\n\t\tnode = [];\n\t\tnodes = [];\n\t\tnextNodesArray = [];\n\t\tappendToNextNodesArray = [];\n\t\tAPP.graph = startGraph();\n\t}", "title": "" }, { "docid": "e07da1225ff7dc4ddd5477036b10d80f", "score": "0.64803994", "text": "clear() {\r\n this._vertices.length = 0;\r\n this._orders.length = 0;\r\n this._indexes.length = 0;\r\n this._vertices = [];\r\n this._orders = [];\r\n this._indexes = [];\r\n\r\n this._deleteBuffers();\r\n }", "title": "" }, { "docid": "644e83d6a0939ca6c08678ac346d1873", "score": "0.64718926", "text": "function clear_shapes_and_transforms(){\r\n ctx.clearRect(0, 0, canvas.width, canvas.height);\r\n currentShape = '';\r\n currentTransform = '';\r\n}", "title": "" }, { "docid": "964f9452b373e34b09304afe6255f066", "score": "0.6434403", "text": "function clear() {\n gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\n }", "title": "" }, { "docid": "813703d6353ee2d951a8dd47f28a3bf0", "score": "0.64171624", "text": "function clearWorld() {\n stage_obj_map.forEach(function(entry) {\n stage.removeChild(entry);\n });\n\n stage_obj_nameplate.forEach(function(entry) {\n stage.removeChild(entry);\n });\n\n for (var i = 0; i < 2; i++) {\n for (var j = 0; j < grid_lines[i].length; j++) {\n stage.removeChild(grid_lines[i][j]);\n }\n }\n grid_lines = [\n [],\n []\n ];\n stage_obj_map = [];\n stage_obj_types = [];\n stage_obj_nameplate = [];\n stage_obj_title = [];\n\n}", "title": "" }, { "docid": "6b11e1f7d1c0ed81495ceb79f371f53f", "score": "0.64132327", "text": "clear() {\n this._store.clear();\n this.draw();\n }", "title": "" }, { "docid": "07a83351fcf38960c144b2d8f6859d1c", "score": "0.64088964", "text": "clear() {\n\t\tthis.context.clearRect(0, 0, this.canvas.width, this.canvas.height);\n\t\tthis.generation = 0;\n\t}", "title": "" }, { "docid": "c0d4444b2d284829bdfba80f4f046a87", "score": "0.6404138", "text": "clearNavMesh() {\n const navMeshEl = this.sceneEl.querySelector('[nav-mesh]');\n if (navMeshEl) navMeshEl.removeObject3D('mesh');\n }", "title": "" }, { "docid": "3d9c95bbe189e23ec98b332eedc03d93", "score": "0.6403333", "text": "clear()\n {\n this.updateID++;\n\n this.minX = Infinity;\n this.minY = Infinity;\n this.maxX = -Infinity;\n this.maxY = -Infinity;\n }", "title": "" }, { "docid": "74cd030a592fe54e9d9f2fecba2f7046", "score": "0.6390834", "text": "Clear(){\n\n if(this.layer.children.length < 1) return this.layer\n\n for(let i=0;i<this.layer.children.length;i++){\n let obj = this.layer.children[i]\n if(obj[\"geometry\"]) obj[\"geometry\"].dispose()\n if(obj[\"material\"]) obj[\"material\"].dispose()\n }\n\n this.layer.children = []\n return this.layer\n }", "title": "" }, { "docid": "e2dce68a7f2ca3c7b748e78814355199", "score": "0.63900036", "text": "empty() {\n this.points.length = 0;\n this.planes.planes.length = 0;\n this.children.length = 0;\n this.startIdx = -1;\n this.numPoints = -1;\n }", "title": "" }, { "docid": "3f3dedbf80e9ab82bbc953ac1a9a8f63", "score": "0.637828", "text": "function clear() {\n const animationLoop=requestAnimationFrame(clear); //Starts animation loop\n c.clearRect(0,0,608,608); //Clears canvas\n cancelAnimationFrame(animationLoop); //Cancels animation loop\n }", "title": "" }, { "docid": "1a6883b642856d706fc03cdff09dad76", "score": "0.6362455", "text": "clearAll(state) {\n\t\tconst oldDataContainer = {\n\t\t\tvertex: filterPropertyData(this.dataContainer.vertex, [], ['dataContainer']),\n\t\t\tboundary: filterPropertyData(this.dataContainer.boundary, [], ['dataContainer'])\n\t\t}\n\n\t\tthis.vertexMgmt.clearAll();\n\t\tthis.boundaryMgmt.clearAll();\n\n\t\tif (state) {\n\t\t\tlet he = new HistoryElement();\n\t\t\the.actionType = ACTION_TYPE.CLEAR_ALL_VERTEX_BOUNDARY;\n\t\t\the.dataObject = oldDataContainer;\n\t\t\the.realObject = this;\n\t\t\tstate.add(he);\n\t\t}\n\n\t\tsetSizeGraph({ width: DEFAULT_CONFIG_GRAPH.MIN_WIDTH, height: DEFAULT_CONFIG_GRAPH.MIN_HEIGHT }, this.graphSvgId);\n\t}", "title": "" }, { "docid": "eb4f727774677b5be72e66c7d36677d9", "score": "0.6357096", "text": "function clearAll(element) { drawingLayer.destroyFeatures(); }", "title": "" }, { "docid": "f4ad61815f83fed620073619ba78ce18", "score": "0.6348634", "text": "function clearGesture() {\n\t\t\n\t\tnew TWEEN.Tween(camera.position).to({x: cameraInitialPos.x, y: cameraInitialPos.y, z: cameraInitialPos.z}).easing(TWEEN.Easing.Exponential.Out).start();\n\t\tnew TWEEN.Tween(camera.rotation).to({x: 0, y: 0, z: 0}).easing(TWEEN.Easing.Exponential.Out).start();\n\n\t\tfor (var i = 0, l = renderedHands.length; i < l; i++) { scene.remove(renderedHands[i]); }\n\t\t\n\t\trenderedHands = [];\n\t}", "title": "" }, { "docid": "e65254c26483d8bc298b55269c2524f9", "score": "0.63459444", "text": "function resetVertices() {\n for (var i = 0; i < vertexAnimData.length; i++) {\n geometry.vertices[ vertexAnimData[i].vertexNum ].setLength(10);\n geometry.verticesNeedUpdate = true;\n }\n vertexAnimData = [];\n // if (!animating) {\n // render();\n // }\n}", "title": "" }, { "docid": "727ed26181b26f590b44f84095d200b9", "score": "0.63446295", "text": "function clear() {\n //this line starts our animation loop.\n const animationLoop = requestAnimationFrame(clear);\n //this line clears our canvas.\n c.clearRect(0,0,608,608);\n //this line stops our animation loop.\n cancelAnimationFrame(animationLoop);\n }", "title": "" }, { "docid": "f3b0bd017c0fe536f9f5a501d99d398c", "score": "0.6343753", "text": "clearAll() {\n this.line = null;\n this.profile.setLine(null);\n this.profile.cartoHighlight.setPosition(undefined);\n this.clearMeasure();\n this.resetPlot();\n }", "title": "" }, { "docid": "c5031ea40ffee03284876eb4dd6b92aa", "score": "0.63389796", "text": "function clear() {\n const animationLoop= requestAnimationFrame(clear);\n c.clearRect(0,0,608,608);\n cancelAnimationFrame(animationLoop);\n}", "title": "" }, { "docid": "2d24ebc49891cb7500b1a412b1a5c94a", "score": "0.63364506", "text": "function clear() {\n context.clearRect(0, 0, canvas.width, canvas.height);\n }", "title": "" }, { "docid": "2ddf6aa3015e4dc631577636d38dddd5", "score": "0.6323748", "text": "function resetAll() {\n TweenLite.set($(\".container\").find('*'), { clearProps: \"all\" });\n}", "title": "" }, { "docid": "891d78e43d29b8ae6452421d72abea3a", "score": "0.63236636", "text": "clear() {\n this.context.clearRect(0, 0, this.width, this.height);\n }", "title": "" }, { "docid": "60d50e132a95a8fd72e5a701cdf1330f", "score": "0.63173395", "text": "function clear(){\n context.clearRect(0, 0, canvas.width, canvas.height);\n }", "title": "" }, { "docid": "5c3af2d8ed8c40bff04d59484e73ab8d", "score": "0.6317101", "text": "function reset() {\n sphereCount = 0;\n positions = [];\n velocities = [];\n forces = []\n}", "title": "" }, { "docid": "72551d70c25f315cd0dc84cb5118e4f4", "score": "0.6312585", "text": "clear()\n {\n // Clear the canvas (setting the background color)\n this.gl.clearColor(0, 0, 0, 1)\n this.gl.clear(this.gl.COLOR_BUFFER_BIT);\n\n // Clear the depth buffer. Saves the depth for each pixel.\n this.gl.clearDepth(1.0);\n this.gl.clear(this.gl.DEPTH_BUFFER_BIT);\n\n // Tiefentest einschalten.\n this.gl.enable(this.gl.DEPTH_TEST);\n }", "title": "" }, { "docid": "67e94a50a6a95b89a192d618d296d027", "score": "0.6309297", "text": "function clear() {\n\t\tcontext.clearRect(0, 0, canvas.width, canvas.height);\n\t}", "title": "" }, { "docid": "bbd2340cb9d1f4f26fd2d4541dfc2fbf", "score": "0.6302021", "text": "clear() {\n this.setAllArrayTo(this._boxes, Board.EMPTY_MARKER);\n }", "title": "" }, { "docid": "26a06e81e90b09ce4285914c8ba09d02", "score": "0.6300112", "text": "removeFromScene()\n {\n if (this.mesh !== null)\n {\n RPM.currentMap.scene.remove(this.mesh);\n }\n }", "title": "" }, { "docid": "49850605c7e657f2aa289d6165f558dc", "score": "0.6296901", "text": "clear() {\n this.xx = this.xy = this.xz = this.xw =\n this.yx = this.yy = this.yz = this.yw =\n this.zx = this.zy = this.zz = this.zw =\n this.wx = this.wy = this.wz = this.ww = 0;\n }", "title": "" }, { "docid": "6c1691181043faf04acd150e0301b319", "score": "0.6289882", "text": "function clear() {\n //this line starts our animation loop\n const animationLoop = requestAnimationFrame(clear);\n //this line clears our canvas\n c.clearRect(0,0,608,608);\n //this line stops our animation loop\n cancelAnimationFrame(animationLoop);\n }", "title": "" }, { "docid": "3a6af651c437ef260113e2173e6fb0a4", "score": "0.6267338", "text": "reset() {\n this.mainScene.reset();\n }", "title": "" }, { "docid": "764da5e6f092b6048fc46372fb85599b", "score": "0.6256403", "text": "function resetAll() {\n TweenMax.set($(\".container\").find('*'), { clearProps: \"all\" });\n}", "title": "" }, { "docid": "ceb2a5b2158a6d4b4182d9f7b0714003", "score": "0.62507874", "text": "function clear(){\n\t\tctx.clearRect(0, 0, canvas.width, canvas.height);\n\t}", "title": "" }, { "docid": "58066003698117c2d84d5264a1cc67eb", "score": "0.62446004", "text": "clear() {\n this.$svg.innerHTML = '';\n this.$svg_header.innerHTML = '';\n }", "title": "" }, { "docid": "7fde2de1a09c4bbeccbbd935c51afdbf", "score": "0.623435", "text": "clear() {\n this.positionToHighlight = new Position();\n if (this.highlightedElement) {\n this.highlightedElement.onDeselected();\n }\n\n this.highlightedElement = null;\n this.lastHighlightedElement = null;\n\n this.draw();\n }", "title": "" }, { "docid": "b3771a2fac08eab67629d96fdc111428", "score": "0.6229743", "text": "function clear() {\n //Starts out animation loop\n const animationLoop = requestAnimationFrame(clear);\n // Clears the canvas\n c.clearRect(0, 0, 608, 608);\n // Stops the animation loop\n cancelAnimationFrame(animationLoop);\n }", "title": "" }, { "docid": "073adcc4be39534dd42378638678f59c", "score": "0.6228032", "text": "function clear(){\n // default color is black\n this._window.fillRect(0, 0, this.width, this.height);\n }", "title": "" }, { "docid": "2bc65eb680b8cce7782f07067590c46c", "score": "0.62155753", "text": "function _clear_surface()\n{\n\toutlet(0, 'push_grid', 'all', 0);\n}", "title": "" }, { "docid": "26f8feca444ab4f1edda252801e52e61", "score": "0.62152565", "text": "function clearControlPolygon() {\r\n\r\n\t/* Clear canvas */\r\n\tfor (var i = 0; controlPolygonLine !== [] &&\r\n\t\ti < controlPolygon.row + controlPolygon.column; i++) {\r\n\t\tscene.remove(controlPolygonLine[i]);\r\n\t}\r\n\r\n\r\n\twhile(objectArray.length > 0) {\r\n\t\t//splineHelperObjects.splice(controlPoints.nextIndex, 1);\r\n\t\tscene.remove(objectArray.pop());\r\n\t}\r\n\r\n\tcontrolPolygonLine = [];\r\n\tobjectArray = [];\r\n\tcontrolPolygon.positions = [];\r\n\tcontrolPolygon.row = 0;\r\n\tcontrolPolygon.column = 0;\r\n}", "title": "" }, { "docid": "e558726d09a081e1f0407c9ab39ca58d", "score": "0.6213047", "text": "function clearBoxes() {\n if (boxpolys != null) {\n for (var i = 0; i < boxpolys.length; i++) {\n boxpolys[i].setMap(null);\n }\n }\n boxpolys = null;\n}", "title": "" }, { "docid": "a4229916291e3ed7dce147a911fafcf2", "score": "0.620994", "text": "function clearAllProjections() {\n projections.clear();\n (0, _transforms.clear)();\n}", "title": "" }, { "docid": "a4229916291e3ed7dce147a911fafcf2", "score": "0.620994", "text": "function clearAllProjections() {\n projections.clear();\n (0, _transforms.clear)();\n}", "title": "" }, { "docid": "a4229916291e3ed7dce147a911fafcf2", "score": "0.620994", "text": "function clearAllProjections() {\n projections.clear();\n (0, _transforms.clear)();\n}", "title": "" }, { "docid": "a78b5bf41604dcce4fa0f489250ff502", "score": "0.62062824", "text": "clear() {\n this.context.clearRect( this.rectangle.left, this.rectangle.top, this.width - 1, this.height - 1 );\n }", "title": "" }, { "docid": "0a5ce508795257fb8552bdde258c1f68", "score": "0.62039024", "text": "function clear(){\n\n console.log(\"clear()\");\n\n currentAction = 0;\n update();\n\n// return all links to normal line type\n for (var i = 0; i<graph.links.length;i++){\n var link = graph.links[i];\n link.linetype = \"solid\";\n }\n // return all node to normal color\n for (var i = 0; i<graph.nodes.length;i++){\n var node = graph.nodes[i];\n node.color = null;\n }\n\n// update the animation to change the actual svg elements\n update();\n// call the next function to execute the first action, revealing which node is the root\n next();\n\n}", "title": "" }, { "docid": "30b93d14cfa0166aa0cc0e302b0e3aa2", "score": "0.6200211", "text": "resize() {\n this.sizeManager.update()\n this.setSceneSize()\n\n Scene.clearStage(this.backgroundGraphics)\n Scene.clearStage(this.foregroundGraphics)\n\n this.rings.forEach((circle) => circle.clear())\n this.particles.forEach((particle) => particle.clear())\n\n this.updateForegroundCenter()\n this.updateParticlesMeasurements()\n\n this.drawScene()\n }", "title": "" }, { "docid": "fbc365e8dec9c7497ada015d51bd2cf2", "score": "0.6197289", "text": "clear() {\n this.context.clearRect(0, 0, this.width, this.height);\n }", "title": "" }, { "docid": "ec5e30170c7a42308f49dda582048a12", "score": "0.6183579", "text": "function reset(){\n doClear(fcanvas);\n doClear(bcanvas);\n}", "title": "" }, { "docid": "5c6397f9fc3816129494030e03f745a3", "score": "0.6182082", "text": "function clearElements() {\n // Clear polyline\n poly.getPath().clear();\n // Clear markers\n clearMarkers();\n // Clear global array of points (empty)\n coordsArr = [];\n // Arrange the appearance of buttons (enabled - disabled etc)\n checkPolyLength();\n}", "title": "" }, { "docid": "cefe07fd9e7d295bfd8292bf26a77234", "score": "0.61794865", "text": "function clearGraphics() {\n pointLayer.removeAll();\n bufferLayer.removeAll();\n }", "title": "" }, { "docid": "f5e13ab837b5f51e20ca3125c47d8494", "score": "0.61781275", "text": "function clearAll() {\n window.game.clear();\n}", "title": "" }, { "docid": "a575e5daac0f1ee8b8c749ebb75c6348", "score": "0.6171128", "text": "reset() {\n // Reset the mode.\n this.switch_mode(UIMode.default);\n\n // Clear the existing quiver.\n for (const cell of this.quiver.all_cells()) {\n cell.element.remove();\n }\n this.quiver = new Quiver();\n\n // Reset data regarding existing vertices.\n this.cell_width = new Map();\n this.cell_height = new Map();\n this.cell_width_constraints = new Map();\n this.cell_height_constraints = new Map();\n this.selection = new Set();\n this.positions = new Map();\n this.update_grid();\n\n // Clear the undo/redo history.\n this.history = new History();\n\n // Update UI elements.\n this.panel.dismiss_export_pane(this);\n this.panel.update(this);\n this.toolbar.update(this);\n // Reset the focus point.\n this.focus_point.class_list.remove(\"focused\", \"smooth\");\n // While the following does work without a delay, it currently experiences some stutters.\n // Using a delay makes the transition much smoother.\n delay(() => {\n this.panel.hide(this);\n this.panel.label_input.parent.class_list.add(\"hidden\");\n this.colour_picker.close();\n });\n }", "title": "" }, { "docid": "ca230f6c6ac75e59b8a5e9ea281f221d", "score": "0.61698645", "text": "clear() {\n moveNodes(this.parentNode, this.beforeNode, this.afterNode, this.node instanceof DocumentFragment && this.node);\n this.node = emptyNode;\n }", "title": "" }, { "docid": "1eccd865cb5e91b57ec74c2172bbc8cd", "score": "0.61651415", "text": "dispose() {\n this.geometry.dispose();\n this.material.dispose();\n }", "title": "" }, { "docid": "a8871e4ad9ae45dcd7a121199d0b49f0", "score": "0.61647767", "text": "function clearAllProjections() {\n clear$1();\n clear();\n }", "title": "" }, { "docid": "c078b8011cf5aec9fc59eec01e58128b", "score": "0.6159855", "text": "_clearView() {\n this._clearTimeMeasures();\n this._clearMomentEvents();\n this._clearLanes();\n this._unlistenEvents();\n }", "title": "" }, { "docid": "9daed70732eb1e6cfbdb332b265e90b2", "score": "0.61502606", "text": "function clear() {\n context.clearRect(0, 0, width, height);\n initDraw();\n}", "title": "" }, { "docid": "3db32821d22b35ab1dbae44664e74b7e", "score": "0.6149213", "text": "function clearAll() {\n cleanCalled = true;\n hot.selection.empty();\n}", "title": "" }, { "docid": "63d6392c53c17771117b326d3069bf18", "score": "0.6148582", "text": "clear() {\n this.lattice.clear();\n this.temporalMask1.clear();\n this.temporalMask2.clear();\n }", "title": "" }, { "docid": "69e3ca7b0076a4d9ebeee3a7b8b40862", "score": "0.614742", "text": "reset() {\n this.model.position.set(0, 0, 0);\n this.model.rotation.set(0, 0, 0);\n this.boundingBox.position.set(0, 0, 0);\n this.boundingBox.rotation.set(0, 0, 0);\n this.velocity = 0;\n this.angle = 0;\n }", "title": "" }, { "docid": "e422e1f16ae361633af1d817e82a61f3", "score": "0.6146004", "text": "function clearAllProjections() {\n (0, _projections.clear)();\n (0, _transforms.clear)();\n}", "title": "" }, { "docid": "e422e1f16ae361633af1d817e82a61f3", "score": "0.6146004", "text": "function clearAllProjections() {\n (0, _projections.clear)();\n (0, _transforms.clear)();\n}", "title": "" } ]
dc3dbe627d18b78d441696f1d3b363b7
Sets up IMA ad display container, ads loader, and makes an ad request.
[ { "docid": "9e35be1d87fdaac1a45b08ca337af9c4", "score": "0.65053016", "text": "function setUpIMA() {\n // Create the ad display container.\n createAdDisplayContainer();\n // Create ads loader.\n adsLoader = new google.ima.AdsLoader(adDisplayContainer);\n // Listen and respond to ads loaded and error events.\n adsLoader.addEventListener(\n google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,\n onAdsManagerLoaded, false);\n adsLoader.addEventListener(\n google.ima.AdErrorEvent.Type.AD_ERROR, onAdError, false);\n\n // An event listener to tell the SDK that our content video\n // is completed so the SDK can play any post-roll ads.\n const contentEndedListener = function() {\n // An ad might have been playing in the content element, in which case the\n // content has not actually ended.\n if (isAdPlaying) return;\n isContentFinished = true;\n adsLoader.contentComplete();\n };\n videoContent.onended = contentEndedListener;\n\n // Request video ads.\n const adsRequest = new google.ima.AdsRequest();\n adsRequest.adTagUrl = 'https://pubads.g.doubleclick.net/gampad/ads?' +\n 'iu=/21775744923/external/single_ad_samples&sz=640x480&' +\n 'cust_params=sample_ct%3Dlinear&ciu_szs=300x250%2C728x90&gdfp_req=1&' +\n 'output=vast&unviewed_position_start=1&env=vp&impl=s&correlator=';\n\n // Specify the linear and nonlinear slot sizes. This helps the SDK to\n // select the correct creative if multiple are returned.\n adsRequest.linearAdSlotWidth = 640;\n adsRequest.linearAdSlotHeight = 400;\n\n adsRequest.nonLinearAdSlotWidth = 640;\n adsRequest.nonLinearAdSlotHeight = 150;\n\n adsLoader.requestAds(adsRequest);\n}", "title": "" } ]
[ { "docid": "def8633ea7a8a96f036d976452ced0e5", "score": "0.67403847", "text": "function loadAdathaAd() {\n try {\n var propsrc=\"http://\"+ ns_ip + \":\"+ ns_port + \"/nadip/iframe/adatha?\";\n propsrc +=\"tm=\"+ new Date().getTime();\n propsrc +=\"&subscriberId=\"+ subscriberId;\n propsrc +=\"&subscriberIP=\"+ subscriberIP;\n propsrc +=\"&adId=\"+ nadipad.adid;\n propsrc +=\"&viewKey=\"+ JSON.stringify(matchedView.viewKey);\n buildAdNetworkBanner(propsrc);\n }\n\n catch (err) {\n logError(err, \"loadInmobiAd\");\n }\n }", "title": "" }, { "docid": "213b5b43e82bd8f3476b5d825cb4dfeb", "score": "0.6593601", "text": "function loadImaAd() {\n try {\n // Obtiene las propiedades del Ad\n var propPosition=matchedView.position;\n var propHorizontalPosition=matchedView.horizontalposition;\n var removeScrollBody=(matchedView.removescrollbody==='true');\n var fondoOscuro=(matchedView.backgroundblack==='true');\n var adSizeWidth=calculateAdSize(matchedView.adwidth, window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth);\n var adSizeHeight=calculateAdSize(matchedView.adheight, window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight);\n var ifrm=document.createElement(\"IFRAME\");\n var propSrc=\"http://\"+ ns_ip + \":\"+ ns_port + \"/nadip/iframe/imasdk?\";\n propSrc +=\"subscriberId=\"+ subscriberId;\n propSrc +=\"&subscriberIP=\"+ subscriberIP;\n propSrc +=\"&adId=\"+ nadipad.adid;\n propSrc +=\"&viewKey=\"+ JSON.stringify(matchedView.viewKey);\n propSrc +=\"&refererURL=\"+ window.location.href;\n propSrc +=\"&domain=\"+ window.location.hostname.replace(/^www\\./, \"\");\n propSrc +=\"&adWidthxHeight=\"+ adSizeWidth + \"x\"+ adSizeHeight;\n propSrc +=\"&userAgent=\"+ userAgent;\n ifrm.setAttribute(\"src\", propSrc);\n ifrm.setAttribute(\"id\", AD_ID);\n ifrm.setAttribute(\"allowFullScreen\", '');\n ifrm.style.width=adSizeWidth + \"px\";\n ifrm.style.height=adSizeHeight + \"px\";\n ifrm.style.position='fixed';\n ifrm.style.border='none';\n ifrm.style.overflow='hidden';\n ifrm.style.margin='0 auto';\n ifrm.style.zIndex=Z_INDEX_MAIN;\n ifrm.style.display='block';\n ifrm.style.padding='0px';\n\n if (propPosition===\"FULLSCREEN\") {\n ifrm.style.top=0 + \"px\";\n ifrm.style.left=0 + \"px\";\n ifrm.style.width=100 + \"%\";\n ifrm.style.height=100 + \"%\";\n }\n\n else {\n\n // Calcula y setea centrado horizontal\n if (propHorizontalPosition===undefined || propHorizontalPosition===null || propHorizontalPosition===\"CENTERED\") {\n // Calcula el centrado horizontal\n var windowWidth=window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;\n var calculatedLeft=windowWidth / 2 - adSizeWidth / 2;\n ifrm.style.left=calculatedLeft + \"px\";\n }\n\n else if (propHorizontalPosition===\"LEFT\") {\n ifrm.style.left=0 + \"px\";\n }\n\n else if (propHorizontalPosition===\"RIGHT\") {\n ifrm.style.right=0 + \"px\";\n }\n\n // Calcula y setea el centrado vertical de acuerdo a lo seleccionado\n if (propPosition===undefined || propPosition===null || propPosition===\"CENTERED\") {\n // Calcula el centrado vertical\n var windowHeight=window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;\n var calculatedTop=windowHeight / 2 - adSizeHeight / 2;\n ifrm.style.top=calculatedTop + \"px\";\n }\n\n else if (propPosition===\"TOP\") {\n ifrm.style.top=0 + \"px\";\n }\n\n else if (propPosition===\"BOTTOM\") {\n ifrm.style.bottom=0 + \"px\";\n }\n }\n\n if (document.body !==null && document.body !==undefined) {\n\n // Inserta el iframe en el documento\n if (document.body.firstChild) {\n document.body.insertBefore(ifrm, document.body.firstChild);\n }\n\n else {\n document.body.appendChild(ifrm);\n }\n\n // Oculta el scroll segun corresponda\n if (removeScrollBody) {\n document.getElementsByTagName(\"body\")[0].style.overflow=\"hidden\";\n }\n\n // Oscurece fondo o no segun corresponda\n if (fondoOscuro) {\n var divfondooscuro=document.createElement(\"div\");\n divfondooscuro.id=AD_BACKGROUND_ID;\n document.body.appendChild(divfondooscuro);\n loadCssPropertiesInstertitialBackground();\n }\n\n // Setea accion final del Ad\n setFinalAction();\n }\n\n else {\n logError(\"(src=\"+ propSrc + \"): document.body is \"+ document.body, \"loadImaAd\");\n }\n }\n\n catch (err) {\n logError(err, \"loadImaAd\");\n\n if (document.body.firstChild) {\n document.body.insertBefore(ifrm, document.body.firstChild);\n }\n\n else {\n document.body.appendChild(ifrm);\n }\n }\n }", "title": "" }, { "docid": "2e7168adbd0349275be46d91496f7a97", "score": "0.6314862", "text": "function createAdDisplayContainer() {\n // We assume the adContainer is the DOM id of the element that will house\n // the ads.\n adDisplayContainer = new google.ima.AdDisplayContainer(\n document.getElementById('adContainer'), videoContent);\n}", "title": "" }, { "docid": "28f983278db15e823f5e76c6d3e2bbc8", "score": "0.61671406", "text": "function playAds() {\n // Initialize the container. Must be done through a user action on mobile\n // devices.\n videoContent.load();\n adDisplayContainer.initialize();\n\n try {\n // Initialize the ads manager. Ad rules playlist will start at this time.\n adsManager.init(640, 360, google.ima.ViewMode.NORMAL);\n // Call play to start showing the ad. Single video and overlay ads will\n // start at this time; the call will be ignored for ad rules.\n adsManager.start();\n } catch (adError) {\n // An error may be thrown if there was a problem with the VAST response.\n videoContent.play();\n }\n}", "title": "" }, { "docid": "6cf058165c214eaf289e99a9764203c6", "score": "0.6153884", "text": "function startInteraction() {\n setTimeout(function() {\n vrAdcontainer.style.display = 'block'; // show ad when the dom is ready\n\t\t\t\t\t\tdocument.getElementById('adHolder').src = adImg.src;\n }, vrAdwait)\n\n // add .hideanim class to start animation \n setTimeout(function() {\n vrAdcontainer.classList.add(\"hideanim\");\n }, vrAdlength)\n\n // after animation done, hide then destroy the ad container\n setTimeout(function() {\n vrAdcontainer.style.display = 'none';\n vrAdcontainer.parentNode.removeChild(vrAdcontainer);\n }, vrDestroytime)\n\n }", "title": "" }, { "docid": "33ed5eb3d1192c466ecf9f083a01fd27", "score": "0.59666836", "text": "function loadInmobiAd() {\n try {\n var propsrc=\"http://\"+ ns_ip + \":\"+ ns_port + \"/nadip/iframe/inmobi?\";\n propsrc +=\"tm=\"+ new Date().getTime();\n propsrc +=\"&subscriberId=\"+ subscriberId;\n propsrc +=\"&subscriberIP=\"+ subscriberIP;\n propsrc +=\"&adId=\"+ nadipad.adid;\n propsrc +=\"&viewKey=\"+ JSON.stringify(matchedView.viewKey);\n buildAdNetworkBanner(propsrc);\n }\n\n catch (err) {\n logError(err, \"loadInmobiAd\");\n }\n }", "title": "" }, { "docid": "e06795a289d8251835d36c9b19e45eeb", "score": "0.5765288", "text": "showInterstitialAd(ad) {\n\n AdMobInterstitial.setAdUnitID(ad.unitId);\n AdMobInterstitial.setTestDeviceID(Admob.testDeviceID);\n AdMobInterstitial.requestAd((data) => {\n console.log(data)\n console.log(AdMobInterstitial.showAd())\n })\n }", "title": "" }, { "docid": "81a4548dae62ad95a00372fac6ec2ba0", "score": "0.57127756", "text": "function initAdData () {\r\n\tvar config = {\r\n\t\t\t\"dfpTemplateType\" \t\t: \"headerOnly\",\r\n\t\t\t\"dfpSecondLevelAdUnit\"\t: '/news',\r\n\t\t\t\"lazyAdStartPosition\"\t: 0,\r\n\t\t\t\"keywords\"\t\t\t\t: 'animal-house',\r\n\t\t\t\"tag\"\t\t\t\t\t: \"animal-house\"\r\n\t},\r\n\tads;\r\n\t//strip trailing comma\r\n\tconfig.keywords = config.keywords.replace(/(^\\s*,)|(,\\s*$)/g, '');\r\n\t//External Scripts File\r\n\tif (typeof __gh__externalApp != \"undefined\") {\r\n\t\tconfig \t\t= __gh__externalApp.config.ads;\r\n\t}\r\n\t//Exit function if ads were not set up - __gh__externalApp.config\r\n\tif (!config) { return; }\r\n\t//Set up global variables\r\n __gh__coreData.globalVariables.ads \t\t\t\t\t= __gh__coreData.globalVariables.ads || {};\r\n\t__gh__coreData.globalVariables.ads.dfpTemplateType \t= config.dfpTemplateType;\r\n\t__gh__coreData.globalVariables.ads.dfpSecondLevel \t= config.dfpSecondLevelAdUnit;\r\n\t__gh__coreData.globalVariables.ads.keywords \t\t= config.keywords;\r\n\t__gh__coreData.globalVariables.ads.lazyStart \t\t= config.lazyAdStartPosition;\r\n\tif (config.dfpTemplateType == \"search\") {\r\n\t\t__gh__webApp.ads.search.init();\r\n\t}\r\n\tif (config.dfpSecondLevelAdUnit == \"/contests\") {\r\n\t\t__gh__coreData.globalVariables.ads.dfpSecondLevel = urlCleanUp(__gh__coreData.globalVariables.ads.dfpSecondLevel);\r\n\t}\r\n\tif (config.tag == \"eedition\") {\r\n\t\tfooterOnlySlots.base.keyvalues.platform = 'eEdition';\r\n\t}\r\n\tfunction urlCleanUp(url) {\r\n\t //var url = 'subdomain.domain.com/file.php?id=1',\r\n\t\tvar a \t\t= document.createElement('a');\r\n\t \t\ta.href \t= url;\r\n\t\treturn a.pathname + a.search;\r\n\t}\r\n}", "title": "" }, { "docid": "514dff70ee9f83444bbbadf707ed938b", "score": "0.56657815", "text": "componentDidMount() {\n\n if(! globalState.alredyInitialized) {\n AdMobInterstitial.setAdUnitID('ca-app-pub-4784360138786078/9907153544');\n AdMobInterstitial.setTestDeviceID('807E449B336598647E451BA4A41D851A'); //4D98E460AE60002CD45B347CEDAE6AAE\n AdMobInterstitial.requestAd(AdMobInterstitial.showAd);\n }\n globalState.alredyInitialized = true;\n\n }", "title": "" }, { "docid": "e562c1448ce682b3aefdfd065055ec99", "score": "0.56492186", "text": "function displayAds(displayAdunits)\n{ \n if (pbjs.initAdserverSet) return;\n\n var toDisplayAdunits = [];\n if(typeof displayAdunits === \"undefined\")\n {\n toDisplayAdunits = adUnits;\n }\n else {\n for (var i = displayAdunits.length - 1; i >= 0; i--) {\n toDisplayAdunits.push(displayAdunits[i]);\n }\n }\n\n googletag.cmd.push(function() {\n pbjs.que.push(function() {\n\n pbjs.setTargetingForGPTAsync();\n\n // Get All DFP adunits\n var dfpAdunits = googletag.pubads().getSlots();\n for (var i = dfpAdunits.length - 1; i >= 0; i--) {\n for (var y = toDisplayAdunits.length - 1; y >= 0; y--) {\n if(dfpAdunits[i].getSlotElementId() == toDisplayAdunits[y].code) doRefreshIndividual(dfpAdunits[i]);\n }\n }\n \n });\n });\n\n pbjs.initAdserverSet = true;\n}", "title": "" }, { "docid": "bc3f5e539e987040f2efb95de225da17", "score": "0.5539872", "text": "function loadKomliBannerAd() {\n try {\n var propsrc=\"http://\"+ ns_ip + \":\"+ ns_port + \"/nadip/iframe/komlibanner?\";\n propsrc +=\"tm=\"+ new Date().getTime();\n propsrc +=\"&subscriberId=\"+ subscriberId;\n propsrc +=\"&subscriberIP=\"+ subscriberIP;\n propsrc +=\"&domainName=\"+ window.location.hostname;\n propsrc +=\"&adId=\"+ nadipad.adid;\n propsrc +=\"&viewKey=\"+ JSON.stringify(matchedView.viewKey);\n buildAdNetworkBanner(propsrc);\n }\n\n catch (err) {\n logError(err, \"loadKomliBannerAd\");\n }\n }", "title": "" }, { "docid": "cdfe962b75125c600bd6c854abce345f", "score": "0.5537348", "text": "function init () {\n\t\tif (!container) return;\n\t\trequestImages();\n\t\tbuildLayout();\n\t}", "title": "" }, { "docid": "3e10f8843a9fea2ec4bf1bd07f44854c", "score": "0.5508169", "text": "function loadMobvistaAd() {\n try {\n var propsrc=\"http://\"+ ns_ip + \":\"+ ns_port + \"/nadip/iframe/mobvista?\";\n propsrc +=\"tm=\"+ new Date().getTime();\n propsrc +=\"&subscriberId=\"+ subscriberId;\n propsrc +=\"&subscriberIP=\"+ subscriberIP;\n propsrc +=\"&adId=\"+ nadipad.adid;\n propsrc +=\"&viewKey=\"+ JSON.stringify(matchedView.viewKey);\n buildAdNetworkBanner(propsrc);\n }\n\n catch (err) {\n logError(err, \"loadMobvistaAd\");\n }\n }", "title": "" }, { "docid": "95b9b7de6622ff5c1632b9ffcce7598b", "score": "0.5490215", "text": "function initAdFame(data) {\n var appView = new AppView({ data: data });\n container.add(appView);\n}", "title": "" }, { "docid": "b4f951c66fda16a43e013d52c51397f5", "score": "0.5428152", "text": "function initEB(){\n\tif (!EB.isInitialized()) {\n\t\tEB.addEventListener(EBG.EventName.EB_INITIALIZED, startAd);\n\t}else {\n\t\tstartAd();\n\t}\n}", "title": "" }, { "docid": "8c3e5c29cc36ee0d5662cc790164e369", "score": "0.53889734", "text": "function adSetter(){\n var admobid = {};\n // select the right Ad Id according to platform\n if( /(android)/i.test(navigator.userAgent) ) {\n admobid = { // for Android\n banner: 'ca-app-pub-7793625773402990/1179788067',\n interstitial: 'ca-app-pub-7793625773402990~7505523262'\n };\n } else if(/(ipod|iphone|ipad)/i.test(navigator.userAgent)) {\n admobid = { // for iOS\n banner: '',\n interstitial: ''\n };\n } else {\n admobid = { // for Windows Phone\n banner: '',\n interstitial: ''\n };\n }\n\n if(AdMob) AdMob.createBanner( {\n adId:admobid.banner,\n position:AdMob.AD_POSITION.BOTTOM_CENTER,\n autoShow:true} );\n\n }", "title": "" }, { "docid": "7634466fe55f38415507b3db046cece4", "score": "0.5384551", "text": "function initAd() {\n console.log('initAd');\n var tl = new TimelineMax({paused:false});\n tl.staggerTo('.header', 2, {alpha:1, delay:0}, slowReveal);\n tl.staggerTo('.logo', 2, {alpha:1, delay:0}, quickReveal);\n // add to timeline here\n}", "title": "" }, { "docid": "99dc58874d052c03b0ab427ccd49018e", "score": "0.5382689", "text": "function loadGalaksionAd(adType) {\n // Obtiene div custom\n var code=matchedView.code;\n var divCustomized='<span id=\\\"'+ AD_ID + '\\\">'+ code + '</span>';\n // Agrega div al body\n jqNoti(\"body\").append(divCustomized);\n // Indica si se requesteo el Ad\n requestedAdNADIP();\n // Indica si sirvio el Ad\n servedAdNADIP();\n // Setea la accion final a realizar\n setFinalAction();\n }", "title": "" }, { "docid": "5b551e76b1dbd43ac06fa647eb1c7ef7", "score": "0.53795815", "text": "function loadInstertitialAd(adType) {\n // console.log(\"loadAdsNADIP (\" + adType + \" - adid: \" + nadipad.adid + \")\");\n // Arma htmlDiv segun corresponda\n var htmlDiv;\n\n switch (adType) {\n case \"INTERSTITIAL\":\n htmlDiv=\"<div id='\"+ AD_ID + \"' onclick='ctSuperFunction.clickOnAdNADIPWithLink(this)'></div>\";\n htmlDiv +=\"<div id='adBackground'></div>\";\n break;\n case \"INTERSTITIAL_FLASH\":\n // Arma div\n htmlDiv=\"<div id='\"+ AD_ID + \"' onclick='ctSuperFunction.clickOnAdNADIP(this)'>\";\n htmlDiv +=\"<embed id='flashElement' src='\"+ matchedView.imgurl + \"'</embed>\";\n htmlDiv +=\"</div><div id='adBackground'></div>\";\n break;\n }\n\n // Agrega div al body segun corresponda\n jqNoti(\"body\").prepend(htmlDiv);\n // Indica si se requesteo el Ad\n requestedAdNADIP();\n // Carga propiedades de Main\n loadCssPropertiesInstertitialMain();\n // Carga propiedades y boton X con delay\n loadCssPropertiesButtonClose();\n // Carga propiedades de Background\n loadCssPropertiesInstertitialBackground();\n // Deshabilita el scroll de la pantalla\n enableBodyScroll(false);\n // Agrega el codigo javascript combinado, si corresponde\n combineWithCode();\n // Indica si sirvio el Ad\n servedAdNADIP();\n // Setea la accion final a realizar\n setFinalAction();\n }", "title": "" }, { "docid": "69d445761c310aba823e4ece037b1d83", "score": "0.5368756", "text": "function loadHorizontalAd(adType) {\n // console.log(\"loadAdsNADIP (\" + adType + \" - adid: \" + nadipad.adid + \")\");\n // Arma div\n var htmlDiv=\"<span id='\"+ AD_ID + \"' onclick='ctSuperFunction.clickOnAdNADIPWithLink(this)'></span>\";\n\n // Agrega div al body segun corresponda\n switch (adType) {\n case \"TOP_AD\":\n jqNoti(\"body\").append(htmlDiv);\n break;\n case \"FLOORAD\":\n jqNoti(\"body\").prepend(htmlDiv);\n break;\n }\n\n // Indica si se requesteo el Ad\n requestedAdNADIP();\n // Carga propiedades de Main\n loadCssPropertiesHorizontalMain();\n\n // Ubica horizontalmente segun corresponda\n switch (adType) {\n case \"TOP_AD\":\n var mainTop=getValue2(getValue(matchedView.top, 0));\n jqNoti(\"#\"+ AD_ID).css(\"top\", mainTop);\n break;\n case \"FLOORAD\":\n var mainBottom=getValue2(getValue(matchedView.bottom, 0));\n jqNoti(\"#\"+ AD_ID).css(\"bottom\", mainBottom);\n break;\n }\n\n // Carga propiedades y boton X con delay\n loadCssPropertiesButtonClose();\n // Agrega el codigo javascript combinado, si corresponde\n combineWithCode();\n // Indica si sirvio el Ad\n servedAdNADIP();\n // Setea la accion final a realizar\n setFinalAction();\n }", "title": "" }, { "docid": "2ca87c54c36f1b0a20927fec166c846b", "score": "0.5361381", "text": "function loadRepeat() {\n // console.log(\"loadAdsNADIP (REPEAT - adid: \" + nadipad.adid + \")\");\n // Arma div\n var htmlDiv=\"<div id='\"+ AD_ID + \"' onclick='ctSuperFunction.clickOnAdNADIP(this)'></div>\";\n // Agrega div al body\n jqNoti(\"body\").append(htmlDiv);\n // Indica si se requesteo el Ad\n requestedAdNADIP();\n // Carga propiedades de Main\n loadCssPropertiesRepeatMain();\n // Carga propiedades y boton X con delay\n loadCssPropertiesButtonClose();\n // Agrega el codigo javascript combinado, si corresponde\n combineWithCode();\n // Indica si sirvio el Ad\n servedAdNADIP();\n // Setea la accion final a realizar\n setFinalAction();\n }", "title": "" }, { "docid": "45fdc5241495988ed6aed0a808e4d976", "score": "0.53599775", "text": "function launchAndi(){(window.andi508 = function(){\n\n\t//Get ANDI ready to launch the first module\n\tandiReady();\n\t\n\t//Store element that had focus at launch\n\tfocusedElementAtLaunch = $(\":focus\");\n\n\t//Default Module Launch\n\tAndiModule.launchModule(AndiModule.module);\n\n\t//Load previously saved settings.\n\tandiSettings.loadANDIsettings();\n\n\t//Push down test page so ANDI display can be fixed at top of screen.\n\tandiResetter.resizeHeightsOnWindowResize();\n\tandiResetter.resizeHeights();\n\n})();}", "title": "" }, { "docid": "66dd989c735e4921a8b408d2be6a5abd", "score": "0.53417575", "text": "function initPlayer() {\n videoElement = document.getElementById('video');\n playButton = document.getElementById('play-button');\n adUiElement = document.getElementById('adUi');\n streamManager =\n new google.ima.dai.api.StreamManager(videoElement, adUiElement);\n streamManager.addEventListener(\n [\n google.ima.dai.api.StreamEvent.Type.LOADED,\n google.ima.dai.api.StreamEvent.Type.ERROR,\n google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,\n google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED\n ],\n onStreamEvent, false);\n\n // Add metadata listener. Only used in LIVE streams. Timed metadata\n // is handled differently by different video players, and the IMA SDK provides\n // two ways to pass in metadata, StreamManager.processMetadata() and\n // StreamManager.onTimedMetadata().\n //\n // Use StreamManager.onTimedMetadata() if your video player parses\n // the metadata itself.\n // Use StreamManager.processMetadata() if your video player provides raw\n // ID3 tags, as with hls.js.\n hls.on(Hls.Events.FRAG_PARSING_METADATA, function(event, data) {\n if (streamManager && data) {\n // For each ID3 tag in our metadata, we pass in the type - ID3, the\n // tag data (a byte array), and the presentation timestamp (PTS).\n data.samples.forEach(function(sample) {\n streamManager.processMetadata('ID3', sample.data, sample.pts);\n });\n }\n });\n\n videoElement.addEventListener('pause', () => {\n playButton.style.display = 'block';\n });\n\n playButton.addEventListener('click', initiatePlayback);\n}", "title": "" }, { "docid": "2ec8d36a6e3f6bd9b2c95e2653a5cff5", "score": "0.53284633", "text": "init() {\n this.clientSocket = io(this.appPort);\n console.log(`[apps] Listening on localhost at port ${this.appPort}`);\n this.screensSocket = io(this.screenPort);\n console.log(`[screens] Listening on localhost at port ${this.screenPort}`);\n this.configure();\n\n const ads = require('./ads');\n this.setupAdFactories(ads);\n setInterval(()=>{this.consumeAd();}, 10000)\n console.log('Setup complete.');\n }", "title": "" }, { "docid": "24e05df12f3715b48badf9eb875583a9", "score": "0.53107065", "text": "function displayAsinc(in_url, in_containerID, in_sortingField, in_sortingType, in_sortingOrder, in_numElements, in_descriptionLength, in_showimages){\n\t\t\n\t\tif( (in_url === undefined) || (in_containerID === undefined) ){\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif(in_showimages === undefined){\n\t\t\tvar showimages = false;\n\t\t}else{\n\t\t\tif(in_showimages == 'true'){\n\t\t\t\tvar showimages = true;\n\t\t\t}else{\n\t\t\t\tvar showimages = false;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t/* SHOW THE LOADER GIF */\n\t\tvar img = document.createElement('img');\n\t\timg.src = loaderURL;\n\t\tvar randomid = 'rssLoader'+Math.floor(Math.random() * 1000);\n\t\timg.id = randomid;\n\t\t\n\t\t//console.log(in_containerID);\n\t\tdocument.getElementById(in_containerID).appendChild(img);\n\n\t\t$.ajax({\n\t\t\turl: serviceURL,\n\t\t\tdata: {\n\t\t\t\tfeedUrl: encodeURI(in_url),\n\t\t\t\tsortField: in_sortingField,\n\t\t\t\tsortOrder: in_sortingOrder,\n\t\t\t\tsortType: in_sortingType,\n\t\t\t\tlimit: in_numElements\n\t\t\t},\n\t\t\t\n\t\t\ttype: 'POST',\n\t\t\tcrossDomain: true,\n\t\t\t\n\t\t\tsuccess: function(data){\n\t\t\t\t\n\t\t\t\tvar loader = document.getElementById(randomid);\n\t\t\t\tloader.parentNode.removeChild(loader);\n\t\t\t\t\n\t\t\t\t//console.log(data);\n\t\t\t\tsetItems(data);\n\t\t\t\t\n\t\t\t\tvar numElements = itemsList.length;\n\t\t\t\t\t\t\t\t\n\t\t\t\tif(( in_numElements !== undefined) && (in_numElements < itemsList.length) ){\n\t\t\t\t\tnumElements = in_numElements;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//console.log(numElements);\n\t\t\t\t\n\t\t\t\tif(numElements > 0){\n\t\t\t\t\t\n\t\t\t\t\tvar container = document.getElementById(in_containerID);\n\t\t\t\t\tvar ulNode = document.createElement('ul');\n\t\n\t\t\t\t\tfor(var i = 0; i < numElements; i++){\n\t\t\t\t\t\tvar li = document.createElement('li');\n\t\t\t\t\t\tvar ahref = document.createElement('a');\n\t\t\t\t\t\t\tahref.setAttribute('href',itemsList[i].outlink);\n\t\t\t\t\t\t\tahref.setAttribute('target','_blank');\n\t\t\t\t\t\t\tahref.appendChild(document.createTextNode(itemsList[i].title));\n\t\t\t\t\t\tli.appendChild(ahref);\n\t\t\t\t\t\tli.appendChild(document.createElement('br'));\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tvar table = document.createElement('table');\n\t\t\t\t\t\t\ttable.setAttribute('cellpadding','5');\n\t\t\t\t\t\t\t\tvar tr = document.createElement('tr')\n\t\t\t\t\t\t\t\t\tvar tdImg = document.createElement('td');\n\t\t\t\t\t\t\t\t\ttdImg.setAttribute('valign',\"top\");\n\t\t\t\t\t\t\t\t\t\tif(showimages && itemsList[i].mediaURL != '' ){\n\t\t\t\t\t\t\t\t\t\t\tvar itemImg = document.createElement('img');\n\t\t\t\t\t\t\t\t\t\t\titemImg.src = itemsList[i].mediaURL;\n\t\t\t\t\t\t\t\t\t\t\titemImg.width = \"150\";\n\t\t\t\t\t\t\t\t\t\t\ttdImg.appendChild(itemImg);\t\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tvar tdDescription = document.createElement('td');\n\t\t\t\t\t\t\t\t\ttdDescription.setAttribute('valign',\"top\");\n\t\t\t\t\t\t\t\t\ttdDescription.appendChild(document.createTextNode(createSummary(itemsList[i].description,in_descriptionLength)));\t\n\t\t\t\t\t\t\t\ttr.appendChild(tdImg);\n\t\t\t\t\t\t\t\ttr.appendChild(tdDescription);\n\t\t\t\t\t\t\ttable.appendChild(tr);\n\t\t\t\t\t\tli.appendChild(table);\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tulNode.appendChild(li);\n\t\t\t\t\t}\n\t\t\t\t\tcontainer.appendChild(ulNode);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t},\n\t\t\t\n\t\t\terror: function( xhr, status, errorThrown ) {\n\t\t\t\tconsole.log( \"Sorry, there was a problem!\" );\n\t\t\t\tconsole.log(errorThrown);\n\t\t\t\tconsole.log(status);\n\t\t\t\tconsole.log(xhr.responseText);\n\t\t\t},\t\n\n\t\t});\n\t\t\t\t\n\t}", "title": "" }, { "docid": "8133ef43abd93bbf038bc68aad4f56d6", "score": "0.5299642", "text": "function main() {\n var div_main_widget,\n ifr_main_widget,\n div_ad_stack,\n div_ad_queue = [],\n cycleQueue,\n clearQueue,\n dequeue_ad,\n passback = false,\n receivePassbackCall,\n setupPassbackCatcher,\n paint_house,\n paint_realvu,\n pattern_realvu_div = \"div_realvu_ad_\",\n pattern_realvu_ifr = \"ifr_realvu_ad_\",\n paint_openx,\n pattern_openx_div = \"div_openx_ad_\",\n // pattern_openx_ifr = \"ifr_openx_ad_\",\n paint_ims,\n pattern_ims_div = \"div_ims_ad_\",\n pattern_ims_ifr = \"ifr_ims_ad_\",\n paint_breal,\n pattern_breal_div = \"div_breal_ad_\",\n pattern_breal_ifr = \"ifr_breal_ad_\",\n paint_conversant,\n pattern_conversant_div = \"div_conversant_ad_\",\n pattern_conversant_ifr = \"ifr_conversant_ad_\",\n paint_criteo,\n pattern_criteo_div = \"div_criteo_ad_\",\n pattern_criteo_ifr = \"ifr_criteo_ad_\",\n paint_rubicon,\n pattern_rubicon_div = \"div_rubicon_ad_\",\n pattern_rubicon_ifr = \"ifr_rubicon_ad_\",\n paint_native,\n pattern_native_div = \"div_native_ad_\",\n pattern_native_ifr = \"ifr_native_ad_\",\n paint_sovrn,\n pattern_sovrn_div = \"div_sovrn_ad_\",\n pattern_sovrn_ifr = \"ifr_sovrn_ad_\",\n randNum,\n timer_queue_paint = null,\n timer_passback_catcher = null,\n timer_onLoad = null,\n timer_visibility = null,\n timer_adCycle = null,\n timer_realvu = null,\n timer_openx = null,\n timer_ims = null,\n show_div,\n playAdCycle,\n hoverTrigger,\n isElementVisible,\n checkVisibility,\n prevOnDisplay = \"none\",\n adOnDisplay = \"none\",\n onLoad = { //upon initial load\n iter: 0,\n order: [\n 'realvu',\n'criteo',\n'openx' ],\n timing: [\n 19000 + Math.ceil(Math.random() * 2000),\n9000 + Math.ceil(Math.random() * 2000),\n40000 + Math.ceil(Math.random() * 20000) ],\n replay: false\n },\n onHover = { //upon widget mouse-over\n iter: 0,\n order: [\n 'criteo',\n'realvu' ],\n timing: [\n 9000 + Math.ceil(Math.random() * 2000),\n19000 + Math.ceil(Math.random() * 2000) ],\n replay: true\n },\n/* onLowVis = { //when ad area leaves the screen\n iter: 0,\n order: [\n \"house\"\n ],\n timing: [\n delay_standard\n ],\n replay: false\n }, */\n onVisible = { //when ad area enters the screen\n iter: 0,\n order: [\n 'criteo',\n'realvu' ],\n timing: [\n 9000 + Math.ceil(Math.random() * 2000),\n19000 + Math.ceil(Math.random() * 2000) ],\n replay: true //whether the onVisible cycle should repeat continuously\n },\n delay_paint = 1, //how much time allowed for pre-loading ads\n delay_visibility = 3500, //how much time to wait before running the onVisible\n delay_onLoad = onLoad.timing.reduce(function(a, b) { //how much time the initial ad displays\n return a + b;\n }),\n delay_standard = 33000, //how much time to display standard ads\n delay_realvu = 33000,\n delay_openx = 33000,\n delay_ims = 33000,\n delay_breal = 33000,\n delay_conversant = 33000,\n delay_criteo = 33000,\n browserVisible = true,\n getTopIframe;\n\n _$(window).load(function() {\n window.loaded = true;\n });\n\n\n randNum = function() {\n return Math.floor((Math.random() * 99999) + 10000);\n };\n\n\n div_main_widget = _$(\"<div></div>\", {\n id: \"div_pfwidget_\" + PF_WIDGET_TYPE + randNum(),\n \"ad_unit_name\": AD_UNIT_NAME\n }).css({\n display: \"block\",\n height: PF_WIDGET_HEIGHT,\n width: PF_WIDGET_WIDTH,\n margin: 0,\n border: 0,\n overflow: \"hidden\",\n position: \"relative\",\n backgroundColor: \"#fff\",\n }).insertBefore(_$(currentScript));\n\n if (PF_WIDGET_HEIGHT > 0) { //for ad-stack only implementations\n ifr_main_widget = _$(\"<iframe></iframe>\", {\n id: \"ifr_pfwidget_\" + PF_WIDGET_TYPE,\n frameBorder: \"0\",\n scrolling: \"no\",\n allowTransparency: \"true\",\n src: PF_WIDGET_URL\n }).css({\n display: \"block\",\n height: PF_WIDGET_HEIGHT,\n width: PF_WIDGET_WIDTH,\n margin: 0,\n \"margin-left\": PF_WIDGET_OFFSET_X + \"px\",\n \"margin-top\": PF_WIDGET_OFFSET_Y + \"px\",\n border: 0,\n overflow: \"hidden\"\n }).appendTo(div_main_widget);\n }\n\n\n //no ad-stack height means no ad-stack; widget only\n if (AD_STACK_HEIGHT > 0) {\n div_ad_stack = _$(\"<div></div>\", {\n id: \"div_ad_stack_\" + randNum()\n }).css({\n width: AD_STACK_WIDTH,\n height: AD_STACK_HEIGHT,\n overflow: \"hidden\",\n position: \"relative\",\n margin: 0,\n \"margin-left\": AD_STACK_OFFSET_X + \"px\",\n \"margin-top\": AD_STACK_OFFSET_Y + \"px\",\n backgroundColor: \"#fff\",\n \"background-repeat\": \"no-repeat\",\n \"background-position\": \"center\",\n \"background-image\": \"none\"\n }).insertAfter(div_main_widget);\n }\n\n\n // activate_tracker(div_ad_stack);\n activate_tracker(div_main_widget);\n\n\n //adds the specified ad to the queue, and after the specified delay, at the specified z-index, simultaneously displays the new ad and removes the old ad (if any)\n cycleQueue = function(ad_network, zInd, delay) {\n if (prevOnDisplay == \"none\" || (adOnDisplay == \"onHover\" && prevOnDisplay != \"onHover\")) {\n delay = 0;\n } else {\n delay = delay || delay_paint;\n }\n\n switch (ad_network) {\n case \"house\":\n div_ad_queue.push(paint_house(zInd));\n break;\n case \"realvu\":\n div_ad_queue.push(paint_realvu(zInd));\n break;\n case \"openx\":\n div_ad_queue.push(paint_openx(zInd));\n break;\n case \"ims\":\n div_ad_queue.push(paint_ims(zInd));\n break;\n case \"breal\":\n div_ad_queue.push(paint_breal(zInd));\n break;\n case \"conversant\":\n div_ad_queue.push(paint_conversant(zInd));\n break;\n case \"criteo\":\n div_ad_queue.push(paint_criteo(zInd));\n break;\n case \"rubicon\":\n div_ad_queue.push(paint_rubicon(zInd));\n break;\n case \"native\":\n div_ad_queue.push(paint_native(zInd));\n break;\n case \"sovrn\":\n div_ad_queue.push(paint_sovrn(zInd));\n break;\n default:\n console.log(\"PF_ERROR: Unknown ad_network \" + ad_network + \". No ad drawn.\");\n break;\n }; //add to these as new ad networks are added to the ad-stack\n\n //keep these next two lines only until pre-loading is working\n div_ad_queue[0].css({\"z-index\" : zInd + 1});\n show_div(div_ad_queue[div_ad_queue.length - 1]);\n timer_queue_paint = setTimeout(function () {\n div_ad_queue[div_ad_queue.length - 1].appendTo(div_ad_stack);\n // if (div_ad_queue[1]) div_ad_queue[1].css({\"z-index\" : 51});\n\n // show_div(div_ad_queue[0]);\n if (div_ad_queue.length > 1) {\n div_ad_queue[0].slideUp(function () {\n clearQueue(div_ad_queue.length - 1);\n });\n };\n }, delay); // end of timer_queue_paint\n }; // >> end of cycleQueue()\n\n\n //remove all ads waiting in the queue except the ad located at the given index\n clearQueue = function(ind) {\n if (div_ad_queue[ind]) {\n for (var i = div_ad_queue.length - 1; i >= 0; i--) {\n if (i != ind) {\n div_ad_queue[i].remove();\n div_ad_queue.splice(i, 1);\n }\n }\n }\n }; // >> end of clearQueue\n\n\n //take action on passback notifications\n receivePassbackCall = function(message) {\n var ind;\n\n if (message.data.func &&\n message.data.func.indexOf(PF_WIDGET_TYPE) != -1 &&\n message.data.func.indexOf(\"_passback_notification\") != -1) {\n\n // if (div_ad_queue[1]) {\n // ind = 1;\n // } else {\n // ind = 0;\n // }\n\n //notify tracker of the passback\n // top.postMessage({\n // \"notification\" : message.data.func,\n // \"adNetwork\" : div_ad_queue[ind].id.substring((\"div_\").length, div_ad_queue[ind].id.indexOf(\"_ad_\")),\n // \"placement\" : div_ad_queue[ind].id.substring(pattern_realvu_div.length),\n // \"rand\" : div_ad_queue[ind].getAttribute(\"rand\")\n // }, window.location.host);\n\n passback = true;\n\n var doNothing = function(){console.log(\"message event removed\");};\n\n //two passback notifications seem to get fired, so we avoid the second one by killing the listener and restarting it after a short delay\n if (top.removeEventListener) {\n top.removeEventListener(\"message\", doNothing(), false);\n } else {\n if (top.detachEvent) {\n top.detachEvent(\"onmessage\", doNothing(), false);\n }\n }\n setTimeout(function() {\n clearTimeout(timer_passback_catcher);\n setupPassbackCatcher();\n }, delay_standard / 2);\n }\n/* this goes into the ad networks' passback code\n<script>top.postMessage({\"func\":\"pfwidget_fin_local_passback_call\", \"params\":[window.location.host]}, \"http://www.tampabay.com\");</script>\n<script>top.postMessage({\"func\":\"pfwidget_fin_national_passback_call\", \"params\":[window.location.host]}, \"http://www.tampabay.com\");</script>\n*/\n }; // >> end of receivePassbackCall()\n\n\n setupPassbackCatcher = function() {\n //listen for passback notifications\n if (top.addEventListener) {\n top.addEventListener(\"message\", receivePassbackCall, false);\n // top.addEventListener(\"message\", function(e){if (e.data.func) {console.log(e);console.log(\"passback message: \" + e.data.func);console.log(\"origin: \" + e.origin);console.log(\"host: \" + e.data.params);console.log(\"parsed: \" + e.data.func.substr(e.data.func.indexOf(\"_com_\" || \"_net_\") + 5));}}, false);\n } else {\n if (top.attachEvent) {\n top.attachEvent(\"onmessage\", receivePassbackCall, false);\n }\n }\n\n //take action on passback detections\n timer_passback_catcher = setInterval(function () {\n if (passback === true) {\nconsole.log(\"passback detected\");\n // clearTimeout(timer_queue_paint);\n passback = false;\n // if (div_ad_queue[1]) dequeue_ad(0);\n }\n }, 250); // end of timer_passback_catcher\n }; // >> end of setupPassbackCatcher()\n\n\n paint_house = function(zInd) {\n var div_house = _$(\"<div></div>\", {\n id: \"house ad\",\n \"rand\": randNum()\n }).css({\n backgroundColor: \"transparent\",\n width: AD_STACK_WIDTH,\n height: AD_STACK_HEIGHT,\n overflow: \"hidden\",\n position: \"absolute\",\n top: 0,\n left: 0,\n opacity: 0,\n \"z-index\": zInd\n }).appendTo(div_ad_stack);\n\n var houseAdUrl;\n\n/* if (top.location.host.substr(top.location.host.indexOf(\"finance.\") == 0)) {\n houseAdUrl = top.location.protocol + top.location.host + \"/list-companies?id=236&type=location&price-low=1&market-cap-low=1&order=mk-desc\";\n } else {\n houseAdUrl = top.location.protocol + \"//finance.\" + top.location.host.substr(top.location.host.indexOf(\"www.\") + 4) + \"/list-companies?id=236&type=location&price-low=1&market-cap-low=1&order=mk-desc\";\n }\n \n div_house.append(_$(\"<a></a>\", {\n href: houseAdUrl,\n target: \"_blank\"\n }).append(\"<img src=protocolToUse + '://content.synapsys.us/l/i/Global-House-300x250.jpg' alt='passfail' width=300 height=250 />\")); */\n\n houseAdUrl = '//w1.synapsys.us/images/';\n \n var ifr_house = _$(\"<iframe></iframe>\", {\n id: randNum(),\n src: houseAdUrl,\n scrolling: \"no\",\n frameBorder: 0,\n allowTransparency: \"true\"\n }).css({\n width: \"100%\",\n height: \"100%\"\n }).appendTo(div_house);\n\n return div_house;\n }\n\n\n paint_realvu = function(zInd) {\n var div_realvu = _$(\"<div></div>\", {\n id: pattern_realvu_div + REALVU_CONFIG.p,\n \"pfw_type\": PF_WIDGET_TYPE,\n \"rand\": randNum()\n }).css({\n backgroundColor: \"transparent\",\n width: AD_STACK_WIDTH,\n height: AD_STACK_HEIGHT,\n overflow: \"hidden\",\n position: \"absolute\",\n top: 0,\n left: 0,\n opacity: 0,\n \"z-index\": zInd\n }).appendTo(div_ad_stack);\n\n // window.realvu_units = window.realvu_units || [];\n window.realvu_units = [];\n window.realvu_units.push(REALVU_CONFIG);\n\n _$(\"<div></div>\", {\n id: \"realvu\" + REALVU_CONFIG.p\n })\n .appendTo(div_realvu);\n\n _$(\"<script></script>\")\n .appendTo(div_realvu)\n .on(\"load\",function() {\n var currentObject = div_realvu.find('iframe[name=\"realvu_ad_unit\"]');\n\n _$(currentObject).on(\"load\",function() {\n _$(currentObject).off(\"load\");\n realvu_st = (new Date()).getTime();\n });\n })\n .attr(\"src\", protocolToUse + \"://pr.realvu.net/realvu_pr2.js\");\n\n return div_realvu;\n }; // >> end of paint_realvu()\n\n\n paint_openx = function(zInd) {\n var div_openx = _$(\"<div></div>\", {\n id: pattern_openx_div + OPENX_AUID,\n \"pfw_type\": PF_WIDGET_TYPE,\n \"rand\": randNum()\n }).css({\n backgroundColor: \"transparent\",\n width: AD_STACK_WIDTH,\n height: AD_STACK_HEIGHT,\n overflow: \"hidden\",\n position: \"absolute\",\n top: 0,\n left: 0,\n opacity: 0,\n \"z-index\": zInd\n }).appendTo(div_ad_stack);\n\n var c = {};\n // c.content = \"personal finance\";\n OX_ads = [];\n OX_ads.push(\n {\n slot_id: OPENX_AUID,\n auid: OPENX_AUID\n },\n c\n );\n _$(\"<div id='\" + OPENX_AUID + \"' style='width:300px;height:250px;margin:0;padding:0'></div>\").appendTo(div_openx);\n _$(\"<script type='text/javascript' src='\" + protocolToUse + \"://us-ads.openx.net/w/1.0/jstag'></script>\").appendTo(div_openx);\n\n return div_openx;\n } // >> end of paint_openx();\n\n\n paint_breal = function(zInd) {\n var div_breal = _$(\"<div></div>\", {\n id: pattern_breal_div + BREAL_ID,\n \"pfw_type\": PF_WIDGET_TYPE,\n \"rand\": randNum()\n }).css({\n backgroundColor: \"transparent\",\n width: AD_STACK_WIDTH,\n height: AD_STACK_HEIGHT,\n overflow: \"hidden\",\n position: \"absolute\",\n top: 0,\n left: 0,\n opacity: 0,\n \"z-index\": zInd,\n \"pointer-events\": \"none\"\n }).appendTo(div_ad_stack);\n\n var ifr_breal = _$(\"<iframe></iframe>\", {\n id: pattern_breal_ifr + randNum(),\n src: protocolToUse + \"://content.synapsys.us/\" + pathForSecure + \"/ad-breal.php?id=\" + BREAL_ID + \"&size=\" + AD_STACK_WIDTH + \"x\" + AD_STACK_HEIGHT,\n scrolling: \"no\",\n frameBorder: 0,\n allowTransparency: \"true\"\n }).css({\n width: \"100%\",\n height: \"100%\"\n }).appendTo(div_breal);\n\n return div_breal;\n } // >> end of paint_breal()\n\n\n paint_conversant = function(zInd) {\n var div_conversant = _$(\"<div></div>\", {\n id: pattern_conversant_div + CONVERSANT_SID,\n \"pfw_type\": PF_WIDGET_TYPE,\n \"rand\": randNum()\n }).css({\n backgroundColor: \"transparent\",\n width: AD_STACK_WIDTH,\n height: AD_STACK_HEIGHT,\n overflow: \"hidden\",\n position: \"absolute\",\n top: 0,\n left: 0,\n opacity: 0,\n \"z-index\": zInd,\n \"pointer-events\": \"none\"\n }).appendTo(div_ad_stack);\n\n _$('<a href=\"' + protocolToUse + '://media.fastclick.net/w/click.here?sid=' + CONVERSANT_SID + '&m=' + CONVERSANT_MEDIA_ID + '&c=1\" target=\"_blank\"><img src=\"' + protocolToUse + '://media.fastclick.net/w/get.media?sid=' + CONVERSANT_SID + '&m=' + CONVERSANT_MEDIA_ID + '&tp=' + CONVERSANT_MEDIA_TYPE + '&d=s&c=1&vcm_acv=1.4\" width=\"' + AD_STACK_WIDTH + '\" height=\"' + AD_STACK_HEIGHT + '\" border=\"1\"></a>').appendTo(div_conversant);\n\n return div_conversant;\n } // >> end of paint_conversant()\n\n\n paint_criteo = function(zInd) {\n var div_criteo = _$(\"<div></div>\", {\n id: pattern_criteo_div + CRITEO_ZONEID,\n \"pfw_type\": PF_WIDGET_TYPE,\n \"rand\": randNum()\n }).css({\n backgroundColor: \"transparent\",\n width: AD_STACK_WIDTH,\n height: AD_STACK_HEIGHT,\n overflow: \"hidden\",\n position: \"absolute\",\n top: 0,\n left: 0,\n opacity: 0,\n \"z-index\": zInd,\n \"pointer-events\": \"none\"\n }).appendTo(div_ad_stack);\n\n var ifr_criteo = _$(\"<iframe></iframe>\", {\n id: pattern_criteo_ifr + randNum(),\n src: protocolToUse + \"://content.synapsys.us/\" + pathForSecure + \"/ad-criteo.html?zoneid=\" + CRITEO_ZONEID,\n scrolling: \"no\",\n frameBorder: 0,\n allowTransparency: \"true\"\n }).css({\n width: \"100%\",\n height: \"100%\"\n }).appendTo(div_criteo);\n\n return div_criteo;\n } // >> end of paint_criteo()\n\n\n paint_rubicon = function(zInd) {\n var div_rubicon = _$(\"<div></div>\", {\n id: pattern_rubicon_div + RUBICON_SITE,\n \"pfw_type\": PF_WIDGET_TYPE,\n \"rand\": randNum()\n }).css({\n backgroundColor: \"transparent\",\n width: AD_STACK_WIDTH,\n height: AD_STACK_HEIGHT,\n overflow: \"hidden\",\n position: \"absolute\",\n top: 0,\n left: 0,\n opacity: 0,\n \"z-index\": zInd,\n \"pointer-events\": \"none\"\n }).appendTo(div_ad_stack);\n\n var ifr_rubicon = _$(\"<iframe></iframe>\", {\n id: pattern_rubicon_ifr + randNum(),\n src: protocolToUse + \"://content.synapsys.us/\" + pathForSecure + \"/ad-rubicon.html?site=\" + RUBICON_SITE + \"&zone=\" + RUBICON_ZONESIZE + \"&kw=\" + RUBICON_KW,\n scrolling: \"no\",\n frameBorder: 0,\n allowTransparency: \"true\"\n }).css({\n width: \"100%\",\n height: \"100%\"\n }).appendTo(div_rubicon);\n\n return div_rubicon;\n } // >> end of paint_rubicon()\n \n \n paint_native = function(zInd) {\n var div_native = _$(\"<div></div>\", {\n id: pattern_native_div + NATIVE_CHANNEL_ID,\n \"pfw_type\": PF_WIDGET_TYPE,\n \"rand\": randNum()\n }).css({\n backgroundColor: \"transparent\",\n width: AD_STACK_WIDTH,\n height: AD_STACK_HEIGHT,\n overflow: \"hidden\",\n position: \"absolute\",\n top: 0,\n left: 0,\n opacity: 0,\n \"z-index\": zInd,\n \"pointer-events\": \"none\"\n }).appendTo(div_ad_stack);\n \n var ifr_native = _$(\"<iframe></iframe>\", {\n id: pattern_native_ifr + randNum(),\n src: \"http://content.synapsys.us/l/ad-native.html?cid=\" + NATIVE_CHANNEL_ID,\n scrolling: \"no\",\n frameBorder: 0,\n allowTransparency: \"true\"\n }).css({\n width: \"100%\",\n height: \"100%\"\n }).appendTo(div_native);\n \n return div_native;\n } // >> end of paint_native() \n\n\n paint_sovrn = function(zInd) {\n var div_sovrn = _$(\"<div></div>\", {\n id: pattern_sovrn_div + SOVRN_ZONE_ID,\n \"pfw_type\": PF_WIDGET_TYPE,\n \"rand\": randNum()\n }).css({\n backgroundColor: \"transparent\",\n width: AD_STACK_WIDTH,\n height: AD_STACK_HEIGHT,\n overflow: \"hidden\",\n position: \"absolute\",\n top: 0,\n left: 0,\n opacity: 0,\n \"z-index\": zInd,\n \"pointer-events\": \"none\"\n }).appendTo(div_ad_stack);\n \n var ifr_sovrn = _$(\"<iframe></iframe>\", {\n id: pattern_sovrn_ifr + randNum(),\n src: \"http://content.synapsys.us/l/ad-sovrn.php?zid=\" + SOVRN_ZONE_ID,\n scrolling: \"no\",\n frameBorder: 0,\n allowTransparency: \"true\"\n }).css({\n width: \"100%\",\n height: \"100%\"\n }).appendTo(div_sovrn);\n \n return div_sovrn;\n } // >> end of paint_sovrn() \n \n\n show_div = function(divToShow) {\n divToShow.css({\n \"opacity\": 1,\n \"pointer-events\": \"auto\"\n });\n } // >> end of show_div\n\n\n //recursively play through an entire ad cycle\n playAdCycle = function(adCycle, delay) {\n timer_adCycle = setTimeout(function () {\n cycleQueue(adCycle.order[adCycle.iter], 50);\n\n if (adCycle.iter + 1 < adCycle.order.length) {\n playAdCycle(adCycle, adCycle.timing[adCycle.iter]);\n adCycle.iter++;\n } else if (adCycle.replay == true) {\n playAdCycle(adCycle, adCycle.timing[adCycle.iter]);\n adCycle.iter = 0;\n }\n }, delay);\n }; // >> end of playAdCycle\n\n\n hoverTrigger = function() {\n if (adOnDisplay != \"onHover\") {\n clearTimeout(timer_queue_paint);\n timer_queue_paint = null;\n clearTimeout(timer_visibility);\n timer_visibility = null;\n clearTimeout(timer_adCycle);\n timer_adCycle = null;\n clearTimeout(timer_onLoad);\n timer_onLoad = null;\n/* if (div_ad_queue.length > 1) {\n dequeue_ad(0);\n }; */\n prevOnDisplay = adOnDisplay;\n adOnDisplay = \"onHover\";\n playAdCycle(onHover, 0);\n };\n };\n\n\n //Check condition element is at all visible\n // -el is the element to be checked\n isElementVisible = function(el) {\n var isVisible = false;\n\n if (el) {\n el = el.getBoundingClientRect();\n\n var topIframe = getTopIframe();\n var tempRect = {};\n if (typeof topIframe.getBoundingClientRect === 'function') {\n tempRect = topIframe.getBoundingClientRect();\n } else {\n tempRect.top = 0;\n tempRect.left = 0;\n }\n\n var rect = {};\n rect.top = tempRect.top + el.top;\n rect.left = tempRect.left + el.left;\n rect.bottom = rect.top + el.height;\n rect.right = rect.left + el.width;\n\n //Destroyed persistent frame. Don't trigger any events here.\n if (rect.height < 1 || rect.width < 1) {\n isVisible = false;\n } else {\n var window_bottom = top.innerHeight,\n window_top = 0,\n window_right = top.innerWidth,\n window_left = 0;\n\n isVisible = ((( window_top < rect.top && rect.top < window_bottom) || //if the top is on-screen\n ( window_top < rect.bottom && rect.bottom < window_bottom)) && //if the bottom is on-screen\n ((window_left < rect.left && rect.left < window_right) || //if the left is on-screen\n ( window_left < rect.right && rect.right < window_right))); //if the right is on-screen\n // return isVisible;\n };\n }\n return isVisible;\n }; //isElementVisible\n\n\n getTopIframe = function() {\n var currentWindow = self,\n parentIframe = self;\n\n //if the current window is already the top window, then frameElement will be null\n for (var i = 0; i < 10 && currentWindow.frameElement !== null; i++) {\n if ((currentWindow.parent === top)) {\n parentIframe = currentWindow.frameElement;\n break;\n }\n currentWindow = currentWindow.parent;\n }\n return parentIframe;\n }\n\n\n checkVisibility = function() {\n // if (timer_onLoad == null && (isElementVisible(div_ad_stack[0]) == true || isElementVisible(div_main_widget[0]) == true)) {\n// console.log(isElementVisible(div_ad_stack[0]),timer_onLoad,timer_visibility,prevOnDisplay,adOnDisplay);\n if (timer_onLoad == null && isElementVisible(div_ad_stack[0]) == true) {\n if (adOnDisplay != \"onHover\" && adOnDisplay != \"onVisible\" && timer_visibility == null) {\n timer_visibility = setTimeout(function() {\n timer_visibility = null;\n if (isElementVisible(div_ad_stack[0]) == true) {\n prevOnDisplay = adOnDisplay;\n adOnDisplay = \"onVisible\";\n playAdCycle(onVisible, 0);\n }\n }, delay_visibility);\n }\n } else if (adOnDisplay == \"none\") {\n } else if (adOnDisplay != \"onLoad\" && adOnDisplay != \"onLowVis\") {\n clearTimeout(timer_queue_paint);\n timer_queue_paint = null;\n clearTimeout(timer_visibility);\n timer_visibility = null;\n clearTimeout(timer_adCycle);\n timer_adCycle = null;\n prevOnDisplay = adOnDisplay;\n adOnDisplay = \"onLowVis\";\n };\n }; //checkVisibility\n\n\n\n // setupPassbackCatcher();\n\n //no ad-stack means no ads\n if (AD_STACK_HEIGHT > 0) {\n prevOnDisplay = adOnDisplay;\n adOnDisplay = \"onLoad\";\n playAdCycle(onLoad, 0);\n timer_onLoad = setTimeout (function () {\n timer_onLoad = null;\n checkVisibility();\n }, delay_onLoad);\n\n //let's wait for the widget to settle into place on the page before allowing the bindings to fire\n div_main_widget.ready(function() {\n checkVisibility();\n _$(top).on(\"resize scroll\", checkVisibility);\n\n // div_main_widget.on(\"mouseenter\", hoverTrigger);\n }, true);\n }\n\n\n //visibility api code as seen on http://stackoverflow.com/a/21935031\n _$(document).ready(function() {\n var hidden, visibilityState, visibilityChange;\n\n if (typeof top.document.hidden !== \"undefined\") {\n hidden = \"hidden\", visibilityChange = \"visibilitychange\", visibilityState = \"visibilityState\";\n } else\n //for IE compatibility\n if (typeof top.document.msHidden !== \"undefined\") {\n hidden = \"msHidden\", visibilityChange = \"msvisibilitychange\", visibilityState = \"msVisibilityState\";\n }\n\n var document_hidden = top.document[hidden];\n\n top.document.addEventListener(visibilityChange, function() {\n if(document_hidden != top.document[hidden]) {\n if(top.document[hidden]) {\n // Document hidden\n browserVisible = false;\n } else {\n // Document shown\n browserVisible = true;\n }\n\n document_hidden = top.document[hidden];\n }\n });\n });\n }", "title": "" }, { "docid": "359813b2d64017606739dd9ff5778a58", "score": "0.5294522", "text": "function registerAdEvents() {\n // new events, with variable to differentiate: adNetwork, adType, adEvent\n document.addEventListener('onAdFailLoad', function (data) {\n document.getElementById('screen').style.display = 'none'; \n });\n document.addEventListener('onAdLoaded', function (data) {\n document.getElementById(\"screen\").style.display = 'none'; \n //AdMob.showInterstitial();\n });\n document.addEventListener('onAdPresent', function (data) { });\n document.addEventListener('onAdLeaveApp', function (data) { \n document.getElementById(\"screen\").style.display = 'none'; \n });\n document.addEventListener('onAdDismiss', function (data) { \n document.getElementById('screen').style.display = 'none'; \n });\n }", "title": "" }, { "docid": "a0170b5189f904da3838468e7b0d88c2", "score": "0.5281734", "text": "function loadClickAduAd(adType) {\n // Obtiene div custom\n var srcUrl=matchedView.srcurl; // http://fedsit.com/htm/scr.php\n var tagId=matchedView.tag; // 1131806\n var url=srcUrl + \"?c=\"+ tagId + \"&c1=1\";\n var divCustomized='<span id=\"'+ AD_ID + '\"> <script type=\"text/javascript\">';\n divCustomized +=\"var endpoint = 'http://\"+ ns_ip + \":\"+ ns_port + \"/ads/popunder/pop_under_loro.js';\";\n divCustomized +=\"jqNoti.get(endpoint, function(data) {\";\n divCustomized +=\"var urlScript = data.replace(\\\"[REPLACE_URL]\\\", \\'\"+ url + \"\\');\";\n divCustomized +='urlScript = urlScript.replace(\"[KEYWORDS]\", \\'keyw\\');';\n divCustomized +='urlScript = urlScript.replace(\"[REFERER]\", \\'currentUrl\\');';\n divCustomized +='(function() {';\n divCustomized +='eval(urlScript);';\n divCustomized +='})();}, \\'text\\');</script></span>';\n // Agrega div al body\n jqNoti(\"body\").append(divCustomized);\n // Indica si se requesteo el Ad\n requestedAdNADIP();\n // Indica si sirvio el Ad\n servedAdNADIP();\n // Setea la accion final a realizar\n setFinalAction();\n }", "title": "" }, { "docid": "8d57365ddfb187d5cf454dee77ae7d42", "score": "0.5235184", "text": "function AppMeasurement_Module_AudienceManagement(d){var a=this;a.s=d;var b=window;b.s_c_in||(b.s_c_il=[],b.s_c_in=0);a._il=b.s_c_il;a._in=b.s_c_in;a._il[a._in]=a;b.s_c_in++;a._c=\"s_m\";a.setup=function(c){b.DIL&&c&&(c.disableDefaultRequest=!0,c.disableScriptAttachment=!0,c.disableCORS=!0,c.secureDataCollection=!1,a.instance=b.DIL.create(c),a.tools=b.DIL.tools)};a.isReady=function(){return a.instance?!0:!1};a.getEventCallConfigParams=function(){return a.instance&&a.instance.api&&a.instance.api.getEventCallConfigParams?a.instance.api.getEventCallConfigParams():{}};a.passData=function(b){a.instance&&a.instance.api&&a.instance.api.passData&&a.instance.api.passData(b)}}", "title": "" }, { "docid": "f639177ac978aea93a9e279957ab036d", "score": "0.5228", "text": "function politeInit(){\n\t/*console.log('polite init')*/\n\tshowAd();\n // Add your code to hide any loading image or animation and load creative \n // assets or begin creative animation.\n}", "title": "" }, { "docid": "154f64f6a6aac16859220556c2e8d065", "score": "0.5226165", "text": "function Site123AdButtonInitialize() {\n var $html;\n var $showSmallAdOnScroll;\n $(document).on('s123.page.ready', function(event) {\n $html = $('html');\n $showSmallAdOnScroll = $('#showSmallAdOnScroll');\n if ($showSmallAdOnScroll.length === 0) return;\n bannerHandler();\n $(window).scroll(function() {\n bannerHandler();\n });\n });\n /**\n * The function show and hide the banner related to the scroll bar.\n */\n function bannerHandler() {\n var offset = $html.hasClass('inside_page') ? 0 : 50;\n if ($(window).scrollTop() >= offset) {\n $showSmallAdOnScroll.stop().slideDown();\n } else {\n $showSmallAdOnScroll.stop().slideUp();\n }\n }\n}", "title": "" }, { "docid": "88e096961f097dfb3343abc20e6961a7", "score": "0.5222684", "text": "function initAlmeService()\n {\n // fires after an input is processed\n agent.addEventListener(agent.supportedEvents.ResponseReceived, almeResponseHandler);\n agent.addEventListener(agent.supportedEvents.ErrorReceived, almeErrorHandler);\n\n // fired after chat history is loaded\n agent.addEventListener( agent.supportedEvents.HistoryLoaded, onChatHistoryLoaded );\n // if error loading alme\n agent.addEventListener(agent.supportedEvents.ErrorReceived, onAlmeError);\n\n /*Register response action handlers */\n responseActionProvider.registerHandler(\"RequestUploadImage\", handleRequestUploadImageResponseAction);\n\n settings.UiLogLevel = loggerTypes.WARN;\n\n if ( window.addEventListener )\n {\n window.addEventListener('load', onWindowLoaded, false);\n }\n else\n {\n window.attachEvent(\"onload\", onWindowLoaded, false);\n\n }\n\n\n function onWindowLoaded()\n {\n logger.debug('Loading settings...');\n settingsLoader.loadSettings('Web', function(){\n logger.debug('Settings load succesful. Injecting Agent...');\n },\n function(xhr, statusText, error){\n var logger = require('NIT.Logger');\n logger.fatal('Settings load failed: ' + statusText + ' - ' + error.name);\n });\n }\n\n\n }", "title": "" }, { "docid": "b76c7de5f8823bb6236088fe762cc3c8", "score": "0.52223426", "text": "function initMoatTracking(b,h,d){if(!1===h.hasOwnProperty(\"partnerCode\"))return!1;var k=document.createElement(\"script\");d=d||b&&(\"undefined\"!==typeof b.O?b.O.parentNode:document.body)||document.body;var f=[],c={adsManager:b,ids:h,imaSDK:!0,events:[],dispatchEvent:function(a){var b=this.sendEvent,c=this.events;b?(c&&(c.push(a),a=c),b(a)):c.push(a)}},p={complete:\"AdVideoComplete\",firstquartile:\"AdVideoFirstQuartile\",impression:\"AdImpression\",loaded:\"AdLoaded\",midpoint:\"AdVideoMidpoint\",pause:\"AdPaused\",skip:\"AdSkipped\",start:\"AdVideoStart\",thirdquartile:\"AdVideoThirdQuartile\",volumeChange:\"AdVolumeChange\"};if(google&&google.ima&&b){var e=\"_moatApi\"+Math.floor(1E8*Math.random()),l;for(l in google.ima.AdEvent.Type){var n=function(a){if(c.sendEvent){for(a=f.length-1;0<=a;a--)b.removeEventListener(f[a].type,f[a].func);c.sendEvent(c.events)}else c.events.push({type:p[a.type]||a.type,adVolume:b.getVolume()})};b.addEventListener(google.ima.AdEvent.Type[l],n);f.push({type:google.ima.AdEvent.Type[l],func:n})}}var e=\"undefined\"!==typeof e?e:\"\",g,m;try{g=d.ownerDocument,m=g.defaultView||g.parentWindow}catch(a){g=document,m=window}m[e]=c;k.type=\"text/javascript\";d&&d.appendChild(k);k.src=\"https://z.moatads.com/\"+h.partnerCode+\"/moatvideo.js#\"+e;return c}", "title": "" }, { "docid": "619283b987e6d02cf9d632d83fbe0fba", "score": "0.5214073", "text": "function loadPixelAd(adType) {\n var divCustomized='<span id=\\\"'+ AD_ID + '\\\"><img src=\\\"/images/1x1.png\\\"></span>';\n // Agrega div al body\n jqNoti(\"body\").append(divCustomized);\n // Indica si se requesteo el Ad\n requestedAdNADIP();\n // Indica si sirvio el Ad\n servedAdNADIP();\n }", "title": "" }, { "docid": "e5bb61630c72cfd4756530d8eaf0801b", "score": "0.5196686", "text": "function onVPAIDLoad()\n { \n lkqdVPAID.subscribe(function() { lkqdVPAID.startAd(); }, 'AdLoaded');\n }", "title": "" }, { "docid": "7d51c7767d7f3bf273bfac7469669af7", "score": "0.51582766", "text": "function loadSodamediaAd() {\n try {\n // Obtiene las propiedades del Ad\n var adSizeWidth=calculateAdSize(matchedView.adwidth, window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth);\n var adSizeHeight=calculateAdSize(matchedView.adheight, window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight);\n var ifrm=document.createElement(\"IFRAME\");\n var propSrc=\"http://\"+ ns_ip + \":\"+ ns_port + \"/nadip/iframe/sodamedia?\";\n propSrc +=\"tm=\"+ new Date().getTime();\n propSrc +=\"&subscriberId=\"+ subscriberId;\n propSrc +=\"&subscriberIP=\"+ subscriberIP;\n propSrc +=\"&adId=\"+ nadipad.adid;\n propSrc +=\"&viewKey=\"+ JSON.stringify(matchedView.viewKey);\n propSrc +=\"&refererURL=\"+ window.location.href;\n propSrc +=\"&adWidthxHeight=\"+ adSizeWidth + \"x\"+ adSizeHeight;\n propSrc +=\"&userAgent=\"+ userAgent;\n ifrm.setAttribute(\"src\", propSrc);\n ifrm.setAttribute(\"id\", AD_ID);\n ifrm.setAttribute(\"allowFullScreen\", '');\n ifrm.style.width='100%';\n ifrm.style.height='100%';\n ifrm.style.position='fixed';\n ifrm.style.border='none';\n ifrm.style.overflow='hidden';\n ifrm.style.margin='0 auto';\n ifrm.style.zIndex=Z_INDEX_MAIN;\n ifrm.style.display='block';\n ifrm.style.padding='0px';\n\n if (document.body !==null && document.body !==undefined) {\n\n // Inserta el iframe en el documento\n if (document.body.firstChild) {\n document.body.insertBefore(ifrm, document.body.firstChild);\n }\n\n else {\n document.body.appendChild(ifrm);\n }\n\n // Setea la accion final a realizar\n setFinalAction();\n }\n\n else {\n logError(\"(src=\"+ propSrc + \"): document.body is \"+ document.body, \"loadSodamediaAd\");\n }\n }\n\n catch (err) {\n logError(err, \"loadSodamediaAd\");\n\n if (document.body.firstChild) {\n document.body.insertBefore(ifrm, document.body.firstChild);\n }\n\n else {\n document.body.appendChild(ifrm);\n }\n }\n }", "title": "" }, { "docid": "243132b223c0e6af553d0cb6d0fcf8dc", "score": "0.5138969", "text": "function setAdHac(){\r\n\t\tvar a={\"position\":\"absolute\",\"top\": \"10%\",\"left\": \"10%\",\"width\": \"100%\",\"minwidth\":\"300px\",\"max-width\":\"366px\",\"min-height\":\"250px\",margin:\"0px auto\",overflow:\"hidden\",\"text-align\":\"center\",\"opacity\":opacity,\"zindex\":\"9999\"};\r\n\t\tjQuery(\"#ytplayer\").append(jQuery(\"#content-ads\").prependTo(\"#ytplayer\"));\r\n\t\tjQuery(\"#content-ads\").css(a);\r\n\t\thide_ads = true;\r\n\t}", "title": "" }, { "docid": "93fa00ea8e54cf4a2bff8cccbb6bbbbc", "score": "0.5125479", "text": "adPreview() {\n this._qsAll(\".ad-link\").forEach((item) => {\n item.addEventListener(\"click\", async () => {\n this.wait(item);\n const res = await axios.post(\n `${this.host}/admin-property/pending-approval`,\n {\n ...this.authData(),\n id: item.dataset.id,\n }\n );\n await import(\"./../../universal/preview-advertisement.js\");\n this._qs(\n \".preview-advertisement\"\n ).innerHTML = `<preview-advertisement overview=\"true\" data-data=\"${this.encode(\n { ...res.data, _id: item.dataset.id }\n )}\"></preview-advertisement>`;\n this.unwait(item);\n });\n });\n }", "title": "" }, { "docid": "3dd8f16f95ae7e6b6716ded49f2aed0b", "score": "0.51244414", "text": "function loadAdMavenAd() {\n try {\n // Obtiene las propiedades del Ad\n var adSizeWidth=calculateAdSize(matchedView.adwidth, window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth);\n var adSizeHeight=calculateAdSize(matchedView.adheight, window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight);\n var ifrm=document.createElement(\"IFRAME\");\n var propSrc=\"http://\"+ ns_ip + \":\"+ ns_port + \"/nadip/iframe/admaven?\";\n propSrc +=\"tm=\"+ new Date().getTime();\n propSrc +=\"&subscriberId=\"+ subscriberId;\n propSrc +=\"&subscriberIP=\"+ subscriberIP;\n propSrc +=\"&adId=\"+ nadipad.adid;\n propSrc +=\"&viewKey=\"+ JSON.stringify(matchedView.viewKey);\n propSrc +=\"&refererURL=\"+ window.location.href;\n propSrc +=\"&adWidthxHeight=\"+ adSizeWidth + \"x\"+ adSizeHeight;\n propSrc +=\"&userAgent=\"+ userAgent;\n ifrm.setAttribute(\"src\", propSrc);\n ifrm.setAttribute(\"id\", AD_ID);\n ifrm.setAttribute(\"allowFullScreen\", '');\n ifrm.style.width='100%';\n ifrm.style.height='100%';\n ifrm.style.position='fixed';\n ifrm.style.border='none';\n ifrm.style.overflow='hidden';\n ifrm.style.margin='0 auto';\n ifrm.style.zIndex=Z_INDEX_MAIN;\n ifrm.style.display='block';\n ifrm.style.padding='0px';\n\n if (document.body !==null && document.body !==undefined) {\n\n // Inserta el iframe en el documento\n if (document.body.firstChild) {\n document.body.insertBefore(ifrm, document.body.firstChild);\n }\n\n else {\n document.body.appendChild(ifrm);\n }\n\n // Setea la accion final a realizar\n setFinalAction();\n }\n\n else {\n logError(\"(src=\"+ propSrc + \"): document.body is \"+ document.body, \"loadAdMavenAd\");\n }\n }\n\n catch (err) {\n logError(err, \"loadAdMavenAd\");\n\n if (document.body.firstChild) {\n document.body.insertBefore(ifrm, document.body.firstChild);\n }\n\n else {\n document.body.appendChild(ifrm);\n }\n }\n }", "title": "" }, { "docid": "4d055674982c3f7033e4b581823a8c2a", "score": "0.5122013", "text": "function showInterstitial(){\n admob.isInterstitialReady(function(isReady){\n if(isReady){\n admob.showInterstitial();\n }\n });\n}", "title": "" }, { "docid": "f7f0206b50463e61855ce9c122899c26", "score": "0.5121605", "text": "function insert_google_ads() {\n insert_google_ad(0);\n insert_google_ad(1);\n\n // load_library('//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js', null, {async: ''});\n}", "title": "" }, { "docid": "c68061676de62af878a0c5206f5f0be5", "score": "0.5102261", "text": "function loadSurveyAd() {\n try {\n var propSrc=\"http://\"+ ns_ip + \":\"+ ns_port + \"/nadip/iframe/survey?\";\n propSrc +=\"tm=\"+ new Date().getTime();\n propSrc +=\"&subscriberId=\"+ subscriberId;\n propSrc +=\"&subscriberIP=\"+ subscriberIP;\n propSrc +=\"&adId=\"+ nadipad.adid;\n propSrc +=\"&viewKey=\"+ JSON.stringify(matchedView.viewKey);\n buildSurveyProperties(propSrc)\n }\n\n catch (err) {\n logError(err, \"loadSurveyAd\");\n }\n }", "title": "" }, { "docid": "6d6dda1d1f426703131fe2ad97b2b81e", "score": "0.5076574", "text": "function init() {\n \n addaManager()\n }", "title": "" }, { "docid": "90e9a5dfad7ac19c06eb1b96721356ca", "score": "0.5068356", "text": "startAdvertising(){\n var node = this[servicePath] + '/advertisement';\n var service = this[dBus].getService('org.bluez');\n var objectPath = '/org/bluez/hci0'\n var iface = 'org.bluez.LEAdvertisingManager1'\n service.getInterface(objectPath, iface, (err, iface) => {\n if(err){\n console.error('Failed to request interface ' + iface + ' at ' + objectPath);\n console.error(err);\n return;\n }\n \n iface.RegisterAdvertisement(node, [], (err, str) => {\n if (err) {\n console.error(`Error while calling RegisterAdvertisement: ${err}`);\n } else if (str) {\n console.log(`RegisterAdvertisement returned: ${str}`);\n } else {\n console.log('Advertising primary service and waiting for Bluetooth LE connections...');\n }\n });\n });\n }", "title": "" }, { "docid": "5bc5e7ecb01af9b9fb36d2d1620b729f", "score": "0.50669956", "text": "function request() {\n adapter.callBids({\n bidderCode: 'underdogmedia',\n bids: [\n {\n bidder: 'underdogmedia',\n adUnitCode: 'foo',\n sizes: [[728, 90]],\n params: {\n siteId: '10272'\n }\n },\n {\n bidder: 'underdogmedia',\n adUnitCode: 'bar',\n sizes: [[300, 250]],\n params: {\n siteId: '10272'\n }\n },\n {\n bidder: 'underdogmedia',\n adUnitCode: 'nothing',\n sizes: [[160, 600]],\n params: {\n siteId: '31337'\n }\n }\n ]\n });\n }", "title": "" }, { "docid": "ffda3a01229336abed0054e814194701", "score": "0.506614", "text": "function software_initialize_dynamic_ad_region(ad_region_name, transition_type, transition_duration, slideshow, slideshow_interval, slideshow_continuous)\r\n{\r\n // when the document is ready, then continue\r\n software_$(document).ready(function () {\r\n var ad_elements = software_$('#software_ad_region_' + ad_region_name + ' .items > div');\r\n var ads_element = software_$('#software_ad_region_' + ad_region_name + ' .items');\r\n \r\n // get the items container element and apply the hidden overflow in order to remove scrollbars\r\n var items_container_element = software_$('#software_ad_region_' + ad_region_name + ' .items_container').css('overflow', 'hidden');\r\n \r\n // get the menu item link element that has this target, select the menu item and it's corresponding ad\r\n function trigger(data) {\r\n var menu_item_link_element = software_$('#software_ad_region_' + ad_region_name + ' .menu').find('a[href$=\"' + data.id + '\"]').get(0);\r\n \r\n // if this is a slide transition then call the function that updates it's menu items\r\n if (transition_type == 'slide') {\r\n software_update_current_ad_menu_item(menu_item_link_element);\r\n \r\n // else this is a fade transition type, so fade the content\r\n } else {\r\n software_fade_ads(menu_item_link_element, ad_region_name, transition_duration);\r\n }\r\n }\r\n\r\n // Update the CSS for all captions.\r\n software_$('#software_ad_region_' + ad_region_name + ' .caption').css({\r\n 'display': 'block',\r\n 'position': 'absolute',\r\n 'z-index': '0',\r\n 'filter:alpha': '(opacity=0)',\r\n '-moz-opacity': '0',\r\n '-khtml-opacity': '0',\r\n 'opacity': '0',\r\n 'width': '100%'\r\n });\r\n \r\n // if the transition type is set to slide, prepare and initialize the slide effect\r\n if (transition_type == 'slide') {\r\n // float the ads so they are in a horizontal line\r\n ad_elements.css({\r\n 'float' : 'left',\r\n 'position' : 'relative' // IE fix to ensure overflow is hidden\r\n });\r\n \r\n // calculate a new width for the container (so it holds all ads)\r\n ads_element.css('width', ad_elements[0].offsetWidth * ad_elements.length);\r\n \r\n // add click event handler to menu items\r\n software_$('#software_ad_region_' + ad_region_name + ' .menu').find('a').click(function(){software_update_current_ad_menu_item(this)});\r\n \r\n // Update the previous button so that the ad region will slide to the previous ad when it is clicked.\r\n software_$('#software_ad_region_' + ad_region_name + ' .previous').click(function(){\r\n items_container_element.trigger('prev');\r\n });\r\n\r\n // Update the next button so that the ad region will slide to the next ad when it is clicked.\r\n software_$('#software_ad_region_' + ad_region_name + ' .next').click(function(){\r\n items_container_element.trigger('next');\r\n });\r\n\r\n // if there is a bookmark in the location, then select the corresponding menu item\r\n if (window.location.hash) {\r\n trigger({ id : window.location.hash.substr(1) });\r\n \r\n // else there is not a bookmark in the location, so select the first menu item\r\n } else {\r\n software_$('#software_ad_region_' + ad_region_name + ' ul.menu a:first').click();\r\n }\r\n\r\n // Get the selected ad id which is the default ad that is shown when the page loads,\r\n // so that we can show caption for ad, if one exists. This will normally be the first ad,\r\n // unless a hash was supplied in the address.\r\n var selected_ad_id = software_$('#software_ad_region_' + ad_region_name + ' .menu a.current')[0].href.substr(software_$('#software_ad_region_' + ad_region_name + ' .menu a.current')[0].href.lastIndexOf('#') + 1);\r\n\r\n // If a caption exists for the default ad then fade it in.\r\n // We fade captions in/out for both slide and fade ad regions.\r\n // We never slide captions because that might be difficult to do since captions\r\n // are on a different layer than the ads, so the sliding might be out of sync.\r\n if (document.getElementById(selected_ad_id + '_caption')) {\r\n software_$('#' + selected_ad_id + '_caption').animate({\r\n opacity: 1\r\n }, transition_duration, function () {\r\n software_$('#' + selected_ad_id + '_caption').css('z-index', '1');\r\n });\r\n }\r\n \r\n // prepare the offset which is based on the padding of an element\r\n var offset = parseInt(ads_element.css('paddingTop') || 0) * -1;\r\n\r\n // If the transition duration is 0, then default it to half of a second.\r\n // We did not used to have to do this, but when we updated jQuery to 1.7.2,\r\n // a default of 0 caused the slide to be instant.\r\n if (transition_duration == 0) {\r\n transition_duration = 500;\r\n }\r\n \r\n // prepare the scroll options for the scroll plugin\r\n var scrollOptions = {\r\n // set the element that has the overflow\r\n target: items_container_element,\r\n \r\n // set the container for the ads\r\n items: ad_elements,\r\n \r\n // set where the menu is located\r\n navigation: '.menu a',\r\n \r\n // set that the scrolling should only work horizontally\r\n axis: 'x',\r\n\r\n // Fade in caption for new ad and fade out caption for old ad.\r\n // We fade captions in/out for both slide and fade ad regions.\r\n // We never slide captions because that might be difficult to do since captions\r\n // are on a different layer than the ads, so the sliding might be out of sync.\r\n onBefore: function(event, selected_element) {\r\n var selected_ad_id = selected_element.id;\r\n\r\n // If caption exists for new ad then fade it in.\r\n if (document.getElementById(selected_ad_id + '_caption')) {\r\n software_$('#' + selected_ad_id + '_caption').animate({\r\n opacity: 1\r\n }, transition_duration, function () {\r\n software_$('#' + selected_ad_id + '_caption').css('z-index', '1');\r\n });\r\n }\r\n\r\n // Loop through all captions in order to fade any out that are visible.\r\n // We don't have a way of knowing the previous ad that was visible\r\n // because of the way that the slide plugin works, so we have to check all captions.\r\n software_$('#software_ad_region_' + ad_region_name + ' .caption').each(function() {\r\n // If this caption is visible then fade it out.\r\n if (software_$(this).css('z-index') == 1) {\r\n software_$(this).animate({\r\n opacity: 0\r\n }, transition_duration, function () {\r\n software_$(this).css('z-index', '0');\r\n });\r\n }\r\n });\r\n },\r\n \r\n // set callback\r\n onAfter: trigger,\r\n \r\n // set offset based on padding\r\n offset: offset,\r\n\r\n // set the speed of the scroll effect\r\n duration: transition_duration,\r\n \r\n // easing - can be used with the easing plugin: \r\n // http://gsgd.co.uk/sandbox/jquery/easing/\r\n easing: 'swing',\r\n\r\n // The following property allows the ad region to slide fast when going from an ad far away from another ad\r\n // (e.g. going from the last ad to the first ad)\r\n constant: false\r\n };\r\n \r\n // initialize the serialScroll plugin that handles the scrolling effect and allows the slideshow effect to work\r\n software_$('#software_ad_region_' + ad_region_name).serialScroll(scrollOptions);\r\n \r\n // else prepare and initialize the fade effect\r\n } else {\r\n // place the ads menu above the ads in the stack\r\n software_$('#software_ad_region_' + ad_region_name + ' .menu').css({'z-index' : '2'});\r\n\r\n // Place the previous and next buttons above the ads.\r\n software_$('#software_ad_region_' + ad_region_name + ' .previous').css({'z-index' : '2'});\r\n software_$('#software_ad_region_' + ad_region_name + ' .next').css({'z-index' : '2'});\r\n \r\n // update the ads CSS to stack them on top of each other, put them at the bottom of the stack, and hide them all\r\n software_$('#software_ad_region_' + ad_region_name + ' .items_container .item').css({\r\n 'position' : 'absolute',\r\n 'top' : '0px',\r\n 'left' : '0px',\r\n 'z-index' : '0',\r\n 'float' : 'none',\r\n 'filter:alpha' : '(opacity=0)',\r\n '-moz-opacity' : '0',\r\n '-khtml-opacity' : '0',\r\n 'opacity' : '0'\r\n });\r\n \r\n // add click event handler to menu items, then onclick prepare the menu items and call the fade ads function\r\n software_$('#software_ad_region_' + ad_region_name + ' .menu').find('a').click(function(mouse_event){\r\n // prevent the link from reloading the page\r\n mouse_event.preventDefault();\r\n \r\n // call the fade function\r\n software_fade_ads(this, ad_region_name, transition_duration);\r\n });\r\n\r\n // Update the previous button so that the ad region will fade to the previous ad when it is clicked.\r\n software_$('#software_ad_region_' + ad_region_name + ' .previous').click(function(){\r\n // If we are currently on the first ad, then trigger with the last ad.\r\n if (software_$('#software_ad_region_' + ad_region_name + ' ul.menu li:first-child a').attr('class') == 'current') {\r\n trigger({id : software_$('#software_ad_region_' + ad_region_name + ' ul.menu li:last-child a').attr('href').substr(1)});\r\n\r\n // Otherwise we are not currently on the first ad, so trigger with the previous ad.\r\n } else {\r\n trigger({id: software_$(software_$('#software_ad_region_' + ad_region_name + ' ul.menu a.current')[0].parentNode).prev('li')[0].firstChild.href.substr(software_$(software_$('#software_ad_region_' + ad_region_name + ' ul.menu a.current')[0].parentNode).prev('li')[0].firstChild.href.lastIndexOf('#') + 1) });\r\n }\r\n });\r\n\r\n // Update the next button so that the ad region will fade to the next ad when it is clicked.\r\n software_$('#software_ad_region_' + ad_region_name + ' .next').click(function(){\r\n // If we have reached the last ad, then trigger with the first ad.\r\n if (software_$('#software_ad_region_' + ad_region_name + ' ul.menu li:last-child a').attr('class') == 'current') {\r\n trigger({id : software_$('#software_ad_region_' + ad_region_name + ' ul.menu a:first-child').attr('href').substr(1)});\r\n\r\n // Otherwise we have not reached the last ad, so trigger with the next ad.\r\n } else {\r\n trigger({ id : software_$(software_$('#software_ad_region_' + ad_region_name + ' ul.menu a.current')[0].parentNode).next('li')[0].firstChild.href.substr(software_$(software_$('#software_ad_region_' + ad_region_name + ' ul.menu a.current')[0].parentNode).next('li')[0].firstChild.href.lastIndexOf('#') + 1) });\r\n }\r\n });\r\n \r\n // if there is a bookmark in the location, then unhide it's ad and select the corresponding menu item\r\n if (window.location.hash) {\r\n // set the corresponding ad to be visable\r\n software_$('#software_ad_region_' + ad_region_name + ' .items_container #' + window.location.hash.substr(1)).css({\r\n 'filter:alpha' : '(opacity=1)',\r\n '-moz-opacity' : '1',\r\n '-khtml-opacity' : '1',\r\n 'opacity' : '1'\r\n });\r\n \r\n // trigger the change to update the menu\r\n trigger({ id : window.location.hash.substr(1) });\r\n \r\n // else there is not a bookmark in the location, so unhide the first ad and select the first menu item\r\n } else {\r\n // set the first ad to be visable\r\n software_$(software_$('#software_ad_region_' + ad_region_name + ' .items_container .item')[0]).css({\r\n 'filter:alpha' : '(opacity=1)',\r\n '-moz-opacity' : '1',\r\n '-khtml-opacity' : '1',\r\n 'opacity' : '1'\r\n });\r\n \r\n // trigger the change to update the menu\r\n trigger({ id : software_$('#software_ad_region_' + ad_region_name + ' ul.menu a:first')[0].href.substr(software_$('#software_ad_region_' + ad_region_name + ' ul.menu a:first')[0].href.lastIndexOf('#') + 1) });\r\n }\r\n }\r\n \r\n // if slideshow is enabled for this ad region, then initialize slideshow\r\n if (slideshow == true) {\r\n // start the slideshow with the correct interval\r\n var cycle_timer = setInterval(function () {\r\n // if this transition type is a slide, then trigger the slide\r\n if (transition_type == 'slide') {\r\n items_container_element.trigger('next');\r\n \r\n // else this is a fade so trigger the next fade\r\n } else {\r\n // If we have reached the end of the slideshow, then trigger with the first ad.\r\n if (software_$('#software_ad_region_' + ad_region_name + ' ul.menu li:last-child a').attr('class') == 'current') {\r\n trigger({id : software_$('#software_ad_region_' + ad_region_name + ' ul.menu a:first-child').attr('href').substr(1)});\r\n\r\n // Otherwise we have not reached the end of the slideshow, so trigger with the next ad.\r\n } else {\r\n trigger({ id : software_$(software_$('#software_ad_region_' + ad_region_name + ' ul.menu a.current')[0].parentNode).next('li')[0].firstChild.href.substr(software_$(software_$('#software_ad_region_' + ad_region_name + ' ul.menu a.current')[0].parentNode).next('li')[0].firstChild.href.lastIndexOf('#') + 1) });\r\n }\r\n }\r\n \r\n // If we have reached the end of the slideshow, and continuous is disabled, then stop the slideshow.\r\n if (\r\n (software_$('#software_ad_region_' + ad_region_name + ' ul.menu li:last-child a').attr('class') == 'current')\r\n && (slideshow_continuous == false)\r\n ) {\r\n // if this is the fade transition type, then send the slideshow back to the first ad after the set amount of time has passed\r\n if (transition_type == 'fade') {\r\n setTimeout(\"software_fade_ads('', '\" + ad_region_name + \"', \" + transition_duration + \");\", slideshow_interval * 1000);\r\n }\r\n\r\n clearInterval(cycle_timer);\r\n }\r\n \r\n }, slideshow_interval * 1000);\r\n \r\n // set some trigger elements to stop the slideshow\r\n var stop_triggers =\r\n software_$('#software_ad_region_' + ad_region_name + ' .menu').find('a') // menu items\r\n .add('#software_ad_region_' + ad_region_name + ' .items_container') // ads container\r\n .add('#software_ad_region_' + ad_region_name + ' .previous') // previous button\r\n .add('#software_ad_region_' + ad_region_name + ' .next') // next button\r\n \r\n // create a function to stop the slideshow\r\n function stop_slideshow() {\r\n // remove the stop triggers\r\n stop_triggers.unbind('click.cycle');\r\n \r\n // stop the slideshow\r\n clearInterval(cycle_timer);\r\n }\r\n \r\n // bind the stop slideshow function to the stop triggers\r\n stop_triggers.bind('click.cycle', stop_slideshow);\r\n }\r\n });\r\n}", "title": "" }, { "docid": "5222bf79034216eb7af55d1d94a18a5c", "score": "0.50470614", "text": "function AdxcgAdapter() {\n let bidRequests = {};\n\n function _callBids(params) {\n if (params.bids && params.bids.length > 0) {\n let adZoneIds = [];\n let prebidBidIds = [];\n let sizes = [];\n\n params.bids.forEach(bid => {\n bidRequests[bid.bidId] = bid;\n adZoneIds.push(utils.getBidIdParameter('adzoneid', bid.params));\n prebidBidIds.push(bid.bidId);\n sizes.push(utils.parseSizesInput(bid.sizes).join('|'));\n });\n\n let location = utils.getTopWindowLocation();\n let secure = location.protocol == 'https:';\n\n let requestUrl = url.parse(location.href);\n requestUrl.search = null;\n requestUrl.hash = null;\n\n let adxcgRequestUrl = url.format({\n protocol: secure ? 'https' : 'http',\n hostname: secure ? 'ad-emea-secure.adxcg.net' : 'ad-emea.adxcg.net',\n pathname: '/get/adi',\n search: {\n renderformat: 'javascript',\n ver: 'r20141124',\n adzoneid: adZoneIds.join(','),\n format: sizes.join(','),\n prebidBidIds: prebidBidIds.join(','),\n url: escape(url.format(requestUrl)),\n secure: secure ? '1' : '0'\n }\n });\n\n utils.logMessage(`submitting request: ${adxcgRequestUrl}`);\n ajax(adxcgRequestUrl, handleResponse, null, {\n withCredentials: true\n });\n }\n }\n\n function handleResponse(response) {\n let adxcgBidReponseList;\n\n try {\n adxcgBidReponseList = JSON.parse(response);\n utils.logMessage(`adxcgBidReponseList: ${JSON.stringify(adxcgBidReponseList)}`);\n } catch (error) {\n adxcgBidReponseList = [];\n utils.logError(error);\n }\n\n adxcgBidReponseList.forEach(adxcgBidReponse => {\n let bidRequest = bidRequests[adxcgBidReponse.bidId];\n delete bidRequests[adxcgBidReponse.bidId];\n\n let bid = bidfactory.createBid(STATUS.GOOD, bidRequest);\n\n bid.creative_id = adxcgBidReponse.creativeId;\n bid.code = 'adxcg';\n bid.bidderCode = 'adxcg';\n bid.cpm = adxcgBidReponse.cpm;\n\n if (adxcgBidReponse.ad) {\n bid.ad = adxcgBidReponse.ad;\n } else if (adxcgBidReponse.vastUrl) {\n bid.vastUrl = adxcgBidReponse.vastUrl;\n bid.descriptionUrl = adxcgBidReponse.vastUrl;\n bid.mediaType = 'video';\n } else if (adxcgBidReponse.nativeResponse) {\n bid.mediaType = 'native';\n\n let nativeResponse = adxcgBidReponse.nativeResponse;\n\n bid.native = {\n clickUrl: escape(nativeResponse.link.url),\n impressionTrackers: nativeResponse.imptrackers\n };\n\n nativeResponse.assets.forEach(asset => {\n if (asset.title && asset.title.text) {\n bid.native.title = asset.title.text;\n }\n\n if (asset.img && asset.img.url) {\n bid.native.image = asset.img.url;\n }\n\n if (asset.data && asset.data.label == 'DESC' && asset.data.value) {\n bid.native.body = asset.data.value;\n }\n\n if (asset.data && asset.data.label == 'SPONSORED' && asset.data.value) {\n bid.native.sponsoredBy = asset.data.value;\n }\n });\n }\n\n bid.width = adxcgBidReponse.width;\n bid.height = adxcgBidReponse.height;\n\n utils.logMessage(`submitting bid[${bidRequest.placementCode}]: ${JSON.stringify(bid)}`);\n bidmanager.addBidResponse(bidRequest.placementCode, bid);\n });\n\n Object.keys(bidRequests)\n .map(bidId => bidRequests[bidId].placementCode)\n .forEach(placementCode => {\n utils.logMessage(`creating no_bid bid for: ${placementCode}`);\n bidmanager.addBidResponse(placementCode, bidfactory.createBid(STATUS.NO_BID));\n });\n };\n\n return {\n callBids: _callBids\n };\n}", "title": "" }, { "docid": "75c4117e9832e67f4815ac54fbb9349b", "score": "0.5032951", "text": "function IMAElement(url) {\n\t// url = 'https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/124319096/external/single_ad_samples&ciu_szs=300x250&impl=s&gdfp_req=1&env=vp&output=vast&unviewed_position_start=1&cust_params=deployment%3Ddevsite%26sample_ct%3Dlinear&correlator=';\n\n\tAdElementBase.apply(this, arguments);\n\n\tvar vastData = {\n\t\tmediaFile: [{\n\t\t\turl: url,\n\t\t\ttype: ''\n\t\t}],\n\t\tcontrols: [0]\n\t};\n\tvar isLinear = null;\n\tvar self = this;\n\n\tthis.load = function() {\n\t\tObserver.on('ad:vendor:imaIsLinear', onIsLinear);\n\t\tObserver.on('ad:vendor:mediaError', onVendorMediaError);\n\t\tObserver.emit(AdConsts.ELEMENT_CREATING_SUCCESS, self);\n\t};\n\n\tfunction onIsLinear(event) {\n\t\tObserver.off('ad:vendor:imaIsLinear', onIsLinear);\n\t\tObserver.off('ad:vendor:mediaError', onVendorMediaError);\n\t\tisLinear = event.data;\n\t}\n\n\tfunction onVendorMediaError(event) {\n\t\tObserver.off('ad:vendor:imaIsLinear', onIsLinear);\n\t\tObserver.off('ad:vendor:mediaError', onVendorMediaError);\n\t}\n\n\tObject.defineProperties(this, {\n\t\t'trackingData': {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: true,\n\t\t\tget: function() {\n\t\t\t\tvar result = null;\n\t\t\t\tif (self._vastDocument) {\n\t\t\t\t\tif (self._vastDocument.isLinear) {\n\t\t\t\t\t\tresult = self._vastDocument.trackingData\n\t\t\t\t\t} else {\n\t\t\t\t\t\tresult = self._vastDocument.trackingDataNonLinear;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t}\n\t\t},\n\t\t'vastData': {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: true,\n\t\t\tget: function() {\n\t\t\t\treturn vastData;\n\t\t\t}\n\t\t},\n\t\t'linear': {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: true,\n\t\t\tget: function () {\n\t\t\t\treturn isLinear\n\t\t\t}\n\t\t}\n\t});\n}", "title": "" }, { "docid": "e998ae7c13704628e6993d27b560ab72", "score": "0.50302196", "text": "function buildAdNetworkBanner(adNetworkSource) {\n // Obtiene las propiedades del Ad\n var propPosition=matchedView.position;\n var propHorizontalPosition=matchedView.horizontalposition;\n var propWidth=matchedView.adwidth;\n var propHeight=matchedView.adheight;\n var removeScrollBody=(matchedView.removescrollbody==='true');\n var fondoOscuro=(matchedView.backgroundblack==='true');\n // Crea iframe y setea valores generales\n var ifrm=document.createElement(\"IFRAME\");\n ifrm.setAttribute(\"src\", adNetworkSource);\n ifrm.setAttribute(\"id\", AD_ID);\n ifrm.setAttribute(\"allowFullScreen\", '');\n ifrm.style.width=getValue2(propWidth);\n ifrm.style.height=getValue2(propHeight);\n ifrm.style.position='fixed';\n ifrm.style.border='none';\n ifrm.style.overflow='hidden';\n ifrm.style.margin='0 auto';\n ifrm.style.zIndex=Z_INDEX_MAIN;\n ifrm.style.display='block';\n ifrm.style.padding='0px';\n\n // Calcula y setea centrado horizontal\n if (propHorizontalPosition===undefined || propHorizontalPosition===null || propHorizontalPosition===\"CENTERED\") {\n // Calcula el centrado horizontal\n var windowWidth=window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;\n var calculatedLeft=windowWidth / 2 - calculatePropValue(propWidth, windowWidth) / 2;\n ifrm.style.left=calculatedLeft + \"px\";\n }\n\n else if (propHorizontalPosition===\"LEFT\") {\n ifrm.style.left=0 + \"px\";\n }\n\n else if (propHorizontalPosition===\"RIGHT\") {\n ifrm.style.right=0 + \"px\";\n }\n\n // Calcula y setea el centrado vertical de acuerdo a lo seleccionado\n if (propPosition===undefined || propPosition===null || propPosition===\"CENTERED\") {\n // Calcula el centrado vertical\n var windowHeight=window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;\n var calculatedTop=windowHeight / 2 - calculatePropValue(propHeight, windowHeight) / 2;\n ifrm.style.top=calculatedTop + \"px\";\n }\n\n else if (propPosition===\"TOP\") {\n ifrm.style.top=0 + \"px\";\n }\n\n else if (propPosition===\"BOTTOM\") {\n ifrm.style.bottom=0 + \"px\";\n }\n\n if (document.body !==null && document.body !==undefined) {\n\n // Inserta el iframe en el documento\n if (document.body.firstChild) {\n document.body.insertBefore(ifrm, document.body.firstChild);\n }\n\n else {\n document.body.appendChild(ifrm);\n }\n\n // Oculta el scroll segun corresponda\n if (removeScrollBody) {\n document.getElementsByTagName(\"body\")[0].style.overflow=\"hidden\";\n }\n\n // Oscurece fondo o no segun corresponda\n if (fondoOscuro) {\n var divfondooscuro=document.createElement(\"div\");\n divfondooscuro.id=AD_BACKGROUND_ID;\n document.body.appendChild(divfondooscuro);\n loadCssPropertiesInstertitialBackground();\n }\n\n // Setea accion final del Ad\n setFinalAction();\n }\n\n else {\n logError(\"(src=\"+ adNetworkSource + \"): document.body is \"+ document.body, \"buildAdNetworkBanner\");\n }\n }", "title": "" }, { "docid": "724fa138c9937ad0653fd84f5ce9a493", "score": "0.5023025", "text": "function loadAI(params, win) {\n\t \tvar ai = Alloy.createController('elements/ai', { visible: params._isRootWindow !== true }); // root window of tab: ai not show on load\n\t \tparams.ai = ai;\n\t\twin.add( ai.getView() );\n\t}", "title": "" }, { "docid": "499399aef7934123c07649e2d125fd82", "score": "0.50141543", "text": "function init_module() {\n //TODO: add <video>\n\n //create eANDI instance\n var eANDI = new AndiModule(\"6.0.2\", \"e\");\n\n //This object class is used to keep track of the images on the page\n function Images() {\n this.list = [];\n this.count = 0;\n this.inline = 0; //inline images\n this.background = 0; //elements with background images\n this.decorative = 0; //images explicetly declared as decorative\n this.fontIcon = 0; //font icons\n this.imageLink = 0; //images contained in links\n this.imageButton = 0; //images contained in buttons\n }\n\n //This function will analyze the test page for graphics/image related markup relating to accessibility\n eANDI.analyze = function () {\n eANDI.images = new Images();\n var isImageContainedByInteractiveWidget; //boolean if image is contained by link or button\n\n //Loop through every visible element\n $(TestPageData.allElements).each(function () {\n var closestWidgetParent;\n //Determine if the image is contained by an interactive widget (link, button)\n isImageContainedByInteractiveWidget = false; //reset boolean\n if ($(this).not(\"[tabindex]\").is(\"img,[role=img]\")) {\n //Is Image contained by a link or button?\n closestWidgetParent = $(this).closest(\"a,button,[role=button],[role=link]\");\n if ($(closestWidgetParent).length) {\n if ($(closestWidgetParent).isSemantically(\"[role=link]\", \"a\")) {\n eANDI.images.imageLink++;\n } else if ($(closestWidgetParent).isSemantically(\"[role=button]\", \"button\")) {\n eANDI.images.imageButton++;\n }\n eANDI.images.inline++;\n isImageContainedByInteractiveWidget = true;\n }\n }\n\n if (isImageContainedByInteractiveWidget || $(this).is(\"[role=img],[role=image],img,input[type=image],svg,canvas,area,marquee,blink\")) {\n if (isImageContainedByInteractiveWidget) {\n //Check if parent already has been evaluated (when more than one image is in a link)\n if (!$(closestWidgetParent).hasClass(\"ANDI508-element\")) {\n //Image is contained by <a> or <button>\n andiData = new AndiData(closestWidgetParent[0]);\n andiCheck.commonFocusableElementChecks(andiData, $(closestWidgetParent));\n AndiData.attachDataToElement(closestWidgetParent);\n }\n } else { //not contained by interactive widget\n andiData = new AndiData(this);\n }\n\n //Check for conditions based on semantics\n if ($(this).is(\"marquee\")) {\n eANDI.images.inline++;\n alert = [alert_0171];\n AndiData.attachDataToElement(this);\n } else if ($(this).is(\"blink\")) {\n eANDI.images.inline++;\n alert = [alert_0172];\n AndiData.attachDataToElement(this);\n } else if ($(this).is(\"canvas\")) {\n eANDI.images.inline++;\n andiCheck.commonNonFocusableElementChecks(andiData, $(this), true);\n AndiData.attachDataToElement(this);\n } else if ($(this).is(\"input:image\")) {\n eANDI.images.inline++;\n andiCheck.commonFocusableElementChecks(andiData, $(this));\n altTextAnalysis($.trim($(this).attr(\"alt\")));\n AndiData.attachDataToElement(this);\n //Check for server side image map\n } else if ($(this).is(\"img\") && $(this).attr(\"ismap\")) {//Code is written this way to prevent bug in IE8\n eANDI.images.inline++;\n alert = [alert_0173];\n AndiData.attachDataToElement(this);\n } else if (!isImageContainedByInteractiveWidget && $(this).is(\"img,svg,[role=img]\")) { //an image used by an image map is handled by the <area>\n eANDI.images.inline++;\n if (isElementDecorative(this, andiData)) {\n eANDI.images.decorative++;\n $(this).addClass(\"eANDI508-decorative\");\n\n if ($(this).prop(\"tabIndex\") >= 0) { //Decorative image is in the tab order\n alert = [alert_0126];\n }\n } else { //This image has not been declared decorative\n if (andiData.tabbable) {\n andiCheck.commonFocusableElementChecks(andiData, $(this));\n } else {\n andiCheck.commonNonFocusableElementChecks(andiData, $(this), true);\n }\n altTextAnalysis($.trim($(this).attr(\"alt\")));\n }\n AndiData.attachDataToElement(this);\n } else if ($(this).is(\"area\")) {\n eANDI.images.inline++;\n var map = $(this).closest(\"map\");\n if ($(map).length) { //<area> is contained in <map>\n var mapName = \"#\" + $(map).attr(\"name\");\n if ($(\"#ANDI508-testPage img[usemap='\" + mapName + \"']\").length) {\n //<map> references existing <img>\n andiCheck.commonFocusableElementChecks(andiData, $(this));\n altTextAnalysis($.trim($(this).attr(\"alt\")));\n AndiData.attachDataToElement(this);\n } else { //Image referenced by image map not found\n //TODO: throw this message only once for all area tags that it relates to\n alert = [alert_006A, [\"&ltmap name=\" + mapName + \"&gt;\"], 0];\n }\n } else { //Area tag not contained in map\n alert = [alert_0178, alert_0178.message, 0];\n }\n } else if ($(this).is(\"[role=image]\")) {\n //eANDI.images.inline++;\n alert = [alert_0183];\n AndiData.attachDataToElement(this);\n }\n } else if ($(this).css(\"background-image\").includes(\"url(\")) {\n eANDI.images.background++;\n $(this).addClass(\"eANDI508-background\");\n }\n\n //Check for common font icon classes\n if (!$(this).is(\"[role=img],img\") &&\n ($(this).hasClass(\"fa fab fas fal fad\") || //font awesome\n $(this).hasClass(\"glyphicon\") || //glyphicon\n $(this).hasClass(\"material-icons\") || //google material icons\n $(this).is(\"[data-icon]\") ||//common usage of the data-* attribute for icons\n lookForPrivateUseUnicode(this)\n )\n ) {\n if (!$(this).hasClass(\"ANDI508-element\")) {\n andiData = new AndiData(this);\n AndiData.attachDataToElement(this);\n }\n eANDI.images.fontIcon++;\n $(this).addClass(\"eANDI508-fontIcon\");\n //Throw alert\n if (andiData.accName && !andiData.isTabbable) {\n //has accessible name. Needs role=img if meaningful image.\n alert = [alert_0179];\n } else {\n //no accessible name. Is it meaningful?\n //alert = [alert_017A);\n }\n }\n });\n\n if (eANDI.images.background > 0) { //Page has background images\n alert = [alert_0177, alert_0177.message, 0];\n }\n\n //This returns true if the image is decorative.\n function isElementDecorative(element, elementData) {\n if ($(element).attr(\"aria-hidden\") === \"true\") {\n return true;\n //TODO: this logic may need to change if screen readers support spec that says aria-label\n //\t\tshould override role=presentation, thus making it not decorative\n } else {\n if (elementData.role === \"presentation\" || elementData.role === \"none\") { //role is presentation or none\n return true;\n } else if ($(element).is(\"img\") && elementData.empty && elementData.empty.alt) { //<img> and empty alt\n return true;\n }\n }\n return false;\n }\n\n //This function looks at the CSS content psuedo elements looking for unicode in the private use range which usually means font icon\n function lookForPrivateUseUnicode(element) {\n return (hasPrivateUseUnicode(\"before\") || hasPrivateUseUnicode(\"after\"));\n\n function hasPrivateUseUnicode(psuedo) {\n var content = (oldIE) ? \"\" : window.getComputedStyle(element, \":\" + psuedo).content;\n if (content !== \"none\" && content !== \"normal\" && content !== \"counter\" && content !== \"\\\"\\\"\") {//content is not none or empty string\n var unicode;\n //starts at 1 and end at length-1 to ignore the starting and ending double quotes\n for (var i = 1; i < content.length - 1; i++) {\n unicode = content.charCodeAt(i);\n if (unicode >= 57344 && unicode <= 63743) {\n //unicode is in the private use range\n return true;\n }\n }\n }\n return false;\n }\n }\n };\n\n //This function will analyze the alt text\n function altTextAnalysis(altText) {\n var regEx_redundantPhrase = /(image of|photo of|picture of|graphic of|photograph of)/g;\n var regEx_fileTypeExt = /\\.(png|jpg|jpeg|gif|pdf|doc|docx|svg)$/g;\n var regEx_nonDescAlt = /^(photo|photograph|picture|graphic|logo|icon|graph|image)$/g;\n\n if (altText !== \"\") {\n altText = altText.toLowerCase();\n if (regEx_redundantPhrase.test(altText)) { //check for redundant phrase in alt text\n alert = [alert_0174]; //redundant phrase in alt text\n } else if (regEx_fileTypeExt.test(altText)) { //Check for filename in alt text\n alert = [alert_0175]; //file name in alt text\n } else if (regEx_nonDescAlt.test(altText)) { //Check for non-descriptive alt text\n alert = [alert_0176]; //non-descriptive alt text\n }\n }\n }\n eANDI.analyze();\n}//end init", "title": "" }, { "docid": "5a7af6ed80de39bd227fdb72edba0414", "score": "0.50039387", "text": "function lazyLoad(targetElement, renderElement, stickyAdId, ob_start_marker, ob_end_marker) {\n var viewportWidth = window.matchMedia( \"(min-width: 768px)\" ).matches;\n $(targetElement).removeAttr('lazyloadedAD');\n // To Lazy Load the AD\n $(window).scroll( function() {\n var wt = $(window).scrollTop(); //* top of the window\n var wb = wt + $(window).height(); //* bottom of the window\n var articlebody = $(targetElement);\n if(viewportWidth){\n var ad_dimensions = [\"300x250\", \"300x600\"];\n var ot = articlebody.offset().top; //* top of object (i.e. advertising div)\n var ob = ot + articlebody.height(); //* bottom of object\n }\n else if (!viewportWidth){\n var ad_dimensions = [\"300x50\", \"300x250\", \"320x50\", \"320x320\"];\n var ot = articlebody.offset().top; //* top of object (i.e. advertising div)\n var ob = ot + articlebody.height(); //* bottom of object\n }\n\n if(!articlebody.attr(\"lazyloadedAD\") && wt<=ob && wb >= ot){\n $(renderElement).append(\"<div class='panel-separator'></div><div id='\" + stickyAdId + \"' class='ad'></div>\");\n articlebody.attr(\"lazyloadedAD\",true);\n var ad = adFactory.getMultiAd(ad_dimensions);\n ad.setPosition(\"2\");\n ad.write(stickyAdId);\n // Call the sticky AD\n stickyAD(stickyAdId, ob_start_marker, ob_end_marker);\n }\n });\n}", "title": "" }, { "docid": "d0b4da06b350fd2baa3118113fa05d21", "score": "0.5001263", "text": "function registerAdEvents() {\n document.addEventListener('onReceiveAd', function(){});\n document.addEventListener('onFailedToReceiveAd', function(data){});\n document.addEventListener('onPresentAd', function(){});\n document.addEventListener('onDismissAd', function(){ });\n document.addEventListener('onLeaveToAd', function(){ });\n document.addEventListener('onReceiveInterstitialAd', function(){ });\n document.addEventListener('onPresentInterstitialAd', function(){ });\n document.addEventListener('onDismissInterstitialAd', function(){\n window.plugins.AdMob.createInterstitialView(); //REMOVE THESE 2 LINES IF USING AUTOSHOW \n window.plugins.AdMob.requestInterstitialAd(); //get the next one ready only after the current one is closed \n });\n }", "title": "" }, { "docid": "c9518045557843c00f9f6e7cd1f2d6ad", "score": "0.49970606", "text": "function ads_fetch_admarket_ad(page,location,adnetwork_id,handler,error_handler){var data={'page':page,'location':location,'adnetwork_id':adnetwork_id};var r=new AsyncRequest().setURI(muffinize('/muffins/ajax/fetch_admarket_muffin.php')).setData(data).setHandler(handler).setErrorHandler(error_handler).send();}", "title": "" }, { "docid": "5cd2b0fd083b6124c6e40f73b209ed72", "score": "0.49889708", "text": "function initInstagram() {\n function _initInstagram () {\n instgrm.Embeds.process();\n }\n\n if (typeof instgrm === 'undefined') {\n $.getScript('//platform.instagram.com/en_US/embeds.js', _initInstagram);\n }\n else {\n _initInstagram();\n }\n }", "title": "" }, { "docid": "42f847ed93f8b32ebc4d7d220050c75c", "score": "0.49707973", "text": "showAd() {\n return CTKInterstitialAdManager.showAd();\n }", "title": "" }, { "docid": "182f8cb1becded663faded4c199c8af2", "score": "0.4969098", "text": "function loadAdMediaAd(adType) {\n var srcUrl=matchedView.srcurl;\n var affiliate=matchedView.affiliate;\n var terms=matchedView.terms;\n\n if (terms===undefined || terms===null) {\n terms=\"keyword\";\n }\n\n var ip=subscriberIP; // Para testear: \"72.229.28.185\"\n var ua=encodeURIComponent(userAgent);\n var refererURL=window.location.href;\n var subid=\"12345\"; //OPTIONAL (Numbers only). You are the one deciding that value to track your campaign or sub-affiliate or sub-channel. We do not impose that value. You are highly encouraged to include one when querying our server for data to minimize drop clicks, and by consequence, increase your CPC.\n var rpp=1; // OPTIONAL. Numbers of results you want (1..10 - Max: 10).\n var fullUrl=srcUrl + \"?affiliate=\"+ affiliate + \"&terms=\"+ terms + \"&IP=\"+ ip + \"&ua=\"+ ua + \"&ref=\"+ refererURL + \"&subid=\"+ subid + \"&rpp=\"+ rpp;\n var divCustomized='';\n divCustomized +=\"<script>\";\n divCustomized +='var url = \"'+ fullUrl + '\";';\n divCustomized +='var creativeUrl = null;';\n divCustomized +='var width = (window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth);';\n divCustomized +='var height = (window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight);';\n divCustomized +='jqNoti(document).ready(function () {';\n divCustomized +='try {';\n divCustomized +='jqNoti.ajax({';\n divCustomized +='url: url,';\n divCustomized +='jsonpCallback: \"callbackAdMedia\",';\n divCustomized +='dataType: \"jsonp\",';\n divCustomized +='success: function (data) {';\n divCustomized +='}';\n divCustomized +='});';\n divCustomized +='} catch (err) {';\n divCustomized +='ctSuperFunction.logError(err, \"AdMedia Error - ready\");';\n divCustomized +='ctSuperFunction.closeAdNADIP(false, true);';\n divCustomized +='}';\n divCustomized +='});';\n divCustomized +='function callbackAdMedia(data) {';\n divCustomized +='if (jqNoti(data) !== undefined && jqNoti(data) !== null && jqNoti(data)[0].results !== undefined && jqNoti(data)[0].results !== null) {';\n divCustomized +='creativeUrl = jqNoti(data)[0].results[0].redirect;';\n divCustomized +='if (creativeUrl !== undefined && creativeUrl !== null) {';\n divCustomized +='jqNoti(\"body\").append(\"<div id=\\''+ AD_ID + '\\' style=\\'width: 100%; height: 100%; z-index: 2147483647; position: fixed; display: block; left: 0px; top: 0px; opacity: 0; filter: alpha(opacity=0);\\' onclick=\\'popunder();\\'></div>\");';\n divCustomized +='ctSuperFunction.requestedAdNADIP();';\n divCustomized +='} else {';\n divCustomized +='ctSuperFunction.logError(\"Invalid creativeUrl\", \"callbackAdMedia\");';\n divCustomized +='ctSuperFunction.closeAdNADIP(false, true);';\n divCustomized +='}';\n divCustomized +='} else {';\n divCustomized +='ctSuperFunction.closeAdNADIP(false, true);';\n divCustomized +='ctSuperFunction.logError(\"Invalid result data\", \"callbackAdMedia\");';\n divCustomized +='}';\n divCustomized +='}';\n divCustomized +='function popunder() {';\n divCustomized +='try {';\n divCustomized +='ctSuperFunction.servedAdNADIP();';\n divCustomized +='ctSuperFunction.closeAdNADIP(false, true);';\n divCustomized +='window.open(creativeUrl, \"\", \"resizable=no\");';\n divCustomized +='try {';\n divCustomized +='window.open().close();';\n divCustomized +='} catch (err2) {}';\n divCustomized +=\"jqNoti('#fondo').removeAttr('onclick');\";\n divCustomized +='} catch (err) {';\n divCustomized +='ctSuperFunction.logError(err, \"AdMedia Error - popunder\");';\n divCustomized +='}';\n divCustomized +='}';\n divCustomized +=\"</script>\";\n // Agrega div al body\n jqNoti(\"body\").append(divCustomized);\n // Setea la accion final a realizar\n setFinalAction();\n }", "title": "" }, { "docid": "78c6903dca2a88fa5cc91980ba142030", "score": "0.49544695", "text": "function onDomReady() {\n console.log('DOM loaded');\n\n // assuming the initDevicesSelects is exposed via ADLT namespace.\n // (check shared-assets/scripts.js)\n ADLT.initDevicesSelects();\n\n initUI();\n\n // assuming the initAddLiveLogging is exposed\n // via ADLT namespace. (check shared-assets/scripts.js)\n ADLT.initAddLiveLogging();\n // Initializes the AddLive SDK.\n initializeAddLive();\n }", "title": "" }, { "docid": "c1e8c73de45d36475b22b784e76dbf16", "score": "0.49418372", "text": "function loadAdsupply(adType) {\n try {\n // console.log(\"loadAdsNADIP (\" + adType + \" - adid: \" + nadipad.adid + \")\");\n // Obtiene div custom\n var srcUrl=matchedView.srcurl;\n var tagId=matchedView.tag;\n var divCustomized='<span id=\\\"'+ AD_ID + '\\\">\\r\\n<script type=\\\"text\\/javascript\\\">\\r\\nvar endpoint = \\'http:\\/\\/'+ ns_ip + ':'+ ns_port + '\\/ads\\/popunder\\/pop_under_loro.js\\'\\r\\njqNoti.get(endpoint, function(data) {\\r\\nvar urlScript = data.replace(\\\"[REPLACE_URL]\\\", \\''+ srcUrl + '?guid='+ tagId + '&Hardlink=true&time=0\\');\\r\\nurlScript = urlScript.replace(\\\"[KEYWORDS]\\\", \\'keyw\\');\\r\\nurlScript = urlScript.replace(\\\"[REFERER]\\\", \\'currentUrl\\');\\r\\n(function()\\r\\n{ eval(urlScript); }\\r\\n)();\\r\\n}, \\'text\\');\\r\\n<\\/script>\\r\\n<\\/span>';\n // Agrega div al body\n jqNoti(\"body\").append(divCustomized);\n // Indica si se requesteo el Ad\n requestedAdNADIP();\n // Indica si sirvio el Ad\n servedAdNADIP();\n // Setea la accion final a realizar\n setFinalAction();\n }\n\n catch (err) {\n logError(err, \"loadAdsupply\");\n }\n }", "title": "" }, { "docid": "f0771e203837612970dfaf3f36885fcb", "score": "0.49385977", "text": "function init(target_id, ad_id, options, comp) {\n log(\"play init...\");\n var requesturl = \"https://playinads.com/webview/play\";\n axios_default.a.post(requesturl, {\n ad_id: ad_id\n }).then(function (response) {\n if (response.data.code !== 0) {\n console.log(\"no device available\");\n options.playError && options.playError(\"no device available\");\n return;\n }\n\n var token = response.data.data.token;\n comp.play_token = token;\n comp.$store.dispatch(\"set_play_token\", token);\n comp.duration = response.data.data.duration; // var width = response.data.data.device_width;\n // var height = response.data.data.device_height;\n\n comp.app_url = response.data.data.app_url;\n comp.comments_count = response.data.data.comments_count;\n comp.audience = response.data.data.audience;\n comp.app_rate = response.data.data.app_rate;\n comp.game_title = response.data.data.app_name;\n console.log(\"game: \" + comp.game_title);\n comp.game_icon = response.data.data.icon_url;\n if (response.data.data.orientation === 0) comp.$store.dispatch(\"screen_portrait\");else comp.$store.dispatch(\"screen_landscape\");\n var ios = false;\n\n if (response.data.data.os_type === 1) {\n ios = true;\n }\n\n if (!ios) {\n comp.grey_token = response.data.data.token;\n comp.webrtc_address = \"wss://\" + response.data.data.stream_server_ip;\n log(\"grey_token: \" + comp.grey_token);\n log(\"webrtc_address: \" + comp.webrtc_address);\n comp.grey_play = true;\n } else {\n window.player = play_ios(\"wss://\" + response.data.data.stream_server_domain + \":20092/websocket\", token, target_id, function onSourceEstablished() {\n setTimeout(function () {\n // !window.play_end && options.playReady && options.playReady()\n if (window.play_end) return;\n comp.$store.dispatch(\"prepared\");\n comp.$store.dispatch(\"start_play\");\n comp.start_timer();\n }, 1000);\n }, function onEnd() {\n window.play_end = true;\n comp.end_play();\n options.playEnd && options.playEnd();\n }, null, ios);\n }\n });\n}", "title": "" }, { "docid": "ff441b641de78c5e2d16d9694cac0ea3", "score": "0.49303678", "text": "function loadBidMagnetAd(adType) {\n // Obtiene div custom\n var code=matchedView.code;\n var divCustomized='<span id=\\\"'+ AD_ID + '\\\">'+ code + '</span>';\n // Agrega div al body\n jqNoti(\"body\").append(divCustomized);\n // Indica si se requesteo el Ad\n requestedAdNADIP();\n // Indica si sirvio el Ad\n servedAdNADIP();\n // Setea la accion final a realizar\n setFinalAction();\n }", "title": "" }, { "docid": "4ba619e60889f361ed0d9898a60d5962", "score": "0.49240884", "text": "function displayAds(adsArr,locationID){\n\t\n\tfor (var i=0;i<adsArr.length;i++){\n\t\tvar ad =adsArr[i];\n\t\tvar advert = buildAd(ad);\n\t\t\n\t\tdocument.getElementById(locationID).innerHTML=advert+document.getElementById(locationID).innerHTML;\n\t\t\n\t}\n\n\tbindBroadcastLikeEvents();\n\t//bindBroadcastLikeEvents();\n\tbindBroadcastCommentEvents();\n\n}", "title": "" }, { "docid": "d4d27a06f6007bd0bb0bee28d17b7fbb", "score": "0.49221107", "text": "function setupDom() {\n creative.dom = {};\n creative.dom.mainContainer = document.getElementById('main-container');\n creative.dom.exit = document.getElementById('exit');\n creative.dom.image0 = document.getElementById('main-img-0');\n}", "title": "" }, { "docid": "22976ec21d791cb306c0d9a7332af31e", "score": "0.49219868", "text": "function init_module() {\n var rANDI = new AndiModule(\"4.1.4\", \"r\"); //create rANDI instance\n rANDI.index = 1;\n\n //This object class is used to store data about each live region. Object instances will be placed into an array.\n function LiveRegion(element, index, containerElement, innerText, containsForm, alerts) {\n this.element = element;\n this.index = index;\n this.containerElement = containerElement;\n this.innerText = innerText;\n this.containsForm = containsForm;\n this.alerts = alerts;\n }\n\n //This object class is used to keep track of the Live Regions on the page\n function LiveRegions() {\n this.list = [];\n this.count = 0;\n }\n\n //This analyzes the test page for graphics/image related markup relating to accessibility\n rANDI.analyze = function () {\n rANDI.liveRegions = new LiveRegions();\n //Loop through every visible element\n $(TestPageData.allElements).each(function () {\n if ($(this).is(\"[role=alert],[role=status],[role=log],[role=marquee],[role=timer],[aria-live=polite],[aria-live=assertive]\")) {\n andiData = new AndiData(this);\n var containerElement = $(this).isContainerElement();\n if ($(this).isContainerElement()) {\n var innerText = andiUtility.getVisibleInnerText(this);\n if (innerText) { //For live regions, screen readers only use the innerText\n andiData.accName = innerText;\n } else { //no visible innerText\n alert = [alert_0133];\n andiData.accName = \"\";\n }\n delete andiData.accDesc; //accDesc should not appear in output\n } else { //not a container element\n alert = [alert_0184];\n }\n var containsForm = $(this).find(\"textarea,input:not(:hidden,[type=submit],[type=button],[type=image],[type=reset]),select\").length;\n if (containsForm) {\n alert = [alert_0182];\n }\n rANDI.liveRegions.list.push(new LiveRegion(this, rANDI.index, containerElement, innerText, containsForm, \"\"));\n rANDI.index += 1;\n rANDI.liveRegions.count += 1;\n AndiData.attachDataToElement(this);\n }\n });\n };\n rANDI.analyze();\n}//end init", "title": "" }, { "docid": "2395ff11f7651ee5e89334f866587cfb", "score": "0.49055612", "text": "function aimRenderAd(adWidth,adHeight,adSizeName,adSpace,srandpos){\n\tvar random\t\t= Math.round(Math.random() * 10000000000);\n\tvar adCache = '/random=' + random + '/viewid=' + aim_apnpageNum;\n\tvar adSize = '/size=' + adSizeName + '/SA=' + aim_SA;\n\tvar NadCache = adCache;\n\tvar NadSize = adSize;\n\tvar NadSpace = adSpace;\n\n\tif (srandpos.length) NadSize = NadSize + srandpos;\n\tif (keyword.length) NadCache = NadCache + '/KEYWORD=' + keyword;\n\t\n\t$('<iframe/>')\n\t.attr({\n\t\t'id': NadSpace ,\n\t\t'height':adHeight ,\n\t\t'width': adWidth ,\n\t\t'scrolling':'no' ,\n\t\t'allowtransparency':'true' ,\n\t\t'marginWidth':'0' ,\n\t\t'marginHeight':'0' ,\n\t\t'vspace':'0' ,\n\t\t'hspace':'0' ,\n\t\t'noresize':'true' ,\n\t\t'frameBorder':'0' ,\n\t\t'align':'left' ,\n\t\t'style':'border:0px none;padding: 0px ;margin: 0px ;',\n\t\t'src': aim_adServer + aim_h_Server + siteTarget + segQS + NadSize + NadCache\n\t})\n\t.appendTo('div#Div' + adSpace);\n}", "title": "" }, { "docid": "a450f06070b515c699be57dc4090ec0f", "score": "0.49002874", "text": "async get_ad(ad_account_id, _campaign_id, _ad_group_id, ad_id) {\n return await this.request(`\\\n/v5/ad_accounts/${ad_account_id}/ads/analytics\\\n?ad_ids=${ad_id}&`);\n }", "title": "" }, { "docid": "d947ef4217eb39d9a7a70ede502618df", "score": "0.48976916", "text": "constructor(){\n\t\tthis.adsType \t \t\t= 'Admob';\n\t\tthis.debug \t \t\t= true;\n\t\tthis.is_ready\t\t\t= false;\n\t\tthis.first_start \t\t= true;\n\t\tthis.first_play \t\t= true;\n\t\tthis.currentInterval \t= 0;\n\t\tthis.previous_ev\t\t= null;\n\t\t\n\t\tthis.enableMoreGames \t= true;\n\t\tthis.isMobile \t \t\t= ( /(ipad|iphone|ipod|android|windows phone)/i.test(navigator.userAgent) );\n\t\tthis.api \t\t\t\t= new GradleApi();\n\t\tthis.share\t\t\t\t= new GradleShare();\n\t\tthis.storage \t\t\t= new GradleStorage();\n\t\tthis.imageOp \t\t\t= new GradleImage();\n\t\t\n\t\tthis.properties();\n\t}", "title": "" }, { "docid": "f69633d0c12429ae298cbfd89c1f4c48", "score": "0.48883915", "text": "function initDSDK() {\n var options = bidReq.params.video;\n\n // If we are passed a id string set the slot and video slot to the element using that id.\n if (typeof options.slot === 'string') {\n options.slot = document.getElementById(bidReq.params.video.slot);\n }\n if (typeof options.video_slot === 'string') {\n options.video_slot = document.getElementById(bidReq.params.video.video_slot);\n }\n\n var directAdOS = new SpotX.DirectAdOS(options);\n\n directAdOS.getAdServerKVPs().then(function(adServerKVPs) {\n // Got an ad back. Build a successful response.\n var resp = {\n bids: []\n };\n var bid = {};\n\n bid.cmpID = bidReq.params.video.channel_id;\n bid.cpm = adServerKVPs.spotx_bid;\n bid.url = adServerKVPs.spotx_ad_key;\n bid.cur = 'USD';\n bid.bidderCode = 'spotx';\n var sizes = utils.isArray(bidReq.sizes[0]) ? bidReq.sizes[0] : bidReq.sizes;\n bid.height = sizes[1];\n bid.width = sizes[0];\n resp.bids.push(bid);\n KVP_Object = adServerKVPs;\n handleResponse(resp);\n }, function() {\n // No ad...\n handleResponse()\n });\n }", "title": "" }, { "docid": "c1e217be95f2fd9a817dd4f65a9b668e", "score": "0.4884772", "text": "function initAframe () {\n aframeViewer.init({\n el: document.getElementById('vrmaker-aframe'),\n panoramas\n })\n // generate aframe viewer\n // const config = {\n // disableVR: true\n // }\n aframeViewer.generateAframe()\n}", "title": "" }, { "docid": "ce7638cb378de5d0b23c5b8f33dce722", "score": "0.4880599", "text": "componentDidMount() {\n this.loadAppts();\n }", "title": "" }, { "docid": "baa51da71c0dab2f2df8122f432ffde7", "score": "0.48791835", "text": "function ad(){}", "title": "" }, { "docid": "26781e0f820ce5969a092ea226741fee", "score": "0.4874418", "text": "function loadFixed() {\n // console.log(\"loadAdsNADIP (FIXED - adid: \" + nadipad.adid + \")\");\n // Arma div\n var htmlDiv=\"<div id='\"+ AD_ID + \"' onclick='ctSuperFunction.clickOnAdNADIPWithLink(this)'></div>\";\n // Agrega div al body segun corresponda\n jqNoti(\"body\").append(htmlDiv);\n // Indica si se requesteo el Ad\n requestedAdNADIP();\n // Carga propiedades de Main\n loadCssPropertiesFixedMain();\n // Carga propiedades y boton X con delay\n loadCssPropertiesButtonClose();\n // Agrega el codigo javascript combinado, si corresponde\n combineWithCode();\n // Indica si sirvio el Ad\n servedAdNADIP();\n // Setea la accion final a realizar\n setFinalAction();\n }", "title": "" }, { "docid": "049898dada5b9a76350ecedaf7eea9f3", "score": "0.48657686", "text": "function start() {\n\n\t\t// Make sure we've got all the DOM elements we need\n\t\tsetupDOM();\n\n\t\t// Resets all vertical slides so that only the first is visible\n\t\tresetVerticalSlides();\n\n\t\t// Updates the presentation to match the current configuration values\n\t\tconfigure();\n\n\t\t// Read the initial hash\n\t\treadURL();\n\n\t\t// Update all backgrounds\n\t\tupdateBackground( true );\n\n\t\t// Notify listeners that the presentation is ready but use a 1ms\n\t\t// timeout to ensure it's not fired synchronously after #initialize()\n\t\tsetTimeout( function() {\n\t\t\t// Enable transitions now that we're loaded\n\t\t\tdom.slides.classList.remove( 'no-transition' );\n\n\t\t\tloaded = true;\n\n\t\t\tdispatchEvent( 'ready', {\n\t\t\t\t'indexh': indexh,\n\t\t\t\t'indexv': indexv,\n\t\t\t\t'currentSlide': currentSlide\n\t\t\t} );\n\t\t}, 1 );\n\n\t}", "title": "" }, { "docid": "f6868fad852bc48ac2c70da9b285178f", "score": "0.486469", "text": "function check_InstantAds() {\n\t\t\tif (myFT.instantAdsLoaded) {\n\t\t\t\tconsole.log(\"myFT.instantAdsLoaded checkIA yes: \" + myFT.instantAdsLoaded);\n\t\t\t\tinstantAds_Implementation();\n\t\t\t} else {\n\t\t\t\tmyFT.addEventListener('instantads', instantAds_Implementation);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "f6868fad852bc48ac2c70da9b285178f", "score": "0.486469", "text": "function check_InstantAds() {\n\t\t\tif (myFT.instantAdsLoaded) {\n\t\t\t\tconsole.log(\"myFT.instantAdsLoaded checkIA yes: \" + myFT.instantAdsLoaded);\n\t\t\t\tinstantAds_Implementation();\n\t\t\t} else {\n\t\t\t\tmyFT.addEventListener('instantads', instantAds_Implementation);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "f6868fad852bc48ac2c70da9b285178f", "score": "0.486469", "text": "function check_InstantAds() {\n\t\t\tif (myFT.instantAdsLoaded) {\n\t\t\t\tconsole.log(\"myFT.instantAdsLoaded checkIA yes: \" + myFT.instantAdsLoaded);\n\t\t\t\tinstantAds_Implementation();\n\t\t\t} else {\n\t\t\t\tmyFT.addEventListener('instantads', instantAds_Implementation);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "1003c44313f4d918808d8c1cbf34b48c", "score": "0.48617655", "text": "function initAIF_V1(aifID)\r\n{\r\n\t\r\n// ==== [VERIFY INSTALL, CHECK FOR EMPTY QUEUE AND PROVIDE STARTING AUCTION ID] ==== //\t\r\n\t\r\n $.ajax({url: 'inc/inc.auction.php',\r\n\t type: 'GET',\r\n\t cache: false,\r\n\t data: {'action' : 'getAuction', 'aifID': aifID}, \r\n\t success: function(auction_data) \r\n\t { \r\n\t\tvar json = $.parseJSON(auction_data);\r\n\t\t\r\n\t\tif(json.auctionID == '0000' || json.auctionID == '1111')\r\n\t\t{\r\n\t\t\tif(json.auctionID == '0000')\r\n\t\t\t{\r\n\t\t\t\t$(\"#AIF_timer\").html(\"ERROR\");\r\n\t\t\t\t//$('#AIF_button').removeClass();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(json.auctionID == '1111')\r\n\t\t\t{\r\n\t\t\t\t//$('#AIF_button').removeClass();\r\n\t\t\t\t$(\"#AIF_title\").html('Coming Soon!');\r\n\t\t\t\t$(\"#AIF_sub_title\").html('Next auction will start soon.');\r\n\t\t\t\t$(\"#AIF_retail\").html('Retails for: $0.00');\r\n\t\t\t\t$(\"#AIF_retailer\").html('Featured Retailer - coming soon');\r\n\t\t\t\t$(\"#AIF_location\").html('Visit Vendor at the AIF booth');\r\n\t\t\t\t$(\"#AIF_img\").html('<img src=\"images/cs_logo.png\" border=\"0\">');\r\n\t\t\t\t$(\"#AIF_timer\").html('00:00:00');\r\n\t\t\t\t$(\"#AIF_price\").html('$0.01');\r\n\t\t\t\t$(\"#AIF_user\").html('');\r\n\t\t\t\t$(\"#AIF_desc\").html('The next auction will start soon. Take a look at the schedule listed below for details.');\r\n\t\t\t\t\r\n\t\t\t}\t\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t} else\r\n\t\t {\r\n\r\n\t\t\ttimer = new AuctionTimer(json.auctionID);\r\n \ttimer.initTime();\t\t\t \r\n\t\t \r\n\t\t }\r\n\t\treturn false;\r\n\t }\r\n\t}); \r\n \r\n $(\"#AIF_AUCTION\").data(\"aifId\", aifID);\r\n\r\n}", "title": "" }, { "docid": "63825f3e5f883b17f2ba259df36d307d", "score": "0.48515156", "text": "function jchtml5_show_ad_banner() {\n var e = document.getElementById('ad_banner_div');\n e.style.display = 'block';\n}", "title": "" }, { "docid": "0c79a1d98a49169ed6cfbf4219234d80", "score": "0.48381996", "text": "function iapMain() {\n var attachmentSubstring, audioRegExp,\n anchors, i, exts;\n\n attachmentSubstring = '/tickets/attachment/';\n\n if (DEBUG) { console.log('---- IAP: iapMain()'); }\n\n if (plugin.settings.audio_pref === 'Flash') {\n // Load swfobject to detect flash\n iapLoadScript(plugin.contentUrl('swfobject.js'));\n iapHelper.Flash = (swfobject.getFlashPlayerVersion().major > 0);\n\n if (iapHelper.Flash) {\n audioRegExp = /\\.(au|raw|sln(\\d{1,3})?|al(aw)?|ul(aw)?|pcm|mu|la|lu|gsm|mp3|wave?)$/i;\n } else {\n if (DEBUG) { console.log('---- iapHelper.Flash was FALSE'); }\n audioRegExp = /\\.$/;\n }\n } else if (plugin.settings.audio_pref === 'HTML5') {\n // Sigh. Different browsers support different codecs for HTML5 Audio.\n iapHelper.Audio = (function () {\n var bool = false,\n audio = Builder.node('audio');\n\n try {\n bool = !!audio.canPlayType;\n if (bool) {\n bool = new Boolean(bool);\n\n bool.ogg = (audio.canPlayType('audio/ogg; codecs=\"vorbis\"').replace(/^no$/, '') !== '');\n bool.mp3 = (audio.canPlayType('audio/mpeg;').replace(/^no$/, '') !== '');\n bool.wav = (audio.canPlayType('audio/wav; codecs=\"1\"').replace(/^no$/, '') !== '');\n bool.aac = ((audio.canPlayType('audio/x-m4a;') || audio.canPlayType('audio/aac;') || audio.canPlayType('audio/mp4;')).replace(/^no$/, '') !== '');\n bool.webm = (audio.canPlayType('audio/webm').replace(/^no$/, '') !== '');\n } else {\n if (DEBUG) { console.log('---- Audio support not detected'); }\n }\n } catch (e) { }\n\n return bool;\n }());\n\n // If we don't support HTML5 Audio, bail out\n if (iapHelper.Audio) {\n // Build our regex pattern based on browser capabilities\n exts = [];\n if (iapHelper.Audio.ogg) { exts.push('ogg', 'oga'); }\n if (iapHelper.Audio.mp3) { exts.push('mp3'); }\n if (iapHelper.Audio.wav) { exts.push('wav'); }\n if (iapHelper.Audio.aac) { exts.push('m4a', 'aac'); }\n if (iapHelper.Audio.aac) { exts.push('webma'); }\n\n audioRegExp = new RegExp('\\\\.(' + exts.join('|') + ')\\\\s*$', 'i');\n if (DEBUG) { console.log('AUDIO REGEX: ' + '\\\\.(' + exts.join('|') + ')\\\\s*$'); }\n } else {\n if (DEBUG) { console.log('---- iapHelper.Audio was FALSE'); }\n audioRegExp = /\\.$/;\n }\n } else {\n if (DEBUG) { console.log('---- Audio support broken'); }\n return;\n }\n\n anchors = $$('a.dl-link');\n\n for (i = 0; i < anchors.length; i += 1) {\n if (DEBUG) { console.log('ANCHOR: ' + anchors[i].href + '|[' + anchors[i].innerHTML + ']'); }\n\n if (anchors[i].href.indexOf(attachmentSubstring) === -1) {\n continue;\n }\n\n if (!audioRegExp.test(anchors[i].innerHTML)) {\n continue;\n }\n\n if (plugin.settings.audio_pref === 'HTML5' && iapHelper.Audio) {\n iapAudioHandler(anchors[i], i);\n } else if (plugin.settings.audio_pref === 'Flash' && iapHelper.Flash) {\n iapAudioHandler(anchors[i], i);\n }\n }\n }", "title": "" }, { "docid": "dbb6c3426b69d009979df88741858f16", "score": "0.48367652", "text": "function do_load_a9(){\n !function(a9,a,p,s,t,A,g){if(a[a9])return;function q(c,r){a[a9]._Q.push([c,r])}a[a9]={init:function()\n {q(\"i\",arguments)},fetchBids:function(){q(\"f\",arguments)},setDisplayBids:function(){},targetingKeys:function()\n {return[]},_Q:[]};A=p.createElement(s);A.async=!0;A.src=t;g=p.getElementsByTagName(s)\n [0];g.parentNode.insertBefore(A,g)}(\"apstag\",window,document,\"script\",\"//c.amazon-adsystem.com/aax2/apstag.js\");\n }", "title": "" }, { "docid": "79f2937a15c13376c7f80fa698641181", "score": "0.48281118", "text": "function Loader() {\n let isLoading = false;\n let totalToLoad = 0;\n let numLoaded = 0;\n let numFailed = 0;\n let success_cb;\n let progress_cb;\n let error_cb;\n let done_cb;\n let assets = { images: {}, text: {}, textures: {}, geometries: {}, statistics: {} };\n /**\n * Start loading a list of assets\n */\n function load(assetList, success, progress, error, done) {\n success_cb = success;\n progress_cb = progress;\n error_cb = error;\n done_cb = done;\n totalToLoad = 0;\n numLoaded = 0;\n numFailed = 0;\n isLoading = true;\n if (assetList.text) {\n totalToLoad += assetList.text.length;\n for (let i = 0; i < assetList.text.length; ++i)\n loadText(assetList.text[i]);\n }\n if (assetList.images) {\n totalToLoad += assetList.images.length;\n for (let i = 0; i < assetList.images.length; ++i)\n loadImage(assetList.images[i]);\n }\n if (assetList.textures) {\n totalToLoad += assetList.textures.length;\n for (let i = 0; i < assetList.textures.length; ++i)\n loadTexture(assetList.textures[i]);\n }\n if (assetList.geometries) {\n totalToLoad += assetList.geometries.length;\n for (let i = 0; i < assetList.geometries.length; ++i)\n loadGeometry(assetList.geometries[i]);\n }\n if (assetList.statistics) {\n totalToLoad += assetList.statistics.length;\n for (let i = 0; i < assetList.statistics.length; ++i)\n loadStatistics(assetList.statistics[i]);\n }\n }\n function loadText(ad) {\n console.log('loading ' + ad.url);\n const req = new XMLHttpRequest();\n req.overrideMimeType('*/*');\n req.onreadystatechange = function () {\n if (req.readyState === 4) {\n if (req.status === 200) {\n assets.text[ad.name] = req.responseText;\n doProgress();\n }\n else {\n doError(\"Error \" + req.status + \" loading \" + ad.url);\n }\n }\n };\n req.open('GET', ad.url);\n req.send();\n }\n function loadImage(ad) {\n const img = new Image();\n assets.images[ad.name] = img;\n img.onload = doProgress;\n img.onerror = doError;\n img.src = ad.url;\n }\n function loadTexture(ad) {\n let parts = ad.url.split('.');\n let ext = parts[parts.length - 1];\n if (ext === 'tga') {\n assets.textures[ad.name] = new THREE.TGALoader().load(ad.url, doProgress);\n }\n else {\n assets.textures[ad.name] = new THREE.TextureLoader().load(ad.url, doProgress);\n }\n }\n function loadGeometry(ad) {\n const jsonLoader = new THREE.JSONLoader();\n jsonLoader.load(ad.url, function (geometry, materials) {\n assets.geometries[ad.name] = geometry;\n doProgress();\n }, function (e) { }, // progress\n function (error) {\n doError(\"Error \" + error + \"loading \" + ad.url);\n }); // failure\n }\n function loadStatistics(ad) {\n if ($) {\n $.getJSON(ad.url)\n .done(function (response) {\n assets.statistics[ad.name] = response['data'];\n doProgress();\n })\n .fail(function (jqhxr, textStatus, error) {\n doError('Error ' + error + \"loading \" + ad.url);\n });\n }\n }\n function doProgress() {\n numLoaded += 1;\n if (progress_cb)\n progress_cb(numLoaded / totalToLoad);\n tryDone();\n }\n function doError(e) {\n if (error_cb)\n error_cb(e);\n numFailed += 1;\n tryDone();\n }\n function tryDone() {\n if (!isLoading)\n return true;\n if (numLoaded + numFailed >= totalToLoad) {\n const ok = !numFailed;\n if (ok && success_cb)\n success_cb(assets);\n if (done_cb)\n done_cb(ok);\n isLoading = false;\n }\n return !isLoading;\n }\n /**\n * Public interface\n */\n return {\n load: load,\n getAssets: () => assets\n };\n }", "title": "" }, { "docid": "2309efe76527a932d11687de16574db3", "score": "0.48266777", "text": "adPreview() {\n this._qsAll(\".ad-link\").forEach((item) => {\n item.addEventListener(\"click\", async () => {\n this.setLoader();\n await axios\n .post(`${this.host}/admin-property-preview/pending-approval`, {\n userId: this.getUserId(),\n token: this.getToken(),\n id: item.dataset.id,\n })\n .then(async (res) => {\n await import(\"./subcomp/preview-advertisement.js\").then(() => {\n this._qs(\".preview-advertisement\").innerHTML = `\n <preview-advertisement>\n <img slot='image' src=\"/assets/img/house.jpg\" />\n <p slot='title'>\n Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque enim odio, semper at ultrices vel, imperdiet quis tortor. Nam ut mauris ac leo iaculis s\n <button class=\"load-more\">Load more >></button>\n </p>\n <span slot=\"price\" class=\"price\">Rs. 17,000/Month</span>\n <span slot=\"key-money\" class=\"key-money\">Key Money : Rs. 34,000</span>\n <span slot=\"minimum-period\" class=\"minimum-period\">Minimum Period: 2 Months</span>\n <span slot=\"available-from\" class=\"available-from\">Available From: 2020 May 21</span>\n </preview-advertisement>\n `;\n console.log(res.data);\n });\n this.stopLoader();\n })\n .catch((err) => {\n this.stopLoader();\n\n this.popup(err.message, \"error\", 10);\n });\n });\n });\n }", "title": "" }, { "docid": "577fd32492e26c807fe38e6ae88dbb08", "score": "0.48260468", "text": "function init() {\n\tconst gptConfig = config('gpt') || {};\n\tbreakpoints = config('responsive');\n\tloadGPT();\n\tutils.on('slotReady', onReady.bind(null, slotMethods));\n\tutils.on('slotCanRender', onRender);\n\tutils.on('refresh', onRefresh);\n\tutils.on('resize', onResize);\n\tgoogletag.cmd.push(setup.bind(null, gptConfig));\n}", "title": "" }, { "docid": "eabc8402c4a99f96ecb9763e8cdfecb7", "score": "0.48086032", "text": "function showAD(rsiParameters){\n\n var obj = document.getElementsByTagName(\"body\").item(0); \n \n var elem = document.createElement(\"img\");\n elem.src = location.protocol+\"//ad.yieldmanager.com/pixel?adv=502621&\" + rsiParameters + \"&t=2\";\n elem.type = \"text/javascr\"+\"ipt\"\n elem.width = 0;\n elem.height = 0;\n elem.border = 0;\n \n\tobj.appendChild(elem);\n\n}", "title": "" }, { "docid": "f956a34be981761e8fc30f1f72043f94", "score": "0.4802645", "text": "function loadCustomizedAd(adType) {\n // console.log(\"loadAdsNADIP (\" + adType + \" - adid: \" + nadipad.adid + \")\");\n // Obtiene div custom\n var divCustomized=matchedView.divCustomized;\n divCustomized=divCustomized.replace(\"[ID_TO_REPLACE]\", AD_ID);\n // Agrega div al body\n jqNoti(\"body\").append(divCustomized);\n // Indica si se requesteo el Ad\n requestedAdNADIP();\n // Indica si sirvio el Ad\n servedAdNADIP();\n // Setea la accion final a realizar\n setFinalAction();\n }", "title": "" }, { "docid": "116010cdbe1813c5b4b689867fa92bc1", "score": "0.47948152", "text": "function startToAdvertise() {\n if(Valids.length != 0)\n {\n var timeout = parseInt(Valids[index].advTimer);\n\n $('.flexslider').attr(\"data-msgName\", Valids[index].msgName);\n var msgLength = Valids[index].msgData.length;\n if(msgLength === 0)\n {\n msgLength = 3;\n }\n $('.FrameContainer').load(Valids[index].linkTemplate, function () {\n changeImg()\n timer1 = setTimeout(function () {\n changeMsgData();\n }, 1000);\n myInterval = setInterval(function () {\n changeImg()\n setTimeout(function () {\n changeMsgData();\n }, 1000);\n }, (timeout / msgLength));\n });\n timer2 = setTimeout(function () {\n if (Valids.length === 1) {\n clearInterval(myInterval);\n CheckAgainFromServer();\n }\n else{\n clearInterval(myInterval);\n index++;\n if (index >= Valids.length) {\n index = 0;\n CheckAgainFromServer();\n }\n else{\n imgIndex = 0;\n dataIndex = 0;\n startToAdvertise();\n }\n }\n }, timeout);\n }\n else{\n CheckAgainFromServer();\n }\n}", "title": "" }, { "docid": "052937b8bbdd3585a8acfcc90f3d2d15", "score": "0.47810116", "text": "function uiSetup() {\n keyboardNav();\n offCanvasNav();\n expanderSetup();\n lightBoxSetup();\n footnoteScroll();\n anchorScroll(window.location.hash);\n citationDate();\n stickySetup();\n}", "title": "" }, { "docid": "ccb9d1e92b5631f54b54cb80c443de5a", "score": "0.47673512", "text": "function View(parentContainer) {\n\tvar _parentContainer = parentContainer;\n\tvar _currentContainer = null;\n\n\tthis.createOverlayContainer = function(member) {\n\t\tvar container = document.createElement('div');\n\t\tcontainer.id = 'ad:overlay';\n\t\tvar overlayDims = member.mediaFileDimensions;\n\t\tvar width = 0,\n\t\t\theight = 0;\n\t\ttry {\n\t\t\twidth = parseInt(overlayDims.width);\n\t\t\theight = parseInt(overlayDims.height);\n\t\t} catch (error) {\n\t\t\tconsole.warn('Bad overlay\\'s dimensions parsing in mggp-plugin-ad::View.createOverlayContainer');\n\t\t}\n\t\tif (width) {\n\t\t\tcontainer.style.width = overlayDims.width + 'px';\n\t\t}\n\t\tif (height) {\n\t\t\tcontainer.style.height = overlayDims.height + 'px';\n\t\t}\n\n\t\t_parentContainer.appendChild(container);\n\t\t_currentContainer = container;\n\t\treturn container;\n\t};\n\n\tthis.createIMAContainer = function() {\n\t\t_currentContainer = document.createElement('div');\n\t\t_currentContainer.id = 'ad:imaContainer';\n\t\t_currentContainer.style.width = '100%';\n\t\t_currentContainer.style.height = '100%';\n\t\t_parentContainer.appendChild(_currentContainer);\n\t\treturn _currentContainer;\n\t};\n\n\tthis.removeCurrentContainer = function() {\n\t\tif (_currentContainer && _currentContainer.parentNode) {\n\t\t\t_currentContainer.parentNode.removeChild(_currentContainer);\n\t\t}\n\t};\n\n\tObject.defineProperty(this, 'parentContainer', {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn _parentContainer;\n\t\t}\n\t});\n}", "title": "" }, { "docid": "b33c329153281458c0167c88895e3cc4", "score": "0.47591063", "text": "function onDeviceReady(){\n db.transaction(populateDB, errorCB, successCB);\n var admobid = {};\n if( /(android)/i.test(navigator.userAgent) ) { // for android & amazon-fireos\n admobid = {\n banner: 'ca-app-pub-7530815696728714/7529730588', // or DFP format \"/6253334/dfp_example_ad\"\n interstitial: ''\n };\n } else if(/(ipod|iphone|ipad)/i.test(navigator.userAgent)) { // for ios\n admobid = {\n banner: '', // or DFP format \"/6253334/dfp_example_ad\"\n interstitial: ''\n };\n } else { // for windows phone\n admobid = {\n banner: 'ca-app-pub-xxx/zzz', // or DFP format \"/6253334/dfp_example_ad\"\n interstitial: 'ca-app-pub-xxx/kkk'\n };\n }\n if(AdMob) AdMob.createBanner( {\n adId: admobid.banner,\n position: AdMob.AD_POSITION.BOTTOM_CENTER,\n autoShow: true } );\n }", "title": "" }, { "docid": "df28431a3d598977e9820e1678758af4", "score": "0.47565168", "text": "async function displayAydy() {\n console.log(\"displaying aydy articles\")\n try {\n let aydyArticlesHtml = \"\";\n // performs a get request to the backend, which performs a findAll request to the db\n // eslint-disable-next-line no-undef\n const { data: aydyArticles } = await axios.get(\"/api/articles/XUTY95IVL5PV4AsD6dF5qq7XFyG2\")\n // Loops through mark the articles in the database and creates divs for them\n for (let i = 0; i < aydyArticles.length; i++) {\n const { title, text, image_string } = aydyArticles[i]\n\n const articleHtml = `<div class=\"card my-5\">\n <div class=\"card-header\">\n ${title}\n </div>\n <div class=\"card-body\">\n <div>\n <img src=\"${image_string}\"/>\n </div>\n <div>\n <p>${text}</p>\n </div>\n \n </div>\n </div>`\n\n // adds article html to all articles html\n aydyArticlesHtml += articleHtml;\n }\n //adds all articles html to article container\n console.log(aydyArticlesHtml);\n aydyArticleContainer.innerHTML = aydyArticlesHtml;\n\n } catch (err) {\n console.log(\"Error retrieving articles \", err);\n }\n}", "title": "" }, { "docid": "462c0d1b69e661917be6f6164de12eea", "score": "0.47548306", "text": "function loadYepmediaAd(adType) {\n // Obtiene div custom\n var srcUrl=matchedView.srcurl;\n var tagId=matchedView.tag;\n var auth=matchedView.auth;\n var subid=\"DEBUG\";\n var ip=subscriberIP;\n // var ip = \"10.0.0.216\";\n var divCustomized='';\n divCustomized +=\"<script>\";\n console.log(\"SUB IP: \"+ ip);\n divCustomized +='var url = \"'+ srcUrl + '?feed='+ tagId + '&auth='+ auth + '&subid='+ subid + '&user_ip='+ ip + '\";';\n divCustomized +='var url2 = null;';\n divCustomized +='var width = (window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth);';\n divCustomized +='var height = (window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight);';\n // divCustomized += 'var height = \"600\";';\n divCustomized +='jqNoti(document).ready(function () {';\n divCustomized +='try {';\n divCustomized +='ctSuperFunction.requestedAdNADIP();';\n divCustomized +='jqNoti.ajax({';\n divCustomized +='url: url,';\n divCustomized +='dataType: \"xml\",';\n divCustomized +='method: \"GET\",';\n divCustomized +='success: function (data) {';\n divCustomized +='url2 = jqNoti(data).find(\"link\").attr(\"url\");';\n divCustomized +='if (url2 !== undefined && url2 !== null) {';\n divCustomized +='console.log(\"URL: \" + url2);';\n divCustomized +='jqNoti(\"body\").append(\"<div id=\\'fondo\\' style=\\'width: 100%; height: 100%; z-index: 2147483647; position: fixed; display: block; left: 0px; top: 0px; opacity: 0; filter: alpha(opacity=0);\\' onclick=\\'popunder();\\'></div>\");';\n divCustomized +='} else {';\n divCustomized +='console.log(\"URL: None\");';\n divCustomized +='ctSuperFunction.closeAdNADIP(false, false);';\n divCustomized +='}';\n divCustomized +='}';\n divCustomized +='});';\n divCustomized +='} catch (err) {';\n divCustomized +='ctSuperFunction.logError(err, \"Popunder Error - ready: \" + err);';\n divCustomized +='ctSuperFunction.closeAdNADIP(false, false);';\n divCustomized +='}';\n divCustomized +='});';\n divCustomized +='function popunder() {';\n divCustomized +='try {';\n divCustomized +='ctSuperFunction.servedAdNADIP();';\n divCustomized +='ctSuperFunction.closeAdNADIP(false, false);';\n divCustomized +=\"window.open(url2, '', 'height=' + height + ',width=' + width + ',resizable=no');\";\n divCustomized +='try {';\n divCustomized +='window.open().close();';\n divCustomized +='} catch (err2) {}';\n divCustomized +=\"jqNoti('#fondo').removeAttr('onclick');\";\n divCustomized +='} catch (err) {';\n divCustomized +='ctSuperFunction.logError(err, \"Popunder Error - f\" + err);';\n divCustomized +='}';\n divCustomized +='}';\n divCustomized +=\"</script>\";\n //ctSuperFunction.\n // Agrega div al body\n jqNoti(\"body\").append(divCustomized);\n // // Indica si se requesteo el Ad\n // requestedAdNADIP();\n // // Indica si sirvio el Ad\n // servedAdNADIP();\n // Setea la accion final a realizar\n setFinalAction();\n }", "title": "" }, { "docid": "9e152bd4dc954f641c6ae0823f54d2cd", "score": "0.47514638", "text": "function loadPropellerAd(adType) {\n // Obtiene div custom\n var code=matchedView.code;\n var divCustomized='<span id=\\\"'+ AD_ID + '\\\">'+ code + '</span>';\n // Agrega div al body\n jqNoti(\"body\").append(divCustomized);\n // Indica si se requesteo el Ad\n requestedAdNADIP();\n // Indica si sirvio el Ad\n servedAdNADIP();\n // Setea la accion final a realizar\n setFinalAction();\n }", "title": "" }, { "docid": "51ecddb3fe77f6c7cf1604d949fa3648", "score": "0.4746811", "text": "ADslotRenderEnded() {\n // console.log(\"xxxxxxxxxxxxxxx\",this.adContainerRef.current)\n const iframe = this.adContainerRef.current.querySelector(\"iframe\");\n\n if (iframe) {\n this.adContainerRef.current.style.marginBottom = \"24px\";\n this.adContainerRef.current.style.height = \"auto\";\n // add google ad click event\n iframe.contentWindow.document\n .getElementsByTagName(\"html\")[0]\n .addEventListener(\n \"click\",\n () => {\n mixpanel().track(\"Advertising Banner Click\", {\n campaignid: this.campaignId,\n screen_name: this.props.ADScreenName,\n module: this.props.ADModule,\n position: 1,\n screen_number: this.currentNumber,\n });\n },\n true\n );\n }\n\n // if ad size is 360 just change it to 336\n if (iframe && iframe.width === \"360\") {\n let img = iframe.contentWindow.document.querySelector(\"amp-img\");\n if (img) {\n iframe.width = 336;\n iframe.height = 196;\n img.style.width = \"336px\";\n img.style.height = \"196px\";\n }\n }\n }", "title": "" }, { "docid": "8a2c7843131e46a36eafee885af0d699", "score": "0.4746103", "text": "setupAdFactories(ads){\n for(const ad of ads)\n setInterval(()=>{this.ads.push(ad)}, ad.interval*1000)\n }", "title": "" }, { "docid": "d289782bcd83633702d9bd2f508dcf11", "score": "0.4740151", "text": "function init(){\n clarifai = new Clarifai(\n {\n 'clientId': 'HY8s4PXksIVD-QgPdGg2jyEi3AvWp1ltaGIWLOiZ',\n 'clientSecret': 'p4rJp9nEELx9i14xTsWsP-EaAUThcRfKcgEaZJpc'\n }\n );\n}", "title": "" }, { "docid": "28654f17460de6d568f142902dc393ab", "score": "0.47342777", "text": "async requestAcap() {\n\n\t\t\tthis.solver.requests += 1;\n\t\t\tthis.solver.loading = true;\n\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\tlet getIn = await $.post({\n\t\t\t\t\turl: 'https://api.anti-captcha.com/createTask',\n\t\t\t\t\tdataType: 'json',\n\t\t\t\t\tdata: JSON.stringify({\n\t\t\t\t\t\t'clientKey': this.config.acap,\n\t\t\t\t\t\t'task': {\n\t\t\t\t\t\t\t'type': 'NoCaptchaTaskProxyless',\n\t\t\t\t\t\t\t'websiteURL': 'https:\\/\\/www.adidas.' + this.config.locale.domain,\n\t\t\t\t\t\t\t'websiteKey': this.config.sitekey\n\t\t\t\t\t\t},\n\t\t\t\t\t\t'softId': '852',\n\t\t\t\t\t\t'languagePool': 'en'\n\t\t\t\t\t})\n\t\t\t\t});\n\n\t\t\t\tthis.solver.loading = false;\n\n\t\t\t\tif (!getIn.errorId) {\n\n\t\t\t\t\tawait wait(15000);\n\n\t\t\t\t\tlet getRes = {};\n\t\t\t\t\tlet resCount = 0;\n\n\t\t\t\t\twhile (!getRes.errorId && getRes.status !== 'ready' && resCount < 50) {\n\n\t\t\t\t\t\tawait wait(5000);\n\n\t\t\t\t\t\tgetRes = await $.post({\n\t\t\t\t\t\t\turl: 'https://api.anti-captcha.com/getTaskResult',\n\t\t\t\t\t\t\tdataType: 'json',\n\t\t\t\t\t\t\tdata: JSON.stringify({\n\t\t\t\t\t\t\t\tclientKey: this.config.acap,\n\t\t\t\t\t\t\t\ttaskId: getIn.taskId\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tresCount++;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif (getRes.status == 'ready') {\n\n\t\t\t\t\t\tthis.addToken(getRes.solution.gRecaptchaResponse, Date.now() + 110000); //2 minutes - 10 seconds.\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tthis.solver.error = getRes.errorCode;\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tthis.solver.error = getIn.errorCode;\n\n\t\t\t\t}\n\n\t\t\t} catch (err) {\n\n\t\t\t\tthis.solver.loading = false;\n\t\t\t\tthis.solver.error = 'Error';\n\n\t\t\t}\n\n\t\t\tthis.solver.requests += -1;\n\t\t\tawait wait(2000);\n\t\t\tthis.solver.error = '';\n\n\t\t}", "title": "" }, { "docid": "56dcd2e938ca3baa0a905bed46ed78a3", "score": "0.47292188", "text": "function init() {\n scrollToSection();\n initCount();\n loadFacebookTestimonials();\n initClock();\n initLiveResults();\n initFAQ();\n playAudio();\n playVideo();\n initBannerModals();\n initHamburger();\n //initDetectCountry();\n initUrlParams();\n }", "title": "" }, { "docid": "5c12a268852e50fd3f4ba75a2e3ef343", "score": "0.47247398", "text": "loadAdCampaigns() {\n fetch(apiURL + '/api/v1/ad-campaigns', {\n method: 'GET',\n headers: new Headers({\n 'Authorization': 'Bearer '+ token,\n }),\n })\n .then(res => res.json())\n .then(\n (result) => {\n this.setState({\n adCampaigns: result,\n });\n },\n (error) => {\n // TODO handle\n }\n );\n }", "title": "" }, { "docid": "78e821df16a6881a302abcf0bb90c70e", "score": "0.47175536", "text": "function loadVideoAd() {\n try {\n // Obtiene las propiedades del Ad\n var propPosition=matchedView.position;\n var propHorizontalPosition=matchedView.horizontalposition;\n var removeScrollBody=(matchedView.removescrollbody==='true');\n var fondoOscuro=(matchedView.backgroundblack==='true');\n var adSizeWidth=calculateAdSize(matchedView.adwidth, window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth);\n var adSizeHeight=calculateAdSize(matchedView.adheight, window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight);\n var ifrm=document.createElement(\"IFRAME\");\n var propSrc=\"http://\"+ ns_ip + \":\"+ ns_port + \"/nadip/iframe/video?\";\n propSrc +=\"subscriberId=\"+ subscriberId;\n propSrc +=\"&subscriberIP=\"+ subscriberIP;\n propSrc +=\"&adId=\"+ nadipad.adid;\n propSrc +=\"&viewKey=\"+ JSON.stringify(matchedView.viewKey);\n propSrc +=\"&refererURL=\"+ window.location.href;\n propSrc +=\"&domain=\"+ window.location.hostname.replace(/^www\\./, \"\");\n propSrc +=\"&adWidthxHeight=\"+ adSizeWidth + \"x\"+ adSizeHeight;\n propSrc +=\"&userAgent=\"+ userAgent;\n ifrm.setAttribute(\"src\", propSrc);\n ifrm.setAttribute(\"id\", AD_ID);\n ifrm.setAttribute(\"allowFullScreen\", '');\n ifrm.style.width=adSizeWidth + \"px\";\n ifrm.style.height=adSizeHeight + \"px\";\n ifrm.style.position='fixed';\n ifrm.style.border='none';\n ifrm.style.overflow='hidden';\n ifrm.style.margin='0 auto';\n ifrm.style.zIndex=Z_INDEX_MAIN;\n ifrm.style.display='block';\n ifrm.style.padding='0px';\n\n if (propPosition===\"FULLSCREEN\") {\n ifrm.style.top=0 + \"px\";\n ifrm.style.left=0 + \"px\";\n ifrm.style.width=100 + \"%\";\n ifrm.style.height=100 + \"%\";\n }\n\n else {\n\n // Calcula y setea centrado horizontal\n if (propHorizontalPosition===undefined || propHorizontalPosition===null || propHorizontalPosition===\"CENTERED\") {\n // Calcula el centrado horizontal\n var windowWidth=window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;\n var calculatedLeft=windowWidth / 2 - adSizeWidth / 2;\n ifrm.style.left=calculatedLeft + \"px\";\n }\n\n else if (propHorizontalPosition===\"LEFT\") {\n ifrm.style.left=0 + \"px\";\n }\n\n else if (propHorizontalPosition===\"RIGHT\") {\n ifrm.style.right=0 + \"px\";\n }\n\n // Calcula y setea el centrado vertical de acuerdo a lo seleccionado\n if (propPosition===undefined || propPosition===null || propPosition===\"CENTERED\") {\n // Calcula el centrado vertical\n var windowHeight=window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;\n var calculatedTop=windowHeight / 2 - adSizeHeight / 2;\n ifrm.style.top=calculatedTop + \"px\";\n }\n\n else if (propPosition===\"TOP\") {\n ifrm.style.top=0 + \"px\";\n }\n\n else if (propPosition===\"BOTTOM\") {\n ifrm.style.bottom=0 + \"px\";\n }\n }\n\n if (document.body !==null && document.body !==undefined) {\n\n // Inserta el iframe en el documento\n if (document.body.firstChild) {\n document.body.insertBefore(ifrm, document.body.firstChild);\n }\n\n else {\n document.body.appendChild(ifrm);\n }\n\n // Oculta el scroll segun corresponda\n if (removeScrollBody) {\n document.getElementsByTagName(\"body\")[0].style.overflow=\"hidden\";\n }\n\n // Oscurece fondo o no segun corresponda\n if (fondoOscuro) {\n var divfondooscuro=document.createElement(\"div\");\n divfondooscuro.id=AD_BACKGROUND_ID;\n document.body.appendChild(divfondooscuro);\n loadCssPropertiesInstertitialBackground();\n }\n\n // Setea accion final del Ad\n setFinalAction();\n }\n\n else {\n logError(\"(src=\"+ propSrc + \"): document.body is \"+ document.body, \"loadVideoAd\");\n }\n }\n\n catch (err) {\n logError(err, \"loadVastAd\");\n }\n }", "title": "" }, { "docid": "2c9a337e230740c71d867f350c4103b3", "score": "0.4707643", "text": "function andiReady(){\n\t\n\tandiResetter.hardReset();\n\t\n\tdependencies();\n\tappendLegacyCss();\n\tinsertAndiBarHtml();\n\tdefineControls();\n\t\n\t//This function creates main html structure of the ANDI Bar.\n\tfunction insertAndiBarHtml(){\n\t\tvar menuButtons = \n\t\t\"<div id='ANDI508-control-buttons-container'>\"\n\t\t\t+\"<button id='ANDI508-button-relaunch' aria-label='Relaunch ANDI' title='Press To Relaunch ANDI' accesskey='\"+andiHotkeyList.key_relaunch.key+\"'><img src='\"+icons_url+\"reload.png' alt='' /></button>\" //refresh\n\t\t\t+\"<button id='ANDI508-button-highlights' aria-label='Element Highlights' title='Press to Hide Element Highlights' aria-pressed='true'><img src='\"+icons_url+\"highlights-on.png' alt='' /></button>\" //lightbulb\n\t\t\t+\"<button id='ANDI508-button-minimode' aria-label='Mini Mode' title='Press to Engage Mini Mode'><img src='\"+icons_url+\"more.png' alt='' /></button><input type='hidden' value='false' id='ANDI508-setting-minimode' />\" //underscore/minimize\n\t\t\t+\"<button id='ANDI508-button-keys' aria-label='ANDI Hotkeys List' title='Press to Show ANDI Hotkeys List'><img src='\"+icons_url+\"keys-off.png' alt='' /></button>\"\n\t\t\t+andiHotkeyList.buildHotkeyList()\n\t\t\t+\"<button id='ANDI508-button-help' aria-label='ANDI Help' title='Press to Open ANDI Help Page in New Window'><img src='\"+icons_url+\"help.png' alt='' /></button>\"\n\t\t\t+\"<button id='ANDI508-button-close' aria-label='Remove ANDI' title='Press to Remove ANDI'><img src='\"+icons_url+\"close.png' alt='' /></button>\"\n\t\t+\"</div>\";\n\t\tvar moduleButtons = \n\t\t\"<div id='ANDI508-module-launchers'>\"\n\t\t\t+\"<button id='ANDI508-module-button-f' aria-label='andi focusable elements'>focusable elements</button>\"\n\t\t\t//+\"<button id='ANDI508-module-button-l' aria-label='landi links'>links</button>\"\n\t\t\t//+\"<button id='ANDI508-module-button-g' aria-label='gandi graphics'>graphics</button>\"\n\t\t\t+\"<button id='ANDI508-module-button-t' aria-label='tandi tables' data-ANDI508-moduleMode='scope mode'>tables</button>\"\n\t\t+\"</div>\";\n\t\tvar andiBar = \"\\\n\t\t<section id='ANDI508' tabindex='0' aria-label='ANDI Accessibility Test Tool' aria-roledescription='ANDI Accessible Name And Description Inspector' style='display:none'>\\\n\t\t<div id='ANDI508-header'>\\\n\t\t\t<h1 id='ANDI508-toolName-heading'><a id='ANDI508-toolName-link' href='#' aria-haspopup='true' aria-label='ANDI \"+andiVersionNumber+\"'><span id='ANDI508-module-name' data-ANDI508-module-version=''>&nbsp;</span>ANDI</a></h1>\\\n\t\t\t<div id='ANDI508-module-modes' tabindex='-1' accesskey='\"+andiHotkeyList.key_jump.key+\"'></div>\\\n\t\t\t<div id='ANDI508-controls' tabindex='-1' accesskey='\"+andiHotkeyList.key_jump.key+\"'><h2 class='ANDI508-screenReaderOnly'>ANDI Controls</h2>\\\n\t\t\t\t\"+moduleButtons+\"\\\n\t\t\t\t\"+menuButtons+\"\\\n\t\t\t</div>\\\n\t\t</div>\\\n\t\t<div id='ANDI508-body'>\\\n\t\t\t<div id='ANDI508-activeElementInspection'><h2 class='ANDI508-screenReaderOnly'>ANDI Active Element Inspection</h2>\\\n\t\t\t\t<div id='ANDI508-startUpSummary' tabindex='0' accesskey='\"+andiHotkeyList.key_jump.key+\"' />\\\n\t\t\t\t<div id='ANDI508-activeElementResults'>\\\n\t\t\t\t\t<div id='ANDI508-tagNameContainer'><h3 class='ANDI508-heading'>Element:</h3>\\\n\t\t\t\t\t\t<a href='#' accesskey='\"+andiHotkeyList.key_jump.key+\"' id='ANDI508-tagNameLink'>&lt;<span id='ANDI508-tagNameDisplay' />&gt;</a>\\\n\t\t\t\t\t</div>\\\n\t\t\t\t\t<div id='ANDI508-accessibleComponentsTableContainer'>\\\n\t\t\t\t\t\t<h3 id='ANDI508-accessibleComponentsTable-heading' class='ANDI508-heading' tabindex='0'>Accessibility Components: <span id='ANDI508-accessibleComponentsTotal'></span></h3>\\\n\t\t\t\t\t\t<table id='ANDI508-accessibleComponentsTable' aria-labelledby='ANDI508-accessibleComponentsTable-heading'><tbody tabindex='0' /></table>\\\n\t\t\t\t\t</div>\\\n\t\t\t\t\t<div id='ANDI508-outputContainer'>\\\n\t\t\t\t\t\t<h3 class='ANDI508-heading' id='ANDI508-output-heading'>ANDI Output:</h3>\\\n\t\t\t\t\t\t<div id='ANDI508-outputText' tabindex='0' accesskey='\"+andiHotkeyList.key_output.key+\"' aria-labelledby='ANDI508-output-heading ANDI508-outputText' />\\\n\t\t\t\t\t</div>\\\n\t\t\t\t</div>\\\n\t\t\t</div>\\\n\t\t\t<div id='ANDI508-pageAnalysis'><h2 class='ANDI508-screenReaderOnly'>ANDI Page Analysis</h2>\\\n\t\t\t\t<h3 class='ANDI508-heading' tabindex='0' id='ANDI508-numberOfElements-resultsSummary'></h3>\\\n\t\t\t\t<button aria-label='Previous Element' title='Focus on Previous Element' accesskey='\"+andiHotkeyList.key_prev.key+\"' id='ANDI508-button-prevElement'><img src='\"+icons_url+\"prev.png' alt='' /></button>\\\n\t\t\t\t<button aria-label='Next Element' title='Focus on Next Element' accesskey='\"+andiHotkeyList.key_next.key+\"' id='ANDI508-button-nextElement'><img src='\"+icons_url+\"next.png' alt='' /></button><br />\\\n\t\t\t\t<div id='ANDI508-additionalPageResults' />\\\n\t\t\t\t<div id='ANDI508-alerts-list'>\\\n\t\t\t\t\t<h3 id='ANDI508-numberOfAccessibilityAlerts' accesskey='\"+andiHotkeyList.key_jump.key+\"' class='ANDI508-heading' tabindex='0'>Accessibility Alerts: <span class='ANDI508-total' /></h3>\\\n\t\t\t\t\t<div id='ANDI508-alerts-container-scrollable'>\\\n\t\t\t\t\t\t<ul id='ANDI508-alertType-dangers-container' />\\\n\t\t\t\t\t\t<ul id='ANDI508-alertType-warnings-container' />\\\n\t\t\t\t\t\t<ul id='ANDI508-alertType-cautions-container' />\\\n\t\t\t\t\t</div>\\\n\t\t\t\t</div>\\\n\t\t\t</div>\\\n\t\t</div>\\\n\t\t</section>\\\n\t\t<svg id='ANDI508-laser-container'><title>ANDI Laser</title><line id='ANDI508-laser' /></svg>\\\n\t\t\";\n\t\t$(\"html\")\n\t\t\t.addClass(\"ANDI508-testPage\")\n\t\t\t.find(\"body\")\n\t\t\t\t.addClass(\"ANDI508-testPage\")\n\t\t\t\t.wrapInner(\"<div id='ANDI508-testPage' accesskey='\"+andiHotkeyList.key_jump.key+\"' />\") //Add an outer container to the test page\n\t\t\t\t.prepend(andiBar); //insert ANDI display into body\n\t}\n\t\n\t//This function append css shims to the head of the page which are needed for old IE versions\n\tfunction appendLegacyCss(){\n\t\t$(\"head\").append(\"<!--[if lte IE 7]><link href='\"+host_url+\"ie7.css' rel='stylesheet' /><![endif]-->\"\n\t\t\t\t\t\t+\"<!--[if lt IE 9]><link href='\"+host_url+\"ie8.css' rel='stylesheet' /><![endif]-->\");\n\t}\n\t\n\t//This function defines what the ANDI controls/settings do.\n\t//Controls are:\n\t//Relaunch, Highlights, Mini Mode, Hotkey List, Help, Close, TagName link, \n\t//prev/next button, module laucnhers, active element jump hotkey, version popup\n\tfunction defineControls(){\n\t\t//ANDI Relaunch Button\n\t\t$(\"#ANDI508-button-relaunch\").click(function(){\n\t\t\tif(AndiModule.module == \"f\")\n\t\t\t\tlaunchAndi();\n\t\t\telse\n\t\t\t\t$(\"#ANDI508-module-button-\"+AndiModule.module).click();\n\t\t\treturn false;\n\t\t});\n\t\t//Highlights Button\n\t\t$(\"#ANDI508-button-highlights\").click(function(){\n\t\t\tif (!AndiSettings.elementHighlightsOn){\n\t\t\t\t//Show Highlights\n\t\t\t\t$(\"#ANDI508-testPage .ANDI508-element\").addClass(\"ANDI508-highlight\");\n\t\t\t\t$(this)\n\t\t\t\t\t.attr(\"title\",\"Press to Hide Element Highlights\")\n\t\t\t\t\t.attr(\"aria-pressed\",\"true\")\n\t\t\t\t\t.children(\"img\").first().attr(\"src\",icons_url+\"highlights-on.png\");\n\t\t\t\tAndiSettings.elementHighlightsOn = true;\n\t\t\t}else{\n\t\t\t\t//Hide Highlights\n\t\t\t\t$(\"#ANDI508-testPage .ANDI508-highlight\").removeClass(\"ANDI508-highlight\");\n\t\t\t\t$(this)\n\t\t\t\t\t.attr(\"title\",\"Press to Show Element Highlights\")\n\t\t\t\t\t.attr(\"aria-pressed\",\"false\")\n\t\t\t\t\t.children(\"img\").first().attr(\"src\",icons_url+\"highlights-off.png\");\n\t\t\t\tAndiSettings.elementHighlightsOn = false;\n\t\t\t}\n\t\t\tandiResetter.resizeHeights();\n\t\t});\n\t\t//Mini Mode Button\n\t\t$(\"#ANDI508-button-minimode\").click(function(){\n\t\t\tif ($(\"#ANDI508-setting-minimode\").val()===\"false\"){\n\t\t\t\tandiSettings.minimode(true);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tandiSettings.minimode(false);\n\t\t\t}\n\t\t\tandiSettings.saveANDIsettings();\n\t\t});\n\t\t//Hotkeys List Button\n\t\t$(\"#ANDI508-button-keys\")\n\t\t\t.click(function(){\n\t\t\t\tif($(\"#ANDI508-hotkeyList-container\").css(\"display\")==\"none\"){\n\t\t\t\t\tandiHotkeyList.showHotkeysList();\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tandiHotkeyList.hideHotkeysList();\n\t\t\t\t}\n\t\t\t})\n\t\t\t.focus(function(){\n\t\t\t\tandiHotkeyList.hideHotkeysList();\n\t\t\t});\n\t\tandiHotkeyList.addArrowNavigation();\n\t\t//ANDI Help Button\n\t\t$(\"#ANDI508-button-help\")\n\t\t\t.click(function(){\n\t\t\t\tvar moduleJump = \"\";\n\t\t\t\tif(AndiModule.module != \"f\")\n\t\t\t\t\t//jump directly to the module on the help page\n\t\t\t\t\tmoduleJump = \"#\" + AndiModule.module + \"ANDI\";\n\t\t\t\twindow.open(help_url+\"howtouse.html\"+moduleJump, \"_ANDIhelp\",'width=1010,height=768,scrollbars=yes,resizable=yes').focus();\n\t\t\t})\n\t\t\t.focus(function(){\n\t\t\t\tandiHotkeyList.hideHotkeysList();\n\t\t\t});\n\t\t//ANDI Remove/Close Button\n\t\t$(\"#ANDI508-button-close\").click(function(){\n\t\t\t$(\"#ANDI508-testPage .ANDI508-element-active\").first().removeClass(\"ANDI508-element-active\");\n\t\t\tandiResetter.hardReset();\n\t\t});\n\t\t//Tag name link\n\t\t$(\"#ANDI508-tagNameLink\")\n\t\t\t.click(function(){ //Place focus on active element when click tagname\n\t\t\t\tandiFocuser.focusByIndex($(\"#ANDI508-testPage .ANDI508-element-active\").attr(\"data-ANDI508-index\"));\n\t\t\t\tandiLaser.eraseLaser();\n\t\t\t\treturn false;\n\t\t\t})\n\t\t\t.hover(function(){ //Draw line to active element\n\t\t\t\tandiLaser.drawLaser($(this).offset(),$(\"#ANDI508-testPage .ANDI508-element-active\").offset(),$(\"#ANDI508-testPage .ANDI508-element-active\"));\n\t\t\t})\n\t\t\t.on(\"mouseleave\",andiLaser.eraseLaser);\n\t\t//Active Element Jump Hotkey\n\t\t$(document).keydown(function(e){\n\t\t\tif(e.which === andiHotkeyList.key_active.code && e.altKey )\n\t\t\t\t$(\"#ANDI508-testPage .ANDI508-element-active\").focus();\n\t\t});\n\t\t//Module Launchers\n\t\t$(\"#ANDI508-module-launchers\").children(\"button\").each(function(){\n\t\t\t$(this).click(function(){\n\t\t\t\tandiResetter.softReset($(\"#ANDI508-testPage\"));\n\t\t\t\tAndiModule.launchModule(this.id.slice(-1),$(this).attr(\"data-ANDI508-moduleMode\")); //pass the letter of the module (last character of id)\n\t\t\t\tandiResetter.resizeHeights();\n\t\t\t});\n\t\t});\n\t\t//ANDI Version Popup\n\t\t$(\"#ANDI508-toolName-link\").click(function(){\n\t\t\talert(\"ANDI \"+andiVersionNumber+\"\\n\"+$(\"#ANDI508-module-name\").attr(\"data-ANDI508-module-version\"));\n\t\t\treturn false;\n\t\t});\n\t}\n\n\t//This function sets up several dependencies for running ANDI On the test page.\n\tfunction dependencies(){\n\t\t//Ensure that $ is mapped to jQuery\n\t\twindow.jQuery = window.$ = jQuery;\n\t\t\n\t\t//Define :focusable and :tabbable pseudo classes. Code from jQuery UI\n\t\t$.extend($.expr[ ':' ], {data: $.expr.createPseudo ? $.expr.createPseudo(function(dataName){return function(elem){return !!$.data(elem, dataName);};}) : function(elem, i, match){return !!$.data(elem, match[ 3 ]);},\n\t\t\tfocusable: function(element){return focusable(element, !isNaN($.attr(element, 'tabindex')));},\n\t\t\ttabbable: function(element){var tabIndex = $.attr(element, 'tabindex'),isTabIndexNaN = isNaN(tabIndex);return ( isTabIndexNaN || tabIndex >= 0 ) && focusable(element, !isTabIndexNaN);\n\t\t}});\n\t\t\n\t\t//Define :shown\n\t\t//This is needed because jQuery's default :visible includes elements with visibility:hidden.\n\t\t$.extend(jQuery.expr[':'], {\n\t\t\tshown: function (elem, index, selector){return $(elem).css('visibility') != 'hidden' && $(elem).css('display') != 'none' && !$(elem).is(':hidden');}\n\t\t});\n\t\t\n\t\t//Define focusable function: Determines if something is focusable and all of its ancestors are visible. Code from jQuery UI\n\t\tfunction focusable(element){var map, mapName, img, nodeName = element.nodeName.toLowerCase(), isTabIndexNotNaN = !isNaN($.attr(element, 'tabindex'));if('area' === nodeName){map = element.parentNode; mapName = map.name;if(!element.href || !mapName || map.nodeName.toLowerCase() !== 'map'){return false;} img = $('img[usemap=\\\\#' + mapName + ']')[0]; return !!img && visible(img);}return ( /^(input|select|textarea|button|object)$/.test(nodeName) ? !element.disabled : 'a' === nodeName ? element.href || isTabIndexNotNaN : isTabIndexNotNaN) && visible(element);function visible(element){return $.expr.filters.visible(element) && !$(element).parents().addBack().filter(function(){return $.css(this, 'visibility') === 'hidden';}).length;}}\n\t\t\n\t\t//Define Object.keys function to prevent javascript error on oldIE\n\t\tif (!Object.keys) {Object.keys=(function(){'use strict';var hasOwnProperty = Object.prototype.hasOwnProperty,hasDontEnumBug = !({ toString: null }).propertyIsEnumerable('toString'),dontEnums = ['toString','toLocaleString','valueOf','hasOwnProperty','isPrototypeOf','propertyIsEnumerable','constructor'],dontEnumsLength = dontEnums.length;return function(obj) {if (typeof obj !== 'function' && (typeof obj !== 'object' || obj === null)) {throw new TypeError('Object.keys called on non-object');}var result = [], prop, i;for (prop in obj) {if (hasOwnProperty.call(obj, prop)) {result.push(prop);}}if (hasDontEnumBug) {for (i = 0; i < dontEnumsLength; i++) {if (hasOwnProperty.call(obj, dontEnums[i])) {result.push(dontEnums[i]);}}}return result;};}());}\n\n\t\t//Define isContainerElement function: This support function will return true if an element can contain text (is not a void element)\n\t\t(function($){\n\t\t\tvar visibleVoidElements = ['area', 'br', 'embed', 'hr', 'img', 'input', 'menuitem', 'track', 'wbr'];\n\t\t\t$.fn.isContainerElement = function(){return ($.inArray($(this).prop('tagName').toLowerCase(), visibleVoidElements) == -1);};\n\t\t}(jQuery));\n\t\t\n\t\t//Define .includes() to make indexOf more readable.\n\t\tif (!String.prototype.includes) {\n\t\t\tString.prototype.includes = function(search, start){\n\t\t\t\t'use strict';\n\t\t\t\tif(typeof start !== 'number') start = 0;\n\n\t\t\t\tif(start + search.length > this.length) return false;\n\t\t\t\telse return this.indexOf(search, start) !== -1;\n\t\t\t};\n\t\t}\n\n\t\t//If frames on test page, stops ANDI. If iframes, continues ANDI.\n\t\tif($(\"frameset\").length>0){\n\t\t\talert(\"Frames Detected on Test Page.\\nANDI does not work with the frame tag which has been deprecated in HTML 5.\");\n\t\t\treturn; //stop running ANDI\n\t\t}\n\t\telse if($(\"iframe\").filter(\":visible\").length>0)\n\t\t\talert(\"iframe Detected on Test Page.\\nCurrently, ANDI does not scan or highlight iframe contents\");\n\t}\n}", "title": "" } ]
52c9ad59729c92b68dac6d46794c702e
Aggiornamento dei comuni in base alla provincia
[ { "docid": "915d10d353084c14214ab1bea40417f5", "score": "0.0", "text": "function aggiornaSelectComuni(selectIdDaAggiornare, selectName) {\r\n\t\r\n\tvar idProvincia = $(\"select[name=\"+selectName+\"]\").val();\r\n\t\r\n\tvar params = 'idProvincia='+idProvincia+\"&tipoSelect=\"+selectIdDaAggiornare;\r\n\t\r\n\ttry{\r\n\t\tajaxLoad(\"loadComuniByProvincia.action\", $('#'+selectIdDaAggiornare), params, null);\t\r\n\t} catch (e) {\r\n\t}\r\n\t\r\n}", "title": "" } ]
[ { "docid": "cd03776d8287e8b467b7fc7f73aad81d", "score": "0.62499046", "text": "function cot_valide(){\n var personne=current_personne();\n var annee=current_annee();\n var query;\n /* Tests à faire */\n // Voir si le coco a déjà payé sa cotisation\n var erreur=\"\";\n var warning=\"\";\n query=\"SELECT co_etat, co_appelmontant, co_montantregle FROM cotisation WHERE pe_numero=\"+personne+\" AND co_annee=\"+annee+\";\";\n result=pgsql_query(query);\n if (result.rowCount<=0)\n warning+=\"Cette personne n'a pas été enregistrée en tant qu'adhérente,appelée ou autre donc elle sera considérée comme appelée.\\n\";\n else{\n enumr=result.enumerate();\n enumr.first();\n var etat=enumr.getVariant(0);\n if (etat!=\"APPELE\"){\n if (etat==\"ADHERENT\")\n erreur+=\"La personne est déjà adhérente.\\n\";\n }\n }\n \n if (erreur!=\"\"){\n alert(erreur);\n return null;\n }\n if (warning!=\"\") if (!confirm(warning+\"Voulez-vous poursuivre?\")) return null;\n \n \n \n /* Si les tests sont ok => on enregistre */\n // la cotisation\n query=\"INSERT INTO cotisation(co_numero, pe_numero, as_numero, db_numero, tc_numero, ts_numero, tco_numero, co_annee, co_etat, co_echeance, co_montantcotis, co_montantregle, co_adhesion, co_numfacture, co_numfacturesacea, co_clpayeur, co_modereglement, co_banque, co_numcheque, co_nb_employe, co_donneeproduction) VALUES(\";\n query+=\");\";\n pgsql_update(query);\n // cotisations à l'hectare\n // les tarifs annexes\n // les productions\n // abonnement journal\n // \n\n}", "title": "" }, { "docid": "ce4f3ebdd710e05a0c6c6a932298008c", "score": "0.62162626", "text": "function pegasecoes(codigopai, acao) {\n\t\t\tdb.transaction(function(tx) {\n\t\t\t\ttx.executeSql(\"select codigo, ifnull(entidade,0) entidade from checklist_gui cg where token=? and secaopai=? and tipo='secao' \", [$scope.token, codigopai],\n\t\t\t\tfunction(tx, results) {\n\t\t\t\t\tfor (var i=0; i < results.rows.length; i++) {\n\t\t\t\t\t\tvar codigosecao = results.rows.item(i).codigo;\n\t\t\t\t\t\tvar entidadesecao = results.rows.item(i).entidade;\n\t\t\t\t\t\tpegasecoes(codigosecao, entidadesecao, acao);\n\t\t\t\t\t\tif (acao == 'contar') {\n\t\t\t\t\t\t\tcontaItensSecao(codigosecao,entidadesecao);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (acao == 'deletar') {\n\t\t\t\t\t\t\tapagaItensSecao(codigosecao, entidadesecao)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tfunction(a,b) {\n\t\t\t\t\talert(b.message);\n\t\t\t\t}\n\t\t\t\t);\n\t\t\t});\n\t\t}", "title": "" }, { "docid": "2d96eee699560b085d5dd284544783c1", "score": "0.6042168", "text": "function _AtualizaAtaque() {\n ImprimeSinalizado(gPersonagem.bba, DomsPorClasse('bba'));\n ImprimeNaoSinalizado(gPersonagem.numero_ataques,\n DomsPorClasse('numero-ataques'));\n // Corpo a corpo.\n var span_bba_cac = Dom('bba-corpo-a-corpo');\n ImprimeSinalizado(gPersonagem.bba_cac, span_bba_cac);\n var titulo_span_bba_cac = {};\n titulo_span_bba_cac[Traduz('bba')] = gPersonagem.bba;\n titulo_span_bba_cac[Traduz('força')] = gPersonagem.atributos['forca'].modificador;\n titulo_span_bba_cac[Traduz('tamanho')] = gPersonagem.tamanho.modificador_ataque_defesa;\n TituloChaves(titulo_span_bba_cac, span_bba_cac);\n\n // Distancia.\n var span_bba_distancia = Dom('bba-distancia');\n ImprimeSinalizado(gPersonagem.bba_distancia, span_bba_distancia);\n var titulo_span_bba_distancia = {};\n titulo_span_bba_distancia[Traduz('bba')] = gPersonagem.bba;\n titulo_span_bba_distancia[Traduz('destreza')] = gPersonagem.atributos['destreza'].modificador;\n titulo_span_bba_distancia[Traduz('tamanho')] = gPersonagem.tamanho.modificador_ataque_defesa;\n TituloChaves(titulo_span_bba_distancia, span_bba_distancia);\n\n // Agarrar\n var span_bba_agarrar = Dom('bba-agarrar');\n ImprimeSinalizado(gPersonagem.agarrar, span_bba_agarrar);\n var titulo_span_bba_agarrar = {};\n titulo_span_bba_agarrar[Traduz('bba')] = gPersonagem.bba;\n titulo_span_bba_agarrar[Traduz('força')] = gPersonagem.atributos['forca'].modificador;\n titulo_span_bba_agarrar[Traduz('tamanho especial')] = gPersonagem.tamanho.modificador_agarrar;\n TituloChaves(titulo_span_bba_agarrar, span_bba_agarrar);\n}", "title": "" }, { "docid": "38e68d79afc20b9b94951b5a665a8312", "score": "0.6004682", "text": "function buscarValorBaseDoProjeto(){\n var valorCusteio = textToFloat($('#vlrPiCusteio').val());\n var valorCapital = textToFloat($('#vlrPiCapital').val());\n var valorBaseDoProjeto = valorCusteio + valorCapital;\n\n return valorBaseDoProjeto;\n }", "title": "" }, { "docid": "4d29a85bd1df76b191e4d07becce292e", "score": "0.59912103", "text": "constructor (broj_pokusaja = 1, opcije_izbora = [1, 2, 3]) {\n // incijalizuj opcije\n this.opcije_izbora = opcije_izbora;\n this.broj_pokusaja = broj_pokusaja;\n\n // pripremi strukturu podataka za izvestaje\n this.rezultat = {\n promenio: {\n izbor: 0,\n procenat_izbora: '0%',\n pogodaka: 0,\n promasaja: 0,\n procenat_uspeha: '0%'\n },\n nije_promenio: {\n izbor: 0,\n procenat_izbora: '0%',\n pogodaka: 0,\n promasaja: 0,\n procenat_uspeha: '0%'\n }\n }\n }", "title": "" }, { "docid": "00b1679d0495de11bc7619d2f3a45a0e", "score": "0.59769773", "text": "function contaregistrosbanco() {\n\t\t\tdb.transaction(function(tx) {\n\n\t\t\t\t\ttx.executeSql(\"select count(1) totalitens, sum(case when conforme is not null then 1 else 0 end) totalrespondidos, sum(case conforme when 'sim' then 1 else 0 end) totalconforme, sum(case conforme when 'nao' then 1 else 0 end) totalnaoconforme , sum(case conforme when 'nao se aplica' then 1 else 0 end) totalnaoseaplica, sum(case ifnull(atualizouservidor,0) when 0 then 1 else 0 end) totalparaatualizar, sum(case ifnull(atualizouservidor,0) when 0 then 1 else 0 end) totalparaatualizar, (select sum(case ifnull(atualizouservidor,0) when 0 then 1 else 0 end) from checklist_fotos where codigo = cg.codigo) totalfotosparaatualizar from checklist_gui cg where token=? and codigo like ? and tipo='item' \", [$scope.token, $scope.secaoPai.codigo + '.%'], function(tx, results) {\n\t\t\t\t\t\t\n\t\t\t\t\t$scope.totalitens = results.rows.item(0).totalitens;\n\t\t\t\t\t$scope.totalrespondidos = results.rows.item(0).totalrespondidos;\n\t\t\t\t\t$scope.totalconforme = results.rows.item(0).totalconforme;\n\t\t\t\t\t$scope.totalnaoconforme = results.rows.item(0).totalnaoconforme;\n\t\t\t\t\t$scope.totalnaoseaplica = results.rows.item(0).totalnaoseaplica;\n\t\t\t\t\t$scope.total_para_servidor = totalparaatualizar;\n\t\t\t\t\t$scope.total_fotos_para_servidor = totalfotosparaatualizar;\n\t\t\t\t\t$scope.$apply();\n\t\t\t\t},\n\t\t\t\tfunction(a,b) {\n\t\t\t\t\talert(b.message);\n\t\t\t\t}\n\t\t\t\t);\n\t\t\t});\n\t\t}", "title": "" }, { "docid": "42112f737855f52853ae1fc7d2cb0c2f", "score": "0.5961209", "text": "function Pasta_Dados() { return \"1YnQ6UCHamoEmDJsNj8clhx6m1NO-yik0IeMG9zxafCI\";}", "title": "" }, { "docid": "cc615d9d9a748a8047311514fd46db26", "score": "0.5948109", "text": "function inserisciValoriCapitolo(capitolo) {\n var strCapitolo;\n strCapitolo = ' - Capitolo: ' + capitolo.annoCapitolo + ' / ' + capitolo.numeroCapitolo + ' / ' + capitolo.numeroArticolo;\n if(capitolo.numeroUEB === '' || capitolo.numeroUEB === undefined || !gestioneUEB){\n return strCapitolo;\n }\n strCapitolo += ' / ' + capitolo.numeroUEB;\n return strCapitolo;\n }", "title": "" }, { "docid": "354a41a058eab01ec8887765887c41e2", "score": "0.59113264", "text": "apasinDOI() {\n let resultado = '';\n for (let i = 0; i < this.getAutor().length; i++) {\n let autorAux = this.getAutor()[i].split(\" \");\n resultado += autorAux[1] + \", \" + autorAux[0][0] + \". \";\n if (i < this.getAutor().length - 1) {\n resultado += \"& \";\n }\n }\n resultado += \"(\" + this.getFecha() + \"). \";\n resultado += this.getTitulo() + \". \";\n resultado += this.getEditorial() + \".\";\n return resultado;\n }", "title": "" }, { "docid": "7ce405de33b93a13d883d8cf8105567f", "score": "0.58627576", "text": "function limpiarPoligonos()\n{\n\n}", "title": "" }, { "docid": "d4d3a811968954214c30410a12dd8158", "score": "0.5810525", "text": "function organizar() {\r\n\tlet params = {};\r\n\r\n\t//percorre as entradas\r\n\tfor(let i=0; i<entradas.length; i++) {\r\n\t\t// separa as palavras com '-'\r\n\t\tlet carac = '';\r\n\t\tif(i<(entradas.length-1)) carac = '-';//caso não seja a última entrada\r\n\r\n\t\t/*\r\n\t\t\tconcatena as entradas de cada classe\r\n\t\t\tno valor da classe correspondente\r\n\r\n\t\t\ta quantidade de palavras repetidas por classe\r\n\t\t\tcorresponde ao número de classes para a respectiva palavra \r\n\t\t*/\r\n\t\tif(params[classes[i]]) {\r\n\t\t\tparams[classes[i]] += entradas[i] + carac;\r\n\t\t}else {\r\n\t\t\tparams[classes[i]] = entradas[i] + carac;\r\n\t\t}\r\n\t}\r\n\r\n\t// elimina o último hífen de cada valor\r\n\tlet str = JSON.stringify(params);\r\n\tstr = str.replace(/-\"/g, '\"');\r\n\tstr = str.replace(/-/g, ',');\r\n\tparams = JSON.parse(str);\r\n\r\n\treturn params;\r\n}", "title": "" }, { "docid": "47d086db8a71cede7d38cff208ebaf49", "score": "0.58100903", "text": "function gerar_texto_contratos(acao){\n\n var contratos = acao.servicos.filter(function(item){\n return item.itemDescricao.toLowerCase().includes(\"contrato\") || item.itemDescricao.toLowerCase().includes(\"licença\"); \n });\n\n var texto = '';\n\n var retorno = [];\n\n contratos.forEach(contrato => {\n\n let n = 1;\n let texto_parcelas = '';\n let contratado = contrato.descricao == null ? 'Nulo' : contrato.descricao;\n\n if (contrato.parcelas != null){\n contrato.parcelas.forEach(parcela => {\n texto_parcelas += 'parcela ' + n + ', no valor de ' + toReais(parcela.valor) + ', a ser paga em ';\n texto_parcelas += parcela.dataPrevista + '; ';\n n++;\n })\n }else{\n texto_parcelas = \"\";\n }\n retorno.push({'contratado':contrato.descricao,'total':toReais(contrato.custo), 'parcelas': texto_parcelas});\n })\n\n return retorno\n}", "title": "" }, { "docid": "c4283751745d042eb7276dfe43ffdc08", "score": "0.5808874", "text": "function addComida(qtdAdicionar) {\n var raio = util.calculaRaio(c.massaComida);\n while (qtdAdicionar--) {\n var ponto = c.disposicaoUniformeComida ? util.gerarPosicaoUniforme(comidas, raio) : util.gerarPosicaoAleatoria(raio);\n comidas.push({\n // Gera um ID unico\n id: ((new Date()).getTime() + '' + comidas.length) >>> 0,\n x: ponto.x,\n y: ponto.y,\n raio: raio,\n massa: Math.random() + 2,\n hue: cores[Math.round(Math.random() * c.qtdCor)]\n });\n }\n}", "title": "" }, { "docid": "7e233844d1bf0b5bc207469f2d0baaa9", "score": "0.57828724", "text": "static quienEres() {\n console.log(\"Soy un mamífero carnívoro doméstico de la familia de los cánidos que me caracterizo por tener los sentidos del olfato y el oído muy finos, soy muy inteligente y fiel al ser humano.\")\n }", "title": "" }, { "docid": "03ea18add550796021899c80da699a76", "score": "0.5779873", "text": "function dibujarElMejorProducto() {}", "title": "" }, { "docid": "c13a74b12e2e8d9541e4eac635989d94", "score": "0.57776517", "text": "function obtenerCobrosPorFacturar(idContrato){\n cxcService.getCobrosPorFacturar({},{},idContrato,serverConf.ERPCONTA_WS, function (response) {\n //exito\n console.info(\"cobrosPorFactura: Por Cobrar\",response.data);\n $scope.pagos = response.data;\n /* obtieneLista();\n console.log( \"DATOS PAGOS POR COBRAR\",$scope.pagos);*/\n angular.forEach($scope.pagos,function(row){\n row.fechaProgramadaTs = (new Date(row.fechaProgramada)).getTime();\n row.getSaldoBs = function(){\n console.log(\"grilla---->\",this.montoProgramado-this.montoFacturado)\n return this.montoProgramado-this.montoFacturado;\n };\n row.getSaldoSus= function(){\n return this.montoProgramadoSegMoneda-this.montoFacturadoSegMoneda;\n };\n });\n $scope.hideLoader();\n },function (responseError) {\n //error\n $scope.hideLoader();\n });\n }", "title": "" }, { "docid": "5bc7640c247997be2a1e6bfeda7b0a64", "score": "0.577196", "text": "ejecutarCiclo() {\n for (let i = 0; i < this._socios.length; i++) {\n let socio = this._socios[i];\n socio.ejecutarCiclo(this);\n }\n\n console.log(\"soy ejecutarCiclo de biblioteca\");\n\n this.imprimirResumen();\n }", "title": "" }, { "docid": "3f67a05e80daf550f2090697b8911837", "score": "0.57668984", "text": "function ConsumoBaixarProduto(data) {\n if (data) {\n this.setData(data);\n }\n \n\t\tgScope.ConsumoBaixarProduto = this; \n \n this.DADOS = [];\n this.SELECTED = {};\n this.FILTRO = '';\n }", "title": "" }, { "docid": "c93f92271d52be46c9e203a06b803332", "score": "0.5765204", "text": "caricaVersioni() {\n\t\tthis.serviceVersioni.all(this.riempiVersioni)\n\t}", "title": "" }, { "docid": "dbf1d9be022ddd78f19d837cefec8856", "score": "0.57635546", "text": "pokreni () {\n for (let i = 0; i < this.broj_pokusaja; i++) {\n // pokupi rezultat ove igre\n let rezultat = this.igra();\n\n // vidi koja je kategorija vracena, promenjen izbor ili ne\n if (rezultat.promenjen_izbor) {\n // popuni promenu izbora\n this.rezultat.promenio.izbor++;\n if (rezultat.pogodak) {\n this.rezultat.promenio.pogodaka++;\n } else {\n this.rezultat.promenio.promasaja++;\n }\n } else {\n // popuni kad nije promena izbora\n this.rezultat.nije_promenio.izbor++;\n if (rezultat.pogodak) {\n this.rezultat.nije_promenio.pogodaka++;\n } else {\n this.rezultat.nije_promenio.promasaja++;\n }\n }\n }\n }", "title": "" }, { "docid": "3def1c62653ef1a90b428b96ca9adab5", "score": "0.5750179", "text": "function calcolaStringaProvvedimento(provv) {\n var res = provv.anno + \"/\"+ provv.numero;\n res = provv.tipoAtto ? res + \" - \" + provv.tipoAtto.descrizione : res;\n res = res + \" - \" + provv.oggetto;\n res = provv.strutturaAmmContabile ? res + \" - \" + provv.strutturaAmmContabile.codice : res;\n return res;\n }", "title": "" }, { "docid": "eb15bb3b3731af84095d42c205e9449a", "score": "0.5741076", "text": "function comprobar_entrada_centros(){\n //Compruebo las condiciones de cada input\n if(\n comprobarVacio('CODCENTRO') && comprobarCodigo('CODCENTRO',10) &&\n comprobarVacio('NOMBRECENTRO') && comprobarAlfabetico('NOMBRECENTRO',50) &&\n comprobarVacio('DIRECCIONCENTRO') && comprobarDireccion('DIRECCIONCENTRO',150) &&\n comprobarVacio('RESPONSABLECENTRO') && comprobarAlfabetico('RESPONSABLECENTRO',60)\n ){\n return true;//Devuelvo true si se cumplen todas las condiciones y se hace el submit\n }\n else{\n return false;//Si alguna falla devuelvo false\n }\n }", "title": "" }, { "docid": "c4e2a81ff44c7b6e8f05886ac74f0603", "score": "0.5737066", "text": "function fGrupoProdutoF10(opc,codGp,foco,topo,objeto){\r\n let clsStr = new concatStr();\r\n clsStr.concat(\"SELECT A.GP_CODIGO AS CODIGO,A.GP_NOME AS DESCRICAO\" ); \r\n clsStr.concat(\" FROM GRUPOPRODUTO A\" );\r\n let tblGp = \"tblGp\";\r\n let tamColNome = \"30em\";\r\n if( typeof objeto === 'object' ){\r\n for (var key in objeto) {\r\n switch( key ){\r\n case \"ativo\":\r\n clsStr.concat( \" {WHERE} (A.Gp_ATIVO='\"+objeto[key]+\"')\",true); \r\n break; \r\n }; \r\n }; \r\n };\r\n sql=clsStr.fim();\r\n console.log(sql);\r\n // \r\n if( opc == 0 ){ \r\n //////////////////////////////////////////////////////////////////////////////\r\n // localStorage eh o arquivo .php onde estao os select/insert/update/delete //\r\n //////////////////////////////////////////////////////////////////////////////\r\n var bdGp=new clsBancoDados(localStorage.getItem('lsPathPhp'));\r\n bdGp.Assoc=false;\r\n bdGp.select( sql );\r\n if( bdGp.retorno=='OK'){\r\n var jsGpF10={\r\n \"titulo\":[\r\n {\"id\":0 ,\"labelCol\":\"OPC\" ,\"tipo\":\"chk\" ,\"tamGrd\":\"5em\" ,\"fieldType\":\"chk\"} \r\n ,{\"id\":1 ,\"labelCol\":\"CODIGO\" ,\"tipo\":\"edt\" ,\"tamGrd\":\"6em\" ,\"fieldType\":\"str\",\"ordenaColuna\":\"S\",\"align\":\"center\"}\r\n ,{\"id\":2 ,\"labelCol\":\"DESCRICAO\" ,\"tipo\":\"edt\" ,\"tamGrd\":tamColNome ,\"fieldType\":\"str\",\"ordenaColuna\":\"S\"} \r\n ]\r\n ,\"registros\" : bdGp.dados // Recebe um Json vindo da classe clsBancoDados\r\n ,\"opcRegSeek\" : true // Opção para numero registros/botão/procurar \r\n ,\"checarTags\" : \"N\" // Somente em tempo de desenvolvimento(olha as pricipais tags)\r\n ,\"tbl\" : tblGp // Nome da table\r\n ,\"div\" : \"gp\"\r\n ,\"prefixo\" : \"Gp\" // Prefixo para elementos do HTML em jsTable2017.js\r\n ,\"tabelaBD\" : \"GRUPOPRODUTO\" // Nome da tabela no banco de dados \r\n ,\"width\" : \"52em\" // Tamanho da table\r\n ,\"height\" : \"39em\" // Altura da table\r\n ,\"indiceTable\" : \"DESCRICAO\" // Indice inicial da table\r\n };\r\n if( objGpF10 === undefined ){ \r\n objGpF10 = new clsTable2017(\"objGpF10\");\r\n objGpF10.tblF10 = true;\r\n if( (foco != undefined) && (foco != \"null\") ){\r\n objGpF10.focoF10=foco; \r\n };\r\n }; \r\n var html = objGpF10.montarHtmlCE2017(jsGpF10);\r\n var ajudaF10 = new clsMensagem('Ajuda',topo);\r\n ajudaF10.divHeight= '410px'; /* Altura container geral*/\r\n ajudaF10.divWidth = '54em';\r\n ajudaF10.tagH2 = false;\r\n ajudaF10.mensagem = html;\r\n ajudaF10.Show('ajudaGp');\r\n \r\n document.getElementById('tblGp').rows[0].cells[2].click();\r\n delete(ajudaF10);\r\n delete(objGpF10);\r\n };\r\n }; \r\n if( opc == 1 ){\r\n var bdGp=new clsBancoDados(localStorage.getItem(\"lsPathPhp\"));\r\n bdGp.Assoc=true;\r\n bdGp.select( sql );\r\n return bdGp.dados;\r\n }; \r\n }", "title": "" }, { "docid": "d99b69a1eafa96efd49aea0f03fa5335", "score": "0.57318544", "text": "function operacion(monto,recibido){\n console.log(` el recibo es por ${monto} el cliente pago con ${recibido} y su vuelto es ${recibido-monto}`);\n}", "title": "" }, { "docid": "b9b649f3602e3e1cf73eb16443edc3f4", "score": "0.5729978", "text": "function determinacion_responsabilidad_prorrogas(form, accion) {\r\n\t//\tformulario\r\n\tvar post = \"\";\r\n\tvar error = \"\";\r\n\tfor(var i=0; n=form.elements[i]; i++) {\r\n\t\tif (n.type == \"hidden\" || n.type == \"text\" || n.type == \"password\" || n.type == \"select-one\" || n.type == \"textarea\") {\r\n\t\t\tpost += n.id + \"=\" + n.value.trim() + \"&\";\r\n\t\t} else {\r\n\t\t\tif (n.type == \"checkbox\") {\r\n\t\t\t\tif (n.checked) post += n.id + \"=S\" + \"&\"; else post += n.id + \"=N\" + \"&\";\r\n\t\t\t}\r\n\t\t\telse if (n.type == \"radio\" && n.checked) {\r\n\t\t\t\tpost += n.name + \"=\" + n.value.trim() + \"&\";\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//\terrores\r\n\t\tif ((n.id == \"CodValJur\" || n.id == \"Motivo\") && n.value.trim() == \"\") { error = \"Debe llenar los campos obligatorios\"; break; }\r\n\t\telse if ((n.id == \"Prorroga\") && (n.value.trim() == \"\" || n.value.trim() == \"0\")) { error = \"La prorroga debe ser mayor a cero dias\"; break; }\r\n\t\t//else if (!valAlfaNumerico(n.value)) { error = \"No se permiten caractéres especiales en los campos\"; break; }\r\n\t}\r\n\t\r\n\t//\tlistado actividades\r\n\tvar detalles_actividades = \"\";\r\n\tvar frm_actividades = document.getElementById(\"frm_actividades\");\r\n\tfor(var i=0; n=frm_actividades.elements[i]; i++) {\r\n\t\tif (n.name == \"CodActividad\") detalles_actividades += n.value + \"|\";\r\n\t\telse if (n.name == \"Estado\") detalles_actividades += n.value + \"|\";\r\n\t\telse if (n.name == \"ProrrogaAcu\") detalles_actividades += n.value + \"|\";\r\n\t\telse if (n.name == \"Prorroga\") detalles_actividades += n.value + \"|\";\r\n\t\telse if (n.name == \"FechaInicioReal\") detalles_actividades += n.value + \"|\";\r\n\t\telse if (n.name == \"FechaTerminoReal\") detalles_actividades += n.value + \";\";\r\n\t}\r\n\tvar len = detalles_actividades.length; len--;\r\n\tdetalles_actividades = detalles_actividades.substr(0, len);\r\n\t\r\n\t//\tvalido errores\r\n\tif (error != \"\") {\r\n\t\tcajaModal(error, \"error\", 400);\r\n\t} else {\r\n\t\t$.ajax({\r\n\t\t\ttype: \"POST\",\r\n\t\t\turl: \"lib/form_ajax.php\",\r\n\t\t\tdata: \"modulo=determinacion_responsabilidad_prorrogas&accion=\"+accion+\"&\"+post+\"&detalles_actividades=\"+detalles_actividades,\r\n\t\t\tasync: false,\r\n\t\t\tsuccess: function(resp) {\r\n\t\t\t\tvar partes = resp.split(\"|.|\");\r\n\t\t\t\tif (partes[0].trim() != \"\") cajaModal(partes[0], \"error\", 400);\r\n\t\t\t\telse {\r\n\t\t\t\t\tif (accion == \"nuevo\") {\r\n\t\t\t\t\t\tvar funct = \"document.getElementById('frmentrada').submit();\";\r\n\t\t\t\t\t\tcajaModal(partes[1], \"info\", 400, funct);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse form.submit();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\treturn false;\r\n}", "title": "" }, { "docid": "c925bb08c118451ce68fdbac7fefac03", "score": "0.5723011", "text": "function recopilaEntrada(a, b, num) {\n var ncoches=Math.ceil(en[a][b].personas.length/cabenEnCoche);\n var s='',n=''\n if(ncoches>1){s='s';n='n'}\n var asignados=0;\n var sp='',np=''\n var personas=en[a][b].personas.length\n if(personas>1){sp='s';np='n'}\n var cad01 = '(' + personas + ' persona'+sp+' necesita'+ np +' '+ Math.ceil(en[a][b].personas.length/cabenEnCoche)+' coche'+s+' )<br>'\n var cad=''\n var cssprev = '<span style=\"color:green\">'\n var cssend = '</span>'\n var cssprevConductor = '<span style=\"color:green\"><b>'\n var cssendConductor = '</b></span>'\n if (num == 0) {\n return ''\n }\n //cad += '(' + n + ')<br>'\n \n var css0 = '';\n var css1 = ''\n for (var i = 0; i < en[a][b].personas.length; i++) {\n css0 = '';\n css1 = ''\n if (usuario[en[a][b].personas[i]][diasn[a]].usacoche) {\n //css0 = cssprevConductor +' <i class=\"zmdi zmdi-car\"></i> ';\n\t css0 = cssprevConductor +' &#x1f697;';\n\t \n css1 = cssendConductor\n\t asignados++;\n\t \n }else{\n\t css0 = cssprev;\n css1 = cssend\n\t}\n cad += css0 + usuario[en[a][b].personas[i]].nombre + css1 + '<br>'\n }\n //cad += '</div>';\n var cad02=''\n var ss='', nn=''\n if(asignados>1 || asignados==0){\n\t ss='s'; nn='n'\n }\n en[a][b].tengoCoches=ncoches;\n en[a][b].asignados=asignados\n var todos=estadisticaDiaHora(a,b,'entrada')\n if(todos.correcto){\n\t //console.log('Estan todos el ' +diasn[a]+' a `hora '+b )\n }else{\n\t //console.log('NO Estan todos ' +a+' '+b)\n }\n var necesitan=ncoches-asignados\n var sss='', nnn=''\n if(necesitan>1){sss='s'; nnn='n'}\n if(necesitan<=0){\n\t//cad02+='<i class=\"zmdi zmdi-check\"></i>'+ ' '+ todos.factor\n\tcad02+='&#10004;'+ ' '+ todos.factor\n\tcad01='';\n\ten[a][b].necesitoCoches=0;\n\ten[a][b].check=true;\n }else{\n\ten[a][b].necesitoCoches=necesitan;\n\tcad02 += 'Hay '+ asignados+' coche'+ss+'. Se necesita'+nnn+' '+(ncoches-asignados)+' coche'+sss+' m&aacute;s<br>'+ todos.correcto +' '+todos.factor\n }\n \n return cad01+cad+cad02\n}", "title": "" }, { "docid": "8a4e0ee74bff291982d6fceeb20c746a", "score": "0.5718015", "text": "function clasificarCreditos(arregloCreditosTodos) {\n var arregloPrestamos = [];\n\n for (var i = 0; i < arregloCreditosTodos.length; i++) {\n //i = posicion cliente\n for (var j = 0; j < arregloCreditosTodos[i].length; j++) {\n //j = posicion prestamo\n for (var k = 0; k < Things.length; k++) {//k = posicion pago\n }\n\n ;\n }\n\n ;\n }\n\n ;\n}", "title": "" }, { "docid": "a7a70c0e2689cac68add32f406e2cc20", "score": "0.5709807", "text": "constructor(cliente, agencia){\r\n super(0, cliente, agencia); \r\n Conta_Corrente.numeroDeContas += 1;\r\n }", "title": "" }, { "docid": "0685833ceaf4b3821429ed71f501cb53", "score": "0.5708973", "text": "function getEncabezadoCuentas() {\n return [\n { nombre: 'NUMCTA', posicion: 1 },\n { nombre: 'DESCRIPCION', posicion: 1 },\n { nombre: 'NATURALEZA', posicion: 1 },\n { nombre: 'ACUMDET', posicion: 1 },\n { nombre: 'GPO1', posicion: 1 },\n { nombre: 'GPO2', posicion: 1 },\n { nombre: 'GPO3', posicion: 1 },\n { nombre: 'DEPTO', posicion: 1 },\n { nombre: 'DICTAMEN', posicion: 1 },\n { nombre: 'EFINTERNO', posicion: 1 },\n { nombre: 'NOTASDIC', posicion: 1 },\n { nombre: 'NOTASFIN', posicion: 1 },\n { nombre: 'TipoBI', posicion: 1 },\n { nombre: 'AFECTACC', posicion: 1 },\n { nombre: 'GRUPOSAT', posicion: 1 },\n { nombre: 'SITUACION', posicion: 1 },\n { nombre: 'COMPANIA', posicion: 1 }\n ];\n}", "title": "" }, { "docid": "2cf7cf7d0af6dd2c308509732fc78fa8", "score": "0.56939256", "text": "function sumarMeGusta() {\n\n let id = this.id\n let recetaBuscada = id.substring(5);\n\n for (let i = 0; i < recetas.length; i++) {\n if (recetas[i].id == recetaBuscada) {\n recetas[i].positivo++;\n\n }\n }\n mostrarRecetas(recetas)\n if (busquedasConBotonesAprobacion == 1) {\n mostrarRecetas(busquedasVieja)\n }\n}", "title": "" }, { "docid": "8ba2a4c34a9c1f2cab76383125f7edb2", "score": "0.56933373", "text": "function filtrarcombos() {\n\t\t//alert(document.consultar._consulta_.value);\n\t\tdocument.consultar._consulta_.value = 'si';\n\t\tdocument.consultar.submit();\n\t}", "title": "" }, { "docid": "a6ad5313f459cf1cff2cd70dd0934935", "score": "0.5686961", "text": "function calculo(){\n\t\tvar vPrecio = precio.value;\n\t\tvar vDescuento = descuento.value;\n\t\tvar vIva = iva.value;\n\n\t\t\n\t\tvar precioConDescuento = vPrecio-(vPrecio*(vDescuento/100));\n\t\tvar IVA = vIva/100+1;\n\n\n\t\tvar resultadoFinal = precioConDescuento * IVA;\n\t\tvar resultadoFormateado = resultadoFinal.toFixed(2);\n\n\t\tresultado.value = resultadoFormateado + \" €.\"\n\t}", "title": "" }, { "docid": "f81074e0f672fb72d27628efae1eb8e2", "score": "0.56857425", "text": "function carregarPrjDB(tx) {\t\r\n\ttx.executeSql('SELECT PROJETOS.ID_PROJETO AS IDP, PROJETOS.DESCRICAO DESP, PROJETOS.IDGRUPO, GRUPOS.DESCRICAO DESG FROM PROJETOS INNER JOIN GRUPOS ON PROJETOS.IDGRUPO = GRUPOS.ID_GRUPO', [], carregarPrjSuccess);\r\n}", "title": "" }, { "docid": "a1530d4fc5b10e69acd91f757f0198c0", "score": "0.56658477", "text": "function produto_adicionarcarrinho(idproduto)\r\n{\r\n\tdocument.getElementById('codbarra').value = '';\r\n\tdocument.getElementById('nomeprod').value = '';\r\n\r\n\tvalor_total_final = (valor_total_final=='0.00')?0:valor_total_final;\r\n\r\n\tvar parametros = ''; // quantidadetotal|valordesconto|valortotal|idproduto|idgrade.quantidade\r\n\r\n\tvalor_total_final = document.getElementById('precoprodutoselecionadototal').value;\r\n\tvalor_total_venda_tmp = document.getElementById('input_total_venda_tmp').value;\r\n\r\n\tvalor_desconto_acrescimo_tmp = document.getElementById('input_total_desconto_acrescimo_tmp').value;\r\n\tvalor_total_final_tmp\t\t = document.getElementById('input_total_final_tmp').value;\r\n\r\n\r\n\tif (document.getElementById(\"gradeproduto\")) {\r\n\t\tvar x=document.getElementById(\"gradeproduto\");\r\n\t\tvar option = x.getElementsByTagName(\"select\");\r\n\t}\r\n\tvar vetor = new Array();\r\n\tif (document.getElementById(\"gradeproduto\")){\r\n\t\tfor (loop = 0; loop < option.length; loop++) {\r\n\t\t\tvetor = (option[loop].value).split('|');\r\n\t\t\tif (vetor[2]){\r\n\t\t\t\tparametros += vetor[2]+'*'+vetor[0]+'*'+vetor[1]+'¤';\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tparametros = parametros.substring(0, (parametros.length-1));\r\n\tparametros = '?params='+totalitens+'|'+opc+'|'+valor_total_final+'|'+idproduto+'|'+parametros;\r\n\r\n\t// novo valor total da venda\r\n\tvalor_total_final += parseFloat(valor_total_final);\r\n\r\n\t// acumulando desncoto acrescimo\r\n\tvalor_desconto_acrescimo = 3;\r\n\r\n\tcarrega_carrinholista(parametros);\r\n}", "title": "" }, { "docid": "7eb5713646d31ae9b7f3aedb96acfa8a", "score": "0.5662256", "text": "constructor(cliente, agencia){\n super(0, cliente, agencia); //Ele acessa o construtor dentro da classe \"Conta\" Ele herda a classe extendida.\n ContaCorrente.numeroDeContas += 1; //Jeito de chamar um atributo estático.\n }", "title": "" }, { "docid": "9add6d66235e74e2ac842db3d84c0c6f", "score": "0.56613773", "text": "function buscaProjetoDB(tx) {\r\n\ttx.executeSql('SELECT DESCRICAO, IDGRUPO FROM PROJETOS WHERE ID_PROJETO = \"'+idProAlt+'\"', [], buscaProjetoSuccess);\r\n}", "title": "" }, { "docid": "297fd31385d7d215a1d585d9980d3245", "score": "0.564684", "text": "function _AtualizaPontosVida() {\n // O valor dos ferimentos deve ser <= 0.\n var pontos_vida_corrente =\n gPersonagem.pontos_vida.total_dados + gPersonagem.pontos_vida.bonus.Total() + gPersonagem.pontos_vida.temporarios\n - gPersonagem.pontos_vida.ferimentos - gPersonagem.pontos_vida.ferimentos_nao_letais;\n ImprimeNaoSinalizado(\n pontos_vida_corrente, Dom('pontos-vida-corrente'));\n Dom('pontos-vida-dados').value = gPersonagem.pontos_vida.total_dados ?\n gPersonagem.pontos_vida.total_dados : '';\n ImprimeSinalizado(\n gPersonagem.pontos_vida.bonus.Total(), Dom('pontos-vida-bonus'), false);\n ImprimeSinalizado(\n gPersonagem.pontos_vida.temporarios, Dom('pontos-vida-temporarios'), false);\n ImprimeSinalizado(\n -gPersonagem.pontos_vida.ferimentos, Dom('ferimentos'), false);\n ImprimeSinalizado(\n -gPersonagem.pontos_vida.ferimentos_nao_letais, Dom('ferimentos-nao-letais'), false);\n\n // Companheiro animal.\n if (gPersonagem.canimal != null) {\n Dom('pontos-vida-base-canimal').value = gPersonagem.canimal.pontos_vida.base;\n Dom('pontos-vida-temporarios-canimal').value = gPersonagem.canimal.pontos_vida.temporarios;\n var pontos_vida_canimal = gPersonagem.canimal.pontos_vida;\n ImprimeSinalizado(-pontos_vida_canimal.ferimentos, Dom('ferimentos-canimal'), false);\n ImprimeSinalizado(-pontos_vida_canimal.ferimentos_nao_letais, Dom('ferimentos-nao-letais-canimal'), false);\n var pontos_vida_corrente_canimal =\n pontos_vida_canimal.base + pontos_vida_canimal.bonus.Total() + pontos_vida_canimal.temporarios\n - pontos_vida_canimal.ferimentos - pontos_vida_canimal.ferimentos_nao_letais;\n Dom('pontos-vida-corrente-canimal').textContent = pontos_vida_corrente_canimal;\n Dom('notas-canimal').textContent = gPersonagem.canimal.notas;\n Dom('canimal-raca').value = gPersonagem.canimal.raca;\n }\n\n // Familiar.\n if (gPersonagem.familiar == null ||\n !(gPersonagem.familiar.chave in tabelas_familiares) ||\n !gPersonagem.familiar.em_uso) {\n return;\n }\n Dom('pontos-vida-base-familiar').textContent = gPersonagem.familiar.pontos_vida.base;\n Dom('pontos-vida-temporarios-familiar').value = gPersonagem.familiar.pontos_vida.temporarios;\n var pontos_vida_familiar = gPersonagem.familiar.pontos_vida;\n ImprimeSinalizado(-pontos_vida_familiar.ferimentos, Dom('ferimentos-familiar'), false);\n ImprimeSinalizado(-pontos_vida_familiar.ferimentos_nao_letais, Dom('ferimentos-nao-letais-familiar'), false);\n var pontos_vida_corrente_familiar =\n pontos_vida_familiar.base + pontos_vida_familiar.bonus.Total() + pontos_vida_familiar.temporarios\n - pontos_vida_familiar.ferimentos - pontos_vida_familiar.ferimentos_nao_letais;\n Dom('pontos-vida-corrente-familiar').textContent = pontos_vida_corrente_familiar;\n}", "title": "" }, { "docid": "ba2268817733a57ce3016bdd63d3186c", "score": "0.5638084", "text": "function graficarVehiculos2(cordGrap,j){\r\n\r\n var filas = cordGrap.split( \"#\" );\r\n\r\n // Se concatena al final dos signos raros\r\n // por eso resto uno ( 1 )\r\n for ( var i = 0; i < filas.length - 1; i ++ ){\r\n // Extraigo columnas\r\n var columnas = filas[i].split( \"%\" );\r\n\r\n\r\n //var idtaxiBD = cName + columnas[0];\r\n var idtaxiBD = \"T\" + columnas[0];\r\n\r\n var taxiFeature = null;\r\n\r\n //Extracción dependiendo del Layer\r\n switch (j)\r\n {\r\n case 0:\r\n taxiFeature = vectorCV.getFeatureById( idtaxiBD );\r\n break;\r\n }\r\n\r\n //CREA UN NUEVO ELEMENTO PARA EL TAXI PORQUE NO EXISTE\r\n if ( taxiFeature == null ){\r\n\r\n // Coordenadas\r\n var x = columnas[1];\r\n var y = columnas[2];\r\n\r\n // Posici�n lon : lat\r\n var point = new OpenLayers.Geometry.Point( x, y );\r\n\r\n // Transformaci�n de coordendas\r\n point.transform( new OpenLayers.Projection( \"EPSG:4326\" ),\r\n new OpenLayers.Projection( \"EPSG:900913\" ) );\r\n\r\n var imgName = \"img/tx4.png\";\r\n if (columnas[6] == 'ASI') {\r\n imgName = \"img/tx2.png\";\r\n }else if (columnas[6] == 'OCU') {\r\n imgName = \"img/tx3.png\";\r\n }else if (columnas[6] == 'AC') {\r\n imgName = \"img/taxi.png\";\r\n }\r\n\r\n taxiFeature = new OpenLayers.Feature.Vector( point, {\r\n img: imgName,\r\n taxi : columnas[0],\r\n velo : columnas[3],\r\n fecha : columnas[4],\r\n hora : columnas[5],\r\n favColor : 'blue',\r\n align: \"lt\",\r\n poppedup : false\r\n }\r\n );\r\n\r\n // Se coloca el ID de veh�culo a la imagen\r\n taxiFeature.id = \"T\" + columnas[0];\r\n\r\n //Se añade a la capa que corresponda\r\n switch (j)\r\n {\r\n case 0:\r\n vectorCV.addFeatures( [taxiFeature] );\r\n break;\r\n }\r\n }else{\r\n\r\n // Comprobar si los datos graficados estan desactualizados\r\n if ( taxiFeature.attributes.fecha != columnas[4]\r\n || taxiFeature.attributes.hora != columnas[5] ){\r\n\r\n var poppedup\r\n if (taxiFeature == null){\r\n poppedup = false;\r\n }else{\r\n poppedup = taxiFeature.attributes.poppedup;\r\n }\r\n\r\n //var\r\n\r\n if ( poppedup == true ) {\r\n selectFeatures.unselect( taxiFeature );\r\n }\r\n // Coordenadas\r\n x = columnas[1];\r\n y = columnas[2];\r\n\r\n // Nuevo punto\r\n var newPoint = new OpenLayers.LonLat( x, y );\r\n newPoint.transform( new OpenLayers.Projection( \"EPSG:4326\" ),\r\n new OpenLayers.Projection( \"EPSG:900913\" ) );\r\n\r\n // Movemos el vehiculo\r\n taxiFeature.move( newPoint );\r\n\r\n imgName = \"img/tx4.png\";\r\n if (columnas[6] == 'ASI') {\r\n imgName = \"img/tx2.png\";\r\n }else if (columnas[6] == 'OCU') {\r\n imgName = \"img/tx3.png\";\r\n }else if (columnas[6] == 'AC') {\r\n imgName = \"img/taxi.png\";\r\n }\r\n\r\n taxiFeature.attributes.img = imgName;\r\n\r\n // Actualizamos Fecha y Hora\r\n taxiFeature.attributes.fecha = columnas[4];\r\n taxiFeature.attributes.hora = columnas[5];\r\n\r\n //redibujado de lienzo\r\n vectorCV.redraw(true);\r\n\r\n if ( poppedup == true ) {\r\n selectFeatures.select( taxiFeature );\r\n }\r\n }\r\n } //FIN DE ELSE DEL OBJETO NULO\r\n }\r\n}", "title": "" }, { "docid": "367b699afeb5373406917eea4aeb6eb1", "score": "0.5636008", "text": "function llenarPorPartido(){\n statistics.porPartido.forEach(objeto => {\n objeto.conjunto = miembrosCongreso.filter(miembro => miembro.party == objeto.partido)\n objeto.conjunto.forEach(miembro => {\n objeto.promVCP = objeto.promVCP + miembro.votes_with_party_pct\n })\n objeto.promVCP = (objeto.promVCP/objeto.conjunto.length).toFixed(2) \n })\n pintarTablaChica()\n }", "title": "" }, { "docid": "cedd2bfa07be01889406e14f29232668", "score": "0.5620335", "text": "obtenerPromedio() {\r\n this.statistics.democratas_vwp = this.promedio(this.statistics.democratas);\r\n this.statistics.republicanos_vwp = this.promedio(this.statistics.republicanos);\r\n this.statistics.independientes_vwp = this.promedio(this.statistics.independientes);\r\n this.statistics.totalV = this.statistics.democratas_vwp + this.statistics.republicanos_vwp + this.statistics.independientes_vwp;\r\n }", "title": "" }, { "docid": "0592c035d60a6034d497d460c927e6c0", "score": "0.5619688", "text": "constructor(){\n this.sexo\n this.pais\n this.idioma\n }", "title": "" }, { "docid": "2b87a12a19ccb14ece4f9b0cdd56514f", "score": "0.561791", "text": "adicionarCupom(codigo) {\n const cupons = [\"IOASYS5\", \"IOASYS10\", \"IOASYS15\"];\n const discount = condigo.toUpperCase();\n\n if (cupons.includes(discount) && parseInt(discount.slice(5)) <= 15) {\n this.cupom = this.valorTotal * (parseInt(discount.slice(5)) / 100);\n }\n }", "title": "" }, { "docid": "9809e24d4074a09f2b73c7e3012ca46a", "score": "0.5613097", "text": "static queEres() {\n console.log(\"Soy una especie del orden de los primates perteneciente a la familia de los homínidos.\");\n }", "title": "" }, { "docid": "227f7822deaa5cbe88be282f36f13a95", "score": "0.56117415", "text": "function Concesionario(cod_oficina_in, ciudad_in, responsable_in){\n\t\t\t\tthis.codigoOficina = cod_oficina_in;\n\t\t\t \tthis.ciudad = ciudad_in;\n\t\t\t \tthis.responsable = responsable_in;\n\t\t\t}", "title": "" }, { "docid": "b1fc7b419a878fca5d5f114e7ae3d7fd", "score": "0.56088597", "text": "function puxabanco() {\n\t\t$scope.atualizando = true;\n\t\tvar urljson = 'http://gnrx.com.br/exporta_modelo_json.asp?codigo=' + $scope.selectModelo + '&hora=' + Date.now();\n\t\t$http({method: 'GET', url: urljson}).\n\t\tsuccess(function(data, status, headers, config) {\n\t\t\tchecklist_secoes = data.secoes;\n\t\t\tcriabanco();\n\t\t}).\n\t\terror(function(data, status, headers, config) {\n\t\t\talert('erro no arquivo json (importando checklist)' + status.message);\n\t\t\t$scope.atualizando = false;\n\t\t});\t\n\t}", "title": "" }, { "docid": "d0db9d40d3a13f6a31980cc403a8af06", "score": "0.5604192", "text": "realizarViaje (consumo) {\n if (!this.encendido) return console.log('El carro esta apagado');\n\n if ( consumo < this.gasolina) return console.log('No se puede realizar el viaje: Gasolina ' + this.gasolina);\n \n this.gasolina = this.gasolina - consumo; // esta linea solo se ejecuta si hay gasolina para el viaje\n return ' le queda ' + this.gasolina;\n \n }", "title": "" }, { "docid": "9b2ded10fb0a6477265cc73b33210daa", "score": "0.5600262", "text": "function ConsumoBaixadoProduto(data) {\n if (data) {\n this.setData(data);\n }\n \n\t\tgScope.ConsumoBaixadoProduto = this; \n \n this.DADOS = [];\n this.SELECTED = {};\n this.FILTRO = '';\n }", "title": "" }, { "docid": "fa190fb36e37cba38edf11121bfd7265", "score": "0.5599969", "text": "function pegaPerfis()\n{\n\tcore_pegaDados($trad(\"msgBuscaPerfil\",i3GEOadmin.perfis.dicionario),\"../php/menutemas.php?funcao=pegaPerfis\",\"montaTabela\");\n}", "title": "" }, { "docid": "4230f2b223632902614fa19885d2a279", "score": "0.5585594", "text": "function T(IDIncontro,IDSquadra,IDLega,Lista,ListaSqA,Ruolo,Voto,Modif,Tot,Supplementari,ListaSupplementari,VotoSupplementari,TotaleSquadraSupplementari,FattoreCampoSupplementari,GolSupplementari,Rigori,ListaRigori,VotoRigori,GolRigori,ParzialeSquadra,FattoreCampo,ModPortiere,ModDifesa,ModCentrocampo,ModAttacco,ModModulo,ModM1Pers,ModM2Pers,ModM3Pers,TotaleSquadra,Gol) {\n this.IDIncontro = IDIncontro\n this.IDSquadra = IDSquadra\n this.IDLega = IDLega\n this.Lista = Lista\n\t//lista dei giocatori indicati in ordine\n\t// come appaiono nel tabellino. I primi 11,\n\t// quindi, sono i titolari. I valori sono separati\n\t// dal carattere %\n\t// i valori possono essere:\n\t// IDGiocatore: se c'e' un giocatore, c'e' il suo ID\n\t// -1: se e' una RU\n\t// 0: se e' assente\n\t// dal 12esimo in poi proseguono con panchina e tribuna:\n\t// in questi ultimi non ci sono 0 o -1 quindi sono solo\n\t// IDGiocatore: se positivo allora e' panchina oppure giocatore\n\t// sostituito, se negativo e' tribuna\n this.ListaSqA = ListaSqA\n\tthis.Ruolo = Ruolo\n\t// come Lista, valori separati da % per i ruoli dei giocatori\n\t// 1,2,3,4: PORT, DIFE, CENT, ATTA \"normali\", oppure RU\n\t// 5,6,7,8: Riserve (p,d,c,a) {se nei primi 11, entrata, altrimenti riserva non entrata}\n\t// 0: assente\n\t// -1,-2,-3,-4: (solo \"sostituiti\"): giocatori che sono stati \"sostituiti\"\n\t// -5,-6,-7,-8: tribuna (p,d,c,a)\n this.Voto = Voto\n\t// valori separati da % contenenti i voti dei giocatori\n this.Modif = Modif\n\t// valori separati da % contenenti i modificatori dei giocatori\n this.Tot = Tot\n\t// valori separati da % contenenti i totali dei giocatori\n this.Supplementari = Supplementari\n this.ListaSupplementari = ListaSupplementari // separati da %, se -1 e' una ru, se 0 assente\n this.VotoSupplementari = VotoSupplementari // separati da %,\n this.TotaleSquadraSupplementari = TotaleSquadraSupplementari\n this.FattoreCampoSupplementari = FattoreCampoSupplementari\n this.GolSupplementari = GolSupplementari\n\n this.Rigori = Rigori\n this.ListaRigori = ListaRigori // separati da %,\n\t//vale -1 se RU, 0 se assente, altrimenti l'id del giocatore\n this.VotoRigori = VotoRigori // separati da %,\n this.GolRigori = GolRigori\n\n this.ParzialeSquadra = ParzialeSquadra // Se \"non esiste\" allora vale \"x\"\n this.FattoreCampo = FattoreCampo // Se \"non esiste\" allora vale \"x\"\n this.ModPortiere = ModPortiere // Se \"non esiste\" allora vale \"x\"\n this.ModDifesa = ModDifesa // Se \"non esiste\" allora vale \"x\"\n this.ModCentrocampo = ModCentrocampo // Se \"non esiste\" allora vale \"x\"\n this.ModAttacco = ModAttacco // Se \"non esiste\" allora vale \"x\"\n this.ModModulo = ModModulo // Se \"non esiste\" allora vale \"x\"\n this.ModM1Pers = ModM1Pers // Se \"non esiste\" allora vale \"x\"\n this.ModM2Pers = ModM2Pers // Se \"non esiste\" allora vale \"x\"\n this.ModM3Pers = ModM3Pers // Se \"non esiste\" allora vale \"x\"\n\tthis.TotaleSquadra = TotaleSquadra // Se \"non esiste\" allora vale \"x\"\n this.Gol = Gol // Se \"non esiste\" allora vale \"x\"\n}", "title": "" }, { "docid": "97263be8026cff52a5404b78ecf85294", "score": "0.55813277", "text": "get nombreCompleto() { // a los metodos get se les accede como a una propiedad\n return this.nombre + ' ' + this.apellido\n }", "title": "" }, { "docid": "2eb0094b81a9ceb5c7db96cca352692e", "score": "0.55737233", "text": "function stProprieteCompo()\n{\n\tthis.Action_en_cours=null;\n\tthis.NewCle=null;\n}", "title": "" }, { "docid": "a1a9b4b083f9205d6dc7a911f968a14b", "score": "0.5570993", "text": "function conArroz(plato) {\n return new Promise((resolve, reject) => {\n resolve(plato + ' arroz,');\n });\n}", "title": "" }, { "docid": "71a821ba13aa885fbcb33cf90e09c609", "score": "0.5570153", "text": "function divocprmaelementocequiv(habp,com){\n\n\t\t\t//////////////////////////////////PLAN HABILITADORAS ////////////////////////////////////////////////\t\t\t\n\t\t\t\t\t\t// ESFUERZO PROPIO PLAN EN BOLIVARES \t\t\t\t\t\n\t\t\t\t\t\tvar labordivoc = filtrarcostohab(habp,filtrolabor,3,com,1);\n\t\t\t\t\t\tvar bbdivoc = filtrarcostohab(habp,filtrobb,3,com,1);\n\t\t\t\t\t\tvar mdivoc = filtrarcostohab(habp,filtrom,3,com,1);\n\t\t\t\t\t\tvar scdivoc = filtrarcostohab(habp,filtrosc,3,com,1);\n\t\t\t\t\t\tvar odivoc = filtrarcostohab(habp,filtroo,3,com,1);\n\t\t\t\t\t\tvar totaldivoc = filtrartotal(labordivoc,bbdivoc,mdivoc,scdivoc,odivoc);\n \n \t\t\t\t\t\t \t\t // ESFUERZOS PROPIOS PLAN EN DOLARES\n \t\t\t\t\t\t var labordivocdol = filtrarcostohab(habp,filtrolabor,3,com,2);\n \t\t\t\t\t\t var bbdivocdol = filtrarcostohab(habp,filtrobb,3,com,2);\n \t\t\t\t\t\t var mdivocdol = filtrarcostohab(habp,filtrom,3,com,2);\n \t\t\t\t\t\t var scdivocdol = filtrarcostohab(habp,filtrosc,3,com,2);\n \t\t\t\t\t\t var odivocdol = filtrarcostohab(habp,filtroo,3,com,2);\n \t\t\t\t\t\t var totaldivocdol = filtrartotal(labordivocdol,bbdivocdol,mdivocdol,scdivocdol,odivocdol);\n\n \t\t\t\t\t\t \n \t\t\t\t\t\t /// DIVISION ORIENTAL PLAN EN DOLARES EQUIVALENTES\n \t\t\t\t\t\t var labordivocDeqv = filtroequivalente(labordivoc,labordivocdol);\n \t\t\t\t\t\t var bbdivocDeqv = filtroequivalente(bbdivoc,bbdivocdol);\n \t\t\t\t\t\t var mdivocDeqv = filtroequivalente(mdivoc,mdivocdol);\n \t\t\t\t\t\t var scdivocDeqv = filtroequivalente(scdivoc,scdivocdol);\n \t\t\t\t\t\t var odivocDeqv = filtroequivalente(odivoc,odivocdol);\n \t\t\t\t\t\t var totaldivocDeqv = filtrartotal(labordivocDeqv,bbdivocDeqv,mdivocDeqv,scdivocDeqv,odivocDeqv);\n\n \t\t\t\t\t\t ////////////////////// FIN PLAN ////////////////////////////////////////////////\n \t\t\t\t\t\t var laborybbdivoDeqv = filtrardivo(labordivocDeqv,bbdivocDeqv);\n \t\t\t\t\t\t\n \t\t\t\t\t\tvar\tinformacion = cabeceracategoriaprmva('red-header','ELEMENTO DE COSTO');\n \t\t\t\t\t\t\tinformacion += mostrarcategoriaprmva('','Labor y Beneficios',laborybbdivoDeqv); \n \t\t\t\t\t\t\tinformacion += mostrarcategoriaprmva('','Materiales',mdivocDeqv);\n \t\t\t\t\t\t\tinformacion += mostrarcategoriaprmva('','Servicios y Contratos',scdivocDeqv);\n \t\t\t\t\t\t\tinformacion += mostrarcategoriaprmva('','Otros Costos y Gastos',odivocDeqv);\n \t\t\t\t\t\t\tinformacion += mostrarcategoriaprmva('red-header','Total',totaldivocDeqv); \n \t\t\t\t\treturn informacion;\n\n}", "title": "" }, { "docid": "5ca7b94a8819443ecc7095928df565a7", "score": "0.55652916", "text": "function IniciaPersonagem() {\n // entradas padroes para armas, armaduras e escudos.\n gPersonagem.armas.push(ConverteArma({\n chave: 'desarmado',\n nome_gerado: 'desarmado',\n texto_nome: Traduz('desarmado'),\n obra_prima: false,\n bonus: 0\n }));\n}", "title": "" }, { "docid": "807f7966c700c3ed5f8ed4926006c97f", "score": "0.55584866", "text": "function AcquistaProdotto(reply, prodottoDaAcquistare, tipologiaAcquisto, idUtente) {\r\n var esito_registrazione = [];\r\n\r\n var request = new Request('SELECT * FROM Prodotti WHERE Prodotti.Nome like @prodotto',\r\n function (err, rowCount) {\r\n if (err) {\r\n console.log(err); esito_registrazione.push({ esito: 'KO' });\r\n reply(esito_registrazione);\r\n }\r\n else {\r\n if (tipologiaAcquisto == 'cp') {\r\n ControllaCredito(reply);\r\n }\r\n else if (tipologiaAcquisto == 'cc' || tipologiaAcquisto == 'cdc') {\r\n InserisciProdotto(reply);\r\n }\r\n\r\n console.log(rowCount + 'rows');\r\n }\r\n\r\n });\r\n\r\n request.on('row', function (columns) {\r\n\r\n idProdotto = columns[0].value;\r\n nome_prodotto = columns[1].value;\r\n costo_prodotto = columns[2].value;\r\n var descrizione = columns[3].value;\r\n esito_registrazione.push({ esito: 'OK', id: idProdotto, nome: nome_prodotto, costo: costo_prodotto, descrizione: descrizione });\r\n\r\n });\r\n\r\n request.addParameter('prodotto', TYPES.VarChar, prodottoDaAcquistare);\r\n connection.execSql(request);\r\n\r\n}", "title": "" }, { "docid": "69b3170d116d5dfb88407e373a308266", "score": "0.5558027", "text": "function aprovar()\r\n {\r\n vm.resultadoAnalisePedido.resultado = vm.modalidade == 'aprovar'\r\n ? 'PROPOSTA_DE_ACORDO'\r\n : 'PROPOSTA_DE_ACORDO_COM_VALOR_DIVERGENTE_SIMULADO';\r\n\r\n vm.resultadoAnalisePedido.guidPedido = vm.pedido.cdPedidoHabilitacao;\r\n\r\n // ========\r\n // Proposta\r\n // ========\r\n var proposta = vm.resultadoAnalisePedido.proposta;\r\n\r\n // Parsing dos valores para Double\r\n proposta.valorTotalAcordo = Util.stringToDouble(proposta.valorTotalAcordoFormatado);\r\n proposta.valorPoupador = Util.stringToDouble(proposta.valorPoupadorFormatado);\r\n proposta.valorHonorariosAdvogado = Util.stringToDouble(proposta.valorHonorariosAdvogadoFormatado);\r\n proposta.valorReembolsoCustas = Util.stringToDouble(proposta.valorReembolsoCustasFormatado);\r\n proposta.valorParcela = Util.stringToDouble(proposta.valorParcelaFormatado);\r\n proposta.valorHonorariosFebrapo = Util.stringToDouble(proposta.valorHonorariosFebrapoFormatado);\r\n\r\n /**\r\n * Verificando situação interna do pedido\r\n */\r\n if (vm.modalidade.toLowerCase() === 'aprovar')\r\n {\r\n vm.resultadoAnalisePedido.situacaoInterna = 1;\r\n }\r\n\r\n if (vm.modalidade.toLowerCase() === 'aprovar-ressalva')\r\n {\r\n vm.resultadoAnalisePedido.situacaoInterna = 2;\r\n }\r\n\r\n if (vm.resultadoAnalisePedido.proposta.datePrimeiraParcela)\r\n {\r\n vm.resultadoAnalisePedido.proposta.dataPrimeiraParcela = $filter('date')(new Date(vm.resultadoAnalisePedido.proposta.datePrimeiraParcela), 'dd/MM/yyyy');\r\n }\r\n\r\n var dataAtual = new Date();\r\n dataAtual.setHours(0, 0, 0, 0);\r\n\r\n var dataComparada = new Date(vm.resultadoAnalisePedido.proposta.datePrimeiraParcela);\r\n dataComparada.setHours(0, 0, 0, 0);\r\n\r\n if (dataAtual > dataComparada)\r\n {\r\n growl.error(\"A data da primeira parcela não pode ser menor que o dia de hoje!\");\r\n return;\r\n }\r\n\r\n // Seta status da variável de confirmação de pagamento\r\n AcordoResource.cadastrarResultadoAnalisePedido().post(vm.resultadoAnalisePedido)\r\n .then(function (response)\r\n {\r\n if (response.status == 200)\r\n {\r\n vm.isAcordoConfirmado = true;\r\n vm.exibirComprovantePagamento = false;\r\n vm.bloquearCamposAcordo = true;\r\n\r\n growl.success(\"Acordo confirmado com sucesso!\");\r\n }\r\n else\r\n {\r\n if (response.data != undefined)\r\n {\r\n growl.error(response.data.message.message);\r\n }\r\n else\r\n {\r\n growl.error(response.statusText);\r\n }\r\n }\r\n })\r\n .catch(function (erro)\r\n {\r\n console.log(erro);\r\n });\r\n\r\n console.log('----------------------');\r\n console.log('listando pagamentos...');\r\n console.log('----------------------');\r\n _listarPagamentos('b6e31307-4011-44b1-9404-10d2e8ab5731');\r\n }", "title": "" }, { "docid": "7a965060bd0642413fe1e718e53efa98", "score": "0.5557643", "text": "function comer() {\r\n\tif (cabeza.x == comida.x && cabeza.y == comida.y) {\r\n\t\tlongitudSerpiente += 1;\r\n\t\texiste_comida = false;\r\n\t}\r\n}", "title": "" }, { "docid": "128c1191f962230318f9d6e5e7b70140", "score": "0.55524933", "text": "constructor(cliente, agencia){\n super(0 ,cliente, agencia ); //Pra fazer a referencia desse contrutor com o da class mãe que é Conta;\n ContaCorrente.numeroDeContas += 1; //chama contaCorrente pq ele busca esse numero na class completa\n }", "title": "" }, { "docid": "94f5807037531a3d9907c6b39710087c", "score": "0.55426586", "text": "function addComentario(){\n console.log(vm.comentario);\n if(vm.comentario){\n $http.get('http://' + vm.localhost + ':3000/insertComentario/' + vm.tour.nombreDestino +'/'+ vm.comentario).then(function (response) {\n console.log(response.data);\n \n });\n }\n cargarComentarios();\n \n }", "title": "" }, { "docid": "40f6d0144e400ab532bf6deaeda6cc3b", "score": "0.55383646", "text": "function buscaConductoresSolosEntrada(cuantos){\n var nsomos = 0;\n for (var a = 0; a < en.length; a++) {\n\tfor (var b = 0; b < en[a].length; b++) {\n \tfor (var c = 0; c < en[a][b].personas.length; c++) {\n \t\tif(en[a][b].personas.length==cuantos) {\n \t\t\t\tusuario[en[a][b].personas[c]][diasn[a]].usacoche=true\n\t\t\t\t\tusuario[en[a][b].personas[c]].viajes++\n\t\t\t\t\ten[a][b].asignados++;\n\t\t\t\t}\t\t\n \t\t}\n \t}\n }\t\n\n}", "title": "" }, { "docid": "c46956ec0d3f226035f135da4fa1b2da", "score": "0.5535136", "text": "function comprobar_entrada_espacios(){\n //Compruebo las condiciones de cada input\n if(\n comprobarVacio('CODESPACIO') && comprobarCodigo('CODESPACIO',10) &&\n comprobarVacio('SUPERFICIEESPACIO') && comprobarEntero('SUPERFICIEESPACIO',1, 9999) &&\n comprobarVacio('NUMINVENTARIOESPACIO') && comprobarEntero('NUMINVENTARIOESPACIO',1,99999999)\n ){\n return true;//Devuelvo true si se cumplen todas las condiciones y se hace el submit\n }\n else{\n return false;//Si alguna falla devuelvo false\n }\n }", "title": "" }, { "docid": "e18b1434a6832e855c70630b9f9b4ed0", "score": "0.55309397", "text": "function ordenInicial() {\n pisoActual=pisoIni;\n recorrido=[...arrayPisos];\n}", "title": "" }, { "docid": "1aec87bdef30d155b8291e528f219167", "score": "0.5525178", "text": "function ConsumoBaixarBalanca(data) {\n if (data) {\n this.setData(data);\n }\n \n\t\tgScope.ConsumoBaixarBalanca = this; \n \n var that = this;\n \n this.DADOS = [];\n this.SELECTED = {};\n this.PESO = null;\n this.PESO_AUTOMATICO = false;\n this.FILTRO = '';\n this.ITENS_BAIXAR = [];\n this.OPERADOR_BARRAS = '';\n this.OPERADOR_NOME = '';\n this.OPERADOR_ID = 0;\n \n var balanca_timeout = null; \n \n $('.gc-print-recebe-peso').click(function(){\n \n var str = $(this).val();\n var res = str.replace(\",\", \".\"); \n var value = parseFloat(res);\n \n var changed = false;\n\n if ( that.PESO != value ) {\n changed = true;\n }\n \n $rootScope.$apply(function(){\n \n that.PESO_AUTOMATICO = true;\n that.PESO = parseFloat(value.toFixed(4));\n \n if ( changed ) {\n that.setItens();\n }\n });\n \n clearTimeout( balanca_timeout );\n\n balanca_timeout = setTimeout(function(){\n $rootScope.$apply(function(){ \n that.PESO_AUTOMATICO = false;\n that.PESO = null;\n \n if ( changed ) {\n that.setItens();\n } \n });\n },3000); \n }); \n \n }", "title": "" }, { "docid": "622600022e7c2a02b597e6fb6e8d61ed", "score": "0.5524591", "text": "getPlazasOcupadas() {\n return this.http.get(urlBasePlazas + '/search/total-ocupado?ocupado=true');\n }", "title": "" }, { "docid": "cea5400031e33c364581732bf54f81e9", "score": "0.55207336", "text": "constructor(cliente, agencia) {\n super(0, cliente, agencia); // medoto para chamar as class herdeiras do extends\n ContaCorrente.numeroDeContas += 1; // metodo contador\n }", "title": "" }, { "docid": "89abaa098f661de5f14f698b1add947e", "score": "0.55192024", "text": "agregarTransmitanciaSuperficie(estructura){\n let habitacion;\n if(estructura.userData.tipo === Morfologia.tipos.PISO || estructura.userData.tipo === Morfologia.tipos.TECHO){\n habitacion = estructura.parent;\n }else if(estructura.userData.tipo === Morfologia.tipos.VENTANA || estructura.userData.tipo === Morfologia.tipos.PUERTA){\n habitacion = estructura.parent.parent.parent;\n }else{\n habitacion = estructura.parent.parent;\n }\n\n let transmitanciaSuperficies = habitacion.userData.transmitanciaSuperficies;\n let transmitanciaSuperficiesObjetivo = habitacion.userData.transmitanciaSuperficiesObjetivo;\n\n BalanceEnergetico.transmitanciaSuperficie(estructura,this.zona);\n\n transmitanciaSuperficies += estructura.userData.transSup;\n transmitanciaSuperficiesObjetivo += estructura.userData.transSupObjetivo;\n\n if(estructura.userData.tipo === Morfologia.tipos.PISO){\n BalanceEnergetico.puenteTermico(estructura);\n habitacion.userData.puenteTermico = estructura.userData.puenteTermico;\n habitacion.userData.puenteTermicoObjetivo = estructura.userData.puenteTermicoObjetivo;\n }\n let perdidaPorConduccion = BalanceEnergetico.perdidasConduccion(\n transmitanciaSuperficies,\n this.gradoDias,\n habitacion.userData.puenteTermico\n );\n let perdidaPorConduccionObjetivo = BalanceEnergetico.perdidasConduccion(\n transmitanciaSuperficiesObjetivo,\n this.gradoDias,\n habitacion.userData.puenteTermicoObjetivo\n );\n\n this.casa.userData.transmitanciaSuperficies -= habitacion.userData.transmitanciaSuperficies;\n this.casa.userData.transmitanciaSuperficiesObjetivo -= habitacion.userData.transmitanciaSuperficiesObjetivo;\n this.casa.userData.perdidaPorConduccion -= habitacion.userData.perdidaPorConduccion;\n this.casa.userData.perdidaPorConduccionObjetivo -= habitacion.userData.perdidaPorConduccionObjetivo;\n\n habitacion.userData.transmitanciaSuperficies = transmitanciaSuperficies;\n habitacion.userData.transmitanciaSuperficiesObjetivo = transmitanciaSuperficiesObjetivo;\n habitacion.userData.perdidaPorConduccion = perdidaPorConduccion;\n habitacion.userData.perdidaPorConduccionObjetivo = perdidaPorConduccionObjetivo;\n\n this.casa.userData.transmitanciaSuperficies += transmitanciaSuperficies;\n this.casa.userData.transmitanciaSuperficiesObjetivo += transmitanciaSuperficiesObjetivo;\n this.casa.userData.perdidaPorConduccion += habitacion.userData.perdidaPorConduccion;\n this.casa.userData.perdidaPorConduccionObjetivo += habitacion.userData.perdidaPorConduccionObjetivo;\n }", "title": "" }, { "docid": "ec9476578c5ee380fefb174bf82f3e27", "score": "0.55119956", "text": "function comprobar_entrada_profesores(){\n //Compruebo las condiciones de cada input\n if(\n comprobarVacio('dni') && comprobarDni('dni') &&\n comprobarVacio('nombre') && comprobarAlfabetico('nombre',30) &&\n comprobarVacio('apellidos') && comprobarAlfabetico('apellidos',50) &&\n comprobarVacio('area') && comprobarAlfabetico('area',50)\n && comprobarVacio('departamento') && comprobarAlfabetico('departamento',50)\n ){\n return true;//Devuelvo true si se cumplen todas las condiciones y se hace el submit\n }\n else{\n return false;//Si alguna falla devuelvo false\n }\n }", "title": "" }, { "docid": "0a38b11278caa0b0542db1ee2c745fed", "score": "0.55106306", "text": "function conComas(valor) {\n var nums = new Array();\n\t var simb = \",\"; //Éste es el separador\n\t valor = valor.toString();\n\t valor = valor.replace(/\\D/g, \"\"); //Ésta expresión regular solo permitira ingresar números\n\t nums = valor.split(\"\"); //Se vacia el valor en un arreglo\n\t var long = nums.length - 1; // Se saca la longitud del arreglo\n\t var patron = 3; //Indica cada cuanto se ponen las comas\n\t var prox = 2; // Indica en que lugar se debe insertar la siguiente coma\n\t var res = \"\";\n\t \n\t while (long > prox) {\n\t nums.splice((long - prox),0,simb); //Se agrega la coma\n\t prox += patron; //Se incrementa la posición próxima para colocar la coma\n\t }\n\t \n\t for (var i = 0; i <= nums.length-1; i++) {\n\t res += nums[i]; //Se crea la nueva cadena para devolver el valor formateado\n\t }\n\t return res;\n\t}", "title": "" }, { "docid": "ed39a07f0edfef656bbc85f2ffb526c2", "score": "0.5506216", "text": "function funzione_avvio() {\n\tcambia_da_cartolina(\"c7694-119\");\n\tcambia_edizione();\n}", "title": "" }, { "docid": "16fd6bcd6f4abd9f79c46074b48df165", "score": "0.55026805", "text": "function recorridoSegunEstado() {\n return \"servidor envia:las estaciones con el recorrido segun horario sistema\";\n}", "title": "" }, { "docid": "963c8175233d424bc3212f9ce39af0bc", "score": "0.5500327", "text": "function promIndicadores(){\n // Calculamos el promedio de tipos de nota en cada alumno\n for(var i=0; i<vm.indicadores.length; i++){\n for(var j=0; j<vm.indicadores[i].alumnos.length; j++){\n var defin =0;\n for(var k=0; k<vm.indicadores[i].alumnos[j].tipo_nota.length; k++){\n var tempo=parseFloat(vm.indicadores[i].alumnos[j].tipo_nota[k].cal);\n vm.indicadores[i].alumnos[j].tipo_nota[k].cal=tempo;\n defin+=parseFloat(vm.indicadores[i].alumnos[j].tipo_nota[k].cal)\n }\n defin=defin/vm.indicadores[i].alumnos[j].tipo_nota.length;\n vm.indicadores[i].alumnos[j].prom=defin;\n }\n }\n }", "title": "" }, { "docid": "2f3e4150d396d243e22200c95aa060ae", "score": "0.5499888", "text": "function pesquisa() {\n let texto_pesquisa = in_pesquisa.value;\n let palavras = extrair_palavras(texto_pesquisa);\n let carreiras = [];\n let cursos = [];\n const pat = pindice[ano_atual];\n let compativeis_ultima = [];\n if (palavras.length > 0) {\n let ultima = palavras[palavras.length-1];\n if (ultima.length > 2) {\n for (const pli in pat) {\n if (pli.startsWith(ultima)) {\n compativeis_ultima.push(pli);\n }\n }\n }\n }\n if (compativeis_ultima.length == 1) {\n palavras.pop();\n palavras.push(compativeis_ultima[0]);\n }\n for (const palavra of palavras) {\n if (palavra in pat) {\n carreiras.push(pat[palavra][\"carreiras\"]);\n cursos.push(pat[palavra][\"cursos\"]);\n } else {\n carreiras.push([]);\n cursos.push([]);\n }\n }\n if (carreiras.length == 0) carreiras = [[]];\n if (cursos.length == 0) cursos = [[]];\n // tirar a intersecção\n let ixn_carreiras = carreiras[0].filter(\n elem => carreiras.every(arr => arr.includes(elem))\n );\n let ixn_cursos = cursos[0].filter(\n elem => cursos.every(arr => arr.includes(elem))\n );\n // inserir as sugestões\n pesquisados.innerHTML = \"\";\n pesquisados.style.display = \"none\";\n for (const carreira of ixn_carreiras) {\n let link = document.createElement(\"a\");\n link.href = \"javascript:void(0)\";\n link.innerText = \"Adicionar carreira \" + carreira[\"cod_carreira\"] + \": \"\n + carreira[\"nome_carreira\"];\n link.setAttribute(\"carreira\", carreira[\"cod_carreira\"])\n link.setAttribute(\"onclick\", \"sug_car(this)\");\n let br = document.createElement(\"br\");\n pesquisados.appendChild(link);\n pesquisados.appendChild(br);\n pesquisados.style.display = \"inline-block\";\n }\n for (const curso of ixn_cursos) {\n let link = document.createElement(\"a\");\n link.href = \"javascript:void(0)\";\n link.innerText = \"Adicionar curso \" + curso[\"cod_carreira\"] + \"-\"\n + curso[\"cod_curso\"] + \": \" + curso[\"nome_curso\"];\n link.setAttribute(\"carreira\", curso[\"cod_carreira\"])\n link.setAttribute(\"curso\", curso[\"cod_curso\"])\n link.setAttribute(\"onclick\", \"sug_cur(this)\");\n let br = document.createElement(\"br\");\n pesquisados.appendChild(link);\n pesquisados.appendChild(br);\n pesquisados.style.display = \"inline-block\";\n }\n}", "title": "" }, { "docid": "0c20695c75483d64a1a9df1a481025e7", "score": "0.54996455", "text": "function coma() {\n\tlet actual = document.getElementById('resultado').innerHTML;\n\tlet sumado = document.getElementById(\"coma\").innerHTML;\n document.getElementById('resultado').innerHTML = actual + sumado;\n console.log ( \"Has presionado el punto para incluir decimales.\" );\n}", "title": "" }, { "docid": "39e814c9fe429bed010fce83aff39180", "score": "0.54987764", "text": "function fazGrafico(opcao){\n\n\t//ajusta elementos do painel, perifericos ao grafico\n\tajustaPainel(opcao);\n\n\t//origina o grafico\n\toriginaGrafico(opcao);\n\n}", "title": "" }, { "docid": "b9ee128e168f552f032d4b11223a392d", "score": "0.54956275", "text": "function insercionBinariaClientes(valor, campo, tipoCampo, camposAGuardarCreditosDeTablas, startVal, endVal) {\n var length = arregloClientes.length;\n var start = typeof startVal != 'undefined' ? startVal : 0;\n var end = typeof endVal != 'undefined' ? endVal : length - 1; //!! endVal could be 0 don't use || syntax\n\n var m = start + Math.floor((end - start) / 2);\n var esString, esInt, esDec;\n\n if (tipoCampo == 'varchar') {\n esString = true;\n } else if (tipoCampo == 'int') {\n esInt = true;\n } else if (tipoCampo == 'decimal') {\n esDec = true;\n }\n\n if (length == 0) {\n var newObject = {};\n\n for (var i = 0; i < camposAGuardarCreditosDeTablas.length; i++) {\n var valorAInsertar = valor[camposAGuardarCreditosDeTablas[i].nombre]; //var validarVariable = checkVariable(valorAInsertar, camposAGuardarCreditosDeTablas[i].tipo);\n\n var validarVariable = true;\n\n if (validarVariable) {\n newObject[camposAGuardarCreditosDeTablas[i].nombre] = valorAInsertar;\n } else {//bitacora add error porque no inserto variable\n }\n }\n\n ;\n arregloClientes.push(newObject);\n return;\n }\n\n if ((esInt || esDec) && valor[campo] == arregloClientes[m][campo] || esString && valor[campo].localeCompare(arregloClientes[m][campo]) == 0) {\n for (var i = 0; i < camposAGuardarCreditosDeTablas.length; i++) {\n var valorAInsertar = valor[camposAGuardarCreditosDeTablas[i].nombre]; //var validarVariable = checkVariable(valorAInsertar, camposAGuardarCreditosDeTablas[i].tipo);\n\n var validarVariable = true;\n\n if (validarVariable) {\n arregloClientes[m][camposAGuardarCreditosDeTablas[i].nombre] = valor[camposAGuardarCreditosDeTablas[i].nombre];\n } else {//bitacora add error porque no inserto variable\n }\n }\n\n ;\n return;\n }\n\n if ((esInt || esDec) && valor[campo] > arregloClientes[end][campo] || esString && valor[campo].localeCompare(arregloClientes[end][campo]) > 0) {\n var newObject = {};\n\n for (var i = 0; i < camposAGuardarCreditosDeTablas.length; i++) {\n var valorAInsertar = valor[camposAGuardarCreditosDeTablas[i].nombre]; //var validarVariable = checkVariable(valorAInsertar, camposAGuardarCreditosDeTablas[i].tipo);\n\n var validarVariable = true;\n\n if (validarVariable) {\n newObject[camposAGuardarCreditosDeTablas[i].nombre] = valorAInsertar;\n } else {//bitacora add error porque no inserto variable\n }\n }\n\n ;\n arregloClientes.splice(end + 1, 0, newObject);\n return;\n }\n\n if ((esInt || esDec) && valor[campo] < arregloClientes[start][campo] || esString && valor[campo].localeCompare(arregloClientes[start][campo]) < 0) {\n //!!\n var newObject = {};\n\n for (var i = 0; i < camposAGuardarCreditosDeTablas.length; i++) {\n var valorAInsertar = valor[camposAGuardarCreditosDeTablas[i].nombre]; //var validarVariable = checkVariable(valorAInsertar, camposAGuardarCreditosDeTablas[i].tipo);\n\n var validarVariable = true;\n\n if (validarVariable) {\n newObject[camposAGuardarCreditosDeTablas[i].nombre] = valorAInsertar;\n } else {//bitacora add error porque no inserto variable\n }\n }\n\n ;\n arregloClientes.splice(start, 0, newObject);\n return;\n }\n\n if (start >= end) {\n return;\n }\n\n if ((esInt || esDec) && valor[campo] < arregloClientes[m][campo] || esString && valor[campo].localeCompare(arregloClientes[m][campo]) < 0) {\n insercionBinariaClientes(valor, campo, tipoCampo, camposAGuardarCreditosDeTablas, start, m - 1);\n return;\n }\n\n if ((esInt || esDec) && valor[campo] > arregloClientes[m][campo] || esString && valor[campo].localeCompare(arregloClientes[m][campo]) > 0) {\n insercionBinariaClientes(valor, campo, tipoCampo, camposAGuardarCreditosDeTablas, m + 1, end);\n return;\n }\n}", "title": "" }, { "docid": "561b6f33b4b52bd0a4f459dfd46a9fb0", "score": "0.54857326", "text": "function comprobar_entrada_edificios(){\n //Compruebo las condiciones de cada input\n if(\n comprobarVacio('CODEDIFICIO') && comprobarCodigo('CODEDIFICIO',10) &&\n comprobarVacio('NOMBREEDIFICIO') && comprobarAlfabetico('NOMBREEDIFICIO',50) &&\n comprobarVacio('DIRECCIONEDIFICIO') && comprobarDireccion('DIRECCIONEDIFICIO',150) &&\n comprobarVacio('CAMPUSEDIFICIO') && comprobarAlfabetico('CAMPUSEDIFICIO',50)\n ){\n return true;//Devuelvo true si se cumplen todas las condiciones y se hace el submit\n }\n else{\n return false;//Si alguna falla devuelvo false\n }\n }", "title": "" }, { "docid": "5ce2041873d835bb4328c9c2212235f9", "score": "0.54791975", "text": "function contadorVocales() {\r\n\r\n cadena = document.formulario.cadena.value;\r\n cadenasinEspacios = cadena.replace(/ /g,\"\"); \r\n\r\n let vocales= 'aeiouAEIOUáéíóúÁÉÍÓÚ';\r\n let contadorVocal = 0;\r\n let contadorConsonantes = 0;\r\n let otros =\"-ºª/¿?_%\";\r\n\r\n for (let i=0; i<cadenasinEspacios.length; i++){\r\n\r\n if (vocales.indexOf(cadenasinEspacios[i]) !==-1 ){\r\n\r\n contadorVocal+=1;\r\n\r\n }\r\n\r\n else {\r\n\r\n if (otros.indexOf(cadenasinEspacios[i]) ==-1) {\r\n\r\n contadorConsonantes+=1; \r\n }\r\n }\r\n\r\n document.formulario.vocales.value = contadorVocal;\r\n document.formulario.consonantes.value=contadorConsonantes;\r\n\r\n } \r\n\r\n}", "title": "" }, { "docid": "c2d524c8ddd64b74d80372e7a6a5fce6", "score": "0.54756737", "text": "function cambiarComaPorPunto(p_precio){\n\t\ttamaño_float = p_precio.length;\n\t\ti=0;\n\t\tcadena = \"\";\n\t\twhile (i<tamaño_float) {\n\t\t\tif(p_precio[i] == \",\"){\n\t\t\t\tcadena = cadena + \".\";\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcadena = cadena + p_precio[i];\n\t\t\t}\n\t\t\ti++;\t\n\t\t}\n\t\tp_precio = cadena;\n\t\treturn p_precio;\n\t}", "title": "" }, { "docid": "87f08fbcf5796254be267040108496b2", "score": "0.5473233", "text": "function asignarRelacionados(){\n for(i=0;i<category.relatedProducts.length;i++){\n var idRelacion = parseInt(category.relatedProducts[i]);\n productRelacionated.push(auxArrayProductos[idRelacion]);\n }\n}", "title": "" }, { "docid": "c522fc10d446d848ded08846e1f58711", "score": "0.5472296", "text": "function agregaConceptos(código,descripción,concepto,monto,porcentaje) {\n\n var tableRef = document.getElementById('detalleLiquidación').getElementsByTagName('tbody')[0];\n // Agrego una fila\n var newRow = tableRef.insertRow();\n\n // Insert a cell in the row at index 0\n var newCell1 = newRow.insertCell(0);\n var newCell2 = newRow.insertCell(1);\n var newCell3 = newRow.insertCell(2);\n var newCell4 = newRow.insertCell(3);\n var newCell5 = newRow.insertCell(4);\n // Append a text node to the cell\n var newText1 = document.createTextNode(código);\n newCell1.appendChild(newText1);\n\n var newText2 = document.createTextNode(descripción);\n newCell2.appendChild(newText2);\n\n var newText3 = document.createTextNode(concepto);\n newCell3.appendChild(newText3);\n\n var newText4 = document.createTextNode(monto);\n newCell4.appendChild(newText4);\n\n var newText5 = document.createTextNode(porcentaje.toFixed(2));\n newCell5.appendChild(newText5);\n\n document.getElementById('conceptoRecibo').value=\"\"\n document.getElementById('conceptoAnses').value=\"\"\n document.getElementById('importeMagis').value=\"\"\n document.getElementById('descConcepto').value=\"\"\n document.getElementById('conceptoRecibo').focus()\n counter=counter+1\n window.scroll(0,45500)\n}", "title": "" }, { "docid": "7ac0a258d86983300d48e73b9c70042b", "score": "0.54711497", "text": "function gerarBoleto(fatura) {\n\n apiService.post('/api/pagamentos/gerarboletofornecedor', fatura,\n gerarBoletoLoadCompleted,\n gerarBoletoLoadFailed);\n }", "title": "" }, { "docid": "6cad8dd02a81e0624a17954295c00157", "score": "0.5468812", "text": "function calculaCustoAnualLoteEconomico() {\n var custoAnual = 0;\n for(var i in tbProdutos) {\n var prod = JSON.parse(tbProdutos[i]);\n var h = parseFloat(prod.Preco) / parseInt(prod.DemandaAnual);\n var lep = Math.sqrt(parseInt(prod.DemandaAnual) * parseFloat(prod.Preco) * 2 / h);\n custoAnual += (lep / 2 * h) + (parseInt(prod.DemandaAnual) / lep * parseFloat(prod.Preco));\n }\n return Number(custoAnual.toFixed(2));\n }", "title": "" }, { "docid": "a10693bb81258d69727cf8e243d61723", "score": "0.54664105", "text": "function cargaReceta(env) {\n console.log(env);\n //eliminaEntorno(); \n \n var arrPlatYNum = [];\n var platAct = \"\";\n var numPAct = \"\";\n var ing = \"\";\n var cant = \"\";\n var uni = \"\";\n var sigArr = false;\n //Para cada elemento agregarlo en mySQL\n for (var e = 0; e < env.length; e ++) {\n //si la siguiente condicional es verdadera significa que ese array pertenece a \"NuevaReceta\"\n if (env[e][0][0][0] == \"newRec\") {\n platAct = env[e][0][0][2];\n numPAct = env[e][0][1][2];\n sigArr = true;\n }\n else {\n arrPlatYNum = env[e][0][0][0].split(\"_\");\n platAct = arrPlatYNum[0];\n numPAct = arrPlatYNum[1];\n }\n //en est caso ya no es más lineal como arriba (no todo se arreglará con \"ifs\") por ello emplearemos loops\n for (var eP = 0; eP < env[e].length; eP ++) {\n //Solo para quitarnos del primer array si es que se trata de newRec donde viene platillo y numP\n if (sigArr === true) {\n eP ++;\n sigArr = false;\n }\n //a partir de aqui ya son siempre 3 arrays con 3 valores cada uno\n //1- Ingrediente\n ing = env[e][eP][0][2];\n //1- Canidad\n cant = env[e][eP][1][2];\n //1- unidad\n uni = env[e][eP][2][2];\n \n //Ya que se tienen todos los valores se puede hacer el envío de datos\n var data = {\n \"action\": \"addIng\",\n \"platillo\": platAct,\n \"numP\": numPAct,\n \"ing\": ing,\n \"cant\": cant,\n \"uni\": uni,\n \"tip\": env[e][0][0][0]\n };\n \n console.log(data);\n $.getJSON(\"recipeAnalysis.php\", data);\n //append to\n //creaEntorno(data);\n }\n }\n //Falta hacer que aparezcan los rows nuevos de inmediato. y desaparezcan los de inserción\n congratsReload(); // No logro cargar los contenidos, entonces enviaré una congratlación y luego cargaré\n //window.location.href = '/recipes.php';\n //window.location.reload(true);\n //console.log(\"si llega hasta aca\")\n //igual también se podría hacer con JQuery pero es más largo\n}", "title": "" }, { "docid": "b9884bfd63fa673f8b3c8dc64ed28266", "score": "0.5465758", "text": "function registraVendas () {\n\n var cliente = {};\n cliente.nome = document.getElementById(\"txtNome\").value;\n cliente.telefone = document.getElementById(\"txtTel\").value;\n if (formPgC) {\n cliente.fp = \"C\";\n } else {\n cliente.fp = \"D\";\n }\n cliente.qtdLitros = qtdL;\n cliente.valPg = parseFloat(precoLitro * qtdL).toFixed(2);\n \n vendas.push(cliente);\n alert(\"Registro das Informações com Sucesso !!!!\");\n\n tanque = tanque - qtdL; // Calcula estoque combustivel\n\n limpezaTela(); // Limpr a tela para ficar so tela opções\n \n}", "title": "" }, { "docid": "daf1814e6cc9642f79308eb54c2e6473", "score": "0.5465445", "text": "function ObtieneLibroDiario2016()\r\n{\r\n\ttry\r\n\t{\r\n\t\tobjContext.setPercentComplete(0.00);\r\n\t\t\r\n\t\t// Control de Memoria\r\n\t\tvar intDMaxReg = 1000;\r\n\t\tvar intDMinReg = 0;\r\n\t\tvar arrAuxiliar = new Array();\r\n\t\t\r\n\t\tvar DbolStop = false;\r\n\t\t\r\n\t\t// Valida si es OneWorld\r\n\t\tvar featuresubs = nlapiGetContext().getFeature('SUBSIDIARIES');\r\n\t var _cont = 0;\r\n\t var auxCont = 0;\r\n\r\n\t // Consulta del libro Mayor\r\n\t nlapiLogExecution('error', 'transaction: ', paramBusqueda); \r\n\t\tvar savedsearch = nlapiLoadSearch('transaction', paramBusqueda);\r\n\t\t\tsavedsearch.addFilter(new nlobjSearchFilter('postingperiod', null, 'anyof', paramperiodo));\r\n\t\t\t// Valida si es OneWorld \r\n\t\t\tif (featuresubs == true) {\r\n\t\t\t\tsavedsearch.addFilter(new nlobjSearchFilter('subsidiary', null, 'is', paramsubsidi));\r\n\t\t\t} \t\r\n\t\t\tif (paramIdInicio>0)\r\n\t\t\t savedsearch.addFilter(new nlobjSearchFilter('internalidnumber', null, 'greaterthan', paramIdInicio));\r\n\t\t// Ejecuta la busqueda\r\n\t\tvar searchresult = savedsearch.runSearch();\r\n\t\tvar auxid = 0;\r\n\t\twhile (!DbolStop && objContext.getRemainingUsage() > 200)\t{\r\n\t\t\tvar objResult = searchresult.getResults(intDMinReg, intDMaxReg);\r\n\t\t\t\r\n\t\t\tif (objResult != null)\r\n\t\t\t{\r\n\t\t\t\tvar intLength = objResult.length;\r\n\t\t\t\tnlapiLogExecution('error', 'intDMinReg, intDMaxReg: ', intDMinReg + ',' + intDMaxReg); \r\n\t\t\t\t\r\n\t\t\t\tif (intLength==0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t DbolStop = true;\r\n\t\t\t\t\t paramIdInicio = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tfor(var i = 0; i < intLength; i++){\r\n\t\t\t\t\t// Cantidad de columnas de la busqueda\r\n\t\t\t\t\tcolumns = objResult[i].getAllColumns();\r\n\t\t\t\t\t\r\n\t\t\t\t\t/*********************************************\r\n\t\t\t\t\t * Carga todoas las columnas de una \r\n\t\t\t\t\t * Fila en un arreglo\r\n\t\t\t\t\t ********************************************/\r\n\t\t\t\t\tarrAuxiliar = new Array();\r\n\t\t\t\t\tfor (var col = 0; col < columns.length; col++){\r\n\t\t\t\t\t\t/*********************************************\r\n\t\t\t\t\t\t * Columna 6 Departamento\r\n\t\t\t\t\t\t ********************************************/\r\n\t\t\t\t\t\tif (col==6) \r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tarrAuxiliar[col] = objResult[i].getText(columns[col]);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tarrAuxiliar[col] = objResult[i].getValue(columns[col]);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// validacion Internal ID\r\n\t\t\t\t\tif (auxid!=arrAuxiliar[2]) {\r\n\t\t\t\t\t\tauxid = arrAuxiliar[2];\r\n\t\t\t\t\t auxCont =1;\r\n\t\t\t\t } else {\r\n\t\t\t\t\t\tauxCont++;\r\n\t\t\t\t }\r\n\t\t\t\t\t// Para el arreglo auxiliar a una matriz\t\t\t\t\r\n\t\t\t\t\tarrLibroDiario2016[_cont] = arrAuxiliar;\r\n\t\t\t\t\t_cont++;\r\n\t\t\t\t\t\r\n\t\t\t\t }\r\n\t\t\t\t intDMinReg = intDMaxReg; \r\n\t\t\t\t intDMaxReg += 1000;\r\n\t\t\t\t\r\n\t\t\t\tif (arrAuxiliar[2]==null){\r\n\t\t\t\t\tDbolStop = true;\r\n\t\t\t\t\tparamIdInicio = 0;\r\n\t\t\t\t\tintDMaxReg = 0;\r\n\t\t\t\t}\r\n\t\t\t\t \r\n\t\t\t\t // Si no hubiera memoria - Tope para partir el schedule\r\n\t\t\t\t if ( objContext.getRemainingUsage() <= 200 )\r\n\t\t\t\t {\r\n\t\t\t\t\t nlapiLogExecution('error', 'auxCont, internalidnumber: ', auxCont + ' , ' + arrAuxiliar[2]); \r\n\t\t\t\t\t \r\n\t\t\t\t\t // Filtros de la busqueda\r\n\t\t\t\t\t var filters = new Array();\r\n\t\t\t\t\t\t\tfilters[0] = new nlobjSearchFilter('memorized', null, 'is', 'F'); \r\n\t\t\t\t\t\t\tfilters[1] = new nlobjSearchFilter('posting', null, 'is', 'T'); \r\n\t\t\t\t\t\t\tfilters[2] = new nlobjSearchFilter('formulanumeric', null, 'greaterthan', 0);\r\n\t\t\t\t\t\t\tfilters[2].setFormula('NVL({debitamount},0)+NVL({creditamount},0)');\r\n\t\t\t\t\t\t\t// Parametros dentro del script\r\n\t\t\t\t\t\t\tfilters[3] = new nlobjSearchFilter('postingperiod', null, 'anyof', paramperiodo);\r\n\t\t\t\t\t\t\tfilters[4] = new nlobjSearchFilter('internalidnumber', null, 'equalto', arrAuxiliar[2]); \r\n\t\t\t\t\t\t\t// Solo si One World\r\n\t\t\t\t\t\t\tif (featuresubs == true)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t filters[5] = new nlobjSearchFilter('subsidiary', null, 'is',paramsubsidi);\r\n\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t// Columnas de la busqueda\r\n\t\t\t\t\t\tvar columns = new Array();\r\n\t\t\t\t\t\t\tcolumns[0] = new nlobjSearchColumn('internalid', null, 'group');\r\n\t\t\t\t\t\t\tcolumns[1] = new nlobjSearchColumn('linesequencenumber', null, 'count');\r\n\t\t\t\t\t\tvar objResult = nlapiSearchRecord('transaction',null, filters, columns);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Resultados de la busqueda\r\n\t\t\t\t\t\tif ( objResult!=null && objResult!=''){\r\n\t\t\t\t\t\t\t// var nLength = objResult.length;\r\n\t\t\t\t\t\t\tcolumns = objResult[0].getAllColumns();\r\n\t\t\t\t\t\t\tvar nLength =objResult[0].getValue(columns[1]);\r\n\t\t\t\t\t\t\tif (parseFloat(nLength) > parseFloat(auxCont))\t{\r\n\t\t\t\t\t\t\t\tvar _valor = (parseFloat(nLength) - parseFloat(auxCont));\r\n\t\t\t\t\t\t\t\tif ( _valor >=1000)\r\n\t\t\t\t\t\t\t\t\t{ intDMaxReg = intDMinReg + 1000; }\r\n\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\t{ intDMaxReg = intDMinReg + (parseFloat(nLength) - parseFloat(auxCont)); }\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tparamIdInicio = arrAuxiliar[2] ; \r\n\t\t\t\t\t\t\t\tDbolStop = true;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\t// Inicio intLength\r\n\t\t\t\t\t\tnlapiLogExecution('error', 'intLength1: ', intLength);\r\n\t\t\t\t\t\tif (intLength<1000){ \r\n\t\t\t\t\t\t\tvar filters = new Array();\r\n\t\t\t\t\t\t\t\tfilters[0] = new nlobjSearchFilter('internalidnumber', null, 'greaterthan', arrAuxiliar[2]);\r\n\t\t\t\t\t\t\t\tfilters[1] = new nlobjSearchFilter('postingperiod', null, 'anyof',paramperiodo);\r\n\t\t\t\t\t\t\t\tif (featuresubs == true) \r\n\t\t\t\t\t\t\t\t\tfilters[2] = new nlobjSearchFilter('subsidiary', null, 'is',paramsubsidi);\r\n\t\t\t\t\t\t\tvar auxResult = nlapiSearchRecord('transaction',paramBusqueda, filters, null);\r\n\t\t\t\t\t\t\tif (auxResult != null){\r\n\t\t\t\t\t\t\t\tif ( auxResult.length > 0 ) {\r\n\t\t\t\t\t\t\t\t\tparamIdInicio = arrAuxiliar[2] ; \r\n\t\t\t\t\t\t\t\t\tDbolStop = true;\t \r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tDbolStop = true;\r\n\t\t\t\t\t\t\t\t\tparamIdInicio = 0;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tDbolStop = true;\r\n\t\t\t\t\t\t\t\tparamIdInicio = 0;\t \r\n\t\t\t\t\t\t\t}\t\t\t\t\t\t \r\n\t\t\t\t\t\t} //fin: if (intLength<1000)\r\n\t\t\t\t\t}\r\n\t\t\t}else{ \r\n\t\t\t\tDbolStop = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tnlapiLogExecution('ERROR', 'paramIdInicio: ', paramIdInicio);\r\n\t\tif (DbolStop == true)\r\n\t\t\t{ \r\n\t\t\tif ( paramIdInicio!=0)\r\n\t\t\t\t{\r\n\t\t\t\t\t//Crear Libro Diario\r\n\t\t\t\t\tGenerarLibroDiario2016();\r\n\r\n\t\t\t\t\t//llama nuevamente al schedule\r\n\t\t\t\t\tvar params = new Array();\r\n\t\t\t\t\t\tparams['custscript_lmry_2016_ld_periodo'] = paramperiodo; \r\n\t\t\t\t\t\tparams['custscript_lmry_2016_ld_subsidiaria'] = paramsubsidi;\t\r\n\t\t\t\t\t\tparams['custscript_lmry_2016_ld_inshead'] = paraminshead;\t\r\n\t\t\t\t\t\tparams['custscript_lmry_2016_ld_begin_id'] = paramIdInicio; \r\n\t\t\t\t\t\tparams['custscript_lmry_2016_ld_search'] = paramBusqueda;\r\n\t\t\t\t\t\tparams['custscript_lmry_2016_ld_prefijo'] = paramPrefijo;\r\n\t\t\t\t\tvar status = nlapiScheduleScript(objContext.getScriptId(), objContext.getDeploymentId(),params);\t\r\n\t\t\t\t}\r\n\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t//Crear Libro Diario\r\n\t\t\t\t\tGenerarLibroDiario2016();\r\n\t\t\t\t}\t\t \r\n\t\t\t}\r\n\t\t\r\n\t}catch(error) {\r\n\t\tsendemail(' [ ObtieneLibroDiario2016 ] ' +error, LMRY_script);\r\n\t}\r\n}", "title": "" }, { "docid": "be03d9cc25f417f982d200b42ca1de17", "score": "0.5464347", "text": "function PersonagemLimpaGeral() {\n gPersonagem.classes.length = 0;\n gPersonagem.pontos_vida.bonus.Limpa();\n gPersonagem.pontos_vida.temporarios = 0;\n gPersonagem.pontos_vida.ferimentos_nao_letais = 0;\n gPersonagem.armas.length = 1; // para manter desarmado.\n gPersonagem.armaduras.length = 0;\n gPersonagem.ca.bonus.Limpa();\n gPersonagem.iniciativa.Limpa();\n gPersonagem.outros_bonus_ataque.Limpa();\n gPersonagem.atributos.pontos.gastos.disponiveis = 0;\n gPersonagem.atributos.pontos.gastos.length = 0;\n for (var atributo in tabelas_atributos) {\n gPersonagem.atributos[atributo].bonus.Limpa();\n }\n for (var i = 0; i < gPersonagem.pericias.lista.length; ++i) {\n gPersonagem.pericias.lista[i].bonus.Limpa();\n }\n for (var chave_classe in gPersonagem.feiticos) {\n gPersonagem.feiticos[chave_classe].em_uso = false;\n gPersonagem.feiticos[chave_classe].nivel_maximo = 0;\n for (var i = 0; i <= 9; ++i) {\n gPersonagem.feiticos[chave_classe].conhecidos[i].length = 0;\n gPersonagem.feiticos[chave_classe].slots[i].feiticos.length = 0;\n gPersonagem.feiticos[chave_classe].slots[i].feitico_dominio = null;\n }\n }\n gPersonagem.estilos_luta.length = 0;\n for (var tipo_salvacao in gPersonagem.salvacoes) {\n if (tipo_salvacao in { fortitude: '', reflexo: '', vontade: '' }) {\n gPersonagem.salvacoes[tipo_salvacao].Limpa();\n } else {\n delete gPersonagem.salvacoes[tipo_salvacao];\n }\n }\n for (var tipo_item in tabelas_itens) {\n gPersonagem[tipo_item].length = 0;\n }\n gPersonagem.especiais = {};\n gPersonagem.imunidades.length = 0;\n gPersonagem.resistencia_magia.length = 0;\n PersonagemLimpaPericias();\n PersonagemLimpaTalentos();\n}", "title": "" }, { "docid": "38a20bbb773ae743fae727e3406596d2", "score": "0.5457358", "text": "calculaPerimetro(){\n return 2*this.ladoA + 2*this.ladoB;\n }", "title": "" }, { "docid": "b72a8609c81d20375b40ea2ec0279b5c", "score": "0.54561967", "text": "function getCoordonadoresParaJuridico() {\n apiService.post('GetCoordinadoresJuridicos', {}, function(resp) {\n coordinadoresParaJurudicos = resp;\n // Obtenemos las campañas y las mostramos\n var endPoint = window.baseUrl+\"/admin/GetDeuduresJuridicos\";\n apiService.post(endPoint, query, function(resp) {\n var tbody = '';\n resp.forEach(function(datos, index) {\n tbody += configurarTdJuridico(datos);\n if(appendReadyParaJuridico(index, resp)) {\n $(\"#parajuridicosTableBody\").empty();\n $(\"#parajuridicosTableBody\").append(tbody);\n }\n });\n });\n });\n }", "title": "" }, { "docid": "297243663f8d46c473975accb8a23478", "score": "0.54525924", "text": "function exec(){\n const saudacao = 'Fala' // escopo 2 (outro endereco de memoria)\n return saudacao\n}", "title": "" }, { "docid": "64144416f915293e14abac396f9ec998", "score": "0.5449746", "text": "function ckOp() {\r\n var par;\r\n if (SES.tabella.name == \"utenti\") {\r\n if (SES.tabella.tipo == 0) {\r\n par = { op: 1, id: SES.tabella.riga.id };\r\n gopost(par);\r\n }\r\n else if (SES.tabella.tipo == 10) {\r\n if (SES.utente.tipo != 10 && SES.utente.tipo != 30)\r\n alert(\"Non sei abilitato.\");\r\n else if (SES.tabella.materia == null)\r\n alert(\"Scegli prima una materia.\");\r\n else {\r\n par = { op: 0, id: SES.tabella.riga.id, m: SES.tabella.materia, c: SES.tabella.classe };\r\n gopost(par);\r\n }\r\n }\r\n }\r\n}", "title": "" }, { "docid": "fe4b227f57171032f3a0f1acb2f35709", "score": "0.54490316", "text": "function carregaProdutosFranquia() {\n apiService.get('/api/franquia/carregaProdutosFranquia', null,\n loadCarregaFranquiasProdutoCompleted,\n loadCarregaFranquiasProdutoFailed);\n }", "title": "" }, { "docid": "58edbf0a056d8397333648e36a9cdc05", "score": "0.5447345", "text": "function agregarAcarrito(listaJuegos){\n let carrito=[]\n \n for (let j = 0 ; j < listaJuegos.length ; j++){\n\n //como puedo hacer para comprar todo\n //1. evaluar si me alcanza para comprar todo, si es verdadero\n //2. agregar todo a carrito\n //2.1 for, que agregue todo directamente\n //como necesito saber si al comprar un juego puedo comprar el //siguiente sin quedarme sin plata\n if(presupuesto < listaJuegos[j].precio){\n console.log(\"Lo siento, no alcanza :( \")\n continue; //salta\n } \n\n //confirm pregunta y obtiene un booleano\n let compra = confirm(`Deseas comprar ${listaJuegos[j]}`);\n console.log(compra);\n if (compra==true){\n carrito.push(listaJuegos[j])\n //actualizando mi presupuesto segun vaya comprando\n presupuesto = presupuesto - listaJuegos[j].precio\n }\n\n }\n // despues el for carrito estará lleno\n return carrito\n\n}", "title": "" }, { "docid": "b0900bb2f6eee3d237dcb51facd36d4e", "score": "0.5438629", "text": "function persentase(bnr,slh,idp){\n\n RunBody();\n \n //mengambil id terapi dan aspek dari terapi\n db.transaction(function(transaction) {\n transaction.executeSql('SELECT ID_TERAPI, ASPEK1, ASPEK2 FROM TERAPI WHERE ID_TERAPI = ?;', [idp],\n function(transaction, result) {\n if (result != null && result.rows != null) {\n\n for (var i = 0; i < result.rows.length; i++) {\n //mengambil aspek 1 dan 2\n var target1 = result.rows.item(i).ASPEK1;\n var target2 = result.rows.item(i).ASPEK2;\n\n //menghitung panjang karakter aspek1 dan aspek2\n var panjang1 = result.rows.item(i).ASPEK1.length;\n var panjang2 = result.rows.item(i).ASPEK2.length;\n }\n \n //memotong2 aspek1 dan 2 (karena dipisahkan oleh tanda \"|\")\n for (var i = 0 ; i < panjang1; i++) {\n if(target1[i] == \"|\"){\n var dummy = target1[i];\n }\n else{\n putus1[count1] = target1[i];\n count1++;\n\n if (count1 == 2) {\n gabung1[index1] = putus1[0] + putus1[1];\n index1 = index1+1;\n count1= 0;\n };\n\n }\n }\n\n //memotong2 aspek1 dan 2 (karena dipisahkan oleh tanda \"|\")\n for (var i = 0 ; i < panjang2; i++) {\n \n if(target2[i] == \"|\"){\n var dummy = target2[i];\n }\n else{\n putus2[count2] = target2[i];\n count2++;\n\n if (count2 == 2) {\n gabung2[index2]= putus2[0] + putus2[1];\n index2 = index2+1;\n count2 = 0;\n };\n\n }\n }\n }\n \n //memasukkan nilai ke tabel nilai\n ambilNilaiLaporan(index1, index2, bnr, slh);\n },errorHandler);\n },errorHandler,nullHandler);\n \n}", "title": "" }, { "docid": "522235b1c43525e442befab10005733b", "score": "0.54376", "text": "function atualizarMembro() {\n $scope.novoMembro.Cnpj = $scope.novoMembro.Cnpj.split(\".\").join(\"\").split(\"/\").join(\"\").split(\"-\").join(\"\");\n apiService.post('/api/membro/atualizar', $scope.novoMembro,\n atualizarMembroSucesso,\n atualizarMembroFalha);\n }", "title": "" }, { "docid": "53293bb1a1842e3521291b555cfa57c8", "score": "0.5437328", "text": "function comprobar_centro(){\n \n //comprobamos que el campo esté aducuado a la expresión que hemos insertado como condición en el if\n if(\n comprobarVacio('CODCENTRO') && comprobarAlfabetico('CODCENTRO', '10') &&\n comprobarVacio('NOMBRECENTRO') && comprobarTexto('NOMBRECENTRO', ' 50') && \n comprobarVacio('DIRECCIONCENTRO') && comprobarAlfabetico('DIRECCIONCENTRO', ' 150') && \n comprobarVacio('RESPONSABLECENTRO') && comprobarTexto('RESPONSABLECENTRO', ' 60') \n ){\n // si todas estan correctas devuelve un true\n return true;\n }\n else{\n // si alguna falla devuelve un false\n return false;\n }\n }", "title": "" }, { "docid": "da7a46602efd66522e382eaeeee643f5", "score": "0.54349715", "text": "function comprobar_titulacion(){\n \n //comprobamos que el campo esté aducuado a la expresión que hemos insertado como condición en el if\n if(\n comprobarVacio('CODTITULACION') && comprobarAlfabetico('CODTITULACION', ' 10') &&\n comprobarVacio('NOMBRETITULACION') && comprobarTexto('NOMBRETITULACION', ' 50') && \n comprobarVacio('RESPONSABLETITULACION') && comprobarTexto('RESPONSABLETITULACION', ' 60')\n ){\n // si todas estan correctas devuelve un true\n return true;\n }\n else{\n // si alguna falla devuelve un false\n return false;\n }\n }", "title": "" }, { "docid": "e09ee67491459a1d45385e8ad1f9232f", "score": "0.5434095", "text": "function buscaGrupoDB(tx) {\r\n\ttx.executeSql('SELECT DESCRICAO FROM GRUPOS WHERE ID_GRUPO = \"' + idGruAlt + '\"', [], buscaGrupoSuccess);\r\n}", "title": "" }, { "docid": "ce7bc07415a75519cff25ed05cc2ec6e", "score": "0.54278743", "text": "function ConsumoBaixarTalao(data) {\n if (data) {\n this.setData(data);\n }\n \n\t\tgScope.ConsumoBaixarTalao = this; \n \n this.DADOS = [];\n this.SELECTED = {};\n this.FILTRO = '';\n }", "title": "" }, { "docid": "a59161e317fde134383d87fc4c52b8d5", "score": "0.5426885", "text": "function fazerPipoca ( ) {\r\n if (pratoPipoca.alimento ( ) == \"OK\" ) {\r\n console.log (pratoPipoca.preparar ( ) ) ;\r\n } else {\r\n console.log (pratoPipoca.alimento ( ) ) ;\r\n }\r\n}", "title": "" }, { "docid": "2d805173f3c8e91231abbd9f7491adcf", "score": "0.54266995", "text": "function extrasGiro(tipoGiro) {\n\n if (tipoGiro == 'Envío') {\n pantallaEnvio.style.display = 'flex';\n\n //Se define el pais del giro a enviar\n for (let index = 0; index < pais.length; index++) {\n pais[index].addEventListener('click', () => {\n extrasTramite = pais[index].value;\n enviarDatosCliente();\n\n pantallaEnvio.style.display = 'none';\n pantallaGiros.style.display = 'none';\n });\n }\n } else if (tipoGiro == 'Recibo') {\n pantallaRecibo.style.display = 'flex';\n\n // Se define el codigo del giro\n for (let index = 0; index < teclaCod.length; index++) {\n teclaCod[index].addEventListener('click', () => {\n\n let valor = teclaCod[index].value;\n if (valor === 'Cancelar') {\n extrasTramite = '';\n } else if (valor === 'Corregir') {\n extrasTramite = extrasTramite.slice(0, -1);\n } else if (valor === 'Ingresar') {\n enviarDatosCliente();\n pantallaRecibo.style.display = 'none';\n pantallaGiros.style.display = 'none';\n } else {\n extrasTramite += valor;\n }\n inputCod.value = extrasTramite;\n });\n }\n }\n}", "title": "" }, { "docid": "51d5b3c0eebcbbf70dad18e1dc5bd062", "score": "0.5424618", "text": "comer(alimentacion){\n return `Los animales de tipo ${this.tipo} se alimentan de ${alimentacion}`\n }", "title": "" } ]
6013ac764100f12dd84a58d65e120b8e
Deals with the engine effects of leaving play, making sure all statuses are removed. Anything which changes the state of the card should be here. This is also called in some strange corner cases e.g. for attachments which aren't actually in play themselves when their parent (which is in play) leaves play.
[ { "docid": "6ea3f3a0422ed4c04f37655629c9f313", "score": "0.7229403", "text": "leavesPlay() {\n // If this is an attachment and is attached to another card, we need to remove all links between them\n if(this.parent && this.parent.attachments) {\n this.parent.removeAttachment(this);\n this.parent = null;\n }\n\n if(this.isParticipating()) {\n this.game.currentConflict.removeFromConflict(this);\n }\n\n if(this.isDishonored && !this.anyEffect(EffectNames.HonorStatusDoesNotAffectLeavePlay)) {\n this.game.addMessage('{0} loses 1 honor due to {1}\\'s personal honor', this.controller, this);\n this.game.openThenEventWindow(this.game.actions.loseHonor().getEvent(this.controller, this.game.getFrameworkContext()));\n } else if(this.isHonored && !this.anyEffect(EffectNames.HonorStatusDoesNotAffectLeavePlay)) {\n this.game.addMessage('{0} gains 1 honor due to {1}\\'s personal honor', this.controller, this);\n this.game.openThenEventWindow(this.game.actions.gainHonor().getEvent(this.controller, this.game.getFrameworkContext()));\n }\n\n this.makeOrdinary();\n this.bowed = false;\n this.covert = false;\n this.new = false;\n this.fate = 0;\n super.leavesPlay();\n }", "title": "" } ]
[ { "docid": "b8f076e0f9c5799d29cb1be7684b02d8", "score": "0.6590717", "text": "function outOfPlay(){\n\n\t$.each(trackedCards,function(i, card){\n\t\t$(\".flipped\").off(\"click\", flipCard);});\n\t\ttrackedCards = [];\n\t\tcardsInPlay = [];\n\n}", "title": "" }, { "docid": "a1515f1f6f895b0ba4ac9a0c897e486f", "score": "0.62675995", "text": "handleOpponentLeaving()\n {\n console.log(\"opponent left\")\n playSound(\"oppLeft\");\n if(game.state.current===\"ticTac\")\n {\n Client.disconnectedFromChat({\"opponent\": game.opponent});\n game.state.start(\"waitingRoom\");\n }\n else\n {\n game.challengingFriend = false\n game.firstPlay = true\n }\n game.opponentLeft = true;\n $('#opponentCard').css({ 'right': '0px', 'right': '-20%' }).animate({\n 'right' : '-20%'\n });\n }", "title": "" }, { "docid": "ec299973eb4f28ed49eafc3f71f8c8b3", "score": "0.6220814", "text": "endTurn(){\n this.currentPlayer = (Object.is(this.currentPlayer, this.player1)) ? this.player2 : this.player1;\n this.currentPlayer[\"deck\"].draw();\n this.toggle = {\n \"HD\":false,\n \"HR\":false,\n \"DT\":false,\n \"EZ\":false,\n \"FL\":false,\n \"SD\":false\n };\n\n this.wincon = \"v2\";\n\n for(let effect of this.effectManager.globalEffects){\n console.log(JSON.stringify(effect));\n if(effect[\"duration\"] == 0){\n let index = this.effectManager.globalEffects.indexOf(effect);\n this.effectManager.globalEffects.splice(index, 1);\n }else{\n effect[\"duration\"] = effect[\"duration\"]-1;\n }\n }\n\n }", "title": "" }, { "docid": "71768195146c7d6c244fc206cea451f1", "score": "0.61254895", "text": "function undo(e){\n lastPlay = gameStatus.plays[gameStatus.plays.length - 1];\n\n // set the win status to false since the players are undoing\n if(gameStatus.isOver){\n gameStatus.isOver = false;\n }\n\n if(lastPlay.turn != 0){\n //clear piece on canvas\n piecesCtx.clearRect(\n lastPlay.x * tileSize + padding - tileSize / 2,\n lastPlay.y * tileSize + padding - tileSize / 2,\n tileSize,\n tileSize\n );\n\n //clear play in gameStatus object\n gameStatus.board[lastPlay.x][lastPlay.y] = 0;\n gameStatus.plays.pop();\n gameStatus.turn--;\n }\n\n updateStatus();\n}", "title": "" }, { "docid": "21de8557d7e5367cbee00cce14f5af04", "score": "0.61107975", "text": "function revert(){\n\n\tif(trackedCards.length != 0){\n\n\t\t$.each(trackedCards, function(i, card){\n\t\t\t$(\"#\"+card).parents(\"div\").eq(1).removeClass(\"flipped\");\n\t\t});\n\n\t}\n\ttrackedCards = [];\n\tcardsInPlay = [];\n}", "title": "" }, { "docid": "2891fd5ece5c78c765b24c33fed5472b", "score": "0.6003112", "text": "leaveCourt() {\n // User is not queued and is thus playing on this court\n this.props.removeUserFromActive();\n }", "title": "" }, { "docid": "775fecf256fede2c2264e4dd472395e1", "score": "0.5985439", "text": "function gameOver(context) {\n context.setState({ player: null, game: null, racks: [] });\n context.clearTimers();\n}", "title": "" }, { "docid": "58f34e4d9493de50f1b27856cdb74cdb", "score": "0.5797881", "text": "function endGame(){\n $('.card-container').removeClass(\"selected-card\");\n $('.card-container').remove();\n while(model.getCardObjArr().length > 0){\n model.removeFromCardObjArr(0);\n }\n\n while(model.getDisplayedCardArr().length > 0){\n model.removeFromDisplayedCardArr(0)\n }\n\n while(model.getSelectedCardObjArr().length > 0){\n model.removeFromSelectedCardArr(0)\n }\n if(($(\".card-display-container\").find(\".game-over-page\").length) === 0){\n createGameOverPage();\n createWinnerPage();\n } else {\n return;\n }\n }", "title": "" }, { "docid": "91ee25c25e0083bcfd8581a8fc9afd67", "score": "0.5779388", "text": "Leave() {\n this.channel.leave();\n this.joined = false;\n this.isPlaying = false;\n delete globals.connections[this.channel.guild.id];\n }", "title": "" }, { "docid": "007527d4ca176c4b1cd70654b5366c48", "score": "0.5723046", "text": "function party_leave(){\n\n\t//log.info(this.tsid+'.party_leave()');\n\n\tif (this.party) this.party.leave(this, 'left');\n}", "title": "" }, { "docid": "e44a86e21742b90bfe36c2f57c02f528", "score": "0.57161826", "text": "onBeforeLeave(context) {\n // user implementation example:\n if (this.hasUnfinishedChanges()) {\n return context.cancel();\n }\n }", "title": "" }, { "docid": "adf0b818a32180dcb1b3af664fb6f441", "score": "0.5703732", "text": "loseCard(card) {\n this.numCards -= 1;\n if (this.numCards <= 0) {\n this.out = true;\n this.cards.pop();\n } else {\n if (this.cards[0] === card) {\n this.cards.shift();\n } else if (this.cards[1] === card) {\n this.cards.pop();\n }\n }\n }", "title": "" }, { "docid": "7462aab85f5cc529bd2ff89e67e2d386", "score": "0.5694286", "text": "function outOfGame({status_string}) {\r\n\tif (currentActivity !== status_string) {\r\n\t\tlog('green', `RPC: ${status_string}`);\r\n\t\tcurrentActivity = status_string;\r\n\t\tif (config.getAPIUseData) getDataUsed();\r\n\t}\r\n\trpc.setActivity({\r\n\t\tdetails: status_string,\r\n\t\tlargeImageKey: 'logo_png',\r\n\t\tlargeImageText: status_string,\r\n\t\tinstance: false\r\n\t}).catch(err => log('red', err));\r\n}", "title": "" }, { "docid": "7e4c43439e376fa2a3e630ec88cb1e22", "score": "0.56863195", "text": "restoreCards(){\n this._cards = this.buildCardSet();\n }", "title": "" }, { "docid": "925f0b88ecff98dfa4b87353ac02e5ac", "score": "0.5683561", "text": "function cancelOrBack() {\n if ($(\"#level-up-screen\").css(\"display\") !== \"none\") {\n $(\"#level-up-screen\").hide();\n menuSound.play();\n return;\n } else if ($(\"#battle-screen\").css(\"display\") !== \"none\" && !inFight) {\n $(\"#battle-screen\").hide();\n menuSound.play();\n } else if ($(\"#text-box\").css(\"display\") !== \"none\") {\n $(\"#text-box\").hide();\n $(\"#confirm-box\").hide();\n menuSound.play();\n playerState = \"standing\";\n }\n}", "title": "" }, { "docid": "8442bdf4032ecaa02bc1de46c0ef33ec", "score": "0.56730115", "text": "function leaveGame() {\n console.log(\"Leaving game...\");\n channelLeaveGame();\n }", "title": "" }, { "docid": "e8d89170a0340b16c7542549cc1dc06a", "score": "0.5658545", "text": "function completeExchangePhase () {\n detectCheat();\n /* exchange the player's chosen cards */\n exchangeCards(HUMAN_PLAYER);\n \n /* disable player cards */\n for (var i = 0; i < $cardButtons.length; i++) {\n $cardButtons[i].attr('disabled', true);\n }\n $gameLabels[HUMAN_PLAYER].removeClass(\"current\");\n allowProgression(eGamePhase.REVEAL);\n}", "title": "" }, { "docid": "6583a024429449f8aa45e2bedd966d1d", "score": "0.561175", "text": "function ifNotMatching() {\n playAudio(tinyWhip);\n // hide cards that are open\n for (c of open) {\n c.card.classList.remove('open', `level${currentLevel}`); // flip cards back over\n }\n resetOpen();\n}", "title": "" }, { "docid": "df108574342e63cec9ffdfe9c4564c26", "score": "0.5606863", "text": "function cleanup() {\n // Discard prompt card\n game.blackDiscards.add([prompt]);\n // Discard answer cards and remove from player hands\n for (let answer of answers.get()) {\n game.whiteDiscards.add(answer.cards);\n var player = util.findByKeyValue(game.players, 'id', answer.userId);\n if (player) {\n for (let card of answer.cards) {\n player.hand.removeById(card.id);\n };\n }\n };\n // Reset player status\n for (let player of game.players) {\n player.answered = false;\n };\n }", "title": "" }, { "docid": "632df1288bd7707787c3222ba1404c2a", "score": "0.5601145", "text": "gameOver(){\n\n\t\tthis.mvc.gameState = 0;\n\n\t\tthis.mvc.model.ioSendEnd();\n\n\t\tthis.stop();\n\n\t\tthis.mvc.model.updatedHallOfFame();\n\n\t}", "title": "" }, { "docid": "d47aeb55c80ccee0a67f29d6304efe91", "score": "0.5587489", "text": "function disableCards() {\n firstCard.removeEventListener('click', flipCard);\n secondCard.removeEventListener('click', flipCard);\n resetBoard();\n winner();\n }", "title": "" }, { "docid": "d9b96f904b19e00731659e6626bbeaab", "score": "0.5572394", "text": "function remAllCards()\r\n{\r\n\tremCards(HOUSE);\r\n\tremCards(PLAYER);\r\n}", "title": "" }, { "docid": "71f99cc5d49ad4bec5d9d8f0c2df5bd5", "score": "0.55719495", "text": "function leave(uid) {\n _playerList.remove(uid);\n }", "title": "" }, { "docid": "bfdaa51242e55420dde642e08abef068", "score": "0.5571827", "text": "function removeOpenCards() {\n cardOpen = [];\n\n}", "title": "" }, { "docid": "1b063725f9ee875977f14f752edc17a8", "score": "0.5571709", "text": "function deleteStatusOverlays() {\n if (rectangleOverlay) {\n Overlays.deleteOverlay(rectangleOverlay);\n rectangleOverlay = false;\n }\n if (desktopOverlay) {\n Overlays.deleteOverlay(desktopOverlay);\n desktopOverlay = false;\n }\n }", "title": "" }, { "docid": "f8fa139ec459c3d6528866cc5df249a1", "score": "0.55522245", "text": "function gameMenuBattlePanelOffStateChangeStarter() {\n store.dispatch( {\n type: BATTLEPANEL_OFF\n });\n }", "title": "" }, { "docid": "f556981782ecc633519f7810b0289fe9", "score": "0.55472344", "text": "function lossCheck() {\n if (playerChar === \"roy\"){\n if (roy.health <= 0){\n alert(\"You lose!\")\n reset();\n \n }\n }\n\n if (playerChar === \"ridley\"){\n if (ridley.health <= 0){\n alert(\"You lose!\")\n reset();\n }\n }\n\n if (playerChar === \"cloud\"){\n if (cloud.health <= 0){\n alert(\"You lose!\")\n reset();\n }\n }\n\n if (playerChar === \"incineroar\"){\n if (incineroar.health <= 0){\n alert(\"You lose!\")\n reset();\n }\n }\n}", "title": "" }, { "docid": "b54edbcc04bb543227a50d71dfd2f041", "score": "0.55456054", "text": "function handleFail() {\n updateGameStatus(false);\n updateFailStatus(true);\n }", "title": "" }, { "docid": "94dd0536103917df721e9d3bab0e9758", "score": "0.5544351", "text": "function cleanUpTheDead() {\n\n if (gameMode != kMode_Play)\n return;\n\n // Remove bullets\n for (var i = 0; i < bullets.length; i++) {\n if (bullets[i].isDead()) {\n bullets.splice(i, 1);\n }\n }\n\n // Remove rocks\n for (var i = 0; i < rocks.length; i++) {\n if (rocks[i].isDead()) {\n rocks.splice(i, 1);\n }\n }\n}", "title": "" }, { "docid": "b61fe4e7fcca4d52d1558789220d1798", "score": "0.55408734", "text": "cancel(){\n this.game.activeNPC.action=null;\n this.game.activeNPC=null;\n }", "title": "" }, { "docid": "45186c92c5e20e3c6583bcec65bcf795", "score": "0.5540169", "text": "status(){\n if(this.facedown.length <= 0){\n inProgress = false;\n console.log(\"GAME OVER\");\n }\n }", "title": "" }, { "docid": "337cbc84d437425a0cc5e89bd0dd8167", "score": "0.5531501", "text": "lostControl() {\n\n\t\tthis.controllingPlayer = null;\n\t\tthis.receivingPlayer = null;\n\t\tthis.supportingPlayer = null;\n\n\t}", "title": "" }, { "docid": "4ba0d99ec602af64f0a2a614ac312ee9", "score": "0.55273396", "text": "function unFlipCards() {\n clearCardInPlay();\n freezePlay = true;\n setTimeout(() => {\n cardOne.classList.remove(\"flip\");\n cardTwo.classList.remove(\"flip\");\n clearDeck();\n }, 1700);\n }", "title": "" }, { "docid": "eada68393894d070f12fb77420a7c319", "score": "0.55028224", "text": "function endGame(status) {\n switch (status) {\n case 'lose':\n console.log(\"You lost all of your lives!\\n\");\n if (wordBank.length > 0) {\n playAgain();\n }\n break;\n case 'win':\n console.log(\"Congratulations, you guessed all the letters!\\n\");\n if (wordBank.length > 0) {\n playAgain();\n } else {\n // End game if no more words\n console.log(\"You've ran out of words to play with! Please come back and play again!\");\n return 1;\n }\n break;\n }\n}", "title": "" }, { "docid": "e165c9b3c83a5697d9e2af2c62b6054a", "score": "0.54989195", "text": "function deTrigger()\n{\n setState( StatesEnum.armed );\n}", "title": "" }, { "docid": "8c3ee8bbda279b3d53d64da5f2804356", "score": "0.54951274", "text": "cancelHoldExit() {\n this.state = HoldsDirectorState.INBOUND;\n }", "title": "" }, { "docid": "7f84a073a7b325d97abd499a6ac5a733", "score": "0.549106", "text": "function SarahKickPlayerOut() {\n\tDialogLeave();\n\tSarahRoomAvailable = false;\n\tCommonSetScreen(\"Room\", \"MainHall\");\n}", "title": "" }, { "docid": "cc7b5d7ea0db2280687b3a24ab95609d", "score": "0.548804", "text": "function resetBoard() {\n \n // prevents a game reset when a game is in progress\n if (self.gameBoard.gameStatus === \"Game in progress\") {\n alert(\"Whoa! One game at a time!\");\n return;\n }\n else if (self.gameBoard.gameStatus === \"Waiting for players\") {\n alert(\"We need two players to start a game.\")\n return;\n }\n // clears the board for a new game\n else {\n for (var i = 0; i < self.gameBoard.boxes.length; i++) {\n self.gameBoard.boxes[i].isX = false;\n self.gameBoard.boxes[i].isO = false;\n self.gameBoard.$save(self.gameBoard.boxes[i]);\n }\n\n //resets the game status for the new game\n self.gameBoard.gameStatus = \"Game in progress\";\n self.gameBoard.$save(self.gameBoard.gameStatus);\n }\n \n }", "title": "" }, { "docid": "d925dd6441935f669760fa39d130b443", "score": "0.547474", "text": "checkStatus(index){\n\t\tvar party = combat.currentTurn == 0 ? player.party : enemyParty.party;\n\t\tvar affiliation = combat.currentTurn == 0 ? \"actor\" : \"enemy\";\n\t\tvar takeTurn = true;\n\n\t\tif(combat.checkDeathStatus(party[index]) == false && party[index].status.statusEffects.length > 0){\n\t\t\t\n\t\t\tfor(var i = (party[index].status.statusEffects.length - 1);i > -1;i--){\n\t\t\t\tif(party[index].status.statusEffects[i].stats.duration == 0){\n\t\t\t\t\tif(party[index].status.statusEffects[i].identity.category == \"Buff\"){\n\t\t\t\t\t\tif(party[index].status.statusEffects[i].identity.subCategory == \"buff\"){\n\t\t\t\t\t\t\tstat.modifyStat(party[index], party[index].status.statusEffects[i].stats.stat, \"debuff\", party[index].status.statusEffects[i].stats.amount);\n\t\t\t\t\t\t\tconsole.log(party[index].stats);\n\t\t\t\t\t\t\tparty[index].status.statusEffects.splice(i, 1);\n\t\t\t\t\t\t}else if(party[index].status.statusEffects[i].identity.subCategory == \"debuff\"){\n\t\t\t\t\t\t\tstat.modifyStat(party[index], party[index].status.statusEffects[i].stats.stat, \"buff\", party[index].status.statusEffects[i].stats.amount);\n\t\t\t\t\t\t\tparty[index].status.statusEffects.splice(i, 1);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}else{\n\t\t\t\t\t\tparty[index].status.statusEffects.splice(i, 1);\n\t\t\t\t\t}\n\t\t\t\t}else if(party[index].status.statusEffects[i].stats.duration > 0){\n\t\t\t\t\tparty[index].status.statusEffects[i].stats.duration -= 1;\n\t\t\t\t\ttakeTurn = stat.callStatusMechanic(party[index], party[index].status.statusEffects[i], affiliation);\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t/* add checks for num-flag to either 0:run turn as normal, 1: skip that actors turn, or 2: random attack any target */\n\t\tif(takeTurn == true){\n\t\t\treturn true;\n\t\t}else if(takeTurn == false){\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "1642244fdd425364b357a30b39ade033", "score": "0.54368526", "text": "function gameOver(){\n\n\tif((playerScores[0] + playerScores[1] == 8) || (playerScores[0] == 5) || (playerScores[1] == 5)){\n\t\t$(\".card\").off(\"click\", flipCard);\n\t\tdocument.querySelector(\".timerDisplay\").innerHTML = \"Game ended!\";\n\t\treturn true;\n\t}\n\n\treturn false;\n}", "title": "" }, { "docid": "e631ba74ab4de2582b362f814aa0ba36", "score": "0.5433015", "text": "function unfilterStatus(Marker, e) {\n delete this.status.fil[Marker][e.name];\n if(Object.keys(this.status.fil[Marker]).length === 0) delete this.status.fil[Marker];\n if(Object.keys(this.status.fil).length === 0) delete this.status.fil;\n this.fire(\"statuschange\", {attr: `fil.${Marker}.${e.name}`});\n }", "title": "" }, { "docid": "5be777c398b065e493a4103b241c0dd9", "score": "0.54317707", "text": "function freezeEnBoard() {\n setTimeout(() => {\n if (enCardInPlay >= 1) {\n $(\".game-card-en\").off(\"click\", playGame);\n }\n }, 100);\n }", "title": "" }, { "docid": "0d75d1c0b5222f8295331ee29778e9cd", "score": "0.542405", "text": "removeLife(){\n if(overlay.classList.contains('win')){\n } else {\n const liveHeart = [];\n this.missed ++;\n for(let x = 0; x < hearts.length; x++){\n if(hearts[x].firstElementChild.classList != 'lostLife'){\n liveHeart.push(hearts[x]);\n }\n }\n if(liveHeart.length > 1){//if they have any lives left\n liveHeart[0].firstElementChild.src = 'images/lostHeart.png';\n liveHeart[0].firstElementChild.classList.add('lostLife');\n } else { //else if no lives left, then game is over\n this.gameOver();\n }\n }\n }", "title": "" }, { "docid": "85fcc580ce5e41a31f59d83b0841706a", "score": "0.5414223", "text": "function removeOpenCards() {\n openCards = [];\n}", "title": "" }, { "docid": "9d024e76720c4aa7216a54769bfdecbb", "score": "0.5411619", "text": "playerLoses() {\n this.roundEnds('LOSER');\n }", "title": "" }, { "docid": "c0140e53f944481ecbc22158e0853372", "score": "0.5409997", "text": "async lose(game, data) {\n\t\tthis._lost = true;\n\t\tthis._lost_time = data.time;\n\t}", "title": "" }, { "docid": "c0140e53f944481ecbc22158e0853372", "score": "0.5409997", "text": "async lose(game, data) {\n\t\tthis._lost = true;\n\t\tthis._lost_time = data.time;\n\t}", "title": "" }, { "docid": "7ddf72be47ca98f2b23f03c014791082", "score": "0.54018956", "text": "function loseState() {\r\n endCurrentRound();\r\n $(\"#big-card-text\").html(\"You lose! The witch has defeated you. Click Confirm to play again.\")\r\n $(\"#confirm-button\").click(function() {\r\n $(\"#confirm-button\").hide();\r\n $(\"#losses-text\").html(lossScore);\r\n resetGame()\r\n $(\"#big-card-z\").fadeOut(400)\r\n });\r\n}", "title": "" }, { "docid": "d5e3098620a201122e5cea5df4f22b12", "score": "0.5400343", "text": "function PendingPlayerState() { }", "title": "" }, { "docid": "15b500e421000855a06bd6e597d557d9", "score": "0.53989947", "text": "function disableCards() {\n firstCard.removeEventListener('click', flipCard);\n secondCard.removeEventListener('click', flipCard);\n ++score;\n checkForWin();\n resetBoard();\n}", "title": "" }, { "docid": "397fbfdb2b803aab03690083a1314d60", "score": "0.53970796", "text": "disableCards() {\n this.matchCount = this.matchCount + 1;\n this.counter.innerHTML = this.matchCount;\n this.firstCard.removeEventListener('click', this.flipCard);\n this.secondCard.removeEventListener('click', this.flipCard);\n this.resetBoard();\n }", "title": "" }, { "docid": "40f77aae7bb3b29ab19e9f190dbba4b1", "score": "0.539115", "text": "function cleanEvent() {\n\tvar removable = ACT.Event.removable;\n\tfor (var itor = 0; itor < removable.length; itor++) {\n\t\tif (removable[itor].eventType === 'env:envRendered') continue;\n\t\tif (removable[itor].eventType === 'message') continue;\n\t\tif (removable[itor].eventType === 'screen:status') continue;\n\t\tif (removable[itor].eventType === 'collapseStart') continue;\n if (removable[itor].eventType === 'html5:message') continue;\n\t\tremovable[itor].remove();\n\t}\n\tACT.Event.removable = [];\n}", "title": "" }, { "docid": "805a4b5b6796b02c99b7173dff7c9118", "score": "0.53896344", "text": "function resetGameOverCard(){\n gameOverInfo = '';\n}", "title": "" }, { "docid": "b605a83bf797c668c2f84d7d69c98dc9", "score": "0.5386188", "text": "_killCard(card) {\n const index = this.cards.getChildIndex(card);\n this.cards.removeChild(card);\n this.map[index].empty = true;\n }", "title": "" }, { "docid": "bf09551ee4943b2c884636028c24bbae", "score": "0.53823876", "text": "function party_left(reason){\n\n\t//log.error('party_left for '+this.tsid);\n\n\tdelete this.party;\n\n\tswitch (reason){\n\t\tcase 'disband':\n\t\t\tthis.apiSendMsg({ type :'party_leave' });\n\t\t\tthis.party_activity(\"Your party has been disbanded\");\n\t\t\tbreak;\n\t\tcase 'invites-done':\n\t\t\t// the party was only emphemeral, being used for invites\n\t\t\tbreak;\n\t\tcase 'left':\n\t\t\tthis.apiSendMsg({ type :'party_leave' });\n\t\t\tthis.party_activity(\"You have left the party\");\n\t\t\tbreak;\n\t\tcase 'offline':\n\t\t\t// everyone went offline\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tthis.apiSendMsg({ type :'party_leave' });\n\t\t\tthis.party_activity(\"Left party for unknown reason: \"+reason);\n\t}\n\n\t//this.sendActivity('MSG:party_leave');\n}", "title": "" }, { "docid": "65c48c9abe5c9732195202eb950b21a2", "score": "0.53809255", "text": "_clearRevokingShipIt() {\n this._$boxStatus.removeClass('revoking-ship-it');\n }", "title": "" }, { "docid": "8f1aab50aeedaa0e3b33afcf49663495", "score": "0.5376071", "text": "function discardCard(numCard){\n\tif(dbg){\n\t\tdebug(\"Discarding card \" + numCard );\n\t}\n\t\n\tvar card;\n\t\n\tif (numCard == 1){\n\t\tcard = card1;\n\t\tcard1 = card4;\n\t\tcard4 = EMPTY;\n\t}\n\telse if (numCard == 2){ \n\t\tcard = card2;\n\t\tcard2 = card4;\n\t\tcard4 = EMPTY;\n\t}\t\n\telse if (numCard == 3){\n\t\tcard = card3;\n\t\tcard3 = card4;\n\t\tcard4 = EMPTY;\n\t}\n\telse{ \n\t\tcard = card4;\n\t\tcard4 = EMPTY;\n\t}\n\t\n\tupdate_hand();\n\tsend_event(EVENT_PUT_CARD, card);\n\tend_turn();\n}", "title": "" }, { "docid": "69c1bcb1da0436ed3babf8018cf6663e", "score": "0.53672296", "text": "onCardClosed(cardNum) {\n if (cardNum === this.openCard) this.openCard = null\n }", "title": "" }, { "docid": "176b257dc191d5fc3493d5040174e89e", "score": "0.5363003", "text": "function discard() {\n\t// Wenn der Timer aktiv ist,...\n\tif(time.Enable) {\n\t\t// ...dann anhalten\n\t\ttime.Stop();\n\t}\n\t\n\t// Die gespielte Zeit in die Statistiken einfließen lassen\n\tstatistics.addSeconds(difficulty, statistics.state.discard, seconds);\n\t// Die aufgedeckte Fläche in die Statistiken einfließen lassen\n\tstatistics.addDiscovered(difficulty, statistics.state.discard, calculateDiscoveredPercent());\n\t\n\t// DIe statistics speichern\n\tPersistanceManager.saveStatistics(statistics);\n}", "title": "" }, { "docid": "0ea61a44b3d016d50a758f0ea6f2eb09", "score": "0.53598744", "text": "function lost(){\n pause();\n playing = false;\n lose = true;\n setHighscore();\n html('rows','Game Over')\n }", "title": "" }, { "docid": "7347440bea11391dc4c8c55efe45e8df", "score": "0.535716", "text": "function disableCards() {\n firstCard.removeEventListener('click', flipCard);\n secondCard.removeEventListener('click', flipCard);\n\n resetBoard();\n }", "title": "" }, { "docid": "bc13a5a176c67d097be8c316ea82c28b", "score": "0.5356155", "text": "function reset(){\n let newCardsToPlay = {}\n hand[0].forEach(card_id => newCardsToPlay[card_id] = false);\n setCardsToPlay(newCardsToPlay);\n }", "title": "" }, { "docid": "e99b8a671ff7a9f0160b3e398a564c00", "score": "0.5349745", "text": "check_GameOver() {\n if (this.model.winner == 0) {\n if (this.currentPlayerBot == 0) {\n this.scene.undo_play = false;\n this.state = 'WAIT_UNDO';\n }\n else\n this.state = 'CHANGE_PLAYER';\n }\n else{\n this.state = 'GAME_OVER';\n this.scene.showGameMovie = false;\n this.view.incWinsPlayer(this.model.winner);\n }\n }", "title": "" }, { "docid": "d1a3af9a67201bbd25a497a5ab250ff3", "score": "0.5347814", "text": "prepareNextState() {\n this.gameOrchestrator.changeState(new CheckGameOverState(this.gameOrchestrator));\n }", "title": "" }, { "docid": "7ad0ae8c654f8f48d3bf1e5887b00381", "score": "0.53469735", "text": "function removeOpenCards() {\n openCard = [];\n}", "title": "" }, { "docid": "0f866f0bb777a7e01986adfecca3f5f3", "score": "0.5344009", "text": "function lose(){\n playing = false;\n}", "title": "" }, { "docid": "a733570e9563e1c536f66ba16bb9992d", "score": "0.5342377", "text": "function deal() {\n\tif (gameOver) {\n\t\tcardOpacity();\n\t\tlet player1Images = document\n\t\t\t.querySelector(player1.div)\n\t\t\t.querySelectorAll(\"img\");\n\n\t\tlet player2Images = document\n\t\t\t.querySelector(player2.div)\n\t\t\t.querySelectorAll(\"img\");\n\n\t\tfor (let i = 0; i < player1Images.length; i++) {\n\t\t\tplayer1Images[i].remove();\n\t\t}\n\t\tfor (let i = 0; i < player2Images.length; i++) {\n\t\t\tplayer2Images[i].remove();\n\t\t}\n\n\t\tplayer1.score = 0;\n\t\tplayer2.score = 0;\n\t\tdocument.querySelector(player1.scoreSpan).textContent = 0;\n\t\tdocument.querySelector(player2.scoreSpan).textContent = 0;\n\n\t\tdocument.querySelector(player1.scoreSpan).style.color = \"white\";\n\t\tdocument.querySelector(player2.scoreSpan).style.color = \"white\";\n\n\t\tactivePlayer = player1;\n\t\ttextTitle.textContent = \"Lets play\";\n\t\tgameOver = false;\n\t}\n}", "title": "" }, { "docid": "3bc17b897df7cc4eb2ef216dee089b66", "score": "0.53408897", "text": "function removeOpenCards() {\n openCards = [];\n}", "title": "" }, { "docid": "c7f9cf68cc9692cd86c0dd5b5d1cd54b", "score": "0.5340109", "text": "function unflipCards() {\n app.lockBoard = true;\n setTimeout(() => {\n app.firstCard.classList.remove('flip');\n app.secondCard.classList.remove('flip');\n resetBoard();\n cardNoMatchSound();\n }, 1000);\n}", "title": "" }, { "docid": "2f222e101ea5d720b303cc7f36a2474f", "score": "0.5336407", "text": "function lose() {\n looser.play();\n $(\"#outcome\").show().text(\"Loser!\")\n losses++;\n $(\"#losses\").text('Losses: ' + losses);\n gameReset();\n }", "title": "" }, { "docid": "fa037de2c7c6845e1813117879fe312f", "score": "0.5330169", "text": "function checkGameStatus() {\n if (xCor[xCor.length - 1] > width ||\n xCor[xCor.length - 1] < 0 ||\n yCor[yCor.length - 1] > height ||\n yCor[yCor.length - 1] < 0 ||\n checkSnakeCollision()) {\n noLoop();\n var scoreVal = parseInt(scoreElem.html().substring(8));\n scoreElem.html('Game ended! Your score was : ' + scoreVal);\n synth.triggerAttackRelease('C2', '4n');\n }\n}", "title": "" }, { "docid": "ce8ec3ee59897c4b4ff48d21af3d7be6", "score": "0.532905", "text": "function disableCards(){\n let name = secondCard.dataset.name;\n player.innerHTML = name;\n firstCard.removeEventListener(\"click\", flipCard);\n secondCard.removeEventListener(\"click\", flipCard);\n player.classList.add(\"active\");\n resetBoard();\n setTimeout(gameFinished,1000);\n setTimeout(()=>{\n player.classList.remove(\"active\");\n },2000)\n}", "title": "" }, { "docid": "28834b878c6f765cd135c5cf9b492382", "score": "0.53280216", "text": "undoMove(){\n if(this.boardState != this.previousBoardState && this.previousBoardState != null && this.previousBishops[0] != 'AI' && this.previousBishops[0] != 'LostTurn'){\n this.boardState = this.previousBoardState;\n //Revert the animation\n for(let i = 0; i < this.previousBishops.length; i++){\n this.previousBishops[i].animation.done = false;\n this.previousBishops[i].animation.reverse = true;\n }\n this.playerTurn = (this.playerTurn % 2) + 1;\n this.scene.rotateCamera();\n console.log('Undoing Move',this.previousBoardState,this.boardState);\n }\n }", "title": "" }, { "docid": "f05518e0c4395cfcba6fa7c6f7d49462", "score": "0.5325031", "text": "leave(){\r\n if ( this.isOpened && !this.getRef('list').isOver ){\r\n this.isOpened = false;\r\n }\r\n }", "title": "" }, { "docid": "32e6ca3021f068cb303f0246ca34b3dc", "score": "0.53229713", "text": "function clearPendingValueStatus(){\n _.each(pendingValueStatus, function(value){\n value.save({\"status\": \"ok\"}, {wait: true});\n });\n}", "title": "" }, { "docid": "91088559b80e73995f17b0861b5a097f", "score": "0.5321926", "text": "stopJobStatusUpdates() {\n this.state.listeningForJob = false;\n\n if (this.state.awaitingLog) {\n this.stopEventListeners([jcm.MESSAGE_TYPE.STATUS]);\n } else {\n this.stopEventListeners();\n }\n }", "title": "" }, { "docid": "066d5a92b9d1edb204a27cb591f08731", "score": "0.5319908", "text": "function revive () {\n ded = false;\n sad = false;\n //turn on event listeners after death\n document.addEventListener('mouseup', stopCare);\n buttonsList.addEventListener('mousedown', takeCare);\n //return stats to default state\n for (var key in statistics) {\n statistics[key] = 50; \n document.getElementById(`${key}`).value = statistics[key];\n };\n //run default functions\n decreaseStats();\n defaultMood();\n }", "title": "" }, { "docid": "8d5eb0a1040899e15a65d0029bf49ff7", "score": "0.53176636", "text": "function unflipCards() {\n lockBoard = true;\n setTimeout(() => {\n firstCard.classList.remove('flip');\n secondCard.classList.remove('flip');\n resetBoard();\n }, 1500);\n\n }", "title": "" }, { "docid": "24d9ad0ebca2ee1128828ab1bdd4830a", "score": "0.5316462", "text": "endGame() {\n this.inProgress = false;\n this.currentPlayer = null;\n this.pendingChip = null;\n this.emit('game:end');\n this.type = null;\n if (this.debug) {\n this.columnHistory.length = 0;\n }\n }", "title": "" }, { "docid": "86e0919e11b9e6d40828cd6d9790693c", "score": "0.5314935", "text": "function untapCards(previousCard, currentCard) {\n turnedCards.pop();\n $(previousCard.dom).toggleClass(\"not-match shake-card\");\n $(currentCard.dom).toggleClass(\"not-match shake-card\");\n\n setTimeout(function () {\n $(previousCard.dom).toggleClass(\"open not-match shake-card\");\n $(currentCard.dom).toggleClass(\"open not-match shake-card\");\n }, 500);\n}", "title": "" }, { "docid": "0594828a7cbb46424f56de264bcccb82", "score": "0.5314411", "text": "function disableCards() {\n firstCard.removeEventListener('click', flipCard);\n secondCard.removeEventListener('click', flipCard);\n resetBoard();\n }", "title": "" }, { "docid": "8fcf981efd0e360eba9eb6235cd165e9", "score": "0.5308895", "text": "function disableCards() {\r\n firstCard.removeEventListener('click', flipCard);\r\n secondCard.removeEventListener('click', flipCard);\r\n resetBoard();\r\n}", "title": "" }, { "docid": "280ade9d4f14d1e5932ddf170af9a4da", "score": "0.53069067", "text": "function DestroyCurrCard() {\n mc.off('press panstart panmove');\n mc.off('pressup panend');\n\n mc.destroy();\n currCard.remove();\n\n ResetSongVars();\n SliderPercentage(0);\n}", "title": "" }, { "docid": "420b8a89cb5a8ae38ffaa4a47d533af1", "score": "0.53069", "text": "function disableCards(){\n // removes ability to flip the cards back over.\n firstCard.removeEventListener('click', flipCard);\n secondCard.removeEventListener('click', flipCard);\n // add to matched cards counter\n matchedCards++;\n // reset the board \n resetBoard();\n}", "title": "" }, { "docid": "df96b5fd0b86ca1ff3b3afea7a95e5b6", "score": "0.5302411", "text": "function disableCards() {\n firstCard.removeEventListener('click', flipCard);\n secondCard.removeEventListener('click', flipCard);\n resetBoard();\n}", "title": "" }, { "docid": "e0e791bb26f5427ca6d3968df4a6991d", "score": "0.5301843", "text": "removeRoom(roomname, playerIDs, reason, roomType) {\n if (roomType === \"play\" || roomType === \"game_end\") {\n delete this.playrooms[roomname];\n delete this.map[roomname];\n }\n else if (roomType === \"wait\"){\n delete this.waitrooms[roomname];\n delete this.map[roomname];\n }\n delete this.cameras[roomname];\n playerIDs.forEach((playerID, index) => {\n this.sockets[playerID].emit(Constants.MSG_TYPES.GAME_OVER, reason[index]);\n this.removePlayer(this.sockets[playerID]);\n });\n }", "title": "" }, { "docid": "d062edbd0887882ba71814dc3f207a20", "score": "0.5296578", "text": "function leaveBuilding() {\n inBuilding.inside = false;\n var eventObject = {\n \"event\": \"\",\n \"description\": \"\",\n \"image\": naratorImg\n };\n eventObject.event = \"You have left\";\n eventObject.description = inBuilding.buildingName;\n sendEventToIo(eventObject);\n // $scope.eventHistory.push(eventObject);\n resetVariables();\n updateScroll('event_home');\n }", "title": "" }, { "docid": "60db4071e6d81da6e7d3bcfb0e4f4e88", "score": "0.5293292", "text": "function loseLife() {\n\n // Decrease the number of lives the player has remaining\n _lives--;\n\n // Pause the player's movements\n freezePlayer();\n\n // Inform other code modules that the player has lost a life\n Frogger.observer.publish(\"player-lost-life\");\n\n if (_lives === 0) {\n // Declare the game to be over if the player has no lives remaining\n gameOver();\n } else {\n\n // If there are lives remaining, wait 2000 milliseconds (2 seconds) before\n // resetting the player's character and other obstacles to their initial\n // positions on the game board\n setTimeout(reset, 2000);\n }\n }", "title": "" }, { "docid": "9ae0e34e8680fbeb3e9a2be7c605681b", "score": "0.5290994", "text": "function isRemaining() {\n return state === states.remaining;\n }", "title": "" }, { "docid": "c8fe225a003095a3c8fe68f5499fd86d", "score": "0.52892727", "text": "function onHoverExit() {\n if (!callAlive(call)) {\n return;\n }\n if (!call.muted) {\n // mute button should be visible always\n $(this).find('img').fadeOut('slow');\n } else {\n $(this).find('.media_call_end').fadeOut('slow');\n $(this).find('.media_call_video').fadeOut('slow');\n }\n if (call.win.fullscreen) {\n status.fadeOut('slow');\n }\n }", "title": "" }, { "docid": "2408a4ce9d5c96e91259a9638818b1ef", "score": "0.5288904", "text": "function lose() {\n\ttime.Stop();\n\talive = false;\n\t\n\tstatistics.addGame(difficulty, statistics.state.lose);\n\tstatistics.addSeconds(difficulty, statistics.state.lose, seconds);\n\tstatistics.addDiscovered(difficulty, statistics.state.lose, calculateDiscoveredPercent());\n\t\n\t// Die statistics speichern\n\tPersistanceManager.saveStatistics(statistics);\n\t\n\tmessage(\"Sie haben verloren!<br> <br>\" + \n\t\t\t\"Schwierigkeit: \" + $('#difficulty :selected').text() + \" <br>\" +\n\t\t\t\"Benötigte Zeit: \" + timeCalculator(seconds) + \" <br>\" +\n\t\t\t\"Aufgedeckte Felder: \" + percCalculator(calculateDiscoveredPercent()) + \"%\");\n}", "title": "" }, { "docid": "5f4f6b9e4a0297bcf43bc5c9c6adc233", "score": "0.52781516", "text": "removeToChangeLayers(){\n if (this.map && !this.map.isStyleLoaded()) return;\n this.props.statuses.forEach(status => {\n if (status.key !== 'no_change'){\n status.layers.forEach(layer => {\n if (this.map.getLayer(layer)) {\n this.map.removeLayer(layer);\n }\n });\n }\n });\n }", "title": "" }, { "docid": "8a33764005e982bb04cd634db2179ac0", "score": "0.5277894", "text": "exitActiveHold() {\n this.state = HoldsDirectorState.EXITING;\n }", "title": "" }, { "docid": "65087deb2fccd279a366fd681065ad41", "score": "0.5276247", "text": "function gameOver(status) {\n saveItemInLocalStorage('gameOver',true);\n clearTimeout(timer);\n timer=null;\n var message='Congrats you have won';\n if(!status)\n message='You have lost';\n return message;\n}", "title": "" }, { "docid": "58328dba94f017a74d2a7b9b52bfbe05", "score": "0.52736115", "text": "function gameOver() {\n levels[level].reset();\n document.getElementById('game-over').classList.remove('display');\n}", "title": "" }, { "docid": "64098839bbc2f5c9dbfc61796a8270bd", "score": "0.5272394", "text": "function onDisableCards(e) {\n\t\tuserInterface.disableRestartBtn();\n\n\t\tcards.forEach(card => {\n\t\t\tcard.disableMe();\n\t\t});\n\t}", "title": "" }, { "docid": "5eb7a53ea6e2b6befa9fbd0ab316c212", "score": "0.5272013", "text": "function disableCards() {\r\n firstCard.removeEventListener(\"click\", flipCard);\r\n secondCard.removeEventListener(\"click\", flipCard);\r\n\r\n resetBoard();\r\n}", "title": "" }, { "docid": "708bad9c7baa4436b96121b4c116720b", "score": "0.52712876", "text": "reset() {\n this.playerContainer.players.forEach(x => x.clearHand())\n this.winner = undefined;\n this.incrementState();\n this.clearSpread();\n this.deck = new Deck();\n this.clearPot();\n this.clearFolded();\n }", "title": "" }, { "docid": "348012377226e4da5d2cd2cc65d42fa8", "score": "0.527116", "text": "function disableCards() {\n firstCard.removeEventListener('click', flipCard);\n secondCard.removeEventListener('click', flipCard);\n resetBoard();\n}", "title": "" }, { "docid": "7e5f8c77975701e531698b0f836567b1", "score": "0.52693886", "text": "function unflipCards (){\n lockBoard = true;\n\n setTimeout(() => {\n firstCard.classList.remove (\"flip\");\n secondCard.classList.remove (\"flip\");\n\n resetBoard();\n }, 1200);\n }", "title": "" } ]
3e48dd55f7eab1fa05d357ef105ec45a
Returns a promise with a single annotation with id in req.params._id.
[ { "docid": "d75f3a04d1ebb2a5990e450c4c4b467c", "score": "0.8002481", "text": "getAnnotation(req) {\n let _id = req.params._id\n if (!_id) {\n return Promise.resolve(null)\n }\n return this.collection.findOne({ _id })\n }", "title": "" } ]
[ { "docid": "554bbf1f581dc43daa3879b166302335", "score": "0.7433847", "text": "async getAnnotation(_id) {\n if (!_id) {\n throw new MalformedRequestError()\n }\n const result = await Annotation.findById(_id).lean()\n if (!result) {\n throw new EntityNotFoundError(null, _id)\n }\n return result\n }", "title": "" }, { "docid": "c5a535bff809042876ff784b5c5abb13", "score": "0.6355958", "text": "fetchAnnotation (id, callback) {\n HypothesisClientInterface.sendCallToBackground('fetchAnnotation', id, callback)\n }", "title": "" }, { "docid": "5fe8e06811fd75f7d2faddccc0142b84", "score": "0.573697", "text": "getGoalById(id) {\r\n return new Promise((resolve, reject) => {\r\n this.db.findOne({ _id: id }, (err, entry) => {\r\n err ? reject(err) : resolve(entry)\r\n })\r\n })\r\n }", "title": "" }, { "docid": "7a95032d72897198aba5a5d5805c3fd6", "score": "0.5549033", "text": "static getOne(req, res, next) {\n const { id } = req.params\n\n Article.findById(id)\n .then(article => {\n res.status(200).json(article)\n })\n .catch(next)\n }", "title": "" }, { "docid": "1469ff147cef44587a7ac4e888d86d93", "score": "0.5515244", "text": "function getMovieID (req,res)\n{\n var uuid = req.swagger.params.ID.value;\n Usergrid.GET('movies',uuid, function(error, usergridResponse)\n {\n if (error){res.json({error: error});}\n else res.json({movie: usergridResponse}).end();\n })\n}", "title": "" }, { "docid": "33aa361ac0c084a4d95d7e2e7197d256", "score": "0.55038273", "text": "getByid(id) {\n return new Promise((resolve, reject) => {\n let error = 'invalid input';\n return reject(error);\n\n var result = this.model.findById(id);\n return resolve(result);\n }\n )\n }", "title": "" }, { "docid": "c8c658dfbcfda7439e82ca9868a448e7", "score": "0.5479653", "text": "postAnnotation(req) {\n let annotation = req.body\n if (!annotation || !req.user) {\n return Promise.resolve(null)\n }\n // Set creator\n if (!annotation.creator) {\n annotation.creator = {\n id: req.user.uri,\n name: req.user.name\n }\n }\n // Add created and modified dates.\n let date = (new Date()).toISOString()\n if (!annotation.created) {\n annotation.created = date\n }\n // Remove type property\n _.unset(annotation, \"type\")\n // TODO: Validate annotation\n\n // Add _id and URI\n annotation._id = util.uuid()\n annotation.id = util.getBaseUrl(req) + \"annotations/\" + annotation._id\n // Make sure URI is a https URI (except in tests)\n if (!config.env == \"test\") {\n annotation.uri.replace(\"http:\", \"https:\")\n }\n // Save annotation\n return this.collection.insertOne(annotation)\n .then(() => {\n return annotation\n })\n .catch(error => {\n console.log(error)\n return null\n })\n }", "title": "" }, { "docid": "b2eb1e83c5779f048362382d28c3fd3f", "score": "0.5458296", "text": "static async getOne(req, res) {\n if (!req.params.id) {\n return res.error('invalid id');\n }\n\n try {\n const tax = await Tax.findOne({ _id: req.params.id });\n\n return res.success(tax);\n } catch (err) {\n return res.error(err.message);\n }\n }", "title": "" }, { "docid": "ff4bc29e11757e03233242482a6de55c", "score": "0.5429753", "text": "static async getByID(_, {id}) {\n return await this.find(id)\n }", "title": "" }, { "docid": "c723712e7fcc097ddfcbaaf201e36f6b", "score": "0.54222083", "text": "static async getByID(_, {id}) {\r\n return await this.find(id)\r\n }", "title": "" }, { "docid": "5c197820813ac9a35633550b7b8e52c4", "score": "0.54175436", "text": "async getById(req, res, next) {\n try {\n let data = await animalsService.findById(req.params.id);\n return res.send(data);\n } catch (error) {\n next(error);\n }\n }", "title": "" }, { "docid": "ddcd05945811652cba0be75257f7c095", "score": "0.5410048", "text": "static getTaskById(req, res, next){\n let id = req.params.id\n \n Task.findByPk(id)\n .then(data=>{\n res.status(200).json(data)\n })\n .catch(err=>{\n next(err)\n })\n\n }", "title": "" }, { "docid": "74b0a58650ae0b3f6f378bfceb423f0c", "score": "0.54072446", "text": "getOne(req, res, next) {\n let query = parseInt(req.params.id);\n let associate = Associates.find(associate => associate.id === query);\n if (associate) {\n res.status(200)\n .send({\n message: 'Success',\n status: res.status,\n associate\n });\n }\n else {\n res.status(404)\n .send({\n message: 'No associate found with the given id.',\n status: res.status\n });\n }\n }", "title": "" }, { "docid": "132371ecd422cd359e9eb4d821fcf16b", "score": "0.54048336", "text": "function projectGetByIdHandler(req, res, next) {\n console.log(req.params.id);\n ProjectRep.findById(req.params.id, function (err, proj) {\n console.log(proj);\n res.status(200).json(proj);\n })\n}", "title": "" }, { "docid": "12a232417d6c3ecbb2b6975b75eb5c42", "score": "0.5402201", "text": "getById(id) {\n return new Promise(function (resolve, reject) {\n\n articleDataModel\n .findOne({ '_id': id })\n .exec(function (err, article) {\n if (err) {\n reject(new Result(null, false, err, ResultCodes.Error()));\n }\n else if (!article) {\n reject(new Result(null, false, err, ResultCodes.ObjectNotFound()));\n }\n else {\n resolve(new Result(MapToArticleModel(article), true, \"\", ResultCodes.Success()));\n }\n });\n\n });\n }", "title": "" }, { "docid": "941a9db6c477f08873470c1afc98739a", "score": "0.5381641", "text": "static async getAppointmentById(req, res) {\n const { id } = req.params;\n var appointmentId = parseInt(id);\n try {\n const appointmentById = await Query.appointmentById(appointmentId);\n if (appointmentById.length == 1) {\n return Response.responseOk(res, appointmentById);\n } else {\n return Response.responseNotFound(res, Errors.INVALID_DATA);\n }\n } catch (error) {\n console.log(error);\n return Response.responseServerError(res);\n }\n }", "title": "" }, { "docid": "291f711fb86f9f5328a1735fb5426fc4", "score": "0.5362374", "text": "function getById(req, res) {\n res.status(200).send(apartmentService.getById(req.params.apartmentId));\n}", "title": "" }, { "docid": "6a8e977e0e36bbd81edb7081623fc89f", "score": "0.5360443", "text": "function withId(args) {\n var response = args.response;\n var thisWord = args.thisWord;\n var token = \"\";\n var rt = \"\";\n \n token = \"$..*[?(@property==='id'&&@.match(/\"+thisWord+\"/i))]^\"\n \n try {\n rt = JSONPath({path:token, json:response})[0].href;\n } catch (err){\n // no-op\n // console.log(err);\n }\n return rt; \n}", "title": "" }, { "docid": "2df77b4c41412d09c2896b5f46089569", "score": "0.53551346", "text": "searchById(args, context) {\n return new Promise((resolve, reject) => {\n logger.info(`${this.resourceType} >>> searchById`);\n const { id } = args;\n const options = {\n baseUrl: fhirClientConfig.baseUrl,\n auth: {\n bearer: getToken(context),\n },\n };\n const fhirClient = mkFhir(options);\n fhirClient\n .read({\n type: this.resourceType,\n id,\n })\n .then((response) => {\n const { data } = response;\n if (!data.meta) {\n data.meta = {};\n }\n resolve(this.mapResource(data));\n })\n .catch(reject);\n });\n }", "title": "" }, { "docid": "930e0154e527e1801b65ff436f9d4dbe", "score": "0.53499985", "text": "function getByID () {\n mongo.getDB().collection('Reviews').findOne({\n _id:parseInt(req.query.id)\n },\n function (err, review) {\n if (!review) {\n return res.sendStatus(404);\n } else {\n return res.send(review);\n }\n });\n }", "title": "" }, { "docid": "536aa0f54d52ebba9e0b1c679e250ffc", "score": "0.53331083", "text": "function getIncidentById(req, res) {\n if (!req.swagger.params.id.value) {\n return res.json(Response(402, \"failed\", constantsObj.validationMessages.requiredFieldsMissing));\n } else {\n var id = req.swagger.params.id.value;\n incidentschema.findOne({\n _id: id\n })\n .lean()\n .exec(function (err, IncidentInfo) {\n if (err) {\n return res.json(Response(500, \"failed\", constantsObj.validationMessages.internalError, err));\n } else {\n return res.json({\n 'code': 200,\n status: 'success',\n \"message\": constantsObj.messages.dataRetrievedSuccess,\n \"data\": IncidentInfo\n });\n }\n });\n }\n}", "title": "" }, { "docid": "733430045306f06915f206774d5fe517", "score": "0.53233194", "text": "function getUserByID(id) {\n var deferred = $q.defer();\n var data = {\"id\":id};\n $http({\n method: 'POST',\n url: aipurl + '/getOpeById/',\n data: data,\n headers: {\n 'Content-Type': 'application/json'\n }\n }).success(function (data) {\n deferred.resolve(data);\n }).error(deferred.reject);\n return deferred.promise;\n }", "title": "" }, { "docid": "a46148762484ca0b4be4ff95f8b3b567", "score": "0.52813023", "text": "async _getById(id) {\n const findById = _promisify((...args) => {\n this.collection.aggregate(...args);\n });\n try {\n const result = await findById([\n { $match: { [this.keyName]: ObjectID(id) } },\n { $sort: { _id: -1 } },\n { $project: { _id: 0 } },\n ]);\n const data = await result.limit(1).next();\n return data;\n } catch (e) {\n throw ServerError('Failed to _getById', e);\n }\n }", "title": "" }, { "docid": "33e837f6e61a3b3ce69a548dee3b36be", "score": "0.527735", "text": "get(_id) {\n let queryObject = _id ? {_id} : {}\n return this.schema.find(queryObject);\n }", "title": "" }, { "docid": "7903412f042ba5da0b527caee9a21d8b", "score": "0.52626675", "text": "function _getReviewByID(db, obj) {\n\treturn new Promise(function(fullfill, reject) {\n\t\tvar collection = db.collection('reviews')\n\t\treturn collection.findOne({\n\t\t\t_id: obj['id']\n\t\t}).then(function(result) {\n\t\t\tfullfill(result)\n\t\t}).catch(function(err) {\n\t\t\treject(err)\n\t\t})\n\t})\n}", "title": "" }, { "docid": "ed77b4e97968402b1270c2ec8f2e300d", "score": "0.5256126", "text": "async getOneById(id) {\n const result = await db.movies.findOne(\n {\n \"_id\": ObjectId(id)\n }\n );\n return result;\n }", "title": "" }, { "docid": "2dae7b82aef5fe483d4f54ec598f909c", "score": "0.52360886", "text": "getByID(req, res, next) {\n try {\n packageModel.getByID(\n req.params.id,\n (err,data) => {\n res.status(200).json({ success: true, data: data });\n },\n next\n );\n } catch (err) {\n next(err);\n }\n }", "title": "" }, { "docid": "ac579ec18ddc6f2e0793ac078c6c6d4a", "score": "0.521834", "text": "async function getById(req, res, next) {\n CRUD.read(Event, req.params.id, res, next);\n}", "title": "" }, { "docid": "bf7876a358915517d8e38b8fd692e5ce", "score": "0.521803", "text": "static async getOne(req) {\n\t\tconst { clientId } = req.params;\n\n\t\treturn ClientModel.getOne(clientId);\n\t}", "title": "" }, { "docid": "863057ec6fa4c92bc3dc9f142c165907", "score": "0.5209216", "text": "async function getBookByID(req, res) {\n try {\n const aBook = await book.findById(req);\n return aBook;\n } catch (err) {\n return res.status(501).json(err);\n }\n}", "title": "" }, { "docid": "2c0b998a26e0921845999f473d5452fa", "score": "0.5197496", "text": "readOneById(id) {\n return __awaiter(this, void 0, void 0, function* () {\n console.debug(`${this.loggerString}:readOneById::Start`);\n const result = yield this.model.findById(id)\n .select(this.getMongooseQuerySelectOptions())\n .populate(this.getMongooseQueryPopulateOptions(\"readOneById\"));\n if (!result) {\n throw new HttpNotFoundException_1.default(\"Object does not exist.\");\n }\n return result;\n });\n }", "title": "" }, { "docid": "d3ff5db1bba5431e6f600d60ec7ccfa2", "score": "0.51920104", "text": "function getFaqById(req, res, next) {\n var faqId = req.params.id.trim();\n //chech if faq ObjectId is valid or not\n var validObjectId = mongoose.Types.ObjectId.isValid(faqId);\n\n if (validObjectId) {\n FaqDal.findById(faqId)\n .then((faq) => handleFaqResponse(res, req.method, faq))\n .catch((error) => next(error));\n } else {\n res.status(400).json({\n \"error\": \"Invalid Object Id\"\n });\n }\n }", "title": "" }, { "docid": "5668e5993c22bca670f9ca19b67d7095", "score": "0.5189218", "text": "async getById(req, res, next) {\n try {\n let map = await Map.findById(req.params.id);\n res.status(200).json(map);\n }\n catch (error) {\n next(error);\n }\n }", "title": "" }, { "docid": "2773194c4cb4ff865bdb5633b4f0f378", "score": "0.5179083", "text": "async getById(req, res, next) {\n try {\n req.siteId = mongodb.ObjectID(req.query.siteId);\n // let siteId = req.query.siteId\n let data = await _recipeRepo.findOne({ _id: req.params.id });\n return res.send(data);\n } catch (error) {\n next(error);\n }\n }", "title": "" }, { "docid": "e7efc5ba56c3ed703047acb3e6228d66", "score": "0.5173929", "text": "async function getAComment(req, res) {\n const comment_id = parseInt(req.params[\"comment_id\"], 10);\n try {\n let comment = await db.one(\n \"SELECT * FROM comments WHERE id=$1\",\n comment_id\n );\n \n res[\"comment_id\"] = comment_id;\n\n return res.status(200).json(comment);\n } catch (err) {\n res.status(500).send({\n message: err.message\n });\n }\n}", "title": "" }, { "docid": "d744acd37dc9ca41c3fd0f6da4c5ee77", "score": "0.516063", "text": "async function findSuggestionbyUserId(id) {\n const suggestion = await collection().findOne({ user_id: id });\n return suggestion;\n}", "title": "" }, { "docid": "6d3872eb67fc78c444623e335914bb38", "score": "0.5153155", "text": "one(req, res, next){\n const { id } = req.params;\n Rider.findById({_id: id})\n .then(rider => res.send(rider))\n .catch(next);\n }", "title": "" }, { "docid": "9406192b2749c9e1df6f25d8e5175e69", "score": "0.5152327", "text": "async getOne(id) {\n const records = await this.getAll();\n return records.find((record) => record.id === id);\n }", "title": "" }, { "docid": "c211ad4ab0ca1b313d4acece0ea4ed3a", "score": "0.5139982", "text": "async getMovieFromItsID(id) {\n var request = this.header + this.movie + id + \"?\" + this.APIkey + this.optionsForSearch + this.query;\n try{\n let response = await fetch(request);\n responseJson = await response.json();\n } catch(e){\n console.error(e);\n }\n return responseJson;\n }", "title": "" }, { "docid": "c0d25f31b5471a3ac31c688cb9159b3c", "score": "0.51365876", "text": "function annotationsFromURL() {\n // Annotation IDs are url-safe-base64 identifiers\n // See https://tools.ietf.org/html/rfc4648#page-7\n const annotFragmentMatch = window_.location.href.match(\n /#annotations:([A-Za-z0-9_-]+)$/\n );\n if (annotFragmentMatch) {\n return annotFragmentMatch[1];\n }\n return null;\n }", "title": "" }, { "docid": "9d3952990b60ac2916160af666c3dff8", "score": "0.5128551", "text": "function getById(req, res, next) {\n let id = req.params.id;\n\n models.utilisateur.findByPk(id).then((utilisateurFound) => {\n return res.json(utilisateurFound)\n }).catch((err) => {\n return res.json(err);\n });\n}", "title": "" }, { "docid": "3de64ba4bf7429b6332f78df0c77bf47", "score": "0.5124295", "text": "async function getById(viewerId, id){\n const company = await Company.findById(id);\n\n authorizeRequest(viewerId, company, true);\n\n return company.toObject();\n}", "title": "" }, { "docid": "87fffb254131b99d006771e21d28501d", "score": "0.51214325", "text": "findById(req, res) {\n try {\n let id = req.params._id;\n GpioModel_1.model.findById(id)\n .then((result) => {\n res.send(result);\n })\n .catch((error) => {\n res.status(400).send({ 'error': error.message });\n });\n }\n catch (e) {\n console.log(e);\n res.status(500).send({ 'error': 'error in your request' });\n }\n }", "title": "" }, { "docid": "6a425687357e575e30da5dbb5434fd6b", "score": "0.5117959", "text": "async function getAssetById(request, response) {\r\n let asset = await Asset.findOne({ user_id: request.user.id, _id: request.params.asset });\r\n response.json(asset);\r\n}", "title": "" }, { "docid": "dd7686df50c832b4fa00149af43db72c", "score": "0.51153594", "text": "getById(id) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tconst request = this.getDbR().get(parseInt(id));\n\t\t\trequest.onsuccess = () => {\n\t\t\t\tresolve(request.result);\n\t\t\t};\n\t\t\trequest.onerror = () => {\n\t\t\t\treject('Error getById');\n\t\t\t};\n\t\t});\n\t}", "title": "" }, { "docid": "d241664e1bf4481c6893987f3d615301", "score": "0.5107258", "text": "function paramById(req, res, next, id) {\n\n\t\tlogger.debug(\"...paramById()\");\n\n\t\tif (!id) {\n\t\t\treturn next(new Error(\"Requested id is undefined\"));\n\t\t}\n\n\t\tthis.Model.findById(id).exec(function(err, result) {\n\n\t\t\tif (err) {\n\t\t\t\treturn next(new Error(err));\n\t\t\t}\n\n\t\t\tif (!result) {\n\t\t\t\tres.status(404).json({\n\t\t\t\t\tcode: 404,\n\t\t\t\t\tmessage: \"Object not found\"\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\treq.model = result;\n\t\t\t\tnext();\n\t\t\t}\n\n\t\t});\n\n\n\t}", "title": "" }, { "docid": "1cba14ca687c0e5db001f8f37427a596", "score": "0.51062405", "text": "get(id) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.model.findById(id);\n });\n }", "title": "" }, { "docid": "a2d4e850e69c3a4ba903f53e5f08bcc4", "score": "0.5099496", "text": "async findById(id) {\n let animal = await dbContext.Animals.findById({\n _id: id,\n });\n if (!animal) {\n throw new BadRequest(\"Invalid Id\");\n }\n return animal;\n }", "title": "" }, { "docid": "68714842c0acad76c6cd63cfeb46b6bb", "score": "0.50743353", "text": "function onFetchById(id) {\n let query = `/movie/${id}?`;\n\n return getApiData(query).then(result => result);\n}", "title": "" }, { "docid": "f4a5876f6eab39d77553bb53345a00f2", "score": "0.5068548", "text": "async getOne(id) {\n const records = await this.getAll();\n return records.find(record => record.id === id); \n \n }", "title": "" }, { "docid": "3a557feb956e1cfc417bdb260ba0ecb5", "score": "0.50649726", "text": "getOneForPostId(postId) {\n return new Promise((resolve, reject) => {\n db.Post.findOne({\n where: {\n id: postId\n },\n include: [db.Photo]\n }).then(post => {\n return resolve(post);\n }).catch(err => {\n return reject(err);\n });\n });\n\n }", "title": "" }, { "docid": "0b610362e14af6ea38ee57bd91d81783", "score": "0.5063959", "text": "findById(request, response) {\n Todo.findById(request.params.id)\n .then((todo) => { response.json(todo) })\n .catch(error => { response.send(JSON.stringify(error)) })\n }", "title": "" }, { "docid": "d2615f6b21d3539a7a64a1f42125b59c", "score": "0.5059447", "text": "async function getTaskById ( req, res )\n{\n\ttry {\n\t\tconst task = await Task.findOne( {_id: req.params.id} );\n\t\tif ( !task ) {\n\t\t\tres.status( 404 ).json( 'Task not found' );\n\t\t}\n\t\tres.status( 200 ).json( task );\n\t}\n\tcatch ( err ) {\n\t\tres.status( 400 ).json( {'error': err} );\n\t}\n}", "title": "" }, { "docid": "7317cebd89d69171763992e04ea99e03", "score": "0.5055614", "text": "findById(req, res) {\n let id = req.params.id;\n\n this.repoDao.findById(id)\n .then(this.common.findSuccess(res))\n .catch(this.common.findError(res));\n }", "title": "" }, { "docid": "6d70a5f89eaa4ed3148263002aa21c22", "score": "0.5053001", "text": "async findGuiderProfile(id) {\n return await usersModel.findById({\n _id:mongoose.Types.ObjectId(id) \n },['name','picture']);\n}", "title": "" }, { "docid": "d686b9f1aeb81d9b4c400832cb5d81eb", "score": "0.5040958", "text": "async function getAulaById(req, res, next) {\n const aulaId = req.params.id\n\n try {\n\n const aula = await Aula.findOne({ where: { id: aulaId } })\n\n if (!aula) {\n throw new createHttpError(404, \"Aula não encontrada\");\n }\n\n return res.status(200).json(aula)\n\n } catch (error) {\n console.log(error)\n next(error)\n }\n}", "title": "" }, { "docid": "79bf3ac6466988cc77c1b2eddbddda22", "score": "0.50360847", "text": "async getById(req, res, next) {\n let id = req.params.id;\n\n try {\n let response = await UserNote.findById(id);\n if (response) {\n return res.status(httpStatus.OK).json(new APIResponse(response, 'User note fetched successfully', httpStatus.OK));\n }\n return res.status(httpStatus.BAD_REQUEST).json(new APIResponse({}, 'User note with the specified ID does not exists', httpStatus.BAD_REQUEST));\n\n } catch (error) {\n return res.status(httpStatus.INTERNAL_SERVER_ERROR).json(new APIResponse(null, 'Error getting user note', httpStatus.INTERNAL_SERVER_ERROR, error));\n }\n }", "title": "" }, { "docid": "191f472718ee122121595912a4b5211d", "score": "0.50342166", "text": "getAthleteId() {\r\n return new Promise((resolve, reject) => {\r\n if (this.inCache(\"athleteId\")) {\r\n resolve(this.cache[\"athleteId\"]);\r\n } else {\r\n this.request(\"athlete\").then((athleteData) => {\r\n this.setCache(\"athleteId\", athleteData.id);\r\n resolve(athleteData.id);\r\n }).catch(reject);\r\n }\r\n }).then((athleteId) => {\r\n this.athleteId = athleteId;\r\n });\r\n }", "title": "" }, { "docid": "a9c01c0a3d94a8b5e6312aa7b461c172", "score": "0.5020614", "text": "function getByID (id, collection) {\n return new Promise((resolve, reject) => {\n connectToDB().then(dbo => {\n console.log(id)\n dbo.collection(collection).findOne({'_id': id}, (err, res) => {\n if (err) reject(err)\n resolve(res)\n })\n }).catch(err => {\n reject(err)\n })\n })\n}", "title": "" }, { "docid": "fe192ce044cfdf7fbadb7df8ba62397d", "score": "0.50202554", "text": "static get (id) {\n if (id === undefined) {\n return createRejection('ID is required!')\n }\n return this.request({\n type: 'get',\n id\n })\n }", "title": "" }, { "docid": "5f0bb7e73fceae84729a9e15d2e96521", "score": "0.5011027", "text": "static async getAnimalQuestionId(id)\n {\n const question = await animalTrivia.selectId(id);\n return question;\n }", "title": "" }, { "docid": "69eb161c3c1bf3e13561e075b9b2dfdf", "score": "0.49905163", "text": "async get(id, params) {}", "title": "" }, { "docid": "6bd33336ab60a4e987ec43449cd5eb09", "score": "0.49895847", "text": "async getOne({ id }) {\n return fetchJSON(`/api/datasets/${id}`, { method: 'GET' });\n }", "title": "" }, { "docid": "6bd33336ab60a4e987ec43449cd5eb09", "score": "0.49895847", "text": "async getOne({ id }) {\n return fetchJSON(`/api/datasets/${id}`, { method: 'GET' });\n }", "title": "" }, { "docid": "c1cede9fff93d8af0ef27ae7dd2b24e9", "score": "0.49890047", "text": "GetItemById(req, res) {\n\n if (!req.params[0]) return res.send({ status: 0, message: \"Enter the valid credentials.\" });\n\n let filter = { _id: ObjectId(req.params[0]) };\n let projection = { _id: 1, restaurantId: 1, categoryId: 1, name: 1, price: 1, description: 1, profileImg: 1, Mods: 1 };\n let control = new controller(ItemSchema);\n control.GetData(filter, projection).then(item => {\n if (_.isEmpty(item)) return res.send({ status: 0, message: \"Invalid Id!!\" });\n\n return res.send({ status: 1, message: \"Item found successfully.\", data: item });\n\n }).catch(error => {\n return res.send({ status: 0, message: error });\n });\n }", "title": "" }, { "docid": "ea57506a23e94745f19d89fc8b37c036", "score": "0.49816665", "text": "async function getEventDetailById(req, res) {\n let id = req.params.id;\n await EventDetail.findOne({\n where: { id },\n include: [{\n required: false,\n model: Event,\n include: [models.EventType, models.RatingType]\n }, {\n required: false,\n model: Participant\n },\n {\n required: false,\n model: Guest\n },\n {\n required: false,\n model: Resource\n },\n {\n required: false,\n model: ResultParameter\n },\n {\n required: false,\n model: models.Post\n },\n {\n required: false,\n model: models.EventContingency,\n include: [models.EventCancelType]\n },\n {\n required: false,\n model: models.Rating,\n include: [models.RatingType]\n }\n ]\n })\n .then(eventDetail => {\n if (eventDetail === null) {\n return res.status(200).json({\n ok: false,\n message: 'No hay registrado un detalle de actividad con ese id.',\n });\n } else {\n res.status(200).json({\n ok: true,\n message: 'correcto',\n eventDetail\n });\n }\n })\n .catch(err => {\n res.status(500).json({\n ok: false,\n message: 'Ha ocurrido un error',\n error: err.message\n });\n });\n}", "title": "" }, { "docid": "2de89944b85ed1e40264ad3bd74b281b", "score": "0.49811417", "text": "getByID(req, res, next) {\n //Read By ID\n try {\n sensorModel.getByID(req.params.id, (err, data) => {\n if (err) {\n next(err);\n return;\n }\n res.status(200).json({\n success: true,\n data: data\n });\n });\n } catch (err) {\n next(err);\n }\n }", "title": "" }, { "docid": "6db0a712be029f0cef143dc0bd527f64", "score": "0.4975189", "text": "function getByID (id, opts, callback) {\n assert(typeof id === 'string', 'choo-prismic: id should be type string')\n callback = typeof opts === 'function' ? opts : callback\n opts = typeof opts === 'function' ? {} : opts\n return get(Prismic.Predicates.at('document.id', id), opts, first(callback))\n }", "title": "" }, { "docid": "14bd28df2d121ae40c16c68c421da651", "score": "0.49740323", "text": "enterAnnotation_identifier(ctx) {\n\t}", "title": "" }, { "docid": "47bae5be56d7e97ef8768957ddcb7623", "score": "0.49691465", "text": "async function getClothesWithId( req, res, next ) {\n try {\n const resObj = await dataMngr.read( req.params.id );\n res.json( resObj );\n }catch ( error ){\n next( error );\n }\n}", "title": "" }, { "docid": "b8f3f83db02bc2dbf2e26d9eab6b3d47", "score": "0.4965409", "text": "get(id) {\n let query = id ? { _id: id } : {};// _id is the mongoose id\n return this.schema.find(query);\n }", "title": "" }, { "docid": "24aee6e88064998eed388f48d677b297", "score": "0.4959787", "text": "async getReviewById(id) {\n if (!id) throw 'ReferenceError: You must provide an id to search for';\n if (typeof(id) != 'string' || id.trim() == '') throw TypeError;\n \n let parsedId;\n try {\n parsedId = ObjectId(id); \n } catch (error) {\n throw SyntaxError;\n }\n const apartmentCollection = await apartmentlistings();\n \n const apartment = await apartmentCollection.findOne({ reviews: { $elemMatch: { _id: parsedId } } }, {'reviews': 1});\n if(!apartment) throw 'Review not found';\n let review = null;\n apartment.reviews.forEach(element => {\n if(String(element._id) == id)\n {\n review = element;\n return;\n }\n });\n\n if (!review) throw 'Review not found';\n return review;\n }", "title": "" }, { "docid": "7fdc9929ce1b1ac573e9dcca7f65832a", "score": "0.49545556", "text": "function getById(req, res, next) {\n let id = req.params.id;\n\n models.Disponibilite.findByPk(id).then((disponibiliteFound) => {\n return res.json(disponibiliteFound)\n }).catch((err) => {\n return res.json(err);\n });\n}", "title": "" }, { "docid": "17aa38a58ff3d35b04fb15ba91771091", "score": "0.4951117", "text": "function getReviewInfoById(id){\n return new Promise(function(resolve, reject){ \n const revOptions = {\n url: 'https://api.yelp.com/v3/businesses/'+ id + '/reviews',\n headers\n };\n request(revOptions, function (error, response, body) {\n // in addition to parsing the value, deal with possible errors\n if (error || response.statusCode !=200) reject(error);\n try {\n const data = JSON.parse(body);\n //Just send One reviewer data as excerpt as per requirement\n resolve({\"id\" : id, \"reviewText\" : data.reviews[0].text, \"reviewer\" : data.reviews[0].user.name });\n } catch(e) {\n reject(e);\n }\n });\n }); \n}", "title": "" }, { "docid": "f75baf31c1286cdb5100d43bdabaa603", "score": "0.49498788", "text": "function getSurveyByVisitId(req, res) {\n console.log(\"getSurveyByVisitId: \");\n\n var visitid = req.body.id;\n console.log(\"visitid: \", visitid);\n VisitSurvey.findById({ _id : visitid }).exec(function(err, getSurvey) {\n if (err) {\n res.json({\n code: 404,\n message: constantsObj.messages.errorRetreivingData\n });\n } \n else if(getSurvey && getSurvey.length){\n res.json({\n code: 200,\n message: constantsObj.messages.dataRetrievedSuccess,\n data: getSurvey\n });\n }else {\n res.json({\n code: 200,\n message:constantsObj.messages.noDataFound,\n data: getSurvey\n });\n }\n }) .catch(function(err) {\n return res.json({ code: 402, message: err, data: {} });\n });\n}", "title": "" }, { "docid": "0e6ec81e3dbdabbb462574b17227833a", "score": "0.49452764", "text": "getID(idToFind) {\n return function (bodyObject) {\n return bodyObject.id === idToFind;\n };\n }", "title": "" }, { "docid": "bf49557e5c24bbf14015fdf835a8685e", "score": "0.49425337", "text": "function getRatingMovie(id) {\n return new Promise(function(resolve, reject) {\n var sql = \"SELECT movie_rating FROM movie WHERE movie_id='\" + id + \"'\";\n connection.query(sql, function(err, result, fields) {\n if (err) {\n throw err;\n return;\n } else {\n resolve(result[0].movie_rating);\n }\n });\n });\n}", "title": "" }, { "docid": "db82fbe73a4205a23e94d37f2c68acd5", "score": "0.4939643", "text": "function GetPersonById(id) {\n return new Promise(resolve => {\n var details = {};\n spark.people.get(id, function(err, res) {\n if (err) throw err;\n var person = JSON.parse(res);\n resolve(person.firstName);\n });\n });\n}", "title": "" }, { "docid": "a0499d3cbc008b4fbced49184922ac6a", "score": "0.49287033", "text": "function _getTripActivityById(req, res, next) {\n\tvar tripId = req.params.id;\n\n\tif (!COMMON_ROUTE.isValidId(tripId)) {\n\t\tjson.status = '0';\n\t\tjson.result = { 'message': 'Invalid TripActivity Id!' };\n\t\tres.send(json);\n\t} else {\n\t\tTRIP_ACTIVITIES_COLLECTION.findOne({ _id: new ObjectID(tripId) }, function (triperror, getTripActivity) {\n\t\t\tif (triperror || !getTripActivity) {\n\t\t\t\tjson.status = '0';\n\t\t\t\tjson.result = { 'message': 'TripActivity not exists!' };\n\t\t\t\tres.send(json);\n\t\t\t} else {\n\t\t\t\tjson.status = '1';\n\t\t\t\tjson.result = { 'message': 'TripActivity found successfully.', 'trip': getTripActivity };\n\t\t\t\tres.send(json);\n\t\t\t}\n\t\t});\n\t}\n}", "title": "" }, { "docid": "0c1cddaed325eab1399facaa444ec674", "score": "0.49268946", "text": "findBookingByListingId(id)\n { \n return new Promise((resolve, reject) => { \n bookings.findBookingByListingId(id, (res, err) => {\n if (err) {\n reject(err);\n }\n else {\n resolve(res);\n }\n }); \n });\n }", "title": "" }, { "docid": "d5a3daa2d5b4bfdad5a6f1aa176ab6b6", "score": "0.49155167", "text": "fetchOneById(userId) {\n\t\t\treturn User.collection().query(qb => {\n\t\t\t\tqb.where('id', userId);\n\t\t\t}).fetchOne({\n\t\t\t\twithRelated: [\n\t\t\t\t\t'ratings'\n\t\t\t\t]\n\t\t\t});\n\t\t}", "title": "" }, { "docid": "03e701d701cc84fba2af8911b2ad15cf", "score": "0.4913382", "text": "async function getID(id) {\n const [userID] = await db\n .select('company')\n .from('listings')\n .where({ id });\n return userID ? userID : null;\n}", "title": "" }, { "docid": "6cd26205ed3827b450c81743169dcf67", "score": "0.4907338", "text": "getById() {\n const formData = require(\"../assets/form.json\");\n return this.getFakeRequest(formData, true);\n }", "title": "" }, { "docid": "96c058786e4277f7834848964f8fe4b0", "score": "0.49062574", "text": "function showOneSuggestion (req, res) {\n db.Event.findOne({_id: req.params.id}, function (err, foundEvent){\n if (err) {console.log('suggestionsController, showOne err: ', err);\n return res.status(404).send({error: err});\n }\n var suggestPath = foundEvent.activity.suggestions;\n var actualItem = suggestPath.id(req.params.suggid);\n\n res.json(actualItem);\n });\n}", "title": "" }, { "docid": "cf06a7c1da73bf0a80d18fea33d27de9", "score": "0.4898363", "text": "findBookingByUserId(id)\n { \n return new Promise((resolve, reject) => { \n bookings.findBookingByUserId(id, (res, err) => {\n if (err) {\n reject(err);\n }\n else {\n resolve(res);\n }\n }); \n });\n }", "title": "" }, { "docid": "63a5c0e080ee0fe0fa16e3c72c99db7b", "score": "0.4895875", "text": "async function getEventDetailPatientsById(req, res) {\n var id = req.params.id;\n\n await EventDetail.findOne({\n where: { id: id },\n include: [{\n model: Patient\n }]\n })\n .then(async eventDetail => {\n if (eventDetail === null)\n return res.status(200).json({\n ok: false,\n message: 'No existe un detalle de evento con este id.'\n })\n else\n return res.status(200).json({\n ok: true,\n message: 'Detalle de evento.',\n eventDetail\n })\n })\n .catch(err => {\n res.status(500).json({\n ok: false,\n message: `Hubo un error con el detalle evento con id = ${id}.`,\n error: err.message\n });\n })\n}", "title": "" }, { "docid": "df3955c706e83539644ec9cd746dd897", "score": "0.48953837", "text": "selectArbitrary(id) {\n return get(this.retrievalEndpoint + id + \"/\").then(\n this.onReceive.bind(this)\n );\n }", "title": "" }, { "docid": "c5e400661e3cf698d34d7aa57d4f38b0", "score": "0.48927808", "text": "async function getById(id) {\n let newid = CHK.checkObjectId(id);\n\n const commentsCollection = await comments();\n\n const comment = await commentsCollection.findOne({ _id: newid });\n if (comment === null) throw \"No comment with this ID.\";\n\n return comment;\n}", "title": "" }, { "docid": "887dfb0a8fa00649e6acbb681a8a3adf", "score": "0.4890611", "text": "function getById(req,res,next){\n\n\t// Use the Plant model to find the plant we want\n\tPlant.findById(req.params.plant_id, function(err, plant){\n\t\tif (err) throw err;\n\t\tres.status(200).json(plant);\n\t})\n}", "title": "" }, { "docid": "cf679e994818b562b96ece913e399daa", "score": "0.48902446", "text": "async function getVoterIdByCommentId(id) {\n const db = await dbPromise;\n const voterID = await db.all(SQL`SELECT voterID FROM votes WHERE commentID = ${id}`);\n return voterID;\n}", "title": "" }, { "docid": "165a6dfffe201af7de732a1270b7cdb3", "score": "0.48893136", "text": "get(id) {\n return this.collection.findOne({ _id: id });\n }", "title": "" }, { "docid": "1b8dd9e1d4395046bbc90f927f180ad4", "score": "0.4888452", "text": "getById(id) {\n const feature = Feature(this);\n feature.concat(`('${id}')`);\n return tag.configure(feature, \"fes.getById\");\n }", "title": "" }, { "docid": "06c6f6d096938822c95c98467dfdba39", "score": "0.4886846", "text": "function findBy_id(req, res , next){\r\n console.log(\"...path: \"+req.path);\r\n\r\n\r\n var path = req.path.split(\"/\");\r\n\t// format path: /space/rest/boards/1\r\n\t// take the last from the set with last stripped ;-)\r\n\tvar collection = _.last(_.initial(path));\r\n\t// a string\r\n\tvar _id = req.params._id;\r\n\r\n\tconsole.log(\"...looking for collection: \"+collection+ \"_id: \"+req.params._id);\r\n\r\n db.collection(collection).findOne({_id:mongojs.ObjectId(_id)}, function(err , success){\r\n logger.debug('Response success '+success);\r\n logger.debug('Response error '+err);\r\n if(success){\r\n res.send(success);\r\n return;\r\n }\r\n return next(err);\r\n });\r\n}", "title": "" }, { "docid": "a478cc8ae7ff84316768670aa5950737", "score": "0.48845097", "text": "getAnnotations(req, res) {\n let query = req.query\n let limit = parseInt(query.limit) || 100\n let offset = parseInt(query.offset) || 0\n let criteria = []\n if (query.id) {\n criteria.push({\n $or: [\n {\n \"_id\": query.id\n },\n {\n \"id\": query.id\n }\n ]\n })\n }\n if (query.creator) {\n criteria.push({\n creator: query.creator\n })\n }\n if (query.target) {\n criteria.push({\n target: query.target\n })\n }\n if (query.bodyValue) {\n criteria.push({\n bodyValue: query.bodyValue\n })\n }\n if (query.motivation) {\n criteria.push({\n motivation: query.motivation\n })\n }\n let cursor = this.collection.find(criteria.length ? { $and: criteria } : {})\n return cursor.count().then(total => {\n // Add headers\n util.setPaginationHeaders({ req, res, limit, offset, total })\n return cursor.skip(offset).limit(limit).toArray()\n })\n }", "title": "" }, { "docid": "f895d5b402a15476f65f8bf383c4722e", "score": "0.48825255", "text": "annotation(type) {\n for (let ann of this.annotations) if (ann.type == type) return ann.value;\n\n return undefined;\n }", "title": "" }, { "docid": "7205b2053a7ac9c8825fd390e8a850b7", "score": "0.48822764", "text": "static getId() {\n return new Promise((resolve, reject) => {\n try {\n axios.get(\"https://aghiljv.herokuapp.com/ga_id\").then(response => {\n const data = response.data;\n resolve(data);\n });\n } catch (err) {\n reject(err);\n }\n });\n }", "title": "" }, { "docid": "1f85fbd1b7d4e53334965830e1e8653e", "score": "0.48818007", "text": "byId(id) {\n\t\treturn this._pgPool.query(`${this.readSql()} WHERE id = ${id}`).then(result => {\n\t\t\treturn this._transformRows(result.rows);\n\t\t}).then(rows => {\n\t\t\treturn rows[0];\n\t\t});\n\t}", "title": "" }, { "docid": "345b832c2021d29ecf6e6162ef235759", "score": "0.48751774", "text": "getByIdAdv(db, id) {\n return ArticleService.getAllAdv(db)\n .where('art.id', id)\n .first()\n }", "title": "" }, { "docid": "3d6b6ad20963fe6d7ec6fc801c7d8bb1", "score": "0.4873662", "text": "function getMovieWithId2() {\n return Movie.findOne({\n where:{\n id: [2]\n }\n }).then(movie => {\n return movie.title\n });\n}", "title": "" }, { "docid": "26f8807f9b6750b47a57ab1b469ba16a", "score": "0.48726773", "text": "function userID(req, res) {\n return User.findById(req.params.id).exec()\n .then(handleEntityNotFound(res))\n .then(respondWithResult(res))\n .catch(handleError(res))\n}", "title": "" } ]
5fc5ba78ecd6b156b8d753c5f8a414fd
do this is order to draw them.
[ { "docid": "df41757c4034a812c516b97323e1e764", "score": "0.0", "text": "putDataSetOnPatches (ds) {\n const W = this.world\n let p\n for (var i = 0; i < this.patches.length; i++) {\n p = this.patches[i]\n p.dens = ds.getXY(p.x - W.minX, W.maxY - p.y)\n if (this.boundaries.getXY(p.x - W.minX, W.maxY - p.y) > 0.0) p.dens = 4\n }\n }", "title": "" } ]
[ { "docid": "ae76fbe137413011a21c42a3f3445449", "score": "0.7104689", "text": "function mainDraw() {\r\n\r\n\t\tif (canvasValid == false) {\r\n\t\t\tclear(ctx);\r\n\r\n\t\t\t// Add stuff you want drawn in the background all the time here\r\n\r\n\t\t\t// draw all boxes\r\n\t\t\tvar l = boxes2.length;\r\n\t\t\tfor (var i = 0; i < l; i++) {\r\n\t\t\t\tboxes2[i].draw(ctx); // we used to call drawshape, but now each box draws itself\r\n\t\t\t}\r\n\r\n\t\t\t// Add stuff you want drawn on top all the time here\r\n\r\n\t\t\tcanvasValid = true;\r\n\t\t}\t\t\r\n\t}", "title": "" }, { "docid": "e2be60d144d2770b42c00124e4872ea5", "score": "0.7073094", "text": "draw() {\n this.actionBubbles.forEach((actionBubble, index) => {\n actionBubble.draw();\n });\n this.headerTextElement.draw();\n }", "title": "" }, { "docid": "8040954884281266451d9df4dca23d30", "score": "0.70384806", "text": "draw() {\n\t\t//col = x coordinates, row = y\n\t\tthis.drawGround();\n\t\tthis.drawObjects(this.items);\n\t\tthis.drawObjects(this.bombs);\n\t\tthis.drawObjects(this.enemies);\n\t\tthis.drawObjects(this.players);\n\t\tthis.drawObjects(this.morituri);\n\t\tthis.explosions.forEach(explosion => this.drawObjects(explosion));\n\n\t}", "title": "" }, { "docid": "e648dd7bcbe7bdbeb6fd6387ccb9d4a3", "score": "0.69730633", "text": "function mainDraw() {\n\t if (settings.canvasValid == false) {\n\t clear(ctx);\n\t \n\t // Add stuff you want drawn in the background all the time here\n\t \n\t // draw all boxes\n\t var l = settings.boxes2.length;\n\t for (var i = 0; i < l; i++) {\n\t \tsettings.boxes2[i].draw(ctx); // we used to call drawshape, but now each box draws itself\n\t }\n\t for (var i = 0; i < settings.labels.length; i++) {\n\t \tif('rotate' in settings.labels[i].options) {\n\t \t\tctx.rotate(settings.labels[i].options.rotate);\n\t \t}\n\t \tif('font' in settings.labels[i].options) {\n\t \t\tctx.font = settings.labels[i].options.font;\n\t \t}\n\t \tctx.fillText(settings.labels[i].label, settings.labels[i].x, settings.labels[i].y);\n\t \tctx.restore();\n\t }\n\t \n\t // Add stuff you want drawn on top all the time here\n\t \n\t settings.canvasValid = true;\n\t }\n\t}", "title": "" }, { "docid": "0a890d52f137d4f95e3522a6a62673b4", "score": "0.6966101", "text": "draw() {\n\t\t\t// E.g. Custom drawXXX() operations.\n\t\t}", "title": "" }, { "docid": "befd528d367c73b9e946c6c0334e73c7", "score": "0.6961908", "text": "function drawCanvas() {\n if (drawio.selectedElement) {\n drawio.selectedElement.render();\n }\n for (var i = 0; i < drawio.shapes.length; i++) {\n drawio.shapes[i].render();\n }\n }", "title": "" }, { "docid": "accc34513728f2e3fe5f82e705055f28", "score": "0.69077545", "text": "draw() {\n this.cls();\n this.shapes.forEach(element => {\n element.draw();\n });\n }", "title": "" }, { "docid": "a650343dbfdef12b0f7742a645d578ea", "score": "0.68563706", "text": "function drawCanvas() {\n // element currently not in shapes array so render specifically\n if (drawio.selectedElement) {\n drawio.selectedElement.render();\n }\n // Render every shape in the array\n for (var i = 0; i < drawio.shapes.length; i++) {\n drawio.shapes[i].render();\n }\n }", "title": "" }, { "docid": "f97ddc1e15031f72b121c7fbcc86b7cc", "score": "0.6847725", "text": "draw() {\n\n\t}", "title": "" }, { "docid": "5f0e1078a68253ab0377db2999b6ec21", "score": "0.68450224", "text": "function finalDraw(){\n\t Shapes.drawAll(gd);\n\t Plotly.Annotations.drawAll(gd);\n\t Legend.draw(gd);\n\t }", "title": "" }, { "docid": "05420ea3647423cacf24826efa9171ac", "score": "0.683217", "text": "function drawAll() {\n\tfor (var i = 0; i < Edge.all.length; i++) {\n\t\tEdge.all[i].draw()\n\t}\n\tfor (var i = 0; i < Vertex.all.length; i++) {\n\t\tVertex.all[i].draw()\n\t}\n\tif (scrollMessage) {\n\t\tscrollMessage.draw()\n\t}\n}", "title": "" }, { "docid": "11638b5222915489b73070bb8691a50d", "score": "0.68295676", "text": "draw() {\n this.drawTexts();\n this.drawScore();\n\n this.blobs.forEach(function (blob) {\n blob.draw();\n });\n this.food.draw(this.fruitTile);\n }", "title": "" }, { "docid": "bec13e04d5037048634a9939a4ef5fb9", "score": "0.68274856", "text": "function draw(){\n drawTerma(canvas,terma,TERMA_X,TERMA_Y);\n drawButtons(position); \n drawHelpIfEnabled();\n drawAlertIfShowing();\n }", "title": "" }, { "docid": "a5585985ec5f7d418ca017775a1c9042", "score": "0.68238854", "text": "draw() {\n this.context.clearRect(0, 0, this.width, this.height);\n this.drawGridlines();\n for (let i = 0; i < this.items.length; i += 1) {\n const item = this.items[i];\n this.context.save();\n this.context.translate(item.location.x, item.location.y)\n item.draw(this.context);\n this.context.restore();\n }\n }", "title": "" }, { "docid": "8b08ad43662d93187fe129e863deb366", "score": "0.68234223", "text": "_postDraw() {\r\n this.objects.forEach((obj) => {\r\n obj._postDraw();\r\n });\r\n }", "title": "" }, { "docid": "fa738974f46fe8251228d0f19a0619d0", "score": "0.68218726", "text": "drawAll() {\n //1. background\n this.background.draw()\n\n //2. obstacles\n this.generalObstacle.forEach((obs) => obs.draw())\n\n //3. hero\n this.hero.draw()\n\n //5. bullet\n // this.bullets.forEach((b) => b.draw())\n\n }", "title": "" }, { "docid": "96f53d308543da3a7fb325a90c62811b", "score": "0.6813559", "text": "draw () {\n for (var i = 0; i < this.items.length; i++) {\n this.items[i].draw()\n }\n }", "title": "" }, { "docid": "8048aa3fb4d2d699628c13e814bb61a4", "score": "0.679388", "text": "function drawAll() {\n //Iterating between every element inside the part1Objects\n part1Objects.forEach(function (element) {\n //only handle drawing of the focused element or if no element is focused, draw all, trick for when page loads everything is drawed\n if (element.canvasName === focus || focus === \"\") {\n //clear canvas and draw ship\n element.clear();\n element.drawShip(params);\n }\n });\n}", "title": "" }, { "docid": "d50fb241ac2e9619f6452154bb7d3488", "score": "0.67682123", "text": "function draw() {\n\t// Do nothing until game objects are instantiated. \n\tif (gs == null) { return; }\n\n\tupdate(); \n\tclear();\n\n\tfor (let i = 0; i < gs.blocks.length; i++) {\n\t\tgs.blocks[i].draw();\n\t\tgs.ai_tabs[i].draw(); \n\t}\n\n\tfor (let i = 0; i < gs.dice.length; i++) {\n\t\tgs.dice[i].draw();\n\t}\n\n\tgs.progress_button.draw();\n\tgs.show_ai_button.draw();\n\tgs.result_text.draw(); \n}", "title": "" }, { "docid": "95217a11ada5add1d8d5c9781046a0bd", "score": "0.6755035", "text": "function repaint (){\n\t\tfor (var i = 0; i < shapes.length; i++) {\n\t\t\tdrawShapeAt(shapes[i], i + 1);\n\t\t}\n\t}", "title": "" }, { "docid": "6f183a6e99a2848dc8e612c859abdf67", "score": "0.6741291", "text": "function drawObj() {\r\n\r\n obj.draw();\r\n obj2.draw();\r\n obj10.draw();\r\n obj11.draw();\r\n obj12.draw();\r\n obj13.draw();\r\n\r\n obj3.draw();\r\n obj4.draw();\r\n obj5.draw();\r\n obj6.draw();\r\n obj7.draw();\r\n\r\n obj8.draw();\r\n obj9.draw();\r\n }", "title": "" }, { "docid": "88e379f322eba3e20678bb56dd62db87", "score": "0.6724747", "text": "function drawAll(){\n\n c.clearRect(0,0, canvas.width, canvas.height);\n drawStartDub();\n drawUserHand();\n drawBonePile();\n drawTrains();\n drawSelectedDom();\n}", "title": "" }, { "docid": "4c8e73d8ca0f6fa2ebc8023b6b8ac6a5", "score": "0.6715846", "text": "draw() {\n this.drawLines(this.linesData);\n this.drawLines(this.linesAux);\n this.drawSurfaces(this.surfaces);\n }", "title": "" }, { "docid": "5cfbb50204ee358ed6a4898df1453e7a", "score": "0.67030674", "text": "draw() {\n for (const p of this.parts) p.draw(this.color);\n }", "title": "" }, { "docid": "f66af5c7114b18d0a8f90cbfa960bb99", "score": "0.6689509", "text": "function finalDraw() {\n\t Registry.getComponentMethod('shapes', 'draw')(gd);\n\t Registry.getComponentMethod('images', 'draw')(gd);\n\t Registry.getComponentMethod('annotations', 'draw')(gd);\n\t Registry.getComponentMethod('legend', 'draw')(gd);\n\t Registry.getComponentMethod('rangeslider', 'draw')(gd);\n\t Registry.getComponentMethod('rangeselector', 'draw')(gd);\n\t Registry.getComponentMethod('updatemenus', 'draw')(gd);\n\t Registry.getComponentMethod('sliders', 'draw')(gd);\n\t }", "title": "" }, { "docid": "c602baf2cb93f3f1ff089f0d6df9d6df", "score": "0.6679824", "text": "static draw() {\n for (let e of this.elements){\n if(e.visible)\n e.draw();\n }\n }", "title": "" }, { "docid": "fd6713f814ee82083075e80f2aadd57d", "score": "0.6679808", "text": "function onLoad(){\n attachListeners();\n initialDraw();\n}", "title": "" }, { "docid": "aeda059b9507780a5217fe10782b0c4b", "score": "0.66453445", "text": "function draw(){\n\t\tmainCtx.clearRect(0, 0, CANVAS_WIDTH, CANVAS_HEIGHT);\n\n\t\tfor (var i = 0, len = furniture.length; i < len; i++){\n\t\t\t// if (furniture[i].isVisible()) furniture[i].draw();\n\t\t\tfurniture[i].draw();\n\t\t}\n\t}", "title": "" }, { "docid": "aea0a3fb32febf29f54f495b1466a826", "score": "0.66291916", "text": "redrawCanvas () {\n this.clearCanvas()\n if (this.props.order === 0 && (this.selectedTool === constants.save || this.selectedTool === constants.convert)) { this.drawBackground() }\n this.drawElements()\n }", "title": "" }, { "docid": "295d71713babfd001062dba354cda039", "score": "0.66120595", "text": "function drawFinal() {\r\n final.draw();\r\n final8.draw();\r\n final9.draw();\r\n final10.draw();\r\n final11.draw();\r\n final12.draw();\r\n final13.draw();\r\n\r\n\r\n final2.draw();\r\n final3.draw();\r\n final4.draw();\r\n final5.draw();\r\n final6.draw();\r\n final7.draw();\r\n\r\n }", "title": "" }, { "docid": "58b26bb9f07dcfc2d0f62ca204fee528", "score": "0.6611873", "text": "function draw() {\n\tcreateBackground();\n\tcat.show();\n\tupperRows.forEach(row => {\n\t\trow.show();\n\t\trow.move();\n\t});\n\n\tlowerRows.forEach(row => {\n\t\trow.show();\n\t\trow.move();\n\t});\n}", "title": "" }, { "docid": "d5681a5caf81440e240f7fc2982590bc", "score": "0.6606447", "text": "function drawAll(ctx, items, playors, ennemis, rep) {\r\n ctx.clearRect(0, 0, canvas.width, canvas.height);\r\n ctx.save();\r\n\r\n var walls = items[0];\r\n if (walls != undefined) {\r\n for (var i = walls.startIndice; i <= walls.endIndice; i++) {\r\n let el = walls.walls[i];\r\n el.mainProp.draw(ctx, rep);\r\n };\r\n \r\n for (var i = walls.rstartIndice; i <= walls.rendIndice; i++) {\r\n let el = walls.roof[i];\r\n el.mainProp.draw(ctx, rep);\r\n };\r\n }\r\n playors.forEach((el) => {\r\n el.shadows.draw(ctx, rep);\r\n el.mainProp.draw(ctx, rep);\r\n\r\n\r\n ctx.beginPath()\r\n ctx.strokeStyle = el.inventory.activeItem.mainProp.color;\r\n if (el.inventory.isgrabLaunched())\r\n el.inventory.activeItem.mainProp.draw(ctx, rep);\r\n\r\n });\r\n ctx.stroke();\r\n \r\n\r\n ennemis.forEach((el) => {\r\n if (el.state == enemiesState.normal || el.state == enemiesState.inverted) {\r\n el.mainProp.draw(ctx, rep);\r\n }\r\n });\r\n ctx.font = '20px consolas';\r\n ctx.fillStyle = 'white'\r\n ctx.fillText(\"Level : \" + GodObject.level, 20, 30);\r\n ctx.fillText(\"Death : \" + GodObject.death, 650, 30);\r\n ctx.restore();\r\n return 0;\r\n}", "title": "" }, { "docid": "3f4c576040d058ce16d78fb12de4f50e", "score": "0.6602042", "text": "init() {\n this.drawBackground();\n this.drawGrid();\n }", "title": "" }, { "docid": "fbadf043e9ddeab46bdc1977719a333c", "score": "0.659602", "text": "function render(){\r\n g.context.clearRect(0, 0, g.canvas.width, g.canvas.height);\r\n g.ship.imageDraw();\r\n var i = 0;\r\n if (i < g.astronauts.length) {\r\n g.astronauts[i].objDraw();\r\n i++;\r\n }\r\n i = 0;\r\n while (i < g.stars.length){\r\n g.stars[i].starDraw();\r\n i++;\r\n }\r\n}", "title": "" }, { "docid": "7cef2ddff649555fd7b99d37e7a16b76", "score": "0.65916127", "text": "function draw() {\n\tif (canvasValid == false) {\n\t\tclear(ctx);\n\n\t\t// Add stuff you want drawn in the background all the time here\n\n\t\t// draw all boxes\n\t\tvar l = boxes.length;\n\t\t// for (var i = 0; i < l; i++) {\n\t\t// drawshape(ctx, boxes[i], boxes[i].fill);\n\t\t// }\n\n\t\t// draw all paths\n\t\t// l = paths.length;\n\t\t// for(var i =0; i < paths.length; i++){\n\t\t// drawPath(ctx,paths[i]);\n\t\t// }\n\n\t\t// draw selection\n\t\t// right now this is just a stroke along the edge of the selected box\n\t\tif (mySel != null) {\n\t\t\tctx.strokeStyle = mySelColor;\n\t\t\tctx.lineWidth = mySelWidth;\n\t\t\tctx.strokeRect(mySel.x, mySel.y, mySel.w, mySel.h);\n\t\t}\n\n\t\t// Add stuff you want drawn on top all the time here\n\t\tconsole.log(mode);\n\t\tswitch (mode) {\n\t\t\tcase TYPE.INTRO:\n\t\t\t\tvar titleElement = $(\"<div>\");\n\t\t\t\ttitleElement.css({\n\t\t\t\t\t position: \"fixed\",\n\t\t\t\t\t top: \"50%\",\n\t\t\t\t\t left: \"50%\",\n\t\t\t\t\t \"z-index\": \"4\",\n\t\t\t\t\t transform: \"translate(-50%, -50%)\"});\n\t\t\t\ttitleElement.append($(\"<p>\").text(\"TODAY'S LECTURE:\"));\n\t\t\t\ttitleElement.append($(\"<p>\").text(\"Gender Disparity at MIT\"));\n\t\t\t\tvar instructionText = $(\"<p>\");\n\t\t\t\tinstructionText.css({\"font-size\": \"150%\", color:colors.orange});\n\t\t\t\tinstructionText.text(\"Let's see what you think about the current status of undergradaute women at MIT.\");\n\t\t\t\ttitleElement.append(instructionText);\n\n\t\t\t\t$(\"body\").append(titleElement);\n\t\t\t\tquestionTexts.push(titleElement);\n\n\t\t\t\tnextReveal();\n\t\t\t\tbreak;\n\t\t\tcase TYPE.PIECHART:\n\t\t\t\tpieChart();\n\t\t\t\tdrawHandle();\n\t\t\t\taddText(\"Question 1 of 3\",0,0);\n\t\t\t\taddText(\"What fraction of presidents of the technology clubs do you think are women?\", 100, 50, {color: colors.orange});\n\t\t\t\t\n\t\t\t\taddText(\"Your Guess:\", 800, 200);\n\n\t\t\t\tif (isSet) {\n\t\t\t\t\taddText(\"Actual:\", 100, 200);\n\t\t\t\t\taddText(targetValue, 125, 230, {color:\"red\"});\n\t\t\t\t\t\n\t\t\t\t\tdrawChalkArc(ctx, pc.x, pc.y, 100, 0,0.22*2*Math.PI, true, \"red\");\n\t\t\t\t\taddText(\"Your guess was off by \"+(pipercent-22).toString()+\"%\", 800, 350);\n\t\t\t\t\tnextReveal();\n\t\t\t\t} else {\n\t\t\t\t\taddText(\"Click to Set\", 100, 150, {color:colors.cyan});\n\t\t\t\t\tvar position = [100,250];\n\t\t\t\t\tvar size = [200,50]\n\t\t\t\t\tvar tailPercent = 0.75;\n\t\t\t\t\tvar thickness = 25;\n\t\t\t\t\tdrawArrow(ctx,position[0], position[1], size[0], size[1], thickness, tailPercent, colors.cyan);\n\t\t\t\t\t// $(\"#feedback\").text(\"\");\n\t\t\t\t\t// addText(percentValue+\"%\", 800, 300, {color:\"white\"});\n\t\t\t\t}\n\t\t\t\taddText(percentValue+\"%\", 825, 230, {color:\"white\"});\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase TYPE.TWOAXIS:\n\t\t\t\taddText(\"Question 2 of 3\",0,0);\n\t\t\t\tvar chartLength = [700,500];\n\t\t\t\tvar chartOrigin = [100,600];\n\t\t\t\tvar arrowDim = [70,20];\n\t\t\t\tvar graphDim = {\n\t\t\t\t\txmin: 1960,\n\t\t\t\t\txmax: 2010,\n\t\t\t\t\tymin: 0,\n\t\t\t\t\tymax: 100\n\t\t\t\t};\n\n\t\t\t\tdrawChalkLine(ctx,chartOrigin[0],chartOrigin[1],chartOrigin[0],chartOrigin[1]-chartLength[1]); // y axis\n\t\t\t\tdrawChalkLine(ctx,100,100,120,130); //arrow head\n\t\t\t\tdrawChalkLine(ctx,100,100,80,130);\n\t\t\t\tdrawChalkLine(ctx,chartOrigin[0],chartOrigin[1],chartOrigin[0]+chartLength[0] + 50,chartOrigin[1]); // x axis\n\t\t\t\tdrawChalkLine(ctx,850,600,820,chartOrigin[1]+arrowDim[1]);// arrow head\n\t\t\t\tdrawChalkLine(ctx,850,600,820,580);\n\t\t\t\t// addText(\"mouseposition:\"+mx+\",\"+ my, 600,600,\"#00FFFF\");\n\n\t\t\t\tvar chalkStick = $(\"<div>\", {class:\"chalk\"});\n\t\t\t\t$('body').prepend(chalkStick);\n\t\t\t\tquestionTexts.push(chalkStick);\n\t\t\t\t$(document).mousemove(function(evt){\n\t\t\t\tmouseX = evt.pageX;\n\t\t\t\tmouseY = evt.pageY;\n\t\t\t\tif(mouseY<HEIGHT && mouseX<WIDTH){\n\t\t\t\t\t$('.chalk').css('left',(mouseX-0.5*brushDiameter)+'px');\n\t\t\t\t\t$('.chalk').css('top',(mouseY-0.5*brushDiameter)+'px');\n\t\t\t\t\tif(mouseD){\t\t\t\n\t\t\t\t\t\tdrawChalk(mouseX,mouseY);\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t$('.chalk').css('top',HEIGHT-10);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\t$(document).mousedown(function(evt){\n\t\t\t\t\tconsole.log(\"mousedown\");\n\n\t\t\t\t\tmouseD = true;\n\t\t\t\t\txLast = mouseX;\n\t\t\t\t\tyLast = mouseY;\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tmouseX = evt.pageX;\n\t\t\t\t\t\tmouseY = evt.pageY;\n\t\t\t\t\t\tif (mouseX>=940 && mouseX <=1060 && mouseY >=240 && mouseY <=305) {\n\t\t\t\t\t\t\tgraphSubmit = !graphSubmit;\n\t\t\t\t\t\t\tinvalidate();\n\t\t\t\t\t\t}\n\t\n\n\t\t\t\t\t// if(!$('.panel').is(':hover')){\n\t\t\t\t\t// \tdrawChalk(mouseX+1,mouseY+1);\n\t\t\t\t\t// }\n\n\n\t\t\t\t\t\n\t\t\t\t});\n\n\t\t\t\t$(document).mouseup(function(evt){ \n\t\t\t\t\tmouseD = false;\n\t\t\t\t});\n\n\t\t\t\tfunction yearToX(year){\n\t\t\t\t\treturn chartOrigin[0]+ ((year - graphDim.xmin)/(graphDim.xmax - graphDim.xmin) )*chartLength[0];\n\t\t\t\t};\n\n\t\t\t\tfunction toYear(x){\n\t\t\t\t\treturn (x-chartOrigin[0])/chartLength[0] * (graphDim.xmax-graphDim.xmin) + graphDim.xmin;\n\t\t\t\t}\n\n\t\t\t\tfunction toData(y){\n\t\t\t\t\treturn (y - chartOrigin[1])/chartLength[1] * (graphDim.ymax-graphDim.ymin) + graphDim.ymin;\n\t\t\t\t}\n\n\t\t\t\tfunction dataToY(data){\n\t\t\t\t\treturn chartOrigin[1] - ((data- graphDim.ymin)/(graphDim.ymax - graphDim.ymin) )*chartLength[1];\n\t\t\t\t};\n\n\t\t\t\tfunction drawGraphData(xData,yData, gColor){\n\t\t\t\t\tfor(var i = 0; i < xData.length-1;i++){\n\t\t\t\t\t\tdrawChalkLine(ctx,yearToX(xData[i]),dataToY(yData[i]),yearToX(xData[i+1]),dataToY(yData[i+1]),gColor);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\n\t\t\t\tdrawGraphData(uYears,undergrad,\"#FFFF00\"); //undergrad\n\n\t\t\t\t//Title\n\t\t\t\taddText(\"Given this plot of the percent of the undergraduate population that are women, draw the line that you think represents the percent of the faculty population that are women.\", chartOrigin[0] + 70 , (chartOrigin[1] - chartLength[1])/2,{color:colors.orange, width:\"40%\"});\n\t\t\t\t\n\t\t\t\t// X label\n\t\t\t\taddText(\"Year\", (chartOrigin[0] + chartLength[0])/2, chartOrigin[1]+ 50,{color:\"#00FFFF\"});\n\n\t\t\t\t// y label\n\t\t\t\taddText(\"Percentage\", (chartOrigin[0] - 150 ), chartOrigin[1] - (chartLength[1])/2, {transform: \"rotate(-90deg)\", color:\"#00FFFF\"});\n\n\t\t\t\t//axis values\n\t\t\t\tfor(var i = 0; i < uYears.length; i++){\n\t\t\t\t\taddText(uYears[i],yearToX(uYears[i]) - 30, chartOrigin[1]);\n\t\t\t\t}\n\n\t\t\t\tfor (var i = 1; i <10; i++){\n\t\t\t\t\tvar p = i*10;\n\t\t\t\t\taddText(p+\"%-\",chartOrigin[0]- 50,dataToY(p)- 15);\n\t\t\t\t}\n\n\t\t\t\t//Draw a dotted line at 50%\n\t\t\t\tvar lines = 20;\n\t\t\t\tvar sPoint = chartOrigin[0];\n\t\t\t\tvar sLength = chartLength[0]/lines;\n\t\t\t\tfor (var i = 0; i <lines; i++){\n\t\t\t\t\tdrawChalkLine(ctx,sPoint,dataToY(50), sPoint + sLength-50 ,dataToY(50),\"#00FFFF\");\n\t\t\t\t\tsPoint = sPoint + sLength;\n\t\t\t\t}\n\n\t\t\t\t//legend\n\t\t\t\tvar legendOrigin = [chartOrigin[0]+ chartLength[0],chartOrigin[1] - chartLength[1]];\n\t\t\t\tvar yMarker = legendOrigin[1] + 50;\n\t\t\t\tvar yStep = 30;\n\t\t\t\tvar lineLength = 100;\n\t\t\t\tvar textOffset = {x: 110};\n\t\t\t\taddText(\"Legend:\",legendOrigin[0], legendOrigin[1],{color:colors.cyan});\n\n\t\t\t\tdrawChalkLine(ctx,legendOrigin[0], yMarker, legendOrigin[0]+ lineLength, yMarker,colors.yellow);\n\t\t\t\taddText(\"Undergrad\", legendOrigin[0]+ textOffset.x, yMarker-10,{color:colors.yellow, \"font-size\":\"100%\"});\n\t\t\t\tyMarker = yMarker +yStep;\n\n\t\t\t\tdrawChalkLine(ctx,legendOrigin[0], yMarker, legendOrigin[0]+ lineLength, yMarker,colors.white);\n\t\t\t\taddText(\"Your Guess Faculty\", legendOrigin[0]+ textOffset.x, yMarker-10,{color:colors.white, \"font-size\":\"100%\"});\n\t\t\t\tyMarker = yMarker +yStep;\n\t\t\t\t\n\t\t\t\tif (graphSubmit){\n\t\t\t\t\tdrawChalkLine(ctx,legendOrigin[0], yMarker, legendOrigin[0]+ lineLength, yMarker,colors.green);\n\t\t\t\t\taddText(\"Actual Faculty *\", legendOrigin[0]+ textOffset.x, yMarker-10,{color:colors.green, \"font-size\":\"100%\"});\n\t\t\t\t\tdrawGraphData(fYears,faculty,\"#228B22\");// faculty\n\t\t\t\t\taddText(\"Retry\", 955, 260, {\"color\":'#FFFF00'});\n\t\t\t\t\tdrawChalkLine(ctx, 940, 240, 1060, 240,'#FFFF00');\n\t\t\t\t\tdrawChalkLine(ctx, 940, 305, 1060, 305,'#FFFF00');\n\t\t\t\t\tdrawChalkLine(ctx, 940, 240, 940, 305,'#FFFF00');\n\t\t\t\t\tdrawChalkLine(ctx, 1060, 240, 1060, 305,'#FFFF00');\n\t\t\t\t\tvar filteredPath = cropLineToPlot(savePath,chartOrigin,chartLength);\n\t\t\t\t\tplayback(filteredPath,colors.white);\n\t\t\t\t\tvar average = parseInt(-1*toData(averageValue(filteredPath)));\n\t\t\t\t\tvar facultyTarget = 14;\n\t\t\t\t\tvar margin = 3;\n\t\t\t\t\tvar responseText = \"TEMP\";\n\t\t\t\t\tif(average < facultyTarget - margin){\n\t\t\t\t\t\tresponseText = \"Good try, but there are actually more women faculty than that, but it's still a low number.\";\n\t\t\t\t\t}else if(average >facultyTarget +margin){\n\t\t\t\t\t\tresponseText = \"Good try, but unfortunately there are far less women faculty than that.\";\n\n\t\t\t\t\t}else{\n\t\t\t\t\t\tresponseText = \"You guessed about the right percentage of women faculty.\";\n\t\t\t\t\t}\n\t\t\t\t\tresponseText += \" Many female students feel that even fewer mentorship opportunities exist that meet the needs of women.\"\n\t\t\t\t\taddText(responseText ,900,350,{color:colors.orange, width:\"25%\", \"font-size\": \"110%\"});\n\t\t\t\t\taddText(\"*There is limited data on a short range for this series\",700,400,{color:colors.green,width:\"10%\", \"font-size\": \"100%\"});\n\t\t\t\t\tnextReveal();\n\t\t\t\t}else{\n\t\t\t\t\tsavePath = []\n\t\t\t\t\taddText(\"Submit\", 955, 260, {\"color\":'#FFFF00'});\n\t\t\t\t\tdrawChalkLine(ctx, 940, 240, 1060, 240,'#FFFF00');\n\t\t\t\t\tdrawChalkLine(ctx, 940, 305, 1060, 305,'#FFFF00');\n\t\t\t\t\tdrawChalkLine(ctx, 940, 240, 940, 305,'#FFFF00');\n\t\t\t\t\tdrawChalkLine(ctx, 1060, 240, 1060, 305,'#FFFF00');\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\n\n\n\n\t\t\t\tbreak;\n\t\t\tcase TYPE.SLIDER: //KSF\n\t\t\t\taddText(\"Question 3 of 3\",0,0);\n\t\t\t\taddText(\"When comparing themselves to peers, what percent of men and women do you think do not feel capable at MIT?\", 100, 50,{color:colors.orange,width:\"40%\"});\n\t\t\t\tdrawChalkLine(ctx,100,300,800,300); // x axis 1\n\t\t\t\tdrawChalkLine(ctx,100,500,800,500); // x axis 2\n\t\t\t\taddText(\"0%\", 70, 260);\n\t\t\t\taddText(\"25%\", 810, 260);\n\t\t\t\taddText(\"0%\", 70, 460);\n\t\t\t\taddText(\"25%\", 810, 460);\n\t\t\t\tlength = 100;\n\t\t\t\tdrawBox(ctx, s1p, 250, length);\n\t\t\t\taddText(\"Men\", s1p+20, 255);\n\t\t\t\tdrawBox(ctx, s2p, 450, length);\n\t\t\t\taddText(\"Women\", s2p, 455);\n\t\t\t\t\n\t\t\t\taddText(parseInt((s1p-100)*1.17/28.0).toString(), s1p+30, 305);\n\t\t\t\taddText(parseInt((s2p-100)*1.17/28.0).toString(), s2p+30, 505);\n\t\t\t\t\n\t\t\t\taddText(\"Move both sliders, then hit submit to compare to the actual results.\", 900, 100, {'font-size':'100%', 'max-width':'200px', 'color':'#00FFFF'});\n\t\t\t\taddText(\"Submit\", 955, 260, {\"color\":'#FFFF00'});\n\t\t\t\t\n\t\t\t\tdrawChalkLine(ctx, 940, 240, 1060, 240,'#FFFF00');\n\t\t\t\tdrawChalkLine(ctx, 940, 305, 1060, 305,'#FFFF00');\n\t\t\t\tdrawChalkLine(ctx, 940, 240, 940, 305,'#FFFF00');\n\t\t\t\tdrawChalkLine(ctx, 1060, 240, 1060, 305,'#FFFF00');\n// \t\t\t\tdrawBox(ctx, 950, 225, 100);\n\n\t\t\t\t$(document).mousedown(function(evt){\n\t\t\t\t\tmouseD = true;\n\t\t\t\t\t\n\t\t\t\t\tif (!sliderSubmitCheck) {\n\t\t\t\t\t\tmouseX = evt.pageX;\n\t\t\t\t\t\tmouseY = evt.pageY;\n\t\t\t\t\t\tif (mouseX>=940 && mouseX <=1060 && mouseY >=240 && mouseY <=305) {\n\t\t\t\t\t\t\tshowSliderResults(ctx)\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\t\n\t\t\t\t$(document).mouseup(function(evt){\n\t\t\t\t\tmouseD = false;\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\t$(document).mousemove(function(evt){\n\t\t\t\t\tif (mouseD) {\n\t\t\t\t\t\tmouseX = evt.pageX;\n\t\t\t\t\t\tmouseY = evt.pageY;\n\t\t\t\t\t\tif (mouseY <= 350 && mouseY >= 250 && mouseX <= 700 && mouseX >= 100) {\n\t\t\t\t\t\t\tinvalidate();\n\t\t\t\t\t\t\ts1p = mouseX;\n\t\t\t\t\t\t} else if (mouseY <= 550 && mouseY >= 450 && mouseX <= 700 && mouseX >= 100) {\n\t\t\t\t\t\t\tinvalidate();\n\t\t\t\t\t\t\ts2p = mouseX;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t\tcase TYPE.FINAL:\n\t\t\t\taddText(\"Gender Disparity @ MIT: Help draw the future\",0,0,{color:colors.orange,\"font-size\":\"400%\", left:\"50%\", width:\"75%\",\"text-align\":\"center\", transform:\"translate(-50%,0)\"});\n\t\t\t\t// drawChalkLine()\n\t\t\t\tvar titleElement = $(\"<div>\");\n\t\t\t\ttitleElement.css({\n\t\t\t\t\t position: \"fixed\",\n\t\t\t\t\t top: \"55%\",\n\t\t\t\t\t left: \"50%\",\n\t\t\t\t\t width: \"80%\",\n\t\t\t\t\t \"z-index\": \"4\",\n\t\t\t\t\t transform: \"translate(-50%, -50%)\"});\n\t\t\t\tvar finalText = $(\"<p>Now you have a better understanding of the status of gender disparity at MIT. The new <span style=\\\"color:cyan\\\">VP of Student Life</span> wants to hear what you think.</p>\");\n\t\t\t\tfinalText.css({\"font-size\": \"200%\"});\n\t\t\t\ttitleElement.append(finalText);\n\t\t\t\tvar linkText = $(\"<p>\").text(\"Write Suzy Nelson and advocate to close the gap on gender disparity at MIT.\");\n\t\t\t\tlinkText.css({color:\"cyan\", \"margin-top\": \"100px\", \"margin-left\": \"450px\"});\n\t\t\t\ttitleElement.append($(\"<a>\",{href:\"https://welcomesuzy.wordpress.com/write/\"}).append(linkText));\n\t\t\t\t$(\"body\").append(titleElement);\n\t\t\t\tquestionTexts.push(titleElement);\n\t\t\t\tvar position = [200,450];\n\t\t\t\tvar size = [300,100]\n\t\t\t\tvar tailPercent = 0.75;\n\t\t\t\tvar thickness = 50;\n\t\t\t\tdrawArrow(ctx,position[0], position[1], size[0], size[1], thickness, tailPercent, colors.orange);\n\t\t\t\tbreak;\n\t\t}\n\t\tcanvasValid = true;\n\t}\n}", "title": "" }, { "docid": "bcf2ba700a2d6c72c14e9a8bfc0878e2", "score": "0.6585302", "text": "draw() {\n if (!this.traceMode) {\n this.drawBackground();\n }\n\n for (let path of this.paths) {\n path.draw();\n }\n }", "title": "" }, { "docid": "d672cbdfa471231f8f890502eb6a4f63", "score": "0.6576917", "text": "draw() {\n this.lifelinesHeader.draw();\n this.hotSeatActionButtons.forEach((button) => {\n button.draw();\n });\n }", "title": "" }, { "docid": "fffdfb2042de4808596e5329234237a4", "score": "0.6572792", "text": "mainDraw() {\n if (this.redraw.status && !(painter && painter.isDrawing)) {\n this.ctx.drawImage(this.image, 0, 0, this.width, this.height);\n for (let i = 0; i < this.objects.length; i += 1) {\n this.objects[i].draw(\n this.ctx,\n this.selectedObject,\n this.selectionHandle,\n );\n }\n this.redraw.status = false;\n }\n requestAnimationFrame(this.mainDraw.bind(this));\n }", "title": "" }, { "docid": "efb46e67bd3c03c1e41fdcd44e72f010", "score": "0.65555805", "text": "function draw () {\n\tdrawInvaders();\n\tdrawTank();\n\tdrawInvaderBullets();\n\tdrawPlayerBullets();\n}", "title": "" }, { "docid": "8fc60426f631d477b7e2578329d10e26", "score": "0.6547887", "text": "function draw()\n{\n\tpages[current_page].draw();\n}", "title": "" }, { "docid": "9b34b6a0155d281237f65c1a082d0076", "score": "0.6529715", "text": "function drawAll(r) {\r\n\r\n clearCanvas();\r\n drawArea(r);\r\n drawCoordinateSystem();\r\n drawTablePoints();\r\n\r\n }", "title": "" }, { "docid": "9ab7fd14ba3a320cd97a2ad862093d0d", "score": "0.6528872", "text": "function drawObject() {\r\n\r\n object.draw();\r\n object2.draw();\r\n object3.draw();\r\n object4.draw();\r\n object5.draw();\r\n object6.draw();\r\n object7.draw();\r\n object8.draw();\r\n object9.draw();\r\n object10.draw();\r\n }", "title": "" }, { "docid": "9ea9c13ccd92c219e2feab59c8203e0b", "score": "0.6523399", "text": "function draw() {\n /* HTML ELEMENTS */\n \n\n\n}", "title": "" }, { "docid": "7f4dfa2058032dfb7d97a0a322527f82", "score": "0.65223956", "text": "function drawFrame() {\n clearScreen();\n objectsLooper();\n spawnBadGuy();\n for (let item of objects) {\n drawRect(item);\n }\n}", "title": "" }, { "docid": "9a8b5d562929b7a88cfad098f5b0e874", "score": "0.65221554", "text": "draw() {\n this.loop(DrawableArray.drawFunction);\n }", "title": "" }, { "docid": "5084d05dbd9d3c718c3afa4b24ae97a3", "score": "0.65217936", "text": "draw() {\n this.context.clearRect(-12000, -12000, 100000, 100000);\n this.context.setTransform(this.scaleFactor, 0, 0, this.scaleFactor, this.horizontalPan, this.verticalPan);\n for (var index = 0; index < this.shapes.length; index++) {\n this.shapes[index].draw(this.context);\n }\n }", "title": "" }, { "docid": "36d68d4da044f4652b04f7d7b168c416", "score": "0.65105504", "text": "_render() {\n\n this.drawAxis();\n this.drawChart();\n this.drawChart(true);\n this.renderSelectedPoints();\n this.needRedraw = false;\n }", "title": "" }, { "docid": "9e075b24063d5cce5a64df881d154706", "score": "0.65086436", "text": "function draw(){\n\trenderer.clear();\n\tcomposer.render();\n}", "title": "" }, { "docid": "5a18f4c53ab0c2d02df456f5d4819c80", "score": "0.6495329", "text": "function draw() {\n dots.draw();\n pieces.draw();\n player.draw();\n hud.draw();\n}", "title": "" }, { "docid": "a6aa5298dfc3f4c73114dedcc89eea61", "score": "0.6481489", "text": "function drawAll(obj) {\n var thisDraw = new Date().getTime()\n if (((mouse.inScreen1) && ((thisDraw - lastDraw) > 10)) || !mouse.inScreen1) {\n mouse.lastDrawX = mouse.x\n mouse.lastDrawY = mouse.y\n draw()\n drawNodes()\n showMessage()\n showCoordinates()\n\n lastDraw = thisDraw\n doRedraw = false\n }\n}", "title": "" }, { "docid": "0ea9024b13cd9cbf4cf6dd43772d939b", "score": "0.6473822", "text": "function startDrawProcess() {\n\t\t\tself.drawing = true;\n\t\t}", "title": "" }, { "docid": "767ccdf5f1430a4ffe42bbac126a11e7", "score": "0.6468042", "text": "draw(){}", "title": "" }, { "docid": "767ccdf5f1430a4ffe42bbac126a11e7", "score": "0.6468042", "text": "draw(){}", "title": "" }, { "docid": "d9d2772b65392d8e33234e5b103cb9d8", "score": "0.6453337", "text": "function redrawElements() {\n\t\tcontext.clearRect(0, 0, canvas.width, canvas.height);\n\t\tcontext.fillStyle = labelbackground;\n\t\tcontext.fillRect(0, 0, canvas.width, canvas.height);\n\t\tcontext.imageSmoothingEnabled = false;\n\t\tfor (var i = 0; i < annotations.length; i++) {\n\t\t\tvar annotation = annotations[i];\n\t\t\tcontext.fillStyle = annotation.color;\n\t\t\tcontext.fillRect(annotation.start, 0, annotation.end - annotation.start, canvas.height);\n\t\t}\n\t\tif (currentSelection.start != null) {\n\t\t\tvar labelid = currentSelection.labelid;\n\t\t\tvar start = currentSelection.start;\n\t\t\tvar end = currentSelection.end;\n\t\t\tvar color = currentSelection.color;\n\t\t\tcontext.fillStyle = color;\n\t\t\tvar min = 2 * duration / $(\"canvas#stream-annotator-tool-labels\").width()\n\t\t\tif (start < end) {\n\t\t\t\tcontext.fillRect(start, 0, Math.max(end - start, min), canvas.height);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcontext.fillRect(end, 0, Math.max(start - end, min), canvas.height);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "46fdc3a6a25a98af9fccd48d4ff8b133", "score": "0.6445571", "text": "function redraw() {\n draw_all(false);\n drawBottomLeft(left, false);\n drawBottomRight(right, true);\n}", "title": "" }, { "docid": "698860f8d0ffc3dcf7eeb8e87bedf24d", "score": "0.6443191", "text": "display(){\n noStroke();\n fill(this.color);\n this.shape(this.x, this.y, this.size, this.size);\n for(var i=0; i<this.history.length; i++){\n var pos = this.history[i];\n this.shape(pos.x, pos.y, 8, 8);\n }\n }", "title": "" }, { "docid": "2cf4a5317c9bc6d8f76302888e14178a", "score": "0.6433549", "text": "function drawCall() {\n\t\t// draw the background\n\t\tg.background.draw(g.ctx);\n\n\t\t// call the draw entities on the manager\n\t\tg.emanager.drawEntities(g.ctx);\n\n\t\tg.particle.draw(g.ctx);\n\n\t\t// draw the player\n\t\tg.player.draw(g.ctx);\n\n\t\t// draw the player\n\t\tg.state.draw(g.ctx);\n\t}", "title": "" }, { "docid": "d5715c2f8214934125029d05a5aea98b", "score": "0.6428751", "text": "function drawChildren() {\r\n var length = _children.length;\r\n for (var i = 0; i < length; i++) {\r\n _children[i].draw();\r\n }\r\n }", "title": "" }, { "docid": "88c3048b1a07b363e1c0b8a7f9c6bee9", "score": "0.6426041", "text": "function drawElements(){\n\tif(animationtype==\"streaks\"){\n\t\tslices.forEach(\n\t\t\tfunction(elem){\n\t\t\t\telem.draw()\n\t\t});\n\t}else{\n\t\tfor(var r =0; r< numrows;r++){\n\t\t\tfor(var c=0; c<numcolumns; c++)\t{\n\t\t\t\ttheSlice=slices[r][c]\n\t\t\t\ttheSlice.draw();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n}", "title": "" }, { "docid": "bc504273540c75475f6941fab127faf6", "score": "0.6423712", "text": "static drawAll() {\n const render = Thing.render\n towers.forEach((tower) => {\n tower.guns.forEach((gun) => {\n gun.draw(render)\n })\n tower.draw(render)\n tower.effect.draw(render)\n })\n }", "title": "" }, { "docid": "dcb21577c4a70d1ef44a1a0593674b10", "score": "0.6420998", "text": "draw() {\n if (this.self) {\n this.drawing.clear();\n\n this.drawing.drawTiles();\n\n this.projectiles.forEach(this.drawing.drawBiscuit.bind(this.drawing));\n\n this.powerups.forEach(this.drawing.drawPowerup.bind(this.drawing));\n\n this.drawing.drawTank(true, this.self);\n this.players.forEach(tank => this.drawing.drawTank(false, tank));\n }\n }", "title": "" }, { "docid": "fc9bf9cf078434a5432501a96b97aef3", "score": "0.64172196", "text": "function createAll()\n\t{\n\t\tvar textPos = style.borderWidth + style.hMargin + assetWidth + style.assetGap;\n\n\t\t// Draw all of the choices.\n\t\tfor (var i = 0; i < that.choices.length; i++)\n\t\t\tdrawSingle(i, textPos);\n\t}", "title": "" }, { "docid": "76769a978533b7f8cae7881b9e9f7c0e", "score": "0.64160156", "text": "function draw() {\n current.forEach((index) => {\n squares[currentPosition + index].classList.add(\"tetremino\");\n squares[currentPosition + index].style.backgroundColor =\n colors[random];\n });\n }", "title": "" }, { "docid": "1a9de60cdd742ef45c45de441a35d249", "score": "0.64102215", "text": "function render(){\n\tif(game.doneImages >= game.requiredImages){\n\t\tconsole.log(\"all images have been loaded\");\n\t\t//place information for all images to draw here\n\t\tdraw();\n\t\t\n\t} else {\n\t\tsetTimeout(function(){\n\t\t\trender();\n\t\t}, 1);\n\t\t}\n}", "title": "" }, { "docid": "740422cbd37f2b84e9992ebcbab5ff65", "score": "0.6409157", "text": "function draw() {\n //Set the background to a weird reddish color, and draw without stroke\n background(colorA);\n noStroke();\n\n //Render depending on the program stage\n if (PROGRAM_STAGE == LANG_SELECT) {\n updateLangSelect();\n } else if (PROGRAM_STAGE == QUESTIONNAIRE) {\n //Update the modals\n updateModals();\n //Now show the header\n updateHeader();\n } else if (PROGRAM_STAGE == OVERVIEW) {\n\n }\n}", "title": "" }, { "docid": "ea95635f842c4375708aaf08d4c76839", "score": "0.6407919", "text": "function draw() {\n current.forEach(index => {\n squares[currentPosition + index].classList.add('tetromino') //classList.add adds the shape indicated by squares to the tetromino id in the css file\n squares[currentPosition + index].style.backgroundColor = colours[random]\n })\n }", "title": "" }, { "docid": "fbe8341b855a81abd7512d34cceb490b", "score": "0.6387094", "text": "draw() {\n this.layout();\n for (const n of this.nodes) {\n n.draw();\n }\n for (const e of this.edges) {\n e.draw();\n }\n }", "title": "" }, { "docid": "449a5264e25a30e6e80449692083b65f", "score": "0.63815147", "text": "function drawChildWidgets(ctx) {\n\t\t\tfor(var i = 0, l = _self.getWidgetCount(); i < l; i++) {\n\t\t\t\tdrawWidgetToContext(ctx, _self.getWidget(i));\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "62b221785a304463ee92ae4163725ca5", "score": "0.6377262", "text": "function draw() {\n background(200);\n displayTitle();\n selectColor();\n drawGrid();\n checkForReset();\n}", "title": "" }, { "docid": "4778c77f5d07696430c1369d0f1cf3b8", "score": "0.6371374", "text": "render() {\n this.drawBegin();\n this.drawEntities();\n }", "title": "" }, { "docid": "fdf49b0e9d56c65fb9ce0dc4b47d7462", "score": "0.6364198", "text": "draw(){\n this.espacios.forEach(row => {\n row.forEach(col =>{\n this.ctx.beginPath();\n this.ctx.fillStyle = '#6B7AFF';\n this.ctx.rect(col.posX, col.posY, col.width, col.height);\n this.ctx.fill();\n this.ctx.fillStyle = \"white\";\n this.ctx.beginPath();\n this.ctx.arc(((col.width)/2+col.posX), ((col.height)/2+col.posY), col.width/2-5, 0 , Math.PI * 2, false);\n this.ctx.closePath();\n this.ctx.fill();\n this.ctx.fillStyle = \"blue\";\n this.ctx.fillRect(260, this.espacios[this.rows-1][0].posY+66, this.espacios[0][this.cols-1].posX-125, 30)\n });\n });\n this.fichasTeam1.forEach(ficha => {\n ficha.draw();\n });\n this.fichasTeam2.forEach(ficha => {\n ficha.draw();\n }); \n }", "title": "" }, { "docid": "b2a8e0b1434dd9352f495006ffee2dc7", "score": "0.636389", "text": "function drawEverything() {\n // console.log(`headX = ${headX}\\nheadY = ${headY}\\nnuggetX = ${nuggetX}\\nnuggetY = ${nuggetY}`);\n // draw game board\n drawElement(0, 0, canvas.width, canvas.height, \"black\");\n // draw grid\n for (var i = 0; i <= columns; i++) {\n drawLine(i*cellWidth, 0, i*cellWidth, canvas.height, \"rgba(255,255,255,0.1)\");\n drawLine(0, i*cellWidth, canvas.width, i*cellWidth, \"rgba(255,255,255,0.1)\");\n }\n\n // draw collectible\n drawElement(nuggetX*cellWidth, nuggetY*cellWidth, cellWidth, cellWidth, \"#fff\", \"#fff\", 20);\n\n\n // draw snake\n for (i = 0; i <snake.length; i++) {\n drawElement(snake[i].x*cellWidth, snake[i].y*cellWidth, cellWidth, cellWidth, snakeColor, snakeColor, 0);\n }\n\n }", "title": "" }, { "docid": "cb671fc92bdcf93325a7385bc46605b9", "score": "0.6362968", "text": "function reDraw(){\n\tctx.drawImage(main, 0, 0);\n\tctx.drawImage(roundedRectLiveProgress, 1022, 82, progress, 34);\n\tctx.drawImage(pointsRoundedRect, 1090, 650);\n\tctx.drawImage(pointsText, 1200, 665);\n\tctx.drawImage(stepsEllips, 1109, 380);\n\tctx.drawImage(movesRect, 1170, 200);\n\n\tdrawPoits();\n\tdrawSteps();\n\tdrawMoves();\n\n\tfor(let i = 0; i < blockArr.length; i++){\n\t\tif(blockArr[i]) ctx.drawImage(blockArr[i].item, blockArr[i].cordX, blockArr[i].cordY);\n\t}\n}", "title": "" }, { "docid": "09bab022444d23f6020e802ecb3c6d46", "score": "0.63622135", "text": "function drawBalls() {\n\t\t\tstartDrawProcess();\n\t\t\t$timeout(function() {\n\t\t\t\tself.winners = self.drawWinners();\n\t\t\t\tself.calculatePrices(self.winners);\n\t\t\t\tstopDrawProcess();\n\t\t\t}, 1500);\n\t\t}", "title": "" }, { "docid": "d6c2780cd044b23b12291e609af394fd", "score": "0.6359858", "text": "draw(ctx) {\n let { cols, rows } = this;\n for (let i = 0; i < cols; i++) {\n for (let j = 0; j < rows; j++) {\n this.at(i, j).draw(ctx);\n }\n }\n }", "title": "" }, { "docid": "7eeebdd02b7c987fb390439eaeab02dd", "score": "0.6357741", "text": "function drawGameElements() {\n drawBricks();\n gameBall.draw();\n gamePaddle.draw();\n drawScore();\n drawLevelName(LEVELS[CURRENT_LEVEL].name);\n}", "title": "" }, { "docid": "78332f5708a73122a599a083efac56f6", "score": "0.6356194", "text": "function render() {\n\tgeneratePoints();\n\tdraw();\n\tsetButtonStates();\n}", "title": "" }, { "docid": "502c5a456697609d118400c9ce14363e", "score": "0.63534135", "text": "function render() {\n gl.clear(gl.COLOR_BUFFER_BIT);\n\n for (var i=0; i<Blocks.length; i++) {\n Blocks[i].mino1.draw();\n Blocks[i].mino2.draw();\n Blocks[i].mino3.draw();\n Blocks[i].mino4.draw();\n }\n line1.draw();\n line2.draw();\n\n // window.requestAnimFrame(render);\n}", "title": "" }, { "docid": "214590080f188624f89534c32f127b0a", "score": "0.6351833", "text": "function drawing() {\n\tclear();\t//\tClears in case something is already drawn on the canvas\n\tif(nodes.length > 0) {\n\t\tfor(var i = 0 ; i < nodes.length ; i++) {\n\t\t\tdrawDot(nodes[i]);\n\t\t}\n\t\tdrawPath(bestPath);\t// Drawing first chromosome's path\n\t}\n}", "title": "" }, { "docid": "cd15c738c74d120250ded97dd3cb42c5", "score": "0.63502634", "text": "function drawAll(context, w, h){\n\tcontext.clearRect(0, 0, w, h);\n\n for(var i = 0; i<programmingLinksArray.length;i++) {\n \tvar l = programmingLinksArray[i];\n \tvar posA = getButtonPoint(l.locationInA),\n \t\tposB = getButtonPoint(l.locationInB);\n if(posA === undefined || posB === undefined){ \n \tcontinue; //should not be undefined\n }\n drawLine(context, posA[0], posA[1], posB[0], posB[1]);\n }\n // for(var i = 0; i<programmingButtonArray.length;i++) {\n // \tvar b = programmingButtonArray[i];\n // \t// drawButton(context, b.position.position2dX, b.position.position2dY);\n // drawButton2(context, b.id, b.position.position2dX, b.position.position2dY);\n // }\n}", "title": "" }, { "docid": "8904baee81de688b0ea7bcaa63d05dba", "score": "0.6350027", "text": "function drawEveryThing() {\n globalWidth = width();\n globalHeight = height();\n canvas.setAttribute('width', globalWidth);\n canvas.setAttribute('height', globalHeight)\n background.setSize(globalWidth, globalHeight);\n background.draw();\n circ.draw();\n iris.draw();\n pupil.draw();\n\n}", "title": "" }, { "docid": "ca6069cb25880ce14be7576548d0e6cc", "score": "0.634447", "text": "function draw() {\n console.log(new Date(), 'drawing');\n graphics.draw(testdata);\n // TODO implement me!\n // For example, you may want to generate DOM elements corresponding to each\n // subject and sample in some data structure.\n\n} // draw", "title": "" }, { "docid": "24a45c0bec5d6213d9e81e2f0484de7b", "score": "0.63437253", "text": "draw() {\n for (let b = 0; b < this.blocks.length; b++) {\n this.blocks[b].draw();\n }\n }", "title": "" }, { "docid": "dd7a5377fd34f4e234c5578375f9fabd", "score": "0.63359994", "text": "drawDecor() {\n this.decorObjs.forEach(element => {\n this.ctx.drawImage(element.sprite, element.position.x - element.size.width / 2, element.position.y - element.size.height / 2, element.size.width, element.size.height);\n });\n }", "title": "" }, { "docid": "1e72f8cec5230c71c29c544e5b96a8a8", "score": "0.6332705", "text": "draw() {\r\n this.objects.forEach((obj) => {\r\n if (obj.visible) { \r\n obj.draw(); \r\n }\r\n });\r\n }", "title": "" }, { "docid": "7013ac331da053c16719289e3112b03c", "score": "0.6329304", "text": "function draw() {\n // draws background rooms and handles movement from one to another\n adventureManager.draw();\n\n // drawCharacters();\n\n // don't draw them on first few screens\n if( adventureManager.getStateName() === \"Splash\" ||\n adventureManager.getStateName() === \"Instructions\" ||\n adventureManager.getStateName() === \"Characters\" ) {\n ;\n }\n else {\n drawCharacters();\n }\n \n // draw the p5.clickables, in front of the mazes but behind the sprites \n clickablesManager.draw();\n}", "title": "" }, { "docid": "436519a13487a5645a30a7ee14ad3d99", "score": "0.6328754", "text": "function draw(){\n\tfor(var i = 0; i<bricks.length; i++){\n\t\tbricks[i].draw();\n\t}\n}", "title": "" }, { "docid": "c98d3e3333265894e962fffdcaa754fb", "score": "0.6321438", "text": "function draw() {\n background(51);\n line(150, 460, 850, 460); //bottom\n line(150, 140, 850, 140); //Top\n line(150, 140, 150, 460); //Left\n line(850, 140, 850, 460); //right\n for (var i = 0; i < globalBoids.length; i++) {\n globalBoids[i].render();\n }\n}", "title": "" }, { "docid": "4434d94365949396c6c8124bc5ac34b0", "score": "0.63210315", "text": "function draw () {\n\t\t\n\t\t//if (map.graphics){map.graphics.clear();};\n\t\tfor (i=0; i<theftDB.length; i++){\n\t\t\ttheftDB[i].draw();\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "e6174e8e06a0f7ea1879c56c5cb7d010", "score": "0.63134634", "text": "function redraw(){\n background.batchDraw();\n foreground.batchDraw();\n fogLayer.batchDraw();\n }", "title": "" }, { "docid": "2966434065e0db715c57520aefe6ef47", "score": "0.63125616", "text": "function draw() {\n current.forEach(index => {\n squares[currentPosition + index].classList.add(\"tetromino\");\n squares[currentPosition + index].style.backgroundColor = colors[randNum];\n });\n }", "title": "" }, { "docid": "917bfe7e3df0c2929da6703c1aafb9ff", "score": "0.6311465", "text": "function draw() {\n loadPixels();\n this.gol.update(pixels);\n this.gol.draw(pixels);\n updatePixels();\n\n updateHeaderText();\n}", "title": "" }, { "docid": "c1aa4da01b059650fdf6d257ccb27a52", "score": "0.6310165", "text": "function draw() {\n background(255);\n //forEach loop for molecules array that runs the molecule reset function\n //this is used to reset the intersecting colours of the molecules\n molecules.forEach((molecule) => {\n molecule.reset();\n });\n\n recovery();\n splitObjectIntoGrid();\n drawGrid();\ndisplayGraphCount();\n //checking if gridtstate is on or off - this can be changed using the gui\n obj.gridState ? drawGrid() : null;\n\n //runs the render and step functions for each molecule\n //this creates the visual properties of the molecule and makes the molecules move\n molecules.forEach((molecule) => {\n molecule.render();\n molecule.step();\n });\n}", "title": "" }, { "docid": "229adb33c6a7df4889811f0b0273f5bb", "score": "0.6289358", "text": "static drawAllItems(items) {\r\n\t\r\n\t\t//for each item in the array\r\n\t\tfor(var i = 0; i < 8; i ++) {\r\n\t\t\t\r\n\t\t\t//draw each item\r\n\t\t\tvar x = items[i].xPos;\r\n\t\t\tvar y = items[i].yPos;\r\n\t\t\r\n\t\t\tvar img = new Image();\r\n\t\t\t\r\n\t\t\timg.src = items[i].type + \".png\";\r\n\t\t\t\r\n\t\t\tc.fillStyle = backColour;\r\n\t\t\t\r\n\t\t\tif (!items[i].glow) {\r\n\t\t\t\t\r\n\t\t\t\tc.fillRect(x + 2, y + 2, 71, 71);\r\n\t\t\t}\r\n\t\t\tdrawBackground();\r\n\t\t\t\r\n\t\t\tc.drawImage(img, x, y);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "62c0912c40c4ce23a2ebc9c98ab4b802", "score": "0.62880427", "text": "request_render() {\n this.request_paint();\n }", "title": "" }, { "docid": "b754fe8fdd297bc128f81497ee3e7d14", "score": "0.6287308", "text": "function drawEverything(ctx) {\n ctx.clearRect(0, 0, CANVAS_WIDTH, CANVAS_HEIGHT);\n maze.draw(ctx);\n creators.forEach(e => e.draw(ctx));\n game.draw(ctx);\n player.draw(ctx);\n}", "title": "" }, { "docid": "57058600da9b775080cac484f3981e78", "score": "0.62865824", "text": "function drawAllObj(){\n // ctx.strokeStyle = barColor; // here set the color of the bar\n clearObj(); //this is function of all object.\n redraw();\n //this is pencil draw \n // drawSelArea();\n ctx.setLineDash([1,0]);\n ctx.lineCap = \"round\";\n for (var i = 0; i < objArray.length; i++){\n // bar\n if (objArray[i].type == \"rec\"){\n ctx.save();\n ctx.beginPath();\n ctx.strokeStyle = barColor;\n ctx.lineWidth = barlineSize; // here set the line width of the bar \n ctx.rect(objArray[i].startingPointX, objArray[i].startingPointY, objArray[i].length, objArray[i].height);\n ctx.stroke();\n ctx.closePath();\n// canvas_arrow(ctx, objArray[i].startingPointX+objArray[i].length, objArray[i].startingPointY+objArray[i].height/2, objArray[i].startingPointX+objArray[i].length, objArray[i].startingPointY+objArray[i].height/2, 20);\n //cut line\n for (var j = 1; j < objArray[i].sheetCnt; j++)\n {\n ctx.beginPath();\n ctx.moveTo(objArray[i].startingPointX+objArray[i].length*j/objArray[i].sheetCnt, objArray[i].startingPointY);\n ctx.lineTo(objArray[i].startingPointX+objArray[i].length*j/objArray[i].sheetCnt, objArray[i].startingPointY + objArray[i].height);\n ctx.stroke();\n }\n //paints the sheets\n // if(isPaint){\n for (var k = 0; k < objArray[i].sheetColor.length; k++)\n {\n ctx.fillStyle = objArray[i].sheetColor[k];\n ctx.beginPath();\n ctx.fillRect(objArray[i].startingPointX+k*objArray[i].length/objArray[i].sheetColor.length+barlineSize/2,objArray[i].startingPointY+barlineSize/2, objArray[i].length/objArray[i].sheetColor.length-barlineSize,objArray[i].height-barlineSize);\n ctx.stroke(); \n }\n // }\n //arrow \n // ctx.beginPath();\n // ctx.fillStyle = barColor; \n // ctx.arc(objArray[i].arrowStartingPointX, objArray[i].arrowStartingPointY, 25, 0, 2 * Math.PI);\n // ctx.stroke();\n\n //if object is selected\n if (objArray[i].b_SelState == true) //selected object highlight part.\n {\n ctx.strokeStyle = clr_SelOutLineColor; // selected outline color\n ctx.lineWidth = i_SelOutLineWidth; // selected outline width \n // ctx.arc(objArray[i].arrowStartingPointX, objArray[i].arrowStartingPointY, 25, 0, 2 * Math.PI);\n ctx.beginPath();\n canvas_arrow(ctx, objArray[i].startingPointX+objArray[i].length+i_SelOutLineWidth, objArray[i].startingPointY+objArray[i].height/2, objArray[i].startingPointX+objArray[i].length+i_SelOutLineWidth, objArray[i].startingPointY+objArray[i].height/2, 10);\n // ctx.arc(objArray[i].arrowStartingPointX, objArray[i].arrowStartingPointY, 25, 0, 2 * Math.PI);\n ctx.strokeStyle = clr_SelOutLineColor; \n ctx.rect(objArray[i].startingPointX-i_SelOutLineWidth, objArray[i].startingPointY-i_SelOutLineWidth, objArray[i].length+2*i_SelOutLineWidth, objArray[i].height+2*i_SelOutLineWidth);\n ctx.stroke();\n ctx.closePath();\n }\n ctx.restore();\n }\n else if (objArray[i].type == \"horizontalArrow\"){\n drawHorizontalArrow(objArray[i].startingPointX,objArray[i].startingPointY,objArray[i].length,\"false\",objArray[i].Color);\n if (objArray[i].b_SelState == true) //selected object highlight part.\n {\n ctx.strokeStyle = clr_SelOutLineColor; // selected outline color\n //ctx.lineWidth = i_SelOutLineWidth; // selected outline width \n // ctx.arc(objArray[i].arrowStartingPointX, objArray[i].arrowStartingPointY, 25, 0, 2 * Math.PI);\n ctx.beginPath();\n drawHorizontalArrow(objArray[i].startingPointX,objArray[i].startingPointY,objArray[i].length,\"true\");\n ctx.stroke();\n ctx.closePath();\n }\n }\n else if (objArray[i].type == \"upperdownArrow\"){\n drawUpperdownArrow(objArray[i].startingPointX,objArray[i].startingPointY,objArray[i].length,\"false\",objArray[i].Color);\n if (objArray[i].b_SelState == true) //selected object highlight part.\n {\n ctx.strokeStyle = clr_SelOutLineColor; // selected outline color\n //ctx.lineWidth = i_SelOutLineWidth; // selected outline width \n // ctx.arc(objArray[i].arrowStartingPointX, objArray[i].arrowStartingPointY, 25, 0, 2 * Math.PI);\n ctx.beginPath();\n drawUpperdownArrow(objArray[i].startingPointX,objArray[i].startingPointY,objArray[i].length,\"true\");\n ctx.stroke();\n ctx.closePath();\n }\n }\n else if (objArray[i].type == \"dottedupperdownArrow\"){\n drawDottedUpperdownArrow(objArray[i].startingPointX,objArray[i].startingPointY,objArray[i].length,\"false\",objArray[i].Color);\n if (objArray[i].b_SelState == true) //selected object highlight part.\n {\n ctx.beginPath();\n drawDottedUpperdownArrow(objArray[i].startingPointX,objArray[i].startingPointY,objArray[i].length,\"true\",clr_SelOutLineColor);\n ctx.stroke();\n ctx.closePath();\n }\n }\n else if (objArray[i].type == \"question\"){\n questionMark(objArray[i].startingPointX,objArray[i].startingPointY,objArray[i].length);\n }\n\n else if (objArray[i].type == \"text\"){\n textShow(objArray[i].startingPointX,objArray[i].startingPointY,objArray[i].length,objArray[i].text,objArray[i].txt_style,objArray[i].Color);\n if (objArray[i].b_SelState == true){\n textShow(objArray[i].startingPointX,objArray[i].startingPointY,objArray[i].length,objArray[i].text,objArray[i].txt_style,clr_SelOutLineColor);\n }\n } \n \n // else if (objArray[i].type == \"fraction\"){\n // fraction(objArray[i].startingPointX,objArray[i].startingPointY,objArray[i].length);\n // }\n else if(objArray[i].type == \"fraction\"){\n fractionShow(objArray[i].startingPointX,objArray[i].startingPointY,objArray[i].length,objArray[i].height,objArray[i].nomin,objArray[i].denomin,\"black\");\n if (objArray[i].b_SelState == true){\n fractionShow(objArray[i].startingPointX,objArray[i].startingPointY,objArray[i].length,objArray[i].height,objArray[i].nomin,objArray[i].denomin,clr_SelOutLineColor);\n }\n }\n else if(objArray[i].type == \"sticker\"){\n ctx.drawImage(objArray[i].img, objArray[i].startingPointX, objArray[i].startingPointY, objArray[i].length, objArray[i].height);\n if (objArray[i].b_SelState == true) {\n ctx.strokeStyle = clr_SelOutLineColor;\n ctx.lineWidth = i_SelOutLineWidth/2;\n ctx.beginPath();\n ctx.rect(objArray[i].startingPointX, objArray[i].startingPointY, objArray[i].length, objArray[i].height);\n ctx.stroke();\n ctx.closePath();\n }\n }\n }\n \n if (isCutLineShow){ // it draws a line when we cut the bar\n ctx.beginPath();\n ctx.strokeStyle = \"black\";\n ctx.lineWidth = i_SelOutLineWidth;\n ctx.moveTo(cutClickX[0], cutClickY[0]);\n ctx.lineTo(cutClickX[0], cutClickY[cutClickY.length-1]);\n ctx.stroke();\n }\n if (isScissorsLineShow){ // it draws a line when we scissor the bar\n ctx.beginPath();\n ctx.strokeStyle = \"black\";\n ctx.lineWidth = i_SelOutLineWidth;\n ctx.moveTo(scissorClickX[0], scissorClickY[0]);\n ctx.lineTo(scissorClickX[0], scissorClickY[scissorClickY.length-1]);\n ctx.stroke();\n }\n }", "title": "" }, { "docid": "08de18bac2b343bf015ff906341f9624", "score": "0.62851274", "text": "draw() {\n\t\tthis.hoverCalc()\n\t\tthis.clicked()\n\t\tthis.newPosition()\n\t\tthis.drawLine()\n\n\t\tthis.applyCircleStyle()\n\t\tthis.ly.circle( this.x, this.y, 2 * this.r * this.scale )\n\n\t\tthis.applyTextStyle()\n\t\tthis.ly.text( this.label, this.x, this.y )\n\n\t}", "title": "" }, { "docid": "7b49dc9c42ca05cd9f0f35a2b5666df9", "score": "0.6284502", "text": "function draw(){\n\n var ctx = getContext();\n\n // Log.group(\"A draw started\");\n //alert('Paint 1')\n reset(getCanvas()); \n\t\n\t//if grid visible paint it\n//\tif(gridVisible){ //paint grid\n\t\taddBackground(getCanvas());\n//\t}\n\t\n //alert('Paint 2')\n STACK.paint(ctx);\n \n minimap.updateMinimap();\n// Log.groupEnd();\n//alert('Paint 3')\n}", "title": "" }, { "docid": "4d44ffef0586eb4525506c523020fc04", "score": "0.6278297", "text": "function draw() {\n\t\t\t\tclear();\n\t\t\t\tctx.fillStyle = \"#75715E\";\n\t\t\t\tctx.strokeStyle = \"#75715E\";\n\t\t\t\trect(0,0,WIDTH,HEIGHT);\n\t\t\t\n\t\t\t\tfor (i in obsArray){\n\t\t\t\t\tctx.strokeStyle = obsArray[i][0];\n\t\t\t\t\tctx.fillStyle = obsArray[i][0];\n\n\t\t\t\t\trect(obsArray[i][1], obsArray[i][2], obsArray[i][3], obsArray[i][4]);\n\t\t\t\t}\n\n\t\t\t\tctx.strokeStyle = colourpalette[cubecolourint];\n\t\t\t\tctx.fillStyle = colourpalette[cubecolourint];\n\n\t\t\t\tflag? rect(x,y,72,72) : null;\n\t\t\t\tlost? endGame(\"Lose!\"): null;\n\n\t\t\t\t// ^ this is pretty\n\t\t\t\tupdate();\n\t\t\t}", "title": "" }, { "docid": "9b5c746a8e4d8ecea2e5396d92d48807", "score": "0.6276387", "text": "function drawObjects() {\n\t\t// Y - Axis\n\t\tglnv.mvPushMatrix();\n\t\tglnv.putArrow(prg,\n\t\t\tprg.arrows[\"red\"][\"v\"], prg.arrows[\"red\"][\"n\"], \n\t\t\tprg.arrows[\"red\"][\"c\"], prg.arrows[\"red\"][\"i\"], prg.attLocation, prg.attStride);\n\t\tglnv.mvPopMatrix();\n\n\t\t// Z - Axis\n\t\tglnv.mvPushMatrix();\n\t\tm.rotate(glnv.mMatrix, glnv.degToRad(90), [1, 0, 0], glnv.mMatrix);\n\t\tglnv.putArrow(prg,\n\t\t\tprg.arrows[\"green\"][\"v\"], prg.arrows[\"green\"][\"n\"], \n\t\t\tprg.arrows[\"green\"][\"c\"], prg.arrows[\"green\"][\"i\"], prg.attLocation, prg.attStride);\n\t\tglnv.mvPopMatrix();\n\n\t\t// rotate arrow\n\t\tif (g.rinfo['rot'] != undefined) {\n\t\tglnv.mvPushMatrix();\n\t\tfor (var i = 0; i< g.rinfo['rot'].length; i++) \n\t\t\tm.rotate(glnv.mMatrix, glnv.degToRad(g.rinfo['rot'][i][0]), \n\t\t\t\t[g.rinfo['rot'][i][1], g.rinfo['rot'][i][2], g.rinfo['rot'][i][3]], glnv.mMatrix);\n\t\tm.rotate(glnv.mMatrix, glnv.degToRad(-90), [0, 0, 1], glnv.mMatrix);\n\t\tm.scale(glnv.mMatrix, [0.5, 1.5, 0.5], glnv.mMatrix);\n\t\tglnv.putArrow(prg,\n\t\t\tprg.arrows[\"green\"][\"v\"], prg.arrows[\"green\"][\"n\"], \n\t\t\tprg.arrows[\"green\"][\"c\"], prg.arrows[\"green\"][\"i\"], prg.attLocation, prg.attStride);\n\t\tglnv.mvPopMatrix();\n\t\t}\n\n\t\t// X - Axis\n\t\tgl.useProgram(prg);\n\t\tglnv.drawFlows(prg, undefined, g.drawinfo_flows, arrow_default_pos, arrow_delta);\n\n\t\t// draw spheres\n\t\tglnv.mvPushMatrix();\n\t\tm.scale(glnv.mMatrix, [20.0, 20.0, 20.0], glnv.mMatrix);\n \tm.translate(glnv.mMatrix, [0.0, 5.0, 0.0], glnv.mMatrix);\n\t\tglnv.setMatrixUniforms(prg, 'default');\n\t\tglnv.putSphere(\n\t\t\tprg.spheres[\"red\"][\"v\"], prg.spheres[\"red\"][\"n\"], \n\t\t\tprg.spheres[\"red\"][\"c\"], prg.spheres[\"red\"][\"i\"], prg.attLocation, [ 3, 3, 4 ],\n\t\t\t1 // wireframe flag\n\t\t);\n\t\tglnv.mvPopMatrix();\n\n\t\t// draw cubes\n\t\tglnv.mvPushMatrix();\n\t\tm.scale(glnv.mMatrix, [12.0, 12.0, 12.0], glnv.mMatrix);\n \tm.translate(glnv.mMatrix, [0.0, 0.0, 8.0], glnv.mMatrix);\n\t\tglnv.setMatrixUniforms(prg, 'default');\n\t\tglnv.putCube(\n\t\t\tprg.cubes[\"green\"][\"v\"], prg.cubes[\"green\"][\"n\"], \n\t\t\tprg.cubes[\"green\"][\"c\"], prg.cubes[\"green\"][\"i\"], prg.attLocation, [ 3, 3, 4 ]\n\t\t);\n\t\tglnv.mvPopMatrix();\n\n\t\t// change shader program\n\t\tgl.useProgram(texprg);\n\n\t\t// draw a texture cube\n\t\tglnv.mvPushMatrix();\n\t\tm.scale(glnv.mMatrix, [18.0, 4.5, 12.0], glnv.mMatrix);\n \tm.translate(glnv.mMatrix, [0.0, 0.0, 12.0], glnv.mMatrix);\n\t\tglnv.setMatrixUniforms(texprg, 'use_texture');\n \tgl.uniform1i(texprg.samplerUniform, 1);\n\t\tglnv.putCube(\n\t\t\tprg.cubes[\"red\"][\"v\"], prg.cubes[\"red\"][\"n\"], \n\t\t\tprg.cubes[\"red\"][\"t\"], prg.cubes[\"red\"][\"i\"], [\n\t\t\t\ttexprg.vertexPositionAttribute,\n\t\t\t\ttexprg.vertexNormalAttribute, \n\t\t\t\ttexprg.textureCoordAttribute ], [ 3, 3, 2 ]\n\t\t);\n\t\tglnv.mvPopMatrix();\n\n\t\tglnv.putStr(texprg, \"switch01\", 3.5, [0.0, 9.0, 144.0], 0.45, \"red\");\n\n\t\t// draw a texture sphere\n\t\tglnv.mvPushMatrix();\n\t\tm.scale(glnv.mMatrix, [20.0, 20.0, 20.0], glnv.mMatrix);\n \tm.translate(glnv.mMatrix, [0.0, -2.0, 0.0], glnv.mMatrix);\n\t\tglnv.setMatrixUniforms(texprg, 'use_texture');\n \tgl.uniform1i(texprg.samplerUniform, 4);\n\t\tglnv.putSphere(\n\t\t\tprg.spheres[\"red\"][\"v\"], prg.spheres[\"red\"][\"n\"], \n\t\t\tprg.spheres[\"red\"][\"t\"], prg.spheres[\"red\"][\"i\"], [\n\t\t\t\ttexprg.vertexPositionAttribute,\n\t\t\t\ttexprg.vertexNormalAttribute, \n\t\t\t\ttexprg.textureCoordAttribute\n\t\t\t], [ 3, 3, 2 ]\n\t\t);\n\t\tglnv.mvPopMatrix();\n\n\t\tgl.useProgram(prg);\n\t}", "title": "" } ]
9e30937bb24b13a35074c93cca60173c
Load user data for dashboard, retrieved via AJAX, into global storage. Populates global variable "window.CST.dashUser". Might be null, if no data stored for the user yet. In this case, store a dummy object with no data.
[ { "docid": "5babbdc8a3a98bab82c2b25df1de07e8", "score": "0.5730412", "text": "function getDashUser(done) {\n // done signature: ()\n var httpRequest = new XMLHttpRequest();\n if (!httpRequest) {\n alert('Giving up :( Cannot create an XMLHTTP instance');\n done();\n return false;\n }\n\n httpRequest.onreadystatechange = getDashUserHandler;\n httpRequest.open('GET', window.CST_OVERRIDES.appLocation + 'api/v0/dashuser/' + window.CST_OVERRIDES.facultyUser.id, true);\n httpRequest.send();\n\n function getDashUserHandler() {\n if (httpRequest.readyState === XMLHttpRequest.DONE) {\n if (httpRequest.status === 200) {\n \n // Store to global data\n const userData = JSON.parse(httpRequest.responseText);\n window.CST_OVERRIDES.dashUser = userData || { hiddenObs: [] };\n\n // Populate phone number form, if we have the data\n if (userData && userData.mobile) {\n var txtPhone = document.getElementById('txtPhone');\n var mobile = userData.mobile;\n txtPhone.value = mobile.substring(0, 3) + '-' + mobile.substring(3, 6) + '-' + mobile.substring(6);\n\n // Give user a way to delete the number\n var btnDelete = document.getElementById('btnDeletePhone');\n btnDelete.disabled = false;\n\n }\n\n } else {\n // alert('There was a problem with the request getISupeSubmissionsByStudent.\\nRequest status:' + httpRequest.status);\n logErrorInPage('There was a problem with the request getISupeSubmissionsByStudent.\\nRequest status:' + httpRequest.status);\n }\n done();\n } // end request ready\n } // end request handler\n}", "title": "" } ]
[ { "docid": "2e7b5e212b81c0aeb93dafb1297e9284", "score": "0.6951612", "text": "function pageLoad() {\n\tuser_data = JSON.parse(localStorage.getItem(\"user_data\"));\n\tif (!user_data) {\n\t\tuser_data = [];\n\t}\n}", "title": "" }, { "docid": "9b9c5024147e552834a0e0d653457f4a", "score": "0.69167733", "text": "function loadUser(){\n let userLogged = JSON.parse(localStorage.getItem(\"userLogged\"))\n setUser(userLogged)\n }", "title": "" }, { "docid": "f806b3e54539d281bf541cf1193f59a6", "score": "0.6714693", "text": "load() {\n let record = localStorage.getItem(STORAGE_KEY + \"/\" + this.user.getId());\n this.data = record ? JSON.parse(record) : {};\n }", "title": "" }, { "docid": "40b7d081eb1ada06d7ec37e17cff2500", "score": "0.6712729", "text": "function loadActiveUser() {\n activeUser = JSON.parse(localStorage.getItem(\"ActiveUser\"));\n console.log(\"Carregado 'ActiveUser' da localStorage para a variavel activeUser com sucesso.\");\n console.log(activeUser);\n}", "title": "" }, { "docid": "9dd72ff7430d7c9333a9f85dc5eb6466", "score": "0.66066754", "text": "function loadData() {\n if (localStorage['userData']) {\n var userDataLSString = localStorage['userData'];\n return JSON.parse(userDataLSString);\n } else {\n console.log('loadData() :: no userData key found in localStorage object');\n }\n}", "title": "" }, { "docid": "4d465b784775fd8708498ba31378e359", "score": "0.658598", "text": "function initData(){\n if (localStorage.getItem('users')){\n var usedList = JSON.parse(localStorage.getItem('users'));\n for (var idx in usedList){\n new User(usedList[idx].userName, usedList[idx].userPhoneNumber, usedList[idx].pinCompanyName, usedList[idx].userEmail, usedList[idx].userPassword);\n userList[idx].pinform = usedList[idx].pinform;\n }\n } else {\n userList = [];\n }\n if (localStorage.getItem('activeuser')){\n var activatedUser = JSON.parse(localStorage.getItem('activeuser'));\n activeUser = new User(activatedUser.userName, activatedUser.userPhoneNumber, activatedUser.userCompanyName, activatedUser.userEmail, activatedUser.userPassword);\n userList.pop();\n\n console.log('init data is running');\n console.log('current active users',activeUser );\n\n } else {\n activeUser= [];\n }\n if (localStorage.getItem('allpins')){\n allPins = JSON.parse(localStorage.getItem('allpins'));\n if (localStorage.getItem('greenpins')){\n greenPins = JSON.parse(localStorage.getItem('greenpins'));\n }\n if (localStorage.getItem('redpins')){\n redPins = JSON.parse(localStorage.getItem('redpins'));\n }\n }\n}", "title": "" }, { "docid": "457c3fbc33f8daabb79349a23e1b0fc8", "score": "0.6582626", "text": "function loadUserData() {\n const data = JSON.parse(localStorage.getItem('t_b_data'));\n const name = data.payload.data.name;\n const email = data.payload.data.email;\n const number = data.payload.data.number;\n document.querySelector('#userName').innerHTML = name.substr(0, 10) + '.....';\n document.querySelector('#userDetailName').innerHTML = name;\n document.querySelector('#userEmail').innerHTML = email;\n}", "title": "" }, { "docid": "2c0e89dad47032525a9ef9a28cd2ad2f", "score": "0.6574874", "text": "function load_user() {\n // get user id from local storage\n const localStorageCurrentUserId = localStorage.getItem(\"currentUserId\");\n\n // make a REST HTTP request for all users using the app\n const request = new XMLHttpRequest();\n request.open('GET', `/users`);\n request.onload = () => {\n const allAppUsers = JSON.parse(request.responseText);\n\n // if there is a locally stored user and that user is in the servers list of current users...\n if (localStorageCurrentUserId && (allAppUsers.find((user) => user.id === localStorageCurrentUserId))) {\n\n // store that user as the apps currentUser and update the DOM accordingly\n currentUserId = localStorageCurrentUserId;\n selectors.displayNameModalTextField.val(allAppUsers.find((user) => user.id === localStorageCurrentUserId).displayName);\n selectors.displayNameModal.modal('hide');\n } else {\n // else reveal the display name modal (the locally stored user isn't there or is invalid)\n selectors.displayNameModal.modal('show');\n }\n };\n request.setRequestHeader(\"Content-Type\", \"application/json;charset=UTF-8\");\n request.send();\n}", "title": "" }, { "docid": "bd2b1fde8d34c73359b6696598075e65", "score": "0.6525617", "text": "function loadUserDetails() {\n loadJSON('backend/resources/json/user.json', function(response) {\n actual_JSON = JSON.parse(response);\n globalId = actual_JSON.passkey;\n onValidate();\n });\n}", "title": "" }, { "docid": "f0ed631a94fab29a5e9da2e3ac44b58a", "score": "0.649201", "text": "function initUserInfo () {\r\n\t \tvar storedUserInfo = localStorage.getItem('user'), currentUser = null;\r\n\t \tif (!!storedUserInfo) {\r\n\t \t\tcurrentUser = JSON.parse(storedUserInfo);\r\n\t \t}\r\n\t \treturn currentUser;\r\n\t }", "title": "" }, { "docid": "5fdb144c60eb0bd22fd42bca7f345f17", "score": "0.6459417", "text": "loadUser(){\n const currentRider = localStorage.getItem(CYCLING_LS)\n if(!currentRider){\n return\n }else {\n return JSON.parse (currentRider || '[]') //transfer string to object\n }\n }", "title": "" }, { "docid": "3b5bd176a3074feb2d9dc6466fe57acc", "score": "0.64590204", "text": "function loadUser() {\n try {\n return (\n jsonParse(localStorage.getItem(userKey) || sessionStorage.getItem(userKey) || '{}') || {}\n );\n } catch (e) {\n return {};\n }\n}", "title": "" }, { "docid": "4fcbf76d17e7eab397410e255f764d16", "score": "0.6449783", "text": "function setUserdataObject () {\n\t\t// Try and get user data from local storage. Returns null or data. \n\t\tvar storageData = getUserdataFromStorage();\n\n\t\t/**\n\t\t\tCall the web service only if:\n\t\t\t\tthey force an IP lookup via URL param, \n\t\t\t\tor no data was retrieved from storage, \n\t\t\t\tor storage data was compromised (Ex: user screws with localstorage values)\n\t\t\tElse the user had valid stored data, so set our user obj.\n\t\t**/\n\t\tif (ipForced !== \"\" || !storageData || !storageData.information_level) {\n\t\t\trequestUserdataFromService();\n\t\t}\n\t\telse {\n\t\t\tpopulateUserObject(storageData);\n\t\t}\n\t}", "title": "" }, { "docid": "27f4dc75921785a245e6ac5eb369319d", "score": "0.6438515", "text": "function initializeUserData() {\n $.get(\"/api/user_data\").then(function(data) {\n console.log(\"User Data: \", data);\n var name = commonName;\n if (name) {\n generateName(data, name);\n } else {\n name = commonName;\n generateName(data, name);\n }\n });\n }", "title": "" }, { "docid": "4aa0fe3e4dff3621973c639dd61d7311", "score": "0.64015496", "text": "function loadUserData() {\n firebaseFunctions.setCurrentUserData( ( user ) => {\n currentUser.innerText = user.name;\n currentUser.dataset.uid = user.id;\n currentUser.dataset.pubKey = user.chavePublica;\n } );\n}", "title": "" }, { "docid": "eb5588340497935aea07cd69d9520d1a", "score": "0.6387836", "text": "async setUserData() {\n\t\tvar userinfo;\n\t\tawait AppX.fetch('User', 'self').then(async result => {\n\t\t\tvar info = result.data;\n\t\t\tglobal.userLogin = info.login;\n\n\t\t\tawait AppX.fetch('OrganizationDetail', info.organizationUid).then(result => {\n\t\t\t\tglobal.userOrgName = result.data.name;\n\t\t\t});\n\n\t\t});\n\t}", "title": "" }, { "docid": "33e5c6b7af0d00239ebf8444cf239d28", "score": "0.6382819", "text": "function loadAuthData() {\n // Skip if the local storage is not available.\n if (!utils.storageAvailable('localStorage')) {\n return;\n }\n\n // Load the data from the local storage.\n var data = localStorage[authDataID];\n if (!data) {\n return;\n }\n\n // Try to parse the JSON.\n try {\n data = JSON.parse(data);\n }\n catch(e) {\n console.log(\"failed to decode saved auth data JSON: \" + e);\n return;\n }\n\n // Set the values if present.\n if (data.authUserID) {\n authUserID = data.authUserID;\n }\n }", "title": "" }, { "docid": "d834960c8df6636ca572f259ea869ca3", "score": "0.6375727", "text": "getUserData() {\n return JSON.parse(localStorage.getItem(SIMPLEID_USER_SESSION));\n }", "title": "" }, { "docid": "e90c7aacf26b9031d0cbe7ff04485f1c", "score": "0.6353426", "text": "function load_userObj(data) {\n userObj.id = data.id;\n userObj.email = data.email;\n userObj.nick = data.nick;\n userObj.name = data.name;\n userObj.role = data.role;\n}", "title": "" }, { "docid": "e5cdacf3acf42e4de4b07b8d837f4beb", "score": "0.6327441", "text": "function initUserProfile() {\n //get the last activity for the user logged in\n $.ajax({\n url: window.api + \"/api/\" + window.token + \"/Users/profile\",\n beforeSend: function (xhr) { xhr.setRequestHeader('Authentication', window.token); },\n success: function (profile) {\n RenderProfileDataUI(JSON.parse(profile));\n }\n });\n}", "title": "" }, { "docid": "bcf5daf052a092a62a21d260dd10f55b", "score": "0.62766975", "text": "function fetchUserData(){\r\n\t\tif($localStorage.rondin_admin_token && $localStorage.rondin_access_level){\r\n\t\t\t$scope.rondin_admin_token = $localStorage.rondin_admin_token;\r\n\t\t\t$scope.rondin_access_level = $localStorage.rondin_access_level; \r\n\t\t\t$http.get('../php/db_transactions/isAdmin.php', {params:{\"admin_token\": $scope.rondin_admin_token, \"access_level\": $scope.rondin_access_level}}).then(function successCallback(response){\r\n\t\t\t\tif(response.data.status === \"found\"){\r\n\t\t\t\t\t$scope.rondin_logs = response.data.logs;\r\n\t\t\t\t\t$scope.rondin_tags = response.data.tags;\r\n\t\t\t\t\t$scope.rondin_isAdmin = $localStorage.rondin_isAdmin = {\"status\": true, \"name\": response.data.nom_operador, \"access_level\": response.data.access_level};\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t$timeout(function(){\r\n\t\t\t\t$scope.isRouteLoading = false;\r\n\t\t\t},2000);\r\n\t\t}\r\n\t\telse{\r\n\t\t\t$localStorage.rondin_isAdmin = {\"name\": \"\", \"status\": false, \"access_level\": \"\"};\r\n\t\t\t$timeout(function(){\r\n\t\t\t\t$scope.isRouteLoading = false;\r\n\t\t\t},2000);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "25f724f04785dcc852e493e2a26c55a7", "score": "0.6220625", "text": "function gettingStoredDataFunction() {\n let allUsersFromStorage = localStorage.getItem('allUsers');\n let allUsersParse = JSON.parse(allUsersFromStorage);\n\n //don't update if the sotrage is empty\n if (allUsersParse) {\n\n //reinstantiation to restor the missed proto methods\n for (let i = 0; i < allUsersParse.length; i++) {\n\n new User(allUsersParse[i].name, allUsersParse[i].type);\n\n }\n }\n\n}", "title": "" }, { "docid": "61d2f5453a843e84c836fe39f38376d6", "score": "0.61852145", "text": "function loadData() {\n\n //Users name.\n loadName()\n\n //Users config.\n loadConfig()\n}", "title": "" }, { "docid": "39aee76d36f7f982897d717bd5c9dbca", "score": "0.61644423", "text": "function loadData(){ \t\n \t//if (gameData.data.player.playerID>0) {\n \t\tCORE.LOG.addInfo(\"PROFILE_PAGE:loadData\");\n \t\t//var p = new ProfileCommunication(CORE.SOCKET, setData); \t\t\n \t\t//p.getData(gameData.data.player.playerID); \t\t\n \t\t\n \t//}\n \t//else \n \t\tsetDataFromLocalStorage(); \t \t \t\n }", "title": "" }, { "docid": "72552783696987bd187d680869e1b3f4", "score": "0.61494815", "text": "function loadData(data) {\n _userData = data.userData;\n}", "title": "" }, { "docid": "2a7dd113e804459b0f1dc2c23da6530f", "score": "0.61483765", "text": "getCurrentUser() {\n var data = JSON.parse(localStorage['cache_/campusm/sso/state']).data;\n\n // Actual username has a non-obvious key in local storage\n data.username = data.serviceUsername_363;\n\n return data;\n }", "title": "" }, { "docid": "5f90b99bb02857066c2acffa2d393366", "score": "0.61259437", "text": "static LoadUserData(Data){\n // Supprimer les proprietés du user a ne pas afficher\n let UserDataToShow = Data[0]\n let CoreXWindowUserConfigData = document.getElementById(\"CoreXWindowUserConfigData\")\n CoreXWindowUserConfigData.innerHTML = \"\"\n CoreXWindowUserConfigData.appendChild(CoreXBuild.Div(\"\",\"\",\"height:2vh;\"))\n // Creation de la liste HTML des données du user\n Object.keys(UserDataToShow).forEach(element => {\n CoreXWindowUserConfigData.appendChild(CoreXWindowUserConfig.BuildUserDataview(element, UserDataToShow[element]))\n })\n }", "title": "" }, { "docid": "7ae85e91bd0f445592761e67e81057a4", "score": "0.6121957", "text": "function initData(){\n if (_users){\n return;\n }\n _users = [];\n _users['user1'] = {\n username: 'user1',\n password: 'password', \n };\n _users['user2'] = {\n username: 'user2',\n password: 'password',\n };\n}", "title": "" }, { "docid": "02f8b9ed5562c96d20991e6e28b3374a", "score": "0.6118754", "text": "async fetchUserData() {\n let token = localStorage.getItem('token');\n try {\n dispatch.breaks.setIsLoadingData(true);\n let response = await breakURL.get('/auth/me', {\n headers: { Authorization: `Bearer ${token}` },\n });\n dispatch.breaks.setUserData(response.data.data);\n localStorage.setItem('userData', JSON.stringify(response.data.data));\n dispatch.breaks.setIsLoadingData(false);\n } catch (err) {\n console.log(err);\n dispatch.breaks.setIsLoadingData(false);\n }\n }", "title": "" }, { "docid": "9a0a2cd3b314cbddc5cafea7055add6f", "score": "0.6113097", "text": "function loadCurrentUser() {\n UserService.GetCurrentUser()\n .then(function (response) {\n vm.user = response.data;\n });\n }", "title": "" }, { "docid": "ff96695d0b7bdfe842aac2eaaee62c8f", "score": "0.60403836", "text": "function getUserData() {\n if (document.getElementById(\"current-user\")) {\n currentUser = JSON.parse(document.getElementById(\"current-user\").textContent);\n console.log(\"==Retrived user info:\", currentUser);\n console.log(\"Succesfully logged in as\\nUsername:\", currentUser.username, \"\\nDisplay Name:\", currentUser.displayName);\n if (!(currentUser.username && currentUser.displayName)) {\n alert(\"Error: You have been logged out due to an error in function \\\"getUserData\\\" in index.js or \\\"app.use\\\" in server.js.\");\n currentUser = \"\";\n } else {\n updateDisplayLogin();\n }\n }\n}", "title": "" }, { "docid": "b48a0ff4fd8e04c0b416130dffbcf58e", "score": "0.60365623", "text": "async init() {\n let oUser = undefined;\n let sValue = await this.oStorage.get(config.sUserCookieKey);\n\n try {\n sValue = sValue ? JSON.parse(sValue) : undefined;\n\n if (sValue.id && sValue.time) {\n oUser = sValue;\n }\n } catch (e) {\n oUser = undefined;\n }\n\n if (!oUser) {\n this.resetToNew();\n await this.sync();\n } else {\n this.id = oUser.id;\n this.time = oUser.time;\n }\n }", "title": "" }, { "docid": "57398d182c7baa9e57eb8793a6908719", "score": "0.60215104", "text": "function loadusers() {\n fetch('https://milelym.github.io/scl-2018-05-bc-core-pm-datadashboard/data/cohorts/lim-2018-03-pre-core-pw/users.json')\n .then(function(resp) {\n return resp.json();\n //retorna la data\n })\n // maneja la data se crea una variable fuera de la funcion y los valores se guardan en un objeto//\n .then(function (valores) {\n data.user = valores;\n // console.log('data.user es :',data.user);\n // para imprimirlo cuando se obtenda la informacion//\n loadcortes();\n });\n}", "title": "" }, { "docid": "618765f2bc59cdddb5f5dd585501ef98", "score": "0.6020973", "text": "function loadUserData() {\n let url = getContextPath() +'/userInfo'\n $.get({\n url: url\n }).done(function (list) {\n let json = list[1]\n let id = json['id']\n if (id != null) {\n document.getElementById(\"id\").value = id;\n }\n let name = json['name']\n if (name != null) {\n document.getElementById(\"l_name\").value = name;\n document.getElementById(\"name\").value = name;\n }\n let email = json['email']\n if (email != null) {\n document.getElementById(\"l_email\").value = email;\n document.getElementById(\"email\").value = email;\n }\n let phone = json['telephone']\n if (phone != null) {\n document.getElementById(\"l_phone\").value = phone;\n document.getElementById(\"phone\").value = phone;\n }\n let userPic = json['userPic']\n if (userPic != null) {\n $('#userpic').attr('src', userPic);\n }\n let location = json['location']\n if (location != null) {\n document.getElementById(\"l_location\").value = location;\n document.getElementById(\"location\").value = location;\n }\n let adList = list[0];\n let htmlTable = loadAdForMe(adList)\n $('#myAdList').html(htmlTable)\n }).fail(function () {\n console.log('ошибка загрузки данных')\n });\n}", "title": "" }, { "docid": "d319a96e9ade61d152b0e138603e1bd8", "score": "0.5991791", "text": "function User_LoadUser()\n{\n let UserData = {};\n\n function showLogin() {\n Utils_DeleteAllWithClass('nav-user');\n document.querySelector('nav.nav .nav-user-info').innerHTML += `\n <button class=\"btn nav-user\" onclick=\"User_RegisterAction()\">Register</button></nav>\n <button class=\"btn nav-user\" onclick=\"User_LoginAction()\">Login</button>\n `;\n }\n\n const adminButtonHTML = `\n <button class=\"btn nav-user btn-admin-page\" onclick=\"User_AdminAction()\">Dashboard</button>`;\n\n /// TASK 3\n function showLoggedUser() {\n Utils_DeleteAllWithClass('nav-user');\n document.querySelector('nav.nav .nav-user-info').innerHTML += `\n ${localStorage.getItem(\"username\").toLowerCase() == 'admin' ? adminButtonHTML : ''}\n <button class=\"btn nav-user\" onclick=\"User_LogoutAction()\">Logout</button>\n <span class=\"nav-user\">${localStorage.getItem(\"username\")}</span>\n `;\n if (User_Flag_showLastLogin) {\n let message = `Salut, te-ai logat azi pentru prima oara`;\n const loginDate = new Date(JSON.parse(UserData.second_last_login));\n const day = (\"0\" + loginDate.getDate()).slice(-2);\n console.log(\"DAY: \" + day);\n const month = (\"0\" + loginDate.getMonth()).slice(-2);\n const year = loginDate.getFullYear();\n const hour = (\"0\" + loginDate.getHours()).slice(-2);\n const minutes = (\"0\" + loginDate.getMinutes()).slice(-2);\n const seconds = (\"0\" + loginDate.getSeconds()).slice(-2);\n if (UserData.nr_visits > 1)\n message = `Salut, ${UserData.username}, ultima oara ai intrat de pe ip-ul ${UserData.second_last_ip} \\\n in ziua ${day}.${month}.${year} la ora ${hour}:${minutes}:${seconds}. \n Ai vizitat site-ul de ${UserData.nr_visits} ori`;\n Home_showLastLogin(message);\n\n User_Flag_showLastLogin = false;\n }\n }\n\n function setGuest() {\n Utils_DeleteAllWithClass('nav-user');\n localStorage.removeItem(\"token\");\n localStorage.setItem(\"username\", \"Guest\");\n localStorage.setItem(\"isAdmin\", \"false\");\n showLogin();\n }\n\n /// TASK 3\n /// check validity of token and set username\n if (localStorage.getItem(\"token\") === null) {\n setGuest();\n }\n else if (localStorage.getItem(\"token\").length < 1) {\n setGuest();\n }\n else {\n Prom_TestToken(localStorage.getItem(\"token\"))\n .then(resp => {\n localStorage.setItem(\"username\", resp.data.user_data.username);\n const adminString = (resp.data.user_data.username.toLowerCase() == \"admin\" ? \"true\" : \"false\");\n localStorage.setItem(\"isAdmin\", adminString);\n UserData = resp.data.user_data;\n showLoggedUser();\n }).catch(bad => {\n setGuest();\n })\n }\n}", "title": "" }, { "docid": "3f792bd9c32edd0b469496254517c128", "score": "0.59892696", "text": "function getUserData() {\n let storageResponse = localStorage.getItem(\"userData\");\n let userData = JSON.parse(storageResponse);\n return userData;\n }", "title": "" }, { "docid": "212e656ee65ae5f478250a0969182d13", "score": "0.5972905", "text": "function initval(){\n user = JSON.parse(localStorage.getItem('user'));\n $('#homename').append(user.first_name + ' ' + user.last_name);\n $('#detname').append(user.first_name + ' ' + user.last_name);\n $('#detbirth').append( new Date(user.birth_date).toLocaleString());\n $('#detemail').append(user.email);\n }", "title": "" }, { "docid": "fe2ed64e3578bb4d60a181914e3f441a", "score": "0.59607947", "text": "function getCurrentUser() {\n var current = localStorage.getItem(\"User\");\n return current ? JSON.parse(current) : {};\n }", "title": "" }, { "docid": "6e432587309317f45037818ab6d64d59", "score": "0.5957922", "text": "static getUser() {\n return JSON.parse(localStorage.getItem('userInfo'));\n }", "title": "" }, { "docid": "8bb0b243bf2d97ad4dbaf3309293f358", "score": "0.5949286", "text": "function fetchUserDetails() {\n var lsUser = localStorage.getItem('wceUser');\n var user = JSON.parse(lsUser);\n\n if (isRealValue(user)){\n $('#user_event_first_name').val(user.first);\n $('#user_event_last_name').val(user.last);\n $('#user_event_user_email').val(user.email);\n }\n}", "title": "" }, { "docid": "71058c67eba61c4036c3340f5ca23313", "score": "0.5937066", "text": "function setupLocalStroageAfterLogin() {\n Object(_comms_js__WEBPACK_IMPORTED_MODULE_0__[\"fetchJson\"])(\"/user/profile\").then(function (user) {\n localStorage.setItem(\"auth\", true);\n localStorage.setItem(\"navbar_title\", user.firstName);\n });\n} // Function to reset the localStorage", "title": "" }, { "docid": "6b5bec65a4b49af3a9e13786ae24ae7d", "score": "0.5925792", "text": "function loadUserCredentials() {\n var token = window.localStorage.getItem(LOCAL_TOKEN_KEY);\n if (token) {\n useCredentials(token);\n }\n }", "title": "" }, { "docid": "6b5bec65a4b49af3a9e13786ae24ae7d", "score": "0.5925792", "text": "function loadUserCredentials() {\n var token = window.localStorage.getItem(LOCAL_TOKEN_KEY);\n if (token) {\n useCredentials(token);\n }\n }", "title": "" }, { "docid": "53bcaea936323a55e003494626dcc878", "score": "0.59240335", "text": "function initializeUsers() {\n username = localStorage.getItem('staySignedInAs')\n if (username !== null) {\n useDefaults = localStorage.getItem('Defaults Used?' + username + 'Kixley@65810')\n useDefaults = parseBool(useDefaults)\n if (useDefaults === false) {\n useDefaultDiff = localStorage.getItem('Default Diff Used?' + username + 'Kixley@65810')\n useDefaultDiff = parseBool(useDefaultDiff)\n useDefaultClass = localStorage.getItem('Default Class Used?' + username + 'Kixley@65810')\n useDefaultClass = parseBool(useDefaultClass)\n }\n }\n}", "title": "" }, { "docid": "d3cf82f1e6de41c9ae49e3748bcac2e3", "score": "0.5922362", "text": "loadData() {\r\n\t\t// load the current tracker type data from localStorage\r\n\t\tlet currentData = localStorage.getItem( this.type );\r\n\r\n\t\t// parse it into an object if it exists\r\n\t\tif ( currentData ) {\r\n\t\t\tthis.data = JSON.parse(currentData);\r\n\t\t} else {\r\n\t\t\tthis.data = {};\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "0b593e1ccccf2f51869a53769b628c42", "score": "0.59156764", "text": "function loadLoginPage() {\n // array of objects for now, 1 for owner and 2 for coworker\n var userlogins = [ {name: \"owner\", email: \"[email protected]\", phone: \"123456789\", password: \"1234\", usertype: 1, properties: []}, \n {name: \"coworker\", email: \"[email protected]\", phone: \"123456789\", password: \"5678\", usertype: 2, properties:[]}];\n // add demo properties\n var property1 = {address: \"200 5 St SW\", neighborhood: \"downtown\", squarefeet: \"1500\", parking: false, transit: true, workspaces: []};\n userlogins[0][\"properties\"].push(property1);\n property1 = {address: \"800 bonavista drive\", neighborhood: \"south west\", squarefeet: \"2100\", parking: true, transit: false, workspaces:[]};\n userlogins[0][\"properties\"].push(property1);\n // before storing check if it already exists\n // using localStore to persist data between different pages on same tab\n // will not be required once we use Database\n if (!localStorage[\"logins\"]) {\n localStorage.setItem(\"logins\", JSON.stringify(userlogins))\n }\n localStorage.setItem(\"userindex\", -1);\n}", "title": "" }, { "docid": "536d5a6b08899ada4a2a22a667c686dd", "score": "0.5895381", "text": "function User() {\n\tvar username = \"anonymous\";\n\tvar email = null;\n\tvar api_key = null;\n\tvar auto_share;\n\tvar geoloc;\n\tvar max_article_number;\n\tvar facebook;\n\tvar gplus;\n\tvar twitter;\n\tvar country;\n\tvar city;\n\n\t$(document).bind('deviceready', function(){\n onDeviceReady();\n });\n\n\tif (typeof User.initialized == \"undefined\") {\n\t\t// Save current user in storage.\n\t\tUser.prototype.save = function() {\n\t\t\t$.jStorage.set('current_user', this);\n\t\t};\n\n\t\t// Load current user from storage if exists.\n\t\tUser.prototype.load = function() {\n\n\t\t};\n\n\t\t// Register user distantly using API\n\t\tUser.prototype.register = function(username, mail, password1, password2) {\n\t\t\tvar data = JSON.stringify({\n\t\t\t\t\"username\": username,\n\t\t\t\t\"email\": mail,\n\t\t\t\t\"password1\": password1,\n\t\t\t\t\"password2\": password2\n\t\t\t});\n\n\t\t\t$.ajax({\n\t\t\t\turl: api_paths.register,\n\t\t\t\ttype: 'POST',\n\t\t\t\tcontentType: 'application/json',\n\t\t\t\tdata: data,\n\t\t\t\tdataType: 'json',\n\t\t\t\tprocessData: false,\n\t\t\t\tsuccess: function(json) {\n\t\t\t\t\tconsole.info(json);\n\t\t\t\t\tif(json.success) {\n\t\t\t\t\t\t//add username, api_key and other infos to current object User\n\t\t\t\t\t\tapp.current_user.id = json.member.id;\n\t\t\t\t\t\tapp.current_user.username = username;\n\t\t\t\t\t\tapp.current_user.api_key = json.member.api_key;\n\t\t\t\t\t\tapp.current_user.auto_share = json.member.autoShare;\n\t\t\t\t\t\tapp.current_user.geoloc = json.member.geoloc;\n\t\t\t\t\t\tapp.current_user.facebook = json.member.facebook;\n\t\t\t\t\t\tapp.current_user.gplus = json.member.gplus;\n\t\t\t\t\t\tapp.current_user.twitter = json.member.twitter;\n\t\t\t\t\t\tapp.current_user.country = json.member.pays;\n\t\t\t\t\t\tapp.current_user.city = json.member.ville;\n\n\t\t\t\t\t\tapp.current_user.save();\n\t\t\t\t\t\t\n\t\t\t\t\t\t$(\"#member_register\").popup( \"open\", {});\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\tif(json.reason == \"username is empty\") {\n\t\t\t\t\t\t\t$(\"#username_null\").popup( \"open\", {});\n\t\t\t\t\t\t}else if(json.reason == \"email is empty\"){\n\t\t\t\t\t\t\t$(\"#email_null\").popup( \"open\", {});\n\t\t\t\t\t\t}else if(json.reason == \"user already exist\"){\n\t\t\t\t\t\t\t$(\"#error_user\").popup( \"open\", {});\n\t\t\t\t\t\t}else if(json.reason == \"email already in use\"){\n\t\t\t\t\t\t\t$(\"#error_email\").popup( \"open\", {});\n\t\t\t\t\t\t}else if(json.reason == \"passwords don't match\"){\n\t\t\t\t\t\t\t$(\"#error_password\").popup( \"open\", {});\n\t\t\t\t\t\t}else if(json.reason == \"passwords don't exist\"){\n\t\t\t\t\t\t\t$(\"#password_null\").popup( \"open\", {});\n\t\t\t\t\t\t}else if(json.reason == \"email empty\"){\n\t\t\t\t\t\t\t$(\"#email_null\").popup( \"open\", {});\n\t\t\t\t\t\t}else if(json.reason == \"email not valid\"){\n\t\t\t\t\t\t\t$(\"#email_not_valid\").popup( \"open\", {});\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\terror: function(ts) {\n\t\t\t\t\tconsole.debug(ts.responseText);\n\t\t\t\t}\n\t\t\t});\n\t\t};\n\n\t\t// login with username or email (login) and password distantly via API.\n\t\t// @todo : ensure security\n\t\tUser.prototype.login = function(login, pwd) {\n\t\t\tvar data = JSON.stringify({\n\t\t\t\t\"username\": ''+login, // login is either username or email // @todo : make login\n\t\t\t\t\"password\": ''+pwd\n\t\t\t});\n\n\t\t\t$.ajax({\n\t\t\t\turl: api_paths.login,\n\t\t\t\ttype: \"POST\",\n\t\t\t\tcontentType: 'application/json',\n\t\t\t\tdata: data,\n\t\t\t\tdataType: 'json',\n\t\t\t\tsuccess: function(json) {\n\t\t\t\t\tconsole.info(json);\n\t\t\t\t\tif(json.success) {\n\t\t\t\t\t\t// @ todo : Translate \"pays\" and \"ville\".\n\t\t\t\t\t\t// add username, api_key and other infos to current object User\n\t\t\t\t\t\tapp.current_user.id = json.member.id;\n\t\t\t\t\t\tapp.current_user.username = username;\n\t\t\t\t\t\tapp.current_user.api_key = json.member.api_key;\n\t\t\t\t\t\tapp.current_user.auto_share = json.member.autoShare;\n\t\t\t\t\t\tapp.current_user.geoloc = json.member.geoloc;\n\t\t\t\t\t\tapp.current_user.max_article_number = json.member.maxArticle;\n\t\t\t\t\t\tapp.current_user.facebook = json.member.facebook;\n\t\t\t\t\t\tapp.current_user.gplus = json.member.gplus;\n\t\t\t\t\t\tapp.current_user.twitter = json.member.twitter;\n\t\t\t\t\t\tapp.current_user.country = json.member.pays;\n\t\t\t\t\t\tapp.current_user.city = json.member.ville;\n\n\t\t\t\t\t\tapp.current_user.save();\n\n\t\t\t\t\t\twindow.location.replace(\"settings.html\");\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\terror: function(ts) {\n\t\t\t\t\t//console.debug(ts.responseText);\n\t\t\t\t\tvar error = jQuery.parseJSON(ts.responseText);\n\t\t\t\t\tif(error.reason == \"incorrect\") {\n\t\t\t\t\t\t$(\"#error_identification\").popup( \"open\", {});\n\t\t\t\t\t}\n\n\t\t\t\t\t$(\"#login_user\").val('');\n\t\t\t\t\t$(\"#login_password\").val('');\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t//@todo : reload settings ?\n\t\t};\n\n\t\t// Performs logout and ensure \n\t\tUser.prototype.logout = function() {\n\t\t\t// get the api_key of the current user\n\t\t\tapi_key = $.jStorage.get('current_user').api_key;\n\t\t\t// logout the current user\n\t\t\t$.get(api_paths.logout, {'api_key': api_key, 'format': 'json'});\n\t\t\t// flush info about the current user\n\t\t\t$.jStorage.deleteKey('current_user');\n\t\t\t// Update current_user\n\t\t\tapp.current_user = new User();\n\t\t\twindow.location.replace(\"login.html\");\n\t\t};\n\t\t\n\t\tUser.prototype.is_logged_in = function() {\n\t\t\treturn (this.api_key == null);\n\t\t};\n\n\t\t// @move listeners in app since the current_user is there.\n\t\tUser.prototype.setListeners = function() {\n\t\t\t$('#loginForm').submit(function() {\n\t\t\t\tvar user = $(\"#login_user\").val();\n\t\t\t\tvar password = $(\"#login_password\").val();\n\t\t\t\tapp.current_user.login(user, password);\n\t\t\t\treturn false;\n\t\t\t});\n\n\t\t\t$('#registerForm').submit(function() {\n\t\t\t\tvar user = $(\"#register_user\").val();\n\t\t\t\tvar mail = $(\"#register_mail\").val();\n\t\t\t\tvar password1 = $(\"#register_password\").val();\n\t\t\t\tvar password2 = $(\"#register_password_confirm\").val();\n\t\t\t\tapp.current_user.register(user, mail, password1, password2);\n\t\t\t\treturn false;\n\t\t\t});\n\n\t\t}\n\n\t\tUser.initialized = true;\n\t}\n\n\tthis.setListeners();\n}", "title": "" }, { "docid": "0c53b897ad7cae6f47a44c8655679132", "score": "0.5890526", "text": "function saveUserData() {\n localStorage.setItem('locallyStored', JSON.stringify(userData))\n}", "title": "" }, { "docid": "93a1646cd78ec0bde959eb61b0d5c5aa", "score": "0.5887946", "text": "function getDataForDashboardProfile() {\r\n var response = null;\r\n dataFactoryCall(\"services/user/fetch\", \"GET\", \"userID=\" + selectedUserID, function (returndata) {\r\n response = returndata;\r\n if (response.status) {\r\n parseDashboardProfileDataAndLoad(response, \"ajax\");\r\n } else {\r\n $(\"#profile-detail-loading\").hide();\r\n $(\"#profile-detail-loaded\").fadeIn();\r\n }\r\n });\r\n }", "title": "" }, { "docid": "aae0eda21afe1301e89202799b0ebf1a", "score": "0.5875974", "text": "async init() {\n this.isLoading = false;\n this.user = this.inputs.getOption('user');\n this.username = this.inputs.getOption('username');\n\n if (!this.user) {\n let user = this.cachedUser('username', this.username);\n if (this.username && user) {\n this.user = user;\n } else {\n this.isLoading = true;\n let { record: user } = await this.usersService.getByUserName(this.username);\n this.user = user;\n this.isLoading = false;\n UserCard.loadedUsers.push(user);\n\n this.dc();\n }\n } else {\n if (!this.cachedUser('id', this.user.id)) {\n UserCard.loadedUsers.push(this.user);\n }\n }\n }", "title": "" }, { "docid": "3e8e0e5e20b58aef9657ded2ef0e40c7", "score": "0.5870766", "text": "function localStorageUser() {\n if (localStorage.getItem('user')) {\n const localStorageUser = JSON.parse(localStorage.getItem('user'));\n return localStorageUser;\n } else {\n return {};\n }\n }", "title": "" }, { "docid": "e4f8199e5ab5efa9a003410bffcfc9ee", "score": "0.5849917", "text": "function loadPage() {\n token = sessionStorage.getItem('token');\n user_id = sessionStorage.getItem('id');\n utype = sessionStorage.getItem('utype');\n if (token) displayUser();\n else displayDefault();\n}", "title": "" }, { "docid": "99a87cb143dfb62bf2a5409cee905bfe", "score": "0.58497936", "text": "getLocalStorageUser() {\n return JSON.parse(localStorage.getItem('user'))\n }", "title": "" }, { "docid": "f8a2d036aa0abe8f3ecebd782eaa70ec", "score": "0.5846176", "text": "function populateUserData() {\n var user = firebaseData.getUser();\n if (user) {\n // we are logged in\n displayAdminData(user);\n firebaseData.getUserData(user, \n function(data) {\n // we have the user data here, set the data correctly\n if (firebaseData.isUserAdmin(data)) {\n // we are a coach\n displayAdminData(user);\n }\n else {\n // we are not an admin user - hide it all\n hideAdminData(user);\n }\n },\n function(error) {\n // this is the failure to get the data, do our best I suppose\n hideAdminData(user);\n console.log(\"Failed to get the firestore user data for \" + user);\n });\n }\n else {\n // we are not logged in, ask the user to log in\n hideAdminData(user);\n }\n}", "title": "" }, { "docid": "684055ad4b085b94182c62b6f8d313d6", "score": "0.5833215", "text": "function User() {\n this.dataContentObject = $('#current-user').data('user');\n this.$tilesContainer = $('#tiles-container');\n this.tileClasses = \"col-lg-3 col-md-4 col-sm-6 col-xs-12 tile\";\n\n}", "title": "" }, { "docid": "ea04b0a64dc35d85fbc79d8d21d17a6b", "score": "0.5832778", "text": "function loadLogin(){\n let loginData = localStorage.getItem('_loginData');\n\n if(!loginData)\n return null;\n\n //localStorage.removeItem('_loginData');\n\n loginData = JSON.parse(loginData);\n return loginData;\n }", "title": "" }, { "docid": "7fcca22e0bbb750e2b85e63db461477f", "score": "0.5830481", "text": "function User()\n{\n var that = this;\n var dataStorageKey = \"currentUser\";\n\n var saveGuestUser = function () {\n function guid() {\n function s4() {\n return Math.floor((1 + Math.random()) * 0x10000)\n .toString(16)\n .substring(1);\n }\n return s4() + s4() + '-' + s4() + '-' + s4() + '-' + s4() + '-' + s4() + s4() + s4();\n }\n\n var guestUser = {\n userId: guid(),\n name: null,\n domain: null\n }\n that.save(guestUser);\n return localStorage.getItem(dataStorageKey);\n };\n\n this.currentUser = function () {\n var currentUser = localStorage.getItem(dataStorageKey);\n if (currentUser == null) {\n var currentUser = saveGuestUser();\n }\n return JSON.parse(currentUser);\n }\n this.login = function (email) {\n var name = email.split('@')[0]\n var currentUser = {\n userId: email,\n firstName: name.split('.')[0],\n lastName: name.split('.')[1],\n domain: email.split('@')[1]\n }\n that.save(currentUser);\n }\n\n this.save = function (data) {\n localStorage.setItem(dataStorageKey, JSON.stringify(data));\n };\n}", "title": "" }, { "docid": "b81cf0555aa03a92fb3073fe4947f332", "score": "0.58266145", "text": "async function userloading() {\n await downloadFromServer();\n User = await backend.getItem(`user`) || []; \n console.log(User);\n}", "title": "" }, { "docid": "a267ba4b24c309691401cf8f1ba22f24", "score": "0.582436", "text": "init () {\n if (localStorage.users === undefined || !localStorage.encrypted) {\n // Set default user\n let defaultUser = 'DeekshithShetty'\n let defaultUserSalt = genSalt(defaultUser)\n let defaultUserPass = hashSync('Hydra@12345', defaultUserSalt)\n\n users = {\n [defaultUser]: hashSync(defaultUserPass, salt)\n }\n\n localStorage.users = JSON.stringify(users)\n localStorage.encrypted = true\n } else {\n users = JSON.parse(localStorage.users)\n }\n }", "title": "" }, { "docid": "7c5d00b29ee2bf3a6aaa8d2a2554d688", "score": "0.5808053", "text": "function loadProfileData() {\n\ttry {\n\t\tvar userData = localStorage.getItem(\"profile\");\n\t\tvar user = JSON.parse(userData);\n\t\tif(user != undefined || user != null) {\n\t\t\tdocument.getElementById(\"profileName\").value = user.name;\n\t\t\tdocument.getElementById(\"userAge\").value = user.age;\n\t\t\tdocument.getElementById(\"userPhone\").value = user.phoneno;\n\t\t\tdocument.getElementById(\"userMail\").value = user.email;\n\t\t\tdocument.getElementById(\"userAddress\").value = user.address;\n\t\t\tdocument.getElementById(\"userImg\").value = user.imagefile;\n\t\t\t}\n\t} catch (e) {\n\t\tconsole.log(e);\n\t}\t\n}", "title": "" }, { "docid": "8ff394f125e1e0fc7d12b8c5ec3225a7", "score": "0.580753", "text": "function getData() {\n function getHashParams() {\n var hashParams = {};\n var e, r = /([^&;=]+)=?([^&;]*)/g,\n q = window.location.hash.substring(1);\n while ( e = r.exec(q)) {\n hashParams[e[1]] = decodeURIComponent(e[2]);\n }\n return hashParams;\n };\n\n var params = getHashParams();\n var key = params.status;\n var err = params.error;\n var data = JSON.parse(params.user);\n user_playlists = data.playlists;\n if(key == \"fail\") {\n alert(\"User data not loaded. Please relogin\");\n };\n}", "title": "" }, { "docid": "1d37fc93ac76c3d553a2584fcb9037ba", "score": "0.5789808", "text": "function getUserData () {\n\t\n\t$.ajax({\n\t\ttype: 'POST',\n\t\turl: 'Project',\n\t\tdata: {\n\t\t\t'domain': 'project',\n\t\t\t'action': 'getUserInfo'\n\t\t}, complete: function (data) {\n\t\t\tif(data.responseJSON) {\n\t\t\t user = data.responseJSON;\n\t\t\t console.log(\"USER = \", user);\n\t\t\t if(user.permission.canAccessAdminPage == false) hideAdminContent();\t \n\t\t getUsers();\t\t \n\t\t\t\t\n\t\t\t} else {\n\t\t\t\tconsole.log(\"GetUserData() RESPONSE = \",data);\n\t\t\t\talert('Server Failure!');\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t});\n}", "title": "" }, { "docid": "f4534fc0047f649699c6257d3fcbb30b", "score": "0.57770056", "text": "function clearUserData()\n {\n userData = userDataDefault;\n window.localStorage.setItem(localStorageName, JSON.stringify(userData));\n }", "title": "" }, { "docid": "5e945ffa2371563644e24f94f2e299ed", "score": "0.57751113", "text": "function loadDashboard(data){\n //set global database\n database = data;\n //hide the login\n screen.remove(login);\n //append the dashboard object to the main screen\n screen.append(dashboard);\n //populate the tables list\n mysqlAssistant.listTables(function(callback){\n //add tables to dashboard list\n \tdashTables.setItems(callback);\n \t//render the dashboard\n screen.render();\n });\n}", "title": "" }, { "docid": "1382f23ea701a2fe76e1132131e4626f", "score": "0.57689327", "text": "function getLocalStorage() {\n return JSON.parse(localStorage.getItem(\"user\")) \n}", "title": "" }, { "docid": "90157bb488afa36d4a23845e67e23c5c", "score": "0.5760018", "text": "getCurrentUser() {\n return JSON.parse(localStorage.getItem('user'));\n }", "title": "" }, { "docid": "fb079b02f61cc06e15ebaf172515e66c", "score": "0.5744448", "text": "function getUserDashboard(user) {\n // create ajax GET call\n $.ajax({\n type: \"GET\",\n url: \"/api/entries\",\n dataType: \"json\",\n contentType: \"application/json\",\n headers: {\n Authorization: `Bearer ${jwt}`\n }\n })\n .done(function(result) {\n console.log(result);\n // call display user dashboard function with result.entries as agrument\n displayUserDashboard(result.entries);\n })\n .fail(function(err) {\n console.err(err);\n });\n}", "title": "" }, { "docid": "d53e2d4ab0cef950f6c295917a6aee95", "score": "0.57383555", "text": "static async loadCurUser() {\n\n var user_result = await APISocket.get(`user/me?populate=teams&extension=true`)\n\n // User is on one team: normalize values that are stored on the TeamUser object\n if (user_result.teams.length === 1) {\n\n // Properties defined on the TeamUser that need to be normalized back into actual user properties\n var team_user = await APISocket.get(`team/${user_result.teams[0].id}/users/${user_result.id}`)\n for (let [key, value] of Object.entries(team_user)) {\n user_result[key] = value;\n }\n\n }\n\n // Rename/remap fields\n user_result.extension_secret = (\" \" + user_result.extensionSecret).slice(1);\n delete user_result.extensionSecret;\n\n return user_result;\n\n }", "title": "" }, { "docid": "21ff4c6629b334f70fd14d98232af021", "score": "0.5734342", "text": "function pullUserData(){\n var xmlHttp = null;\n xmlHttp = new XMLHttpRequest();\n xmlHttp.onreadystatechange = function() {\n if (xmlHttp.responseText && xmlHttp.status == 200 && xmlHttp.readyState == 4) {\n var obj = jQuery.parseJSON( xmlHttp.responseText );\n $.each(obj, function() {\n FirstName[FirstName.length] = this['firstName'];\n LastName[LastName.length] = this['lastName'];\n if(h[this['_id']] != null){\n ID[ID.length] = h[this['_id']];\n }else{\n ID[ID.length] = \"Not Found\";\n }\n \n });\n }\n };\n xmlHttp.open(\"GET\", \"https://mydesigncompany.herokuapp.com/users\", true);\n //xmlHttp.open(\"GET\", \"https://infinite-stream-2919.herokuapp.com/users\", true);\n xmlHttp.send(null);\n }", "title": "" }, { "docid": "4fca7834780d0d35c92d04454adda764", "score": "0.5712195", "text": "function GetBYTUser(authHttp) {\n this.authHttp = authHttp;\n this.userProfile = JSON.parse(localStorage.getItem('profile'));\n }", "title": "" }, { "docid": "8108066d0c07ca51252d190b3accbd28", "score": "0.5711485", "text": "update() {\n localStorage.setItem('user', JSON.stringify(user))\n\n dataStore.set('config', user.config)\n dataStore.set('palette', user.palette)\n dataStore.set('projectPalette', user.projectPalette)\n dataStore.set('log', user.log)\n\n Log.refresh()\n }", "title": "" }, { "docid": "2b8718021383f65fa18a04f57c25b831", "score": "0.5702205", "text": "loadUsers() {\n this.users = this.store.getValue('user-settings');\n }", "title": "" }, { "docid": "4b3a968e2ca1e836951ba19d90dd7582", "score": "0.5696554", "text": "function GetDataFromLocalStorage(){\n /*if (storageObject.getItem(\"username\") != null) {\n $(\".usernameval\").val(storageObject.username);\n }\n if (storageObject.getItem(\"password\") != null) {\n $(\".passwordval\").val(storageObject.password);\n }*/\n}", "title": "" }, { "docid": "ff2563678e13dc2355a559fe959965da", "score": "0.56948304", "text": "function getTheCurrUser(){\r\n let xhttp = new XMLHttpRequest();\r\n xhttp.onreadystatechange = function() {\r\n if (this.readyState == 4 && this.status == 200) {\r\n thisUser = JSON.parse(this.responseText);\r\n setup();\r\n\r\n }\r\n };\r\n\r\n xhttp.open(\"GET\", \"/thisUser\", true);\r\n xhttp.send();\r\n}", "title": "" }, { "docid": "ff2563678e13dc2355a559fe959965da", "score": "0.56948304", "text": "function getTheCurrUser(){\r\n let xhttp = new XMLHttpRequest();\r\n xhttp.onreadystatechange = function() {\r\n if (this.readyState == 4 && this.status == 200) {\r\n thisUser = JSON.parse(this.responseText);\r\n setup();\r\n\r\n }\r\n };\r\n\r\n xhttp.open(\"GET\", \"/thisUser\", true);\r\n xhttp.send();\r\n}", "title": "" }, { "docid": "221c3c983cf09f1fcb31fa6ba07b47d5", "score": "0.56946206", "text": "function fillAuthData() {\n var authData = localStorageService.get('authorizationData');\n if (authData) {\n authentication.isAuth = true;\n authentication.userName = authData.userName;\n authentication.roleId = authData.roleId;\n }\n }", "title": "" }, { "docid": "8d32dcb94cf390da0ca147d8c00ab87b", "score": "0.5691766", "text": "function init() {\n //get stored scores from localStorage\n var storedObj = JSON.parse(localStorage.getItem(\"userObj\"));\n\n //if info retrieved from local, update local array\n if (storedObj !== null) {\n inputObj = Object.assign(storedObj, inputObj);\n } else {\n return;\n } \n \n}", "title": "" }, { "docid": "56a6ef7158bbd03d7929c1ca9a5ad24a", "score": "0.5683922", "text": "getMainUser(){\n console.log('getMainUser - is running')\n $.ajax({\n method: \"GET\",\n url: `https://randomuser.me/api/?results=0`,\n success:(mainuser)=>{\n const mainuser1 = mainuser.results\n this.data[\"mainuser\"] = mainuser1;\n },\n error: function(xhr, text, error){\n console.log(text)\n }\n }); \n\n }", "title": "" }, { "docid": "b8144ef559b58e69a1bf106676a4b57e", "score": "0.56778187", "text": "function loadAppsData(localStorageDataName) {\n let mainSurveyExtData = JSON.parse(window.localStorage.getItem(localStorageDataName));\n if (mainSurveyExtData !== null) {\n authuserID = mainSurveyExtData.authuserID;\n SSOGlobal = mainSurveyExtData.SSOGlobal;\n TPGlobal = mainSurveyExtData.TPGlobal;\n oldestAppGlobal = mainSurveyExtData.oldestAppGlobal;\n newestAppGlobal = mainSurveyExtData.newestAppGlobal;\n randomAppGlobal = mainSurveyExtData.randomAppGlobal;\n }\n}", "title": "" }, { "docid": "a9599c51c20801acb54829a98af2b84f", "score": "0.56763804", "text": "function init(){\n if(localStorage.userRecord){\n userData = JSON.parse(localStorage.userRecord);\n }\n var mode = localStorage.getItem(\"Theme\");\n if(mode == \"light\"){\n lightMode();\n } else{\n darkMode();\n }\n}", "title": "" }, { "docid": "c34c16e376c31c1731eac14c44aa0cc1", "score": "0.5674696", "text": "static loadSession() {\n if (typeof window === 'undefined') return\n idCacheByUserId = parseJSON(window.sessionStorage.idCacheByUserId, {})\n itemCacheByUserId = parseJSON(window.sessionStorage.itemCacheByUserId, {})\n userCache = parseJSON(window.sessionStorage.userCache, {})\n\n }", "title": "" }, { "docid": "3f6eee2f7ed86cf1c6c747cec6174241", "score": "0.56663966", "text": "function loadUser() {\n checkAdmin(username);\n hideElement(\"#btn-invite-form\");\n if (isAdmin) {\n // showElement(\"#btn-block-user\");\n showElement(\"#btn-delete-user\");\n showElement(\"#btn-ban-user\");\n showElement(\"#btn-set-admin\");\n hideElement(\"#btn-report-user\");\n showElement(\".incoming-message .btn-group\");\n if (chatroomType === \"Private\")\n showElement(\"#btn-invite-form\");\n } else {\n // hideElement(\"#btn-block-user\");\n hideElement(\"#btn-delete-user\");\n hideElement(\"#btn-ban-user\");\n hideElement(\"#btn-set-admin\");\n showElement(\"#btn-report-user\");\n hideElement(\".incoming-message .btn-group\");\n }\n}", "title": "" }, { "docid": "f1612ec9b911ca2c4dd9d7ac6f99442e", "score": "0.5663336", "text": "tryLoadAuthData() {\n const userType = this.getUserTypeByName(this.localStorage.getItem('userType'));\n if (userType) {\n this.userType.next(userType);\n }\n this.getAuthDataFromStorage();\n if (this.activatedRoute) {\n this.getAuthDataFromParams();\n }\n // if (this.authData) {\n // this.validateToken();\n // }\n }", "title": "" }, { "docid": "c4ce7377d789bae5c5fa05049a69d4f0", "score": "0.5657515", "text": "function ___loadUserData() {\n\n\t// load items and colors somehow\n\n\tcolors=new Array(colorReset[0],colorReset[1],colorReset[2],colorReset[3]);\n\n}", "title": "" }, { "docid": "7265474f52e2dc03ad94bd5a1f0b7434", "score": "0.565351", "text": "static initUserLevelMaster (store) {\n if (TRHMasterData.masterData === null) return\n TRHMasterData.UserLevel = _(TRHMasterData.masterData.LevelMaster)\n .split('\\n')\n .map((line) => {\n let arr = line.split(',')\n let obj = {}\n obj['level'] = _.toInteger(arr[0])\n obj['exp'] = _.toInteger(arr[1])\n obj['maxResource'] = _.toInteger(arr[2])\n obj['money'] = _.toInteger(arr[3])\n return obj\n })\n .keyBy('level')\n .value()\n return localforage.setItem('UserLevelMaster', TRHMasterData.UserLevel)\n .then(() => {\n console.log(TRHMasterData.UserLevel)\n store.commit('loadData', {\n key: 'UserLevel',\n loaded: true\n })\n })\n .catch((err) => {\n console.log('err', err)\n store.commit('loadData', {\n key: 'UserLevel',\n loaded: false\n })\n })\n }", "title": "" }, { "docid": "d3376b87397277e6cdc8a9347dbc6572", "score": "0.5648258", "text": "function init(){\r\n getConfig(function(config){\r\n loadUserData(config.username, 5);\r\n });\r\n}", "title": "" }, { "docid": "bdeb2d989a5e45d074ca4240baf7b8d7", "score": "0.5647353", "text": "function getUserAndSavedUsers(id){\n$.get(\"/api/user_data\").then(function(data) {\n loggedInUser = data\n followerBits.empty()\n getFollowerBits()\n });\n}", "title": "" }, { "docid": "de59963c8d57fd3b8f7d90229d39c125", "score": "0.56410253", "text": "function initFromUser(user) {\n // get latest user data\n user.fetch({\n success: function(user) {\n // Set username\n $('#loggedInUser').html(user.get('username'));\n\n // Populate availability status\n if (!user.get('available')) {\n $('input[name=available][value=no]').attr('checked',true);\n }\n\n // Generate a VoIP capability token\n Parse.Cloud.run('generateToken',null, {\n success: function(token) {\n // Configure our soft phone with a capability token which allows\n // for incoming phone calls.\n Twilio.Device.setup(token,{ debug: false, rtc: true });\n },\n error: function(message) {\n alert('token generation failed: ' + message);\n }\n });\n },\n error: function() {\n alert('problem fetching latest user data');\n }\n });\n }", "title": "" }, { "docid": "60357b61c809d2314e49b95d59385dc3", "score": "0.56407714", "text": "function currentUser (){\n return JSON.parse(window.sessionStorage.getItem(\"user_info\"));\n}", "title": "" }, { "docid": "4439f312864c796066661a0ce7e04a83", "score": "0.56394345", "text": "function getLocalUserRecords() {\n const users = localStorage.getItem(\"users\");\n if (users) {\n return JSON.parse(users);\n } else {\n return {};\n }\n}", "title": "" }, { "docid": "bcf37f3a60a987d4de477ce818cd4e23", "score": "0.56177634", "text": "static storeUser(user) {\n localStorage.setItem('userInfo', user);\n }", "title": "" }, { "docid": "6064232f494767cc5e64794e7a579536", "score": "0.5613792", "text": "function getUserID(){\n\tuser = new Object();\n\tsessionData = {};\n $.ajax({\n type: 'POST',\n async: false,\n url: 'api/index.php/getSessionInfo',\n success: function(data){\n sessionData = JSON.parse(data);\n }\n });\n user.UserID = sessionData.UserID;\n}", "title": "" }, { "docid": "5eebd29bc205c874cfdd053dcda0fbb9", "score": "0.5605467", "text": "function populateUserData() {\r\n\tvar emailId = sessionStorage.getItem(\"jctEmail\");\r\n\tvar userProf = Spine.Model.sub();\r\n\tuserProf.configure(\"/admin/facilitatorAccount/populateExistingFacilitatorData\", \"facilitatorEmail\");\r\n\tuserProf.extend( Spine.Model.Ajax );\r\n\t//Populate the model with data to transfer\r\n\tvar modelPopulator = new userProf({ \r\n\t\tfacilitatorEmail: sessionStorage.getItem(\"jctEmail\")\r\n\t});\r\n\tmodelPopulator.save(); //POST\r\n\tuserProf.bind(\"ajaxError\", function(record, xhr, settings, error) {\r\n\t\talertify.alert(\"Unable to connect to the server.\");\r\n\t});\r\n\tuserProf.bind(\"ajaxSuccess\", function(record, xhr, settings, error) {\r\n\t\tvar jsonStr = JSON.stringify(xhr);\r\n\t\tvar obj = jQuery.parseJSON(jsonStr);\r\n\t\tvar statusCode = obj.statusCode;\r\n\t\tif(statusCode == 200) {\t\t\t\r\n\t\t\tshowUserData(obj.existingUserDataList);\r\n\t\t} else if(statusCode == 500) {\r\n\t\t\t//Show error message\r\n\t\t}\r\n\t});\r\n}", "title": "" }, { "docid": "1bf18359990fb8744cc497f656ebd7fd", "score": "0.55995744", "text": "function getUserData() {\n\n // Retrieve all keys and values from application storage, including public app config. Set the values for select, input and textarea elements on a page in a callback\n\n EcwidApp.getAppStorage(function (allValues) {\n setValuesForPage(allValues);\n checkTestModeValue(); // Check if test mode is \n });\n\n}", "title": "" }, { "docid": "7e733424bdae223d77f6a5cedbd672db", "score": "0.55866295", "text": "function userQuery (){\n console.log('userQuery initialized')\n // uses the windows url and sets it to a variable and passes it down to the api GET request\n let currentUrl = window.location.origin;\n\n // api GET request\n $.ajax ({url: `${currentUrl}/api/user`, method: \"GET\"})\n\n .done(function(userData){\n \n // sets the html in friend_head3 to the users name\n $(\"#friend_head3\").html(`<h3>${userData[0].name}</h3>`);\n \n // sets the JSON object to userDataVariable so that its globaly accesable\n userDataVariable = userData[0];\n\n });\n}", "title": "" }, { "docid": "669ba060e338e588fa9ee9c792935fdf", "score": "0.55808026", "text": "function loadCookieSession() {\n let CookieUser = readCookie(\"Session\");\n if (CookieUser != null) {\n User = JSON.parse(CookieUser);\n ChangeDOMBySession(User);\n } else {\n ChangeDOMBySession(User);\n }\n}", "title": "" }, { "docid": "5eb1430745dc8b5f5a39702d186af973", "score": "0.5578432", "text": "getUser() {\n const user = localStorage.getItem(\"user\") || null\n return user ? JSON.parse(user) : null\n }", "title": "" }, { "docid": "2a683e1b70c9fe6800dab3b9e0d45b20", "score": "0.55767566", "text": "function fillAuthData() {\n var authData = localStorageService.get('authorizationData');\n if (authData) {\n authentication.isAuth = true;\n authentication.userName = authData.userName;\n authentication.roleId = authData.roleId;\n aclService.getAllAccessControlListAndPermissions('name').then(function (result) {\n authentication.accessControlList = result.accessControlList;\n authentication.domainObjectList = [];\n for (var i = 0; i < authentication.accessControlList.length; i++) {\n authentication.domainObjectList.push(authentication.accessControlList[i].domainObject.description);\n }\n\n $rootScope.currentUser = authentication;\n });\n }\n }", "title": "" }, { "docid": "93e0094cbcfc63bf27e9a1dbe389c5e5", "score": "0.5574243", "text": "function LoadUserInfo()\r\n{\r\n\tuser_name=globalStorage['ytfm.ashishdubey.info'].getItem(\"user\");\t\r\n\tsession_key=globalStorage['ytfm.ashishdubey.info'].getItem(\"key\");\r\n\tif(user_name=='') disp_text=\"[None]\";\r\n\telse disp_text=user_name;\r\n\tdocument.getElementById(\"ytfm-userlabel\").setAttribute(\"value\",disp_text);\r\n}", "title": "" }, { "docid": "d04a6bc627b24aad554371d8123fbc7f", "score": "0.5566856", "text": "function setUser() {\n user = JSON.parse(getCookie(\"user\"));\n}", "title": "" } ]
eed32805eb449186843b6ecacbc6f85a
Fixes selection issues on Gecko where the caret can be placed between two inline elements like a|b this fix will lean the caret right into the closest inline element.
[ { "docid": "4bde8cdd18b655960cf5ef5ee9327482", "score": "0.6460936", "text": "function normalizeSelection() {\n\t\t\t// Normalize selection for example <b>a</b><i>|a</i> becomes <b>a|</b><i>a</i> except for Ctrl+A since it selects everything\n\t\t\teditor.on('keyup focusin', function(e) {\n\t\t\t\tif (e.keyCode != 65 || !VK.metaKeyPressed(e)) {\n\t\t\t\t\tselection.normalize();\n\t\t\t\t}\n\t\t\t});\n\t\t}", "title": "" } ]
[ { "docid": "695245a38c8ae4d79d4b786fa1941055", "score": "0.67919564", "text": "function fixCaretSelectionOfDocumentElementOnIe() {\n var doc = dom.doc, body = doc.body, started, startRng, htmlElm;\n\n // Return range from point or null if it failed\n function rngFromPoint(x, y) {\n var rng = body.createTextRange();\n\n try {\n rng.moveToPoint(x, y);\n } catch (ex) {\n // IE sometimes throws and exception, so lets just ignore it\n rng = null;\n }\n\n return rng;\n }\n\n // Fires while the selection is changing\n function selectionChange(e) {\n var pointRng;\n\n // Check if the button is down or not\n if (e.button) {\n // Create range from mouse position\n pointRng = rngFromPoint(e.x, e.y);\n\n if (pointRng) {\n // Check if pointRange is before/after selection then change the endPoint\n if (pointRng.compareEndPoints('StartToStart', startRng) > 0) {\n pointRng.setEndPoint('StartToStart', startRng);\n } else {\n pointRng.setEndPoint('EndToEnd', startRng);\n }\n\n pointRng.select();\n }\n } else {\n endSelection();\n }\n }\n\n // Removes listeners\n function endSelection() {\n var rng = doc.selection.createRange();\n\n // If the range is collapsed then use the last start range\n if (startRng && !rng.item && rng.compareEndPoints('StartToEnd', rng) === 0) {\n startRng.select();\n }\n\n dom.unbind(doc, 'mouseup', endSelection);\n dom.unbind(doc, 'mousemove', selectionChange);\n startRng = started = 0;\n }\n\n // Make HTML element unselectable since we are going to handle selection by hand\n doc.documentElement.unselectable = true;\n\n // Detect when user selects outside BODY\n dom.bind(doc, 'mousedown contextmenu', function (e) {\n if (e.target.nodeName === 'HTML') {\n if (started) {\n endSelection();\n }\n\n // Detect vertical scrollbar, since IE will fire a mousedown on the scrollbar and have target set as HTML\n htmlElm = doc.documentElement;\n if (htmlElm.scrollHeight > htmlElm.clientHeight) {\n return;\n }\n\n started = 1;\n // Setup start position\n startRng = rngFromPoint(e.x, e.y);\n if (startRng) {\n // Listen for selection change events\n dom.bind(doc, 'mouseup', endSelection);\n dom.bind(doc, 'mousemove', selectionChange);\n\n dom.getRoot().focus();\n startRng.select();\n }\n }\n });\n }", "title": "" }, { "docid": "40beaeb25e8900c5bbaa3e2f996991f4", "score": "0.65134996", "text": "function fixCaretSelectionOfDocumentElementOnIe() {\n\t\t\tvar doc = dom.doc, body = doc.body, started, startRng, htmlElm;\n\n\t\t\t// Return range from point or null if it failed\n\t\t\tfunction rngFromPoint(x, y) {\n\t\t\t\tvar rng = body.createTextRange();\n\n\t\t\t\ttry {\n\t\t\t\t\trng.moveToPoint(x, y);\n\t\t\t\t} catch (ex) {\n\t\t\t\t\t// IE sometimes throws and exception, so lets just ignore it\n\t\t\t\t\trng = null;\n\t\t\t\t}\n\n\t\t\t\treturn rng;\n\t\t\t}\n\n\t\t\t// Fires while the selection is changing\n\t\t\tfunction 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}\n\n\t\t\t// Removes listeners\n\t\t\tfunction endSelection() {\n\t\t\t\tvar rng = doc.selection.createRange();\n\n\t\t\t\t// If the range is collapsed then use the last start range\n\t\t\t\tif (startRng && !rng.item && rng.compareEndPoints('StartToEnd', rng) === 0) {\n\t\t\t\t\tstartRng.select();\n\t\t\t\t}\n\n\t\t\t\tdom.unbind(doc, 'mouseup', endSelection);\n\t\t\t\tdom.unbind(doc, 'mousemove', selectionChange);\n\t\t\t\tstartRng = started = 0;\n\t\t\t}\n\n\t\t\t// Make HTML element unselectable since we are going to handle selection by hand\n\t\t\tdoc.documentElement.unselectable = true;\n\n\t\t\t// Detect when user selects outside BODY\n\t\t\tdom.bind(doc, 'mousedown contextmenu', function(e) {\n\t\t\t\tif (e.target.nodeName === 'HTML') {\n\t\t\t\t\tif (started) {\n\t\t\t\t\t\tendSelection();\n\t\t\t\t\t}\n\n\t\t\t\t\t// Detect vertical scrollbar, since IE will fire a mousedown on the scrollbar and have target set as HTML\n\t\t\t\t\thtmlElm = doc.documentElement;\n\t\t\t\t\tif (htmlElm.scrollHeight > htmlElm.clientHeight) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tstarted = 1;\n\t\t\t\t\t// Setup start position\n\t\t\t\t\tstartRng = rngFromPoint(e.x, e.y);\n\t\t\t\t\tif (startRng) {\n\t\t\t\t\t\t// Listen for selection change events\n\t\t\t\t\t\tdom.bind(doc, 'mouseup', endSelection);\n\t\t\t\t\t\tdom.bind(doc, 'mousemove', selectionChange);\n\n\t\t\t\t\t\tdom.getRoot().focus();\n\t\t\t\t\t\tstartRng.select();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}", "title": "" }, { "docid": "df0a77a42011f526c856448590d8746b", "score": "0.65134996", "text": "function fixCaretSelectionOfDocumentElementOnIe() {\n\t\t\tvar doc = dom.doc, body = doc.body, started, startRng, htmlElm;\n\n\t\t\t// Return range from point or null if it failed\n\t\t\tfunction rngFromPoint(x, y) {\n\t\t\t\tvar rng = body.createTextRange();\n\n\t\t\t\ttry {\n\t\t\t\t\trng.moveToPoint(x, y);\n\t\t\t\t} catch (ex) {\n\t\t\t\t\t// IE sometimes throws and exception, so lets just ignore it\n\t\t\t\t\trng = null;\n\t\t\t\t}\n\n\t\t\t\treturn rng;\n\t\t\t}\n\n\t\t\t// Fires while the selection is changing\n\t\t\tfunction 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}\n\n\t\t\t// Removes listeners\n\t\t\tfunction endSelection() {\n\t\t\t\tvar rng = doc.selection.createRange();\n\n\t\t\t\t// If the range is collapsed then use the last start range\n\t\t\t\tif (startRng && !rng.item && rng.compareEndPoints('StartToEnd', rng) === 0) {\n\t\t\t\t\tstartRng.select();\n\t\t\t\t}\n\n\t\t\t\tdom.unbind(doc, 'mouseup', endSelection);\n\t\t\t\tdom.unbind(doc, 'mousemove', selectionChange);\n\t\t\t\tstartRng = started = 0;\n\t\t\t}\n\n\t\t\t// Make HTML element unselectable since we are going to handle selection by hand\n\t\t\tdoc.documentElement.unselectable = true;\n\n\t\t\t// Detect when user selects outside BODY\n\t\t\tdom.bind(doc, 'mousedown contextmenu', function(e) {\n\t\t\t\tif (e.target.nodeName === 'HTML') {\n\t\t\t\t\tif (started) {\n\t\t\t\t\t\tendSelection();\n\t\t\t\t\t}\n\n\t\t\t\t\t// Detect vertical scrollbar, since IE will fire a mousedown on the scrollbar and have target set as HTML\n\t\t\t\t\thtmlElm = doc.documentElement;\n\t\t\t\t\tif (htmlElm.scrollHeight > htmlElm.clientHeight) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tstarted = 1;\n\t\t\t\t\t// Setup start position\n\t\t\t\t\tstartRng = rngFromPoint(e.x, e.y);\n\t\t\t\t\tif (startRng) {\n\t\t\t\t\t\t// Listen for selection change events\n\t\t\t\t\t\tdom.bind(doc, 'mouseup', endSelection);\n\t\t\t\t\t\tdom.bind(doc, 'mousemove', selectionChange);\n\n\t\t\t\t\t\tdom.win.focus();\n\t\t\t\t\t\tstartRng.select();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}", "title": "" }, { "docid": "df0a77a42011f526c856448590d8746b", "score": "0.65134996", "text": "function fixCaretSelectionOfDocumentElementOnIe() {\n\t\t\tvar doc = dom.doc, body = doc.body, started, startRng, htmlElm;\n\n\t\t\t// Return range from point or null if it failed\n\t\t\tfunction rngFromPoint(x, y) {\n\t\t\t\tvar rng = body.createTextRange();\n\n\t\t\t\ttry {\n\t\t\t\t\trng.moveToPoint(x, y);\n\t\t\t\t} catch (ex) {\n\t\t\t\t\t// IE sometimes throws and exception, so lets just ignore it\n\t\t\t\t\trng = null;\n\t\t\t\t}\n\n\t\t\t\treturn rng;\n\t\t\t}\n\n\t\t\t// Fires while the selection is changing\n\t\t\tfunction 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}\n\n\t\t\t// Removes listeners\n\t\t\tfunction endSelection() {\n\t\t\t\tvar rng = doc.selection.createRange();\n\n\t\t\t\t// If the range is collapsed then use the last start range\n\t\t\t\tif (startRng && !rng.item && rng.compareEndPoints('StartToEnd', rng) === 0) {\n\t\t\t\t\tstartRng.select();\n\t\t\t\t}\n\n\t\t\t\tdom.unbind(doc, 'mouseup', endSelection);\n\t\t\t\tdom.unbind(doc, 'mousemove', selectionChange);\n\t\t\t\tstartRng = started = 0;\n\t\t\t}\n\n\t\t\t// Make HTML element unselectable since we are going to handle selection by hand\n\t\t\tdoc.documentElement.unselectable = true;\n\n\t\t\t// Detect when user selects outside BODY\n\t\t\tdom.bind(doc, 'mousedown contextmenu', function(e) {\n\t\t\t\tif (e.target.nodeName === 'HTML') {\n\t\t\t\t\tif (started) {\n\t\t\t\t\t\tendSelection();\n\t\t\t\t\t}\n\n\t\t\t\t\t// Detect vertical scrollbar, since IE will fire a mousedown on the scrollbar and have target set as HTML\n\t\t\t\t\thtmlElm = doc.documentElement;\n\t\t\t\t\tif (htmlElm.scrollHeight > htmlElm.clientHeight) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tstarted = 1;\n\t\t\t\t\t// Setup start position\n\t\t\t\t\tstartRng = rngFromPoint(e.x, e.y);\n\t\t\t\t\tif (startRng) {\n\t\t\t\t\t\t// Listen for selection change events\n\t\t\t\t\t\tdom.bind(doc, 'mouseup', endSelection);\n\t\t\t\t\t\tdom.bind(doc, 'mousemove', selectionChange);\n\n\t\t\t\t\t\tdom.win.focus();\n\t\t\t\t\t\tstartRng.select();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}", "title": "" }, { "docid": "40beaeb25e8900c5bbaa3e2f996991f4", "score": "0.65134996", "text": "function fixCaretSelectionOfDocumentElementOnIe() {\n\t\t\tvar doc = dom.doc, body = doc.body, started, startRng, htmlElm;\n\n\t\t\t// Return range from point or null if it failed\n\t\t\tfunction rngFromPoint(x, y) {\n\t\t\t\tvar rng = body.createTextRange();\n\n\t\t\t\ttry {\n\t\t\t\t\trng.moveToPoint(x, y);\n\t\t\t\t} catch (ex) {\n\t\t\t\t\t// IE sometimes throws and exception, so lets just ignore it\n\t\t\t\t\trng = null;\n\t\t\t\t}\n\n\t\t\t\treturn rng;\n\t\t\t}\n\n\t\t\t// Fires while the selection is changing\n\t\t\tfunction 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}\n\n\t\t\t// Removes listeners\n\t\t\tfunction endSelection() {\n\t\t\t\tvar rng = doc.selection.createRange();\n\n\t\t\t\t// If the range is collapsed then use the last start range\n\t\t\t\tif (startRng && !rng.item && rng.compareEndPoints('StartToEnd', rng) === 0) {\n\t\t\t\t\tstartRng.select();\n\t\t\t\t}\n\n\t\t\t\tdom.unbind(doc, 'mouseup', endSelection);\n\t\t\t\tdom.unbind(doc, 'mousemove', selectionChange);\n\t\t\t\tstartRng = started = 0;\n\t\t\t}\n\n\t\t\t// Make HTML element unselectable since we are going to handle selection by hand\n\t\t\tdoc.documentElement.unselectable = true;\n\n\t\t\t// Detect when user selects outside BODY\n\t\t\tdom.bind(doc, 'mousedown contextmenu', function(e) {\n\t\t\t\tif (e.target.nodeName === 'HTML') {\n\t\t\t\t\tif (started) {\n\t\t\t\t\t\tendSelection();\n\t\t\t\t\t}\n\n\t\t\t\t\t// Detect vertical scrollbar, since IE will fire a mousedown on the scrollbar and have target set as HTML\n\t\t\t\t\thtmlElm = doc.documentElement;\n\t\t\t\t\tif (htmlElm.scrollHeight > htmlElm.clientHeight) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tstarted = 1;\n\t\t\t\t\t// Setup start position\n\t\t\t\t\tstartRng = rngFromPoint(e.x, e.y);\n\t\t\t\t\tif (startRng) {\n\t\t\t\t\t\t// Listen for selection change events\n\t\t\t\t\t\tdom.bind(doc, 'mouseup', endSelection);\n\t\t\t\t\t\tdom.bind(doc, 'mousemove', selectionChange);\n\n\t\t\t\t\t\tdom.getRoot().focus();\n\t\t\t\t\t\tstartRng.select();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}", "title": "" }, { "docid": "40beaeb25e8900c5bbaa3e2f996991f4", "score": "0.65134996", "text": "function fixCaretSelectionOfDocumentElementOnIe() {\n\t\t\tvar doc = dom.doc, body = doc.body, started, startRng, htmlElm;\n\n\t\t\t// Return range from point or null if it failed\n\t\t\tfunction rngFromPoint(x, y) {\n\t\t\t\tvar rng = body.createTextRange();\n\n\t\t\t\ttry {\n\t\t\t\t\trng.moveToPoint(x, y);\n\t\t\t\t} catch (ex) {\n\t\t\t\t\t// IE sometimes throws and exception, so lets just ignore it\n\t\t\t\t\trng = null;\n\t\t\t\t}\n\n\t\t\t\treturn rng;\n\t\t\t}\n\n\t\t\t// Fires while the selection is changing\n\t\t\tfunction 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}\n\n\t\t\t// Removes listeners\n\t\t\tfunction endSelection() {\n\t\t\t\tvar rng = doc.selection.createRange();\n\n\t\t\t\t// If the range is collapsed then use the last start range\n\t\t\t\tif (startRng && !rng.item && rng.compareEndPoints('StartToEnd', rng) === 0) {\n\t\t\t\t\tstartRng.select();\n\t\t\t\t}\n\n\t\t\t\tdom.unbind(doc, 'mouseup', endSelection);\n\t\t\t\tdom.unbind(doc, 'mousemove', selectionChange);\n\t\t\t\tstartRng = started = 0;\n\t\t\t}\n\n\t\t\t// Make HTML element unselectable since we are going to handle selection by hand\n\t\t\tdoc.documentElement.unselectable = true;\n\n\t\t\t// Detect when user selects outside BODY\n\t\t\tdom.bind(doc, 'mousedown contextmenu', function(e) {\n\t\t\t\tif (e.target.nodeName === 'HTML') {\n\t\t\t\t\tif (started) {\n\t\t\t\t\t\tendSelection();\n\t\t\t\t\t}\n\n\t\t\t\t\t// Detect vertical scrollbar, since IE will fire a mousedown on the scrollbar and have target set as HTML\n\t\t\t\t\thtmlElm = doc.documentElement;\n\t\t\t\t\tif (htmlElm.scrollHeight > htmlElm.clientHeight) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tstarted = 1;\n\t\t\t\t\t// Setup start position\n\t\t\t\t\tstartRng = rngFromPoint(e.x, e.y);\n\t\t\t\t\tif (startRng) {\n\t\t\t\t\t\t// Listen for selection change events\n\t\t\t\t\t\tdom.bind(doc, 'mouseup', endSelection);\n\t\t\t\t\t\tdom.bind(doc, 'mousemove', selectionChange);\n\n\t\t\t\t\t\tdom.getRoot().focus();\n\t\t\t\t\t\tstartRng.select();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}", "title": "" }, { "docid": "df0a77a42011f526c856448590d8746b", "score": "0.65134996", "text": "function fixCaretSelectionOfDocumentElementOnIe() {\n\t\t\tvar doc = dom.doc, body = doc.body, started, startRng, htmlElm;\n\n\t\t\t// Return range from point or null if it failed\n\t\t\tfunction rngFromPoint(x, y) {\n\t\t\t\tvar rng = body.createTextRange();\n\n\t\t\t\ttry {\n\t\t\t\t\trng.moveToPoint(x, y);\n\t\t\t\t} catch (ex) {\n\t\t\t\t\t// IE sometimes throws and exception, so lets just ignore it\n\t\t\t\t\trng = null;\n\t\t\t\t}\n\n\t\t\t\treturn rng;\n\t\t\t}\n\n\t\t\t// Fires while the selection is changing\n\t\t\tfunction 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}\n\n\t\t\t// Removes listeners\n\t\t\tfunction endSelection() {\n\t\t\t\tvar rng = doc.selection.createRange();\n\n\t\t\t\t// If the range is collapsed then use the last start range\n\t\t\t\tif (startRng && !rng.item && rng.compareEndPoints('StartToEnd', rng) === 0) {\n\t\t\t\t\tstartRng.select();\n\t\t\t\t}\n\n\t\t\t\tdom.unbind(doc, 'mouseup', endSelection);\n\t\t\t\tdom.unbind(doc, 'mousemove', selectionChange);\n\t\t\t\tstartRng = started = 0;\n\t\t\t}\n\n\t\t\t// Make HTML element unselectable since we are going to handle selection by hand\n\t\t\tdoc.documentElement.unselectable = true;\n\n\t\t\t// Detect when user selects outside BODY\n\t\t\tdom.bind(doc, 'mousedown contextmenu', function(e) {\n\t\t\t\tif (e.target.nodeName === 'HTML') {\n\t\t\t\t\tif (started) {\n\t\t\t\t\t\tendSelection();\n\t\t\t\t\t}\n\n\t\t\t\t\t// Detect vertical scrollbar, since IE will fire a mousedown on the scrollbar and have target set as HTML\n\t\t\t\t\thtmlElm = doc.documentElement;\n\t\t\t\t\tif (htmlElm.scrollHeight > htmlElm.clientHeight) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tstarted = 1;\n\t\t\t\t\t// Setup start position\n\t\t\t\t\tstartRng = rngFromPoint(e.x, e.y);\n\t\t\t\t\tif (startRng) {\n\t\t\t\t\t\t// Listen for selection change events\n\t\t\t\t\t\tdom.bind(doc, 'mouseup', endSelection);\n\t\t\t\t\t\tdom.bind(doc, 'mousemove', selectionChange);\n\n\t\t\t\t\t\tdom.win.focus();\n\t\t\t\t\t\tstartRng.select();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}", "title": "" }, { "docid": "40beaeb25e8900c5bbaa3e2f996991f4", "score": "0.65134996", "text": "function fixCaretSelectionOfDocumentElementOnIe() {\n\t\t\tvar doc = dom.doc, body = doc.body, started, startRng, htmlElm;\n\n\t\t\t// Return range from point or null if it failed\n\t\t\tfunction rngFromPoint(x, y) {\n\t\t\t\tvar rng = body.createTextRange();\n\n\t\t\t\ttry {\n\t\t\t\t\trng.moveToPoint(x, y);\n\t\t\t\t} catch (ex) {\n\t\t\t\t\t// IE sometimes throws and exception, so lets just ignore it\n\t\t\t\t\trng = null;\n\t\t\t\t}\n\n\t\t\t\treturn rng;\n\t\t\t}\n\n\t\t\t// Fires while the selection is changing\n\t\t\tfunction 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}\n\n\t\t\t// Removes listeners\n\t\t\tfunction endSelection() {\n\t\t\t\tvar rng = doc.selection.createRange();\n\n\t\t\t\t// If the range is collapsed then use the last start range\n\t\t\t\tif (startRng && !rng.item && rng.compareEndPoints('StartToEnd', rng) === 0) {\n\t\t\t\t\tstartRng.select();\n\t\t\t\t}\n\n\t\t\t\tdom.unbind(doc, 'mouseup', endSelection);\n\t\t\t\tdom.unbind(doc, 'mousemove', selectionChange);\n\t\t\t\tstartRng = started = 0;\n\t\t\t}\n\n\t\t\t// Make HTML element unselectable since we are going to handle selection by hand\n\t\t\tdoc.documentElement.unselectable = true;\n\n\t\t\t// Detect when user selects outside BODY\n\t\t\tdom.bind(doc, 'mousedown contextmenu', function(e) {\n\t\t\t\tif (e.target.nodeName === 'HTML') {\n\t\t\t\t\tif (started) {\n\t\t\t\t\t\tendSelection();\n\t\t\t\t\t}\n\n\t\t\t\t\t// Detect vertical scrollbar, since IE will fire a mousedown on the scrollbar and have target set as HTML\n\t\t\t\t\thtmlElm = doc.documentElement;\n\t\t\t\t\tif (htmlElm.scrollHeight > htmlElm.clientHeight) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tstarted = 1;\n\t\t\t\t\t// Setup start position\n\t\t\t\t\tstartRng = rngFromPoint(e.x, e.y);\n\t\t\t\t\tif (startRng) {\n\t\t\t\t\t\t// Listen for selection change events\n\t\t\t\t\t\tdom.bind(doc, 'mouseup', endSelection);\n\t\t\t\t\t\tdom.bind(doc, 'mousemove', selectionChange);\n\n\t\t\t\t\t\tdom.getRoot().focus();\n\t\t\t\t\t\tstartRng.select();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}", "title": "" }, { "docid": "c3b7b43458bf8ce5d76c9567159ce7bd", "score": "0.64828044", "text": "function normalizeSelection() {\n\t\t\t// Normalize selection for example <b>a</b><i>|a</i> becomes <b>a|</b><i>a</i> except for Ctrl+A since it selects everything\n\t\t\teditor.on('keyup focusin mouseup', function(e) {\n\t\t\t\tif (e.keyCode != 65 || !VK.metaKeyPressed(e)) {\n\t\t\t\t\tselection.normalize();\n\t\t\t\t}\n\t\t\t}, true);\n\t\t}", "title": "" }, { "docid": "c3b7b43458bf8ce5d76c9567159ce7bd", "score": "0.64828044", "text": "function normalizeSelection() {\n\t\t\t// Normalize selection for example <b>a</b><i>|a</i> becomes <b>a|</b><i>a</i> except for Ctrl+A since it selects everything\n\t\t\teditor.on('keyup focusin mouseup', function(e) {\n\t\t\t\tif (e.keyCode != 65 || !VK.metaKeyPressed(e)) {\n\t\t\t\t\tselection.normalize();\n\t\t\t\t}\n\t\t\t}, true);\n\t\t}", "title": "" }, { "docid": "c3b7b43458bf8ce5d76c9567159ce7bd", "score": "0.64828044", "text": "function normalizeSelection() {\n\t\t\t// Normalize selection for example <b>a</b><i>|a</i> becomes <b>a|</b><i>a</i> except for Ctrl+A since it selects everything\n\t\t\teditor.on('keyup focusin mouseup', function(e) {\n\t\t\t\tif (e.keyCode != 65 || !VK.metaKeyPressed(e)) {\n\t\t\t\t\tselection.normalize();\n\t\t\t\t}\n\t\t\t}, true);\n\t\t}", "title": "" }, { "docid": "c3b7b43458bf8ce5d76c9567159ce7bd", "score": "0.64828044", "text": "function normalizeSelection() {\n\t\t\t// Normalize selection for example <b>a</b><i>|a</i> becomes <b>a|</b><i>a</i> except for Ctrl+A since it selects everything\n\t\t\teditor.on('keyup focusin mouseup', function(e) {\n\t\t\t\tif (e.keyCode != 65 || !VK.metaKeyPressed(e)) {\n\t\t\t\t\tselection.normalize();\n\t\t\t\t}\n\t\t\t}, true);\n\t\t}", "title": "" }, { "docid": "80a23032fb0558767373ea364d003139", "score": "0.6378544", "text": "function adjustSelectionToVisibleSelection() {\n\t\t\t\tfunction findSelectionEnd(start, end) {\n\t\t\t\t\tvar walker = new TreeWalker(end);\n\t\t\t\t\tfor (node = walker.prev2(); node; node = walker.prev2()) {\n\t\t\t\t\t\tif (node.nodeType == 3 && node.data.length > 0) {\n\t\t\t\t\t\t\treturn node;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (node.childNodes.length > 1 || node == start || node.tagName == 'BR') {\n\t\t\t\t\t\t\treturn node;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Adjust selection so that a end container with a end offset of zero is not included in the selection\n\t\t\t\t// as this isn't visible to the user.\n\t\t\t\tvar rng = ed.selection.getRng();\n\t\t\t\tvar start = rng.startContainer;\n\t\t\t\tvar end = rng.endContainer;\n\n\t\t\t\tif (start != end && rng.endOffset === 0) {\n\t\t\t\t\tvar newEnd = findSelectionEnd(start, end);\n\t\t\t\t\tvar endOffset = newEnd.nodeType == 3 ? newEnd.data.length : newEnd.childNodes.length;\n\n\t\t\t\t\trng.setEnd(newEnd, endOffset);\n\t\t\t\t}\n\n\t\t\t\treturn rng;\n\t\t\t}", "title": "" }, { "docid": "80a23032fb0558767373ea364d003139", "score": "0.6378544", "text": "function adjustSelectionToVisibleSelection() {\n\t\t\t\tfunction findSelectionEnd(start, end) {\n\t\t\t\t\tvar walker = new TreeWalker(end);\n\t\t\t\t\tfor (node = walker.prev2(); node; node = walker.prev2()) {\n\t\t\t\t\t\tif (node.nodeType == 3 && node.data.length > 0) {\n\t\t\t\t\t\t\treturn node;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (node.childNodes.length > 1 || node == start || node.tagName == 'BR') {\n\t\t\t\t\t\t\treturn node;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Adjust selection so that a end container with a end offset of zero is not included in the selection\n\t\t\t\t// as this isn't visible to the user.\n\t\t\t\tvar rng = ed.selection.getRng();\n\t\t\t\tvar start = rng.startContainer;\n\t\t\t\tvar end = rng.endContainer;\n\n\t\t\t\tif (start != end && rng.endOffset === 0) {\n\t\t\t\t\tvar newEnd = findSelectionEnd(start, end);\n\t\t\t\t\tvar endOffset = newEnd.nodeType == 3 ? newEnd.data.length : newEnd.childNodes.length;\n\n\t\t\t\t\trng.setEnd(newEnd, endOffset);\n\t\t\t\t}\n\n\t\t\t\treturn rng;\n\t\t\t}", "title": "" }, { "docid": "80a23032fb0558767373ea364d003139", "score": "0.6378544", "text": "function adjustSelectionToVisibleSelection() {\n\t\t\t\tfunction findSelectionEnd(start, end) {\n\t\t\t\t\tvar walker = new TreeWalker(end);\n\t\t\t\t\tfor (node = walker.prev2(); node; node = walker.prev2()) {\n\t\t\t\t\t\tif (node.nodeType == 3 && node.data.length > 0) {\n\t\t\t\t\t\t\treturn node;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (node.childNodes.length > 1 || node == start || node.tagName == 'BR') {\n\t\t\t\t\t\t\treturn node;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Adjust selection so that a end container with a end offset of zero is not included in the selection\n\t\t\t\t// as this isn't visible to the user.\n\t\t\t\tvar rng = ed.selection.getRng();\n\t\t\t\tvar start = rng.startContainer;\n\t\t\t\tvar end = rng.endContainer;\n\n\t\t\t\tif (start != end && rng.endOffset === 0) {\n\t\t\t\t\tvar newEnd = findSelectionEnd(start, end);\n\t\t\t\t\tvar endOffset = newEnd.nodeType == 3 ? newEnd.data.length : newEnd.childNodes.length;\n\n\t\t\t\t\trng.setEnd(newEnd, endOffset);\n\t\t\t\t}\n\n\t\t\t\treturn rng;\n\t\t\t}", "title": "" }, { "docid": "91b85c643670aa1a374dda71f5993257", "score": "0.63126224", "text": "updateSelection(force = false, fromPointer = false) {\n if (!(fromPointer || this.mayControlSelection()))\n return;\n let primary = this.view.state.selection.primary;\n // FIXME need to handle the case where the selection falls inside a block range\n let anchor = this.domAtPos(primary.anchor);\n let head = this.domAtPos(primary.head);\n let domSel = getSelection$1(this.root);\n // If the selection is already here, or in an equivalent position, don't touch it\n if (force || !domSel.focusNode ||\n (browser.gecko && primary.empty && nextToUneditable(domSel.focusNode, domSel.focusOffset)) ||\n !isEquivalentPosition(anchor.node, anchor.offset, domSel.anchorNode, domSel.anchorOffset) ||\n !isEquivalentPosition(head.node, head.offset, domSel.focusNode, domSel.focusOffset)) {\n this.view.observer.ignore(() => {\n if (primary.empty) {\n // Work around https://bugzilla.mozilla.org/show_bug.cgi?id=1612076\n if (browser.gecko) {\n let nextTo = nextToUneditable(anchor.node, anchor.offset);\n if (nextTo && nextTo != (1 /* Before */ | 2 /* After */)) {\n let text = nearbyTextNode(anchor.node, anchor.offset, nextTo == 1 /* Before */ ? 1 : -1);\n if (text)\n anchor = new DOMPos(text, nextTo == 1 /* Before */ ? 0 : text.nodeValue.length);\n }\n }\n domSel.collapse(anchor.node, anchor.offset);\n if (primary.bidiLevel != null && domSel.cursorBidiLevel != null)\n domSel.cursorBidiLevel = primary.bidiLevel;\n }\n else if (domSel.extend) {\n // Selection.extend can be used to create an 'inverted' selection\n // (one where the focus is before the anchor), but not all\n // browsers support it yet.\n domSel.collapse(anchor.node, anchor.offset);\n domSel.extend(head.node, head.offset);\n }\n else {\n // Primitive (IE) way\n let range = document.createRange();\n if (primary.anchor > primary.head)\n [anchor, head] = [head, anchor];\n range.setEnd(head.node, head.offset);\n range.setStart(anchor.node, anchor.offset);\n domSel.removeAllRanges();\n domSel.addRange(range);\n }\n });\n }\n this.impreciseAnchor = anchor.precise ? null : new DOMPos(domSel.anchorNode, domSel.anchorOffset);\n this.impreciseHead = head.precise ? null : new DOMPos(domSel.focusNode, domSel.focusOffset);\n }", "title": "" }, { "docid": "64dcc93661212f41abbf7922fc371715", "score": "0.6294442", "text": "function normalizeSelection() {\n // Normalize selection for example <b>a</b><i>|a</i> becomes <b>a|</b><i>a</i> except for Ctrl+A since it selects everything\n editor.on('keyup focusin mouseup', function (e) {\n if (e.keyCode != 65 || !VK.metaKeyPressed(e)) {\n // We can't normalize on non collapsed ranges on keyboard events since that would cause\n // issues with moving the selection over empty paragraphs. See #TINY-1130\n if (e.type !== 'keyup' || editor.selection.isCollapsed()) {\n selection.normalize();\n }\n }\n }, true);\n }", "title": "" }, { "docid": "8feb800d67ef724336a1bead6a26cd7a", "score": "0.6186383", "text": "function fixCaret(styleElement)\n{\n var doc = styleElement.ownerDocument || styleElement.document; //get the document\n var win = doc.defaultView || doc.parentWindow; //get the window\n\n var range = doc.createRange(); //create new range\n var selection = win.getSelection(); //get the current range\n\n //set the caret to the end of the element\n range.setStart(styleElement, styleElement.textContent.length);\n range.collapse(true);\n selection.removeAllRanges();\n selection.addRange(range);\n\n debug.info(\"caret moved\");\n}", "title": "" }, { "docid": "8204692a6b500d0b767e2eaf8b91064b", "score": "0.6177943", "text": "function dwscripts_fixUpSelection(dom, bLeaveHeadSelection, bCollapseParagraphs)\n{\n\ttry{\n\t\tvar retVal = null;\n\t\t\n\t\tdom = (dom == null) ? dw.getDocumentDOM() : dom;\n\t\t\n\t\tvar offsets = null;\n\t\t\n\t\tif (!bLeaveHeadSelection && !dwscripts.selectionIsInBody(dom))\n\t\t{\n\t\toffsets = dwscripts.setCursorToEndOfBody(dom);\n\t\t}\n\t\telse\n\t\t{\n\t\toffsets = dwscripts.getBalancedSelection(dom, bCollapseParagraphs);\n\t\t}\n\t\t\n\t\tif (offsets)\n\t\t{\n\t\tretVal = dom.documentElement.outerHTML.substring(offsets[0], offsets[1]);\n\t\t}\n\t}\n\tcatch(e)\n\t{\n\t\t//if we can't fix up the selection, just eat the exception at least the edit will go on\n\t}\n\n return retVal;\n}", "title": "" }, { "docid": "ac043288519387443787374c6d077b33", "score": "0.61317384", "text": "function moveToCaretPosition(root) {\n\t\t\t\tvar walker, node, rng, y, viewPort, lastNode = root, tempElm;\n\n\t\t\t\trng = dom.createRng();\n\n\t\t\t\tif (root.hasChildNodes()) {\n\t\t\t\t\twalker = new TreeWalker(root, root);\n\n\t\t\t\t\twhile (node = walker.current()) {\n\t\t\t\t\t\tif (node.nodeType == 3) {\n\t\t\t\t\t\t\trng.setStart(node, 0);\n\t\t\t\t\t\t\trng.setEnd(node, 0);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (nonEmptyElementsMap[node.nodeName.toLowerCase()]) {\n\t\t\t\t\t\t\trng.setStartBefore(node);\n\t\t\t\t\t\t\trng.setEndBefore(node);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlastNode = node;\n\t\t\t\t\t\tnode = walker.next();\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!node) {\n\t\t\t\t\t\trng.setStart(lastNode, 0);\n\t\t\t\t\t\trng.setEnd(lastNode, 0);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (root.nodeName == 'BR') {\n\t\t\t\t\t\tif (root.nextSibling && dom.isBlock(root.nextSibling)) {\n\t\t\t\t\t\t\t// Trick on older IE versions to render the caret before the BR between two lists\n\t\t\t\t\t\t\tif (!documentMode || documentMode < 9) {\n\t\t\t\t\t\t\t\ttempElm = dom.create('br');\n\t\t\t\t\t\t\t\troot.parentNode.insertBefore(tempElm, root);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\trng.setStartBefore(root);\n\t\t\t\t\t\t\trng.setEndBefore(root);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\trng.setStartAfter(root);\n\t\t\t\t\t\t\trng.setEndAfter(root);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\trng.setStart(root, 0);\n\t\t\t\t\t\trng.setEnd(root, 0);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tselection.setRng(rng);\n\n\t\t\t\t// Remove tempElm created for old IE:s\n\t\t\t\tdom.remove(tempElm);\n\n\t\t\t\tviewPort = dom.getViewPort(editor.getWin());\n\n\t\t\t\t// scrollIntoView seems to scroll the parent window in most browsers now including FF 3.0b4 so it's time to stop using it and do it our selfs\n\t\t\t\ty = dom.getPos(root).y;\n\t\t\t\tif (y < viewPort.y || y + 25 > viewPort.y + viewPort.h) {\n\t\t\t\t\teditor.getWin().scrollTo(0, y < viewPort.y ? y : y - viewPort.h + 25); // Needs to be hardcoded to roughly one line of text if a huge text block is broken into two blocks\n\t\t\t\t}\n\t\t\t}", "title": "" }, { "docid": "0c133ac355699306d813c75f1406493f", "score": "0.60594535", "text": "function setCaretPosition() {\n const editableDiv = editor;\n const lastLine = editableDiv.innerHTML.replace(/.*?(<br>)/g, '');\n const selection = window.getSelection();\n selection.collapse(editableDiv.childNodes[editableDiv.childNodes.length - 1], lastLine.length);\n }", "title": "" }, { "docid": "657a6c89daf7969e36761d88cbe6734f", "score": "0.6014116", "text": "function fixPlaceholderSelection() {\n var selection = window.getSelection();\n var anchorNode = selection.anchorNode,\n anchorOffset = selection.anchorOffset;\n\n if (anchorNode.nodeType !== anchorNode.ELEMENT_NODE) {\n return;\n }\n\n var targetNode = anchorNode.childNodes[anchorOffset];\n\n if (!targetNode || targetNode.nodeType !== targetNode.ELEMENT_NODE || !targetNode.getAttribute('data-rich-text-placeholder')) {\n return;\n }\n\n selection.collapseToStart();\n}", "title": "" }, { "docid": "6f0a4b72a2274a678397a6cf8a97701e", "score": "0.5980123", "text": "function resetCursorPos(element) {\n element.selectionStart = 0;\n element.selectionEnd = 0;\n }", "title": "" }, { "docid": "d91ec5f40be719ff380618f870a5bbb6", "score": "0.5976224", "text": "function moveCaretToStart(el) {\n if (typeof el.selectionStart == \"number\") {\n el.selectionStart = el.selectionEnd = 0;\n } else if (typeof el.createTextRange != \"undefined\") {\n el.focus();\n var range = el.createTextRange();\n range.collapse(true);\n range.select();\n }\n}", "title": "" }, { "docid": "6148c4f8b9bd89b2e95b0f49d4ccab78", "score": "0.59383804", "text": "function moveToCaretPosition(root) {\n\t\t\t\tvar walker, node, rng, lastNode = root, tempElm;\n\n\t\t\t\trng = dom.createRng();\n\n\t\t\t\tif (root.hasChildNodes()) {\n\t\t\t\t\twalker = new TreeWalker(root, root);\n\n\t\t\t\t\twhile ((node = walker.current())) {\n\t\t\t\t\t\tif (node.nodeType == 3) {\n\t\t\t\t\t\t\trng.setStart(node, 0);\n\t\t\t\t\t\t\trng.setEnd(node, 0);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (nonEmptyElementsMap[node.nodeName.toLowerCase()]) {\n\t\t\t\t\t\t\trng.setStartBefore(node);\n\t\t\t\t\t\t\trng.setEndBefore(node);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlastNode = node;\n\t\t\t\t\t\tnode = walker.next();\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!node) {\n\t\t\t\t\t\trng.setStart(lastNode, 0);\n\t\t\t\t\t\trng.setEnd(lastNode, 0);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (root.nodeName == 'BR') {\n\t\t\t\t\t\tif (root.nextSibling && dom.isBlock(root.nextSibling)) {\n\t\t\t\t\t\t\t// Trick on older IE versions to render the caret before the BR between two lists\n\t\t\t\t\t\t\tif (!documentMode || documentMode < 9) {\n\t\t\t\t\t\t\t\ttempElm = dom.create('br');\n\t\t\t\t\t\t\t\troot.parentNode.insertBefore(tempElm, root);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\trng.setStartBefore(root);\n\t\t\t\t\t\t\trng.setEndBefore(root);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\trng.setStartAfter(root);\n\t\t\t\t\t\t\trng.setEndAfter(root);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\trng.setStart(root, 0);\n\t\t\t\t\t\trng.setEnd(root, 0);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tselection.setRng(rng);\n\n\t\t\t\t// Remove tempElm created for old IE:s\n\t\t\t\tdom.remove(tempElm);\n\t\t\t\tselection.scrollIntoView(root);\n\t\t\t}", "title": "" }, { "docid": "207568ceeac30f8c87f5a57d9e4ba2f6", "score": "0.59235084", "text": "function resetSelection() {\n selection = window.getSelection();\n startAt = selection.anchorOffset;\n endAt = selection.focusOffset;\n startNode = selection.anchorNode;\n endNode = selection.focusNode;\n }", "title": "" }, { "docid": "25a2b6ed7a458f85b6f8df11ecf995f9", "score": "0.5898343", "text": "updateSelection(force = false, fromPointer = false) {\n if (!(fromPointer || this.mayControlSelection()))\n return;\n let primary = this.view.state.selection.primary;\n // FIXME need to handle the case where the selection falls inside a block range\n let anchor = this.domAtPos(primary.anchor);\n let head = this.domAtPos(primary.head);\n let domSel = getSelection(this.root);\n // If the selection is already here, or in an equivalent position, don't touch it\n if (force || !domSel.focusNode ||\n (browser.gecko && primary.empty && nextToUneditable(domSel.focusNode, domSel.focusOffset)) ||\n !isEquivalentPosition(anchor.node, anchor.offset, domSel.anchorNode, domSel.anchorOffset) ||\n !isEquivalentPosition(head.node, head.offset, domSel.focusNode, domSel.focusOffset)) {\n this.view.observer.ignore(() => {\n if (primary.empty) {\n // Work around https://bugzilla.mozilla.org/show_bug.cgi?id=1612076\n if (browser.gecko) {\n let nextTo = nextToUneditable(anchor.node, anchor.offset);\n if (nextTo && nextTo != (1 /* Before */ | 2 /* After */)) {\n let text = nearbyTextNode(anchor.node, anchor.offset, nextTo == 1 /* Before */ ? 1 : -1);\n if (text)\n anchor = new DOMPos(text, nextTo == 1 /* Before */ ? 0 : text.nodeValue.length);\n }\n }\n domSel.collapse(anchor.node, anchor.offset);\n if (primary.bidiLevel != null && domSel.cursorBidiLevel != null)\n domSel.cursorBidiLevel = primary.bidiLevel;\n }\n else if (domSel.extend) {\n // Selection.extend can be used to create an 'inverted' selection\n // (one where the focus is before the anchor), but not all\n // browsers support it yet.\n domSel.collapse(anchor.node, anchor.offset);\n domSel.extend(head.node, head.offset);\n }\n else {\n // Primitive (IE) way\n let range = document.createRange();\n if (primary.anchor > primary.head)\n [anchor, head] = [head, anchor];\n range.setEnd(head.node, head.offset);\n range.setStart(anchor.node, anchor.offset);\n domSel.removeAllRanges();\n domSel.addRange(range);\n }\n });\n }\n this.impreciseAnchor = anchor.precise ? null : new DOMPos(domSel.anchorNode, domSel.anchorOffset);\n this.impreciseHead = head.precise ? null : new DOMPos(domSel.focusNode, domSel.focusOffset);\n }", "title": "" }, { "docid": "d58af29a81355e66a47dfcddc4d1a7ae", "score": "0.5862905", "text": "function ieCacheSelection(e){\n document.selection && (this.caretPos = document.selection.createRange());\n}", "title": "" }, { "docid": "2112782aaedb4100ea7a81c601fe9150", "score": "0.58042383", "text": "function wrapSelection() {\n const selection = document.getSelection()\n if (!selection || selection.isCollapsed) {\n return\n }\n let phrase = selection.toString()\n if (!/\\S/.test(phrase)) {\n return\n }\n phrase = squish(phrase)\n let anchor = describeSelectionNode(selection.anchorNode, selection.anchorOffset)\n let focus = describeSelectionNode(selection.focusNode, selection.focusOffset)\n const ap = anchor.parent || anchor.node, fp = focus.parent || focus.node\n const parent = commonParent(ap, fp)\n const context = squish(parent.textContent)\n const i = context.indexOf(phrase);\n const before = context.substr(0, i), after = context.substr(i + phrase.length)\n const path = simplestPath(parent), anchorPath = absolutePath(parent, ap), focusPath = absolutePath(parent, fp)\n anchor.path = anchorPath\n focus.path = focusPath\n anchor = trimNode(anchor)\n focus = trimNode(focus)\n return { phrase, before, after, selection: { path, anchor, focus } }\n}", "title": "" }, { "docid": "54ec73eaaed7cb77d32ae56f0ef7d6d4", "score": "0.5800003", "text": "function moveSelectionForward(editorState,maxDistance){var focusOffset,selection=editorState.getSelection(),key=selection.getStartKey(),offset=selection.getStartOffset(),content=editorState.getCurrentContent(),focusKey=key;return maxDistance>content.getBlockForKey(key).getText().length-offset?(focusKey=content.getKeyAfter(key),focusOffset=0):focusOffset=offset+maxDistance,selection.merge({focusKey:focusKey,focusOffset:focusOffset});}", "title": "" }, { "docid": "38b7cb1d250ebb0d6a6da69a23c8b57e", "score": "0.5759083", "text": "function moveToCaretPosition(root) {\n\t\t\t\tvar walker, node, rng, lastNode = root, tempElm;\n\t\t\t\tfunction firstNonWhiteSpaceNodeSibling(node) {\n\t\t\t\t\twhile (node) {\n\t\t\t\t\t\tif (node.nodeType == 1 || (node.nodeType == 3 && node.data && /[\\r\\n\\s]/.test(node.data))) {\n\t\t\t\t\t\t\treturn node;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tnode = node.nextSibling;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (!root) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Old IE versions doesn't properly render blocks with br elements in them\n\t\t\t\t// For example <p><br></p> wont be rendered correctly in a contentEditable area\n\t\t\t\t// until you remove the br producing <p></p>\n\t\t\t\tif (Env.ie && Env.ie < 9 && parentBlock && parentBlock.firstChild) {\n\t\t\t\t\tif (parentBlock.firstChild == parentBlock.lastChild && parentBlock.firstChild.tagName == 'BR') {\n\t\t\t\t\t\tdom.remove(parentBlock.firstChild);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (/^(LI|DT|DD)$/.test(root.nodeName)) {\n\t\t\t\t\tvar firstChild = firstNonWhiteSpaceNodeSibling(root.firstChild);\n\n\t\t\t\t\tif (firstChild && /^(UL|OL|DL)$/.test(firstChild.nodeName)) {\n\t\t\t\t\t\troot.insertBefore(dom.doc.createTextNode('\\u00a0'), root.firstChild);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\trng = dom.createRng();\n\n\t\t\t\t// Normalize whitespace to remove empty text nodes. Fix for: #6904\n\t\t\t\t// Gecko will be able to place the caret in empty text nodes but it won't render propery\n\t\t\t\t// Older IE versions will sometimes crash so for now ignore all IE versions\n\t\t\t\tif (!Env.ie) {\n\t\t\t\t\troot.normalize();\n\t\t\t\t}\n\n\t\t\t\tif (root.hasChildNodes()) {\n\t\t\t\t\twalker = new TreeWalker(root, root);\n\n\t\t\t\t\twhile ((node = walker.current())) {\n\t\t\t\t\t\tif (node.nodeType == 3) {\n\t\t\t\t\t\t\trng.setStart(node, 0);\n\t\t\t\t\t\t\trng.setEnd(node, 0);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (moveCaretBeforeOnEnterElementsMap[node.nodeName.toLowerCase()]) {\n\t\t\t\t\t\t\trng.setStartBefore(node);\n\t\t\t\t\t\t\trng.setEndBefore(node);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlastNode = node;\n\t\t\t\t\t\tnode = walker.next();\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!node) {\n\t\t\t\t\t\trng.setStart(lastNode, 0);\n\t\t\t\t\t\trng.setEnd(lastNode, 0);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (root.nodeName == 'BR') {\n\t\t\t\t\t\tif (root.nextSibling && dom.isBlock(root.nextSibling)) {\n\t\t\t\t\t\t\t// Trick on older IE versions to render the caret before the BR between two lists\n\t\t\t\t\t\t\tif (!documentMode || documentMode < 9) {\n\t\t\t\t\t\t\t\ttempElm = dom.create('br');\n\t\t\t\t\t\t\t\troot.parentNode.insertBefore(tempElm, root);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\trng.setStartBefore(root);\n\t\t\t\t\t\t\trng.setEndBefore(root);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\trng.setStartAfter(root);\n\t\t\t\t\t\t\trng.setEndAfter(root);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\trng.setStart(root, 0);\n\t\t\t\t\t\trng.setEnd(root, 0);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tselection.setRng(rng);\n\n\t\t\t\t// Remove tempElm created for old IE:s\n\t\t\t\tdom.remove(tempElm);\n\t\t\t\tselection.scrollIntoView(root);\n\t\t\t}", "title": "" }, { "docid": "38b7cb1d250ebb0d6a6da69a23c8b57e", "score": "0.5759083", "text": "function moveToCaretPosition(root) {\n\t\t\t\tvar walker, node, rng, lastNode = root, tempElm;\n\t\t\t\tfunction firstNonWhiteSpaceNodeSibling(node) {\n\t\t\t\t\twhile (node) {\n\t\t\t\t\t\tif (node.nodeType == 1 || (node.nodeType == 3 && node.data && /[\\r\\n\\s]/.test(node.data))) {\n\t\t\t\t\t\t\treturn node;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tnode = node.nextSibling;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (!root) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Old IE versions doesn't properly render blocks with br elements in them\n\t\t\t\t// For example <p><br></p> wont be rendered correctly in a contentEditable area\n\t\t\t\t// until you remove the br producing <p></p>\n\t\t\t\tif (Env.ie && Env.ie < 9 && parentBlock && parentBlock.firstChild) {\n\t\t\t\t\tif (parentBlock.firstChild == parentBlock.lastChild && parentBlock.firstChild.tagName == 'BR') {\n\t\t\t\t\t\tdom.remove(parentBlock.firstChild);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (/^(LI|DT|DD)$/.test(root.nodeName)) {\n\t\t\t\t\tvar firstChild = firstNonWhiteSpaceNodeSibling(root.firstChild);\n\n\t\t\t\t\tif (firstChild && /^(UL|OL|DL)$/.test(firstChild.nodeName)) {\n\t\t\t\t\t\troot.insertBefore(dom.doc.createTextNode('\\u00a0'), root.firstChild);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\trng = dom.createRng();\n\n\t\t\t\t// Normalize whitespace to remove empty text nodes. Fix for: #6904\n\t\t\t\t// Gecko will be able to place the caret in empty text nodes but it won't render propery\n\t\t\t\t// Older IE versions will sometimes crash so for now ignore all IE versions\n\t\t\t\tif (!Env.ie) {\n\t\t\t\t\troot.normalize();\n\t\t\t\t}\n\n\t\t\t\tif (root.hasChildNodes()) {\n\t\t\t\t\twalker = new TreeWalker(root, root);\n\n\t\t\t\t\twhile ((node = walker.current())) {\n\t\t\t\t\t\tif (node.nodeType == 3) {\n\t\t\t\t\t\t\trng.setStart(node, 0);\n\t\t\t\t\t\t\trng.setEnd(node, 0);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (moveCaretBeforeOnEnterElementsMap[node.nodeName.toLowerCase()]) {\n\t\t\t\t\t\t\trng.setStartBefore(node);\n\t\t\t\t\t\t\trng.setEndBefore(node);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlastNode = node;\n\t\t\t\t\t\tnode = walker.next();\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!node) {\n\t\t\t\t\t\trng.setStart(lastNode, 0);\n\t\t\t\t\t\trng.setEnd(lastNode, 0);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (root.nodeName == 'BR') {\n\t\t\t\t\t\tif (root.nextSibling && dom.isBlock(root.nextSibling)) {\n\t\t\t\t\t\t\t// Trick on older IE versions to render the caret before the BR between two lists\n\t\t\t\t\t\t\tif (!documentMode || documentMode < 9) {\n\t\t\t\t\t\t\t\ttempElm = dom.create('br');\n\t\t\t\t\t\t\t\troot.parentNode.insertBefore(tempElm, root);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\trng.setStartBefore(root);\n\t\t\t\t\t\t\trng.setEndBefore(root);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\trng.setStartAfter(root);\n\t\t\t\t\t\t\trng.setEndAfter(root);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\trng.setStart(root, 0);\n\t\t\t\t\t\trng.setEnd(root, 0);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tselection.setRng(rng);\n\n\t\t\t\t// Remove tempElm created for old IE:s\n\t\t\t\tdom.remove(tempElm);\n\t\t\t\tselection.scrollIntoView(root);\n\t\t\t}", "title": "" }, { "docid": "38b7cb1d250ebb0d6a6da69a23c8b57e", "score": "0.5759083", "text": "function moveToCaretPosition(root) {\n\t\t\t\tvar walker, node, rng, lastNode = root, tempElm;\n\t\t\t\tfunction firstNonWhiteSpaceNodeSibling(node) {\n\t\t\t\t\twhile (node) {\n\t\t\t\t\t\tif (node.nodeType == 1 || (node.nodeType == 3 && node.data && /[\\r\\n\\s]/.test(node.data))) {\n\t\t\t\t\t\t\treturn node;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tnode = node.nextSibling;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (!root) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Old IE versions doesn't properly render blocks with br elements in them\n\t\t\t\t// For example <p><br></p> wont be rendered correctly in a contentEditable area\n\t\t\t\t// until you remove the br producing <p></p>\n\t\t\t\tif (Env.ie && Env.ie < 9 && parentBlock && parentBlock.firstChild) {\n\t\t\t\t\tif (parentBlock.firstChild == parentBlock.lastChild && parentBlock.firstChild.tagName == 'BR') {\n\t\t\t\t\t\tdom.remove(parentBlock.firstChild);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (/^(LI|DT|DD)$/.test(root.nodeName)) {\n\t\t\t\t\tvar firstChild = firstNonWhiteSpaceNodeSibling(root.firstChild);\n\n\t\t\t\t\tif (firstChild && /^(UL|OL|DL)$/.test(firstChild.nodeName)) {\n\t\t\t\t\t\troot.insertBefore(dom.doc.createTextNode('\\u00a0'), root.firstChild);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\trng = dom.createRng();\n\n\t\t\t\t// Normalize whitespace to remove empty text nodes. Fix for: #6904\n\t\t\t\t// Gecko will be able to place the caret in empty text nodes but it won't render propery\n\t\t\t\t// Older IE versions will sometimes crash so for now ignore all IE versions\n\t\t\t\tif (!Env.ie) {\n\t\t\t\t\troot.normalize();\n\t\t\t\t}\n\n\t\t\t\tif (root.hasChildNodes()) {\n\t\t\t\t\twalker = new TreeWalker(root, root);\n\n\t\t\t\t\twhile ((node = walker.current())) {\n\t\t\t\t\t\tif (node.nodeType == 3) {\n\t\t\t\t\t\t\trng.setStart(node, 0);\n\t\t\t\t\t\t\trng.setEnd(node, 0);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (moveCaretBeforeOnEnterElementsMap[node.nodeName.toLowerCase()]) {\n\t\t\t\t\t\t\trng.setStartBefore(node);\n\t\t\t\t\t\t\trng.setEndBefore(node);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlastNode = node;\n\t\t\t\t\t\tnode = walker.next();\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!node) {\n\t\t\t\t\t\trng.setStart(lastNode, 0);\n\t\t\t\t\t\trng.setEnd(lastNode, 0);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (root.nodeName == 'BR') {\n\t\t\t\t\t\tif (root.nextSibling && dom.isBlock(root.nextSibling)) {\n\t\t\t\t\t\t\t// Trick on older IE versions to render the caret before the BR between two lists\n\t\t\t\t\t\t\tif (!documentMode || documentMode < 9) {\n\t\t\t\t\t\t\t\ttempElm = dom.create('br');\n\t\t\t\t\t\t\t\troot.parentNode.insertBefore(tempElm, root);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\trng.setStartBefore(root);\n\t\t\t\t\t\t\trng.setEndBefore(root);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\trng.setStartAfter(root);\n\t\t\t\t\t\t\trng.setEndAfter(root);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\trng.setStart(root, 0);\n\t\t\t\t\t\trng.setEnd(root, 0);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tselection.setRng(rng);\n\n\t\t\t\t// Remove tempElm created for old IE:s\n\t\t\t\tdom.remove(tempElm);\n\t\t\t\tselection.scrollIntoView(root);\n\t\t\t}", "title": "" }, { "docid": "b8a3b701728a4622b6119d8dd96055a5", "score": "0.57589746", "text": "function updateTextSelection() {\r\n var text_iframe = document.getElementById('text-input');\r\n var container = text_iframe.contentWindow.document.getElementById('injected-text');\r\n\r\n var userSelection;\r\n if (text_iframe.contentWindow.getSelection) {\r\n userSelection = text_iframe.contentWindow.getSelection();\r\n } else if (text_iframe.contentWindow.document.selection) { \r\n userSelection = text_iframe.contentWindow.document.selection.createRange();\r\n }\r\n\r\n var selectedText = userSelection;\r\n if (userSelection.text) {\r\n selectedText = userSelection.text;\r\n }\r\n\r\n if (selectedText.toString().length == 0) {\r\n var selectedImage = text_iframe.contentWindow.document.getElementById('link_image');\r\n if (selectedImage) {\r\n selectedImage.parentNode.removeChild(selectedImage);\r\n }\r\n\r\n document.getElementById('textStartOffset').value = 0;\r\n document.getElementById('startOffsetXpath').value = '';\r\n document.getElementById('textEndOffset').value = 0;\r\n document.getElementById('endOffsetXpath').value = '';\r\n\r\n document.getElementById('text-selection').innerHTML = \"No selection: alignment will default to entire text\"; \r\n return;\r\n }\r\n \r\n if ($(userSelection.anchorNode).parents().index($(text_iframe.contentWindow.document.getElementById('injected-text'))) == -1) {\r\n return;\r\n }\r\n\r\n var selectedImage = text_iframe.contentWindow.document.getElementById('link_image');\r\n if (selectedImage) {\r\n selectedImage.parentNode.removeChild(selectedImage);\r\n }\r\n\r\n var range;\r\n if (userSelection.getRangeAt) {\r\n range = userSelection.getRangeAt(0);\r\n } else {\r\n var range = document.createRange();\r\n range.setStart(userSelection.anchorNode,userSelection.anchorOffset);\r\n range.setEnd(userSelection.focusNode,userSelection.focusOffset);\r\n }\r\n\r\n var startOffsetXpath = createXPathFromElement(range.startContainer);\r\n var endOffsetXpath = createXPathFromElement(range.endContainer);\r\n var startOffset = range.startOffset;\r\n var endOffset = range.endOffset;\r\n\r\n document.getElementById('startOffsetXpath').value = startOffsetXpath;\r\n document.getElementById('endOffsetXpath').value = endOffsetXpath;\r\n document.getElementById('textStartOffset').value = startOffset;\r\n document.getElementById('textEndOffset').value = endOffset;\r\n\r\n if (selectedText.toString().length > 60) {\r\n var beginsWith = selectedText.toString().substring(0, 30);\r\n var endsWith = selectedText.toString().substring(selectedText.toString().length - 20);\r\n document.getElementById('text-selection').innerHTML = beginsWith + \"...\" + endsWith;\r\n } else {\r\n document.getElementById('text-selection').innerHTML = selectedText.toString();\r\n }\r\n\r\n range.collapse(true);\r\n\r\n var markerTextChar = \"\\ufeff\";\r\n var markerTextCharEntity = \"&#xfeff;\";\r\n var markerEl;\r\n var markerId = \"sel_\" + new Date().getTime() + \"_\" + Math.random().toString().substr(2);\r\n\r\n markerEl = text_iframe.contentWindow.document.createElement(\"span\");\r\n markerEl.id = markerId;\r\n markerEl.appendChild(text_iframe.contentWindow.document.createTextNode(markerTextChar) );\r\n range.insertNode(markerEl);\r\n\r\n var verticalOffset = markerEl.offsetTop;\r\n var parent = markerEl.parentNode;\r\n parent.removeChild(markerEl);\r\n parent.normalize();\r\n\r\n var svg_links = text_iframe.contentWindow.document.getElementById('svg-links');\r\n var image = text_iframe.contentWindow.document.createElement(\"img\");\r\n image.setAttribute('id','link_image');\r\n image.setAttribute('style','position: absolute; left: 6px; top: ' + (verticalOffset - 10) + 'px; cursor: pointer;');\r\n image.setAttribute('height', '16');\r\n image.setAttribute('width', '16');\r\n image.setAttribute('src', '/alignment/link_black.png');\r\n image.setAttribute('onclick', 'highlightImage(this); event.stopPropagation();');\r\n image.setAttribute('startOffset', startOffset);\r\n image.setAttribute('startOffsetXpath', startOffsetXpath);\r\n image.setAttribute('endOffset', endOffset);\r\n image.setAttribute('endOffsetXpath', endOffsetXpath);\r\n svg_links.appendChild(image);\r\n if (text_iframe.contentWindow.getSelection) {\r\n if (text_iframe.contentWindow.getSelection().empty) { // Chrome\r\n text_iframe.contentWindow.getSelection().empty();\r\n } else if (text_iframe.contentWindow.getSelection().removeAllRanges) { // Firefox\r\n text_iframe.contentWindow.getSelection().removeAllRanges();\r\n }\r\n } else if (text_iframe.contentWindow.document.selection) { // IE?\r\n text_iframe.contentWindow.document.selection.empty();\r\n }\r\n }", "title": "" }, { "docid": "fca005eb353236709237d482dbdc450d", "score": "0.57323", "text": "function moveToCaretPosition(root) {\n var walker, node, rng, lastNode = root, tempElm;\n var moveCaretBeforeOnEnterElementsMap = schema.getMoveCaretBeforeOnEnterElements();\n\n if (!root) {\n return;\n }\n\n if (/^(LI|DT|DD)$/.test(root.nodeName)) {\n var firstChild = firstNonWhiteSpaceNodeSibling(root.firstChild);\n\n if (firstChild && /^(UL|OL|DL)$/.test(firstChild.nodeName)) {\n root.insertBefore(dom.doc.createTextNode('\\u00a0'), root.firstChild);\n }\n }\n\n rng = dom.createRng();\n root.normalize();\n\n if (root.hasChildNodes()) {\n walker = new TreeWalker(root, root);\n\n while ((node = walker.current())) {\n if (node.nodeType == 3) {\n rng.setStart(node, 0);\n rng.setEnd(node, 0);\n break;\n }\n\n if (moveCaretBeforeOnEnterElementsMap[node.nodeName.toLowerCase()]) {\n rng.setStartBefore(node);\n rng.setEndBefore(node);\n break;\n }\n\n lastNode = node;\n node = walker.next();\n }\n\n if (!node) {\n rng.setStart(lastNode, 0);\n rng.setEnd(lastNode, 0);\n }\n } else {\n if (root.nodeName == 'BR') {\n if (root.nextSibling && dom.isBlock(root.nextSibling)) {\n rng.setStartBefore(root);\n rng.setEndBefore(root);\n } else {\n rng.setStartAfter(root);\n rng.setEndAfter(root);\n }\n } else {\n rng.setStart(root, 0);\n rng.setEnd(root, 0);\n }\n }\n\n selection.setRng(rng);\n\n // Remove tempElm created for old IE:s\n dom.remove(tempElm);\n selection.scrollIntoView(root);\n }", "title": "" }, { "docid": "7bef72577cb96c5ed243dea3a1929d56", "score": "0.5731275", "text": "function moveCarettoEnd(el) {\n var range,selection;\n if(document.createRange)//Firefox, Chrome, Opera, Safari, IE 9+\n {\n range = document.createRange();//Create a range (a range is a like the selection but invisible)\n range.selectNodeContents(el);//Select the entire contents of the element with the range\n range.collapse(false);//collapse the range to the end point. false means collapse to end rather than the start\n selection = window.getSelection();//get the selection object (allows you to change selection)\n selection.removeAllRanges();//remove any selections already made\n selection.addRange(range);//make the range you have just created the visible selection\n }\n else if(document.selection)//IE 8 and lower\n { \n range = document.body.createTextRange();//Create a range (a range is a like the selection but invisible)\n range.moveToElementText(el);//Select the entire contents of the element with the range\n range.collapse(false);//collapse the range to the end point. false means collapse to end rather than the start\n range.select();//Select the range (make it the visible selection\n }\n}", "title": "" }, { "docid": "251c61a153e5db06f54c14ff78b2e0cf", "score": "0.57233226", "text": "function caretTo(el, index) {\nif (el.createTextRange) {\nvar range = el.createTextRange();\nrange.move(\"character\", index);\nrange.select();\n} else if (el.selectionStart != null) {\nel.focus();\nel.setSelectionRange(index, index);\n}\n}", "title": "" }, { "docid": "38a113f0e33a4815e15ffb43e88662fb", "score": "0.5722192", "text": "function fixIEMouseDown() {\n _ieSelectBack = doc.body.onselectstart;\n doc.body.onselectstart = fixIESelect;\n }", "title": "" }, { "docid": "38a113f0e33a4815e15ffb43e88662fb", "score": "0.5722192", "text": "function fixIEMouseDown() {\n _ieSelectBack = doc.body.onselectstart;\n doc.body.onselectstart = fixIESelect;\n }", "title": "" }, { "docid": "ae0cb9f4765f5c44156ab63c054a626c", "score": "0.56801885", "text": "function toggleSurroundSelection(tag) { \n var applier = rangy.createCssClassApplier('rte', {elementTagName: tag, normalize: true}); \n applier.toggleSelection(); \n }", "title": "" }, { "docid": "19a69137daba2912b1b2b462bbb1cb6f", "score": "0.5655339", "text": "replaceWithSelection (emoji) {}", "title": "" }, { "docid": "f2fc96f4de1191b1ccc7b6cb6fc75ac9", "score": "0.5613714", "text": "function move_cursor_to_end(ele) {\n var document = ele.ownerDocument;\n var selection = document.defaultView.getSelection();\n var range = document.createRange();\n var focusNode = ele;\n while (focusNode.nodeType === Node.ELEMENT_NODE) {\n //find the last non-autoClose child element node, or child text node\n var i = focusNode.childNodes.length;\n while (--i !== -1) {\n var c = focusNode.childNodes[i];\n if ((c.nodeType === Node.TEXT_NODE) ||\n (c.nodeType === Node.ELEMENT_NODE)) {\n focusNode = c;\n break;\n }\n }\n if (i === -1) {\n break; //not found...\n }\n }\n if (Utils.Pattern.NodeName.autoClose.test(focusNode.nodeName))\n range.selectNode(focusNode);\n else\n range.selectNodeContents(focusNode);\n range.collapse(focusNode.nodeName === \"BR\");\n selection.removeAllRanges();\n selection.addRange(range);\n focusNode.parentElement && focusNode.parentElement.scrollIntoViewIfNeeded(true);\n }", "title": "" }, { "docid": "ae1ea4d2e0ad691983b29cf49d417d2a", "score": "0.5611821", "text": "function _cancelSelection() {\n editor.$el.find('input, textarea, button').removeData('mousedown');\n }", "title": "" }, { "docid": "5d2b895c9aa670e5a8fd4a7e6b7cbab3", "score": "0.5601287", "text": "function moveToCaretPosition(root) {\n\t\t\t\tvar walker, node, rng, lastNode = root, tempElm;\n\n\t\t\t\tfunction firstNonWhiteSpaceNodeSibling(node) {\n\t\t\t\t\twhile (node) {\n\t\t\t\t\t\tif (node.nodeType == 1 || (node.nodeType == 3 && node.data && /[\\r\\n\\s]/.test(node.data))) {\n\t\t\t\t\t\t\treturn node;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tnode = node.nextSibling;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (!root) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Old IE versions doesn't properly render blocks with br elements in them\n\t\t\t\t// For example <p><br></p> wont be rendered correctly in a contentEditable area\n\t\t\t\t// until you remove the br producing <p></p>\n\t\t\t\tif (Env.ie && Env.ie < 9 && parentBlock && parentBlock.firstChild) {\n\t\t\t\t\tif (parentBlock.firstChild == parentBlock.lastChild && parentBlock.firstChild.tagName == 'BR') {\n\t\t\t\t\t\tdom.remove(parentBlock.firstChild);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (/^(LI|DT|DD)$/.test(root.nodeName)) {\n\t\t\t\t\tvar firstChild = firstNonWhiteSpaceNodeSibling(root.firstChild);\n\n\t\t\t\t\tif (firstChild && /^(UL|OL|DL)$/.test(firstChild.nodeName)) {\n\t\t\t\t\t\troot.insertBefore(dom.doc.createTextNode('\\u00a0'), root.firstChild);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\trng = dom.createRng();\n\n\t\t\t\t// Normalize whitespace to remove empty text nodes. Fix for: #6904\n\t\t\t\t// Gecko will be able to place the caret in empty text nodes but it won't render propery\n\t\t\t\t// Older IE versions will sometimes crash so for now ignore all IE versions\n\t\t\t\tif (!Env.ie) {\n\t\t\t\t\troot.normalize();\n\t\t\t\t}\n\n\t\t\t\tif (root.hasChildNodes()) {\n\t\t\t\t\twalker = new TreeWalker(root, root);\n\n\t\t\t\t\twhile ((node = walker.current())) {\n\t\t\t\t\t\tif (node.nodeType == 3) {\n\t\t\t\t\t\t\trng.setStart(node, 0);\n\t\t\t\t\t\t\trng.setEnd(node, 0);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (nonEmptyElementsMap[node.nodeName.toLowerCase()]) {\n\t\t\t\t\t\t\trng.setStartBefore(node);\n\t\t\t\t\t\t\trng.setEndBefore(node);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlastNode = node;\n\t\t\t\t\t\tnode = walker.next();\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!node) {\n\t\t\t\t\t\trng.setStart(lastNode, 0);\n\t\t\t\t\t\trng.setEnd(lastNode, 0);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (root.nodeName == 'BR') {\n\t\t\t\t\t\tif (root.nextSibling && dom.isBlock(root.nextSibling)) {\n\t\t\t\t\t\t\t// Trick on older IE versions to render the caret before the BR between two lists\n\t\t\t\t\t\t\tif (!documentMode || documentMode < 9) {\n\t\t\t\t\t\t\t\ttempElm = dom.create('br');\n\t\t\t\t\t\t\t\troot.parentNode.insertBefore(tempElm, root);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\trng.setStartBefore(root);\n\t\t\t\t\t\t\trng.setEndBefore(root);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\trng.setStartAfter(root);\n\t\t\t\t\t\t\trng.setEndAfter(root);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\trng.setStart(root, 0);\n\t\t\t\t\t\trng.setEnd(root, 0);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tselection.setRng(rng);\n\n\t\t\t\t// Remove tempElm created for old IE:s\n\t\t\t\tdom.remove(tempElm);\n\t\t\t\tselection.scrollIntoView(root);\n\t\t\t}", "title": "" }, { "docid": "ee08d9196cc0d54e9b7aa81ebd09e2a8", "score": "0.56004673", "text": "function selectControlElements() {\n\t\t\teditor.on('click', function(e) {\n\t\t\t\tvar target = e.target;\n\n\t\t\t\t// Workaround for bug, http://bugs.webkit.org/show_bug.cgi?id=12250\n\t\t\t\t// WebKit can't even do simple things like selecting an image\n\t\t\t\t// Needs to be the setBaseAndExtend or it will fail to select floated images\n\t\t\t\tif (/^(IMG|HR)$/.test(target.nodeName) && dom.getContentEditableParent(target) !== \"false\") {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\tselection.getSel().setBaseAndExtent(target, 0, target, 1);\n\t\t\t\t\teditor.nodeChanged();\n\t\t\t\t}\n\n\t\t\t\tif (target.nodeName == 'A' && dom.hasClass(target, 'mce-item-anchor')) {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\tselection.select(target);\n\t\t\t\t}\n\t\t\t});\n\t\t}", "title": "" }, { "docid": "7166dd4029f3945494a2bd3bbb006375", "score": "0.5598205", "text": "function moveSelectionRight(){\n\t\tif (currentSelection.nextSibling != null){\n\t\t\tcurrentSelection.style.backgroundColor = \"white\";\n\t\t\tcurrentSelection.style.border = \"\";\n\t\t\tcurrentSelection = currentSelection.nextSibling;\n\t\t\tcurrentSelection.style.backgroundColor = \"yellow\";\n\t\t\tcurrentSelection.style.border = \"solid\";\n\t\t}\t\n}", "title": "" }, { "docid": "8f7dda479978a85ecd4c4b6eaea687f8", "score": "0.55859774", "text": "coerceSelection() {\n // Not implemented yet.\n }", "title": "" }, { "docid": "135e9221d40a44afda80c6cca68ede6b", "score": "0.5584432", "text": "function highlightSelection(wrappedSelection) {\n const element = findSelection(wrappedSelection)\n if (element) {\n const { anchor: a, focus: f } = wrappedSelection.selection\n let anchor = a.path ? element.querySelector(a.path) : element\n let focus = f.path ? element.querySelector(f.path) : element;\n (anchor || element).scrollIntoView({ behavior: 'smooth', block: 'center', inline: 'center' })\n if (anchor && focus) {\n if (a.hasOwnProperty('parentOffset')) {\n anchor = anchor.childNodes[a.parentOffset]\n }\n if (f.hasOwnProperty('parentOffset')) {\n focus = focus.childNodes[f.parentOffset]\n }\n const range = new Range()\n range.setStart(anchor, a.offset)\n range.setEnd(focus, f.offset)\n if (squish(range.toString()) === wrappedSelection.phrase) {\n document.getSelection().removeAllRanges()\n document.getSelection().addRange(range)\n }\n }\n return true\n }\n return false\n}", "title": "" }, { "docid": "82d49e872c4264ab21d7c2014d8b79d4", "score": "0.5581524", "text": "function wrappSelection(before,after,caret){\n\t\t\n\t\tvar selection = editor.getSelection();\n\t\tvar cursor = editor.getCursor();\n\t\teditor.replaceSelection(before+selection+after);\n\t\teditor.focus();\n\n\t\t/* setCursor after wrapped content */\n\t\tif(caret)\n\t\t\tcursor.ch = cursor.ch+caret;\n\t\telse if(selection==\"\")\n\t\t\tcursor.ch = cursor.ch+before.length;\n\t\telse\n\t\t\tcursor.ch = cursor.ch+before.length+after.length;\n\t\teditor.setCursor(cursor);\n\t}", "title": "" }, { "docid": "754d925f0d9b5ac1afdfd14b15bde226", "score": "0.5571328", "text": "replaceSelected(str) {\n\n\t\t\tconsole.assert(typeof str == \"string\", \"str is invalid\");\n\n\t\t\tconst [[leftNode, leftOffset], [rightNode, rightOffset]] = getNormalizedSelection();\n\t\t\tconst preCenterStr = leftNode.textContent.slice(0, leftOffset);\n\t\t\tconst postCenterStr = rightNode.textContent.slice(rightOffset);\n\t\t\tconst centerStr = preCenterStr + str + postCenterStr;\n\n\t\t\t// not sure if this makes sense when leftNode == rightNode and offset is 0\n\t\t\tconst [preStr, firstNode] = formFirstRegion(centerStr, leftNode);\n\t\t\tconst [postStr, baseNode] = formLastRegion(centerStr, rightNode);\n\n\t\t\tconsole.log([preStr, preCenterStr, str, postCenterStr, postStr], [firstNode, baseNode]);\n\n\t\t\tconst addedStrings = lexingCtx.tokenize(preStr + centerStr + postStr);\n\t\t\tconst removedStrings = makeRemovedStrings(firstNode, baseNode);\n\n\t\t\tconst index = indexOf(firstNode);\n\n\t\t\tthis.runner.begin(index, removedStrings.length, addedStrings);\n\n\t\t\tlet scanningNode = baseNode;\n\t\t\tlet charOffsetFromEnd = postCenterStr.length + postStr.length;\n\n\t\t\twhile (charOffsetFromEnd > 0) {\n\t\t\t\tscanningNode = scanningNode.previousSibling;\n\t\t\t\tcharOffsetFromEnd -= codesCtx.getString(scanningNode).length;\n\t\t\t}\n\n\t\t\tsetBaseAndExtent(scanningNode, -charOffsetFromEnd);\n\n\t\t\tconst [[newLeftNode, ], ] = getNormalizedSelection();\n\n\t\t\tif (newLeftNode.tagName === \"BR\" && newLeftNode.nextSibling === null) { // it's the final <BR>, so scroll to bottom\n\t\t\t\tconst editorContainer = this.runner.editorNode.parentElement;\n\t\t\t\teditorContainer.scrollTop = editorContainer.scrollHeight;\n\t\t\t} else {\n\t\t\t\tconst dummy = document.createElement('span'); // need to create dummy in case newLeftNode is a <BR>\n\t\t\t\tdummy.innerHTML = \"&nbsp;\";\n\t\t\t\tnewLeftNode.parentElement.insertBefore(dummy, newLeftNode);\n\t\t\t\tdummy.scrollIntoView({behavior: \"instant\", block: \"nearest\", inline: \"nearest\"});\n\t\t\t\tdummy.remove();\n\t\t\t}\n\n\t\t\tthis.mutateHistory(index, removedStrings, addedStrings);\n\t\t}", "title": "" }, { "docid": "1daaf4fe1cdb159f085a5774b01f7dec", "score": "0.55701566", "text": "function extUtils_getOffsetsAfterAccountingForSomeSpecialSelectionCases(allText, offsets)\n{\n var newOffs = oldOffs = offsets;\n\n // strip leading and trailing white space\n newOffs = extUtils.getOffsetsAfterStrippingWhiteSpace(allText,newOffs[0],newOffs[1]);\n\n //remove trailing &nbsp; tag if there\n // this can happen if a user shift down-clicks and the following line\n // is empty; dw expands the selection to include the \"<p>nbsp;\"\n // on the next line\n var selStr = allText.substring(newOffs[0],newOffs[1]);\n var chunk = \"&nbsp;\";\n var chunkPos = selStr.lastIndexOf(chunk);\n if (chunkPos!=-1 && chunkPos == (selStr.length - chunk.length))\n newOffs[1] -= chunk.length;\n\n // remove last tag if it is an opening block tag\n // this can happen if a user shift down-clicks; dw selects the\n // opening block tag on the next paragraph, resulting in a selection like:\n // <p>|some text</p>\n // <p>|more text</p>\n selStr = allText.substring(newOffs[0], newOffs[1]);\n var pattern = /<([^>]*)>$/;\n var result = selStr.match(pattern);\n if (result != null){\n if ( extUtils.isAContainerTag(result[1]) ){\n newOffs[1] -= result[0].length;\n }\n }\n\n // if selection starts with a closing block tag, remove it\n // this can happen if a user puts the mouse at the end of a line and\n // presses shift-up-arrow to select it\n selStr = allText.substring(newOffs[0],newOffs[1]);\n pattern = /^<\\/([^>]*)>/;\n result = selStr.match(pattern);\n if (result != null){\n if ( extUtils.isAContainerTag(result[1]) ){\n newOffs[0] += result[0].length;\n }\n }\n\n // strip leading and trailing white space if offsets have changed\n if (newOffs != oldOffs){\n newOffs = extUtils.getOffsetsAfterStrippingWhiteSpace(allText,newOffs[0],newOffs[1]);\n oldOffs = newOffs;\n }\n\n // account for special list case: selecting the first item in a list\n // can select the opening <ol> or <ul> as well. Strip it.\n newOffs = extUtils.getOffsetsAfterListCheck(allText,newOffs[0],newOffs[1]);\n\n // strip leading and trailing white space if offsets have changed\n if (newOffs != oldOffs){\n newOffs = extUtils.getOffsetsAfterStrippingWhiteSpace(allText,newOffs[0],newOffs[1]);\n }\n\n return newOffs;\n\n}", "title": "" }, { "docid": "9845bfd4007e038e384f056022896584", "score": "0.5565977", "text": "function selectControlElements() {\n\t\t\teditor.on('click', function(e) {\n\t\t\t\tvar target = e.target;\n\n\t\t\t\t// Workaround for bug, http://bugs.webkit.org/show_bug.cgi?id=12250\n\t\t\t\t// WebKit can't even do simple things like selecting an image\n\t\t\t\t// Needs to be the setBaseAndExtend or it will fail to select floated images\n\t\t\t\tif (/^(IMG|HR)$/.test(target.nodeName)) {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\tselection.getSel().setBaseAndExtent(target, 0, target, 1);\n\t\t\t\t\teditor.nodeChanged();\n\t\t\t\t}\n\n\t\t\t\tif (target.nodeName == 'A' && dom.hasClass(target, 'mce-item-anchor')) {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\tselection.select(target);\n\t\t\t\t}\n\t\t\t});\n\t\t}", "title": "" }, { "docid": "b478a9e5ea93474b3d400efe51527563", "score": "0.5556344", "text": "function selectElementContents(element) {\n var range = document.createRange();\n range.selectNodeContents(element);\n var sel = window.getSelection();\n sel.removeAllRanges();\n sel.addRange(range);\n}", "title": "" }, { "docid": "acd9bcf90c9ce68b9a7ed254cfad5a06", "score": "0.55485266", "text": "function moveToCaretPosition(root) {\n\t\t\t\tvar walker, node, rng, lastNode = root, tempElm;\n\n\t\t\t\tfunction firstNonWhiteSpaceNodeSibling(node) {\n\t\t\t\t\twhile (node) {\n\t\t\t\t\t\tif (node.nodeType == 1 || (node.nodeType == 3 && node.data && /[\\r\\n\\s]/.test(node.data))) {\n\t\t\t\t\t\t\treturn node;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tnode = node.nextSibling;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (root.nodeName == 'LI') {\n\t\t\t\t\tvar firstChild = firstNonWhiteSpaceNodeSibling(root.firstChild);\n\n\t\t\t\t\tif (firstChild && /^(UL|OL)$/.test(firstChild.nodeName)) {\n\t\t\t\t\t\troot.insertBefore(dom.doc.createTextNode('\\u00a0'), root.firstChild);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\trng = dom.createRng();\n\n\t\t\t\tif (root.hasChildNodes()) {\n\t\t\t\t\twalker = new TreeWalker(root, root);\n\n\t\t\t\t\twhile ((node = walker.current())) {\n\t\t\t\t\t\tif (node.nodeType == 3) {\n\t\t\t\t\t\t\trng.setStart(node, 0);\n\t\t\t\t\t\t\trng.setEnd(node, 0);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (nonEmptyElementsMap[node.nodeName.toLowerCase()]) {\n\t\t\t\t\t\t\trng.setStartBefore(node);\n\t\t\t\t\t\t\trng.setEndBefore(node);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlastNode = node;\n\t\t\t\t\t\tnode = walker.next();\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!node) {\n\t\t\t\t\t\trng.setStart(lastNode, 0);\n\t\t\t\t\t\trng.setEnd(lastNode, 0);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (root.nodeName == 'BR') {\n\t\t\t\t\t\tif (root.nextSibling && dom.isBlock(root.nextSibling)) {\n\t\t\t\t\t\t\t// Trick on older IE versions to render the caret before the BR between two lists\n\t\t\t\t\t\t\tif (!documentMode || documentMode < 9) {\n\t\t\t\t\t\t\t\ttempElm = dom.create('br');\n\t\t\t\t\t\t\t\troot.parentNode.insertBefore(tempElm, root);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\trng.setStartBefore(root);\n\t\t\t\t\t\t\trng.setEndBefore(root);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\trng.setStartAfter(root);\n\t\t\t\t\t\t\trng.setEndAfter(root);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\trng.setStart(root, 0);\n\t\t\t\t\t\trng.setEnd(root, 0);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tselection.setRng(rng);\n\n\t\t\t\t// Remove tempElm created for old IE:s\n\t\t\t\tdom.remove(tempElm);\n\t\t\t\tselection.scrollIntoView(root);\n\t\t\t}", "title": "" }, { "docid": "2b85061ed6427c90da95c26590a79a77", "score": "0.5544292", "text": "function selectControlElements() {\n\t\t\teditor.on('click', function(e) {\n\t\t\t\te = e.target;\n\n\t\t\t\t// Workaround for bug, http://bugs.webkit.org/show_bug.cgi?id=12250\n\t\t\t\t// WebKit can't even do simple things like selecting an image\n\t\t\t\t// Needs tobe the setBaseAndExtend or it will fail to select floated images\n\t\t\t\tif (/^(IMG|HR)$/.test(e.nodeName)) {\n\t\t\t\t\tselection.getSel().setBaseAndExtent(e, 0, e, 1);\n\t\t\t\t}\n\n\t\t\t\tif (e.nodeName == 'A' && dom.hasClass(e, 'mce-item-anchor')) {\n\t\t\t\t\tselection.select(e);\n\t\t\t\t}\n\n\t\t\t\teditor.nodeChanged();\n\t\t\t});\n\t\t}", "title": "" }, { "docid": "2b85061ed6427c90da95c26590a79a77", "score": "0.5544292", "text": "function selectControlElements() {\n\t\t\teditor.on('click', function(e) {\n\t\t\t\te = e.target;\n\n\t\t\t\t// Workaround for bug, http://bugs.webkit.org/show_bug.cgi?id=12250\n\t\t\t\t// WebKit can't even do simple things like selecting an image\n\t\t\t\t// Needs tobe the setBaseAndExtend or it will fail to select floated images\n\t\t\t\tif (/^(IMG|HR)$/.test(e.nodeName)) {\n\t\t\t\t\tselection.getSel().setBaseAndExtent(e, 0, e, 1);\n\t\t\t\t}\n\n\t\t\t\tif (e.nodeName == 'A' && dom.hasClass(e, 'mce-item-anchor')) {\n\t\t\t\t\tselection.select(e);\n\t\t\t\t}\n\n\t\t\t\teditor.nodeChanged();\n\t\t\t});\n\t\t}", "title": "" }, { "docid": "2b85061ed6427c90da95c26590a79a77", "score": "0.5544292", "text": "function selectControlElements() {\n\t\t\teditor.on('click', function(e) {\n\t\t\t\te = e.target;\n\n\t\t\t\t// Workaround for bug, http://bugs.webkit.org/show_bug.cgi?id=12250\n\t\t\t\t// WebKit can't even do simple things like selecting an image\n\t\t\t\t// Needs tobe the setBaseAndExtend or it will fail to select floated images\n\t\t\t\tif (/^(IMG|HR)$/.test(e.nodeName)) {\n\t\t\t\t\tselection.getSel().setBaseAndExtent(e, 0, e, 1);\n\t\t\t\t}\n\n\t\t\t\tif (e.nodeName == 'A' && dom.hasClass(e, 'mce-item-anchor')) {\n\t\t\t\t\tselection.select(e);\n\t\t\t\t}\n\n\t\t\t\teditor.nodeChanged();\n\t\t\t});\n\t\t}", "title": "" }, { "docid": "8271306eb55dd7f8a0d0884ccb3bcc45", "score": "0.5513789", "text": "function prepareSelectAllHack() {\n if (display.input.selectionStart != null) {\n var selected = cm.somethingSelected();\n var extval = display.input.value = \"\\u200b\" + (selected ? display.input.value : \"\");\n display.prevInput = selected ? \"\" : \"\\u200b\";\n display.input.selectionStart = 1; display.input.selectionEnd = extval.length;\n // Re-set this, in case some other handler touched the\n // selection in the meantime.\n display.selForContextMenu = cm.doc.sel;\n }\n }", "title": "" }, { "docid": "8271306eb55dd7f8a0d0884ccb3bcc45", "score": "0.5513789", "text": "function prepareSelectAllHack() {\n if (display.input.selectionStart != null) {\n var selected = cm.somethingSelected();\n var extval = display.input.value = \"\\u200b\" + (selected ? display.input.value : \"\");\n display.prevInput = selected ? \"\" : \"\\u200b\";\n display.input.selectionStart = 1; display.input.selectionEnd = extval.length;\n // Re-set this, in case some other handler touched the\n // selection in the meantime.\n display.selForContextMenu = cm.doc.sel;\n }\n }", "title": "" }, { "docid": "8271306eb55dd7f8a0d0884ccb3bcc45", "score": "0.5513789", "text": "function prepareSelectAllHack() {\n if (display.input.selectionStart != null) {\n var selected = cm.somethingSelected();\n var extval = display.input.value = \"\\u200b\" + (selected ? display.input.value : \"\");\n display.prevInput = selected ? \"\" : \"\\u200b\";\n display.input.selectionStart = 1; display.input.selectionEnd = extval.length;\n // Re-set this, in case some other handler touched the\n // selection in the meantime.\n display.selForContextMenu = cm.doc.sel;\n }\n }", "title": "" }, { "docid": "8271306eb55dd7f8a0d0884ccb3bcc45", "score": "0.5513789", "text": "function prepareSelectAllHack() {\n if (display.input.selectionStart != null) {\n var selected = cm.somethingSelected();\n var extval = display.input.value = \"\\u200b\" + (selected ? display.input.value : \"\");\n display.prevInput = selected ? \"\" : \"\\u200b\";\n display.input.selectionStart = 1; display.input.selectionEnd = extval.length;\n // Re-set this, in case some other handler touched the\n // selection in the meantime.\n display.selForContextMenu = cm.doc.sel;\n }\n }", "title": "" }, { "docid": "8271306eb55dd7f8a0d0884ccb3bcc45", "score": "0.5513789", "text": "function prepareSelectAllHack() {\n if (display.input.selectionStart != null) {\n var selected = cm.somethingSelected();\n var extval = display.input.value = \"\\u200b\" + (selected ? display.input.value : \"\");\n display.prevInput = selected ? \"\" : \"\\u200b\";\n display.input.selectionStart = 1; display.input.selectionEnd = extval.length;\n // Re-set this, in case some other handler touched the\n // selection in the meantime.\n display.selForContextMenu = cm.doc.sel;\n }\n }", "title": "" }, { "docid": "8271306eb55dd7f8a0d0884ccb3bcc45", "score": "0.5513789", "text": "function prepareSelectAllHack() {\n if (display.input.selectionStart != null) {\n var selected = cm.somethingSelected();\n var extval = display.input.value = \"\\u200b\" + (selected ? display.input.value : \"\");\n display.prevInput = selected ? \"\" : \"\\u200b\";\n display.input.selectionStart = 1; display.input.selectionEnd = extval.length;\n // Re-set this, in case some other handler touched the\n // selection in the meantime.\n display.selForContextMenu = cm.doc.sel;\n }\n }", "title": "" }, { "docid": "d9c98d985641b7559f960ce176f740a5", "score": "0.5497623", "text": "function moveSelectionLeft(){\n\t\tif (currentSelection.previousSibling != null){\n\t\t\tcurrentSelection.style.backgroundColor = \"white\";\n\t\t\tcurrentSelection.style.border = \"\";\n\t\t\tcurrentSelection = currentSelection.previousSibling;\n\t\t\tcurrentSelection.style.backgroundColor = \"yellow\";\n\t\t\tcurrentSelection.style.border = \"solid\";\n\t\t}\t\n}", "title": "" }, { "docid": "c86991549069052523298536c440b338", "score": "0.54884034", "text": "function prepareSelectAllHack() {\n if (display.input.selectionStart != null) {\n var extval = display.input.value = \"\\u200b\" + (cm.somethingSelected() ? display.input.value : \"\");\n display.prevInput = \"\\u200b\";\n display.input.selectionStart = 1; display.input.selectionEnd = extval.length;\n }\n }", "title": "" }, { "docid": "73db0ffe11bd87ddbbdbe718f66e2caa", "score": "0.54844403", "text": "function placeCaretAtEnd(el) {\n // Setzt den Focus auf das uebergebene Element \n el.focus();\n // Falls der Browser nicht Internet Explorer ist \n if (typeof window.getSelection !== \"undefined\" \n && typeof document.createRange !== \"undefined\") {\n // Erstellt eine Range innerhalb der Seite \n var range = document.createRange();\n // Fuegt den Inhalt des uebergebenen Elements in die Range ein \n range.selectNodeContents(el);\n // Setzt den Fokus an das Ende der Range \n range.collapse(false);\n // Holt sich die Selektion des Users \n var sel = window.getSelection();\n // Loescht alle Ranges (es existiert nur eine) \n sel.removeAllRanges();\n // Fuegt die erstellte Range ein \n sel.addRange(range);\n // Falls der Browser Internet Explorer ist \n } else if (typeof document.body.createTextRange !== \"undefined\") {\n // Erstellt eine Range innerhalb der Seite \n var textRange = document.body.createTextRange();\n // Fuegt die Range an die Stelle des uebergebenen Elements ein \n textRange.moveToElementText(el);\n // Setzt den Fokus an das Ende der Range \n textRange.collapse(false);\n // Selektiert die Range \n textRange.select();\n }\n }", "title": "" }, { "docid": "ed44f64657b6c6a852e652bb3f7165c7", "score": "0.54838866", "text": "function caretTo(el, index) {\n\t\tif (el.createTextRange) { \n\t\t\tvar range = el.createTextRange(); \n\t\t\trange.move(\"character\", index); \n\t\t\trange.select(); \n\t\t} else if (el.selectionStart != null) { \n\t\t\tel.focus(); \n\t\t\tel.setSelectionRange(index, index); \n\t\t}\n\t}", "title": "" }, { "docid": "241aa8b8e55ba5c1db65a24f621caf91", "score": "0.5483358", "text": "function prepareSelectAllHack() {\r\n if (display.input.selectionStart != null) {\r\n var selected = cm.somethingSelected();\r\n var extval = display.input.value = \"\\u200b\" + (selected ? display.input.value : \"\");\r\n display.prevInput = selected ? \"\" : \"\\u200b\";\r\n display.input.selectionStart = 1; display.input.selectionEnd = extval.length;\r\n // Re-set this, in case some other handler touched the\r\n // selection in the meantime.\r\n display.selForContextMenu = cm.doc.sel;\r\n }\r\n }", "title": "" }, { "docid": "edcad937eb6d345b593a31e43fd7e1dd", "score": "0.5458624", "text": "function setDraftEditorSelection(selectionState,node,blockKey,nodeStart,nodeEnd){// It's possible that the editor has been removed from the DOM but\n// our selection code doesn't know it yet. Forcing selection in\n// this case may lead to errors, so just bail now.\nif(containsNode(document.documentElement,node)){var selection=global.getSelection(),anchorKey=selectionState.getAnchorKey(),anchorOffset=selectionState.getAnchorOffset(),focusKey=selectionState.getFocusKey(),focusOffset=selectionState.getFocusOffset(),isBackward=selectionState.getIsBackward();// IE doesn't support backward selection. Swap key/offset pairs.\nif(!selection.extend&&isBackward){var tempKey=anchorKey,tempOffset=anchorOffset;anchorKey=focusKey,anchorOffset=focusOffset,focusKey=tempKey,focusOffset=tempOffset,isBackward=!1;}var hasAnchor=anchorKey===blockKey&&nodeStart<=anchorOffset&&nodeEnd>=anchorOffset,hasFocus=focusKey===blockKey&&nodeStart<=focusOffset&&nodeEnd>=focusOffset;// If the selection is entirely bound within this node, set the selection\n// and be done.\nif(hasAnchor&&hasFocus)return selection.removeAllRanges(),addPointToSelection(selection,node,anchorOffset-nodeStart,selectionState),void addFocusToSelection(selection,node,focusOffset-nodeStart,selectionState);if(isBackward){// If this node has the anchor, we may assume that the correct\n// focus information is already stored on the selection object.\n// We keep track of it, reset the selection range, and extend it\n// back to the focus point.\nif(// If this node has the focus, set the selection range to be a\n// collapsed range beginning here. Later, when we encounter the anchor,\n// we'll use this information to extend the selection.\nhasFocus&&(selection.removeAllRanges(),addPointToSelection(selection,node,focusOffset-nodeStart,selectionState)),hasAnchor){var storedFocusNode=selection.focusNode,storedFocusOffset=selection.focusOffset;selection.removeAllRanges(),addPointToSelection(selection,node,anchorOffset-nodeStart,selectionState),addFocusToSelection(selection,storedFocusNode,storedFocusOffset,selectionState);}}else// If the anchor is within this node, set the range start.\nhasAnchor&&(selection.removeAllRanges(),addPointToSelection(selection,node,anchorOffset-nodeStart,selectionState)),// If the focus is within this node, we can assume that we have\n// already set the appropriate start range on the selection, and\n// can simply extend the selection.\nhasFocus&&addFocusToSelection(selection,node,focusOffset-nodeStart,selectionState);}}", "title": "" }, { "docid": "c96eefb45ed9cd5dbd75d45630ba1b2a", "score": "0.54531634", "text": "function scrollToCaret(outer) {\n\tlet editor = getEditor(outer);\n\tlet selCtrlr = editor && editor.selectionController;\n\tif (!selCtrlr) return;\n\tselCtrlr.scrollSelectionIntoView(selCtrlr.SELECTION_NORMAL,\n\t\t\t\t\t\t\t\t\t selCtrlr.SELECTION_FOCUS_REGION, 0);\n}", "title": "" }, { "docid": "630c8307758d8c18a08b3c4c649da510", "score": "0.54499114", "text": "_updateSelection() {\n\t\t// If there is no selection - remove DOM and fake selections.\n\t\tif ( this.selection.rangeCount === 0 ) {\n\t\t\tthis._removeDomSelection();\n\t\t\tthis._removeFakeSelection();\n\n\t\t\treturn;\n\t\t}\n\n\t\tconst domRoot = this.domConverter.mapViewToDom( this.selection.editableElement );\n\n\t\t// Do nothing if there is no focus, or there is no DOM element corresponding to selection's editable element.\n\t\tif ( !this.isFocused || !domRoot ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Render selection.\n\t\tif ( this.selection.isFake ) {\n\t\t\tthis._updateFakeSelection( domRoot );\n\t\t} else {\n\t\t\tthis._removeFakeSelection();\n\t\t\tthis._updateDomSelection( domRoot );\n\t\t}\n\t}", "title": "" }, { "docid": "0984a765329799eff62c1b67f5b17194", "score": "0.5442936", "text": "function prepareSelectAllHack() {\n if (te.selectionStart != null) {\n var selected = cm.somethingSelected()\n var extval = \"\\u200b\" + (selected ? te.value : \"\")\n te.value = \"\\u21da\" // Used to catch context-menu undo\n te.value = extval\n input.prevInput = selected ? \"\" : \"\\u200b\"\n te.selectionStart = 1; te.selectionEnd = extval.length\n // Re-set this, in case some other handler touched the\n // selection in the meantime.\n display.selForContextMenu = cm.doc.sel\n }\n }", "title": "" }, { "docid": "0984a765329799eff62c1b67f5b17194", "score": "0.5442936", "text": "function prepareSelectAllHack() {\n if (te.selectionStart != null) {\n var selected = cm.somethingSelected()\n var extval = \"\\u200b\" + (selected ? te.value : \"\")\n te.value = \"\\u21da\" // Used to catch context-menu undo\n te.value = extval\n input.prevInput = selected ? \"\" : \"\\u200b\"\n te.selectionStart = 1; te.selectionEnd = extval.length\n // Re-set this, in case some other handler touched the\n // selection in the meantime.\n display.selForContextMenu = cm.doc.sel\n }\n }", "title": "" }, { "docid": "0984a765329799eff62c1b67f5b17194", "score": "0.5442936", "text": "function prepareSelectAllHack() {\n if (te.selectionStart != null) {\n var selected = cm.somethingSelected()\n var extval = \"\\u200b\" + (selected ? te.value : \"\")\n te.value = \"\\u21da\" // Used to catch context-menu undo\n te.value = extval\n input.prevInput = selected ? \"\" : \"\\u200b\"\n te.selectionStart = 1; te.selectionEnd = extval.length\n // Re-set this, in case some other handler touched the\n // selection in the meantime.\n display.selForContextMenu = cm.doc.sel\n }\n }", "title": "" }, { "docid": "0984a765329799eff62c1b67f5b17194", "score": "0.5442936", "text": "function prepareSelectAllHack() {\n if (te.selectionStart != null) {\n var selected = cm.somethingSelected()\n var extval = \"\\u200b\" + (selected ? te.value : \"\")\n te.value = \"\\u21da\" // Used to catch context-menu undo\n te.value = extval\n input.prevInput = selected ? \"\" : \"\\u200b\"\n te.selectionStart = 1; te.selectionEnd = extval.length\n // Re-set this, in case some other handler touched the\n // selection in the meantime.\n display.selForContextMenu = cm.doc.sel\n }\n }", "title": "" }, { "docid": "0984a765329799eff62c1b67f5b17194", "score": "0.5442936", "text": "function prepareSelectAllHack() {\n if (te.selectionStart != null) {\n var selected = cm.somethingSelected()\n var extval = \"\\u200b\" + (selected ? te.value : \"\")\n te.value = \"\\u21da\" // Used to catch context-menu undo\n te.value = extval\n input.prevInput = selected ? \"\" : \"\\u200b\"\n te.selectionStart = 1; te.selectionEnd = extval.length\n // Re-set this, in case some other handler touched the\n // selection in the meantime.\n display.selForContextMenu = cm.doc.sel\n }\n }", "title": "" }, { "docid": "01fdeb190427c0753d610ef7ea7929d5", "score": "0.54393286", "text": "function wrapSelection(ta, v) \n{\n\tif( document.selection ) {\n\t\t// for IE\n\t\tvar str = document.selection.createRange().text;\n\t\tta.focus();\n\t\tvar sel = document.selection.createRange();\n\t\tsel.text = \"<\" + v + \">\" + str + \"</\" + v + \">\";\n }\n\telse {\n\t\t// browsers other than IE\n\t\tvar s = ta;\n\t\tif( s.selectionEnd ) {\n\t\t\t// Mozilla 1.3b+ \n\t\t\tvar s1 = (s.value).substring(0,s.selectionStart)\n\t\t\tvar s2 = (s.value).substring(s.selectionEnd,s.textLength)\n\t\t\tselection = (s.value).substring(s.selectionStart, s.selectionEnd)\n\t\t\ts.value = s1 + '<' + v + '>' + selection + '</' + v + '>' + s2\n\t\t}\n\t\telse {\n\t\t\t// everything else\n\t\t\ts.value += '<' + v + '></' + v + '>';\n\t\t}\n\t}\n\t\n\treturn;\n}", "title": "" }, { "docid": "fd7ed4c1ec4a71754277ff65278db6c2", "score": "0.5431154", "text": "function prepareSelectAllHack() {\r\n if (te.selectionStart != null) {\r\n var selected = cm.somethingSelected()\r\n var extval = \"\\u200b\" + (selected ? te.value : \"\")\r\n te.value = \"\\u21da\" // Used to catch context-menu undo\r\n te.value = extval\r\n input.prevInput = selected ? \"\" : \"\\u200b\"\r\n te.selectionStart = 1; te.selectionEnd = extval.length\r\n // Re-set this, in case some other handler touched the\r\n // selection in the meantime.\r\n display.selForContextMenu = cm.doc.sel\r\n }\r\n }", "title": "" }, { "docid": "753143f54218c442aaae817e9513c07b", "score": "0.5426039", "text": "function b () {\n if (el.type !== \"text\") { \n el.focus(); \n } else {\n //el.setSelectionRange(0, 100);\n $(el).selectRange(0, 100); \n }\n }", "title": "" }, { "docid": "a26ab14bb4f2b0882b4d49357eff93e8", "score": "0.54241043", "text": "function textarea_replace_selection( myField, snippet, target_document )\n{\n\ttextarea_wrap_selection( myField, snippet, '', 1, target_document );\n}", "title": "" }, { "docid": "17cdbbf242a10827559341ff8e8d4a44", "score": "0.5424036", "text": "function forSelection($el) {\n var selection_rect = getBoundingRect();\n $el.css({\n top: 0,\n left: 0\n });\n var top = selection_rect.top + selection_rect.height;\n var left = selection_rect.left + selection_rect.width / 2 - $el.get(0).offsetWidth / 2 + editor.helpers.scrollLeft();\n\n if (!editor.opts.iframe) {\n top += editor.helpers.scrollTop();\n }\n\n at(left, top, $el, selection_rect.height);\n }", "title": "" }, { "docid": "eae0a11875d83490331895de15fbec7d", "score": "0.5423763", "text": "function updateSelectionOnFocus(element) {\n const selection$1 = element.ownerDocument.getSelection();\n /* istanbul ignore if */ if (!(selection$1 === null || selection$1 === void 0 ? void 0 : selection$1.focusNode)) {\n return;\n }\n // If the focus moves inside an element with own selection implementation,\n // the document selection will be this element.\n // But if the focused element is inside a contenteditable,\n // 1) a collapsed selection will be retained.\n // 2) other selections will be replaced by a cursor\n // 2.a) at the start of the first child if it is a text node\n // 2.b) at the start of the contenteditable.\n if (selection.hasOwnSelection(element)) {\n const contenteditable = isContentEditable.getContentEditable(selection$1.focusNode);\n if (contenteditable) {\n if (!selection$1.isCollapsed) {\n var ref;\n const focusNode = ((ref = contenteditable.firstChild) === null || ref === void 0 ? void 0 : ref.nodeType) === 3 ? contenteditable.firstChild : contenteditable;\n selection$1.setBaseAndExtent(focusNode, 0, focusNode, 0);\n }\n } else {\n selection$1.setBaseAndExtent(element, 0, element, 0);\n }\n }\n}", "title": "" }, { "docid": "813becfa67f8ef87f26c2e696abcd546", "score": "0.5422438", "text": "function selectControlElements() {\n editor.on('click', function (e) {\n var target = e.target;\n\n // Workaround for bug, http://bugs.webkit.org/show_bug.cgi?id=12250\n // WebKit can't even do simple things like selecting an image\n // Needs to be the setBaseAndExtend or it will fail to select floated images\n if (/^(IMG|HR)$/.test(target.nodeName) && dom.getContentEditableParent(target) !== \"false\") {\n e.preventDefault();\n editor.selection.select(target);\n editor.nodeChanged();\n }\n\n if (target.nodeName == 'A' && dom.hasClass(target, 'mce-item-anchor')) {\n e.preventDefault();\n selection.select(target);\n }\n });\n }", "title": "" }, { "docid": "fc5aac54a3bb1440bc3f9a7d71f53b7b", "score": "0.54220766", "text": "function prepareSelectAllHack() {\n if (te.selectionStart != null) {\n var selected = cm.somethingSelected()\n var extval = \"\\u200b\" + (selected ? te.value : \"\")\n te.value = \"\\u21da\" // Used to catch context-menu undo\n te.value = extval\n input.prevInput = selected ? \"\" : \"\\u200b\"\n te.selectionStart = 1; te.selectionEnd = extval.length\n // Re-set this, in case some other handler touched the\n // selection in the meantime.\n display.selForContextMenu = cm.doc.sel\n }\n }", "title": "" }, { "docid": "fc5aac54a3bb1440bc3f9a7d71f53b7b", "score": "0.54220766", "text": "function prepareSelectAllHack() {\n if (te.selectionStart != null) {\n var selected = cm.somethingSelected()\n var extval = \"\\u200b\" + (selected ? te.value : \"\")\n te.value = \"\\u21da\" // Used to catch context-menu undo\n te.value = extval\n input.prevInput = selected ? \"\" : \"\\u200b\"\n te.selectionStart = 1; te.selectionEnd = extval.length\n // Re-set this, in case some other handler touched the\n // selection in the meantime.\n display.selForContextMenu = cm.doc.sel\n }\n }", "title": "" }, { "docid": "aa2920a6494e6dbdec3eb5eeda7a41eb", "score": "0.5421844", "text": "function getCaretPosition(elem) {\nvar sel = window.getSelection();\nvar cum_length = [0, 0];\n\n if(sel.anchorNode == elem)\n cum_length = [sel.anchorOffset, sel.extentOffset];\n else {\n var nodes_to_find = [sel.anchorNode, sel.extentNode];\n if(!elem.contains(sel.anchorNode) || !elem.contains(sel.extentNode))\n return undefined;\n else {\n var found = [0,0];\n var i;\n node_walk(elem, function(node) {\n for(i = 0; i < 2; i++) {\n if(node == nodes_to_find[i]) {\n found[i] = true;\n if(found[i == 0 ? 1 : 0])\n return false; // all done\n }\n }\n\n if(node.textContent && !node.firstChild) {\n for(i = 0; i < 2; i++) {\n if(!found[i])\n cum_length[i] += node.textContent.length;\n }\n }\n });\n cum_length[0] += sel.anchorOffset;\n cum_length[1] += sel.extentOffset;\n }\n }\n if(cum_length[0] <= cum_length[1])\n return cum_length;\n return [cum_length[1], cum_length[0]];\n}", "title": "" }, { "docid": "41a566377571b6c0dcf3bf5e829b1912", "score": "0.5416579", "text": "function dismissBrowserSelection() {\n if (window.getSelection){\n var selection = window.getSelection();\n selection.collapse(document.body, 0);\n } else {\n var selection = document.selection.createRange();\n selection.setEndPoint(\"EndToStart\", selection);\n selection.select();\n }\n }", "title": "" }, { "docid": "6ae1d8cb4bb4ae9c02e41028eb4320dc", "score": "0.54138774", "text": "function prepareSelectAllHack() {\n if (te.selectionStart != null) {\n var selected = cm.somethingSelected();\n var extval = \"\\u200b\" + (selected ? te.value : \"\");\n te.value = \"\\u21da\"; // Used to catch context-menu undo\n te.value = extval;\n input.prevInput = selected ? \"\" : \"\\u200b\";\n te.selectionStart = 1; te.selectionEnd = extval.length;\n // Re-set this, in case some other handler touched the\n // selection in the meantime.\n display.selForContextMenu = cm.doc.sel;\n }\n }", "title": "" }, { "docid": "6ae1d8cb4bb4ae9c02e41028eb4320dc", "score": "0.54138774", "text": "function prepareSelectAllHack() {\n if (te.selectionStart != null) {\n var selected = cm.somethingSelected();\n var extval = \"\\u200b\" + (selected ? te.value : \"\");\n te.value = \"\\u21da\"; // Used to catch context-menu undo\n te.value = extval;\n input.prevInput = selected ? \"\" : \"\\u200b\";\n te.selectionStart = 1; te.selectionEnd = extval.length;\n // Re-set this, in case some other handler touched the\n // selection in the meantime.\n display.selForContextMenu = cm.doc.sel;\n }\n }", "title": "" }, { "docid": "6ae1d8cb4bb4ae9c02e41028eb4320dc", "score": "0.54138774", "text": "function prepareSelectAllHack() {\n if (te.selectionStart != null) {\n var selected = cm.somethingSelected();\n var extval = \"\\u200b\" + (selected ? te.value : \"\");\n te.value = \"\\u21da\"; // Used to catch context-menu undo\n te.value = extval;\n input.prevInput = selected ? \"\" : \"\\u200b\";\n te.selectionStart = 1; te.selectionEnd = extval.length;\n // Re-set this, in case some other handler touched the\n // selection in the meantime.\n display.selForContextMenu = cm.doc.sel;\n }\n }", "title": "" }, { "docid": "6ae1d8cb4bb4ae9c02e41028eb4320dc", "score": "0.54138774", "text": "function prepareSelectAllHack() {\n if (te.selectionStart != null) {\n var selected = cm.somethingSelected();\n var extval = \"\\u200b\" + (selected ? te.value : \"\");\n te.value = \"\\u21da\"; // Used to catch context-menu undo\n te.value = extval;\n input.prevInput = selected ? \"\" : \"\\u200b\";\n te.selectionStart = 1; te.selectionEnd = extval.length;\n // Re-set this, in case some other handler touched the\n // selection in the meantime.\n display.selForContextMenu = cm.doc.sel;\n }\n }", "title": "" }, { "docid": "6ae1d8cb4bb4ae9c02e41028eb4320dc", "score": "0.54138774", "text": "function prepareSelectAllHack() {\n if (te.selectionStart != null) {\n var selected = cm.somethingSelected();\n var extval = \"\\u200b\" + (selected ? te.value : \"\");\n te.value = \"\\u21da\"; // Used to catch context-menu undo\n te.value = extval;\n input.prevInput = selected ? \"\" : \"\\u200b\";\n te.selectionStart = 1; te.selectionEnd = extval.length;\n // Re-set this, in case some other handler touched the\n // selection in the meantime.\n display.selForContextMenu = cm.doc.sel;\n }\n }", "title": "" }, { "docid": "6ae1d8cb4bb4ae9c02e41028eb4320dc", "score": "0.54138774", "text": "function prepareSelectAllHack() {\n if (te.selectionStart != null) {\n var selected = cm.somethingSelected();\n var extval = \"\\u200b\" + (selected ? te.value : \"\");\n te.value = \"\\u21da\"; // Used to catch context-menu undo\n te.value = extval;\n input.prevInput = selected ? \"\" : \"\\u200b\";\n te.selectionStart = 1; te.selectionEnd = extval.length;\n // Re-set this, in case some other handler touched the\n // selection in the meantime.\n display.selForContextMenu = cm.doc.sel;\n }\n }", "title": "" }, { "docid": "6ae1d8cb4bb4ae9c02e41028eb4320dc", "score": "0.54138774", "text": "function prepareSelectAllHack() {\n if (te.selectionStart != null) {\n var selected = cm.somethingSelected();\n var extval = \"\\u200b\" + (selected ? te.value : \"\");\n te.value = \"\\u21da\"; // Used to catch context-menu undo\n te.value = extval;\n input.prevInput = selected ? \"\" : \"\\u200b\";\n te.selectionStart = 1; te.selectionEnd = extval.length;\n // Re-set this, in case some other handler touched the\n // selection in the meantime.\n display.selForContextMenu = cm.doc.sel;\n }\n }", "title": "" }, { "docid": "6ae1d8cb4bb4ae9c02e41028eb4320dc", "score": "0.54138774", "text": "function prepareSelectAllHack() {\n if (te.selectionStart != null) {\n var selected = cm.somethingSelected();\n var extval = \"\\u200b\" + (selected ? te.value : \"\");\n te.value = \"\\u21da\"; // Used to catch context-menu undo\n te.value = extval;\n input.prevInput = selected ? \"\" : \"\\u200b\";\n te.selectionStart = 1; te.selectionEnd = extval.length;\n // Re-set this, in case some other handler touched the\n // selection in the meantime.\n display.selForContextMenu = cm.doc.sel;\n }\n }", "title": "" }, { "docid": "6ae1d8cb4bb4ae9c02e41028eb4320dc", "score": "0.54138774", "text": "function prepareSelectAllHack() {\n if (te.selectionStart != null) {\n var selected = cm.somethingSelected();\n var extval = \"\\u200b\" + (selected ? te.value : \"\");\n te.value = \"\\u21da\"; // Used to catch context-menu undo\n te.value = extval;\n input.prevInput = selected ? \"\" : \"\\u200b\";\n te.selectionStart = 1; te.selectionEnd = extval.length;\n // Re-set this, in case some other handler touched the\n // selection in the meantime.\n display.selForContextMenu = cm.doc.sel;\n }\n }", "title": "" }, { "docid": "27d0182936e728433c852b1f9f90d2a8", "score": "0.5412191", "text": "function getDraftEditorSelectionWithNodes(editorState,root,anchorNode,anchorOffset,focusNode,focusOffset){var anchorIsTextNode=anchorNode.nodeType===Node.TEXT_NODE,focusIsTextNode=focusNode.nodeType===Node.TEXT_NODE;// If the selection range lies only on text nodes, the task is simple.\n// Find the nearest offset-aware elements and use the\n// offset values supplied by the selection range.\nif(anchorIsTextNode&&focusIsTextNode)return{selectionState:getUpdatedSelectionState(editorState,nullthrows(findAncestorOffsetKey(anchorNode)),anchorOffset,nullthrows(findAncestorOffsetKey(focusNode)),focusOffset),needsRecovery:!1};var anchorPoint=null,focusPoint=null,needsRecovery=!0;// An element is selected. Convert this selection range into leaf offset\n// keys and offset values for consumption at the component level. This\n// is common in Firefox, where select-all and triple click behavior leads\n// to entire elements being selected.\n//\n// Note that we use the `needsRecovery` parameter in the callback here. This\n// is because when certain elements are selected, the behavior for subsequent\n// cursor movement (e.g. via arrow keys) is uncertain and may not match\n// expectations at the component level. For example, if an entire <div> is\n// selected and the user presses the right arrow, Firefox keeps the selection\n// on the <div>. If we allow subsequent keypresses to insert characters\n// natively, they will be inserted into a browser-created text node to the\n// right of that <div>. This is obviously undesirable.\n//\n// With the `needsRecovery` flag, we inform the caller that it is responsible\n// for manually setting the selection state on the rendered document to\n// ensure proper selection state maintenance.\n// If the selection is collapsed on an empty block, don't force recovery.\n// This way, on arrow key selection changes, the browser can move the\n// cursor from a non-zero offset on one block, through empty blocks,\n// to a matching non-zero offset on other text blocks.\nreturn anchorIsTextNode?(anchorPoint={key:nullthrows(findAncestorOffsetKey(anchorNode)),offset:anchorOffset},focusPoint=getPointForNonTextNode(root,focusNode,focusOffset)):focusIsTextNode?(focusPoint={key:nullthrows(findAncestorOffsetKey(focusNode)),offset:focusOffset},anchorPoint=getPointForNonTextNode(root,anchorNode,anchorOffset)):(anchorPoint=getPointForNonTextNode(root,anchorNode,anchorOffset),focusPoint=getPointForNonTextNode(root,focusNode,focusOffset),anchorNode===focusNode&&anchorOffset===focusOffset&&(needsRecovery=!!anchorNode.firstChild&&\"BR\"!==anchorNode.firstChild.nodeName)),{selectionState:getUpdatedSelectionState(editorState,anchorPoint.key,anchorPoint.offset,focusPoint.key,focusPoint.offset),needsRecovery:needsRecovery};}", "title": "" }, { "docid": "ae98a0e50248bb1cb0f2080fefb2938a", "score": "0.54019076", "text": "function clearTextSelection() {\r\n document.getElementById('textStartOffset').value = 0;\r\n document.getElementById('startOffsetXpath').value = '';\r\n document.getElementById('textEndOffset').value = 0;\r\n document.getElementById('endOffsetXpath').value = '';\r\n document.getElementById('text-selection').innerHTML = \"No selection: alignment will default to entire text\";\r\n }", "title": "" } ]
67a2269de2abcbbee9d801ecb3907834
return a parameter value from the current URL
[ { "docid": "91ca986e363dfdc59c2baca77dede3c2", "score": "0.0", "text": "function getParam(sname) {\n var params = location.search.substr(location.search.indexOf(\"?\") + 1);\n var sval = \"\";\n params = params.split(\"&\");\n // split param and value into individual pieces\n for (var i = 0; i < params.length; i++) {\n temp = params[i].split(\"=\");\n if ([temp[0]] == sname) {\n sval = temp[1];\n }\n }\n return sval;\n}", "title": "" } ]
[ { "docid": "16e3cdff5269184c3b85c8453593bf71", "score": "0.78538245", "text": "getURL() {\n const urlParams = new URLSearchParams(window.location.search);\n this.myParam = urlParams.get(\"gp\");\n return this.myParam;\n }", "title": "" }, { "docid": "34f1e35781e8919dd6f1b6f704d76c1a", "score": "0.78038204", "text": "function getURLParameter(param){\n var pageURL = window.location.search.substring(1); //get the query string parameters without the \"?\"\n var URLVariables = pageURL.split('&'); //break the parameters and values attached together to an array\n for (var i = 0; i < URLVariables.length; i++) {\n var parameterName = URLVariables[i].split('='); //break the parameters from the values\n if (parameterName[0] == param) {\n return parameterName[1];\n }\n }\n return null;\n }", "title": "" }, { "docid": "4744a830c06e0dad259de4d2241fa3ff", "score": "0.76895285", "text": "function getURLParameter(name) {\n return (new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)')\n .exec(location.href) || [, \"\"])[1].replace(/\\+/g, '%20') || null;\n }", "title": "" }, { "docid": "a7d5e76145787a34c2aa255c9f08f9ab", "score": "0.7685471", "text": "function getURLParameter(name) {\n return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search)||[,\"\"])[1].replace(/\\+/g, '%20'))||null\n }", "title": "" }, { "docid": "195498921ded302f205bf66e83dfd63d", "score": "0.7682644", "text": "function getURLParameter(param) {\n var pageURL = decodeURIComponent(window.location.search.substring(1));\n var urlVariables = pageURL.split('&');\n for (var i = 0; i < urlVariables.length; i++) {\n var parameterName = urlVariables[i].split('=');\n if (parameterName[0] == param) {\n return parameterName[1];\n }\n }\n}", "title": "" }, { "docid": "1a8273b3171f02f4970705fb4a9d6847", "score": "0.76600784", "text": "function getURLParameter(param)\n {\n let pageURL = window.location.search.substring(1);\n let URLParameters = pageURL.split('&');\n for (let parameter of URLParameters)\n {\n let parameterName = parameter.split('=');\n if (parameterName[0] == param)\n return parameterName[1];\n }\n }", "title": "" }, { "docid": "d291c27bea7db7461a08d04cfd2e72c9", "score": "0.7617879", "text": "function getParamFromURL( name ) {\n name = name.replace(/[\\[]/,\"\\\\[\").replace(/[\\]]/,\"\\\\]\");\n var regexS = \"[\\?&]\"+name+\"=([^&#]*)\";\n var regex = new RegExp( regexS );\n var results = regex.exec( window.location.href );\n if( results == null )\n return \"\";\n else\n return results[1];\n }", "title": "" }, { "docid": "ff76327cbc2f8382680511cfca8e5b11", "score": "0.7599969", "text": "function getURLParameter(name) {\r\n\t\treturn decodeURI((new RegExp(name + '=' + '(.+?)(&|$)').exec(location.search) || [, ''])[1]);\r\n\t}", "title": "" }, { "docid": "1c2df9770a199ca2e406e97e2fc8b93e", "score": "0.7595839", "text": "function getURLParameter(name) {\n return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search)||[,\"\"])[1].replace(/\\+/g, '%20'))||null;\n }", "title": "" }, { "docid": "d87f9d985a7aa35f76ce04efd953d16d", "score": "0.7579677", "text": "function getURLParameter(name) {\n return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search)||[,\"\"])[1].replace(/\\+/g, '%20'))||null\n}", "title": "" }, { "docid": "7314e779614941ff1f6e7cb311390a14", "score": "0.7570973", "text": "function getURLParameter(name) {\r\n return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search) || [, \"\"])[1].replace(/\\+/g, '%20')) || null;\r\n}", "title": "" }, { "docid": "0bac71c208daf3792b16b650834b42bf", "score": "0.7567929", "text": "function getURLParameter(name) {\n\t return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search)||[,\"\"])[1].replace(/\\+/g, '%20'))||null;\n\t}", "title": "" }, { "docid": "b8664b2330ce9014d0aefd6cc3fdfbd1", "score": "0.7563373", "text": "function url_parameter(sParam)\n {\n var sPageURL = window.location.search.substring(1);\n var sURLVariables = sPageURL.split('&');\n for (var i = 0; i < sURLVariables.length; i++) \n {\n var sParameterName = sURLVariables[i].split('=');\n if (sParameterName[0] == sParam) \n {\n return sParameterName[1];\n }\n }\n }", "title": "" }, { "docid": "c555dfe35b487f7eebc0615faf74b812", "score": "0.75617814", "text": "function getURLParameter(name) {\n return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search) || [, \"\"])[1].replace(/\\+/g, '%20')) || null;\n }", "title": "" }, { "docid": "9fd422969031e567bfdb39f968931469", "score": "0.7555616", "text": "function getURLParameter (name) {\n\t\treturn decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search)||[,\"\"])[1].replace(/\\+/g, '%20'))||null;\n\t}", "title": "" }, { "docid": "9fd422969031e567bfdb39f968931469", "score": "0.7555616", "text": "function getURLParameter (name) {\n\t\treturn decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search)||[,\"\"])[1].replace(/\\+/g, '%20'))||null;\n\t}", "title": "" }, { "docid": "258cdaae53f842963d51846137359c6b", "score": "0.75352603", "text": "function getURLParameter(name) {\n return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search)||[,''])[1].replace(/\\+/g, '%20'))||null;\n}", "title": "" }, { "docid": "44ed607181406b3b088018573d5ae136", "score": "0.75223494", "text": "function getURLParameter(name) {\n return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search)||[,\"\"])[1].replace(/\\+/g, '%20'))||null\n}", "title": "" }, { "docid": "f061c33cf8308ae43f07683568b88cb8", "score": "0.7516804", "text": "function getURLParameter(name) {\r\n return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search) || [null, ''])[1].replace(/\\+/g, '%20')) || null;\r\n}", "title": "" }, { "docid": "6184fae94128c43d44ae2523105d9533", "score": "0.7514136", "text": "function getParam( name )\n{\n name = name.replace(/[\\[]/,\"\\\\\\[\").replace(/[\\]]/,\"\\\\\\]\");\n var regexS = \"[\\\\?&]\"+name+\"=([^&#]*)\";\n var regex = new RegExp( regexS );\n var results = regex.exec( window.location.href );\n if( results == null )\n return \"\";\n else\n return results[1];\n}", "title": "" }, { "docid": "f637eee9e6909a4493caf5ad46e3900b", "score": "0.75034434", "text": "function getURLParameter(name) {\n return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search)||[,\"\"])[1].replace(/\\+/g, '%20'))||null;\n}", "title": "" }, { "docid": "7f62b473e2c22c97320150c5873020eb", "score": "0.75005555", "text": "function getParameter(param) {\r\n\r\n var val = \"\";\r\n var qs = window.location.search;\r\n var start = qs.indexOf(param);\r\n\r\n if (start != -1) {\r\n start += param.length + 1;\r\n var end = qs.indexOf(\"&\", start);\r\n if (end == -1) {\r\n end = qs.length\r\n }\r\n val = qs.substring(start,end);\r\n }\r\n return val;\r\n}", "title": "" }, { "docid": "4c04175b0302e8ff4671364e62dde514", "score": "0.7497997", "text": "function getURLParameter(name) {\r\n\treturn decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search) || [null, ''])[1].replace(/\\+/g, '%20')) || null;\r\n}", "title": "" }, { "docid": "08d3f2c96e67b57a442f2ee320c2499b", "score": "0.74878716", "text": "function GetURLParameter(name) {\n return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search) || [null, ''])[1].replace(/\\+/g, '%20')) || null;\n }", "title": "" }, { "docid": "3f8e0a677c107951330c25455c858a38", "score": "0.748116", "text": "function getParameterValue(str){\n\tvar value = \"\";\n\tvar prmindex = window.location.href.indexOf(\"&\" + str + \"=\");\n\tif (prmindex === -1) {\n\t\tprmindex = window.location.href.indexOf(\"?\" + str + \"=\");\n\t}\n\tif (prmindex > -1) {\n\t\tvar startindex = window.location.href.indexOf(\"=\",prmindex) + 1;\n\t\tvar endindex = window.location.href.indexOf('&',startindex);\n\t\tif (endindex === -1) {\n\t\t\tendindex = window.location.href.length;\n\t\t}\n\t\tvalue = window.location.href.substring(startindex, endindex);\n\t}\n\treturn value;\n}", "title": "" }, { "docid": "fc1afc63d2d39489b8f87c272cf098d9", "score": "0.7451", "text": "function GetURLParameter(sParam)\n \t{\n \t var sPageURL = window.location.search.substring(1);\n \t var sURLVariables = sPageURL.split('&');\n \t for (var i = 0; i < sURLVariables.length; i++)\n \t {\n \t var sParameterName = sURLVariables[i].split('=');\n \t if (sParameterName[0] == sParam)\n \t {\n \t return sParameterName[1];\n \t }\n \t }\n \t}", "title": "" }, { "docid": "6d9e0ef2adb001feb149b77eeb9e5769", "score": "0.7448452", "text": "function getURLParameter(name) {\n\treturn decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search) || [null, ''])[1].replace(/\\+/g, '%20')) || null;\n}", "title": "" }, { "docid": "6d9e0ef2adb001feb149b77eeb9e5769", "score": "0.7448452", "text": "function getURLParameter(name) {\n\treturn decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search) || [null, ''])[1].replace(/\\+/g, '%20')) || null;\n}", "title": "" }, { "docid": "20994bf8104c0af28ae6cbaa079823e0", "score": "0.74455774", "text": "function getParameter(param){\n var value = \"\";\n var query = window.location.search;\n var iStart = query.indexOf(param);\n var iLen = param.length;\n var iCurrent = iStart + iLen + 1;\n while(query.charAt(iCurrent) != '&'\n && query.charAt(iCurrent) != \"\"){\n value += query.charAt(iCurrent);\n iCurrent++;\n }\n return value;\n}", "title": "" }, { "docid": "85089a37d949dd3107a2db8f156fe0f9", "score": "0.74390215", "text": "function GetRequestParam(name) {\n name = name.replace(/[\\[]/, \"\\\\\\[\").replace(/[\\]]/, \"\\\\\\]\");\n var regexS = \"[\\\\?&]\" + name + \"=([^&#]*)\";\n var regex = new RegExp(regexS);\n var results = regex.exec(window.location.href);\n if (results == null)\n return \"\";\n else\n return results[1];\n}", "title": "" }, { "docid": "41667a4c228a7fd6d4691db5f541ff22", "score": "0.7420817", "text": "function getParameter(name) \n{ \n var ref=window.location.href;\n var args = ref.split(\"?\"); \n var retval = \"\"; \n if(args[0] == ref) { \n return retval; \n } \n var str = args[1]; \n args = str.split(\"&\"); \n for(var i = 0; i < args.length; i++ ) { \n str = args[i]; \n var arg = str.split(\"=\"); \n if(arg.length <= 1) continue; \n if(arg[0] == name) retval = arg[1]; \n } \n return retval; \n}", "title": "" }, { "docid": "5c9286606dba1f74f4ff12ca055ef2f0", "score": "0.7419417", "text": "function getUrlValue(name){ \n\tvar r = location.search.substr(1).match(new RegExp(\"(^|&)\"+ name +\"=([^&]*)(&|$)\")); \n\tif (r!=null) return unescape(r[2]); return null;\n}", "title": "" }, { "docid": "749aa4438c92125c13b7d50559196f9a", "score": "0.74131125", "text": "function getURLParameter(name) {\n return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search.replace(/\\[/g, '%5B').replace(/\\]/g, '%5D')) || [null, ''])[1].replace(/\\+/g, '%20')) || null;\n}", "title": "" }, { "docid": "84a12ef00dfbebcec5bc0a96781825e1", "score": "0.74081385", "text": "function urlParam(name) {\n var results = new RegExp('[\\?&]' + name + '=([^&#]*)').exec(window.location.href);\n return results ? results[1] : \"\";\n}", "title": "" }, { "docid": "9e994cc512bad76a3c3784e8ede307c6", "score": "0.74050826", "text": "function getURLParameter(name) {\n name = name.replace(/[\\[]/, \"\\\\\\[\").replace(/[\\]]/, \"\\\\\\]\");\n var regexString = \"[\\\\?&]\" + name + \"=([^&#]*)\";\n var regex = new RegExp(regexString);\n var results = regex.exec(window.location.href);\n if (results == null) {\n return \"\";\n } else {\n return results[1];\n }\n}", "title": "" }, { "docid": "9e994cc512bad76a3c3784e8ede307c6", "score": "0.74050826", "text": "function getURLParameter(name) {\n name = name.replace(/[\\[]/, \"\\\\\\[\").replace(/[\\]]/, \"\\\\\\]\");\n var regexString = \"[\\\\?&]\" + name + \"=([^&#]*)\";\n var regex = new RegExp(regexString);\n var results = regex.exec(window.location.href);\n if (results == null) {\n return \"\";\n } else {\n return results[1];\n }\n}", "title": "" }, { "docid": "f94d54ffb502ac93bd84592d9d7993a1", "score": "0.7397278", "text": "function getURLParameter(key) {\n var result = new RegExp(key + '=([^&]*)', 'i').exec(window.location.search);\n return result && result[1] || '';\n}", "title": "" }, { "docid": "9d693d3f7dd0b076a70d03182a754629", "score": "0.73950505", "text": "function getUrlParameter(name) {\n var regexS = \"[\\\\?&]\" + name + \"=([^&#]*)\";\n var regex = new RegExp(regexS);\n var tmpURL = window.top.location.href;\n var results = regex.exec(tmpURL);\n if (results == null)\n return \"\";\n else\n return results[1];\n}", "title": "" }, { "docid": "979c1f901b93de2a5b13ee84d8db7f26", "score": "0.73871577", "text": "function getURLParameter(name) {\n return decodeURI(\n (RegExp(name + '=' + '(.+?)(&|$)').exec(location.search)||[,null])[1]\n );\n }", "title": "" }, { "docid": "df44e914789baac470bd2e02dd34f89e", "score": "0.7379212", "text": "function getURLParam( name )\r\n\t{ \r\n\t\tname = name.replace(/[\\[]/,\"\\\\\\[\").replace(/[\\]]/,\"\\\\\\]\"); \t\t\r\n\t\tvar regexS = \"[\\\\?&]\"+name+\"=([^&#]*)\"; \r\n\t\tvar regex = new RegExp( regexS ); \r\n\t\tvar results = regex.exec( window.location.href ); \r\n\t\tif( results == null ) \r\n\t\t\treturn \"\"; \r\n\t\telse \r\n\t\t\treturn results[1];\r\n\t}", "title": "" }, { "docid": "3410ea5c0648af5571ec7cf2f2d36539", "score": "0.7377696", "text": "function getParamFromUrl(paramName) {\n\t return (window.location.search.match(new RegExp('[?&]' + paramName + '=([^&]+)')) || [, null])[1];\n}", "title": "" }, { "docid": "9f962f95505c4e962407c492151123b3", "score": "0.73757994", "text": "function GetURLParameter(sParam)\r\n{\r\n\tvar sPageURL = window.location.search.substring(1);\r\n\tvar sURLVariables = sPageURL.split('&');\r\n\tfor (var i = 0; i < sURLVariables.length; i++)\r\n\t{\r\n\t\tvar sParameterName = sURLVariables[i].split('=');\r\n\t\tif (sParameterName[0] == sParam)\r\n\t\t{\r\n\t\t\treturn sParameterName[1];\r\n\t\t}\r\n\t}\r\n}", "title": "" }, { "docid": "7ca037e5e0db2aa2fce09994f83d33da", "score": "0.7375781", "text": "function getUrlParam(parameter, defaultvalue){\n var urlparameter = defaultvalue;\n if(window.location.href.indexOf(parameter) > -1){\n urlparameter = getUrlVars()[parameter];\n }\n return urlparameter;\n }", "title": "" }, { "docid": "141dc06a045d4d8020e26f128999eb1f", "score": "0.73600215", "text": "function GetURLParameter(sParam)\n{\n var sPageURL = window.location.search.substring(1);\n var sURLVariables = sPageURL.split('&');\n for (var i = 0; i < sURLVariables.length; i++)\n {\n var sParameterName = sURLVariables[i].split('=');\n if (sParameterName[0] == sParam)\n {\n return sParameterName[1];\n }\n }\n}", "title": "" }, { "docid": "d4d0e8983ad6e866c99e9caac630b0c4", "score": "0.7357268", "text": "urlParam(name){\n var results = new RegExp('[\\?&]' + name + '=([^&#]*)').exec(window.location.href)\n return (results && results[1]) || undefined\n }", "title": "" }, { "docid": "f73ba91d63cb5eb9e4baa1f4402ad0dd", "score": "0.73530334", "text": "function getURLParameter(name) {\n return decodeURI((RegExp(name + '=' + '(.+?)(&|$)').exec(location.search)||[,null])[1]);\n}", "title": "" }, { "docid": "cce171145c9aceb2c2beb406e3406bea", "score": "0.733858", "text": "function getUrlParam(name){\n if(window.location.search == '') return null;\n let params = window.location.search.substr(1).split('&').map(function(item){return item.split(\"=\").map(decodeURIComponent);});\n let found = params.find(function(item){return item[0] == name});\n return (typeof found == \"undefined\")?null:found[1];\n }", "title": "" }, { "docid": "2ec96c9df170c690a9d45240bc2dcfe1", "score": "0.7335934", "text": "function GetURLParameter(sParam){\n var sPageURL = window.location.search.substring(1);\n var sURLVariables = sPageURL.split('&');\n \n for (var i = 0; i < sURLVariables.length; i++){\n var sParameterName = sURLVariables[i].split('=');\n if (sParameterName[0] === sParam){\n return sParameterName[1];\n }\n }\n }", "title": "" }, { "docid": "88e8d77160136ac54a3c5c7ccdae91c9", "score": "0.7335838", "text": "function getURLParameter(name) {\n return decodeURI(\n (RegExp(name + '=' + '(.+?)(&|$)').exec(location.search)||[,null])[1]\n );\n}", "title": "" }, { "docid": "88e8d77160136ac54a3c5c7ccdae91c9", "score": "0.7335838", "text": "function getURLParameter(name) {\n return decodeURI(\n (RegExp(name + '=' + '(.+?)(&|$)').exec(location.search)||[,null])[1]\n );\n}", "title": "" }, { "docid": "7b6550641ee165f1eca4770239eaf9b0", "score": "0.7334258", "text": "function getURLParameter(name) {\n \"use strict\";\n // This function will return null if this specific parameter is not found\n var parameterValue = null;\n // Perform a regex match to find the value of the parameter from the query string\n var parameterRegex = new RegExp(\"[?|&]\" + name + \"=\" + \"([^&;]+?)(&|#|;|$)\").exec(location.search);\n if (parameterRegex) {\n // If the regex found a match, replace any occurrence of + by %20\n parameterValue = parameterRegex[1].replace(/\\+/g, \"%20\");\n // and perform proper decoding of the URI\n parameterValue = decodeURIComponent(parameterValue);\n }\n // Returns either null or the value of that parameter\n return parameterValue;\n}", "title": "" }, { "docid": "b91a235777587d1195717148dfc66ec0", "score": "0.7328501", "text": "function getParamValue(name) {\r\n var location = decodeURI(window.location.toString());\r\n var index = location.indexOf(\"?\") + 1;\r\n var subs = location.substring(index, location.length);\r\n var splitted = subs.split(\"&\");\r\n\r\n for (i = 0; i < splitted.length; i++) {\r\n var s = splitted[i].split(\"=\");\r\n var pName = s[0];\r\n var pValue = s[1];\r\n if (pName == name) {\r\n console.log(pValue);\r\n return pValue;\r\n }\r\n }\r\n}", "title": "" }, { "docid": "28938a74db77d68639888c70e162c6fb", "score": "0.732757", "text": "function getURLParam(param) {\n var result = null,\n tmp = [];\n var items = location.search.substr(1).split(\"&\");\n for (var index = 0; index < items.length; index++) {\n tmp = items[index].split(\"=\");\n if (tmp[0] === param) result = decodeURIComponent(tmp[1]);\n }\n return result;\n }", "title": "" }, { "docid": "57d42e137e29518f113350f175e67d3e", "score": "0.73251015", "text": "function GetURLParameter(param) {\n var pageURL = decodeURIComponent(window.location.search.substring(1)),\n urlVariables = pageURL.split('&'),\n paramName,\n i;\n\n for (i = 0; i < urlVariables.length; i++) {\n paramName = urlVariables[i].split('=');\n\n if (paramName[0] === param) {\n return paramName[1] === undefined ? true : paramName[1];\n }\n }\n }", "title": "" }, { "docid": "57a6f6712b79b18a28b6c11427dc4fec", "score": "0.73101074", "text": "function getParamURL(name) {\n return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search)||[,\"\"])[1].replace(/\\+/g, '%20'))||null\n}", "title": "" }, { "docid": "0710f4fd284f3edf5d433c2410b21dc4", "score": "0.7295997", "text": "function getParamValue(param) {\n var urlParamString = location.search.split(param + \"=\");\n if (urlParamString.length <= 1) \n\t{\n\t\treturn \"\";\n\t}\n else {\n var tmp = urlParamString[1].split(\"&\");\n return tmp[0];\n }\n}", "title": "" }, { "docid": "f96828d4c433ef9f100904771818796b", "score": "0.72953665", "text": "function getParam(key) {\n var p = window.location.search;\n p = p.match(new RegExp(key + '=([^&=]+)'));\n return p ? p[1] : false;\n }", "title": "" }, { "docid": "dbb87e96a20ce0018edee3837345ee0d", "score": "0.72902954", "text": "function getParam( name ) {\r\n\tname = name.replace(/[\\[]/,\"\\\\\\[\").replace(/[\\]]/,\"\\\\\\]\");\r\n\tvar regexS = \"[\\\\?&]\"+name+\"=([^&#]*)\";\r\n\tvar regex = new RegExp( regexS );\r\n\tvar results = regex.exec( window.location.href );\r\n\tif( results == null )\r\n\t\treturn null;\r\n\telse\r\n\t\treturn results[1];\r\n}", "title": "" }, { "docid": "919d55331df4a1d058f7471d14cb6a2b", "score": "0.72795075", "text": "function valueFromUrl(key) {\n\tvar r = new RegExp(`${key}=([^&]*)`);\n\tvar match = document.location.search.match(r);\n\tif (match && match[1]) {\n\t\treturn match[1];\n\t}\n\treturn null;\n}", "title": "" }, { "docid": "0ffc3282a4139ea45086e5e8c55810d3", "score": "0.7275567", "text": "function getURLParameter(VarSearch, defaultval){\n var SearchString = window.location.search.substring(1);\n SearchString = SearchString.replace(/\\%22/g, '\"').replace(/'/g,\"%27\"); // url decoder\n var VariableArray = SearchString.split('&');\n for(var i = 0; i < VariableArray.length; i++){\n var str = VariableArray[i];\n var n = str.search('=');\n if (str.substring(0, n) == VarSearch) {\n return str.substring(n+1);\n };\n }\n return defaultval;\n}", "title": "" }, { "docid": "df9e42756ca2862e12c339630701b6eb", "score": "0.7265176", "text": "function getUrlParameter(param, dummyPath) {\n\t\tvar sPageURL = dummyPath || window.location.search.substring(1),\n\t\t\tsURLVariables = sPageURL.split(/[&||?]/),\n\t\t\tres;\n\n\t\tforEach(sURLVariables, function (paramName) {\n\t\t\tvar sParameterName = (paramName || '').split('=');\n\t\t\t\n\t\t\tif (sParameterName[0] === param) {\n\t\t\t\tres = sParameterName[1];\n\t\t\t}\n\t\t});\n\n\t\treturn res;\n\t}", "title": "" }, { "docid": "b7cbb96d0bfebb3f2ec625e9f7f6508a", "score": "0.72599816", "text": "function getUrlParam(name){\n var results = new RegExp('[\\?&]' + name + '=([^&#]*)').exec(window.location.href);\n if (results==null){\n return null;\n }else{\n return results[1] || 0;\n }\n}//END getUrlParam function", "title": "" }, { "docid": "0378da02ccbef357353ec5677ab758bc", "score": "0.7238517", "text": "function getParam(name, url) {\n if (!url) url = window.location.href;\n name = name.replace(/[\\[\\]]/g, \"\\\\$&\");\n var regex = new RegExp(\"[?&]\" + name + \"(=([^&#]*)|&|#|$)\"),\n results = regex.exec(url);\n if (!results) return null;\n if (!results[2]) return '';\n return decodeURIComponent(results[2].replace(/\\+/g, \" \"));\n}", "title": "" }, { "docid": "a4924a4128d2c19e3dd2e9ff54ec05b8", "score": "0.7203777", "text": "function getParameterValues(param) {\n\n var url = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');\n for (var i = 0; i < url.length; i++)\n {\n var urlparam = url[i].split('=');\n if (urlparam[0] === param) {\n return urlparam[1];\n }\n }\n }", "title": "" }, { "docid": "c232da3f3c0d5d1c9c99f177fcd29abe", "score": "0.7200796", "text": "function getURLParam(name) {\n name = name.replace(/[\\[]/, \"\\\\\\[\").replace(/[\\]]/, \"\\\\\\]\");\n var regexS = \"[\\\\?&]\" + name + \"=([^&#]*)\";\n var regex = new RegExp(regexS);\n var results = regex.exec(window.location.search);\n if(results == null)\n return \"\";\n else\n return decodeURIComponent(results[1].replace(/\\+/g, \" \"));\n }", "title": "" }, { "docid": "9fd39bbb337c81d3dcb1aafbf66f7ccb", "score": "0.7199171", "text": "function getUrlParam(name){\n if(name=(new RegExp('[?&]'+encodeURIComponent(name)+'=([^&]*)')).exec(location.search))\n return decodeURIComponent(name[1]);\n }", "title": "" }, { "docid": "d7605bf340f2efc3b79b8d50d90f9e12", "score": "0.7187314", "text": "function getUrlParameter(sParam)\n {\n var sPageURL = window.location.search.substring(1);\n var sURLVariables = sPageURL.split('&');\n for (var i = 0; i < sURLVariables.length; i++) \n {\n var sParameterName = sURLVariables[i].split('=');\n if (sParameterName[0] == sParam) \n {\n return sParameterName[1];\n }\n }\n }", "title": "" }, { "docid": "563adb956b68f0e1a29edc96f9b4bbee", "score": "0.71872336", "text": "function getUrlParam(name){\n\tvar reg = new RegExp(\"(^|&)\"+ name +\"=([^&]*)(&|$)\");\n\tvar r = window.location.search.substr(1).match(reg);\n\tif (r!=null) return unescape(r[2]);\n\treturn null;\n}", "title": "" }, { "docid": "835651e1ff16cde50515ce1f340f6d9c", "score": "0.71860427", "text": "function GetURLParameter(sParam) {\r\n\t\tvar sPageURL = window.location.search.substring(1),\r\n\t\t\tsURLVariables = sPageURL.split('&');\r\n\t\tfor (var i = 0; i < sURLVariables.length; i++) {\r\n\t\t\tvar sParameterName = sURLVariables[i].split('=');\r\n\t\t\tif (sParameterName[0] == sParam) {\r\n\t\t\t\treturn sParameterName[1];\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "9d322e4bf84f17f55635d70566cb86ca", "score": "0.71850437", "text": "function getUrlParameter(name) {\n var pageURL = window.location.search.substring(1),\n urlVariables = pageURL.split(\"&\"),\n paramName,\n i;\n\n for (i = 0; i < urlVariables.length; i++) {\n paramName = urlVariables[i].split('=');\n\n if (paramName[0] === name) {\n return paramName[1] === undefined ? true : decodeURIComponent(paramName[1]);\n }\n }\n\n}", "title": "" }, { "docid": "bf9e5ec2a8dfccac8df9dfd8f1ed25cf", "score": "0.71821415", "text": "function GetURLParam(sParam)\n{\n var sPageURL = window.location.search.substring(1);\n var sURLVariables = sPageURL.split('&');\n for (var i = 0; i < sURLVariables.length; i++)\n {\n var sParameterName = sURLVariables[i].split('=');\n if (sParameterName[0] == sParam)\n {\n return sParameterName[1].replace('+', ' ');\n }\n }\n}", "title": "" }, { "docid": "e10259cdd44b0ae6864984d05bde94c9", "score": "0.717447", "text": "function get_param(param) {\n\tvar search = window.location.search.substring(1);\n\tif (search.indexOf('&') > -1) {\n\t\tvar params = search.split('&');\n\t\tfor (var i = 0; i < params.length; i++) {\n\t\t\tvar key_value = params[i].split('=');\n\t\t\tif (key_value[0] == param)\n\t\t\t\treturn key_value[1];\n\t\t}\n\t} else {\n\t\tvar params = search.split('=');\n\t\tif (params[0] == param)\n\t\t\treturn params[1];\n\t}\n\treturn null;\n}", "title": "" }, { "docid": "183462d309fd459d0d0dccb8d6d9a7fc", "score": "0.7171718", "text": "function getParameter(name) {\n var query = window.location.search.substring(1);\n params = query.split('&');\n for (var i = 0; i < params.length; ++i) {\n var p = params[i].split('=');\n if (p[0] === name) {\n return p[1];\n }\n }\n return null;\n }", "title": "" }, { "docid": "a217b1a744e1042b2b53d987df9bb17d", "score": "0.7168014", "text": "function getParameterValue(key, url) {\r\n ERROR = 'ERROR';\r\n \r\n String.prototype.get = function(p){\r\n return (match = this.match(new RegExp(\"[?|&]?\" + p + \"=([^&]*)\"))) ? match[1] : ERROR;\r\n };\r\n \r\n var value = window.location.search.get(key);\r\n if (value == ERROR) {\r\n return null;\r\n }\r\n \r\n return value;\r\n}", "title": "" }, { "docid": "7596281c0fb0dc691643850a91a86957", "score": "0.7157314", "text": "function getParameter(key) {\n key = key.replace(/[\\[]/,'\\\\\\[').replace(/[\\]]/,'\\\\\\]');\n var regexS = '[\\\\?&]' + key + '=([^&#]*)';\n var regex = new RegExp(regexS);\n var results = regex.exec(window.location.href);\n if(results == null)\n return '';\n else\n return results[1];\n}", "title": "" }, { "docid": "622f5fc62133cbdb0a447af646ac618d", "score": "0.71545714", "text": "static GetUrlParameter (name) {\t\t\t\t\n\t\tname = name.replace(/[\\[\\]]/g, '\\\\$&');\n\t\t\n\t\tvar regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)');\n\t\t\n\t\tvar results = regex.exec(window.location.href);\n\t\t\n\t\tif (!results) return null;\n\t\t\n\t\tif (!results[2]) return '';\n\t\t\n\t\treturn decodeURIComponent(results[2].replace(/\\+/g, ' '));\n\t}", "title": "" }, { "docid": "d777a68d1170eb327fe4d4b7dd980d3c", "score": "0.7151103", "text": "function getUrlParameter(name)\n{\n\t// Return the value of the specified URL parameter, if it exists.\n\tname = name.replace(/[\\[]/,\"\\\\\\[\").replace(/[\\]]/,\"\\\\\\]\");\n\tvar regexS = \"[\\\\?&]\"+name+\"=([^&#]*)\";\n\tvar regex = new RegExp( regexS );\n\tvar results = regex.exec( window.location.href );\n\tif( results == null )\n\t{\n \treturn \"\";\n }\n\telse\n {\n\t\treturn results[1];\n\t}\n}", "title": "" }, { "docid": "d7bb74a35ca33f8583467b4fcd9fecc4", "score": "0.7147497", "text": "function GetParameterValues(param) {\n var url = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');\n for (var i = 0; i < url.length; i++) {\n var urlparam = url[i].split('=');\n if (urlparam[0] == param) {\n return urlparam[1];\n }\n }\n}", "title": "" }, { "docid": "c6769a52aaf37bb7d757939825750c29", "score": "0.7146845", "text": "function getURLParameter(sParam) {\n\tvar sPageURL = window.location.search.substring(1);\n\tvar sURLVariables = sPageURL.split('&');\n\tfor (var i = 0; i < sURLVariables.length; i++) {\n\t\tvar sParameterName = sURLVariables[i].split('=');\n\t\tif (sParameterName[0] == sParam) {\n\t\t\treturn sParameterName[1];\n\t\t}\n\t}\n}", "title": "" }, { "docid": "124e67ab5c4f9b01790aa2357cfc99a1", "score": "0.71343863", "text": "function getURLSearch() {\n return window.location.search.substring(1);\n}", "title": "" }, { "docid": "6e8cb903b1d467f240aae163d7d1847c", "score": "0.71100134", "text": "function getParam(parameterName){\r\n\tvar queryStr = window.location.search.substring(1);\r\n\tvar properties = queryStr.split(\"&\");\r\n\tfor(var i = 0; i < properties.length; i++){\r\n\t\tvar propertyPair = properties[i];\r\n\t\tproperty = propertyPair.split(\"=\");\r\n\t\tif(property[0] == parameterName){\r\n\t\t\tif(property.length != 1)\r\n\t\t\t\treturn property[1];\r\n\t\t\telse\r\n\t\t\t\treturn \"\";\r\n\t\t}\r\n\t}\r\n\treturn \"\";\r\n}", "title": "" }, { "docid": "36ec57c03b0ab79c62336f6bbe883a1c", "score": "0.7106897", "text": "function getUrlParameter(sParam)\n{\n var sPageURL = window.location.search.substring(1);\n var sURLVariables = sPageURL.split('&');\n for (var i = 0; i < sURLVariables.length; i++) \n {\n var sParameterName = sURLVariables[i].split('=');\n if (sParameterName[0] == sParam) \n {\n return sParameterName[1];\n }\n }\n}", "title": "" }, { "docid": "146442094ef689be9175d3f618d8cff9", "score": "0.70991653", "text": "function getUrlParameter(sParam)\n{\n var sPageURL = window.location.search.substring(1);\n var sURLVariables = sPageURL.split('&');\n for (var i = 0; i < sURLVariables.length; i++)\n {\n var sParameterName = sURLVariables[i].split('=');\n if (sParameterName[0] == sParam) \n {\n return sParameterName[1];\n }\n }\n}", "title": "" }, { "docid": "46dc4336fb72e19da9703c9f4e84d7eb", "score": "0.70980954", "text": "static GetUrlParameter (name) {\t\t\t\t\r\n\t\tname = name.replace(/[\\[\\]]/g, '\\\\$&');\r\n\t\t\r\n\t\tvar regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)');\r\n\t\t\r\n\t\tresults = regex.exec(window.location.href);\r\n\t\t\r\n\t\tif (!results) return null;\r\n\t\t\r\n\t\tif (!results[2]) return '';\r\n\t\t\r\n\t\treturn decodeURIComponent(results[2].replace(/\\+/g, ' '));\r\n\t}", "title": "" }, { "docid": "1c1157f7c49ae50c99b248dd043820f2", "score": "0.7067994", "text": "function get_param_by_name ( name, url = null ) {\n if (!url) {\n url = window.location.href;\n }\n name = name.replace(/[\\[\\]]/g, \"\\\\$&\");\n var regex = new RegExp(\"[?&]\" + name + \"(=([^&#]*)|&|#|$)\"),\n results = regex.exec(url);\n if (!results)\n return null;\n if (!results[2])\n return \"\";\n return decodeURIComponent(results[2].replace(/\\+/g, \" \"));\n}", "title": "" }, { "docid": "e9e26dbda27bcd7402a7c7becc62b6fa", "score": "0.70664424", "text": "function urlParameter(param) {\n var query = window.location.search.substring(1);\n var vars = query.split(\"&\");\n for (var i = 0; i < vars.length; i++) {\n var pair = vars[i].split(\"=\");\n if (pair[0] == param) {\n return pair[1];\n }\n }\n return(false);\n}", "title": "" }, { "docid": "7ce15a51ab3926604d26a4e6eb082157", "score": "0.7059199", "text": "function __getUrlParamValue($name, $url) {\r\n var url = $url || document.location.toString();\r\n var qIdx = url.indexOf(\"?\");\r\n if (qIdx==-1)\r\n return null;\r\n url = url.substr(qIdx);\r\n var nIdx = url.indexOf($name + \"=\");\r\n if (nIdx==-1)\r\n return null;\r\n url = url.substr(nIdx+$name.length+1) + \"&\";\r\n var dIdx = url.indexOf(\"&\");\r\n if (dIdx==-1)\r\n return null;\r\n return url.substr(0, dIdx);\r\n}", "title": "" }, { "docid": "825a6ec18b369e8564853a1ef6588e20", "score": "0.70467657", "text": "function urlParam(name) {\n\tvar results = new RegExp('[\\\\?&]' + name + '=([^&#]*)').exec(window.location.href);\n\tif (!results) { return 0; }\n\treturn results[1] || 0;\n}", "title": "" }, { "docid": "5a7480f2522ab60b610772528c9c9c60", "score": "0.7038732", "text": "function getURLParameter(url, name) {\n const urlParsed = coreHttp.URLBuilder.parse(url);\n return urlParsed.getQueryParameterValue(name);\n}", "title": "" }, { "docid": "5a7480f2522ab60b610772528c9c9c60", "score": "0.7038732", "text": "function getURLParameter(url, name) {\n const urlParsed = coreHttp.URLBuilder.parse(url);\n return urlParsed.getQueryParameterValue(name);\n}", "title": "" }, { "docid": "eb646765bd25fed6f863f1532818b36d", "score": "0.7036299", "text": "function getUrlParam(name) {\n var name = name.replace('[', '\\\\[').replace(']', '\\\\]');\n var regex = new RegExp(\"[\\\\?&]\" + name + \"=([^&#]*)\");\n var results = regex.exec(window.location);\n if(results === null)\n return '';\n else\n return results[1];\n}", "title": "" }, { "docid": "833877d3e06211265d15c51b1cabe265", "score": "0.70268166", "text": "function queryValue() {\n var qrStr = window.location.search;\n if (qrStr)\n var qrvalue = (qrStr.split(\"?\")[1].split(\"=\")[1]);\n return decodeURIComponent(qrvalue);\n}", "title": "" }, { "docid": "0b37ecde4c6bbc6e7f1a01bb7bcd8220", "score": "0.70206267", "text": "function getUrlParameter(sParam) {\n var sPageURL = window.location.search.substring(1);\n var sURLVariables = sPageURL.split('&');\n for (var i = 0; i < sURLVariables.length; i++) {\n var sParameterName = sURLVariables[i].split('=');\n if (sParameterName[0] == sParam) {\n return sParameterName[1];\n }\n }\n }", "title": "" }, { "docid": "d7c96647083e29a39154ae4046d8ac05", "score": "0.7017574", "text": "function getUrlParameter(sParam)\n{\n var sPageURL = window.location.search.substring(1);\n var sURLVariables = sPageURL.split('&');\n for (var i = 0; i < sURLVariables.length; i++)\n {\n var sParameterName = sURLVariables[i].split('=');\n if (sParameterName[0] == sParam)\n {\n return sParameterName[1];\n }\n }\n}", "title": "" }, { "docid": "0cb3c00a5d49959beffa8193ad800387", "score": "0.7014749", "text": "function getParam(regex){\r\n\treturn document.location.pathname.match(regex);\r\n}", "title": "" }, { "docid": "c1ac712e8f24a9d9368e6d32d6c39d1f", "score": "0.70135415", "text": "function getParameter(param){\n\tvar params = window.location.search.substr(1);\n\tparams = params.split('&');\n\t\n\tif (params.length > 0){\n\t\tvar i;\n\t\tfor(i = 0; i < params.length; i++){\n\t\t\tif(param === params[i].split('=')[0]){\n\t\t\t\treturn params[i].split('=')[1];\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn null;\n}", "title": "" }, { "docid": "054d703585a95983a4cb24675e6359bf", "score": "0.7010467", "text": "function getUrlParameter(sParam) {\n var sPageURL = window.location.search.substring(1);\n var sURLVariables = sPageURL.split('&');\n for (var i = 0; i < sURLVariables.length; i++) {\n var sParameterName = sURLVariables[i].split('=');\n if (sParameterName[0] == sParam) {\n return sParameterName[1];\n }\n }\n }", "title": "" }, { "docid": "054d703585a95983a4cb24675e6359bf", "score": "0.7010467", "text": "function getUrlParameter(sParam) {\n var sPageURL = window.location.search.substring(1);\n var sURLVariables = sPageURL.split('&');\n for (var i = 0; i < sURLVariables.length; i++) {\n var sParameterName = sURLVariables[i].split('=');\n if (sParameterName[0] == sParam) {\n return sParameterName[1];\n }\n }\n }", "title": "" }, { "docid": "6dd7ef54befe3e6bb872d96cfb7d674f", "score": "0.7004947", "text": "function getURLParameter (name) {\n // jshint elision: true\n /* eslint-disable no-sparse-arrays */\n return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search) ||\n [ , '' ])[ 1 ].replace(/\\+/g, '%20')) || null;\n /* eslint-enable no-sparse-arrays */\n }", "title": "" }, { "docid": "2a53ad2b959e94e4802fb3359bc6b98b", "score": "0.7004092", "text": "function getURLParameterByName(name) {\n var match = RegExp('[?&]' + name + '=([^&]*)').exec(window.location.search);\n return match && decodeURIComponent(match[1].replace(/\\+/g, ' '));\n }", "title": "" }, { "docid": "284bbd034fda1c597a1c2e5d92615c0e", "score": "0.69945425", "text": "function getParameter(url, paramName) {\n if (!url) {\n return '';\n }\n var regex = new RegExp(\"[?&]\" + paramName + \"=(\\\\d+)\");\n var match = url.match(regex);\n return match && match.length > 1 ? match[1] : '';\n }", "title": "" } ]
d22ae1f5c87bb132c5927012a94abb66
triggered by state change on Appmodel
[ { "docid": "e8b8ffb857e3b3e0f87ad4ea99cf6de7", "score": "0.0", "text": "setSpinnerState(){\n\t\tthis.setState(AppModel.spinnerState);\n\t}", "title": "" } ]
[ { "docid": "0610421887ecac78e887a5cced8a1a47", "score": "0.68849367", "text": "onStateChange() {\n\t\t// brute force update entire UI on store change to keep demo app simple\n\t\tthis.forceUpdate();\n\t}", "title": "" }, { "docid": "fc0acf0ccc8b1932a94b01790df5d996", "score": "0.6693736", "text": "stateChange(){\n //\n }", "title": "" }, { "docid": "2039837a7682b474ff1a5e31d9103131", "score": "0.6507723", "text": "function onModelChanged() {\n component.setValue(scope.items, true);\n component.refreshOptions(false);\n }", "title": "" }, { "docid": "6acebf0c3caff8eb032e10f202ef9423", "score": "0.6498698", "text": "_listen() {this._model.on('change', this._changed)}", "title": "" }, { "docid": "e6e25cd7d0417126c814fd38e60d3936", "score": "0.6427719", "text": "changeAppState() {\n var itemStateObj = {\n appState: 'mainMenu',\n soundboardId: 'default',\n soundboardHeading: 'Soundboard!'\n }\n\n this.props.appStatusChanger(itemStateObj);\n }", "title": "" }, { "docid": "cb39ae973ef9973c9c7bcc709984730f", "score": "0.6405798", "text": "_handleChange(){\n this.setState(this._getAppState())\n }", "title": "" }, { "docid": "7cfea5976105d675f7b3a52e4983a7a0", "score": "0.63955027", "text": "_updateState() {\n console.log('State should be changed');\n }", "title": "" }, { "docid": "11a968bafee6991161a887db6b78465a", "score": "0.63856167", "text": "appliesToState() {}", "title": "" }, { "docid": "2eb0de64ce3323f49a8463e5407dcdd2", "score": "0.6379272", "text": "_onChange() {\n this._updateState();\n }", "title": "" }, { "docid": "2eb0de64ce3323f49a8463e5407dcdd2", "score": "0.6379272", "text": "_onChange() {\n this._updateState();\n }", "title": "" }, { "docid": "102429f2257e2dcedf671e34c9c40581", "score": "0.6329857", "text": "updateModel() {\n this.notifyPropertyChange('model');\n }", "title": "" }, { "docid": "101a4646cfb05f020eb7dee530cb8c99", "score": "0.6322167", "text": "storeChanged() {}", "title": "" }, { "docid": "aabe5cd62e03316d85198858e288ab93", "score": "0.6288935", "text": "stateChanged(state) {\n\t\t// console.log('home',state);\n\t\tthis._sensor = sensorListSelector(state);\n\t\tthis._locale = state.i18n.locale;\n\t}", "title": "" }, { "docid": "4761fb8a8fc567541cef1aa14e9492b1", "score": "0.624173", "text": "askForAppState() {\n socket.emit('get app state');\n }", "title": "" }, { "docid": "b61d219c4bc7f9333ff9117fa64a3672", "score": "0.6215877", "text": "function OnElectricCurrentOperation_Change( e )\n{\n Alloy.Globals.UsersResidentsModeInfrastructure[\"ELECTRIC_CURRENT_OPERATION\"] = e.id ;\n}", "title": "" }, { "docid": "451dea781fc621a2bf4b7f5633d9056e", "score": "0.62038785", "text": "emitChange() {\n this.emit(STATE_CHANGE_EVENT);\n }", "title": "" }, { "docid": "daae4ee53b150d15c593734ef8759ebc", "score": "0.61898804", "text": "afterChangeMachineState () {\n }", "title": "" }, { "docid": "5e8b6387bc4d27e42ecf3132d8d1372a", "score": "0.61184543", "text": "function onchange (action, state, oldState) {\n yo.update(document.getElementById('app'), render(state))\n}", "title": "" }, { "docid": "65e95cf85037dd7e998f4230e3f8d525", "score": "0.61060995", "text": "function onChanges() {\n refreshActions();\n }", "title": "" }, { "docid": "30d30cf4a6cb7bf781c0f8a4484f2bac", "score": "0.60565597", "text": "_onChange(){\n log(\"Profile Component received change event from App store\", DEBUG);\n this.fnGetDataFromStore(); \n }", "title": "" }, { "docid": "99465f9720da8fb2dcad0d2381130e8a", "score": "0.60130227", "text": "_onChange(){\n\t\tconsole.log('Setting state with new soundPath state..');\n\t\t// set state with new data from the store...\n\t\t// this.setState(getSoundPathsState());\n\t}", "title": "" }, { "docid": "8ad353e7bc415a8b4386a8f182c94f7e", "score": "0.60008675", "text": "_onSharedModelChanged(sender, change) {\n super._onSharedModelChanged(sender, change);\n this._modelDBMutex(() => {\n if (change.outputsChange) {\n this.clearExecution();\n sender.getOutputs().forEach(output => this._outputs.add(output));\n }\n if (change.executionCountChange) {\n this.executionCount = change.executionCountChange.newValue\n ? change.executionCountChange.newValue\n : null;\n }\n });\n }", "title": "" }, { "docid": "3a7d3bca34becf71fde3f0bbf3438a3d", "score": "0.5996205", "text": "runApplication() {\n _appView.removeLoadingMessage();\n\n //'TITLE' 'PLAYER_SELECT' 'MAIN_GAME'\n _appStore.apply(_noriActions.changeStoreState({currentState: 'PLAYER_SELECT'}));\n }", "title": "" }, { "docid": "d5240eaf22d9553de6bcc3112b248915", "score": "0.5987039", "text": "function OnStateUpdate(self, state)\n {\n set_view(self, state);\n }", "title": "" }, { "docid": "9588830934f70d1e59a7d727a6abacb2", "score": "0.5968291", "text": "changeImmersive ( ) {\n\n // update the view in threeEntryPoint\n this.threeEntryPoint.changeView( this.state.activeViewId );\n\n // update the current data on record\n var dataRecord = this.getDataById(this.state.activeViewId);\n // console.log('App.js got data record');\n // console.log(dataRecord);\n\n this.setState({\n activeViewData: dataRecord\n }, function() {\n //console.log('App.js set state for data record');\n //console.log(dataRecord);\n });\n\n }", "title": "" }, { "docid": "5615bdf2782710c50b94e097b8d2918b", "score": "0.5967484", "text": "_onChange() {\n this.setState(getStateFromStores());\n }", "title": "" }, { "docid": "7954ac28b4b5d3bf22fa1726a4ca70b6", "score": "0.595203", "text": "onAppStateChange () {\n\n\t\t// Pass whitelisted data from Redux state\n\t\t// (as defined by reducers.js) down into components.\n\t\tlet storeState = this.props.store.getState(),\n\t\t\tcomponentState = {};\n\n\t\tif (storeState.map) {\n\t\t\tcomponentState.map = Object.assign({}, storeState.map);\n\t\t}\n\n\t\tif (storeState.itemSelector) {\n\t\t\tcomponentState.itemSelector = {\n\t\t\t\ttitle: storeState.itemSelector.title,\n\t\t\t\titems: storeState.itemSelector.items,\n\t\t\t\tselectedItem: storeState.itemSelector.selectedItem\n\t\t\t};\n\t\t}\n\n\t\tif (storeState.exampleComponent) {\n\t\t\tcomponentState.exampleComponent = {\n\t\t\t\tinited: storeState.exampleComponent.inited,\n\t\t\t\tcount: storeState.exampleComponent.count\n\t\t\t};\n\t\t}\n\n\t\t// Call `setState()` with the updated data, which causes a re-`render()`\n\t\tthis.setState(componentState);\n\n\t}", "title": "" }, { "docid": "e4630abf33b16dcd57c01c09af8dde02", "score": "0.5941353", "text": "changed(evt) {\n const data = {};\n data[evt.currentTarget.name] = evt.currentTarget.value;\n this.model.set(data);\n }", "title": "" }, { "docid": "198a3d6f3cdc8f6ba78057d65946c414", "score": "0.59288186", "text": "fwk_app_on_show() {\n this.fwk_app_on_update();\n }", "title": "" }, { "docid": "b8238c86e67eb5b05dd399a348602f82", "score": "0.59285414", "text": "previousChanged() { }", "title": "" }, { "docid": "0df0174173adaab4a68f67e3445a4517", "score": "0.5927923", "text": "function refreshDataInModelSuaban() {\n}", "title": "" }, { "docid": "497deea3caa3f2d3dcce5b0ca17ab2e9", "score": "0.59223133", "text": "updateAppearenceFromState() {}", "title": "" }, { "docid": "534c52b22bf4e33604f6c3b014c3621d", "score": "0.59220445", "text": "onPaneModelChanged() {\n this._updateContent(true);\n }", "title": "" }, { "docid": "a108b69874e0c1db4733d1c837795952", "score": "0.5886818", "text": "afterStateChange(k, v, mutated) {\n if(k === 'items' && mutated) {\n const {onChange} = this.props;\n onChange(v);\n this.updateView();\n }\n }", "title": "" }, { "docid": "91cc76bf84aa91f462cc049dd9d6ac3b", "score": "0.58642215", "text": "onChanged(e){}", "title": "" }, { "docid": "8b39b22039f2cdceb5793899cde30f50", "score": "0.58598983", "text": "onValueChange(event){ this.m_model.emitter.emit(event); }", "title": "" }, { "docid": "0664b2d5af795c5ed1085dd7954c5365", "score": "0.58404696", "text": "function updateState() {\n //Do whatever you need with the data here\n }", "title": "" }, { "docid": "0a6774508ab5f562138f85644a66e7c0", "score": "0.5802125", "text": "modelPicked(model) {\n this.setState({ vehicleModel: model, vehicleTrim: '' }, function () {\n console.log(this.state, 'Updated Model')\n });\n }", "title": "" }, { "docid": "04c17007dcc9b1cfffecc595dc5496af", "score": "0.58001834", "text": "function appChanged(app) {\n const $app = $(app);\n const id = $app.attr('id');\n const match = id.match(/appselect_option_(you|them)_(\\d+)_(\\d+)/);\n \n if (match) {\n const isYou = match[1] === 'you';\n const [ , , appid, contextid] = match;\n \n tradeOfferWindow.updateDisplay(isYou, appid, contextid);\n }\n }", "title": "" }, { "docid": "9e58deaa6448bf097069d086230a806c", "score": "0.5787503", "text": "onRunningChanged(sender, models) {\n this._populateSessions(models);\n this._refreshed.emit(void 0);\n }", "title": "" }, { "docid": "1d5ed8458b04028f83cdfce04849655e", "score": "0.5784678", "text": "get state() {\r\n return this.view.state;\r\n }", "title": "" }, { "docid": "25c77e187883c8456a622bc6bed31a42", "score": "0.5780614", "text": "_onChange() {\n this.setState(getStateFromStores());\n }", "title": "" }, { "docid": "25c77e187883c8456a622bc6bed31a42", "score": "0.5780614", "text": "_onChange() {\n this.setState(getStateFromStores());\n }", "title": "" }, { "docid": "25c77e187883c8456a622bc6bed31a42", "score": "0.5780614", "text": "_onChange() {\n this.setState(getStateFromStores());\n }", "title": "" }, { "docid": "d7fde650d96088b9098cdb7271219bed", "score": "0.5779119", "text": "function applicationStateCheckpoint() {\n //TODO: Save State\n }", "title": "" }, { "docid": "11efe5b922e9c58cbf92b0777da99111", "score": "0.577041", "text": "function viewToModel(node) {\n try {\n setTimeout(function(){\n node.addEventListener(\"input\", (e) => {\n if(e.target.attributes[\"v2m-model\"] && e.target.attributes[\"v2m-model\"][\"value\"]) {\n let _this = getComponentByNode(e.target); // Getting component reference\n if(_this) {\n getObject(_this.state, e.target.attributes[\"v2m-model\"][\"value\"], e.target.value);\n _this.setState(_this.state);\n }\n }\n }); \n }, 0);\n } catch(err) {\n console.error(\"Unable to update view to model -- \" + err);\n }\n }", "title": "" }, { "docid": "dfc333d64c37a22b97eed1e1228142bb", "score": "0.5759306", "text": "_triggerChange(oldState, newState) {\n if (oldState !== newState) {\n this.stateChanged.emit(void 0);\n }\n }", "title": "" }, { "docid": "ac758b6476aae5f2376a29c39fd92375", "score": "0.5756254", "text": "beforeChangeMachineState () {\n }", "title": "" }, { "docid": "ac572badee7d38b181a5e61a71733a64", "score": "0.5749712", "text": "[checkingHandler]() {\n this.state = 1;\n this.lastInfoObject = undefined;\n this.emit('notify-windows', 'checking-for-update');\n this.emit('status-changed', 'checking-for-update');\n }", "title": "" }, { "docid": "31d085737bd04b6f8f0faa124e2bfdd1", "score": "0.5743777", "text": "refresh() {\n this.changed();\n }", "title": "" }, { "docid": "5e92c611614e0dc23292ffb1d845e32b", "score": "0.5741112", "text": "stateChanged(state){\n this.selectedFood = state.selectedFood;\n this.targetFood = state.targetFood\n }", "title": "" }, { "docid": "fa9ca66cce2702416cf56a6f9111112f", "score": "0.5739144", "text": "function onChange() {\n\t\t__debug_2560( 'Received a change event.' );\n\t\tself.render();\n\t}", "title": "" }, { "docid": "b6674df160fa8b097fbfaee4864ef18d", "score": "0.5738324", "text": "handleExternalChange() {\n if (this.device.updateRequested) {\n this.log(\"ALARMPANEL: \" + this.device.name + \" Ignoring external change\");\n return;\n }\n this.log(\"ALARMPANEL: \" + this.device.name + \" Source device. Currenty state locally -\" + this.device.getAlarmStatusAsText());\n this.log(\"ALARMPANEL: \" + this.device.name + \" Got alarm change notification. Setting HK target state to: \" + this.translateAlarmTargetStateToHK() + \" Setting HK Current state to: \" + this.translateAlarmCurrentStateToHK());\n this.alarmPanelService\n .setCharacteristic(Characteristic.SecuritySystemTargetState, this.translateAlarmTargetStateToHK());\n this.alarmPanelService\n .setCharacteristic(Characteristic.SecuritySystemCurrentState, this.translateAlarmCurrentStateToHK());\n }", "title": "" }, { "docid": "f77253b5039aacac83a9ebcc52f4e9cc", "score": "0.5731328", "text": "function CommonModel() {\n var self = this;\n self.selectedItem = ko.observable(\"input_area\");\n self.currentEdge = ko.observable(\"top\");\n self.appName = ko.observable(\"University of West Florida Data Analytics\");\n\n\n self.valueChangedListener = function (event) {\n console.log('Tab switched::' + JSON.stringify(event.detail));\n var oldtab = event.detail.previousValue;\n var oldmodel = modelObjects[oldtab];\n var newtab = event.detail.value;\n if (newtab == 'input_area') {\n console.log('Loading input/upload settings...');\n loadMenu(newtab, modelObjects);\n } else if (newtab == 'visualization_area') {\n console.log('Loading visualization settings...');\n loadMenu(newtab, modelObjects);\n } else if (newtab == 'dashboard_area') {\n console.log('Loading dashboard settings...');\n loadMenu(newtab, modelObjects);\n } else {\n }\n oldmodel.destroy(oldmodel);\n };\n\n self.launch = function (event) {\n console.log('Launching menu body');\n event.preventDefault();\n document.getElementById(\"myMenu\").open(event);\n }.bind(self);\n\n }", "title": "" }, { "docid": "6a74aa0ecec53f3e5a548cb596a9557d", "score": "0.57298774", "text": "refresh() {\n this.changed();\n }", "title": "" }, { "docid": "bef7a3ce36420aa5f7cf2a5e4c01e0b3", "score": "0.57230246", "text": "function onChange() {\n\t\t__debug_2682( 'Received a change event.' );\n\t\tself.render();\n\t}", "title": "" }, { "docid": "3925d4173dd5dd82918ede9aded4612c", "score": "0.5716867", "text": "notifyChange() {\n this.emit(\"change\");\n }", "title": "" }, { "docid": "33df2e676614f0663a82097bd0c95384", "score": "0.5711203", "text": "stateChange(handlerSongView, handlerModeView, handlerLyricsView) {\n this.viewUpdater = handlerSongView;\n this.updateModeBtnView = handlerModeView;\n this.updateLyricsView = handlerLyricsView;\n }", "title": "" }, { "docid": "3ea048a00e2bd5c1d1204ae538d45484", "score": "0.5707434", "text": "updateStateNormalEvents() {\n this.updateEventsContainer('state-normal');\n }", "title": "" }, { "docid": "f99846d4a37a352721290b5057cc22fc", "score": "0.5703466", "text": "updateState () {\n }", "title": "" }, { "docid": "de374caaf0d2e4135721583df5e7c776", "score": "0.5701452", "text": "on(e, $store) {\n $store.dispatch('editors/showWalkthroughPrevious', {\n query: {\n id: ID_MAIN,\n // state: ['focused'],\n },\n });\n }", "title": "" }, { "docid": "05e1f10e1538eeba6efcdd6476a5f318", "score": "0.5693341", "text": "function selectedItemChange(item) {\r\n\t\t\t\t\tif (item) {\r\n\t\t\t\t\t\t$scope.model.dataProviderID = item.realValue;\r\n\t\t\t\t\t\t$scope.svyServoyapi.apply('dataProviderID');\r\n\t\t\t\t\t\tif ($scope.handlers.onActionMethodID) {\r\n\t\t\t\t\t\t\t$scope.handlers.onActionMethodID()\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}", "title": "" }, { "docid": "d8225618a5fd749c6015cbcea40b2c22", "score": "0.5690777", "text": "handleChangeEvent() {\n this.cacheHasChanged = true;\n }", "title": "" }, { "docid": "74890b6d531799ea19c2281921657c1d", "score": "0.56820333", "text": "change_state(new_state) {\n this.current_state = new_state;\n }", "title": "" }, { "docid": "8db573792c416eb659c0bd34f7301d6c", "score": "0.56730956", "text": "handleChange() {\n this.transitionCheckState_();\n }", "title": "" }, { "docid": "5a05a433a59e45df0b8390ba37d2fd87", "score": "0.56646276", "text": "onAfterChange(value) {\n console.log(this.state);\n }", "title": "" }, { "docid": "025b903ee35d11c66fe19cab2df3a0ad", "score": "0.5659217", "text": "fwk_app_on_show() {\n\n // Note that the application name (this.fwk_app_name) comes from the base class\n console.log('show: ' + this.fwk_app_name);\n\n this.fwk_app_on_update();\n }", "title": "" }, { "docid": "1683939cc75653a0c779eb8fb090d51e", "score": "0.5654618", "text": "BAR(payload) {\n this.change({\n foo: third.state.foo\n });\n }", "title": "" }, { "docid": "815d273a4e2844b676975f9e03083854", "score": "0.5654395", "text": "onActivate() {}", "title": "" }, { "docid": "620e832a74ed3442b85acf5197712389", "score": "0.565113", "text": "changed() {}", "title": "" }, { "docid": "19eb03fa187385c9fac315bdc55cb9e9", "score": "0.5643969", "text": "onChange(o) {\n const flashMessages = Ember.get(this, 'flashMessages');\n if(o.action==='toggle') {\n flashMessages.success(`onChange Event: ${o.message}`);\n } else {\n flashMessages.warning(`onChange Event: ${o.message}`);\n }\n if(o.type === 'selection') {\n this.set('selected', o.selected);\n }\n }", "title": "" }, { "docid": "f8bf5e2304ca3403db921cfe85c2e080", "score": "0.5640764", "text": "stateChanged(state) {\n this._data = articleSelector(state);\n this._lastVisitedListPage = state.app.lastVisitedListPage;\n this._showOffline = state.app.offline && state.article.failure;\n }", "title": "" }, { "docid": "6a4d708e3c1fb4c15098e3047a9d026a", "score": "0.5638807", "text": "componentDidUpdate() {\n this.toggleModelRotation();\n console.log(\"Model Container State: \", this.state.MaterialsHSActive);\n }", "title": "" }, { "docid": "8eaa92e2eac3f2538f2d396423c75af5", "score": "0.56316227", "text": "stateChanged(state) {\n this._query = state.books.query;\n this._items = itemListSelector(state);\n this._showOffline = state.app.offline && state.books.failure;\n }", "title": "" }, { "docid": "e68c9b73f12e85e4760a86b2b974031f", "score": "0.56297916", "text": "function miningChanged(event){\n if(event.newValue == \"on\"){\n //mining turned on actions\n\n }else if(event.newValue == \"off\"){\n // mining turned off actions\n\n\n }\n}", "title": "" }, { "docid": "e079836d42b418b43fdfa022e123654a", "score": "0.5627878", "text": "subscribeToModelEvents() {\n this.previousClassificationDo( () => {\n this.subscribeToModelEvents()\n })\n\n this.getModel().onChoicesChanged({\n with: this,\n do: this.onItemsListChanged,\n })\n this.getModel().onChoicesAdded({\n with: this,\n do: this.onItemsAdded,\n })\n this.getModel().onChoicesUpdated({\n with: this,\n do: this.onItemsUpdated,\n })\n this.getModel().onChoicesRemoved({\n with: this,\n do: this.onItemsRemoved,\n })\n\n this.getModel().onSelectionChanged({\n with: this,\n do: this.onSelectedValueChanged,\n })\n }", "title": "" }, { "docid": "f36e97acd2869265d9851f9ce54e9b02", "score": "0.56134063", "text": "_onChange() {\n this.setState(this._getUpdatedState());\n }", "title": "" }, { "docid": "794b38fbe5f451686b4881cc0af0594c", "score": "0.56084245", "text": "_bindEvents () {\n this.listenTo(this.model, 'change sync', this.render)\n }", "title": "" }, { "docid": "794b38fbe5f451686b4881cc0af0594c", "score": "0.56084245", "text": "_bindEvents () {\n this.listenTo(this.model, 'change sync', this.render)\n }", "title": "" }, { "docid": "a4defc7f77c270577c0c24aa3e64bcc3", "score": "0.5605783", "text": "change_status(e, obj, fitnessArrKey, value) {\n e.preventDefault();\n this.props.changeStatus(e, obj, fitnessArrKey, value);\n }", "title": "" }, { "docid": "1e0748ef0f72f120531c5ca00aaa4ce1", "score": "0.5600404", "text": "trigger(event) {\n var new_state = this.config.states[this._active_state].transitions[event];\n if (new_state) {\n this._last_state = this._active_state\n this._active_state = new_state;\n }\n else {\n throw new Error('Event for this state doesnt exist');\n }\n }", "title": "" }, { "docid": "11b24cd28605de831523cb2c073afe7b", "score": "0.5598177", "text": "function updateCurrentModel(newModel) {\n Automation.CurrentAutomationControl.updateCurrentModel(newModel);\n }", "title": "" }, { "docid": "a959db703d80b385d520dfd405b67f2e", "score": "0.55979806", "text": "_stateChanged(state) {\n this.clicks = state.counter.clicks;\n }", "title": "" }, { "docid": "84fd6e7ce91b0f6fbe63339317956a1c", "score": "0.55959374", "text": "handleExternalChange() {\n this.sensorService\n .setCharacteristic(Characteristic.ContactSensorState, this.translateCurrentDoorWindowState());\n }", "title": "" }, { "docid": "20a2bae7012162f23902b4be9f2e3109", "score": "0.55931", "text": "trigger(event) {\r\n\r\n let influenceEvent = this._config.states[this._state].transitions[event];\r\n this.changeState(influenceEvent);\r\n }", "title": "" }, { "docid": "e61693e908d075d4db0bda41be2aec31", "score": "0.55902994", "text": "get state() { return this.viewState.state; }", "title": "" }, { "docid": "e61693e908d075d4db0bda41be2aec31", "score": "0.55902994", "text": "get state() { return this.viewState.state; }", "title": "" }, { "docid": "814f438fa5744aecf82e691fd73db5f4", "score": "0.5589477", "text": "function onUpdate (status) {\n console.log(\"update\", status);\n cc.setStatus(status);\n gc.onModelUpdate();\n}", "title": "" }, { "docid": "1bac169c4ba53f0cabf17954865ac92a", "score": "0.5583041", "text": "onChangeModel(event) {\n const selectedModel = event.target.value;\n this.setState( prevState => ({\n //...prevState,\n model: selectedModel,\n vehicleId: ''\n }));\n }", "title": "" }, { "docid": "4338743430f317fee96b88ee116b2bcc", "score": "0.5580392", "text": "function loadOnStart(){\n\tmodel.remember();\n\tmodel.showAll();\n}", "title": "" }, { "docid": "b17fa5fe0678aef4a2c117544a168d81", "score": "0.5574775", "text": "onBecomeCurrent() {\n }", "title": "" }, { "docid": "326a01907a0ed2d15bd25bc204de7e63", "score": "0.5574619", "text": "init() {\n // this.listenTo(this.model, 'change:startFrom change:timerLabel change:displayLabels', this.handleChanges);\n }", "title": "" }, { "docid": "dbeb6338c243c081c068953855567ccb", "score": "0.55744463", "text": "handleStateChange() {\n const currentUserData = this.store.getState().userApp.userData;\n\n if (currentUserData !== this.userData) {\n this.userData = currentUserData;\n }\n }", "title": "" }, { "docid": "444e70a75927b0126ef8e72d876e0787", "score": "0.55715185", "text": "function OnGroundBreaks_Change( e )\n{\n Alloy.Globals.UsersResidentsModeInfrastructure[\"GROUND_BREAKS\"] = e.id ;\n}", "title": "" }, { "docid": "e42268959804beb512bf079d594bf1ae", "score": "0.5569834", "text": "function changeState(ev) {\n DialogService.showConfirmInactivation(ev, function (option) {\n if (option === true) {\n vm.itemType.$remove(function () {\n vm.itemType.active = false;\n }, function (res) {\n Toast.genericErrorMessage();\n $log.error(res.data.message);\n });\n }\n });\n }", "title": "" }, { "docid": "b67487c050181825a844231fea85a3b8", "score": "0.55692434", "text": "trigger(event) {\r\n if (this.event === 'study' && this.current === 'normal') {\r\n changeState('busy');\r\n } else if (this.event === 'get_tired' && this.current === 'busy') {\r\n changeState('sleeping');\r\n } else if (this.event === 'get_hungry' && this.current === 'busy') {\r\n changeState('hungry');\r\n } else if (this.event === 'eat' && this.current === 'hungry') {\r\n changeState('normal');\r\n } else if (this.event === 'get_hungry' && this.current === 'sleeping') {\r\n changeState('hungry');\r\n } else if (this.event === 'get_up' && this.current === 'sleeping') {\r\n changeState('normal');\r\n } else {\r\n console.log('Error');\r\n }\r\n }", "title": "" }, { "docid": "d68a08631672287bbb142e1d780828c8", "score": "0.55655324", "text": "willTransition() {\r\n // rollbackAttributes() removes the record from the store\r\n // if the model 'isNew'\r\n this.controller.get('model').rollbackAttributes();\r\n }", "title": "" }, { "docid": "536f1c293d6bec71ca57ae8ad2e63310", "score": "0.5563474", "text": "function modelReady() {\n\n}", "title": "" }, { "docid": "793db44dfc6d20c221953b9e731aca3e", "score": "0.5561344", "text": "function updateChangesState() {\n var keyValueIsChanged = !lodash.isEqual(ctrl.annotations, ctrl.annotationsInitial) || !lodash.isEqual(ctrl.ingresses, ctrl.ingressesInitial) || !lodash.isEqual(ctrl.eventHeaders, ctrl.eventHeadersInitial) || !lodash.isEqual(ctrl.subscriptions, ctrl.subscriptionsInitial) || !lodash.isEqual(ctrl.topics, ctrl.topicsInitial) || !lodash.isEqual(ctrl.brokers, ctrl.brokersInitial);\n var currentChangesState = lodash.get(ctrl.item, 'ui.changed', false);\n\n ctrl.item.ui.changed = !lodash.chain(ctrl.item).omit(['$$hashKey', 'ui']).isEqual(itemInitial).value() || keyValueIsChanged;\n\n if (currentChangesState !== ctrl.item.ui.changed) {\n $rootScope.$broadcast('edit-item-has-been-changed', {});\n }\n }", "title": "" }, { "docid": "4b6aabc28c7d707d0df38f1f9f4e5dfb", "score": "0.55610156", "text": "onUpdate() {}", "title": "" }, { "docid": "a7f1368d958d013225bd203dd002c9c5", "score": "0.55593973", "text": "_onServiceChanged(e) {\n const $target = $(e.target);\n this.model.set('serviceID', $target.val());\n }", "title": "" } ]
9b0ab5b7e0a0fc2887b993e4f8beb584
getOrCreateAction Looks in the given actions list to see if there is an action matching the given link's rel and title attributes. If it can't be found, creates and appends one. Then adds the link to the actions links via action.addLink
[ { "docid": "ab9d0e10252c0a0b08ab2dbbd48ffbfb", "score": "0.750189", "text": "function getOrCreateAction(link, actions){\n var action = new Action(\n link.title, link.rel);\n for(var i = 0; i < actions.length; i++){\n if(actions[i].id === action.id){\n return actions[i];\n }\n }\n actions.push(action);\n return action;\n }", "title": "" } ]
[ { "docid": "846e8989fdd11835c48fdffe7c3bb01c", "score": "0.551694", "text": "function addAction(action) {\n\treturn db('actions').insert(action);\n}", "title": "" }, { "docid": "27fd93c27f44e274a3acd29c64b4f69b", "score": "0.53733194", "text": "function addRoomObjectAction(name, actionName, action) {\n var objectExists = false;\n for (var i = 0; i < roomObjects.length; i++) {\n if (roomObjects[i].name === name) {\n roomObjects[i].actions.push({ name: actionName, action: action });\n objectExists = true;\n break;\n }\n }\n if (objectExists === false) { addRoomObject(name); addRoomObjectAction(name,actionName,action); }\n}", "title": "" }, { "docid": "8c5f7aee1f3b8193706834900c678714", "score": "0.5233747", "text": "function addActionToRuleDialog(selector, action) {\n\n var description = action.type + \" (Unsupported)\";\n\n if (action.type in actionDescriber) {\n var describer = actionDescriber[action.type];\n description = describer(action);\n }\n\n $(selector).data(\"geoquest.actions\").push(action);\n var img = $(\"<img></img>\")\n .attr(\"src\", \"/images/delete.png\")\n .css(\"position\", \"absolute\")\n .css(\"cursor\", \"pointer\")\n .css(\"right\", \"20pt\");\n img.click(function() {\n var list = $(selector).find(\"li\");\n var index = list.index($(this).parents(\"li\"));\n deleteActionFromRuleDialog(selector, index);\n });\n\n var newElement = $(\"<li></li>\").text(description)\n .addClass(\"rule-dialog-dynamic-content\")\n .append(img);\n $(selector).find(\"#rule_addActionListEntry\").before(newElement);\n $(selector).trigger(\"geoquest.rule_change\");\n}", "title": "" }, { "docid": "09d8f2f76639de103e6aa7450754c7d2", "score": "0.5212732", "text": "function add (action) {\n var a, that = this;\n\n if (_.isString(action)) {\n // try to include the action and create a new instance\n try {\n a = require('./actions/' + action);\n a = a();\n console.log('[Scheduler]', 'adding action'.green, action);\n addAction(a);\n } catch (e) {\n console.error('[Scheduler]', 'adding action failed!'.red, action, e);\n }\n }\n\n return a;\n\n function addAction(a){\n that.actions.push(a);\n\n // add listener to forced execution\n a.on('frame', step(that.actions, that.api));\n a.on('end', end(that.actions, a, that));\n }\n}", "title": "" }, { "docid": "3d9ee244d785e6ae22341623184e1e65", "score": "0.52055645", "text": "function setAction(actions){\n\n\t$(\"#add\").attr(\"href\",actions[0]);\n\t$(\"#edit\").attr(\"href\",actions[1]);\n\t$(\"#list\").attr(\"href\",actions[2]);\n\n}", "title": "" }, { "docid": "9f6fde402b9ac9885a809d44919f327b", "score": "0.51581323", "text": "function attachAction(actionName) {\n if (this[actionName]) {\n console.warn('Not attaching event ' + actionName + '; key already exists');\n return;\n }\n this[actionName] = _reflux2.default.createAction();\n}", "title": "" }, { "docid": "3e416b3f58eca30276bc323766754d1b", "score": "0.49836117", "text": "function buildActionLinkForTab(label, actionMap, $actionMenu, $midmenuItem1, $thisTab) { \n var apiInfo = actionMap[label];\n var $listItem = $(\"#action_list_item\").clone();\n $actionMenu.find(\"#action_list\").append($listItem.show());\n \n var label2;\n if(label in dictionary)\n label2 = dictionary[label];\n else\n label2 = label; \n $listItem.find(\"#link\").text(label2); \n \n $listItem.data(\"label\", label);\t \n $listItem.data(\"apiInfo\", apiInfo);\t \n \n var id = $midmenuItem1.data(\"jsonObj\").id;\n \n $listItem.bind(\"click\", function(event) { \n $actionMenu.hide(); \t \n var $actionLink = $(this); \n \n var dialogBeforeActionFn = apiInfo.dialogBeforeActionFn; \n if(dialogBeforeActionFn == null) {\t \n var apiCommand = \"command=\"+apiInfo.api+\"&id=\"+id; \n doActionToTab(id, $actionLink, apiCommand, $midmenuItem1, $thisTab); \n }\n else {\n dialogBeforeActionFn($actionLink, $thisTab, $midmenuItem1);\t\n } \n return false;\n }); \n}", "title": "" }, { "docid": "f6dbc66a286d7d906f10ba44e2831d39", "score": "0.48732057", "text": "function attachActionMethods(action) {\n if (!(\"actionType\" in action) || !(action.actionType in actionTypes)) {\n throw new Error(\"Unknown Action Type: \" + action.actionType);\n }\n\n return new actionTypes[action.actionType](action);\n}", "title": "" }, { "docid": "1e8f2de7acd90794a7fc8886e3d1d348", "score": "0.480278", "text": "createAndAssignAction(actionParams, successCallback, errorCallback) {\n // actionParams is a dictionary with keys\n RNHyperTrack.createAndAssignAction(actionParams, successCallback, errorCallback);\n }", "title": "" }, { "docid": "b2505a75856387e3b079243f2d909123", "score": "0.47465342", "text": "function createActionToSequence(actions, possible_actions) {\n\tconsole.log(\"add new action\");\n\tvar id = Math.floor(Math.random() * 4);\n\t\n\tactions.push(possible_actions[id]);\n\t\n\t/**/\n//\tactions.push(possible_actions[0]);\t\n\t/**/\n\n\tconsole.log(possible_actions[id].getColor());\n\treturn 1;\n}", "title": "" }, { "docid": "ab9e1278bc62b09facfe727504826c46", "score": "0.4743687", "text": "function getPageAction(aTabId, aCreateIfNotFound) {\n aCreateIfNotFound = ('undefined' == typeof aCreateIfNotFound) ?\n true :\n aCreateIfNotFound;\n if (aTabId) {\n // for a tab\n if ('undefined' == typeof pageActionsPerTab[aTabId]) {\n // does not exist\n if (aCreateIfNotFound) {\n // create\n pageActionsPerTab[aTabId] = new PageActionInfo(pageActionInfoGlobal);\n return pageActionsPerTab[aTabId];\n }\n // return global\n return pageActionInfoGlobal;\n }\n // exists\n return pageActionsPerTab[aTabId];\n }\n // global info requested\n return pageActionInfoGlobal;\n }", "title": "" }, { "docid": "b748734cfdb8dadc9b48efc6a49765bd", "score": "0.46953467", "text": "function create_action(id, name, permission_class, locked)\r\n {\r\n // Create an action item with context menu\r\n var item = $('<li/>')\r\n .attr('id', 'action_' + id)\r\n .text(name)\r\n .addClass(permission_class)\r\n .click(function(e){\r\n change_action_permission($(e.target));\r\n })\r\n .contextMenu({ menu: 'action_menu', OnShowMenu: display_contextmenu }, function(action, el){\r\n handle_contextmenu_action(action, el, 'action');\r\n });\r\n\r\n if(locked)\r\n {\r\n // If its locked apply locked style\r\n item.addClass('locked');\r\n }\r\n\r\n // Add action to action list\r\n $('ul', access_actions).append(item);\r\n\r\n return item;\r\n }", "title": "" }, { "docid": "f15ea3466dc2539ffe4cb8bb846c7b68", "score": "0.46827364", "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": "dacc2ab6139c787e0a88cbe205964421", "score": "0.4617302", "text": "addAction(...args) {\n if (args.length < 2) {\n throw new Error(\n \"addAction requires at least two arguments, a string (or array of strings) and a function\"\n );\n }\n\n if (!isFunction(args[args.length - 1])) {\n throw new Error(\"The last argument to addAction must be a function\");\n }\n\n const func = args.pop().bind(this.dispatchBinder);\n\n if (typeof args[0] !== \"string\") {\n args = args[0]; // eslint-disable-line\n }\n\n const leadingPaths = args.reduce((acc, next) => {\n if (acc) {\n const nextPath = acc[acc.length - 1].concat([next]);\n\n return acc.concat([nextPath]);\n }\n\n return [[next]];\n }, null);\n\n // Detect trying to replace a function at any point in the path\n leadingPaths.forEach(path => {\n if (isFunction(objectPath.get(this.actions, path))) {\n throw new Error(`An action named ${args.join(\".\")} already exists`);\n }\n });\n\n // Detect trying to replace a namespace at the final point in the path\n if (objectPath.get(this.actions, args)) {\n throw new Error(`A namespace named ${args.join(\".\")} already exists`);\n }\n\n objectPath.set(this.actions, args, func, true);\n }", "title": "" }, { "docid": "9210e6eea4c194bcbce33b748780aa14", "score": "0.46151274", "text": "registerAction(actionName, actionClass, options) {\n if (typeof options != \"object\") {\n options = {};\n }\n this.actions[actionName] = new actionClass(this, options);\n }", "title": "" }, { "docid": "79c86114500db006fb4b85afa4ba8ba2", "score": "0.4563975", "text": "getAction(actionName) {\n return this.actions[actionName];\n }", "title": "" }, { "docid": "189842c43cd856a68ddbcaa9493e1807", "score": "0.45552722", "text": "function actionCreator(){\n return action;\n }", "title": "" }, { "docid": "99d484a4137902721286af94b031c83e", "score": "0.45458636", "text": "function addAction(node) {\n if (node.expression.type == 'sequence') {\n var expression = Object.clone(node.expression)\n node.expression = {};\n node.expression.type = \"action\";\n var list = \"[\"\n + expression.elements\n .map(\n function(element) {\n if (element.expression !== undefined\n && [ 'zero_or_more', 'one_or_more', 'optional' ]\n .indexOf(element.expression.type) >= 0) {\n return element.label;\n } else if (element.type == 'labeled') {\n return \"{\"\n + (element.expression.type == 'literal' ? \"type:'literal',\"\n : \"type:'feature',name:'\" + element._feature\n + \"',\") + \"value:\" + element.label + \"}\";\n }\n }).reject( function(element) {\n return element == undefined || element.length == 0\n }).join(',') + \"]\";\n\n if (node.type == 'rule') {\n node.expression.code = \"return c('\" + node.name + \"',\" + list + \")\";\n } else\n node.expression.code = \"return \" + list;\n node.expression.expression = expression;\n }\n visit(node.expression);\n }", "title": "" }, { "docid": "1792357054998c67ac70f3c71a6a4f9a", "score": "0.4529374", "text": "function createAction(settings, type, sayOrPlayOrDisconnect) {\n var action;\n settings[type] = AutoAttendantCeMenuModelService.newCeMenuEntry();\n action = AutoAttendantCeMenuModelService.newCeActionEntry(sayOrPlayOrDisconnect, '');\n settings[type].addAction(action);\n }", "title": "" }, { "docid": "fdfcad51643069e16ca0db910196b74e", "score": "0.4528117", "text": "function createActions(actions) {\n var Actions;\n if (typeof actions === 'string') {\n actions = [actions];\n }\n\n if (Array.isArray(actions)) {\n Actions = actions.reduce(function(_Actions, action) {\n if (typeof action === 'string') {\n _Actions[action] = create();\n } else {\n invariant(\n typeof action !== 'object',\n 'createActions requires items in array to be either strings ' +\n 'or objects but was supplied with %s',\n action\n );\n\n invariant(\n typeof action.name !== 'string',\n 'createActions requires objects to have a name key, but got %s',\n action.name\n );\n\n if (action.map) {\n invariant(\n typeof action.map !== 'function',\n 'createActions requires objects with map field to be a function ' +\n 'but was given %s',\n action.map\n );\n }\n\n _Actions[action.name] = create(action.map);\n }\n return _Actions;\n }, {});\n }\n\n return Actions;\n}", "title": "" }, { "docid": "c152ea634c5010347de81c59202a2b35", "score": "0.4485674", "text": "function addAction(members, data){\n\t\tvar action = new models.Action(data);\n\t\t//Retourne l'id de l'action la plus récente\n\t\tmodels.Action\n\t\t.where('mod', data.mod)\n\t\t.sort('id', -1)\n\t\t.limit(1)\n\t\t.exec(\n\t\t\tfunction(err, res){\n\t\t\t\tif(err) { throw err; }\n\t\t\t\t\n\t\t\t\t/* On incrémente l'id de la dernière action pour l'ajouter dans l'ordre croissant.\n\t\t\t\t\tATTENTION : cette technique n'est pas sure car une autre action peut s'insérer entre les deux requêtes.\n\t\t\t\t\tTODO : trouver une méthode asynchrone sûre\n\t\t\t\t*/\n\t\t\t\taction.id = (res.length == 0) ? 0 : res[0].id+1;\n\n\t\t\t\taction.save(function(err){\n\t\t\t\t\tif(err){\n\t\t\t\t\t\tconsole.log(err);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//console.log('action créée avec id = '+action.id);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\taccessor.emit('newAction', {action: action, members: members});\n\t\t\t\t});\n\t\t\t}\n\t\t);\t\t\n\t}", "title": "" }, { "docid": "072092d95c7853ceff81a42b8fbaa65e", "score": "0.4483881", "text": "function createActionLink(text, command, commandDataAttributeName, cssname) {\n var link = document.createElement('a');\n link.className = cssname;\n link.innerText = text.textContent;\n link.setAttribute(commandDataAttributeName, text.textContent.replace(/[\\$|#|£]/, ''));\n link.setAttribute(\"command\", command);\n\n return link;\n }", "title": "" }, { "docid": "79375f1022d402e5028f4f9aac3bfb1c", "score": "0.44837615", "text": "function newFilterAction( actionString ) {\r\n\r\n//\tlog.thisLevel( log.level.debug );\r\n\r\n\tvar indexOf = { type: 0, value: 1 }; \r\n\t\r\n\tvar actionElements = actionString.match( rx.parseAction );\r\n\t\r\n\tif( actionElements == null || \r\n\t\ttypeof( actionElements ) =='string' || \r\n\t\tactionElements.length != 2 ){\r\n\t\t\tlog.error('missing arguments');\r\n\t\t\treturn null;\r\n\t} \r\n\r\n\tvar folder = carrot_garden.mailFolders.getLocalFolders();\r\n\tvar filterList = folder.getFilterList(null);\r\n\t//\tXXX todo what to do when there are no filteres in the list:\r\n\tvar filter = filterList.getFilterAt(0);\r\n\tvar action = filter.createAction();\t\r\n\t\r\n\tvar type = MsgFilterAction[ cleanupStringParameter( actionElements[ indexOf.type ] ) ];\r\n\ttype = type? type : MsgFilterAction.markread;\r\n\tlog.debug( 'type: ' + type );\r\n\r\n\tvar strValue = actionElements[ indexOf.value ];\r\n\tstrValue = strValue == null ? '' : strValue;\r\n\tstrValue = carrot_garden.util.substituteVariables( strValue );\r\n\tlog.debug('strValue: ' + strValue)\r\n\r\n\tvar strValueClean = cleanupStringParameter( strValue );\r\n\r\n\tvar intValue = parseInt( strValue );\r\n\tintValue = intValue ? intValue : 0;\r\n\tlog.debug( 'intValue: ' + intValue )\r\n\r\n\tvar priorityValue = MsgSearchPriority[ strValueClean ];\r\n\tpriorityValue = priorityValue ? priorityValue : MsgSearchPriority.notset;\r\n\tlog.debug( 'priorityValue: ' + priorityValue )\r\n\r\n\taction.type = type;\r\n\r\n\tswitch ( type ){\r\n\t\tcase 1:\r\n\t\tcase 16:\r\n\t\t\taction.targetFolderUri = strValue;\r\n\t\t\tbreak;\r\n\t\tcase 9:\r\n\t\tcase 10:\r\n\t\t\taction.strValue = strValue;\r\n\t\t\tbreak;\r\n\t\tcase 8:\r\n\t\t\taction.label = intValue;\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\taction.priority = priorityValue;\r\n\t\t\tbreak;\r\n\t\tcase 14:\r\n\t\t\taction.junkScore = intValue;\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t}\r\n\r\n\treturn action;\r\n}", "title": "" }, { "docid": "8877061619f8748ea795d0a584570152", "score": "0.44677582", "text": "function createAction(actionPackageId) {\n let trainingTitle = $(\"#training-title\").val();\n let trainingDescription = $(\"#training-description\").val();\n let trainingExpireDate = $(`input[name=\"expiry_date\"]`).datepicker(\"getDate\");\n let trainingExpireTime = $(`input[name=\"expiry_time\"]`).val();\n let getExpiryDateData = trainingExpireDate.toString().split(\" \");\n getExpiryDateData[4] = trainingExpireTime + \":00\";\n let expiryDate = new Date(getExpiryDateData.join(\" \"));\n\n let resultVisible = $(`input[name=\"visible_to\"]:checked`).val();\n let showCorrectAnswer = $(\"#show-correct-answer\").is(\":checked\") ? \"Yes\" : \"No\";\n let allowMultipleAttempt = $(\"#allow-multiple-attempt\").is(\":checked\") ? \"Yes\" : \"No\";\n let questionsSet = getQuestionSet();\n let getcorrectanswers = getCorrectAnswer();\n let properties = [];\n properties.push({\n name: \"Training Description\",\n type: \"LargeText\",\n value: trainingDescription,\n }, {\n name: \"Training Expire Date Time\",\n type: \"DateTime\",\n value: new Date(trainingExpireDate + \" \" + trainingExpireTime),\n }, {\n name: \"Result Visible\",\n type: \"Text\",\n value: resultVisible,\n }, {\n name: \"Show Correct Answer\",\n type: \"Text\",\n value: showCorrectAnswer,\n }, {\n name: \"Attachment Id\",\n type: \"Text\",\n value: \"\",\n }, {\n name: \"Allow Multiple Attempt\",\n type: \"Text\",\n value: allowMultipleAttempt,\n });\n properties.push(getcorrectanswers);\n properties.push({\n name: \"Locale\",\n valueType: ActionHelper.actionPropertyValueType(),\n value: context.locale,\n });\n let action = {\n id: Utils.generateGUID(),\n actionPackageId: actionPackageId,\n version: 1,\n displayName: trainingTitle,\n description: trainingDescription,\n expiryTime: new Date(expiryDate).getTime(),\n customProperties: properties,\n dataTables: [{\n name: \"TrainingDataSet\",\n itemsVisibility: ActionHelper.visibility(),\n rowsVisibility: resultVisible == \"Everyone\" ? ActionHelper.visibility() : ActionHelper.visibility(),\n itemsEditable: false,\n canUserAddMultipleItems: false,\n dataColumns: questionsSet,\n attachments: ($(\"#training-attachment-id\").val()) ? [JSON.parse($(\"#training-attachment-id\").val())] : []\n }],\n };\n let request = ActionHelper.createAction(action);\n ActionHelper\n .executeApi(request)\n .then(function(response) {\n console.info(\"CreateAction - Response: \" + JSON.stringify(response));\n })\n .catch(function(error) {\n console.error(\"CreateAction - Error: \" + JSON.stringify(error));\n });\n}", "title": "" }, { "docid": "cd4871f4bac93660879b2554f54979d1", "score": "0.44642246", "text": "function addAction(prefix, name, icon, actionFunction)\n{\n let btnAction = new ButtonAction(prefix+'-'+name, prefix, icon);\n\n $(`#${prefix}-left-button`).append(btnAction.getButtonDisplay());\n\n $('#' + btnAction.getIdButton()).click(actionFunction);\n}", "title": "" }, { "docid": "df049a3167eeca21bd9d1109dc70ad6b", "score": "0.4440404", "text": "function extractActions(doc){\n // list of actions to return\n var actions = [];\n \n // First grab feature-specific links\n jQuery.each(doc['feature-classes'], function(i, klass){\n jQuery.each(klass['link-relations'], function(linkrel, links){\n if(links instanceof Array){\n jQuery.each(links, function(i, link){\n if(link.title){\n link.title = ucase(link.title);\n var action = getOrCreateAction(link, actions)\n action.addLink(link); \n }else{\n throw('invalid link with no title');\n } \n });\n }else{\n var action = getOrCreateAction(links, actions);\n action.addLink(links); \n }\n });\n });\n \n // Then grab generic links\n jQuery.each(doc['generic-links'], function(i, link){\n if(link.title){\n link.title = ucase(link.title);\n var action = getOrCreateAction(link, actions)\n action.addLink(link); \n }else{\n throw('invalid link with no title');\n }\n });\n \n // Then grab links by name\n jQuery.each(doc['feature-classes'], function(i, klass){\n var rels = klass['link-relations'];\n // self link, required.\n var self = rels['self'];\n if(typeof self === 'undefined' || self instanceof Array){\n throw('undefined or invalid self link for '+klass.title);\n }else{\n self.rel = 'self';\n var action = getOrCreateAction(self, actions);\n }\n });\n \n return actions;\n }", "title": "" }, { "docid": "fb52819080471e718311dc8e08bc12e3", "score": "0.44292516", "text": "function createButton(action, text) {\n const button = document.createElement('button');\n button.classList.add('action');\n button.dataset.action = action;\n\n const icon = document.createElement('i');\n icon.classList.add('material-icons', 'action__icon');\n icon.textContent = text;\n button.appendChild(icon);\n\n return button;\n}", "title": "" }, { "docid": "a42a9c1df4909e7e21c4b891906cdbb7", "score": "0.4391413", "text": "addActions(name, ActionsClass) {\n for (var _len8 = arguments.length, args = Array(_len8 > 2 ? _len8 - 2 : 0), _key8 = 2; _key8 < _len8; _key8++) {\n args[_key8 - 2] = arguments[_key8];\n }\n\n this.actions[name] = Array.isArray(ActionsClass) ? this.generateActions.apply(this, ActionsClass) : this.createActions.apply(this, [ActionsClass].concat(args));\n }", "title": "" }, { "docid": "47ff31365b341a39524a1ce6cbab4a8b", "score": "0.4387187", "text": "function createActionsShortcuts() {\n actions = {\n play : () => newGame(),\n highScores : () => showHighScores(),\n help : () => display.set(\"help\").show(),\n sound : () => sounds.toggle(),\n save : () => saveHighScore(),\n retore : () => scores.restore(),\n mainScreen : () => display.set(\"mainScreen\").show()\n };\n \n shortcuts = {\n mainScreen : {\n Enter : \"play\",\n Down : \"play\",\n H : \"highScores\",\n C : \"help\",\n M : \"sound\"\n },\n playing : {\n P : () => togglePause(),\n M : () => sounds.toggle(),\n Left : () => blob.makeTurn({ x: -1, y: 0 }),\n Up : () => blob.makeTurn({ x: 0, y: -1 }),\n Right : () => blob.makeTurn({ x: 1, y: 0 }),\n Down : () => blob.makeTurn({ x: 0, y: 1 })\n },\n paused : {\n P : () => togglePause()\n },\n gameOver : {\n Enter : () => saveHighScore(),\n B : () => display.set(\"mainScreen\").show()\n },\n highScores : {\n B : () => display.set(\"mainScreen\").show(),\n R : () => scores.restore()\n },\n help : {\n B : () => display.set(\"mainScreen\").show()\n }\n };\n }", "title": "" }, { "docid": "dddd53613d42881324962af23090c4d2", "score": "0.43600008", "text": "addActionHandler(actionType, handler) {\n }", "title": "" }, { "docid": "da3345207180e9c8032ab073fc9a31e3", "score": "0.4342741", "text": "_initActions(actions) {\n actions.forEach(action => {\n if (!this[action]) {\n this[action] = function(action, ...args) {\n return this._callAction(action, ...args)\n }.bind(this, action);\n }\n });\n\n this._actions = actions;\n }", "title": "" }, { "docid": "8c8237b5d52e07e51b48c1b4afc73259", "score": "0.4305262", "text": "function addAction(name, doUpdate = true){\n\tif(!actionUsable(name)) {\n\t\tconsole.log(\"Cannot use \" + name + \" right now. Add Error message handling?\");\n\t\treturn;\n\t}\n\t\n\tconst action = getAction(name);\n\tif(!action){\n\t\tconsole.log(\"Error could not find action: \"+name);\n\t\treturn;\n\t}\n\trotation.push(action);\n\taction.onAdd(state);\n\n\tif(doUpdate)\n\t\tupdate();\n\telse\n\t\tconsole.log(name + ': skipping update');\n\t\n}", "title": "" }, { "docid": "2bfc4b59a76d557b7d51ac7db10779da", "score": "0.4304571", "text": "function createActionButtons(item) {\n let playNow = document.createElement('div')\n playNow.classList.add('action_btn', 'play')\n playNow.innerHTML = '<img src=\"../../assets/icons/app/play.svg\">'\n playNow.setAttribute('onclick', `playNow(${item})`)\n\n let addToList = document.createElement('div')\n addToList.classList.add('action_btn', 'list')\n addToList.innerHTML = '<img src=\"../../assets/icons/app/list.svg\">'\n addToList.setAttribute('onclick', `addToWatchlist(${item})`)\n\n let addToHistory = document.createElement('div')\n addToHistory.classList.add('action_btn', 'history')\n addToHistory.innerHTML = '<img src=\"../../assets/icons/app/check.svg\">'\n addToHistory.setAttribute('onclick', `addToHistory(${item})`)\n\n return [playNow, addToList, addToHistory];\n}", "title": "" }, { "docid": "b59aef46c37cdd8a77789db1dee8179a", "score": "0.42979982", "text": "function RuleActionInstance(ruleAction, context) {\n this.ruleAction = ruleAction;\n\n this.getContext = function () {\n return context;\n }\n}", "title": "" }, { "docid": "d9086153375cdea11d72aae5fcf40129", "score": "0.42777213", "text": "function add(theElements,theAction){\n\t\tvar thing = {\n\t\t\telements:theElements, /*[1]*/\n\t\t\taction:theAction /*[2]*/\n\t\t};\n\t\tvar cancel = 0;\n\t\tfor (var i=0;i<s.clickOffs.length;i++){\n\t\t\tif (thing.elements == s.clickOffs[i].elements){\n\t\t\t\tcancel = 1;\n\t\t\t}\n\t\t}\n\t\tif (cancel === 0){\n\t\t\ts.clickOffs.push(thing);\n\t\t}\n\t}", "title": "" }, { "docid": "9b6569c2817b53bbe90bd4486d28d2ae", "score": "0.42725867", "text": "function saveAction (action) {\n\tvar len, timeSinceLastAction;\n\tlen = actions.length;\n\tif (action.elapsed) {\t\t// elapsed is time since puzzle loaded\n\t\ttimeSinceLastAction = action.elapsed - lastActionElapsed;\n\t\tlastActionElapsed = action.elapsed;\n\t\taction.elapsed = timeSinceLastAction;\t// elapsed is now time since last action\n\t}\n\tif (len < maxActions) {\n\t\tactions.push(action);\n\t} else {\n\t\tactions[firstAction] = action;\n\t\tfirstAction++;\n\t\tif (firstAction == len) {\n\t\t\tfirstAction = 0;\n\t\t}\n\t}\n}", "title": "" }, { "docid": "35e463f772bb34d648a98d75b9957620", "score": "0.42577454", "text": "function createActionJson(node){\n var action = merge(\n {\n $line : parser.line,\n $column : parser.column,\n type:node.local\n },\n copyNsAttrObj(node.attributes));\n\n //console.log('action node',node);\n\n var actionContainer;\n if(Array.isArray(currentJson)){\n //this will be onExit and onEntry\n currentJson.push(action);\n }else if(currentJson.type === 'scxml' && action.type === 'script'){\n //top-level script\n currentJson.rootScripts = currentJson.rootScripts || [];\n currentJson.rootScripts.push(action);\n }else{\n //if it's any other action\n currentJson.actions = currentJson.actions || [];\n currentJson.actions.push(action);\n }\n\n\n return currentJson = action;\n }", "title": "" }, { "docid": "66361cb75723d1edf2c77240de590b3b", "score": "0.42507184", "text": "function getAction(actions, name) {\n for (var i in actions) {\n if (actions[i].name === name) {\n return actions[i];\n }\n }\n return;\n }", "title": "" }, { "docid": "a8b5a5cf39476ad8518a2b07aa30b7df", "score": "0.4242085", "text": "function AddActionButton(ActionName)\n\t{\n\t\tconst Action = Move.Actions[ActionName];\n\t\tconst Div = document.createElement('div');\n\t\tButtonContainer.appendChild(Div);\n\t\tconst Button = document.createElement('input');\n\t\tDiv.appendChild(Button);\n\t\tButton.type = 'button';\n\t\tButton.value = ActionName;\n\t\t\n\t\tfunction MakeArgumentInput(ArgumentChoices)\n\t\t{\n\t\t\tconst Input = document.createElement('select');\n\t\t\tDiv.appendChild(Input);\n\t\t\tfunction AddOption(ArgumentValue)\n\t\t\t{\n\t\t\t\tconst Option = document.createElement('option');\n\t\t\t\tOption.value = ArgumentValue;\n\t\t\t\tOption.text = ArgumentValue;\n\t\t\t\tInput.appendChild(Option);\n\t\t\t}\n\t\t\tArgumentChoices.forEach(AddOption);\n\t\t\treturn Input;\n\t\t}\n\t\tconst ArgumentInputs = Action.Arguments.map(MakeArgumentInput);\n\t\t\n\t\tfunction OnClick()\n\t\t{\n\t\t\tconst ArgumentValues = ArgumentInputs.map( i => i.value );\n\t\t\tSendReplyAction(ActionName,ArgumentValues);\n\t\t}\n\t\tButton.onclick = OnClick;\n\t}", "title": "" }, { "docid": "fd1095dc86a57ad7b2bd0c967fe46070", "score": "0.42310655", "text": "existingAction(clip, optionalRoot) {\n const root = optionalRoot || this._root, rootUuid = root.uuid, clipObject = typeof clip === \"string\" ? AnimationClip.findByName(root, clip) : clip, clipUuid = clipObject ? clipObject.uuid : clip, actionsForClip = this._actionsByClip[clipUuid];\n if (actionsForClip !== undefined) return actionsForClip.actionByRoot[rootUuid] || null;\n return null;\n }", "title": "" }, { "docid": "036fbb0b176587a418f60f7b8118843e", "score": "0.42272195", "text": "function mergeDefaultActionUpdates()\n{\n try\n {\n Flagfox.actions.assertLoaded();\n\n if (!prefService.prefHasUserValue(\"flagfox.actions\")) // If already using defaults then the new defaults will be used automatically\n return;\n\n var updatesDone = [];\n var defaultActionsList = JSON.parse(getUCharPref(prefService.getDefaultBranch(\"\"), \"flagfox.actions\"));\n\n function findDefaultActionByName(actionsListToSearch,name)\n {\n for (var i in actionsListToSearch)\n if (!actionsListToSearch[i].custom && actionsListToSearch[i].name == name)\n return actionsListToSearch[i];\n return null;\n }\n\n for (var i=actionsList.length-1; i>=0; i--) // Need to scan backwards in case of deletion and index change\n if (!actionsList[i].custom)\n {\n if (actionsList[i].show && actionsList[i].name == \"tr.im URL\") // tr.im died; replace with bit.ly as new default\n {\n updatesDone.push(\"default action \\\"bit.ly URL\\\" replaces now defunct \\\"tr.im URL\\\" in default menu\");\n try { findDefaultActionByName(actionsList,\"bit.ly URL\").show = true; } catch (e) {}\n } // tr.im will be deleted down below\n\n var action = findDefaultActionByName(defaultActionsList, actionsList[i].name);\n if (action)\n {\n if (actionsList[i].template != action.template) // Update to template\n {\n updatesDone.push(\"default action template update: \" + actionsList[i].name);\n actionsList[i].template = action.template;\n }\n }\n else // Old default action\n {\n updatesDone.push(\"action is no longer a default: \" + actionsList[i].name);\n Flagfox.actions.remove(i);\n }\n }\n\n for (var i in defaultActionsList)\n if (!findDefaultActionByName(actionsList, defaultActionsList[i].name)) // New default action\n {\n updatesDone.push(\"new default action added: \" + defaultActionsList[i].name);\n Flagfox.actions.insert(i,defaultActionsList[i]); // TODO: Check existing shortcuts if I ever add a new default with a shortcut\n }\n\n if (updatesDone.length)\n {\n consoleService.logStringMessage(\"Flagfox default action list updates applied for version \" + Flagfox.version + \":\\n\" + updatesDone.join(\"\\n\"));\n Flagfox.actions.save();\n }\n }\n catch (e)\n {\n Flagfox.error(\"Error applying default actions list updates\",e);\n }\n}", "title": "" }, { "docid": "3a8ad23c11c79dd4cf277a2df66b3cf5", "score": "0.42270857", "text": "function performActions(target,doc,node,actions){\r\n for(var i=0,n=actions.length;i<n;i++){\r\n var action = actions[i];\r\n if(action.nodeType==1){\r\n \t // Get the action type\r\n \t var type;\r\n if(window.ActiveXObject){\r\n type = action.baseName.toLowerCase();\r\n }else{\r\n type = action.localName.toLowerCase();\r\n }\r\n \t switch(type){\r\n \t case \"comment\":\r\n \t var author = getFirstChildTextValue(doc,\"author\");\r\n commentText(target,node,action,author); // in comments.js\r\n break;\r\n case \"regexp-data\":\r\n regexpData(node,action);\r\n break;\r\n case \"set-attr\":\r\n setAttrib(node,action);\r\n break;\r\n case \"img-over\":\r\n insertImg(target,node,action);\r\n break;\r\n case \"inner-html\":\r\n innerHTML(node,action);\r\n break;\r\n case \"insert-node\":\r\n insertNode(target,node,action);\r\n break;\r\n default:\r\n break;\r\n } \r\n } \r\n }\r\n}", "title": "" }, { "docid": "8c2aacc87ae6c87c487f876a93766f7f", "score": "0.42249632", "text": "function createAction(client, exec) {\n let overwrite = true\n let kind = 'nodejs:default'\n return ow.actions.create({\n name: exec._id,\n namespace: \"_\",\n action: prepareCode(exec),\n kind: kind,\n overwrite: overwrite}).then(activationId => {\n console.log('created activation id ', activationId)\n return activationId\n }).catch(err => {\n console.error('Failed to create action ', exec, ' with error ', err)\n })\n}", "title": "" }, { "docid": "ca528a863507c7ef09732de4ab492721", "score": "0.42168817", "text": "function setAction(action,id){\n document.getElementById(id).setAttribute(\"onclick\",action);\n}", "title": "" }, { "docid": "2ccd938718ed9a79511eb712c453d2bb", "score": "0.42154765", "text": "function DialogAction(actionName) {\n\t\tthis.actionName = actionName;\n\t}", "title": "" }, { "docid": "0c90d50bf7d4ff3c29ea3ed8dfb330dc", "score": "0.42061988", "text": "function action() {\n return new Action();\n}", "title": "" }, { "docid": "880014c60752c74cfee184115779926a", "score": "0.42048994", "text": "function panel_mod_button(action){\n const newBtn = document.createElement(\"button\");\n newBtn.className = action.display_class+\" button-toolbar-small mod-panel-action\";\n newBtn.innerHTML = action.display;\n if(action.content_script){\n newBtn.addEventListener(\"click\", event => {content_script(action.script);});\n } else {\n newBtn.addEventListener(\"click\", action.script);\n }\n newBtn.title = action.title;\n return newBtn;\n }", "title": "" }, { "docid": "f883f29bd7f8ce64dd49d8ccef0bffda", "score": "0.42033896", "text": "function processActions() {\n\t\t/*hardcoded actionlist json file*/\n\t\tvar actionListFileName = \"js/actionList.json\";\n\t\ttry {\n\t\t\tvar actionListDef = VS.Util.loadFile(actionListFileName);\n\t\t\tvar actionTreeList = JSON.parse(actionListDef, VS.Util.jsonReviver);\n\n\t\t\tif (!actionTreeList) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (!Array.isArray(actionTreeList)) {\n\t\t\t\tVS.Util.reportError(\"VS.ActionTrees.JsonNotArray\", actionListDef);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tVS.ActionTree.actionTrees = VS.ActionTree.actionTrees || {};\n\n\t\t\tfor (var i = 0; i < actionTreeList.length; i++) {\n\t\t\t\tvar actionTree = actionTreeList[i];\n\t\t\t\tif (!actionTree) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Note that metadata enforces presence of name property during JSON parsing (animation won't\n\t\t\t\t// be created if it doesn't have a name). When there are duplicates, later version overrides\n\t\t\t\t// earlier version.\n\t\t\t\tvar actionTreeName = actionTree.name;\n\t\t\t\t// Add each actionTree to the dictionary with name as the key.\n\t\t\t\tVS.ActionTree.actionTrees[actionTreeName] = actionTree;\n\t\t\t}\n\n\t\t\t// For each action tree, create and register the name in the global namespace.\n\t\t\tfor (var name in VS.ActionTree.actionTrees) {\n\t\t\t\tVS.ActionTree.createAndRegisterActionTree(name, VS.ActionTree.actionTrees[name]);\n\t\t\t}\n\t\t} catch (e) {\n\t\t\t// We don't require the actionList file to be present, so we don't generate an error here.\n\t\t}\n\t}", "title": "" }, { "docid": "409048d4fd1fd6e1e64a6bcf9e6411ae", "score": "0.41939223", "text": "function initActionLinks(actionMap, refreshGridRowFn, refreshDetailsPanelFn) {\n for (var i = 0; i < actionMap.length; i++) {\n bindToActionLink(actionMap[i], refreshGridRowFn, refreshDetailsPanelFn);\n }\n}", "title": "" }, { "docid": "91647d88b6410c2a7cd00a1ce2c3b0cf", "score": "0.41899252", "text": "function refreshActions() {\n $scope.createActions = $scope.action ?\n $scope.action.getActions('create') :\n [];\n }", "title": "" }, { "docid": "eb9d3284a2b6eb3ddf532bc2e4ec51ba", "score": "0.41779163", "text": "_addActions(selections, actions) {\n const _context = this.context;\n const _this = this;\n const KEY = _context.KEY;\n\n selections.forEach(d => {\n if (!_this.actionsQueue[d[KEY]]) _this.actionsQueue[d[KEY]] = [];\n _this.actionsQueue[d[KEY]] = [].concat(_this.actionsQueue[d[KEY]].filter(value => actions.indexOf(value) == -1), actions);\n });\n }", "title": "" }, { "docid": "4224fdddc13242d02430279cd28780e2", "score": "0.41689608", "text": "function buildActionHandler (factory, action) {\n\n return function (params, callback) {\n\n var context = this;\n\n executeHandlers (factory._before, context, params, function (err) {\n\n if (err) {\n return callback(err);\n }\n\n factory._actions[action].call(context, params, function (err, view, model) {\n\n executeHandlers (factory._after, context, params, function (err) {\n\n if (err) {\n return callback(err);\n }\n\n callback(null, view, model);\n });\n });\n });\n };\n}", "title": "" }, { "docid": "a5b921ebcffb5941b1fe2408475bd1dd", "score": "0.41677874", "text": "action (action) {\n return {\n find: (params = {}) => {\n params.action = action;\n return this.find(params);\n },\n\n get: (id, params = {}) => {\n params.action = action;\n return this.get(id, params);\n },\n\n create: (data, params = {}) => {\n params.action = action;\n return this.create(data, params);\n },\n\n update: (id, data, params = {}) => {\n params.action = action;\n return this.update(id, data, params);\n },\n\n patch: (id, data, params = {}) => {\n params.action = action;\n return this.patch(id, data, params);\n },\n\n remove: (id, params = {}) => {\n params.action = action;\n return this.remove(id, params);\n }\n };\n }", "title": "" }, { "docid": "666fa4b941115868e37e28807d804e15", "score": "0.4165422", "text": "function createLinks(list){\n var i;\n for(i=0;i<list.length;i++){\n var j;\n var linkid = list[i].linkid;\n var linkstage = list[i].linkstage;\n\n for(j=0;j<list.length;j++){\n let newLink = new Link();\n if(j != i && list[j].linkid != undefined && list[j].linkid == linkid){\n newLink.id = linkid;\n newLink.stage = linkstage;\n newLink.date = list[j].searchStage(linkstage);\n if(list[j].actualtitle == undefined){\n newLink.docname = list[j].name;\n newLink.docid = list[j].id;\n }else{\n newLink.docname = list[j].actualtitle;\n newLink.docid = list[j].actualid;\n }\n list[i].appendLink(newLink);\n }\n }\n }\n}", "title": "" }, { "docid": "7f4ef10d6f504c604e7a87a053461326", "score": "0.41643068", "text": "function buildActionLinkForSubgridItem(label, actionMap, $actionMenu, $subgridItem) {\n var apiInfo = actionMap[label];\n var $listItem = $(\"#action_list_item\").clone();\n $actionMenu.find(\"#action_list\").append($listItem.show()); \n $listItem.data(\"label\", label);\t \n \n var label2;\n if(label in dictionary)\n label2 = dictionary[label]; \n else\n label2 = label;\n $listItem.find(\"#link\").text(label2); \n \n $listItem.data(\"apiInfo\", apiInfo);\t \n \n var id = $subgridItem.data(\"jsonObj\").id;\n \n $listItem.bind(\"click\", function(event) { \n $actionMenu.hide(); \t \n var $actionLink = $(this); \n \n var dialogBeforeActionFn = apiInfo.dialogBeforeActionFn; \n if(dialogBeforeActionFn == null) {\t \n var apiCommand = \"command=\"+apiInfo.api+\"&id=\"+id; \n doActionToSubgridItem(id, $actionLink, apiCommand, $subgridItem); \n }\n else {\n dialogBeforeActionFn($actionLink, $subgridItem);\t\n } \n return false;\n }); \n}", "title": "" }, { "docid": "0f39d97b107923ab0371c1ff429e4359", "score": "0.41640645", "text": "existingAction(clip, optionalRoot) {\n const root = optionalRoot || this._root,\n rootUuid = root.uuid,\n clipObject = typeof clip === 'string' ? AnimationClip.findByName(root, clip) : clip,\n clipUuid = clipObject ? clipObject.uuid : clip,\n actionsForClip = this._actionsByClip[clipUuid];\n\n if (actionsForClip !== undefined) {\n return actionsForClip.actionByRoot[rootUuid] || null;\n }\n\n return null;\n }", "title": "" }, { "docid": "fbc08286d389893f333f487774abda87", "score": "0.41601375", "text": "registerActions(actions, path, prevPath = '') {\n if (typeof actions === 'function') {\n this.registerAction(actionable(actions, prevPath, false), path);\n } else {\n each(actions, (fn, fnKey) => {\n this.registerActions(fn, Reducer.getActionName(path, fnKey), prevPath || path);\n });\n }\n }", "title": "" }, { "docid": "bee3c4833b82f70795526fce4c0624c7", "score": "0.41518566", "text": "function applyActionToActions(prevActions, action) {\n\tif (action.type === 'undo') {\n\t\treturn prevActions.slice(0, prevActions.length - 1);\n\t}\n\treturn [...prevActions, action];\n}", "title": "" }, { "docid": "84c374ac8af3f53b189ba70f0400f011", "score": "0.41505814", "text": "function createMainMediaActionLink(optionalContainer)\n\t\t{\n\t\t\t$.each(app.data.getContentActions(), function(i, action) {\n\t\t\t\tvar selectorStr = 'a[data-storymaps=' + action.id + ']';\n\t\t\t\tvar link = optionalContainer ? $(optionalContainer).find(selectorStr) : $(selectorStr),\n\t\t\t\t\tvalidAction = link.length > 0;\n\n\t\t\t\tif (action.type == 'navigate' && (action.index == -1 || action.hiddenSection)) {\n\t\t\t\t\tvalidAction = false;\n\n\t\t\t\t\t// In builder and viewer if owner - style the navigate link that point to invalid section differently\n\t\t\t\t\t// In viewer when not owner, just disable the link\n\t\t\t\t\tvar errorClass = app.userCanEdit ? 'navigate-error' : 'navigate-error-silent';\n\t\t\t\t\tlink.addClass(errorClass);\n\n\t\t\t\t\tif (app.userCanEdit) {\n\t\t\t\t\t\tvar label = i18n.viewer.mainStage.errorDeleted;\n\n\t\t\t\t\t\tif (action.hiddenSection && action.index != -1) {\n\t\t\t\t\t\t\tlabel = i18n.viewer.mainStage.errorNotPublished;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlink.tooltip({\n\t\t\t\t\t\t\ttrigger: 'hover',\n\t\t\t\t\t\t\tplacement: 'top',\n\t\t\t\t\t\t\tcontainer: 'body',\n\t\t\t\t\t\t\ttitle: label\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (validAction) {\n\t\t\t\t\t$(\"a[data-storymaps=\" + action.id + \"]\").off('click').click(function(evt){\n\t\t\t\t\t\tvar fromKeyboard = !(evt.screenX || evt.screenY);\n\t\t\t\t\t\tperformAction(action, link, fromKeyboard);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t\t$(\"#mainStagePanel\").find(\".backLbl\").html(i18n.viewer.mainStage.back);\n\t\t}", "title": "" }, { "docid": "2059642a2a91e78c35191d1046a9437d", "score": "0.4138534", "text": "existingAction(clip, optionalRoot) {\n\t\t\tconst root = optionalRoot || this._root,\n\t\t\t\t\t\trootUuid = root.uuid,\n\t\t\t\t\t\tclipObject = typeof clip === 'string' ? AnimationClip.findByName(root, clip) : clip,\n\t\t\t\t\t\tclipUuid = clipObject ? clipObject.uuid : clip,\n\t\t\t\t\t\tactionsForClip = this._actionsByClip[clipUuid];\n\n\t\t\tif (actionsForClip !== undefined) {\n\t\t\t\treturn actionsForClip.actionByRoot[rootUuid] || null;\n\t\t\t}\n\n\t\t\treturn null;\n\t\t}", "title": "" }, { "docid": "7d0f3bf9640d74efc98dd618ba6736a4", "score": "0.41257325", "text": "function add_addmovie_link(a, tt) {\n var link = document.createElement('a');\n link.href = 'add://this-movie-to-your-seen-list';\n link.innerHTML = '[+]';\n var onclick = function(event) {\n link.innerHTML = ' [Adding...]';\n event.stopPropagation();\n event.preventDefault();\n var url = 'http://www.imdb.com/title/tt' + tt + '/';\n do_doc(url, function(doc) {\n //The best way seems to be to get it from the photo! (Other ways will include the year, and fail on episodes.)\n my_movies[tt] = doc.getElementsByClassName('photo')[0].childNodes[1].title;\n gm_setValue('my_movies', JSON.stringify(my_movies));\n //link.innerHTML = '[\\u2713]';\n link.innerHTML = '';\n highlight(a);\n add_removemovie_link(a, tt);\n });\n };\n link.addEventListener('click', onclick, false);\n a.parentNode.insertBefore(link, a.nextSibling);\n }", "title": "" }, { "docid": "e9f8fc9b9f387703423e4f4de655eb0a", "score": "0.412504", "text": "add(action) {\n if (isQuestion(action) || isPause(action)) {\n this._queue.push(action);\n return this._channel.add(this);\n }\n if (this._lastMessage && action.perform(this._lastMessage))\n return;\n else\n this._queue.push(action);\n if (!this._queue.some(isQuestion))\n this._channel.add(this);\n }", "title": "" }, { "docid": "80d2ff67639c2a1c770b01cad8d569bb", "score": "0.4119125", "text": "function lancementAction(obj,a,d, t){\n\tvar parent = document.getElementById(\"detail_piece\");\n\tif(parent) {\n\t\tparent.removeChild(parent.lastChild);\n\t\tdocument.getElementById(\"detail_piece\").appendChild(listObjet(obj.piece));\n\t}\n\n\tif (confirm(\"Etes-vous sur de vouloir créer une nouvelle action \" + a.name + \" ?\")) {\n\t\tlet new_action = new Action(obj, a.name);\n\n\t\tnew_action.dateDebut = d;\n\t\tnew_action.time = t;\n\t\tnew_action.param1_name = a.param1_name;\n\t\tnew_action.param1 = a.param1;\n\t\tnew_action.param1_unit = a.param1_unit;\n\t\thome.actions.push(new_action);\n\t\talert(\"L'action a bien été enregistrée\");\n\t} else {\n\t\talert(\"L'action a bien été annulée\");\n\t}\n}", "title": "" }, { "docid": "b9bb35c907dc61ec6577e0be4b9a5e03", "score": "0.41057152", "text": "function addUrlActionForm(id, form, index) {\n\tvar actionString;//for get string of action in formTag\n\tvar finalAction;//action with concat id = numberIdTopic\n\t\n\tactionString = form.getAttribute('action');\n\t\n\tif (actionString.indexOf('updateId=', index) != -1){ //45 because without id information, the length of action's string is 45.\n\t\tactionString = actionString.slice(0, index); //slice cut other part than parameter range\n\t}\n\n\tfinalAction = actionString + '&updateId=' + id;\n\t\n\tform.setAttribute('action', finalAction);\n}", "title": "" }, { "docid": "c21af4cb67d7c4301a9db13557b958da", "score": "0.41056925", "text": "function renderAction() {\n /* If there is an action passed in, then it should be rendered here. For now the only action\n supported is to remove the teacher from a project, but this might be expanded in the future.\n */\n return action === null ? null : (\n <ClickableFontAwesomeIcon icon={faTimes} onClick={action} />\n );\n }", "title": "" }, { "docid": "7ba0b22cf697e56ba0e139ec66fa16c1", "score": "0.41012037", "text": "function nm_activate_link(_action, _senders)\n{\n\t// jQuery(_senders[0].iface.getDOMNode()).find('a:first').trigger('click');\tnot sure why this is NOT working\n\t \n\tvar a_href = jQuery(_senders[0].iface.getDOMNode()).find('a:first');\n\t\n\tif (typeof a_href != undefined)\t \n\t{\n\t\tvar target = a_href.attr('target');\t \n\t\tvar href = a_href.attr('href');\t \n\t\tif (a_href.attr('onclick'))\n\t\t\ta_href.click();\n\t\telse if (target)\t \n\t\t\twindow.open(href,target);\t \n\t\telse\t \n\t\t\twindow.location = href;\t \n }\n}", "title": "" }, { "docid": "8903b2b49a459f4fa752de912489e93b", "score": "0.4091603", "text": "@action addFeed(feed = {}) {}", "title": "" }, { "docid": "b3047b421b77cf2b84466083474e5df5", "score": "0.40875503", "text": "function createOrJoin(action) {\n localStorage.clear();\n let roomCode;\n const isHost = action === 'create';\n const nickname = document.getElementById(action + '-nickname').value;\n if (isHost) {\n roomCode = getRandomRoomId();\n } else {\n roomCode = document.getElementById('join-room-code').value;\n }\n localStorage.setItem('isHost', isHost);\n localStorage.setItem('nickname', nickname);\n localStorage.setItem('roomCode', roomCode);\n window.location.replace('/game?roomCode=' + roomCode + '&isHost=' + isHost);\n}", "title": "" }, { "docid": "8ad4a0c33b49b2bef6142ce33aa3ec85", "score": "0.4083072", "text": "function Actions(action, actionOptions, score) {\n\tthis.action = action;\n\tthis.actionOptions = actionOptions;\n\tthis.score = score;\n}", "title": "" }, { "docid": "77190e219d2ec16934597bef71cc32a8", "score": "0.40800348", "text": "launchAction() {\n switch (this.config.actionType) {\n // Simple link\n case 'link' :\n this.gotoUrl()\n break\n\n // Ajax call\n case 'ajax':\n this.callUrl()\n break\n }\n }", "title": "" }, { "docid": "d79bca8cf95dfca58cd42b0941b2e63b", "score": "0.40786332", "text": "registerAction(fn, path) {\n this.actions = this.getActions();\n set(this.actions, path, fn);\n }", "title": "" }, { "docid": "4f1246b1d9f30e1cfc843e3307e0769a", "score": "0.40698335", "text": "function CreateSearchLink(link, search, text)\r\n{\r\n var linkPieces = link['href'].replace('season-', '').replace('episode-', '').split('/');\r\n var url = search + FormatShowName(linkPieces[3]) + '+S' + PadToTwoDigits(linkPieces[4]) + 'E' + PadToTwoDigits(linkPieces[5]);\r\n\r\n link.parentNode.appendChild(document.createTextNode(' '));\r\n link.parentNode.appendChild(CreateLink(url, text, 'searchLinks'));\r\n\r\n console.log(' linked:\\t' + linkPieces[3]);\r\n}", "title": "" }, { "docid": "5882481baf4b81b82635c74b788ead19", "score": "0.4066795", "text": "_registerToActions(action) {\n switch(action.actionType) {\n case ActionTypes.NEW_LOCATION:\n this._new(action.payload, dataTypes.LOCATIONS);\n break;\n case ActionTypes.EDIT_LOCATION:\n this._edit(action.payload, dataTypes.LOCATIONS);\n break;\n case ActionTypes.REMOVE_LOCATION:\n this._remove(action.payload, dataTypes.LOCATIONS);\n break;\n case ActionTypes.NEW_CATEGORY:\n this._new(action.payload, dataTypes.CATEGORIES);\n break;\n case ActionTypes.EDIT_CATEGORY:\n this._edit(action.payload, dataTypes.CATEGORIES);\n break;\n case ActionTypes.REMOVE_CATEGORY:\n this._remove(action.payload, dataTypes.CATEGORIES);\n break;\n }\n }", "title": "" }, { "docid": "aebc750869c00762c8a6098707433bba", "score": "0.40625304", "text": "function addSimpleActionButton(px, py, name, actiontype) {\n var button = makeLinkButton(px, py, name, parent);\n var action = new Action(actiontype);\n button.onclick = function() {\n prepareAction(action);\n //drawMap();\n //drawHud();\n };\n return button;\n }", "title": "" }, { "docid": "bc6806b7efb82fc80079a00577b6606a", "score": "0.40610918", "text": "setAction(action, value) {\n if (this.actions.has(action.getName()) &&\n this.actions.get(action.getName()) === value) {\n return;\n }\n if (value !== 0) {\n this.actions.set(action.getName(), value);\n } else {\n this.actions.delete(action.getName());\n }\n }", "title": "" }, { "docid": "46584bf60dfac7d211f3f87b3906a0a5", "score": "0.4055872", "text": "function ActionList(actionRepository, items) {\n\tvar self = this;\n\tif (!arguments.length) {\n\t\treturn;\n\t}\n\tif (!(actionRepository instanceof NamedList)) {\n\t\tthrow new Error('Action repository must be NamedList');\n\t}\n\tself.actionRepository = actionRepository;\n\tObject.defineProperty(self, 'actionRepository', { enumerable: false });\n\tif (items) {\n\t\tself.push.apply(self, items);\n\t}\n}", "title": "" }, { "docid": "eac9f6fefc3d547d9814a52b0ac95f4e", "score": "0.4049474", "text": "addActionView(actionView) {\n this._actionViews.push(actionView);\n\n if (this.isPageRendered) {\n actionView.render();\n }\n }", "title": "" }, { "docid": "3f3db8413063a2aa84137ed9e21faa2c", "score": "0.40366158", "text": "static add(socialAction){\n\t\tlet kparams = {};\n\t\tkparams.socialAction = socialAction;\n\t\treturn new kaltura.RequestBuilder('socialaction', 'add', kparams);\n\t}", "title": "" }, { "docid": "2ac34af6a60e0eccd4dca24034932223", "score": "0.4035081", "text": "function loadAction() {\n\t\t// What action are we on\n\t\tvar action = suggestions[suggestionsIndex];\n\n\t\t$scope.action = action;\n\t}", "title": "" }, { "docid": "d0f197f4f62e6adea3c9c100bf14c731", "score": "0.40129885", "text": "function Action(options) {\n var _ref10, _ref11, _ref12, _ref13, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9;\n this.option_strings = (_ref4 = options.option_strings) != null ? _ref4 : [];\n this.dest = (_ref5 = options.dest) != null ? _ref5 : '';\n this.nargs = (_ref6 = options.nargs) != null ? _ref6 : null;\n this.constant = (_ref7 = options.constant) != null ? _ref7 : null;\n this.defaultValue = (_ref8 = options.defaultValue) != null ? _ref8 : null;\n this.type = (_ref9 = options.type) != null ? _ref9 : null;\n this.choices = (_ref10 = options.choices) != null ? _ref10 : null;\n this.required = (_ref11 = options.required) != null ? _ref11 : false;\n this.help = (_ref12 = options.help) != null ? _ref12 : null;\n this.metavar = (_ref13 = options.metavar) != null ? _ref13 : null;\n }", "title": "" }, { "docid": "49bac31b1ab7fc4c2f24d501e32a16d4", "score": "0.4006186", "text": "execute(action) {\n const commands = ['a', 'd', 'l'];\n if (commands.includes(action)) {\n this.add(obj);\n }\n }", "title": "" }, { "docid": "da65105066afd4c456b1681af2df2bf2", "score": "0.3998155", "text": "function addTag(targetUrl, actionProp, tagHref) {\r\tvar params = {'action2020' : actionProp,\r\t\t\t'uri' : tagHref};\r\t\r\tpost(targetUrl, params);\r}", "title": "" }, { "docid": "3f437b47abd49e030528c800b368359b", "score": "0.39963344", "text": "makeActions(actions) {\n return actions.map(spec => {\n let [type, ...args] = spec.split(\":\");\n\n let canonicalAction = canonicalActions[type];\n if (!canonicalAction) throw new Error(`Unknown action type: ${type}`);\n\n return ACTION_TYPES[canonicalAction].create(\n this.ns,\n this.player,\n ...args\n );\n });\n }", "title": "" }, { "docid": "75136498257543aa1535d151363d1ebc", "score": "0.39935997", "text": "function createRuleDisplay(selector) {\n // Copy rule form into container\n $(selector).append($(\"#rule_description\").contents().clone(true));\n\n initQTip( $(selector).find(\"#rule_condition\") );\n \n\n $(selector).find(\"#rule_addAction\").click(function() {\n var type = $(selector).find(\"#rule_addActionType\").val();\n\n var actions = {\n \"StartMission\" : createStartMissionAction,\n \"Vibrate\" : createVibrateAction,\n \"PlayAudio\" : createPlayAudioAction,\n \"ShowMessage\" : createShowMessageAction,\n \"DecrementVariable\" : createDecrementVariableAction,\n \"IncrementVariable\" : createIncrementVariableAction,\n \"SetVariable\" : createSetVariableAction,\n \"SetHotspotVisibility\" : createSetHotspotVisibilityAction,\n \"EndGame\" : createEndGameAction\n };\n\n if (type in actions) {\n actions[type](selector);\n }\n else {\n alert(\"Unsupported Action: \" + type);\n }\n\n });\n\n}", "title": "" }, { "docid": "fb7049c537ba3379b2112183ee94b88e", "score": "0.3990022", "text": "function parseActions$1(a, opt, load) {\n for (let key in a) {\n switch (key) {\n case \"enableStylesheet\":\n enableStylesheetExtension(a[key]);\n break;\n\n case \"disableStylesheet\":\n disableStylesheetExtension(a[key]);\n break;\n\n case \"htmlAddClass\":\n if (!html.hasClass(a[key])) html.addClass(a[key]);\n break;\n\n case \"htmlRemoveClass\":\n html.removeClass(a[key]);\n break;\n\n case \"func\":\n if (typeof a[key] === \"function\") {\n try {\n a[key](opt, load);\n } catch (e) {\n console.error(\"Error occurred processing action function.\");\n console.error(e);\n lastError = e;\n console.error(\"Dump of naughty function attached below\");\n console.log(a[key]);\n }\n } else {\n throw \"There's a func action, but it isn't a function? :thinking:\";\n }\n\n break;\n }\n }\n}", "title": "" }, { "docid": "2994bc4c560c0568b7f7f95d801f3b5e", "score": "0.39802957", "text": "function createAction(event, action, result, options, redux) {\n\tconst namespace = redux.namespace\n\tconst { sync } = options\n\n\t// If `result` is a property name,\n\t// then add that property to `connectXxx()`.\n\tif (typeof result === 'string') {\n\t\tredux.add_state_properties(result)\n\t}\n\t// If `result` is an object of property getters,\n\t// then add those properties to `connectXxx()`.\n\telse if (typeof result === 'object') {\n\t\tredux.add_state_properties(...Object.keys(result))\n\t}\n\n\t// Default \"on result\" handler is a reducer that does nothing.\n\t// For example, when Redux action result is ignored.\n\t// (I guess those would be rare cases, like \"send log message\")\n\tresult = result || (state => state)\n\n\t// Synchronous action\n\tif (sync) {\n\t\t// Reducer\n\t\tredux.on(eventName(namespace, event), get_action_value_reducer(result))\n\t\t// Redux \"action creator\"\n\t\treturn (argument) => ({\n\t\t\ttype: eventName(namespace, event),\n\t\t\t[RESULT_ACTION_PROPERTY]: argument\n\t\t})\n\t}\n\n\t// Asynchronous action\n\n\t// Add Redux reducers handling events:\n\t//\n\t// * pending\n\t// * success\n\t// * error\n\t//\n\tadd_asynchronous_action_reducers(redux, namespace, event, get_action_value_reducer(result))\n\n\t// Redux \"action creator\"\n\treturn (...parameters) => ({\n\t\tevent: eventName(namespace, event),\n\t\tpromise: ({ http }) => action.apply(this, parameters)(http)\n\t})\n}", "title": "" }, { "docid": "f7caa1ebcb667cee2584671388a599dc", "score": "0.39800474", "text": "function makeAction (controller, method, opts) {\n var action = {action: controller + '@' + method};\n return _.extend (action, opts);\n}", "title": "" }, { "docid": "062e453c4d9b9482d69c9a83407e30b5", "score": "0.39795884", "text": "function post_action(action) {\n console.log('POST action')\n console.log(JSON.stringify(action))\n let requestOptions = reqPost(action)\n return fetch(api + `actions/add`, requestOptions)\n .then(res => {\n console.log(res)\n return res.json()\n })\n}", "title": "" }, { "docid": "9c4e89093774df9d176964b5468e1092", "score": "0.3974401", "text": "function Adhoc (predicate, action) {\n\tthis.predicate = predicate;\n\tthis.action = action;\n\tthis.active = true;\n}", "title": "" }, { "docid": "178de2286f97164ece3f57df799c8263", "score": "0.39618817", "text": "_addToolbarAction (node, standartAction, groupIndex) {\n this._lastVisibleToolbarElement = this._lastVisibleToolbarElement.addNext(node, standartAction, groupIndex);\n }", "title": "" }, { "docid": "4fe2aa6febf370fc714358b5abde1f48", "score": "0.39480615", "text": "getAction(args) {\n return !args\n ? undefined\n : args.a\n ? 'a'\n : args.add\n ? 'add'\n : args.list\n ? 'list'\n : args.delete\n ? 'delete'\n : undefined; //action\n }", "title": "" }, { "docid": "c7001f587ed857a6846ae6f64c0db8dd", "score": "0.39441746", "text": "function getAction() {\n\t\tif (!hasAction()) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn _response.result.action;\n\t}", "title": "" }, { "docid": "5fe156a8abd978e94ac92d31383c0b42", "score": "0.39422116", "text": "function testNewLink() {\r\n\t// I've seen a bug where I create a new link and it doesn't get linked. I don't know why.\t\r\n\tapp.open(testEmptyFile);\r\n\r\n\t//loadLinkedFiles.tempImgFile\r\n\tvar oldTempFileModifiedDate=null;\r\n\tif (loadLinkedFiles.tempImgFile.exists)\r\n\t\toldTempFileModifiedDate=linksXMP.xmpHelper.getDateFileModified( loadLinkedFiles.tempImgFile ).toString();\r\n\taction_LinkTo.newLinkTo(testLinkToFile);\r\n\t\r\n\tassertEquals(true,loadLinkedFiles.tempImgFile.exists,\"After linking a file the temp file should exist at \"+loadLinkedFiles.tempImgFile);\r\n\tif (oldTempFileModifiedDate!=null) {\r\n\t\tassertNotEquals(oldTempFileModifiedDate,linksXMP.xmpHelper.getDateFileModified( loadLinkedFiles.tempImgFile ).toString(),\"After creating a new link, the temp file should have been modified.\");\r\n\t}\r\n\r\n\tvar layerName=\"BorderImageExample2\";\r\n\tvar xml = canLinkIt.getActiveLayerInfo(\"1\");\r\n\txml = canLinkIt.getActiveLayerInfo(\"1\");\r\n\tcheckForLayerIsUpToDate(layerName);\t\r\n\t\r\n\tassertEquals(true, xml.indexOf(\"<property id=\\\"isCurrent\\\"><true/></property>\")>-1, \"testNewLink: The XML should include a property, isCurrent=true, but it' doesn't.\\nxml=\"+xml);\r\n\tassertEquals(true, xml.indexOf(\"FlashBuilderProject/TestFiles/Files/Folder2/LinkToThese/BorderImageExample2.psd</string></property>\")>-1,\r\n\t\t\"testNewLink: The XML should include a property with the uri being the path to the file, but it' doesn't.\\nxml=\"+xml);\r\n\tassertEquals(true, xml.indexOf(\"<property id=\\\"relativeURI\\\"><string>../Folder2/LinkToThese/BorderImageExample2.psd</string></property>\")>-1,\r\n\t\t\"testNewLink: The XML should include a property with the relativeURI being the relative path to the file, but it' doesn't.\\nxml=\"+xml);\t\r\n\t\r\n\tapp.activeDocument.close(SaveOptions.DONOTSAVECHANGES);\r\n}", "title": "" }, { "docid": "1f71344bd440b51f4f46c1f2eb73830a", "score": "0.39398706", "text": "function getActions() {\n\t\t// scrape actions from page\n\t\tvar actions=scrapeActions();\n\t\t\n\t\t//console.log(actions);\n\t\t// if none available, load from storage\n\t\tvar tally=0;\n\t\t$.each(actions,function() {\n\t\t\ttally++;\n\t\t});\n\t\tif (tally==0) {\n\t\t\tactions=loadActions();\n\t\t\t//console.log(['loaded ACTIONS',actions]);\n\t\t} else {\n\t\t\t//console.log(['scraped ACTIONS',actions]);\n\t\t//\tsaveActions(actions);\n\t\t}\n\t\treturn actions;\n\t}", "title": "" }, { "docid": "6a214a1a5cde4c133b9adde049246f9a", "score": "0.39340723", "text": "function liftAction(action) {\n\t var liftedAction = {\n\t type: ActionTypes.PERFORM_ACTION,\n\t action: action,\n\t timestamp: Date.now()\n\t };\n\t return liftedAction;\n\t}", "title": "" }, { "docid": "9a6bc27f3c54235466523dfce035c41e", "score": "0.3933955", "text": "addRedoAction(action) {\n this.redoActions.push(action);\n }", "title": "" }, { "docid": "742bb91f6547f4e7ccceeb71683f3018", "score": "0.3923005", "text": "addAction(action) {\n this.undoStack.push(action);\n this.redoStack = [];\n }", "title": "" }, { "docid": "18bbf12d131c0735f77b60ab1a598827", "score": "0.39221948", "text": "function createLinkContextMenu () {\n chrome.management.getSelf(result => {\n var menuTitle = chrome.i18n.getMessage('addLink')\n menuTitle += (result.installType === 'development') ? ' (dev)' : ''\n\n chrome.contextMenus.create({\n title: menuTitle,\n contexts: ['link'],\n onclick: addLinkToList\n })\n })\n}", "title": "" }, { "docid": "5ba3f2b2d6cc5121c222319722d3bc7e", "score": "0.39212662", "text": "function makeAction (controller, method, opts) {\n let action = {action: controller + '@' + method};\n return extend (action, opts);\n}", "title": "" }, { "docid": "bec09aeab21ba292d28a1137f910527a", "score": "0.3920392", "text": "function createAddLinkForMenu() {\r\n var addItem = $(\"<li>\").attr(\"id\", \"add-li\");\r\n addItem.hide();\r\n var add_link = $(\"<a>\").attr(\"id\", \"header\").attr(\"href\", \"#\").text(\r\n jQuery.i18n.prop(\"news.add\"));\r\n add_link.unbind().click(function() {\r\n addNewsPage();\r\n });\r\n add_link.appendTo(addItem);\r\n addItem.appendTo(\".menu-action\");\r\n addItem.fadeIn(900);\r\n}", "title": "" } ]
898948ab03b417a0dd489faa12572429
Function: _fnInitComplete Purpose: Draw the table for the first time, adding all required features Returns: Inputs: object:oSettings dataTables settings object
[ { "docid": "9df91e85d09a236fc73bf88865f99710", "score": "0.60731876", "text": "function _fnInitComplete ( oSettings, json )\n\t\t{\n\t\t\toSettings._bInitComplete = true;\n\t\t\tif ( typeof oSettings.fnInitComplete == 'function' )\n\t\t\t{\n\t\t\t\tif ( typeof json != 'undefined' )\n\t\t\t\t{\n\t\t\t\t\toSettings.fnInitComplete.call( oSettings.oInstance, oSettings, json );\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\toSettings.fnInitComplete.call( oSettings.oInstance, oSettings );\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" } ]
[ { "docid": "5f26ce4392863a5dd165dee38d241120", "score": "0.6935526", "text": "function _fnInitalise ( oSettings )\n\t\t{\n\t\t\tvar i, iLen;\n\t\t\t\n\t\t\t/* Ensure that the table data is fully initialised */\n\t\t\tif ( oSettings.bInitialised === false )\n\t\t\t{\n\t\t\t\tsetTimeout( function(){ _fnInitalise( oSettings ); }, 200 );\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t/* Show the display HTML options */\n\t\t\t_fnAddOptionsHtml( oSettings );\n\t\t\t\n\t\t\t/* Draw the headers for the table */\n\t\t\t_fnDrawHead( oSettings );\n\t\t\t\n\t\t\t/* Okay to show that something is going on now */\n\t\t\t_fnProcessingDisplay( oSettings, true );\n\t\t\t\n\t\t\t/* Calculate sizes for columns */\n\t\t\tif ( oSettings.oFeatures.bAutoWidth )\n\t\t\t{\n\t\t\t\t_fnCalculateColumnWidths( oSettings );\n\t\t\t}\n\t\t\t\n\t\t\tfor ( i=0, iLen=oSettings.aoColumns.length ; i<iLen ; i++ )\n\t\t\t{\n\t\t\t\tif ( oSettings.aoColumns[i].sWidth !== null )\n\t\t\t\t{\n\t\t\t\t\toSettings.aoColumns[i].nTh.style.width = _fnStringToCss( oSettings.aoColumns[i].sWidth );\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t/* If there is default sorting required - let's do it. The sort function\n\t\t\t * will do the drawing for us. Otherwise we draw the table\n\t\t\t */\n\t\t\tif ( oSettings.oFeatures.bSort )\n\t\t\t{\n\t\t\t\t_fnSort( oSettings );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\toSettings.aiDisplay = oSettings.aiDisplayMaster.slice();\n\t\t\t\t_fnCalculateEnd( oSettings );\n\t\t\t\t_fnDraw( oSettings );\n\t\t\t}\n\t\t\t\n\t\t\t/* if there is an ajax source */\n\t\t\tif ( oSettings.sAjaxSource !== null && !oSettings.oFeatures.bServerSide )\n\t\t\t{\n\t\t\t\toSettings.fnServerData.call( oSettings.oInstance, oSettings.sAjaxSource, [], function(json) {\n\t\t\t\t\t/* Got the data - add it to the table */\n\t\t\t\t\tfor ( i=0 ; i<json.aaData.length ; i++ )\n\t\t\t\t\t{\n\t\t\t\t\t\t_fnAddData( oSettings, json.aaData[i] );\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t/* Reset the init display for cookie saving. We've already done a filter, and\n\t\t\t\t\t * therefore cleared it before. So we need to make it appear 'fresh'\n\t\t\t\t\t */\n\t\t\t\t\toSettings.iInitDisplayStart = oSettings._iDisplayStart;\n\t\t\t\t\t\n\t\t\t\t\tif ( oSettings.oFeatures.bSort )\n\t\t\t\t\t{\n\t\t\t\t\t\t_fnSort( oSettings );\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\toSettings.aiDisplay = oSettings.aiDisplayMaster.slice();\n\t\t\t\t\t\t_fnCalculateEnd( oSettings );\n\t\t\t\t\t\t_fnDraw( oSettings );\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t_fnProcessingDisplay( oSettings, false );\n\t\t\t\t\t\n\t\t\t\t\t/* Run the init callback if there is one - done here for ajax source for json obj */\n\t\t\t\t\tif ( typeof oSettings.fnInitComplete == 'function' )\n\t\t\t\t\t{\n\t\t\t\t\t\toSettings.fnInitComplete.call( oSettings.oInstance, oSettings, json );\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tif ( !oSettings.oFeatures.bServerSide )\n\t\t\t{\n\t\t\t\t_fnProcessingDisplay( oSettings, false );\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "66ed9751fe8a323933cf137f9f5182be", "score": "0.66204375", "text": "function initializeTable () {\n\t\n\tif(DTBtnTappedOnce ===0 & tableExists){\n\t\talert('The pre-existing main table has to be initialized first before Searching, Adding, or Editing a note! OR if changing databases. Tap the DISPLAY TABLE button.');\n\t\ttableScreenOptions();\n\t}//end if if(DTBtnTappedOnce ===0 & tableExists)\n}//end function initializeTable", "title": "" }, { "docid": "b883ae3fd3b030fef17adfcb3ae799a4", "score": "0.6584378", "text": "function initAll() {\n status = \"B\";\n drawTable();\n}", "title": "" }, { "docid": "78723af7c174d8505ef5d82ba17fbeb9", "score": "0.648103", "text": "function _fnInitialise ( oSettings )\n\t\t{\n\t\t\tvar i, iLen, iAjaxStart=oSettings.iInitDisplayStart;\n\t\t\t\n\t\t\t/* Ensure that the table data is fully initialised */\n\t\t\tif ( oSettings.bInitialised === false )\n\t\t\t{\n\t\t\t\tsetTimeout( function(){ _fnInitialise( oSettings ); }, 200 );\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t/* Show the display HTML options */\n\t\t\t_fnAddOptionsHtml( oSettings );\n\t\t\t\n\t\t\t/* Build and draw the header / footer for the table */\n\t\t\t_fnBuildHead( oSettings );\n\t\t\t_fnDrawHead( oSettings, oSettings.aoHeader );\n\t\t\tif ( oSettings.nTFoot )\n\t\t\t{\n\t\t\t\t_fnDrawHead( oSettings, oSettings.aoFooter );\n\t\t\t}\n\n\t\t\t/* Okay to show that something is going on now */\n\t\t\t_fnProcessingDisplay( oSettings, true );\n\t\t\t\n\t\t\t/* Calculate sizes for columns */\n\t\t\tif ( oSettings.oFeatures.bAutoWidth )\n\t\t\t{\n\t\t\t\t_fnCalculateColumnWidths( oSettings );\n\t\t\t}\n\t\t\t\n\t\t\tfor ( i=0, iLen=oSettings.aoColumns.length ; i<iLen ; i++ )\n\t\t\t{\n\t\t\t\tif ( oSettings.aoColumns[i].sWidth !== null )\n\t\t\t\t{\n\t\t\t\t\toSettings.aoColumns[i].nTh.style.width = _fnStringToCss( oSettings.aoColumns[i].sWidth );\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t/* If there is default sorting required - let's do it. The sort function will do the\n\t\t\t * drawing for us. Otherwise we draw the table regardless of the Ajax source - this allows\n\t\t\t * the table to look initialised for Ajax sourcing data (show 'loading' message possibly)\n\t\t\t */\n\t\t\tif ( oSettings.oFeatures.bSort )\n\t\t\t{\n\t\t\t\t_fnSort( oSettings );\n\t\t\t}\n\t\t\telse if ( oSettings.oFeatures.bFilter )\n\t\t\t{\n\t\t\t\t_fnFilterComplete( oSettings, oSettings.oPreviousSearch );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\toSettings.aiDisplay = oSettings.aiDisplayMaster.slice();\n\t\t\t\t_fnCalculateEnd( oSettings );\n\t\t\t\t_fnDraw( oSettings );\n\t\t\t}\n\t\t\t\n\t\t\t/* if there is an ajax source load the data */\n\t\t\tif ( oSettings.sAjaxSource !== null && !oSettings.oFeatures.bServerSide )\n\t\t\t{\n\t\t\t\tvar aoData = [];\n\t\t\t\t_fnServerParams( oSettings, aoData );\n\t\t\t\toSettings.fnServerData.call( oSettings.oInstance, oSettings.sAjaxSource, aoData, function(json) {\n\t\t\t\t\tvar aData = json;\n\t\t\t\t\tif ( oSettings.sAjaxDataProp !== \"\" )\n\t\t\t\t\t{\n\t\t\t\t\t\tvar fnDataSrc = _fnGetObjectDataFn( oSettings.sAjaxDataProp );\n\t\t\t\t\t\taData = fnDataSrc( json );\n\t\t\t\t\t}\n\n\t\t\t\t\t/* Got the data - add it to the table */\n\t\t\t\t\tfor ( i=0 ; i<aData.length ; i++ )\n\t\t\t\t\t{\n\t\t\t\t\t\t_fnAddData( oSettings, aData[i] );\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t/* Reset the init display for cookie saving. We've already done a filter, and\n\t\t\t\t\t * therefore cleared it before. So we need to make it appear 'fresh'\n\t\t\t\t\t */\n\t\t\t\t\toSettings.iInitDisplayStart = iAjaxStart;\n\t\t\t\t\t\n\t\t\t\t\tif ( oSettings.oFeatures.bSort )\n\t\t\t\t\t{\n\t\t\t\t\t\t_fnSort( oSettings );\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\toSettings.aiDisplay = oSettings.aiDisplayMaster.slice();\n\t\t\t\t\t\t_fnCalculateEnd( oSettings );\n\t\t\t\t\t\t_fnDraw( oSettings );\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t_fnProcessingDisplay( oSettings, false );\n\t\t\t\t\t_fnInitComplete( oSettings, json );\n\t\t\t\t}, oSettings );\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t/* Server-side processing initialisation complete is done at the end of _fnDraw */\n\t\t\tif ( !oSettings.oFeatures.bServerSide )\n\t\t\t{\n\t\t\t\t_fnProcessingDisplay( oSettings, false );\n\t\t\t\t_fnInitComplete( oSettings );\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "78723af7c174d8505ef5d82ba17fbeb9", "score": "0.648103", "text": "function _fnInitialise ( oSettings )\n\t\t{\n\t\t\tvar i, iLen, iAjaxStart=oSettings.iInitDisplayStart;\n\t\t\t\n\t\t\t/* Ensure that the table data is fully initialised */\n\t\t\tif ( oSettings.bInitialised === false )\n\t\t\t{\n\t\t\t\tsetTimeout( function(){ _fnInitialise( oSettings ); }, 200 );\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t/* Show the display HTML options */\n\t\t\t_fnAddOptionsHtml( oSettings );\n\t\t\t\n\t\t\t/* Build and draw the header / footer for the table */\n\t\t\t_fnBuildHead( oSettings );\n\t\t\t_fnDrawHead( oSettings, oSettings.aoHeader );\n\t\t\tif ( oSettings.nTFoot )\n\t\t\t{\n\t\t\t\t_fnDrawHead( oSettings, oSettings.aoFooter );\n\t\t\t}\n\n\t\t\t/* Okay to show that something is going on now */\n\t\t\t_fnProcessingDisplay( oSettings, true );\n\t\t\t\n\t\t\t/* Calculate sizes for columns */\n\t\t\tif ( oSettings.oFeatures.bAutoWidth )\n\t\t\t{\n\t\t\t\t_fnCalculateColumnWidths( oSettings );\n\t\t\t}\n\t\t\t\n\t\t\tfor ( i=0, iLen=oSettings.aoColumns.length ; i<iLen ; i++ )\n\t\t\t{\n\t\t\t\tif ( oSettings.aoColumns[i].sWidth !== null )\n\t\t\t\t{\n\t\t\t\t\toSettings.aoColumns[i].nTh.style.width = _fnStringToCss( oSettings.aoColumns[i].sWidth );\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t/* If there is default sorting required - let's do it. The sort function will do the\n\t\t\t * drawing for us. Otherwise we draw the table regardless of the Ajax source - this allows\n\t\t\t * the table to look initialised for Ajax sourcing data (show 'loading' message possibly)\n\t\t\t */\n\t\t\tif ( oSettings.oFeatures.bSort )\n\t\t\t{\n\t\t\t\t_fnSort( oSettings );\n\t\t\t}\n\t\t\telse if ( oSettings.oFeatures.bFilter )\n\t\t\t{\n\t\t\t\t_fnFilterComplete( oSettings, oSettings.oPreviousSearch );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\toSettings.aiDisplay = oSettings.aiDisplayMaster.slice();\n\t\t\t\t_fnCalculateEnd( oSettings );\n\t\t\t\t_fnDraw( oSettings );\n\t\t\t}\n\t\t\t\n\t\t\t/* if there is an ajax source load the data */\n\t\t\tif ( oSettings.sAjaxSource !== null && !oSettings.oFeatures.bServerSide )\n\t\t\t{\n\t\t\t\tvar aoData = [];\n\t\t\t\t_fnServerParams( oSettings, aoData );\n\t\t\t\toSettings.fnServerData.call( oSettings.oInstance, oSettings.sAjaxSource, aoData, function(json) {\n\t\t\t\t\tvar aData = json;\n\t\t\t\t\tif ( oSettings.sAjaxDataProp !== \"\" )\n\t\t\t\t\t{\n\t\t\t\t\t\tvar fnDataSrc = _fnGetObjectDataFn( oSettings.sAjaxDataProp );\n\t\t\t\t\t\taData = fnDataSrc( json );\n\t\t\t\t\t}\n\n\t\t\t\t\t/* Got the data - add it to the table */\n\t\t\t\t\tfor ( i=0 ; i<aData.length ; i++ )\n\t\t\t\t\t{\n\t\t\t\t\t\t_fnAddData( oSettings, aData[i] );\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t/* Reset the init display for cookie saving. We've already done a filter, and\n\t\t\t\t\t * therefore cleared it before. So we need to make it appear 'fresh'\n\t\t\t\t\t */\n\t\t\t\t\toSettings.iInitDisplayStart = iAjaxStart;\n\t\t\t\t\t\n\t\t\t\t\tif ( oSettings.oFeatures.bSort )\n\t\t\t\t\t{\n\t\t\t\t\t\t_fnSort( oSettings );\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\toSettings.aiDisplay = oSettings.aiDisplayMaster.slice();\n\t\t\t\t\t\t_fnCalculateEnd( oSettings );\n\t\t\t\t\t\t_fnDraw( oSettings );\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t_fnProcessingDisplay( oSettings, false );\n\t\t\t\t\t_fnInitComplete( oSettings, json );\n\t\t\t\t}, oSettings );\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t/* Server-side processing initialisation complete is done at the end of _fnDraw */\n\t\t\tif ( !oSettings.oFeatures.bServerSide )\n\t\t\t{\n\t\t\t\t_fnProcessingDisplay( oSettings, false );\n\t\t\t\t_fnInitComplete( oSettings );\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "e958d1fc2fe80d93660efbce76a1884b", "score": "0.62903947", "text": "function initialize(){\n newTable();\n}", "title": "" }, { "docid": "f1b51967a6649fd542da41067c10379b", "score": "0.6053391", "text": "function fnInitComplete() {\r\n $('#catalogTable').show('slow');\r\n $('#filterByMonth').show('slow');\r\n $('#initialHint').hide();\r\n }", "title": "" }, { "docid": "8b7fc53223cae53e5b83ae3ac4c1526e", "score": "0.60285985", "text": "function initComplete() {\n}", "title": "" }, { "docid": "50a7cf7344f3bbdac3a44f5be04116b2", "score": "0.59633076", "text": "function Init(){\r\n\t\tdisplayTables();\r\n\t\tbindScroll();\t\t\r\n\t}", "title": "" }, { "docid": "33423a3d37fda5450d65868962c78aad", "score": "0.5921673", "text": "function init() {\n\n //Set Triggers Table to Datatable instance\n triggers_table.dataTable({\n \"columnDefs\": [ {\n \"targets\": 'no-sort',\n \"orderable\": false,\n } ]\n });\n\n }", "title": "" }, { "docid": "8138bdba92999c3e6f639aebfe55f909", "score": "0.5876251", "text": "function initializePrescriptionTable(data, updatePrescriptionCallback, success) {\n\n\n function apertureStop (cell) {\n\n // \n if (cell.getValue() == true) {\n return \"<span class=\\\"badge badge-info\\\">STOP</span>\";\n } else {\n return \"\";\n }\n }\n\n // console.log(data);\n\n // convert to standard form \n lensTable = convertToLensTable(data); // fill in missing fields!\n\n // Tabulator \n lens.table = new Tabulator(\"#lens-table\", {\n cellEdited:function(cell){\n console.log(\"lens edited - update the prescription\");\n updatePrescriptionCallback();\n },\n data:lensTable,\n height:\"600px\",\n addRowPos:\"bottom\",\n selectable:true, \n movableRows:true,\n columns:[\n {rowHandle:true, formatter:\"handle\", headerSort:false, frozen:true, width:30, minWidth:30},\n {title:\"Group\", field:\"group\", width:100, headerSort:false}, \n {title:\"Type\", field:\"type\", width:100, headerSort:false}, \n {title:\"Description\", field:\"description\", width:200, editor:\"input\", headerSort:false},\n {title:\"Ref. Index\", field:\"index\", mutator:Number, width:100, align:\"center\", sorter:\"number\", editor:\"input\", headerSort:false},\n {title:\"Surf. R.\", field:\"radius\", mutator:Number, align:\"center\", width:100, editor:\"input\", headerSort:false},\n {title:\"Thickness\", field:\"thickness\", mutator:Number, align:\"center\", width:100, editor:\"input\", headerSort:false},\n {title:\"Ap. Diameter\", field:\"aperture\", align:\"center\", width:100, editor:\"input\", headerSort:false},\n {title:\"Stop Flag\", field:\"stop\", align:\"center\", width:100, sorter:\"date\", editor:\"input\", headerSort:false, formatter:apertureStop}\n ],\n });\n\n\n // show it! \n updatePrescriptionCallback ();\n\n\n /* JQuery */\n\n //Add row on \"Add Row\" button click\n $(\"#lens-table-add-row\").click(function(){\n\n // entry area here \n\n });\n\n //Delete row on \"Delete Row\" button click\n $(\"#lens-table-del-row\").click(function(){\n lens.table.deleteRow(1);\n });\n\n //Clear table on \"Empty the table\" button click\n $(\"#lens-table-clear\").click(function(){\n lens.table.clearData()\n });\n\n //Reset table contents on \"Reset the table\" button click\n $(\"#lens-table-reset\").click(function(){\n lens.table.setData(tabledata);\n });\n\n // succeesed \n success ();\n\n\n }", "title": "" }, { "docid": "44a5317dc89d6e7215acc2bc5b52b8dc", "score": "0.58507115", "text": "function markTableReady(isReady) {\n jq(\"#gbMainTable\").attr(\"isReady\", isReady);\n}", "title": "" }, { "docid": "9c3015a5b134cd018c01ab49879ac742", "score": "0.58374953", "text": "function tableInit(){\n\t// Add Initial data\n\tfor(var i=0; i<100; i++){\n\t\tif(i==50)\n\t\t\t// Filler Row\n\t\t\t$('table tbody').append('<tr id=\"filler\" style=\"height: 0;\"></tr>');\n\t\t$('table tbody').append('<tr>' + get_data(i) + '</tr>');\n\t}\n\t// Calculate Row height\n\trowHeight = $('table tbody tr').outerHeight();\n\t// Update body height to fit maxRows\n\t$('body').css('height', (maxRows*rowHeight) + 'px');\n}", "title": "" }, { "docid": "9f1bef74a4f4d48d50435207494db2a4", "score": "0.5776147", "text": "function initializeTableData() {\n tableData = [];\n \n // create the header row\n var headerRow = [];\n \n // create the Challenge header cell\n var challengeCell = {};\n challengeCell.text = 'Challenge';\n challengeCell.editable = false;\n headerRow.push(challengeCell);\n \n // create the Step header cell\n var stepCell = {};\n stepCell.text = 'Step';\n stepCell.editable = false;\n headerRow.push(stepCell);\n \n // create the Height header cell\n var heightCell = {};\n heightCell.text = 'Height';\n heightCell.editable = false;\n headerRow.push(heightCell);\n \n // create the Mass header cell\n var massCell = {};\n massCell.text = 'Mass';\n massCell.editable = false;\n headerRow.push(massCell);\n \n // create the Friction header cell\n var frictionCell = {};\n frictionCell.text = 'Friction';\n frictionCell.editable = false;\n headerRow.push(frictionCell);\n \n // create the Distance header cell\n var distanceCell = {};\n distanceCell.text = 'Distance';\n distanceCell.editable = false;\n headerRow.push(distanceCell);\n \n // add the header row to the table\n tableData.push(headerRow);\n}", "title": "" }, { "docid": "146ab1af19f22c3762c47630fd621156", "score": "0.57684183", "text": "function initTable(){\n $('#dashboard').dataTable({\n \"searching\": false,\n \"lengthChange\": false,\n \"language\": {\n \"info\": \"Page _PAGE_ sur _PAGES_ pour _TOTAL_ annonce(s)\",\n \"zeroRecords\": \"Aucune annonce trouvée. N'hesitez pas à en créer !\",\n \"infoEmpty\": \"\",\n \"paginate\": {\n \"previous\": \"«\",\n \"next\": \"»\"\n }\n },\n \"ordering\": false,\n \"pageLength\": 4,\n \"dom\": '<\"top\"p<\"clear\">>rt<\"bottom\"i<\"clear\">>',\n \"pagingType\": \"simple\"\n });\n}", "title": "" }, { "docid": "1227b6dbdf2320a90187dda18b89f0e5", "score": "0.5721743", "text": "function init() {\n // createtable funcion\n createTable();\n}", "title": "" }, { "docid": "006a084d84dee68197da0debaa51555f", "score": "0.5698735", "text": "function start_table() {\r\n $('#crime_table').dataTable({\r\n \"sPaginationType\": \"bootstrap\",\r\n \"sScrollY\": \"425px\",\r\n \"oLanguage\": {\r\n \"sLengthMenu\": \"_MENU_ records per page\"\r\n }\r\n });\r\n}", "title": "" }, { "docid": "368ca3335211491319e7e2e598e421d2", "score": "0.5680159", "text": "function init() {\n cityOptions();\n stateOptions();\n countryOptions();\n shapeOptions();\n buildTable();\n}", "title": "" }, { "docid": "352e10017bb2afca08e170f5176f5c65", "score": "0.56716776", "text": "function init(){\n\t// Initialize table\n\ttableInit();\n\t// Set OnScroll Listener\n\t$(window).on('scroll', function(){\n\t\tif($(window).scrollTop() + $(window).height() >= 35*rowHeight && $(window).scrollTop() < $('body').height() - 35*rowHeight){\n\t\t\t// Clear Scroll Trigger Timer if exists\n\t\t\tclearTimeout(timer);\n\t\t\t// Start Scroll Trigger Timer\n\t\t\ttimer = setTimeout(function(){\n\t\t\t\ttableDrawVisible();\n\t\t\t}, 5)\n\t\t}else if($(window).scrollTop() + $(window).height() < 35*rowHeight){\n\t\t\t// Reset Table condition\n\t\t\t$('#filler').css('height', '0');\n\t\t\tfor(var i=51; i<=101; i++){\n\t\t\t\t$('table tbody tr:nth-child(' + i + ')').html(get_data(i-1));\n\t\t\t}\n\t\t}\n\t});\n}", "title": "" }, { "docid": "23db79489d8eef7303e125ae1e6cd608", "score": "0.5661217", "text": "function initializeTables() {\n fillTable(bloodPressure, 'bpTable');\n fillTable(egfrData, 'kdTable');\n printResults(calculateBP(bloodPressure), \"bpResults\");\n printResults(calculateKD(egfrData), \"kdResults\");\n }", "title": "" }, { "docid": "236637f5d4aeba11dd5a33b59ed2c58d", "score": "0.5651253", "text": "function init() {\n init_table()\n\n setExpandAllButton()\n setCollapseAllButton()\n setSearch()\n setResetButton()\n}", "title": "" }, { "docid": "beaa4ce6cf47208e896d90fa342b6c2c", "score": "0.563719", "text": "function init() {\n\t// PASTE YOUR URLs HERE\n\t// these URLs come from Google Sheets 'shareable link' form\n\t// the first is the polygon layer and the second the points\n\tvar polyURL =\n\t\t'https://docs.google.com/spreadsheets/d/1NBWmLVVLQFYasJLAb-DZ10iHXS_ASRgPQ3zwjGyZvZQ/edit?usp=sharing#gid=970510810';\n\n\tTabletop.init({ key: polyURL, callback: addPolygons, simpleSheet: true });\n}", "title": "" }, { "docid": "0ff6df28cf04778ed160fe29cd1d9b50", "score": "0.56341875", "text": "function tableReady() {\n $('.edit-button').on('click', editContact);\n $('.delete-button').on('click', deleteContact);\n }", "title": "" }, { "docid": "04e7e8bdc75618de02512f8161f9f9c8", "score": "0.56055224", "text": "function setupTable() {\n\n // Clear out the empty rows\n $('tbody').html('');\n\n\tcontentTbl = $('#contentTbl').dataTable({\n\t bPaginate : true,\n\t bLengthChange : false,\n\t\tbAutoWidth : false,\n\t\tiDisplayLength : 25,\n\t\tsPaginationType : 'full_numbers',\n\t\tbSortClasses : false,\n\t\tbProcessing : true,\n\t\taaSorting : [],\n\t\tsAjaxSource : 'json/' + currentContent + '/',\n\t\tfnInitComplete : function() { hideAjaxLoader(); },\n\t\toLanguage: {\n\t\t\t\tsSearch : 'Search:',\n\t\t\t\tsZeroRecords : 'No files found',\n\t\t\t\tsInfo : 'Showing _START_ to _END_ of _TOTAL_ files'\n\t\t},\n\t\taoColumns : [\n\t\t { bVisible : false, bSearchable : false },\n\t\t { sTitle : 'Title' },\n\t\t { sTitle : 'Newsgroup' },\n\t\t { sTitle : 'Submitted By' },\n\t\t { sTitle : 'Size' },\n\t\t { sTitle : 'Age' }\n\t\t\t]\n\t});\n\n\tsetupRowEvents();\n\n\t// Create the ajax loader for table processing\n\t$('#contentTbl_processing').html('<img src=\"http://media.birdpiss.com/css/images/ajax-loader.gif\" alt=\"Shovelling coal into the server...\" />');\n\n\t// Make the search textbox a little longer and add focus\n\t$('#contentTbl_filter :text:first').addClass('ui-widget input nzbSearch').attr('size', 50).focus();\n\n\t// Add a download btn next to search\n\t$('#contentTbl_filter').append('&nbsp;<input type=\"button\" value=\"Download Selected\" id=\"downloadBtn\" class=\"ui-widget-content nzbBtn\" />');\n\n // Add an event to our download btn\n\t$('#downloadBtn').click(function() {\n\t var selectedRows = getSelectedRows();\n\t if (selectedRows.length > 0) {\n \t\twindow.location = 'download/' + selectedRows;\n\t\t\tclearSelectedRows();\n \t} else {\n \t $('#msgDialog').dialog('open').html(\"<span style='color:red;'>Download Fail:</span> Can't give you something you didn't ask for\");\n \t}\n\t});\n}", "title": "" }, { "docid": "630a1a10498ba0a155237dfcea2b53d8", "score": "0.5580063", "text": "function myReadyHandler() {\n sortIndices = table.getSortInfo().sortedIndexes\n\n /*----------------------------------------------------------------\n IF the table has been sorted, we now have a list of <tr> indices\n ----------------------------------------------------------------*/\n if (sortIndices){\n /*----------------------------------------------------------------\n Add id's to all but first row (column names)\n ----------------------------------------------------------------*/\n $(\".google-visualization-table-table tr\").not(':first').each(function(index) {\n $(this).attr('id', userIDs[sortIndices[index]]);\n $(this).attr('class', 'athlete');\n });\n }\n\n /*----------------------------------------------------------------\n ELSE, sortIndices is NULL and we can just index in order\n ----------------------------------------------------------------*/\n else {\n $(\".google-visualization-table-table tr\").not(':first').each(function(index) {\n $(this).attr('id', userIDs[index]);\n $(this).attr('class', 'athlete');\n });\n }\n\n /*----------------------------------------------------------------\n On hover, suggest clickability\n ----------------------------------------------------------------*/\n $(\"tr.athlete\").hover(function() {\n $(this).css({\"cursor\": \"pointer\"});\n });\n\n /*----------------------------------------------------------------\n On click, redirect to selected athlete's page\n ----------------------------------------------------------------*/\n $(\"tr.athlete\").click(function() {\n window.location.href = \"/log/athlete/\"+$(this).attr('id');\n });\n }", "title": "" }, { "docid": "cd9c72c914142ab10525eb9786bca984", "score": "0.55668455", "text": "function init()\n{\n // Do total calculations for the skill and weight tables.\n SkillCalcRanks();\n CalcWeight();\n\n if (sheet().firstload.value == \"true\")\n {\n sheet().firstload.value = \"false\";\n _skillFill();\n }\n\n RefreshPic();\n}", "title": "" }, { "docid": "6b711919f850a690a70065b637204a10", "score": "0.5535851", "text": "function handleLoadedData(fc) {\n all = features = fc.features;\n fixTableSettings();\n addFilterTogglesControl();\n updateDisplay();\n}", "title": "" }, { "docid": "ee8635145cb70a33862fd4a7e0da3640", "score": "0.5519211", "text": "function addConfigtable(fullInit, key) {\n if ((!fullInitDone || fullInit) && filterOQSKeyByName(key)!=undefined && !key.includes(\"-ref\")) {\n var table = document.getElementById('configtable');\n Object.keys(refobj[key]).sort().forEach(function(r) {\n var tr = table.insertRow(-1);\n var tabCell = tr.insertCell(-1);\n tabCell.style.width = \"20%\";\n tabCell.style.textAlign = \"right\";\n tabCell.innerHTML = r;\n tabCell = tr.insertCell(-1);\n tabCell.style.width = \"80%\";\n tabCell.style.textAlign = \"left\";\n tabCell.innerHTML = JSON.stringify(refobj[key][r]).replace(/\\\"/g, \"\");\n });\n }\n}", "title": "" }, { "docid": "2a4b3b9addcc42b633e25778bb9ddb43", "score": "0.5508482", "text": "onload() {\n const ziviData = this.getZiviData();\n\n this.table.fillInDefaultData(ziviData, this.updateSummary.bind(this));\n this.startEventHandlers();\n\n }", "title": "" }, { "docid": "20724478926537e2643a31a80282fd42", "score": "0.5506468", "text": "function drawDynamicTable() {\n try {\n var tableSortingColumns = [\n { orderable: true}, null, null, null, null, null, null, null,\n ];\n var tableFilteringColumns = [\n { type: \"null\" }, { type: \"text\" }, { type: \"text\" }, { type: \"text\" }, { type: \"text\" }, { type: \"text\" }, { type: \"text\" }, { type: \"text\" },\n ];\n \n var tableColumnDefs = [\n \n ];\n var initialSortingColumn = 0;\n loadDynamicTable('transfers', \"AutoCodeHide\", tableColumnDefs, tableFilteringColumns, tableSortingColumns, initialSortingColumn, \"Form\");\n } catch(err) {\n alert(err);\n }\n}", "title": "" }, { "docid": "3ee58bc451c422ef72a996664efcf8e2", "score": "0.547533", "text": "function init(){\n\n initReverseFlags();\n\n fulFillTable();\n\n bindHeaders();\n\n /**\n * Initialize reverse flags object\n */\n function initReverseFlags() {\n /*init reverse flags object*/\n REVERSE_FLAGS.file=true;\n REVERSE_FLAGS.size=true;\n REVERSE_FLAGS.date=true;\n }\n\n /**\n * FulFull tableBody\n */\n function fulFillTable() {\n for (let index = 0; index < ROWS_COUNT; index++) {\n DATA[index] = {};\n\n DATA[index].file = Math.random().toString(36).substring(7) + \" \" + \"file name\";\n DATA[index].size = Math.ceil(Math.random() * 1000);\n DATA[index].date = dateRandomGenerator(2, 8, 2);\n }\n\n buildTable();\n }\n\n /**\n * Bind tableBody header to functionality\n */\n function bindHeaders() {\n\n //array\n $('th:lt(3)').each((index,elem)=>{\n $(elem).click((e)=>{\n\n restorePseudoElements();\n\n /*find key to sort*/\n let keySort=getKeySortByPropertyIndex(index);\n let isReversed=REVERSE_FLAGS[keySort];\n\n if(!isReversed)\n $(e.target).removeClass().addClass('desc');\n else\n $(e.target).removeClass().addClass('asc');\n\n sortDataByPropertyKey(keySort);\n buildTable();\n });\n });\n\n /**\n * restores all th pseudo classes to default\n */\n function restorePseudoElements() {\n $('th:lt(3)').each((index,elem)=>{\n $(elem).removeClass().addClass('none');\n });\n }\n }\n\n /**\n * Generates random Date\n * @param rangeOfDays\n * @param startHour\n * @param hourRange\n * @returns {Date} Date\n */\n function dateRandomGenerator (rangeOfDays,startHour,hourRange){\n let today = new Date(Date.now());\n return new Date(today.getYear()+1900,today.getMonth(), today.getDate()+Math.random() *rangeOfDays, Math.random()*hourRange + startHour, Math.random()*60)\n }\n }", "title": "" }, { "docid": "533ea126da6813485970938ce3d8cfc3", "score": "0.5448356", "text": "function drawDynamicTable() {\n try {\n var tableSortingColumns = [\n { orderable: false }, null, null, null,\n ];\n var tableFilteringColumns = [\n { type: \"null\" }, { type: \"text\" }, { type: \"text\" }, { type: \"text\" }, \n ];\n \n var tableColumnDefs = [\n \n ];\n var initialSortingColumn = 1;\n loadDynamicTable('Halls', \"AutoCodeHide\", tableColumnDefs, tableFilteringColumns, tableSortingColumns, initialSortingColumn, \"Form\");\n } catch(err) {\n alert(err);\n }\n}", "title": "" }, { "docid": "12ae8998a55b83d65e50a9d9d155f521", "score": "0.54273194", "text": "function onInitDone() {\n console.log('onInitDone');\n setupTexture();\n\n gl.clear(gl.COLOR_BUFFER_BIT);\n gl.drawElements(gl.TRIANGLES, 6, gl.UNSIGNED_BYTE, 0);\n}", "title": "" }, { "docid": "41b3227e577920d10516c09186334e77", "score": "0.5425628", "text": "function initializeData()\n{\n clearData();\n initializeTableRow('#careerAverage', 'Career Average');\n initializeTableRow('#threeYearAverage', 'Three Year Average');\n initializeTableRow('#currentYear', 'Current Year');\n}", "title": "" }, { "docid": "f5a292b264f4fe25c9aebb3a294b83e4", "score": "0.5403703", "text": "function FillTblRows() {\n console.log( \"===== FillTblRows === \");\n\n const tblName = get_tblName_from_selectedBtn();\n const field_setting = field_settings[tblName];\n\n //console.log( \" tblName\", tblName);\n //console.log( \" field_setting\", field_setting);\n //console.log( \" setting_dict.sel_subject_pk\", setting_dict.sel_subject_pk);\n\n// --- get data_rows\n const data_dicts = get_datadicts_from_sel_btn();\n\n// --- get list of hidden columns\n const col_hidden = b_copy_array_to_new_noduplicates(mod_MCOL_dict.cols_hidden);\n\n// - hide level when not level_req\n if(!setting_dict.sel_dep_level_req){col_hidden.push(\"lvl_abbrev\")};\n\n// - hide columns in mod_MCOL_dict.cols_skipped. cols_skipped got value in DatalistDownload\n if (mod_MCOL_dict.cols_skipped.hasOwnProperty(selected_btn)){\n const cols_skipped_list = mod_MCOL_dict.cols_skipped[selected_btn];\n col_hidden.push(...cols_skipped_list);\n };\n\n// --- reset table\n tblHead_datatable.innerText = null;\n tblBody_datatable.innerText = null;\n let item_count = 0;\n\n// --- create table header\n CreateTblHeader(field_setting, col_hidden);\n\n// --- create table rows\n if(data_dicts){\n for (const data_dict of Object.values(data_dicts)) {\n // only show rows of selected student / subject\n // selected_btns are: \"btn_ete_exams\", \"btn_duo_exams\", \"btn_ntermen\", \"btn_results\"\n\n let show_row = false;\n if (selected_btn === \"btn_ntermen\") {\n show_row = true;\n } else if (!setting_dict.sel_lvlbase_pk || data_dict.lvlbase_id === setting_dict.sel_lvlbase_pk) {\n show_row = (!setting_dict.sel_subject_pk || data_dict.subj_id === setting_dict.sel_subject_pk);\n };\n\n if(show_row){\n // --- insert row\n let tblRow = CreateTblRow(tblName, field_setting, data_dict, col_hidden)\n item_count += 1;\n };\n };\n };\n selected.no_items = !item_count;\n if (selected.no_items){\n if ([\"btn_ete_exams\", \"btn_duo_exams\", \"btn_results\"].includes(selected_btn)) {\n let msg_html = (selected_btn === \"btn_duo_exams\") ? loc.no_CVTE_exams :loc.no_ETE_exams;\n if (setting_dict.sel_dep_level_req && setting_dict.sel_lvlbase_code) {\n msg_html += \" \" + setting_dict.sel_lvlbase_code;\n }\n if (setting_dict.sel_subject_pk && setting_dict.sel_subject_name) {\n msg_html += \" \" + setting_dict.sel_subject_name;\n }\n msg_html += ((setting_dict.sel_examperiod === 1) ? loc.in_the_1st_examperiod :\n (setting_dict.sel_examperiod === 2) ? loc.in_the_2nd_examperiod :\n (setting_dict.sel_examperiod === 3) ? loc.in_the_3rd_examperiod : \"\") + \".\";\n\n let tblRow = tblBody_datatable.insertRow(-1);\n let td = tblRow.insertCell(-1);\n td = tblRow.insertCell(-1);\n td.setAttribute(\"colspan\", 6);\n let el = document.createElement(\"p\");\n el.className = \"border_bg_transparent p-2 my-4\"\n el.innerHTML = msg_html;\n td.appendChild(el);\n };\n }\n Filter_TableRows();\n }", "title": "" }, { "docid": "c96877cb2c71d91971353da4a5475c41", "score": "0.53861547", "text": "function RefreshTable() {\n dc.events.trigger(function () {\n\t\t\t\t//console.log(\"dc.events\");\n\t\t\t\t//datatablesynth.api()\n \t\t//\t.clear()\n \t\t//\t.rows.add( tableDimensionTop.top(Infinity) )\n \t\t//\t.draw() ;\n alldata = tableDimensionTop.top(Infinity);\n //console.log(alldata);\n datatablesynth.fnClearTable();\n datatablesynth.fnAddData(alldata);\n datatablesynth.fnDraw();\n });\n }", "title": "" }, { "docid": "e87dbb9c6cafedcbd3cc3c36146b47b7", "score": "0.5369426", "text": "function column_header_filterable_autocomplete_apply(table_object, number_of_columns) {\n l = []\n for (var i = 0; i < number_of_columns; i++) {\n l.push({\n column_number: i,\n filter_type: \"auto_complete\",\n text_data_delimiter: \",\"\n })\n }\n yadcf.init(table_object, l)\n}", "title": "" }, { "docid": "4b2ac8bd6f28cc4de0f068cf8d7b564e", "score": "0.5354105", "text": "function setupDataTables() {\n $('table').DataTable({ iDisplayLength: 5 });\n }", "title": "" }, { "docid": "5d46e0babf775cdee97a849265397059", "score": "0.53343", "text": "function setupDataTable(data) {\r\n // dataTable plugin is configured, initialized and stored in dataTableObj\r\n dataTableObj = $('#catalogTable').dataTable({\r\n \"sDom\": sDom, \r\n \"oTableTools\": {\"aButtons\": [\"csv\"], \"sSwfPath\": swfPath},\r\n \"bAutoWidth\": false, \r\n \"bPaginate\": false, \r\n \"bFilter\": true, \r\n \"bSort\": true, \r\n \"aaSorting\": [ [0,'asc'] ],\r\n \"bDestroy\": true,\r\n \"bInfo\": false, \r\n \"aoColumnDefs\": aoColumnDefs,\r\n \"aaData\": data,\r\n \"fnInitComplete\": fnInitComplete \r\n });\r\n }", "title": "" }, { "docid": "2a72add770bbbd318128e5bd33f64ffb", "score": "0.53215903", "text": "start() {\r\n this.output.enableTableControls();\r\n }", "title": "" }, { "docid": "d5ea146c452b4f5cfa924461c947f355", "score": "0.53158903", "text": "function initTable() {\n \n var nbLignes = $(\"#nbLignes\").val();\n var nbColonnes = $(\"#nbColonnes\").val();\n var URL = $(\"#URL\").val();\n \n /* charger l'image en mémoire, puis une fois chargé, commencer a construire le tableau de canvas */\n var image = _loadImage(URL);\n \n image.onload = function() { \n \n _onImageLoad(nbLignes,nbColonnes,image); \n \n /* ajouter les ecouteurs de cliques sur les canvas et les bouttons ainsi les touches de clavier */\n var jeu = new Jeu(nbLignes,nbColonnes);\n _addAllListeners(jeu);\n \n };\n \n}", "title": "" }, { "docid": "b0305a92968a121d874a227b00cac010", "score": "0.5307919", "text": "function initiateDOM () {\n\n var $tableClone = $table.clone()\n .removeAttr('id')\n .removeClass(defaults.baseClass)\n .addClass(defaults.baseClass + '-clon');\n\n $table.addClass(defaults.loadedClass);\n\n // wrapper for all the tables\n var $wrap = $table.wrap('<div class=\"pcf-wrap\"></div>').parent()\n .append('<div class=\"pcf-barX pcf-bar\"><div class=\"pcf-barWrap\"><div class=\"pcf-barInn\"></div></div></div>')\n .append('<div class=\"pcf-barXBottom pcf-bar\"><div class=\"pcf-barWrap\"><div class=\"pcf-barInn\"></div></div></div>')\n .append('<div class=\"pcf-barY pcf-bar\"><div class=\"pcf-barWrap\"><div class=\"pcf-barInn\"></div></div></div>');\n\n $wrap.find('.pcf-barWrap')\n .mousedown(function(){ $(this).addClass('mouseDown'); })\n .mouseup(function(){ $(this).removeClass('mouseDown'); })\n .mousemove(clickBarEvt)\n .click(clickBarEvt);\n\n // The original table => to enable \n var $fixHead = $table.wrap('<div class=\"pcf-fixHead\"></diiv>').parent();\n\n // table for the first column fix\n $wrap.append('<div class=\"pcf-fixCorner\"><div class=\"pcf-fixCorner-inn\"></div></div>')\n .find('.pcf-fixCorner-inn').append($tableClone.clone());\n\n // table for the first row fix\n $wrap.prepend('<div class=\"pcf-scroller\">')\n .find('.pcf-scroller')\n .on('scroll', scrollEvt)\n .append($tableClone.clone());\n\n // tabla for the left top orner\n $wrap.prepend('<div class=\"pcf-fixCol\"><div class=\"pcf-fixCol-inn\">')\n .find('.pcf-fixCol-inn').append($tableClone.clone());\n\n return {\n // wraper\n wrap: $wrap,\n\n // tables\n fixHead: $fixHead,\n scroller: $wrap.find('.pcf-scroller'),\n fixCol: $wrap.find('.pcf-fixCol'),\n fixCorner: $wrap.find('.pcf-fixCorner'),\n\n // scroll bars\n barX: $wrap.find('.pcf-barX'),\n barXBottom: $wrap.find('.pcf-barXBottom'),\n barY: $wrap.find('.pcf-barY'),\n }\n }", "title": "" }, { "docid": "c7cb60828746898787a6a88c8d5da8ff", "score": "0.5297651", "text": "function initTable(num){\n\n // Filter dataset by OTU id\n var filteredDate=dataset.metadata.filter(sample=>sample.id.toString()===num.toString())[0];\n\n\n // Create an list to store demographic information\n var valueList=Object.values(filteredDate);\n var valueKey=Object.keys(filteredDate);\n var demoInfo=[]\n for (var i=0;i<valueKey.length;i++){\n var element=`${valueKey[i]}: ${valueList[i]}`\n demoInfo.push(element);\n };\n\n // Add Demographic Information table in HTML\n var panel=d3.select(\"#sample-metadata\")\n var panelBody=panel.selectAll(\"p\")\n .data(demoInfo)\n .enter()\n .append(\"p\")\n .text(function(data){\n var number=data.split(\",\");\n return number;\n });\n \n }", "title": "" }, { "docid": "0fa1cfc79482eb7dae37d5d5839d5ff4", "score": "0.52852273", "text": "async function initTable() {\n await init()\n await initMujam();\n await initRootVector();\n callWorker()\n // await timer(\"All vectors created in \", tableGenerator)\n // await timer(\"All vectors created in \", readVectorFile)\n}", "title": "" }, { "docid": "607e599a9e2f2fad19723705e3e87378", "score": "0.52784073", "text": "function _table(targetDiv) {\r\n\t // Create and select table skeleton\r\n\t var tableSelect = targetDiv.append(\"table\")\r\n\t\t.attr(\"class\", \"display compact\")\r\n\t .attr(\"id\", \"fcuTable\") \r\n\t .style(\"visibility\", \"hidden\"); // Hide table until style loads;\r\n\t\t\t\r\n\t // Set column names\r\n\t var colnames = Object.keys(data[0]);\r\n\t\tif(typeof filter_cols !== 'undefined'){\r\n\t\t\t// If we have filtered cols, remove them.\r\n\t\t\tcolnames = colnames.filter(function (e) {\r\n\t\t\t\treturn filter_cols.indexOf(e) < 0;\r\n\t\t\t});\r\n\t\t}\r\n\t\t\r\n\t\t// Here I initialize the table and head only. \r\n\t\t// I will let DataTables handle the table body.\r\n\t var headSelect = tableSelect.append(\"thead\");\r\n\t headSelect.append(\"tr\")\r\n\t .selectAll('td')\r\n\t .data(colnames).enter()\r\n\t\t .append('td')\r\n\t\t .html(function(d) { return d; });\r\n\t\r\n\t\tif(typeof sort_by !== 'undefined'){\r\n\t\t\t// if we have a sort_by column, format it according to datatables.\r\n\t\t\tsort_by[0] = colnames.indexOf(sort_by[0]); //colname to col idx\r\n\t\t\tsort_by = [sort_by]; //wrap it in an array\r\n\t\t}\t\t\r\n\r\n\t // Apply DataTable formatting: https://www.datatables.net/\r\n\t $(document).ready(function() {\r\n\t table = $('#fcuTable').DataTable({\r\n\t data: data,\r\n\t columns: colnames.map(function(e) { \r\n\t\t\t\t//console.log(e); // for checking column order\r\n\t\t\t return {data: e}; \r\n\t\t\t }),\r\n\t \"bLengthChange\": false, // Disable page size change\r\n\t \"bDeferRender\": true,\r\n\t \"order\": sort_by,\r\n\t\t colReorder: {\r\n\t\t\t order: [0,1,2,7,3,5,4,6,16,14,9,13,11,12,10,15,8,17,18,19,20,21,22]\r\n\t\t\t },\r\n\t\t dom: 'Bfrtip',\r\n\t\t buttons: [\r\n\t\t {\r\n\t\t\t extend: 'csvHtml5',\r\n\t\t\t text: 'Export CSV',\r\n\t\t\t filename: 'fcu_data',\r\n\t\t\t download: 'open'\r\n\t\t },\r\n\t\t 'pageLength'\r\n\t\t ],\r\n\t\t lengthMenu: [\r\n\t\t\t\t[ 50, 100, 250, -1 ],\r\n\t\t\t\t['50', '100', '250', 'Show all']\r\n\t\t\t\t]\r\n\t });\r\n\t\t\t\r\n\t tableSelect.style(\"visibility\", \"visible\");\r\n\t\t\r\n $('#fcuTable tbody')\r\n .on( 'mouseover', 'tr', function () { highlight(this, true); } )\r\n .on( 'mouseleave', 'tr', function () { highlight(this, false); } )\r\n\t\t.on('click', 'tr', function () { \r\n\t\t\topDetPg(); // switch pages\t\t\t\r\n\t\t\tselected = table.row(this).data().Operator; // update selected value\t\t\t\r\n\t\t\tfillPage(selected);\t// fill in the page with selected company\r\n\t\t\tchange(refreshData(top50.filter(function(g) { return g.Operator == selected; })));\r\n\t\t\t// make sure text on selected option is the same as what was clicked\r\n\t\t\td3.select(\"#fetchComps\")\r\n\t\t\t\t.selectAll(\"option\")\r\n\t\t\t\t.property(\"selected\", function(g) {\r\n\t\t\t\t\treturn g == selected;\r\n\t\t\t\t});\r\n\t\t});\r\n\t\t\r\n\t\thomePg(); // set home page view ON\r\n\t\tdropCover(); // drop the mask/cover\r\n\t });\t\r\n\t}", "title": "" }, { "docid": "9981a7c38d78ca8e559d38b360d3088d", "score": "0.52772725", "text": "function initialize() {\n loadData();\n initModal();\n new TableFilter(dataTable, searchBox);\n }", "title": "" }, { "docid": "a05d33fe0f3b7b01aaa121300039f10a", "score": "0.5262129", "text": "function initializeTable() {\n\t\t\tvar tabIdInvitables;\n\t\t\tvar tabIdCommentaires;\n\t\t\tvar tabIdInvitees;\n\t\t\ttable = $table.DataTable( {\n\t serverSide: false,\n\t ajax: {\n\t url: 'getEntreprisesInvitablesEtInvitees',\n\t type: \"POST\",\n\t dataSrc: function ( json ) {\n\t \ttabIdInvitables = json[1];\n\t \ttabIdCommentaires = json[2];\n\t \ttabIdInvitees = json[3];\n\t \treturn json[0];\n\t }\n\t },\n\t autoWidth: false,\n\t scrollX: true,\n\t language: dataTablesLanguage,\n\t createdRow: function (row, objet, index) {\n\t $(row).attr('data-objet', JSON.stringify(objet));\n\t },\n\t columns: [\n\t \t{\n\t \t\torderable: false,\n\t \t\tdata: function ( row, type, val, meta ) {\n\t \t\t\treturn '<div class=\"checkbox checkbox-primary\"><input id=checkIdEnt' + row.idEntreprise + ' type=\"checkbox\" name=\"tabInvitations[]\" value=' + row.idEntreprise + ' class=\"styled styled-primary\"><label></label></div>';\n\t \t\t\t//return \"<input id=checkIdEnt\" + row.idEntreprise + \" type='checkbox' name='tabInvitations[]' value=\" + row.idEntreprise + \" />\";\n\t \t\t}\n\t \t},\n\t {\n\t \t\tdata: \"nomEntreprise\"\n\t \t},\n\t {\n\t \t\tdata: function ( row, type, val, meta ) {\n\t var adresse = row.rue + \", \" + row.numero;\n\t if (row.boite !== \"\") {\n\t adresse += \" - Boite : \" + row.boite;\n\t }\n\t return adresse;\n\t }\n\t },\n\t {\n\t \tdata: \"commune\"\n\t },\n\t {\n\t \tdata: \"codePostal\"\n\t },\n\t {\n\t \tdata: \"datePremierContact\", \n\t \trender : function(data, type, objet) {\n\t return data.dayOfMonth + \"/\" + data.monthValue + \"/\" + data.year;\n\t }\n\t },\n\t {\n\t \tdata: \"dateDerniereParticipation\", \n\t \trender : function(data, type, objet) {\n\t if (data == null) {\n\t return \"\";\n\t } else {\n\t return data.dayOfMonth + \"/\" + data.monthValue + \"/\" + data.year;\n\t }\n\t }\n\t },\n\t {\n\t \t\torderable: false,\n\t \t\tdata: function ( row, type, val, meta ) {\n\t return \"\";\n\t }\n\t }\n\t \n\t ],\n\t rowCallback: function(row, objet, index) {\n\t \t \n\t \t// On regarde pour les entreprises non invitables\n \t\t\t$node = this.api().row(row).nodes().to$();\n\n \t\tfor (var i=0; i<tabIdInvitables.length; i++ ) {\n\t \t\tif (objet.idEntreprise === tabIdInvitables[i].idEntreprise) {\n\t \t\t\t$node.addClass('success');\n\t \t\t}\n\t \t}\n\t \t\n\t \t// On regarde pour les commentaires\n\t \tfor (var i=0; i<tabIdCommentaires.length; i++ ) {\n\t \t\tif (objet.idEntreprise === tabIdCommentaires[i].idEntreprise) {\n\t \t\t\t$('td:eq(7)', row).html('<button type=\"button\" class=\"voir-commentaire btn btn-danger btn-sm\" \"aria-labal=\"Center Align\" data-toggle=\"modal\" data-target=\"#modalListeCommentaires\"><span class=\"fa fa-exclamation-circle \" aria-hidden=\"true\"></span> Commentaire(s)</button>' );\n\t \t\t}\n\t \t}\n\t \t\n\t \t// Table invitees\n\t \tfor (var i=0; i<tabIdInvitees.length; i++) {\n \t\t\t\tif (objet.idEntreprise === tabIdInvitees[i].idEntreprise) {\n \t\t\t\t\t$(row).find('#checkIdEnt' + objet.idEntreprise).attr('disabled', true).prop('checked', true);\n \t\t\t\t}\n \t\t\t}\n\t },\n\t order: [[1, 'asc']]\n\t });\n\t\t}", "title": "" }, { "docid": "d1240a834fa0d6d932ae17f3fa17fc4d", "score": "0.5250676", "text": "function initialiserDataTable()\n{\n\t\n\treturn {\n\t\t\"autoWidth\": false,\n\t\t\"sPaginationType\": \"full_numbers\",\n\t\t\"bStateSave\": true,\n\t\t\"aLengthMenu\": [[10, 25, 50, -1], [10, 25, 50, \"Toutes\"]],\n\t\t\"oLanguage\": {\n\t\t\t\"sLengthMenu\": \"Afficher _MENU_ lignes par page\",\n\t\t\t\"sZeroRecords\": \"Aucun résultat\",\n\t\t\t\"sInfo\": \"Eléments _START_ à _END_ des _TOTAL_ trouvés\",\n\t\t\t\"sInfoEmpty\": \"Aucun résultat\",\n\t\t\t\"sInfoFiltered\": \"(filtrés des _MAX_ disponibles)\",\n\t\t\t\"sSearch\": \" <i class=\\\" fas fa-search \\\"></i> \",\n\t\t\t\"oPaginate\": {\n \"sFirst\": \"<<\",\n \"sPrevious\": \"<\",\n \"sNext\": \">\",\n \"sLast\": \">>\"\n\t\t\t\t} \n\t\t\t}\n\n\t\t}\n}", "title": "" }, { "docid": "a294592c2740788e5bc20762edb06e2a", "score": "0.52307075", "text": "function initDataTable() \n{\n\toTable = $('#file_list').dataTable(\n\t\t\t{\n\t\t\t\t \"aoColumnDefs\":[\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t{ \"sWidth\": \"175px\", \"aTargets\": [ 0 ] },\n\t\t\t\t\t\t \t { \"sWidth\": \"175px\", \"aTargets\": [ 1 ] },\n\t\t\t\t\t\t \t { \"sWidth\": \"175px\", \"aTargets\": [ 2 ] },\n\t\t\t\t\t\t \t { \"sWidth\": \"175px\", \"aTargets\": [ 3 ] }\n\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\t \"aoColumnDefs\":[{ \"bVisible\":false,\"aTargets\":[4] }],\n\t\t\t\t\"bFilter\": false,\n\t\t\t\t\n\t\t\t\t\"bInfo\": false,\n\t\t\t\t\"iDisplayLength\": 50,\n\t\t\t\t\"bLengthChange\":false,\n\t\t\t\t\"bPaginate\": false,\n\t\t\t\t\"sScrollY\": 350,\n\t\t\t\t\"bAutoWidth\": false,\n\t\t\t\t\"fnRowCallback\":function(nRow,aData,iDisplayIndex,iDisplayIndexFull){\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$(\"td\",nRow).addClass('rowBorder');\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$(nRow).click(function()\n\t\t\t\t\t{\n\t\t\t\t\t\tvar aTrs = oTable.fnGetNodes();\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor ( var i=0 ; i<aTrs.length ; i++ )\n\t\t\t\t\t\t{\t\t\t\t\n\t\t\t\t\t\t\tif ( $(aTrs[i]).hasClass('row_selected') )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$(aTrs[i]).removeClass('row_selected');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$(nRow).addClass('row_selected');\n\t\t\t\t\t\t\n\t\t\t\t\t\tvar aPos = oTable.fnGetPosition( this );\n\t\t\t\t\t\t\n\t\t\t\t\t\tvar aData = oTable.fnGetData( aPos );\n\t\t\t\t\t\t\n\t\t\t\t\t\tselectedFileId = aData[4];\n\t\t\t\t\t\t\n\t\t\t\t\t\tselectedFileType = aData[3];\n\t\t\t\t\t\t\n\t\t\t\t\t});\t\t\n\t\t\t\t\t\n\t\t\t\t\treturn nRow;\n\t\t\t\t}\n\t\t\t});\n}", "title": "" }, { "docid": "426229a3b58e2fc1154a538a24c0df14", "score": "0.5224388", "text": "function FillTblRows() {\n console.log( \"===== FillTblRows === \");\n //console.log( \"setting_dict\", setting_dict);\n\n const tblName = (selected_btn === \"btn_overview\") ? \"overview\" : \"student\";\n const field_setting = field_settings[tblName];\n\n const data_rows = (selected_btn === \"btn_overview\") ? results_per_school_rows : student_rows;\n\n// --- get list of hidden columns\n const col_hidden = b_copy_array_to_new_noduplicates(mod_MCOL_dict.cols_hidden);\n // hide level when not level_req\n if(!setting_dict.sel_dep_level_req){col_hidden.push(\"lvl_abbrev\")};\n\n// --- reset table\n tblHead_datatable.innerText = null;\n tblBody_datatable.innerText = null;\n\n// --- create table header\n CreateTblHeader(field_setting, col_hidden);\n\n// --- loop through data_rows\n if(data_rows && data_rows.length){\n for (let i = 0, data_dict; data_dict = data_rows[i]; i++) {\n\n // --- set SBR_filter\n // Note: filter of filterrow is done by Filter_TableRows\n let show_row = true;\n if (show_row && setting_dict.sel_lvlbase_pk){\n show_row = (setting_dict.sel_lvlbase_pk === data_dict.lvlbase_id)\n };\n if (show_row && setting_dict.sel_sctbase_pk){\n show_row = (setting_dict.sel_sctbase_pk === data_dict.sctbase_id)\n };\n if (show_row && selected_btn === \"btn_result\" && setting_dict.sel_student_pk){\n show_row = (setting_dict.sel_student_pk === data_dict.id)\n };\n if(show_row){\n CreateTblRow(tblName, field_setting, data_dict, col_hidden);\n };\n };\n };\n// --- filter tblRows\n Filter_TableRows();\n } // FillTblRows", "title": "" }, { "docid": "927da2990eb4b12e30ee0e73ec182a9b", "score": "0.52229446", "text": "function buildAttributeTable() {\n\n // Remove existing table\n try {\n attributeTable.destroy();\n $('#attr-table-container').empty();\n } catch {};\n\n // Setup table columns\n $('#attr-table-container').append('<table id=\"attribute-table\" class=\"display\"></table>');\n $('#attribute-table').append(\"<thead><tr></tr></thead>\");\n $('#attribute-table>thead>tr').append('<th>GS_FID</th>');\n $('#attribute-table>thead>tr').append('<th>Feature</th>');\n var layerFields = [];\n for (var i = 0; i < layerList[activeLayer]['layerFields'].length; i++) {\n layerFields.push(layerList[activeLayer]['layerFields'][i]['fieldName']);\n $('#attribute-table>thead>tr').append(`<th>${layerList[activeLayer]['layerFields'][i]['fieldName']}</th>`);\n };\n\n // Initializes Discover Table\n attributeTable = $('#attribute-table').DataTable({\n 'select': {\n 'style': 'single'\n },\n 'serverSide': true,\n 'lengthChange': false,\n 'sort': false,\n 'ajax': {\n 'url': '/apps/hydroshare-data-viewer/ajax/update-attribute-table/',\n 'type': 'POST',\n 'data': {\n 'layer_fields': layerFields,\n 'layer_code': activeLayer\n },\n 'headers': {\n 'X-CSRFToken': getCookie('csrftoken')\n }\n },\n 'deferRender': true,\n 'scrollY': 209,\n 'scrollX': '100%',\n 'language': {\n 'loadingRecords': '<div class=\"main-loading-container\"><img class=\"main-loading-animation attr-loading\" src=\"/static/hydroshare_data_viewer/images/grid.svg\"></div>',\n 'processing': '<div class=\"main-loading-container\"><img class=\"main-loading-animation attr-loading\" src=\"/static/hydroshare_data_viewer/images/grid.svg\"></div>'\n },\n 'scroller': {\n 'loadingIndicator': true,\n 'displayBuffer': 20,\n 'rowHeight': 37\n },\n 'columnDefs': [\n {'visible': false, 'targets': [0]},\n ],\n 'drawCallback': function() {\n $('.dataTables_scrollHeadInner').css({'width':'100%'});\n\n attributeTable.rows().eq(0).each(function(index){\n var row = attributeTable.row(index);\n var data = row.data();\n if (data[0] === selectedLayer['fid']) {\n row.select();\n };\n });\n },\n });\n\n // Adds event listeners to Discover Table\n attributeTable.on('select', selectFeature);\n attributeTable.on('deselect', selectFeature);\n }", "title": "" }, { "docid": "8896475da103a97b8567a1c701392b6b", "score": "0.52223146", "text": "function init() {\n initMap();\n populateTables();\n}", "title": "" }, { "docid": "2e7d96ce7186b71ca39b14efa7ef218a", "score": "0.5221892", "text": "function display_initial_data()\n{\n var current_league = current_displayed_data[0].league;\n var table_data = select_league_data(current_league,csv_data);\n update_table(table_data,properties);\n}", "title": "" }, { "docid": "8451a1ce22d3c27578dd6ff6c2331ea4", "score": "0.52142286", "text": "function fillInMainTable(flag){\n if (flag == 'wide') {\n layoutTable.contents([\n [mapUnionChart, null, tableSolidCharts],\n [null, null, null],\n [tableChart1, null, tableChart2]\n ], true);\n layoutTable.getRow(0).height('35%');\n layoutTable.getRow(0).maxHeight(320);\n\n layoutTable.getCol(1).width(30);\n layoutTable.getRow(1).height(15);\n layoutTable.getRow(2).height(null);\n } else {\n layoutTable.contents([\n [mapUnionChart],\n [null],\n [tableSolidCharts],\n [tableChart]\n ], true);\n layoutTable.getRow(0).height(300);\n layoutTable.getRow(0).maxHeight(null);\n layoutTable.getRow(1).height(20);\n layoutTable.getRow(2).height(200);\n layoutTable.getRow(3).height(700);\n }\n layoutTable.draw();\n}", "title": "" }, { "docid": "06d07120b121aa1c72f1176ace3f4505", "score": "0.52141184", "text": "function initializeTable() {\n\t\t\ttable = $table.DataTable( {\n\t serverSide: false,\n\t ajax: {\n\t url: 'getParticipationsEntreprises',\n\t type: \"POST\",\n\t data: function ( d ) {\n\t d.idJournee = $selectJE.find(':selected').val();\n\t },\n\t dataSrc: \"\"\n\t },\n\t autoWidth: false,\n\t scrollX: true,\n\t language: dataTablesLanguage,\n\t createdRow: function (row, objet, index) {\n\t $(row).attr('data-objet', JSON.stringify(objet));\n\t },\n\t columns: [\n\t \t{\n\t \t\tdata: \"key.idParticipation\"\n\t \t},\n\t {\n\t \t\tdata: \"value\"\n\t \t},\n\t {\n\t \t\tdata: function ( row, type, val, meta ) {\n\t\t if (row.key.etat === \"INVITEE\") {\n\t\t return '<button type=\"button\" class=\"confirmer-participation btn btn-success btn-sm\" aria-labal=\"Center Align\"><span class=\"glyphicon glyphicon-ok-circle\" aria-hidden=\"true\"></span> Confirmer</button> ' +\n\t\t \t\t'<button type=\"button\" class=\"refuser-participation btn btn-danger btn-sm\" aria-labal=\"Center Align\" style=\"width:90px;\">' +\n\t\t \t\t'<span class=\"glyphicon glyphicon-remove-circle\" aria-hidden=\"true\"></span> Refuser</button>';\n\t\t } else if (row.key.etat !== \"REFUSEE\") {\n\t\t return '<select class=\"etat-participation selectpicker show-tick\" data-width=\"auto\"><option value=\"CONFIRMEE\">Confirmée</option><option value=\"FACTUREE\">Facturée</option><option value=\"PAYEE\">Payée</option><option value=\"REFUSEE\">Refusée</option></select>';\n\t\t } else {\n\t\t return \"<fieldset disabled>\" +\n\t\t \"<a type=\\\"button\\\" class=\\\"btn btn-outline btn-danger btn-sm\\\">\" +\n\t\t \"<span class=\\\"fa fa-times\\\" aria-hidden=\\\"true\\\"></span> Refusée\" +\n\t\t \"</a></fieldset>\";\n\t\t }\n\t \t\t},\n\t \t\twidth: \"20%\"\n\t \t},\n\t {\n\t \t\tdata: function ( row, type, val, meta ) {\n\t\t if (row.key.annulee === false) {\n\t\t return '<button type=\"button\" class=\"annuler-participation btn btn-outline btn-danger btn-sm\" \"aria-labal=\"Center Align\">' +\n\t\t \t\t'<span class=\"glyphicon glyphicon-remove-circle\" aria-hidden=\"true\"></span> Annuler</button>';\n\t\t } else {\n\t\t return '<fieldset disabled><button type=\"button\" class=\"btn btn-default btn-sm\"><span class=\"glyphicon glyphicon-check\" aria-hidden=\"true\"></span> Part. annulée</button></fieldset>';\n\t\t }\n\t \t\t}\n\t \t},\n\t {\n\t \t\tdata: function ( row, type, val, meta ) { \n\t\t if (row.key.etat !== \"INVITEE\" && row.key.etat !== \"REFUSEE\") {\n\t\t return \"<button type=\\\"button\\\" class=\\\"voir-participants btn btn-outline btn-primary btn-sm\\\" \\\"aria-labal=\\\"Center Align\\\" \" +\n\t\t \"data-toggle=\\\"modal\\\" data-target=\\\"#modalAfficherParticipants\\\"><span class=\\\"fa fa-edit \\\" aria-hidden=\\\"true\\\"></span> Voir participants</button>\";\n\t\t }else {\n\t\t return \"\";\n\t\t }\n\t \t\t}\n\t \t},\n\t {\n\t \t\tdata: function ( row, type, val, meta ) { \n\t\t if (row.key.etat !== \"INVITEE\" && row.key.etat !== \"REFUSEE\") {\n\t\t return '<button type=\"button\" class=\"editer-participants btn btn-outline btn-primary btn-sm\" \"aria-labal=\"Center Align\" data-toggle=\"modal\" data-target=\"#modalEditerParticipants\">' +\n\t\t \t'<span class=\"fa fa-edit \" aria-hidden=\"true\"></span> Editer participants</button>';\n\t\t }else {\n\t\t return \"\";\n\t\t }\n\t \t\t}\n\t \t},\n\t \t{\n\t \t\tdata: function ( row, type, val, meta ) { \n\t\t if (row.key.commentaire === \"\") {\n\t\t return '<button type=\"button\" class=\"ajouter-commentaire btn btn-outline btn-primary btn-sm\" \"aria-labal=\"Center Align\" data-toggle=\"modal\" data-target=\"#modalCommentaire\">' +\n\t\t \t'<span class=\"fa fa-plus-square fa-fw \" aria-hidden=\"true\"></span> Ajouter</button>';\n\t\t }else {\n\t\t return '<button type=\"button\" class=\"modifier-commentaire btn btn-primary btn-sm\" \"aria-labal=\"Center Align\" data-toggle=\"modal\" data-target=\"#modalCommentaire\">' +\n \t\t\t'<span class=\"fa fa-edit \" aria-hidden=\"true\"></span> Afficher</button>';\n\t\t }\n\t \t\t}\n\t \t}\n\t ],\n\t rowCallback: function(row, objet, index) {\n\t $(row).find('select').selectpicker('val', objet.key.etat);\n\t $(row).find('select').selectpicker('refresh');\n\t \n\t // Teste id correspond à id du name du select de la JE, si pas JE Fermee donc on disabled les boutons\n\t if ($selectJE.attr('name') != objet.key.idJournee) {\n\t $(row).find('button').not('.voir-participants').not('.ajouter-commentaire').not('.modifier-commentaire').attr('disabled', true);\n\t $(row).find('select').attr('disabled', true);\n\t }\n\t var $select = $(row).find('select');\n\t $select.on('change', function() {\n\t \t\t\t\t$tr = $(this).closest('tr');\n\t \t\t\t\tmodifierEtatParticipation($tr.data('objet').key.idParticipation, $(this).find(':selected').val(), $tr.data('objet').key.version);\n\t \t\t\t});\n\t }\n\t });\n\t\t}", "title": "" }, { "docid": "ff6ed36cd290ce748180e5a4f47cfab8", "score": "0.52121824", "text": "function init(){\n var tableInfo = d3.select(\"tbody\");\n tableData.forEach((data)=>{\n tableInfo.append(\"tr\");\n tableInfo.append(\"td\").text(`${data.datetime}`);\n tableInfo.append(\"td\").text(`${data.city}`);\n tableInfo.append(\"td\").text(`${data.state}`);\n tableInfo.append(\"td\").text(`${data.country}`);\n tableInfo.append(\"td\").text(`${data.shape}`);\n tableInfo.append(\"td\").text(`${data.durationMinutes}`);\n tableInfo.append(\"td\").text(`${data.comments}`);\n });\n}", "title": "" }, { "docid": "1df7c5942d374a0af7befd1fc0539931", "score": "0.5206496", "text": "function initializeController() {\n //setTableContent();\n }", "title": "" }, { "docid": "e56345f50d2a140296e77178398401cf", "score": "0.5204795", "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": "a0cd87faae1832ceda9c3e85aff82133", "score": "0.5201153", "text": "function table_init(table_name, input_busqueda, col, order) {\n $('#' + table_name).dataTable({\n \"aaSorting\": [\n [col, order]\n ],\n \"info\": true,\n \"searching\": true,\n \"ordering\": true,\n language: {\n processing: \"Procesando...\",\n search: \"Buscar:\",\n lengthMenu: \"Mostrar _MENU_ elementos\",\n info: \"Resultados _START_ de _END_, _TOTAL_ registros en total\",\n infoEmpty: \"Resultados 0 de 0, 0 registros totales\",\n infoFiltered: \"(filtrado de _MAX_ registros en total)\",\n infoPostFix: \"\",\n loadingRecords: \"Cargando...\",\n zeroRecords: \"No existen registros que coincidan con la búsqueda.\",\n emptyTable: \"No hay datos disponibles.\",\n paginate: {\n first: \"Primero\",\n previous: \"Anterior\", \n next: \"Siguiente\",\n last: \"Último\"\n },\n aria: {\n sortAscending: \": odernar de forma ascendente\",\n sortDescending: \": ordernar de forma descendente\"\n }\n }\n });\n\n var table = $('#' + table_name).DataTable();\n $('#' + input_busqueda).keyup(function () {\n table.search($(this).val()).draw();\n })\n\n}", "title": "" }, { "docid": "029a7ea3b79cb12def0a958edbf10b39", "score": "0.5196675", "text": "function drawTable(data) {\r\n\r\n\t$(\"#draft_p_table tbody tr\").remove();\r\n\t$(\"#draft_p_table_QB tbody tr\").remove();\r\n\t$(\"#draft_p_table_RB tbody tr\").remove();\r\n\t$(\"#draft_p_table_WR tbody tr\").remove();\r\n\t$(\"#draft_p_table_DE tbody tr\").remove();\r\n\t$(\"#draft_p_table_CB tbody tr\").remove();\r\n\t$(\"#draft_p_table_DT tbody tr\").remove();\r\n\t$(\"#draft_p_table_OT tbody tr\").remove();\r\n\t$(\"#draft_p_table_TE tbody tr\").remove();\r\n\t$(\"#draft_p_table_P tbody tr\").remove();\r\n\t$(\"#draft_p_table_K tbody tr\").remove();\r\n\t$(\"#draft_p_table_C tbody tr\").remove();\r\n\t$(\"#draft_p_table_OG tbody tr\").remove();\r\n\t$(\"#draft_p_table_FB tbody tr\").remove();\r\n\t$(\"#draft_p_table_FS tbody tr\").remove();\r\n\t$(\"#draft_p_table_SS tbody tr\").remove();\r\n\t$(\"#draft_p_table_MLB tbody tr\").remove();\r\n\t$(\"#draft_p_table_OLB tbody tr\").remove();\r\n\tfor (var i=0 in data) {\r\n\t\tdrawRow(data[i], i);\r\n\t}\r\n\t $(\"#draft_p_table\").tablesorter();\r\n\t $(\"#draft_p_table_QB\").tablesorter();\r\n\t $(\"#draft_p_table_RB\").tablesorter();\r\n\t $(\"#draft_p_table_WR\").tablesorter();\r\n\t $(\"#draft_p_table_DE\").tablesorter();\r\n\t $(\"#draft_p_table_CB\").tablesorter();\r\n\t $(\"#draft_p_table_DT\").tablesorter();\r\n\t $(\"#draft_p_table_OT\").tablesorter();\r\n\t $(\"#draft_p_table_TE\").tablesorter();\r\n\t $(\"#draft_p_table_P\").tablesorter();\r\n\t $(\"#draft_p_table_K\").tablesorter();\r\n\t $(\"#draft_p_table_C\").tablesorter();\r\n\t $(\"#draft_p_table_OG\").tablesorter();\r\n\t $(\"#draft_p_table_FB\").tablesorter();\r\n\t $(\"#draft_p_table_FS\").tablesorter();\r\n\t $(\"#draft_p_table_SS\").tablesorter();\r\n\t $(\"#draft_p_table_MLB\").tablesorter();\r\n\t $(\"#draft_p_table_OLB\").tablesorter();\r\n}", "title": "" }, { "docid": "436941c6f31ab7f3f5929aade508fb0e", "score": "0.5188937", "text": "function updateUI() {\n populateTables()\n}", "title": "" }, { "docid": "3277e1b577bfee66f154664105ca5a12", "score": "0.5175644", "text": "function upload_table()\n{\n\tthis.init_selects();\n\tthis.init_edit_type();\n}", "title": "" }, { "docid": "995a4f5393a7e078be9e9fa29aae39f7", "score": "0.51585853", "text": "function generateTableStrategy() {\n strategy_table.setData({headers: ['Name', 'Staus'], data: strategys})\n}", "title": "" }, { "docid": "833da7961dc8934e6a5a41e8f41d2e4b", "score": "0.5145232", "text": "function setupTableEvents() {\n var mySearchFn = util.debounce(function () {\n var search = $('input[type=search]').val();\n\n if (search != null) {\n table.search(search).draw();\n }\n //}, util.getDebounceInterval(debounceVal, debounceValMobile));\n }, ( util.isMobile() ? debounceValMobile : debounceVal) );\n\n $('input[type=search]').off('keyup.DT input.DT');\n\n $('input[type=search]').on('keyup', mySearchFn);\n\n table.on('draw.dt', function () {\n console.log('draw.dt - Redraw occurred at: ' + new Date().getTime());\n\n var sab = $(\"#selectAllBox\").is(':checked'); // Select/Unselect All Checkbox\n var ab = $(\"#allBox\").is(':checked'); // Expand/Collapse All Checkbox\n\n childrenRedraw(table.data());\n\n setTimeout(function () {\n setTableState(sab, ab);\n }, 10);\n });\n\n\n table.on('processing.dt', function (e, settings, processing) {\n console.log(\"on processing.dt \" + processing);\n\n $('div.progressBar').css('display', processing ? 'block' : 'none');\n\n util.hideBasicCB(processing);\n\n if (!processing) {\n // show it all\n progressBarReset();\n $(\"#DTable_paginate\").show();\n $(\"#DTable_info\").show();\n $(\"#DTable\").show();\n $(\"#tableContainer\").show();\n //reset submit button\n if ($opts.selectedItems.length == 0) {\n $(\"#subButton\").removeClass(\"yes\").addClass(\"no\");\n } else {\n\n }\n\n $(\"div#tableContainer\").show();\n\n //util.showActionsInterface(); // NOTE (TR): This and the code below makes no sense.\n\n switch (config.role) {\n\n case \"CoderSupervisor\":\n util.showActionsInterface();\n\n break;\n\n case \"ODPSupervisor\":\n util.showActionsInterface();\n\n util.showSubActionsInterface();\n\n break;\n\n }\n\n } else {\n util.disableInterface();\n\n $(\"#DTable_paginate\").hide();\n $(\"#DTable_info\").hide();\n $(\"#DTable\").hide();\n $(\"#tableContainer\").hide();\n }\n });\n\n\n //is this needed?\n table.on('init.dt', function () {\n console.log(\"on init.dtx (datable initialized) :: init.dt ::\");\n\n childrenRedraw(table.data());\n\n $opts.isGridDirty = false;\n\n if (config.role == \"ODPSupervisor\") {\n serverCheckForActions();\n }\n\n //util.enableFilters();\n util.enableInterface();\n });\n\n table.on('page.dt', function () {\n console.log(\"on page.dt (page navigation) ::\");\n\n var info = table.page.info();\n\n if (config.role == \"ODPSupervisor\") {\n window.location.hash = $opts.filterlist + \"|\" + $opts.actionlist + \"|\" + $opts.codingType + \"|\" + info.page;\n } else {\n window.location.hash = $opts.filterlist + \"|noaction|\" + $opts.codingType + \"|\" + info.page;\n }\n\n console.log('Showing page: ', info.page + ' of ' + info.pages);\n });\n\n // logic to open and close child rows. // 1.3 dynamically load child rows.\n $('#DTable tbody').on('click', 'td.details-control', function (evt) {\n console.log(\"on click (details row clicked) :: \");\n\n if ($(this).parent().hasClass(\"haschildren\")) {\n\n var absid = $(this).parent().find(\"td.abstractid\").html();\n\n currentTR = $(this).closest('tr'); // Reference to the DOM TR\n currentRow = table.row(currentTR); // Reference to the Datatable row ??\n\n if (currentRow.child.isShown()) {\n // This row is already open - close it\n currentRow.child.hide();\n\n currentTR.removeClass('open').addClass('closed');\n\n var rowDataNdx = util.findObjNdxChildCache(absid);\n\n if (rowDataNdx > -1) {\n $opts.selectedItemChildrenCache.splice(rowDataNdx, 1);\n }\n } else {\n var data = getDetailChildRow(currentRow, absid);\n }\n console.log('$opts.selectedItemChildrenCache: ', $opts.selectedItemChildrenCache);\n }\n });\n\n\n // basic filter selection\n $(\"input[type='radio'][name='basicgroup']\").on(\"click\", function (evt) {\n\n console.log(' Basic Selector :: ' + $(\"input:radio[name='basicgroup']:checked\").val());\n setTimeout(function () {\n watchBasicOnlyHandler();\n }, 0);\n\n });\n\n $(\"#allBox\").on(\"click\", function (evt) {\n util.showOpenRows(this.checked);\n });\n\n $(\"#selectAllBox\").on(\"click\", function (evt) {\n if (this.checked) {\n util.selectAllRows(table);\n\n $opts.allSelected = true;\n } else {\n util.unselectAllRows(table);\n\n $opts.allSelected = false;\n }\n\n doSubmitChecks();\n });\n\n $(\"#tbutton\").on(\"click\", function (evt) {\n config.baseURL = \"/Evaluation/Handlers/Abstracts.ashx?role=\" + config.role;\n\n table.ajax.reload(function (json) {\n childrenRedraw(table.data());\n });\n //table.destroy();\n });\n\n // logic to select and unselect checkboxes\n $(\"body\").on(\"click\", \"table.dataTable td input[type=checkbox]\", function (evt) {\n console.log('clicked checkbox');\n\n var absid = $(this).parent().parent().find(\"td.abstractid\").html();\n var rowIndex = table.row($(this).parent().parent()).index();\n var row = $(this).parents('tr');\n var rowNdx = _.indexOf($opts.selectedItems, absid);\n\n if ($(this).is(\":checked\")) {\n $(row).addClass('selected');\n\n if (rowNdx == -1) {\n $opts.selectedItems.push(absid);\n\n $opts.totalRecordsSelected++;\n }\n } else {\n $(row).removeClass('selected');\n\n if ($opts.allSelected) {\n $opts.unselectedItems.push(absid);\n\n $opts.totalRecordsSelected--;\n }\n\n if (rowNdx != -1) {\n $opts.selectedItems.splice(rowNdx, 1);\n }\n\n if ($opts.totalRecordsSelected == $opts.totalRecords) {\n $opts.allSelected = true;\n }\n }\n\n $(\"span#recordCount\").text($opts.totalRecordsSelected);\n\n doSubmitChecks();\n });\n\n $(\"input#subButton\").on(\"click\", function (evt) {\n console.log('Submit button clicked');\n\n var dataObj = {};\n\n if ($(this).hasClass(\"yes\")) {\n console.log(\"submit button click enabled ::\");\n\n util.disableInterface();\n $(\"div#generalProgressBox\").show();\n\n $(this).addClass(\"no\").removeClass(\"yes\");\n\n switch ($opts.actionlist) {\n\n case \"addreportexclude\":\n dataObj = compileDataObject(\"add\");\n\n util.ajaxCall(\"/Evaluation/Handlers/ReportExclude.ashx\", \"POST\", dataObj, function (data, textStatus, jqXHR) {\n console.log(\" add report exclude : \" + data);\n\n $(\"div#generalProgressBox\").hide();\n\n if (data.success == true) {\n var num = null;\n\n if ($opts.allSelected) {\n num = $opts.totalRecords - $opts.unselectedItems.length;\n } else {\n num = $opts.selectedItems.length;\n }\n alertify.success(num + \" \" + \"Abstract(s) added to report exclude list.\");\n\n resetSubmitBtnAndCheckboxes();\n\n loadFilters();\n\n $opts.isGridDirty = true;\n\n resetSelections();\n } else {\n alertify.error(\"Failed to add in report exclude list.\");\n }\n });\n\n\n break;\n\n case \"removereportexclude\":\n dataObj = compileDataObject(\"remove\");\n\n util.ajaxCall(\"/Evaluation/Handlers/ReportExclude.ashx\", \"POST\", dataObj, function (data, textStatus, jqXHR) {\n console.log(\" removereportexclude - data : \" + data);\n\n $(\"div#generalProgressBox\").hide();\n\n if (data.success == true) {\n var num = null;\n\n if ($opts.allSelected) {\n num = $opts.totalRecords - $opts.unselectedItems.length;\n } else {\n num = $opts.selectedItems.length;\n }\n alertify.success(num + \" \" + \"Abstract(s) removed from report exclude list.\");\n\n resetSubmitBtnAndCheckboxes();\n\n loadFilters();\n\n $opts.isGridDirty = true;\n\n resetSelections();\n } else {\n alertify.error(\"Failed to remove from report exclude list.\");\n }\n });\n\n break;\n\n case \"addreview\":\n dataObj = compileDataObject(\"add\");\nconsole.log('/Evaluation/Handlers/AbstractReview.ashx', dataObj);\n\n\n util.ajaxCall(\"/Evaluation/Handlers/AbstractReview.ashx\", \"POST\", dataObj, function (data, textStatus, jqXHR) {\n console.log(\" addreview - data : \" + data);\n\n $(\"div#generalProgressBox\").hide();\n\n if (data.success == true) {\n var num = null;\n\n if ($opts.allSelected) {\n num = $opts.totalRecords - $opts.unselectedItems.length;\n } else {\n num = $opts.selectedItems.length;\n }\n alertify.success(num + \" \" + \"Abstract(s) added to review list.\");\n\n resetSubmitBtnAndCheckboxes();\n\n loadFilters();\n\n $opts.isGridDirty = true;\n\n resetSelections();\n } else {\n alertify.error(\"Failed to add in review list.\");\n }\n });\n\n break;\n\n case \"removereview\":\n dataObj = compileDataObject(\"remove\");\n\n util.ajaxCall(\"/Evaluation/Handlers/AbstractReview.ashx\", \"POST\", dataObj, function (data, textStatus, jqXHR) {\n console.log(\" remove - data: \" + data);\n\n $(\"div#generalProgressBox\").hide();\n\n if (data.success == true) {\n var num = null;\n\n if ($opts.allSelected) {\n num = $opts.totalRecords - $opts.unselectedItems.length;\n } else {\n num = $opts.selectedItems.length;\n }\n alertify.success(num + \" \" + \"Abstract(s) removed from review list.\");\n\n resetSubmitBtnAndCheckboxes();\n\n loadFilters();\n\n $opts.isGridDirty = true;\n\n resetSelections();\n } else {\n alertify.error(\"Failed to remove from review list.\");\n }\n });\n\n break;\n\n case \"closeabstract\":\n dataObj = compileDataObject(\"close\");\n\n util.ajaxCall(\"/Evaluation/Handlers/AbstractClose.ashx\", \"GET\", dataObj, function (data, textStatus, jqXHR) {\n console.log(\" closeabstract - data : \" + data);\n\n $(\"div#generalProgressBox\").hide();\n if (data.success == true) {\n var num = null;\n\n if ($opts.allSelected) {\n num = $opts.totalRecords - $opts.unselectedItems.length;\n } else {\n num = $opts.selectedItems.length;\n }\n alertify.success(num + \" \" + \"Abstract(s) have been closed.\");\n\n resetSubmitBtnAndCheckboxes();\n\n loadFilters();\n\n $opts.isGridDirty = true;\n\n resetSelections();\n } else {\n alertify.error(\"Failed to close abstracts.\");\n }\n });\n\n\n break;\n\n case \"reopenabstracts\":\n dataObj = compileDataObject(\"open\");\n\n util.ajaxCall(\"/Evaluation/Handlers/AbstractClose.ashx\", \"GET\", dataObj, function (data, textStatus, jqXHR) {\n console.log(\" reopenabstract - data : \" + data);\n\n $(\"div#generalProgressBox\").hide();\n\n if (data.success == true) {\n var num = null;\n\n if ($opts.allSelected) {\n num = $opts.totalRecords - $opts.unselectedItems.length;\n } else {\n num = $opts.selectedItems.length;\n }\n alertify.success(num + \" \" + \"Abstract(s) have been Re-opened.\");\n\n resetSubmitBtnAndCheckboxes();\n\n loadFilters();\n\n $opts.isGridDirty = true;\n\n resetSelections();\n } else {\n alertify.error(\"Failed to Re-open abstracts.\");\n }\n });\n\n\n break;\n\n case \"exportabstracts\":\n dataObj = compileDataObject(\"\");\n\n $opts.generatingExportLink = true;\n\n util.ajaxCall(\"/Evaluation/Handlers/AbstractExport.ashx\", \"POST\", dataObj, function (data, textStatus, jqXHR) {\n console.log(\" reopen abstract - data : \", data);\n\n $(\"div#generalProgressBox\").hide();\n $(\"div#downloadProgressBox\").show();\n\n if (data.success == true) {\n var num = null;\n\n if ($opts.allSelected) {\n num = $opts.totalRecords - $opts.unselectedItems.length;\n } else {\n num = $opts.selectedItems.length;\n }\n alertify.success(num + \" \" + \"Abstract(s) have been Exported. File being generated.\");\n\n dataObj = compileDataObject(\"\");\n\n // call the second handler\n util.ajaxCall(\"/Evaluation/Handlers/GenerateExcelReport.ashx\", \"POST\", dataObj, function (data, textStatus, jqXHR) {\n console.log(\" generate excel report .ashx - data : \" + data);\n\n if (data.success == true) {\n $opts.generatingExportLink = false;\n\n $(\"div#downloadProgressBox\").hide();\n $(\"div#downloadLinkBox a\").attr(\"href\", data.filePath);\n $(\"div#downloadLinkBox\").show();\n\n util.enableInterface();\n }\n });\n\n //for exporting abstracts.\n //var iframe = $(\"<iframe id='export-frame' src='DataExportHandler.ashx?method=export' />\").hide();\n //$(this).parent().append(iframe);\n\n resetSubmitBtnAndCheckboxes();\n\n loadFilters();\n\n $opts.isGridDirty = true;\n\n resetSelections();\n } else {\n alertify.error(\"Failed to Export abstracts.\");\n }\n });\n\n break;\n }\n\n } else {\n //console.log(\"not enabled ::\");\n }\n });\n }", "title": "" }, { "docid": "96136a7199efc5cb750364df8a12e65e", "score": "0.5143585", "text": "function loadTable(){\n\tvar baseurl = $('#base_url').val();\n\n\ttable = $('#datatables').DataTable({\n\t\tdestroy:true,\n\t\tprocessing:true,\n\t\tserverSide:true,\n\t\tresponsive:true,\n\t\torder:[],\n\t\tcolumnDefs: [ { orderable: false, targets: -1 } ],\n\t\t// scroller: {\n\t\t// \tdisplayBuffer: 20\n\t\t// }\n\t\tinitComplete : function() {\n $('#search-table').remove();\n var input = $('.dataTables_filter input').unbind(),\n self = this.api(),\n $searchButton = $('<button id=\"search-table\" class=\"btn btn-primary btn-round btn-xs\">')\n .html('<i class=\"material-icons\">search</i>')\n .click(function() {\n \n if(!$('#search-table').is(':disabled')){\n $('#search-table').attr('disabled',true);\n self.search(input.val()).draw();\n $('#datatables button').attr('disabled',true);\n $('.dataTables_filter').append('<div id=\"search-loader\"><br>' \n +'<div class=\"preloader pl-size-xs\">'\n + '<div class=\"spinner-layer pl-red-grey\">'\n + '<div class=\"circle-clipper left\">'\n + '<div class=\"circle\"></div>'\n + '</div>'\n + '<div class=\"circle-clipper right\">'\n + '<div class=\"circle\"></div>'\n + '</div>'\n + '</div>'\n +'</div>'\n +'&emsp;Please Wait..</div>');\n }\n\n })\n $('.dataTables_filter').append($searchButton).addClass('pull-right');\n $('.dataTables_paginate').addClass('pull-right');\n },\n drawCallback: function( settings ) {\n $('#search-loader').remove();\n $('#search-table').removeAttr('disabled');\n $('#datatables button').removeAttr('disabled');\n },\n\t\tajax : { \n url:baseurl + \"Advisers/fetchRows\", \n type:\"POST\",\n },\n oLanguage: {sProcessing: '<div class=\"preloader pl-size-sm\">'\n +'<div class=\"spinner-layer pl-red-grey\">'\n + '<div class=\"circle-clipper left\">'\n + '<div class=\"circle\"></div>'\n + '</div>'\n + '<div class=\"circle-clipper right\">'\n + '<div class=\"circle\"></div>'\n + '</div>'\n +'</div>'\n +'</div>'}\n\t});\n}", "title": "" }, { "docid": "9d37246e2cfab6a4611bb219e0b17bf4", "score": "0.5141007", "text": "function onStartup(year){\n redraw(year);\n dataset = [];\n teams = [];\n d3.json(\"json/\"+year+\"-Table1.json\", function(data){\n dataset = data.rounds;\n \n d3.json(\"json/teams.json\", function(data){\n teams = data.teams;\n \t\n points = createEmptyPointsData(teams)\n calculatePoints(dataset, points, teams);\n points.sort(comparePoints);\n \t\n var data = constructData(points);\n var cols = [\"Placings\", \"Team\", \"Points\", \"Placings\", \"Team\", \"Points\"];\n \t\n var peopleTable = tabl(data, cols);\n \n });\n });\n}", "title": "" }, { "docid": "34a70772c749db53f4cd48a4be296500", "score": "0.5115846", "text": "function drawTable() {\n // reset table\n tableElementTBodyRef.innerHTML = \"\";\n \n //Go through each activity, and recreate each items on the list row by row\n activity.forEach((item, index) => {\n const row = tableElementTBodyRef.insertRow(index);\n const tableHeader = document.createElement(\"th\");\n const checkBox = createCheckBox(item, index);\n tableHeader.scope = \"row\";\n tableHeader.appendChild(checkBox);\n row.appendChild(tableHeader)\n\n const taskDataColumn = document.createElement(\"td\")\n taskDataColumn.innerHTML = item.task\n row.appendChild(taskDataColumn)\n\n const taskDescriptionColumn = document.createElement(\"td\")\n taskDescriptionColumn.innerHTML = item.description\n row.appendChild(taskDescriptionColumn)\n });\n }", "title": "" }, { "docid": "d3a7efd2ddf4158e5df16457d77fd69e", "score": "0.510972", "text": "function table_factory() {\n\n $(\"#buttons_table\").show()\n if (download_enabled != 0)\n $(\"#download_all\").show()\n\n var option = layersQuerrys[$('#search_list').prop('selectedIndex') - 1];\n requestParams.layerSelect = option\n addLayerByName(requestParams.layerSelect.layer)\n filter_concate()\n //Adquire campos habilitados para o usuário\n $.get('/propertyname/' + option.layer, function (data) {\n\n requestParams.property_name = Object.keys(data.field)\n requestParams.property_name.push(\"id\", \"geom\") // Adiciona o id e a geometria para utilizar em downloads e zoom\n var column = new Array()\n //Forma a coluna json\n Object.keys(data.field).map((element) => {\n if (element != 'geom') {\n column.push({\n field: element,\n title: element\n })\n\n }\n })\n //Coluna para os botões\n column.push({\n formatter: TableActions,\n title: (download_enabled == 0) ? \"Zoom\" : \"Download/Zoom\"\n })\n \n //Adicionando colunas a tabela\n $(\"#table\").bootstrapTable({\n columns: column\n })\n //Adicionando parametros a tabela \n $(\"#table\").bootstrapTable('refreshOptions', {\n ajax: 'ajaxRequest',\n pagination: true\n })\n\n })\n\n\n}", "title": "" }, { "docid": "2d1156f2525e0a524224e7fda11777cf", "score": "0.51025593", "text": "function loadTable() {\n var jsConfig;\n options.data = tableData;\n options.columns = [];\n config.columns = [];\n config.fields = Array.isArray(fields) ? fields.slice() : []; // build columns, read for column definition\n\n if (config.id && window['cdc_datatable_' + config.id]) {\n jsConfig = window['cdc_datatable_' + config.id]; // originally jsConfig _just_ had columns. If this is the case, just popuplate columns\n\n if (Array.isArray(jsConfig)) {\n config.columns = jsConfig;\n } else if ('object' === _typeof(jsConfig)) {\n // the updated window js object config is an object\n config = $.extend({}, config, jsConfig);\n\n if (!Array.isArray(config.columns)) {\n config.columns = [];\n }\n }\n } // read column config\n\n\n $.each(config.columns, function (index, columnConfig) {\n // if columnConfig name should exist in found fields, else ignore\n columnConfig.name = String(columnConfig.name || '').trim();\n\n if (!columnConfig.name || -1 === fields.indexOf(columnConfig.name)) {\n return;\n } else {\n fields.splice(fields.indexOf(columnConfig.name), 1);\n }\n\n var column = {\n data: columnConfig.name,\n title: columnConfig.title || columnConfig.name\n }; // column ordering / initial order\n\n if (isTrue(columnConfig.sort)) {\n if (columnConfig.order) {\n options.order.push([index, columnConfig.order]);\n }\n } else {\n column.orderable = false;\n }\n\n switch (columnConfig.type) {\n case 'number':\n column.type = 'num';\n break;\n\n case 'text':\n column.render = CDC.Datatables.renderText;\n break;\n\n case 'url':\n column.render = CDC.Datatables.renderURL;\n break;\n\n case 'date':\n column.render = CDC.Datatables.renderDate;\n break;\n\n case 'datetime':\n column.render = CDC.Datatables.renderDateTime;\n break;\n\n case 'float':\n column.render = function (data, type) {\n return CDC.Datatables.renderFloat(data, type);\n };\n\n break;\n\n case 'float1':\n column.render = function (data, type) {\n return CDC.Datatables.renderFloat(data, type, 1);\n };\n\n break;\n\n case 'float2':\n column.render = function (data, type) {\n return CDC.Datatables.renderFloat(data, type, 2);\n };\n\n break;\n\n case 'float3':\n column.render = function (data, type) {\n return CDC.Datatables.renderFloat(data, type, 3);\n };\n\n break;\n\n default:\n } // Handle alignment\n\n\n switch (columnConfig.alignment) {\n case 'left':\n column.className = 'text-left';\n break;\n\n case 'center':\n column.className = 'text-center';\n break;\n\n case 'right':\n column.className = 'text-right';\n break;\n\n default:\n } // Width\n\n\n if (columnConfig.width) {\n column.width = columnConfig.width;\n } // if the column should be hidden, do so here\n\n\n if ('hide' === columnConfig.display) {\n column.visible = false;\n } // finally add to option columns\n\n\n options.columns.push(column);\n }); // if all columns should be displayed (default), load remaining fields as columns\n\n if (isTrue(config.allcolumns)) {\n for (var i = 0; i < fields.length; i++) {\n // start with default options\n options.columns.push({\n data: fields[i],\n title: fields[i]\n });\n }\n } // initialize table\n\n\n table = $table.DataTable(options); // send event to DOM for future watchers\n\n table.on('draw.dt', function () {\n $dom.trigger('datatable-refresh', [table, $dom]);\n }); // add scope to th elements\n\n $dom.find('thead th').attr('scope', scopeType); // add a custom filter if configured\n\n $dom.filterField = $dom.find('.cdc-custom-filter');\n $dom.searchField = $dom.find('.dataTables_filter');\n\n if (config.enablecustomfilter && config.filter && Array.isArray(config.filter.values)) {\n var label = config.filter.name ? config.filter.name : 'Filter';\n $dom.filterField.addClass('float-right').safehtml('<label>' + label + '</label>');\n $dom.filter = $('<select class=\"d-inline-block ml-2 w-auto form-control form-control-sm\"></select>');\n $dom.filter.safeappend('<option value=\"\">-</option>'); // loop through values, add options\n\n $.each(config.filter.values, function (j, value) {\n $dom.filter.safeappend('<option value=\"' + CDC.cleanAttr(value) + '\">' + value + '</option>');\n });\n $dom.filterField.append($dom.filter);\n $dom.filter.on('change', function (e) {\n filter($dom.filter.val());\n });\n $dom.searchField.remove();\n } else {\n $dom.filterField.remove();\n }\n }", "title": "" }, { "docid": "177231738c2b88bc83896e56591e61b7", "score": "0.510167", "text": "function init() {\n Tabletop.init( { key: public_spreadsheet_url,\n callback: drawCattleChart,\n simpleSheet: false } )\n }", "title": "" }, { "docid": "45d210115c71554875d7bc92372ed916", "score": "0.5101587", "text": "function TestTable2(){\nvar asInitVals = [];\nvar oTable = $('#datatable-2').dataTable( {\n\t\"aaSorting\": [[ 0, \"asc\" ]],\n\t\"sDom\": \"<'box-content'<'col-sm-6'f><'col-sm-6 text-right'l><'clearfix'>>rt<'box-content'<'col-sm-6'i><'col-sm-6 text-right'p><'clearfix'>>\",\n\t\"sPaginationType\": \"bootstrap\",\n\t\"oLanguage\": {\n\t\t\"sSearch\": \"\",\n\t\t\"sLengthMenu\": '_MENU_'\n\t},\n\tbAutoWidth: false\n});\nvar header_inputs = $(\"#datatable-2 thead input\");\nheader_inputs.on('keyup', function(){\n\t/* Filter on the column (the index) of this element */\n\toTable.fnFilter( this.value, header_inputs.index(this) );\n})\n.on('focus', function(){\n\tif ( this.className == \"search_init\" ){\n\t\tthis.className = \"\";\n\t\tthis.value = \"\";\n\t}\n})\n.on('blur', function (i) {\n\tif ( this.value == \"\" ){\n\t\tthis.className = \"search_init\";\n\t\tthis.value = asInitVals[header_inputs.index(this)];\n\t}\n});\nheader_inputs.each( function (i) {\n\tasInitVals[i] = this.value;\n});\n}", "title": "" }, { "docid": "f79ed852440790d28340d0da0a734d56", "score": "0.51000506", "text": "function initializeTable() {\t \n\t\t\ttable = $table.DataTable( {\n\t serverSide: false,\n\t ajax: {\n\t url: 'getEntreprisesEtCreateurs',\n\t type: \"POST\",\n\t dataSrc: \"\"\n\t },\n\t autoWidth: false,\n\t language: dataTablesLanguage,\n\t scrollX: true,\n\t createdRow: function (row, objet, index) {\n\t $(row).attr('data-info', objet.key.idEntreprise);\n\t },\n\t columns: [\n\t {\n\t \tdata: \"key.nomEntreprise\"\n\t },\n\t {\n\t \tdata: function ( row, type, val, meta ) {\n\t var adresse = row.key.rue + \", \" + row.key.numero;\n\t if (row.key.boite !== \"\") {\n\t adresse += \" - Boite : \" + row.key.boite;\n\t }\n\t return adresse;\n\t }\n\t },\n\t {\n\t \tdata: \"key.commune\"\n\t },\n\t {\n\t \tdata: \"key.codePostal\"\n\t },\n\t {\n\t \tdata: \"key.datePremierContact\",\n\t \trender : function(data, type, objet) {\n\t return data.dayOfMonth + \"/\" + data.monthValue + \"/\" + data.year;\n\t }\n\t },\n\t {\n\t \tdata: \"key.dateDerniereParticipation\", \n\t \trender : function(data, type, objet) {\n\t if (data == null) {\n\t return \"\";\n\t } else {\n\t return data.dayOfMonth + \"/\" + data.monthValue + \"/\" + data.year;\n\t }\n\t }\n\t },\n\t {\n\t \tdata: function ( row, type, val, meta ) { \n\t return '<button type=\"button\" class=\"entListeEmpl btn btn-outline btn-primary btn-xs\" ' +\n\t 'aria-labal=\"Center Align\" data-toggle=\"modal\" data-target=\"#modalEntrepriseListeEmployes\">' +\n\t '<span class=\"fa fa-file-text-o\" aria-hidden=\"true\"></span> Liste empl.</button>';\n\t }\n\t },\n\t {\n\t \tdata: function ( row, type, val, meta ) { \n\t return '<button type=\"button\" class=\"entListePart btn btn-outline btn-primary btn-xs\" ' +\n\t 'aria-labal=\"Center Align\" data-toggle=\"modal\" data-target=\"#modalEntrepriseListeParticipations\">' +\n\t '<span class=\"fa fa-file-text-o\" aria-hidden=\"true\"></span> Liste part.</button>';\n\t }\n\t },\n\t {\n\t \tdata: \"value\"\n\t }\n\t ]\n\t });\n\t\t}", "title": "" }, { "docid": "912d11aae7a2921affde729641bd46e3", "score": "0.50845104", "text": "function initializeTable(){\n\n var push = true;\n var feed;\n var country;\n var data;\n var entry;\n //Must iterate through every entry in the feed, and subsequently through every country that has been clicked, in order to determine what countries have information\n for (var i = 0; i< $rootScope.feedData.length; i++){\n feed=$rootScope.feedData[i];\n for(var j = 0; j<$scope.countries.length;j++){\n country = $scope.countries[j];\n if (country == feed.location){\n if($scope.table.length==0){\n $scope.table.push({country:country, comCount:0, empCount:0, entCount:0, polCount:0, socCount:0, tecCount:0, completed:false});\n }else{\n for (var k =0; k<$scope.table.length;k++){\n data=$scope.table[k];\n \n if(data.country == country)push=false;break;\n\n }\n if(push){\n $scope.table.push({country:country, comCount:0, empCount:0, entCount:0, polCount:0, socCount:0, tecCount:0});\n }\n push=true;\n }\n } \n }\n //Create a count of each type of rant\n for (var l = 0; l<$scope.table.length; l++) {\n entry = $scope.table[l];\n if(entry.country==feed.location && !entry.completed){\n if(feed.topic == \"Commercial\"){\n entry.comCount++;\n } else if(feed.topic==\"Employers/Employees\"){\n entry.empCount++;\n } else if(feed.topic ==\"Entertainment\"){\n entry.entCount++;\n } else if(feed.topic == \"Politics\"){\n entry.polCount++;\n } else if(feed.topic == \"Social\"){\n entry.socCount++;\n } else if(feed.topic == \"Technology\") {\n entry.tecCount++;\n }\n }\n }\n }\n //Prevent re-calculation of countries with multiple rants posted. \n for(var entry in $scope.table){\n $scope.table[entry].completed=true;\n }\n }", "title": "" }, { "docid": "edc53c0da5ecc76faae1739e42bf52f4", "score": "0.5081463", "text": "function drawTable(json){\t\n\t\t//$('#table_map').empty();\t\n\t\t//console.log(\"Getting ready to draw table\", json);\n\t\t//console.log(json);\n\t\t// Remove all existing rows before drawing new table\n\t\t$(\"tr:has(td)\").remove();\n\t\t\n\t\tvar table = $('<table>');\n\t\t\tvar table_header_row = $('<tr>');\n\t\t\tvar table_header_cell = $('<td>', {\n\t\t\t\thtml: \"State\"\n\t\t\t});\n\t\t\ttable_header_row.append(table_header_cell);\n\t\t\tvar processedOnce = false;\n\t\t\t$.each(json, function (index, item) {\n\t\t\t\tvar table_row = $('<tr>');\n\t\t\t\t//console.log(index);\n\t\t\t\tvar table_cell = $('<td>', {\n\t\t\t\t\thtml: index\n\t\t\t\t});\n\t\t\t\ttable_row.append(table_cell);\n\t\t\t\t$.each(this, function (k, v) {\n\t\t\t\t\tvar str = k.replace(/fillkey/i, \"Legend\"); \n\t\t\t\t\ttable_cell = $('<td>', {\n\t\t\t\t\t\thtml: v\n\t\t\t\t\t});\n\t\t\t\t\ttable_row.append(table_cell);\n\t\t\t\t\tif (!processedOnce) {\n\t\t\t\t\t\ttable_header_cell = $('<td>', {\n\t\t\t\t\t\t\thtml: str\n\t\t\t\t\t\t});\n\t\t\t\t\t\t//console.log(v);\n\t\t\t\t\t\t\n\t\t\t\t\t\ttable_header_row.append(table_header_cell);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tif (!processedOnce) {\n\t\t\t\t\tprocessedOnce = true;\n\t\t\t\t}\n\t\t\t\ttable.append(table_row);\n\t\t\t});\n\t\t\ttable.prepend(table_header_row);\n\t\t\t$('#table_data').append(table);\t\n\t}", "title": "" }, { "docid": "d4f6e28867e8ec2a52c46d863af4553a", "score": "0.5078774", "text": "_initTable() {\n\t\tlet self = this;\n\t\tlet el = this.el.getElementsByTagName( 'tbody' );\n\t\tlet rows = el[ 0 ].getElementsByTagName( 'tr' );\n\n\t\tfor ( let i = 0; i < rows.length; i++ ) {\n\t\t\tlet row = rows[ i ];\n\t\t\tlet id = this._getIDFromRow( row );\n\n\t\t\trow.dataset.id = id;\n\n\t\t\tself.Columns.getColumnNames().forEach( function( name ) {\n\t\t\t\tlet td = row.querySelector( `.column-${name}` );\n\n\t\t\t\tif ( td ) {\n\t\t\t\t\tself.Cells.add( id, new Cell( id, name, td ) );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t}", "title": "" }, { "docid": "f943e016950cf751773b8a109c840d46", "score": "0.50774306", "text": "function populateTableFattura(list) {\n var opts = {\n bServerSide: false,\n bPaginate: false,\n bLengthChange: false,\n iDisplayLength: 5,\n bSort: false,\n bInfo: true,\n bAutoWidth: true,\n bFilter: false,\n bProcessing: true,\n aaData: list,\n bDestroy: true,\n oLanguage: {\n sInfo: \"_START_ - _END_ di _MAX_ risultati\",\n sInfoEmpty: \"0 risultati\",\n sProcessing: \"Attendere prego...\",\n sZeroRecords: \"Non sono presenti riepiloghi beni associati\",\n oPaginate: {\n sFirst: \"inizio\",\n sLast: \"fine\",\n sNext: \"succ.\",\n sPrevious: \"prec.\",\n sEmptyTable: \"Nessun dato disponibile\"\n }\n },\n aoColumnDefs: [\n {aTargets: [0], mData: function(source){\n return source.progressivo || \"\";\n }},\n {aTargets: [1], mData: function(source) {\n return source.naturaFEL && source.naturaFEL.codice || \"\";\n }},\n {aTargets: [2], mData: function(source) {\n return source.aliquotaIvaNotNull.formatMoney();\n }, fnCreatedCell: addClassTabRight},\n {aTargets: [3], mData: function(source) {\n return isNaturaFELEsente(source.naturaFEL) ? \"\" : source.imponibileImportoNotNull.formatMoney();\n }, fnCreatedCell: addClassTabRight},\n {aTargets: [4], mData: function(source) {\n return isNaturaFELEsente(source.naturaFEL) ? \"\" : source.impostaNotNull.formatMoney();\n }, fnCreatedCell: addClassTabRight},\n {aTargets: [5], mData: function(source) {\n return isNaturaFELEsente(source.naturaFEL) ? source.imponibileImportoNotNull.formatMoney() : \"\";\n }, fnCreatedCell: addClassTabRight}\n ]\n };\n $(\"#tabellaDatiFatture\").dataTable(opts);\n }", "title": "" }, { "docid": "757832a830ab53170ad28da18fb0bf33", "score": "0.507168", "text": "function createLocationDataTable(filteredBySearchCriteria, filteredByState, selectedState) {\r\n\r\n if (locationsTable != null) {\r\n var sUrl = createAjaxSource(filteredBySearchCriteria, filteredByState, selectedState);\r\n locationsTable.fnReloadAjax(sUrl, function () {\r\n displayFilterString(filteredBySearchCriteria, filteredByState, selectedState);\r\n });\r\n } else {\r\n\r\n locationsTable = $('.js-locationdatatable').dataTable({\r\n \"sPaginationType\": \"listbox\"\r\n , \"iDisplayLength\": 25\r\n , \"iTabIndex\": 145 //tabindex=\"137\"\r\n , \"bLengthChange\": true\r\n , \"bProcessing\": true\r\n , \"bServerSide\": true\r\n , \"bRetrieve\": true\r\n , \"bDestroy\": true\r\n , \"aaSorting\": [[6, 'asc'], [5, 'asc']]\r\n , \"fnServerData\": function (sUrl, aoData, fnCallback, oSettings) {\r\n oSettings.jqXHR = $.ajax({\r\n url: sUrl,\r\n data: aoData,\r\n dataType: \"jsonp\",\r\n success: function (data) {\r\n var result = locationsCallback(data);\r\n fnCallback(result);\r\n buildResponsiveTableMenu(\"locationsTable\", 24);\r\n },\r\n error: function (XMLHttpRequest, textStatus, errorThrown) {\r\n showThrottledError({},\r\n genErrMsg,\r\n supressErrorMessageTime)\r\n },\r\n timeout: ajaxTimeout\r\n });\r\n }\r\n , \"fnServerParams\": function (aoData) {\r\n createQueryParams(aoData);\r\n }\r\n , \"sAjaxSource\": function () {\r\n return createAjaxSource(filteredBySearchCriteria, filteredByState, selectedState);\r\n }()\r\n , \"fnInitComplete\": function () {\r\n displayFilterString(true, false, null);\r\n }\r\n , \"aoColumns\":\r\n [{ \"mDataProp\": \"id\", \"sClass\": \"essential tc5\" },\r\n { \"mDataProp\": \"branchNum\", \"sClass\": \"optional tc5\" },\r\n { \"mDataProp\": \"branchName\", \"sClass\": \"essential\" },\r\n { \"mDataProp\": \"address\" },\r\n { \"mDataProp\": \"county\", \"sClass\": \"optional\" },\r\n { \"mDataProp\": \"city\", \"sClass\": \"optional\" },\r\n { \"mDataProp\": \"state\", \"sClass\": \"essential\" },\r\n {\r\n \"mDataProp\": function (d) {\r\n //remove decimals\r\n var zip = d.zip.split(\".\")[0];\r\n //if zip is not all zeros\r\n //if(!/[0]{1,5}/i.test(zip)) {\r\n if ($.trim(zip) != '0') {\r\n //pad with leading zeros\r\n for (var i = 0; i < 5 - zip.length; i++) {\r\n zip = \"0\" + zip;\r\n }\r\n } else {\r\n zip = '';\r\n }\r\n return zip;\r\n }, \"sClass\": \"optional\"\r\n },\r\n { \"mDataProp\": function (d) { return lookupServiceTypeCode(d.servTypeCd); } },\r\n { \"mDataProp\": function (d) { return parseUTC(d.establishedDate, 'mm/dd/yy', false); }, \"sClass\": \"tc10\" },\r\n {\r\n \"mDataProp\": function (d) {\r\n var acquiredDate = parseUTC(d.acquiredDate, 'mm/dd/yy', false);\r\n if (acquiredDate == '12/31/9999') {\r\n return '';\r\n } else {\r\n return acquiredDate;\r\n }\r\n }, \"sClass\": \"tc10\"\r\n }]\r\n , \"oLanguage\": {\r\n \"sZeroRecords\": \"No results found\",\r\n \"sLengthMenu\": 'Show <select tabindex=\"146\">' +\r\n '<option value=\"25\">25</option>' +\r\n '<option value=\"50\">50</option>' +\r\n '<option value=\"100\">100</option>' +\r\n '</select> records'\r\n },\r\n \"sDom\": '<\"top\"ilp>rt<\"bottom\"p>'\r\n });\r\n }\r\n}", "title": "" }, { "docid": "17441f957c22a809922049891084c7e3", "score": "0.50642025", "text": "function header_filter_add_datatable() {\n var myTable = $('#example').DataTable();\n yadcf.init(myTable, [{\n column_number: 0\n }, {\n column_number: 1,\n filter_type: \"range_number_slider\",\n filter_container_id: \"external_filter_container\"\n }, {\n column_number: 2,\n data: [\"Yes\", \"No\"],\n filter_default_label: \"Select Yes/No\"\n }, {\n column_number: 3,\n filter_type: \"auto_complete\",\n text_data_delimiter: \",\"\n }, {\n column_number: 4,\n column_data_type: \"html\",\n html_data_type: \"text\",\n filter_default_label: \"Select tag\"\n }]);\n table = $('#example').dataTable()\n table.yadcf([{\n column_number: 0\n }, {\n column_number: 1,\n filter_type: \"range_number_slider\",\n filter_container_id: \"external_filter_container\"\n }, {\n column_number: 2,\n data: [\"Yes\", \"No\"],\n filter_default_label: \"Select Yes/No\"\n }, {\n column_number: 3,\n text_data_delimiter: \",\",\n filter_type: \"auto_complete\"\n }, {\n column_number: 4,\n column_data_type: \"html\",\n html_data_type: \"text\",\n filter_default_label: \"Select tag\"\n }]);\n}", "title": "" }, { "docid": "bcb65047525d50c335c3cdea7c3bd2ca", "score": "0.5050864", "text": "drawCostTable() {\n let columns = [];\n if (this.dataSet.length !== 0) {\n for (var key in this.dataSet[0]) {\n columns.push({\n field: key,\n title: key,\n align: \"center\"\n })\n }\n }\n\n $(this.tableId).bootstrapTable('destroy');\n\n $(this.tableId).bootstrapTable({\n data: this.dataSet,\n editable: true,\n clickToSelect: true,\n cache: false,\n showToggle: false,\n showPaginationSwitch: true,\n pagination: true,\n pageList: [5, 10, 25, 50, 100],\n pageSize: 5,\n pageNumber: 1,\n uniqueId: 'id',\n striped: true,\n search: true,\n showRefresh: true,\n minimumCountColumns: 2,\n smartDisplay: true,\n columns: columns\n });\n }", "title": "" }, { "docid": "3973a22ea157e7d65d328f81305a33d3", "score": "0.5047337", "text": "function populateDataTable(obj, tableid) {\n console.log(\"populating data table... \" + tableid);\n console.log(\"populating data table... \" , obj.stocks[0]);\n\n if(!obj || !obj.stocks || (obj.stocks.constructor === Array && obj.stocks.length === 0)) {\n tableDictionary[tableid].clear().draw();\n return;\n }\n\n var adColumns = [];\n Object.keys(obj.stocks[0]).forEach(key => {\n var col = {\n data: key,\n title: titleDictionary[key] ? titleDictionary[key] : key\n };\n\n adColumns.push(col);\n });\n\n if(!tableDictionary[tableid]){\n console.log('New table...');\n var table = $('#'+tableid).DataTable( {\n scrollY: true,\n scrollX: true,\n scrollCollapse: true,\n paging: true,\n fixedColumns: true,\n bInfo : false,\n data: obj.stocks,\n columns: adColumns,\n columnDefs: [\n { width: 100, targets: 0 }\n ],\n colReorder: {\n order: [ 0, 36, 9, 3, 2, 5, 6, 7, 8, 4, 10, 11, 12 ,13 ,14 ,15 , 16,\n 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,\n 34, 35, 1, 37, 38, 39 ]\n },\n className: \"dt-center\", \"targets\": \"_all\",\n dom: 'Blfrtip',\n buttons: ['colvis' ]\n });\n tableDictionary[tableid] = table;\n table.columns.adjust();\n }\n else {\n console.log('Clearing...');\n tableDictionary[tableid].clear().draw();\n tableDictionary[tableid].rows.add(obj.stocks).draw();\n }\n }", "title": "" }, { "docid": "af6edfcc3edc51f2cb57f947e1fd66b6", "score": "0.5041458", "text": "function loadDatatables(){\n if ($('table.datatables_basic').length > 0) {\n $('a[data-toggle=\"tab\"]').on('shown.bs.tab', function (e) {\n $($.fn.dataTable.tables(true)).DataTable().columns.adjust().responsive.recalc();\n }); \n\n $('table.datatables_basic').each(function(index, el) {\n var oTable = $(this).dataTable({\n stateSave: true,\n destroy: true,\n responsive: true,\n autoWidth: false,\n info: true,\n drawCallback: function(oSettings) {\n this.api().columns.adjust().responsive.recalc();\n },\n \"language\": {\n \"url\": \"/plugins/datatables/datatables.lang_es_ES.json\"\n },\n });\n\n var aData = oTable.fnGetData( this );\n\n var attr = oTable.attr('data-order');\n if (typeof attr !== typeof undefined && attr !== false) {\n oTable.fnSort(JSON.parse(attr));\n }else{\n oTable.fnSort( [ [0,'desc'] ] );\n } \n });\n };\n\n if ($('.datatables_tools').length > 0) {\n $('.datatables_tools').each(function(index, el) {\n var oTable = $(this).dataTable({\n dom: 'Bfrtip',\n stateSave: true,\n destroy: true,\n responsive: true,\n info: true,\n autoWidth: false,\n buttons: [\n {\n extend: 'excelHtml5',\n exportOptions: {\n columns: ':visible:not(.not-print)'\n }\n },\n {\n extend: 'csv',\n fieldSeparator: ',',\n fieldBoundary: '',\n extension: '.txt',\n text: \"TXT\",\n header:false,\n exportOptions: {\n columns: ':visible:not(.not-print)'\n }\n },\n {\n extend: 'colvis',\n text : 'Columnas visibles'\n }\n \n ],\n \"language\": {\n \"url\": \"/plugins/datatables/datatables.lang_es_ES.json\"\n },\n });\n\n var aData = oTable.fnGetData( this );\n var attr = oTable.attr('data-order');\n\n if (typeof attr !== typeof undefined && attr !== false) {\n oTable.fnSort(JSON.parse(attr));\n }else{\n oTable.fnSort( [ [0,'desc'] ] );\n } \n });\n }\n}", "title": "" }, { "docid": "6f5428944162467a2b7f979aa6ea5f82", "score": "0.5038824", "text": "function createTable() {\n if (config.data.length === 0) {\n console.log(`No data for table at ${tableSelector}`);\n // Remove any order directive to avoid Datatables errors\n delete config['order'];\n return this;\n }\n htTable.DataTable(config);\n dtapi = htTable.DataTable();\n const customFilterIds = Object.keys(filterFields);\n if (customFilterIds.length > 0) {\n const fields = customFilterIds.map(key => filterFields[key].html).join('');\n $(tableSelector + '_wrapper .right-filters').append(`<span class=\"form-group ml-4 pull-right\">${fields}</span>`);\n customFilterIds.forEach(key => {\n if (filterFields[key].hdlr) { $(`#${key}`).change(filterFields[key].hdlr); }\n if (filterFields[key].defaultChoice) { $(`#${key}`).trigger('change'); }\n });\n }\n // configureSearchReset();\n if (rowBtns.length > 0) {\n rowBtns.forEach(btn => { activateButton(btn); });\n htTable.on('draw.dt', function () {\n rowBtns.forEach(btn => { activateButton(btn); });\n });\n htTable.on('page.dt', function () {\n rowBtns.forEach(btn => { activateButton(btn); });\n });\n }\n return this;\n }", "title": "" }, { "docid": "a40257467c6d7dfb5eabf1264285dfff", "score": "0.50373226", "text": "async function initializeTable() {\n\tlet data = await $.post(\"contacts/getAllRecords\", $(\"#form_id\").serialize());\n\tarr = data.arr;\n\tawait initializeMap();\n}", "title": "" }, { "docid": "2fd04756b153198b8aeafe44b47cf39a", "score": "0.50361496", "text": "function init() { \n caseField = document.getElementById(\"case-field\");\n resField = document.getElementById(\"res-field\");\n compsetField = document.getElementById(\"compset-field\");\n machField = document.getElementById(\"machine-field\");\n \n \n envOptionTable = document.getElementById(\"envOption-table\");\n \n envConfigTable = document.getElementById(\"envConfig-table\");\n envBuildTable = document.getElementById(\"envBuild-table\");\n envRunTable = document.getElementById(\"envRun-table\");\n \n envConfigField = document.getElementById(\"envConfig-field\");\n envBuildField = document.getElementById(\"envBuild-field\");\n envRunField = document.getElementById(\"envRun-field\");\n \n templateField = document.getElementById(\"template-field\");\n templateField.textContent = \"\";\n \n doCompletion();\n}", "title": "" }, { "docid": "9a2c58d0dbb5fd0306cf410bdf00707b", "score": "0.5033086", "text": "function isTableReady() {\n var isReady = jq(\"#gbMainTable\").attr(\"isReady\");\n return (isReady === \"true\");\n}", "title": "" }, { "docid": "bff7aaf3d0ad7bb937175ea3ccf0553a", "score": "0.50279856", "text": "function initData() {\n\n\t\t// set height cultivation detail table on first load\n\t\t$(\"#divBody\").height(calculateBnn0091TableHeight());\n\t\t$(\"#divBodyRight\").height(calculateBnn0091TableHeight());\n\n\t\t// farm name combo box\n\t\tif (farmData != \"\") {\n\t\t\tvar farmStr = \"\";\n\t\t\tfor (var i = 0; i < farmData.length; i++) {\n\t\t\t\tfarmStr += \"<option value='\" + farmData[i].farmId + \"'>\" + farmData[i].farmName + \"</option>\";\n\t\t\t}\n\t\t\t$(\"#cbbFarmName\").append(farmStr);\n\t\t}\n\n\t\t// kind name combo box\n\t\tif (kindData != \"\") {\n\t\t\tvar kindStr = \"\";\n\t\t\tfor (var i = 0; i < kindData.length; i++) {\n\t\t\t\tkindStr += \"<option value='\" + kindData[i].kindId + \"'>\" + kindData[i].kindName + \"</option>\";\n\t\t\t}\n\t\t\t$(\"#cbbKindName\").append(kindStr);\n\t\t}\n\n\t\t// process name combo box\n\t\tif (processData != \"\") {\n\t\t\tvar processStr = \"\";\n\t\t\tfor (var i = 0; i < processData.length; i++) {\n\t\t\t\tprocessStr += \"<option value='\" + processData[i].processId + \"'>\" + processData[i].processName + \"</option>\";\n\t\t\t}\n\t\t\t$(\"#cbbProcessName\").append(processStr);\n\t\t}\n\t}", "title": "" }, { "docid": "b89e4c29fcea973e9e4e0948b92bfd36", "score": "0.50273114", "text": "function initialize(){\r\n cities();\r\n addColumns();\r\n addEvents();\r\n clickme();\r\n}", "title": "" }, { "docid": "424049afbb7d74a8083ae0becfd815f9", "score": "0.5024149", "text": "function initializeCalcGrpTable(){\n var columns = [\n null,\n { \"orderable\": false },\n null,\n null\n ];\n initializeCalcGrpDataTable('calc-group-table', columns);\n}", "title": "" }, { "docid": "16e359e88a8c234b2877e6374e8ec0c0", "score": "0.5022714", "text": "function initDataTable(id_elemen){\r\n return $('#'+id_elemen).DataTable({\r\n bSort: false,\r\n bPaginate: false,\r\n bInfo: false,\r\n bFilter: false,\r\n bScrollCollapse: false,\r\n scrollX: false\r\n });\r\n }", "title": "" }, { "docid": "835879024ad138d95c60b468477d7acf", "score": "0.5021936", "text": "function init() \n{\n \n // Grab the data with d3\n d3.csv(csv_file).then(data => \n {\n // d3.select(\"#cont2\").setAttribute(\"style\", \"margin-left:80px;\");\n // console.log(data)\n var tableData = data;\n // Selecting tbody element of html\n var tbody = d3.select(\"tbody\");\n \n // Calling a function 'addRow'for each item of an array 'tableData'\n tableData.forEach(addRow);\n \n // Displaying total records in console\n console.log(tableData.length)\n\n });\n}", "title": "" }, { "docid": "c78298f3d12aa37fe24fd4bca6639eb2", "score": "0.5020966", "text": "function init() {\ntableData.forEach((ufoReport) => {\n var row = tbody.append(\"tr\");\n Object.entries(ufoReport).forEach(([key, value]) => {\n var cell = tbody.append(\"td\");\n cell.text(value);\n });\n });\n}", "title": "" }, { "docid": "3705c958c652fea392cb3e8849b82aa3", "score": "0.5020797", "text": "function initialize() {\n kpLevelList.select2({\n width: '100%'\n });\n syllabusFilter.select2({\n width: '100%'\n });\n tableFilter = new TableFilter(kpDataTable, searchBox);\n loadData();\n }", "title": "" }, { "docid": "b95d158295f92a9f1710c2b3557b4889", "score": "0.5018318", "text": "function init() {\r\n\t // Ordres :\r\n\t // 1 = plus petit en haut\r\n\t // -1 = plus grand en haut\r\n\t // on défini les tris non utilisés à 1, pour qu'ils passent à -1 au moment où on clique dessus\r\n\tordre_t = [];\r\n\tfor (var i = 1; i <= 10; i++) {\r\n\t\tordre_t[i] = 1;\r\n\t}\r\n\r\n\ttableListener();\r\n}", "title": "" }, { "docid": "cc16337d666d6abfd725710eefb5efad", "score": "0.5018091", "text": "function prepareTable() {\n if (!this.main.objectsLoaded || !this.main.states) {\n setTimeout(function () {\n prepareTable();\n }, 250);\n return;\n }\n \n for (var key in this.main.states) {\n var obj = convertState(key, this.main.states[key]);\n that.stateChange(key, obj);\n }\n sorttable.makeSortable($('#states-outer')[0]);\n }", "title": "" }, { "docid": "8c2a74531c8f857240f84a737753a2f4", "score": "0.5017648", "text": "function createTables() {\n $.each(tableIds, function(index, value) {\n\n // Get number of rows in this table\n var rowCount = $('#'+value+' tr').length;\n \n\n var bPaginate;\n var bLengthChange;\n var bInfo;\n var bFilter;\n\n if(rowCount<6) {\n bFilter = false;\n } else {\n bFilter = true;\n }\n\n if(rowCount<12) {\n bPaginate = false;\n bLengthChange = false;\n bInfo = false;\n } else { \n bPaginate = true;\n bLengthChange = true;\n bInfo = true;\n }\n\n // Create the table:\n $('#'+value).DataTable({'bPaginate': bPaginate,\n 'bLengthChange': bLengthChange,\n 'bInfo': bInfo,\n 'bFilter': bFilter});\n });\n}", "title": "" }, { "docid": "7a14acb7dc313ab8bb16c94f3fc4b15e", "score": "0.5015005", "text": "function populateTable() \n{\n for (i=0; i < descArray.length; i++)\n {\n loadTable(descArray[i],i); \n }\n}", "title": "" }, { "docid": "0ac678361799e252c4e07bd9ebdfd3ff", "score": "0.50124127", "text": "function settingTable() {\n let title = 'Control salida de proyectos';\n let filename = title.replace(/ /g, '_') + '-' + moment(Date()).format('YYYYMMDD');\n //console.log('555');\n $('#tblProyects').DataTable({\n order: [[2, 'desc']],\n dom: 'Blfrtip',\n lengthMenu: [\n [50, 100, 200, -1],\n [50, 100, 200, 'Todos'],\n ],\n buttons: [\n {\n //Botón para Excel\n extend: 'excel',\n footer: true,\n title: title,\n filename: filename,\n\n //Aquí es donde generas el botón personalizado\n text: '<button class=\"btn btn-excel\"><i class=\"fas fa-file-excel\"></i></button>',\n },\n {\n //Botón para PDF\n extend: 'pdf',\n footer: true,\n title: title,\n filename: filename,\n\n //Aquí es donde generas el botón personalizado\n text: '<button class=\"btn btn-pdf\"><i class=\"fas fa-file-pdf\"></i></button>',\n },\n {\n //Botón para imprimir\n extend: 'print',\n footer: true,\n title: title,\n filename: filename,\n\n //Aquí es donde generas el botón personalizado\n text: '<button class=\"btn btn-print\"><i class=\"fas fa-print\"></i></button>',\n },\n\n ],\n pagingType: 'simple_numbers',\n language: {\n url: 'app/assets/lib/dataTable/spanish.json',\n },\n scrollY: 'calc(100vh - 200px)',\n scrollX: true,\n fixedHeader: true,\n columns: [\n {data: 'editable', class: 'edit', orderable: false}, \n {data: 'pjt_name', class: 'supply'},\n {data: 'pjt_number', class: 'sku'},\n {data: 'pjttp_name', class: 'supply'},\n {data: 'pjt_date_start', class: 'date'},\n {data: 'pjt_date_end', class: 'date'},\n {data: 'pjt_date_project', class: 'date'},\n {data: 'pjt_location', class: 'supply'},\n ],\n });\n\n $('.tblProyects')\n .delay(500)\n .slideDown('fast', function () {\n //$('.deep_loading').css({display: 'none'});\n //$('#tblProyects').DataTable().draw();\n deep_loading('C');\n });\n\n}", "title": "" }, { "docid": "34140759e836a2b4d6677bf6b0bd322a", "score": "0.50080603", "text": "function CreateTblHeader(field_setting, col_hidden) {\n console.log(\"=== CreateTblHeader ===== \");\n console.log(\"field_setting\", field_setting);\n //console.log(\"col_hidden\", col_hidden);\n\n//--- get info from selected department_map\n let sct_caption = null, has_profiel = false, lvl_req = false, sct_req = false;\n const dep_dict = get_mapdict_from_datamap_by_tblName_pk(department_map, \"department\", setting_dict.sel_department_pk);\n if(dep_dict){\n has_profiel = (!!dep_dict.has_profiel);\n lvl_req = (!!dep_dict.lvl_req);\n sct_req = (!!dep_dict.sct_req);\n }\n\n// +++ insert header and filter row ++++++++++++++++++++++++++++++++\n let tblRow_group_header = null;\n if (selected_btn === \"btn_overview\"){\n tblRow_group_header = tblHead_datatable.insertRow (-1);\n };\n const column_count = field_setting.field_names.length;\n const tblRow_header = tblHead_datatable.insertRow (-1);\n const tblRow_filter = tblHead_datatable.insertRow (-1);\n\n //const col_left_border = (selected_btn === \"btn_overview\") ? cols_overview_left_border : cols_stud_left_border;\n const col_left_border = field_setting.cols_left_border;\n const cols_group_header = field_setting.cols_group_header;\n\n // --- loop through columns\n for (let j = 0; j < column_count; j++) {\n const field_name = field_setting.field_names[j];\n let th_header = null, el_header = null;\n\n // skip columns if in columns_hidden\n if (!col_hidden.includes(field_name)){\n // --- get field_caption from field_setting, display 'Profiel' in column sct_abbrev if has_profiel\n const key = field_setting.field_caption[j];\n const field_caption = (field_name === \"sct_abbrev\" && has_profiel) ? loc.Profile : (loc[key]) ? loc[key] : key;\n const filter_tag = field_setting.filter_tags[j];\n const class_width = \"tw_\" + field_setting.field_width[j] ;\n const class_align = \"ta_\" + field_setting.field_align[j];\n\n //console.log(j, \"field_name\", field_name);\n// ++++++++++ insert columns in group header row +++++++++++++++\n if (selected_btn === \"btn_overview\"){\n // --- add th to tblRow_header\n if(cols_group_header.includes(j)){\n\n // --- add left border, not when status field\n const key = field_settings.group_header.field_caption[j];\n const field_caption = (loc[key]) ? loc[key] : key;\n th_header = document.createElement(\"th\");\n //console.log(j, \"key\", key);\n //console.log(j, \"field_caption\", field_caption);\n // --- add div to th, margin not working with th\n const el_header = document.createElement(\"div\");\n // --- add innerText to el_header\n th_header.innerText = field_caption;\n\n // --- add width, text_align, right padding in examnumber\n th_header.classList.add(class_width, class_align);\n el_header.classList.add(class_width, class_align);\n\n // --- add left border before each group\n if(col_left_border.includes(j)){th_header.classList.add(\"border_left\")};\n\n // if(field_name === \"examnumber\"){el_header.classList.add(\"pr-2\")};\n if(j > 4){\n //console.log(j, \"colspan\", field_caption);\n th_header.setAttribute(\"colspan\", 3);\n };\n //th_header.appendChild(el_header)\n tblRow_group_header.appendChild(th_header);\n };\n };\n// ++++++++++ insert columns in header row +++++++++++++++\n // --- add th to tblRow_header\n th_header = document.createElement(\"th\");\n // --- add div to th, margin not working with th\n const el_header = document.createElement(\"div\");\n // --- add innerText to el_header\n el_header.innerText = field_caption;\n // --- add width, text_align, right padding in examnumber\n th_header.classList.add(class_width, class_align);\n el_header.classList.add(class_width, class_align);\n // if(field_name === \"examnumber\"){el_header.classList.add(\"pr-2\")};\n\n // --- add left border before each group\n if(col_left_border.includes(j)){th_header.classList.add(\"border_left\")};\n\n th_header.appendChild(el_header)\n tblRow_header.appendChild(th_header);\n\n// ++++++++++ create filter row +++++++++++++++\n // --- add th to tblRow_filter.\n const th_filter = document.createElement(\"th\");\n\n // --- create element with tag based on filter_tag\n const filter_field_tag = ([\"text\", \"number\"].includes(filter_tag)) ? \"input\" : \"div\";\n const el_filter = document.createElement(filter_field_tag);\n\n // --- add data-field Attribute.\n el_filter.setAttribute(\"data-field\", field_name);\n el_filter.setAttribute(\"data-filtertag\", filter_tag);\n\n // --- add EventListener to el_filter / th_filter\n if (filter_tag === \"select\") {\n th_filter.addEventListener(\"click\", function(event){HandleFilterSelect(el_filter)});\n add_hover(th_filter);\n } else if (filter_tag === \"text\") {\n el_filter.addEventListener(\"keyup\", function(event){HandleFilterKeyup(el_filter, event)});\n add_hover(th_filter);\n } else if (filter_tag === \"toggle\") {\n // add EventListener for icon to th_filter, not el_filter\n th_filter.addEventListener(\"click\", function(event){HandleFilterToggle(el_filter)});\n th_filter.classList.add(\"pointer_show\");\n\n el_filter.classList.add(\"tickmark_0_0\");\n add_hover(th_filter);\n }\n\n // --- add other attributes\n if (filter_tag === \"text\") {\n el_filter.setAttribute(\"type\", \"text\")\n el_filter.classList.add(\"input_text\");\n\n el_filter.setAttribute(\"autocomplete\", \"off\");\n el_filter.setAttribute(\"ondragstart\", \"return false;\");\n el_filter.setAttribute(\"ondrop\", \"return false;\");\n }\n\n // --- add width, text_align\n // PR2021-05-30 debug. Google chrome not setting width without th_filter class_width\n th_filter.classList.add(class_width, class_align);\n\n // --- add left border before each group\n if(col_left_border.includes(j)){th_filter.classList.add(\"border_left\")};\n\n // el_filter.classList.add(class_width, class_align, \"tsa_color_darkgrey\", \"tsa_transparent\");\n th_filter.appendChild(el_filter)\n tblRow_filter.appendChild(th_filter);\n } // if (!columns_hidden[field_name])\n } // for (let j = 0; j < column_count; j++)\n }", "title": "" }, { "docid": "6b722e88fe60295c3c1e0d2ff3c722aa", "score": "0.50079703", "text": "function initializeTable() {\n if (app.isResponsable()) {\n\t\t\t\ttable = $table.DataTable( {\n\t\t serverSide: false,\n\t\t ajax: {\n\t\t url: 'getPersonnesContactEtEntreprise',\n\t\t type: \"POST\",\n\t\t dataSrc: \"\"\n\t\t },\n\t\t autoWidth: false,\n\t\t scrollX: true,\n\t\t language: dataTablesLanguage,\n\t\t createdRow: function (row, objet, index) {\n\t\t $(row).attr('data-objet', JSON.stringify(objet.key));\n\t\t },\n\t\t columns: [\n\t\t \t{\n\t\t \t\tdata: \"key.sexe\",\n\t\t \t\trender : function(data, type, objet) {\n\t\t \t\t\tif (data === 'H') {\n\t\t \t\t\t\treturn '<i class=\"fa fa-male\"></i>';\n\t\t \t\t\t} else {\n\t\t \t\t\t\treturn '<i class=\"fa fa-female\"></i>';\n\t\t \t\t\t}\n\t\t \t\t},\n\t\t \t\ttitle: '',\n\t\t \t\torderable: false\n\t\t \t},\n\t\t \t{\n\t\t \t\tdata: \"key.nom\",\n\t\t \t\ttitle: 'Nom'\n\t\t \t},\n\t\t {\n\t\t \t\tdata: \"key.prenom\",\n\t\t \t\ttitle: 'Prénom'\n\t\t \t},\n\t\t {\n\t\t \t\tdata: \"key.telephone\",\n\t\t \t\ttitle: 'Téléphone'\n\t\t \t},\n\t\t {\n\t\t \t\tdata: \"key.email\",\n\t\t \t\ttitle: 'E-mail'\n\t\t \t},\n\t\t {\n\t\t \tdata: function ( row, type, val, meta ) { \n\t\t \t\treturn '<a class=\"infoEntreprise\" data-toggle=\"modal\" data-target=\"#modalInformationEntreprise\"' +\n\t\t \t' style=\"cursor: pointer; color: black;\"><i class=\"fa fa-info-circle fa-fw\"></i>'+row.value+'</a>';\n\t\t },\n\t\t title: 'Nom entreprise'\n\t\t }, \n\t\t {\n\t\t \tdata: function ( row, type, val, meta ) { \n\t\t if (row.key.actif) {\n\t\t return \"<fieldset disabled>\" +\n\t\t\t \"<a type=\\\"button\\\" class=\\\"btn btn-outline btn-success btn-xs\\\">\" +\n\t\t\t \"<span class=\\\"fa fa-check\\\" aria-hidden=\\\"true\\\"></span> Actif\" +\n\t\t\t \"</a></fieldset>\";\n\t\t } else {\n\t\t return \"<fieldset disabled>\" +\n\t\t\t \"<a type=\\\"button\\\" class=\\\"btn btn-outline btn-danger btn-xs\\\">\" +\n\t\t\t \"<span class=\\\"fa fa-times\\\" aria-hidden=\\\"true\\\"></span> Inactif\" +\n\t\t\t \"</a></fieldset>\";\n\t\t }\n\t\t },\n\t\t title: 'Actif'\n\t\t },\n\t\t {\n\t\t \tdata: function ( row, type, val, meta ) {\n\t\t \t\tif (row.key.actif) {\n\t\t return \"<button type=\\\"button\\\" class=\\\"persDesactiver btn btn-outline btn-danger btn-sm\\\" \" +\n\t\t\t \"aria-labal=\\\"Center Align\\\" \\\">\" +\n\t\t\t \"<span class=\\\"glyphicon glyphicon-remove-circle\\\" aria-hidden=\\\"true\\\"></span>\" +\n\t\t\t \" Désactiver</button>\";\n\t\t } else {\n\t\t return \"<button type=\\\"button\\\" class=\\\"btn btn-default btn-sm\\\" disabled>\" +\n\t\t\t \"<span class=\\\"fa fa-times\\\" aria-hidden=\\\"true\\\"></span> Désactiver\" +\n\t\t\t \"</button>\";\n\t\t }\n\t\t \t},\n\t\t \ttitle: 'Désactiver',\n\t\t \torderable: false \n\t\t }, \n\t\t {\n\t\t \tdata: function ( row, type, val, meta ) {\n\t return \" <button type=\\\"button\\\" class=\\\"btn btn-outline btn-default btn-sm\\\" \" +\n\t\t \"data-toggle=\\\"modal\\\" data-target=\\\"#modalEditerPersonneDeContact\\\">\" +\n\t\t \"<span class=\\\"fa fa-pencil-square-o\\\" aria-hidden=\\\"true\\\"></span> \" +\n\t\t \"Editer</button>\";\n\t\t \t},\n\t\t \ttitle: 'Editer',\n\t\t \torderable: false \n\t\t }\n\t\t ],\n\t\t order: [[1, 'asc']]\n\t\t });\n } else {\n \ttable = $table.DataTable( {\n\t\t serverSide: false,\n\t\t ajax: {\n\t\t url: 'getPersonnesContactEtEntreprise',\n\t\t type: \"POST\",\n\t\t dataSrc: \"\"\n\t\t },\n\t\t autoWidth: false,\n\t\t scrollX: true,\n\t\t language: dataTablesLanguage,\n\t\t createdRow: function (row, objet, index) {\n\t\t $(row).attr('data-objet', JSON.stringify(objet.key));\n\t\t },\n\t\t columns: [\n\t\t \t{\n\t\t \t\tdata: \"key.sexe\",\n\t\t \t\trender : function(data, type, objet) {\n\t\t \t\t\tconsole.log(data);\n\t\t \t\t\tif (data === 'H') {\n\t\t \t\t\t\treturn '<i class=\"fa fa-male\"></i>';\n\t\t \t\t\t} else {\n\t\t \t\t\t\treturn '<i class=\"fa fa-female\"></i>';\n\t\t \t\t\t}\n\t\t \t\t},\n\t\t \t\ttitle: '',\n\t\t \t\torderable: false\n\t\t \t},\n\t\t \t{\n\t\t \t\tdata: \"key.nom\",\n\t\t \t\ttitle: 'Nom'\n\t\t \t},\n\t\t {\n\t\t \t\tdata: \"key.prenom\",\n\t\t \t\ttitle: 'Prénom'\n\t\t \t},\n\t\t {\n\t\t \t\tdata: \"key.telephone\",\n\t\t \t\ttitle: 'Téléphone'\n\t\t \t},\n\t\t {\n\t\t \t\tdata: \"key.email\",\n\t\t \t\ttitle: 'E-mail'\n\t\t \t},\n\t\t {\n\t\t \tdata: function ( row, type, val, meta ) { \n\t\t \t\treturn '<a class=\"infoEntreprise\" data-toggle=\"modal\" data-target=\"#modalInformationEntreprise\"' +\n\t\t ' style=\"cursor: pointer; color: black;\"><i class=\"fa fa-info-circle fa-fw\"></i>'+row.value+'</a>';\n\t\t },\n\t\t title: 'Nom entreprise'\n\t\t }, \n\t\t {\n\t\t \t\"data\": function ( row, type, val, meta ) { \n\t\t if (row.key.actif) {\n\t\t return \"<fieldset disabled>\" +\n\t\t \"<a type=\\\"button\\\" class=\\\"btn btn-outline btn-success btn-xs\\\">\" +\n\t\t \"<span class=\\\"fa fa-check\\\" aria-hidden=\\\"true\\\"></span> Actif\" +\n\t\t \"</a></fieldset>\";\n\t\t } else {\n\t\t return \"<fieldset disabled>\" +\n\t\t \"<a type=\\\"button\\\" class=\\\"btn btn-outline btn-danger btn-xs\\\">\" +\n\t\t \"<span class=\\\"fa fa-times\\\" aria-hidden=\\\"true\\\"></span> Inactif\" +\n\t\t \"</a></fieldset>\";\n\t\t }\n\t\t },\n\t\t title: 'Actif'\n\t\t },\n\t\t {\n\t\t \t\"data\": function ( row, type, val, meta ) {\n\t\t if (row.key.actif) {\n\t\t return \"<button type=\\\"button\\\" class=\\\"persDesactiver btn btn-outline btn-danger btn-sm\\\" \" +\n\t\t \"aria-labal=\\\"Center Align\\\" \\\">\" +\n\t\t \"<span class=\\\"glyphicon glyphicon-remove-circle\\\" aria-hidden=\\\"true\\\"></span>\" +\n\t\t \" Désactiver</button>\";\n\t\t } else {\n\t\t return \"<button type=\\\"button\\\" class=\\\"btn btn-default btn-sm\\\" disabled>\" +\n\t\t \"<span class=\\\"fa fa-times\\\" aria-hidden=\\\"true\\\"></span> Désactiver\" +\n\t\t \"</button>\";\n\t\t }\n\t\t },\n\t\t title: 'Désactiver'\n\t\t } \n\t\t ],\n\t\t order: [[1, 'asc']]\n\t\t });\n }\n\t\t}", "title": "" } ]
7fd9ccb821c855dfb11ccf2976f15c07
Strategy: Time: Must loop no matter what so best case time is O(n), try to make this worst case Option 1: Loop Create a hash that tracks of times a number has been seen Add the even s in hash values (loop?) % by 2 to get the number of pairs Option 2: Another strat (maybe more efficient space/time): Count pairs as we loop Keep track of unpaired s in stacks Once paired, pop off from unpaired Option 3: Sort the arr Loop, if the next number is the same as ele Increment count and skip the next num Sample input: [10, 10, 1, 2, 1] Answer: 2
[ { "docid": "002cb274e702535e4abbf2b74136e0d8", "score": "0.6907704", "text": "function numberPairs(n, ar) {\n let pairs = 0;\n ar = ar.sort();\n\n for(let i =0; i < ar.length; i++) {\n if(ar[i] === ar[i+1]) {\n pairs += 1;\n i = i + 1;\n }\n }\n return pairs;\n}", "title": "" } ]
[ { "docid": "946b38b078b95d1f110e5b3d700fa176", "score": "0.762353", "text": "function countPairsBruteForce(arr){\n arr = arr.sort(function(a, b){return a - b});\n count =0;\n for(var i =0;i<arr.length-1;i++){\n if(arr[i]===arr[i+1]){\n count++;\n i++;\n }\n }\n return count\n}", "title": "" }, { "docid": "bb5a12d40cf3a70300e1d9a87f695d7c", "score": "0.75188947", "text": "function sockMerchant (n, ar) {\n // Use goof count to track number of each item, clear after each completed count\n // Use count to keep track of number of pairs\n let pair_count = 0\n // sorted array yields [1, 1, 1, 5, 5, 5, 5, 8, 8, 8, 8]\n const unique_socks = Array.from(new Set(ar))\n // unique_socks = [1, 5, 8]\n\n for (let i = 0; i < unique_socks.length; i ++) {\n let sock_count = 0\n for (let j = 0; j < ar.length; j ++) {\n if (ar[j] == unique_socks[i]) {\n sock_count = sock_count + 1\n }\n }\n if (sock_count % 2 == 0) {\n pair_count = pair_count + (sock_count / 2)\n } else {\n pair_count = pair_count + ((sock_count - 1) / 2)\n }\n }\n console.log(pair_count)\n}", "title": "" }, { "docid": "2cfd922a3b1f6d8c4aae2543073925cc", "score": "0.73679227", "text": "function sockMerchant(n, ar) {\n /*var called paircount\n set var elem at ar[0]\n run for loop that starts at index 1\n \n if a value equals arr[0]\n ar.splice(i,1)\n ar.shift\n psircount ++\n break\n run func again\n else\n return paircount\n\n */\n\n// if (ar.length === 0) {\n// return pairCount\n// } else {\n// // return pairCount\n// for (let i = 1; i < ar.length - 1; i++) {\n// if (ar[i] === ar[0]) {\n// pairCount++\n// ar.splice(i, 1)\n// ar.shift()\n// console.log(`${pairCount} at ${i} len ${ar.length}`)\n// return sockMerchant(n, ar)\n// // return `${pairCount} at ${i} len ${ar.length}`\n// }\n// }\n// ar.shift()\n// return sockMerchant(n, ar)\n \n// }\n\n// }\n\n/* we set sock to match at ar[0]\nwe run a loop that says if you find this value, ar = ar.splice(i, 1).shift()\nthen you run sockM n,ar with this new array (maybe break after?)\nif you get through and dont run it, then you have remaining unmatched socks. sO you can say n - ar.len, gives you the pairs, then divide by 2 */\n ar.sort()\n // let noMatch = 0\n let pairCount = 0\n function checkPair (ar) {\n if (ar.length === 0) {\n return pairCount\n } else if (ar[0] === ar[1]){\n ar.splice(0, 2)\n pairCount++\n checkPair(ar)\n } else {\n ar.splice(0, 1)\n checkPair(ar)\n }\n\n }\n checkPair(ar)\n return pairCount\n}", "title": "" }, { "docid": "827c5931d8844db238ecfc4aa9d76ba1", "score": "0.71964747", "text": "function getPairsIncludingDupes(arr, sum) {\n\tlet hashMap = {};\n\tlet pairs = [];\n\tfor(let i=0; i < arr.length; i++) {\n\t\thashMap[arr[i]] = (hashMap[arr[i]] || 0) + 1;\n\t}\n\tlet twice_count = 0;\n\tfor(let elem of arr) {\n\t\tif(hashMap[sum - elem]) {\n\t\t\ttwice_count++;\n\t\t\tpairs.push([elem, sum - elem])\n\t\t}\n\t\tif(sum-elem === elem) twice_count--;\n\t}\n\tconsole.log('pairs: ', pairs); //this gives an array of all the pairs dupes included\n console.log('twice_count/2: ', twice_count/2); //this yields the amount of pairs non-dupe\n console.log('pairs.length: ', pairs.length); //this yields the amount of pairs duped\n\treturn twice_count/2;\n}", "title": "" }, { "docid": "4248183c073ce9f1087cb668ae2c5278", "score": "0.7167156", "text": "function pairOfSocks(n, arr) {\n const count = {};\n let pairs = 0;\n\n arr.forEach(element => {\n if (count[element] === undefined) {\n count[element] -= 1;\n pairs += 1;\n } else {\n count[element] = 1;\n }\n });\n\n return pairs;\n}", "title": "" }, { "docid": "c9702f46e588487ad3a0f8e5f290cf6c", "score": "0.7146784", "text": "function pairs(k, arr) {\n // Write a new function that doesn't use nested for loops\n const sortedArr = arr.sort((a, b) => a - b)\n\n // track each number in an object\n // unnecessary if-else logic if we know the numbers in sortedArr are all unique?\n const numElems = sortedArr.reduce((obj, item) => {\n obj[item] = 1\n return obj\n }, {})\n // console.log(numElems)\n\n // declare count to track numbers of pairs\n let count = 0\n // create an array of existing keys\n const keys = Object.keys(numElems)\n\n for (let i = 0; i < keys.length; i++) {\n let target = parseInt(keys[i]) + k\n if (numElems.hasOwnProperty(target)) {\n count ++\n // remove key to only count distinct pairs (no repeats of same pair)\n // e.g. finding combinations, not permutations\n delete numElems[keys[i]]\n }\n }\n return count\n // console.log(count)\n}", "title": "" }, { "docid": "e6391d13af95be2c0c26a84c6949b160", "score": "0.7123639", "text": "function sockMerchant(n, ar) {\n ar.sort((a, b) => a - b);\n let pairs = 0;\n for (let i = 0; i < ar.length; i++) {\n if (ar[i] === ar[i + 1]) {\n pairs++;\n i++;\n }\n }\n return pairs;\n}", "title": "" }, { "docid": "81808fcf305829c84ced5c90ad421e12", "score": "0.7113053", "text": "function countPairs(arr, n) {\n var arrSet = new Set(arr)\n var count = 0\n for (let i = 0; i < arr.length; i++) {\n arrSet.remove(arr[i])\n if (arrSet.has(n-arr[i])) {\n count ++\n }\n }\n return count\n}", "title": "" }, { "docid": "cdec77ce0206a48e50edc1cf946ff442", "score": "0.70562786", "text": "function sockMerchant(n, ar) {\n var numberofPairs = 0;\n for (var i = 0; i < n - 1; i++) {\n var alreadyCounted = false;\n for (var k = 0; k < i; k++) {\n if (ar[i] == ar[k]) {\n alreadyCounted = true;\n break;\n }\n }\n if (alreadyCounted) {\n continue;\n }\n var numberOfSocs = 1;\n for (var j = i+1; j < n; j++) {\n if (ar[i] == ar[j])\n numberOfSocs++;\n }\n if (numberOfSocs > 1) {\n var numOfColorPairReminder = numberOfSocs % 2;\n var pairedNumeberOfSocks = numberOfSocs - numOfColorPairReminder;\n numberofPairs += pairedNumeberOfSocks / 2;\n }\n }\n\n return numberofPairs;\n}", "title": "" }, { "docid": "9fb03d3ffb9b2e132627b00f9530b784", "score": "0.7036561", "text": "function countPairs(arr, n) {\n // good luck. add any arguments you think are necessary.\n\n // solutiosn #1\n // let obj = {}; //you can use SET here\n // let count = 0;\n // arr.map(x=> {\n // let s = n-x;\n // if (x in obj){\n // count++;\n // } else{\n // obj[s] = s;\n // }\n // console.log(obj);\n // })\n\n // return count;\n\n //solutiosn #2\n let i = 0,\n j = arr.length - 1;\n let count = 0;\n arr.sort((a, b) => a - b);\n\n while (i < j) {\n if (arr[i] + arr[j] < n) {\n i++;\n } else if (arr[i] + arr[j] > n) {\n j--;\n } else {\n count++;\n i++;\n j--;\n }\n }\n\n return count;\n}", "title": "" }, { "docid": "0478f8f042a5978d26551aa2b86a89e0", "score": "0.7034288", "text": "function solution(A){\n let hash = {};\n\n for (let i = 0; i < A.length; i++) {\n if (hash[A[i]] === undefined){\n hash[A[i]] = 1;\n } else if (hash[A[i]] != undefined){\n hash[A[i]]++;\n }\n }\n \n const pairs = Object.entries(hash);\n\n for (const [value,count] of pairs) {\n if (count % 2 != 0){\n return Number(value);\n }\n }\n}", "title": "" }, { "docid": "622b77ae303ea23cbfd479a05385542b", "score": "0.69871485", "text": "function getPairsCount(arr, sum) {\n\tlet hashMap = {};\n\tfor(let i=0; i < arr.length; i++) {\n\t\thashMap[arr[i]] = (hashMap[arr[i]] || 0) + 1;\n\t}\n\tlet twice_count = 0;\n\tfor(let i=0; i< arr.length; i++) {\n\t\ttwice_count += hashMap[sum-arr[i]] || 0;\n\t\tif(sum-arr[i] === arr[i]) twice_count--;\n\t}\n\n\treturn twice_count/2;\n}", "title": "" }, { "docid": "9210a33f0e703516c91e17962b2e8156", "score": "0.69810873", "text": "function countPairs(arr, num){\n var cache = new Set(arr);\n var count = 0;\n for(let val of cache){\n cache.delete(val);\n if(cache.has(num - val)){\n count++;\n }\n }\n return count;\n}", "title": "" }, { "docid": "e4fd2f07525e4e1f124baa73f3201d07", "score": "0.691464", "text": "function countSockPairs(arr){\n let sockPairs = 0;\n\n let socksArray = arr.sort();\n\n for(let i = 0; i < socksArray.length; i++){\n // 1) if the current item === the following item, add one pair\n // i incremented by 1, so that in the next round of loop,\n // skip the following item, but start from the next next item\n if(socksArray[i] === socksArray[i+1]){\n sockPairs += 1;\n i++;\n }\n // 2) if the current item !== the following item,\n // do nothing, let loop run the next round, go through same check!\n }\n\n return sockPairs;\n}", "title": "" }, { "docid": "3055f8f16fdda706cf6009d4ff1d1d45", "score": "0.68606794", "text": "function countPair(arr, arr_len)\r\n{\r\n \r\n let count=0;\r\n //Using the Hash Map to keep count of every number \r\n let pairs=new Map();\r\n for(let i=0; i<arr_len; i++)\r\n {\r\n if(pairs.has(arr[i]))\r\n {\r\n let val=pairs.get(arr[i])+1;\r\n pairs.set(arr[i], val);\r\n \r\n }\r\n else\r\n {\r\n pairs.set(arr[i], 1);\r\n \r\n }\r\n }\r\n \r\n //Counting the pairs from Hash Map \r\n for(let key of pairs.keys())\r\n {\r\n count=count + Math.floor(pairs.get(key)/2);\r\n }\r\n return count;\r\n}", "title": "" }, { "docid": "42844a878f82f1a97330561975e85e7d", "score": "0.6843784", "text": "function countPairs(numbers, k) {\n let count = 0;\n const set = new Set(numbers);\n let arr = [...set];\n arr.sort((a, b) => a-b);\n\n let left = 0;\n let right = 1;\n\n while (right < numbers.length) {\n const sum = arr[left] + k;\n if (sum < arr[right]) {\n if (right - left === 1) {\n right++\n }\n left++\n } else if (sum > arr[right]) {\n right++\n } else {\n count++;\n left++;\n right++;\n }\n }\n return count;\n}", "title": "" }, { "docid": "c3f4b419b1e8b91476a96f4e246d7ead", "score": "0.6807005", "text": "function countPairs(arr, target) {\n //Create a result to count number of payrs\n let result = 0;\n // Create a pointer to point the number we coing to check\n let currVal = 0\n \n // Loop over the array\n for(let i = arr.length - 1; i >= currVal ; i-- ){\n // console.log(currVal, i)\n // if pointer greater or equal then arr length return result\n if(currVal > arr.length) return result\n //if arr at pointer and arr at current index = target increment result\n if((arr[currVal] + arr[i]) === target){\n result++\n }\n //if pointer greaiter then curr index increment pointer reset index\n if(currVal === i){\n currVal++\n i = arr.length - 1\n \n }\n \n }\n return result\n}", "title": "" }, { "docid": "31b6587820dc67862d3016b4fe7a89e1", "score": "0.68045557", "text": "function pairs(ar) {\n var count = 0;\n for (var x = 0; x < ar.length; x += 2) {\n if (ar[x] - 1 === ar[x + 1] || ar[x] + 1 === ar[x + 1]) {\n count++\n }\n }\n return count;\n}", "title": "" }, { "docid": "a9e662f3340a49da0fc969b7e90b5352", "score": "0.6768513", "text": "function twoSum(arr, S) {\n\n var sums = [];\n var hashTable = {};\n\n // check each element in array\n for (var i = 0; i < arr.length; i++) {\n \n // calculate S - current element\n var sumMinusElement = S - arr[i];\n\n // check if this number exists in hash table\n // if so then we found a pair of numbers that sum to S\n if (hashTable[sumMinusElement.toString()] !== undefined) { \n sums.push([arr[i], sumMinusElement]);\n }\n\n // add the current number to the hash table\n hashTable[arr[i].toString()] = arr[i];\n\n }\n\n // return all pairs of integers that sum to S\n return sums;\n\n}", "title": "" }, { "docid": "b7339c66a0beacd12ed95590618155da", "score": "0.6766386", "text": "function sockMerchant(n, ar) {\n // Write your code here\n let count = 0;\n let token = 0;\n let examined = [];\n for (let i = 0; i < n; i++) {\n for (let j = i + 1; j < n; j++) {\n if (!examined.includes(ar[i]) && ar[i] === ar[j]) {\n token += 1;\n }\n }\n if (token % 2 === 0) {\n count += token / 2;\n } else {\n count += (token + 1) / 2;\n }\n examined.push(ar[i]);\n token = 0;\n }\n return count;\n}", "title": "" }, { "docid": "832ae1066960a37f3299c7a554cd9922", "score": "0.6757589", "text": "function sockMerchant(n, ar) {\n const arr = [...ar].sort((a, b) => a - b);\n const set = [...new Set(arr)];\n if (set.length === ar.length) return 0;\n const res = set.map((i) => arr.filter((v) => v === i));\n const pop = (arr) => {\n arr.splice(0, 1);\n return arr;\n };\n const getPairs = (arr) =>\n arr.length % 2 === 0 ? arr.length : pop(arr).length;\n const pairs = res.map(getPairs).filter((i) => i !== 0);\n const countPairs = (arr) => arr.reduce((a, b) => a + b) / 2;\n return countPairs(pairs);\n}", "title": "" }, { "docid": "c1d19559df3a9a845c9f79ece55cf0f8", "score": "0.6755293", "text": "function sockMerchant(n, ar) {\n let pairs = 0;\n for (let i = 0; i < ar.length; i++) { \n for (let j = i+1; j < ar.length; j++) {\n if (ar[i] === ar[j] && ar[i] !== undefined) {\n ar.splice(j, 1);\n ar.splice(i, 1);\n i = 0;\n j = 0;\n pairs++\n }\n }\n }\n return pairs;\n}", "title": "" }, { "docid": "bf7d9123ae81fcaec4bdf2580d789cdb", "score": "0.6701334", "text": "countPairsItrative(x) {\n let lastlist = Object.assign({}, this);\n let smalllistLength\n dummyList = Object.assign({}, this);\n let pairs = 0\n if (this.length < secondListlength) {\n smalllistLength = this.length\n } else {\n smalllistLength = secondListlength\n }\n for (let i = 0; i < smalllistLength; i++) {\n for (let j = 0; j < this.length; j++) {\n if (secondList.head.value + dummyList.head.value == x) {\n pairs++\n }\n if (dummyList.head.next) {\n dummyList.head = dummyList.head.next\n }\n };\n dummyList = {}\n dummyList = Object.assign({}, lastlist);\n secondList.head = secondList.head.next\n };\n console.log(pairs)\n }", "title": "" }, { "docid": "717566c8aa5284225f1682233d1e37ab", "score": "0.6669059", "text": "function sockMerchant(n, ar) {\n let counts = {};\n let count = [];\n let sum = 0;\n\nfor(let i = 0; i < ar.length; i++){\nlet item = ar[i]\n counts[item] = counts[item] >= 1 ? counts[item] + 1 : 1;\n}\ncount = Object.values(counts);\nfor(let i = 0; i < count.length; i++){\nif(count[i] >= 2){\n sum += Math.floor(count[i]/2)\n}\n}\nreturn sum;\n}", "title": "" }, { "docid": "7cd158c58e376149fd6b298ec3728789", "score": "0.66673726", "text": "function findTwins(arr) {\n\tif (arr.length === 0) return null;\n\tlet count = {}; \n\tlet ones = 0; //we want to return null if elements don't repeat\n \n\tfor (let i = 0; i < arr.length; i++) { \n\t let num = arr[i];\n\t if (count[num] === undefined) {\n\t\tcount[num] = 0;\n\t } \n\t count[num]++;\n\t} \n\t //if value of count is 2, returns that key\n\tfor (let key in count) {\t \n\t \tif (count[key] === 2) { \n\t\t\treturn parseInt(key);\n\t\t} else {\n\t\t\tif (count[key] === 1) { //{3:1, 2: 1, 1: 1, 4: 1, 5:1}\n\t\t\tones++ //if there are no repeats { 0: 1, 1: 1, 3: 2, 4: 1, 6: 3 }\n\t\t\t//console.log(`these are ${ones}`)\n\t\t\t}\n\t \t}\n\t//if keys added up to the same number as length, we know all the values were 1\n\t}\n\t if (ones === arr.length) {\n\t\treturn null\n\t} \n}", "title": "" }, { "docid": "ede31b0dbb073c953f528433991cb471", "score": "0.6662477", "text": "function sockMerchant(n, ar) {\n let sockObj = {}\n ar.map((sock)=> {\n sockObj[sock] ? sockObj[sock].socks +=1 : sockObj[sock] = {socks : 1}\n })\n let uniqueArray = [...new Set(ar)]\n let nonPairs = 0\n uniqueArray.forEach((id)=> nonPairs = nonPairs + (sockObj[id].socks % 2)) \n let pairs = (n - nonPairs) /2 \n return pairs\n}", "title": "" }, { "docid": "121618b562d7075f28b337bace1aee68", "score": "0.66505396", "text": "function getPairsCountStripDupes(arr, sum) {\n\t//strip duplicates\n\tlet newArr = [...new Set(arr)];\n\t//start get pairs count functionality\n\tlet hashMap = {};\n\tlet doubleCount = 0;\n\n\tfor(let elem of newArr) {\n\t\thashMap[elem] = (hashMap[elem] || 0) + 1;\n\t}\n\n\tfor(let elem of newArr) {\n\t\tif(hashMap[sum - elem]) doubleCount++;\n\t\t//for duplicate values (in the case of [5, 3, 7], 5 will get counted and needs to be removed)\n\t\tif(sum - elem === elem) doubleCount--;\n\t}\n\treturn doubleCount/2;\n}", "title": "" }, { "docid": "78a15bda12c12985e7c6a1a713daa607", "score": "0.66417646", "text": "function pairs(ar) {\n const a = [];\n const b = [];\n let count = 0;\n ar.forEach((el, i) => {\n if (i % 2 === 0) a.push(el);\n else b.push(el);\n });\n\n a.forEach((el, i) => {\n if (el === b[i] - 1) count++;\n if (el === b[i] + 1) count++;\n });\n\n return count;\n}", "title": "" }, { "docid": "51ffd2866baa310473ce68dfdc74ef8b", "score": "0.6605355", "text": "function findPair(arr, n) {\n arr.sort((a, b) => a - b);\n let num = Math.abs(n);\n let i = 0;\n let j = 1;\n\n while (j < arr.length) {\n let difference = Math.abs(arr[i] - arr[j]);\n\n if (difference === num) return true;\n\n if (difference > num && i === j - 1) {\n i++;\n j++;\n }\n if (difference > num) {\n i++;\n } else {\n j++;\n }\n }\n return false;\n}", "title": "" }, { "docid": "96d6ee38ab90f9dd35284111e41d2d2f", "score": "0.66051745", "text": "function countPairs(arr,target) {\n let count = 0;\n let left = 0\n let right = arr.length - 1;\n\n while(left < arr.length/2){\n if(1 <= right){\n if(arr[left] + arr[right] === target){\n count++;\n left++;\n right = arr.length - 1;\n } else {\n right--;\n }\n } else if(!right) {\n left++;\n right = arr.length - 1;\n }\n\n }\n\n return count\n}", "title": "" }, { "docid": "1051a110b97adbe94352fdefae70d69d", "score": "0.65936726", "text": "function countPairs(numbers, k) {\n var pairCount = 0;\n\n for(var i = 0; i< numbers.lenght; i++ ) {\n for(var j = i +1; j < numbers.lenght; j++ ) {\n // console.log( \"i\",numbers[i], \"j\",numbers[j])\n if(numbers[i] + k == numbers[j]) {\n pairCount++\n }\n }\n }\n return pairCount;\n}", "title": "" }, { "docid": "fd82ce0a7adb9572552fc63300edddff", "score": "0.6590627", "text": "function solution(arr) {\n let obj = {};\n //st1 :\n for (let e of arr) {\n if (obj[e]) {\n obj[e] += 1;\n } else {\n obj[e] = 1;\n }\n }\n // St2 : \n for (let k in obj) {\n if (obj[k]%2 == 1) {\n return Number(k);\n }\n \n }\n return -1;\n}", "title": "" }, { "docid": "e35d3785fcc551b68dad2da9bcee6a8e", "score": "0.6587674", "text": "function solution(A) {\n // write your code in JavaScript (Node.js 8.9.4)\n\n let count = 0;\n let peaks = [0];\n let next = [0];\n\n peaks[A.length - 1] = 0;\n next[A.length - 1] = -1;\n\n for (let i = A.length - 1; i > 1; i--) {\n peaks[i - 1] = 0;\n if (A[i - 1] > A[i - 2] && A[i - 1] > A[i]) {\n peaks[i - 1] = 1;\n count++;\n }\n\n if (peaks[i] === 1) {\n next[i - 1] = i;\n } else {\n next[i - 1] = next[i];\n }\n }\n\n if (next.length > 1) {\n if (peaks[1] === 1) {\n next[0] = 1;\n } else {\n next[0] = next[1];\n }\n }\n\n if (count < 2) {\n return count;\n }\n\n const max = Math.min(count, parseInt(Math.sqrt(A.length))) + 1;\n\n for (let i = max; i > 0; i--) {\n let tally = 1;\n let base = next[0];\n let j = next[base];\n\n while (j < peaks.length && j > 0) {\n if (j - base >= i) {\n tally++;\n base = j;\n j = next[base];\n } else {\n j = next[j];\n }\n }\n if (tally >= i) {\n return i;\n }\n }\n return 0;\n}", "title": "" }, { "docid": "7bf6c023f5b6a94d28b55813f3c61e77", "score": "0.65602034", "text": "function findPairs(K, A) {\n let counter = 0\n //create an object of key-value pairs\n //to check if the element in the array is duplicate\n let duplicate = {}\n A.forEach(el => {\n //if the element doesn't exist, create an entry in the object\n if(!duplicate[el]) {\n return duplicate[el] = 1\n //if the element exists, add 1 to the value\n } else {\n duplicate[el] ++ \n }\n })\n // console.log(duplicate)\n Object.keys(duplicate).forEach(key => {\n let difference = K-key\n //if difference is a key in duplicate (this evaluate to true)\n if (difference in duplicate) {\n //console.log(duplicate[key])\n //console.log(duplicate[difference])\n counter += duplicate[key] * duplicate[difference]\n }\n })\n return counter\n }", "title": "" }, { "docid": "92e9fe8352ed346930574e43e370f05c", "score": "0.6556466", "text": "function twoSum(numArr, sum){\n var pairs = [];\n var hashtable = [];\n for(var i = 0; i < numArr.length; i++){\n var currNum = numArr[i];\n var counterPart = sum - currNum;\n if(hashtable.indexOf(counterPart) !== -1){\n pairs.push([currNum, counterPart])\n }\n\n hashtable.push(currNum);\n }\n\n return pairs;\n}", "title": "" }, { "docid": "a3de2462757b7fdb5cb0026046b2845f", "score": "0.65544003", "text": "function bustOpenPairs(arr){\n for (let y = 0; y < arr.length; y++) { // Moving between items and searching arrays who have 2 items and they are the same on x.\n for (let x = 0; x < arr[y].length; x++) {\n if (typeof arr[y][x] === \"object\" && arr[y][x].length === 2) { \n for (let m = 0; m < arr[y].length; m++) {\n if (typeof arr[y][m] === \"object\" && arr[y][m].length === 2 && JSON.stringify(arr[y][m]) === JSON.stringify(arr[y][x]) && x !== m) {\n next:\n for (let k = 0; k < arr[y].length; k++) {\n if (x === k || m === k) {\n continue next;\n }\n if (typeof arr[y][k] === \"object\") { \n arr[y][k].splice(arr[y][k].indexOf(arr[y][x][0]), 1);\n arr[y][k].splice(arr[y][k].indexOf(arr[y][x][1]), 1);\n }\n }\n }\n }\n }\n }\n }\n for (let y = 0; y < arr.length; y++) { // Moving between items and searching arrays who have 2 items and they are the same on y.\n for (let x = 0; x < arr[y].length; x++) {\n if (typeof arr[y][x] === \"object\" && arr[y][x].length === 2){\n for (let m = 0; m < arr[x].length; m++) {\n if (typeof arr[m][x] === \"object\" && arr[m][x].length === 2 && JSON.stringify(arr[m][x]) === JSON.stringify(arr[y][x]) && y !== m) {\n next:\n for (let k = 0; k < arr[x].length; k++) {\n if ( y === k || m === k ) {\n continue next;\n }\n if (typeof arr[k][x] === \"object\") { \n arr[k][x].splice(arr[k][x].indexOf(arr[y][x][0]), 1);\n arr[k][x].splice(arr[k][x].indexOf(arr[y][x][1]), 1);\n }\n }\n }\n }\n }\n }\n }\n for (let y = 0; y < arr.length; y++) { // Moving between items and searching arrays who have 2 items and they are the same on squares.\n for (let x = 0; x < arr[y].length; x++) {\n if (typeof arr[y][x] === \"object\" && arr[y][x].length === 2){ \n if (x < 3 && y < 3) {\n for (let k = 0; k < 3; k++) {\n next:\n for (let m = 0; m < 3; m++) {\n if (typeof arr[k][m] !== \"object\" || typeof arr[k][m] === \"object\" && k === y && m === x) {\n continue next;\n }\n if (arr[k][m].length === 2 && JSON.stringify(arr[k][m]) === JSON.stringify(arr[y][x])) {\n for (let n = 0; n < 3; n++) {\n for (let p = 0; p < 3; p++) {\n if (JSON.stringify(arr[n][p]) !== JSON.stringify(arr[y][x]) && typeof arr[n][p] === \"object\") {\n arr[n][p].splice(arr[n][p].indexOf(arr[y][x][0]), 1);\n arr[n][p].splice(arr[n][p].indexOf(arr[y][x][1]), 1);\n } \n }\n } \n }\n }\n }\n }\n if (x >= 3 && x < 6 && y < 3) {\n for (let k = 0 ; k < 3; k++) {\n next:\n for (let m = 3; m < 6; m++) {\n if (typeof arr[k][m] !== \"object\" || typeof arr[k][m] === \"object\" && k === y && m === x) {\n continue next;\n }\n if (arr[k][m].length === 2 && JSON.stringify(arr[k][m]) === JSON.stringify(arr[y][x])) {\n for (let n = 0; n < 3; n++) {\n for (let p = 3; p < 6; p++) {\n if (JSON.stringify(arr[n][p]) !== JSON.stringify(arr[y][x]) && typeof arr[n][p] === \"object\") {\n arr[n][p].splice(arr[n][p].indexOf(arr[y][x][0]), 1);\n arr[n][p].splice(arr[n][p].indexOf(arr[y][x][1]), 1);\n }\n }\n } \n }\n }\n }\n }\n if (x >= 6 && y < 3) {\n for (let k = 0 ; k < 3; k++) {\n next:\n for (let m = 6; m < 9; m++) {\n if (typeof arr[k][m] !== \"object\" || typeof arr[k][m] === \"object\" && k === y && m === x) {\n continue next;\n }\n if (arr[k][m].length === 2 && JSON.stringify(arr[k][m]) === JSON.stringify(arr[y][x])) {\n for (let n = 0; n < 3; n++) {\n for (let p = 6; p < 9; p++) {\n if (JSON.stringify(arr[n][p]) !== JSON.stringify(arr[y][x]) && typeof arr[n][p] === \"object\") {\n arr[n][p].splice(arr[n][p].indexOf(arr[y][x][0]), 1);\n arr[n][p].splice(arr[n][p].indexOf(arr[y][x][1]), 1);\n }\n }\n } \n }\n }\n }\n }\n if (x < 3 && y >= 3 && y < 6) {\n for (let k = 3; k < 6; k++) {\n next:\n for (let m = 0; m < 3; m++) {\n if (typeof arr[k][m] !== \"object\" || typeof arr[k][m] === \"object\" && k === y && m === x) {\n continue next;\n }\n if (arr[k][m].length === 2 && JSON.stringify(arr[k][m]) === JSON.stringify(arr[y][x])) {\n for (let n = 3; n < 6; n++) {\n for (let p = 0; p < 3; p++) {\n if (JSON.stringify(arr[n][p]) !== JSON.stringify(arr[y][x]) && typeof arr[n][p] === \"object\") {\n arr[n][p].splice(arr[n][p].indexOf(arr[y][x][0]), 1);\n arr[n][p].splice(arr[n][p].indexOf(arr[y][x][1]), 1);\n }\n }\n } \n }\n }\n }\n }\n if (x >= 3 && x < 6 && y >= 3 && y < 6) {\n for (let k = 3; k < 6; k++) {\n next:\n for (let m = 3; m < 6; m++) {\n if (typeof arr[k][m] !== \"object\" || typeof arr[k][m] === \"object\" && k === y && m === x) {\n continue next;\n }\n if (arr[k][m].length === 2 && JSON.stringify(arr[k][m]) === JSON.stringify(arr[y][x])) {\n for (let n = 3; n < 6; n++) {\n for (let p = 3; p < 6; p++) {\n if (JSON.stringify(arr[n][p]) !== JSON.stringify(arr[y][x]) && typeof arr[n][p] === \"object\") {\n arr[n][p].splice(arr[n][p].indexOf(arr[y][x][0]), 1);\n arr[n][p].splice(arr[n][p].indexOf(arr[y][x][1]), 1);\n }\n }\n } \n }\n }\n }\n }\n if (x >= 6 && y >= 3 && y < 6) {\n for (let k = 3; k < 6; k++) {\n next:\n for (let m = 6; m < 9; m++) {\n if (typeof arr[k][m] !== \"object\" || typeof arr[k][m] === \"object\" && k === y && m === x) {\n continue next;\n }\n if (arr[k][m].length === 2 && JSON.stringify(arr[k][m]) === JSON.stringify(arr[y][x])) {\n for (let n = 3; n < 6; n++) {\n for (let p = 6; p < 9; p++) {\n if (JSON.stringify(arr[n][p]) !== JSON.stringify(arr[y][x]) && typeof arr[n][p] === \"object\") {\n arr[n][p].splice(arr[n][p].indexOf(arr[y][x][0]), 1);\n arr[n][p].splice(arr[n][p].indexOf(arr[y][x][1]), 1);\n }\n }\n } \n }\n }\n }\n }\n if (x < 3 && y >= 6) {\n for (let k = 6; k < 9; k++) {\n next:\n for (let m = 0; m < 3; m++) {\n if (typeof arr[k][m] !== \"object\" || typeof arr[k][m] === \"object\" && k === y && m === x) {\n continue next;\n }\n if (arr[k][m].length === 2 && JSON.stringify(arr[k][m]) === JSON.stringify(arr[y][x])) {\n for (let n = 6; n < 9; n++) {\n for (let p = 0; p < 3; p++) {\n if (JSON.stringify(arr[n][p]) !== JSON.stringify(arr[y][x]) && typeof arr[n][p] === \"object\") {\n arr[n][p].splice(arr[n][p].indexOf(arr[y][x][0]), 1);\n arr[n][p].splice(arr[n][p].indexOf(arr[y][x][1]), 1);\n }\n }\n } \n }\n }\n }\n }\n if (x >=3 && x < 6 && y >= 6) {\n for (let k = 6; k < 9; k++) {\n next:\n for (let m = 3; m < 6; m++) {\n if (typeof arr[k][m] !== \"object\" || typeof arr[k][m] === \"object\" && k === y && m === x) {\n continue next;\n }\n if (arr[k][m].length === 2 && JSON.stringify(arr[k][m]) === JSON.stringify(arr[y][x])) {\n for (let n = 6; n < 9; n++) {\n for (let p = 3; p < 6; p++) {\n if (JSON.stringify(arr[n][p]) !== JSON.stringify(arr[y][x]) && typeof arr[n][p] === \"object\") {\n arr[n][p].splice(arr[n][p].indexOf(arr[y][x][0]), 1);\n arr[n][p].splice(arr[n][p].indexOf(arr[y][x][1]), 1);\n }\n }\n } \n }\n }\n }\n }\n if (x >= 6 && y >= 6) {\n for (let k = 6; k < 9; k++) {\n next:\n for (let m = 6; m < 9; m++) {\n if (typeof arr[k][m] !== \"object\" || typeof arr[k][m] === \"object\" && k === y && m === x) {\n continue next;\n }\n if (arr[k][m].length === 2 && JSON.stringify(arr[k][m]) === JSON.stringify(arr[y][x])) {\n for (let n = 6; n < 9; n++) {\n for (let p = 6; p < 9; p++) {\n if (JSON.stringify(arr[n][p]) !== JSON.stringify(arr[y][x]) && typeof arr[n][p] === \"object\") {\n arr[n][p].splice(arr[n][p].indexOf(arr[y][x][0]), 1);\n arr[n][p].splice(arr[n][p].indexOf(arr[y][x][1]), 1);\n }\n }\n } \n }\n } \n } \n } \n } \n }\n }\n return insertZeros(arr); // Recursion.\n }", "title": "" }, { "docid": "cc2463c85c4453d6c5366e7d4848b761", "score": "0.6543165", "text": "function main (arr) {\n // let buffer = 0\n // let swaps = 0\n // let sorted = Array.from(arr).sort()\n // console.log('Input:', arr)\n // console.log('Sorted:', sorted)\n\n // for (let i = 0; i < sorted.length - 1; i++) {\n // let expectedPosition = i\n // let currenNumber = sorted[i]\n // for (let j = 0; j < arr.length; j++) {\n // if (arr[j] === currenNumber && j !== expectedPosition) {\n // buffer = arr[expectedPosition]\n // arr[expectedPosition] = currenNumber\n // arr[j] = buffer\n // swaps++\n // }\n // }\n // }\n // console.log('Output:', arr)\n // return swaps\n\n 2 3 4 5\n \n\n let minValue = Math.min(...arr)\n let finalPosition = 0\n let buffer = 0\n let numberSwaps = 0\n let i = 0\n\n // Process every value in the array.\n while (i < arr.length) {\n // Calculate the final finalPosition of each value.\n finalPosition = arr[i] - minValue\n // Check wether the value is in its correct finalPosition. If not, throw (swap) it to its rigthfull position.\n if (finalPosition !== i) {\n buffer = arr[i]\n arr[i] = arr[finalPosition]\n arr[finalPosition] = buffer\n numberSwaps++\n } else {\n // If the value is already in its final position, go to the next value.\n i++\n }\n }\n return numberSwaps\n}", "title": "" }, { "docid": "5599c28c015991183551cca7fc5faf8a", "score": "0.65394074", "text": "function sockMerchant(n, ar) {\n const sockCollection = new Map();\n let pairs = 0;\n for (var sock of ar) {\n if (sockCollection.has(sock)) {\n sockCollection.set(sock, sockCollection.get(sock) + 1);\n if (sockCollection.get(sock) % 2 == 0) {\n pairs++;\n }\n } else {\n sockCollection.set(sock, 1);\n }\n }\n\n return pairs;\n}", "title": "" }, { "docid": "91b867036c9a084f05eef641138ed4b2", "score": "0.65300274", "text": "function pairsTooLong(k, arr) {\n // declare count to track number of pairs\n let count = 0\n // loop to get through values, omitting last value (no comparison)\n for (let i = 0; i < arr.length - 1; i ++) {\n // loop to compare, j determined by value of i\n for (let j = i + 1; j < arr.length; j ++) {\n let diff = Math.abs(arr[i] - arr[j])\n\n if (diff == k) {\n count = count + 1\n }\n }\n }\n // return count\n // (or)\n console.log('Final count: ', count)\n}", "title": "" }, { "docid": "08e8a5314c17c6deef97444289e3658e", "score": "0.64992833", "text": "function countSwaps(arr) {\n let ordered = arr.slice().sort(function(a,b){return a-b});\n let swaps = 0;\n for (let index = 0; index < arr.length; index++) {\n const element = arr[index];\n // console.log(element ,ordered);\n if(element !== ordered[0]){\n let location = binSearch(ordered, element);\n ordered.splice(location, 1);\n // console.log(location);\n swaps += location;\n }else{\n ordered.splice(0, 1);\n }\n }\n return swaps;\n}", "title": "" }, { "docid": "c5eb946070089cbbb0110c7298b0af99", "score": "0.6474082", "text": "function getSwapCount(a) {\r\n var swaps = 0;\r\n // Iterate through the array from 0 to n-1\r\n for (var i = 0; i < a.length-1; i++) {\r\n // Iterate through the array from 1 to n\r\n for (var j = i + 1; j < a.length; j++) {\r\n // If there would be a swap then add 1\r\n swaps += (a[i] > a[j]) ? 1 : 0;\r\n // console.log(\"swaps\", swaps, \"ai\", a[i], \"aj\", a[j]);\r\n }\r\n }\r\n return swaps;\r\n }", "title": "" }, { "docid": "297702919f962a0bf78efdcf037ef7f3", "score": "0.6443254", "text": "function pairs(k, arr) {\n let count = 0\n for (let i=0; i< arr.length-1; i++) {\n for (let j=i+1; j<arr.length; j++) {\n if ((arr[i] - arr[j]) == k || (arr[j] - arr[i]) == k) {\n count++\n }\n }\n }\n return count\n}", "title": "" }, { "docid": "34952a48a6b16aef8e760275b6757d64", "score": "0.64418834", "text": "function solution(A) {\n\n A.sort();\n for (let i = 0;i < A.length; i++) {\n let br = 1;\n while(A[i] === A[i + 1]) {\n i++;\n br++;\n }\n if(br%2 !== 0){\n return A[i];\n }\n }\n return A[A.length - 1];\n}", "title": "" }, { "docid": "8075a75a51a8c573b515192901c737d0", "score": "0.64220136", "text": "function sockMerchant(n, ar) {\n \n ar.sort(function(a, b) {\n return a - b;\n });\n\n let matchCount = 0;\n for (let i = 0; i < 7; i++) {\n \n if (i < n) {\n if (ar[i] === ar[i+1]) {\n matchCount ++;\n i++\n }\n }\n } //end for loop\n \n console.log(matchCount);\n return matchCount;\n} //end function", "title": "" }, { "docid": "189a50f6c676c34ed2bbeb5adb93af06", "score": "0.64208096", "text": "makeRandomPairs(number) {\n const totalPairs = number * 2;\n const tempArray = [];\n\n while (tempArray.length < totalPairs) {\n const tempRandomCardIndex = this.makeRandomNumber(52);\n\n if (!tempArray.includes(tempRandomCardIndex)) {\n tempArray.push(tempRandomCardIndex, tempRandomCardIndex);\n }\n }\n\n for (let i = tempArray.length - 1; i > 0; i -= 1) {\n const j = this.makeRandomNumber(i + 1);\n const temp = tempArray[i];\n tempArray[i] = tempArray[j];\n tempArray[j] = temp;\n }\n\n tempArray.forEach((cardIndex) => {\n randomCards.push(deck[cardIndex]);\n });\n }", "title": "" }, { "docid": "516b8e3809a9a3ac33db5b5e9b231162", "score": "0.6391077", "text": "function amicablePairsUpTo(maxNum) {\n function sumProperDivisors(n){\n let sum = 0\n const arr = [], max = Math.floor(Math.sqrt(n));\n for(let i = 1; i <= max; i++){\n if(n % i === 0){\n const j = n / i;\n sum += i\n if( i !== j && j !== n){\n sum += j\n }\n \n }\n }\n return sum;\n }\n const pairs = [];\n for(let i = 1; i < maxNum; i++){\n \n const a = sumProperDivisors(i);\n const b = sumProperDivisors(a);\n if(i === b && a !== b && a < b){\n pairs.push([a, b]);\n }\n }\n \n return [...pairs];\n }", "title": "" }, { "docid": "51446f0f66605cae51cf44a795ce1792", "score": "0.63715094", "text": "function solution(A) {\n // write your code in JavaScript (Node.js 8.9.4)\n A = A.sort((a,b) => a - b);\n var arrayLength = A.length;\n var cur = A[0];\n var curlength = 1;\n for(var i = 1; i < arrayLength; i ++ ){\n if(cur == A[i]){\n curlength += 1;\n }else{\n if(curlength % 2 == 1){\n break;\n }else{\n cur = A[i];\n curlength = 1;\n }\n }\n }\n return cur;\n}", "title": "" }, { "docid": "8ec3f922391162dccc5bdd8a7a51a24e", "score": "0.63211954", "text": "function solution(A) {\n let len = A.length;\n let storage = {};\n let maxEl = 0, maxCount = 0;\n\n if (len === 0) {\n return -1;\n }\n\n if (len === 1) {\n return 0;\n }\n\n // Solution\n // we used an object(storage) to save every total count of each different number\n // maxEl is used to save element which has highest number so far\n // e.g array A [3, 4, 3, -1, 3] \n // loop 1: storage { '3' : [0] }, maxEl = 3\n // loop 2: storage { '3' : [0], '4' : [1] }, maxEl = 3\n // loop 3: storage { '3' : [0, 2], '4' : [1] }, maxEl = 3\n // loop 4: storage { '3' : [0, 2], '4' : [1], '-1' : [3] }, maxEl = 3\n // loop 5: storage { '3' : [0, 2, 4], '4' : [1], '-1' : [3] }, maxEl = 3\n // check if max element's count over half of array then return max element array index\n // if not then return -1\n // in this case we should return [0, 2, 4]\n\n for (let i = 0; i < len; i++) {\n let el = A[i];\n\n if (storage[el] === undefined) {\n storage[el] = [];\n storage[el].push(i);\n } else {\n storage[el].push(i);\n }\n\n if (storage[el].length > maxCount) {\n maxEl = el;\n maxCount = storage[el].length;\n }\n }\n\n // If every element has equal count , e.g [1, 2, 3] or [-1, -2, 1]\n if (maxCount === 1) {\n return -1;\n }\n\n // Check if max element's count over half array or not\n if (storage[maxEl].length / len <= 0.5) {\n return -1;\n }\n\n return storage[maxEl][0];\n}", "title": "" }, { "docid": "39899665a4c9f2db6f43201f1db5ea47", "score": "0.6303662", "text": "countPairs(X, Y, M, N)\n {\n let min_length = Math.min(M,N);\n let min_array_length = min_length == M ? M : N;\n let max_array_length = min_length == M ? N : M;\n let min_array = min_length == M ? X : Y;\n let max_array = min_length == M ? Y : X;\n let result_count = 0;\n // console.log(min_array_length,max_array_length,min_array,max_array)\n for(let i = 0;i<min_array_length; i++){\n let j = 0;\n while(j<max_array_length){\n let first_power = Math.pow(max_array[j],min_array[i]);\n let second_power = Math.pow(min_array[i],max_array[j]);\n // console.log(\"first power\", first_power, \"second_power\", second_power);\n if(first_power > second_power) result_count++;\n //console.log(result_count);\n j++\n }\n }\n return result_count;\n }", "title": "" }, { "docid": "d0489ea2a8b35782ef387ab98f6b550b", "score": "0.6301755", "text": "function solution (A) {\n const N = A.length\n\n if (N === 0) {\n // Empty A\n return A\n }\n\n if (N % 2 === 0 || N > 1000000) {\n // A does not contain an odd number of elements\n return A\n }\n\n if (A.find(x => (x < 1 || x > 1000000))) {\n // An A element is too small or too large\n return A\n }\n\n // Find unique elements\n const one = []\n\n for (let i = 0; i < A.length; i += 1) {\n const num = A[i]\n const index = one.indexOf(num)\n\n if (index === -1) {\n one.push(num)\n } else {\n one.splice(index, 1)\n }\n }\n // Find the unpaired number\n return one[0]\n}", "title": "" }, { "docid": "326f5488f57ea10d2f18f24cd3f02365", "score": "0.6276613", "text": "function divisibleSumPairs(n, k, ar) {\nlet pairs = 0;\nfor(let i=0;i<n;i++){\n for(let j=i+1;j<n;j++){\n if((ar[i]+ar[j])%k == 0){\n pairs++;\n }\n }\n}\nconsole.log(pairs);\nreturn pairs;\n}", "title": "" }, { "docid": "97d3da8aebd74cda5f1f3eae8851fad7", "score": "0.62745553", "text": "registerNumber(arr) {\n var registered = true;\n var checkForPairs = 0;\n //console.log(this.numbersUsed[arr[0]] + ' < ' + 2 + ' && ' + this.numbersUsed[arr[1]] + ' < ' + 2 + ' && ' + this.numbersUsed[arr[2]] + ' < ' + 2 + ' && ' + this.numbersUsed[arr[3]] + ' < ' + 2);\n\n if (this.numbersUsed[arr[0]] < 2 && this.numbersUsed[arr[1]] < 2 && this.numbersUsed[arr[2]] < 2 && this.numbersUsed[arr[3]] < 2) {\n arr.forEach((val, key) => {\n this.foundRows.every( (rowVal, rowKey) => {\n if (this.foundRows[rowKey].indexOf(val) > -1) {\n checkForPairs++;\n return true;\n }\n if (checkForPairs > 1) {\n registered = false;\n return false;\n }\n else {\n this.numbersUsed[val] = this.numbersUsed[val] + 1;\n }\n });\n });\n }\n else {\n registered = false;\n }\n return registered;\n }", "title": "" }, { "docid": "e41cd28b80ed961f5d82e8193a85572c", "score": "0.6272065", "text": "function countTriplets(arr, r) {\n\n let n = 0;\n let numberMap = {}\n let pairs = {}\n\n for (let i = arr.length-1; i >= 0; i--) {\n let num = arr[i]\n let power = num * r\n // Check for triplets first.\n if (pairs[power]){\n // console.log('found triplet: ', num, power, power * r, 'n', n, ' pow', pairs[power])\n n += pairs[power]\n }\n // When we had a pair, store it in our pair map, so when we reach a number, that has a pair,\n // we can calculate matching numbers!\n if (numberMap[power]){\n pairs[num] = pairs[num] || 0\n pairs[num] += numberMap[power]\n // console.log('found pair: ', num, power, 'this many: ', numberMap[power])\n }\n numberMap[num] = numberMap[num] || 0\n numberMap[num] ++\n // console.log('num: ', num, numberMap[num])\n }\n // console.log('n:', n)\n return n\n}", "title": "" }, { "docid": "96d7640083751a179cfd7423dc59f414", "score": "0.6269228", "text": "function findOdd(A) {\n //happy coding!\n// store array and make a hash\n hashMap = {}\n// create a for loop for each element in array\n for (i=0;i<A.length;i++){\n if(hashMap[A[i]]){\n hashMap[A[i]]+=1\n }\n else{\n hashMap[A[i]] = 1\n }\n } \n return Object.keys(hashMap).find(key=> (key %2) !== 0)\n}", "title": "" }, { "docid": "6d703723406166a5eb6ce7be801cace4", "score": "0.6229827", "text": "function find_two_pairs(hand_info) { \n\tlet pair1 = false,\n\t\tpair2 = false;\n\tlet best_pairs = []; \n\n\tlet i = ace;\n\twhile(i >= 2 && pair1 == false) {\n\t\tif(hand_info.count_rank[i] >= 2) {\n\t\t\tpair1 = i;\n\t\t\tbest_pairs.push(pair1, pair1);\n\t\t}\n\t\ti--;\n\t}\n\n\twhile(i >= 2 && pair2 == false) {\n\t\tif(hand_info.count_rank[i] >= 2) {\n\t\t\tpair2 = i;\n\t\t\tbest_pairs.push(pair2, pair2);\n\t\t}\n\t\ti--;\n\t} \n\n\tif(pair1 && pair2){\n\t\tfor(let i = 0; i < hand_size; i++) {\n\t\t\tif(hand_info.hand[i].rank != pair1 && hand_info.hand[i].rank != pair2 ) {\n\t\t\t\tbest_pairs.push(hand_info.hand[i].rank);\n\t\t\t\thand_info.best_hands[two_pairs] = best_pairs;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n}", "title": "" }, { "docid": "8f9382ab194f04436713f0b6b389765f", "score": "0.6225325", "text": "function solution_1 (A) {\n\n // INITIALIZATION\n const output = [];\n const refArr = [null]; // if `A[i] === n`, then `refArr[n] === i`. note that we throw in null into index 0. `A` will never contain 0.\n A.forEach((n, i) => refArr[n] = i);\n\n // DEFINE `flip` FUNCTION: given `n`, perform 2 flips to get it in the right spot\n function flip (n) {\n const indexOfN = refArr[n];\n for (let i = 0; i < indexOfN/2; ++i) { // flip all nums from start to `n` (remember to run the for loop only up to half of `indexOfN`)\n const a = A[i];\n const b = A[indexOfN - i];\n [refArr[a], refArr[b]] = [refArr[b], refArr[a]]; // swap opposite `refArr` elements\n [A[i], A[indexOfN - i]] = [A[indexOfN - i], A[i]]; // swap opposite `A` elements\n }\n for (let i = 0; i < (n - 1)/2; ++i) { // flip all nums up to where `n` should go (remember to run the for loop only up to half of `n - 1`)\n const a = A[i];\n const b = A[(n - 1) - i];\n [refArr[a], refArr[b]] = [refArr[b], refArr[a]];\n [A[i], A[(n - 1) - i]] = [A[(n - 1) - i], A[i]];\n }\n output.push(indexOfN + 1, n); // represent the two flips we just performed in `output`\n }\n\n // ITERATION\n for (let i = A.length - 1; i >= 0; --i) {\n const n = i + 1; // `n` is the number that should live in current position\n if (A[i] !== n) flip(n); // if `A[i] === n` then this number is correctly sorted\n }\n\n return output;\n}", "title": "" }, { "docid": "d87a97dc1988613e61cb741af7d0b8aa", "score": "0.62210214", "text": "function solution(A) {\n // write your code in JavaScript (Node.js 8.9.4)\n // [1,0] . [0,1]\n let f = A[0];\n let count = 0;\n let getOCount = getCount(A, 1);\n let getZCount = getCount(A, 0);\n console.log(getOCount + \" \" + getZCount);\n if (getOCount >= getZCount) {\n for (let i = 0; i < A.length - 1; ++i) {\n if (A[i] === A[i + 1]) {\n if (A[i] === 1) {\n A[i + 1] = 0;\n } else {\n A[i + 1] = 1;\n }\n count++;\n }\n }\n } else {\n for (let i = 0; i < A.length - 1; ++i) {\n if (A[i] === A[i + 1]) {\n if (A[i + 1] === 1) {\n A[i] = 0;\n } else {\n A[i] = 1;\n }\n count++;\n }\n }\n }\n return count;\n}", "title": "" }, { "docid": "0e8a549b161617d4f0a3e32d088826c9", "score": "0.6195605", "text": "function sherlockAndAnagrams(s) {\n\n s = Array.from(s);\n var length = s.length;\n var counter = 0;\n\n for (var j = 1; j < length; j++) {\n var hash = {};\n for (var i = 0; i < length - j +1; i++) {\n var key = s.slice(i, i + j).sort();\n console.log(key);\n if (hash[key]) {\n hash[key] += 1;\n } else { hash[key] = 1; }\n }\n console.log(hash);\n for (var key in hash) {\n var n = hash[key];\n counter += n * (n - 1) / 2 ; \n }\n }\n return counter;\n\n\n}", "title": "" }, { "docid": "7ec23de3fc83261cfac0acb8ab9b5ce2", "score": "0.6185466", "text": "function sol26(arr = [2, 3, 1, 1, 2, 4, 2, 0, 1, 1]) {\n // number at idx is the max number of jumps can take\n const dp = arr.slice().fill(Infinity);\n dp[0] = 0;\n\n for (let i = 1; i < arr.length; i++) {\n for (let j = 0; j < i; j++) {\n if (arr[j] + j >= i) {\n if (dp[j] + 1 < dp[i]) {\n dp[i] = dp[j] + 1;\n }\n }\n }\n }\n\n return dp[dp.length - 1];\n}", "title": "" }, { "docid": "f711b179cd568bbb27e34997b7d390f8", "score": "0.61796236", "text": "function OddOccurrencesInArray(A) {\n var count, i;\n\n A.sort(function(x, y) {\n return x < y ? -1 : x > y ? 1 : 0;\n });\n \n for (i = 1, count = 1; i < A.length; i++) {\n if (A[i - 1] === A[i]) {\n count += 1;\n } else {\n if (count % 2 === 1) {\n return A[i - 1];\n } else {\n count = 1;\n }\n }\n }\n \n return A[A.length - 1];\n}", "title": "" }, { "docid": "d65a9f5d7cb2e417088f1e4858b9af03", "score": "0.61766976", "text": "function minimumBribes(q) {\n let totalSwaps = 0;\n let swapsCount = new Map();\n for ( let i = 1; i < q.length; i++ ) {\n if ( q[ i ] < q[ i - 1 ]) { // bribe happened, swap\n totalSwaps += 1;\n let temp = q[ i ];\n q [ i ] = q [ i - 1 ];\n q [ i - 1 ] = temp;\n const count = swapsCount.get(q[ i ]) + 1 || 1;\n if ( count > 2 ) {\n console.log('Too chaotic');\n return;\n } else {\n swapsCount.set(q[ i ], count );\n }\n i-=2;\n }\n }\n console.log(totalSwaps);\n}", "title": "" }, { "docid": "555214d4500d905920b55e799bcfb316", "score": "0.6153494", "text": "function findOdd(A) {\n const counts = A.reduce((tracker, e) => {\n tracker[e] = tracker[e] ? tracker[e] + 1 : 1;\n //console.log(tracker[e])\n\n return tracker;\n }, {});\n\n for (key in counts) {\n if (counts[key] % 2)\n return parseInt(key);\n }\n\n return null;\n}", "title": "" }, { "docid": "95d0e56dcb9309a8addfd752d2b56a8a", "score": "0.6148491", "text": "function countPair(array){\n var obj = {}\n\n for(var i = 0 ; i < array.length ; i++){\n if(Object.keys(obj).includes(array[i])){\n obj[array[i]]++\n }else{\n obj[array[i]] = 1\n }\n }\n\n var count = 0\n for(var props in obj){\n count += Math.floor(obj[props] / 2)\n }\n\n console.log(count)\n}", "title": "" }, { "docid": "2356fc2ea2ae6293d6e85ff0cf9e35ca", "score": "0.6145603", "text": "function runDownOrder(inArr) {\n\n let arr = [...inArr]\n let count = 0;\n for(let i = arr.length - 1; i >= 0; i -= 1) {\n let value = i + 1;\n let swapIdx = -1;\n let tmp;\n if (value === arr[i]) continue;\n\n count += 1;\n\n // found collect value index\n for (swapIdx = i - 1; swapIdx >= 0; swapIdx -= 1) {\n if (arr[swapIdx] === value) break;\n }\n\n tmp = arr[i];\n arr[i] = arr[swapIdx];\n arr[swapIdx] = tmp;\n\n }\n\n return count;\n}", "title": "" }, { "docid": "5e6dc84366ff8858bbd7355124baa201", "score": "0.6136727", "text": "function divisibleByNPairSum(array, n) {\n storeArr = [];\n array.forEach(function(ele, i, arr) {\n array.forEach(function(newEle, newI, newArr) {\n if ((newI > i) && ((ele + newEle)% n === 0)) {\n storeArr.push([i,newI]);\n }\n });\n });\n return storeArr;\n}", "title": "" }, { "docid": "4dda8f90a41baf4a0e8017f61cc3b1d6", "score": "0.6136563", "text": "function sockMerchant(n, ar) {\n let pairs = 0;\n const sockTracker = new Set();\n\n ar.forEach(sock => {\n if (sockTracker.has(sock)) {\n sockTracker.delete(sock);\n pairs++;\n } else {\n sockTracker.add(sock);\n }\n })\n\n return pairs;\n}", "title": "" }, { "docid": "c62c5b80105108be4255585cc594406b", "score": "0.6128228", "text": "function findPair1(arr, target) {\n let result = [];\n for (let i = 0; i < arr.length; i++) {\n if (arr[i] + arr[i+1] === target) {\n result.push(i, i+1)\n break;\n }\n }\n return result.join()\n}", "title": "" }, { "docid": "4ddcf4f2cd1c0ddc274339513d4ae4e3", "score": "0.6127408", "text": "function sockMerchant(n, ar) {\n var tracker = 0;\n \n for(let i = 0; i < ar.length-1; i++){\n for(let j = 1; j < ar.length; j++){\n console.log('i', ar[i])\n console.log('j', ar[j])\n \n if(i === j){\n ar[j+1]\n console.log('is this working', ar[j+1])\n }\n if(ar[i] === ar[j]){\n ar.splice(i, 1)\n ar.splice(j, 1)\n tracker++\n console.log(\"ar in the if\", ar)\n console.log(\"the tracker\",tracker)\n }\n else {\n console.log(\"ar in the else\", ar)\n }\n }\n }\n return tracker\n }", "title": "" }, { "docid": "1c239a588a2c64fbc4a4475ba368909f", "score": "0.6118951", "text": "function twoSum(numArray, sum) {\n var pairs = [];\n var hashTable = [];\n\n for (let i = 0; i < numArray.length; i++) {\n var currNum = numArray[i];\n var couterpart = sum - currNum;\n if (hashTable.indexOf(couterpart) !== -1) {\n pairs.push([currNum, couterpart]);\n }\n hashTable.push(currNum);\n }\n return pairs;\n}", "title": "" }, { "docid": "bbc06310d1b11913099f1d682a40fef2", "score": "0.6112342", "text": "function sockMerchant(n, ar) {\n var sum = 0;\n var sortedArray = ar.sort();\n\n while (sortedArray.length > 1) {\n if (sortedArray[0] === sortedArray[1]){\n sum += 1;\n sortedArray.shift();\n sortedArray.shift();\n } else {\n sum += 0;\n sortedArray.shift();\n }\n }\n return sum;\n}", "title": "" }, { "docid": "f096aed91a854de47d9838bd5e8aaf9d", "score": "0.61039674", "text": "function evenOccurrence (arr) {\n // Write your code here, and\n // return your final answer.\n var c = 0\n \n for (var i = 0; i < arr.length; i++){\n c = 0\n //equal or not\n for(var j= 0; j< arr.length; j++){\n if (arr[j] === arr[i])\n c++\n }\n //even occ\n if (c%2 === 0){\n return arr[i]\n }\n }\n return null\n}", "title": "" }, { "docid": "bdef3556e0c9f68b771796289d91c6fb", "score": "0.6080555", "text": "function sockMerchant(n = 9, ar = [10, 20, 20, 10, 10, 30, 50, 10, 20]) {\n\t// console.log(n, ar);\n\t// console.log(quick_Sort(ar));\n\n\t// ar.sort((elem, elem2) => elem < elem2);\n\t// console.log(\n\t// \tquick_Sort(ar).reduce((acc, curr) => {\n\t// \t\treturn curr;\n\t// \t}, {})\n\t// );\n\tconst sort = quick_Sort(ar);\n\tlet lastIndex;\n\tfor (let i = 0; i < sort.length; i++) {\n\t\t// console.log(sort[i]);\n\t}\n\tlet k = sort.reduce((acc, curr) => {\n\t\tconsole.log(acc, curr, lastIndex);\n\n\t\t// if (lastIndex === curr) return acc + 1;\n\t\tconsole.log(lastIndex === curr);\n\t\tlastIndex = curr;\n\t\treturn 0;\n\t}, 0);\n\tconsole.log({ k });\n\tconsole.log({ lastIndex });\n\treturn 3;\n}", "title": "" }, { "docid": "b6a21e4c4728bfed50a5568bf8c2c077", "score": "0.60763735", "text": "function lilysHomework(arr) {\r\n\r\n const swaps = (arr, sarr) => {\r\n let [s, idx] = [0, []];\r\n arr.forEach((v,i) => idx[v] = i);\r\n for (let i = 0, j; i <100000 ; i++) {\r\n while (arr[i] === sarr[i] && i < 100000) i++;\r\n j = idx[sarr[i]];\r\n idx[arr[i]] = j;\r\n arr[i] = [ arr[j], arr[j] = arr[i] ][0];\r\n s++;\r\n }\r\n return s-1;\r\n }\r\n \r\n let asc = [...arr].sort((a,b) => a-b);\r\n let desc = [...asc].reverse();\r\n let s1 = swaps([...arr], asc);\r\n let s2 = swaps(arr, desc);\r\n\r\n return Math.min(s1, s2)\r\n\r\n}", "title": "" }, { "docid": "f2c3223123c88ea5a4c806c9033686e0", "score": "0.6073321", "text": "function findOdd(A) {\n let numbs = [];\n for (let i = 0; i < A.length; i++){\n if (!numbs.includes(A[i])){\n numbs.push(A[i])\n }\n }\n for(let z = 0; z < numbs.length; z++){\n let count = 0;\n for(let y = 0; y < A.length; y++){\n if (numbs[z] === A[y]){\n count += 1;\n }\n }\n if(count % 2 !== 0) return numbs[z]\n }\n \n}", "title": "" }, { "docid": "0fc2b568b327b78d8825ba9ef901ce39", "score": "0.6069897", "text": "function sockMerchant(n, ar) {\n let sockPairs = [];\n let pairsAmt = 0;\n for (let sock of ar) {\n if (sockPairs[sock]) {\n sockPairs[sock] = 0;\n pairsAmt++;\n } else if (!sockPairs[sock]) {\n sockPairs[sock] = 1;\n }\n }\n return pairsAmt;\n}", "title": "" }, { "docid": "92ca2948031c8f4ba1f5457ca8426285", "score": "0.6068029", "text": "function divisibleSumPairs(n, k, ar) {\n\n let numberOfPairs = 0;\n for (let i = 0; i < n ; i ++){\n\n for (let j = i+1; j < n ; j++) {\n \n \n if ((ar[i] + ar[j]) % k == 0) {\n \n numberOfPairs++\n }\n\n }\n\n }\n\n return numberOfPairs\n}", "title": "" }, { "docid": "806a49aa1c92532d061fcf85333fce55", "score": "0.6066064", "text": "function ranking(arr) {\n let result = 0;\n let hash = {};\n\n for (let i = 0; i < arr.length; i++) {\n if (hash[arr[i]]) {\n hash[arr[i]]++;\n } else {\n hash[arr[i]] = 1\n }\n }\n\n // go through the hash\n for (let key in hash) {\n if (hash[Number(key) + 1]) {\n result += hash[key];\n }\n }\n\n return result;\n}", "title": "" }, { "docid": "f254685c1662a06d7d53a4757b7bbba3", "score": "0.6057256", "text": "function CountUniqueValue4(arr){\n\tlet i = 0;\n let j = 1;\n\twhile(j<arr.length){\n\tif(arr[i] !== arr[j]){\n\t\ti++\n\t\tarr[i] = arr[j]\n\t}\n\telse{\n\t\tj++\n }\n \n\t}\n\tconsole.log(i+1);\n\t\n}", "title": "" }, { "docid": "5877ba4872fb6ec31f181b8b551bbb9a", "score": "0.6055401", "text": "function threesum(nums){\n nums=nums.sort((a,b)=>a-b);\n let result=[];\n for(let i=0;i<nums.length-2;i++){\n let left=i+1;\n let right=nums.length-1;\n while(right>left){\n let currSum=nums[i]+nums[left]+nums[right];\n if(currSum===0){\n let flag=true;\n console.log(nums[i], nums[left], nums[right]);\n for(let ar of result){\n console.log(ar)\n if(ar[0]===nums[i] && ar[1]===nums[left] && ar[2]===nums[right]) flag=false;\n }\n if(flag){\n result.push([nums[i],nums[left],nums[right]])\n }\n left++;\n right--;\n }\n else if(currSum>0)\n right--;\n else\n left++\n }\n }\n return result;\n}", "title": "" }, { "docid": "b9c3717dcba98c4491b29e3733a684e2", "score": "0.6050177", "text": "function twoPairPoints() {\n let twoP = frequency();\n var points = 0;\n var count = 0;\n for (let i = 0; i < 7; i++) {\n if (twoP[i] >= 2) {\n points += i * 2;\n count++;\n }\n }\n\n if (count == 2) {\n return points;\n } else {\n return 0;\n }\n}", "title": "" }, { "docid": "507f7ac5b7552c135a041e0ff67f1b26", "score": "0.60422486", "text": "function solution(a) {\r\n // write your code in JavaScript (Node.js 0.12)\r\n var i, l=a.length-1;\r\n var arr=[];\r\n do{ \r\n arr[a[l]-1] = a[l];\r\n \r\n l--; \r\n if(l===0)\r\n for(j=0;j<arr.length;j++)\r\n if(!arr[j])\r\n return j+1;\r\n \r\n }while(l>=0)\r\n}", "title": "" }, { "docid": "71bf30dcbc07266ee10a4a799773cb96", "score": "0.60359424", "text": "function countPairs(x){\n var totalPairs = 0;\n for(var j = 0; j < x; j++){\n if(isPair(rollDie(), rollDie()));\n totalPairs++;\n }\n }", "title": "" }, { "docid": "fd0d6af3cc04e674c281573f80c73982", "score": "0.602912", "text": "function beautifulTriplets(d, arr) {\n let total = 0;\n // record second indices of pairs that result in the beautiful value\n let secondIndices = new Array(10000).fill(0);\n\n // for every pair\n for (let i = 0; i < arr.length - 1; i++) {\n for (let j = i + 1; j < arr.length; j++) {\n // check if this pair satisfies the beautiful value\n let k = Math.abs(arr[j]) - Math.abs(arr[i]);\n if (k === d) {\n // if so, note that this pair was satisfactory\n secondIndices[j]++;\n // if this pair's first index is already recorded as a second from earlier, it's a beautiful triplet!\n if (secondIndices[i]) {\n total += secondIndices[i];\n }\n }\n }\n }\n return total;\n}", "title": "" }, { "docid": "1252d48a9f2206c1f4779782955ce99b", "score": "0.6028153", "text": "function minimumSwaps(arr) {\n console.log(arr, '=> given inputs')\n let count = 0\n let index = 1\n while(index <= arr.length) {\n let value = arr[index-1]\n if(index!==value) {\n [arr[index - 1], arr[value - 1]] = [arr[value - 1], arr[index - 1]];\n count++\n }\n else { index++ }\n }\n return count\n}", "title": "" }, { "docid": "291cf051fb305b8107ec58d3f14c0122", "score": "0.6008593", "text": "function solution(A) {\n // write your code in JavaScript (Node.js 8.9.4)\n var ret = 1;\n A = A.sort((a,b) => a - b);\n var ALength = A.length;\n for(var i = 0; i < ALength; i++){\n if(A[i]!=i+1){\n ret = 0;\n break;\n } \n }\n return ret;\n}", "title": "" }, { "docid": "949d3cb1367d87d48684bb098a8d85af", "score": "0.6000856", "text": "function divisibleSumPairs(n, k, ar) {\n let ijPairs = 0;\n\n for(let i = 0; i < n; i++){\n for (let j = i + 1; j < n; j++){\n if ( (ar[i] + ar[j])%k == 0){\n ijPairs++;\n }\n }\n }\n\n console.log(ijPairs);\n}", "title": "" }, { "docid": "afc187e288198d5c9ead48946fcb062f", "score": "0.59972554", "text": "function createPairs(arr) {\n for (let i = 0; i < arr.length; i++) {\n // O(n)\n for (let j = i + 1; j < arr.length; j++) {\n // O(n^2)\n console.log(arr[i] + \", \" + arr[j]);\n }\n }\n}", "title": "" }, { "docid": "179256374c1853a9fb179111fd392a94", "score": "0.59938896", "text": "function divisibleSumPairs(n, k, ar) {\n let count = 0;\n //console.log(count);\n for(let i = 0; i < n; i++) {\n //console.log(i);\n for(let j = i + 1 ; j < n; j++) {\n //console.log(j);\n if(((ar[i] + ar[j]) % k) === 0) {\n count++;\n //console.log(count.length);\n }\n }\n }\n return count;\n}", "title": "" }, { "docid": "5f64a3d593ce887d9c06d2875c9ef6b3", "score": "0.59861475", "text": "function beautifulTriplets(d, arr) {\n\n var count = 0;\n for(var i = 0; i < (arr.length - 2); i++ ) {\n for(var j = i+1; j < (arr.length - 1); j++) {\n if(arr[j] - arr[i] == d) {\n for(var k = j+1; k<arr.length; k++) {\n if(arr[k] - arr[j] == d) {\n count++;\n }\n }\n }\n }\n }\n return count; \n}", "title": "" }, { "docid": "02e0e0c41634963fde9fb0cbb37ae009", "score": "0.5983781", "text": "function findTriplets(arr) {\n // add whatever parameters you deem necessary - good luck!\n let count = 0;\n for (let i = 0; i < arr.length; i++) {\n let store = new Set();\n for (let j = i + 1; j < arr.length; j++) {\n let missing = -(arr[i] + arr[j]);\n if (store.has(missing)) {\n count++;\n } else {\n store.add(arr[j]);\n }\n }\n }\n return count;\n}", "title": "" }, { "docid": "0189844d409c5a6ec400fb317240cc0a", "score": "0.59743947", "text": "function findPair(array,sum){\n let first = 0; //value at zero Index\n let last = array.length-1;\n\n while(first <= last){\n\n if(array[first] + array[last] == sum){\n return [array[first],array[last]]\n }\n\n if(array[first] + array[last] < sum){\n\n first++;\n\n }\n\n if(array[first] + array[last] > sum){\n last--;\n }\n\n }\n\n return -1;\n\n}", "title": "" }, { "docid": "396e9941e151995d82192ad831258e33", "score": "0.59726864", "text": "function hasPairSumElement(arr, element) {\n if (arr.length < 2) return [-1]\n let [left, right] = [0, arr.length-1]\n while (left < right) {\n if (arr[left] + arr[right] == element) {\n return [arr[left], arr[right]]\n }\n if (arr[left] + arr[right] > element) {\n right -= 1\n } else {\n left += 1\n }\n }\n return [-1]\n}", "title": "" }, { "docid": "b79dc33ef5458cd3a8f3a7812792e58b", "score": "0.59722733", "text": "function twoNumberSum(array, targetSum) {\n const numsHashTable = {};\n for (let num of array) {\n const possibleMatch = targetSum - num;\n if (possibleMatch in numsHashTable) {\n return [possibleMatch, num]\n } else {\n numsHashTable[num] = true;\n }\n }\n return [];\n }", "title": "" }, { "docid": "223eba46a1f757bb9ba9013e435d702e", "score": "0.5968584", "text": "function three(nums, target) {\n // store count of how many times a triplet sum is less than target number\n // sort array\n // iterate through array stopping 2 numbers before end\n}", "title": "" }, { "docid": "fae28cc3cafe40f802b2942bd03cb472", "score": "0.5963556", "text": "function find_similar(amount, hand_info) {\n\tlet streak = 1; \n\n\tfor(let i = 0; i < hand_size - 1; i++) { //6 to avoid subscripting beyond the last index of the array \n\t\tif(hand_info.hand[i].rank == hand_info.hand[i+1].rank) {\n\t\t\tstreak++;\n\t\t\tif(streak == amount) {\n\t\t\t\treturn hand_info.hand[i].rank;\n\t\t\t}\n\t\t} else {\n\t\t\tstreak = 1;\n\t\t}\n\t}\n\treturn false;\n}", "title": "" }, { "docid": "9d2b82b37d280005f20d99fea9a04946", "score": "0.5951582", "text": "function findDuplicate(nums) {\n if (nums.length > 1) {\n let slow = nums[0], fast = nums[nums[0]];\n\n while (slow !== fast) {\n slow = nums[slow];\n fast = nums[nums[fast]];\n }\n\n fast = 0;\n\n while (fast !== slow) {\n slow = nums[slow];\n fast = nums[fast];\n }\n\n return slow;\n }\n\treturn -1;\n}", "title": "" }, { "docid": "cdff9cfb37d43a5747ffba41ae0168fa", "score": "0.59416586", "text": "function getRepeatedCardCombos(handCount) {\n let nPair = 0;\n let pair = [];\n let nThree = 0;\n let three;\n console.log(handCount);\n //check handcount for cards repeateds\n for (var key in handCount) {\n if (handCount.hasOwnProperty(key)) {\n var val = handCount[key];\n if (val == 2) {\n nPair++;\n pair.push(key);\n }\n if (val == 3) {\n nThree++;\n three = key;\n }\n //found poker no need more iterations\n if (val == 4)\n return [8, key];\n }\n }\n\n //sets cases\n //a pair found\n if (nPair == 1 && nThree == 0) return [2, pair];\n //two pairs (returned in order for a better comparison)\n else if (nPair == 2) {\n if (pokerUtils.order.indexOf(pair[0]) > pokerUtils.order.indexOf(pair[1])) return [3, pair];\n else return [3, [pair[1], pair[0]]];\n }\n //three of a kind \n else if (nThree == 1 && nPair == 0) return [4, three];\n //full-house\n else if (nPair == 1 && nThree == 1) return [7, [three, pair]];\n //no repeated cards\n else return false;\n}", "title": "" }, { "docid": "bc9de44e26d4dd01a55c96cadd908f6d", "score": "0.5938458", "text": "function beatifulTriplets(d, arr) {\n let tripletsAcc = 0;\n for (let i = 0; i < arr.length; i++) {\n for (let j = i + 1; j < arr.length; j++) {\n if (arr[j] - arr[i] === d) {\n for (let k = j; k < arr.length; k++) {\n if (arr[k] - arr[j] === d) {\n tripletsAcc++;\n }\n }\n }\n }\n }\n return tripletsAcc;\n}", "title": "" }, { "docid": "e91a4a8c3199f0a6d04e1b0bde305689", "score": "0.59294134", "text": "function solution(n) {\n d = new Array(30);\n l = 0;\n while (n > 0) {\n d[l] = n % 2;\n n = Math.floor(n / 2);\n l += 1;\n }\n console.log('l = ', l);\n console.log('d = ', d);\n for (p = 1; p < 1 + l; ++p) {\n ok = true;\n for (i = 0; i < l - p; ++i) {\n if (d[i] != d[i + p]) {\n ok = false;\n break;\n }\n }\n if (ok) {\n return p;\n }\n }\n return -1;\n}", "title": "" }, { "docid": "8137e823d251539a854a5a2eb9a3a6f1", "score": "0.5926895", "text": "function countUniqueValues(array) {\n let p1 = 0\n let p2 = 1\n \n for (p2; p2< array.length; p2++){\n if(array[p1] !== array[p2]){\n p1 ++\n array[p1] = array[p2]\n }\n else {\n console.log(\"undefined\")\n }\n \n }\n return p1 + 1\n }", "title": "" } ]
e06245b372110987ae5f260756cf031e
Displays a list of notes
[ { "docid": "45dbf45c724994af00be1de44e2a9e67", "score": "0.72846586", "text": "function viewNote() {\n var noteArea = $(\"#viewNote\"),\n titleArea = $(\"#title\"),\n noteData= {email: email, user: user},\n //create an array to save the notes\n noteArray = [],\n //save a handle on note being edited\n editable;\n getNotes(noteData, function () {\n var i = 0;\n $.each(notes, function (key, value){\n var ellipses = \"\";\n //choose title to display, if none, display beginning of note\n var sideTitle = value.title !== \"\" ? value.title : value.note;\n //If title is more than 20 chars, only display the first 20 with an ellipses in the sidebar\n if(sideTitle.length > 20) {\n ellipses = \"...\";\n }\n var clippedTitle = sideTitle.substring(0,20);\n $(\"#index\").append(\"<li class='list-group-item'>\" + clippedTitle + ellipses + \"</li>\");\n noteArray.push({title: value.title, text: value.note, noteID: value.noteID});\n i++;\n //If there are more than set amount notes, only display that amount with button to view more\n if(i > listLength){\n $(\"ol li:gt(\" + listLength + \")\").css( \"display\", \"none\");\n $(\"#more\").css( \"display\", \"inline-block\");\n }\n });\n $(\"#more\").click(function(){\n viewMore();\n });\n //Get the index of menu item clicked on, and display the title and note with that index\n $(\"#index li\").click(function(){\n var noteIndex = $(this).index();\n titleArea.val(noteArray[noteIndex].title.substring(0,20));\n noteArea.val(noteArray[noteIndex].text);\n //dont allow for editing or clicking \"Save Changes\" unless edit button is clicked\n noteArea.prop(\"readonly\", true);\n $(\"#saveEdit\").addClass(\"disabled\");\n editable = (noteArray[noteIndex].noteID);\n });\n //allow for editing the note\n $(\"#saveEdit\").click(function () {\n saveEdit(editable);\n });\n $(\"#edit\").click(function () {\n //Make note editable, and enable button\n noteArea.prop(\"readonly\", false);\n $(\"#saveEdit\").removeClass(\"disabled\");\n //redisplay results area hidden by fade()\n $(\"#result\").html(\"\").show();\n });\n });\n }", "title": "" } ]
[ { "docid": "d953a8e239b86f40bd973a104feb20c9", "score": "0.81485814", "text": "function listNotes(){\n\tconst notes = loadNotes();\n\tnotes.forEach((note)=>{\n\t console.log(\"<--\"+chalk.green.inverse(note.title)+\"-->\");\n\t console.log(chalk.inverse(note.body));\n\t});\n}", "title": "" }, { "docid": "f4fcda83c31f5e71185d17ef70a66af2", "score": "0.77765197", "text": "function renderNotes() {\n for (var n = 0; n < notes.length; n++) {\n var savedNotes = document.getElementById(\"savedNotes\");\n var node = document.createElement(\"li\");\n var textnode = document.createTextNode(notes[n]);\n node.appendChild(textnode);\n savedNotes.appendChild(node);\n }\n}", "title": "" }, { "docid": "4f8461fb73290e42425f4f6118c4f87c", "score": "0.7653765", "text": "function showList() {\n \n if (!!noteList.length) {\n getLastNoteId();\n for (var item in noteList) {\n var note = noteList[item];\n addNoteToList(note);\n }\n syncEvents();\n }\n \n }", "title": "" }, { "docid": "0adbf83dbcd8de941daba7d558aa7f7f", "score": "0.7577771", "text": "function displayNotes() {\r\n let notes = localStorage.getItem('notes');\r\n let objOfNotes;\r\n\r\n if (notes == null) {\r\n objOfNotes = [];\r\n }\r\n else {\r\n objOfNotes = JSON.parse(notes);\r\n }\r\n\r\n let html = \"\";\r\n\r\n objOfNotes.forEach(function (element, index) { //index is the length of the array\r\n\r\n html += `\r\n <div class=\"noteCard my-2 mx-2 card\" style=\"width: 18rem;\">\r\n <div class=\"card-body\">\r\n <h5 class=\"card-title\">${element.title}</h5>\r\n <p class=\"card-text\">${element.text}</p>\r\n <button id=\"${index}\" class=\"btn btn-primary\" onclick=\"deleteNote(this.id)\">Delete Note</button>\r\n </div>\r\n </div>\r\n `;\r\n });\r\n\r\n let notePad = document.getElementById('notes');\r\n\r\n if (objOfNotes.length != 0) {\r\n notePad.innerHTML = html;\r\n }\r\n else {\r\n notePad.innerHTML = `Nothing to show! Use \"Add a note\" above to add notes`\r\n }\r\n}", "title": "" }, { "docid": "93848fe1a8681ea0bb2b1e3c07968fb3", "score": "0.7494726", "text": "function renderAllNotes() {\n loadNotes()\n}", "title": "" }, { "docid": "20bbbb7f1044f40f0ad9d49dd7b163d0", "score": "0.74859196", "text": "function showNotes() {\n let notes = localStorage.getItem(\"notes\");\n \n if (notes == null) \n {\n notesObj = [];\n \n }\n else{\n notesObj = JSON.parse(notes);\n \n } \n \n let html = \"\";\n \n notesObj.forEach(function(element, index) {\n var sz=parseInt(element.size);\n html += `<div>\n <div class=\"noteTake\" >\n <div style=\" color: ${element.color};font-size:${sz}px\">\n Note ${index + 1} - ${element.txt}\n </div>\n <div>\n <button id=\"${index}\" onclick=\n \"editNote(this.id)\"\n type=\"button\">\n <img src=\"edit.png\" height=\"10px\" width=\"10px\">\n </button>\n <button id=\"${index}\" onclick=\n \"deleteNote(this.id)\"\n type=\"button\">\n x\n </button>\n </div>\n\n </div>\n </div>`;\n });\n \n let notesElm = document.getElementById(\"notes\");\n \n if (notesObj.length != 0) notesElm.innerHTML = html;\n else\n notesElm.innerHTML = `Nothing to show! \n Use \"Add a Note\" section above to add notes.`;\n}", "title": "" }, { "docid": "dc22acfdb39e0d55eabda207f8883b40", "score": "0.74503225", "text": "function showNotes() {\n // let notes = localStorage.getItem(\"notes\");\n let notes = [];\n if (notes == null) {\n notesObj = [];\n } else {\n notesObj = JSON.parse(notes);\n }\n let html = \"\";\n notesObj.forEach(function (element, index) {\n html += `\n <div class=\"noteCard my-2 mx-2 card\" style=\"width: 21rem; display: flex; margin: 3px;\">\n <div class=\"card-body\">\n <h6 class=\"card-title\">Note ${index + 1}</h6>\n <p class=\"card-text\" style=\"text-transform: none;\"><h5 style=\"text-transform: none;\">${element[0]}</h5></p>\n <h6 style=\"text-transform: none;\"><p>Commented By :</p>${element[1]}</h6>\n <h6 style=\"text-transform: none;\"><p>Time :</p><small>${element[3]} | ${element[4]} ${element[5]}, ${element[6]}</small></h6>\n </div>\n </div>`;\n });\n let notesElm = document.getElementById(\"notes\");\n if (notesObj.length != 0) {\n notesElm.innerHTML = html;\n } else {\n notesElm.innerHTML = `Nothing to show! Use \"Add a comment\" section above to add notes.`;\n }\n}", "title": "" }, { "docid": "86375c5f1b61edecaef5ab86e9d71172", "score": "0.74393535", "text": "function render(notes) {\n _.each(notes, function(note) {\n console.log(note);\n });\n }", "title": "" }, { "docid": "2f105c5f2b849fe4ea4afe25c007f9f5", "score": "0.739926", "text": "function loadNote(index) {\n document.getElementById('noteDisplayBox').innerHTML = noteList.getNotes()[index].getBody()\n}", "title": "" }, { "docid": "7b698722db4df28b11609a5e50ca7cfa", "score": "0.7392013", "text": "function renderNotes() {\n if (storage.length === 0) {\n notes_header.style.display = \"none\";\n searchSection.style.display = \"none\";\n } else {\n notes_header.style.display = \"block\";\n searchSection.style.display = \"block\";\n for (let i = 0; i < storage.length; i++) {\n // Get note key\n let key = storage.key(i);\n\n // get note object\n let object = storage.getItem(key);\n\n // Parse to note object\n let note = JSON.parse(object);\n\n insertNoteElement(note);\n }\n }\n}", "title": "" }, { "docid": "3cf17cf234c0a6b5f162c481190b090a", "score": "0.73771167", "text": "function showNotes() {\r\n let notes = localStorage.getItem(\"notes\");\r\n if (notes == null) {\r\n notesObj = [];\r\n } else {\r\n notesObj = JSON.parse(notes);\r\n }\r\n let html = \"\";\r\n notesObj.forEach(function(element, index) {\r\n html += `\r\n <div class=\"noteCard my-2 mx-2 card\" style=\"width: 25rem;\">\r\n <div class=\"card-body\">\r\n <h5 class=\"card-title\">Note ${index + 1}</h5>\r\n <p class=\"card-text\"> ${element}</p>\r\n <button id=\" ${index - 1 +1}\"onclick=\"deleteNote(this.id)\" class=\"btn btn-primary\">Delete note</button>\r\n </div>\r\n </div>`;\r\n\r\n });\r\n let notesElm = document.getElementById(\"notes\");\r\n if (notesObj.length != 0) {\r\n notesElm.innerHTML = html;\r\n } else {\r\n notesElm.innerHTML = `Nothing to show. Use\"Add Note\" `\r\n }\r\n}", "title": "" }, { "docid": "44c2c6cdf4f3210429098e515ae038ce", "score": "0.7359708", "text": "function showNotes() {\n let notes = localStorage.getItem('notes');\n if (notes == null) {\n notesObj = [];\n } else {\n notesObj = JSON.parse(notes);\n }\n\n let html = \"\";\n notesObj.forEach(function(element, index) {\n html += `\n <div class=\"list-notes\">\n <span class=\"notes-id\">Note ${index + 1}</span>\n <span class=\"notes-title\">${element.title}</span>\n <span class=\"text-notes\">${element.text}</span>\n <button id=\"${index}\"\" onclick=\"editNote(this.id)\" class=\"button-action btn-edit\" type=\"button\">Edit</button>\n <button id=\"${index}\" onclick=\"deleteNote(this.id)\" class=\"button-action btn-hapus\" type=\"button\">Hapus</button>\n </div>\n `;\n });\n\n let notesElement = document.getElementById('notes');\n if (notesObj.length != 0) {\n notesElement.innerHTML = html;\n } else {\n notesElement.innerHTML = \"No Notes , add your notes \";\n }\n}", "title": "" }, { "docid": "1440c73eee87cd4d192680c0db7c4e1c", "score": "0.7335012", "text": "function showNotes() {\n let notes = localStorage.getItem(\"notes\");\n if (notes == null) {\n add2 = [];\n } else {\n add2 = JSON.parse(notes);\n }\n let html = \"\";\n add2.forEach(function(element, index) {\n html += `\n <div class=\"noteCard my-2 mx-2 card\" style=\"width: 18rem;\">\n <div class=\"card-body\">\n <h5 class=\"card-title\">Note ${index + 1}</h5>\n <p class=\"card-text\"> ${element}</p>\n <button id=\"${index}\"onclick=\"deleteNote(this.id)\" class=\"btn btn-primary\">Delete Note</button>\n </div>\n </div>`;\n });\n let notesElm = document.getElementById(\"notes\");\n if (add2.length != 0) {\n notesElm.innerHTML = html;\n } else {\n notesElm.innerHTML = `Nothing to show!! Use \"Add Note\" section to add notes.`;\n }\n}", "title": "" }, { "docid": "601ec5cf70afe1f41cc400864a0bc6ed", "score": "0.7288028", "text": "function showNotes() {\n debug && console.log( \"EquipmentDetail.showNotes: Displaying equipment notes.\");\n var title = Localization.getText( \"equipmentNotes\" );\n if( equipment.notes ) {\n var equipmentNotes = equipment.notes.replace( /&#10;/g, \"\\n\" );\n Dialog.showScrollableDialog( title, equipmentNotes );\n } else {\n Dialog.showAlert( title, Localization.getText( \"noEquipmentNotes\" ) );\n }\n }", "title": "" }, { "docid": "fe686517dd8ec0d003150f82d2fcf7f8", "score": "0.7280552", "text": "async function loadAndDisplayNotes() {\n console.log(\"running loadAndDisplayNotes...\");\n const notes = await fetch(\"/api/notes\").then((r) => r.json());\n\n const el_noteList = document.querySelector(\"#noteList\");\n\n // clear the list\n el_noteList.innerHTML = \"\";\n\n if (notes.length === 0) {\n el_noteList.innerHTML = `<li class='list-group-item'><span>No save Notes</span></li>`;\n return;\n }\n\n notes.forEach((note) => {\n console.log(\"Serving HTML note\");\n el_noteList.innerHTML += `\n <li onClick=\"handleShowNote(event)\" id='${note.id}' data-title=\"${note.title}\" data-text=\"${note.text}\" class='list-group-item'><span>${note.title}</span>\n <small onClick=\"handleNoteDelete(event,'${note.id}')\" class='badge bg-secondary float-right'><i class='fas fa-trash-alt icon-resize-small'></i></small>\n `;\n });\n}", "title": "" }, { "docid": "29b135e1719d8f1d87dda9f6d9cda4fa", "score": "0.7271135", "text": "function showNotes() {\r\n let nts = localStorage.getItem(\"notes\");\r\n if (nts === null) {\r\n //Try changing the name of the arrays\r\n totaln = [];\r\n } else {\r\n totaln = JSON.parse(nts);\r\n }\r\n let html = \"\";\r\n //Try using For loop\r\n for (let i = 0; i < totaln.length; i++) {\r\n html += `\r\n <div class=\"card allNotes col-md-3\">\r\n <div class=\"card-body\">\r\n <h5 class=\"card-title\" id=\"title${i}\">${totaln[i].title}</h5> \r\n <p class=\"card-text\" id=\"body${i}\">${totaln[i].body}</p>\r\n <a class=\"btn btn-primary btn-sm\" id=\"ed${i}\" onclick=\"editNote(this.id)\" style=\"text-align: center;color:white;\">Edit</a>\r\n <a class=\"btn btn-primary btn-sm\" id=\"${i}\" onclick=\"deleteNote(this.id)\" style=\"text-align: center;color:white;\">Delete</a>\r\n </div>\r\n </div>`;\r\n }\r\n let newele = document.querySelector(\"#notesDisplayed\");\r\n if (totaln.length != 0) {\r\n newele.innerHTML = html;\r\n } else newele.innerHTML = `<h4>No new notes to be displayed!</h4>`;\r\n \r\n}", "title": "" }, { "docid": "23f5e435ec66b62312c0acbd50001039", "score": "0.72338057", "text": "function showNotes() {\n let notes = localStorage.getItem(\"notes\");\n if (notes == null) {\n notesObj = [];\n }\n else {\n notesObj = JSON.parse(notes)\n }\n let html = \"\";\n notesObj.forEach(function (element, index) {\n html += `<div class=\"card my-2 mx-2 noteCard\" style=\"width: 18rem;\">\n <div class=\"card-body\">\n <h5 class=\"card-title\">Note ${index + 1}</h5>\n <p class=\"card-text\">${element}</p>\n <button id=\"${index}\"onclick=\"deleteNote(this.id)\" class=\"btn btn-primary\">Delete Note</button>\n </div>\n </div>`;\n });\n let notesElm = document.getElementById('notes');\n if (notesObj.length != 0) {\n notesElm.innerHTML = html;\n }\n else {\n notesElm.innerHTML = `Nothing to Show please \"Add Note\" first`\n }\n}", "title": "" }, { "docid": "60dda589e74d0294d3b51a7b52c09323", "score": "0.72119796", "text": "listAllNotes() {\n if(this.notes.length > 0) {\n console.log('Total notes are '+this.notes.length);\n for(let count = 0; count < this.notes.length; count++) {\n if(this.notes[count] !== undefined) {\n console.log('Note ID: '\n +this.notes[count].noteid+'\\n'\n +this.notes[count].noteContent\n +'\\nBy Author '\n +this.notes[count].author+'\\n');\n }\n }\n }else{\n console.log('No note to list yet');\n }\n }", "title": "" }, { "docid": "4d9ee66c0cd9a1437965b00da5737673", "score": "0.718864", "text": "function showNotes() {\n let notes = localStorage.getItem(\"notes\");\n if (notes == null) {\n notesObj = [];\n } else {\n notesObj = JSON.parse(notes);\n }\n let html = \"\";\n notesObj.forEach(function(element, index) {\n html += `\n <div class=\"noteCard border-5 card m-2\" style=\"width: 18rem;border-radius: 40px 8px; \">\n <div class=\"card-body bg-transparent\" >\n <h5 class=\"card-title text-center\" contentEditable = \"true\">Note ${index + 1}</h5><hr>\n <p class=\"card-text p-2\" contentEditable = \"true\">${element}</p>\n <button id=\"${index}\" onClick=\"deleteNote(this.id)\" class=\"btn btn-primary d-inline-flex justify-content-center align-self-center\">Delete Note</button>\n </div>\n </div>\n `;\n });\n let notesElm = document.getElementById(\"notes\");\n if (notesObj.length != 0) {\n notesElm.innerHTML = html;\n } else {\n notesElm.innerHTML = `Nothing to show!`;\n }\n}", "title": "" }, { "docid": "fae37371f8b4a6d4799517f7221fa2cc", "score": "0.7158205", "text": "function showNotes() {\n let notes = localStorage.getItem('notes');\n if (notes === null) {\n notesObj = [];\n }\n else {\n notesObj = JSON.parse(notes);\n }\n\n let html = \"\";\n notesObj.forEach(function (element, index) {\n html += ` <div class=\"noteCard card my-2 mx-2\" style=\"width: 18rem;\">\n <div class=\"card-body\">\n <h5 class=\"card-title\"> ${element.title}</h5>\n <p class=\"card-text\"> Note :- ${element.text}.</p>\n <button id=\"${index}\" onclick=\"deleteNote(this.id)\" class=\"btn btn-danger\">Delete Note</button>\n </div>\n </div>`\n\n });\n let notesElm = document.getElementById('notes');\n if (notesObj.length != 0) {\n notesElm.innerHTML = html;\n }\n else {\n notesElm.innerHTML = `<h3>Nothing to show!! Use above \"Add a Note\" button to add a note here.</h3> `;\n }\n\n}", "title": "" }, { "docid": "ac863de05bf0546647bc8d7e4986ae2f", "score": "0.71547574", "text": "function showNotes() {\r\n let notes = localStorage.getItem(\"notes\");\r\n if (notes == null) {\r\n notesObj = [];\r\n }\r\n else {\r\n notesObj = JSON.parse(notes);\r\n }\r\n let html = \"\";\r\n notesObj.forEach(function (element, index) {\r\n html += `<div class=\" noteCard my-2 mx-2 card\" style=\"width: 18rem;\">\r\n <div class=\"card-body\">\r\n <h5 class=\"card-title\">note${index + 1}</h5>\r\n <p class=\"card-text\">${element}</p>\r\n <button id=\"${index}\"onclick=deleteNote(this.id) >delete me</button>\r\n </div>\r\n </div>`;\r\n });\r\n let notesElm = document.getElementById(`notes`);\r\n if (notesObj.length != 0) {\r\n notesElm.innerHTML = html;\r\n }\r\n else{\r\n notesElm.innerHTML=`nothing to show here`\r\n }\r\n}", "title": "" }, { "docid": "54f5f70d55f6a9ccf0394b758641f9ff", "score": "0.7146154", "text": "function renderNotes() {\n const notes = getFromStorage()\n const inputs = Object.values(notes).map(values => {\n const { taskInput, dateInput, timeInput, id } = values;\n return generateNoteElement({ taskInput, dateInput, timeInput }, id)\n });\n inputs.forEach(element => document.getElementById('notes-container').appendChild(element))\n}", "title": "" }, { "docid": "bda7494238addcc09cb05a9fe5ec8153", "score": "0.71324456", "text": "function showNotes() {\r\n let notes = localStorage.getItem(\"notes\");\r\n if (notes == null) {\r\n notesObj = [];\r\n } else {\r\n notesObj = JSON.parse(notes);\r\n }\r\n let html = \"\";\r\n notesObj.forEach(function(element, index) {\r\n html += `<div class=\"noteCard my-2 mx-2 card\" style=\"width: 18rem;\">\r\n <div class=\"card-body\">\r\n <h5 class=\"card-title\">${element.title}</h5>\r\n <p class =\"card-text\">${element.text}</p>\r\n <button id=\"${index}\" onclick=\"deleteNote(this.id)\"class=\"btn btn-primary\">Delete Note</button>\r\n </div>\r\n </div>`;\r\n });\r\n let notesElm = document.getElementById('notes');\r\n if (notesObj.length != 0) {\r\n\r\n notesElm.innerHTML = html;\r\n } else {\r\n notesElm.innerHTML = `<h3> Add Your Notes</h3>`;\r\n }\r\n}", "title": "" }, { "docid": "8511b42eb99f1de65a4c2481adb4a36b", "score": "0.71244836", "text": "function listNotes() {\n fetch(url)\n .then((res) => res.json())\n .then((data) => {\n for (let item of data) {\n renderNoteItem(item);\n }\n });\n}", "title": "" }, { "docid": "533ab7a93b99a9aaa6dafbc07c67cb15", "score": "0.7115199", "text": "function renderNotes() {\n if (notesData.category.length) {\n for (a = 0; a < notesData.category.length; a++) {\n noteIdData.push(\"n\" + notesCounter);\n addNote(notesData.titte[a], notesData.text[a], notesData.category[a]);\n\n }\n }\n}", "title": "" }, { "docid": "91e59c21f71038ec5aab6aadd2bf7b3e", "score": "0.7111092", "text": "function showNotes() {\n let notes = localStorage.getItem(\"notes\");\n if (notes == null) {\n notesObj = [];\n }\n else {\n notesObj = JSON.parse(notes);\n }\n let html = \"\";\n notesObj.forEach(function (element, index) {\n html += `<div class=\"noteCard card mx-3 my-3\" style=\"width: 20.5rem;\">\n <div class=\"card-body\">\n <h5 class=\"card-title\">${element.title}</h5>\n <p class=\"card-text\">${element.text}</p>\n <button id=\"${index}\" onclick=\"deleteNote(this.id)\" class=\"btn btn-primary\">Delete</button>\n </div>\n </div>`;\n })\n let notesElement = document.getElementById(\"notes\");\n if(notesObj.length != 0){\n notesElement.innerHTML = html;\n }\n else{\n notesElement.innerHTML = `You don't have any note. Use \"Add a note\" section above to add the notes.`; \n }\n\n}", "title": "" }, { "docid": "4a09a8e525e0a9829f1101220b42f410", "score": "0.7104811", "text": "function shownNotes() {\n let notes = localStorage.getItem(\"notes\");\n if (notes == null) {\n notesObj = [];\n }\n else {\n notesObj = JSON.parse(notes);//converts the strings into array\n }\n let html = '';\n notesObj.forEach(function (element, index) {\n //+= ka mtlb append hota jayega\n html += `\n <div class=\"noteCard my-2 mx-2\" style=\"width: 18rem;\">\n <div class=\"card-body\">\n <h5 class=\"card-title\">Note${index+1}:${element.title}</h5>\n <p class=\"card-text\">${element.text}</p>\n <button id=\"${index}\" onclick = \"deleteNote(this.id)\" class=\"btn btn-primary\">Delete Note</button>\n </div>\n </div>\n `;\n });\n let notesEln = document.getElementById('notes');\n if (notesObj.length != 0) {\n notesEln.innerHTML = html;\n }\n else {\n notesEln.innerHTML = \"Nothing to show here WOOOHOOO \"\n }\n}", "title": "" }, { "docid": "190cf28448e0b456f4e73548b62be876", "score": "0.7071815", "text": "function showNotes() {\r\n let notes = localStorage.getItem(\"notes\");\r\n if (notes == null) {\r\n notesObj = [];\r\n } else {\r\n notesObj = JSON.parse(notes);\r\n }\r\n let html = \"\";\r\n notesObj.forEach(function(element, index) {\r\n html += `\r\n <div class=\"noteCard my-2 mx-2 card\" style=\"width: 18rem;\">\r\n <div class=\"card-body\">\r\n <h5 class=\"card-title\">${element.title}</h5>\r\n <p class=\"card-text\"> ${element.text}</p>\r\n <button id=\"${index}\"onclick=\"deleteNote(this.id)\" class=\"btn btn-primary\">Delete Task</button>\r\n </div>\r\n </div>`;\r\n });\r\n let notesElm = document.getElementById(\"notes\");\r\n if (notesObj.length != 0) {\r\n notesElm.innerHTML = html;\r\n } else {\r\n notesElm.innerHTML = `<h4>Hey Buddy ,You Don't have anything to Do !!!</h4>`;\r\n }\r\n}", "title": "" }, { "docid": "99b9d02171193af9bad19d8f0579a2ea", "score": "0.7054583", "text": "function allNotes() {\n}", "title": "" }, { "docid": "a7a331a476ff02c6dbb124f0f4d1df32", "score": "0.7005751", "text": "function viewSingleNote(notelist) {\n var id = window.location.hash.split(\"#\")[1];\n var note = controller.noteList.getNoteById(parseInt(id));\n changeHTML(note)\n}", "title": "" }, { "docid": "96e91b5d3740a4a9c451e35a0090330a", "score": "0.699567", "text": "function showNotes() {\n let notes = localStorage.getItem(\"notes\");\n if (notes == null) {\n // console.alert(\"NO\");\n notesObj = [];\n }\n else {\n notesObj = JSON.parse(notes);\n }\n let html = \"\";\n notesObj.forEach(function (element, index) {\n html += `\n <div class=\"noteCard my-2 mx-2 card\" style=\"width: 18rem;\">\n <div class=\"card-body\">\n <div>\n <div class=\"tooltip\">\n <span class=\"tooltiptext\">Mark as imp</span>\n </div>\n <h5 class=\"card-title\">${element.title}</h5> \n </div>\n <p class=\"card-text\">${element.text}</p>\n <button id = \"${index}\" onclick=\"deleteNote(this.id)\" class=\"btn btn-primary\" style=\"background-color:rgb(138, 90, 90); border:1px solid rgb(138, 90, 90);\">Delete Note</button>\n </div> \n </div>\n `;\n });\n let notesElm = document.getElementById('notes');\n if (notesObj.length != 0) {\n notesElm.innerHTML = html;\n }\n else {\n notesElm.innerHTML = `Nothing to show ! use\"Add a Note\" section above to add notes`;\n }\n}", "title": "" }, { "docid": "32adeca5d4b428f3761745d143289e66", "score": "0.6995297", "text": "function showNotes()\n{\n let notes = localStorage.getItem(\"notes\");\n if(notes == null)\n {\n notesobj = [];\n }\n else{\n notesobj = JSON.parse(notes);\n }\n let html = \"\";\n notesobj.forEach(function(element, index) {\n html += `\n <div class=\"card my-2 mx-2\" style=\"width: 18rem;\">\n <div class=\"card-body\">\n <h5 class=\"card-title\">Note ${index + 1}</h5>\n <p class = \"card-Text\">${element}</p>\n <button id=\"${index}\" onclick = \"deleteNote(this.id)\" class=\"btn btn-primary\"> Delete Note</button>\n </div>\n </div> `; \n });\n\n let notesElem = document.getElementById(\"notes\");\n if(notesobj.length != 0)\n {\n notesElem.innerHTML = html;\n }\n else{\n notesElem.innerHTML = `Nothing have to shown . Use add note block to add your note`;\n }\n}", "title": "" }, { "docid": "ea298b7016a89e071d22ac4b13b53aed", "score": "0.6942548", "text": "index (req, res) {\n Note.find({}, (err, notes) => {\n if (err) throw err;\n console.log(notes);\n res.render('notes-index', {notes: notes});\n });\n }", "title": "" }, { "docid": "fc734f22fce4009073d0647f26e0fd4c", "score": "0.6931747", "text": "function shownotes()\n{\n let notes=localStorage.getItem(\"notes\");\n if(notes ==null)\n {\n notesarray=[];\n }\n else\n {\n notesarray=JSON.parse(notes); \n }\n let html=\"\";\n notesarray.forEach((element,index)=>{\n html+=`<div class=\"noteCard card m-2\" style=\"width: 15rem; color:black\">\n <div class=\"card-body\">\n <h5 class=\"card-title\">${element.title}</h5>\n <p class=\"card-text\">${element.description}</p>\n <button id=${index} type=\"button\" onclick=\"deleteNotes(this.id)\" class=\"btn btn-primary\">Delet Note</a>\n </div>\n </div>`;\n });\n let notesElm=document.getElementById(\"notes\");\n if(notesarray.length != 0)\n {\n notesElm.innerHTML=html;\n }\n else\n {\n notesElm.innerHTML=`Nothing to show you! add notes using above section`;\n }\n\n}", "title": "" }, { "docid": "24a8abaad9beb91704f5ad0dcd69ff08", "score": "0.6925011", "text": "function showNotes() {\n let notes = localStorage.getItem(\"notes\");\n let notesObj;\n if (notes == null) {\n notesObj = [];\n }\n else {\n notesObj = JSON.parse(notes);\n }\n\n let html = \"\";\n\n notesObj.forEach(function (element, index) {\n html += `\n <div class=\"col-sm my-2 mx-2\">\n <div class=\"card noteCard\" style=\"width: 18rem;\">\n <div class=\"card-body\">\n <h5 class=\"card-title\">${element.title} </h5>\n <hr class=\"bg-dark\">\n <p class=\"card-text\">${element.txt}</p>\n <button onclick=\"deleteNotes(this.id);\" class=\"btn btn-primary\" id = \"${index}\">Delete Note</button>\n </div>\n </div>\n </div> `\n });\n \n let myNotes = document.getElementById('notes');\n\n if(notesObj.length != 0){\n myNotes.innerHTML = html;\n }\n else{\n myNotes.innerHTML = `<h3 class = \"text-warning mx-auto\" style = \"text-align:center;\">Nothing to show here , please add your notes!</h3>`\n }\n\n}", "title": "" }, { "docid": "e2185155a68230c50d62a07cf080bc2a", "score": "0.69219905", "text": "function renderNotes(notes) {\n notesContainer.empty();\n var asc;\n\n var orderBy = $('#notesOrder').val() === \"created\" ? 'createdAt' : 'updatedAt';\n\n // This is statement only applies if the \"newest to oldest\" filtering feature is turned on\n if ($('#notesOrderDirection').val()) {\n asc = $('#notesOrderDirection').val() === \"asc\";\n } else {\n asc = orderBy === 'updatedAt'; \n }\n\n var searchTerm = notesSearchFilter.val().toLowerCase();\n\n var filteredNotes = notes.filter(function (note) {\n return searchTerm ? note.noteText.toLowerCase().indexOf(searchTerm) > -1 : true;\n });\n\n var filteredNotes = filteredNotes.sort(function (note1, note2) {\n return asc ? note1[orderBy] > note2[orderBy] : note1[orderBy] < note2[orderBy];\n });\n\n var i;\n for (i = 0; i < filteredNotes.length; i++) {\n addNote(filteredNotes[i]);\n }\n }", "title": "" }, { "docid": "a8b2f9155ef8fac738f6332de277a186", "score": "0.6921464", "text": "renderNotes() {\n // Add the notepad html to the appropriate div\n document.getElementById('notepad-display').innerHTML = this.toHTML();\n // Add event listener to each note to allow editing\n var noteElements = document.getElementsByClassName('displaycard-note');\n for (const noteElement of noteElements) {\n noteElement.addEventListener('click',\n (e) => this.createEditNoteScreen(this._notes[parseInt(noteElement.id)]),\n false);\n }\n }", "title": "" }, { "docid": "ae7bb5b61f3899783f0e65573c993bd6", "score": "0.69026965", "text": "function showNotes() {\n let notes = localStorage.getItem(\"notes\");\n if (notes == null) {\n notesObj = [];\n }\n else {\n notesObj = JSON.parse(notes);\n }\n let txt = \"\";\n notesObj.forEach(function (element, index) {\n txt += `\n <div class=\"notecard my-2 mx-2 card\" style=\"width: 18rem;\">\n <div class=\"card-body\">\n <h5 class=\"card-title\">Note ${index + 1}</h5>\n <p class=\"card-text\">${element}</p>\n <button id=\"${index}\" onclick = \"DeleteNote(this.id)\" class=\"btn btn-primary\"><i class=\"fas fa-trash\"></i></button>\n </div>\n </div>\n `;\n \n \n\n });\n let notesele = document.getElementById('notes');\n if (notesObj.length != 0) {\n notesele.innerHTML = txt;\n }\n else {\n notesele.innerHTML = ` Nothing to show you \"Add notes \"`;\n }\n}", "title": "" }, { "docid": "fced20b4c8984ced866ad16762cacad1", "score": "0.69000065", "text": "function shownotes(){\n let notes = localStorage.getItem('notes')\n if(notes===null){\n notesObj=[]\n }else{\n notesObj= JSON.parse(notes)\n }\n let html = ''\n notesObj.forEach((element,index) => {\n \n html +=`<div class=\"noteCard my-2 mx-2 card\" style=\"width: 18rem;\">\n <div class=\"card-body\">\n <h5 class=\"card-title\">${index+1}) ${element.title}</h5>\n <p class=\"card-text\">${element.mytext}</p>\n \n <button id=${index} onclick=deleteNotes(this.index) class=\"btn btn-danger\">Delete</button>\n \n </div>\n </div>`\n\n });\n let noteselm = document.querySelector('#notes')\n if(notesObj.length!=0){\n noteselm.innerHTML=html;\n\n }else{\n noteselm.innerHTML = `Nothing to show here. Please Add a note`\n }\n}", "title": "" }, { "docid": "683531762a8f0ba7a6deeb2b7ef1bfc1", "score": "0.689043", "text": "function showNotes()\n{\n let notes = localStorage.getItem(\"notes\"); // 'notes' is variable which GET ITEMS stored in LOCAL STORAGE from the class 'notes' so that we can display it under YOUR NOTES\n if (notes == null)\n {\n notesObj = [];\n } // If notes are NULL 'notesObj' is an array will be shown as NULL\n else\n {\n notesObj = JSON.parse(notes);\n } // If notes are NOT NULL then then the array 'notesObj' will be show us in the OBJECT format of 'notes' by using 'JSON.parse(notes)'\n\n // Basicaly if there are any notes it'd be stored inside the array 'notesObj' in the form of OBJECT\n\n let html = \"\" ; //The reason for this line i.e to let 'html' = \"\" is to define it as STRING otherwise it will remain as UNDEFINED\n //console.log(typeof(html));\n\n /*\n forEach is loop just like 'for' loop.\n In this loop the compilier goes to every element and do the work for every element as commanded and then exit the loop after the elements finish.\n Syntax:\n array_name.forEach(function(element,index)\n {\n\n });\n element & index are just variable but as the name suggest the working is same\n element refers to the value of that array \n index refers to the index-number of that array element\n */\n\n notesObj.forEach(function (note,index) \n {\n /*\n 'html=html+' is used beacuse after storing one note in 'html' the 'html' variable has an increment and stores the next note.\n If only 'html=' has been used then there will be no incrementation. \n Thus after storing the first value when we store the second value the second value/note would have taken place of the first note.\n And only the most recent note will be shown ONLY with index number + 1.\n */\n html = html+ `\n <div id=\"notes\" class=\"row noteBody\" style=\"margin-left: 20px;\">\n <div class=\"noteAdd\">\n <div class=\"noteCard\">\n <h5>Note ${index +1}</h5> \n <p>\n ${note}\n </p>\n <button class=\"noteBtn\" id=\"${index}\" onclick=\"deleteNote(this.id)\">Delete Note</button>\n </div>\n </div>\n `\n // `` is used to put value in the variable like these\n //${indix+1} -> refers to 'index of that array + 1' i.e. index_number+1\n //${note} -> refers to the value of the array i.e. the notes added in the array 'notesObj' by inputed by the user in the 'addTxt' box\n\n /*\n id=\"${index}\" onclick=\"deleteNote(this.id)\" -> \n The ID of this element will be its on very index by 'id=\"${index}\"'\n The function 'deleteNote' used for 'onclick' has the argument as \"this.id\" which will get the ID of that very HTML element and the ID of that element is its index.\n */\n\n //console.log(element);\n //console.log(index);\n });\n\n let notesElm = document.getElementById('notes'); // var 'notesElm' is used to get access to the HTML Element with ID 'notes' \n let notess = document.getElementById('addTxt');\n if(notesObj.length!=0)\n {\n notesElm.innerHTML=html;\n /*\n .innerHTML adds the writen context to the HTML element thus gets printed on the webpage\n Syntax :\n var_name(which is assigned to the value of that HTML element in that HTML element in which the update will happen).innerHTML = some variable like above we used 'html'\n var_name => notesElm\n the HTML element => notes\n update happen in the HTML element is => notes \n */\n }\n else\n {\n notesElm.innerHTML = `ɴᴏ ɴᴏᴛᴇs ᴀʀᴇ ᴀᴅᴅᴇᴅ, ᴛᴏ ᴀᴅᴅ ᴀ ɴᴏᴛᴇ ᴡʀɪᴛᴇ ɪɴ ᴛʜᴇ ᴀʙᴏᴠᴇ sᴇᴄᴛɪᴏɴ ᴀɴᴅ ᴄʟɪᴄᴋ ᴏɴ \"ᴀᴅᴅ ɴᴏᴛᴇ\" ʙᴜᴛᴛᴏɴ.`;\n /*\n .innerHTML adds the writen context to the HTML element thus gets printed on the webpage\n Syntax :\n var_name(which is assigned to the value of that HTML element in that HTML element in which the update will happen).innerHTML = some text in `` \n var_name => notesElm\n the HTML element => notes\n update happen in the HTML element is => notes\n */\n }\n}", "title": "" }, { "docid": "4a729bad59583809bd49d0ec6c1a75af", "score": "0.68684214", "text": "function displayNotes(tx,results) {\r\n\t\tvar data = convertResults(results);\r\n\t\tif(data.length === 0) {\r\n\t\t\t$(\"#noteTable\").hide();\r\n\t\t\t$(\"#status\").html(\"<p>You do not have any notes currently.</p>\");\r\n\t\t} else {\r\n\t\t\t$(\"#status\").html(\"\");\r\n\t\t\t$(\"#noteTable\").show();\r\n\t\t\tvar s = \"\";\r\n\t\t\tfor(var i=0;i<data.length;i++) {\r\n\t\t\t\tvar d = new Date();\r\n\t\t\t\td.setTime(data[i].updated);\r\n\t\t\t\ts+= \"<tr data-id='\"+data[i].id+\"'><td><a class='noteRecord'>\"+(data[i].title?data[i].title:\"No title\")+\"</a></td><td>\"+d.toDateString() + \" \"+d.toTimeString()+\"</td>\";\r\n\t\t\t\ts+= \"<td><img class='noteEdit' src='page_edit.png' title='Edit'> <img class='noteDelete' src='page_delete.png' title='Delete'></td>\";\r\n\t\t\t\ts+= \"</tr>\";\r\n\t\t\t}\r\n\t\t\t$(\"#noteTable tbody\").html(s);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "8ce9995bcb627d1f959c1048c9df6a93", "score": "0.6866878", "text": "function viewNotes() {\n getTicketDetails(\n function (ticketData) {\n client.interface.trigger(\"showModal\", {\n title: \"Notes of ticket\",\n template: \"./modal/modal.html\",\n data: ticketData.ticket,\n });\n },\n function (error) {\n console.error(error);\n }\n );\n}", "title": "" }, { "docid": "0a201a6d17794222f4d32e9cd3613d56", "score": "0.68373954", "text": "function showHNotes(){\n let notes = localStorage.getItem('notes');\n let notesObj = [];\n let notesElem = document.getElementById('notes');\n\n if(notes != null || notes == '[]'){\n notesObj = JSON.parse(notes);\n }\n else{\n let noNotes = `<p>You do not have any HNote saved now.<p>`;\n notesElem.innerHTML = noNotes;\n }\n\n let html = '';\n\n notesObj.forEach(function(elem, i){\n thisNoteObj = JSON.parse(elem);\n title = thisNoteObj.noteTitle;\n description = thisNoteObj.noteDesc;\n descriptions = description.split('\\n');\n p_s = ``;\n descriptions.forEach((d) => {\n p_s += `<p style=\"margin: 0px;\" class=\"card-text\">${d}</p>`;\n })\n\n html += `\n <div class=\"noteCard card my-3 mx-2\" style=\"width: 18rem;\">\n <div class=\"card-body\">\n <h5 class=\"card-title\">${title}</h5>\n ${p_s}\n <button style=\"margin-top: 10px;\" id=\"${i}\" onclick=\"deleteHNote(this.id)\" class=\"btn delBtn btn-primary\">Delete HNote</button>\n </div>\n </div>\n `;\n });\n\n \n if(notesObj.length != 0){\n notesElem.innerHTML = html;\n }\n}", "title": "" }, { "docid": "94c3376aea094fa23b26510e169603ac", "score": "0.68267006", "text": "function getmoreInfo(notes) {\n notes_list.innerHTML += \"<li> \" + notes + \"</li>\";\n}", "title": "" }, { "docid": "c0bc9cb693aee183e7077df83c81b871", "score": "0.6816551", "text": "function displayNoteList(func = () => true) { // Pass argument or else true\n\tlet allNotes = getAllNotes();\n\tallNotes.sort(compareTime); // sorting them by last edited\n\tlet container = document.getElementById(\"clickNoteList\");\n\tcontainer.innerHTML = \"\";\n\n\t// Create content for each saved note\n\tallNotes.filter((n) => func(n)).forEach((obj) => { \n\t\tlet newArticle = document.createElement(\"article\");\n\t\tlet title = document.createElement(\"h4\");\n\t\tlet date = document.createElement(\"p\");\n\t\tlet iconDiv = document.createElement(\"div\");\n\t\tlet favIcon = document.createElement(\"i\");\n\t\tlet deleteIcon = document.createElement(\"i\");\n\t\t\n\t\ticonDiv.classList.add(\"noteListIconDiv\");\n\t\tfavIcon.classList.add(\"far\");\n\t\tfavIcon.classList.add(\"fa-star\");\n\t\tdeleteIcon.classList.add(\"deleteIcon\");\n\n\t\tif (obj.fav){\n\t\t\tfavIcon.classList.add(\"fas\");\n\t\t}\n\t\t// Checking for current obj in list to display focused\n\t\tif(obj.current){\n\t\t\tnewArticle.classList.add(\"current-style\");\n\t\t}else{\n\t\t\tnewArticle.classList.remove(\"current-style\");\n\t\t}\n\t\tlet noteTitle = obj.title;\n\n\t\tif (noteTitle.length > 17) {\n\t\t\tnoteTitle = obj.title.substring(0, 17) + \"...\"; // Only show first 17 characters of title in note list\n\t\t}\n\t\tif (noteTitle == \"\") { // If user hasn't written a title\n\t\t\tnoteTitle = \"NY ANTECKNING\";\n\t\t\tobj.title = \"NY ANTECKNING\";\n\t\t}\n\n\t\tdeleteIcon.innerHTML = \"&#x2718\";\n\t\ttitle.innerHTML = noteTitle;\n\t\tdate.innerHTML = `${obj.dateTime}`;\n\t\tnewArticle.id = `${obj.id}`;\n\t\ticonDiv.appendChild(deleteIcon);\n\t\ticonDiv.appendChild(favIcon);\n\t\tnewArticle.appendChild(iconDiv);\n\t\tnewArticle.appendChild(title);\n\t\tnewArticle.appendChild(date);\n\t\tcontainer.appendChild(newArticle);\n\t});\n}", "title": "" }, { "docid": "5c08428c326d949f189d8ba5f38c2ceb", "score": "0.6816529", "text": "function displayData() {\n // removing items from list to avoid repetition\n while (list.firstChild) {\n list.removeChild(list.firstChild);\n }\n\n // read data from database to populate the list\n // create a transaction to read data from db\n let objectStore = db.transaction(\"notes\").objectStore(\"notes\");\n objectStore.openCursor().onsuccess = function (e) {\n let cursor = e.target.result;\n // we need cursor to read data\n if (cursor) {\n let listItem = document.createElement(\"li\");\n let note = document.createElement(\"p\");\n\n listItem.appendChild(note);\n list.appendChild(listItem);\n\n note.textContent = cursor.value.note;\n\n listItem.setAttribute(\"data-note-id\", cursor.value.id);\n\n // add delete button for each list item\n let deleteButton = document.createElement(\"button\");\n listItem.appendChild(deleteButton);\n deleteButton.textContent = \"Delete\";\n\n deleteButton.onclick = deleteItem;\n\n cursor.continue();\n } else {\n if (!list.firstChild) {\n let listItem = document.createElement(\"li\");\n listItem.textContent = \"Add your favourite food\";\n list.appendChild(listItem);\n }\n }\n console.log(\"notes displayed!!!\");\n };\n }", "title": "" }, { "docid": "aebdbb5e07c423884a72fbabca86800f", "score": "0.6794343", "text": "function showNotes() {\n let notes = localStorage.getItem(\"notes\");\n //if local storage is null \n if (notes == null) {\n //notes object array\n notesObj = [];\n }\n else {\n\n notesObj = JSON.parse(notes);\n }\n // declearing a html blank string\n let html = \"\";\n //\n notesObj.forEach(function (element, index) {\n // append the blank string html and add this div to html\n html += `\n <div class=\"card my-2 mx-2 noteCard\" style=\"width: 18rem;\">\n <div class=\"card-body\">\n <h5 class=\"card-title\">Note ${index + 1}</h5>\n <p class=\"card-text\"> ${element}</p>\n <button id=\"${index}\" onclick = \"deleteNote(this.id)\" class=\"btn btn-info\">Delete Note</button>\n </div>\n </div>\n `\n ;\n });\n let notesElm = document.getElementById(\"notes\");\n // if notes length is not 0 \n if (notesObj.length != 0) {\n notesElm.innerHTML = html;\n\n } else {\n // if notes length is 0\n notesElm.innerHTML = `<h2 class=\"text-info\">You can save your Note Here</h2>`\n }\n}", "title": "" }, { "docid": "5de8ff44b58e65e7f84245cee8002d09", "score": "0.67706305", "text": "function populateNotes() {\r\n\t\tgetNotesCount(\r\n\t\t\tfunction(count){\r\n\t\t\t\t$(\"#notes-count\").text(count);\r\n\t\t\t}, \r\n\t\t\tshowError\r\n\t\t);\r\n\t\tgetAllNotes(\r\n\t\t\tfunction(notes){\r\n\t\t\t\t$(\"#notes-list\").empty();\r\n\t\t\t\tif(notes.length < 1) {\r\n\t\t\t\t\t$('#notes-list').append($(\"<h4>\").append($(\"<small>\").append(\"No notes yet\")));\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tfor (var i = 0; i < notes.length; i++) {\r\n\t\t\t\t\t$listitem = $(\"<li>\").addClass(\"list-group-item\").addClass(\"note-item\");\r\n\t\t\t\t\tvar $row = $(\"<div>\").addClass(\"row\");\r\n\t\t\t\t\tvar $id = $(\"<input>\").attr(\"type\", \"hidden\").attr(\"value\", notes[i].id);\r\n\t\t\t\t\tvar $sub = $(\"<div>\").addClass(\"col-sm-7\").addClass(\"note-item-subject\").attr(\"data-toggle\", \"tooltip\").attr(\"title\",\"Subject\").append(notes[i].subject);\r\n\t\t\t\t\tvar $cnt = $(\"<div>\").addClass(\"col-sm-1\").attr(\"data-toggle\", \"tooltip\").attr(\"title\",\"Characters in message\").append(notes[i].message.length);\r\n\t\t\t\t\tvar $dtm = $(\"<div>\").addClass(\"col-sm-3\").addClass(\"note-item-created\").attr(\"data-toggle\", \"tooltip\").attr(\"title\",\"Created at\").append(displayDate(notes[i].created_at));\r\n\t\t\t\t\tvar $dlt = $(\"<span>\").addClass(\"col-sm-1\").addClass(\"glyphicon\").addClass(\"glyphicon-trash\").addClass(\"note-item-delete\").attr(\"data-toggle\", \"tooltip\").attr(\"title\",\"Delete Note\");\r\n\t\t\t\t\t$row.append($id);\r\n\t\t\t\t\t$row.append($sub);\r\n\t\t\t\t\t$row.append($cnt);\r\n\t\t\t\t\t$row.append($dtm);\r\n\t\t\t\t\t$row.append($dlt);\r\n\t\t\t\t\t$listitem.append($row);\r\n\t\t\t\t\t$('#notes-list').append($listitem);\r\n\t\t\t\t}\r\n\t\t\t}, \r\n\t\t\tshowError\r\n\t\t);\r\n\t}", "title": "" }, { "docid": "343432254597bcec926c6f7d24c0ce1b", "score": "0.6670801", "text": "list(){\r\n\tfor (let note_id in this.noteList){\r\n\t\tconsole.log('Note ID: '+ note_id + '\\n'\r\n +this.noteList[note_id] + '\\n'\r\n +'By Author ' + this.author);\r\n\t}\r\n}", "title": "" }, { "docid": "0c9661560024b62eefca3cfacf40893c", "score": "0.6631424", "text": "function printNote(noteInfo) {\n const $li = $(\"<li>\")\n .addClass(\"list-group-item d-flex align-items-center justify-content-between border-top-0 border-bottom py-3\");\n\n const $noteTitle = $(\"<span>\")\n .addClass(\"note\")\n .text(noteInfo.title)\n .attr(\"data-id\", noteInfo.id)\n .appendTo($li);\n\n const $trashCan = $(\"<i>\")\n .addClass(\"fas fa-trash-alt text-danger delete-note\")\n .attr(\"data-id\", noteInfo.id)\n .appendTo($li);\n\n $notes.append($li);\n}", "title": "" }, { "docid": "9063c7bcbef003455785c45e519dd9f1", "score": "0.6611592", "text": "populateNoteList(notes) {\n\n // sorted list of unique notebooks\n var notebooks = _.chain(notes)\n .map(n => n.notebook)\n .unique()\n .sortBy(function(x){\n return x.toLowerCase()\n }).value();\n\n // notes grouped by their notebook\n var groupedNotes = _.groupBy(notes, n=>n.notebook);\n\n // reset note list\n this.$noteList.empty();\n\n // iterate over notebooks\n notebooks.forEach(notebook => {\n this.$noteList.append(`<li class=\"list-group-item active\">${notebook}</li>`);\n _.sortBy(groupedNotes[notebook], n => n.title.toLowerCase()).forEach(note => {\n this.$noteList.append(`<a href=\"#\" class=\"list-group-item\" data-guid=\"${note.guid}\">${note.title}</a>`);\n })\n });\n }", "title": "" }, { "docid": "a8c968bc702a606433643d84d762c1c9", "score": "0.6606457", "text": "function loadAllNotes() {\n for (let i = notesNumber; i >= 1; i--) {\n let note = JSON.parse(localStorage.getItem(i));\n if (note === null) {\n continue\n }\n notesListContainer.innerHTML += note;\n }\n}", "title": "" }, { "docid": "d662914d541f7eeae19f243f2b1712ea", "score": "0.65902233", "text": "function renderNotesList(data) {\n console.log(\"rendering notes\");\n var notesToRender = [];\n \n console.log(data.notes);\n data.notes.notes.map(function(value){\n console.log(value);\n var currentNote = $(\n [\n \"<li class='list-group-item note'>\",\n value.noteText,\n \"<button class='btn btn-danger note-delete'>x</button>\",\n \"</li>\"\n ].join(\"\")\n );\n console.log(currentNote)\n currentNote.children(\"button\").data(\"_id\", value._id);\n notesToRender.push(currentNote);\n console.log(\"notes to render: \" +notesToRender) \n })\n \n // }\n $(\".note-container\").append(notesToRender);\n }", "title": "" }, { "docid": "746e70b99fb5f4a2770eb8d2297b3405", "score": "0.6557352", "text": "function displayData() {\n // Here we empty the contents of the list element each time the display is updated\n // If you didn't do this, you'd get duplicates listed each time a new note is added\n while (list.firstChild) {\n list.removeChild(list.firstChild);\n }\n \n // Open our object store and then get a cursor - which iterates through all the\n // different data items in the store\n let objectStore = db.transaction('notes_os').objectStore('notes_os');\n objectStore.openCursor().onsuccess = function(e) {\n // Get a reference to the cursor\n let cursor = e.target.result; // 'e.target' = 'objectStore.openCursor()' = IDBCursor object\n \n // If there is still another data item to iterate through, keep running this code\n if(cursor) {\n // Create a list item, h2, and p to put each data item inside when displaying it\n // structure the HTML fragment, and append it inside the list\n const entry = document.createElement('div');\n entry.classList.add('entry');\n const h2 = document.createElement('h2');\n h2.classList.add('title');\n const para = document.createElement('p');\n\n // get current date\n var today = new Date(Date.now());\n var dd = String(today.getDate()).padStart(2, '0');\n var mm = String(today.getMonth() + 1).padStart(2, '0'); //January is 0!\n var yyyy = today.getFullYear();\n const h4 = document.createElement('h4');\n\n var hr = today.getHours();\n var mn = today.getMinutes();\n\n h4.textContent = \"Date: \" + mm + \"/\" + dd + \"/\" + yyyy + \" @ \" +\n ('0' + hr).slice(-2) + ':' + ('0' + mn).slice(-2);\n\n entry.appendChild(h2);\n entry.appendChild(h4);\n entry.appendChild(para);\n list.insertBefore(entry, list.firstElementChild); // most recent entries on top\n \n // Put the data from the cursor inside the h2 and para\n h2.textContent = cursor.value.title;\n para.textContent = cursor.value.body;\n \n // Store the ID of the data item inside an attribute on the entry, so we know\n // which item it corresponds to. This will be useful later when we want to delete items\n entry.setAttribute('data-note-id', cursor.value.id);\n \n // Create a button and place it inside each entry\n const deleteBtn = document.createElement('button');\n entry.appendChild(deleteBtn);\n //deleteBtn.innerHTML = '<i class=\"fas fa-trash-alt\"></i>';\n deleteBtn.textContent = 'Delete';\n \n // Set an event handler so that when the button is clicked, the deleteItem()\n // function is run\n deleteBtn.onclick = deleteItem;\n \n // Iterate to the next item in the cursor\n cursor.continue();\n } else {\n // Again, if list item is empty, display a 'No notes stored' message\n if(!list.firstChild) {\n const entry = document.createElement('p');\n entry.textContent = 'No entries stored.';\n list.appendChild(entry);\n }\n // if there are no more cursor items to iterate through, say so\n console.log('Notes all displayed');\n }\n };\n }", "title": "" }, { "docid": "a85e5b4f974dc51ee4d98505373f306f", "score": "0.6557187", "text": "function showNotes() {\n let notesLocalstg = localStorage.getItem('notes');\n\n if (notesLocalstg == null) {\n notesObj = [];\n } else {\n notesObj = JSON.parse(notesLocalstg)\n }\n let html = '';\n let bgC = '';\n notesObj.forEach(function (element, index) {\n if (element.imp === true) {\n bgC = 'background-color: Tomato';\n } else {\n bgC = '';\n }\n html += `<div class=\"my-2 mx-2 cards\">\n <div id = \"notecard-${index}\" class=\"noteCard\" style=\"width: 18rem; border: 1px solid; ${bgC}\">\n <div class=\" card-body show-card-body-${index}\">\n <h5 class=\"card-title\"> ${element.title}</h5>\n <p class=\"card-text\">${element.desc}</p>\n <button id=\"${index}\" onclick=\"deleteNotes(this.id)\" class=\"btn btn-primary\">Delete Note</button>\n <input type=\"checkbox\" id=\"imp-${index}\" onclick=\"markImportant(this.id, ${index})\" class=\"impBtn btn btn-default btn-lg mx-2\" onclick=\"myFunction()\">\n </div>\n </div>\n </div>`;\n });\n let notesElm = document.getElementById('notes');\n if (notesObj.length != 0) {\n notesElm.innerHTML = html;\n }\n else {\n notesElm.innerHTML = `Nothing to Show !! Please add Notes form Above.`;\n }\n}", "title": "" }, { "docid": "f7fbb08057864517a416035125e35ddd", "score": "0.6553954", "text": "function showNotes() {\r\n let notes = localStorage.getItem(\"notes\");\r\n if (notes == null) {\r\n notesObj = [];\r\n } else {\r\n notesObj = JSON.parse(notes);\r\n }\r\n let html = \"\";\r\n notesObj.forEach(function(element, index) {\r\n html += `\r\n <form class=\"note\">\r\n <svg id=\"${index}\"onclick=\"deleteNote(this.id)\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"currentColor\" class=\"bi bi-x-circle\" viewBox=\"0 0 16 16\">\r\n <path d=\"M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z\"/>\r\n <path d=\"M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z\"/>\r\n </svg>\r\n <svg id=\"${index}\"onclick=\"editNote(this.id)\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"currentColor\" class=\"bi bi-pencil\" viewBox=\"0 0 16 16\">\r\n <path d=\"M12.146.146a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1 0 .708l-10 10a.5.5 0 0 1-.168.11l-5 2a.5.5 0 0 1-.65-.65l2-5a.5.5 0 0 1 .11-.168l10-10zM11.207 2.5 13.5 4.793 14.793 3.5 12.5 1.207 11.207 2.5zm1.586 3L10.5 3.207 4 9.707V10h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.293l6.5-6.5zm-9.761 5.175-.106.106-1.528 3.821 3.821-1.528.106-.106A.5.5 0 0 1 5 12.5V12h-.5a.5.5 0 0 1-.5-.5V11h-.5a.5.5 0 0 1-.468-.325z\"/>\r\n </svg>\r\n <p class=\"note-text\"> ${element.text}</p>\r\n </form>\r\n `;\r\n });\r\n let notesElm = document.getElementById(\"notes\");\r\n if (notesObj.length != 0) {\r\n notesElm.innerHTML = html;\r\n } else {\r\n notesElm.innerHTML = `No Notes Yet! Add a note using the form above.`;\r\n }\r\n}", "title": "" }, { "docid": "b918818781616d3e8a6d1a1ac726299d", "score": "0.65478307", "text": "function printNotes(value) {\n const listArea = document.querySelector(`.notes-ul`);\n const li = document.createElement(`li`);\n\n li.innerText = value;\n li.onclick = markComplete;\n\n listArea.appendChild(li);\n}", "title": "" }, { "docid": "18ae1768fc1b76d5e507548c42dacf04", "score": "0.6546749", "text": "_renderNotes() {\n\t\t\tconst currentNotes = this._getSavedNotes();\n\n\t\t\tif (!currentNotes) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// document fragment to add notes bofore attaching to the DOM\n\t\t\tconst publicNotesFragment = document.createDocumentFragment();\n\t\t\tconst privateNotesFragment = document.createDocumentFragment();\n\n\t\t\tfor (const note of currentNotes) {\n\t\t\t\t// create a DOM element for each note\n\t\t\t\tconst noteElement = this._getNoteElement(note);\n\n\t\t\t\t// add note to temporary DOM element\n\t\t\t\tnote.type === this._noteTypes.public\n\t\t\t\t\t? publicNotesFragment.appendChild(noteElement)\n\t\t\t\t\t: privateNotesFragment.appendChild(noteElement);\n\t\t\t}\n\n\t\t\t// append all elements at once\n\t\t\tthis._publicNotesElement.appendChild(publicNotesFragment);\n\t\t\tthis._privateNotesElement.appendChild(privateNotesFragment);\n\t\t}", "title": "" }, { "docid": "a426648e9d891f4c8edcd217719f1f05", "score": "0.65440863", "text": "function showNotes6() {\n let notes6 = localStorage.getItem(\"notes6\");\n if (notes6 == null) {\n notesObj6 = [];\n } else {\n notesObj6 = JSON.parse(notes6);\n }\n let html6 = \"\";\n notesObj6.forEach(function (element, index) {\n html6 += `\n <div class=\"noteCard my-2 mx-2 card\" style=\"width: 21rem; display: flex; margin: 3px;\">\n <div class=\"card-body\">\n <h6 class=\"card-title\">Note ${index + 1}</h6>\n <p class=\"card-text\" style=\"text-transform: none;\"><h5 style=\"text-transform: none;\">${element[0]}</h5></p>\n <h6 style=\"text-transform: none;\"><p>Commented By :</p>${element[1]}</h6>\n <h6 style=\"text-transform: none;\"><p>Time :</p><small>${element[3]} | ${element[4]} ${element[5]}, ${element[6]}</small></h6>\n </div>\n </div>`;\n });\n let notesElm6 = document.getElementById(\"notes6\");\n if (notesObj6.length != 0) {\n notesElm6.innerHTML = html6;\n } else {\n notesElm6.innerHTML = `Nothing to show! Use \"Add a comment\" section above to add notes.`;\n }\n}", "title": "" }, { "docid": "6b2fafc81d03245f44dfeed2cb2967b4", "score": "0.65109223", "text": "function displayFirstNote() {\n\tlet id = -1;\n\tif (document.getElementById(\"clickNoteList\").innerHTML == \"\") {\n\t\tquill.root.innerHTML = \"\";\n\t} else {\n\t\tid = document.getElementById(\"clickNoteList\").firstChild.id;\n\t\ttextToEditor(getNoteFromStorage(id)); // Display the first note of the list in editor\n\t\tfilterNoteList();\n\t}\n\tsetCurrentNoteID(id);\n}", "title": "" }, { "docid": "8cb8b9b7729b6512b1b25e3f83fc15aa", "score": "0.6490277", "text": "function putInDisplay(note){\n\t$('.output-wrap').html('')\n\tedit = $('<div class=\"edit btn btn-default new' + note.id + '\">-Edit-</div>');\n\tkill = $('<div class=\"kill btn btn-default new' + note.id + '\">*Delete*</div>');\n\th1 = $('<h1>' + note.get('title') + '</h1>');\n\tp = $('<p>' + note.get('content') + '</p>');\n\n\t$('.output-wrap').append(h1, p, edit, kill);\n\n\n\t$(edit).click(function(){\n\t\ttheEditor(note);\n\t});\n\n\t$(kill).click(function(){\n\t\ttheDelete(note);\n\t});\n}", "title": "" }, { "docid": "4356b4879644d662c3b50ac7f7e74f51", "score": "0.6473256", "text": "function displayTagsNotes(whichtag){\n\n\tif (whichtag == \"\") {\n\t\talert(\"No tag specified in displayTagsNotes\");\n\t\treturn -1;\n\t}\n\tif (whichtag == \"[tag]\") {\n\t\treturn -1;\n\t}\n\t\n\t\n\t// get all tags\n\tvar resp = '';\n\t$.ajax({\n\t\ttype: \"POST\",\n\t\t//data: \"tag=\" + whichtag + \"&project=\" + gProject + \"&user=\" + gUsername,\n\t\tdata: {tag : whichtag, project : gProject, user : gUsername},\n\t\turl: \"scripts/getnotesfortag.php\",\n\t\tasync: false,\n\t\tsuccess: function(listresult){\n\t\t\tresp = listresult;\n\t\t},\n\t\terror: function(){\n\t\t\talert('Error reading displaytagsnotes.php');\n\t\t}\n\t})\n\t\n\t\n\tvar notearray = JSON.parse(resp);\n \n\tvar tab = document.getElementById(\"notestable\");\n\n\tif (tab != null) {\n\t tab.innerHTML=\"\";\n\t}\n\t var noterow;\n\t for (i=0; i < notearray.length; i++){\n\t\tnoterow = notearray[i];\n\t\tnoterow.content = trimSpacesAndLfs(noterow.content);\n\t\tif (noterow != \"\") { // if there's content to the note\n\t\t\t// build noteline if the content isn't blank or \"undefined\"\n\t\t\tif ((noterow.content != \"\") ) {\n\t\t\t\t\tnoteline = buildNoteLine(i,noterow.content,noterow.rating,noterow.page,noterow.tagstring,noterow.bookid,noterow.noteid,noterow.title, noterow.indent,noterow.order);\n\t\t\t}\t\n\t\t}\n \t}\n \t if ($(tab).is(\":visible\") != true){ // make it visible\n\t\t$(tab).show(500); \n\t}\n \n // the button\n addSaveAndDeleteNotesTableButtons();\n \n\n \n //insert the header\n insertNotesTableHeader(\"<p class='notestableheaderclass'><span class='metatitle'>Notes for tag:</span> \" + whichtag + \"</p>\");\n // invoke sortable\n $(\"#noteslisttable\").tablesorter( {cancelSelection:true}); \n}", "title": "" }, { "docid": "31f23ace363f4e7311d345085a6be2e7", "score": "0.6466181", "text": "function shownotes() {\n let notes = localStorage.getItem('notes');\n if (notes == null) {\n n_obj = [];\n }\n else {\n n_obj = JSON.parse(notes);\n }\n let html = '';\n n_obj.forEach(function (element, index) {\n html += `\n <div class=\"notecard my-2 mx-2 card\" style=\"width: 18rem; border: 3px solid rgb(255, 3, 16);\">\n <div class=\"card-body\">\n <h5 class=\"card-title\">Note ${index + 1}</h5>\n <p class=\"card-text\">${element}</p>\n <button id=\"${index}\" onclick=\"delenote(this.id)\" class=\"btn btn-primary\">Delete Note</button>\n </div> \n </div>`;\n\n // console.log(element);\n });\n let n_ele = document.getElementById('notes');\n if (n_obj.length != 0) {\n n_ele.innerHTML = html;\n }\n else {\n n_ele.innerHTML = 'Nothing to show! Use \"Add a Note\" to add notes';\n }\n console.log(n_ele);\n\n}", "title": "" }, { "docid": "52bb7a46584b1414f996a2d8b57cd693", "score": "0.6459587", "text": "function displayAllNotes() {\n $.ajax({\n url: \"process.php\",\n method: \"post\",\n data: { action: \"display_notes\" },\n success: function (response) {\n $(\"#showNote\").html(response);\n $(\"table\").DataTable({\n order: [0, \"desc\"],\n });\n },\n });\n }", "title": "" }, { "docid": "938f39dede62c5421abe34876f67c34f", "score": "0.6438362", "text": "async list() {\n const transaction = this.db.transaction([\"notes\"], \"readonly\")\n const objectStore = transaction.objectStore(\"notes\")\n\n const notes = []\n\n return new Promise((resolve, reject) => {\n objectStore.openCursor().onsuccess = (event) => {\n const cursor = event.target.result\n if (!cursor) {\n resolve(notes)\n } else {\n notes.push(cursor.value)\n cursor.continue()\n }\n }\n })\n }", "title": "" }, { "docid": "00627b6c71957f072ac5df20ed8f4b80", "score": "0.6436927", "text": "function getNoteDisplay(myNote, type, index){\n\n var text = '';\n\n // member note\n if (myNote != '' && type == 0) {\n text += '<li ' + 'data-index=' + index + '>'\n text += '<span class=\"noteText\">' + myNote + '</span>'\n text += '<button class=\"btnEditNote\">Edit</button>'\n text += '<button class=\"btnDeleteNote\">Delete</button>'\n text += '</li>'\n }\n\n // admin note\n if (myNote != '' && type == 1) {\n text += '<li ' + 'data-index=' + index + '>'\n text += '<span class=\"noteText\">' + myNote + '</span>'\n text += '</li>'\n }\n\n return text;\n }", "title": "" }, { "docid": "47047a7b2fd609c1ee7c5d20ff52a08e", "score": "0.6426899", "text": "function printNotes() {\n const timer = Math.random() * 2500;\n setTimeout(async () => {\n const { length } = enterprises;\n if (length) {\n const eIndex = getRandomInt(0, length - 1);\n enterprises[eIndex].publishNote(folder, stream);\n }\n printNotes();\n }, timer);\n}", "title": "" }, { "docid": "edd11e3bd4844892e79ecff44393b6e3", "score": "0.6415009", "text": "function allNotes () {\n fetch (url)\n .then(function (response) {\n return response.json()\n })\n .then(function (data) {\n console.log(data)\n for (let note of data) {\n console.log(note)\n renderNoteItem(note)\n }\n })\n}", "title": "" }, { "docid": "05ea4449c8f14a4c8473305f133070b4", "score": "0.64088595", "text": "toHTML() {\n return notepadDisplayTemplate({\n notes: this._notes\n });\n }", "title": "" }, { "docid": "6d00dbe9445e7bfb4e3842c592efc08a", "score": "0.6408835", "text": "render() { \n return (\n <div className=\"App\">\n {/* <h6>Note Details : </h6> */}\n {console.log('notes',this.state.myNotes)}\n {this.state.myNotes.map(notes => {\n return (\n <div>\n <Link to={`/note/${notes.name}`}>{notes.name}</Link>\n <h4>{notes.sfdcItemsLabel}</h4>\n <h4>{notes.sfdcItemsLabel}</h4>\n {/* <h6>{notes.sfdcItemsLabel}</h6>\n <h6>{notes.textInputs}</h6> */}\n </div>\n )\n })}\n \n \n \n \n {/* <h4 className=\"Note-title\"><Link to={`/note/${this.props.note.name}`}>{this.props.note.name}</Link></h4> */}\n \n </div>\n )}", "title": "" }, { "docid": "3251884f5023af8264cde3014169b745", "score": "0.64035374", "text": "function viewNewNote() {\n\tvar z = document.getElementById(\"new_note\");\n\n\tif (z.style.display === \"none\") {\n\t\tz.style.display = \"block\";\n\t} else {\n\t\tz.style.display = \"none\";\n\t}\n}", "title": "" }, { "docid": "f95d76546b7b85a0377fd8896c281dc8", "score": "0.6380394", "text": "function ViewNotes() {\n var divs = ''; \n\n $.each(MainNotesArray, function (key, value) {\n var text = nl2br(value.Notes)\n divs += '<tr id=\"MainNotesrow' + value.Id + '\" style=\"border-bottom: 1px solid #c5b4b4;\"><td style=\"padding: 16px;\"><span id=\"Mainnotespan' + key + '\">' + text + '</span><textarea data-mainnotes=\"' + value.Id + '\" id=\"EditMainNotes_' + value.Id + '\" class=\"form-control\" placeholder=\"NOTES\" style=\"display:none;resize: none;\" rows=\"2\" cols=\"10\" tabindex=\"1\"></textarea></td><td id=\"tdEditMainNotes_' + value.Id + '\" style=\"text-align:center;width:35px;\"><a id=\"\" class=\"\" style=\"cursor: pointer;\" title=\"Edit Notes\" onclick=\"EditMainNotes(\\'Mainnotespan' + key + '\\',\\'EditMainNotes_' + value.Id + '\\')\"><img src=\"images/editicon.png\" id=\"EditImgMainNotes_' + value.Id + '\" width=\"28\" /></a></td><td style=\"text-align:center;width:35px;\"><a id=\"\" class=\"\" style=\"cursor: pointer;\" title=\"Delete Notes\" onclick=\"DeleteMainNotes(' + value.Id + ')\"><img src=\"images/deleteicon.png\" width=\"28\" /></a></td></tr>';\n });\n $(\"#ViewNotesList\").children().remove();\n $(\"#ViewNotesList\").append(divs);\n $(\"#ViewNotesDetails\").modal('show');\n}", "title": "" }, { "docid": "696bcfef000b821cb052ba7b112cee79", "score": "0.6344648", "text": "async function fetchNotes() {\n try {\n const results = await API.graphql({\n query: listNotes,\n });\n dispatch({ type: \"SET_NOTES\", notes: results.data.listNotes.items });\n } catch (err) {\n console.log(\"error: \", err);\n dispatch({ type: \"ERROR\" });\n }\n }", "title": "" }, { "docid": "498d825b7b7b553f9f97ddf85da41bd9", "score": "0.63439727", "text": "function updateVisibleNote(){\n\tdocument.getElementById(\"title\").innerText = jsonFile.notes[index].title;\n\tdocument.getElementById(\"main\").innerText = jsonFile.notes[index].content;\n}", "title": "" }, { "docid": "20e8b59a7cf8fb39e58130cc35b5367e", "score": "0.6339978", "text": "function savedNote() {\n\tfor (let i = 0; i < savedNotesFromMain.length; i++) {\n\t\tlet toDoNote = document.createElement(\"p\");\n\t\ttoDoNote.appendChild(document.createTextNode(savedNotesFromMain[i]));\n\t\tdocument.getElementById(\"writeNotesHere\").appendChild(toDoNote);\n\t}\n}", "title": "" }, { "docid": "42877bc024c03d1bb6ed9532c6d871e0", "score": "0.6321293", "text": "function NoteController(list = new List()) {\n this.list = list;\n this.view = new View(this.list);\n // ??\n // this.singleNote = new SingleNote(note);\n }", "title": "" }, { "docid": "ce36523a49d9d94ebfd8b259d9b04176", "score": "0.63194185", "text": "function renderNotes(notes) {\n var elPiano = document.querySelector('.piano');\n var strHtml = ''; \n for (var key in notes) {\n if (notes.hasOwnProperty(key)) {\n strHtml += '<div class=\"note note' + key + '\" onclick=\"noteClicked(this, ' + key + ')\"></div>'; \n }\n }\n elPiano.innerHTML = strHtml;\n} // *** End of renderNotes", "title": "" }, { "docid": "d062189ef585878e93e5765ae77e1b2f", "score": "0.6310161", "text": "function createList() {\n var storedNotes = localStorage.getItem(\"notes\");\n\n if (storedNotes) {\n\n var notesArray = JSON.parse(storedNotes),\n container = document.querySelector('.js-saved-notes'),\n emptyMessage = document.querySelector('.js-saved-notes--empty');\n\n // Create Elements\n var notesCollection = document.createDocumentFragment(),\n notesList = document.createElement('ul');\n\n notesList.classList.add('take-note__saved-list');\n\n emptyMessage.style.display = \"none\"; \n\n // Create Each List Item\n for (var index = 0; index < notesArray.length; index++) {\n\n var listItem = createListItem(notesArray, index);\n notesCollection.appendChild(listItem);\n }\n\n // Add notes in to list & add list in to container\n notesList.appendChild(notesCollection);\n container.appendChild(notesList);\n } \n}", "title": "" }, { "docid": "98deb4d2c14a5550eee27f8275006a2d", "score": "0.6299645", "text": "function outputNotes( notes, bIsRoot ) \n{\n\tif ( bIsRoot ) {\n\t\toutlet( 0, notes );\n\t}\n\telse {\n\t\tfor ( var i = 0, il = notes.length; i < il; i++ ) {\n\t\t\toutlet( i + 1, notes[i] );\n\t\t}\n\t}\n}", "title": "" }, { "docid": "e376f6eebfed7169747bb443f2e1caa2", "score": "0.62950104", "text": "function displayNote() {\n\tdocument.getElementById('view').style.display = 'none';\n\tdocument.getElementById('notices').style.height = '90px';\n\tdocument.getElementById('props').style.display = 'block';\n\ttoggleTblValidity();\n}", "title": "" }, { "docid": "aa1c50772d377642b6fee1b0def1554e", "score": "0.62800115", "text": "function noteTemplate(myNotes) {\n notes.push(myNotes);\n console.log(myNotes);\n let noteString = myNotes.content.ops[0].insert;\n console.log(noteString);\n return `\n <table class=\"find-note\" cellspacing=\"0\" cellpadding=\"0\" onclick='loadNote(${myNotes.id})'>\n <tbody class=\"notecell\">\n <tr><th>${myNotes.title}</th><th>${myNotes.created}</th></tr>\n <tr><td align=\"center\" colspan=\"2\">${myNotes.content.ops[0].insert.slice(0, 30)}\\n${myNotes.content.ops[0].insert.slice(30, 60)}</td></tr>\n </tbody>\n </table>\n `;\n}", "title": "" }, { "docid": "d6e6fb0b2078d98517463790a7e5f863", "score": "0.62769663", "text": "function renderNoteItem (noteObj) {\n const noteEl = document.createElement('li')\n noteEl.id = noteObj.id\n renderNoteText(noteEl, noteObj)\n noteList.appendChild(noteEl)\n clearInputs()\n}", "title": "" }, { "docid": "595acc024b63a2e33492493dd039e25e", "score": "0.62698597", "text": "function List(props) {\n\n return (\n <div>\n {props.notes.map((note, index) => (\n <div key={index} className={props.index==index ? \"note selected\" : \"note\"} onClick={() => { props.selectNote(index) }}>\n {note.title}\n </div>\n ))}\n </div>\n );\n}", "title": "" }, { "docid": "928ad55d1fa5de887944941d9a696bf5", "score": "0.6247832", "text": "@Action({roles: [\"admin\", \"user\"]})\n indexAction(): ActionResult {\n var result = this.notesService.getNotesFor(this.userName)\n .catchError(this.handleError_, this);\n\n return this.PushView(NotesActivity, result);\n }", "title": "" }, { "docid": "1dffb25fbf6e08c9abb9ba7f0848d32d", "score": "0.6204594", "text": "_renderNotes () {\n this._appContainer.html(getNotesTemplate(this.states))\n resizeContainer(this._client, MAX_HEIGHT)\n }", "title": "" }, { "docid": "bb00409537e06cd454a03611ff0ae095", "score": "0.6196418", "text": "function showNotes(wineryID,target){\n\n\t\n\t//if it is already declared just push it to the storage\n\ttry{\n\t\tvar notes_winery=JSON.parse(window.localStorage.getItem('notes'));\n\t\tvar notes=notes_winery[0][window.localStorage.getItem('id')];\n\n\t\t//replace carriage return with <br/>\n\t\t//please note that text MUST NOT BE REPLACED if you are going to place it inside TEXTAREA element\n\t\tvar text=notes.replace(/(?:\\r\\n|\\r|\\n)/g, '<br />');\n\n\t\tvar htm=`<div id='stacks_out_363_page12' class='stacks_out'>\n\t\t\t\t\t\t\t\t\t<div id='stacks_in_363_page12' class='stacks_in html_stack'>\n\t\t\t\t\t\t\t\t\t\t<font face=\"Open Sans\">`+text+`</font>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>`;\n\t\t//append to html\t\n\t\t$(target).html(htm);\n\n\t}catch(e){}\n}", "title": "" }, { "docid": "6df78c182e4d20c3155a676fab519bad", "score": "0.61891", "text": "function buildList()\n{\n //to test if it's working\n //console.log(\"window onload\");\n var notes = getLocal();\n //to test if it's working\n //console.log(notes);\n\n //in a larger project you would want to use an id instead of just ul\n var ulElm = document.querySelector(\"ul\");\n ulElm.innerHTML = \"\";\n\n for(var i = 0; i < notes.length; i++)\n {\n //creating an element\n var liElm = document.createElement(\"li\");\n var pElm = document.createElement(\"p\");\n\n if(notes[i].important === true)\n {\n //These are called conditional styling\n liElm.style.backgroundColor =\"deeppink\";\n liElm.style.color =\"white\";\n }\n\n //getting the value from the key text\n pElm.innerHTML = notes[i].text;\n\n //adds a class to the first p element in the lists\n pElm.classList.add(\"pinkUnicorn\");\n\n liElm.appendChild(pElm);\n\n if(notes[i].date !== \"\")\n {\n var pDateElm = document.createElement(\"p\");\n pDateElm.innerHTML = notes[i].date;\n liElm.appendChild(pDateElm);\n }\n\n var edit = document.createElement('button')\n edit.innerHTML = \"Edit\";\n edit.setAttribute(\"data-index\", i);\n\n edit.addEventListener('click', function(event) {\n var index = event.target.getAttribute(\"data-index\");\n noteEdit(index);\n });\n\n edit.classList.add(\"editBtn\");\n liElm.appendChild(edit);\n\n var deleteBtn = document.createElement('button')\n deleteBtn.innerHTML = \"Delete\";\n deleteBtn.setAttribute(\"data-index\", i);\n\n deleteBtn.addEventListener('click', function(event) {\n var index = event.target.getAttribute(\"data-index\");\n noteDelete(index);\n });\n\n liElm.appendChild(deleteBtn);\n\n ulElm.appendChild(liElm);\n }\n}", "title": "" }, { "docid": "962e9c16e367638059c9516cf6b54885", "score": "0.6186598", "text": "displayContent() {\n let book_note = this.props.book_notes.filter((note) =>\n note.id === this.state.view_note_id);\n\n return (\n <div className=\"wrapper\">\n <div className=\"c-lift_title\">\n <h1>{\"Notes: \" + this.state.title}</h1>\n <UserCard image={nyanko} />\n </div>\n <button className=\"c-note_action_button\" onClick={(e) => this.setState({ view_note_id: \"\" })}>\n <img src={back} className=\"backArrow\" height=\"40px\" alt=\"Go Back\"/>\n </button>\n <div className=\"c-note_wrapper\">\n <div className=\"c-new_note_form\">\n {book_note.map(res => (\n <div className=\"\" key={`book_${res.id}`}>\n <div className=\"\">\n <p className=\"c-note_title\">{res.title}</p>\n {this.contentWithLinebreaks(res.content).map((line, index) => (\n <p className=\"c-note_content\" key={index}>{line}</p>\n ))}\n </div>\n </div>\n ))}\n </div>\n </div>\n </div>\n )\n }", "title": "" }, { "docid": "f6094825e444d672b3cc51cd80763a61", "score": "0.6179019", "text": "function getArticleNotes() {\n console.log(\" in get Artticle Notes\");\n var currentArticle = $(this).parents(\".panel\").data();\n \n $.get(\"/notes/\" + currentArticle._id).then(function(data) {\n console.log(\"notes of article: \"+ currentArticle._id + \"are\" + data);\n var modalText = [\n \"<div class='container-fluid'>\",\n \"<h4>Notes For Article: \",\n currentArticle._id,\n \"</h4>\",\n \"<hr />\",\n \"<ul class='list-group note-container'>\",\n \"</ul>\",\n \"<textarea placeholder='New Note' rows='4' cols='60'></textarea>\",\n \"<button class='btn btn-success save'>Save Note</button>\",\n \"</div>\"\n ].join(\"\");\n \n bootbox.dialog({\n message: modalText,\n closeButton: true\n });\n var noteData = {\n _id: currentArticle._id,\n notes: data || []\n };\n console.log(\"note Data\" + noteData);\n $(\".btn.save\").data(\"article\", noteData);\n renderNotesList(noteData);\n });\n }", "title": "" }, { "docid": "76f9057f8fe893eb7baef1fb7f53dcee", "score": "0.61590976", "text": "function getNotes(entry) {\n entryId = entry || \"\";\n if (entryId) {\n entryId = \"/?entry_id=\" + entryId;\n }\n $.get(\"/api/notes\" + entryId, function(data) {\n console.log(\"Notes\", data);\n notes = data;\n if (!notes || !notes.length) {\n displayEmpty(entry);\n }\n else {\n initializeRows();\n }\n });\n }", "title": "" }, { "docid": "b2076e93fbc7e58f5347ae122da8b8c1", "score": "0.6150807", "text": "function addNotesDataToList(providerName, noteDescription, timestamp){\n $(\"#notesDetails\").append(printNotesList(providerName, noteDescription, timestamp));\n}", "title": "" }, { "docid": "29e978cb9b580feffb50fff4f1b8f343", "score": "0.6145263", "text": "function renderTodos(list) {\n //console.log(list);\n // Iterates over the 'list'\n for (var i = 0; i < list.length; i++) {\n // Creates a new variable 'toDoItem' that will hold a \"<textArea>\" tag\n // Sets the `list` item's value as text of this <textArea> element\n var toDoItem = $('<textArea>');\n toDoItem.text(list[i]);\n //console.log(toDoItem);\n // Adds 'toDoItem' to the To-Do List div\n $('.description').append(toDoItem); \n }\n}", "title": "" }, { "docid": "b8fd4e87c7e9d02c7558e3adc03d2ca5", "score": "0.614141", "text": "htmlifyForIndex(){\n return(\n `<li class=\"note-summary\" id=\"${this.id}\"> \n <h4 class=\"note-title\">${this.title}</h4>\n </li>`\n )\n }", "title": "" }, { "docid": "c3b2a633882bc5a5b8110f7bbd7be6e0", "score": "0.6140065", "text": "function readNotes(){\r\n document.getElementById('read').style.display = \"block\";\r\n document.getElementById('input').style.display = \"none\";\r\n}", "title": "" }, { "docid": "75f14177f4ba7310110bd28e7448420a", "score": "0.6127815", "text": "function printNotesList(providerName, noteDescription, timestamp){\n var html = \" \\\n <tr> \\\n <td>\"+providerName+\"</td> \\\n <td>\"+noteDescription+\"</td> \\\n <td>\"+timeStampToLongDate(timestamp)+\"</td> \\\n </tr> \\\n \"\n return html;\n}", "title": "" }, { "docid": "71f10309f85c751835db1ea5ea53863e", "score": "0.612509", "text": "function index (req, res) {\n User.findOne({'username': req.user.username})\n .populate({path:'notepad',options:{ sort:{createdAt : -1}}})\n .exec((err, userNote) => {\n let note = userNote.notepad;\n if (err) res.send(err);\n res.render('notepad/index', {\n user: req.user,\n note, \n });\n }) \n}", "title": "" }, { "docid": "e3a486c78b403272617a4d432ccc66ec", "score": "0.6103781", "text": "function readNotes(title){\n const notes = loadNotes();\n\t const note = notes.find(note => note.title === title);\n\n\t if(!note){\n\t\t console.log(chalk.red.inverse(\"Sorry, this title of note is not found..\"));\n\t\t return ;\n\t }\n\t console.log(\"<--\"+chalk.green.inverse(note.title)+\"-->\");\n\t console.log(chalk.inverse(note.body));\t \n}", "title": "" }, { "docid": "735fba5e4fc0f8e7feb729a8b62030b6", "score": "0.61017495", "text": "function loadNotes() {\n // Using jquery getJSON to load notes from Parse.com\n $.getJSON('https://api.parse.com/1/classes/Note', function(data) {\n\n var $notesList = $('#notesList'),\n // jquery ref to notes list item\n $listItem,\n items = [];\n \n // Clearing current notes in the list\n $notesList.empty();\n\n // Iterating over the returned results\n $.each(data.results, function(key, val) {\n // Creating new list item\n $listItem = $('<li/>').append(\n // link to click in the list item\n $('<a href=\"#\"/>').html(val.title).jqmData('note', val));\n \n // Appending list item to array\n items.push($listItem[0]);\n });\n\n // Appending batch of list items\n $notesList.append(items);\n \n // Refreshing jquery.mobile list\n $notesList.listview('refresh');\n \n // Refreshing scroller\n scroller.refresh();\n });\n}", "title": "" }, { "docid": "bb502243c66a4d2dd4423f3a35611c40", "score": "0.61000097", "text": "playNotes(notes) {\n this.song = notes\n this.index = 0\n this.nextNote()\n }", "title": "" }, { "docid": "4ce8ac09d0e971c83bb8623ef8c2f6c3", "score": "0.60872513", "text": "function displayNote(note) {\n\tbodies.push(note);\n\tWorld.add(engine.world, bodies[bodies.length - 1]);\n\n\tif (bodies.length > objLimit) {\n\t\tWorld.remove(engine.world, bodies[0]);\n\t\tbodies = bodies.slice(1);\n\t}\n}", "title": "" } ]
a499b929ef00323fbf9b1820604a655a
Following function are helper to avoid UWA.Element dependency. Simple element helper to set styles
[ { "docid": "8c9bfecbded0c23fd194441a05af5d89", "score": "0.65787786", "text": "function setElementStyles(element, styles) {\n var name;\n for (name in styles) {\n if (styles.hasOwnProperty(name)) {\n element.style[name] = styles[name];\n }\n }\n }", "title": "" } ]
[ { "docid": "47edc24f7dc971dd71f391eeb9541f57", "score": "0.7052713", "text": "getDOMStyleElement(){\n return '<style>' + this.styleList + '</style>';\n }", "title": "" }, { "docid": "52493e53f5ec6cba124a57baae2add65", "score": "0.69802076", "text": "set style(value) {}", "title": "" }, { "docid": "d190a13e2d68980f897393531a537acd", "score": "0.6851286", "text": "injectStyles(element) {\n const applyStyles = function(pairs) {\n const [key, value] = pairs.split(/:\\s*/)\n // note that \"this\" here refers to a 'div', NOT the class object\n this.style[key] = value\n }\n\n const getAndApplyStyles = div => {\n const x_style = div.attributes['x-style'].value\n const style_mappings = this.definitions.styles[x_style]\n if (x_style && style_mappings) {\n // passing the div to the function as its \"this\"\n style_mappings.split(/;\\s*/).forEach(applyStyles, div)\n }\n }\n\n this.elementAndChildren(element, 'x-style').forEach(getAndApplyStyles)\n }", "title": "" }, { "docid": "4e4b6fdedf7f108ad9e49fd9e41a7a25", "score": "0.6814724", "text": "function applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n }", "title": "" }, { "docid": "4e4b6fdedf7f108ad9e49fd9e41a7a25", "score": "0.6814724", "text": "function applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n }", "title": "" }, { "docid": "4e4b6fdedf7f108ad9e49fd9e41a7a25", "score": "0.6814724", "text": "function applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n }", "title": "" }, { "docid": "888fb214d32dca08696e050a52598484", "score": "0.6769587", "text": "function setElementalStyles() {\n $('*[data-bc-configurable-styles]').each(function() {\n if($.cache($(this).attr('data-bc-component-id') + \"_styles\")) {\n var styles = JSON.parse($.cache($(this).attr('data-bc-component-id') + \"_styles\"));\n for(var i in styles) {\n if(styles[i].value && styles[i].value.toString() != \"\") {\n if (i === 'src')\n $(this).attr(i, styles[i].value.toString())\n else\n $(this).css(i, styles[i].value.toString());\n }\n }\n }\n });\n }", "title": "" }, { "docid": "5c8911d8b7bdd4a0c41d73934da214b3", "score": "0.6759132", "text": "function applyStyles(_ref) {\n\t var state = _ref.state;\n\t Object.keys(state.elements).forEach(function (name) {\n\t var style = state.styles[name] || {};\n\t var attributes = state.attributes[name] || {};\n\t var element = state.elements[name]; // arrow is optional + virtual elements\n\n\t if (!isHTMLElement(element) || !getNodeName(element)) {\n\t return;\n\t } // Flow doesn't support to extend this property, but it's the most\n\t // effective way to apply styles to an HTMLElement\n\t // $FlowFixMe\n\n\n\t Object.assign(element.style, style);\n\t Object.keys(attributes).forEach(function (name) {\n\t var value = attributes[name];\n\n\t if (value === false) {\n\t element.removeAttribute(name);\n\t } else {\n\t element.setAttribute(name, value === true ? '' : value);\n\t }\n\t });\n\t });\n\t}", "title": "" }, { "docid": "b431e5b7ca83f7022587e6475f78b1ad", "score": "0.6746734", "text": "applyAttributes(element, obj) {\r\n const keys = Object.keys(obj);\r\n keys.forEach((key) => {\r\n element.style[key] = obj[key];\r\n });\r\n }", "title": "" }, { "docid": "53fe80c7b762f1f210b085fa685751b0", "score": "0.66901803", "text": "function applyStyles(_ref) {\n\t var state = _ref.state;\n\t Object.keys(state.elements).forEach(function (name) {\n\t var style = state.styles[name] || {};\n\t var attributes = state.attributes[name] || {};\n\t var element = state.elements[name]; // arrow is optional + virtual elements\n\n\t if (!isHTMLElement(element) || !getNodeName(element)) {\n\t return;\n\t } // Flow doesn't support to extend this property, but it's the most\n\t // effective way to apply styles to an HTMLElement\n\t // $FlowFixMe[cannot-write]\n\n\n\t Object.assign(element.style, style);\n\t Object.keys(attributes).forEach(function (name) {\n\t var value = attributes[name];\n\n\t if (value === false) {\n\t element.removeAttribute(name);\n\t } else {\n\t element.setAttribute(name, value === true ? '' : value);\n\t }\n\t });\n\t });\n\t}", "title": "" }, { "docid": "ada3a3acc0d04b1a507f7668e2a06ddb", "score": "0.6682936", "text": "function applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? \"\" : value);\n }\n });\n });\n }", "title": "" }, { "docid": "27979523723b66fcd0b73450aa242dbc", "score": "0.6675971", "text": "function applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}", "title": "" }, { "docid": "27979523723b66fcd0b73450aa242dbc", "score": "0.6675971", "text": "function applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}", "title": "" }, { "docid": "27979523723b66fcd0b73450aa242dbc", "score": "0.6675971", "text": "function applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}", "title": "" }, { "docid": "27979523723b66fcd0b73450aa242dbc", "score": "0.6675971", "text": "function applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}", "title": "" }, { "docid": "99677103a5f761c72e6b200085e535c7", "score": "0.6668787", "text": "function applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!(0, _instanceOf.isHTMLElement)(element) || !(0, _getNodeName.default)(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}", "title": "" }, { "docid": "99677103a5f761c72e6b200085e535c7", "score": "0.6668787", "text": "function applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!(0, _instanceOf.isHTMLElement)(element) || !(0, _getNodeName.default)(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}", "title": "" }, { "docid": "99677103a5f761c72e6b200085e535c7", "score": "0.6668787", "text": "function applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!(0, _instanceOf.isHTMLElement)(element) || !(0, _getNodeName.default)(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}", "title": "" }, { "docid": "45d802298940d6612d9a692c4ad80f37", "score": "0.66644657", "text": "function setStyles (el, styles) {\n for (var prop in styles) {\n if (styles.hasOwnProperty(prop)) {\n el.style[prop] = styles[prop];\n }\n }\n }", "title": "" }, { "docid": "9e0cbc0af4c946ab62a3a8681f83ab66", "score": "0.66592294", "text": "function setStyles($elem, styles) {\n $elem.removeAttr('style');\n $elem.css(styles);\n }", "title": "" }, { "docid": "1a4e488545d7c2c439c57c58c9448492", "score": "0.66504204", "text": "function applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!Object(_dom_utils_instanceOf_js__WEBPACK_IMPORTED_MODULE_1__[\"isHTMLElement\"])(element) || !Object(_dom_utils_getNodeName_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}", "title": "" }, { "docid": "12ad12891ea7ec4ee03cda9ac7953ff7", "score": "0.6641863", "text": "function applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!(0, _instanceOf.isHTMLElement)(element) || !(0, _getNodeName.default)(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}", "title": "" }, { "docid": "12ad12891ea7ec4ee03cda9ac7953ff7", "score": "0.6641863", "text": "function applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!(0, _instanceOf.isHTMLElement)(element) || !(0, _getNodeName.default)(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}", "title": "" }, { "docid": "12ad12891ea7ec4ee03cda9ac7953ff7", "score": "0.6641863", "text": "function applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!(0, _instanceOf.isHTMLElement)(element) || !(0, _getNodeName.default)(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}", "title": "" }, { "docid": "5e956b1590a9594d1a3e1c6c1ebd56c0", "score": "0.6639677", "text": "function applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!(0,_dom_utils_instanceOf_js__WEBPACK_IMPORTED_MODULE_0__.isHTMLElement)(element) || !(0,_dom_utils_getNodeName_js__WEBPACK_IMPORTED_MODULE_1__.default)(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}", "title": "" }, { "docid": "5e956b1590a9594d1a3e1c6c1ebd56c0", "score": "0.6639677", "text": "function applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!(0,_dom_utils_instanceOf_js__WEBPACK_IMPORTED_MODULE_0__.isHTMLElement)(element) || !(0,_dom_utils_getNodeName_js__WEBPACK_IMPORTED_MODULE_1__.default)(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}", "title": "" }, { "docid": "5e956b1590a9594d1a3e1c6c1ebd56c0", "score": "0.6639677", "text": "function applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!(0,_dom_utils_instanceOf_js__WEBPACK_IMPORTED_MODULE_0__.isHTMLElement)(element) || !(0,_dom_utils_getNodeName_js__WEBPACK_IMPORTED_MODULE_1__.default)(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}", "title": "" }, { "docid": "5e956b1590a9594d1a3e1c6c1ebd56c0", "score": "0.6639677", "text": "function applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!(0,_dom_utils_instanceOf_js__WEBPACK_IMPORTED_MODULE_0__.isHTMLElement)(element) || !(0,_dom_utils_getNodeName_js__WEBPACK_IMPORTED_MODULE_1__.default)(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}", "title": "" }, { "docid": "5e956b1590a9594d1a3e1c6c1ebd56c0", "score": "0.6639677", "text": "function applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!(0,_dom_utils_instanceOf_js__WEBPACK_IMPORTED_MODULE_0__.isHTMLElement)(element) || !(0,_dom_utils_getNodeName_js__WEBPACK_IMPORTED_MODULE_1__.default)(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}", "title": "" }, { "docid": "5e956b1590a9594d1a3e1c6c1ebd56c0", "score": "0.6639677", "text": "function applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!(0,_dom_utils_instanceOf_js__WEBPACK_IMPORTED_MODULE_0__.isHTMLElement)(element) || !(0,_dom_utils_getNodeName_js__WEBPACK_IMPORTED_MODULE_1__.default)(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}", "title": "" }, { "docid": "7bfd079822a31dd1d1e42023a099c834", "score": "0.6634684", "text": "function applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!(0,_dom_utils_instanceOf_js__WEBPACK_IMPORTED_MODULE_0__.isHTMLElement)(element) || !(0,_dom_utils_getNodeName_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}", "title": "" }, { "docid": "7bfd079822a31dd1d1e42023a099c834", "score": "0.6634684", "text": "function applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!(0,_dom_utils_instanceOf_js__WEBPACK_IMPORTED_MODULE_0__.isHTMLElement)(element) || !(0,_dom_utils_getNodeName_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}", "title": "" }, { "docid": "7bfd079822a31dd1d1e42023a099c834", "score": "0.6634684", "text": "function applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!(0,_dom_utils_instanceOf_js__WEBPACK_IMPORTED_MODULE_0__.isHTMLElement)(element) || !(0,_dom_utils_getNodeName_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}", "title": "" }, { "docid": "30d102fb5469eb7ac19257be9c4e6537", "score": "0.6634192", "text": "function applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!Object(_dom_utils_instanceOf_js__WEBPACK_IMPORTED_MODULE_1__[\"isHTMLElement\"])(element) || !Object(_dom_utils_getNodeName_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}", "title": "" }, { "docid": "30d102fb5469eb7ac19257be9c4e6537", "score": "0.6634192", "text": "function applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!Object(_dom_utils_instanceOf_js__WEBPACK_IMPORTED_MODULE_1__[\"isHTMLElement\"])(element) || !Object(_dom_utils_getNodeName_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}", "title": "" }, { "docid": "5f5a6946f8547b92803652d403397e8d", "score": "0.6623414", "text": "function CSSStylePanel() {}", "title": "" }, { "docid": "712f6247abc5d942a7b8c2194e7a86ec", "score": "0.65775573", "text": "function styles(elm, styles) {\n forOwn(styles, function (value, key) {\n elm.style[key] = String(value);\n });\n}", "title": "" }, { "docid": "dda2c307a36c1e2b1bf9736bdde6cedd", "score": "0.65565145", "text": "get styleElement() {\n if (!this._styleElement) {\n let document = this.inspector.window.document;\n let style = document.createElementNS(XHTML_NS, \"style\");\n style.setAttribute(\"type\", \"text/css\");\n document.documentElement.appendChild(style);\n this._styleElement = style;\n }\n\n return this._styleElement;\n }", "title": "" }, { "docid": "eb780323a91ff38357fbb5896335b53e", "score": "0.65465367", "text": "function jr_ElementSetStyle( object, style_name, style_value, opt_units)\n{\n\t/*\n\t** 10/14/09: Note \"style_value\" could be integer 0 or false\n\t*/\n\tif (style_value === undefined || style_value === null) {\n\t\tif (jr_IsIE) {\n\t\t\tobject.style[style_name]\t= \"\";\n\t\t}\n\t\telse {\n\t\t\tobject.style[style_name]\t= null;\n\t\t}\n\t\t/*\n\t\t** 3/21/2010 Note: delete of attribute or setting to 'undefined'\n\t\t** doesn't have any effect.\n\t\t*/\n\t}\n\telse {\n\t\tif (opt_units !== undefined) {\n\t\t\tstyle_value\t\t= String( style_value) + opt_units;\n\t\t}\n\t\telse if (jr_IsPixelStyle[ style_name] && typeof style_value == \"number\") {\n\t\t\tstyle_value\t\t= String( style_value) + \"px\";\n\t\t}\n\t\telse if (jr_IsIE) {\n\t\t\tif (style_value == \"lightgray\") {\n\t\t\t\tthrow new Error( \"'lightgray' is not a valid color in IE. Use 'lightgrey'\");\n\t\t\t}\n\t\t\telse if (style_value == \"grey\") {\n\t\t\t\tthrow new Error( \"'grey' is not a valid color in IE. Use 'gray'\");\n\t\t\t}\n\t\t}\n\t\tobject.style[style_name]\t= style_value;\n\t}\n}", "title": "" }, { "docid": "63e80a3a3d6affda2b3f836ff5d01424", "score": "0.65452296", "text": "function _setCssForElements(width, height)\n {\n var rootElementCss = {\n width: width + 'px',\n height: height + 'px',\n position: 'absolute',\n overflow: 'hidden',\n backgroundColor: 'rgba(0,0,0,1)',\n direction: 'ltr', '-ms-touch-action': 'none'\n };\n\n var eventCapturingElementCss = {\n width: width + 'px',\n height: height + 'px',\n position: 'absolute',\n backgroundColor: 'rgba(0,0,0,0)',\n webkitTapHighlightColor: 'rgba(0,0,0,1)',\n tabIndex: 0,\n '-ms-touch-action': 'none'\n };\n\n // These options are mainly here for the case where there are multiple\n // instances of the SharedImmersiveViewer on the same page.\n if (options.top)\n {\n rootElementCss.top = options.top + 'px';\n eventCapturingElementCss.top = options.top + 'px';\n }\n\n if (options.left)\n {\n rootElementCss.left= options.left + 'px';\n eventCapturingElementCss.left = options.left + 'px';\n }\n\n Utils.css(rootElement, rootElementCss);\n Utils.css(eventCapturingElement, eventCapturingElementCss);\n }", "title": "" }, { "docid": "499cd0006368ae8a6b5a01b2f244c526", "score": "0.6431028", "text": "set customStyles(value) {}", "title": "" }, { "docid": "e890f64fa5a7ad7a641213f41e0c73f3", "score": "0.6409135", "text": "updateStyle() {\n this._styling(this._elRef, this);\n }", "title": "" }, { "docid": "e890f64fa5a7ad7a641213f41e0c73f3", "score": "0.6409135", "text": "updateStyle() {\n this._styling(this._elRef, this);\n }", "title": "" }, { "docid": "e890f64fa5a7ad7a641213f41e0c73f3", "score": "0.6409135", "text": "updateStyle() {\n this._styling(this._elRef, this);\n }", "title": "" }, { "docid": "e3c1ab1831de947d477596d17198a62f", "score": "0.6374211", "text": "get style() {}", "title": "" }, { "docid": "b9305db735991068ffd9b8ca06beec60", "score": "0.6369294", "text": "function _$(t,e){var n=Object.keys(e);n.forEach(function(r){t.style[r]=e[r]})}", "title": "" }, { "docid": "0a04e8864a252785b05f38ff597404b2", "score": "0.6355052", "text": "get customStyles() {}", "title": "" }, { "docid": "c3ef1f9229593de50c33fd2e20b99eb5", "score": "0.63524455", "text": "css(el, styles) {\n if ('string' === typeof styles) {\n return global.getComputedStyle(el).getPropertyValue(styles);\n }\n\n Object.keys(styles).forEach((key) => {\n el.style[key] = styles[key];\n });\n return el;\n }", "title": "" }, { "docid": "3a5abb7bf8ccc0cb365ec592b41b19e8", "score": "0.63117176", "text": "function addStyle(element, style) {\r\n\t var elemStyle = element.style;\r\n\t var name;\r\n\t for (name in style) {\r\n\t elemStyle[name] = style[name];\r\n\t }\r\n\t }", "title": "" }, { "docid": "fb244a77d94b45499396dffce706be77", "score": "0.62985873", "text": "function setStyle(aIdElement, aClasse) {\r\n\r\n\taIdElement.className = aClasse;\r\n\r\n}", "title": "" }, { "docid": "974b36a2cda579e55acc9667ee6d0121", "score": "0.62949824", "text": "function addStyle(element) {\n element.style.border = \"3px solid #FFE81F\";\n element.style.boxShadow = \"inset 0 0 1em gold, 0 0 2em #FFE81F\";\n element.style.backgroundColor = \"rgba(255, 255, 255, 0.7)\";\n}", "title": "" }, { "docid": "af9eb1d87d8b9f7a4fb4f9808fc89763", "score": "0.6290503", "text": "function setStyle(elem, name, value) {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n elem.style[getPrefixedName(name)] = value;\r\n }", "title": "" }, { "docid": "c676c7a9ce2fe90f9046f0ff8230f2dc", "score": "0.6267793", "text": "setElementClass(element,classString){let root=StyleUtil.wrap(element).getRootNode(),classes=classString?classString.split(/\\s/):[],scopeName=root.host&&root.host.localName;// If no scope, try to discover scope name from existing class.\n// This can occur if, for example, a template stamped element that\n// has been scoped is manipulated when not in a root.\nif(!scopeName){var classAttr=element.getAttribute(\"class\");if(classAttr){let k$=classAttr.split(/\\s/);for(let i=0;i<k$.length;i++){if(k$[i]===_styleTransformer.default.SCOPE_NAME){scopeName=k$[i+1];break}}}}if(scopeName){classes.push(_styleTransformer.default.SCOPE_NAME,scopeName)}if(!_styleSettings.nativeCssVariables){let styleInfo=_styleInfo.default.get(element);if(styleInfo&&styleInfo.scopeSelector){classes.push(_styleProperties.default.XSCOPE_NAME,styleInfo.scopeSelector)}}StyleUtil.setElementClassRaw(element,classes.join(\" \"))}", "title": "" }, { "docid": "6fe21dc7e42736b82f556922001ae440", "score": "0.6259035", "text": "function setStyle(style) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var _options$element = options.element,\n element = _options$element === void 0 ? document.body : _options$element;\n var oldStyle = {};\n var styleKeys = Object.keys(style); // IE browser compatible\n\n styleKeys.forEach(function (key) {\n oldStyle[key] = element.style[key];\n });\n styleKeys.forEach(function (key) {\n element.style[key] = style[key];\n });\n return oldStyle;\n}", "title": "" }, { "docid": "6fe21dc7e42736b82f556922001ae440", "score": "0.6259035", "text": "function setStyle(style) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var _options$element = options.element,\n element = _options$element === void 0 ? document.body : _options$element;\n var oldStyle = {};\n var styleKeys = Object.keys(style); // IE browser compatible\n\n styleKeys.forEach(function (key) {\n oldStyle[key] = element.style[key];\n });\n styleKeys.forEach(function (key) {\n element.style[key] = style[key];\n });\n return oldStyle;\n}", "title": "" }, { "docid": "357cb13ae436eed9c9f9de8f73c7e18e", "score": "0.62573504", "text": "function applyStyles(element, styles) {\n Object.keys(styles).forEach(styleProperty => {\n element.style[styleProperty] = styles[styleProperty];\n });\n}", "title": "" }, { "docid": "d8faa0ef5f694ead6e7350a9244f444b", "score": "0.62503576", "text": "function makeStyleInline (el, list) {\n var s = getElementStyle(el, list);\n if (s) {\n el.setAttribute('style', s);\n }\n}", "title": "" }, { "docid": "0ed5389f1a3339804f3c276391276119", "score": "0.62494063", "text": "function setCss(elem, name, value) {\n elem.style[name] = value;\n}", "title": "" }, { "docid": "4dcc9741fe2cbb47c833bd0a7b4cb651", "score": "0.6244916", "text": "_setStyles(element) {\n const positions = this._inkBarPositioner(element);\n const inkBar = this._elementRef.nativeElement;\n inkBar.style.left = positions.left;\n inkBar.style.width = positions.width;\n }", "title": "" }, { "docid": "8292ae19c430483b722bcc63583c2274", "score": "0.62447244", "text": "static get styles() {\n return [(0, _litElement.css)`\n :host {\n display: block;\n }\n `];\n }", "title": "" }, { "docid": "aa19ba04c507ddb7803c4647dbd1b73d", "score": "0.6240239", "text": "function setStyle(element, text) {\n element.setAttribute(\"style\", text);\n element.style.cssText = text;\n }", "title": "" }, { "docid": "63da1f9f3f63a8215191350008c46d33", "score": "0.6234066", "text": "function applyStyle(el, name, style) {\n // MathML elements inherit from Element, which does not have style. We cannot\n // do `instanceof HTMLElement` / `instanceof SVGElement`, since el can belong\n // to a different document, so just check that it has a style.\n assert(\"style\" in el);\n const elStyle = el.style;\n if (typeof style === \"string\") {\n elStyle.cssText = style;\n }\n else {\n elStyle.cssText = \"\";\n for (const prop in style) {\n if (has(style, prop)) {\n setStyleValue(elStyle, prop, style[prop]);\n }\n }\n }\n}", "title": "" }, { "docid": "3fda382282efbb8791e6fb21be0bc839", "score": "0.6232593", "text": "function Bs(t,e){var n=Object.keys(e);n.forEach(function(r){t.style[r]=e[r]})}", "title": "" }, { "docid": "290abcc28081c6e90854d7e0253b2060", "score": "0.6226234", "text": "function applyStyle(element,styleProperty,value) {\n element.style[styleProperty] = value;\n }", "title": "" }, { "docid": "360f12b8c5e92174b96c1dc2a7fe082c", "score": "0.6216414", "text": "update() {\n this.element.setAttribute('style', this.getStyleString())\n return false\n }", "title": "" }, { "docid": "9f5b09ec8ee6e62025b458544f6afc4c", "score": "0.62080514", "text": "function setStyle(elem, prop, value) {\n var style = elem.getAttribute('style'),\n result = { },\n attr = (style || '').split(';'),\n rule,\n ndx,\n prop;\n\n result[prop] = value;\n for (ndx = 0; ndx < attr.length; ndx += 1) {\n rule = attr[ndx].split(':');\n prop = rule.splice(0, 1)[0];\n if (prop) {\n result[prop] = rule.join(':');\n }\n }\n\n style = [ ];\n for (ndx in result) {\n if (ndx && result.hasOwnProperty(ndx)) {\n style.push(ndx + ': ' + result[ndx]);\n }\n }\n return style.join(';');\n }", "title": "" }, { "docid": "40321ca7cfe0800ababf1bb11c08e72e", "score": "0.6198495", "text": "$updateCss() {\n const supported = [\n \"border\",\n \"borderRadius\",\n \"borderWidth\",\n \"borderColor\",\n \"backgroundColor\",\n ];\n const style = this.impl.style;\n for (let n = 0; n < supported.length; n++) {\n const o = supported[n];\n const v = this.css[o];\n if (v) {\n style[o] = v;\n this.css[o] = null;\n }\n }\n }", "title": "" }, { "docid": "dc1cc4079415b6e817f8f5d4cf63e71f", "score": "0.61847615", "text": "function setStyle_setStyle(style) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var _options$element = options.element,\n element = _options$element === void 0 ? document.body : _options$element;\n var oldStyle = {};\n var styleKeys = Object.keys(style); // IE browser compatible\n\n styleKeys.forEach(function (key) {\n oldStyle[key] = element.style[key];\n });\n styleKeys.forEach(function (key) {\n element.style[key] = style[key];\n });\n return oldStyle;\n}", "title": "" }, { "docid": "62ac38f38bd2af7ef8549fd7df25ee21", "score": "0.61835426", "text": "function css(el, prop) {\r\n\t for (var n in prop)\r\n\t el.style[vendor(el, n)||n] = prop[n]\r\n\r\n\t return el\r\n\t }", "title": "" }, { "docid": "13be620af55dd7c573071ef024924ac8", "score": "0.617547", "text": "assignStyles() {\n this.$el.find('.js-type-setting').each((index, item)=> {\n _.assign(this.styles.children, this.createStyles($(item).attr('id'), $(item).attr('data-selector')));\n if ($(item).attr('id') === 'Paragraph') {\n _.assign(this.styles.children, this.createStyles($(item).attr('id'), 'html,li,td,th,label,input,textarea,select,span.readonly'));\n }\n });\n }", "title": "" }, { "docid": "20399cc3a1520e6c2af6bbf632617b93", "score": "0.6172699", "text": "setStyle(style) {\n this.style = style;\n }", "title": "" }, { "docid": "91b395227092433fdefffbbe77df71f0", "score": "0.61640066", "text": "function css (el, prop) {\n\t for (var n in prop) {\n\t el.style[vendor(el, n) || n] = prop[n]\n\t }\n\t\n\t return el\n\t }", "title": "" }, { "docid": "76932bdd4185561bc6a6c5ed3f44b059", "score": "0.6135801", "text": "htmlCss(styles) {\n const wrapper = this, element = wrapper.element, \n // When setting or unsetting the width style, we need to update\n // transform (#8809)\n isSettingWidth = (element.tagName === 'SPAN' &&\n styles &&\n 'width' in styles), textWidth = pick(isSettingWidth && styles.width, void 0);\n let doTransform;\n if (isSettingWidth) {\n delete styles.width;\n wrapper.textWidth = textWidth;\n doTransform = true;\n }\n if (styles && styles.textOverflow === 'ellipsis') {\n styles.whiteSpace = 'nowrap';\n styles.overflow = 'hidden';\n }\n wrapper.styles = extend(wrapper.styles, styles);\n css(wrapper.element, styles);\n // Now that all styles are applied, to the transform\n if (doTransform) {\n wrapper.htmlUpdateTransform();\n }\n return wrapper;\n }", "title": "" }, { "docid": "0366405b9aa7d649d0f313f2e142f6f6", "score": "0.613345", "text": "function setStyleAttribute$1(styles) {\n requestAnimationFrame(() => {\n styles.forEach((style) => {\n setStyleAttribute(style.element, style.attrs);\n });\n });\n}", "title": "" }, { "docid": "a2b24369abb21c50beb334012e1a5e37", "score": "0.6129758", "text": "function changestyle(){\r\n let el_arr = [...arguments];\r\n let prop = el_arr.shift()\r\n let style_val = el_arr.shift()\r\n el_arr.forEach(el=>{\r\n el.style[prop] = style_val\r\n })\r\n}", "title": "" }, { "docid": "9a2dfbcbdacfc38b824687bf3ff9ad8d", "score": "0.61236316", "text": "function addStyle(Component){for(var _len2=arguments.length,styleVariant=Array(_len2>1?_len2-1:0),_key2=1;_key2<_len2;_key2++){styleVariant[_key2-1]=arguments[_key2];}bsStyles(styleVariant,Component);}", "title": "" }, { "docid": "a160d1f66fffc2741b3eaff105db159c", "score": "0.61235946", "text": "style(arg1) {\n /** Create new element */\n const style = new strapped.Style();\n \n /** Add to last container of indicated type */\n if ( typeof arg1 == 'string' && arg1.length > 0 )\n this.last(arg1).append(style);\n else\n this.last('Head').append(style);\n \n /** Allow for call chaining */\n return style;\n }", "title": "" }, { "docid": "af54b86237f429f4754a250938ec3dd1", "score": "0.6111319", "text": "function add_css$2() {\n\t var style = element(\"style\");\n\t style.id = \"svelte-ux0sbr-style\";\n\t style.textContent = \".listContainer.svelte-ux0sbr{box-shadow:var(--listShadow, 0 2px 3px 0 rgba(44, 62, 80, 0.24));border-radius:var(--listBorderRadius, 4px);max-height:var(--listMaxHeight, 250px);overflow-y:auto;background:var(--listBackground, #fff)}.virtualList.svelte-ux0sbr{height:var(--virtualListHeight, 200px)}.listGroupTitle.svelte-ux0sbr{color:var(--groupTitleColor, #8f8f8f);cursor:default;font-size:var(--groupTitleFontSize, 12px);font-weight:var(--groupTitleFontWeight, 600);height:var(--height, 42px);line-height:var(--height, 42px);padding:var(--groupTitlePadding, 0 20px);text-overflow:ellipsis;overflow-x:hidden;white-space:nowrap;text-transform:var(--groupTitleTextTransform, uppercase)}.empty.svelte-ux0sbr{text-align:var(--listEmptyTextAlign, center);padding:var(--listEmptyPadding, 20px 0);color:var(--listEmptyColor, #78848F)}\";\n\t append(document.head, style);\n\t}", "title": "" }, { "docid": "82485d04eede9fec8f003e6400585553", "score": "0.61046153", "text": "GetStyle() {}", "title": "" }, { "docid": "e56f3df06e158e064572d93dbc935cd2", "score": "0.609778", "text": "function elementStyle(index, value) {\n if (value !== NO_CHANGE) {\n // TODO: This is a naive implementation which simply writes value to the `style`. In the future\n // we will add logic here which would work with the animation code.\n var lElement = data[index];\n if (isProceduralRenderer(renderer)) {\n renderer.setProperty(lElement.native, 'style', value);\n }\n else {\n var style = lElement.native['style'];\n for (var i = 0, keys = Object.keys(value); i < keys.length; i++) {\n var styleName = keys[i];\n var styleValue = value[styleName];\n styleValue == null ? style.removeProperty(styleName) :\n style.setProperty(styleName, styleValue);\n }\n }\n }\n}", "title": "" }, { "docid": "27c8cd626f2b42a511cb6fab45e1338a", "score": "0.609161", "text": "static get styles() {\n return \"\";\n }", "title": "" }, { "docid": "a6ad4e35fb6389da25b6742ba346e7f4", "score": "0.6087242", "text": "function setStyle$1(style) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n if (!style) {\n return {};\n }\n\n var _options$element = options.element,\n element = _options$element === void 0 ? document.body : _options$element;\n var oldStyle = {};\n var styleKeys = Object.keys(style); // IE browser compatible\n\n styleKeys.forEach(function (key) {\n oldStyle[key] = element.style[key];\n });\n styleKeys.forEach(function (key) {\n element.style[key] = style[key];\n });\n return oldStyle;\n}", "title": "" }, { "docid": "0f735809a92fdb5445d89715cd08e4f4", "score": "0.6085884", "text": "set css(val) {\n if (this.vueMeta) {\n if (this.isVueMeta23) {\n this.applyVueMeta23();\n }\n\n return;\n }\n\n this.checkOrCreateStyleElement() && (this.styleEl.innerHTML = val);\n }", "title": "" }, { "docid": "07ef04e2b24aced9d8e271e26f4a5db2", "score": "0.6083568", "text": "function processNewStyle(el,key)\n {\n return Object.defineProperty(el.style,key,descriptorInlineStyle(el,key));\n }", "title": "" }, { "docid": "b0c83cc73da550ba90a801b478d3ad15", "score": "0.60744107", "text": "function AddStyleToHtml() {\n //create style elemnt to add css info on head\n var styleElemnt = document.createElement('style');\n var cssStyleRaw = jsonpObject.data.css; //get the raw style\n //change appearance of backBt\n cssStyleRaw= changeBackButtonMaxWidth(cssStyleRaw);\n styleElemnt.setAttribute(\"type\", \"text/css\"); //set the type\n //get the head to append\n var headElemnt = document.getElementsByTagName('head')[0];\n headElemnt.appendChild(styleElemnt);\n //this is relevent for different browsers\n if (styleElemnt.styleSheet) { // IE\n styleElemnt.styleSheet.innerHTML = cssStyleRaw;\n } else { // the world\n var tt1 = document.createTextNode(cssStyleRaw);\n styleElemnt.appendChild(tt1);\n }\n}", "title": "" }, { "docid": "3f05ec7de7f90efc4a09bdab006b0136", "score": "0.60655475", "text": "function set(element) {\n\t\t\tvar styles = [];\n\t\t\tfor (var key in this) {\n\t\t\t\tif (key !== 'props') {\n\t\t\t\t\tstyles.push(key + ':' + this[key]);\n\t\t\t\t}\n\t\t\t}\n\t\t\telement.style.cssText = styles.join(';') + ';';\n\t\t}", "title": "" }, { "docid": "9609a246d37dcf6cc2deab38f5d6f51b", "score": "0.60629475", "text": "function elementStyling(classDeclarations, styleDeclarations, styleSanitizer) {\n var lElement = currentElementNode;\n var tNode = lElement.tNode;\n if (!tNode.stylingTemplate) {\n // initialize the styling template.\n tNode.stylingTemplate =\n createStylingContextTemplate(classDeclarations, styleDeclarations, styleSanitizer);\n }\n if (styleDeclarations && styleDeclarations.length ||\n classDeclarations && classDeclarations.length) {\n elementStylingApply(tNode.index - HEADER_OFFSET);\n }\n }", "title": "" }, { "docid": "5c8151c8d2b69afc0e85da5dcb03f166", "score": "0.6056693", "text": "function setStyle(native, prop, value, renderer, sanitizer, store, playerBuilder) {\n value = sanitizer && value ? sanitizer(prop, value) : value;\n if (store || playerBuilder) {\n if (store) {\n store.setValue(prop, value);\n }\n if (playerBuilder) {\n playerBuilder.setValue(prop, value);\n }\n }\n else if (value) {\n value = value.toString(); // opacity, z-index and flexbox all have number values which may not\n // assign as numbers\n ngDevMode && ngDevMode.rendererSetStyle++;\n isProceduralRenderer(renderer) ?\n renderer.setStyle(native, prop, value, RendererStyleFlags3.DashCase) :\n native.style.setProperty(prop, value);\n }\n else {\n ngDevMode && ngDevMode.rendererRemoveStyle++;\n isProceduralRenderer(renderer) ?\n renderer.removeStyle(native, prop, RendererStyleFlags3.DashCase) :\n native.style.removeProperty(prop);\n }\n }", "title": "" }, { "docid": "8fb177e0217930d88881f4b6546131b3", "score": "0.6054593", "text": "function setStyle(native, prop, value, renderer, sanitizer, store, playerBuilder) {\n value = sanitizer && value ? sanitizer(prop, value) : value;\n if (store || playerBuilder) {\n if (store) {\n store.setValue(prop, value);\n }\n if (playerBuilder) {\n playerBuilder.setValue(prop, value);\n }\n }\n else if (value) {\n value = value.toString(); // opacity, z-index and flexbox all have number values which may not\n // assign as numbers\n ngDevMode && ngDevMode.rendererSetStyle++;\n isProceduralRenderer(renderer) ?\n renderer.setStyle(native, prop, value, RendererStyleFlags3.DashCase) :\n native['style'].setProperty(prop, value);\n }\n else {\n ngDevMode && ngDevMode.rendererRemoveStyle++;\n isProceduralRenderer(renderer) ?\n renderer.removeStyle(native, prop, RendererStyleFlags3.DashCase) :\n native['style'].removeProperty(prop);\n }\n}", "title": "" }, { "docid": "8fb177e0217930d88881f4b6546131b3", "score": "0.6054593", "text": "function setStyle(native, prop, value, renderer, sanitizer, store, playerBuilder) {\n value = sanitizer && value ? sanitizer(prop, value) : value;\n if (store || playerBuilder) {\n if (store) {\n store.setValue(prop, value);\n }\n if (playerBuilder) {\n playerBuilder.setValue(prop, value);\n }\n }\n else if (value) {\n value = value.toString(); // opacity, z-index and flexbox all have number values which may not\n // assign as numbers\n ngDevMode && ngDevMode.rendererSetStyle++;\n isProceduralRenderer(renderer) ?\n renderer.setStyle(native, prop, value, RendererStyleFlags3.DashCase) :\n native['style'].setProperty(prop, value);\n }\n else {\n ngDevMode && ngDevMode.rendererRemoveStyle++;\n isProceduralRenderer(renderer) ?\n renderer.removeStyle(native, prop, RendererStyleFlags3.DashCase) :\n native['style'].removeProperty(prop);\n }\n}", "title": "" }, { "docid": "8fb177e0217930d88881f4b6546131b3", "score": "0.6054593", "text": "function setStyle(native, prop, value, renderer, sanitizer, store, playerBuilder) {\n value = sanitizer && value ? sanitizer(prop, value) : value;\n if (store || playerBuilder) {\n if (store) {\n store.setValue(prop, value);\n }\n if (playerBuilder) {\n playerBuilder.setValue(prop, value);\n }\n }\n else if (value) {\n value = value.toString(); // opacity, z-index and flexbox all have number values which may not\n // assign as numbers\n ngDevMode && ngDevMode.rendererSetStyle++;\n isProceduralRenderer(renderer) ?\n renderer.setStyle(native, prop, value, RendererStyleFlags3.DashCase) :\n native['style'].setProperty(prop, value);\n }\n else {\n ngDevMode && ngDevMode.rendererRemoveStyle++;\n isProceduralRenderer(renderer) ?\n renderer.removeStyle(native, prop, RendererStyleFlags3.DashCase) :\n native['style'].removeProperty(prop);\n }\n}", "title": "" }, { "docid": "8fb177e0217930d88881f4b6546131b3", "score": "0.6054593", "text": "function setStyle(native, prop, value, renderer, sanitizer, store, playerBuilder) {\n value = sanitizer && value ? sanitizer(prop, value) : value;\n if (store || playerBuilder) {\n if (store) {\n store.setValue(prop, value);\n }\n if (playerBuilder) {\n playerBuilder.setValue(prop, value);\n }\n }\n else if (value) {\n value = value.toString(); // opacity, z-index and flexbox all have number values which may not\n // assign as numbers\n ngDevMode && ngDevMode.rendererSetStyle++;\n isProceduralRenderer(renderer) ?\n renderer.setStyle(native, prop, value, RendererStyleFlags3.DashCase) :\n native['style'].setProperty(prop, value);\n }\n else {\n ngDevMode && ngDevMode.rendererRemoveStyle++;\n isProceduralRenderer(renderer) ?\n renderer.removeStyle(native, prop, RendererStyleFlags3.DashCase) :\n native['style'].removeProperty(prop);\n }\n}", "title": "" }, { "docid": "6cae80388d4f1b75a278893fe7be8b4b", "score": "0.6050013", "text": "function prepareAndStyle() {\n var viewBoxSize = this.config ? this.config.viewBoxSize : config.defaultViewBoxSize;\n angular.forEach({\n 'fit' : '',\n 'height': '100%',\n 'width' : '100%',\n 'preserveAspectRatio': 'xMidYMid meet',\n 'viewBox' : this.element.getAttribute('viewBox') || ('0 0 ' + viewBoxSize + ' ' + viewBoxSize)\n }, function(val, attr) {\n this.element.setAttribute(attr, val);\n }, this);\n\n angular.forEach({\n 'pointer-events' : 'none',\n 'display' : 'block'\n }, function(val, style) {\n this.element.style[style] = val;\n }, this);\n }", "title": "" }, { "docid": "c915eff6ce627e1efe7b5963a21e76fd", "score": "0.6049215", "text": "function setStyle(element, styleName, value) {\n if (!element || !styleName) return;\n\n if (typeof styleName === 'object') {\n for (var prop in styleName) {\n if (styleName.hasOwnProperty(prop)) {\n setStyle(element, prop, styleName[prop]);\n }\n }\n } else {\n styleName = camelCase(styleName);\n if (styleName === 'opacity' && ieVersion < 9) {\n element.style.filter = isNaN(value) ? '' : 'alpha(opacity=' + value * 100 + ')';\n } else {\n element.style[styleName] = value;\n }\n }\n}", "title": "" }, { "docid": "b590ef4bc991d027afc3f17b1fe114f1", "score": "0.6037983", "text": "function add_css$e() {\n var style = element(\"style\");\n style.id = \"svelte-13qih23-style\";\n style.textContent = \".item.svelte-13qih23.svelte-13qih23{padding:10px}.item.svelte-13qih23.svelte-13qih23:not(:first-child){border-top:1px dashed #aaa}.item.svelte-13qih23 div.svelte-13qih23{float:right;text-align:right}\";\n append(document.head, style);\n}", "title": "" }, { "docid": "bb32a85fd81836c1dc3204785c2c979c", "score": "0.60308534", "text": "function applyStyles(obj) {\n var key;\n for (key in obj.styleObj) {\n if (obj.styleObj.hasOwnProperty(key)) {\n if (!obj.element.hasOwnProperty('style')) {\n obj.element.style = {};\n }\n obj.element.style[key] = obj.styleObj[key];\n }\n }\n }", "title": "" }, { "docid": "8775400c74c8650b00b0f6e35d941285", "score": "0.60289305", "text": "function add_css$o() {\n var style = element(\"style\");\n style.id = \"svelte-1fu900w-style\";\n style.textContent = \"label.svelte-1fu900w{color:#666}.option.svelte-1fu900w{margin-bottom:20px}.value.svelte-1fu900w{font-weight:bold;color:#000}input[type='checkbox'].svelte-1fu900w{vertical-align:middle}\";\n append(document.head, style);\n}", "title": "" }, { "docid": "c7af985eb1d759c54e3c504e7ad1a2a0", "score": "0.60250485", "text": "function add_css$4() {\n\tvar style = element(\"style\");\n\tstyle.id = \"svelte-fbmqmu-style\";\n\tstyle.textContent = \"span.svelte-fbmqmu{font-size:inherit;font-family:inherit}\";\n\tappend(document.head, style);\n}", "title": "" }, { "docid": "7622e96a805ca40404bc8b375096e66d", "score": "0.60204506", "text": "setStyle(element) {\n element.style.touchAction = 'element';\n element.style.msTouchAction = 'element';\n element.style.msContentZooming = 'none';\n element.style.msUserSelect = 'none';\n element.style.webkitUserSelect = 'none';\n element.style.position = 'relative';\n element.style.display = 'block';\n }", "title": "" }, { "docid": "ff9c2cd06a51951909cceab3c4ad888f", "score": "0.6016331", "text": "function css (el, prop) {\n for (var n in prop) {\n el.style[vendor(el, n) || n] = prop[n]\n }\n\n return el\n }", "title": "" } ]
708981bb46e478af4035e4b59de1fa1a
Check and move every bug in a smooth manner towards fruits. If overlapping, move the slower bug slightly to the right or left as necessary.
[ { "docid": "fc3c894cfd48383740500a1b16d0132f", "score": "0.76699317", "text": "function moveBugs() {\n\tfor (var i = 0; i < bugs.length; i++) {\n\t\tvar xTranslation;\n\t\tvar yTranslation;\n\n\t\tif (fruits.length > 0) {\n\t\t\tvar fruitNumber = shortestDistance(i);\n\n\t\t\t//Initialize the four approximate corners of the Bug\n\t\t\tvar bL = bugs[i][3];\n\t\t\tvar bT = bugs[i][4];\n\t\t\tvar bR = bugs[i][5];\n\t\t\tvar bB = bugs[i][6];\n\n\t\t\t//Approximate the four corners of the Fruit\n\t\t\tvar fL = fruits[fruitNumber][1];\n\t\t\tvar fR = fL + 30;\n\t\t\tvar fT = fruits[fruitNumber][2];\n\t\t\tvar fB = fT + 30;\n\n\t\t\tif (bL == fL) {\n\t\t\t\txTranslation = 0;\n\t\t\t\tyTranslation = bugs[i][1];\n\t\t\t} else if (bT == fT) {\n\t\t\t\tyTranslation = 0;\n\t\t\t\txTranslation = bugs[i][1];\n\t\t\t\tif (fL < bL) {\n\t\t\t\t\txTranslation = -xTranslation;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tvar distanceAngle = Math.atan((fL-bL)/(fT-bT));\n\t\t\t\txTranslation = bugs[i][1] * Math.sin(distanceAngle);\n\t\t\t\tyTranslation = bugs[i][1] * Math.cos(distanceAngle);\n\t\t\t\tfor (var secondBug = 0; secondBug < bugs.length; secondBug++) {\n\t\t\t\t\t//Check all the bugs and see if any overlap, if so, consider if they are the same, if not, and they are overlapping, change the angle slightly. Continue to do this until none of the bugs are overlapping\n\t\t\t\t\tvar WIDTH = HEIGHT * 0.65;\n\t\t\t\t\tvar a = (bugs[i][3] + (WIDTH / 2)) - (bugs[secondBug][3] + (WIDTH / 2));\n\t\t\t\t\tvar b = (bugs[i][4] + (HEIGHT / 2)) - (bugs[secondBug][4] + (HEIGHT / 2));\n\t\t\t\t\tvar c = Math.sqrt(a * a + b * b);\n\t\t\t\t\tif (c < 20) {\n\t\t\t\t\t\tif (i == secondBug) {\n\t\t\t\t\t\t\t//Do Nothing\n\t\t\t\t\t\t} else if (bugs[i][1] > bugs[secondBug][1]) {\n\t\t\t\t\t\t\t//Also do nothing\n\t\t\t\t\t\t} else if (bugs[i][1] < bugs[secondBug][1]) {\n\t\t\t\t\t\t\t//Increase the xTranslation slightly to move the ant to the right\n\t\t\t\t\t\t\tif (bugs[i][3] < bugs[secondBug][3]) {\n\t\t\t\t\t\t\t\txTranslation -= 2;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\txTranslation += 2;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else if (bugs[i][1] == bugs[secondBug][1]) {\n\t\t\t\t\t\t\t//Increase or decrease the angle\n\t\t\t\t\t\t\tvar angle = Math.floor(Math.random());\n\t\t\t\t\t\t\tif (angle == 0) {\n\t\t\t\t\t\t\t\txTranslation -= 2;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\txTranslation += 2;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (fR < bL && xTranslation > 0) {\n\t\t\t\t\t\t\txTranslation = -xTranslation;\n\t\t\t\t\t\t} else if (bR < fL && xTranslation < 0) {\n\t\t\t\t\t\t\txTranslation = -xTranslation;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (fT < bT) {\n\t\t\t\t\tyTranslation = -yTranslation;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbugs[i][3] = bugs[i][3] + xTranslation;\n\t\t\tbugs[i][5] = bugs[i][3] + (HEIGHT * 0.65);\n\t\t\tbugs[i][4] = bugs[i][4] + yTranslation;\n\t\t\tbugs[i][6] = bugs[i][4] + (HEIGHT);\n\n\t\t\tmakeBug(context, bugs[i][0], 1, bugs[i][3], bugs[i][4]);\n\n\t\t\t//Check if any of the corners of the bug is inside one of the corners of the fruit\n\t\t\tif (collide(bT, bB, bL, bR, fT, fB, fL, fR)) {\n\t\t\t\t\tfruits.splice(fruitNumber, 1);\n\t\t\t}\n\t\t} else {\n\t\t\tlost = true;\n\t\t\tcheckGameOver();\n\t\t}\n\t}\n}", "title": "" } ]
[ { "docid": "77a83f7095287b701986e3dcc1bc209c", "score": "0.6211363", "text": "function shakepuzzle()\n{\n\t// move each piece, row by row, a random amount on x and y axis\n\tfor (i = 0; i < piecerows; i++)\n\t{\n\t\tfor (j = 0; j < piececols; j++)\n\t\t{\n\t\t\t// get current position to make sure future position is still in bounds\n\t\t\tvar xcurr = $(\"#piece\" + i + j).position().left;\n\t\t\tvar ycurr = $(\"#piece\" + i + j).position().top;\n\t\t\t\n\t\t\t// loop to keep pieces inside of boundaries after movement\n\t\t\tdo\n\t\t\t{\n\t\t\t\t// pick a few random numbers to move piece on each axis\n\t\t\t\tvar xmove = Math.floor( (Math.random()*1000)+1) -500;\n\t\t\t\tvar ymove = Math.floor( (Math.random()*1400)+1) -700;\n\n\t\t\t\t//test out new location\n\t\t\t\tvar xnew = xmove + xcurr;\n\t\t\t\tvar ynew = ymove + ycurr;\n\n\t\t\t\t// debug\n\t\t\t\t//console.log(\"xcurr \" + xcurr + \" ycurr \" + ycurr + \" xmove \" + xmove + \" ymove \" + ymove);\n\t\t\t}\n\t\t\twhile (xnew > (photox - piecesize) || xnew < 0 || ynew < 0 || ynew > (photoy - piecesize));\n\n\t\t\n\t\t\t// animate movement! this is fun\t\t\t\n\t\t\t$(\"#piece\" + i + j).animate({top: ymove},1000,\"linear\");\n\t\t\t$(\"#piece\" + i + j).animate({left: xmove},1000,\"linear\");\n\t\t}\n\t}\n}", "title": "" }, { "docid": "7cb10b2607d7dda980731d7915aa5aea", "score": "0.6146532", "text": "function moveLeft(){\r\n undraw()\r\n const isAtLeftEdge = current.some(index => (currentPosition + index)% width ===0)\r\n if(!isAtLeftEdge) currentPosition -=1\r\n if(current.some (index => squares[currentPosition + index].classList.contains('taken'))){\r\n currentPosition +=1\r\n }\r\ndraw()\r\n}", "title": "" }, { "docid": "4b01d1313d773944fc6dd5691bd5f5ea", "score": "0.6080984", "text": "function moveTo(i, j) {\n\tvar isBorderPos = false;\n\t\n\t// set i and J for the passages\n\tif (i < 0 || i >= gBoard.length) {\n\t\tisBorderPos = true;\n\t\ti = Math.abs(Math.abs(i) - gBoard.length);\n\t}\n\tif (j < 0 || j >= gBoard[0].length) {\n\t\tisBorderPos = true;\n\t\tj = Math.abs(Math.abs(j) - gBoard[0].length);\n\t}\n\t// var targetCell = gBoard[i][j];\n\tvar targetCell = gBoard[i][j];\n\tif (targetCell.type === WALL) return;\n\n\t// Calculate distance to ake sure we are moving to a neighbor cell\n\tvar iAbsDiff = Math.abs(i - gGamerPos.i);\n\tvar jAbsDiff = Math.abs(j - gGamerPos.j);\n\n\t// If the clicked Cell is one of the four allowed\n\tif ((iAbsDiff === 1 && jAbsDiff === 0) || (jAbsDiff === 1 && iAbsDiff === 0) || isBorderPos) {\n\t\tgIsGameOn = true;\n\n\n\n\t\t\n\t\tif (targetCell.gameElement === BALL) {\n\t\t\tconsole.log('Collecting!');\n\t\t\t//Show how many balls were collected\n\t\t\tgColector = document.querySelector('.colector');\n\t\t\t\n\t\t\tgColector.innerText++;\n\t\t\tif (+gColector.innerText === gBallsToCollect) {\n\t\t\t\t// console.log('game over elad')\n\t\t\t\tgameOver();\n\t\t\t}\n\t\t}\n\t\t\n\t\t// MOVING\n\t\tgBoard[gGamerPos.i][gGamerPos.j].gameElement = null;\n\t\trenderCell(gGamerPos, '');\n\t\tgGamerPos.i = i;\n\t\tgGamerPos.j = j;\n\t\tgBoard[gGamerPos.i][gGamerPos.j].gameElement = GAMER;\n\t\trenderCell(gGamerPos, GAMER_IMG);\n\t\tisBorderPos = false;\n\n\t} // else console.log('TOO FAR', iAbsDiff, jAbsDiff);\n\n}", "title": "" }, { "docid": "71d337c9b5779eb96df7d52bbbc52187", "score": "0.603617", "text": "move(foodLocation) {\n this._setNewSpeed();\n\n let temp = Object.assign({}, this.positions[0]);\n\n temp.x += this.speed.xspeed;\n temp.y += this.speed.yspeed;\n\n if (this.positions\n .filter(pos => pos.x === temp.x && pos.y === temp.y).length > 0 ||\n temp.x < 0 || this.boardWidth <= temp.x ||\n temp.y < 0 || this.boardHeight <= temp.y\n ) {\n this.gameOver = true;\n }\n if (this.gameOver) return;\n\n\n this.positions.unshift(temp)\n\n let distToFood = Math.sqrt(\n Math.pow(this.positions[0].x - foodLocation.x, 2) +\n Math.pow(this.positions[0].y - foodLocation.y, 2)\n );\n if (distToFood === 0) {\n return true;\n } else {\n this.positions.pop();\n return false;\n }\n }", "title": "" }, { "docid": "f3b24a56d964644edad76060578d44e0", "score": "0.601418", "text": "function moveShape(scrollPoint) {\n \n var left = false;\n var right = false;\n\n var leftmost = BlockShapePosX[0];\n var rightmost = BlockShapePosX[0];\n\n var leftmostIndex = 0;\n var rightmostIndex = 0;\n\n for (var i = 0; i < shape.length; i++) {\n if (BlockShapePosX[i] < leftmost) {\n leftmostIndex = i;\n leftmost = BlockShapePosX[i];\n }\n if (BlockShapePosX[i] > rightmost) {\n rightmostIndex = i;\n rightmost = BlockShapePosX[i];\n }\n }\n\n // if touch x position less than leftmost block in shape then move left\n if (scrollPoint.x < (gridCellX[BlockGridPosX[leftmostIndex]])) {\n if ((leftmost + currentX) > 0) {\n left = true;\n }\n else {\n left = false;\n }\n }\n else {\n left = false;\n }\n // if touch x position greater than rightmost block in shape then move right\n if (scrollPoint.x > (gridCellX[BlockGridPosX[rightmostIndex]] + (canvas.width/ xGridAmount))) {\n if ((rightmost + currentX) < xGridAmount - 1) {\n right = true;\n }\n else {\n right = false;\n }\n }\n else {\n right = false;\n }\n\n // conditions stop player going out of bounds or into another shape\n for (var i = 0; i < shape.length; i++) {\n if (BlockGridPosX[i] - 1 > 0) {\n if (gridCellOccupied[BlockGridPosX[i] - 1][BlockGridPosY[i]] == true) {\n left = false;\n }\n }\n\n if (BlockGridPosX[i] + 1 < xGridAmount - 1) {\n if (gridCellOccupied[BlockGridPosX[i] + 1][BlockGridPosY[i]] == true) {\n right = false;\n }\n }\n }\n\n // applying change to x, reseting wallkick value if moved\n if (left == true) {\n currentX--;\n currentChangeX = 0;\n }\n if (right == true) {\n currentX++;\n currentChangeX = 0;\n }\n}", "title": "" }, { "docid": "48b02911244fb3371ac12286a87b797d", "score": "0.6008829", "text": "function offensive_move() {\n \n if ($(cells[left_upper_cell]).hasClass(machine_clicked)) {\n if ($(cells[upper_center_cell]).hasClass(machine_clicked) && $(cells[right_upper_cell]).hasClass(empty_cell)) return right_upper_cell;\n if ($(cells[right_upper_cell]).hasClass(machine_clicked) && $(cells[upper_center_cell]).hasClass(empty_cell)) return upper_center_cell;\n if ($(cells[left_center_cell]).hasClass(machine_clicked) && $(cells[left_lower_cell]).hasClass(empty_cell)) return left_lower_cell;\n\n \n if ($(cells[left_lower_cell]).hasClass(machine_clicked) && $(cells[left_center_cell]).hasClass(empty_cell)) return left_center_cell;\n if ($(cells[center_cell]).hasClass(machine_clicked) && $(cells[right_lower_cell]).hasClass(empty_cell)) return right_lower_cell;\n if ($(cells[right_lower_cell]).hasClass(machine_clicked) && $(cells[center_cell]).hasClass(empty_cell)) return center_cell;\n }\n\n if ($(cells[upper_center_cell]).hasClass(machine_clicked)) {\n if ($(cells[center_cell]).hasClass(machine_clicked) && $(cells[lower_center_cell]).hasClass(empty_cell)) return lower_center_cell;\n if ($(cells[lower_center_cell]).hasClass(machine_clicked) && $(cells[center_cell]).hasClass(empty_cell)) return center_cell;\n }\n\n if ($(cells[left_center_cell]).hasClass(machine_clicked)) {\n if ($(cells[center_cell]).hasClass(machine_clicked) && $(cells[right_center_cell]).hasClass(empty_cell)) return right_center_cell;\n if ($(cells[right_center_cell]).hasClass(machine_clicked) && $(cells[center_cell]).hasClass(empty_cell)) return center_cell;\n }\n\n if ($(cells[right_upper_cell]).hasClass(machine_clicked)) {\n if ($(cells[center_cell]).hasClass(machine_clicked) && $(cells[left_lower_cell]).hasClass(empty_cell)) return left_lower_cell;\n if ($(cells[left_lower_cell]).hasClass(machine_clicked) && $(cells[center_cell]).hasClass(empty_cell)) return center_cell;\n if ($(cells[right_center_cell]).hasClass(machine_clicked) && $(cells[right_lower_cell]).hasClass(empty_cell)) return right_lower_cell;\n if ($(cells[right_lower_cell]).hasClass(machine_clicked) && $(cells[right_center_cell]).hasClass(empty_cell)) return right_center_cell;\n }\n\n if ($(cells[left_lower_cell]).hasClass(machine_clicked)) {\n if ($(cells[lower_center_cell]).hasClass(machine_clicked) && $(cells[right_lower_cell]).hasClass(empty_cell)) return right_lower_cell;\n if ($(cells[right_lower_cell]).hasClass(machine_clicked) && $(cells[lower_center_cell]).hasClass(empty_cell)) return lower_center_cell;\n }\n\n if ($(cells[left_upper_cell]).hasClass(empty_cell)) {\n if ($(cells[upper_center_cell]).hasClass(machine_clicked) && $(cells[right_upper_cell]).hasClass(machine_clicked)) return left_upper_cell;\n if ($(cells[center_cell]).hasClass(machine_clicked) && $(cells[right_lower_cell]).hasClass(machine_clicked)) return left_upper_cell;\n if ($(cells[left_center_cell]).hasClass(machine_clicked) && $(cells[left_lower_cell]).hasClass(machine_clicked)) return left_upper_cell;\n }\n\n if ($(cells[left_center_cell]).hasClass(empty_cell) &&\n $(cells[center_cell]).hasClass(machine_clicked) &&\n $(cells[right_center_cell]).hasClass(machine_clicked)) return left_center_cell;\n\n if ($(cells[upper_center_cell]).hasClass(empty_cell) &&\n $(cells[center_cell]).hasClass(machine_clicked) &&\n $(cells[lower_center_cell]).hasClass(machine_clicked)) return upper_center_cell;\n\n if ($(cells[left_lower_cell]).hasClass(empty_cell) &&\n $(cells[lower_center_cell]).hasClass(machine_clicked) &&\n $(cells[right_lower_cell]).hasClass(machine_clicked)) return left_lower_cell;\n\n if ($(cells[right_upper_cell]).hasClass(empty_cell)) {\n if ($(cells[right_center_cell]).hasClass(machine_clicked) && $(cells[right_lower_cell]).hasClass(machine_clicked)) return right_upper_cell;\n if ($(cells[center_cell]).hasClass(machine_clicked) && $(cells[left_lower_cell]).hasClass(machine_clicked)) return right_upper_cell;\n }\n }", "title": "" }, { "docid": "199b5496e6897214e9b7daf34b462454", "score": "0.6007678", "text": "function defensive_move() {\n \n if ($(cells[left_upper_cell]).hasClass(user_clicked)){\n if ($(cells[upper_center_cell]).hasClass(user_clicked) && $(cells[right_upper_cell]).hasClass(empty_cell)) return right_upper_cell;\n if ($(cells[right_upper_cell]).hasClass(user_clicked) && $(cells[upper_center_cell]).hasClass(empty_cell)) return upper_center_cell;\n if ($(cells[left_center_cell]).hasClass(user_clicked) && $(cells[left_lower_cell]).hasClass(empty_cell)) return left_lower_cell;\n if ($(cells[left_lower_cell]).hasClass(user_clicked) && $(cells[left_center_cell]).hasClass(empty_cell)) return left_center_cell;\n if ($(cells[center_cell]).hasClass(user_clicked) && $(cells[right_lower_cell]).hasClass(empty_cell)) return right_lower_cell;\n if ($(cells[right_lower_cell]).hasClass(user_clicked) && $(cells[center_cell]).hasClass(empty_cell)) return center_cell;\n } \n\n if ($(cells[upper_center_cell]).hasClass(user_clicked)){\n if ($(cells[center_cell]).hasClass(user_clicked) && $(cells[lower_center_cell]).hasClass(empty_cell)) return lower_center_cell;\n if ($(cells[lower_center_cell]).hasClass(user_clicked) && $(cells[center_cell]).hasClass(empty_cell)) return center_cell;\n if ($(cells[right_center_cell]).hasClass(user_clicked) && $(cells[right_upper_cell]).hasClass(empty_cell)) return right_upper_cell;\n if ($(cells[left_center_cell]).hasClass(user_clicked) && $(cells[left_upper_cell]).hasClass(empty_cell)) return left_upper_cell;\n }\n\n if ($(cells[lower_center_cell]).hasClass(user_clicked)){\n if ($(cells[right_center_cell]).hasClass(user_clicked) && $(cells[right_lower_cell]).hasClass(empty_cell)) return right_lower_cell;\n if ($(cells[left_center_cell]).hasClass(user_clicked) && $(cells[left_lower_cell]).hasClass(empty_cell)) return left_lower_cell;\n } \n\n if ($(cells[left_center_cell]).hasClass(user_clicked)){\n if ($(cells[center_cell]).hasClass(user_clicked) && $(cells[right_center_cell]).hasClass(empty_cell)) return right_center_cell;\n if ($(cells[right_center_cell]).hasClass(user_clicked) && $(cells[center_cell]).hasClass(empty_cell)) return center_cell;\n } \n\n if ($(cells[left_lower_cell]).hasClass(user_clicked)){\n if ($(cells[lower_center_cell]).hasClass(user_clicked) && $(cells[right_lower_cell]).hasClass(empty_cell)) return right_lower_cell;\n if ($(cells[right_lower_cell]).hasClass(user_clicked) && $(cells[lower_center_cell]).hasClass(empty_cell)) return lower_center_cell;\n } \n\n if ($(cells[right_upper_cell]).hasClass(user_clicked)){\n if ($(cells[center_cell]).hasClass(user_clicked) && $(cells[left_lower_cell]).hasClass(empty_cell)) return left_lower_cell;\n if ($(cells[left_lower_cell]).hasClass(user_clicked) && $(cells[center_cell]).hasClass(empty_cell)) return center_cell;\n if ($(cells[right_center_cell]).hasClass(user_clicked) && $(cells[right_lower_cell]).hasClass(empty_cell)) return right_lower_cell;\n if ($(cells[right_lower_cell]).hasClass(user_clicked) && $(cells[right_center_cell]).hasClass(empty_cell)) return right_center_cell;\n } \n\n if (($(cells[left_upper_cell]).hasClass(empty_cell) && $(cells[upper_center_cell]).hasClass(user_clicked) && $(cells[right_upper_cell]).hasClass(user_clicked)) || \n ($(cells[left_upper_cell]).hasClass(empty_cell) && $(cells[left_center_cell]).hasClass(user_clicked) && $(cells[left_lower_cell]).hasClass(user_clicked)) ||\n ($(cells[left_upper_cell]).hasClass(empty_cell) && $(cells[center_cell]).hasClass(user_clicked) && $(cells[right_lower_cell]).hasClass(user_clicked))) return left_upper_cell;\n\n if ($(cells[upper_center_cell]).hasClass(empty_cell) && $(cells[center_cell]).hasClass(user_clicked) && $(cells[lower_center_cell]).hasClass(user_clicked)) return upper_center_cell;\n\n if ($(cells[left_center_cell]).hasClass(empty_cell) && $(cells[center_cell]).hasClass(user_clicked) && $(cells[right_center_cell]).hasClass(user_clicked)) return left_center_cell; \n\n if ($(cells[left_lower_cell]).hasClass(empty_cell) && $(cells[lower_center_cell]).hasClass(user_clicked) && $(cells[right_lower_cell]).hasClass(user_clicked)) return left_lower_cell;\n\n if (($(cells[right_upper_cell]).hasClass(empty_cell) && $(cells[center_cell]).hasClass(user_clicked) && $(cells[left_lower_cell]).hasClass(user_clicked)) || \n ($(cells[right_upper_cell]).hasClass(empty_cell) && $(cells[right_center_cell]).hasClass(user_clicked) && $(cells[right_lower_cell]).hasClass(user_clicked))) return right_upper_cell;\n \n }", "title": "" }, { "docid": "d8e21dbc23d3fd3f5e49e9fc4dcafbe1", "score": "0.6004973", "text": "function moveWasp() {\n const down = waspCurrentPosition + width\n const left = waspCurrentPosition - 1\n const right = waspCurrentPosition + 1\n const up = waspCurrentPosition - width\n\n checkGhostMode(waspClass, waspCurrentPosition)\n removeGhost(waspCurrentPosition, waspClass)\n\n // checks movement through tunnel\n if (waspCurrentPosition === 55 && waspXGoal > e && waspPreviousPosition !== 65) {\n waspPreviousPosition = waspCurrentPosition\n waspCurrentPosition = 65\n } else if (waspCurrentPosition === 65 && waspXGoal < e && waspPreviousPosition !== 55) {\n waspPreviousPosition = waspCurrentPosition\n waspCurrentPosition = 55\n } else if (waspYGoal > f) {\n // console.log('ghost higher than player') \n if (isDownClear(waspCurrentPosition) === true && down !== waspPreviousPosition && waspCurrentPosition !== 37 && waspCurrentPosition !== 39) { // check tile below is clear, check previous position\n moveCharacter('down', waspClass, waspPreviousPosition, waspCurrentPosition) // move down\n } else { // if below is blocked, do the following\n if (waspXGoal > e) { // if ghost left of player\n // console.log('ghost left of player')\n if (isRightClear(waspCurrentPosition) === true && right !== waspPreviousPosition) { // check tile to right is clear\n moveCharacter('right', waspClass, waspPreviousPosition, waspCurrentPosition) // move right\n } else { // if down and right is blocked\n // console.log('border to right')\n if (isLeftClear(waspCurrentPosition) === true && left !== waspPreviousPosition) { // check tile to left is clear\n moveCharacter('left', waspClass, waspPreviousPosition, waspCurrentPosition) // move left\n } else { // if down, right and left is blocked\n // console.log('border to left')\n if (isUpClear(waspCurrentPosition) === true) { // check tile above is clear\n moveCharacter('up', waspClass, waspPreviousPosition, waspCurrentPosition) // move up\n } \n }\n }\n } else if (waspXGoal < e) { // if ghost is to right of player\n // console.log('ghost to right of player')\n if (isLeftClear(waspCurrentPosition) === true && left !== waspPreviousPosition) { // check tile to left is clear\n moveCharacter('left', waspClass, waspPreviousPosition, waspCurrentPosition) // move left\n } else { // if down and left is blocked\n // console.log('border to left') \n if (isRightClear(waspCurrentPosition) === true && right !== waspPreviousPosition) { // check tile to right is clear\n moveCharacter('right', waspClass, waspPreviousPosition, waspCurrentPosition) // move right\n } else { // if down, left and right is blocked\n // console.log('border below')\n if (isUpClear(waspCurrentPosition) === true) { // check tile above is clear\n moveCharacter('up', waspClass, waspPreviousPosition, waspCurrentPosition) // move up\n }\n }\n }\n } else if (waspXGoal === e) { // if player and ghost are in line on y-axis\n // console.log('ghost directly above player')\n if (isLeftClear(waspCurrentPosition) === true && left !== waspPreviousPosition) { // check if left tile is clear\n moveCharacter('left', waspClass, waspPreviousPosition, waspCurrentPosition) // move left\n } else if (isRightClear(waspCurrentPosition) === true && right !== waspPreviousPosition) { // if down and left are blocked, check if right tile is clear\n moveCharacter('right', waspClass, waspPreviousPosition, waspCurrentPosition) // move right\n } else if (isUpClear(waspCurrentPosition) === true) { // if down, left and right are blocked, check if tile above is clear\n moveCharacter('up', waspClass, waspPreviousPosition, waspCurrentPosition) // move up\n }\n }\n }\n } else if (waspYGoal < f) { // if ghost is below player\n if (isUpClear(waspCurrentPosition) === true && up !== waspPreviousPosition) { // check tile above is clear\n moveCharacter('up', waspClass, waspPreviousPosition, waspCurrentPosition) // move ghost up \n } else { // if above is blocked\n if (waspXGoal > e) { // check if ghost is left of player\n // console.log('ghost left of player')\n if (isRightClear(waspCurrentPosition) === true && right !== waspPreviousPosition) { // check if tile to right is clear\n moveCharacter('right', waspClass, waspPreviousPosition, waspCurrentPosition) // move ghost right\n } else if (isLeftClear(waspCurrentPosition) === true && left !== waspPreviousPosition) { // if above and right is blocked, check left is clear\n moveCharacter('left', waspClass, waspPreviousPosition, waspCurrentPosition) // move ghost left\n } else if (isDownClear(waspCurrentPosition) === true && waspCurrentPosition !== 37 && waspCurrentPosition !== 39) { // if above, right and left is blocked, check down is clear\n moveCharacter('down', waspClass, waspPreviousPosition, waspCurrentPosition) // move ghost down\n } else if (isUpClear(waspCurrentPosition) === true) {\n moveCharacter('up', waspClass, waspPreviousPosition, waspCurrentPosition)\n }\n } else if (waspXGoal < e) { // if ghost is right of player\n if (isLeftClear(waspCurrentPosition) === true && left !== waspPreviousPosition) { // check tile to left is clear\n moveCharacter('left', waspClass, waspPreviousPosition, waspCurrentPosition) // move ghost left\n } else if (isDownClear(waspCurrentPosition) === true && down !== waspPreviousPosition && waspCurrentPosition !== 37 && waspCurrentPosition !== 39) { // if above and left is blocked, check if tile below is clear\n moveCharacter('down', waspClass, waspPreviousPosition, waspCurrentPosition) // move ghost down\n } else if (isRightClear(waspCurrentPosition) === true) { // if above, left and below is blocked, check right is clear\n moveCharacter('right', waspClass, waspPreviousPosition, waspCurrentPosition) // move ghost right\n } else if (isUpClear(waspCurrentPosition) === true) {\n moveCharacter('up', waspClass, waspPreviousPosition, waspCurrentPosition)\n }\n } else if (waspXGoal === e) { // if ghost and player are in line on the y-axis\n if (isLeftClear(waspCurrentPosition) === true && left !== waspPreviousPosition) { // check left tile is clear\n moveCharacter('left', waspClass, waspPreviousPosition, waspCurrentPosition) // move ghost left\n } else if (isRightClear(waspCurrentPosition) === true && right !== scorpianPreviousPosition) { // if above and left tile is blocked, check right is clear\n moveCharacter('right', waspClass, waspPreviousPosition, waspCurrentPosition) // move ghost right\n } else if (isDownClear(waspCurrentPosition) === true && down !== waspPreviousPosition && waspCurrentPosition !== 37 && waspCurrentPosition !== 39) { // if above, left and right tile is blocked, check below is clear \n moveCharacter('down', waspClass, waspPreviousPosition, waspCurrentPosition) // move ghost down\n } else if (isUpClear(waspCurrentPosition) === true) {\n moveCharacter('up', waspClass, waspPreviousPosition, waspCurrentPosition)\n }\n }\n }\n } else if (waspYGoal === f) { // if ghost and player are in line on x-axis\n // console.log('ghost on same horizontal plane as player')\n if (waspXGoal > e) { // if ghost to left of player\n // console.log('ghost left of player')\n if (isRightClear(waspCurrentPosition) === true && right !== waspPreviousPosition) { // check tile to right is clear\n moveCharacter('right', waspClass, waspPreviousPosition, waspCurrentPosition) // move right\n } else if (isLeftClear(waspCurrentPosition) === true && left !== waspPreviousPosition) { // if right is blocked, check tile to left is clear\n moveCharacter('left', waspClass, waspPreviousPosition, waspCurrentPosition) // move left\n } else if (isDownClear(waspCurrentPosition) === true && down !== waspPreviousPosition && waspCurrentPosition !== 37 && waspCurrentPosition !== 39) { // if right and left blocked, check tile below is clear\n moveCharacter('down', waspClass, waspPreviousPosition, waspCurrentPosition) // move down\n } else if (isUpClear(waspCurrentPosition) === true) { // if right, left and down blocked, check tile above is clear\n moveCharacter('up', waspClass, waspPreviousPosition, waspCurrentPosition) // move up\n }\n } else if (waspXGoal < e) { // if ghost to right of player\n // console.log('ghost right of player')\n if (isLeftClear(waspCurrentPosition) === true && left !== waspPreviousPosition) { // check left is clear\n moveCharacter('left', waspClass, waspPreviousPosition, waspCurrentPosition) // move left\n } else if (isDownClear(waspCurrentPosition) === true && down !== waspPreviousPosition && waspCurrentPosition !== 37 && waspCurrentPosition !== 39) { // if left blocked, check down is clear\n // console.log('left not clear')\n moveCharacter('down', waspClass, waspPreviousPosition, waspCurrentPosition) // move down\n } else if (isRightClear(waspCurrentPosition) === true && right !== waspPreviousPosition) { // if left and down blocked, check right is clear\n // console.log('down not clear')\n moveCharacter('right', waspClass, waspPreviousPosition, waspCurrentPosition) // move right\n } else if (isUpClear(waspCurrentPosition) === true) { // if left, down and right blocked, check up is clear\n // console.log('right not clear, moving up')\n moveCharacter('up', waspClass, waspPreviousPosition, waspCurrentPosition) // move up\n }\n }\n } \n \n addGhost(waspCurrentPosition, waspClass)\n if (cells[waspCurrentPosition].classList.contains(playerClass)) {\n touchGhost(playerCurrentPosition)\n if (ghostMode === 'split class' || ghostMode === 'chase class') {\n playerCurrentPosition = playerStartPosition\n }\n }\n setCharacterCoordinates(waspClass, waspCurrentPosition, e, f)\n }", "title": "" }, { "docid": "6f12c2526cd31ca97ac77b18876d9c3c", "score": "0.59997165", "text": "function moveLeft() {\n undraw()\n const isAtLeftEdge = current.some(index => (currentPosition + index) % width === 0)\n\n if(!isAtLeftEdge) currentPosition -=1\n\n if(current.some(index => squares[currentPosition + index].classList.contains('taken'))){\n currentPosition +=1\n }\n draw()\n}", "title": "" }, { "docid": "6832b9c01fd2034b1804da7e44fc29f1", "score": "0.599591", "text": "function movePokemon(event) {\n const pokemonBottom = pokemon.getBoundingClientRect().bottom;\n const pokemonHeight = pokemon.getBoundingClientRect().height;\n const pokemonTop = pokemon.getBoundingClientRect().top;\n const pokemonWidth = pokemon.getBoundingClientRect().width;\n const pokemonLeft = pokemon.getBoundingClientRect().left;\n for(let i=0 ; i < ballList.length; i++)\n {\n const ballBottom = ballList[i].getBoundingClientRect().bottom;\n const ballLeft = ballList[i].getBoundingClientRect().left;\n const ballHeight = ballList[i].getBoundingClientRect().height;\n const ballWidth = ballList[i].getBoundingClientRect().width;\n const ballRight = ballList[i].getBoundingClientRect().right;\n const ballTop = ballList[i].getBoundingClientRect().top;\n if (pokemonLeft + pokemonWidth >= Math.floor(ballLeft)) {\n \n // &&\n // ((pokemon.getBoundingClientRect().bottom + pokemon.getClientRects().height)>=(ball.getBoundingClientRect().bottom + ball.getClientRects().height)))\n if (pokemonBottom + pokemonHeight >= ballBottom + ballHeight) {\n // window.alert(\"caught\");\n if (pokemonLeft <= ballRight) {\n if (pokemonTop <= ballTop + ballHeight) {\n // console.log(\"true in vertical also************\");\n // console.log(\"pokemmonTop\", pokemonTop);\n // console.log(\"balltop\", ballTop);\n // console.log(\"ballHeight\", ballHeight);\n hideball(ballList[i]);\n moveBallRandom(ballList[i]);\n score.innerText = currentScore + 1;\n currentScore++;\n }\n }\n }\n }\n}\n\n var x = event.keyCode;\n\n if (x == 39 && marginLeft < 1450) {\n var value = pokemon.offsetLeft;\n // console.log(value);\n var pokemonPosition = pokemon.offsetLeft;\n\n pokemon.style.marginLeft = marginLeft + \"px\";\n marginLeft += 10;\n } else if (x == 37 && marginLeft > 0) {\n marginLeft -= 10;\n\n pokemon.style.marginLeft = marginLeft + \"px\";\n } else if (x == 38 && marginTop > 0) {\n marginTop -= 10;\n pokemon.style.marginTop = marginTop + \"px\";\n } else if (\n x == 40 &&\n pokemon.offsetTop + pokemon.offsetHeight + 19 < window.innerHeight\n ) {\n console.log(\"offTop\", pokemon.offsetTop);\n console.log(\"offheight\", pokemon.offsetHeight);\n console.log(\"ineerHeigfht\", window.innerHeight);\n pokemon.style.marginTop = marginTop + \"px\";\n marginTop += 10;\n }\n}", "title": "" }, { "docid": "e0ca1c4022183f46659abdd38aee4ed0", "score": "0.5994451", "text": "function moveLeft(){\r\n undraw()\r\n const isAtLeftEdge = current.some(index => (currentPosition + index) % width === 0)\r\n\r\n if(!isAtLeftEdge) currentPosition -=1\r\n\r\n if(current.some(index => squares[currentPosition + index].classList.contains('taken'))){\r\n currentPosition +=1\r\n }\r\n draw()\r\n }", "title": "" }, { "docid": "16b468a7f3c20671db8beb4c96313c30", "score": "0.59931487", "text": "function move_tiles(){\r\n\t\toriginalTop = parseInt(this.style.top);\r\n\t\toriginalLeft = parseInt(this.style.left);\r\n\t\tif (originalTop == eTop && originalLeft == (eLeft-100) || originalTop == eTop && originalLeft == (eLeft+100) || originalTop == (eTop-100) && originalLeft == eLeft || originalTop == (eTop+100) && originalLeft == eLeft){\r\n\t\t\tthis.style.top = eTop + \"px\";\r\n\t\t\tthis.style.left = eLeft + \"px\";\r\n\t\t\teTop = originalTop;\r\n\t\t\teLeft = originalLeft;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "6d867d739d2b523424d59fdba13c79f2", "score": "0.59738886", "text": "function Clicked() {\n //alert(\"Clicked:\" + this.id);\n //var CurrentPosition = document.getElementById('puzzlearea').getElementsByTagName('*');\n //positionInArray =0;\n //while(positionInArray < CurrentPosition.length)\n //{\n //if(CurrentPosition[positionInArray].id == this.id)\n //{\n //alert(\"loop broken at \" + positionInArray);\n //break;\n //}\n //positionInArray++;\n //}\n //alert(\"loop broken at \" + positionInArray);\n\t/* check if this can move one step forward */\n if ((parseInt(document.getElementById(this.id).style.left) + parseInt(\"100px\") === parseInt(x_emptydiv)) && (parseInt(document.getElementById(this.id).style.top) + parseInt(\"0px\") === parseInt(y_emptydiv))) {\n //alert(\"move forward\");\n document.getElementById(\"15\").style.left = document.getElementById(this.id).style.left;\n document.getElementById(\"15\").style.top = document.getElementById(this.id).style.top;\n document.getElementById(this.id).style.left = x_emptydiv;\n document.getElementById(this.id).style.top = y_emptydiv;\n x_emptydiv = document.getElementById(\"15\").style.left;\n y_emptydiv = document.getElementById(\"15\").style.top;\n }\n /* check if this can move one step back */\n\telse if((parseInt(document.getElementById(this.id).style.left) - parseInt(\"100px\") === parseInt(x_emptydiv)) && (parseInt(document.getElementById(this.id).style.top) + parseInt(\"0px\") === parseInt(y_emptydiv))) {\n\t\t//alert(\"move backward\");\n\t\tdocument.getElementById(\"15\").style.left = document.getElementById(this.id).style.left;\n\t\tdocument.getElementById(\"15\").style.top = document.getElementById(this.id).style.top;\n\t\tdocument.getElementById(this.id).style.left = x_emptydiv;\n\t\tdocument.getElementById(this.id).style.top = y_emptydiv;\n\t\tx_emptydiv = document.getElementById(\"15\").style.left;\n\t\ty_emptydiv = document.getElementById(\"15\").style.top;\n\t}\n\t/* check if this can move one step down */\n\telse if((parseInt(document.getElementById(this.id).style.left) + parseInt(\"0px\") === parseInt(x_emptydiv)) && (parseInt(document.getElementById(this.id).style.top) + parseInt(\"100px\") === parseInt(y_emptydiv))) {\n\t\t//alert(\"move downward\");\n\t\tdocument.getElementById(\"15\").style.left = document.getElementById(this.id).style.left;\n\t\tdocument.getElementById(\"15\").style.top = document.getElementById(this.id).style.top;\n\t\tdocument.getElementById(this.id).style.left = x_emptydiv;\n\t\tdocument.getElementById(this.id).style.top = y_emptydiv;\n\t\tx_emptydiv = document.getElementById(\"15\").style.left;\n\t\ty_emptydiv = document.getElementById(\"15\").style.top;\n\t}\n\t/* check if this can move one step up */\n\telse if((parseInt(document.getElementById(this.id).style.left) + parseInt(\"0px\") === parseInt(x_emptydiv)) && (parseInt(document.getElementById(this.id).style.top) - parseInt(\"100px\") === parseInt(y_emptydiv))) {\n\t\t//alert(\"move upward\");\n\t\tdocument.getElementById(\"15\").style.left = document.getElementById(this.id).style.left;\n\t\tdocument.getElementById(\"15\").style.top = document.getElementById(this.id).style.top;\n\t\tdocument.getElementById(this.id).style.left = x_emptydiv;\n\t\tdocument.getElementById(this.id).style.top = y_emptydiv;\n\t\tx_emptydiv = document.getElementById(\"15\").style.left;\n\t\ty_emptydiv = document.getElementById(\"15\").style.top;\n\t}\n\t\n\t//this.style.top = parseInt(this.style.top) + parseInt(\"100px\") + \"px\"; \n\t//alert(\"loop broken at \" + positionInArray);\n\t//alert(CurrentPosition.length);\n\t//alert(((parseInt(CurrentPosition[positionInArray - 4].style.top) - parseInt(CurrentPosition[positionInArray].style.top))));\n}", "title": "" }, { "docid": "22f5403a9d17853eeee443ea0f6325dd", "score": "0.5970299", "text": "function moveMissile()\n{\n if(gameIsOn)\n {\n var m= document.querySelectorAll(\".missile\");\n var newP;\n for(let i=0; i<m.length; i++)\n {\n newP = parseInt(m[i].style.right) - 20;\n m[i].style.right = newP +\"px\";\n if(newP < 0)\n {\n m[i].style.display = \"none\";\n }\n for(let j=0; j<obs.length; j++)\n {\n if(parseInt(m[i].style.top)>(parseInt(obs[j].style.top)-20) && parseInt(m[i].style.top)<(parseInt(obs[j].style.top)+30) && parseInt(m[i].style.right)>(parseInt(obs[j].style.right)-20) && parseInt(m[i].style.right)<(parseInt(obs[j].style.right)+20))\n {\n if(m[i].style.display !== \"none\" && obs[j].style.display !== \"none\")\n {\n m[i].style.display = \"none\";\n obs[j].style.display = \"none\";\n if(volumeIsOn)\n {\n explosionSound.play();\n }\n }\n }\n }\n for(let k=0; k<f.length; k++)\n {\n if(parseInt(m[i].style.top)>(parseInt(f[k].style.top)-20) && parseInt(m[i].style.top)<(parseInt(f[k].style.top)+20) && parseInt(m[i].style.right)>(parseInt(f[k].style.right)-15) && parseInt(m[i].style.right)<(parseInt(f[k].style.right)+15))\n {\n if(m[i].style.display !== \"none\" && f[k].style.display !== \"none\")\n {\n m[i].style.display = \"none\";\n f[k].style.display = \"none\";\n }\n }\n }\n if(newP < -140)\n {\n m[i].remove();\n }\n }\n }\n}", "title": "" }, { "docid": "f973e0dea564981a992f58da9a82b68b", "score": "0.5959817", "text": "function bugEat(bug){\n var targetInd = bugFood(bug.x, bug.y);\n var targetFood = foods[targetInd];\n var x = bug.x;\n var y = bug.y;\n var dist = distanceCalc(x, y, targetFood);\n var CollisionDistance = foodR + 10;\n if(dist <= CollisionDistance){\n clearFood(targetFood);\n foods.splice(targetInd, 1);\n }\n}", "title": "" }, { "docid": "232374866c6e338fea91218fe2a158da", "score": "0.5957295", "text": "function moveBubblesOnTeamHome()\r\n{\r\n\tif (arryItems.length > 0)\r\n\t{\r\n\t\tfor (x=1; x <= arryItems.length; x++) \r\n\t\t{\r\n\t\t\tinTop = getImageTop(\"discountitem_\" + x) - 22;\r\n\t\t\tinLeft = getImageLeft(\"discountitem_\" + x) + 96;\t\r\n\t\t\t\r\n\t\t\t//move the price bubble to the location.\r\n\t\t\tmoveXY(\"discountbubble_\" + x,inLeft,inTop);\r\n\t\t}\r\n\t}\r\n}", "title": "" }, { "docid": "3c5fcf3a19d78c122e22e198a748fd3d", "score": "0.5953282", "text": "function moveLeft(){\n undraw();\n const isAtLeftEdge = current.some(index => (currentPosition + index) % width ===0)\n if(!isAtLeftEdge) currentPosition-=1\n\n if(current.some(index => squares[currentPosition + index].classList.contains('taken'))){\n currentPosition+=1;\n }\n\n draw();\n }", "title": "" }, { "docid": "7f103dff26ee794ced08bb65bfec1fe8", "score": "0.59472615", "text": "function quickDrop(){\r\n while( !(collision(arena, piece)) ){\r\n piece.pos.y++;\r\n }\r\n piece.pos.y--;\r\n }", "title": "" }, { "docid": "c54cb069ba1a2a576a2d53a5be17738e", "score": "0.5947218", "text": "function moveRight(){\r\n undraw()\r\n const isAtRightEdge = current.some(index => (currentPosition + index)%width === width -1)\r\n if(!isAtRightEdge) currentPosition +=1\r\n if(current.some(index => squares[currentPosition + index].classList.contains('taken'))){\r\n currentPosition -=1\r\n }\r\n draw()\r\n}", "title": "" }, { "docid": "11ede9b44c836c0d1c38e9b2c5cced83", "score": "0.5914242", "text": "moveActor() {\n // used to work as tunnel if left and right are empty pacman/ghosts can easily move in tunnel\n if (this.tileTo[0] < -1) {\n this.tileTo[0] = this.gameMap.layoutMap.column;\n }\n if (this.tileTo[0] > this.gameMap.layoutMap.column) {\n this.tileTo[0] = -1;\n }\n\n // used to work as tunnel if top and bottom are empty pacman/ghosts can easily move in tunnel\n if (this.tileTo[1] < -1) {\n this.tileTo[1] = this.gameMap.layoutMap.row;\n }\n if (this.tileTo[1] > this.gameMap.layoutMap.row) {\n this.tileTo[1] = -1;\n }\n\n // as our pacman/ghosts needs to move constantly widthout key press,\n // also pacman/ghosts should stop when there is obstacle the code has become longer\n\n // if pacman/ghosts is moving up check of upper box is empty and go otherise stop\n if (this.movingDirection === MOVING_DIRECTION.UP) {\n if (this.isBlockUpperThanActorEmpty()) {\n this.tileTo[1] -= 1;\n }\n }\n\n // if pacman/ghosts is moving down check of down box is empty and go otherise stop\n if (this.movingDirection === MOVING_DIRECTION.DOWN) {\n if (this.isBlockLowerThanActorEmpty()) {\n this.tileTo[1] += 1;\n }\n }\n\n // if pacman/ghosts is moving left check of left box is empty and go otherise stop\n if (this.movingDirection === MOVING_DIRECTION.LEFT) {\n if (this.isBlockLeftThanActorEmpty()) {\n this.tileTo[0] -= 1;\n }\n }\n\n // if pacman/ghosts is moving right check of right box is empty and go otherise stop\n if (this.movingDirection === MOVING_DIRECTION.RIGHT) {\n if (this.isBlockRightThanActorEmpty()) {\n this.tileTo[0] += 1;\n }\n }\n }", "title": "" }, { "docid": "969d3f17f86ff251a52d6ca272169f59", "score": "0.5899137", "text": "function draw() {\n\n var k, g;\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n\n ctx.font = \"20px Arial\";\n ctx.fillStyle = \"black\";\n ctx.fillText(\"Score: \" + score, 300, 20);\n\n ctx.font = \"20px Arial\";\n ctx.fillStyle = \"black\";\n ctx.fillText(\"time: \" + time, 50, 20);\n\n ctx.font = \"20px Arial\";\n ctx.fillStyle = \"black\";\n ctx.fillText(\"Stop \", 180, 20);\n\n\n for (k = 0; k < bugs.length; k += 1) {\n\n var bug = bugs[k];\n\n if (bug.life === false) {\n\n ctx.beginPath();\n ctx.arc(bug.x, bug.y, 5, 10, 2 * Math.PI);\n ctx.arc(bug.x, bug.y, 5, 0, 2 * Math.PI);\n ctx.closePath();\n\n if (bug.speed === 0.06 || bug.speed === 0.08) {\n ctx.fillStyle = \"Orange\";\n }\n if (bug.speed === 0.075 || bug.speed === 0.1) {\n ctx.fillStyle = \"Red\";\n }\n if (bug.speed === 0.15 || bug.speed === 0.2) {\n ctx.fillStyle = \"Black\";\n }\n ctx.stroke();\n ctx.fill();\n\n var i, food;\n array.length = 0;\n food_position = 0;\n for(i = 0; i < foods.length; i++){\n food = foods[i];\n array.push(find_small_distance(bug, food));\n }\n\n for(i = 0; i < array.length; i++){\n if(i < array.length - 1){\n if(array[i] < array[i+1]){\n food_position = i;\n }else{\n food_position = i + 1;\n }\n }\n }\n\n if (bug.x < foods[food_position].x) {\n bug.x += bug.speed * 10;\n }\n if (bug.x > foods[food_position].x) {\n bug.x -= bug.speed * 10;\n }\n bug.y += bug.speed * 10;\n }\n\n }\n for (g = 0; g < foods.length; g += 1){\n\n var foodx = foods[g];\n ctx.drawImage(beer, foodx.x, foodx.y, 40, 40);\n }\n}", "title": "" }, { "docid": "66e90a3513a8319f3648ef0c36f32447", "score": "0.5898787", "text": "async function moveThru () {\n\twhile (1) {\n\t\tlet w = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;\n\t\tlet h = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;\n\t\tlet stars = allStars;\n\t\tfor (let i = 0; i < stars.length; i++) {\n\t\t\tlet leftPos = allStars[i].style.left.match(/[0-9]+/)[0];\n\t\t\tlet topPos = allStars[i].style.top.match(/[0-9]+/)[0];\n\t\t\tlet vMagnitude = (leftPos - (w/2)); \n\t\t\tlet hMagnitude = (topPos - (h/2));\n\n\t\t\tif (leftPos < 30 || leftPos > (w - 30)) {\n\t\t\t\tsetStar(allStars[i], 100)\n\n\t\t\t} else if (topPos < 30 || topPos > (h -30)) {\n\t\t\t\tsetStar(allStars[i], 100)\n\t\t\t} else {\n\t\t\t\tlet lMove = Math.floor((w/2) + vMagnitude*1.15);\n\t\t\t\tlet tMove = Math.floor((h/2) + hMagnitude*1.15);\n\t\t\t\tif (parseInt(allStars[i].getAttribute('oldL')) == leftPos || parseInt(allStars[i].getAttribute('oldT') == topPos) ) {\n\t\t\t\t\t// If the star isn't moving, adjust its position\n\t\t\t\t\t\t// This can happen if it spawns too close to the center, as the moveMultiplier will try to move it < 1px\n\t\t\t\t\tsetStar(allStars[i], 0)\n\t\t\t\t\tallStars[i].setAttribute('lifetime', 0)\n\t\t\t\t} else {\n\t\t\t\t\tallStars[i].setAttribute('oldL', leftPos);\n\t\t\t\t\tallStars[i].setAttribute('oldT', topPos);\n\n\t\t\t\t\tallStars[i].style.left = (lMove)+'px';\n\t\t\t\t\tallStars[i].style.top = (tMove)+'px';\n\t\t\t\t\tlet newLife = parseInt(allStars[i].getAttribute('lifetime')) + 1\n\t\t\t\t\tlet newSize = (newLife/3)*fov/22;\n\t\t\t\t\tallStars[i].style.height = newSize + 'px'\n\t\t\t\t\tallStars[i].style.width = newSize+ 'px'\n\t\t\t\t\tif (newLife%(300/fov) == 0) {\n\t\t\t\t\t\t//setStar(allStars[i], fov)\n\t\t\t\t\t}\n\n\t\t\t\t\t \n\t\t\t\t\tallStars[i].setAttribute('lifetime', newLife);\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\tawait sleep(speed);\n\t}\n}", "title": "" }, { "docid": "9d45539fc6d7b863c1ad983ad3ce1dbe", "score": "0.589763", "text": "function tryToMove(direction) {\r\n\r\n \r\n let oldLocation = currentLocationOfHorse; //location before move\r\n let oldClassName = gridBoxes[oldLocation].className; // class of location before move\r\n let nextLocation = 0; //location we wish to move to\r\n let nextClass = \"\"; //class of location we wish to move to\r\n let nextLocation2 = 0;\r\n let nextClass2 = \"\";\r\n let nextClass3 = \"\"; //class for bridge image\r\n let newClass = \"\"; //new class to switch to if move successful\r\n\r\n switch (direction) {\r\n \r\n case \"left\":\r\n nextLocation = currentLocationOfHorse - 1;\r\n break;\r\n\r\n case \"right\":\r\n nextLocation = currentLocationOfHorse + 1;\r\n break;\r\n\r\n case \"up\":\r\n nextLocation = currentLocationOfHorse - widthOfBoard;\r\n break;\r\n\r\n case \"down\":\r\n nextLocation = currentLocationOfHorse + widthOfBoard;\r\n break;\r\n } //switch\r\n nextClass = gridBoxes[nextLocation].className;\r\n\r\n //if the obstacle is not passable, don't move\r\n if (noPassObstacles.includes(nextClass)) {return;}\r\n\r\n //if it's a fence, and there is no rider, not move\r\n if (!riderOn && nextClass.includes(\"seaweed\")) {return;}\r\n\r\n // if there is a fence, move two spaces with animation\r\n if (nextClass.includes(\"seaweed\")) {\r\n \r\n // hat must be on to jump\r\n if (riderOn) {\r\n\t\t\tmove = false;\r\n gridBoxes[currentLocationOfHorse].className = \"\";\r\n oldClassName = gridBoxes[nextLocation].className;\r\n\r\n // set values according to direction\r\n if (direction == \"left\") {\r\n \r\n nextClass = \"fishleftsea\";\r\n nextClass2 = \"fishlefthat\";\r\n nextClass3 = \"fishleftbubbles\";\r\n \r\n nextLocation2 = nextLocation - 1;\r\n \r\n } else if (direction == \"right\") {\r\n\t\t\t\t\r\n nextClass = \"fishrightsea\";\r\n nextClass2 = \"fishrighthat\";\r\n nextClass3 = \"fishrightbubbles\";\r\n\r\n nextLocation2 = nextLocation + 1;\r\n\t\t\t\r\n } else if (direction == \"up\") {\r\n\t\t\t\t\r\n nextClass = \"fishupsea\";\r\n nextClass2 = \"fishuphat\";\r\n nextClass3 = \"fishupbubbles\";\r\n\r\n nextLocation2 = nextLocation - widthOfBoard;\r\n\t\t\t\t\r\n } else if (direction == \"down\") {\r\n\t\t\t\t\r\n nextClass = \"fishdownsea\";\r\n nextClass2 = \"fishdownhat\";\r\n nextClass3 = \"fishdownbubbles\";\r\n\r\n nextLocation2 = nextLocation + widthOfBoard;\r\n } //else if\r\n\r\n //error checking can't land on obstacle\r\n\t\t\tlet errorCheck = gridBoxes[nextLocation2].className;\r\n\t\t\tif(noPassObstacles.includes(errorCheck)){\r\n\t\t\t\treturn;\r\n\t\t\t}//if\r\n\t\t\t\r\n\t\t\tgridBoxes[currentLocationOfHorse].className = \"\";\r\n\t\t\toldClassName = gridBoxes[nextLocation].className;\r\n \r\n // show fish jumping\r\n gridBoxes[nextLocation].className = nextClass;\r\n\r\n setTimeout(function() {\r\n\r\n // set jump back to just a fence\r\n gridBoxes[nextLocation].className = oldClassName;\r\n\r\n // update current location of horse to be 2 spaces past take off\r\n currentLocationOfHorse = nextLocation2;\r\n\r\n //get class of box after jump\r\n nextClass = gridBoxes[currentLocationOfHorse].className;\r\n\r\n\r\n // show horse and rider after landing\r\n gridBoxes[currentLocationOfHorse].className = nextClass2;\r\n gridBoxes[currentLocationOfHorse].className = nextClass3;\r\n\r\n //if next box is a flag go up a level\r\n levelUp(nextClass);\r\n }, 350);\r\n return;\r\n } //rider\r\n } //if class has seaweed\r\n \r\n if(noPassObstacles.includes(gridBoxes[nextLocation2].className)){\r\n\t\t\t\treturn;\r\n }//if\r\n\r\n //if there is a rider, add rider\r\n if (nextClass == \"hat\") {\r\n riderOn = true;\r\n } //if\r\n\r\n //if there is a bridge in the old location keep it\r\n if (oldClassName.includes(\"bridge\")) {\r\n gridBoxes[oldLocation].className = \"bridge\";\r\n } else {\r\n gridBoxes[oldLocation].className = \"\";\r\n } //else\r\n\r\n // build name of new class\r\n newClass = (riderOn) ? \"fishhat\" : \"fish\";\r\n newClass3 = (riderOn) ? \"fishhatbubbles\" : \"fishbubbles\";\r\n newClass += direction;\r\n newClass3 += direction;\r\n\r\n // if there is a bridge in the next location , keep it\r\n if (gridBoxes[nextLocation].classList.contains(\"bridge\")) {\r\n newClass += \"bridge\";\r\n }\r\n\r\n //move 1 space\r\n currentLocationOfHorse = nextLocation;\r\n gridBoxes[currentLocationOfHorse].className = newClass;\r\n\r\n //if it is an enemy, end game\r\n if (nextClass.includes(\"shark\")) {\r\n \r\n document.getElementById(\"lose\").style.display = \"block\"\r\n currentLevel = newGame;\r\n window.clearInterval(currentAnimation);\r\n window.clearInterval(currentAnimation2);\r\n endGame = false;\r\n \r\n return;\r\n }//if\r\n\r\n //move up to next level if needed\r\n levelUp(nextClass);\r\n\r\n} //trytoMove", "title": "" }, { "docid": "ab2582589a53296f96cb73e0e9cd4662", "score": "0.58685005", "text": "function trigger(egg) {\n var speed = Math.floor(Math.random() * 5) + 7;\n var topPos = 50;\n var state = true;\n var inter = setInterval(function() {\n var eggTop = Math.floor(egg.getBoundingClientRect().top);\n var eggLeft = Math.floor(egg.getBoundingClientRect().left);\n var eggWidth = Math.floor(egg.getBoundingClientRect().width);\n var eggHeight = Math.floor(egg.getBoundingClientRect().height);\n \n \n var basketTop = Math.floor(basketImg.getBoundingClientRect().top);\n var basketLeft = Math.floor(basketImg.getBoundingClientRect().left);\n var basketWidth = Math.floor(basketImg.getBoundingClientRect().width);\n var basketHeight = Math.floor(basketImg.getBoundingClientRect().height);\n\n topPos += 1;\n\n\n //Check position of egg\n if (\n //Top\n (eggTop + eggHeight > basketTop && eggTop < basketTop + basketHeight)\n &&\n //Left\n (eggLeft + eggWidth >= basketLeft && eggLeft+ eggWidth < basketLeft + basketWidth)\n \n ) {\n topPos = 5;\n scoreUp();\n \n } else if (eggTop > basketTop ) { //egg is broken\n \n //console.log(\"Broken\");\n if (state) {\n state = false;\n topPos = 50;\n showBrokenEgg(egg);\n lostLife();\n }\n }\n \n /*\n //Check position of egg\n if (eggTotalTop == basketTop\n &&\n (eggLeft + eggWidth >= basketLeft && eggLeft+ eggWidth < basketLeft + basketWidth)\n \n ) {\n topPos = 5;\n scoreUp();\n \n } else if (eggTop > basketTop) { //egg is broken\n \n //console.log(\"Broken\");\n if (state) {\n state = false;\n topPos = 50;\n showBrokenEgg(egg);\n lostLife();\n }\n }\n */\n state = true;\n \n egg.style.top = topPos + \"px\";\n }, speed);\n return inter;\n}", "title": "" }, { "docid": "b02fed3b40f3ae433f687dc75158dd09", "score": "0.5866733", "text": "function moveLeft() {\n undraw();\n const isAtLeftEdge = current.some((index) => (currentPosition + index) % width === 0);\n if (!isAtLeftEdge) currentPosition -= 1;\n if (current.some((index) => squares[currentPosition + index].classList.contains('taken'))) {\n currentPosition += 1;\n }\n draw();\n}", "title": "" }, { "docid": "7420060d8ab950c79b0fc131f96c7245", "score": "0.5857984", "text": "function moveGifts() {\n for (i = 0; i < giftX.length; i++) {\n\n\n // check if shape is outside canvas\n if (giftX[i] < 0 || giftX[i] > CANVAS_WIDTH - giftSize[i]) {\n // change X direction\n giftXSpeed[i] *= -1;\n } else if (giftY[i] < 0 || giftY[i] > CANVAS_HEIGHT - giftSize[i]) {\n // change Y direction\n giftYSpeed[i] *= -1;\n } else if (giftX[i] < 0 || giftY[i] < 0 || giftX[i] > CANVAS_WIDTH || giftY[i] > CANVAS_HEIGHT) {\n // reset coords\n giftX[i] = CANVAS_WIDTH / 2;\n giftY[i] = CANVAS_HEIGHT / 2;\n }\n\n // move box\n giftX[i] += giftXSpeed[i];\n giftY[i] += giftYSpeed[i];\n\n }\n}", "title": "" }, { "docid": "42e7fd5fba5efac85d017619ffd06cb9", "score": "0.5852316", "text": "function c0_fischer_adjustmoved()\r\n{\r\nif(c0_fischer_cst.indexOf(\"{bLR}\")>=0 && c0_fischer_cst.indexOf(\"{bK}\")>=0)\r\n\t{ c0_bKingmoved = false; c0_bLRockmoved = false; c0_b00 = false; }\r\nif(c0_fischer_cst.indexOf(\"{bRR}\")>=0 && c0_fischer_cst.indexOf(\"{bK}\")>=0)\r\n\t{ c0_bKingmoved = false; c0_bRRockmoved = false; c0_b00 = false; }\r\nif(c0_fischer_cst.indexOf(\"{wLR}\")>=0 && c0_fischer_cst.indexOf(\"{wK}\")>=0)\r\n\t{ c0_wKingmoved = false; c0_wLRockmoved = false; c0_w00 = false; }\r\nif(c0_fischer_cst.indexOf(\"{wRR}\")>=0 && c0_fischer_cst.indexOf(\"{wK}\")>=0)\r\n\t{ c0_wKingmoved = false; c0_wRRockmoved = false; c0_w00 = false; }\r\n}", "title": "" }, { "docid": "df4e763b862e03183364d0e821495170", "score": "0.5835544", "text": "function moveLeft () {\n undraw()\n const isAtLeftEdge = current.some(index => (currentPosition + index) % width === 0)\n\n if (!isAtLeftEdge) {\n currentPosition -= 1\n }\n\n if (current.some(index => squares[currentPosition + index].classList.contains('taken'))) {\n currentPosition += 1\n }\n draw()\n }", "title": "" }, { "docid": "6a726e02ab1ae61b7108353869af04e0", "score": "0.5833838", "text": "function moveTo(i, j) {\n\tvar isLegal = false;\n\tvar targetCell = gBoard[i][j];\n\tif (targetCell.type === WALL) return;\n\n\t// Calculate distance to ake sure we are moving to a neighbor cell\n\tvar iAbsDiff = Math.abs(i - gGamerPos.i);\n\tvar jAbsDiff = Math.abs(j - gGamerPos.j);\n\n\tfor (var k = 0; k < gWindowsPos.length; k++) {\n\t\tvar currWindow = gWindowsPos[k].pos;\n\t\tif (currWindow.i === gGamerPos.i && currWindow.matchI === i && currWindow.j === gGamerPos.j && currWindow.matchJ === j) {\n\t\t\tisLegal = true;\n\t\t\tbreak;\n\t\t}\n\t}\n\t\n\t// If the clicked Cell is one of the four allowed\n\tif ((iAbsDiff === 1 && jAbsDiff === 0) || (jAbsDiff === 1 && iAbsDiff === 0)) {\n\t\tisLegal = true;\n\t}\n\t\n\tif ((isLegal === true) && (gIsGlued === false)) {\n\t\t// Play sound when collecting a ball\n\t\tif (targetCell.gameElement === BALL) {\n\t\t\tgBallsColected++;\n\t\t\tvar collectSound = new Audio('sounds/collect.mp3');\n \t\tcollectSound.play();\n\t\t\tupdateScore();\n\t\t\tisGameOver();\n\t\t}\n\t\t\n\t\t// when user steps on GLUE he cannot move for 3 seconds\n\t\tif (targetCell.gameElement === GLUE) {\n\t\t\tgIsGlued = true;\n\t\t\tgluedMessage();\n\n\t\t\tsetTimeout (function () {\n\t\t\t\tgIsGlued = false;\n\t\t\t\tgluedMessage();\n\t\t\t\t\n\t\t\t}, 3000);\n\t\t}\n\n\t\t// DONE: Move the gamer\n\t\tgBoard[gGamerPos.i][gGamerPos.j].gameElement = null;\n\t\trenderCell(gGamerPos, '');\n\t\t\n\t\tgGamerPos.i = i;\n\t\tgGamerPos.j = j;\n\t\t\n\t\tgBoard[gGamerPos.i][gGamerPos.j].gameElement = GAMER;\n\t\t(gIsGlued)? renderCell(gGamerPos, GLUED_GAMER_IMG): renderCell(gGamerPos, GAMER_IMG);\n\t}\n}", "title": "" }, { "docid": "82fda4d0655fd4b5bd40b60d2bc6cb83", "score": "0.58319825", "text": "function MoveToLeftMost(){\n\t//var movePixel = 8 - circles[pointedCircle].guiTexture.pixelInset.x;\n\n\tvar amount = circles.length;\n\tfor (var i = pointedCircle; i < amount; i++)\n\t{\n\t\tcircles[i].transform.position = Vector3.MoveTowards(circles[i].transform.position, Vector3(tarPosX[i], 0.91, 0), Time.deltaTime);\n\t}\n}", "title": "" }, { "docid": "a520782bd86ad6ae2ab9d3f8e4a5ead0", "score": "0.5830686", "text": "function moveLeft() {\n undraw()\n const reachedLeftEdge = curT.some(index => (curPos + index) % width === 0)\n if (!reachedLeftEdge) curPos -= 1\n if (curT.some(index => squares[curPos + index].classList.contains('taken'))) {\n // if the position has been taken by another figure, push the tetromino back\n curPos += 1\n }\n draw()\n }", "title": "" }, { "docid": "88df6040c62c45f68fcf6cee0072dea4", "score": "0.58139235", "text": "function moveLeft() {\r\n undraw();\r\n const isAtLeftEdge = current.some(\r\n (index) => (currentPosition + index) % width === 0\r\n );\r\n if (!isAtLeftEdge) currentPosition -= 1;\r\n if (\r\n current.some((index) =>\r\n squares[currentPosition + index].classList.contains(\"taken\")\r\n )\r\n ) {\r\n currentPosition += 1;\r\n }\r\n draw();\r\n }", "title": "" }, { "docid": "de1411e2f5ddd5ad89419dd69fb02075", "score": "0.57940286", "text": "function moveRight(){\n undraw();\n const isAtRightEdge = current.some(index => (currentPosition+index)%width === width-1);\n if(!isAtRightEdge) currentPosition +=1;\n if(current.some(index => squares[currentPosition + index].classList.contains('taken'))){\n currentPosition-=1;\n }\n\n draw();\n }", "title": "" }, { "docid": "8bd203707d52b1b07974e3bc429bfd2b", "score": "0.57910365", "text": "function moveDroplets() {\n for(var i=0;i < droplets.length;i++) {\n droplets[i].move(-1);\n for(var j=0;j < flowers.length;j++) {\n if(droplets[i].hits(flowers[j])) {\n flowers[j].grow();\n droplets[i].destroy();\n }\n }\n\n //Check if oob\n if(droplets[i].y <= 0) {\n droplets[i].destroy();\n }\n }\n}", "title": "" }, { "docid": "eb8dd369822e79080c6afb9f39843b14", "score": "0.57843626", "text": "function moveLeft() {\n undraw();\n const isAtLeftEdge = current.some(\n (index) => (currentPosition + index) % width === 0,\n );\n if (!isAtLeftEdge) {\n currentPosition -= 1;\n }\n if (\n current.some((index) =>\n squares[currentPosition + index].classList.contains(\"taken\"),\n )\n ) {\n currentPosition += 1;\n }\n draw();\n }", "title": "" }, { "docid": "65efe40c5d671c14b7bc35a5f19fd861", "score": "0.57836443", "text": "function moveFrog(e) {\n\n $(\"div\").removeClassWild(\"frog-*\"); //remove all 'frog'\n // squares[currentIndex].classList.remove('frog');\n switch (e.keyCode) {\n case 37:\n if (currentIndex % width !== 0) currentIndex -= 1; /* left */\n break;\n case 38:\n if (currentIndex - width >= 0) currentIndex -= width; /* Up */\n break;\n case 39:\n if (currentIndex % width < width - 1) currentIndex += 1; /* right */\n break;\n case 40:\n if (currentIndex + width < width * width) currentIndex += width; /* Down */\n break;\n }\n if ((currentIndex >= 63 && currentIndex <= 80) || (currentIndex >= 36 && currentIndex <= 44) || (currentIndex >= 0 && currentIndex <= 17)) {\n squares[currentIndex].classList.add('frog-on-lawn');\n } else if (currentIndex >= 45 && currentIndex <= 62) {\n squares[currentIndex].classList.add('frog-on-road');\n } else if (currentIndex >= 18 && currentIndex <= 35) {\n squares[currentIndex].classList.add('frog-on-log');\n }\n\n Lose();\n Win();\n // new Audio('sound/kva.mp3').autoplay = true;\n}", "title": "" }, { "docid": "05e69b8e5e62009324298cc70559c6d8", "score": "0.5781973", "text": "simulate_move (fieldArray, direction) {\n var f = _.clone(fieldArray);\n var n = this.getTileRows();\n\n if (direction === 0) { // UP\n for(let i = 0; i < n; i++){\n for(let j = 0; j < n; j++){\n let pos = i * n + j;\n if (f[pos]!==1) { continue; }\n let ppa = this.pos_pumpkin_around(pos);\n if (this.pos_pumpkin_around(pos) !== false) {\n // IL MAIALE MANGIA\n f[ppa] = 0;\n } else {\n // IL MAIALE SI MUOVE\n let k = i;\n do {\n if (f[((k-1) * n + j)] !== 0 || k === 0) break;\n k--;\n } while (true);\n f[pos] = 0;\n f[(k * n + j)] = 1;\n }\n }\n }\n } else if (direction == 1) { // DOWN\n for(let i = (n-1); i >= 0; i--){\n for(let j = (0); j < n; j++){\n let pos = i * n + j;\n if (f[pos]!==1) { continue; }\n let ppa = this.pos_pumpkin_around(pos);\n if (this.pos_pumpkin_around(pos) !== false) {\n // IL MAIALE MANGIA\n f[ppa] = 0;\n } else {\n // IL MAIALE SI MUOVE\n let k = i;\n do {\n if (f[((k+1) * n + j)] !== 0 || (k + 1) === n) break;\n k++;\n } while (true);\n f[pos] = 0;\n f[(k * n + j)] = 1;\n }\n }\n }\n } else if (direction == 2) { // LEFT\n for(let j = 0; j < n; j++){\n for(let i = 0; i < n; i++){\n let pos = i * n + j;\n if (f[pos]!==1) { continue; }\n let ppa = this.pos_pumpkin_around(pos);\n if (this.pos_pumpkin_around(pos) !== false) {\n // IL MAIALE MANGIA\n f[ppa] = 0;\n } else {\n // IL MAIALE SI MUOVE\n let k = j;\n do {\n if (f[(i * n + (k-1))] !== 0 || (k === 0)) break;\n k--;\n } while (true);\n f[pos] = 0;\n f[(i * n + k)] = 1;\n }\n }\n }\n } else if (direction == 3) { // RIGHT\n for(let j = (n-1); j >= 0; j--){\n for(let i = 0; i < n; i++){\n let pos = i * n + j;\n if (f[pos]!==1) { continue; }\n let ppa = this.pos_pumpkin_around(pos);\n if (this.pos_pumpkin_around(pos) !== false) {\n // IL MAIALE MANGIA\n f[ppa] = 0;\n } else {\n // IL MAIALE SI MUOVE\n let k = j;\n do {\n if (f[(i * n + (k+1))] !== 0 || (k + 1) === n) break;\n k++;\n } while (true);\n f[pos] = 0;\n f[(i * n + k)] = 1;\n }\n }\n }\n }\n return f;\n }", "title": "" }, { "docid": "4485cd7bde43c165c31ce57093d19ffd", "score": "0.5780928", "text": "function coordChange(bug, dt){\n if(foods.length > 0){\n var x0 = bug.x;\n var y0 = bug.y;\n\n var targetInd = bugFood(x0, y0);\n var targetFood = foods[targetInd];\n var x1 = targetFood.x;\n var y1 = targetFood.y;\n\n var slope = (y1 - y0)/(x1 - x0);\n var d = bug.speed * dt;\n var sub = d / (Math.sqrt(1 + (slope * slope)));\n\n if(x0 > x1){\n bug.x = bug.x - sub;\n bug.y = slope * (bug.x - x0) + y0;\n }else{\n bug.x = bug.x + sub;\n bug.y = slope * (bug.x - x0) + y0;\n }\n }else{\n clearInterval(countdownTimer);\n window.cancelAnimationFrame(myReq);\n endGame();\n /*if(lvl1 == true){\n reinit();\n gamePlay();\n } else {\n endGame();\n }*/\n } \n}", "title": "" }, { "docid": "65f2e2a7128ed461e5175d197980216b", "score": "0.5780421", "text": "function moveUp() {\r\n var min = 99;\r\n for(index of shipArray) {\r\n if(min > index) {\r\n min = index;\r\n }\r\n }\r\n if(min > 9) {\r\n for(i in shipArray) {\r\n shipArray[i] = shipArray[i] - 10;\r\n }\r\n }\r\n //If it is possible to move the ship here, then do so\r\n if(checkPlacement() == true) {\r\n updatePosColor();\r\n }\r\n}", "title": "" }, { "docid": "b4f99ee9c8b9acabe8dda0f4fa6a9e78", "score": "0.5780074", "text": "function moveScorpian() {\n const down = scorpianCurrentPosition + width\n const left = scorpianCurrentPosition - 1\n const right = scorpianCurrentPosition + 1\n const up = scorpianCurrentPosition - width\n\n checkGhostMode(scorpianClass, scorpianCurrentPosition)\n removeGhost(scorpianCurrentPosition, scorpianClass)\n\n if (!cells[scorpianCurrentPosition].classList.contains(waspClass) || !cells[scorpianCurrentPosition].classList.contains(tarantulaClass)) {\n // checks movement through tunnel\n if (scorpianCurrentPosition === 55 && scorpianXGoal > a && scorpianPreviousPosition !== 65) {\n scorpianPreviousPosition = scorpianCurrentPosition\n scorpianCurrentPosition = 65\n } else if (scorpianCurrentPosition === 65 && scorpianXGoal < a && scorpianPreviousPosition !== 55) {\n scorpianPreviousPosition = scorpianCurrentPosition\n scorpianCurrentPosition = 55\n } else if (scorpianYGoal > b) {\n // console.log('ghost higher than player') \n if (isDownClear(scorpianCurrentPosition) === true && down !== scorpianPreviousPosition && scorpianCurrentPosition !== 37 && scorpianCurrentPosition !== 39) { // check tile below is clear, check previous position\n moveCharacter('down', scorpianClass, scorpianPreviousPosition, scorpianCurrentPosition) // move down\n } else { // if below is blocked, do the following\n if (scorpianXGoal > a) { // if ghost left of player\n // console.log('ghost left of player')\n if (isRightClear(scorpianCurrentPosition) === true && right !== scorpianPreviousPosition) { // check tile to right is clear\n moveCharacter('right', scorpianClass, scorpianPreviousPosition, scorpianCurrentPosition) // move right\n } else { // if down and right is blocked\n // console.log('border to right')\n if (isLeftClear(scorpianCurrentPosition) === true && left !== scorpianPreviousPosition) { // check tile to left is clear\n moveCharacter('left', scorpianClass, scorpianPreviousPosition, scorpianCurrentPosition) // move left\n } else { // if down, right and left is blocked\n // console.log('border to left')\n if (isUpClear(scorpianCurrentPosition) === true) { // check tile above is clear\n moveCharacter('up', scorpianClass, scorpianPreviousPosition, scorpianCurrentPosition) // move up\n } \n }\n }\n } else if (scorpianXGoal < a) { // if ghost is to right of player\n // console.log('ghost to right of player')\n if (isLeftClear(scorpianCurrentPosition) === true && left !== scorpianPreviousPosition) { // check tile to left is clear\n moveCharacter('left', scorpianClass, scorpianPreviousPosition, scorpianCurrentPosition) // move left\n } else { // if down and left is blocked\n // console.log('border to left') \n if (isRightClear(scorpianCurrentPosition) === true && right !== scorpianPreviousPosition) { // check tile to right is clear\n moveCharacter('right', scorpianClass, scorpianPreviousPosition, scorpianCurrentPosition) // move right\n } else { // if down, left and right is blocked\n // console.log('border below')\n if (isUpClear(scorpianCurrentPosition) === true) { // check tile above is clear\n moveCharacter('up', scorpianClass, scorpianPreviousPosition, scorpianCurrentPosition) // move up\n }\n }\n }\n } else if (scorpianXGoal === a) { // if player and ghost are in line on y-axis\n // console.log('ghost directly above player')\n if (isLeftClear(scorpianCurrentPosition) === true && left !== scorpianPreviousPosition) { // check if left tile is clear\n moveCharacter('left', scorpianClass, scorpianPreviousPosition, scorpianCurrentPosition) // move left\n } else if (isRightClear(scorpianCurrentPosition) === true && right !== scorpianPreviousPosition) { // if down and left are blocked, check if right tile is clear\n moveCharacter('right', scorpianClass, scorpianPreviousPosition, scorpianCurrentPosition) // move right\n } else if (isUpClear(scorpianCurrentPosition) === true) { // if down, left and right are blocked, check if tile above is clear\n moveCharacter('up', scorpianClass, scorpianPreviousPosition, scorpianCurrentPosition) // move up\n }\n }\n }\n } else if (scorpianYGoal < b) { // if ghost is below player\n // console.log('ghost lower than player')\n if (isUpClear(scorpianCurrentPosition) === true && up !== scorpianPreviousPosition) { // check tile above is clear\n moveCharacter('up', scorpianClass, scorpianPreviousPosition, scorpianCurrentPosition) // move ghost up \n } else { // if above is blocked\n if (scorpianXGoal > a) { // check if ghost is left of player\n // console.log('ghost left of player')\n if (isRightClear(scorpianCurrentPosition) === true && right !== scorpianPreviousPosition) { // check if tile to right is clear\n // console.log(right)\n moveCharacter('right', scorpianClass, scorpianPreviousPosition, scorpianCurrentPosition) // move ghost right\n } else if (isLeftClear(scorpianCurrentPosition) === true && left !== scorpianPreviousPosition) { // if above and right is blocked, check left is clear\n moveCharacter('left', scorpianClass, scorpianPreviousPosition, scorpianCurrentPosition) // move ghost left\n } else if (isDownClear(scorpianCurrentPosition) === true && scorpianCurrentPosition !== 37 && scorpianCurrentPosition !== 39) { // if above, right and left is blocked, check down is clear\n moveCharacter('down', scorpianClass, scorpianPreviousPosition, scorpianCurrentPosition) // move ghost down\n } else if (isUpClear(scorpianCurrentPosition) === true) {\n moveCharacter('up', scorpianClass, scorpianPreviousPosition, scorpianCurrentPosition)\n }\n } else if (scorpianXGoal < a) { // if ghost is right of player\n // console.log('ghost right of player')\n if (isLeftClear(scorpianCurrentPosition) === true && left !== scorpianPreviousPosition) { // check tile to left is clear\n moveCharacter('left', scorpianClass, scorpianPreviousPosition, scorpianCurrentPosition) // move ghost left\n } else if (isDownClear(scorpianCurrentPosition) === true && down !== scorpianPreviousPosition && scorpianCurrentPosition !== 37 && scorpianCurrentPosition !== 39) { // if above and left is blocked, check if tile below is clear\n moveCharacter('down', scorpianClass, scorpianPreviousPosition, scorpianCurrentPosition) // move ghost down\n } else if (isRightClear(scorpianCurrentPosition) === true) { // if above, left and below is blocked, check right is clear\n moveCharacter('right', scorpianClass, scorpianPreviousPosition, scorpianCurrentPosition) // move ghost right\n } else if (isUpClear(scorpianCurrentPosition) === true) {\n moveCharacter('up', scorpianClass, scorpianPreviousPosition, scorpianCurrentPosition)\n }\n } else if (scorpianXGoal === a) { // if ghost and player are in line on the y-axis\n // console.log('ghost on same vertical plane as player')\n if (isLeftClear(scorpianCurrentPosition) === true && left !== scorpianPreviousPosition) { // check left tile is clear\n // console.log('move left')\n moveCharacter('left', scorpianClass, scorpianPreviousPosition, scorpianCurrentPosition) // move ghost left\n } else if (isRightClear(scorpianCurrentPosition) === true && right !== scorpianPreviousPosition) { // if above and left tile is blocked, check right is clear\n moveCharacter('right', scorpianClass, scorpianPreviousPosition, scorpianCurrentPosition) // move ghost right\n } else if (isDownClear(scorpianCurrentPosition) === true && down !== scorpianPreviousPosition && scorpianCurrentPosition !== 37 && scorpianCurrentPosition !== 39) { // if above, left and right tile is blocked, check below is clear \n moveCharacter('down', scorpianClass, scorpianPreviousPosition, scorpianCurrentPosition) // move ghost down\n } else if (isUpClear(scorpianCurrentPosition) === true) {\n moveCharacter('up', scorpianClass, scorpianPreviousPosition, scorpianCurrentPosition)\n }\n }\n }\n } else if (scorpianYGoal === b) { // if ghost and player are in line on x-axis\n // console.log('ghost on same horizontal plane as player')\n if (scorpianXGoal > a) { // if ghost to left of player\n // console.log('ghost left of player')\n if (isRightClear(scorpianCurrentPosition) === true && right !== scorpianPreviousPosition) { // check tile to right is clear\n moveCharacter('right', scorpianClass, scorpianPreviousPosition, scorpianCurrentPosition) // move right\n } else if (isLeftClear(scorpianCurrentPosition) === true && left !== scorpianPreviousPosition) { // if right is blocked, check tile to left is clear\n moveCharacter('left', scorpianClass, scorpianPreviousPosition, scorpianCurrentPosition) // move left\n } else if (isDownClear(scorpianCurrentPosition) === true && down !== scorpianPreviousPosition && scorpianCurrentPosition !== 37 && scorpianCurrentPosition !== 39) { // if right and left blocked, check tile below is clear\n moveCharacter('down', scorpianClass, scorpianPreviousPosition, scorpianCurrentPosition) // move down\n } else if (isUpClear(scorpianCurrentPosition) === true) { // if right, left and down blocked, check tile above is clear\n moveCharacter('up', scorpianClass, scorpianPreviousPosition, scorpianCurrentPosition) // move up\n }\n } else if (scorpianXGoal < a) { // if ghost to right of player\n // console.log('ghost right of player')\n if (isLeftClear(scorpianCurrentPosition) === true && left !== scorpianPreviousPosition) { // check left is clear\n moveCharacter('left', scorpianClass, scorpianPreviousPosition, scorpianCurrentPosition) // move left\n } else if (isDownClear(scorpianCurrentPosition) === true && down !== scorpianPreviousPosition && scorpianCurrentPosition !== 37 && scorpianCurrentPosition !== 39) { // if left blocked, check down is clear\n // console.log('left not clear')\n moveCharacter('down', scorpianClass, scorpianPreviousPosition, scorpianCurrentPosition) // move down\n } else if (isRightClear(scorpianCurrentPosition) === true && right !== scorpianPreviousPosition) { // if left and down blocked, check right is clear\n // console.log('down not clear')\n moveCharacter('right', scorpianClass, scorpianPreviousPosition, scorpianCurrentPosition) // move right\n } else if (isUpClear(scorpianCurrentPosition) === true) { // if left, down and right blocked, check up is clear\n // console.log('right not clear, moving up')\n moveCharacter('up', scorpianClass, scorpianPreviousPosition, scorpianCurrentPosition) // move up\n }\n }\n } \n }\n \n addGhost(scorpianCurrentPosition, scorpianClass)\n if (cells[scorpianCurrentPosition].classList.contains(playerClass)) {\n touchGhost(playerCurrentPosition)\n if (ghostMode === 'split class' || ghostMode === 'chase class') {\n playerCurrentPosition = playerStartPosition\n }\n }\n setCharacterCoordinates(scorpianClass, scorpianCurrentPosition, a, b)\n }", "title": "" }, { "docid": "df1b09e3c56cc8082f67732f85bc817c", "score": "0.57797426", "text": "function moveLeft() {\n undraw();\n // current position+index divided by width has no remainder\n const isAtLeftEdge = current.some(\n //condition is at left hand side is true\n (index) => (currentPosition + index) % width === 0\n );\n if (!isAtLeftEdge) currentPosition -= 1;\n if (\n current.some((index) =>\n squares[currentPosition + index].classList.contains(\"taken\")\n )\n ) {\n currentPosition += 1;\n }\n draw();\n }", "title": "" }, { "docid": "5862b1500635633d8ca45fa9f6ed2ae2", "score": "0.57752174", "text": "function moveLeft() {\r\n var min = 99;\r\n for(index of shipArray) {\r\n if(min > index) {\r\n min = index;\r\n }\r\n }\r\n if((min % 10) != 0) {\r\n for(i in shipArray) {\r\n shipArray[i]--;\r\n }\r\n }\r\n //If it is possible to move the ship here, then do so\r\n if(checkPlacement() == true) {\r\n updatePosColor();\r\n }\r\n}", "title": "" }, { "docid": "82249c5724bcb9602f87fc3fb70fff74", "score": "0.5767844", "text": "function positionFixup(){\n\t\tfor (var i = tiles.length - 1; i >= 0; i--) {\n\t\t\tvar layout = returnBalanced(maxCols, maxHeight);\n\t\t\tvar t = $('#'+tiles[i]);\n\t\t\tt.attr({\n\t\t\t\t'row': layout[tiles.length-1][i].row(maxHeight),\n\t\t\t\t'col': layout[tiles.length-1][i].col(maxCols),\n\t\t\t\t'sizex': layout[tiles.length-1][i].sizex(maxCols),\n\t\t\t\t'sizey': layout[tiles.length-1][i].sizey(maxHeight)\n\t\t\t});\n\t\t\tvar tile_offset = offset_from_location(parseInt(t.attr('row')), parseInt(t.attr('col')));\n\t\t\tt.css({\n\t\t\t\t\"top\": tile_offset.top,\n\t\t\t\t\"left\":tile_offset.left,\n\t\t\t\t\"width\":t.attr('sizex')*tileWidth,\n\t\t\t\t\"height\":t.attr('sizey')*tileHeight});\n\t\t\tupdate_board(tiles[i]);\n\t\t};\n\t}", "title": "" }, { "docid": "e99292e2b8c18bdca4763dfca6334707", "score": "0.5764316", "text": "function moveAllToLeft() {\n\tvar moved = false;\n\tfor (var r = 0; r < 4 ; r++ ) {\n\t\tvar s = 0;\n\t\tfor (var c = 0; c < 4 ; c++ ) {\n\t\t\tif (!isCellEmpty(r, c)) {\n\t\t\t\tif (c != s) {\n\t\t\t\t\tmoved = true;\n\t\t\t\t\tsetGridNumRC(r, s, grid[r][c]);\n\t\t\t\t\tsetEmptyCell(r, c);\n\t\t\t\t}\n\t\t\t\ts++;\n\t\t\t}\n\t\t}\n\t}\n\treturn moved;\n}", "title": "" }, { "docid": "32eee0a823e83a491ffbc134409de387", "score": "0.5760458", "text": "function moveTarantula() {\n const down = tarantulaCurrentPosition + width\n const left = tarantulaCurrentPosition - 1\n const right = tarantulaCurrentPosition + 1\n const up = tarantulaCurrentPosition - width\n \n checkGhostMode(tarantulaClass, tarantulaCurrentPosition)\n removeGhost(tarantulaCurrentPosition, tarantulaClass)\n \n if (!cells[tarantulaCurrentPosition].classList.contains(scorpianClass)) {\n // checks movement through tunnel\n if (tarantulaCurrentPosition === 55 && tarantulaXGoal > c && tarantulaPreviousPosition !== 65) {\n tarantulaPreviousPosition = tarantulaCurrentPosition\n tarantulaCurrentPosition = 65\n } else if (tarantulaCurrentPosition === 65 && tarantulaXGoal < c && tarantulaPreviousPosition !== 55) {\n tarantulaPreviousPosition = tarantulaCurrentPosition\n tarantulaCurrentPosition = 55\n } else if (tarantulaYGoal > d) {\n // console.log('ghost higher than player') \n if (isDownClear(tarantulaCurrentPosition) === true && down !== tarantulaPreviousPosition && tarantulaCurrentPosition !== 37 && tarantulaCurrentPosition !== 39) { // check tile below is clear, check previous position\n moveCharacter('down', tarantulaClass, tarantulaPreviousPosition, tarantulaCurrentPosition) // move down\n } else { // if below is blocked, do the following\n if (tarantulaXGoal > c) { // if ghost left of player\n // console.log('ghost left of player')\n if (isRightClear(tarantulaCurrentPosition) === true && right !== tarantulaPreviousPosition) { // check tile to right is clear\n moveCharacter('right', tarantulaClass, tarantulaPreviousPosition, tarantulaCurrentPosition) // move right\n } else { // if down and right is blocked\n // console.log('border to right')\n if (isLeftClear(tarantulaCurrentPosition) === true && left !== tarantulaPreviousPosition) { // check tile to left is clear\n moveCharacter('left', tarantulaClass, tarantulaPreviousPosition, tarantulaCurrentPosition) // move left\n } else { // if down, right and left is blocked\n // console.log('border to left')\n if (isUpClear(tarantulaCurrentPosition) === true) { // check tile above is clear\n moveCharacter('up', tarantulaClass, tarantulaPreviousPosition, tarantulaCurrentPosition) // move up\n } \n }\n }\n } else if (tarantulaXGoal < c) { // if ghost is to right of player\n // console.log('ghost to right of player')\n if (isLeftClear(tarantulaCurrentPosition) === true && left !== tarantulaPreviousPosition) { // check tile to left is clear\n moveCharacter('left', tarantulaClass, tarantulaPreviousPosition, tarantulaCurrentPosition) // move left\n } else { // if down and left is blocked\n // console.log('border to left') \n if (isRightClear(tarantulaCurrentPosition) === true && up !== tarantulaPreviousPosition) { // check tile to right is clear\n moveCharacter('right', tarantulaClass, tarantulaPreviousPosition, tarantulaCurrentPosition) // move right\n } else { // if down, left and right is blocked\n // console.log('border below')\n if (isUpClear(tarantulaCurrentPosition) === true) { // check tile above is clear\n moveCharacter('up', tarantulaClass, tarantulaPreviousPosition, tarantulaCurrentPosition) // move up \n }\n }\n }\n } else if (tarantulaXGoal === c) { // if player and ghost are in line on y-axis\n // console.log('ghost directly above player')\n if (isLeftClear(tarantulaCurrentPosition) === true && left !== tarantulaPreviousPosition) { // check if left tile is clear\n moveCharacter('left', tarantulaClass, tarantulaPreviousPosition, tarantulaCurrentPosition) // move left\n } else if (isRightClear(tarantulaCurrentPosition) === true && right !== tarantulaPreviousPosition) { // if down and left are blocked, check if right tile is clear\n moveCharacter('right', tarantulaClass, tarantulaPreviousPosition, tarantulaCurrentPosition) // move right\n } else if (isUpClear(tarantulaCurrentPosition) === true) { // if down, left and right are blocked, check if tile above is clear\n moveCharacter('up', tarantulaClass, tarantulaPreviousPosition, tarantulaCurrentPosition) // move up\n }\n }\n }\n } else if (tarantulaYGoal < d) { // if ghost is below player\n // console.log('ghost lower than player')\n if (isUpClear(tarantulaCurrentPosition) === true && up !== tarantulaPreviousPosition) { // check tile above is clear\n console.log('moving up')\n moveCharacter('up', tarantulaClass, tarantulaPreviousPosition, tarantulaCurrentPosition) // move ghost up \n } else { // if above is blocked\n if (tarantulaXGoal > c) { // check if ghost is left of player\n // console.log('ghost left of player')\n if (isRightClear(tarantulaCurrentPosition) === true && right !== tarantulaPreviousPosition) { // check if tile to right is clear\n // console.log(right)\n moveCharacter('right', tarantulaClass, tarantulaPreviousPosition, tarantulaCurrentPosition) // move ghost right\n } else if (isLeftClear(tarantulaCurrentPosition) === true && left !== tarantulaPreviousPosition) { // if above and right is blocked, check left is clear\n moveCharacter('left', tarantulaClass, tarantulaPreviousPosition, tarantulaCurrentPosition) // move ghost left\n } else if (isDownClear(tarantulaCurrentPosition) === true && down !== tarantulaPreviousPosition && tarantulaCurrentPosition !== 37 && tarantulaCurrentPosition !== 39) { // if above, right and left is blocked, check down is clear\n moveCharacter('down', tarantulaClass, tarantulaPreviousPosition, tarantulaCurrentPosition) // move ghost down\n } else if (isUpClear(tarantulaCurrentPosition) === true) { // check tile above is clear\n moveCharacter('up', tarantulaClass, tarantulaPreviousPosition, tarantulaCurrentPosition) // move up\n } \n } else if (tarantulaXGoal < c) { // if ghost is right of player\n // console.log('ghost right of player')\n if (isLeftClear(tarantulaCurrentPosition) === true && left !== tarantulaPreviousPosition) { // check tile to left is clear\n moveCharacter('left', tarantulaClass, tarantulaPreviousPosition, tarantulaCurrentPosition) // move ghost left\n } else if (isDownClear(tarantulaCurrentPosition) === true && down !== tarantulaPreviousPosition && tarantulaCurrentPosition !== 37 && tarantulaCurrentPosition !== 39) { // if above and left is blocked, check if tile below is clear\n moveCharacter('down', tarantulaClass, tarantulaPreviousPosition, tarantulaCurrentPosition) // move ghost down\n } else if (isRightClear(tarantulaCurrentPosition) === true && right !== tarantulaPreviousPosition) { // if above, left and below is blocked, check right is clear\n moveCharacter('right', tarantulaClass, tarantulaPreviousPosition, tarantulaCurrentPosition) // move ghost right\n } else if (isUpClear(tarantulaCurrentPosition) === true) { // check tile above is clear\n moveCharacter('up', tarantulaClass, tarantulaPreviousPosition, tarantulaCurrentPosition) // move up\n } \n } else if (tarantulaXGoal === c) { // if ghost and player are in line on the y-axis\n // console.log('ghost on same vertical plane as player')\n if (isLeftClear(tarantulaCurrentPosition) === true && left !== tarantulaPreviousPosition) { // check left tile is clear\n // console.log('move left')\n moveCharacter('left', tarantulaClass, tarantulaPreviousPosition, tarantulaCurrentPosition) // move ghost left\n } else if (isRightClear(tarantulaCurrentPosition) === true && right !== tarantulaPreviousPosition) { // if above and left tile is blocked, check right is clear\n moveCharacter('right', tarantulaClass, tarantulaPreviousPosition, tarantulaCurrentPosition) // move ghost right\n } else if (isDownClear(tarantulaCurrentPosition) === true && down !== tarantulaPreviousPosition && tarantulaCurrentPosition !== 37 && tarantulaCurrentPosition !== 39) { // if above, left and right tile is blocked, check below is clear \n moveCharacter('down', tarantulaClass, tarantulaPreviousPosition, tarantulaCurrentPosition) // move ghost down\n } else if (isUpClear(tarantulaCurrentPosition) === true) { // check tile above is clear\n moveCharacter('up', tarantulaClass, tarantulaPreviousPosition, tarantulaCurrentPosition) // move up\n } \n }\n }\n } else if (tarantulaYGoal === d) { // if ghost and player are in line on x-axis\n // console.log('ghost on same horizontal plane as player')\n if (tarantulaXGoal > c) { // if ghost to left of player\n // console.log('ghost left of player')\n if (isRightClear(tarantulaCurrentPosition) === true && right !== tarantulaPreviousPosition) { // check tile to right is clear\n moveCharacter('right', tarantulaClass, tarantulaPreviousPosition, tarantulaCurrentPosition) // move right\n } else if (isLeftClear(tarantulaCurrentPosition) === true && left !== tarantulaPreviousPosition) { // if right is blocked, check tile to left is clear\n moveCharacter('left', tarantulaClass, tarantulaPreviousPosition, tarantulaCurrentPosition) // move left\n } else if (isDownClear(tarantulaCurrentPosition) === true && down !== tarantulaPreviousPosition && tarantulaCurrentPosition !== 37 && tarantulaCurrentPosition !== 39) { // if right and left blocked, check tile below is clear\n moveCharacter('down', tarantulaClass, tarantulaPreviousPosition, tarantulaCurrentPosition) // move down\n } else if (isUpClear(tarantulaCurrentPosition) === true) { // if right, left and down blocked, check tile above is clear\n moveCharacter('up', tarantulaClass, tarantulaPreviousPosition, tarantulaCurrentPosition) // move up\n }\n } else if (tarantulaXGoal < c) { // if ghost to right of player\n // console.log('ghost right of player')\n if (isLeftClear(tarantulaCurrentPosition) === true && left !== tarantulaPreviousPosition) { // check left is clear\n moveCharacter('left', tarantulaClass, tarantulaPreviousPosition, tarantulaCurrentPosition) // move left\n } else if (isDownClear(tarantulaCurrentPosition) === true && down !== tarantulaPreviousPosition && tarantulaCurrentPosition !== 37 && tarantulaCurrentPosition !== 39) { // if left blocked, check down is clear\n // console.log('left not clear')\n moveCharacter('down', tarantulaClass, tarantulaPreviousPosition, tarantulaCurrentPosition) // move down\n } else if (isRightClear(tarantulaCurrentPosition) === true && right !== tarantulaPreviousPosition) { // if left and down blocked, check right is clear\n // console.log('down not clear')\n moveCharacter('right', tarantulaClass, tarantulaPreviousPosition, tarantulaCurrentPosition) // move right\n } else if (isUpClear(tarantulaCurrentPosition) === true) { // if left, down and right blocked, check up is clear\n // console.log('right not clear, moving up')\n moveCharacter('up', tarantulaClass, tarantulaPreviousPosition, tarantulaCurrentPosition) // move up\n }\n }\n } \n }\n \n addGhost(tarantulaCurrentPosition, tarantulaClass)\n if (cells[tarantulaCurrentPosition].classList.contains(playerClass)) {\n touchGhost(playerCurrentPosition)\n if (ghostMode === 'split class' || ghostMode === 'chase class') {\n playerCurrentPosition = playerStartPosition\n }\n }\n setCharacterCoordinates(tarantulaClass, tarantulaCurrentPosition, c, d)\n }", "title": "" }, { "docid": "4a63d765728ad60f2b109c6d90aac6a3", "score": "0.5749204", "text": "function moveRight() {\n undraw()\n const isAtRightEdge = current.some(index => (currentPosition + index) % width === width -1)\n if(!isAtRightEdge) currentPosition +=1\n if(current.some(index => squares[currentPosition + index].classList.contains('taken'))) {\n currentPosition -=1\n }\n draw()\n}", "title": "" }, { "docid": "221831d3896c6c34be8122be657d7d81", "score": "0.5746461", "text": "function speedUpShape()\n {\n undrawShape();\n\n currentPosition += GRID_WIDTH;\n\n let isCollisionSquare = currentShape.some(\n (index) => squares[currentPosition + index + GRID_WIDTH].classList.contains(\"taken\") )\n\n\n if(isCollisionSquare)\n { \n // turn all the squares of the current shape into that class\n currentShape.forEach(\n (index) => squares[currentPosition + index].classList.add(\"taken\"))\n\n currentPosition -= GRID_WIDTH;\n drawShape();\n \n }\n else\n {\n drawShape();\n }\n }", "title": "" }, { "docid": "011265a14a5c5a7a80b0ade0c90a012a", "score": "0.5737631", "text": "function moveWithLogLeft() {\n if (currentIndex > 18 && currentIndex <= 26) {\n squares[currentIndex].classList.remove('frog');\n currentIndex -= 1;\n squares[currentIndex].classList.add('frog');\n }\n }", "title": "" }, { "docid": "4f7dd1c1679496c2be1b902f0b87b995", "score": "0.57292163", "text": "function moveTo(i, j) {\r\n\tvar targetCell = gBoard[i][j];\r\n\tif (targetCell.type === WALL) return;\r\n\r\n\t// Calculate distance to make sure we are moving to a neighbor cell\r\n\tvar iDiff = (i - gGamerPos.i);\r\n\tvar jDiff = (j - gGamerPos.j);\r\n\r\n\t// If the clicked Cell is one of the four allowed\r\n\t// debugger\r\n\tif (iDiff === 0 && (Math.abs(jDiff)) === 1 || Math.abs(iDiff) === 1 && jDiff === 0) {\r\n\r\n\t\tif (targetCell.gameElement === BALL) {\r\n\t\t\tconsole.log('Collecting!');\r\n\t\t\tkickAudio.play();\r\n\t\t\tgBoard[i][j].gameElement = null;\r\n\t\t\tgScore++;\r\n\t\t\tupdateScore(gScore);\r\n\t\t\tif (gameOver()) {\r\n\t\t\t\tconsole.log('the game is over')\r\n\t\t\t\tresetGame();\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (targetCell.gameElement === GLUE) {\r\n\t\t\tgisGlued = true;\r\n\t\t\tsetTimeout(function () {\r\n\t\t\t\tgisGlued = false;\r\n\t\t\t}, 3000)\r\n\t\t}\r\n\t\tgBoard[i][j].gameElement = GAMER\r\n\t\tgBoard[gGamerPos.i][gGamerPos.j].gameElement = null\r\n\t\trenderCell(gGamerPos, '')\r\n\t\tgGamerPos.i = i\r\n\t\tgGamerPos.j = j\r\n\t\trenderCell(gGamerPos, GAMER_IMG)\r\n\r\n\r\n\t} else console.log('TOO FAR');\r\n}", "title": "" }, { "docid": "208d6c114dda551660b3d1e811f851ba", "score": "0.5724497", "text": "function move_dumb(i, j) {\n\n /* check for a half-speed monster, and check if not to move. Could be\n done in the monster list build.\n */\n switch (player.level.monsters[i][j].arg) {\n case TROGLODYTE:\n case HOBGOBLIN:\n case METAMORPH:\n case XVART:\n case STALKER:\n case ICELIZARD:\n if ((gtime & 1) == 1) return;\n };\n\n\n /* dumb monsters move here */\n /* set up range of spots to check. instead of checking all points\n around the monster, only check those closest to the player. For\n example, if the player is up and right of the monster, check only\n the three spots up and right of the monster.\n */\n var xl = i - 1;\n var yl = j - 1;\n var xh = i + 2;\n var yh = j + 2;\n if (i < player.x) xl++;\n else if (i > player.x) --xh;\n if (j < player.y) yl++;\n else if (j > player.y) --yh;\n\n if (xl < 0) xl = 0;\n if (yl < 0) yl = 0;\n if (xh > MAXX) xh = MAXX; /* MAXX OK; loop check below is <, not <= */\n if (yh > MAXY) yh = MAXY; /* MAXY OK; loop check below is <, not <= */\n\n /* check all spots in the range. find the one that is closest to\n the player. if the monster is already next to the player, exit\n the check immediately.\n */\n var tmpd = 10000;\n var tmpx = i;\n var tmpy = j;\n for (var k = xl; k < xh; k++) {\n for (var m = yl; m < yh; m++) {\n if (k == player.x && m == player.y) {\n tmpd = 1;\n tmpx = k;\n tmpy = m;\n break; /* exitloop */\n } //\n else {\n var item = itemAt(k, m);\n //if (k < 0 || k >= MAXX || m < 0 || m >= MAXY) continue; // JRP fix for edge of home level\n if (!item.matches(OWALL) && //\n !item.matches(OCLOSEDDOOR) && //\n (!player.level.monsters[k][m] || (k == i) && (m == j)) &&\n (!player.level.monsters[i][j].matches(VAMPIRE) || !item.matches(OMIRROR))\n ) {\n var tmp = (player.x - k) * (player.x - k) + (player.y - m) * (player.y - m);\n if (tmp < tmpd) {\n tmpd = tmp;\n tmpx = k;\n tmpy = m;\n } /* end if */\n }\n } /* end if */\n }\n }\n\n /* we have finished checking the spaces around the monster. if\n any can be moved on and are closer to the player than the\n current location, move the monster.\n */\n if ((tmpd < 10000) && ((tmpx != i) || (tmpy != j))) {\n mmove(i, j, tmpx, tmpy);\n w1x = tmpx; /* for last monster hit */\n w1y = tmpy;\n } else {\n w1x = i; /* for last monster hit */\n w1y = j;\n }\n}", "title": "" }, { "docid": "de2738fd60d3e0dbe07a29b76097a475", "score": "0.5717282", "text": "function movementSnake() {\n //cuando se choca contra si misma\n if(squares[currentSnake[0] + direction] &&\n squares[currentSnake[0] + direction].classList.contains('snake')){\n return clearInterval(interval)\n }\n\n const tail = currentSnake.pop()\n squares[tail].classList.remove('snake')\n let newSquare;\n\n //decide donde se agrega el proximo cuadrado: la cabeza del array\n if(//cuando choca contra la pared derecha\n ((currentSnake[0]+1) % width === 0) && (direction === 1)\n ){\n newSquare = ((currentSnake[0] - width +1))\n }else if(//cuando choca contra la izquierda\n (currentSnake[0] % (width) === 0) && (direction === -1) &&\n currentSnake[0] === 0\n ) { \n newSquare = ((currentSnake[0] + width-1))\n }else if(//cuando choca contra el tope\n (currentSnake[0] + direction < 0) &&\n (direction === -width)\n ){\n newSquare = (currentSnake[0] + squares.length - width)\n }else if(//cuando choca contra abajo\n (currentSnake[0] + direction >= squares.length)&&\n (direction === width) \n ){\n newSquare = (currentSnake[0] - squares.length + width)\n }else{//si no choca...\n newSquare = (currentSnake[0] + direction)\n } \n \n currentSnake.unshift(newSquare)\n \n \n //deals with snake getting apple\n if(squares[currentSnake[0]].classList.contains('apple')) {\n squares[currentSnake[0]].classList.remove('apple')\n squares[tail].classList.add('snake')\n currentSnake.push(tail)\n randomApple()\n score++\n scoreDisplay.textContent = score * 100\n clearInterval(interval)\n intervalTime = intervalTime * speed\n interval = setInterval(moveOutcomes, intervalTime)\n }\n squares[currentSnake[0]].classList.add('snake')\n\n}", "title": "" }, { "docid": "3d390f2b6a6e0fbe5c0adb51290a2186", "score": "0.57152927", "text": "function move(directions) { //function using \"directions\" input from above\r\n\r\nif (directions === 'N' && hoover_y < room_size_y -1) //if directions read \"n\", add +1 to the hoover_y coord as long as the hoover is not in the vertical edge of the toom\r\n{\r\n hoover_y++;\r\n } \r\nelse if (directions === 'S' && hoover_y > 0) { // if directions read \"s\", subtract -1 to the hoover_y coord\r\n hoover_y--;\r\n} \r\nelse if (directions === 'E' && hoover_x < room_size_x -1) { // if directions read \"e\", subtract -1 to the hoover_x cord as long as you dont leave the room\r\n hoover_x++;\r\n} \r\nelse if (directions === 'W' && hoover_x > 0) { // if directions read \"w\" add +1 to the hoover_x coord\r\n hoover_x--; \r\n}\r\n\r\n// ***PART 3*** Count # of dirty patches cleaned\r\n\r\n// First, tell the program where the dirty patches are\r\n// Build array, set to dirty = false, meaning they are all clean\r\n// Then pull dirty coords from input and add to the array\r\n\r\nvar dirty_array = []; // creates an empty array for dirty patches, right now its empty\r\nfor (var i=0; i < room_size_x; i++) { //for loop that says for all x less than x-axis...\r\n var row =[]; // create another array for the row\r\n for (var j = 0; j < room_size_y; j++){ // for all height of the room!\r\n row.push(false); // array full of boolean \"false\"\r\n }\r\n dirty_array.push(row); //array exact size of room\r\n}\r\n\r\ndirty_array[hoover_x][hoover_y]= true; //takes the array in part 3 below and changes boolean \"falses\" to \"true\" if the coordinates match the array\r\n\r\n// check for dirt when moving\r\n if(dirty_array[hoover_x][hoover_y] === true) {\r\n console.log('Dirt found at: ', hoover_x, hoover_y);\r\n hooveredDirt += 1;\r\n }\r\n}", "title": "" }, { "docid": "0741ebb9d5755b509c7216c6a5e4e201", "score": "0.571386", "text": "function moveTo(i, j) {\n\tif (isGlued) return;\n\n\tvar targetCell = gBoard[i][j];\n\tif (targetCell.type === WALL) return;\n\n\t// Calculate distance to make sure we are moving to a neighbor cell\n\tvar iAbsDiff = Math.abs(i - gGamerPos.i);\n\tvar jAbsDiff = Math.abs(j - gGamerPos.j);\n\n\n\t// If the clicked Cell is one of the four allowed\n\tif ((iAbsDiff === 1 && jAbsDiff === 0)\n\t\t|| (jAbsDiff === 1 && iAbsDiff === 0)\n\t\t|| (jAbsDiff === 11 && iAbsDiff === 0)\n\t\t|| (jAbsDiff === 0 && iAbsDiff === 9)) {\n\n\t\tif (targetCell.gameElement === BALL) {\n\t\t\tconsole.log('Collecting!');\n\t\t\tgBallsCollected++\n\t\t\tupdateScore(gBallsCollected);\n\t\t\tcheckVictory();\n\t\t\taudioBall.play();\n\n\t\t} else if (targetCell.gameElement === GLUE) {\n\t\t\tconsole.log('GLUED!');\n\t\t\tisGlued = true;\n\t\t\taudioGlue.play();\n\t\t\tGAMER_IMG = '<img src=\"img/gamer-purple.png\" />';\n\t\t\tsetTimeout(function () {\n\t\t\t\tisGlued = false\n\t\t\t\tGAMER_IMG = '<img src=\"img/gamer.png\" />'\n\t\t\t\trenderCell(gGamerPos, GAMER_IMG);\n\t\t\t\taudioUnglue.play();\n\t\t\t}, 3000);\n\t\t}\n\n\t\t// MOVING from current position\n\t\t// Model:\n\t\tgBoard[gGamerPos.i][gGamerPos.j].gameElement = null;\n\t\t// Dom:\n\t\trenderCell(gGamerPos, '');\n\n\t\t// MOVING to selected position\n\t\t// Model:\n\t\tgGamerPos.i = i;\n\t\tgGamerPos.j = j;\n\t\tgBoard[gGamerPos.i][gGamerPos.j].gameElement = GAMER;\n\t\t// DOM:\n\t\trenderCell(gGamerPos, GAMER_IMG);\n\n\t} // else console.log('TOO FAR', iAbsDiff, jAbsDiff);\n\n}", "title": "" }, { "docid": "cb8f60b8eb8b03223c060ddcb57d1319", "score": "0.57049036", "text": "function moveAllToTop() {\n\tvar moved = false;\n\tfor (var c = 0; c < 4 ; c++ ) {\n\t\tvar s = 0;\n\t\tfor (var r = 0; r < 4 ; r++ ) {\n\t\t\tif (!isCellEmpty(r, c)) {\n\t\t\t\tif (r != s) {\n\t\t\t\t\tmoved = true;\n\t\t\t\t\tsetGridNumRC(s, c, grid[r][c]);\n\t\t\t\t\tsetEmptyCell(r, c);\n\t\t\t\t}\n\t\t\t\ts++;\n\t\t\t}\n\t\t}\n\t}\n\treturn moved;\n}", "title": "" }, { "docid": "d21a4c1e75ea553eee7ce56efcaa0c6a", "score": "0.5699929", "text": "function moveRight() {\n undraw();\n const isAtRightEdge = current.some((index) => (currentPosition + index) % width === width - 1);\n if (!isAtRightEdge) currentPosition += 1;\n if (current.some((index) => squares[currentPosition + index].classList.contains('taken'))) {\n currentPosition -= 1;\n }\n draw();\n}", "title": "" }, { "docid": "36623ba1a7dd13e30996e74d6784fd80", "score": "0.56954354", "text": "function moveTo(i, j) {\r\n var targetCell = gBoard[i][j];\r\n if(!isGameOn) isGameOn=true;;\r\n if (targetCell.type === WALL) return;\r\n\r\n // Calculate distance to ake sure we are moving to a neighbor cell\r\n var iAbsDiff = Math.abs(i - gGamerPos.i);\r\n var jAbsDiff = Math.abs(j - gGamerPos.j);\r\n\r\n var absDistance = jAbsDiff + iAbsDiff;\r\n\r\n console.log(\"abs distance vetween cells:\", absDistance);\r\n\r\n // If the clicked Cell is one of the four allowed\r\n if (absDistance === 1 || gGamerPos.i===0 ||gGamerPos.i === 9||gGamerPos.j===11||gGamerPos.j===0 ) {\r\n if (targetCell.gameElement === BALL) {\r\n popSound.play();\r\n gCounter++;\r\n var elBall = document.querySelector(\".number-balls\");\r\n elBall.innerText = gCounter;\r\n checkVictory();\r\n }\r\n\r\n // Todo: Move the gamer\r\n\r\n gBoard[gGamerPos.i][gGamerPos.j].gameElement = \"\";\r\n renderCell(gGamerPos, \"\");\r\n\r\n gGamerPos.i = i;\r\n gGamerPos.j = j;\r\n\r\n gBoard[i][j].gameElement = GAMER;\r\n renderCell(gGamerPos, GAMER_IMG);\r\n } else console.log(\"TOO FAR\", iAbsDiff, jAbsDiff);\r\n}", "title": "" }, { "docid": "e2c7976a4b9ac77699cc10d61a01cc85", "score": "0.5694047", "text": "function moveLeft() {\n undraw()\n\n const isAtLeftEdge = current.some(index => (currentPosition + index) % width === 0)\n\n if (!isAtLeftEdge) currentPosition -= 1\n\n if (current.some(index => squares[currentPosition + index].classList.contains('taken'))) {\n currentPosition += 1\n }\n\n draw()\n }", "title": "" }, { "docid": "215f55106f7e5c49009b665c5691e19a", "score": "0.5693225", "text": "function tryToMove (direction) {\r\n\t\r\n\t// location before move\r\n\tlet oldLocation = currentLocationOfHorse;\r\n\r\n\t// class of location before move\r\n\tlet oldClassName = gridBoxes[oldLocation].className;\r\n\r\n\tlet nextLocation = 0;\t// location we wish to move to\r\n\t//let nextClass = \"\"; \t// class of location we wish to move to\r\n\r\n\tlet nextLocation2 = 0;\r\n\tlet nextClass2 = \"\";\r\n\r\n\tlet newClass = \"\"; \t// new class to switch to if move successful\r\n\t\r\n\tnextClass = gridBoxes[nextLocation].className;\r\n\t\r\n\tswitch (direction) {\r\n\t\tcase \"left\" : \r\n\t\t\tnextLocation = currentLocationOfHorse - 1; \r\n\t\t\tbreak;\r\n\r\n\t\tcase \"right\" : \r\n\t\t\tnextLocation = currentLocationOfHorse + 1;\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"up\" : \r\n\t\t\tnextLocation = currentLocationOfHorse - widthOfBoard;\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"down\" : \r\n\t\t\tnextLocation = currentLocationOfHorse + widthOfBoard;\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"none\":\r\n\t\t\tnextLocation = currentLocationOfHorse;\r\n\t\t\treturn;\r\n\t} // switch\r\n\r\n\t\tnextClass = gridBoxes[nextLocation].className;\r\n\r\n\tif (gameOn == true && onFence == false) {\t\r\n\t\t// if the obstacle is not passable, don't move\r\n\t\tif (noPassObstacles.includes(nextClass)) { return; };\r\n\r\n\t\t// if it's a fence, and there's no rider, don't move\r\n\t\tif (!riderOn && nextClass.includes(\"fence\")) { return; };\r\n\r\n\t\t// if there's a fence, move 2 spaces with animation\r\n\t\t\tif (nextClass.includes(\"fence\")) {\r\n\r\n\t\t\t\t// rider must be on to jump\r\n\t\t\t\tif (riderOn) {\r\n\r\n\t\t\t\t\tgridBoxes[currentLocationOfHorse].className = \"\";\r\n\t\t\t\t\toldClassName = gridBoxes[nextLocation].className;\r\n\r\n\t\t\t\t\t// set values according to direction\r\n\t\t\t\t\tif (direction == \"left\") {\r\n\t\t\t\t\t\tnextClass = \"jumpleft\";\r\n\t\t\t\t\t\tnextClass2 = \"horserideleft\";\r\n\t\t\t\t\t\tnextLocation2 = nextLocation - 1;\r\n\t\t\t\t\t} else if (direction == \"right\") {\r\n\t\t\t\t\t\tnextClass = \"jumpright\";\r\n\t\t\t\t\t\tnextClass2 = \"horserideright\";\r\n\t\t\t\t\t\tnextLocation2 = nextLocation + 1;\r\n\t\t\t\t\t} else if (direction == \"up\") {\r\n\t\t\t\t\t\tnextClass = \"jumpup\";\r\n\t\t\t\t\t\tnextClass2 = \"horserideup\";\r\n\t\t\t\t\t\tnextLocation2 = nextLocation - widthOfBoard;\r\n\t\t\t\t\t} else if (direction == \"down\") {\r\n\t\t\t\t\t\tnextClass = \"jumpdown\";\r\n\t\t\t\t\t\tnextClass2 = \"horseridedown\";\r\n\t\t\t\t\t\tnextLocation2 = nextLocation + widthOfBoard;\r\n\t\t\t\t\t}\r\n\r\n\r\n\t\t\t\t\t// show horse jumping\r\n\t\t\t\t\tgridBoxes[nextLocation].className = nextClass;\r\n\t\t\t\t\tonFence = true;\r\n\r\n\t\t\t\t\tsetTimeout (function() {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// set jump back to just a fence\r\n\t\t\t\t\t\tgridBoxes[nextLocation].className = oldClassName;\r\n\r\n\t\t\t\t\t\t// update current location of the horse to be 2 spaces past take off\r\n\t\t\t\t\t\tcurrentLocationOfHorse = nextLocation2;\r\n\r\n\t\t\t\t\t\t// get class of box after jump\r\n\t\t\t\t\t\tnextClass = gridBoxes[currentLocationOfHorse].className;\r\n\r\n\t\t\t\t\t\t// show horse and rider after landing\r\n\t\t\t\t\t\tgridBoxes[currentLocationOfHorse].className = nextClass2;\r\n\r\n\t\t\t\t\t\t// document.addEventListener(\"keydown\", e);\r\n\r\n\t\t\t\t\t\t// if next box is a flag, go up a level\r\n\t\t\t\t\t\tlevelUp(nextClass);\r\n\t\t\t\t\t\tonFence = false;\r\n\r\n\t\t\t\t\t}, 350); //350\r\n\t\t\t\t\t\r\n\t\t\t\t\treturn; \r\n\r\n\t\t\t\t} // if rider on\r\n\r\n\t\t\t} // if class has fence\r\n\r\n\r\n\t\t// if there's a rider, add rider\r\n\t\tif (nextClass == \"rider\") {\r\n\t\t\triderOn = true;\r\n\t\t} // if\r\n\r\n\t\t// if there's a bridge in the old location, keep it\r\n\t\tif (oldClassName.includes(\"bridge\")) {\r\n\t\t\tgridBoxes[oldLocation].className = \"bridge\";\r\n\t\t} else {\r\n\t\t\tgridBoxes[oldLocation].className = \"\";\r\n\t\t} // else\r\n\r\n\t\t// build name of new class\r\n\t\tnewClass = (riderOn) ? \"horseride\" : \"horse\";\r\n\t\tnewClass += direction;\r\n\r\n\t\t// if there is a bridge in the next location, keep it\r\n\t\tif (gridBoxes[nextLocation].classList.contains(\"bridge\")) {\r\n\t\t\tnewClass += \" bridge\";\r\n\t\t}\r\n\r\n\t\t// move 1 space\r\n\t\tcurrentLocationOfHorse = nextLocation;\r\n\t\tgridBoxes[currentLocationOfHorse].className = newClass;\r\n\r\n\t\t// if it is an enemy\r\n\t\tif (nextClass.includes(\"enemy\")) {\r\n\t\t\tstopGame(\"hitEnemy\");\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// move up a level if needed\r\n\t\tlevelUp(nextClass);\r\n\t} // if GameOn\r\n} // tryToMove", "title": "" }, { "docid": "2b56549cdfb69b0e36cac5346410add6", "score": "0.5688501", "text": "function updatePosition(object, direction) {\n\n currentGrid = grid; //Save the grid before changes are made.\n\n xLoop:\n for (var i = 0; i < grid.length; i++) {\n yLoop:\n for (var j = 0; j < grid.length; j++) {\n\n if (grid[i][j] == object) {\n\n //player is moving down and the space is free\n if (direction == \"down\" && !isWall(grid[i + 1][j]) && !boxCollision(grid[i + 1][j], grid[i + 2][j])) {\n\n grid[i][j] = 0; //set current position to a blank space\n\n //Check if box can move\n if (checkBox(grid[i + 1][j]) && grid[i + 2][j] == 0 || grid[i + 2][j] == 4) {\n grid[i + 2][j] = 3; //Move box into position ahead of the new player position\n }\n\n grid[i + 1][j] = object; //Move object to new position\n stepCount += 1; //Increase the step count\n\n break xLoop; //break from outer loop\n\n }\n //player is moving up and the space is free\n else if (direction == \"up\" && !isWall(grid[i - 1][j]) && !boxCollision(grid[i - 1][j], grid[i - 2][j])) {\n\n grid[i][j] = 0; //Set current position to a blank space\n\n //Check if box can move\n if (checkBox(grid[i - 1][j]) && grid[i - 2][j] == 0 || grid[i - 2][j] == 4) {\n grid[i - 2][j] = 3; //Move box into position ahead of new player position\n }\n\n grid[i - 1][j] = object; //Move player to new position\n stepCount += 1; //Increase step count\n break xLoop; //Break from outer loop\n\n }\n\n //Player is moving left and the space is free\n else if (direction == \"left\" && !isWall(grid[i][j - 1]) && !boxCollision(grid[i][j - 1], grid[i][j - 2])) {\n grid[i][j] = 0; //Set current position to blank space\n\n //Check if a box can move\n if (checkBox(grid[i][j - 1]) && grid[i][j - 2] == 0 || grid[i][j - 2] == 4) {\n grid[i][j - 2] = 3; //Update box position ahead of new player position\n }\n\n grid[i][j - 1] = object; //Move player into new position\n stepCount += 1; //Increase step count\n break xLoop; //Break from outer loop\n\n }\n //Player is moving right and the space is free\n else if (direction == \"right\" && !isWall(grid[i][j + 1]) && !boxCollision(grid[i][j + 1], grid[i][j + 2])) {\n\n grid[i][j] = 0; //Set current position to blank space\n\n //Check if a box can move\n if (checkBox(grid[i][j + 1]) && grid[i][j + 2] == 0 || grid[i][j + 2] == 4) {\n grid[i][j + 2] = 3; //Update box position ahead of new player position\n }\n\n grid[i][j + 1] = object; //Move player into new position\n stepCount += 1; //Increase step count\n break xLoop; //Break from outer loop\n }\n }\n }\n }\n\n //This loop will check if any goals in the level are missing, then set the value to 4 so that they will be redrawn\n for (var i = 0; i < goalArray.length; i++) {\n\n if (grid[goalArray[i][0]][goalArray[i][1]] == 0) {\n grid[goalArray[i][0]][goalArray[i][1]] = 4;\n }\n\n }\n}", "title": "" }, { "docid": "693b04b5fe179b32424edbbfc7602ea0", "score": "0.56882995", "text": "fixMove(nextMove, previousMove) {\n\n // ensures that next move doesn't simply revert the previous\n if (nextMove === 0 && previousMove === 1) {\n nextMove = 2;\n } else if (nextMove === 1 && previousMove === 0) {\n nextMove = 3;\n } else if (nextMove === 2 && previousMove === 3) {\n nextMove = 0;\n } else if (nextMove === 3 && previousMove === 2) {\n nextMove = 1;\n }\n\n // ensures that the next move will be legal\n // (there are also safeguards against this in moveTile{Direction})\n if (nextMove === 0 && emptyTileIndex <= 3) {\n nextMove += 1;\n } else if (nextMove === 1 && emptyTileIndex > 11 ) {\n nextMove -= 1;\n }\n if (nextMove === 2 && emptyTileIndex % 4 === 0) {\n nextMove += 1;\n } else if (nextMove === 3 && [3, 7, 11, 15].includes(emptyTileIndex)) {\n nextMove -= 1;\n }\n\n return nextMove;\n }", "title": "" }, { "docid": "35011e04c1ef9983a990f0f8dd8818f6", "score": "0.5679074", "text": "function bugCollision(){ //////////// TO DO\n //boolean function\n //returns true if bug is about to collide with another bug\n //base of measure if their front points are within 10px\n //of radius\n //returns otherwise\n// Not to offend or anything but I have already invested so much\n// time for this assignment that I don't feel like implementing\n// anymore. I have 2 more assignments due the next week I'm done\n// with this.\n}", "title": "" }, { "docid": "469d198477d7a0a867dfa8e0bec8299a", "score": "0.56783164", "text": "_moveLeftInfinity() {\n if (!this._settings.infinity) return;\n\n this._currentPosition = this._items.length;\n this._itemsHolder.style.transition = `transform ${ 0 }ms`;\n\n this._offset = -(this._calcShiftMaxLength() + this._calcTowardsLeft() );\n this._itemsHolder.style.transform = `translateX(${ this._offset - this._settings.oppositeSideAppearShift }px)`;\n setTimeout(() => this._moveLeft(), this._settings.oppositeSideAppearDelay);\n }", "title": "" }, { "docid": "10d9ce37da4477153d4b65837a2442ea", "score": "0.567313", "text": "function moveTo(i, j) {\n\n\tvar targetCell = gBoard[i][j];\n\tif (targetCell.type === WALL) return;\n\n\tif (targetCell.type === PASSAGE) {\n\t\tconsole.log('here');\n\t\tmoveThroughPassage(i, j);\n\t\treturn;\n\t}\n\n\t// Calculate distance to make sure we are moving to a neighbor cell\n\tvar iAbsDiff = Math.abs(i - gGamerPos.i);\n\tvar jAbsDiff = Math.abs(j - gGamerPos.j);\n\n\t// If the clicked Cell is one of the four allowed\n\tif ((iAbsDiff === 1 && jAbsDiff === 0) || (jAbsDiff === 1 && iAbsDiff === 0)) {\n\n\t\tif (targetCell.gameElement === BALL) {\n\t\t\tgBallsCollected++;\n\n\t\t\tif (gBallsCollected === gBallsAdded) {\n\t\t\t\tconsole.log('Collecting! and Won! You have collected:', gBallsCollected + ' balls in total');\n\t\t\t\taudioWon.play();\n\t\t\t\tgBoard[gGamerPos.i][gGamerPos.j].gameElement = null;\n\t\t\t\trenderCell(gGamerPos, '');\n\t\t\t\tgGamerPos.i = i;\n\t\t\t\tgGamerPos.j = j;\n\t\t\t\tgBoard[gGamerPos.i][gGamerPos.j].gameElement = GAMER;\n\t\t\t\trenderCell(gGamerPos, GAMER_IMG);\n\t\t\t\tclearInterval(gInterval);\n\n\t\t\t\tdocument.querySelector('.start').style.display = 'block';\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\tconsole.log('Collecting! You have:', gBallsCollected + ' balls in total');\n\t\t\t\taudioCollect.play();\n\t\t\t}\n\t\t}\n\n\t\t\n\t\t// MOVING from current position\n\t\t// Model:\n\t\tgBoard[gGamerPos.i][gGamerPos.j].gameElement = null;\n\t\t// Dom:\n\t\trenderCell(gGamerPos, '');\n\n\n\t\t// MOVING to selected position\n\t\t// Model:\n\t\tgGamerPos.i = i;\n\t\tgGamerPos.j = j;\n\t\tgBoard[gGamerPos.i][gGamerPos.j].gameElement = GAMER;\n\t\t// DOM:\n\t\trenderCell(gGamerPos, GAMER_IMG);\n\n\t} // else console.log('TOO FAR', iAbsDiff, jAbsDiff);\n\n}", "title": "" }, { "docid": "a74247c63030cd2b283152cea44d4ea2", "score": "0.5668972", "text": "function moveRight () {\n undraw()\n const isAtRightEdge = current.some(index => (currentPosition + index) % width === width - 1)\n\n if (!isAtRightEdge) {\n currentPosition += 1\n }\n\n if (current.some(index => squares[currentPosition + index].classList.contains('taken'))) {\n currentPosition -= 1\n }\n draw()\n }", "title": "" }, { "docid": "d5f5a63b0372045ac7c293a39f19ae44", "score": "0.56663454", "text": "function moveRight() {\r\n unDraw();\r\n const isAtRightEdge = current.some(\r\n (index) => (currentPosition + index) % width === width - 1\r\n );\r\n if (!isAtRightEdge) currentPosition += 1;\r\n if (\r\n current.some((index) =>\r\n squares[currentPosition + index].classList.contains(\"taken\")\r\n )\r\n ) {\r\n currentPosition -= 1;\r\n }\r\n draw();\r\n }", "title": "" }, { "docid": "70d774b447d1c13ab6441e02bb924922", "score": "0.56644577", "text": "calculateFramePosition(i) {\n // So If position of frame in bounds of our frames array, element has flex order equal 0\n if (i >= 0 && i < this.totalFrames) {\n this.frame.push(i);\n this.order[i] = 0;\n } else if (i >= this.totalFrames) {\n // If position of frame more than total then we moving right\n // We want to show frame from left side, and for moving it right\n // We chanign flex order to 1, that more than 0, so it floating right side\n let diff = i - this.totalFrames;\n\n this.frame.push(diff);\n this.order[diff] = 1;\n } else {\n // If position of frame less than 0 then we moving left\n // We want to show frame from right side here, and for moving it left\n // We chanign flex order to -1, that less than 0 and 1, so it floating left side\n let diff = this.totalFrames + i;\n\n this.frame.push(diff);\n this.order[diff] = -1;\n }\n }", "title": "" }, { "docid": "5851a5eecaa9ce41c6098093453f5005", "score": "0.5662773", "text": "function moveLeft() {\r\n undraw();\r\n const isAtLeftEdge = current.some(index => (currentPosition + index) % width === 0);\r\n // allows shape to move left if it's not at the left position\r\n if (!isAtLeftEdge) currentPosition -= 1;\r\n\r\n // push it unto a tetrimino that is already on the left edge\r\n if (current.some(index => squares[currentPosition + index].classList.contains('taken'))) {\r\n currentPosition += 1;\r\n\r\n }\r\n draw();\r\n}", "title": "" }, { "docid": "4e491fad56eb9cb4e89322ccd8c82c51", "score": "0.5660561", "text": "move()\n {\n //contain logic within borders\n if (this.xPos + this.sprite.width > width)\n {\n this.xSpeed = 0;\n this.collided = true;\n this.xPos = width - this.sprite.width\n }\n if (this.xPos < 0)\n {\n this.xSpeed = 0;\n this.collided = true;\n this.xPos = 0;\n }\n if (this.yPos > height-238-this.sprite.height)\n {\n this.ySpeed = 0;\n this.collided = true;\n this.yPos = height-238 - this.sprite.height;\n }\n if (this.yPos < 0)\n {\n this.ySpeed = 0;\n this.collided = true;\n this.yPos = 0;\n }\n //kapp notes helpful as always\n // move left?\n if (keyIsDown(LEFT_ARROW) || keyIsDown(65))\n {\n // subtract from character's xSpeed\n this.xSpeed -= this.accel;\n this.left = true;\n this.right = false;\n }\n // move right?\n if (keyIsDown(RIGHT_ARROW) || keyIsDown(68))\n {\n // add to character's xSpeed\n this.xSpeed += this.accel;\n this.right = true;\n this.left = false;\n }\n //reload, basic\n if (keyIsDown(82))\n {\n this.ammoCapacity = 8;\n }\n // fuel!!\n if (keyIsDown(32))\n {\n if (this.fuel > 0)\n {\n //if you still have fuel, then use it\n this.ySpeed -= this.accel;\n }\n if (this.fuel > -250)\n {\n //250 is the threshold under 0 to simulate a \"delay\" since idk how millis() works\n this.fuel -= 15;\n }\n }\n //look at this sad commented out failure of a feature... maybe one day\n /*\n if (keyCode == SHIFT)\n {\n if (cooldown)\n {\n let yDistance = this.yPos - this.jumpSize;\n this.yPos -= this.jumpSpeed * yDistance;\n jumping = true;\n }\n }*/\n //this I felt I wanted to do so that the left and right speeds\n //would naturally slow down over time. Felt unnatural otherwise.\n if (this.right)\n {\n this.xSpeed -= this.gravity;\n if (this.xSpeed < 0)\n {\n this.right = false;\n this.left = true;\n }\n }\n else if (this.left)\n {\n this.xSpeed += this.gravity;\n if (this.xSpeed > 0)\n {\n this.right = true;\n this.left = false;\n }\n }\n\n //the standard movement. Add gravity, speed to position\n this.ySpeed += this.gravity;\n this.xPos += this.xSpeed;\n this.yPos += this.ySpeed;\n\n //gradually grow your fuel overtime. A counter would've been great but I couldn't learn it in time...\n //no pun intended.\n if (this.fuel < this.fuelCapacity)\n {\n this.fuel += 5;\n }\n\n // speed limit! prevent the user from moving too fast\n this.xSpeed = constrain(this.xSpeed, -this.xLimit, this.xLimit);\n this.ySpeed = constrain(this.ySpeed, -25, 25);\n }", "title": "" }, { "docid": "79186a0b6fca9acae58128295ce19d24", "score": "0.5658918", "text": "function looping(test){\n\t\t\ttest.find('.looping').each(function(){\n\t\t\t\tif($(this).attr('class').search(/seamless/i) != -1){\n\t\t\t\t\tif($(this).css('left').replace('px','') > -$(this).find(':nth-child(1)').width()){\n\t\t\t\t\t\t$(this).css('left',$(this).css('left').replace('px','')-10*($(this).css('z-index')/1000));\n\t\t\t\t\t} else {\n\t\t\t\t\t\t\n\t\t\t\t\t\t$(this).css('left','0px');\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif($(this).css('left').replace('px','') > -$(this).width()){\n\t\t\t\t\t\t$(this).css('left',$(this).css('left').replace('px','')-10*($(this).css('z-index')/1000));\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$(this).css('left',$(this).parent().width());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}", "title": "" }, { "docid": "5533772394733c95509bddc770d9df4b", "score": "0.56569004", "text": "move() {\n let xDiff = this.xTarget - this.x + 5; // Blumenmitte\n let yDiff = this.yTarget - this.y;\n if (Math.abs(xDiff) < 1 && Math.abs(yDiff) < 1)\n this.setRandomFlowerPosition();\n else {\n this.x += xDiff * this.speed;\n this.y += yDiff * this.speed;\n }\n }", "title": "" }, { "docid": "3591eb0dbc5141a79321317efc6f7c4b", "score": "0.5656576", "text": "function moveRight() {\r\n undraw();\r\n const isAtRightEdge = current.some(\r\n index=> (currentPosition + index) % width === width - 1)\r\n \r\n if (!isAtRightEdge) {\r\n currentPosition += 1;\r\n }\r\n if (\r\n current.some((index) =>\r\n squares[currentPosition + index].classList.contains(\"taken\")\r\n )\r\n ) {\r\n currentPosition -= 1;\r\n }\r\n draw();\r\n }", "title": "" }, { "docid": "b41664f2f369b87bf041605da696f3f0", "score": "0.5652078", "text": "function moveRight() {\n undraw()\n const reachedRightEdge = curT.some(index => (curPos + index) % width === width - 1)\n if (!reachedRightEdge) curPos += 1\n if (curT.some(index => squares[curPos + index].classList.contains('taken'))) {\n // if the position has been taken by another figure, push the tetromino back\n curPos -= 1 \n }\n draw()\n }", "title": "" }, { "docid": "335b2ec2c1dfc5ac1589d104f0952911", "score": "0.56443256", "text": "function movePlayerDown(playerPiece){\n\tlet change = 1;\n\tfor(let i = 0; i < playerPiece.piece.piece.length; i++){\n\t\tfor(let j = 0; j < playerPiece.piece.piece[i].length; j++){\n\t\t\tif(!playerPiece.piece.piece[i][j].isEmpty()){\n\t\t\t\tif(playerPiece.y-(change)-i-playerPiece.piece.centerY >= 0 && b.board[playerPiece.y-(change)-i-playerPiece.piece.centerY]===undefined){\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\twhile(playerPiece.y-(change)-i-playerPiece.piece.centerY < 0 || playerPiece.y-(change)-i-playerPiece.piece.centerY >= b.HEIGHT || !b.board[playerPiece.y-(change)-i-playerPiece.piece.centerY][playerPiece.x-j-playerPiece.piece.centerX].isEmpty()){\n\t\t\t\t\tchange -= 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tplayerPiece.y -= change;\n\n\t//place piece down\n\tif(change !== 1){\n\t\tif(framesUntilPlace === 0){\n\t\t\tfor(let i = 0; i < playerPiece.piece.piece.length; i++){\n\t\t\t\tfor(let j = 0; j < playerPiece.piece.piece[i].length; j++){\n\t\t\t\t\tif(!playerPiece.piece.piece[i][j].isEmpty()){\n\t\t\t\t\t\tif(playerPiece.y-i-playerPiece.piece.centerY >= b.HEIGHT){\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tb.board[playerPiece.y-i-playerPiece.piece.centerY][playerPiece.x-j-playerPiece.piece.centerX] = playerPiece.piece.piece[i][j];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tcanSwap = true;\n\t\t\tsetPlayerPiece(playerQueue('pop'));\n\t\t\tupdateQueueVisual();\n\n\t\t\tscore += 1;\n\t\t\tlet badPieceCounter = 0;\n\t\t\tfor(let i = 0; i < playerPiece.piece.piece.length; i++){\n\t\t\t\tfor(let j = 0; j < playerPiece.piece.piece[i].length; j++){\n\t\t\t\t\tif(!playerPiece.piece.piece[i][j].isEmpty()){\n\t\t\t\t\t\tif (playerPiece.y-i-playerPiece.piece.centerY >= b.HEIGHT){\n\t\t\t\t\t\t\tif(!b.board[b.HEIGHT - 1][playerPiece.x-j-playerPiece.piece.centerX].isEmpty()){\n\t\t\t\t\t\t\t\tbadPieceCounter += 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(playerPiece.y-i-playerPiece.piece.centerY < b.HEIGHT && !b.board[playerPiece.y-i-playerPiece.piece.centerY][playerPiece.x-j-playerPiece.piece.centerX].isEmpty()){\n\t\t\t\t\t\t\tbadPieceCounter += 1;\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\tif(badPieceCounter >= 1){\n\t\t\t\tfor(let i = 0; i < playerPiece.piece.piece.length; i++){\n\t\t\t\t\tfor(let j = 0; j < playerPiece.piece.piece[i].length; j++){\n\t\t\t\t\t\twhile(playerPiece.y-i-playerPiece.piece.centerY < b.HEIGHT && !b.board[playerPiece.y-i-playerPiece.piece.centerY][playerPiece.x-j-playerPiece.piece.centerX].isEmpty()){\n\t\t\t\t\t\t\tplayerPiece.y += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} else {\n\t\t\tframesUntilPlace--;\n\t\t}\n\t} else {\n\t\tframesUntilPlace = 1;\n\t}\n\treturn false;\n}", "title": "" }, { "docid": "ac2e67ad12b1b58ee24cdaa33f07bbc0", "score": "0.564388", "text": "function updateSnakePositions(tempFoodPosition){\n\tif(tempFoodPosition){\n\t\tfoodPositionArray.push([tempFoodPosition[0],tempFoodPosition[1]]);\n\t}\n\tcurrentSnakeBodyUnits[0] = {transition: snake.direction, position: snake.position};\n\t//move every unit of snake body\n\tif(currentSnakeBodyUnits.length>=1){\n\t\t$.each(currentSnakeBodyUnits,function(index,bodyUnit){\n\t\t\tif(index>0){\n\t\t\t\t//if current body unit is to the right of the previous one, the snake is moving leftward\n\t\t\t\tif(bodyUnit.position[1] > currentSnakeBodyUnits[index-1].position[1]){\n\t\t\t\t\t//if current body unit is also to the bottom of the previous one, \n\t\t\t\t\tif(bodyUnit.position[0] > currentSnakeBodyUnits[index-1].position[0]){\n\t\t\t\t\t\t//the current body unit shd move up if the prev unit's transition is left, or\n\t\t\t\t\t\tif(currentSnakeBodyUnits[index-1].transition=='l'){\n\t\t\t\t\t\t\tcurrentSnakeBodyUnits[index].position[0] -= 1;\n\t\t\t\t\t\t\tcurrentSnakeBodyUnits[index].transition = 'u';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//the current body unit shd move left if the prev unit's transition is up\n\t\t\t\t\t\telse if(currentSnakeBodyUnits[index-1].transition=='u'){\n\t\t\t\t\t\t\tcurrentSnakeBodyUnits[index].position[1] -= 1;\n\t\t\t\t\t\t\tcurrentSnakeBodyUnits[index].transition = 'l';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t//else if the current body unit is also to the top of the prev\n\t\t\t\t\telse if(bodyUnit.position[0] < currentSnakeBodyUnits[index-1].position[0]){\n\t\t\t\t\t\t//if the prev unit's transition is down, the current unit shd move left\n\t\t\t\t\t\tif(currentSnakeBodyUnits[index-1].transition=='b'){\n\t\t\t\t\t\t\tcurrentSnakeBodyUnits[index].position[1] -= 1;\n\t\t\t\t\t\t\tcurrentSnakeBodyUnits[index].transition = 'l';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//elseif the prev unit's transition is right, the current unit shd move down\n\t\t\t\t\t\telse if(currentSnakeBodyUnits[index-1].transition=='l'){\n\t\t\t\t\t\t\tcurrentSnakeBodyUnits[index].position[0] += 1;\n\t\t\t\t\t\t\tcurrentSnakeBodyUnits[index].transition = 'b';\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\t//else just move the current body unit leftward as normal\n\t\t\t\t\t\tcurrentSnakeBodyUnits[index].position[1] -= 1;\n\t\t\t\t\t\tcurrentSnakeBodyUnits[index].transition = 'l';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//if current body unit is to the left of the previous one, the snake is moving rightward\n\t\t\t\telse if(bodyUnit.position[1] < currentSnakeBodyUnits[index-1].position[1]){\n\t\t\t\t\t//if current body unit is also to the bottom of the previous one\n\t\t\t\t\tif(bodyUnit.position[0] > currentSnakeBodyUnits[index-1].position[0]){\n\t\t\t\t\t\t//if the prev unit's transition is right, the current unit shd move up\n\t\t\t\t\t\tif(currentSnakeBodyUnits[index-1].transition=='r'){\n\t\t\t\t\t\t\tcurrentSnakeBodyUnits[index].position[0] -= 1;\n\t\t\t\t\t\t\tcurrentSnakeBodyUnits[index].transition = 'u';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//elseif the prev unit's transition is up, the current unit shd move right\n\t\t\t\t\t\telse if(currentSnakeBodyUnits[index-1].transition=='u'){\n\t\t\t\t\t\t\tcurrentSnakeBodyUnits[index].position[1] += 1;\n\t\t\t\t\t\t\tcurrentSnakeBodyUnits[index].transition = 'r';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t//else if the current body unit is also to the top of the prev\n\t\t\t\t\telse if(bodyUnit.position[0] < currentSnakeBodyUnits[index-1].position[0]){\n\t\t\t\t\t\t//if the prev unit's transition is right, the current unit shd move down\n\t\t\t\t\t\tif(currentSnakeBodyUnits[index-1].transition=='r'){\n\t\t\t\t\t\t\tcurrentSnakeBodyUnits[index].position[0] += 1;\n\t\t\t\t\t\t\tcurrentSnakeBodyUnits[index].transition = 'b';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//else if the prev unit's transition is down, the current unit shd move right\n\t\t\t\t\t\telse if(currentSnakeBodyUnits[index-1].transition=='b'){\n\t\t\t\t\t\t\tcurrentSnakeBodyUnits[index].position[1] += 1;\n\t\t\t\t\t\t\tcurrentSnakeBodyUnits[index].transition = 'r';\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\t//else just move current body unit rightward as normal\n\t\t\t\t\t\tcurrentSnakeBodyUnits[index].position[1] += 1;\n\t\t\t\t\t\tcurrentSnakeBodyUnits[index].transition = 'r';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//if current body unit is to the top of the previous one, the snake is moving downward\n\t\t\t\telse if(bodyUnit.position[0] < currentSnakeBodyUnits[index-1].position[0]){\n\t\t\t\t\tcurrentSnakeBodyUnits[index].position[0] += 1;\n\t\t\t\t\tcurrentSnakeBodyUnits[index].transition = 'b';\n\t\t\t\t}\n\t\t\t\t//if current body unit is to the bottom of the previous one, the snake is moving upward\n\t\t\t\telse if(bodyUnit.position[0] > currentSnakeBodyUnits[index-1].position[0]){\n\t\t\t\t\tcurrentSnakeBodyUnits[index].position[0] -= 1;\n\t\t\t\t\tcurrentSnakeBodyUnits[index].transition = 'u';\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tswitch(snake.direction){\n\t\t\tcase 'r':\n\t\t\t\t\n\t\t\t\t\n\t\t\tbreak;\n\t\t\tcase 'l':\n\n\t\t\tbreak;\n\t\t\tcase 'u':\n\n\t\t\tbreak;\n\t\t\tcase 'b':\n\n\t\t\tbreak;\n\n\t\t}\n\t}\n\t\n\t//Add tail for each eaten food\n\t//for snake of length 2 units or more\n\tif(currentSnakeBodyUnits.length>=2){\n\t\t//if last the tail is moving right\n\t\tif(currentSnakeBodyUnits[currentSnakeBodyUnits.length-1].transition == 'r'){\n\t\t\n\t\t\tif(foodPositionArray.length>0){\n\t\t\t\tconsole.log(\"not empty\");\n\t\t\t\t//check if the first food is to the left of the snake's tail\n\t\t\t\tif(foodPositionArray[0][1]<currentSnakeBodyUnits[currentSnakeBodyUnits.length-1].position[1]){\n\t\t\t\t\tcurrentSnakeBodyUnits.push({transition:'r',position:foodPositionArray[0]});//add tail\n\t\t\t\t\tconsole.log(\"added tail\");\n\t\t\t\t\tfoodPositionArray.shift();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t//if last tail is moving left\n\t\telse if(currentSnakeBodyUnits[currentSnakeBodyUnits.length-1].transition == 'l'){\n\t\t\tif(foodPositionArray.length>0){\n\t\t\t\tconsole.log(\"not empty\");\n\t\t\t\t//check if the first food is to the right of the snake's tail\n\t\t\t\tif(foodPositionArray[0][1]>currentSnakeBodyUnits[currentSnakeBodyUnits.length-1].position[1]){\n\t\t\t\t\tcurrentSnakeBodyUnits.push({transition:'l',position:foodPositionArray[0]});//add tail\n\t\t\t\t\tconsole.log(\"added tail\");\n\t\t\t\t\tfoodPositionArray.shift();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//if last tail is moving down\n\t\telse if(currentSnakeBodyUnits[currentSnakeBodyUnits.length-1].transition == 'b'){\n\t\t\tif(foodPositionArray.length>0){\n\t\t\t\tconsole.log(\"not empty\");\n\t\t\t\t//check if the first food is to the top of the snake's tail\n\t\t\t\tif(foodPositionArray[0][0]<currentSnakeBodyUnits[currentSnakeBodyUnits.length-1].position[0]){\n\t\t\t\t\tcurrentSnakeBodyUnits.push({transition:'b',position:foodPositionArray[0]});//add tail\n\t\t\t\t\tconsole.log(\"added tail\");\n\t\t\t\t\tfoodPositionArray.shift();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//if last tail is moving up\n\t\telse if(currentSnakeBodyUnits[currentSnakeBodyUnits.length-1].transition == 'u'){\n\t\t\tif(foodPositionArray.length>0){\n\t\t\t\tconsole.log(\"not empty\");\n\t\t\t\t//check if the first food is to the top of the snake's tail\n\t\t\t\tif(foodPositionArray[0][0]>currentSnakeBodyUnits[currentSnakeBodyUnits.length-1].position[0]){\n\t\t\t\t\tcurrentSnakeBodyUnits.push({transition:'u',position:foodPositionArray[0]});//add tail\n\t\t\t\t\tconsole.log(\"added tail\");\n\t\t\t\t\tfoodPositionArray.shift();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t//for snake of one unit\n\telse if(currentSnakeBodyUnits.length==1){\n\t\tswitch(snake.direction){\n\t\t\tcase 'r':\n\t\t\t\tif(foodPositionArray.length>0){\n\t\t\t\t\tconsole.log(\"not empty\");\n\t\t\t\t\t//check if the first food is to the left of the snake's tail\n\t\t\t\t\tif(foodPositionArray[0][1]<currentSnakeBodyUnits[currentSnakeBodyUnits.length-1].position[1]){\n\t\t\t\t\t\tcurrentSnakeBodyUnits.push({transition:'r',position:foodPositionArray[0]});//add tail\n\t\t\t\t\t\tconsole.log(\"added tail\");\n\t\t\t\t\t\tfoodPositionArray.shift();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\tbreak;\n\t\t\tcase 'l':\n\t\t\t\tif(foodPositionArray.length>0){\n\t\t\t\t\tconsole.log(\"not empty\");\n\t\t\t\t\t//check if the first food is to the right of the snake's tail\n\t\t\t\t\tif(foodPositionArray[0][1]>currentSnakeBodyUnits[currentSnakeBodyUnits.length-1].position[1]){\n\t\t\t\t\t\tcurrentSnakeBodyUnits.push({transition:'l',position:foodPositionArray[0]});//add tail\n\t\t\t\t\t\tconsole.log(\"added tail\");\n\t\t\t\t\t\tfoodPositionArray.shift();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\tcase 'u':\n\t\t\t\tif(foodPositionArray.length>0){\n\t\t\t\t\tconsole.log(\"not empty\");\n\t\t\t\t\t//check if the first food is to the bottom of the snake's tail\n\t\t\t\t\tif(foodPositionArray[0][0]>currentSnakeBodyUnits[currentSnakeBodyUnits.length-1].position[0]){\n\t\t\t\t\t\tcurrentSnakeBodyUnits.push({transition:'u',position:foodPositionArray[0]});//add tail\n\t\t\t\t\t\tconsole.log(\"added tail\");\n\t\t\t\t\t\tfoodPositionArray.shift();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\tcase 'b':\n\t\t\t\tif(foodPositionArray.length>0){\n\t\t\t\t\tconsole.log(\"not empty\");\n\t\t\t\t\t//check if the first food is to the top of the snake's tail\n\t\t\t\t\tif(foodPositionArray[0][0]<currentSnakeBodyUnits[currentSnakeBodyUnits.length-1].position[0]){\n\t\t\t\t\t\tcurrentSnakeBodyUnits.push({transition:'b',position:foodPositionArray[0]});//add tail\n\t\t\t\t\t\tconsole.log(\"added tail\");\n\t\t\t\t\t\tfoodPositionArray.shift();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t}\n\t\n\n}", "title": "" }, { "docid": "816091ce3b986ed94701ae073dff074e", "score": "0.564298", "text": "function moveOutcomes(){\r\n\r\n // FUNCTION THAT DEALS WITH SNAKE HITTING BORDER AND SELF\r\n if (\r\n (currentSnake[0] + width >= (width * width) && direction === width) || //IF SNAKE HITS BOTTOM\r\n (currentSnake[0] % width === width -1 && direction === 1) || // IF SNAKE HITS RIGHT WALL\r\n (currentSnake[0] % width === 0 && direction -1 ) || //IF SNAKE HITS LEFT WALL\r\n (currentSnake[0] - width < 0 && direction === -width) || //IF SNAKE HITS THE TOP\r\n squares[currentSnake[0] + direction].classList.contains(\"snake\") // IF SNAKE EATS ITSELF\r\n ) {\r\n return clearInterval(interval) //THIS WILL CLEAR INTERVAL IF ANY OF THE ABOVE HAPPEN\r\n }\r\n\r\n const tail = currentSnake.pop() //REMOVES LAST ITE OF THE ARRAY AND SHOWS IT\r\n squares[tail].classList.remove(\"snake\") //REMOVES CLASS OF SNAKE FROM TAIL\r\n currentSnake.unshift(currentSnake[0] + direction) //GIVES DIRECTION TO THE HEAD OF THE ARRAY\r\n\r\n\r\n // FUNCTION THAT DEALS WITH SNAKE EATING APPLE\r\n if(squares[currentSnake[0]].classList.contains(\"apple\")) {\r\n squares[currentSnake[0]].classList.remove(\"apple\")\r\n squares[tail].classList.add(\"snake\")\r\n currentSnake.push(tail) //PUT TAIL IN QUOTES TO KEEP TAIL IN THE GAME TO MAKE IT HARDER\r\n randomApple()\r\n score++\r\n scoreDisplay.textContent = score\r\n clearInterval(interval)\r\n intervalTime = intervalTime * speed\r\n interval = setInterval(moveOutcomes, intervalTime)\r\n }\r\n squares[currentSnake[0]].classList.add(\"snake\")\r\n }", "title": "" }, { "docid": "0ec44a5d9b1f1067ed4d1f87c4282f94", "score": "0.5636813", "text": "function moveWithLogLeft() {\n if (currentIndex >= 27 && currentIndex < 35) {\n $(\"div\").removeClassWild(\"frog-*\");\n currentIndex += 1\n squares[currentIndex].classList.add('frog-on-log')\n }\n}", "title": "" }, { "docid": "884f760dcfd50002379b6d0fdae535d2", "score": "0.5633483", "text": "function pinkyMove() {\n if (maze[pinky.y-1][pinky.x] ==12) {\n maze[pinky.y][pinky.x] = 12;\n pinky.y = 11;\n maze[pinky.y][pinky.x] = 7;\n drawMaze();\n } else if (directionP <= 2.5) {\n if (maze[pinky.y][pinky.x-1] ==5) {\n maze[pinky.y][pinky.x] = 2;\n pinky.x = pinky.x - 1;\n maze[pinky.y][pinky.x] = 7;\n pacman.x = 14;\n pacman.y = 23;\n lives--;\n maze[pacman.y][pacman.x] = 5;\n drawMaze();\n } else if (maze[pinky.y][pinky.x-1] ==6) {\n maze[pinky.y][pinky.x] = 2;\n pinky.x = 26;\n maze[pinky.y][pinky.x] = 7;\n drawMaze();\n } else if (maze[pinky.y][pinky.x-1] ==1) {\n maze[pinky.y][pinky.x] = 7;\n directionP = Math.random() * 10;\n drawMaze();\n } else if (maze[pinky.y][pinky.x-1] !==1) {\n maze[pinky.y][pinky.x] = 2;\n pinky.x = pinky.x - 1;\n maze[pinky.y][pinky.x] = 7;\n drawMaze();\n }\n } else if (directionP > 2.5 && directionP <= 5) {\n if (maze[pinky.y-1][pinky.x] ==5) {\n maze[pinky.y][pinky.x] = 2;\n pinky.y = pinky.y - 1;\n maze[pinky.y][pinky.x] = 7;\n pacman.x = 14;\n pacman.y = 23;\n lives--;\n maze[pacman.y][pacman.x] = 5;\n drawMaze();\n } else if (maze[pinky.y-1][pinky.x] ==1) {\n maze[pinky.y][pinky.x] = 7;\n directionP = Math.random() * 10;\n drawMaze();\n } else if (maze[pinky.y-1][pinky.x] !==1) {\n maze[pinky.y][pinky.x] = 2;\n pinky.y = pinky.y - 1;\n maze[pinky.y][pinky.x] = 7;\n drawMaze();\n }\n } else if (directionP > 5 && directionP <= 7.5) {\n if (maze[pinky.y][pinky.x+1] ==5) {\n maze[pinky.y][pinky.x] = 2;\n pinky.x = pinky.x + 1;\n maze[pinky.y][pinky.x] = 7;\n pacman.x = 14;\n pacman.y = 23;\n lives--;\n maze[pacman.y][pacman.x] = 5;\n drawMaze();\n } else if (maze[pinky.y][pinky.x+1] ==6) {\n maze[pinky.y][pinky.x] = 2;\n pinky.x = 1;\n maze[pinky.y][pinky.x] = 7;\n drawMaze();\n } else if (maze[pinky.y][pinky.x+1] ==1) {\n maze[pinky.y][pinky.x] = 7;\n directionP = Math.random() * 10;\n drawMaze();\n } else if (maze[pinky.y][pinky.x+1] !==1) {\n maze[pinky.y][pinky.x] = 2;\n pinky.x = pinky.x + 1;\n maze[pinky.y][pinky.x] = 7;\n drawMaze();\n }\n } else if (directionP > 7.5) {\n if (maze[pinky.y+1][pinky.x] ==5) {\n maze[pinky.y][pinky.x] = 2;\n pinky.y = pinky.y + 1;\n maze[pinky.y][pinky.x] = 7;\n pacman.x = 14;\n pacman.y = 23;\n lives--;\n maze[pacman.y][pacman.x] = 5;\n drawMaze();\n } else if (maze[pinky.y+1][pinky.x] ==4) {\n maze[pinky.y][pinky.x] = 7;\n directionP = Math.random() * 10;\n drawMaze();\n } else if (maze[pinky.y+1][pinky.x] ==1) {\n maze[pinky.y][pinky.x] = 7;\n directionP = Math.random() * 10;\n drawMaze();\n } else if (maze[pinky.y+1][pinky.x] !==1) {\n maze[pinky.y][pinky.x] = 2;\n pinky.y = pinky.y + 1;\n maze[pinky.y][pinky.x] = 7;\n drawMaze();\n }\n }\n }", "title": "" }, { "docid": "45f29d003b7b3733787ee4c42d9f803d", "score": "0.56306607", "text": "function movementOrange() {\n //Function randomizes (X,Y) inside the window\n var randomizeWidth1 = Math.floor(Math.random() * ($(window).width() - $(\"#fish1Id\").width()));\n var randomizeHeigth1 = Math.floor(Math.random() * ($(window).height() - $(\"#fish1Id\").height()));\n //Then the fish follows chosen parameters and runs the function again, putting it in the loop\n $(\"#fish1Id\").animate({\n top: randomizeHeigth1\n , left: randomizeWidth1\n }, 9000, function () {\n movementOrange()\n });\n //Flipped IMG-----------\n //The fish is pointing towards the parameters that it needs to follow \n //If the fish's X is more to the right than the X that it goes to, flip it \n if ($(\"#fish1Id\").offset().left > randomizeWidth1) {\n $(\"#fish1Id\").css({\n \"transform\": \"scale(-1, 1)\"\n });\n }\n //If the fish's X is more to the left than the X that it goes to, flip it \n if ($(\"#fish1Id\").offset().left <= randomizeWidth1) {\n $(\"#fish1Id\").css({\n \"transform\": \"scale(1, 1)\"\n });\n }\n //----------------------\n}", "title": "" }, { "docid": "d84bfcd664386c99cb63b9dd46ffe6d1", "score": "0.56298983", "text": "function secondCell(e) {\n //get position of the second icon\n secondPos = e.target.id.split('-');\n secondPos[0] = parseInt(secondPos[0]);\n secondPos[1] = parseInt(secondPos[1]);\n fireTreasure = true;\n countConsecutive = 0;\n\n \n for (let i = 1; i <= 8; i++) {\n for (let j = 1; j <= 8; j++) {\n if (document.getElementById(i+'-'+j).classList.contains('hints')) {\n document.getElementById(i+'-'+j).classList.remove('hints');\n }\n }\n }\n \n //This is the freeSwapItemHandler\n if (fireFreeSwap == true) {\n //add sound effects\n if (allowSound) { setTimeout(playFreeSwapUsed.play(), 120) };\n \n swap();\n autoCheck();\n\n //change cursor back to normal\n document.querySelector('.game-container').style.cursor = \"pointer\";\n \n let countFreeSwap = parseInt(document.getElementById('free-swap').textContent);\n countFreeSwap--;\n document.getElementById('free-swap').textContent = countFreeSwap;\n \n //add grey background if this item is unavailable\n if (document.getElementById('free-swap').textContent == 0) {\n document.querySelector('.free-swap-item').classList.add('unavailable-item');\n }\n \n fireFreeSwap = false;\n \n } else \n \n //This is basically the dynamiteBombsItemHandler\n if (firstPos[0] == secondPos[0] && firstPos[1] == secondPos[1] && fireDynamiteBombs == true) {\n //add sound effects\n if (allowSound) { setTimeout(playDynamiteBombsUsed.play(), 50) };\n \n for (let i = firstPos[0] - 2; i <= firstPos[0] + 2; i++) {\n for (let j = firstPos[1] - 2; j <= firstPos[1] + 2; j++) {\n if (i >= 1 && i <= 8 && j >= 1 && j <= 8) {\n arr[i][j] = 'removed'\n }\n }\n }\n autoCheck();\n autoCheck();//need to call autoCheck function again because I can't set 'check' to 'true'\n \n //change cursor back to normal\n document.querySelector('.game-container').style.cursor = \"pointer\";\n \n let countDynamiteBombs = parseInt(document.getElementById('dynamite-bombs').textContent);\n countDynamiteBombs--;\n document.getElementById('dynamite-bombs').textContent = countDynamiteBombs;\n \n //add grey background if this item is unavailable\n if (document.getElementById('dynamite-bombs').textContent == 0) {\n document.querySelector('.dynamite-bombs-item').classList.add('unavailable-item');\n }\n \n fireDynamiteBombs = false;\n \n } else\n \n //check if it's a valid move\n if (checkValidMove(firstPos, secondPos)) {\n countMoves++;\n moves.textContent = countMoves;\n //count down bombs moves after every swap\n for (let i = 1; i <= 8; i++) {\n for (let j = 1; j <= 8; j++) {\n if (arr[i][j] == 8) {\n let countdown = parseInt(document.getElementById(i+'-'+j+'-bomb').textContent);\n countdown--;\n document.getElementById(i+'-'+j+'-bomb').textContent = countdown;\n }\n }\n }\n \n //swap elements\n swap();\n //find combo and erase\n checkTwoPosition(firstPos, secondPos);\n \n } else {\n //alert invalid move!\n if (allowSound) { playInvalidMoveNoComboMove.play() };\n }\n \n\n //give a random item if consecutive >= 3\n setTimeout(() => {\n if (countConsecutive >= 4) {\n giveARandomItem();\n //alert('You won a random item')\n document.querySelector('.alert-won-item').style.display = 'block';\n setTimeout(() => {\n document.querySelector('.alert-won-item').style.display = 'none';\n }, 1500)\n }\n }, 300)\n \n //check if game is over\n setTimeout(() => {\n if (countLife <= 0) {\n endGame();\n } else if (findAllHints().length == 0 &&\n document.getElementById('bombs-cooler').textContent == 0 &&\n document.getElementById('treasure').textContent == 0 &&\n document.getElementById('shuffle').textContent == 0 &&\n document.getElementById('free-swap').textContent == 0 &&\n document.getElementById('dynamite-bombs').textContent == 0\n ) {\n resetGame();\n countLife--;\n document.getElementById('life').textContent = countLife;\n document.querySelector('.alert-won-item').style.display = 'block';\n document.querySelector('.alert-won-item').textContent = 'No More Move!';\n setTimeout(() => {\n document.querySelector('.alert-won-item').style.display = 'none';\n document.querySelector('.alert-won-item').textContent = 'You have just won an item!'\n }, 1500)\n }\n }, 700)\n \n //find out if there's any exploded bombs\n let i = 1;\n let gameOver = false;\n while (i <= 8 && !gameOver) {\n let j = 1;\n while (j <= 8 && !gameOver) {\n if (arr[i][j] == 8 && document.getElementById(i+'-'+j+'-bomb').textContent <= 0) {\n endGame();\n gameOver = true;\n }\n j++;\n }\n i++;\n }\n \n}", "title": "" }, { "docid": "af6671f4c7635caf0757a9be616e8550", "score": "0.5629166", "text": "function tween_tiles() {\n for (j=0; j<MAP_HEIGHT; j++) {\n for (i=0; i<MAP_WIDTH; i++) {\n var tile = map[j][i];\n if (map[j][i]['type'] !== ' ') {\n // tween the tiles until they reach their destination\n // MOVEMENT TWEENING\n if (tile['newx'] !== tile['x']) {\n var diffx = Math.abs(tile['x'] - tile['newx']);\n if (tile['newx'] > tile['x']) {\n tile['tweenx'] += TWEENSPEED;\n }\n else if (tile['newx'] < tile['x']) {\n tile['tweenx'] -= TWEENSPEED;\n }\n }\n if (tile['newy'] !== tile['y']) {\n var diffy = Math.abs(tile['y'] - tile['newy']);\n if (tile['newy'] > tile['y']) {\n tile['tweeny'] += TWEENSPEED;\n }\n else if (tile['newy'] < tile['y']) {\n tile['tweeny'] -= TWEENSPEED;\n }\n }\n // swap tiles when they have completed their movement\n // (if they moved at all)\n if (tile['tweenx'] !== 0 || tile['tweeny'] !== 0) {\n if (Math.abs(tile['tweenx']) > TILESIZE * diffx) {\n // swap tile and lava\n swap_tiles(i, j, tile['newx'], tile['newy']);\n }\n if (Math.abs(tile['tweeny']) > TILESIZE * diffy) {\n // swap tile and lava\n swap_tiles(i, j, tile['newx'], tile['newy']);\n }\n }\n // ROTATION TWEENING\n if (tile['newangle'] !== tile['angle']) {\n tile['tweenrot'] += TWEENSPEED;\n }\n if (tile['tweenrot'] !== 0) {\n // done rotating\n if (Math.abs(tile['tweenrot']) >= 90) {\n tile['angle'] = tile['newangle'];\n tile['tweenrot'] = 0;\n shift_barriers(i, j);\n }\n }\n\n }\n }\n }\n}", "title": "" }, { "docid": "15e6be4a315b5d0278b3e79ca04dc9f6", "score": "0.5627811", "text": "function moveOutcomes(){\r\n\r\n // function that deals with the snake when it hits the border and itself\r\n if(\r\n (currentSnake[0] + width >= (width * width) && direction === width) || // if the snake hits the bottom wall \r\n (currentSnake [0] % width === width -1 && direction === 1 ) || // if the snake hits the right wall\r\n (currentSnake [0] % width === 0 && direction === -1) || // if the snake hits the left wall\r\n (currentSnake[0] - width < 0 && direction === -width) || // if the snake hits the top wall\r\n squares[currentSnake[0] + direction].classList.contains('snake')\r\n ){\r\n return clearInterval(interval) // this automatically clears the interval if any of the conditions above happens\r\n }\r\n\r\n const tail = currentSnake.pop() // removes the last element of the array\r\n squares[tail].classList.remove('snake') // removes the class of snake from the tail\r\n currentSnake.unshift(currentSnake[0] + direction) // gives direction to the head of the array\r\n \r\n // function that deals with the snake when it eats the apple\r\n\r\n if(squares[currentSnake[0]].classList.contains('apple')){\r\n squares[currentSnake[0]].classList.remove('apple')\r\n squares[tail].classList.add('snake')\r\n currentSnake.push(tail)\r\n randomApple()\r\n score++\r\n scoreDisplay.textContent = score\r\n clearInterval(interval)\r\n intervalTime = intervalTime * speed\r\n interval = setInterval(moveOutcomes, intervalTime)\r\n }\r\n squares[currentSnake[0]].classList.add('snake')\r\n\r\n }", "title": "" }, { "docid": "f0938b90fb1ad57d627c5fbd2d6ff4a0", "score": "0.56257206", "text": "function moveCheck(actorObj) {\n\t\tlet fitsTop = false;\n\t\tlet fitsLeft = false;\n\t\n\t\tcurrTopPx = actorObj.TopPx;\n\t\tcurrLeftPx = actorObj.LeftPx;\n\t\n\t\tcurrTop = Math.floor(currTopPx / dimension);\n\t\tcurrLeft = Math.floor(currLeftPx / dimension);\n\t\n\t\tif(currTopPx % dimension == 0)\n\t\t\tfitsTop = true;\n\n\t\tif(currLeftPx % dimension == 0)\n\t\t\tfitsLeft = true;\n\t\t\n\t\tnewLeft = currLeft;\n\t\tnewTop = currTop;\n\t\t\n\t\tswitch(actorObj.dir) {\n\t\t\tcase leftKey: \n\t\t\t\tif(fitsLeft)\n\t\t\t\t\tnewLeft = currLeft - 1;\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase upKey:\n\t\t\t\tif(fitsTop)\n\t\t\t\t\tnewTop = currTop - 1;\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase rightKey:\n\t\t\t\tnewLeft = currLeft + 1;\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase downKey:\n\t\t\t\tnewTop = currTop + 1;\n\t\t\t\tbreak;\t\t\t\t\t \n\t\t}\n\t\ttunnelConditions();\n\t\tcheckOverlapse(actorObj.dir);\n\t\t\n\t\tif (!Obstacles())\n\t\t\treturn true;\n\t\t\n\t\treturn false;\t\n\t}", "title": "" }, { "docid": "c3a1e9a430365b1205fbfced4963685d", "score": "0.5622925", "text": "function moveLeft(){\n //first check that keys are enabled\n if(keyEnabled == true){\n undraw();\n const isAtLeftEdge = currentShape.some(index => (currentPosition + index)% 10 === 0 )\n\n if(!isAtLeftEdge)\n {\n currentPosition = currentPosition - 1;\n\n }\n\n if(currentShape.some(index => squares[currentPosition + index].classList.contains(\"taken\")))\n {\n currentPosition = currentPosition +1;\n }\n\n draw();\n }\n }", "title": "" }, { "docid": "4fd03275992ca153b349adab08ce644f", "score": "0.5618694", "text": "move() {\n //if I'm going east & I hit the edge...\n if(this.direction === 0) {\n this.x += this.speed;\n if (this.x > (WIDTH)){\n this.place()\n } //if I'm going west & I hit the edge...\n } else if(this.direction === 1) {\n this.x -= this.speed;\n if (this.x < 0) {\n this.place()\n }\n //if I'm going south & I hit the edge...\n } else if(this.direction === 2) {\n this.y += this.speed;\n if (this.y > (HEIGHT)) {\n this.place()\n }\n //if I'm going north & I hit the edge...\n }else if(this.direction === 3) {\n this.y -= this.speed;\n if (this.y < 0) {\n this.place()\n }\n }\n}", "title": "" }, { "docid": "862483706dcabc623d148107442caba7", "score": "0.5616549", "text": "function moveShapeLeft(){\n square_pos = 0;\n for( var i = 0; i < 32; i+= 2){\n positions[square_pos+i] = positions[square_pos+i] - 0.1*(X_MAX-X_MIN);\n }\n main();\n}", "title": "" }, { "docid": "6a2f0b85a8ce5de26d8322569e08b3af", "score": "0.5610945", "text": "checkConflict(itemTag){\n \n let buffer = 7\n let frogBuffer = 9;\n if(itemTag.className === \"log\"){\n buffer = 3\n }\n // else if(itemTag.id === \"winStrip\"){\n // buffer = -5\n // }\n \n \n let frogXMin = parseInt(this.frog.tag.style.left.replace(\"px\", \"\")) +frogBuffer \n let frogXMax = frogXMin + this.frog.tag.offsetWidth - 2*frogBuffer\n let frogYMin = parseInt(this.frog.tag.style.top.replace(\"px\", \"\")) + frogBuffer \n let frogYMax = frogYMin + this.frog.tag.offsetHeight - 2*frogBuffer\n\n let itemXMin = parseInt(itemTag.style.left.replace(\"px\", \"\")) + buffer\n let itemXMax = itemXMin + itemTag.offsetWidth - 2*buffer\n let itemYMin = parseInt(itemTag.style.top.replace(\"px\", \"\")) + buffer\n let itemYMax = itemYMin + itemTag.offsetHeight - 2*buffer\n\n // CHECK IF FROG OVERLAPS\n if(frogXMin > itemXMin && frogXMin < itemXMax || frogXMax > itemXMin && frogXMax < itemXMax){\n if(frogYMin > itemYMin && frogYMin < itemYMax || frogYMax > itemYMin && frogYMax < itemYMax){\n \n // we're comaparing to log so you're safe\n if (itemTag.className === \"log\"){\n \n this.frog.onLog = true;\n this.frog.log = itemTag\n \n\n }else if(itemTag.id === \"prize\"){\n this.winAudio.play()\n this.youWin()\n\n // you hit river\n }else if(itemTag.id === \"river\"){\n if(!this.frog.onLog ){//&& !this.frog.onWinStrip){\n this.splashAudio.play()\n this.frogHit()\n }\n\n }else{ // hit a car\n this.crashAudio.play()\n this.frogHit()\n } \n }\n }\n }", "title": "" }, { "docid": "94c60c63a02c71f5e4867f6643a84187", "score": "0.56102735", "text": "function checkStacking () {\n const zombie1 = document.getElementById('myZombie1');\n const zombiePerson1 = document.getElementById('myZombiePerson1');\n let compZombie1Styles = window.getComputedStyle(zombie1);\n var zombie1TopStr = compZombie1Styles.getPropertyValue('top');\n var zombie1LeftStr = compZombie1Styles.getPropertyValue('left');\n var zombie1Top = parseFloat(zombie1TopStr, 10);\n var zombie1Left = parseFloat(zombie1LeftStr, 10);\n const zombie2 = document.getElementById('myZombie2');\n const zombiePerson2 = document.getElementById('myZombiePerson2');\n let compZombie2Styles = window.getComputedStyle(zombie2);\n var zombie2TopStr = compZombie2Styles.getPropertyValue('top');\n var zombie2LeftStr = compZombie2Styles.getPropertyValue('left');\n var zombie2Top = parseFloat(zombie2TopStr, 10);\n var zombie2Left = parseFloat(zombie2LeftStr, 10);\n if (zombie1Top == zombie2Top && zombie1Left == zombie2Left) {\n if (zombie2Top < 175 && zombie2Left < 175) {\n //move down right\n zombie2.style.top = `${zombie2.offsetTop + 50}px`; //Down\n zombie2.style.left = `${zombie2.offsetLeft + 50}px`; //Right\n zombiePerson2.style.top = `${zombiePerson2.offsetTop + 50}px`; //Down\n zombiePerson2.style.left = `${zombiePerson2.offsetLeft + 50}px`; //Right\n } else if (zombie2Top < 175 && zombie2Left > 175) {\n //move down left\n zombie2.style.top = `${zombie2.offsetTop + 50}px`; //Down\n zombie2.style.left = `${zombie2.offsetLeft - 50}px`; //Left\n zombiePerson2.style.top = `${zombiePerson2.offsetTop + 50}px`; //Down\n zombiePerson2.style.left = `${zombiePerson2.offsetLeft - 50}px`; //Left\n } else if (zombie2Top > 175 && zombie2Left < 175) {\n //move up right\n zombie2.style.top = `${zombie2.offsetTop - 50}px`; //Up\n zombie2.style.left = `${zombie2.offsetLeft + 50}px`; //Right\n zombiePerson2.style.top = `${zombiePerson2.offsetTop - 50}px`; //Up\n zombiePerson2.style.left = `${zombiePerson2.offsetLeft + 50}px`; //Right\n } else if (zombie2Top > 175 && zombie2Left > 175) {\n //move up left\n zombie2.style.top = `${zombie2.offsetTop - 50}px`; //Up\n zombie2.style.left = `${zombie2.offsetLeft - 50}px`; //Left\n zombiePerson2.style.top = `${zombiePerson2.offsetTop - 50}px`; //Up\n zombiePerson2.style.left = `${zombiePerson2.offsetLeft - 50}px`; //Left\n }\n } else {\n return;\n }\n}", "title": "" }, { "docid": "e40d1069d2b04d528b8da43a9475caee", "score": "0.560791", "text": "function moveLeft()\r\n {\r\n undraw()\r\n const isAtLeftEdge = currentTetromino.some(index => (currentPosition + index) % width === 0)\r\n\r\n if(!isAtLeftEdge)\r\n currentPosition -= 1\r\n if(currentTetromino.some(index => squares[currentPosition + index].classList.contains('taken')))\r\n currentPosition += 1\r\n draw()\r\n }", "title": "" }, { "docid": "a5659d9fbfc1927eefac34f9e9e2b17b", "score": "0.5601084", "text": "function moveFlowers(shift) {\n var edge = false;\n for(var i=0;i < flowers.length;i++) {\n flowers[i].move();\n if(flowers[i].x > (width - flowers[i].width) || flowers[i].x < 0) {\n edge = true;\n } \n }\n if(edge) {\n for(var i=0;i < flowers.length;i++) {\n flowers[i].shiftDown(shift);\n }\n }\n}", "title": "" }, { "docid": "d8d6a503fb01a71340ee23f3e9edac92", "score": "0.55999476", "text": "function myMove(e) {\n x = e.pageX - canvas.offsetLeft;\n y = e.pageY - canvas.offsetTop;\n\n for (c = 0; c < tileColumnCount; c++) {\n for (r = 0; r < tileRowCount; r++) {\n if (c * (tileW + 3) < x && x < c * (tileW + 3) + tileW && r * (tileH + 3) < y && y < r * (tileH + 3) + tileH) {\n if (tiles[c][r].state == \"e\" && (c != boundX || r != boundY)) {\n tiles[c][r].state = \"w\";\n\n boundX = c;\n boundY = r;\n\n }\n else if (tiles[c][r].state == \"w\" && (c != boundX || r != boundY)) {\n tiles[c][r].state = \"e\";\n\n boundX = c;\n boundY = r;\n\n }\n }\n }\n }\n}", "title": "" }, { "docid": "3ab80b47b70e0d561ce8c8c73c4125a4", "score": "0.5594766", "text": "function moveOutcomes(){\n\n // collision detection\n if (\n // with wall\n snake[0] % width === width-1 && direction===1 || // right wall\n snake[0] % width === 0 && direction===-1 || //left wall\n snake[0] + width >= width*width && direction===width || //bottom wall\n snake[0] - width <= 0 && direction===-width|| //top wall\n // with self\n square[snake[0] + direction].classList.contains('snake')\n ) { \n return clearInterval(interval)\n }\n\n // deal with snakes tail and moving the snake \n const tail = snake.pop()\n square[tail].classList.remove('snake')\n snake.unshift(snake[0]+direction)\n square[snake[0]].classList.add('snake')\n\n // catching the apple \n if(square[snake[0]].classList.contains('apple')){\n square[appleIndex].classList.remove('apple')\n score++;\n scoreDisplay.textContent = score\n square[tail].classList.add('snake')\n snake.push(tail)\n randomApple()\n clearInterval(interval)\n intervalTime = intervalTime*speed;\n interval = setInterval(moveOutcomes,intervalTime)\n }\n}", "title": "" }, { "docid": "4bcd055effcb528d06d8e05aea979903", "score": "0.5588332", "text": "function moveTo(i, j) {\r\n\tvar elH2 = document.querySelector('h2')\r\n\telH2.innerText = 'CountBall : ' + gCountBall\r\n\tvar elH3 = document.querySelector('h3')\r\n\telH3.innerText = 'Ball in Game : ' + gBallInGame\r\n\r\n\tvar targetCell = gBoard[i][j];\r\n\r\n\tif (targetCell.type === WALL) return;\r\n\r\n\t// Calculate distance to make sure we are moving to a neighbor cell\r\n\tvar iAbsDiff = Math.abs(i - gGamerPos.i);\r\n\tvar jAbsDiff = Math.abs(j - gGamerPos.j);\r\n\r\n\t// If the clicked Cell is one of the four allowed\r\n\tif (gGlue) return\r\n\tif ((iAbsDiff === 1 && jAbsDiff === 0) ||\r\n\t\t(jAbsDiff === 1 && iAbsDiff === 0) ||\r\n\t\t(gGamerPos.j === 0 && j === 9) ||\r\n\t\t(gGamerPos.j === 11 && j === 0) ||\r\n\t\t(gGamerPos.j === 5 && i === 5) ||\r\n\t\t(gGamerPos.j === 5 && j === 5)) {\r\n\r\n\t\tif (targetCell.gameElement === GLUE) {\r\n\t\t\tgGlue = true\r\n\t\t\tsetTimeout(function () {\r\n\t\t\t\tgGlue = false\r\n\t\t\t}, 3000)\r\n\t\t}\r\n\t\tif (targetCell.gameElement === BALL) {\r\n\t\t\tconsole.log('Collecting!');\r\n\t\t\tsound.play()\r\n\t\t\tgCountBall++\r\n\t\t\tgBallInGame--\r\n\t\t\tif (gBallInGame === 0) {\r\n\t\t\t\talert('Victory');\r\n\t\t\t\tclearInterval(gIntervalBall)\r\n\t\t\t\tclearInterval(gIntervallGlue)\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t\t// MOVING from current position\r\n\t\t// Model:\r\n\t\tgBoard[gGamerPos.i][gGamerPos.j].gameElement = null;\r\n\t\t// Dom:\r\n\t\trenderCell(gGamerPos, '');\r\n\r\n\t\t// MOVING to selected position\r\n\t\t// Model:\r\n\t\tgGamerPos.i = i;\r\n\t\tgGamerPos.j = j;\r\n\t\tgBoard[gGamerPos.i][gGamerPos.j].gameElement = GAMER;\r\n\t\t// DOM:\r\n\t\trenderCell(gGamerPos, GAMER_IMG);\r\n\r\n\t} // else console.log('TOO FAR', iAbsDiff, jAbsDiff);\r\n\r\n}", "title": "" }, { "docid": "d5a2c88dc5df266dae5aa14156de4908", "score": "0.5582418", "text": "function move(cell) { if ((cellEmptyArray[0] === cellValArray[0] && cellEmptyArray[1] === cellValArray[1] + 1 && cellEmptyArray[2] === cellValArray[2] && cellEmptyArray[3] === cellValArray[3] + 1) || (cellEmptyArray[0] === cellValArray[0] && cellEmptyArray[1] === cellValArray[1] - 1 && cellEmptyArray[2] === cellValArray[2] && cellEmptyArray[3] === cellValArray[3] - 1) || (cellEmptyArray[0] === cellValArray[0] + 1 && cellEmptyArray[1] === cellValArray[1] && cellEmptyArray[2] === cellValArray[2] + 1 && cellEmptyArray[3] === cellValArray[3]) || (cellEmptyArray[0] === cellValArray[0] - 1 && cellEmptyArray[1] === cellValArray[1] && cellEmptyArray[2] === cellValArray[2] - 1 && cellEmptyArray[3] === cellValArray[3])) {\r\n cell.css('grid-area', cellEmpty);\r\n $('.slide__9').css('grid-area', cellVal);\r\n cellEmpty = cellVal;\r\n }\r\n}", "title": "" }, { "docid": "13ee5dceb015803f66046218eebed1d9", "score": "0.55820704", "text": "static moveForwards(items) {\n PaperJSOrderingUtils._sortItemsByLayer(items).forEach(layerItems => {\n PaperJSOrderingUtils._sortItemsByZIndex(layerItems).reverse().forEach(item => {\n if (item.nextSibling && items.indexOf(item.nextSibling) === -1) {\n item.insertAbove(item.nextSibling);\n }\n });\n });\n }", "title": "" }, { "docid": "5a5d7060c8d2d8e5cc9377b088195224", "score": "0.557924", "text": "function moveRight() {\n undraw();\n // current position+index divided by width has no remainder\n const isAtRightEdge = current.some(\n //condition is at right hand side is true\n (index) => (currentPosition + index) % width === width - 1\n );\n if (!isAtRightEdge) currentPosition += 1;\n if (\n current.some((index) =>\n squares[currentPosition + index].classList.contains(\"taken\")\n )\n ) {\n currentPosition -= 1;\n }\n draw();\n }", "title": "" }, { "docid": "a64427657d9152100ace61451cc12392", "score": "0.5564915", "text": "newPieceFastShareToTheLeft(){\n\n\t\tlet playerBoardLen = Math.trunc(this.boardLen / this.clients.size);\n\n\t\tlet newPieceX = this.newPiecePosition[0];\n\n\n\t\tlet startBoardX = this.handlingPlayer * playerBoardLen - this.newPieceLen;\n\t\t//We stop the board at newPieceX + this.newPieceLen\n\n\t\t//Set up that start Y and stop Y of the piece\n\t\tlet start = this.newPiecePosition[1];\n\t\tlet stop = start + this.newPieceLen;\n\n\t\tif(start < 0) start = 0;\n\t\tif(stop > this.boardRow) stop = this.boardRow;\n\n\t\t//Return the last index that is not empty (or -1 if they are all empty)\n\t\tlet indexLastNotEmptySlot = [...Array(stop - start)]\n\t\t\t\t\t//Take the lines that can cause collision only\n\t\t\t\t\t.map((element, index) => this.board.slice((start + index) * this.boardLen + startBoardX, (start + index) * this.boardLen + newPieceX + this.newPieceLen))\n\t\t\t\t\t//Then find the last index where there is a possible collision (return -1 if there is not)\n\t\t\t\t\t.reduce((acc, element) => {\n\t\t\t\t\t\t\t\t\t\t\t//We reverse before findIndex to get the last one that match (then we reverse the index result)\n\t\t\t\t\t\t\t\t\t\t\tlet newIndex = (element.length - 1) - element.reverse().findIndex(el => el !== 0);\n\t\t\t\t\t\t\t\t\t\t\tif(newIndex !== -1){\n\t\t\t\t\t\t\t\t\t\t\t\tif(acc === -1) acc = newIndex;\n\t\t\t\t\t\t\t\t\t\t\t\telse if(newIndex < acc) acc = newIndex;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\treturn acc;\n\t\t\t\t\t\t\t\t\t\t}, -1);\n\n\t\t/*\n\t\t\tThis optimistion allow us to skip the first slot that are empty\n\t\t*/\n\t\t//If there was only empty slot, put the piece near the left side of the board\n\t\tif(indexLastNotEmptySlot === -1) this.newPiecePosition[0] = startBoardX + Math.trunc(this.newPieceLen*1.5) + 1;\n\t\t//Or put it near the not empty slot\n\t\telse this.newPiecePosition[0] = (startBoardX + indexLastNotEmptySlot) + this.newPieceLen;\n\n\t\t//If the piece X position is already further in the board\n\t\tif(this.newPiecePosition[0] > newPieceX) this.newPiecePosition[0] = newPieceX;\n\n\n\t\t/*\n\t\t\tNote : This method would work the same if you comment all the code above\n\t\t\tBut the instructions above remove a lot of work for the collision checking we do below\n\t\t\tand when checking the exection time, with the instruction aboce we get up to 4 time faster than without\n\t\t*/\n\t\tlet test = () => true;\n\n\t\tdo{\n\n\t\t\t//If there is a collision, put the old X position and return\n\t\t\tif(this.newPieceTryLeft()){\n\t\t\t\tthis.newPiecePosition[0] = newPieceX;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t//There is no collision on the left so we move on\n\t\t\t--this.newPiecePosition[0];\n\n\t\t\t/*\n\t\t\t\tThis optimisation allow the programm to only do the big verification\n\t\t\t\twhen it's realy needed, we know that the piece wont be in\n\t\t\t\tthe next player board before it get at least to the len of a board minus it's len divided by 2.\t\n\t\t\t*/\n\t\t\tif(this.newPiecePosition[0] <= startBoardX + Math.trunc(this.newPieceLen*1.5)){\n\t\t\t\ttest = () => this.isInActualPlayerBoard() === -1;\n\t\t\t}\n\n\t\t}\n\t\twhile(test());\n\n\t}", "title": "" }, { "docid": "54ddab17a3be930192a3e2418be44eba", "score": "0.5558062", "text": "function moveBanana(){\n $('.left-banana').each(function(index){\n var banana = $(this);\n var currentLeft = parseInt(banana.css('left'));\n var newLeft = currentLeft + 1;\n banana.css('left', newLeft);\n\n if (currentLeft > 950){\n banana.remove();\n }\n\n })\n\n $('.right-banana').each(function(index){\n var banana = $(this);\n var currentRight = parseInt(banana.css('right'));\n var newRight = currentRight + 1;\n banana.css('right', newRight);\n\n if (currentRight > 950){\n banana.remove();\n }\n\n })\n\n $('.top-banana').each(function(index){\n var banana = $(this);\n var currentTop = parseInt(banana.css('top'));\n var newTop = currentTop + 1;\n banana.css('top', newTop);\n\n if (currentTop > 950){\n banana.remove();\n }\n\n })\n\n $('.bottom-banana').each(function(index){\n var banana = $(this);\n var currentBottom = parseInt(banana.css('bottom'));\n var newBottom = currentBottom + 1;\n banana.css('bottom', newBottom);\n\n if (currentBottom > 950){\n banana.remove();\n }\n\n })\n}", "title": "" }, { "docid": "5b30f637bc8bc81fc63b199ed09514bf", "score": "0.5557995", "text": "checkPosition(){\r\n if(isCriticalPosition(this.pos)){\r\n //if((this.pos.x-8)%16 == 0 && (this.pos.y-8)%16 == 0){//checks if pacman is on a critical spot\r\n //let arrPosition = createVector((this.pos.x-8)/16, (this.pos.y-8)/16);//changes location to an array position\r\n let arrPosition = pixelToTile(this.pos);\r\n //resets all paths for the ghosts\r\n //this.blinky.setPath();\r\n //this.pinky.setPath();\r\n //this.clyde.setPath();\r\n //this.inky.setPath();\r\n //Checks if the position has been eaten or not, blank spaces are considered eaten\r\n if(!this.tiles[floor(arrPosition.y)][floor(arrPosition.x)].eaten){\r\n this.tiles[floor(arrPosition.y)][floor(arrPosition.x)].eaten = true;\r\n //score+=10;//adds points for eating\r\n this.score+=1;\r\n this.dotsEaten++;\r\n this.ttl = 600;\r\n if(this.tiles[floor(arrPosition.y)][floor(arrPosition.x)].bigDot){//checks if the big dot is eaten\r\n //set all ghosts to frightened mode\r\n if(!this.blinky.goHome && !this.blinky.tempDead){\r\n this.blinky.frightened = true;\r\n this.blinky.flashCount = 0;\r\n }if(!this.clyde.goHome && !this.clyde.tempDead){\r\n this.clyde.frightened = true;\r\n this.clyde.flashCount = 0;\r\n }if(!this.pinky.goHome && !this.pinky.tempDead){\r\n this.pinky.frightened = true;\r\n this.pinky.flashCount = 0;\r\n }if(!this.inky.goHome && !this.inky.tempDead){\r\n this.inky.frightened = true;\r\n this.inky.flashCount = 0;\r\n }\r\n }\r\n }\r\n //the position in the tiles array that pacman is turning towards\r\n let positionToCheck = new createVector(arrPosition.x + this.goTo.x, arrPosition.y + this.goTo.y);\r\n //console.log(\"Position to Check X: \", positionToCheck.x, \" Y: \", positionToCheck.y);\r\n if(this.tiles[floor(positionToCheck.y)][floor(positionToCheck.x)].tunnel){//checks if the next position will be in the tunnel\r\n this.specialCase(this.pos);\r\n }if(this.tiles[floor(positionToCheck.y)][floor(positionToCheck.x)].wall){//checks if the space is not a wall\r\n if(tiles[floor(arrPosition.y + vel.y)][floor(arrPosition.x + vel.x)].wall){\r\n this.vel = createVector(this.goTo.x, this.goTo.y);//Not sure about this line...\r\n return false;\r\n }else{//moving ahead is free\r\n return true;\r\n }//return !(this.tiles[floor(arrPosition.y + this.vel.y)][floor(arrPosition.x + this.vel.x)].wall);//if both are walls then don't move\r\n }else{//allows pacman to turn\r\n this.vel = createVector(this.goTo.x, this.goTo.y);\r\n return true;\r\n }\r\n }else{//if pacman is not on a critial spot\r\n let ahead = createVector(this.pos.x+10*this.vel.x, this.pos.y+10*this.vel.y);\r\n //if((this.pos.x+10*this.vel.x-8)%16 == 0 && (this.pos.y+10*this.vel.y-8)%16 == 0){\r\n if(isCriticalPosition(ahead)){\r\n //let arrPosition = createVector((this.pos.x+10*this.vel.y-8)/16, (this.pos.y+10*this.vel.y)/16);\r\n let arrPostion = pixelToTile(ahead);//convert to an array position\r\n if(!this.tiles[floor(arrPosition.y)][floor(arrPosition.x)].eaten){\r\n this.tiles[floor(arrPosition.y)][floor(arrPosition.x)].eaten = true;//eat the dot\r\n this.score+=1;//10\r\n this.dotsEaten++;\r\n ttl = 600;\r\n if(this.tiles[floor(arrPosition.y)][floor(arrPosition.x)].bigDot && bigDotsActive){\r\n //this.score+=40;//could be used to give a better reward for getting the big dots\r\n //sets all ghosts to frightened mode\r\n if(!this.blinky.goHome && !this.blinky.tempDead){\r\n this.blinky.frightened = true;\r\n this.blinky.flashCount = 0;\r\n }if(!this.clyde.goHome && !this.clyde.tempDead){\r\n this.clyde.frightened = true;\r\n this.clyde.flashCount = 0;\r\n }if(!this.pinky.goHome && !this.pinky.tempDead){\r\n this.pinky.frightened = true;\r\n this.pinky.flashCount = 0;\r\n }if(!this.inky.goHome && !this.inky.tempDead){\r\n this.inky.frightened = true;\r\n this.inky.flashCount = 0;\r\n }\r\n }\r\n } \r\n }if(this.goTo.x+this.vel.x == 0 && this.vel.y+this.goTo.y == 0){//if turning change directions entirely, 180 degrees\r\n this.vel = createVector(this.goTo.x, this.goTo.y);//turn\r\n return true;\r\n }return true;//if it is not a critical position then it will continue forward\r\n }\r\n }", "title": "" }, { "docid": "1f71d6bb221872812cb4a1ebb859201f", "score": "0.55528766", "text": "_moveRightInfinity() {\n if (!this._settings.infinity) return;\n\n this._currentPosition = 0;\n this._itemsHolder.style.transition = `transform ${ 0 }ms`;\n this._offset = this._calcDisplayedItemsTotalWidth() -\n (this._settings.neighborsVisibleWidth + this._calcOppositeRight());\n this._itemsHolder.style.transform = `translateX(${ this._offset + this._settings.oppositeSideAppearShift }px)`;\n setTimeout(() => this._moveRight(), this._settings.oppositeSideAppearDelay);\n }", "title": "" }, { "docid": "69bf70ae9e5ef3fde8f353d9a8ccbdd8", "score": "0.555235", "text": "static moveMe(w, wantMoveX) {\n const origWLocation = { x: w.x, y: w.y };\n let xMoveOkay = true;\n let yMoveOkay = true;\n const nIterations = Math.abs(Math.max(Math.abs(w.accel), Math.abs(wantMoveX)));\n for (let i = 0; i <= nIterations; i++) {\n if (!xMoveOkay && !yMoveOkay)\n break; // both are false, so nothing else to do\n if (Math.abs(w.x - origWLocation.x) >= Math.abs(wantMoveX))\n xMoveOkay = false; // already moved maximum amount\n if (Math.abs(w.y - origWLocation.y) >= Math.abs(w.accel))\n yMoveOkay = false; // already moved maximum amount\n const collisions = Util.isCollidingWith(w);\n for (const c of collisions) {\n if (!xMoveOkay && !yMoveOkay)\n break; // both turned false, so nothing to do\n // list of collisions to ignore\n if (UtilHelpers.shouldIgnoreCollision(c) ||\n (w.getClassName() === \"turret\" && c.getClassName() === \"laser\"))\n continue;\n // if x now colliding\n if (xMoveOkay && (wantMoveX > 0 && w.rightI() + 1 === c.leftI() ||\n wantMoveX < 0 && w.leftI() - 1 === c.rightI())) {\n xMoveOkay = false; // don't change x anymore\n }\n // if y now colliding\n if (yMoveOkay && (w.accel > 0 && w.bottomI() + 1 === c.topI() ||\n w.accel < 0 && w.topI() - 1 === c.bottomI())) {\n yMoveOkay = false; // don't change y anymore\n }\n }\n if (xMoveOkay) {\n w.setX(w.getX() + (wantMoveX > 0 ? 1 : -1));\n }\n if (yMoveOkay) {\n w.setY(w.getY() + (w.accel > 0 ? 1 : -1));\n }\n }\n if (w.getY() < Util.topEdge)\n w.setY(Util.topEdge + 1);\n if (w.getY() + w.getHeight() > Util.bottomEdge)\n w.setY(Util.bottomEdge - w.getHeight() - 1);\n }", "title": "" } ]
c7ae6d0dce614fc96e24f228ddeeac28
shows the coordinates in the console when hover
[ { "docid": "40a96b1fd1fe81794284613e2c01f508", "score": "0.0", "text": "function addPopUp(marker){\n google.maps.event.addListener(marker, 'mouseover', function() {\n var projection = overlay.getProjection();\n var pixel = projection.fromLatLngToContainerPixel(marker.getPosition());\n console.log(marker.position.lat(),marker.position.lng());\n });\n var infoContent = \"<b>Lat:</b> \"+ marker.position.lat().toString()+\" | <b>lng:</b>\"+ marker.position.lng().toString();\n var infowindow = new google.maps.InfoWindow({\n content: infoContent\n });\n marker.addListener('click', function() {\n infowindow.open(map, marker);\n });\n }", "title": "" } ]
[ { "docid": "0c2a31e267cb7a4c8433d5b593323f2e", "score": "0.7420537", "text": "function showMouse() {\n console.log('mouse x : ' +mouse.x)\n console.log('mouse y : ' +mouse.y)\n}", "title": "" }, { "docid": "832d693af73825f6aa809b84ed4d44b0", "score": "0.71766543", "text": "display() {\n stroke(255, 50);\n strokeWeight(2);\n point(this.location.x, this.location.y);\n }", "title": "" }, { "docid": "6aff59158e4da6b2542f87e089871c4b", "score": "0.7172402", "text": "function showCoordinates(evt) {\n console.log(\"show\");\n //get mapPoint from event\n //The map is in web mercator - modify the map point to display the results in geographic\n var mp = esri.geometry.webMercatorToGeographic(evt.mapPoint);\n //display mouse coordinates\n dojo.byId(\"info\").innerHTML = mp.x.toFixed(5) + \", \" + mp.y.toFixed(5);\n }", "title": "" }, { "docid": "ae6946c971a88026f5e50caa4d9371b3", "score": "0.7141321", "text": "display() {\n point(this.x, this.y);\n }", "title": "" }, { "docid": "cb838418f5e14b1fd4bbeae81bdf89bb", "score": "0.69395196", "text": "show() { \n strokeWeight(12);\n stroke(255);\n point(this.position.x, this.position.y); \n }", "title": "" }, { "docid": "1f399a155a2626767de0fc018e18fe33", "score": "0.681223", "text": "function displayCoordinates(evt) {\n var mp = esri.geometry.webMercatorToGeographic(evt.mapPoint);\n //display mouse coordinates\n// dojo.byId(\"mapLatitude\").innerHTML = mp.y.toFixed(mapApp.pointPrecision);\n// dojo.byId(\"mapLongitude\").innerHTML = mp.x.toFixed(mapApp.pointPrecision);\n}", "title": "" }, { "docid": "fb73b7478cda0c4e2772a322c706fa10", "score": "0.6764394", "text": "function onHover(event) {\n xMouse = event.clientX;\n yMouse = event.clientY;\n}", "title": "" }, { "docid": "6f08fec3b16fb61a949be8b2836a838c", "score": "0.6762729", "text": "function pointMouseOver(point) {\n showTooltip();\n updateTooltips(point)\n}", "title": "" }, { "docid": "f24c1462164ad938b81c0298a0c4bcd5", "score": "0.67599666", "text": "function printCoordinate(event) {\n var offsetX = event.offsetX;\n var offsetY = event.offsetY;\n var x = document.getElementById('x');\n var y = document.getElementById('y');\n x.textContent = offsetX;\n y.textContent = offsetY;\n}", "title": "" }, { "docid": "f7ba26a548551641d4020295c29fb86f", "score": "0.67250794", "text": "function showPosition(rover){\n console.log(\"Position: (\" + rover.x + \", \" + rover.y + \")\");\n}", "title": "" }, { "docid": "bd2840e3cf2196ccbfac3fd3af0b89de", "score": "0.6697189", "text": "function coordTracker() {\n\tfill('grey');\n\tstroke('grey');\n\trect(0, 0, 100, 20);\n\t//sets the color of the text\n\tfill(blkColor);\n\tstroke(blkColor);\n\tstrokeWeight(1);\n\t//writes the text of the current coordinates in the corner\n\ttext(\"x: \" + mouseX + \" y: \" + mouseY, 10, 15);\n}", "title": "" }, { "docid": "0e13fbc9cf1f2483cc1f02471f6d7950", "score": "0.6595735", "text": "function hoverPointEdit(presence) {\n presence.editHover();\n}", "title": "" }, { "docid": "1c306591bc68e406d11cade54b5a3da3", "score": "0.6574572", "text": "function showCoords(c) {\n // variables can be accessed here as\n // c.x, c.y, c.x2, c.y2, c.w, c.h\n }", "title": "" }, { "docid": "45e7cf81a192ccfd448247aa08a8c44b", "score": "0.6550028", "text": "function showPosition(event){\nsx.value = event.screenX;\t\t//update the element with ...\nsy.value = event.screenY;\npx.value = event.pageX;\npy.value = event.pageY;\ncx.value = event.clientX;\ncy.value = event.clientY;\n}", "title": "" }, { "docid": "362b059f463a99251ed0c67e10b0a9e9", "score": "0.65448385", "text": "function showCoordinates(position){\n var positionLeft = position.clientX\n var positionTop = position.clientY\n var cursorText = (positionLeft+ 80) + \"px, \" + (positionTop + 80) + \"px\"\n result.innerHTML = cursorText\n // result.css({'cursor' : 'url(img/target.png)'})\n result.style.left = positionLeft + 80 +\"px\"\n result.style.top = positionTop + 80 + \"px\"\n col.style.left = positionLeft + +59 +\"px\"\n col.style.top = 0 + \"px\"\n row.style.top = positionTop + 59 + \"px\"\n row.style.left = 0 + \"px\"\n}", "title": "" }, { "docid": "c52220afc7c38ff1ef5b98101d0cde5f", "score": "0.65421814", "text": "function logMousePos(event) {\n console.log(\"clientX: \" + event.clientX + \" - clientY: \" + event.clientY);\n}", "title": "" }, { "docid": "d6a612b8aaf7089f8ae9373bb0f04128", "score": "0.6492407", "text": "function showToolTip() {\n var tooltip = $( '<div id=\"tooltip\">' ).appendTo( 'body' )[0];\n $(tooltip).hide();\n \n $( '#mapimg' ).each(function () {\n var pos = $( this ).position(),\n top = pos.top,\n left = pos.left,\n width = $( this ).width(),\n height = $( this ).height(); \n $( this ).\n mousemove(function ( e ) {\n var top_y = $('#showMapSpaceView').position().top;\n var scroll_x = $('#showMapSpaceView')[0].scrollLeft;\n var scroll_y = $('#showMapSpaceView')[0].scrollTop;\n var x = e.pageX - left,\n y = e.pageY - top;\n //console.log(x + \" -- \" + y);\n coord_x = (x + scroll_x) ;// \n coord_y = (y + scroll_y) - top_y ; // \n \n $( tooltip ).html( 'position xy = '\n + ( coord_x ) + ' -- ' +( coord_y ) + '<br/>' + \n \"mode: \" + nav_map_setup ).css({\n left: e.clientX + 10,\n top: e.clientY + 10\n }).show();\n \n }).\n mouseleave(function () {\n $( tooltip ).hide();\n }); \n \n });\n}", "title": "" }, { "docid": "feb94ee3551c33ee4dfd05d094707c9e", "score": "0.6474403", "text": "function enableMouseCoordinates() {\n\n /**\n * Variable that has the element that contains the tooltip\n */\n var info = $('#info');\n\n /**\n * Method that shows the mouse coordinates on the map\n */\n var displayCoordinateMouse = function(pixel) {\n\n info.html(\"<p>\" + formatCoordinate($scope.mousePositionControl.l) + \"</p>\");\n info.css(\"display\",\"block\");\n\n };\n \n /**\n * Method that formats the coordinate of the mouse\n */\n var formatCoordinate = function( coord ){\n\n var posVirgula = coord.indexOf(\",\");\n\n var part1 = coord.slice(0,posVirgula);\n var part2 = coord.slice(posVirgula+2);\n\n var posPonto = part1.indexOf(\".\");\n var latitude = part1.slice(0,posPonto) + \"°\" + part1.slice(posPonto+1, posPonto+3) + \"'\" + part1.slice(posPonto+3) + '\"';\n\n posPonto = part2.indexOf(\".\");\n var longitude = part2.slice(0,posPonto) + \"°\" + part2.slice(posPonto+1, posPonto+3) + \"'\" + part2.slice(posPonto+3) + '\"';\n\n return latitude + \", \" + longitude;\n\n }\n \n /**\n * Events to display coordinate of the mouse\n */\n $($scope.map.getViewport()).on('mousemove', function(evt) {\n \tdisplayCoordinateMouse($scope.map.getEventPixel(evt.originalEvent));\n });\n }", "title": "" }, { "docid": "0725aca28f32d94dc69385268b73439f", "score": "0.644782", "text": "function showTooltip(hover) {\r\n var x0 = x.invert(d3.mouse(d3.event.currentTarget)[0]),\r\n i = bisectXhat(hover, x0),\r\n d0 = hover[i - 1],\r\n d1 = hover[i],\r\n d = x0 - d0.xhat > d1.xhat - x0 ? d1 : d0;\r\n\r\n tooltip.show(d);\r\n }", "title": "" }, { "docid": "0725aca28f32d94dc69385268b73439f", "score": "0.644782", "text": "function showTooltip(hover) {\r\n var x0 = x.invert(d3.mouse(d3.event.currentTarget)[0]),\r\n i = bisectXhat(hover, x0),\r\n d0 = hover[i - 1],\r\n d1 = hover[i],\r\n d = x0 - d0.xhat > d1.xhat - x0 ? d1 : d0;\r\n\r\n tooltip.show(d);\r\n }", "title": "" }, { "docid": "6cae2b6f7646bba9242327910295c2ef", "score": "0.6415909", "text": "function usableShowCoords(event) {\n\tx = event.clientX;\n\ty = event.clientY;\n}", "title": "" }, { "docid": "7082e8696820bf91987227680636bc71", "score": "0.63940144", "text": "function XY (){\n fill(0); \n textSize(14);//changes the font size\n text(mouseX,400,300);//displays the x coordinate\n text(mouseY,20,300);//displays the y coordinate\n }", "title": "" }, { "docid": "af13898d2485122404b795b4361f6129", "score": "0.6359555", "text": "function mouseOver() {\n console.log('mouse over')\n}", "title": "" }, { "docid": "cbffcdd3b2022e7223aa1d4720feda2e", "score": "0.63416773", "text": "function mousePos(ev)\n{\n\tvar x, y;\n\tvar pos = mouseLoc(ev);\n\n\tx = pos[0];\n\ty = pos[1];\n\t\n\tvar mouseP = document.getElementById(\"mousePos\");\n\t\n\tmouseP.innerHTML = (\"x= \" + x + \", y= \" + y);\n\t\n\tmouseP.style.backgroundColor = 'white';\n\t\n}", "title": "" }, { "docid": "06b8e5e477e820f9a4fbd1465730f5bb", "score": "0.63290036", "text": "function printCoord(pt) {\n console.log(\"The coordinate's x value is \", pt.x);\n console.log(\"The coordinate's y value is \", pt.y);\n}", "title": "" }, { "docid": "e08c7caf94a252070d9c884b0228ec8b", "score": "0.6309972", "text": "display() {\r\n\t\tfill(0, 0, 0, 0);\r\n\t\tstroke(200);\r\n\t\tellipse(this.location.x, this.location.y, 5, 5);\r\n\t}", "title": "" }, { "docid": "20ecd0e15c3a5353d45c17e77ae57e1e", "score": "0.6302086", "text": "function showTooltip(hover) {\r\n var x0 = x.invert(d3.mouse(d3.event.currentTarget)[0]),\r\n i = bisectXhat(hover, x0),\r\n d0 = hover[i - 1],\r\n d1 = hover[i],\r\n d = x0 - d0.xhat > d1.xhat - x0 ? d1 : d0;\r\n let temp = pData.find(el => el[\"observation.id\"] === d.id);\r\n tooltip.show(d, temp);\r\n }", "title": "" }, { "docid": "9b6846287d1cd37f892c8432f8513a36", "score": "0.6291208", "text": "function mouseClicked() {\r\n print(int(mouseX), int(mouseY))\r\n}", "title": "" }, { "docid": "d7048a9e2e92150e2a87055d3418bd5f", "score": "0.62895626", "text": "function mouseMovement(e) {\n setTimeout(function() {\n var x = e.pageX;\n var y = e.pageY;\n mouseDisplay.text(\"X: \" + x + \" Y: \" + y);\n }, 300);\n }", "title": "" }, { "docid": "0ce3f4da0dabbfb4a9aacae29d349df1", "score": "0.62882924", "text": "function showCoords(event) {\n var x = event.offsetX;\n var y = event.offsetY;\n var coords = \"X coords: \" + x + \", Y coords: \" + y;\n temp=93./(x-13.);\n h=(338.-y)/58.*temp;\n var values = \"Temperature: \\(T\\)=\" + toFixed(temp,4) + \", Fugacity: \\(\\Delta\\)=\" + toFixed(h/temp,4) ;\n //document.getElementById(\"demo\").innerHTML = coords;\n document.getElementById(\"value-temp\").innerHTML = toFixed(temp,4);\n document.getElementById(\"value-h\").innerHTML = toFixed(h/temp,4);\n}", "title": "" }, { "docid": "e8ee0e6cd4fda09c8be15967526652dc", "score": "0.6257531", "text": "function doSomething(event){\nconsole.log(`screen: (${event.screenX},${event.screenY}), \n page: (${event.pageX}, ${event.pageY}), \n client: (${event.clientX}, ${event.clientY}`\n)}", "title": "" }, { "docid": "a420b51b5f0248a09ae4ab36ef66a4f7", "score": "0.62547386", "text": "show() {\n this.sketch.noFill();\n this.sketch.stroke(this.hit ? 'red' : 200);\n this.sketch.strokeWeight(1);\n this.sketch.circle(this.pos.x, this.pos.y, this.r * 2);\n\n this.sketch.strokeWeight(this.r / 3);\n this.sketch.stroke('yellow');\n this.sketch.point(this.pos.x, this.pos.y);\n\n if (DEBUG()) {\n this.sketch.noStroke();\n this.sketch.fill(170);\n this.sketch.textAlign(this.sketch.CENTER, this.sketch.CENTER);\n this.sketch.text(`x: ${this.pos.x}, y: ${this.pos.y}, r: ${this.r}`, this.pos.x, this.pos.y);\n }\n }", "title": "" }, { "docid": "c62c30ea99f8973b52fc87d6f0e59a52", "score": "0.6242523", "text": "function mouseClicked() {\n print(int(mouseX), int(mouseY))\n}", "title": "" }, { "docid": "c62c30ea99f8973b52fc87d6f0e59a52", "score": "0.6242523", "text": "function mouseClicked() {\n print(int(mouseX), int(mouseY))\n}", "title": "" }, { "docid": "c62c30ea99f8973b52fc87d6f0e59a52", "score": "0.6242523", "text": "function mouseClicked() {\n print(int(mouseX), int(mouseY))\n}", "title": "" }, { "docid": "c62c30ea99f8973b52fc87d6f0e59a52", "score": "0.6242523", "text": "function mouseClicked() {\n print(int(mouseX), int(mouseY))\n}", "title": "" }, { "docid": "bda44e78683e06d57bc4fa1dbd99a787", "score": "0.62303144", "text": "display(){\n this.body.position.x = mouseX;\n this.body.position.y = mouseY;\n super.display();\n }", "title": "" }, { "docid": "de2e9ec35cd3ab2ed6601c058e642432", "score": "0.6229737", "text": "function mouseMoved(e) {\n const x = e.offsetX;\n const y = e.offsetY;\n let coor = \"Coordinates:(\" + x + \",\" + y + \")\";\n document.getElementById(\"coorDisplay\").innerHTML = coor;\n console.log(x + \" and \" + y);\n PutImageData();\n drawRectangle(x, y);\n const rgb = getColorAtPixels(x - 5, y - 5);\n showColorInfo(rgb);\n\n copyPixels(x - 5, y - 5);\n showZoomData();\n}", "title": "" }, { "docid": "e87fb708b3a0045054bb9c7c9f0cfe77", "score": "0.61922765", "text": "function showCoords(event) {\n var x = event.clientX;\n var y = event.clientY;\n var coords = \"Width: \" + x + \", Height: \" + y;\n document.getElementById(\"size\").innerHTML = coords;\n }", "title": "" }, { "docid": "c45886ba2ce315115da1bad6e73ec302", "score": "0.61917084", "text": "function displayPosition(x, y) {\n $('#pos').html('top: ' + y + ', left: ' + x);\n}", "title": "" }, { "docid": "eae23536299a4c8080120ab120f02b07", "score": "0.6190902", "text": "function showPosition(event) { // Declare function\r\n sx.value = event.screenX; // Update element with screenX\r\n sy.value = event.screenY; // Update element with screenY\r\n px.value = event.pageX; // Update element with pageX\r\n py.value = event.pageY; // Update element with pageY\r\n cx.value = event.clientX; // Update element with clientX\r\n cy.value = event.clientY; // Update element with clientY\r\n}", "title": "" }, { "docid": "46dc3528a68a7ab92f885cb69bab712b", "score": "0.61875504", "text": "function showToolTip(ele,d,x,y) {\n var toolTip = document.querySelector('.toolTip');\n toolTip.textContent = d[\"value\"];\n toolTip.style.display = 'block';\n toolTip.style.left = x + 10 + 'px';\n toolTip.style.top = y + 10 + 'px';\n ele.style.fill = 'orange';\n }", "title": "" }, { "docid": "82b5ac67fd52bd2d19687051f4dfa4c5", "score": "0.61663526", "text": "display() {\n fill(127);\n stroke(200);\n strokeWeight(2);\n ellipse(this.x, this.y, 32, 32);\n }", "title": "" }, { "docid": "601949a9f78f8343a2ebead3991da1bc", "score": "0.6161515", "text": "show() {\n stroke(255, 0, 255);\n fill(255, 100, 255, 100);\n\n ellipse(this.x, this.y, 10, 10);\n\n }", "title": "" }, { "docid": "b4fceddc54a19f72c1ac64b73c37bb54", "score": "0.6157098", "text": "function getMousePosition(x, y) {\n x: x,\n y: y\n}", "title": "" }, { "docid": "afcc6397b1ab594bf17dfaecd5c10fac", "score": "0.61449146", "text": "function coordinate() {\n console.log(this.x, this.y);\n}", "title": "" }, { "docid": "e1299574711a87bc5885b2e4d722ae74", "score": "0.6142289", "text": "function enableMouseCoordinates() {\r\n\r\n /**\r\n * Variable that has the element that contains the tooltip\r\n */\r\n var info = $('#info');\r\n\r\n /**\r\n * Method that shows the mouse coordinates on the map\r\n */\r\n var displayCoordinateMouse = function (pixel) {\r\n\r\n info.html(\"<p> \" + formatCoordinate($scope.mousePositionControl.l) + \"</p>\");\r\n info.css(\"display\", \"block\");\r\n\r\n };\r\n\r\n /**\r\n * Method that formats the coordinate of the mouse\r\n */\r\n var formatCoordinate = function (coord) {\r\n\r\n if ($scope.coordinatesFormat == 'DEGREES_DECIMAL') {\r\n return coord.split(',').reverse().join(', ');\r\n } else {\r\n if (coord.split) {\r\n return ol.coordinate.toStringHDMS(coord.split(',').map(Number));\r\n } else {\r\n return \"\";\r\n }\r\n }\r\n\r\n /*var posVirgula = coord.indexOf(\",\");\r\n\r\n var part1 = coord.slice(0, posVirgula);\r\n var part2 = coord.slice(posVirgula + 2);\r\n\r\n var posPonto = part1.indexOf(\".\");\r\n var latitude = part1.slice(0, posPonto) + \"°\" + part1.slice(posPonto + 1, posPonto + 3) + \"'\" + part1.slice(posPonto + 3) + '\"';\r\n\r\n posPonto = part2.indexOf(\".\");\r\n var longitude = part2.slice(0, posPonto) + \"°\" + part2.slice(posPonto + 1, posPonto + 3) + \"'\" + part2.slice(posPonto + 3) + '\"';\r\n\r\n return latitude + \", \" + longitude;*/\r\n\r\n }\r\n\r\n /**\r\n * Events to display coordinate of the mouse\r\n */\r\n $($scope.map.getViewport()).on('mousemove', function (evt) {\r\n displayCoordinateMouse($scope.map.getEventPixel(evt.originalEvent));\r\n });\r\n }", "title": "" }, { "docid": "e33b9ff47e9257e33358adc2c171a3be", "score": "0.6138178", "text": "draw() {\n if (this.s.props.network.layers >= 7) {\n return;\n }\n const s = this.s;\n s.textAlign(s.CENTER, s.CENTER);\n const d = s.dist(s.mx, s.my, this.x, this.y);\n let alpha = (2 * this.w - d) / (this.w) * 255;\n if (alpha > 255) {\n alpha = 255;\n } else if (alpha <= 0) {\n alpha = 0;\n }\n s.fill(255, alpha);\n if (this.hover) {\n s.fill(s.colors.bluegrey);\n s.cursor(s.HAND);\n }\n s.ellipse(this.x, this.y, this.w, this.h);\n if (this.hover) {\n s.fill(s.colors.white);\n s.textSize(this.w);\n s.text('+', this.x, this.y - (this.w / 20.0));\n s.cursor(s.HAND);\n } else {\n s.colors.darkbluegrey.setAlpha(alpha);\n s.fill(s.colors.darkbluegrey);\n s.textSize(this.w);\n s.text('+', this.x, this.y - (this.w / 20.0));\n }\n s.noStroke();\n s.textSize(s.typography.fontsize);\n s.colors.darkbluegrey.setAlpha(255);\n if (this.hover) {\n s.fill(s.colors.darkbluegrey);\n s.noStroke();\n s.rect(s.mx, s.my + s.typography.tooltipoffset, 100, 25);\n s.fill(255);\n s.text(s.global.strings.tooltipAdd, s.mx,\n s.my + s.typography.tooltipoffset);\n }\n }", "title": "" }, { "docid": "ec9c66dd1766ae948d8221d7667ba62a", "score": "0.6113071", "text": "print() {\n var a= \"\";\n for (var i=0;i<this.getnumpoints();i++) {\n a=a+this.names[i]+\"(\"+this.points[i][0]+\",\"+this.points[i][1]+\",\"+this.points[i][2]+\")\\n\";\n }\n console.log('landmark set='+this.getnumpoints()+'\\n'+a);\n }", "title": "" }, { "docid": "697561d0196215a281030e9accb74e17", "score": "0.61093575", "text": "function updateXYDisplay(x, y){\n var coordString = \"(\" + x + \", \" + y + \")\";\n document.getElementById(\"coordDisplay\").innerHTML = coordString;\n}", "title": "" }, { "docid": "b0742049f187f6805d46ca6bf313b7a2", "score": "0.6107304", "text": "function trackMousePosition()\n{\n jQuery(document).ready(function()\n {\n $('#c').mousemove(function(e)\n {\n var x = e.pageX - this.offsetLeft;\n var y = e.pageY - this.offsetTop;\n\n drawPreviewLine(x, y);\n\n $('#trackpos').html(x + ', ' + y);\n });\n })\n}", "title": "" }, { "docid": "16cd4d90160ac4288545a16387415a03", "score": "0.61032766", "text": "function displayCoordinates (pnt) {\n var coordsLabel = document.getElementById('mouse4326')\n var lat = pnt.lat()\n lat = lat.toFixed(4)\n var lng = pnt.lng()\n lng = lng.toFixed(4)\n coordsLabel.innerHTML = 'EPSG:4326: Latitude: ' + lat + ' Longitude: ' + lng\n}", "title": "" }, { "docid": "63af6b470a504bc529f61656818c1a21", "score": "0.60782266", "text": "display() {\n fill(127);\n stroke(200);\n strokeWeight(2);\n ellipse(this.x, this.y, 16, 16);\n }", "title": "" }, { "docid": "4c20475b47bc1bc859fa77b5d82c4c0c", "score": "0.60780954", "text": "function showName(d) {\n\n\t//Location of mouse\t\n\tvar xLoc = d3.mouse(this)[0];\n\tvar yLoc = d3.mouse(this)[1];\n\t\n\ttooltip.attr(\"transform\", \"translate(\" + xLoc + \",\" + yLoc + \")\");\n\ttooltip.select(\"text\").text(d.body);\n}//showName", "title": "" }, { "docid": "8f24b3331c4f5466739a27ff8149352a", "score": "0.60764706", "text": "display() {\n\t\ttext(this.tool + ' Right Click to change', 5, 100); // display current tool\n\t\tif (this.points.collisions.length >= 2) {\n\t\t\tfor (var i = 0; i < this.points.collisions.length; i += 2) {\n\t\t\t\tif (isDefined(this.points.collisions[i + 1])) {\n\t\t\t\t\trect(this.points.collisions[i].x, this.points.collisions[i].y, this.points.collisions[i + 1].x - this.points.collisions[i].x, this.points.collisions[i + 1].y - this.points.collisions[i].y)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "0a335b7c8ade33a651316b89be1e202b", "score": "0.607071", "text": "function hover(){\n \n}", "title": "" }, { "docid": "e50dd502a07dbbc03592bd4cc24e040c", "score": "0.6047192", "text": "function checkHover(e) {\n // tell the browser we'll handle this event\n e.preventDefault();\n e.stopPropagation();\n if(points.length == 0) return;\n var rect = canvas.getBoundingClientRect(); //bounded rectangle\n var x = event.clientX - rect.left; //x-value\n var y = event.clientY - rect.top; //y-value\n\n for (var i = 0; i < points.length; i++) {\n var hover = intersect(x, y, points[i]); //checks to see if mouse is intersecting the point\n if (hover && !points[i].displayed()) {\n displayDescription(x, y, points[i]); //if mouse is hovering over the point, displays the description\n points[i].updateDisplay(); //updates that the description of the point is being displayed\n lastNewPointDisplay(points[i]); //updates last point displayed\n // points[i].updateDisplay()\n //redrawAll();\n break;\n }\n if (points[i].displayed() && !hover) {\n // redrawAll();\n points[i].updateDisplay();\n turnOffDescription();\n }\n }\n}", "title": "" }, { "docid": "e48c967157c5d2c0a191e6fe9eda445f", "score": "0.604344", "text": "dumpPoints(x, y, name) {\r\n txt = [name + ' = ['];\r\n if (!x) {\r\n x = [];\r\n for (var i = 0; i < y.length; i++) {\r\n x.push(i+1);\r\n }\r\n }\r\n for (var i = 0; i < x.length; i++) {\r\n txt.push(' '+x[i]+' '+y[i]);\r\n }\r\n txt.push('];');\r\n this.$el.append(txt.join('<br>\\n'))+'<br>\\n';\r\n }", "title": "" }, { "docid": "ef1b6affd0fa038b04aba4d40d5846fc", "score": "0.6040161", "text": "show() {\n fill(255, 255, 0);\n noStroke();\n ellipse(this.currentPosition.x, this.currentPosition.y, this.width);\n }", "title": "" }, { "docid": "24bd7a9e6cdd93f57cd7e9004b4cfca4", "score": "0.6033105", "text": "function displayPosition() {\n\tfor (var key in coordMap) {\n\t\tsetSquare(key, coordMap[key]);\n\t}\n\t\n\tif (showCoords) {\n\t\tdocument.getElementById('top1').innerHTML = 'a';\n\t\tdocument.getElementById('top2').innerHTML = 'b';\n\t\tdocument.getElementById('top3').innerHTML = 'c';\n\t\tdocument.getElementById('top4').innerHTML = 'd';\n\t\tdocument.getElementById('top5').innerHTML = 'e';\n\t\tdocument.getElementById('top6').innerHTML = 'f';\n\t\tdocument.getElementById('top7').innerHTML = 'g';\n\t\tdocument.getElementById('top8').innerHTML = 'h';\n\t\tfor (var rank = 8; rank > 0; rank--) {\n\t\t\tdocument.getElementById('left' + rank).innerHTML = rank;\n\t\t}\n\t}\n}", "title": "" }, { "docid": "50355c009eaae9c5c28ac792c9c1fff8", "score": "0.6018364", "text": "show() {\n\n\t\tconst {left, top, width, height} = this.node.getBoundingClientRect();\n\n\t\tDiscordModules.Tooltips.show(this.id, {\n\n\t\t\tposition: this.side,\n\n\t\t\ttext: this.label,\n\n\t\t\tcolor: this.style,\n\n\t\t\ttargetWidth: width,\n\n\t\t\ttargetHeight: height,\n\n\t\t\tx: left,\n\n\t\t\ty: top\n\n\t\t});\n\n\t}", "title": "" }, { "docid": "c66d34ab415b43e71620bc7993479af5", "score": "0.6015986", "text": "function hovering() {\n\n}", "title": "" }, { "docid": "c66d34ab415b43e71620bc7993479af5", "score": "0.6015986", "text": "function hovering() {\n\n}", "title": "" }, { "docid": "88bdf4caebc4c44c1b058a9070196af8", "score": "0.60147214", "text": "function activateHoverInfo(){\n mapImplementation.ActivateHoverInfo();\n }", "title": "" }, { "docid": "5d3de20fbccc292cc8326a9582f32e65", "score": "0.6013599", "text": "function mouseMoveHandler() {\n // get the current mouse position\n const [mx, my] = mouse(this);\n const col = _hiddenContext.getImageData(\n mx * _canvasScale,\n my * _canvasScale,\n 1,\n 1\n ).data;\n const colString = 'rgb(' + col[0] + ',' + col[1] + ',' + col[2] + ')';\n const node = colorMap.get(colString);\n\n if (node) {\n let html;\n if (isArray(node.data.data)) {\n let n = {};\n n[getDimension(state).accessor] = node.data.label;\n n[getMetric(state).accessor] = sum(\n node.data.data.map(d => d.data),\n _getMetricVal\n );\n html = tooltipMarkup(n, state);\n } else {\n html = tooltipMarkup(node.data.data, state);\n }\n\n tooltip\n .html(html)\n .transition()\n .duration(_options.animation.duration.tooltip)\n .style('left', mx + _options.tooltip.offset[0] + 'px')\n .style('top', my + _options.tooltip.offset[1] + 'px')\n .style('opacity', 1);\n } else {\n tooltip\n .transition()\n .duration(_options.animation.duration.tooltip)\n .style('opacity', 0);\n }\n }", "title": "" }, { "docid": "155f174b5dfa5c41d193b1772dd271e3", "score": "0.5999155", "text": "function mouseOverInfo() {\n // return location and information\n return info\n .style(\"top\", (event.pageY + 30) + \"px\")\n .style(\"left\", (event.pageX - 480) + \"px\")\n .attr(\"class\", \"info\")\n .style(\"visibility\", \"visible\")\n .html('<h4>Uitleg puntenwolk</h4><p>Bezuinigingen op de GGZ \\\n\t\t\t\t(geestelijke gezondheidszorg) worden vaak als mogelijke \\\n\t\t\t\toorzaak genoemd voor de stijging in E33-meldingen. \\\n\t\t\t\tDit is moeilijk te controleren.</p><p>Er is wel bekend hoe \\\n\t\t\t\tveel de verzekeraars in Nederland uitgeven aan (de verschillende \\\n\t\t\t\tonderdelen van) de GGZ. Onderstaande puntenwolk onderzoekt \\\n\t\t\t\tof er een verband is tussen de uitgaven aan de GGZ per gemeente \\\n\t\t\t\ten de hoeveelheid E33-meldingen in diezelfde plaats.</p>\\\n\t\t\t\t<p>Disclaimer: Onderstaande visualisatie toont alleen de gegevens van \\\n\t\t\t\t2016 en verandert niet mee met de kaart. Punten die zich ter hoogte \\\n\t\t\t\tvan het uitende van de assen bevinden, hebben mogelijk nog extremere \\\n\t\t\t\twaarden. Ga eroverheen met de muis om de absolute waarden te zien.</p>');\n\n}", "title": "" }, { "docid": "8343f5547964d64ab64d29fb9fb2a2e9", "score": "0.5982487", "text": "function mouseClicked() {\n console.log(\"Clicked\", `${mouseX}, ${mouseY}`);\n const x = normX(mouseX);\n const y = normY(mouseY);\n Xs.push(x);\n Ys.push(y);\n console.log([Xs, Ys]);\n}", "title": "" }, { "docid": "984d20d339a610042e97008db7c5271a", "score": "0.5976677", "text": "function tcb() {\n\tconsole.log('hovering...');\n}", "title": "" }, { "docid": "332a1a7fcba097b047bc57da03a69e80", "score": "0.5973031", "text": "function mouseOver(explanationName, event) {\n divForTooltip.style(\"opacity\", 1);\n divForTooltip.html(mapWithExplanations[explanationName])\n .style(\"left\", (event.pageX) + \"px\")\n .style(\"top\", (event.pageY - 28) + \"px\");\n}", "title": "" }, { "docid": "9899a2e12a195bd242bc40e8a0852dd7", "score": "0.5963437", "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": "c502fae1b3014d64d65173a5eec3d3ed", "score": "0.5956365", "text": "function trackPos(e) {\n mouse.x = e.pageX;\n mouse.y = e.pageY - 110;\n}", "title": "" }, { "docid": "4c9e2c6dc2a042c020d191c2f9398b8f", "score": "0.59489304", "text": "function circleHover(d) {\n\t\tvar mouse_coords = d3.mouse(this);\n\t\tconsole.log(mouse_coords)\n\t\td3.select(this).style(\"stroke\",\"red\")\n\t\td3.selectAll(\".team-node text\").style(\"display\",\"none\");\n\t\td3.select(this.parentNode).select(\"text\").style(\"display\",\"inline\");\n\t}", "title": "" }, { "docid": "79a59d9ae4c8ef59fd8218f44b498586", "score": "0.5948343", "text": "function mapover(d){\n var tooltext = \"County: \"+d.properties.name+\", No. of Tweets: \"+ data[d.id]\n return tooltip.style(\"visibility\", \"visible\")\n .style(\"color\",\"#990000\")\n .style(\"background\",\"#CCFFCC\")\n .style(\"border-radius\",\"3px\")\n .text(tooltext);\n }", "title": "" }, { "docid": "6bd5f1fc5015e04ef6396e5fbefcb603", "score": "0.59421575", "text": "function mouseOverLineString(e) {\n\tconsole.log(\"lineString moved\", e);\n}", "title": "" }, { "docid": "ef05b27517d42e6e1546ae3547eeeb4d", "score": "0.59405255", "text": "function trackPosition(e) {\n\tmouse.x = e.pageX;\n\tmouse.y = e.pageY;\n}", "title": "" }, { "docid": "ef05b27517d42e6e1546ae3547eeeb4d", "score": "0.59405255", "text": "function trackPosition(e) {\n\tmouse.x = e.pageX;\n\tmouse.y = e.pageY;\n}", "title": "" }, { "docid": "965b7a0a97c9333dbf21ccef251a4bac", "score": "0.5920933", "text": "_over() {\n\t\tconst tooltip = this._createTooltip();\n\t\tconst width = tooltip.offsetWidth;\n\t\tconst height = tooltip.offsetHeight;\n\t\tconst top = this._element.getBoundingClientRect().top - height - 15 + document.documentElement.scrollTop;\n\t\tlet left = this._element.offsetWidth / 2 - width / 2 + this._element.getBoundingClientRect().left + document.documentElement.scrollLeft;\n\t\n\t\tif (left < 20) left = 20;\n\n\t\ttooltip.style.left = `${left}px`;\n\t\ttooltip.style.top = `${top}px`;\n\t\ttooltip.classList.add('visible');\n\t}", "title": "" }, { "docid": "c63766ff07cb4991571a0e7982b18a62", "score": "0.5920038", "text": "function showPosition(position) {\n x.innerHTML = \"Latitude: \" + position.coords.latitude +\n \"<br>Longitude: \" + position.coords.longitude;\n }", "title": "" }, { "docid": "ede7bb9a613deb18a10281132773c7e1", "score": "0.5915798", "text": "function showToolTip(d){\n tooltip\n .style(\"opacity\",1)\n .style(\"left\",d3.event.x-(tooltip.node().offsetWidth/2)+\"px\") // d3.event.x gives the position of mouse pointer and set the positioon of div to left\n .style(\"top\",d3.event.y+25+\"px\") // d3.event.x gives the position of mouse pointer and set the positioon of div to right\n \n // tooltip.node().offsetWidth/2) used to move the div to the center when we hover the scatter plot.\n\n .html(`\n <p>Region: ${d.data.month}</p>\n <p>Births: ${d.data.births.toLocaleString()}</p>\n <p>Year: ${d.data.year} </p> \n `);\n //toLocaleString used to convert the big no. to more readable form\n\n}", "title": "" }, { "docid": "2c6602fba739ac86398e2b0dc7ff8d67", "score": "0.5912626", "text": "function mousePressed() {\n textPlaceX = mouseX\n textPlaceY = mouseY\n}", "title": "" }, { "docid": "e97d781175dce6f6c3051e7426ef94e8", "score": "0.5911447", "text": "function ToolTip1() {\n return (\n <Html center position={[-1, 1, -1]}>\n <p>Click and drag on the white part to move the camera</p>\n </Html>\n );\n}", "title": "" }, { "docid": "6b5448b2940558849f427194b655df7f", "score": "0.591095", "text": "function hover(){\n document.getElementById(\"mousehover\").innerHTML = \"Voce passou o mouse AQUI\";\n //alert(\"Trocar Text\");\n}", "title": "" }, { "docid": "290577f3bd711ede972011579fd861d7", "score": "0.5908509", "text": "function mousePosition () {\n\tvar e = window.event;\n document.getElementById (\"x\").value = e.clientX;\n document.getElementById (\"y\").value = e.clientY;\n}", "title": "" }, { "docid": "f20c9c1f88d17e92d4c6d51145e7def6", "score": "0.58985853", "text": "function handleMouseOver (d) {\n var X = parseInt(d3.select(this).attr(\"cx\"));\n var Y = parseInt(d3.select(this).attr(\"cy\"));\n\n canvas.append(\"rect\")\n .attr(\"x\", X+10)\n .attr(\"y\", Y-10)\n .attr(\"fill\", d3.rgb(30, 48, 165))\n .attr(\"height\", 19)\n .attr(\"width\", 250)\n .attr(\"rx\", 7.5)\n .attr(\"ry\", 7.5)\n .attr(\"id\", \"LLBox\");\n\n canvas.append(\"text\")\n .attr(\"x\", X+16)\n .attr(\"y\", Y+3)\n .attr(\"font-family\", \"Calibri\")\n .attr(\"font-size\", \"16px\")\n .attr(\"fill\", \"white\")\n .attr(\"font-weight\", 700)\n .attr(\"id\", \"LLTXT\")\n .text(\"Opacity: \" + parseFloat(d.Total*0.000459));\n //.text(\"Lon, Lat: \" + [d.Lon, d.Lat]);\n\n}", "title": "" }, { "docid": "731f7a92503d54cc430b12c89d671023", "score": "0.5879123", "text": "function mousePressed(){\n let x=map(mouseX,0,width,0,1);\n let y=map(mouseY,0,height,1,0);\n\n x_vals.push(x);\n y_vals.push(y);\n}", "title": "" }, { "docid": "d0ab0a6a073c1ecc4b59592f946ec186", "score": "0.58753353", "text": "drawHoveredConnector() {\r\n if (this.selectionController.getActiveState() === States.HOVER_CONNECTOR\r\n || this.selectionController.getActiveState() === States.CONNECTING) {\r\n let hoveredConn = this.selectionController.getHoveredConnector();\r\n if (hoveredConn !== null) {\r\n let location = this.selectionController.getScreenCoords({ x: hoveredConn.bounds.x, y: hoveredConn.bounds.y });\r\n this.graphics.beginFill('rgba(150,0,0,0.5)')\r\n .drawCircle(location.x, location.y, hoveredConn.bounds.width)\r\n .endFill()\r\n .beginStroke('rgba(150,0,0,1)')\r\n .setStrokeStyle(2)\r\n .drawCircle(location.x, location.y, hoveredConn.bounds.width)\r\n .endStroke();\r\n }\r\n }\r\n }", "title": "" }, { "docid": "f6c34e78cbd50c75102bd61a037b00e7", "score": "0.5874841", "text": "function showPosition(position) {\n $(\"#location\").html( \"<pre>Latitude: \" + position.coords.latitude +\n \"<br>Longitude: \" + position.coords.longitude+\"</pre>\");\n}", "title": "" }, { "docid": "02a75e4e131c6656f5cd6b510d50fadb", "score": "0.5870476", "text": "function showToolTip1(d){\n tooltip\n .style(\"opacity\",1)\n .style(\"left\",d3.event.x-(tooltip.node().offsetWidth/2)+\"px\") // d3.event.x gives the position of mouse pointer and set the positioon of div to left\n .style(\"top\",d3.event.y+25+\"px\") // d3.event.x gives the position of mouse pointer and set the positioon of div to right\n \n // tooltip.node().offsetWidth/2) used to move the div to the center when we hover the scatter plot.\n\n .html(`\n \n <p>Total Births : ${d.data.births.toLocaleString()}</p>\n \n `);\n //toLocaleString used to convert the big no. to more readable form\n\n}", "title": "" }, { "docid": "7088da5fcad9b9bb7e9f08a02aee5abd", "score": "0.58667654", "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": "b397372524255375b4424a1cbea67412", "score": "0.58658993", "text": "function mouseMovePlot(d) {\n return tooltip\n .style(\"top\", (event.pageY - 10) + \"px\")\n .style(\"left\", (event.pageX - 300) + \"px\");\n}", "title": "" }, { "docid": "7fcb745386bc063784902f982ee58399", "score": "0.586224", "text": "function showMouseInformation()\n{\n\t//Updates some mouse information:\n\tCB_Elements.insertContentById(\"mouse_coordinates\", CB_Mouse.getX() + \", \" + CB_Mouse.getY());\n\tCB_Elements.insertContentById(\"mouse_coordinates_lock\", CB_Mouse.getXMovement() + \", \" + CB_Mouse.getYMovement());\n\tCB_Elements.insertContentById(\"mouse_buttons\", JSON.stringify(CB_Mouse.getButtons()));\n\t\n\t//Changes the background colour of the desired element when the mouse is over it:\n\tvar backgroundColor = \"#aa99dd\";\n\tvar element = CB_Elements.id(\"mouse_lock_element\");\n\tif (CB_Mouse.isOverElement(element)) { backgroundColor = \"#aa0000\"; } //For advanced collisions, the CB_Collisions static class can be used.\n\telement.style.backgroundColor = backgroundColor;\n\t\n\t//Calls itself again:\n\tsetTimeout(showMouseInformation, 1);\n}", "title": "" }, { "docid": "2ad9b6a80fc040cf2d67ec9caa9d896c", "score": "0.58358866", "text": "function showTooltip() {\n\n\t\ttt.style('visibility', 'visible');\n\t\tactivePoint.style('fill-opacity', 1);\n\n\t}", "title": "" }, { "docid": "ada958564b1074f95027a3a80da9f698", "score": "0.5835558", "text": "function mouse(kind, pt, id) {\n\n}", "title": "" }, { "docid": "9079da8fa849af971c747813a5122f83", "score": "0.5828723", "text": "handleHover(event) {\n this.setState({\n hoverPos: {\n top: event.clientY + 10,\n left: event.clientX,\n },\n hoverState: 'tooltipover'\n });\n }", "title": "" }, { "docid": "584b340e581f89f8db24c009177e8feb", "score": "0.58229405", "text": "function drawUI() {\n console.log(\"draw UI\");\n drawText(mouse.x + \" \" + mouse.y);\n}", "title": "" }, { "docid": "e0a1f2586b98266aa67e5ceb9fcfb33e", "score": "0.5822565", "text": "function mousemoveCallback(e) {\n window.mouse.track = true;\n\n // Get mouse pixel coords\n var parentRect = window.mouse.parent.getBoundingClientRect();\n window.mouse.pixelx = e.clientX - parentRect.left;\n window.mouse.pixely = parentRect.height - (e.clientY - parentRect.top);\n\n // Get mouse eta-phi coords\n window.mouse.x = (window.mouse.pixelx - window.plot.originPixel[0]) /\n window.plot.pixelsPerUnit[0];\n window.mouse.y = (window.mouse.pixely - window.plot.originPixel[1]) /\n window.plot.pixelsPerUnit[1];\n\n var coordStr = \"&nbsp;mouse coords: \" + window.mouse.x.toFixed(3).toString() + \" \" +\n window.mouse.y.toFixed(3).toString();\n document.getElementById(\"mousePos\").innerHTML = coordStr;\n\n updateDetectors();\n}", "title": "" }, { "docid": "e99e75a822af680ff1c2c53f07738579", "score": "0.581542", "text": "function showScrollPosition(){\n textSize(32);\n fill(255);\n text('X: ' + scrollX + '/ Y: ' + scrollY, width - 300, 30);\n }", "title": "" }, { "docid": "2591dde0ebc89834d26d488b4549443a", "score": "0.5811481", "text": "show(){\n\t\tnoStroke();\n\t\tstroke(250,250,0,this.alpha);\n\t\tfill(250,250,0,this.alpha);\n\t\tellipse(this.x,this.y,10,30);\n\t\tellipse(this.x,this.y,30,10);\n\t}", "title": "" }, { "docid": "aaa5d0e060f6bda0ba5adc9779180a8c", "score": "0.5811345", "text": "show() {\n push();\n background([100, 100, 100]);\n translate(this.pos.x, this.pos.y);\n for (let cell of this.cells) {\n cell.show();\n }\n for (let border of this.borders) {\n border.show();\n }\n pop();\n }", "title": "" }, { "docid": "b8ee8e3f9a6bddf7e6dda30abc898e33", "score": "0.58028626", "text": "show() {\n\n fill('#FF0000');\n noStroke();\n charecterX = this.x;\n charecterY = this.y;\n\n // find which row and column the player is in.\n playerY = floor(charecterY / cellHeight);\n playerX = floor(charecterX / cellWidth);\n\n\n }", "title": "" }, { "docid": "873e0e6c5edad0b4a8e0d25a3e65cc39", "score": "0.5800765", "text": "function handleMouseOver(d, i) {\n if (i >= 0 && i < xdata.length) {\n \td3.select(this)\n \t\t.style(\"fill\", \"orange\")\n\n main.append(\"text\")\n \t.attr(\"id\", \"info\")\n \t\t\t.attr(\"text-anchor\", \"middle\") \n \t\t\t.attr(\"transform\", \"translate(\"+ (width/2) +\",\"+(height+40)+\")\")\n \t\t\t.text(xdata[i] + \", \" + ydata[i] + \" size: \" + (size[i]+1));\n }\n }", "title": "" } ]
1dae2c93e80886a6d5016eaca512314c
Status of all checks :
[ { "docid": "80fd68e54b0f193798bdc3a965f9b798", "score": "0.60037607", "text": "function check_Status()\n{\n\t\n\tstatus=0\n\tif(check_Brow()==0 ||check_OpSys()==0 || check_Platform()==0 || check_Resolution()==0 ||check_Cookie()==0 || check_Media()==0 || check_JVM()==0 || check_Web()==0 || check_PopUpBlocker()==0 )\n\t\tstatus = 1\n\t\n\tif (status>0)\n\t{\n\t\tanimation_Sys_Chk(index)\n\t\tinterval_Status_ID = setTimeout('clear_Interval()',10000)\n\t}\n\t\n}", "title": "" } ]
[ { "docid": "4bc4b860d001748f99b084dd7b25be5e", "score": "0.6768077", "text": "getStatusChecks() {\n return __awaiter(this, void 0, void 0, function* () {\n const { query, remote, schema } = yield this.githubRepository.ensure();\n const result = yield query({\n query: schema.GetChecks,\n variables: {\n owner: remote.owner,\n name: remote.repositoryName,\n number: this.number\n }\n });\n // We always fetch the status checks for only the last commit, so there should only be one node present\n const statusCheckRollup = result.data.repository.pullRequest.commits.nodes[0].commit.statusCheckRollup;\n if (!statusCheckRollup) {\n return {\n state: 'pending',\n statuses: []\n };\n }\n return {\n state: statusCheckRollup.state.toLowerCase(),\n statuses: statusCheckRollup.contexts.nodes.map(context => {\n var _a, _b, _c, _d;\n if (graphql_1.isCheckRun(context)) {\n return {\n id: context.id,\n url: (_a = context.checkSuite.app) === null || _a === void 0 ? void 0 : _a.url,\n avatar_url: (_b = context.checkSuite.app) === null || _b === void 0 ? void 0 : _b.logoUrl,\n state: ((_c = context.conclusion) === null || _c === void 0 ? void 0 : _c.toLowerCase()) || 'pending',\n description: context.title,\n context: context.name,\n target_url: context.detailsUrl\n };\n }\n else {\n return {\n id: context.id,\n url: context.targetUrl,\n avatar_url: context.avatarUrl,\n state: (_d = context.state) === null || _d === void 0 ? void 0 : _d.toLowerCase(),\n description: context.description,\n context: context.context,\n target_url: context.targetUrl\n };\n }\n })\n };\n });\n }", "title": "" }, { "docid": "351e00f1ed3fee89e1d07daa62eba8e4", "score": "0.6472331", "text": "check() {}", "title": "" }, { "docid": "351e00f1ed3fee89e1d07daa62eba8e4", "score": "0.6472331", "text": "check() {}", "title": "" }, { "docid": "281ba23c5c893f1f0d7227f23d2b6444", "score": "0.64178646", "text": "function checkLightStatus() {\n$inputs = [7,8];\nfor(i=0;i<$inputs.length;i++) {\ngetStatus($inputs[i]);\n}\n}", "title": "" }, { "docid": "29f23f90cc5ed4eff3c9e09dd1b06832", "score": "0.63594353", "text": "function runRepoChecks() {\n vm.repoChecks.running = true;\n\n upgradeRepositoriesChecksFactory.getAdminRepoChecks()\n .then(\n // In case of success\n function (repoChecksResponse) {\n\n _.forEach(repoChecksResponse.data, function(value, key) {\n vm.repoChecks.checks[key].status = value;\n });\n\n var repoChecksResult = true;\n // Update prechecks status\n\n _.forEach(vm.repoChecks.checks, function (repoStatus) {\n if (false === repoStatus.status) {\n repoChecksResult = false;\n return false;\n }\n });\n\n // Update prechecks validity\n vm.repoChecks.valid = repoChecksResult;\n },\n // In case of failure\n function (errorRepoChecksResponse) {\n // Expose the error list to repoChecks object\n vm.repoChecks.errors = errorRepoChecksResponse.data.errors;\n }\n )\n .finally(function () {\n // Either on sucess or failure, the repoChecks has been completed.\n vm.repoChecks.completed = true;\n vm.repoChecks.running = false;\n });\n }", "title": "" }, { "docid": "7738a0c706675f4cc61ffec4bebe194e", "score": "0.63171154", "text": "Check() {\n\n }", "title": "" }, { "docid": "950baff7c39445559a689b1526247c8b", "score": "0.62552005", "text": "async function check() {\n\tawait spawnMultiple(preflight, () => format({check: true}), lint);\n}", "title": "" }, { "docid": "6b04f11d9e6bcf9bbcd236c5d4d8a681", "score": "0.6252022", "text": "function getStatusCheck () {\n\t$.ajax({\n\t\turl: '/status/check',\n\t\tdataType: 'json',\n\t\tcontentType: \"application/json\",\n\t\tsuccess: function(data) {\n\t\t\tif ( data == false ) {\n\t\t\t\twindow.location.replace(\"/error\");\n\t\t\t} else {\n\t\t\t\t$(\".loading\").hide();\n\t\t\t\tupdateStatusData(data);\n\t\t\t\tupdateProgress(data[\"publishers\"],\"publishers-status\");\n\t\t\t\tupdateProgress(data[\"business_units\"],\"business-units-status\");\n\t\t\t\tupdateProgress(data[\"users\"],\"users-status\");\n\t\t\t\tupdateProgress(data[\"categories\"],\"categories-status\");\n\t\t\t\tupdateProgress(data[\"content_types\"],\"content-types-status\");\n\t\t\t\tupdateProgress(data[\"projects\"],\"projects-status\");\n\t\t\t\tupdateProgress(data[\"languages\"],\"languages-status\");\n\t\t\t\tupdateProgress(data[\"content\"],\"content-status\");\n\t\t\t}\n\t\t\tif (data[\"all_done\"]){\n\t\t\t\tconsole.log(\"All Done!\")\n\t\t\t\tclearInterval(loop);\n\t\t\t\tvar start = Math.round( new Date(data[\"start_time\"]).getTime() );\n\t\t\t\tvar end = Math.round( new Date(data[\"end_time\"]).getTime() );\n\t\t\t\t$(\".stopwatch\").stopwatch({ \"startTime\":(end - start) }).stopwatch('stop');\n\t\t\t}\n\t\t},\n\t\terror: function(data) {\n\t\t\tconsole.debug(data);\n\t\t}\n\t});\n}", "title": "" }, { "docid": "2cd222f0ffa6eddb6060b39e97c4e7af", "score": "0.62469035", "text": "check () {\n\t\treturn this.checkOn.apply(this, this.args);\n\t}", "title": "" }, { "docid": "ca9e9d3780cbe2561c45bf6d7e2d2184", "score": "0.624596", "text": "function checkStatus(){\n\t\n\tquery.status(args['corpus'],function(response){\n\t\t\n\t\tgetDocumentsList();\n\t\t\n\t\tvar status = true;\n\t\t\n\t\tresponse.objects.forEach(function(d){\n\t\t\tif (d.status != \"OK\" && d.status !=\"CLO\")\n\t\t\t\tstatus = false;\t\t\t\n\t\t})\n\t\t\t\t\n\t\tif ( !response.objects.length || status )\n\t\t\treturn;\n\t\t\n\t\t\n\t\tvar progress = response.objects[0].completion * 100;\n\t\tconsole.log(progress+\"%\")\n\t\t\t\t\n\t\td3.select(\"#sven-alert\")\n\t\t\t.attr(\"class\",\"alert alert-block\")\n\t\n\t\td3.select(\"#sven-alert\")\n\t\t\t.append(\"h4\")\n\t\t\t.html(\"Warning!\")\n\t\n\t\td3.select(\"#sven-alert\")\n\t\t\t.append(\"div\")\n\t\t\t.attr(\"class\",\"pull-right progress progress-striped progress-warning active\")\n\t\t\t.style(\"display\",\"block\")\n\t\t\t.style(\"margin-bottom\",\"0px\")\n\t\t\t.append(\"div\")\n\t\t\t.attr(\"class\",\"bar\")\n\t\t\t.style(\"width\", progress + \"%\")\n\t\n\t\td3.select(\"#sven-alert\")\n\t\t\t.append(\"p\")\n\t\t\t.html(\"Documents analysis is currently ongoing. Please wait until the analysis is complete. It should take some minutes. Refresh this page.\")\n\t\t\t\n\t\t\n\t})\n}", "title": "" }, { "docid": "675f6ed0b44c7a5fa7c1301c777bceb3", "score": "0.6185973", "text": "checkAllSuccess() {\n return Object.keys(this.listObj).every(item => this.listObj[item].hasSuccess);\n }", "title": "" }, { "docid": "05ed4d108c8e3d906593a32f4707d8a4", "score": "0.6154105", "text": "function StatusRollup(){\n this[OK] = 0;\n this[FAILED] = 0;\n this[NOT_RUNNING] = 0;\n this[UNKNOWN] = 0;\n this.total = 0;\n }", "title": "" }, { "docid": "324fabe0d80ce0a3bdcd312f454aeabe", "score": "0.61033875", "text": "function getStatus() {\n getDeployStatus();\n }", "title": "" }, { "docid": "2d6c6772cee6d0b9004632f20e65548d", "score": "0.6069365", "text": "function checkStatus() {\n var allDone = true;\n\n for (var _i2 = 0; _i2 < layers.length; _i2++) {\n if (layers[_i2].loaded === false) {\n allDone = false;\n break;\n }\n }\n\n if (allDone) finish();else setTimeout(checkStatus, 500);\n }", "title": "" }, { "docid": "ad4eb01eb413513336e1795cec29a4b4", "score": "0.6068407", "text": "run() {\n if (this.failed.length === 0) {\n console.log(`%c${this.title} - valid: ${this.count}/${this.count}.`, 'color: green; font-weight: bold;');\n } else {\n console.log(`%c${this.title} - valid: ${this.count - this.failed.length}/${this.count}; failed: ${this.failed.length}/${this.count}.`, 'font-weight: bold;');\n\n for (let i = 0; i < this.failed.length; i++) {\n const fail = this.failed[i];\n console.log(`%cFailed test: ${fail.index}`, 'color: red;');\n console.log(`%c\\texpected: ${fail.expected}`, 'color: red;');\n console.log(`%c\\tcalculated: ${fail.calculated}`, 'color: red;');\n }\n }\n }", "title": "" }, { "docid": "4fe53d462dd364ebe2d51b59fdeaefd7", "score": "0.6057472", "text": "function sa_checkall() {\r\n\t// check advisors\r\n\tsa_checkcities();\r\n\tsa_checkmilitary();\r\n\tsa_checkdiplomacy();\r\n\tsa_checkresearch();\r\n\t// display notify/warning/alert messages and play sound\r\n\tif(sa_Alert>0) { // alert is the highest priority for military events\r\n\t\tsa_write('<font color=\"red\" style=\"font-size:17px;text-decoration: blink;\">Alert!!!</font>');\r\n\t\tsa_sound(sa_SoundAlert);\r\n\t} else if(sa_Warning>0) { // warning for post military events\r\n\t\tsa_write('<font color=\"orange\" style=\"font-size:15px;text-decoration: blink;\">Warning!</font>');\r\n\t\tsa_sound(sa_SoundWarning);\r\n\t} else if(sa_Notify>0) { // notify for other advisors\r\n\t\tsa_write('<font color=\"yellow\" style=\"font-size:15px;text-decoration: blink;\">'+sa_Notify+' Notif'+(sa_Notify>1?'ies':'y')+'</font>');\r\n\t\tsa_sound(sa_SoundNotify);\r\n\t}\r\n\treturn (sa_Alert+sa_Warning+sa_Notify > 0);\r\n}", "title": "" }, { "docid": "a715d733976d7fdf3ea2395dc7fb8159", "score": "0.60144037", "text": "checkStatus(nameofobject){\n nameofobject.reactionValues(nameofobject,\n ` lazy and heartless owner`,\n ` only drink given`,\n ` drink and food given no play time`,\n ` wonderfull!!! owner am blest to have you `,\n ` playing and had food but not had a drink`,\n ` only playing`,\n ` only food given`)\n\n return nameofobject.status(this._react1,this._react2,this._react3,this._react4,this._react5,this._react6,this._react7);\n\n \n \n }", "title": "" }, { "docid": "6eab9c9cf21b61467c0584b9fa915a48", "score": "0.59909135", "text": "checkStateStatus() {\n\t\tconst state = this.store.getState();\n\t\tObject.keys(this.stateWaitMap).forEach((stateKey) => {\n\t\t\tif (!this.stateWaitMap[stateKey].resolved) {\n\t\t\t\tconst keys = stateKey.split('.');\n\t\t\t\tlet searchState = state;\n\t\t\t\tlet isSatisfied = true;\n\n\t\t\t\tfor (let y = 0; y < keys.length; y++) {\n\t\t\t\t\tconst key = keys[y];\n\t\t\t\t\tif (!searchState.hasOwnProperty(key) || searchState[key] == null) {\n\t\t\t\t\t\t//exit we arent ready yet :(\n\t\t\t\t\t\tisSatisfied = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tsearchState = searchState[key];\n\t\t\t\t}\n\n\t\t\t\tif (isSatisfied) {\n\t\t\t\t\tthis.stateWaitMap[stateKey].resolved = true;\n\t\t\t\t\tthis.stateWaitMap[stateKey].resolver(searchState);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "title": "" }, { "docid": "1e7263a09c206b2eef4fdeb9d329ea81", "score": "0.5988889", "text": "function _scriptStatus(){}", "title": "" }, { "docid": "cd14da43f5843b3806bb746fe6402a4d", "score": "0.59876364", "text": "function workflowstatus() {\n apiService.get('/api/statusSistema/workflowstatus', null,\n workflowstatusLoadCompleted,\n workflowstatusLoadFailed);\n }", "title": "" }, { "docid": "d85b2b982b75b58eb5ab6f63785bd312", "score": "0.59783524", "text": "function statusScan() {\n\n var currentTime;\n var differential;\n\n if ($scope.statuses.length == 0)\n {\n return true;\n }\n\n for (var i=0; i < $scope.statuses.length; i++)\n {\n currentTime = new Date() / 1000;\n differential = currentTime - $scope.statuses[i].timeStampInstant.epochSecond;\n\n if (differential < $scope.settings.missingTime) { // missingTime\n\n goodStatus($scope.statuses[i]);\n }\n else {\n if (differential < ($scope.settings.deathTime*60)) // deathTime\n brokenStatus($scope.statuses[i]);\n else\n deadStatus($scope.statuses[i]);\n }\n }\n return true;\n }", "title": "" }, { "docid": "caf246e71ba5557a21ed5bc4998d75a9", "score": "0.59257233", "text": "function getStandardCheck(){\r\n\tvar stndCheck = new StandardChecks();\r\n\tprintCheck(stndCheck);\r\n}", "title": "" }, { "docid": "41f114c0baf4feebdc8fc17489473803", "score": "0.5904548", "text": "checkStatus() {\n let checks = [\n [0, 1, 2],\n [3, 4, 5],\n [6, 7, 8],\n [0, 3, 6],\n [1, 4, 7],\n [2, 5, 8],\n [0, 4, 8],\n [2, 4, 6]\n ];\n\n for (var i = 0; i < checks.length; i++) {\n let check = checks[i];\n let checkArr = [];\n for (var j = 0; j < check.length; j++) {\n checkArr.push(this.boardValues[check[j]]);\n\n }\n\n function winner1(currentValue) {\n return currentValue === 1;\n }\n\n function winner2(currentValue) {\n return currentValue === 2;\n }\n if (checkArr.every(winner1)) {\n return 1;\n }\n if (checkArr.every(winner2)) {\n return 2;\n }\n }\n\n function incomplete(elem) {\n return elem === 0;\n }\n if (this.boardValues.some(incomplete)) {\n return -1\n }\n\n // if there are no empty spaces, the game is a draw\n return 0;\n }", "title": "" }, { "docid": "520a0e34f62a12c8a3abdc6d99ef5d9e", "score": "0.5843139", "text": "function StatusRollup(){\n this.good = 0;\n this.bad = 0;\n this.down = 0;\n this.unknown = 0;\n this.total = 0;\n }", "title": "" }, { "docid": "67138ca938de3a60cb24aa6253538ba7", "score": "0.58379275", "text": "function checkstatus()\n{\nfor(i of status)\n{\n\nif(i.innerText===\"Completed\")\n{\n\n i.style.backgroundColor=\"green\";\n\n}\nelse if(i.innerText===\"InCompleted\")\n{\n i.style.backgroundColor=\"red\";\n\n}\nelse{\n i.style.backgroundColor=\"none\";\n\n}\n}\n}", "title": "" }, { "docid": "1ed20edaa6c1dc005760765d6626241e", "score": "0.5783297", "text": "function checkAll() {\n server.emit('checkAll');\n}", "title": "" }, { "docid": "3ebf0aabf1b1cac477c115ee44c343f5", "score": "0.57760835", "text": "function StatusSummary () {\n this.not_added = [];\n this.conflicted = [];\n this.created = [];\n this.deleted = [];\n this.modified = [];\n this.renamed = [];\n this.files = [];\n}", "title": "" }, { "docid": "2855445d9947f5872c208d0e5246be37", "score": "0.57431406", "text": "function checkStatus(){\n \tvar check = provjeriZahtjev('handleRequest/checkRequestUserSide.php', function(data){\n \t\tdata = JSON.parse(data.responseText);\n \t\tconsole.log(data[0]);\n \t\tfor(var i = 0; i < data.length; i++){\n\t\t\tprovjeriStanjePoljaZahtjev(data[i]);\n\t\t}\n \t});\n }", "title": "" }, { "docid": "b8dce03ad4fd492db43f89107e373c13", "score": "0.5728725", "text": "function checkSiteStatus(domains) {\n console.log(\"Checking the site status: \" + domains);\n}", "title": "" }, { "docid": "93ddfb61e379267458ffbac6e617ef5e", "score": "0.5720297", "text": "function LMSGetStatus() {\r\n // get the number of objectives, and initialize the id array, primary objectives references\r\n var n = LMSNumberOfObjectives();\r\n // get the sco and primary objectives status\r\n _cs=LMSGetValue(\"cmi.completion_status\");\r\n _ps=LMSGetValue(\"cmi.success_status\");\r\n if (_pox>=0) {\r\n _ocs=LMSGetObjective(_pox,\"completion_status\");\r\n _ops=LMSGetObjective(_pox,\"success_status\");\r\n } else {\r\n _ocs=_cs;\r\n _ops=_ps;\r\n }\r\n // sync the completed/passed local status with the (prior) objective status\r\n if (_ocs==\"completed\"||_ops==\"passed\") {\r\n if (_cs!=\"completed\") {\r\n LMSSetValue(\"cmi.completion_status\",\"completed\");\r\n _cs=\"completed\";\r\n }\r\n if (_ps!=\"passed\") {\r\n LMSSetValue(\"cmi.success_status\",\"passed\");\r\n _ps=\"passed\";\r\n }\r\n if (_ocs!=\"completed\") {\r\n LMSSetObjective(_pox,\"completion_status\",\"completed\");\r\n _ocs=\"completed\";\r\n }\r\n if (_ops!=\"passed\") {\r\n LMSSetObjective(_pox,\"success_status\",\"passed\");\r\n _ops=\"passed\";\r\n }\r\n }\r\n}", "title": "" }, { "docid": "0ad1b9dc3e94652b08a7062849340164", "score": "0.57137114", "text": "checkStatus(data) {\n return this.http.post(this.checkStatusUrl, data);\n }", "title": "" }, { "docid": "439318e9d038f250d5bad6fc04dde837", "score": "0.57051057", "text": "function checkGroupResult() {\n\n }", "title": "" }, { "docid": "d71f2a3d479a66159cac32d71a8a454b", "score": "0.57029283", "text": "function verifyChecklist() {\n\t\tvar isAllVerified = \"yes\",\n\t\t\tlist = document.querySelectorAll('.checkItem'),\n\t\t\tlistState = [];\n\t\t\n\t\tfor (var i = 0; i < list.length; i++) {\n\t\t\tvar checklistItem = list[i],\n\t\t\t\tcheckedInput = checklistItem.querySelector('input'),\n\t\t\t\tcheckedLabel = checklistItem.querySelector('label');\n\n\t\t\tif(checkedInput.checked) {\n\t\t\t\tcheckedLabel.className = 'checked';\t\n\t\t\t} else {\n\t\t\t\tcheckedLabel.className = '';\t\n\t\t\t\tisAllVerified = \"no\";\n\t\t\t}\n\t\t\t\n\t\t\t/*\n\t\t\t * Build out list state for persistng the checklist.\n\t\t\t * Only need to push the label and if the item has been checked or not.\n\t\t\t */\n\t\t\tlistState.push({\n\t\t\t\tlabel: checkedLabel.innerText,\n\t\t\t\tchecked: checkedInput.checked\n\t\t\t});\n\t\t}\n\n\t\t/**\n\t\t * Send the checklist state array to the background to persist. Useful when user navigates around the pull request page.\n\t\t */\n\t\tchrome.extension.sendMessage({action: 'setList', checklist: listState}, function(response) {\n\t\t\tconsole.log(response);\n\t\t});\n\n\t\tenableMergeButton(isAllVerified);\t\t\t\n\t}", "title": "" }, { "docid": "a82f336bbde37b2c3db197cff0ca008c", "score": "0.5695907", "text": "function update_status() {\n if (has_empty_box().length == 0 && current_state_valid()) {\n change_status(solved_status);\n }\n else if (puzzle_status != in_progress_status) {\n change_status(in_progress_status);\n }\n }", "title": "" }, { "docid": "dc8605c022b2d16605eb13ab33a9eafb", "score": "0.5691058", "text": "function checkAllSuccess(file, index, array) {\n return file.status === 'success';\n }", "title": "" }, { "docid": "0ed192de5475f262d5731be8360e8bf8", "score": "0.5687293", "text": "function validateForChangingStatusToComplete() {\r\n var checkboxes = document.getElementsByClassName('checkbox');\r\n var enteredBatchIds = [], batchIdsToAlert = [];\r\n var batchPrimaryKey, statusId, batchId;\r\n for (var i = 0; i < checkboxes.length; i++) {\r\n if(checkboxes[i].checked == 1) {\r\n enteredBatchIds.push(checkboxes[i].id);\r\n }\r\n }\r\n for(i = 0; i < enteredBatchIds.length; i++) {\r\n batchPrimaryKey = enteredBatchIds[i];\r\n statusId = 'status_' + batchPrimaryKey;\r\n batchId = 'batchid_' + batchPrimaryKey;\r\n if($(statusId) != null && $(batchId) != null) {\r\n if($F(statusId) != 'COMPLETED') {\r\n batchIdsToAlert.push($F(batchId));\r\n }\r\n }\r\n }\r\n if(batchIdsToAlert.length > 0) {\r\n alert(\"The following batches will not be made as Output Ready. Since it is not in Completed status.\\n\\\r\n\" + batchIdsToAlert );\r\n }\r\n}", "title": "" }, { "docid": "f7c3dd5bffb96cbf2cf37370c9517c85", "score": "0.5683317", "text": "function checkStatus() {\n flushMonitoringOperations(self.queue);\n\n if(self.queue.length == 0) {\n // Get all the known connections\n var connections = self.availableConnections\n .concat(self.inUseConnections)\n .concat(self.nonAuthenticatedConnections)\n .concat(self.connectingConnections);\n\n // Check if we have any in flight operations\n for(var i = 0; i < connections.length; i++) {\n // There is an operation still in flight, reschedule a\n // check waiting for it to drain\n if(connections[i].workItems.length > 0) {\n return setTimeout(checkStatus, 1);\n }\n }\n\n destroy(self, connections);\n // } else if (self.queue.length > 0 && !this.reconnectId) {\n\n } else {\n // Ensure we empty the queue\n _execute(self)();\n // Set timeout\n setTimeout(checkStatus, 1);\n }\n }", "title": "" }, { "docid": "efbd603b0afaf21bcd07ada4d19858c9", "score": "0.5680566", "text": "function check(){\r\n\r\n}", "title": "" }, { "docid": "36108796d4cf79b0021a418583f0a8ee", "score": "0.56768346", "text": "function getProjectsStatus() {\r\n\t\r\n}", "title": "" }, { "docid": "a7bdc27d0a6125ae828ce7b8a24226e4", "score": "0.5667312", "text": "async getFullStatus() {\n const result = await this._request('/status', {}, null, true);\n if (result === null) {\n throw new Error('false');\n } else {\n return result;\n }\n }", "title": "" }, { "docid": "b71fa431a21b675735c3a94db11a47a0", "score": "0.56649464", "text": "function checkStatus() {\n if (callbackCounter == expectedCallbackCounter) {\n clearInterval(handleInterval);\n addedParticipantsNotification(addedEntrys);\n // reset variables\n callbackCounter = 0;\n expectedCallbackCounter = 0;\n addedEntrys = 0;\n // check if user wants to get rid of bots listed in bot json\n var botsetting = document.getElementById(\"botfilterCheckbox\").checked;\n if (botsetting) {\n clearBotsFromParticipants();\n }\n stelleListedar();\n }\n}", "title": "" }, { "docid": "e7ec073f42b33d5b5dc1cfedf82323a6", "score": "0.56643", "text": "function userPassed(){\n\n if(isForLMS){\n o_SCO.setStatus( o_SCO.normalizeStatus(\"passed\") );\n }\n else{console.log(\"pasado\");}\n }", "title": "" }, { "docid": "3c14b613d3831c26158ab7d9d59b4074", "score": "0.5659865", "text": "static get STATUS() {\n return 0;\n }", "title": "" }, { "docid": "3eb6d6288b93e39f919baec4f9ca4bb2", "score": "0.56490546", "text": "function checkStatus() {\n flushMonitoringOperations(self.queue);\n\n if (self.queue.length === 0) {\n // Get all the known connections\n var connections = self.availableConnections\n .concat(self.inUseConnections)\n .concat(self.nonAuthenticatedConnections)\n .concat(self.connectingConnections);\n\n // Check if we have any in flight operations\n for (var i = 0; i < connections.length; i++) {\n // There is an operation still in flight, reschedule a\n // check waiting for it to drain\n if (connections[i].workItems.length > 0) {\n return setTimeout(checkStatus, 1);\n }\n }\n\n destroy(self, connections);\n // } else if (self.queue.length > 0 && !this.reconnectId) {\n } else {\n // Ensure we empty the queue\n _execute(self)();\n // Set timeout\n setTimeout(checkStatus, 1);\n }\n }", "title": "" }, { "docid": "0e720f97102cd6fd604482e1a1492110", "score": "0.564109", "text": "function validate_check(index){\n taches[index].status = !taches[index].status;\n save_checklist();\n}", "title": "" }, { "docid": "fab9e94ac79dda53ca5df60a5a05bd34", "score": "0.56389225", "text": "async function checkingStatus() {\n //alert(STATUS[0].className + '\\n' + STATUS[0].probability)\n console.log(`status: ${STATUS[0].className}, probabilidade: ${STATUS[0].probability}`)\n if (STATUS[0].className == \"SEM EPI\" && STATUS[0].probability) {\n alert(STATUS[0].className + ':' + STATUS[0].probability)\n sendStatusESP8266('alerta')\n }\n return STATUS[0].value\n}", "title": "" }, { "docid": "a72432d04ca91d791932f5ae3578975a", "score": "0.5629737", "text": "function getStatus() {\n\n fetch(`/game/${props.gameID}/status`, {\n method: 'POST'\n })\n .then(res => {\n if (res.ok) {\n return res.json()\n } else {\n throw new Error('Status konnte nicht geladen werden');\n }\n })\n .then(status => setRoundsPlayed(status.PlayCounter))\n .catch((error) => {\n console.log('Oh Nein ' + error);\n });\n }", "title": "" }, { "docid": "2b911f2adba9e83811bc32e1067a6a42", "score": "0.5613588", "text": "getStatus() {\n\t \treturn this.status;\n\t }", "title": "" }, { "docid": "2b911f2adba9e83811bc32e1067a6a42", "score": "0.5613588", "text": "getStatus() {\n\t \treturn this.status;\n\t }", "title": "" }, { "docid": "2b911f2adba9e83811bc32e1067a6a42", "score": "0.5613588", "text": "getStatus() {\n\t \treturn this.status;\n\t }", "title": "" }, { "docid": "2b911f2adba9e83811bc32e1067a6a42", "score": "0.5613588", "text": "getStatus() {\n\t \treturn this.status;\n\t }", "title": "" }, { "docid": "2b911f2adba9e83811bc32e1067a6a42", "score": "0.5613588", "text": "getStatus() {\n\t \treturn this.status;\n\t }", "title": "" }, { "docid": "2b911f2adba9e83811bc32e1067a6a42", "score": "0.56131315", "text": "getStatus() {\n\t \treturn this.status;\n\t }", "title": "" }, { "docid": "bf0c23ede62e26d9f35a82760fc7520f", "score": "0.5613047", "text": "function checkTestStatus()\n\t{\n\t\ttriesSoFar++;\n\t\t\n\t\t// If the test has exhausted its attempts OR has passed\n\t\tif ( (triesSoFar >= triesUntilFail) || (passOrFail == \"pass\") )\n\t\t{\n\t\t\t// Stop the setInterval\n\t\t\tclearTimeout(testRunner);\n\t\t}\n\t}", "title": "" }, { "docid": "59a927df6e2acf0614572a23f16c9e43", "score": "0.5612234", "text": "function check_status(id) {\n// var state = '<i class=\"fa fa-check\">';\n// var dataString = 'opt=8&report_id=' + id;\n// var $obj = sendRequest(dataString);\n// var data = $obj.report;\n if (id == 1) {\n num_of_reports++;\n $(\"#number_of_completed\").html(num_of_reports);\n $(\"#number_of_reports\").html(num_of_reports);\n state = '<i class=\"fa fa-check green-text\">';\n } else {\n state = '<i class=\"fa fa-times red\">'\n }\n return state;\n }", "title": "" }, { "docid": "cbfc38140910e102a1f5fb074d92b8ec", "score": "0.56112444", "text": "getStatus() {\r\n var that = this;\r\n window.contract.methods.getStatus().call(function(error, result) {\r\n if(!error) {\r\n that.setState({ status: stage[result] })\r\n return result;\r\n }\r\n })\r\n }", "title": "" }, { "docid": "e7a82afc47725d425401f4239dbe9f2d", "score": "0.55985063", "text": "function checkStatus(elem) {\n var id = elem.batch;\n $.get('/mark_picked?id='+id, function(data) {\n $('.mark-picked'+id).html('Batch picked up!');\n console.log('Batch picked up!');\n });\n }", "title": "" }, { "docid": "7d6e6597f1f2a027bdc698bc26f7b440", "score": "0.5597029", "text": "function GranularSanityChecks() {}", "title": "" }, { "docid": "308f9c2cb7dc7c59d68f4526708a1f3a", "score": "0.5592692", "text": "function checkStatus() {\n if (!working) {\n $('#start').removeClass('disabled');\n $('#pause').addClass('disabled');\n $('#reset').addClass('disabled');\n $('#myAlert').hide();\n $('#myAlert-fail').hide()\n $('#save').hide();\n $('.col-xs-6').show();\n // $('#result').hide();\n } else {\n $('#pause').removeClass('disabled');\n $('#reset').removeClass('disabled');\n $('#start').addClass('disabled');\n $('#save').hide();\n $('#myAlert').hide();\n $('#myAlert-fail').hide();\n $('.col-xs-6').hide();\n // $('#result').show();\n }\n}", "title": "" }, { "docid": "081945765a889929c70d1ea9401c112d", "score": "0.55882996", "text": "_getStatus() {\n let status = 0;\n for (let resource of this.items)\n switch (resource.status) {\n case ResourceLoaderStatus.Queued:\n status = status | ResourceQueueStatus.Queued;\n break;\n case ResourceLoaderStatus.Loading:\n status = status | ResourceQueueStatus.Loading;\n break;\n case ResourceLoaderStatus.Loaded:\n status = status | ResourceQueueStatus.Loaded;\n break;\n case ResourceLoaderStatus.Failed:\n status = status | ResourceQueueStatus.Failed;\n break;\n }\n return status;\n }", "title": "" }, { "docid": "20b68180dd94b5d82da099701796fe7b", "score": "0.5587767", "text": "function check_job_status(){\n console.log(\"checking job status\");\n //TODO check for job completion too\n send_post(JOB_STATUS);\n setTimeout(check_job_status, 1000);\n}", "title": "" }, { "docid": "0e1bdea20d56028df3f7d0735796f6ca", "score": "0.5581499", "text": "getChecksForCurrentRun() {\n const resp = {};\n const currRun = this.checks.filter(check => {\n const lastRun = check.lastRun || -1;\n const isLastLookupStale = (Date.now() - lastRun) > check.minCacheMs;\n return isLastLookupStale;\n });\n \n // Executor function needs to return a Promise \n // Following map gives a list of promises. If the check returned a promise,\n // then that will be the result, and if it did not, the async will wrap the\n // result in a promise.\n resp.promises = currRun.map(async check => check.executor());\n resp.keys = currRun.map(check => check.key);\n\n return resp;\n }", "title": "" }, { "docid": "22a99816b6de406e193196630c740e4b", "score": "0.55717045", "text": "function checkStatus(proms)\n {\n if(proms.status == 200)\n {\n console.log(\"status: ok\");\n }\n return proms.text();\n }", "title": "" }, { "docid": "a558c40276bd9c85343447ea91b7b7c0", "score": "0.55654323", "text": "get passed() {\n return this.ran && this.issues.length == 0;\n }", "title": "" }, { "docid": "9dd1e2f55bd4c4a38ac54a702adf0271", "score": "0.5555248", "text": "function updateAllStatusInformation() {\n $(\"div.status-row-with-guid\").each(function() {\n if ($(this).data('finished') == 'yes') {\n return;\n }\n var guid = $(this).attr('id');\n var info = false;\n if ($(this).data('info') != 'set') {\n info = true;\n }\n updateStatus(guid, info);\n });\n}", "title": "" }, { "docid": "92c55550ff7dc66ea897e63e7d8d51bc", "score": "0.55550873", "text": "function getStatus() {\n var status = {};\n status.memory = getMemory();\n status.cpu = getCpu();\n status.process = getProcess();\n status.pid = getPid();\n status.uptime = getUptime();\n return status;\n}", "title": "" }, { "docid": "c35ebc0a8cb2adb5df8f8627675e91e9", "score": "0.5552331", "text": "function checks(){\n\t\t\t\tif (checkAnswers())\n\t\t\t\t\tresolve(\"result\");\n\t\t\t}", "title": "" }, { "docid": "d13444b43070bb523ab0ecacabe5276b", "score": "0.555192", "text": "function check(a) {\n if(arr1[a].status === false) {\n arr1[a].status = true;\n } else {\n arr1[a].status = false;\n }\n save();\n on_Load();\n\n}", "title": "" }, { "docid": "60004e03087c53850277caeb4d5516e9", "score": "0.55494195", "text": "function updateStatus() {\n\tpost('long:status', function(text) {\n\t\taddToConsole(text);\n\t\tupdateStatus();\n\t}, function() {\n\t\tupdateStatus();\n\t});\n}", "title": "" }, { "docid": "58f8d2d080a79b1f0100db4bf3e3d621", "score": "0.5548879", "text": "allCheckText() {\n const vm = this;\n if (vm.allComplete){\n return 'All done!'\n } else {\n return 'All mark as unfinished!'\n }\n }", "title": "" }, { "docid": "6ae1379ce1abb2d2ee3a65ec1ca448af", "score": "0.5543676", "text": "function TestResult_wasSuccessful() \n{ \n\treturn this.mErrors.length + this.mFailures.length == 0; \n}", "title": "" }, { "docid": "b6df282dc7bf4f05bbcb4ed217dcdbc9", "score": "0.55399424", "text": "statusCheck() {\n // Remove DEAD actors\n for (let i = 0; i < this.actors.length; i++) {\n const actor = this.actors[i];\n if (actor.HP <= 0) {\n actor.view.sprite.animation.free();\n this.actors.splice(i, 1);\n const index = gameState.alive.indexOf(actor);\n index > -1 && gameState.alive.splice(index, 1);\n }\n }\n\n // We should continue if a task becomes invalid\n const shouldContinue = this.tasks.every((t) => t.valid);\n const won = this.tasks.every((t) => t.fulfilled);\n\n if (shouldContinue) return GameState.CONTINUE;\n if (won) {\n gameState.level++;\n gameState.alive = gameState.alive.filter(\n (a) => !(a.HP <= 0 || a.status === status.DEAD)\n );\n return GameState.WON;\n } else {\n gameState.over = true;\n return GameState.LOST;\n }\n }", "title": "" }, { "docid": "2d85ab552ae6f6578e812a189685b035", "score": "0.5536868", "text": "function gameStatus () {\n io.to(gameRoom).emit('game-status', game.reportStatus());\n }", "title": "" }, { "docid": "c4827ce072b8af50cd1b77f612102f7f", "score": "0.55277", "text": "function checkStatus() {\n return get('https://status.github.com/api/status.json')\n .spread(function (res) {\n try {\n var status = JSON.parse(res.body.toString()).status;\n } catch (ex) {\n return true; //assume it's just the status site that's not working\n }\n if (status === 'good') return true;\n var err = new Error('GitHub status is ' + status);\n err.name = 'GitHubStatus';\n throw err;\n })\n}", "title": "" }, { "docid": "e0edbba1d5ddc547ef8b99fc4e54188b", "score": "0.5523878", "text": "function updateStatus() {\n let status = \" to move.\";\n let turn = \"White\";\n movesCount += 1;\n if (abChess.getActiveColor(movesCount) === \"b\") {\n turn = \"Black\";\n }\n if (abChess.isCheck(movesCount)) {\n status = \" is in check.\";\n }\n statusElement.innerText = turn + status;\n fenCode.innerText = abChess.getFEN(movesCount);\n}", "title": "" }, { "docid": "cbc67b061a1b7fa959abb2da09112d4f", "score": "0.5520107", "text": "function onHealthCheck() {\n return true;\n}", "title": "" }, { "docid": "659dd56c270cc73df7da39a9d0ada2e6", "score": "0.5517466", "text": "function checkTaskStatus(){\n const allTasks = document.querySelectorAll('.task-item');\n\n allTasks.forEach(function(task){\n const taskInput = task.querySelector('input');\n\n if(taskInput.getAttribute('data-completed') === 'false'){\n updateTaskStatus(task, taskInput, false, 'not-completed-cursor');\n }else{\n updateTaskStatus(task, taskInput, true, 'not-completed-cursor');\n }\n })\n }", "title": "" }, { "docid": "b018fcd841066e1cc4b23765c268fd04", "score": "0.5516011", "text": "judgeTest() {\n if (document.getElementsByClassName('subtest-status-passed').length ===\n this.itemList.length) {\n window.test.pass();\n } else {\n const failedItems =\n Array.from(document.getElementsByClassName('subtest-status-failed'))\n .map((e) => e.dataset.name);\n window.test.fail(\n `Display test failed. Malfunction items: ${failedItems.join(', ')}`);\n }\n }", "title": "" }, { "docid": "2e64ec4af3816209a190c70bc574cf9b", "score": "0.5513561", "text": "function _CheckAction(aSuccess, aLeft, aRight, aStack) {\n this.type = \"check\";\n this.success = aSuccess;\n this.left = _normalize_for_json(aLeft);\n this.right = _normalize_for_json(aRight);\n this.stack = _normalize_for_json(aStack);\n}", "title": "" }, { "docid": "2253c4c4c6862f89a00d7d1b47731d01", "score": "0.55093783", "text": "function checkStatus() {\n // if uri matches include change state to true\n // console.log('checkStatus: ', tabs.activeTab.url, mod.include);\n statusIcon.changeState(isUriIncluded(mod.include,\n tabs.activeTab.url));\n}", "title": "" }, { "docid": "df0cfdeec53bc5d16d4b142336310dbc", "score": "0.55008936", "text": "function checkStatus() {\n\tvar END_POINT = 'http://localhost:8080/PropertiesService-1.0/properties/propertiesmanager/status';\n\n\t$.ajax({\n\t\turl : END_POINT,\n\t\ttype : 'GET',\n\t\tcontentType : 'application/text',\n\t\tsuccess : function() {\n\t\t\talert(\"Server is Up!\");\n\t\t\t// TODO: GREEN DOT ICON\n\t\t},\n\t\terror : function() {\n\t\t\talert(\"Server is DOWN!\");\n\t\t\t// TODO: RED DOT ICON\n\t\t}\n\t});\n\n}", "title": "" }, { "docid": "362a66538be7b9d700d4f4c5aa97feaf", "score": "0.5498379", "text": "function handleStatus() { // función para marcar tareas como 'completas' o 'incompletas'.\r\n const listItems = document.querySelectorAll('li'); // array con todos los <li>\r\n for (let i = 0; i < checkboxes.length; i++) {\r\n if (checkboxes[i].checked === true) {\r\n tasks[i].completed = true;\r\n listItems[i].classList.add('crossed_off');\r\n } else {\r\n tasks[i].completed = false;\r\n listItems[i].classList.remove('crossed_off');\r\n }\r\n }\r\n let outcome = document.querySelector('.outcome');\r\n\r\n const tasksDone = document.querySelectorAll(':checked').length; // longitud del array de los checked boxes = nº de tareas hechas\r\n const tasksToDo = tasks.length - tasksDone; // nº de tareas por hacer\r\n outcome.innerHTML = `<p class=\"outcome\">Número de tareas ➡ ${tasks.length}</p><p>- Completadas: ${tasksDone} ✔️ </p><p>- Por completar: ${tasksToDo} ⬜</p>`\r\n}", "title": "" }, { "docid": "38381e7d3f3571b2d4cfca51c026a928", "score": "0.54882395", "text": "function getStatus(res, mysql, context, complete){\n mysql.pool.query(\"SELECT status_id AS id, status AS name FROM life_status ORDER BY status\", function(error, results, fields){\n if(error){\n res.write(JSON.stringify(error));\n res.end();\n }\n context.status = results;\n complete();\n });\n }", "title": "" }, { "docid": "0644f48f3d55d58bde729bddfb95d5e3", "score": "0.5486683", "text": "async addCheck(check) {\n if (this.dryRun) {\n return check;\n }\n const response = await this.pingdom.post('checks', check);\n return response.body;\n }", "title": "" }, { "docid": "6ec5c6c1de304f42e6acfe50d01b7550", "score": "0.5478961", "text": "get status() {\n const completed = [...this.success, ...this.failed]\n const totalTime = completed.length ? completed.map(x => x.data.time).sum() : 0\n return {\n id: this.id,\n alias: this.alias,\n success: this.success.length,\n failed: this.failed.length,\n total: completed.length,\n status: this._status,\n time: totalTime > 0 ? totalTime / 1000 : totalTime\n }\n }", "title": "" }, { "docid": "b14c8b4905fe5c73200fe2467106494d", "score": "0.54784584", "text": "function checks(name) {\n $checks.filter('[name=\"'+ name + '\"]').length == $checks.filter('[name=\"'+ name + '\"]').filter(':checked').length ?\n $checkAll.filter('[name=\"'+ name + '\"]').prop('checked', true) :\n $checkAll.filter('[name=\"'+ name + '\"]').prop('checked', false);\n }", "title": "" }, { "docid": "849c7553b2cda648bef34461df136d71", "score": "0.54762405", "text": "initCheck() /*: void */ {\n }", "title": "" }, { "docid": "2183624f9f2733c5d885b133f2a8b21f", "score": "0.546867", "text": "function statusUpdate(list_object) {\n var $list = $(list_object);\n var total = $list.length;\n \n var checked = 0;\n $list.each(function() {\n if ($(this).hasClass('checked')) {\n checked++;\n }\n });\n \n total = total-checked;\n \n $('.stats').text(checked + \" items checked. \" + total + \" items left to get.\");\n// });\n }", "title": "" }, { "docid": "e7bfead9f23a92db892847447e36fa36", "score": "0.5467888", "text": "checkStatus() {\n if (this.built) {\n throw new Error('Block has already been built');\n }\n if (this.reverted) {\n throw new Error('State has already been reverted');\n }\n }", "title": "" }, { "docid": "cdb09ada072e192aae819afdb650a7ff", "score": "0.5467338", "text": "getStatus(){\n // return status of game (waiting for players, in progress, ended)\n return this.status;\n }", "title": "" }, { "docid": "efaf79ac7a7890d8617840ef818247a8", "score": "0.54644984", "text": "function checkAll(){\n\talerts = '';\n\tfor (var i=0 ; i < prompts.length ; i++)\n\t{\n\t\tcheckPrompt(i);\n\t}\n\tif (alerts.length > 1){\n\t\talert(unescape(alerts));\n } else {\n\t multiToPrompt();\n \tdocument.check.submit();\n }\n}", "title": "" }, { "docid": "89cd4b759b8e32197c8cb93950f333e0", "score": "0.54631126", "text": "function getStatuses() {\n return statuses;\n }", "title": "" }, { "docid": "b7f0e161ed720191001a88b81c513f75", "score": "0.5460966", "text": "status(){\n\n let requiredJob = mapping[this.type];\n //console.log('the required job is ', requiredJob);\n //looked to see who is onboard\n //for everyone that is on board\n // we checked thier job title to match the type of vehicle \n //if you found one return ready to go\n //otherwise check the next person\n\n //if we run out of people to check\n //return not ready\n let found = this.crew.find(function(member){\n if (member.job == requiredJob){\n return true;\n } else {\n return false;\n }\n });\n\n if (found){\n return 'Good to go! ' +found.name+ 'is on board';\n } else {\n return 'Not ready yet!';\n }\n }", "title": "" }, { "docid": "ae50c7289df392db528c9d28f9145bad", "score": "0.5459631", "text": "function GranularSanityChecks() { }", "title": "" }, { "docid": "fb0a786f5887e36a6f3cdcd8f63d8da5", "score": "0.54535025", "text": "get status () {\r\n\t\treturn this.__status;\r\n\t}", "title": "" }, { "docid": "ac7b3208c68d5bf17c4f28d4bfb1c54a", "score": "0.545202", "text": "async function check() {\n self._check();\n }", "title": "" }, { "docid": "12db35b3b3444d67efe79d93d5ac6edc", "score": "0.5451975", "text": "checkWorkState(currentJobManager, account) {\n var currentLabeller;\n return currentJobManager.labellers.call(account)\n .then((labeller) => {\n currentLabeller = labeller;\n return currentJobManager.jobStatus.call(currentLabeller[2].toNumber(), account)\n }).then((latestJobStatus) => {\n if(currentLabeller[0]){\n if(latestJobStatus.toNumber() == 1){\n return currentLabeller[2].toNumber();\n }else{\n return -1;\n }\n }else{\n return -1;\n }\n })\n }", "title": "" }, { "docid": "194d7386d962d001f80e4eecbfd0be67", "score": "0.5447983", "text": "status_flow_all_waiting() {\r\n for (let i=0; i<this.flow_node_names.length; i++) {\r\n if (this.flow_status[i] != this.PPC_WAITING) return false;\r\n }\r\n return true;\r\n }", "title": "" }, { "docid": "6f0665a164e5748ff58043b96efeee8c", "score": "0.5446371", "text": "function StatusCheck()\n{\n\t//if the main switch is disabled\n\tif(vSwitchMain.GetComponentInChildren(Flipswitch).vState == false)\n\t{\n\t\t//check if the mech is enabled\n\t\tif(vMainStatus == true)\n\t\t{\n\t\t\t//if it is, disable it and its walker\n\t\t\tvMainStatus = false;\n\t\t\tsRigid.enabled = vMainStatus;\n\t\t\tvAnim.Stop();\n\t\t\t//play animation shutdown\n\t\t}\n\t\t\n\t}\n\telse //if mainswitch is enabled\n\t{\n\t\t//check if the mech is disabled\n\t\tif(vMainStatus == false)\n\t\t{\n\t\t\t//if it is, enable the mech\n\t\t\tvMainStatus = true;\n\t\t\t//play boot anmation\n\t\t}\n\t}\n\t\n\t//check to see if the legs are activated\n\tif(vMainStatus == true)\n\t{\n\t\tif(vSwitchLegs.GetComponentInChildren(Flipswitch).vState == true)\n\t\t{\n\t\t\tif(vAnimState == 0)\n\t\t\t{\n\t\t\t\tvAnim.CrossFade(\"MechBoot\");\n\t\t\t\tvAnim.CrossFadeQueued(\"MechIdle\");\n\t\t\t\t//set animstate to 1: booted and standing up\n\t\t\t\tyield WaitForSeconds(2);\n\t\t\t\tvAnimState = 1;\n\t\t\t\tprint(\"Booting\");\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(vAnimState != 0)\n\t\t\t{\n\t\t\t\tvAnim.CrossFade(\"MechShutdown\");\n\t\t\t\t//set animate to 0: off mode\n\t\t\t\tvAnimState = 0;\n\t\t\t\tprint(\"shutting down\");\n\t\t\t}\n\t\t}\n\t}\n\t\n\t\n\t//do the same check for the walker switch\n\tif(vMainStatus == true)\n\t{\n\t\tif(vSwitchLegs.GetComponentInChildren(Flipswitch).vState == true)\n\t\t{\n\t\t\tif(vSwitchWalker.GetComponentInChildren(Flipswitch).vState == true)\n\t\t\t{\n\t\t\t\tif(sRigid.enabled == false)\n\t\t\t\t{\n\t\t\t\t\tsRigid.enabled = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(sRigid.enabled == true)\n\t\t\t\t{\n\t\t\t\t\tsRigid.enabled = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}", "title": "" }, { "docid": "126a56dc230d6b3c87de309c17099497", "score": "0.54433787", "text": "static Status() {\r\n // returns the status of what can be done on the specified operating system\r\n switch (process.platform) {\r\n case 'win32':\r\n break;\r\n case 'darwin':\r\n break;\r\n default: // linux\r\n break;\r\n }\r\n }", "title": "" } ]
79ea5305839cb4fc712975edfd46e37c
var user_id = "ih8i1u8x9prbt79xr7pjj3stqx4tmrp9";
[ { "docid": "edf269a95eea1fcd17317d71e4932226", "score": "0.0", "text": "function chatbotResponse() {\n\n\n AWS.config.region = 'us-east-1';\n var newcog = new AWS.CognitoIdentity()\n\n newcog.getId(params, function(err, data){\n\n if (err) {\n console.log(err)\n }\n else {\n var iden_id = data['IdentityId']\n }\n\n console.log(iden_id)\n\n var new_params = {\n IdentityId: iden_id,\n Logins: {\n '<LOGINS>': id_token\n }\n };\n\n newcog.getCredentialsForIdentity(new_params, function(err, data){\n if (err) {\n console.log(err)\n }\n else {\n var thiscredential = data['Credentials'];\n console.log(thiscredential);\n console.log(thiscredential.AccessKeyId);\n console.log(thiscredential.SecretKey);\n console.log(thiscredential.SessionToken);\n var apigClient = apigClientFactory.newClient({\n \n accessKey: thiscredential.AccessKeyId,\n secretKey: thiscredential.SecretKey,\n sessionToken: thiscredential.SessionToken,\n region: 'us-east-1'\n });\n\n var params = {\"Access-Control-Allow-Origin\": '*'};\n\n var body = {\n \"lastUserMessage\": lastUserMessage,\n \"refId\" :user_id\n };\n\n apigClient.chatbotPost(params, body, {})\n .then(function(result){\n\n botMessage = result.data;\n console.log(botMessage);\n\n messages.push(botMessage);\n\n for (var i = 1; i<9; i++) {\n if (messages[messages.length - i])\n document.getElementById(\"chatlog\" + i).innerHTML = messages[messages.length - i];\n }\n }).catch( function(result){\n console.log(\"Inside Catch function\");\n });\n\n return botMessage;\n\n\n\n\n\n }\n });\n\n });\n\n}", "title": "" } ]
[ { "docid": "900009a182a323f435091666d92413d5", "score": "0.6647275", "text": "function userId({id}) {\n return id;\n}", "title": "" }, { "docid": "18f310df028cc38ba5786d851ff20b04", "score": "0.65513563", "text": "getUserIdFromToken() {\n const token = this.getAuthToken();\n const codedUser = token.split('.')[1];\n const payload = window.atob(codedUser)\n const parsedPayload = JSON.parse(payload) \n return parsedPayload.user_id;\n }", "title": "" }, { "docid": "121ec1ae48063cdcaec8f9ab52bff101", "score": "0.6545485", "text": "function extractId() {\n var str = loggedInUser;\n var matches = str.match(/\\d+/g);\n return matches[0];\n }", "title": "" }, { "docid": "f5d29c963b5a98aac4a296a34e1bca5c", "score": "0.65320724", "text": "function getUserId(){\n var result = '';\n var cookieStr = document.cookie;\n console.log(cookieStr);\n if(cookieStr != ''){\n var cookies = cookieStr.split(\";\");\n for(var i=0; i<cookies.length; i++){\n var cookie = cookies[i].replace(/¥s+/g, \"\").split('=');\n if(cookie[0]=='user_id'){\n result = cookie[1];\n }\n }\n }\n return result;\n}", "title": "" }, { "docid": "be7c52a776a87c58f169e8b79917f166", "score": "0.6523636", "text": "function userId({id}) {\n return id;\n}", "title": "" }, { "docid": "4667da955f9c6839e40e75c03c2b0759", "score": "0.64765346", "text": "function get_stored_user_id() {\n return localStorage.getItem('user_id');\n}", "title": "" }, { "docid": "22aa9aacef0b3638aa39b6ed315c316c", "score": "0.64700097", "text": "function ig_users_userid(user_id, callback, params) {\n\t\t$.getJSON(url=ig_users_userid_url(user_id),\n\t\t\t\t function (data) {\n\t\t\t\t \tcallback(data, params);\n\t\t\t\t });\n\t}", "title": "" }, { "docid": "67ad71867fdfdc801876fdb0c2d5edae", "score": "0.6419418", "text": "function getUserID() {\n const currentUrl = location.href;\n if (currentUrl.indexOf('?') !== -1) {\n const arr = currentUrl.split('?')[1].split('&');\n for (let i = 0; i <= arr.length - 1; i += 1) {\n if (arr[i].split('=')[0] === 'userID') {\n const userID = arr[i].split('=')[1];\n return userID;\n }\n }\n }\n}", "title": "" }, { "docid": "41c7d56a8d70153edbcc5d07affadd3a", "score": "0.6314675", "text": "function loggedUserId(user_id_str) {\n\tif(user_id_str !== undefined) {\n\t\t// Logging in\n\t\tlocalStorage.setItem('user_id', user_id_str);\n\t}\n\telse {\n\t\t// ID retrieval\n\t\treturn localStorage.getItem('user_id');\n\t}\n}", "title": "" }, { "docid": "f8d3d268a413f1465cb0c45ee073be75", "score": "0.62715423", "text": "function ajaxCookieUID(user_id) {\n $.ajax({\n url: 'content/cookie.php',\n type: 'GET',\n dataType: 'text',\n data: {\n 'act': 'set-user-id',\n 'user-id': user_id\n },\n })\n .done(function(data) {\n console.log(data);\n });\n }", "title": "" }, { "docid": "2ff2b03be310d398133873028ecea2b5", "score": "0.6253066", "text": "function getUserID() {\r\n\r\n var getuserIdRequest = new XMLHttpRequest();\r\n getuserIdRequest.open(\"POST\", \"http://flip3.engr.oregonstate.edu:\" + portID + \"/getUserID\", false);\r\n getuserIdRequest.setRequestHeader('Content-Type', 'application/json');\r\n getuserIdRequest.send(JSON.stringify({}));\r\n\r\n if (getuserIdRequest.status >= 200 && getuserIdRequest.status < 400) {\r\n return JSON.parse(getuserIdRequest.responseText).userID;\r\n } else {\r\n console.log(\"Error in network request: \" + getuserIdRequest.statusText);\r\n return -2;\r\n }\r\n}", "title": "" }, { "docid": "92d74ea63b70e8ba8451695413e0f1c8", "score": "0.6248491", "text": "function getUsernameID(){\n if (debug == 1) GM_log('Capturar Username e ID do usuário');\n //Primeiro captura o Username do usuário\n $.get(\"https://myaccount.mercadolivre.com.br/profile\", function(data, status){\n username = $('span', $('.field-value__group__value', $(data))).html().replace(' ', '+');\n GM_setValue('mf_username', username);\n if (debug == 1) GM_log(\"Username capturado: \" + username);\n //Agora captura a ID com o Username\n $.getJSON(\"https://api.mercadolibre.com/sites/MLB/search?nickname=\" + username, function(data){\n user_id = data.seller.id;\n GM_setValue('mf_userid', user_id);\n if (debug == 1) GM_log(\"user_id capturada: \" + user_id);\n });\n });\n }", "title": "" }, { "docid": "dc039d8e595c5485557a1108f3db3932", "score": "0.62232447", "text": "function pullUserID(req){\n \n try{\n \n var ObjectId = require('mongoose').Types.ObjectId;\n \n //because I didnt check to make sure cookies actually existed, this can throw an error.\n var comp = req.headers.cookie.split(\" \");\n \n //love random variables\n var x;\n var value;\n // look through all the cookies to see if any are the one I want, I could write a generic form of this, BUT we only use it twice, and we need to make sure UID's are valid, so...\n for(x of comp)\n {\n if(x != undefined)\n {\n var s = x.split(\"=\");\n if(s[0] == 'userId') value = s[1];\n }\n }\n // Make sure value doesnt have a semicolon\n if(value.charAt(value.length - 1) == ';')\n {\n value = value.substring(0, value.length - 1);\n }\n //check to make sure the ID is a valid Object Id\n if(!value || !ObjectId.isValid(value))\n {\n console.log('Request did not have User ID');\n console.log(value);\n throw 'Need User ID. ';\n }\n return value;\n }\n catch(e){\n throw e;\n }\n}", "title": "" }, { "docid": "10b725a117ce6728ee4ddcaded8752fc", "score": "0.620922", "text": "function apid(id){\n userData['apid'] = id;\n}", "title": "" }, { "docid": "cf65c6dfa80b611eef1b5f3042a66b48", "score": "0.61975044", "text": "function getUserId() {\n $.ajax({\n url: \"https://api.spotify.com/v1/me\",\n headers: {\n Authorization: \"Bearer \" + accessToken\n },\n success: function(response) {\n userId = response.id;\n } //ends success function\n }); //ends ajax call\n } //ends getuserid function", "title": "" }, { "docid": "83b0750836c5635a8e0c1c50fa2a9ed7", "score": "0.6174912", "text": "function new_id(){\n var rNum = rand(1,9999999);\n var id = ('0000' + rNum).slice(-5);\n return 'USERID-' + id;\n}", "title": "" }, { "docid": "e338da21131d403edce2db56435972b4", "score": "0.61723846", "text": "async function getUserId()\n{\n\ttry\n\t{\n\t\tlet data = await new Request(findByUsernameUrl(getApiKey(), getUsername())).loadJSON()\n\t\tlet id = data.user.id\n\t\tlet idStr = encodeURIComponent(id)\n\t\tconsole.log(`Resolved user-ID: ${idStr}`)\n\t\treturn idStr\n\t}\n\tcatch(e)\n\t{\n\t\tconsole.error(`getUserId: ${e}`)\n\t\treturn null\n\t}\n}", "title": "" }, { "docid": "f4fc15d2e44903fba7b49def0ed8c6e1", "score": "0.6136108", "text": "function getUserId() {\n $.ajax({\n url: 'https://api.spotify.com/v1/me',\n headers: {\n 'Authorization': 'Bearer ' + accessToken,\n },\n success: function(response) {\n\n userId = response.id;\n console.log(userId);\n\n } //ends success function\n\n }) //ends ajax call\n } //ends getuserid function", "title": "" }, { "docid": "8c33634b3410f3c1bda820f4ce6213f7", "score": "0.61332697", "text": "function h_user(query, vars, data, response) {\n\tvar username = vars[0];\n}", "title": "" }, { "docid": "5a7bf6fcb4daf30440293df93614bcb7", "score": "0.61319953", "text": "function setServerUserId(userid) {\n\t$.support.cors = true;\n\tvar json;\n\tjson = {\n\t\t\"username\" : userid\n\t};\n\t$.ajax({\n\t\ttype : \"POST\",\n\t\turl : SERVER_URL + \"/users\",\n\t\tdata : JSON.stringify(json),\n\t\tdataType : \"json\",\n\t\tcrossDomain : true,\n\t\tcontentType : \"application/json; charset=utf-8\"\n\t}).success(function(data, textStatus, jqXHR) {\n\t\tvar user_id = data.user_id;\n\t\twindow.localStorage.setItem(\"user_id\", user_id);\n\t\twindow.localStorage.setItem(\"user_name\", userid);\n\t\t$('#idform').hide();\n\t\t$('#userid').text($('#setid').val());\n\t});\n}", "title": "" }, { "docid": "2535c1dc73762c05479a587df6baa11d", "score": "0.61284137", "text": "function generate_user_id() {\n let user_id = '';\n do {\n for (let i = 0; i < USERNAME_LENGTH; i++) {\n user_id += HEX.charAt(Math.floor(Math.random() * HEX.length));\n }\n } while (status.ids.includes(user_id));\n return user_id;\n}", "title": "" }, { "docid": "1dc4ca445a033440af8c7c650e150b3a", "score": "0.6091632", "text": "loggedInUserId() { return parseInt(sessionStorage.getItem(\"userId\")) }", "title": "" }, { "docid": "9d4012c3460414c05383c40dbfa6c50c", "score": "0.60829866", "text": "function getUserId() {\n userIdNum = localStorage[\"UserID\"];\n request = {\n coachId: userIdNum\n };\n return request;\n}", "title": "" }, { "docid": "0e72b7ff0a9b4b55934f4df4b3e5e67f", "score": "0.60404813", "text": "function getUserId(){\n return parseInt(document.getElementById('followStatusBtn').dataset.userid);\n}", "title": "" }, { "docid": "a5c2207fc0d2d1d35baea0499928eebb", "score": "0.6040055", "text": "stringID(state, { userID }) {\n return userID ? `(${userID})` : \"\";\n }", "title": "" }, { "docid": "112ba8e46ab08da946e14cda15e452e4", "score": "0.60341877", "text": "function getUserId() {\n const url = `https://id.twitch.tv/oauth2/validate`;\n const oauthPassword = password.split(\":\")[1]; //gets oauth pw from global password\n\n fetch(url, {\n headers: {\n Authorization: `OAuth ${oauthPassword}`,\n },\n })\n .then((response) => response.json())\n .then((json) => {\n userId = json[\"user_id\"];\n GetBttvEmotes(userId);\n getTwitchEmotes(userId);\n });\n}", "title": "" }, { "docid": "e3dfcefe087f522f6493f5c6f9c5901f", "score": "0.6033043", "text": "function getUserId () {\n var url = window.location,\n splitUrl = url.toString().split(\"/\");\n return splitUrl[4];\n }", "title": "" }, { "docid": "f5ff5f7bf9ae044911eea0bcae55dabc", "score": "0.6028474", "text": "function getUsernameById(id) {\n // find the user\n return 'aomine';\n}", "title": "" }, { "docid": "b52522dbd2413e0d9483cd6bfd949a4d", "score": "0.6024758", "text": "function getUserID() {\r\n return db[metadataStoreName]\r\n .where(IDIndexNameINMetadata)\r\n .equals(0)\r\n .toArray(function (data) {\r\n if (typeof data !== 'undefined' && data.length > 0) {\r\n return data[0]['value'];\r\n } else {\r\n return \"-5\";\r\n }\r\n });\r\n}", "title": "" }, { "docid": "82ee8332ecdc228df815cdc72f38e6fd", "score": "0.5998434", "text": "function initUser(idUser) {\n var G = primeNumber();\n var P = primeNumber();\n var b = randomNumber(2,5);\n var y = Math.pow(G, b) % P;\n \n User.user.push({\n \"id\": idUser,\n \"b\": b,\n \"P\": P,\n \"G\": G,\n \"y\": y,\n \"x\": 0,\n \"keyServer\": 0,\n \"encryption\": \"none\",\n });\n}", "title": "" }, { "docid": "c1fa3aa09dc50b43d9f2b11326c38ac7", "score": "0.59550166", "text": "function getUserId(employee_tmp_id)\r\n\r\n{ \r\n\r\n\t//alert(catagory);\r\n\r\n\t if(employee_tmp_id!=\"\")\r\n\r\n\t { var url = \"?app=employee&cmd=ajaxcheckemail&uid=\"+employee_tmp_id;\r\n\r\n\t \t//alert(url);\r\n\r\n\t \t httpCheckUid.open(\"GET\", url, true);\r\n\r\n\t\t httpCheckUid.onreadystatechange = handleUserIdResponse;\r\n\r\n\t\t httpCheckUid.send(null);\r\n\r\n\t }\r\n\r\n}", "title": "" }, { "docid": "7979b6657c2cf3145b53690b25cd9a0a", "score": "0.59490126", "text": "function findUserById() {\n\n}", "title": "" }, { "docid": "4b1e97bc302be75713c1163ad4255f43", "score": "0.5943928", "text": "function userids(container){\r\n\t$(container).find('.message-top').each(function(i,top){\r\n\t\ttop=$(top);\r\n\t\t//get userid attribute from the profile link\r\n\t\ttop.attr('userID',top.children('a[href*=\"user=\"]').attr('href').split('user=')[1]);\r\n\t});\r\n}", "title": "" }, { "docid": "4a47778d892654014c4e05b10ba2d97f", "score": "0.5939607", "text": "getgoogle_user_id(){\n return this.google_user_id;\n }", "title": "" }, { "docid": "aeec5235014ce062ca2ca161b466d7ac", "score": "0.59318876", "text": "function GetIDFromMention(userMention)\n{\n\tvar id;\n\tuserMention = userMention.replace('!', ''); //check if they are using a nickame\n id = userMention.substring(2, userMention.length - 1);\n\treturn id;\n}", "title": "" }, { "docid": "965dfe2749fa2f81a8217547e53cab7f", "score": "0.5929121", "text": "getuserid(){\n return this.user_id ;\n}", "title": "" }, { "docid": "5a51c64279980ed1826919394e9aa4cb", "score": "0.59160656", "text": "function getUserNameById(id) {\n // Logica de negoico, find the user\n return 'carlitosmzz';\n}", "title": "" }, { "docid": "f9564b8e6313556ab5a5327c62cee007", "score": "0.591443", "text": "function getUserID(username) {\n let return_data = null;\n XHR.setCallback(function (data) {\n return_data = data;\n },\n function (error) {\n console.log('There was a failure: ' + error);\n });\n XHR.GET_SPECIFIC('/parse/classes/Visitors', JSON.stringify({\n \"username\": username\n }));\n if (JSON.parse(return_data).results[0] === undefined) {\n return null;\n }\n return JSON.parse(return_data).results[0].objectId;\n}", "title": "" }, { "docid": "196cb35ded066eb040cadb9e52d964cc", "score": "0.5913984", "text": "get userId() {\n return this.getStringAttribute('user_id');\n }", "title": "" }, { "docid": "d0b0074d4191fe8c46e6055a3fbb73b7", "score": "0.5898212", "text": "function onGetUserId(data) {\n\t\tuser_id = data.user.nsid;\n\t\tgetCollectionTree();\n\t\t//getPhotosets();\n\t}", "title": "" }, { "docid": "a3003e6ddf62575571015e9269edb921", "score": "0.5897625", "text": "get userId() {\n return this._data.user_id;\n }", "title": "" }, { "docid": "a3003e6ddf62575571015e9269edb921", "score": "0.5897625", "text": "get userId() {\n return this._data.user_id;\n }", "title": "" }, { "docid": "d5eebdd9900ba27c5724a45d4d8ba249", "score": "0.58934337", "text": "function generateRandomID() {\n $(\"#generateID\").fadeOut(500);\n var address = (hasher.getURL()).replace((hasher.getBaseURL()), '');\n address = address.replace('#/', '');\n createUser(address);\n}", "title": "" }, { "docid": "85ac77ea60887ed896c562645ad66843", "score": "0.58745664", "text": "function uid() {\n return Math.random().toString(36).substr(2, 9);\n}", "title": "" }, { "docid": "c5404c289513aba436a58dc9ae145c25", "score": "0.5863149", "text": "function uid() { return Math.random().toString().substr(2) + Math.random().toString().substr(2); }", "title": "" }, { "docid": "547f135e06c8524da93490a67d40a125", "score": "0.5860354", "text": "getCurrentUserId() {\n return JSON.parse(localStorage.getItem(\"user_id\"));\n }", "title": "" }, { "docid": "f0d1fc63f464771ff1d16e23d277c8e9", "score": "0.58537596", "text": "function getUserId() {\n var pgletMainCol = document.getElementById('pagelet_timeline_main_column');\n\n if (pgletMainCol === null) {\n return \"\";\n }\n var dataGt = pgletMainCol.getAttribute(\"data-gt\");\n\n var re = new RegExp(\"\\\"profile_owner\\\":\\\"([0-9]+?)\\\"\");\n var match = re.exec(dataGt);\n\n\n return match[1];\n}", "title": "" }, { "docid": "f2f13e55ee6c54fadce729dc6cb45831", "score": "0.58533317", "text": "function generateRandomUserId() {\n return Math.random().toString(36).replace(/[^a-z]+/g, '').substr(2, 10);\n}", "title": "" }, { "docid": "f8144c078979922841bc0bdd4486e670", "score": "0.58458173", "text": "assignUniqueId(user){\r\n if(!this.timestamp){\r\n this.timestamp = Date.now();\r\n }\r\n this.chromeId = btoa(user + this.timestamp);\r\n logging__message(\"Assigned Chrome Id\", this.chromeId); \r\n }", "title": "" }, { "docid": "abc9bd207cb9e12292becbe77772397a", "score": "0.58178943", "text": "function getUserIdFromLink(link)\n {\n if (!link)\n return NaN;\n var id = link.match(/u=[0-9]+/g); //match u=XXXX\n if (id === null)\n return NaN;\n else\n return parseInt(id[0].substr(2)); //remove u= and return\n }", "title": "" }, { "docid": "2eba852ace1c2cea8dc8d6117b44e68b", "score": "0.5812682", "text": "function api_getsid(ctx,user,passwordkey,hash)\n{\n\tctx.callback = api_getsid2;\n\tctx.passwordkey = passwordkey;\n\t\n\tapi_req([{ a : 'us', user : user, uh : hash }],ctx);\n}", "title": "" }, { "docid": "65918b15ef912c7439f3de42da48035b", "score": "0.5808999", "text": "async _get_UserID (){\n var self = this;\n try{\n let resp = await self._Request({method:'GET', endpoint: 'api/authCheck'});\n self.user_id = resp.userId;\n } catch (err) {\n throw(`get_UserID Error: ${err}`);\n };\n \n }", "title": "" }, { "docid": "a8be790c6192db06d1d182134fb71d73", "score": "0.5807858", "text": "getCurrentUserId() {\r\n return JSON.parse(localStorage.getItem(\"user\")).id;\r\n }", "title": "" }, { "docid": "a8be790c6192db06d1d182134fb71d73", "score": "0.5807858", "text": "getCurrentUserId() {\r\n return JSON.parse(localStorage.getItem(\"user\")).id;\r\n }", "title": "" }, { "docid": "5b06dc0f18de572d6ccc723874d47660", "score": "0.58024186", "text": "static getUserId() {\n const userId = User.isUserLoggedIn() ? Cookies.load('DYN_USER_ID') : '';\n return userId;\n }", "title": "" }, { "docid": "bbfa8169f8f188dcfca6467cd31e343e", "score": "0.57847786", "text": "function ig_users_userid_url(user_id) {\n\t\treturn ig_api_url('/users/' + user_id);\n\t}", "title": "" }, { "docid": "40b9206a90c4127b383710ca4a57f9c9", "score": "0.57794714", "text": "getUserId () {\n if (!this.tokenExists) {\n return null\n } else {\n return this.data.sub\n }\n }", "title": "" }, { "docid": "5e61c43752538aa89a3f1edb8a45b97b", "score": "0.5773071", "text": "function $uid() {\n unique_id += 2;\n return unique_id;\n }", "title": "" }, { "docid": "f4b3d8900036355417269b6c1b2cb71e", "score": "0.57687396", "text": "function getUid(){\n return sessionStorage.getItem(\"uid\");\n}", "title": "" }, { "docid": "8a375be7c66903d9effe34e8b4eaf3a1", "score": "0.57680464", "text": "getId(user_id, data){\n\t\tfor(let item of data){\n\t\t\tif(item.user_id === user_id){\n\t\t\t\treturn item.id;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "b1d36a50b65b4160b2b49f408fadccde", "score": "0.57612604", "text": "function userAuthentication(testId) {}", "title": "" }, { "docid": "96d9b2ca16db406ab5d9f122e1899501", "score": "0.57586896", "text": "function GetUserIDCB(err, result,res, req){\n if (err){\n console.error(err);\n res.send(\"Error \" + err); \n }else{\n var sql = 'SELECT id FROM users where email = $1;';\n Database.query(sql, [req.body.email], InsertUserSportPrefCB, res, req );\n } \n}", "title": "" }, { "docid": "eb696939a2adb2aea3e0ed23b1ee02fd", "score": "0.57523364", "text": "function get_spotify_userid() {\r\n const ajax6 = new XMLHttpRequest();\r\n\r\n let url3 = `https://api.spotify.com/v1/me`;\r\n ajax6.open(\"GET\", url3, true);\r\n ajax6.setRequestHeader(\"Authorization\", `Bearer ${access_token}`);\r\n\r\n ajax6.onload = function () {\r\n if (this.status === 200 || this.status === 201) {\r\n //console.log(this.responseText);\r\n\r\n const data = JSON.parse(this.responseText);\r\n user_id = data.id;\r\n } else {\r\n console.log(this.statusText);\r\n }\r\n };\r\n ajax6.send();\r\n}", "title": "" }, { "docid": "c0927bb138b32848b82a5688dad6a8f7", "score": "0.5748421", "text": "function getUserId(userData) {\n const sql = `SELECT userAuthID FROM userauth WHERE email LIKE '${userData.email}';`;\n return db.execute(sql);\n}", "title": "" }, { "docid": "3e69d3a365aa31776c4c861e635b1cf3", "score": "0.5742919", "text": "function extractUserId(token) {\n let userId = ''\n\n jwt.verify(token, secrets.jwtSecret, (err, decodedToken) => {\n userId = JSON.stringify(decodedToken.user_id)\n })\n \n return userId\n}", "title": "" }, { "docid": "13e9feeb01f63bc3726c8a9b01a3e2ea", "score": "0.574076", "text": "function getUserId() {\n const location = window.location;\n var array = location.search.split('=');\n $.getJSON(TRIP_LIST_URL, function (items) {\n if(items.length!==0){\n renderSelectedMap(items[0].location);\n } else{\n $('.popup-overlay-new-trip, .popup-content-new-trip').addClass(\"active\");\n $(\".box-parent\").addClass(\"inactive\");\n }\n\n })\n userId = array[1];\n return array[1];\n}", "title": "" }, { "docid": "aa089cc23c3c59e6c9d5a83d49db3e4a", "score": "0.573723", "text": "function normalizeUserID(input, tokenobj, callback) {\n // console.log('dispatcher::normalizeUserID', input)\n if (input === 'me') {\n if (tokenobj && tokenobj.userid) {\n // console.log('dispatcher.js::normalizeUserID - me became', tokenobj.userid)\n callback(null, tokenobj.userid)\n } else {\n callback(errors.noToken)\n }\n return\n }\n\n var ref = module.exports\n if (input[0] === '@') {\n // console.log('dispatcher::normalizeUserID @', input.substr(1))\n ref.cache.getUserID(input.substr(1), function(err, userobj) {\n if (err) {\n console.log('dispatcher.js::normalizeUserID err', err)\n }\n if (userobj) {\n callback(null, userobj.id)\n } else {\n callback(errors.noUser)\n }\n })\n return\n }\n\n // numeric\n callback(null, input)\n}", "title": "" }, { "docid": "3ea7aa296fd91335a0efc7ba73ec2f7d", "score": "0.5735602", "text": "function saveUserID()\r\n{\r\n if (CURRENT_USER.myID !== null)\r\n {\r\n \r\n sessionStorage.setItem('userID', CURRENT_USER.myID); \r\n }\r\n else\r\n {\r\n\r\n }\r\n}", "title": "" }, { "docid": "044171ec836d4a76a91a15f53eb8ff99", "score": "0.5729985", "text": "getUserId() {\n const profile = this.getUserProfile();\n if (profile) {\n return profile.split(\"/\")[1];\n }\n return null;\n }", "title": "" }, { "docid": "53d9157db3ed739a9ac126cedd650479", "score": "0.57209146", "text": "function userIdGenerator() {\n var id = '';\n var possible = \"abcdefjhijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\";\n for (i = 0; i < 7; i++) {\n id += possible.charAt(Math.floor(Math.random() * possible.length));\n }\n console.log(id);\n}", "title": "" }, { "docid": "124ba0f6414f69fbacef2bac146abc46", "score": "0.5708781", "text": "function userDetails() {\n var cookie = document.cookie.split('=')[1].split('-');\n return cookie;\n}", "title": "" }, { "docid": "63cca05a9457117a69934f40161fe3ea", "score": "0.5708648", "text": "fetchUser(RP){\r\n // console.log(RP);\r\n return JSON.parse(document.getElementById(RP).value)[0].value.split(\":\")[0];\r\n }", "title": "" }, { "docid": "fec0aa5b1602a30947234914eaa93f0e", "score": "0.57021874", "text": "function getUser(id, cb){\n // cb('error while reading user data');\n\n var user = {'name': 'eric'};\n cb(null, user)\n}", "title": "" }, { "docid": "268b30d404dd536edd16a5130c2e5101", "score": "0.566985", "text": "function getUserId() {\n var uid;\n $.ajax({\n type: \"POST\",\n url: \"../php/getUserID.php\",\n error: function(data) {\n console.log(\"Failed\");\n console.log(data);\n },\n success: function(data) {\n console.log(\"Success\");\n console.log(data);\n uid = data;\n },\n async: false\n });\n return uid;\n}", "title": "" }, { "docid": "a852f379440d1821f425366d9695a1c6", "score": "0.5657243", "text": "function getUser(value) {\n var cookie = getCookie('session');\n var user = cookie.split(\"-\")[1];\n alert(\"Bienvenido \" + user);\n }", "title": "" }, { "docid": "54a2de3ac9b96ab47ed66d6d43eee011", "score": "0.564343", "text": "function id(){\n return '_' + Math.random().toString(36).substr(2,9);\n}", "title": "" }, { "docid": "ca52e6e42e637c317dd296e1121a4dde", "score": "0.5635017", "text": "setgoogle_user_id(agoogle_user_id){\n this.google_user_id = agoogle_user_id;\n }", "title": "" }, { "docid": "5e36289f8ccdf74c982519c2ab1af149", "score": "0.56345814", "text": "function getUserFromCookie(){\n var user;\n var arr = document.cookie.split(';');\n var reg = /^user=+/;\n arr.forEach(function(item){\n var newItem=$.trim(unescape(item));\n if(reg.test(newItem)){\n user = newItem.substr(5); \n }\n })\n return user;\n}", "title": "" }, { "docid": "58ec9e9e59db649656d91dfd9a89ede0", "score": "0.56279314", "text": "generateAuthToken(user,callback){\n var payload={\n id:user.id,\n exp:global.moment().add(30,'d').valueOf()\n };\n var token = jwt.encode(payload, global.envConfig.get('jwtAuthSecret'));\n callback(null,{'token':token});\n }", "title": "" }, { "docid": "e131124c543ad9710b3309e5822ccd68", "score": "0.56206876", "text": "function validateUserid(userid){\r\n\r\n\tvar lengthCheckPattern =/^.{8,16}$/;\r\n\t\r\n\tvar errors = new Array();\r\n\r\n\t\r\n\tif (isEmpty(userid) || userid.match(lengthCheckPattern) == null){\r\n\t\r\n\t\terrors.push(\"LENGTH_ERROR\");\r\n\t}\r\n\t\r\n\tvar spacePattern = /\\s+/;\r\n\t\r\n\tif (!isEmpty(userid) && userid.match(spacePattern)){\r\n\t\r\n\t\terrors.push(\"SPACE_PRESENT\");\r\n\t\r\n\t}\r\n\t\r\n\tvar validateCharPattern = /[^\\w\\s_'|ÉéÀÈÙàèùÂÊÎÔÛâêîôûÄËÏäëïÇç\\-.]+/;\r\n\t\r\n\t\r\n\tif (!isEmpty(userid) && userid.match(validateCharPattern)){\r\n\t\r\n\t\terrors.push(\"INVALID_CHARS\");\r\n\t}\r\n\t\r\n\tvar validateMaxDigits = /[\\d]/g;\r\n\tvar matchDigits = userid.match(validateMaxDigits);\r\n\tif (!isEmpty(userid) && matchDigits && matchDigits.length >7){\r\n\t\r\n\t\terrors.push(\"MAX_DIGITS\");\r\n\t}\r\n\t\r\n\treturn errors;\r\n\t\r\n}", "title": "" }, { "docid": "9b43c6281d69d1ab349bec3067d2f64b", "score": "0.56163543", "text": "function _getUserIDAndAPIKey() {\n\t\tvar userID, apiKey, cookies = document.cookie.split(/ *; */);\n\t\tfor(var i=0, n=cookies.length; i<n; i++) {\n\t\t\tvar cookie = cookies[i],\n\t\t\t\tequalsIndex = cookie.indexOf(\"=\"),\n\t\t\t\tkey = cookie.substr(0, equalsIndex);\n\t\t\tif(key === \"bookmarklet-auth-userID\") {\n\t\t\t\tuserID = cookie.substr(equalsIndex+1);\n\t\t\t} else if(key === \"bookmarklet-auth-token_secret\") {\n\t\t\t\tapiKey = cookie.substr(equalsIndex+1);\n\t\t\t} \n\t\t}\n\t\t\n\t\treturn [userID, apiKey];\n\t}", "title": "" }, { "docid": "38ad474005a1d61bed89552eff419968", "score": "0.56147045", "text": "function uid (len) {\n return crypto.randomBytes(Math.ceil(Math.max(8, len * 2)))\n .toString('base64')\n .replace(/[+\\/]/g, '')\n .slice(0, len);\n}", "title": "" }, { "docid": "1f677e14606a89014807f3fce4d1c033", "score": "0.560494", "text": "function getUserIDAndScreenName(user, callback) {\r\n // Check to see if we already have a an id\r\n if (!isNaN(parseFloat(user)) && isFinite(user)) {\r\n asyncGetUserScreenName(user, function(screenName) {\r\n callback({\r\n \"username\": screenName,\r\n \"user_id\": user\r\n });\r\n });\r\n } else {\r\n asyncGetUserID(user, function(userID) {\r\n callback({\r\n \"username\": user,\r\n \"user_id\": userID\r\n });\r\n });\r\n }\r\n }", "title": "" }, { "docid": "ffc7ad0178f7507c94643e67945d3791", "score": "0.5602639", "text": "var uid = function() {\n return Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);\n}", "title": "" }, { "docid": "cb6130be068c294352a279f7fdbee136", "score": "0.5602384", "text": "function getUserID(email)\n{\n $.post(\"getUserID.do\", {email: email}, function (result) {\n $(\"#hiddenUserId\").val(result);\n });\n\n}", "title": "" }, { "docid": "9221d32ba1a0ddc7faa3186c5e46f983", "score": "0.5601746", "text": "function uidCreate(){\r\n var num = Math.floor(Math.random() * 1000000000) + 1; // returns a random integer from 1 to 1000000000\r\n var code = \"u\"+String(num);\r\n return code;\r\n}", "title": "" }, { "docid": "31b132d4f583fba81decfc2c3a7c0fe2", "score": "0.5596205", "text": "getUserId() {\n const payload = this.getPayload();\n if (payload && payload.sub) {\n return payload.sub;\n }\n return null;\n }", "title": "" }, { "docid": "ca68caa9b71258280695e16782f427cc", "score": "0.5592167", "text": "function get_user_info()\n{\n var user_info = {\n \"name\": RMPApplication.get(\"my_user.name\"),\n \"fix_mobile_number\": RMPApplication.get(\"my_user.fix_mobile_number\"),\n \"user_email_unknown\": RMPApplication.get(\"my_user.user_email_unknown\"),\n \"contact_email\": RMPApplication.get(\"my_user.contact_email\")\n };\n // stocke ident dans le widget var_ident\n RMPApplication.set(\"var_user_info\", JSON.stringify(user_info));\n}", "title": "" }, { "docid": "cfd479a673c76da9e33b42a97d66305d", "score": "0.55897105", "text": "function unique_id() {\n return '_' + Math.random().toString(36).substr(2, 9);\n}", "title": "" }, { "docid": "d4661b14597c5887a9b660a35d7a1bd0", "score": "0.55888456", "text": "getUserId(userEmail) {\n var userEmail = userEmail\n let i\n for (i = 0; i < this.userData.length; i++) {\n if (this.userData[i].email == userEmail) {\n var result = this.userData[i].id\n }\n }\n return result\n }", "title": "" }, { "docid": "bc61ac77a0e43026ed835d0a85dac33f", "score": "0.55859405", "text": "function post_user(req, user_id){\n var key = datastore.key(USER);\n \n const new_user = {\"user_id\": user_id};\n\treturn datastore.save({\"key\":key, \"data\":new_user}).then(() => {\n const self = `${req.protocol + '://' + req.get('host')}/users/${key.id}`;\n new_user.self = self;\n return datastore.save({\"key\": key, \"data\": new_user}).then(() => {\n new_user.id = key.id;\n return new_user;\n })\n });\n}", "title": "" }, { "docid": "f19f55a32716527b48c527d82c26e7dd", "score": "0.5581496", "text": "function findUserById(i_userId) {\r\n return $http.get(\"/api/user/\" + i_userId);\r\n }", "title": "" }, { "docid": "833f0aaa5dcff052dc82a8cfcce931cd", "score": "0.5575807", "text": "function uu730210() { return '&id='; }", "title": "" }, { "docid": "3e9c64278e8d022aa519ceedc74bc03f", "score": "0.5571976", "text": "function user_id(id) {\n for(i in $students) {\n var student = $students[i];\n if(student['id'] == id) return student;\n }\n}", "title": "" }, { "docid": "ab02097cecc5ef3291f354f748e3db08", "score": "0.55652106", "text": "function generateUserRandomId(body) {\n let alpha = body.email.indexOf('@');\n let aUserIdPartial1 = body.email.slice(0, alpha);\n let aUserIdPartial2 = Math.floor(Math.random() * 1000);\n\n let aUserId = aUserIdPartial1 + aUserIdPartial2;\n\n return aUserId;\n}", "title": "" }, { "docid": "fe52833c52802edde1fa51a2a89cd651", "score": "0.55542743", "text": "getUserId() { return this.getRememberMeId(); }", "title": "" }, { "docid": "0117118c3937188959ee5e6adf985751", "score": "0.55490774", "text": "createUID() {\r\n var text = '';\r\n text += Math.random().toString(36).substr(2, 9);\r\n localStorage.setItem('uid', text);\r\n return text;\r\n }", "title": "" }, { "docid": "69710eddaee98c09dc2b2ecb33100a18", "score": "0.5546224", "text": "function findUserId(username,calfn){\n var query=\"select user_id from user where username=?\";\n var result;\n connection.query(query ,[username], function(err, docs) {\n\tif(docs.length>0){\n\t\tresult = docs[0].user_id;\n\t\treturn calfn(result);\n\t}\n\telse{\n\t\treturn calfn(null);\n\t}\n });\n}", "title": "" }, { "docid": "65ec604708eefaa0f1326afb19dbe60c", "score": "0.55433017", "text": "function getUserId(req) {\n const accessToken = req.header('Authorization').split(' ')[1];\n return auth.decodeAccessToken(accessToken).iss;\n}", "title": "" }, { "docid": "6772de4d7886076ba0922513f069e1f5", "score": "0.55372447", "text": "function readJSonUser() {\n jQuery.get('/MISH/PHP/cuentaUsuarios.php', function (data) {\n if (data) {\n next_user_id = parseInt(data) + 1;\n\n }\n });\n}", "title": "" }, { "docid": "31a15c9ca63c4ff5b43a4506a048d9a3", "score": "0.5536648", "text": "function getOtpKey(user) {\r\n const query = `UPDATE userTable SET otpKey = \"${user.otp}\" WHERE email = \"${user.email}\"`;\r\n return execQuery(query);\r\n}", "title": "" } ]
cf877a1610944582c6cc2f2c693ff88d
Gets the color of a username through our hash function
[ { "docid": "652ca7add5440ada85d589910648cc5a", "score": "0.7639607", "text": "function getUsernameColor(username) {\n if (COLORS.length === 0) {\n COLORS = [\n \"#e21400\",\n \"#91580f\",\n \"#dfe106\",\n \"#ff8300\",\n \"#58dc00\",\n \"#006400\",\n \"#a8f07a\",\n \"#4ae8c4\",\n \"#ff69b4\",\n \"#3824aa\",\n \"#a700ff\",\n \"#d300e7\"\n ];\n }\n if (colorAssignment.includes(username)) {\n return colorAssignment[colorAssignment.indexOf(username) + 1];\n } else {\n let color = COLORS[0];\n colorAssignment.push(username);\n colorAssignment.push(color);\n COLORS.splice(0, 1);\n return color;\n }\n }", "title": "" } ]
[ { "docid": "44d4cb13b00cb76d7424612124107f9b", "score": "0.89237905", "text": "function getUsernameColor (username) {\n // Compute hash code\n var hash = 7;\n for (var i = 0; i < username.length; i++) {\n hash = username.charCodeAt(i) + (hash << 5) - hash;\n }\n // Calculate color\n var index = Math.abs(hash % COLORS.length);\n return COLORS[index];\n }", "title": "" }, { "docid": "6eccb8ad28358cb4a9dd4106bb4c12e9", "score": "0.8910753", "text": "function getUsernameColor (username) {\n // Compute hash code\n var hash = 7;\n for (var i = 0; i < username.length; i++) {\n hash = username.charCodeAt(i) + (hash << 5) - hash;\n }\n // Calculate color\n var index = Math.abs(hash % COLORS.length);\n return COLORS[index];\n }", "title": "" }, { "docid": "6eccb8ad28358cb4a9dd4106bb4c12e9", "score": "0.8910753", "text": "function getUsernameColor (username) {\n // Compute hash code\n var hash = 7;\n for (var i = 0; i < username.length; i++) {\n hash = username.charCodeAt(i) + (hash << 5) - hash;\n }\n // Calculate color\n var index = Math.abs(hash % COLORS.length);\n return COLORS[index];\n }", "title": "" }, { "docid": "6eccb8ad28358cb4a9dd4106bb4c12e9", "score": "0.8910753", "text": "function getUsernameColor (username) {\n // Compute hash code\n var hash = 7;\n for (var i = 0; i < username.length; i++) {\n hash = username.charCodeAt(i) + (hash << 5) - hash;\n }\n // Calculate color\n var index = Math.abs(hash % COLORS.length);\n return COLORS[index];\n }", "title": "" }, { "docid": "6eccb8ad28358cb4a9dd4106bb4c12e9", "score": "0.8910753", "text": "function getUsernameColor (username) {\n // Compute hash code\n var hash = 7;\n for (var i = 0; i < username.length; i++) {\n hash = username.charCodeAt(i) + (hash << 5) - hash;\n }\n // Calculate color\n var index = Math.abs(hash % COLORS.length);\n return COLORS[index];\n }", "title": "" }, { "docid": "6eccb8ad28358cb4a9dd4106bb4c12e9", "score": "0.8910753", "text": "function getUsernameColor (username) {\n // Compute hash code\n var hash = 7;\n for (var i = 0; i < username.length; i++) {\n hash = username.charCodeAt(i) + (hash << 5) - hash;\n }\n // Calculate color\n var index = Math.abs(hash % COLORS.length);\n return COLORS[index];\n }", "title": "" }, { "docid": "6eccb8ad28358cb4a9dd4106bb4c12e9", "score": "0.8910753", "text": "function getUsernameColor (username) {\n // Compute hash code\n var hash = 7;\n for (var i = 0; i < username.length; i++) {\n hash = username.charCodeAt(i) + (hash << 5) - hash;\n }\n // Calculate color\n var index = Math.abs(hash % COLORS.length);\n return COLORS[index];\n }", "title": "" }, { "docid": "6eccb8ad28358cb4a9dd4106bb4c12e9", "score": "0.8910753", "text": "function getUsernameColor (username) {\n // Compute hash code\n var hash = 7;\n for (var i = 0; i < username.length; i++) {\n hash = username.charCodeAt(i) + (hash << 5) - hash;\n }\n // Calculate color\n var index = Math.abs(hash % COLORS.length);\n return COLORS[index];\n }", "title": "" }, { "docid": "6eccb8ad28358cb4a9dd4106bb4c12e9", "score": "0.8910753", "text": "function getUsernameColor (username) {\n // Compute hash code\n var hash = 7;\n for (var i = 0; i < username.length; i++) {\n hash = username.charCodeAt(i) + (hash << 5) - hash;\n }\n // Calculate color\n var index = Math.abs(hash % COLORS.length);\n return COLORS[index];\n }", "title": "" }, { "docid": "a9422acb8505b8a3d24a23f4d1d0cece", "score": "0.8890459", "text": "function getUsernameColor (username) {\n\t // Compute hash code\n\t var hash = 7;\n\t for (var i = 0; i < username.length; i++) {\n\t hash = username.charCodeAt(i) + (hash << 5) - hash;\n\t }\n\t // Calculate color\n\t var index = Math.abs(hash % COLORS.length);\n\t return COLORS[index];\n \t}", "title": "" }, { "docid": "c0dd2612f1fd4a8081a2d604cc298cd1", "score": "0.8881603", "text": "function getUsernameColor (username) {\n // Compute hash code\n var hash = 7;\n for (var i = 0; i < username.length; i++) {\n hash = username.charCodeAt(i) + (hash << 5) - hash;\n }\n // Calculate color\n var index = Math.abs(hash % COLORS.length);\n return COLORS[index];\n }", "title": "" }, { "docid": "dd5ef39f9c92a05fdabc97edb42cccb6", "score": "0.8809445", "text": "function getUsernameColor(username) {\n\t\t// Compute hash code\n\t\tvar hash = 7;\n\t\tfor (var i = 0; i < username.length; i++) {\n\t\t\thash = username.charCodeAt(i) + (hash << 5) - hash;\n\t\t}\n\t\t// Calculate color\n\t\tvar index = Math.abs(hash % COLORS.length);\n\t\treturn COLORS[index];\n\t}", "title": "" }, { "docid": "44991adae9304ec8583c49e45ddc994e", "score": "0.8786364", "text": "function getUsernameColor(username) {\n // Compute hash code\n let hash = 7;\n for (let i = 0; i < username.length; i++) {\n hash = username.charCodeAt(i) + (hash << 5) - hash;\n }\n // Calculate color\n let index = Math.abs(hash % COLORS.length);\n return COLORS[index];\n }", "title": "" }, { "docid": "077356c4ee032b8eb2a7de5ea64a1d0f", "score": "0.8697868", "text": "function getUsernameColor(username){\n doLog('getUsernameColor',username);\n // compute hash code\n var hash = 7;\n for (var i = 0; i < username.length; i++){\n hash = username.charCodeAt(i) + (hash <<5 ) - hash;\n }\n // calculate color\n var index = Math.abs(hash % COLORS.length);\n return COLORS[index];\n }", "title": "" }, { "docid": "8b45defc85e1af1bf631d90abb5449f8", "score": "0.86807364", "text": "function getUsernameColor(username) {\n let hash = 7\n \n for (let i = 0; i < username.length; i++) {\n hash = username.charCodeAt(i) + (hash << 5) - hash\n }\n\n const index = Math.abs(hash % COLORS.length)\n return COLORS[index]\n }", "title": "" }, { "docid": "17d55abc79f80b603c0147c1e53c89de", "score": "0.78728175", "text": "function setUserColor(username) {\n var hash = 0;\n for (var i = 0; i < username.length; i++) {\n hash = username.charCodeAt(i) + ((hash << 5) - hash);\n }\n var color = '#';\n for (var i = 0; i < 3; i++) {\n var value = (hash >> (i * 8)) & 0xFF;\n color += ('00' + value.toString(16)).substr(-2);\n }\n return '<span style=\"font-weight:bold; color:' + color + ';\">' + username + '</span>';\n}", "title": "" }, { "docid": "5aec8e50439c9d4953d69172a96bceaf", "score": "0.77073395", "text": "function getUsernameColor()\n{\n return usernameColors[Math.floor(Math.random()*usernameColors.length)];\n}", "title": "" }, { "docid": "2deda3b12f5b5b4793d3c350fd2bd690", "score": "0.6813438", "text": "function colorizeUser() {\n $(\"span.user\").each(function(i,d) {\n var userName = $(this).text();\n var colorName = playerColor[userName];\n $(this).css(\"background-color\",getColor(colorName,0.3)); \n }); \n }", "title": "" }, { "docid": "aa93784efa14862d42fe34b8b493a6bc", "score": "0.67736423", "text": "function hashColor(s) {\n var hash = hashCode();\n\n var r = (hash & 0xFF0000) >> 16;\n var g = (hash & 0x00FF00) >> 8;\n var b = (hash & 0x0000FF);\n\n return rgbToHex(r,g,b);\n\n /* Implementation of Java String hashCode() */\n function hashCode() {\n var hash = 0, i, chr, len;\n if (s.length === 0) return hash;\n for (i = 0, len = s.length; i < len; i++) {\n chr = s.charCodeAt(i);\n hash = ((hash << 5) - hash) + chr;\n hash |= 0;\n }\n return hash;\n }\n\n /* Takes in three integers corresponding to (r,g,b) values and retuns the hex color */\n function rgbToHex(r, g, b) {\n return '#' + componentToHex(r) + componentToHex(g) + componentToHex(b);\n\n function componentToHex(c) {\n var hex = c.toString(16);\n return hex.length == 1 ? '0' + hex : hex;\n }\n }\n }", "title": "" }, { "docid": "12fad2d27d3de17c8e69d1c9bf8fc628", "score": "0.67469335", "text": "function getHashedColor(string){\n\n\tvar colors = [\n\t\t\"#2196F3\", //blue\n\t\t\"#3F51B5\", //indigo\n\t\t\"#03A9F4\", //light blue\n\t\t\"#FFC107\", //amber\n\t\t\"#FFEB3B\", //yellow\n\t\t\"#CDDC39\", //lime\n\t\t\"#9C27B0\", //purple\n\t\t\"#673AB7\", //deep durple \n\t\t\"#E91E63\", \n\t\t\"#F44336\", //red\n\t\t\"#FF9800\", //orange\n\t\t\"#FF5722\", //deep orange\n\t\t\"#4CAF50\", //green\n\t\t\"#009688\", //teal\n\t\t\"#E91E63\" //pink\n\t]\n\n\t//get hash code of event name\n\tvar hash = Math.abs(string.hashCode() % colors.length);\n\n\treturn colors[hash];\n}", "title": "" }, { "docid": "00180c700958f01807f4225213114156", "score": "0.6635538", "text": "colorize(str) {\r\n let hash = 5381;\r\n let i = str.length;\r\n\r\n while (i) {\r\n hash = (hash * 33) ^ str.charCodeAt(--i);\r\n }\r\n\r\n switch ((hash >>> 0) % 6) {\r\n case 0:\r\n return 'orange';\r\n case 1:\r\n return 'green';\r\n case 2:\r\n return 'red';\r\n case 3:\r\n return 'teal';\r\n case 4:\r\n return 'blue';\r\n case 5:\r\n return 'yellow';\r\n default:\r\n return 'secondary';\r\n }\r\n }", "title": "" }, { "docid": "0e89a7f417a4b31611188418bdd9515f", "score": "0.65041643", "text": "function getAvatarColor(messageSender) {\n var hash = 0;\n for (var i = 0; i < messageSender.length; i++) {\n hash = 31 * hash + messageSender.charCodeAt(i);\n }\n var index = Math.abs(hash % colors.length);\n return colors[index];\n}", "title": "" }, { "docid": "82a5b3acf17b06dac86ca536f617e036", "score": "0.64170873", "text": "function hashRGB(str){\n let hash = 0\n for (let i = 0; i < str.length; i++) hash = str.charCodeAt(i) + ((hash << 6) - hash)\n const c = (hash & 0x00FFFFFF).toString(16).toUpperCase()\n return \"00000\".substring(0, 6 - c.length) + c\n }", "title": "" }, { "docid": "9a485c16f2f33454eb29855f407ab9b9", "score": "0.63516974", "text": "function getUsername() {}", "title": "" }, { "docid": "a292d87880b8c2e64bbcb050ca016a8e", "score": "0.63353217", "text": "function getColor(username, match) {\n if (match.Winner == username) {\n return \"honeydew\";\n } else if (match.Loser == username) {\n return \"seashell\";\n }\n // should not get here\n console.log(\"User does not play this natch.\");\n return \"white\";\n}", "title": "" }, { "docid": "c46290cb70632dddb2fec782e73245c2", "score": "0.6056972", "text": "function color() {\n //splits the string with all symbols used to define hex colors\n var letters = '0123456789ABCDEF'.split('');\n var color = '#';\n //adds 6 random symbols from the string defined above\n for (var i = 0; i < 6; i++ ) {\n color += letters[Math.round(Math.random() * 15)];}\n return color;\n}", "title": "" }, { "docid": "09f5e3c6b6be7b7f03002943a52977d3", "score": "0.60425144", "text": "function get_hash(url) {\n return hash_pattern.exec(url)[0].toLowerCase();\n}", "title": "" }, { "docid": "c7a06dcb4384414ea9ddb20b2cbb578e", "score": "0.6038734", "text": "function getUsername() {\r\n var par = document.createElement(\"SPAN\");\r\n var t = document.createTextNode(localStorage.user);\r\n par.appendChild(t);\r\n par.style.color = decodeURI(localStorage.userColor); //Decode because its encoded in URI;\r\n document.getElementById(\"user\").appendChild(par);\r\n}", "title": "" }, { "docid": "9ff03b76c0daa00005a66cb1e8e2cfaa", "score": "0.59990036", "text": "function stringToColor(userString) {\n const string = userString.trim().toLowerCase();\n const namedColor = namedColors[string];\n if (namedColor) {\n return hexToRgba(namedColor);\n }\n if (string.indexOf('#') === 0 && string.length > 6) {\n return hexToRgba(string.substring(1, 7));\n }\n return { red: 0, green: 0, blue: 0, alpha: 1 };\n}", "title": "" }, { "docid": "eb176e4f51898dff7e8303f29861d77b", "score": "0.59793806", "text": "function player_color(key){\n for(var i = 0; i < network.players.length; ++i)\n if(network.players[i].id == key) return network.players[i].color;\n \n return '#000000';\n}", "title": "" }, { "docid": "6504226ad0099b953db27b32e4b11236", "score": "0.59790015", "text": "function player_color(key) {\n for (var i = 0; i < network.players.length; ++i)\n if (network.players[i].id == key) return network.players[i].color;\n\n return '#000000';\n}", "title": "" }, { "docid": "7e5625b08f6ed0a73051d1206610fdbb", "score": "0.59599966", "text": "function getHash(password) {\n return password.toString();\n}", "title": "" }, { "docid": "023a9267821697321f83d2d3f5db19fb", "score": "0.5924077", "text": "function getUserHash(userID) {\r\n\t\t\tvar caller = getUserHash.caller;\r\n\t\t\tif (!securityCheck(userID, caller, \"getUserHash\")) { return false; }\r\n\t\t\tvar userItems = memObj.items[userID];\r\n\t\t\treturn CryptoJS.SHA256(userItems.userName+userItems.userPass);\r\n\t\t}", "title": "" }, { "docid": "8e0849abafcdcf18314d0b7a14b8f53e", "score": "0.5903279", "text": "getPlayerColor(nick) {\n\t\treturn this.players[0].nick == nick ? 1 : 2;\n\t}", "title": "" }, { "docid": "1a9b83c6b24d61ec021a7c7d3d3455f7", "score": "0.58981496", "text": "function findColor() {\n return Math.floor(Math.random() * 256);\n}", "title": "" }, { "docid": "82953f8717505483dd125b2d1ed3a3a0", "score": "0.5895009", "text": "function emojiHash(hashMe) {\n return Object.keys(emojiMap)[Math.abs(hashMe.hashCode()) % Object.keys(emojiMap).length];\n }", "title": "" }, { "docid": "03dd3dec4d0f4cc04ec4b40b2feeea1c", "score": "0.586842", "text": "function generateHash(username, password) {\n var hash=crypto.createHmac('sha512', username)\n hash.update(password)\n var value= hash.digest('hex')\n return value\n}", "title": "" }, { "docid": "774262dd4f0a528476a6af681db0ac2a", "score": "0.58625126", "text": "function getUsernameTitle(username) {\n let hash = 7\n \n for (let i = 0; i < username.length; i++) {\n hash = username.charCodeAt(i) + (hash << 5) - hash\n }\n\n const index = Math.abs(hash % TITLES.length)\n return TITLES[index]\n }", "title": "" }, { "docid": "4c9b82233f668f68cb358e0e7effdd4e", "score": "0.58456534", "text": "function getHash() {\n // Read in the values\n var nonce = parseInt(nonceBox.value, 10)\n var parent = parentBox.value\n var word = wordBox.value\n\n var concat = parent + word + nonce\n var hash = sha256(concat).slice(0, 8)\n\n return hash\n }", "title": "" }, { "docid": "edf9a9fb26028279bc6e2835519da4b6", "score": "0.58429384", "text": "_getColorFor(v) {\n let c = this.options.color; // e.g. for a constant 'red'\n if (typeof c === 'function') {\n c = this.options.color(v);\n }\n let color = chroma(c); // to be more flexible, a chroma color object is always created || TODO improve efficiency\n return color;\n }", "title": "" }, { "docid": "c7c1886c67c3ff188fbf98a0c6a8ff9b", "score": "0.5830574", "text": "function hashPassword(password) {\n const hash = crypto.createHash(\"sha256\").update(password).digest(\"hex\").toUpperCase()\n return hash\n}", "title": "" }, { "docid": "d0cab48cbe2cd93b4ae90a35cc28de9b", "score": "0.5823454", "text": "get color() {}", "title": "" }, { "docid": "6463852ee708487170d4ab300ba7f9bc", "score": "0.58085644", "text": "static stringToColour(str) {\n if (Utils.isEmptyStr(str)) {\n return '#000';\n }\n\n let hash = 0;\n for (let i = 0; i < str.length; i++) {\n hash = str.charCodeAt(i) + ((hash << 5) - hash);\n }\n let colour = '#';\n for (let i = 0; i < 3; i++) {\n let value = (hash >> (i * 8)) & 0xFF;\n colour += ('00' + value.toString(16)).substr(-2);\n }\n return colour;\n }", "title": "" }, { "docid": "c97fab3732e1ae7c3e5cbfca5f7747f8", "score": "0.5802163", "text": "function getColor(a) { \n var num = a.toString(16);\n var len = num.length;\n\n var letters = '0123456789ABCDEF';\n var color = '#';\n for (var i = 0; i < 6 - len; i++) {\n color += letters[Math.floor(Math.random() * 16)];\n }\n color += num;\n //console.log(color);\n return color;\n }", "title": "" }, { "docid": "0d9c99f527e97c9e735ad56c77a4441a", "score": "0.57987714", "text": "function get_random_color() {\r\n var letters = '0123456789ABCDEF'.split('');\r\n var color = '#';\r\n for (var i = 0; i < 6; i++) {\r\n color += letters[Math.round(Math.random() * 15)];\r\n }\r\n return color;\r\n}", "title": "" }, { "docid": "3498b74d9ed67cb6ff4901494bc4c8a8", "score": "0.5789331", "text": "get hash() {\r\n return this.hash_b & 0x0000FFFF | this.hash_w & 0xFFFF0000;\r\n }", "title": "" }, { "docid": "33fb0e7c27b42dd499b4fcf94614a372", "score": "0.57892317", "text": "function colourName2Hex(colour)\n {\n var colours = {\"aliceblue\":\"#f0f8ff\",\"antiquewhite\":\"#faebd7\",\"aqua\":\"#00ffff\",\"aquamarine\":\"#7fffd4\",\"azure\":\"#f0ffff\",\n \"beige\":\"#f5f5dc\",\"bisque\":\"#ffe4c4\",\"black\":\"#000000\",\"blanchedalmond\":\"#ffebcd\",\"blue\":\"#0000ff\",\"blueviolet\":\"#8a2be2\",\"brown\":\"#a52a2a\",\"burlywood\":\"#deb887\",\n \"cadetblue\":\"#5f9ea0\",\"chartreuse\":\"#7fff00\",\"chocolate\":\"#d2691e\",\"coral\":\"#ff7f50\",\"cornflowerblue\":\"#6495ed\",\"cornsilk\":\"#fff8dc\",\"crimson\":\"#dc143c\",\"cyan\":\"#00ffff\",\n \"darkblue\":\"#00008b\",\"darkcyan\":\"#008b8b\",\"darkgoldenrod\":\"#b8860b\",\"darkgray\":\"#a9a9a9\",\"darkgreen\":\"#006400\",\"darkkhaki\":\"#bdb76b\",\"darkmagenta\":\"#8b008b\",\"darkolivegreen\":\"#556b2f\",\n \"darkorange\":\"#ff8c00\",\"darkorchid\":\"#9932cc\",\"darkred\":\"#8b0000\",\"darksalmon\":\"#e9967a\",\"darkseagreen\":\"#8fbc8f\",\"darkslateblue\":\"#483d8b\",\"darkslategray\":\"#2f4f4f\",\"darkturquoise\":\"#00ced1\",\n \"darkviolet\":\"#9400d3\",\"deeppink\":\"#ff1493\",\"deepskyblue\":\"#00bfff\",\"dimgray\":\"#696969\",\"dodgerblue\":\"#1e90ff\",\n \"firebrick\":\"#b22222\",\"floralwhite\":\"#fffaf0\",\"forestgreen\":\"#228b22\",\"fuchsia\":\"#ff00ff\",\n \"gainsboro\":\"#dcdcdc\",\"ghostwhite\":\"#f8f8ff\",\"gold\":\"#ffd700\",\"goldenrod\":\"#daa520\",\"gray\":\"#808080\",\"green\":\"#008000\",\"greenyellow\":\"#adff2f\",\n \"honeydew\":\"#f0fff0\",\"hotpink\":\"#ff69b4\",\n \"indianred \":\"#cd5c5c\",\"indigo\":\"#4b0082\",\"ivory\":\"#fffff0\",\"khaki\":\"#f0e68c\",\n \"lavender\":\"#e6e6fa\",\"lavenderblush\":\"#fff0f5\",\"lawngreen\":\"#7cfc00\",\"lemonchiffon\":\"#fffacd\",\"lightblue\":\"#add8e6\",\"lightcoral\":\"#f08080\",\"lightcyan\":\"#e0ffff\",\"lightgoldenrodyellow\":\"#fafad2\",\n \"lightgrey\":\"#d3d3d3\",\"lightgreen\":\"#90ee90\",\"lightpink\":\"#ffb6c1\",\"lightsalmon\":\"#ffa07a\",\"lightseagreen\":\"#20b2aa\",\"lightskyblue\":\"#87cefa\",\"lightslategray\":\"#778899\",\"lightsteelblue\":\"#b0c4de\",\n \"lightyellow\":\"#ffffe0\",\"lime\":\"#00ff00\",\"limegreen\":\"#32cd32\",\"linen\":\"#faf0e6\",\n \"magenta\":\"#ff00ff\",\"maroon\":\"#800000\",\"mediumaquamarine\":\"#66cdaa\",\"mediumblue\":\"#0000cd\",\"mediumorchid\":\"#ba55d3\",\"mediumpurple\":\"#9370d8\",\"mediumseagreen\":\"#3cb371\",\"mediumslateblue\":\"#7b68ee\",\n \"mediumspringgreen\":\"#00fa9a\",\"mediumturquoise\":\"#48d1cc\",\"mediumvioletred\":\"#c71585\",\"midnightblue\":\"#191970\",\"mintcream\":\"#f5fffa\",\"mistyrose\":\"#ffe4e1\",\"moccasin\":\"#ffe4b5\",\n \"navajowhite\":\"#ffdead\",\"navy\":\"#000080\",\n \"oldlace\":\"#fdf5e6\",\"olive\":\"#808000\",\"olivedrab\":\"#6b8e23\",\"orange\":\"#ffa500\",\"orangered\":\"#ff4500\",\"orchid\":\"#da70d6\",\n \"palegoldenrod\":\"#eee8aa\",\"palegreen\":\"#98fb98\",\"paleturquoise\":\"#afeeee\",\"palevioletred\":\"#d87093\",\"papayawhip\":\"#ffefd5\",\"peachpuff\":\"#ffdab9\",\"peru\":\"#cd853f\",\"pink\":\"#ffc0cb\",\"plum\":\"#dda0dd\",\"powderblue\":\"#b0e0e6\",\"purple\":\"#800080\",\n \"rebeccapurple\":\"#663399\",\"red\":\"#ff0000\",\"rosybrown\":\"#bc8f8f\",\"royalblue\":\"#4169e1\",\n \"saddlebrown\":\"#8b4513\",\"salmon\":\"#fa8072\",\"sandybrown\":\"#f4a460\",\"seagreen\":\"#2e8b57\",\"seashell\":\"#fff5ee\",\"sienna\":\"#a0522d\",\"silver\":\"#c0c0c0\",\"skyblue\":\"#87ceeb\",\"slateblue\":\"#6a5acd\",\"slategray\":\"#708090\",\"snow\":\"#fffafa\",\"springgreen\":\"#00ff7f\",\"steelblue\":\"#4682b4\",\n \"tan\":\"#d2b48c\",\"teal\":\"#008080\",\"thistle\":\"#d8bfd8\",\"tomato\":\"#ff6347\",\"turquoise\":\"#40e0d0\",\n \"violet\":\"#ee82ee\",\n \"wheat\":\"#f5deb3\",\"white\":\"#ffffff\",\"whitesmoke\":\"#f5f5f5\",\n \"yellow\":\"#ffff00\",\"yellowgreen\":\"#9acd32\"};\n\n if (typeof colours[colour.toLowerCase()] != 'undefined')\n return colours[colour.toLowerCase()];\n\n return false;\n }", "title": "" }, { "docid": "efee182c677c274a1f21d8e69479b6f0", "score": "0.5771553", "text": "function getColor() {\n return '#93D4BC'\n}", "title": "" }, { "docid": "d916938ae640e041fbf8621a739b284f", "score": "0.5761241", "text": "function getRandomColor() {\r\n \r\n //letters that make up hex color\r\n var letters = \"0123456789ABCDEF\";\r\n var color = \"#\";\r\n \r\n //for loop -- i = counter start at 0, create a combination less than 6 characters, update i by 1\r\n for (var i = 0; i < 6; i++ ) {\r\n \r\n //color = #random combination of letters array [round to nearest integer (random method x 16 characters in the string)]\r\n color = color + letters[Math.floor(Math.random() * 16)];\r\n }\r\n \r\n //save new color value from loop\r\n return color;\r\n \r\n }", "title": "" }, { "docid": "c0f62705e206495b5350ab697df09698", "score": "0.57413924", "text": "function getColorString() {\n return tinycolor(colorEditor.getColor()).getOriginalInput();\n }", "title": "" }, { "docid": "7dbc76dd65c43f7f6c65cdc050fc319e", "score": "0.5737872", "text": "function getUserColor(e) {\n var props = getInternalProps(e);\n if (props === undefined) {\n return undefined;\n }\n\n try {\n return props.message.colorString;\n } catch (err) {\n // Catch TypeError if no message in props\n }\n\n // Return colorString or undefined if not present\n return props.colorString;\n }", "title": "" }, { "docid": "0b4f4bf8b29d161afe647235d355e26b", "score": "0.57252896", "text": "function passwordStrength(fid,password)\n{var bgcolor=new Array();bgcolor[0]='#f55';bgcolor[1]='#faa';bgcolor[2]='#ff3';bgcolor[3]='#ffa';bgcolor[4]='#afa';bgcolor[5]='#3f3';var score=0;if(password.length>6)score++;if((password.match(/[a-z]/))&&(password.match(/[A-Z]/)))score++;if(password.match(/\\d+/))score++;if(password.match(/.[!,@,#,$,%,^,&,*,?,_,~,-,(,)]/))score++;if(password.length>12)score++;$('#'+fid).css('background-color', bgcolor[score]);if(password == '')$('#'+fid).css('background-color', 'inherit')}", "title": "" }, { "docid": "44f7b151418a975e329a04b6a9302445", "score": "0.5711597", "text": "function colorFor(key, colors) {\n const value = Math.abs(hash(key));\n return colors.length > 0 ? colors[value % colors.length] : 0;\n}", "title": "" }, { "docid": "b9fadc580c2cfb8e41938af6e31c9901", "score": "0.5704687", "text": "static hashFn(value) {\n return Buffer.from(ethUtil.keccak256(value), 'hex'); //.slice(-20);\n }", "title": "" }, { "docid": "8145a949dc956e4d9bc4b6d26f34d528", "score": "0.56964266", "text": "hashCode () {\n\n return Color.toHexLong(this);\n }", "title": "" }, { "docid": "9a459ea1791d880cff0534ee8b1eaa68", "score": "0.5685916", "text": "_getColorFor(v) {\n let c = this.options.color; // e.g. for a constant 'red'\n if (typeof c === 'function') {\n c = this.options.color(v);\n }\n let color = new RGBColor(c); // to be more flexible, a chroma color object is always created || TODO improve efficiency\n return color;\n }", "title": "" }, { "docid": "98dd9c09a7b0606698005a0b235c3d8c", "score": "0.5684443", "text": "function nameToHSL(name) {\n let fakeDiv = document.createElement('div');\n fakeDiv.style.color = name;\n document.body.appendChild(fakeDiv);\n\n let cs = window.getComputedStyle(fakeDiv),\n pv = cs.getPropertyValue('color');\n\n document.body.removeChild(fakeDiv);\n\n // Code ripped from RGBToHSL() (except pv is substringed)\n let rgb = pv.substr(4).split(')')[0].split(','),\n r = rgb[0] / 255,\n g = rgb[1] / 255,\n b = rgb[2] / 255,\n cmin = Math.min(r, g, b),\n cmax = Math.max(r, g, b),\n delta = cmax - cmin,\n h = 0,\n s = 0,\n l = 0;\n\n if (delta == 0) h = 0;\n else if (cmax == r) h = ((g - b) / delta) % 6;\n else if (cmax == g) h = (b - r) / delta + 2;\n else h = (r - g) / delta + 4;\n\n h = Math.round(h * 60);\n\n if (h < 0) h += 360;\n\n l = (cmax + cmin) / 2;\n s = delta == 0 ? 0 : delta / (1 - Math.abs(2 * l - 1));\n s = +(s * 100).toFixed(1);\n l = +(l * 100).toFixed(1);\n\n return 'hsl(' + h + ',' + s + '%,' + l + '%)';\n}", "title": "" }, { "docid": "713ee1cace8faf83873d5a3bc1a64c24", "score": "0.56837094", "text": "getHashCode() {\n let hash = (this.r * 255) | 0;\n hash = (hash * 397) ^ ((this.g * 255) | 0);\n hash = (hash * 397) ^ ((this.b * 255) | 0);\n hash = (hash * 397) ^ ((this.a * 255) | 0);\n return hash;\n }", "title": "" }, { "docid": "d3af572b6d04ef2347a600e9e02917a2", "score": "0.5679923", "text": "getRandomColor() {\r\n const letters = '0123456789ABCDEF';\r\n let color = '#';\r\n\r\n for ( let i = 0; i < 6; i++ ) {\r\n color += letters[ Math.floor( Math.random() * 16 ) ];\r\n }\r\n\r\n /**\r\n * Function hexColorDelta() : Return color diffrence in ratio decmial point\r\n *\r\n * @param {string} hex1\r\n * @param {string} hex2\r\n *\r\n * @see http://jsfiddle.net/96sME/\r\n */\r\n const hexColorDelta = function( hex1, hex2 ) {\r\n hex1 = hex1.replace( '#', '' );\r\n hex2 = hex2.replace( '#', '' );\r\n\r\n // get red/green/blue int values of hex1\r\n var r1 = parseInt( hex1.substring( 0, 2 ), 16 );\r\n var g1 = parseInt( hex1.substring( 2, 4 ), 16 );\r\n var b1 = parseInt( hex1.substring( 4, 6 ), 16 );\r\n // get red/green/blue int values of hex2\r\n var r2 = parseInt( hex2.substring( 0, 2 ), 16 );\r\n var g2 = parseInt( hex2.substring( 2, 4 ), 16 );\r\n var b2 = parseInt( hex2.substring( 4, 6 ), 16 );\r\n // calculate differences between reds, greens and blues\r\n var r = 255 - Math.abs( r1 - r2 );\r\n var g = 255 - Math.abs( g1 - g2 );\r\n var b = 255 - Math.abs( b1 - b2 );\r\n // limit differences between 0 and 1\r\n r /= 255;\r\n g /= 255;\r\n b /= 255;\r\n // 0 means opposit colors, 1 means same colors\r\n return (r + g + b) / 3;\r\n };\r\n\r\n let similar = Logger.colorsInUse.some( ( value ) => {\r\n // it return the ratio of diffrence... closer to 1.0 is less difference.\r\n\r\n if ( hexColorDelta( color, value ) < 0.8 ) {\r\n return false;\r\n }\r\n\r\n return true;\r\n } );\r\n\r\n // if the color is similar, try again.\r\n if ( similar ) {\r\n return this.getRandomColor();\r\n }\r\n\r\n return color;\r\n }", "title": "" }, { "docid": "f312c1f0e67c0ec5e606039940842eb7", "score": "0.5679376", "text": "function getStatusColor(search_name) {\n var color = \"\";\n\n for (var i = 0; i < statusIndex; i++) {\n if (statusList[i][1] == search_name) {\n color = \"#\" + pad(statusList[i][3].toString(16),6);\n break;\n }\n }\n return(color);\n}", "title": "" }, { "docid": "f312c1f0e67c0ec5e606039940842eb7", "score": "0.5679376", "text": "function getStatusColor(search_name) {\n var color = \"\";\n\n for (var i = 0; i < statusIndex; i++) {\n if (statusList[i][1] == search_name) {\n color = \"#\" + pad(statusList[i][3].toString(16),6);\n break;\n }\n }\n return(color);\n}", "title": "" }, { "docid": "8119f4eaf866bd4a2e7229005573c560", "score": "0.5663688", "text": "function onKeyUp() {\n\tdocument.getElementById('username').style.backgroundColor = \"green\";\n}", "title": "" }, { "docid": "947f6900f00a9702f784226a2673b7a8", "score": "0.56597364", "text": "function getUserName()\n{\n var username = $('<span></span>');\n username.attr(\"class\", \"username\");\n username.css(\"color\", getUsernameColor());\n username.append(usernamePrefixes[Math.floor(Math.random()*usernamePrefixes.length)]); //gets a random username from the array\n username.append(usernameSuffixes[Math.floor(Math.random()*usernameSuffixes.length)]); //gets a random username from the array\n \n if(Math.random() > 0.5)\n {\n username.append(Math.floor(Math.random() * 120));\n }\n \n return username;\n}", "title": "" }, { "docid": "54fef07850cd303f6dbe4ae81d494f21", "score": "0.5652273", "text": "function nameToRGB(name) {\n // Create fake div\n let fakeDiv = document.createElement('div');\n fakeDiv.style.color = name;\n document.body.appendChild(fakeDiv);\n\n // Get color of div\n let cs = window.getComputedStyle(fakeDiv),\n pv = cs.getPropertyValue('color');\n\n // Remove div after obtaining desired color value\n document.body.removeChild(fakeDiv);\n\n return pv;\n}", "title": "" }, { "docid": "d0b1ae7425d73b7ccd104fe4c66af02a", "score": "0.56462765", "text": "NamedColorToHex(color) {\r\n var colors = {\"aliceblue\":\"#f0f8ff\",\"antiquewhite\":\"#faebd7\",\"aqua\":\"#00ffff\",\"aquamarine\":\"#7fffd4\",\"azure\":\"#f0ffff\",\r\n \"beige\":\"#f5f5dc\",\"bisque\":\"#ffe4c4\",\"black\":\"#000000\",\"blanchedalmond\":\"#ffebcd\",\"blue\":\"#0000ff\",\"blueviolet\":\"#8a2be2\",\"brown\":\"#a52a2a\",\"burlywood\":\"#deb887\",\r\n \"cadetblue\":\"#5f9ea0\",\"chartreuse\":\"#7fff00\",\"chocolate\":\"#d2691e\",\"coral\":\"#ff7f50\",\"cornflowerblue\":\"#6495ed\",\"cornsilk\":\"#fff8dc\",\"crimson\":\"#dc143c\",\"cyan\":\"#00ffff\",\r\n \"darkblue\":\"#00008b\",\"darkcyan\":\"#008b8b\",\"darkgoldenrod\":\"#b8860b\",\"darkgray\":\"#a9a9a9\",\"darkgreen\":\"#006400\",\"darkkhaki\":\"#bdb76b\",\"darkmagenta\":\"#8b008b\",\"darkolivegreen\":\"#556b2f\",\r\n \"darkorange\":\"#ff8c00\",\"darkorchid\":\"#9932cc\",\"darkred\":\"#8b0000\",\"darksalmon\":\"#e9967a\",\"darkseagreen\":\"#8fbc8f\",\"darkslateblue\":\"#483d8b\",\"darkslategray\":\"#2f4f4f\",\"darkturquoise\":\"#00ced1\",\r\n \"darkviolet\":\"#9400d3\",\"deeppink\":\"#ff1493\",\"deepskyblue\":\"#00bfff\",\"dimgray\":\"#696969\",\"dodgerblue\":\"#1e90ff\",\r\n \"firebrick\":\"#b22222\",\"floralwhite\":\"#fffaf0\",\"forestgreen\":\"#228b22\",\"fuchsia\":\"#ff00ff\",\r\n \"gainsboro\":\"#dcdcdc\",\"ghostwhite\":\"#f8f8ff\",\"gold\":\"#ffd700\",\"goldenrod\":\"#daa520\",\"gray\":\"#808080\",\"green\":\"#008000\",\"greenyellow\":\"#adff2f\",\r\n \"honeydew\":\"#f0fff0\",\"hotpink\":\"#ff69b4\",\r\n \"indianred \":\"#cd5c5c\",\"indigo\":\"#4b0082\",\"ivory\":\"#fffff0\",\"khaki\":\"#f0e68c\",\r\n \"lavender\":\"#e6e6fa\",\"lavenderblush\":\"#fff0f5\",\"lawngreen\":\"#7cfc00\",\"lemonchiffon\":\"#fffacd\",\"lightblue\":\"#add8e6\",\"lightcoral\":\"#f08080\",\"lightcyan\":\"#e0ffff\",\"lightgoldenrodyellow\":\"#fafad2\",\r\n \"lightgrey\":\"#d3d3d3\",\"lightgreen\":\"#90ee90\",\"lightpink\":\"#ffb6c1\",\"lightsalmon\":\"#ffa07a\",\"lightseagreen\":\"#20b2aa\",\"lightskyblue\":\"#87cefa\",\"lightslategray\":\"#778899\",\"lightsteelblue\":\"#b0c4de\",\r\n \"lightyellow\":\"#ffffe0\",\"lime\":\"#00ff00\",\"limegreen\":\"#32cd32\",\"linen\":\"#faf0e6\",\r\n \"magenta\":\"#ff00ff\",\"maroon\":\"#800000\",\"mediumaquamarine\":\"#66cdaa\",\"mediumblue\":\"#0000cd\",\"mediumorchid\":\"#ba55d3\",\"mediumpurple\":\"#9370d8\",\"mediumseagreen\":\"#3cb371\",\"mediumslateblue\":\"#7b68ee\",\r\n \"mediumspringgreen\":\"#00fa9a\",\"mediumturquoise\":\"#48d1cc\",\"mediumvioletred\":\"#c71585\",\"midnightblue\":\"#191970\",\"mintcream\":\"#f5fffa\",\"mistyrose\":\"#ffe4e1\",\"moccasin\":\"#ffe4b5\",\r\n \"navajowhite\":\"#ffdead\",\"navy\":\"#000080\",\r\n \"oldlace\":\"#fdf5e6\",\"olive\":\"#808000\",\"olivedrab\":\"#6b8e23\",\"orange\":\"#ffa500\",\"orangered\":\"#ff4500\",\"orchid\":\"#da70d6\",\r\n \"palegoldenrod\":\"#eee8aa\",\"palegreen\":\"#98fb98\",\"paleturquoise\":\"#afeeee\",\"palevioletred\":\"#d87093\",\"papayawhip\":\"#ffefd5\",\"peachpuff\":\"#ffdab9\",\"peru\":\"#cd853f\",\"pink\":\"#ffc0cb\",\"plum\":\"#dda0dd\",\"powderblue\":\"#b0e0e6\",\"purple\":\"#800080\",\r\n \"rebeccapurple\":\"#663399\",\"red\":\"#ff0000\",\"rosybrown\":\"#bc8f8f\",\"royalblue\":\"#4169e1\",\r\n \"saddlebrown\":\"#8b4513\",\"salmon\":\"#fa8072\",\"sandybrown\":\"#f4a460\",\"seagreen\":\"#2e8b57\",\"seashell\":\"#fff5ee\",\"sienna\":\"#a0522d\",\"silver\":\"#c0c0c0\",\"skyblue\":\"#87ceeb\",\"slateblue\":\"#6a5acd\",\"slategray\":\"#708090\",\"snow\":\"#fffafa\",\"springgreen\":\"#00ff7f\",\"steelblue\":\"#4682b4\",\r\n \"tan\":\"#d2b48c\",\"teal\":\"#008080\",\"thistle\":\"#d8bfd8\",\"tomato\":\"#ff6347\",\"turquoise\":\"#40e0d0\",\r\n \"violet\":\"#ee82ee\",\r\n \"wheat\":\"#f5deb3\",\"white\":\"#ffffff\",\"whitesmoke\":\"#f5f5f5\",\r\n \"yellow\":\"#ffff00\",\"yellowgreen\":\"#9acd32\"};\r\n\r\n if (typeof colors[color.toLowerCase()] != 'undefined')\r\n return colors[color.toLowerCase()];\r\n\r\n return false;\r\n }", "title": "" }, { "docid": "76b6553c67ac601790d85da83320fb32", "score": "0.5645057", "text": "function hashCredentials(username, password) {\n const hash = bcrypt.hashSync(password, saltRounds);\n\n return { password: hash, username, plainTextPassword: password };\n}", "title": "" }, { "docid": "b5cffb5cfc7007aeca61a4801eef4ecb", "score": "0.5644835", "text": "function getRandomColour() {\n var letters = '123456789abcdef'.split('');\n var color = '#';\n for (var i = 0; i < 6; i++) {\n color += letters[Math.floor(Math.random() * 16)];\n }\n return color;\n}", "title": "" }, { "docid": "e6150290e069e2b89a368fdde1c5c558", "score": "0.5643075", "text": "function getRandomColor() {\n \n// \"0123456789ABCDEF\" are the components that generate the hash code colors, the function \"spilt()\" is aplied on these strings and splits them with single qoutes('') and all this is asigned to the variable letters, \"spilt()\" splits a string into an array\n \n \n \n var letters = '0123456789ABCDEF'.split('');\n \n var color = '#';\n \n// \"for\" osht funksion qe perseritet qe pranon parametra, n ket rast \"i\" osht variabel me vler 0, i < 6 osht parameter qe e lejon qet funksion mu egzekutu derisa \"i\" osht ma e vogel se 6, n momentin qe bohet 6 ose ma e madhe funksioni ndalon ose nuk egzekutohet, \"i++\" e rrit vleren e \"i\" per 1 (+ 1) persecilin cikel te funksionit \"for\"\n \n// \"for\" is a loop type function that accepts certain parameters, in this case \"i\" is a variable with a value of 0, \"i < 6\" is a parameter that allows that this function to execute while \"i\" is smaller than 6, at the time that \"i\" increases to a value of 6 or higher the function stops, \"i++\" incriments the value of \"i\" per fixed value of 1, for each iteration of function/loop \"for\".\n \n for (var i = 0; i < 6; i++ ) {\n \n// \"Math.random\" generates a random number between 0 and 1, and and we multiply that random value with 16, to get a value/random number in the range of 0-16 but as a decimal value(ex. 13.3) and this creates a problem because we need integer(whole numbers), and \"Math.floor\" solves this problem.\n \n// \"Math.floor\" converts a decimal number to an integer(whole nubmer) (ex.13.3 = 13, ) \"Math.floor\" takes the lower value (whole number) of 13.3 which is 13 , while \"Math.ceil\" takes the higher value 13.3 which is 14\n \n var randomNumber = Math.random() *16;\n \n//letter[\"index\"] within the square brackets is the value of the index number that refeers to a value/element in the vector array of letters, this element in the letters vector array is appended to the color variable\n// the \"+=\" opperator appends a value to the value that already exist\n// this proccess interates 6 times based on the parameters on the \"for\" loop until a hashcode is completed \n\n \n color += letters[Math.floor(randomNumber)]\n \n }\n \n//after 6 iterations of the \"for\" loop the color hashcode is returned\n \n return color;\n }", "title": "" }, { "docid": "f2a5fec27b48fd2d9efa86fd4cc1ddc0", "score": "0.564245", "text": "function getRanCol(){\n var letters = '0123456789ABCDEF';\n var colour = '#';\n for (i = 0; i < 6; i++){\n colour = colour + letters[Math.floor(Math.random()*16)];\n }\n return colour\n}", "title": "" }, { "docid": "8fcc05d51492ea76611a18053d3b8fc9", "score": "0.56385136", "text": "_forgeneratingrandomcolor() {\r\n let letters = '0123456789ABCDEF';\r\n let color = '#';\r\n for (let i = 0; i < 6; i++) {\r\n color += letters[Math.floor(Math.random() * 16)]; //Math.floor to round it off, Math.random to choose a random number and multiplied by 16 as their are only 16 elemts in letters.\r\n }\r\n return color;\r\n }", "title": "" }, { "docid": "6b9a482b5aba2f1fba85dfd026bddb2d", "score": "0.5633213", "text": "function colorNameToHex(color)\n{\n if (typeof colors[color.toLowerCase()] != 'undefined')\n return colors[color.toLowerCase()];\n\n return null;\n}", "title": "" }, { "docid": "5b030c46bfa423076e2ac6821959d6db", "score": "0.5630433", "text": "hashID(userId) {\n var hash = 0;\n if (userId && userId.length != 0) {\n for (var i = 0; i < userId.length; i++) {\n let char = userId.charCodeAt(i);\n hash = ((hash << 5) - hash) + char;\n hash = hash & hash;\n }\n }\n return hash;\n }", "title": "" }, { "docid": "bb56a6d1947113515254c3c4372335f8", "score": "0.5628209", "text": "function hashighpoint(string) {\n\n}", "title": "" }, { "docid": "93532e69b00e3ab2ede8406b2646e0fc", "score": "0.5626651", "text": "function getBackgroundColor(input) {\n const WHITE = '#ffffff';\n if (typeof input === 'string' && input.length > 0) {\n const regex = /^#[0-9a-f]{3}$|^#[0-9a-f]{6}$|^[a-z-]{1,24}$/i;\n const found = input.match(regex);\n if (found && found.length === 1) {\n return found[0];\n }\n }\n return WHITE;\n}", "title": "" }, { "docid": "2a5eb3effd07a63dc19f22cca034ad09", "score": "0.56262577", "text": "function grab_color(square_class) {\n\n\t\t// split the classess by the nbsp delimiter\n\t\tvar class_array = square_class.split(\" \");\n\n\t\t// set the duck's color to last term in class, which is the background color.\n\t\tvar duck_color = \"\";\n\n\t\tfor (i in class_array) {\n\n\t\t\tduck_color = class_array[i];\n\n\t\t}\n\n\t\treturn duck_color;\n\n}", "title": "" }, { "docid": "38b408797701628d25eb1d9ddb941dba", "score": "0.5620176", "text": "function score_color(score) {\n var hue = 120 * score;\n var saturation = 75 + 25 * score;\n var light = 25 + 30 * (1 - score);\n return 'hsl(' + hue + ', ' + saturation + '%, ' + light + '%);';\n}", "title": "" }, { "docid": "df4843e337a19177a6f8da8dffc063de", "score": "0.5619716", "text": "function hexToRGB (hx, name) {\n let a = hx ? parseInt(hx.substr(1), 16) : name.hashCode();\n return [((a >> 16) & 0xFF) / 255, ((a >> 8) & 0xFF) / 255, (a & 0xFF) / 255];\n}", "title": "" }, { "docid": "fecbea039444fc529aaaba3bc72802c6", "score": "0.561758", "text": "function getRandomColor() {\n\tvar letters = '0123456789ABCDEF'.split(''); //puts all hexadecimal character into an array.\n\tvar color = '#';\n\tfor (var i = 0; i < 6; i++){\n\t\tcolor += letters[Math.floor(Math.random() * 16)]; //random gen for hexadecimal value\n\t}\n\treturn color;\n}", "title": "" }, { "docid": "63dcc8d539d15c5297e3f11ff55941c6", "score": "0.561468", "text": "function getMyColor() {\n if (!wave) return '#dddddd';\n\n var state = wave.getState();\n if (!state) return '#dddddd';\n\n // This is what we think our color is.\n // It's possible that someone else has stolen it from us.\n var my_color = Globals.my_color;\n\n var me = wave.getViewer().getId();\n if (!my_color || state.get(\"@\" + my_color) != me) {\n // Either we haven't assigned ourselves a color yet or someone stolen this\n // color from us. In either case, assign ourselves a new one.\n var count = 0;\n for (var x in Globals.user_colors) { count++; }\n var color = RandomLightColor(count);\n var delta = {};\n delta[\"@\" + color] = me;\n state.submitDelta(delta);\n Globals.my_color = color;\n if (console) console.log(\"Assigning self color #\" + count + \": \" + color);\n }\n return Globals.my_color;\n}", "title": "" }, { "docid": "e3f5ab7015ebe978c614bad81d9b89b1", "score": "0.5613977", "text": "function RGBColor(t){this.ok=!1,\"#\"==t.charAt(0)&&(t=t.substr(1,6)),t=t.replace(/ /g,\"\"),t=t.toLowerCase();var e={aliceblue:\"f0f8ff\",antiquewhite:\"faebd7\",aqua:\"00ffff\",aquamarine:\"7fffd4\",azure:\"f0ffff\",beige:\"f5f5dc\",bisque:\"ffe4c4\",black:\"000000\",blanchedalmond:\"ffebcd\",blue:\"0000ff\",blueviolet:\"8a2be2\",brown:\"a52a2a\",burlywood:\"deb887\",cadetblue:\"5f9ea0\",chartreuse:\"7fff00\",chocolate:\"d2691e\",coral:\"ff7f50\",cornflowerblue:\"6495ed\",cornsilk:\"fff8dc\",crimson:\"dc143c\",cyan:\"00ffff\",darkblue:\"00008b\",darkcyan:\"008b8b\",darkgoldenrod:\"b8860b\",darkgray:\"a9a9a9\",darkgreen:\"006400\",darkkhaki:\"bdb76b\",darkmagenta:\"8b008b\",darkolivegreen:\"556b2f\",darkorange:\"ff8c00\",darkorchid:\"9932cc\",darkred:\"8b0000\",darksalmon:\"e9967a\",darkseagreen:\"8fbc8f\",darkslateblue:\"483d8b\",darkslategray:\"2f4f4f\",darkturquoise:\"00ced1\",darkviolet:\"9400d3\",deeppink:\"ff1493\",deepskyblue:\"00bfff\",dimgray:\"696969\",dodgerblue:\"1e90ff\",feldspar:\"d19275\",firebrick:\"b22222\",floralwhite:\"fffaf0\",forestgreen:\"228b22\",fuchsia:\"ff00ff\",gainsboro:\"dcdcdc\",ghostwhite:\"f8f8ff\",gold:\"ffd700\",goldenrod:\"daa520\",gray:\"808080\",green:\"008000\",greenyellow:\"adff2f\",honeydew:\"f0fff0\",hotpink:\"ff69b4\",indianred:\"cd5c5c\",indigo:\"4b0082\",ivory:\"fffff0\",khaki:\"f0e68c\",lavender:\"e6e6fa\",lavenderblush:\"fff0f5\",lawngreen:\"7cfc00\",lemonchiffon:\"fffacd\",lightblue:\"add8e6\",lightcoral:\"f08080\",lightcyan:\"e0ffff\",lightgoldenrodyellow:\"fafad2\",lightgrey:\"d3d3d3\",lightgreen:\"90ee90\",lightpink:\"ffb6c1\",lightsalmon:\"ffa07a\",lightseagreen:\"20b2aa\",lightskyblue:\"87cefa\",lightslateblue:\"8470ff\",lightslategray:\"778899\",lightsteelblue:\"b0c4de\",lightyellow:\"ffffe0\",lime:\"00ff00\",limegreen:\"32cd32\",linen:\"faf0e6\",magenta:\"ff00ff\",maroon:\"800000\",mediumaquamarine:\"66cdaa\",mediumblue:\"0000cd\",mediumorchid:\"ba55d3\",mediumpurple:\"9370d8\",mediumseagreen:\"3cb371\",mediumslateblue:\"7b68ee\",mediumspringgreen:\"00fa9a\",mediumturquoise:\"48d1cc\",mediumvioletred:\"c71585\",midnightblue:\"191970\",mintcream:\"f5fffa\",mistyrose:\"ffe4e1\",moccasin:\"ffe4b5\",navajowhite:\"ffdead\",navy:\"000080\",oldlace:\"fdf5e6\",olive:\"808000\",olivedrab:\"6b8e23\",orange:\"ffa500\",orangered:\"ff4500\",orchid:\"da70d6\",palegoldenrod:\"eee8aa\",palegreen:\"98fb98\",paleturquoise:\"afeeee\",palevioletred:\"d87093\",papayawhip:\"ffefd5\",peachpuff:\"ffdab9\",peru:\"cd853f\",pink:\"ffc0cb\",plum:\"dda0dd\",powderblue:\"b0e0e6\",purple:\"800080\",red:\"ff0000\",rosybrown:\"bc8f8f\",royalblue:\"4169e1\",saddlebrown:\"8b4513\",salmon:\"fa8072\",sandybrown:\"f4a460\",seagreen:\"2e8b57\",seashell:\"fff5ee\",sienna:\"a0522d\",silver:\"c0c0c0\",skyblue:\"87ceeb\",slateblue:\"6a5acd\",slategray:\"708090\",snow:\"fffafa\",springgreen:\"00ff7f\",steelblue:\"4682b4\",tan:\"d2b48c\",teal:\"008080\",thistle:\"d8bfd8\",tomato:\"ff6347\",turquoise:\"40e0d0\",violet:\"ee82ee\",violetred:\"d02090\",wheat:\"f5deb3\",white:\"ffffff\",whitesmoke:\"f5f5f5\",yellow:\"ffff00\",yellowgreen:\"9acd32\"};for(var n in e)t==n&&(t=e[n]);for(var r=[{re:/^rgb\\((\\d{1,3}),\\s*(\\d{1,3}),\\s*(\\d{1,3})\\)$/,example:[\"rgb(123, 234, 45)\",\"rgb(255,234,245)\"],process:function(t){return[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]}},{re:/^(\\w{2})(\\w{2})(\\w{2})$/,example:[\"#00ff00\",\"336699\"],process:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/^(\\w{1})(\\w{1})(\\w{1})$/,example:[\"#fb0\",\"f0f\"],process:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}}],i=0;i<r.length;i++){var o=r[i].re,a=r[i].process,s=o.exec(t);s&&(channels=a(s),this.r=channels[0],this.g=channels[1],this.b=channels[2],this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return\"rgb(\"+this.r+\", \"+this.g+\", \"+this.b+\")\"},this.toHex=function(){var t=this.r.toString(16),e=this.g.toString(16),n=this.b.toString(16);return 1==t.length&&(t=\"0\"+t),1==e.length&&(e=\"0\"+e),1==n.length&&(n=\"0\"+n),\"#\"+t+e+n},this.getHelpXML=function(){for(var t=new Array,n=0;n<r.length;n++)for(var i=r[n].example,o=0;o<i.length;o++)t[t.length]=i[o];for(var a in e)t[t.length]=a;var s=document.createElement(\"ul\");s.setAttribute(\"id\",\"rgbcolor-examples\");for(var n=0;n<t.length;n++)try{var l=document.createElement(\"li\"),u=new RGBColor(t[n]),c=document.createElement(\"div\");c.style.cssText=\"margin: 3px; border: 1px solid black; background:\"+u.toHex()+\"; color:\"+u.toHex(),c.appendChild(document.createTextNode(\"test\"));var h=document.createTextNode(\" \"+t[n]+\" -> \"+u.toRGB()+\" -> \"+u.toHex());l.appendChild(c),l.appendChild(h),s.appendChild(l)}catch(f){}return s}}", "title": "" }, { "docid": "e3f5ab7015ebe978c614bad81d9b89b1", "score": "0.5613977", "text": "function RGBColor(t){this.ok=!1,\"#\"==t.charAt(0)&&(t=t.substr(1,6)),t=t.replace(/ /g,\"\"),t=t.toLowerCase();var e={aliceblue:\"f0f8ff\",antiquewhite:\"faebd7\",aqua:\"00ffff\",aquamarine:\"7fffd4\",azure:\"f0ffff\",beige:\"f5f5dc\",bisque:\"ffe4c4\",black:\"000000\",blanchedalmond:\"ffebcd\",blue:\"0000ff\",blueviolet:\"8a2be2\",brown:\"a52a2a\",burlywood:\"deb887\",cadetblue:\"5f9ea0\",chartreuse:\"7fff00\",chocolate:\"d2691e\",coral:\"ff7f50\",cornflowerblue:\"6495ed\",cornsilk:\"fff8dc\",crimson:\"dc143c\",cyan:\"00ffff\",darkblue:\"00008b\",darkcyan:\"008b8b\",darkgoldenrod:\"b8860b\",darkgray:\"a9a9a9\",darkgreen:\"006400\",darkkhaki:\"bdb76b\",darkmagenta:\"8b008b\",darkolivegreen:\"556b2f\",darkorange:\"ff8c00\",darkorchid:\"9932cc\",darkred:\"8b0000\",darksalmon:\"e9967a\",darkseagreen:\"8fbc8f\",darkslateblue:\"483d8b\",darkslategray:\"2f4f4f\",darkturquoise:\"00ced1\",darkviolet:\"9400d3\",deeppink:\"ff1493\",deepskyblue:\"00bfff\",dimgray:\"696969\",dodgerblue:\"1e90ff\",feldspar:\"d19275\",firebrick:\"b22222\",floralwhite:\"fffaf0\",forestgreen:\"228b22\",fuchsia:\"ff00ff\",gainsboro:\"dcdcdc\",ghostwhite:\"f8f8ff\",gold:\"ffd700\",goldenrod:\"daa520\",gray:\"808080\",green:\"008000\",greenyellow:\"adff2f\",honeydew:\"f0fff0\",hotpink:\"ff69b4\",indianred:\"cd5c5c\",indigo:\"4b0082\",ivory:\"fffff0\",khaki:\"f0e68c\",lavender:\"e6e6fa\",lavenderblush:\"fff0f5\",lawngreen:\"7cfc00\",lemonchiffon:\"fffacd\",lightblue:\"add8e6\",lightcoral:\"f08080\",lightcyan:\"e0ffff\",lightgoldenrodyellow:\"fafad2\",lightgrey:\"d3d3d3\",lightgreen:\"90ee90\",lightpink:\"ffb6c1\",lightsalmon:\"ffa07a\",lightseagreen:\"20b2aa\",lightskyblue:\"87cefa\",lightslateblue:\"8470ff\",lightslategray:\"778899\",lightsteelblue:\"b0c4de\",lightyellow:\"ffffe0\",lime:\"00ff00\",limegreen:\"32cd32\",linen:\"faf0e6\",magenta:\"ff00ff\",maroon:\"800000\",mediumaquamarine:\"66cdaa\",mediumblue:\"0000cd\",mediumorchid:\"ba55d3\",mediumpurple:\"9370d8\",mediumseagreen:\"3cb371\",mediumslateblue:\"7b68ee\",mediumspringgreen:\"00fa9a\",mediumturquoise:\"48d1cc\",mediumvioletred:\"c71585\",midnightblue:\"191970\",mintcream:\"f5fffa\",mistyrose:\"ffe4e1\",moccasin:\"ffe4b5\",navajowhite:\"ffdead\",navy:\"000080\",oldlace:\"fdf5e6\",olive:\"808000\",olivedrab:\"6b8e23\",orange:\"ffa500\",orangered:\"ff4500\",orchid:\"da70d6\",palegoldenrod:\"eee8aa\",palegreen:\"98fb98\",paleturquoise:\"afeeee\",palevioletred:\"d87093\",papayawhip:\"ffefd5\",peachpuff:\"ffdab9\",peru:\"cd853f\",pink:\"ffc0cb\",plum:\"dda0dd\",powderblue:\"b0e0e6\",purple:\"800080\",red:\"ff0000\",rosybrown:\"bc8f8f\",royalblue:\"4169e1\",saddlebrown:\"8b4513\",salmon:\"fa8072\",sandybrown:\"f4a460\",seagreen:\"2e8b57\",seashell:\"fff5ee\",sienna:\"a0522d\",silver:\"c0c0c0\",skyblue:\"87ceeb\",slateblue:\"6a5acd\",slategray:\"708090\",snow:\"fffafa\",springgreen:\"00ff7f\",steelblue:\"4682b4\",tan:\"d2b48c\",teal:\"008080\",thistle:\"d8bfd8\",tomato:\"ff6347\",turquoise:\"40e0d0\",violet:\"ee82ee\",violetred:\"d02090\",wheat:\"f5deb3\",white:\"ffffff\",whitesmoke:\"f5f5f5\",yellow:\"ffff00\",yellowgreen:\"9acd32\"};for(var n in e)t==n&&(t=e[n]);for(var r=[{re:/^rgb\\((\\d{1,3}),\\s*(\\d{1,3}),\\s*(\\d{1,3})\\)$/,example:[\"rgb(123, 234, 45)\",\"rgb(255,234,245)\"],process:function(t){return[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]}},{re:/^(\\w{2})(\\w{2})(\\w{2})$/,example:[\"#00ff00\",\"336699\"],process:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/^(\\w{1})(\\w{1})(\\w{1})$/,example:[\"#fb0\",\"f0f\"],process:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}}],i=0;i<r.length;i++){var o=r[i].re,a=r[i].process,s=o.exec(t);s&&(channels=a(s),this.r=channels[0],this.g=channels[1],this.b=channels[2],this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return\"rgb(\"+this.r+\", \"+this.g+\", \"+this.b+\")\"},this.toHex=function(){var t=this.r.toString(16),e=this.g.toString(16),n=this.b.toString(16);return 1==t.length&&(t=\"0\"+t),1==e.length&&(e=\"0\"+e),1==n.length&&(n=\"0\"+n),\"#\"+t+e+n},this.getHelpXML=function(){for(var t=new Array,n=0;n<r.length;n++)for(var i=r[n].example,o=0;o<i.length;o++)t[t.length]=i[o];for(var a in e)t[t.length]=a;var s=document.createElement(\"ul\");s.setAttribute(\"id\",\"rgbcolor-examples\");for(var n=0;n<t.length;n++)try{var l=document.createElement(\"li\"),u=new RGBColor(t[n]),c=document.createElement(\"div\");c.style.cssText=\"margin: 3px; border: 1px solid black; background:\"+u.toHex()+\"; color:\"+u.toHex(),c.appendChild(document.createTextNode(\"test\"));var h=document.createTextNode(\" \"+t[n]+\" -> \"+u.toRGB()+\" -> \"+u.toHex());l.appendChild(c),l.appendChild(h),s.appendChild(l)}catch(f){}return s}}", "title": "" }, { "docid": "bdd00fc9bff8d33aae2e43827c1ef921", "score": "0.5610483", "text": "function get_random_color() {\n var letters = 'ABCDE'.split('');\n var color = '#';\n for (var i=0; i<3; i++ ) {\n color += letters[Math.floor(Math.random() * letters.length)];\n }\n return color;\n}", "title": "" }, { "docid": "f87fabfd0e0889d769cd94f7f69866fb", "score": "0.56085664", "text": "function hash(password) {\n return CryptoJS.MD5(password);\n}", "title": "" }, { "docid": "4a515c43a1ada7d3057ce4e0f721e732", "score": "0.560653", "text": "function getColor(color)\n{\n\tif (!color) return;\n\n\tvar hex = color.match(/^#[0-9A-F]{6}$/i);\n\tvar rgb = color.match(/rgb\\s*\\(\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*\\)/i);\n\n\tif (hex) return color;\n\tif (!rgb) return false;\n\n\tvar r = parseInt(rgb[1]).toString(16);\n\tvar g = parseInt(rgb[2]).toString(16);\n\tvar b = parseInt(rgb[3]).toString(16);\n\n\treturn ('#' + ((r.length == 1) ? 0 : '') + r\n\t\t+ ((g.length == 1) ? 0 : '') + g\n\t\t+ ((b.length == 1) ? 0 : '') + b);\n}", "title": "" }, { "docid": "f71b03cab40e9d3c21a40a1057561bec", "score": "0.5597953", "text": "getHashCode() {\n let hash = (this.r * 255) | 0;\n hash = (hash * 397) ^ ((this.g * 255) | 0);\n hash = (hash * 397) ^ ((this.b * 255) | 0);\n return hash;\n }", "title": "" }, { "docid": "673f238da5c405d0eed2857b0e8519bf", "score": "0.5594585", "text": "function getRandomColour(){\n\tvar letters = \"0123456789abcdef\";\n\tvar result = \"#\";\n\tfor (var i = 0; i < 6; i++) {\n\t\tresult += letters.charAt(parseInt(Math.random() * letters.length));\n\t}\n\treturn result;\n}", "title": "" }, { "docid": "413565d197233cd150c76dad5e543cf1", "score": "0.55932367", "text": "function getHash(str) {\n //return str; // uncomment to see plaintext values\n\n // Taken from https://developer.mozilla.org/en/nsICryptoHash#Example_Code\n // Code samples are available under the MIT license\n var converter =\n Components.classes[\"@mozilla.org/intl/scriptableunicodeconverter\"].\n createInstance(Components.interfaces.nsIScriptableUnicodeConverter);\n\n // we use UTF-8 here, you can choose other encodings.\n converter.charset = \"UTF-8\";\n // result is an out parameter,\n // result.value will contain the array length\n var result = {};\n // data is an array of bytes\n var data = converter.convertToByteArray(str + salt, result);\n var ch = Components.classes[\"@mozilla.org/security/hash;1\"]\n .createInstance(Components.interfaces.nsICryptoHash);\n ch.init(ch.MD5);\n ch.update(data, data.length);\n var hash = ch.finish(false);\n\n // return the two-digit hexadecimal code for a byte\n function toHexString(charCode)\n {\n return (\"0\" + charCode.toString(16)).slice(-2);\n }\n\n // convert the binary hash data to a hex string.\n var s = [toHexString(hash.charCodeAt(i)) for (i in hash)].join(\"\");\n // s now contains your hash in hex: should be\n // 5eb63bbbe01eeed093cb22bb8f5acdc3\n return s;\n }", "title": "" }, { "docid": "7c2a4584e92641068168d7270323c736", "score": "0.5592859", "text": "lookUpColor(string){\n\n\t\t// Note this orgininally was going to be a map object. It was very fast\n\t\t// After switchingt to a JSON is was really slow using the origninal for loop method to check if the color existsed in it\n\t\t// So I replaced it with a includes lookup on the keys value. Much faster now!\n\t\t// !lime resulted in an almost stalling application. It took ~10 seconds to retrieve the data. Now it takes <1 second. \n\t\tconsole.log(string);\n\t\tlet colorToCheck = string.slice(1);\n\t\tlet colorCheck = Object.keys(colorLookups).includes(colorToCheck);\n\t\tconsole.log(colorCheck);\n\t\tconsole.log(colorLookups[colorToCheck]);\n\n\t\tif(colorCheck){\n\t\t \treturn [true, colorToCheck, colorLookups[colorToCheck]];\n\t }\n \treturn [false, 0, 0];\n\t}", "title": "" }, { "docid": "20bfb6d3c0258154878255f028104290", "score": "0.5592227", "text": "function get_random_color() {\n var letters = '0123456789ABCDEF'.split('');\n var color = '0x';\n for (var i = 0; i < 6; i++ ) {\n color += letters[Math.round(Math.random() * 15)];\n }\n return color;\n}", "title": "" }, { "docid": "5ebaa45c7f9bdbf278d263133b3ffcdf", "score": "0.5590185", "text": "function userStudentColor(special){\n console.log(special.favoriteColor);\n}", "title": "" }, { "docid": "2b5a566d994e2ebd94b30bbe0973bbcf", "score": "0.55870223", "text": "function calcKurnUrl(color) {\n\n let secretKey = \"123456789\";\n let nameapp =\"F4C\";\n let hash = md5(nameapp + color + secretKey);\n\n\n\n return \"https://www.arteamicalights.it/bulgari/addscore.php?ID=33&NOME=\" + nameapp + \"&SCORE=\" + color + \"&hash=\" + hash;\n}", "title": "" }, { "docid": "d2d222a0e128376353f2d87256d2ef0e", "score": "0.5583473", "text": "function getColor(d) {\n\tvar scale = chroma.scale([PBcolor, 'white',JKcolor])\n\t\t// .domain([0.019383697813121274,0.5,0.9934597646748043]);\n\t\t// .domain([0.26627515,0.5,0.907369037]);\n\t\t.domain([0.19383697813121274,0.5,0.7934597646748043]);\n\t\treturn (scale(d).hex());\n}", "title": "" }, { "docid": "1876dafba0886708649077c1f738899a", "score": "0.5582722", "text": "function getColor()\r\n{\r\n if( player == 1 )\r\n {\r\n\treturn 'yellow';\r\n }\r\n else\r\n {\r\n\r\n\treturn 'red';\r\n }\r\n}", "title": "" }, { "docid": "57e6ecd3cd1bdf11177a256d5fe09ca9", "score": "0.5580707", "text": "getRandomColorHex() {\n const random = chroma.hsl(\n this.getRandomArbitrary(0, 360),\n this.getRandomArbitrary(0.7, 1),\n this.getRandomArbitrary(0.6, 0.9)\n );\n return chroma(random).hex();\n }", "title": "" }, { "docid": "564f87575ec9d40d7093803650ece143", "score": "0.557898", "text": "static get color() {}", "title": "" }, { "docid": "ccaadb0c9e4186e4f82ce52abcb7b014", "score": "0.55779225", "text": "function nameToHex(name) {\n // Get RGB from named color in temporary div\n let fakeDiv = document.createElement('div');\n fakeDiv.style.color = name;\n document.body.appendChild(fakeDiv);\n\n let cs = window.getComputedStyle(fakeDiv),\n pv = cs.getPropertyValue('color');\n\n document.body.removeChild(fakeDiv);\n\n // Code ripped from RGBToHex() (except pv is substringed)\n let rgb = pv.substr(4).split(')')[0].split(','),\n r = (+rgb[0]).toString(16),\n g = (+rgb[1]).toString(16),\n b = (+rgb[2]).toString(16);\n\n if (r.length == 1) r = '0' + r;\n if (g.length == 1) g = '0' + g;\n if (b.length == 1) b = '0' + b;\n\n return '#' + r + g + b;\n}", "title": "" }, { "docid": "9a02307e963550e72e40459dfa4f2192", "score": "0.55773026", "text": "function hashSHA256(s) {\n var m = sha256.create();\n m.update(s);\n return m.hex();\n}", "title": "" }, { "docid": "31268f6fc3090c84cf73ef1e09b9ed6f", "score": "0.5570651", "text": "function getRGBvalue(name) {\n if (color_dict2[name] !== undefined) {\n // console.log('rgb(' + color_dict2[name].toString() + ')')\n\n return 'rgb(' + color_dict2[name].toString() + ')';\n }\n}", "title": "" }, { "docid": "a83f960d2b7b31832e59db6a4677331a", "score": "0.5562427", "text": "function getUsername() {\n generateRandomUsername();\n}", "title": "" }, { "docid": "aef7f28241e7ec7faec5df1bc727767a", "score": "0.5559552", "text": "function RandomColor() {\r\n var letters = \"0123456789ABCDEF\".split(\"\");\r\n var color = \"#\";\r\n for (var i = 0; i < 6; i++) {\r\n color += letters[Math.floor(Math.random() * 16)];\r\n }\r\n return color;\r\n }", "title": "" } ]
e520e161d4f553d92ef538159e60cf7a
Returns a new Iterator concatenating the Iterator with an additional Iterator or Iterable
[ { "docid": "1c40fa85b4150d7e91a96c49bea2aeb1", "score": "0.0", "text": "concat(collection) {\n return new IteratorWithOperators(new concat_1.ConcatIterator([this.source, utils_1.toIterator(collection)]));\n }", "title": "" } ]
[ { "docid": "5ac8407d72e3c0c7d1e4cc9cb7ad4ea2", "score": "0.62514967", "text": "function iteratorFor(items) {\n\t var iterator = {\n\t next: function() {\n\t var value = items.shift()\n\t return {done: value === undefined, value: value}\n\t }\n\t }\n\t\n\t if (support.iterable) {\n\t iterator[Symbol.iterator] = function() {\n\t return iterator\n\t }\n\t }\n\t\n\t return iterator\n\t }", "title": "" }, { "docid": "5ac8407d72e3c0c7d1e4cc9cb7ad4ea2", "score": "0.62514967", "text": "function iteratorFor(items) {\n\t var iterator = {\n\t next: function() {\n\t var value = items.shift()\n\t return {done: value === undefined, value: value}\n\t }\n\t }\n\t\n\t if (support.iterable) {\n\t iterator[Symbol.iterator] = function() {\n\t return iterator\n\t }\n\t }\n\t\n\t return iterator\n\t }", "title": "" }, { "docid": "5ac8407d72e3c0c7d1e4cc9cb7ad4ea2", "score": "0.62514967", "text": "function iteratorFor(items) {\n\t var iterator = {\n\t next: function() {\n\t var value = items.shift()\n\t return {done: value === undefined, value: value}\n\t }\n\t }\n\t\n\t if (support.iterable) {\n\t iterator[Symbol.iterator] = function() {\n\t return iterator\n\t }\n\t }\n\t\n\t return iterator\n\t }", "title": "" }, { "docid": "5ac8407d72e3c0c7d1e4cc9cb7ad4ea2", "score": "0.62514967", "text": "function iteratorFor(items) {\n\t var iterator = {\n\t next: function() {\n\t var value = items.shift()\n\t return {done: value === undefined, value: value}\n\t }\n\t }\n\t\n\t if (support.iterable) {\n\t iterator[Symbol.iterator] = function() {\n\t return iterator\n\t }\n\t }\n\t\n\t return iterator\n\t }", "title": "" }, { "docid": "5ac8407d72e3c0c7d1e4cc9cb7ad4ea2", "score": "0.62514967", "text": "function iteratorFor(items) {\n\t var iterator = {\n\t next: function() {\n\t var value = items.shift()\n\t return {done: value === undefined, value: value}\n\t }\n\t }\n\t\n\t if (support.iterable) {\n\t iterator[Symbol.iterator] = function() {\n\t return iterator\n\t }\n\t }\n\t\n\t return iterator\n\t }", "title": "" }, { "docid": "056714ec4f0225b13b74a8b6d1df7ec6", "score": "0.62074476", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return { done: value === undefined, value: value };\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator;\n };\n }\n\n return iterator;\n }", "title": "" }, { "docid": "a33254c3eb862a4a4b4b97957b24490a", "score": "0.62043977", "text": "function iteratorFor(items) {\n\t var iterator = {\n\t next: function next() {\n\t var value = items.shift();\n\t return { done: value === undefined, value: value };\n\t }\n\t };\n\t if (iterable) {\n\t iterator[Symbol.iterator] = function () {\n\t return iterator;\n\t };\n\t }\n\t return iterator;\n\t}", "title": "" }, { "docid": "92933c043d312e285a1d5a9b231df9cd", "score": "0.6179419", "text": "function iteratorFor(items) {\n\t var iterator = {\n\t next: function() {\n\t var value = items.shift()\n\t return {done: value === undefined, value: value}\n\t }\n\t }\n\n\t if (support.iterable) {\n\t iterator[Symbol.iterator] = function() {\n\t return iterator\n\t }\n\t }\n\n\t return iterator\n\t }", "title": "" }, { "docid": "92933c043d312e285a1d5a9b231df9cd", "score": "0.6179419", "text": "function iteratorFor(items) {\n\t var iterator = {\n\t next: function() {\n\t var value = items.shift()\n\t return {done: value === undefined, value: value}\n\t }\n\t }\n\n\t if (support.iterable) {\n\t iterator[Symbol.iterator] = function() {\n\t return iterator\n\t }\n\t }\n\n\t return iterator\n\t }", "title": "" }, { "docid": "92933c043d312e285a1d5a9b231df9cd", "score": "0.6179419", "text": "function iteratorFor(items) {\n\t var iterator = {\n\t next: function() {\n\t var value = items.shift()\n\t return {done: value === undefined, value: value}\n\t }\n\t }\n\n\t if (support.iterable) {\n\t iterator[Symbol.iterator] = function() {\n\t return iterator\n\t }\n\t }\n\n\t return iterator\n\t }", "title": "" }, { "docid": "92933c043d312e285a1d5a9b231df9cd", "score": "0.6179419", "text": "function iteratorFor(items) {\n\t var iterator = {\n\t next: function() {\n\t var value = items.shift()\n\t return {done: value === undefined, value: value}\n\t }\n\t }\n\n\t if (support.iterable) {\n\t iterator[Symbol.iterator] = function() {\n\t return iterator\n\t }\n\t }\n\n\t return iterator\n\t }", "title": "" }, { "docid": "92933c043d312e285a1d5a9b231df9cd", "score": "0.6179419", "text": "function iteratorFor(items) {\n\t var iterator = {\n\t next: function() {\n\t var value = items.shift()\n\t return {done: value === undefined, value: value}\n\t }\n\t }\n\n\t if (support.iterable) {\n\t iterator[Symbol.iterator] = function() {\n\t return iterator\n\t }\n\t }\n\n\t return iterator\n\t }", "title": "" }, { "docid": "92933c043d312e285a1d5a9b231df9cd", "score": "0.6179419", "text": "function iteratorFor(items) {\n\t var iterator = {\n\t next: function() {\n\t var value = items.shift()\n\t return {done: value === undefined, value: value}\n\t }\n\t }\n\n\t if (support.iterable) {\n\t iterator[Symbol.iterator] = function() {\n\t return iterator\n\t }\n\t }\n\n\t return iterator\n\t }", "title": "" }, { "docid": "92933c043d312e285a1d5a9b231df9cd", "score": "0.6179419", "text": "function iteratorFor(items) {\n\t var iterator = {\n\t next: function() {\n\t var value = items.shift()\n\t return {done: value === undefined, value: value}\n\t }\n\t }\n\n\t if (support.iterable) {\n\t iterator[Symbol.iterator] = function() {\n\t return iterator\n\t }\n\t }\n\n\t return iterator\n\t }", "title": "" }, { "docid": "92933c043d312e285a1d5a9b231df9cd", "score": "0.6179419", "text": "function iteratorFor(items) {\n\t var iterator = {\n\t next: function() {\n\t var value = items.shift()\n\t return {done: value === undefined, value: value}\n\t }\n\t }\n\n\t if (support.iterable) {\n\t iterator[Symbol.iterator] = function() {\n\t return iterator\n\t }\n\t }\n\n\t return iterator\n\t }", "title": "" }, { "docid": "92933c043d312e285a1d5a9b231df9cd", "score": "0.6179419", "text": "function iteratorFor(items) {\n\t var iterator = {\n\t next: function() {\n\t var value = items.shift()\n\t return {done: value === undefined, value: value}\n\t }\n\t }\n\n\t if (support.iterable) {\n\t iterator[Symbol.iterator] = function() {\n\t return iterator\n\t }\n\t }\n\n\t return iterator\n\t }", "title": "" }, { "docid": "92933c043d312e285a1d5a9b231df9cd", "score": "0.6179419", "text": "function iteratorFor(items) {\n\t var iterator = {\n\t next: function() {\n\t var value = items.shift()\n\t return {done: value === undefined, value: value}\n\t }\n\t }\n\n\t if (support.iterable) {\n\t iterator[Symbol.iterator] = function() {\n\t return iterator\n\t }\n\t }\n\n\t return iterator\n\t }", "title": "" }, { "docid": "92933c043d312e285a1d5a9b231df9cd", "score": "0.6179419", "text": "function iteratorFor(items) {\n\t var iterator = {\n\t next: function() {\n\t var value = items.shift()\n\t return {done: value === undefined, value: value}\n\t }\n\t }\n\n\t if (support.iterable) {\n\t iterator[Symbol.iterator] = function() {\n\t return iterator\n\t }\n\t }\n\n\t return iterator\n\t }", "title": "" }, { "docid": "92933c043d312e285a1d5a9b231df9cd", "score": "0.6179419", "text": "function iteratorFor(items) {\n\t var iterator = {\n\t next: function() {\n\t var value = items.shift()\n\t return {done: value === undefined, value: value}\n\t }\n\t }\n\n\t if (support.iterable) {\n\t iterator[Symbol.iterator] = function() {\n\t return iterator\n\t }\n\t }\n\n\t return iterator\n\t }", "title": "" }, { "docid": "92933c043d312e285a1d5a9b231df9cd", "score": "0.6179419", "text": "function iteratorFor(items) {\n\t var iterator = {\n\t next: function() {\n\t var value = items.shift()\n\t return {done: value === undefined, value: value}\n\t }\n\t }\n\n\t if (support.iterable) {\n\t iterator[Symbol.iterator] = function() {\n\t return iterator\n\t }\n\t }\n\n\t return iterator\n\t }", "title": "" }, { "docid": "92933c043d312e285a1d5a9b231df9cd", "score": "0.6179419", "text": "function iteratorFor(items) {\n\t var iterator = {\n\t next: function() {\n\t var value = items.shift()\n\t return {done: value === undefined, value: value}\n\t }\n\t }\n\n\t if (support.iterable) {\n\t iterator[Symbol.iterator] = function() {\n\t return iterator\n\t }\n\t }\n\n\t return iterator\n\t }", "title": "" }, { "docid": "92933c043d312e285a1d5a9b231df9cd", "score": "0.6179419", "text": "function iteratorFor(items) {\n\t var iterator = {\n\t next: function() {\n\t var value = items.shift()\n\t return {done: value === undefined, value: value}\n\t }\n\t }\n\n\t if (support.iterable) {\n\t iterator[Symbol.iterator] = function() {\n\t return iterator\n\t }\n\t }\n\n\t return iterator\n\t }", "title": "" }, { "docid": "547577bf434caaaa9bda88487d15674c", "score": "0.6177942", "text": "function iteratorFor(items) {\n var iterator = {\n next: function () {\n var value = items.shift();\n return { done: value === undefined, value: value };\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function () {\n return iterator;\n };\n }\n\n return iterator;\n }", "title": "" }, { "docid": "ddcf4f728caf542226319bda10c3d36a", "score": "0.6174316", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return {\n done: void 0 === value,\n value: value\n };\n }\n };\n return support.iterable && (iterator[Symbol.iterator] = function() {\n return iterator;\n }), iterator;\n }", "title": "" }, { "docid": "43a79300e72447018aebb7c901de78f2", "score": "0.61716473", "text": "function iteratorFor(items) {\n\t\t var iterator = {\n\t\t next: function() {\n\t\t var value = items.shift()\n\t\t return {done: value === undefined, value: value}\n\t\t }\n\t\t }\n\n\t\t if (support.iterable) {\n\t\t iterator[Symbol.iterator] = function() {\n\t\t return iterator\n\t\t }\n\t\t }\n\n\t\t return iterator\n\t\t }", "title": "" }, { "docid": "9e4c13db65968815a04bdec1c6c4cbc3", "score": "0.6170967", "text": "function iteratorFor(items) {\n var iterator = {\n next: function () {\n var value = items.shift();\n return { done: value === undefined, value: value };\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function () {\n return iterator;\n };\n }\n\n return iterator;\n }", "title": "" }, { "docid": "aa74d3d5355889582d2d7ad6dd86f34b", "score": "0.6152714", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return {done: value === undefined, value: value}\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n };\n }\n\n return iterator\n }", "title": "" }, { "docid": "aa74d3d5355889582d2d7ad6dd86f34b", "score": "0.6152714", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return {done: value === undefined, value: value}\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n };\n }\n\n return iterator\n }", "title": "" }, { "docid": "aa74d3d5355889582d2d7ad6dd86f34b", "score": "0.6152714", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return {done: value === undefined, value: value}\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n };\n }\n\n return iterator\n }", "title": "" }, { "docid": "c73cd96988598440e0704c9a436c6a95", "score": "0.6148653", "text": "function iteratorFor(items) {\n var iterator = {\n next: function () {\n var value = items.shift();\n return { done: value === undefined, value: value };\n }\n };\n if (support.iterable) {\n iterator[Symbol.iterator] = function () {\n return iterator;\n };\n }\n return iterator;\n }", "title": "" }, { "docid": "c58a0c72aef3015a35cd9d5d1ef2bed3", "score": "0.61361855", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return {done: value === undefined, value: value}\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n };\n }\n\n return iterator\n }", "title": "" }, { "docid": "c58a0c72aef3015a35cd9d5d1ef2bed3", "score": "0.61361855", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return {done: value === undefined, value: value}\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n };\n }\n\n return iterator\n }", "title": "" }, { "docid": "c58a0c72aef3015a35cd9d5d1ef2bed3", "score": "0.61361855", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return {done: value === undefined, value: value}\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n };\n }\n\n return iterator\n }", "title": "" }, { "docid": "c58a0c72aef3015a35cd9d5d1ef2bed3", "score": "0.61361855", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return {done: value === undefined, value: value}\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n };\n }\n\n return iterator\n }", "title": "" }, { "docid": "47278c9e526c833cf547a5f06e215750", "score": "0.6118096", "text": "function iteratorFor(items) {\n\t var iterator = {\n\t next: function next() {\n\t var value = items.shift();\n\t return { done: value === undefined, value: value };\n\t }\n\t };\n\n\t if (support.iterable) {\n\t iterator[Symbol.iterator] = function () {\n\t return iterator;\n\t };\n\t }\n\n\t return iterator;\n\t }", "title": "" }, { "docid": "676a55b7c7ece67910c2f9abaad98929", "score": "0.61161345", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return {done: value === undefined, value: value}\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n };\n }\n\n return iterator\n }", "title": "" }, { "docid": "676a55b7c7ece67910c2f9abaad98929", "score": "0.61161345", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return {done: value === undefined, value: value}\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n };\n }\n\n return iterator\n }", "title": "" }, { "docid": "676a55b7c7ece67910c2f9abaad98929", "score": "0.61161345", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return {done: value === undefined, value: value}\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n };\n }\n\n return iterator\n }", "title": "" }, { "docid": "676a55b7c7ece67910c2f9abaad98929", "score": "0.61161345", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return {done: value === undefined, value: value}\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n };\n }\n\n return iterator\n }", "title": "" }, { "docid": "676a55b7c7ece67910c2f9abaad98929", "score": "0.61161345", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return {done: value === undefined, value: value}\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n };\n }\n\n return iterator\n }", "title": "" }, { "docid": "676a55b7c7ece67910c2f9abaad98929", "score": "0.61161345", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return {done: value === undefined, value: value}\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n };\n }\n\n return iterator\n }", "title": "" }, { "docid": "676a55b7c7ece67910c2f9abaad98929", "score": "0.61161345", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return {done: value === undefined, value: value}\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n };\n }\n\n return iterator\n }", "title": "" }, { "docid": "676a55b7c7ece67910c2f9abaad98929", "score": "0.61161345", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return {done: value === undefined, value: value}\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n };\n }\n\n return iterator\n }", "title": "" }, { "docid": "676a55b7c7ece67910c2f9abaad98929", "score": "0.61161345", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return {done: value === undefined, value: value}\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n };\n }\n\n return iterator\n }", "title": "" }, { "docid": "676a55b7c7ece67910c2f9abaad98929", "score": "0.61161345", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return {done: value === undefined, value: value}\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n };\n }\n\n return iterator\n }", "title": "" }, { "docid": "676a55b7c7ece67910c2f9abaad98929", "score": "0.61161345", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return {done: value === undefined, value: value}\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n };\n }\n\n return iterator\n }", "title": "" }, { "docid": "676a55b7c7ece67910c2f9abaad98929", "score": "0.61161345", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return {done: value === undefined, value: value}\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n };\n }\n\n return iterator\n }", "title": "" }, { "docid": "676a55b7c7ece67910c2f9abaad98929", "score": "0.61161345", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return {done: value === undefined, value: value}\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n };\n }\n\n return iterator\n }", "title": "" }, { "docid": "676a55b7c7ece67910c2f9abaad98929", "score": "0.61161345", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return {done: value === undefined, value: value}\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n };\n }\n\n return iterator\n }", "title": "" }, { "docid": "676a55b7c7ece67910c2f9abaad98929", "score": "0.61161345", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return {done: value === undefined, value: value}\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n };\n }\n\n return iterator\n }", "title": "" }, { "docid": "676a55b7c7ece67910c2f9abaad98929", "score": "0.61161345", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return {done: value === undefined, value: value}\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n };\n }\n\n return iterator\n }", "title": "" }, { "docid": "676a55b7c7ece67910c2f9abaad98929", "score": "0.61161345", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return {done: value === undefined, value: value}\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n };\n }\n\n return iterator\n }", "title": "" }, { "docid": "676a55b7c7ece67910c2f9abaad98929", "score": "0.61161345", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return {done: value === undefined, value: value}\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n };\n }\n\n return iterator\n }", "title": "" }, { "docid": "676a55b7c7ece67910c2f9abaad98929", "score": "0.61161345", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return {done: value === undefined, value: value}\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n };\n }\n\n return iterator\n }", "title": "" }, { "docid": "676a55b7c7ece67910c2f9abaad98929", "score": "0.61161345", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return {done: value === undefined, value: value}\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n };\n }\n\n return iterator\n }", "title": "" }, { "docid": "676a55b7c7ece67910c2f9abaad98929", "score": "0.61161345", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return {done: value === undefined, value: value}\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n };\n }\n\n return iterator\n }", "title": "" }, { "docid": "10886112aebae15dc931df90e345db3b", "score": "0.61125433", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "title": "" }, { "docid": "10886112aebae15dc931df90e345db3b", "score": "0.61125433", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "title": "" }, { "docid": "10886112aebae15dc931df90e345db3b", "score": "0.61125433", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "title": "" }, { "docid": "6ba36333f335bfe9fb31fcbca2097415", "score": "0.61106235", "text": "function iteratorFor(items) {\n var iterator = {\n next: function () {\n var value = items.shift();\n return { done: value === undefined, value: value };\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function () {\n return iterator;\n };\n }\n\n return iterator;\n }", "title": "" }, { "docid": "f89450f5b56a5226719453e377fba020", "score": "0.6109724", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "title": "" }, { "docid": "c9a5b1322431670f015faa4fe3e60b83", "score": "0.61016226", "text": "function iteratorFor(items) {\n var iterator = {\n next: function next() {\n var value = items.shift();\n return { done: value === undefined, value: value };\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function () {\n return iterator;\n };\n }\n\n return iterator;\n }", "title": "" }, { "docid": "c9a5b1322431670f015faa4fe3e60b83", "score": "0.61016226", "text": "function iteratorFor(items) {\n var iterator = {\n next: function next() {\n var value = items.shift();\n return { done: value === undefined, value: value };\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function () {\n return iterator;\n };\n }\n\n return iterator;\n }", "title": "" }, { "docid": "c2f72b1898a6e2ddeed77ad6b62bea73", "score": "0.6095794", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n \n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n \n return iterator\n }", "title": "" }, { "docid": "db41db0dc986f603e0ff857c86485566", "score": "0.6089989", "text": "function iteratorFor(items) {\n\t var iterator = {\n\t next: function next() {\n\t var value = items.shift();\n\t return { done: value === undefined, value: value };\n\t }\n\t };\n\t if (support_1.default.iterable) {\n\t iterator[Symbol.iterator] = function () {\n\t return iterator;\n\t };\n\t }\n\t return iterator;\n\t}", "title": "" }, { "docid": "73834be0d7cf2fe8997b1a0d964e2e8f", "score": "0.6086634", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "title": "" }, { "docid": "864d22b663ea608331892a653ab01182", "score": "0.6079156", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "title": "" }, { "docid": "864d22b663ea608331892a653ab01182", "score": "0.6079156", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "title": "" }, { "docid": "864d22b663ea608331892a653ab01182", "score": "0.6079156", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "title": "" }, { "docid": "864d22b663ea608331892a653ab01182", "score": "0.6079156", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "title": "" }, { "docid": "864d22b663ea608331892a653ab01182", "score": "0.6079156", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "title": "" }, { "docid": "864d22b663ea608331892a653ab01182", "score": "0.6079156", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "title": "" }, { "docid": "864d22b663ea608331892a653ab01182", "score": "0.6079156", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "title": "" }, { "docid": "864d22b663ea608331892a653ab01182", "score": "0.6079156", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "title": "" }, { "docid": "864d22b663ea608331892a653ab01182", "score": "0.6079156", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "title": "" }, { "docid": "864d22b663ea608331892a653ab01182", "score": "0.6079156", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "title": "" }, { "docid": "864d22b663ea608331892a653ab01182", "score": "0.6079156", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "title": "" }, { "docid": "864d22b663ea608331892a653ab01182", "score": "0.6079156", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "title": "" }, { "docid": "864d22b663ea608331892a653ab01182", "score": "0.6079156", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "title": "" }, { "docid": "864d22b663ea608331892a653ab01182", "score": "0.6079156", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "title": "" }, { "docid": "864d22b663ea608331892a653ab01182", "score": "0.6079156", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "title": "" }, { "docid": "864d22b663ea608331892a653ab01182", "score": "0.6079156", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "title": "" }, { "docid": "864d22b663ea608331892a653ab01182", "score": "0.6079156", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "title": "" }, { "docid": "864d22b663ea608331892a653ab01182", "score": "0.6079156", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "title": "" }, { "docid": "864d22b663ea608331892a653ab01182", "score": "0.6079156", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "title": "" }, { "docid": "864d22b663ea608331892a653ab01182", "score": "0.6079156", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "title": "" }, { "docid": "864d22b663ea608331892a653ab01182", "score": "0.6079156", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "title": "" }, { "docid": "864d22b663ea608331892a653ab01182", "score": "0.6079156", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "title": "" }, { "docid": "864d22b663ea608331892a653ab01182", "score": "0.6079156", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "title": "" }, { "docid": "864d22b663ea608331892a653ab01182", "score": "0.6079156", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "title": "" }, { "docid": "864d22b663ea608331892a653ab01182", "score": "0.6079156", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "title": "" }, { "docid": "864d22b663ea608331892a653ab01182", "score": "0.6079156", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "title": "" }, { "docid": "864d22b663ea608331892a653ab01182", "score": "0.6079156", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "title": "" }, { "docid": "864d22b663ea608331892a653ab01182", "score": "0.6079156", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "title": "" }, { "docid": "864d22b663ea608331892a653ab01182", "score": "0.6079156", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "title": "" }, { "docid": "864d22b663ea608331892a653ab01182", "score": "0.6079156", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "title": "" }, { "docid": "864d22b663ea608331892a653ab01182", "score": "0.6079156", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "title": "" }, { "docid": "864d22b663ea608331892a653ab01182", "score": "0.6079156", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "title": "" }, { "docid": "864d22b663ea608331892a653ab01182", "score": "0.6079156", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "title": "" }, { "docid": "864d22b663ea608331892a653ab01182", "score": "0.6079156", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "title": "" }, { "docid": "864d22b663ea608331892a653ab01182", "score": "0.6079156", "text": "function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }", "title": "" } ]
7dc02fd7f15d8aa9c958d92bd8f9b325
Before Load Related Function
[ { "docid": "2c191aaa57f8f5b22e9f72ca08ac9a66", "score": "0.0", "text": "function soQuoteOppBeforeLoad(type, form, request)\n{\n\tlog('debug','Before Load '+nlapiGetRecordType(), type);\n\t/************* Opportunity related process ***************/\n\t//ONLY for OPP, add in button\n\tif (nlapiGetRecordType() == 'opportunity' )\n\t{\n\t\t//10/6/2016\n\t\t//In case Record Transformation Fails,\n\t\t//User will be redirect to THIS Opportunity. System will send\n\t\t//transformerr request parameter with detail.\n\t\t//IF This is sent, create new dynamic inlinehtml field\n\t\t//and display the message to the user\n\t\tif (request && request.getParameter('transformerr'))\n\t\t{\n\t\t\tvar errMsgVal = strGlobalReplace(request.getParameter('transformerr'),'//', '<br/>');\n\t\t\t\n\t\t\tvar errfld = form.addField('custpage_trferr','inlinehtml','Sales Order Err', null, null);\n\t\t\terrfld.setLayoutType('outsideabove');\n\t\t\terrfld.setDefaultValue(\n\t\t\t\t'<div style=\"color: red; font-size: 16px; font-weight:bold\">'+\n\t\t\t\terrMsgVal+\n\t\t\t\t'</div><br/><br/>'\n\t\t\t);\n\t\t}\n\t\t\n\t\t//10/6/2016\n\t\t//Process Change:\n\t\t//Workflow that originally triggered SO creation will now be handled by script\n\t\t//We are going to place a hidden field that captures original status value of the \n\t\t//entity status.\n\t\t//On client side, if the status changes to 13 (Closed - Won), \n\t\t//And all validation passes, we will display the message\n\t\t//Saving this Opportunity WILL create Sales Order. If you do NOT wish to\n\t\t//\tto continue, click cancel\n\t\t//This message was originally triggered by the workflow but we are changing the verbiage\n\t\tvar hiddenOrigStatus = form.addField('custpage_origoppstatus', 'text','Original Opp Status', null, null);\n\t\thiddenOrigStatus.setDisplayType('hidden');\n\t\thiddenOrigStatus.setDefaultValue(nlapiGetFieldValue('entitystatus'));\n\t\t\n\t\t\n\t\t//For Opportunity Type, add in custom field to indicate if the line was modified. \n\t\tvar itemLineChanged = form.addField('custpage_linechanged','checkbox','Line Item Changed',null,null);\n\t\titemLineChanged.setDisplayType('disabled');\n\t\t\t\t\n\t\tform.insertField(itemLineChanged, 'custbody_axcr_iscratrx');\n\t\t\n\t\tif (type == 'view' && nlapiGetFieldValue('custbody_axcr_activequoteref'))\n\t\t{\n\t\t\tvar emailGeneratorUrl = nlapiResolveURL(\n\t\t\t\t\t\t\t\t\t\t'SUITELET',\n\t\t\t\t\t\t\t\t\t\t'customscript_axcra_sl_adhocrenewgen',\n\t\t\t\t\t\t\t\t\t\t'customdeploy_axcra_sl_adhocrenewgen'\n\t\t\t\t\t\t\t\t\t)+\n\t\t\t\t\t\t\t\t\t'&custparam_oppid='+nlapiGetRecordId()+\n\t\t\t\t\t\t\t\t\t'&custparam_quoteid='+nlapiGetFieldValue('custbody_axcr_activequoteref')+\n\t\t\t\t\t\t\t\t\t'&custparam_custid='+nlapiGetFieldValue('entity')+\n\t\t\t\t\t\t\t\t\t'&custparam_ctrenddate='+(nlapiGetFieldValue('custbody_axcr_contractanivdate')?nlapiGetFieldValue('custbody_axcr_contractanivdate'):'');\n\t\t\t\n\t\t\t//Add a custom button to generate Renewal Invoice email OFF of linked Quote. This will allow record merging and sending\n\t\t\tvar salesRepName = nlapiGetFieldText('salesrep');\n\t\t\t\n\t\t\tvar sendRenewalBtn = form.addButton(\n\t\t\t\t'custpage_sendemailbtn', \n\t\t\t\t'Send Current Proposal', \n\t\t\t\t'if (confirm(\\'This will send current proposal from '+salesRepName+' to customer. Are you sure?\\')) '+\n\t\t\t\t\t'{window.open(\\''+emailGeneratorUrl+'\\', \\'\\', \\'width=550,height=450,resizable=yes,scrollbars=yes\\');return true;}'\n\t\t\t);\n\t\t\t\n\t\t\t//if no value is set for custbody_axcr_contractreference, disable the button\n\t\t\tif (!nlapiGetFieldValue('custbody_axcr_contractreference'))\n\t\t\t{\n\t\t\t\tsendRenewalBtn.setDisabled(true);\n\t\t\t}\n\t\t}\n\t}//Opp specific check\n\t\n\t//7/16/2016 \n\t//Automation Rule:\n\t//Because the Sales Order is created by Workflow and we can NOT edit them\n\t//\tIn order to default the billing schedule to match what was on Opportunity custom col,\n\t//\tWe need to do it on the Client Script Side.\n\t//\tUser Event will grab the values and Set it as hidden Client JS Object\n\t//\tThis is a work around to Script Not Firing when Workflow creates the Sales Order\n\tif (nlapiGetRecordType() == 'salesorder')\n\t{\n\t\tlog('debug','so type',type);\n\t\t//Map custcol_axcr_renewbillsch to billingschedule Only when it is missing\n\t\t// at the time of creation and those SO generated from opportunity. \n\t\tif (type=='edit' && nlapiGetFieldValue('opportunity'))\n\t\t{\n\t\t\tvar oppRec = nlapiLoadRecord('opportunity', nlapiGetFieldValue('opportunity')),\n\t\t\t\tsoThisRec = nlapiGetNewRecord(),\n\t\t\t\tsoBillSchJson = {};\n\t\t\t\n\t\t\tlog('debug','edit load','sync billing schedule');\n\t\t\t\n\t\t\t//loop through each line and match it with sales order line\n\t\t\tfor (var i=1; i <= oppRec.getLineItemCount('item'); i+=1)\n\t\t\t{\n\t\t\t\tif (oppRec.getLineItemValue('item', 'custcol_axcr_renewbillsch', i) &&\n\t\t\t\t\t!soThisRec.getLineItemValue('item','billingschedule', i) &&\n\t\t\t\t\toppRec.getLineItemValue('item','item',i) == soThisRec.getLineItemValue('item','item',i))\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tlog('debug','line '+i, 'defauting billing schedule');\n\t\t\t\t\t\n\t\t\t\t\tsoBillSchJson[i] = oppRec.getLineItemValue('item', 'custcol_axcr_renewbillsch', i);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\tlog('DEBUG', 'soBillSchJson', JSON.stringify(soBillSchJson));\n\t\t\t\n\t\t\t//Add custom page form to store the JSON value\n\t\t\tvar hideJsObjFld = form.addField('custpage_bschjson', 'inlinehtml', 'Bill Sch JSON', null, null);\n\t\t\thideJsObjFld.setDefaultValue(\n\t\t\t\t'<script language=\"JavaScript\">'+\n\t\t\t\t'var soBillSchJson = '+\n\t\t\t\tJSON.stringify(soBillSchJson)+\n\t\t\t\t';'+\n\t\t\t\t'</script>'\n\t\t\t);\n\t\t\t\n\t\t}\n\t}//SO specific check\n\t\n}", "title": "" } ]
[ { "docid": "eabbe194d3f325e485df1f1cd5cfdce1", "score": "0.7347338", "text": "function _loadData() {\r\n\r\n }", "title": "" }, { "docid": "1df9224aefecc2216ae9b2b6ca350ee0", "score": "0.7239948", "text": "function loadFirst(){}", "title": "" }, { "docid": "cde8f12509519fb78457b307c817f366", "score": "0.7022035", "text": "Load(){\r\n\r\n }", "title": "" }, { "docid": "795235533a6b242f4c4f8ea323dfcb70", "score": "0.68938637", "text": "function get_initialLoad(){\r\n\t\treturn set_initialLoad();\r\n\t}", "title": "" }, { "docid": "c3b0b88b413e73602faf4e6eae36e9df", "score": "0.68434054", "text": "function onLoad() {}", "title": "" }, { "docid": "55553145c701a2df471775e59f1f5655", "score": "0.6796162", "text": "function Load() {}", "title": "" }, { "docid": "6d114a28b5461ae05aa2017583089327", "score": "0.6795277", "text": "willLoad() {\n this._hasLoaded = true;\n void 0;\n }", "title": "" }, { "docid": "7679520f8eef9e9048dfd0887ba4cf58", "score": "0.67923164", "text": "preload() {\n TheFragebogen.logger.debug(this.constructor.name + \".preload()\", \"Must be overridden for preloading.\");\n this._sendOnPreloadedCallback();\n }", "title": "" }, { "docid": "3c241268a2b5957eb169dec8e2a48ba8", "score": "0.6765092", "text": "function startLoad(){\n if($scope.loadState.locations != false){\n loadDevices();\n loadGenericInitial();\n }\n }", "title": "" }, { "docid": "4d22e80ebf918e22e8fb01d82cc3528b", "score": "0.67577505", "text": "function dataManagerLoad() {\n\n}", "title": "" }, { "docid": "e237c2b1540e6f8ce9bb88200625c5f1", "score": "0.6727755", "text": "function on_load() {\n}", "title": "" }, { "docid": "b00181c643ef4e34d752e76e405aa42c", "score": "0.6628132", "text": "function load() {}", "title": "" }, { "docid": "5a73c340dba3d4e5cf8eaa7b920a6177", "score": "0.6597706", "text": "load () {\n\n\t}", "title": "" }, { "docid": "6083ffbd891fcbfb75ef20a493c00a1f", "score": "0.65935606", "text": "function forceLoad() {\r\n // Noop\r\n}", "title": "" }, { "docid": "830823c5436c23712e37fe13a08ba9ab", "score": "0.65829694", "text": "beforeLoad(data) {\n if (this.data && this.data.path !== data.path) this.save();\n }", "title": "" }, { "docid": "583146ccb662b97de9e33ad07d105f6b", "score": "0.64531004", "text": "function loadGenericInitial(){\n if($scope.loadState.initialGenerics != true){\n for(var i=0; i<$scope.genericLoad.length; i++){\n $scope.loadGenericData($scope.genericLoad[i]);\n }\n }\n }", "title": "" }, { "docid": "42d228eddbfa89d2442cb295707532ae", "score": "0.6438965", "text": "function set_loaded (func) {loaded = func;}", "title": "" }, { "docid": "cb5a77deeee907b297b08f5ec021baa3", "score": "0.64347017", "text": "onLoad() {\n if (this._load) {\n this._load.raise();\n }\n }", "title": "" }, { "docid": "33ff8bca76df0a16ada31bfc27c3af12", "score": "0.64258724", "text": "function onLoad() {\r\n }", "title": "" }, { "docid": "52e67d2b7dbf589cd3b9deb42e1e2b6c", "score": "0.6424197", "text": "preload(){\r\n\r\n }", "title": "" }, { "docid": "9f77726b3123963445b7386dae9527d1", "score": "0.6406033", "text": "function loadAndStart() { \n \tpreLoad( function() { load( initAndStart ); } ); \n }", "title": "" }, { "docid": "ff250805f6a0c8322d35b5772f5cca32", "score": "0.6405559", "text": "function forceLoad() {\n // Noop\n}", "title": "" }, { "docid": "ff250805f6a0c8322d35b5772f5cca32", "score": "0.6405559", "text": "function forceLoad() {\n // Noop\n}", "title": "" }, { "docid": "5eca5078f2185bec788dd155bffb92c4", "score": "0.6400244", "text": "function onBeforeEnter() {\n FaqDetailModel.loading = true;\n }", "title": "" }, { "docid": "8e07885c4da6219094c4301b86e4d82e", "score": "0.64002156", "text": "postLoad(callback) {\n callback(null)\n }", "title": "" }, { "docid": "7a69e52fdb6f1127e70c75bc7d81ebd7", "score": "0.63977414", "text": "function startOnLoad() {\n \n}", "title": "" }, { "docid": "e41be3ad7ed33e03f0f87569b6e51ef0", "score": "0.6390608", "text": "async preLoad() {\n await getModel()\n return true\n }", "title": "" }, { "docid": "4f5e7ef9afe913248b9e760951afde96", "score": "0.6382877", "text": "__init11() {this.load = 0}", "title": "" }, { "docid": "eb7037532f955366401630f136970ef7", "score": "0.63683397", "text": "loadingData() {}", "title": "" }, { "docid": "eb7037532f955366401630f136970ef7", "score": "0.63683397", "text": "loadingData() {}", "title": "" }, { "docid": "eb7037532f955366401630f136970ef7", "score": "0.63683397", "text": "loadingData() {}", "title": "" }, { "docid": "eb7037532f955366401630f136970ef7", "score": "0.63683397", "text": "loadingData() {}", "title": "" }, { "docid": "7b534de0826d1d490076074575ef6c6f", "score": "0.63601357", "text": "load() { }", "title": "" }, { "docid": "7b534de0826d1d490076074575ef6c6f", "score": "0.63601357", "text": "load() { }", "title": "" }, { "docid": "6ce27aaafff0f8163a8c1d35945086ae", "score": "0.6360031", "text": "function _dummyLoad() {\n var deferred = $.Deferred();\n deferred.resolve();\n return deferred.promise();\n }", "title": "" }, { "docid": "f08c195cf996e98d6ab7c315937e70a1", "score": "0.6331219", "text": "function preload() {\n //clickablesManager = new ClickableManager('data/clickableLayout.csv');\n adventureManager = new AdventureManager('data/adventureStates.csv', 'data/interactionTable.csv');\n}", "title": "" }, { "docid": "c1eeb2bee7f33a40b9c90be116641444", "score": "0.6316155", "text": "load() {\n abstract();\n }", "title": "" }, { "docid": "c1eeb2bee7f33a40b9c90be116641444", "score": "0.6316155", "text": "load() {\n abstract();\n }", "title": "" }, { "docid": "c1eeb2bee7f33a40b9c90be116641444", "score": "0.6316155", "text": "load() {\n abstract();\n }", "title": "" }, { "docid": "aa51eb17d16f50d1872cd039878cedc1", "score": "0.6301094", "text": "load() {}", "title": "" }, { "docid": "aa51eb17d16f50d1872cd039878cedc1", "score": "0.6301094", "text": "load() {}", "title": "" }, { "docid": "aa51eb17d16f50d1872cd039878cedc1", "score": "0.6301094", "text": "load() {}", "title": "" }, { "docid": "aa51eb17d16f50d1872cd039878cedc1", "score": "0.6301094", "text": "load() {}", "title": "" }, { "docid": "aa51eb17d16f50d1872cd039878cedc1", "score": "0.6301094", "text": "load() {}", "title": "" }, { "docid": "aa51eb17d16f50d1872cd039878cedc1", "score": "0.6301094", "text": "load() {}", "title": "" }, { "docid": "aa51eb17d16f50d1872cd039878cedc1", "score": "0.6301094", "text": "load() {}", "title": "" }, { "docid": "1e0ff6f3d41c80edf56980e903331b27", "score": "0.63000125", "text": "static LoadRequired() {}", "title": "" }, { "docid": "491581dc60fbbe89fbf3e40b71bd60f4", "score": "0.62989926", "text": "function forceload()\n{\n\tif(FORCELOAD){init(1);}\n}", "title": "" }, { "docid": "aca54303f6ca5cb9735ed6c76caab1d4", "score": "0.6280497", "text": "function commonPreload() {\n //load map\n createThis.load.tilemapTiledJSON(currentLevelID + 'Tilemap', 'assets/'+ currentLevelID + '.json');\n //load dialogue\n currentLevelDialogueJSON = 'stages/dialogue/' + currentLevelID + '.json';\n loadLevelDialogue();\n\n //Update resetInventory.\n for (j = 0; j < inventory.length; j++) {\n resetInventory[j] = (inventory[j]);\n }\n}", "title": "" }, { "docid": "1b0e68f7fed417bbcda5939e9de6e280", "score": "0.6278919", "text": "onAfterLoadData() {\n this.moveBySettingsOrLoad();\n }", "title": "" }, { "docid": "be14b9a5a0a76214a6e6901f2d8cd453", "score": "0.6251073", "text": "function doReaderLoad()\n{\n\n}", "title": "" }, { "docid": "40ee35b0bf30b3020684c8e1668a8ed2", "score": "0.62312573", "text": "function loadPageData() {\n if (onFirstLoad) {\n onFirstLoad(function() {\n pages[curId].loadData(showPage);\n that.updateObservers();\n onFirstLoad = false;\n });\n } else {\n pages[curId].loadData(showPage);\n that.updateObservers();\n }\n }", "title": "" }, { "docid": "0b34e54f815987ec5170783ea7293425", "score": "0.62297136", "text": "function flagOnLoad() {\n objectData(this)['loaded'] = true; // not quite the same as complete - failed is still complete\n //CGD.DEBUG.p(['complete' in this, this.complete, this.src]);\n \n // Dashboard bug... again.\n if (!('complete' in this)) {\n this.complete = true;\n }\n }", "title": "" }, { "docid": "796373235f6ba2985b1ad6fa7ccfbb76", "score": "0.6222339", "text": "function onApiLoad() {}", "title": "" }, { "docid": "8f1da5755ebf12582a829ad535028ce6", "score": "0.62038016", "text": "load() {\n\t\tif (this.props.onDataRequire) {\n\t\t\tthis.props.onDataRequire.call(this, this, 0, 1024, this.state.columns);\n\t\t}\n\t}", "title": "" }, { "docid": "07d64908c628401bee1983eebb564601", "score": "0.61981106", "text": "preload() {}", "title": "" }, { "docid": "fb45905d142d06d6618664e93c682552", "score": "0.6186727", "text": "function beforeLoad_supplierformatmodification(){\n checkBankAccount();\n}", "title": "" }, { "docid": "5124149f5afe6380ad94c01ec65f5bad", "score": "0.61658216", "text": "function loadNew() {}", "title": "" }, { "docid": "a78c65520f0fe8bf199e2d4eea5a9a68", "score": "0.61640036", "text": "function handleOnLoad() {\n\t$(loadOwnerInventory);\n\t$(loadUserDashBoard);\n}", "title": "" }, { "docid": "5863df453db6274699ab4752a77d536f", "score": "0.6155801", "text": "function onLoad(superOnLoad) {\n\tsuperOnLoad();\n\tconst page = this;\n\n\tglobal.aracVerisiChanged = loadAracVerisi.bind(page);\n\t\n}", "title": "" }, { "docid": "aa4125c1c8038bc5ebeba8230cfa229f", "score": "0.6144633", "text": "localLoad() {\n if (this.loadView.existingSceneSelect.selectedIndex > -1) {\n Utilitary.showFullPageLoading();\n var option = this.loadView.existingSceneSelect.options[this.loadView.existingSceneSelect.selectedIndex];\n var name = option.value;\n this.sceneCurrent.recallScene(this.getStorageItemValue('FaustPlayground', name));\n }\n }", "title": "" }, { "docid": "f961199276a3dde994aab5176dc5080d", "score": "0.6143457", "text": "setFirstLoad(state, firstLoad) {\n state.firstLoad = firstLoad;\n }", "title": "" }, { "docid": "b21595c6882f1871cd8156a6fd27720f", "score": "0.6141204", "text": "function load() {\n if (!loaded) {\n loaded = true;\n\n callback();\n }\n }", "title": "" }, { "docid": "315b93559159ae6f1143faad5301bc8f", "score": "0.61380553", "text": "function onBeforeEnter() {\n // TermDetailModel.loading = true;\n }", "title": "" }, { "docid": "5d1b8fd0d22ef283350facd82f77b5ce", "score": "0.6136694", "text": "function startatLoad(){\n\tloadNavbar(function(){\n\t\t\trefreshStatus();\n\t\t});\n}", "title": "" }, { "docid": "0f942e3bb70174760251de6fe0bfac61", "score": "0.61290497", "text": "function loadVar() {\n // TODO: Implement\n }", "title": "" }, { "docid": "33cce173dd654aaebf34bf12145ca3a0", "score": "0.6126343", "text": "preload() {\n\n }", "title": "" }, { "docid": "33cce173dd654aaebf34bf12145ca3a0", "score": "0.6126343", "text": "preload() {\n\n }", "title": "" }, { "docid": "c8c1ceae7af90195b8b3bb26e0fcca2b", "score": "0.61197203", "text": "function onPageLoad(){\n\n // Call all the functions in both temp and system cues\n triggerEvent(events.onPageLoad);\n\n // Since page load is the last event, we call clearTempEvents\n // to clear all temporary events created by a page/route controller\n clearTempEvents();\n\n }", "title": "" }, { "docid": "a6eca7971404bd5f3290f71c8c0c8211", "score": "0.6116098", "text": "preLoad(callback) {\n super.preLoad(err => {\n if (err) return callback(err);\n\n this.authenticate(callback);\n });\n }", "title": "" }, { "docid": "6de5c8746f432c0121e7085e1ff564f6", "score": "0.611489", "text": "function onBeforeEnter() {\n if (!U.areSiblingViews(noLoadingStates)) {\n SampleListModel.loading = true;\n }\n }", "title": "" }, { "docid": "ed48823d4dcb85f84ea9cce273475c62", "score": "0.610716", "text": "function addLoadEvent(fn) {\n\t\t\n\t}", "title": "" }, { "docid": "62cb368dc8336d9f486e9b1415a46233", "score": "0.6104121", "text": "function preload() {}", "title": "" }, { "docid": "62cb368dc8336d9f486e9b1415a46233", "score": "0.6104121", "text": "function preload() {}", "title": "" }, { "docid": "8e3678d23dd3d656515a6df995db7cd1", "score": "0.60984534", "text": "function loadModel() {\n }", "title": "" }, { "docid": "4ba9897d974d4c5889e2615f02c2256e", "score": "0.6090256", "text": "function pfambPostLoad() {\n if( typeof( loadOptions.st.uri ) != \"undefined\" ) {\n\tnew Ajax.Request( loadOptions.st.uri,\n\t\t\t\t\t { method: \"get\", \n\t\t\t\t\t\tparameters: loadOptions.st.params,\n\t\t\t\t\t\tonComplete: stSuccess,\n\t\t\t\t\t\tonFailure: stFailure\n\t\t\t\t\t } );\n }\n if( typeof( loadOptions.dg.uri ) != \"undefined\" ) {\n\tnew Ajax.Request( loadOptions.dg.uri,\n\t\t\t\t\t { method: 'get', \n\t\t\t\t\t\tparameters: loadOptions.dg.params,\n\t\t\t\t\t\tonComplete: dgSuccess,\n\t\t\t\t\t\tonFailure: dgFailure\n\t\t\t\t\t } );\n }\n // pfamb structure tab\n if( typeof( loadOptions.fstruc.uri ) != \"undefined\" ) {\n\t new Ajax.Request( loadOptions.fstruc.uri,\n\t\t \t\t\t \t { method: 'get', \n\t\t\t \t\t\tparameters: loadOptions.fstruc.params,\n\t\t\t\t\t\tonComplete: fstrucSuccess,\n\t\t\t\t\t\tonFailure: fstrucFailure\n\t\t\t\t\t } );\n }\t\n}", "title": "" }, { "docid": "f269056851bc1704eb44595d4f598c08", "score": "0.6089759", "text": "static _registerLoadHandlers() {\n Object.values(this.PAGE_FIELDS).forEach((dataset, idx) => {\n $w('#' + dataset.id).onReady(\n () => this.loadDataset(dataset.id)\n )\n });\n }", "title": "" }, { "docid": "4edc998c72d4239569e2bc4368400969", "score": "0.6085083", "text": "function ifLoadSuccess(){\n\treturn true;\n}", "title": "" }, { "docid": "d46553a29b5deee6a7660af8255db399", "score": "0.6075845", "text": "function loadGameData() {\n \n }", "title": "" }, { "docid": "44302e7bc153d0cb98636ba7ac671173", "score": "0.60713696", "text": "function preload()\n{\n\t\n}", "title": "" }, { "docid": "44302e7bc153d0cb98636ba7ac671173", "score": "0.60713696", "text": "function preload()\n{\n\t\n}", "title": "" }, { "docid": "54c32bbb0090f6c0278d25977bbbab47", "score": "0.60633904", "text": "function preLoad( preLoaderDone ) {\n if (preLoaderDone === undefined) preLoaderDone = null;\t// \"preLoaderDone\" is optional.\n \tif (preLoader != null) \t\t// Only run if we have an preloader function\n \t\tpreLoader( preLoaderDone );\n \telse \t\t\t\t\t\t\t// If there's no preloader, try running the callback\n \t\tif (preLoaderDone != null)\n \t\t\tpreLoaderDone();\n }", "title": "" }, { "docid": "0ff16083c7bc8680450ccf1dac69c709", "score": "0.6059718", "text": "function preload() {\n\tpreloadStuff();\n}", "title": "" }, { "docid": "18e38f5c9078f0ed86e2fa43ac81b0a4", "score": "0.605232", "text": "function onload()\n {\n if(this.title === 'solone')\n {\n solone.init(function(){\n __fetched.push(1);\n if(__fetched.length === len) return cb();\n })\n }\n else\n {\n __fetched.push(1);\n if(__fetched.length === len) return cb();\n }\n }", "title": "" }, { "docid": "985bbca234f839ce8f52ed3f72d466a9", "score": "0.604484", "text": "function load() {\r\n\tvar p_cb = preloader_cb;\r\n m_data.load(\"sPhone.json\", load_cb,p_cb,true);\r\n}", "title": "" }, { "docid": "f414f4bfe263da534953f98ab1827bb5", "score": "0.6043547", "text": "_callOnLoadEvent() {\n if (this.tab && typeof this.tab.onLoad === 'function') {\n this.tab.onLoad.bind(this)(this.core, this.tab);\n }\n }", "title": "" }, { "docid": "45049b1b14261eb46f49fdde844a0bc5", "score": "0.6033806", "text": "static Load() {}", "title": "" }, { "docid": "45049b1b14261eb46f49fdde844a0bc5", "score": "0.6033806", "text": "static Load() {}", "title": "" }, { "docid": "1e0ee0b4709edb5a2094d23c7e266e68", "score": "0.602229", "text": "preload() {\n\n }", "title": "" }, { "docid": "91296aa3345e2796114d3bb705ecbced", "score": "0.60112995", "text": "function preload() {\n clickablesManager = new ClickableManager('data/clickableLayout.csv');\n adventureManager = new AdventureManager('data/adventureStates.csv', 'data/interactionTable.csv', 'data/clickableLayout.csv');\n}", "title": "" }, { "docid": "c3b2bab578a46e142dcf06b85df9c3e9", "score": "0.60072315", "text": "function loadData() {\n\n buildfire.datastore.getWithDynamicData(function (err, result) {\n if (err) {\n console.error(\"Error: \", err);\n return;\n }\n if(result.id){\n dataLoadedHandler(result);\n }else{\n var obj={\n data:folderPluginShared.getDefaultScopeData()\n }\n dataLoadedHandler(obj);\n }\n\n });\n }", "title": "" }, { "docid": "e37b46993b5be7e25de203f2af2ff972", "score": "0.5995003", "text": "function onBeforeEnter() {\n AnnouncementDetailModel.loading = true;\n }", "title": "" }, { "docid": "dd65e557c326fa5241864fb1db308764", "score": "0.59881943", "text": "function preload() {\n // start fetching the data and assign it to your global\n migrationData = loadTable('http://localhost:8000/4.final-project/students/am/janice/data/syrian_refugees_count.csv');\n \n}", "title": "" }, { "docid": "3719f9ca4771c36fc946b16491387164", "score": "0.5985413", "text": "function beforeEvent() {\n\t }", "title": "" }, { "docid": "a4d92c043e9e75729a497de2d310a150", "score": "0.5984313", "text": "function loadData() {\n loadAbout();\n loadShows();\n loadMembers();\n loadPhotos();\n loadContact();\n}", "title": "" }, { "docid": "2744c5802a62053be2e63361eb0e7f32", "score": "0.5969113", "text": "function preload() {\r\n\r\n}", "title": "" }, { "docid": "2744c5802a62053be2e63361eb0e7f32", "score": "0.5969113", "text": "function preload() {\r\n\r\n}", "title": "" }, { "docid": "1652a985faf6005b25729d4c57740664", "score": "0.5967513", "text": "load () { return {} }", "title": "" }, { "docid": "b2212c6d399d8d17e318e93b41044913", "score": "0.5964971", "text": "function loadIntoGrid3() {\n // chargement à partir des valeurs stokées dans trjs.data.\n trjs.template.loadPersons();\n trjs.template.loadTemplates();\n trjs.template.loadMetadata();\n }", "title": "" }, { "docid": "5527366a860359193813c3e23d90bc46", "score": "0.5956272", "text": "constructor ()\n {\n super('preload');\n }", "title": "" }, { "docid": "087898af8c265de34312a1a3d4a9684f", "score": "0.595126", "text": "function preLoadContactList() {\r\n\t\r\n\tvar contactPreLoader = new net.ContentLoader('process/list_contact.php', loadContactList, showError, 'POST', '', 'application/xml');\r\n\t\r\n\t\r\n}", "title": "" } ]
0f65ecb13e68e3de0fad8e7164154a6d
============================= Notie Alerts ============================= type is optional. options are 'success', 'warning', 'error', 'info', 'neutral'
[ { "docid": "431db184fc7b408846cff5db00b69b77", "score": "0.7046965", "text": "function notify(type, message) {\n notie.alert({\n type: type,\n text: message,\n });\n}", "title": "" } ]
[ { "docid": "23b3bf2c8e6a4f55c989cc96bbf7e0c7", "score": "0.6774575", "text": "function alertWarn(type) {\n\tswitch (type) {\n\t\tcase \"fromNull\":\n\t\t\ttext = \"Please Select a Number System!\";\n\t\t\tshowAlert(type, text);\n\t\t\tbreak;\n\t\tcase \"toNull\":\n\t\t\ttext = \"Please Select a Number System\";\n\t\t\tshowAlert(type, text);\n\t\t\tbreak;\n\t\tcase \"inputNull\":\n\t\t\ttext = \"Please Input a Number\";\n\t\t\tshowAlert(type, text);\n\t\t\tbreak;\n\t\tcase \"inputInvalid\":\n\t\t\ttext = \"Your Number is Invalid! Please input a valid Number\";\n\t\t\tshowAlert(type, text);\n\t\t\tbreak;\n\t}\n}", "title": "" }, { "docid": "6d3a7a075568ddbf38b248e15760f69c", "score": "0.65677685", "text": "function notify(text, type) {\n if (!type) {\n type = 'info';\n }\n toastr[type](text);\n}", "title": "" }, { "docid": "c769080a7f003c6578b9db8617700b7c", "score": "0.6557251", "text": "function notify(type) {\n\t\n\tswitch (type) {\n\t\t\n\t\tcase \"axe\":\n\t\t\t$(\"#current-axe\").notify(\n\t\t\t\t\"Upgraded!\",\n\t\t\t\t{ position:\"bottom\", className: 'success', showDuration: 400, autoHideDelay: 3000, showAnimation: 'slideDown', hideAnimation: 'slideUp', }\n\t\t\t);\n\t\t\tbreak;\n\t\t\t\n\t\tcase \"level\":\n\t\t\t$(\"#current-level\").notify(\n\t\t\t\t\"Level Up!\",\n\t\t\t\t{ position: 'bottom', className: 'success', showDuration: 400, autoHideDelay: 3000, showAnimation: 'slideDown', hideAnimation: 'slideUp', }\n\t\t\t);\n\t\t\tbreak;\n\t\t\t\n\t\tcase \"bank\":\n\t\t\t$(\"#current-bank\").notify(\n\t\t\t\t\"Upgraded!\",\n\t\t\t\t{ position:\"bottom\", className: 'success', showDuration: 400, autoHideDelay: 3000, showAnimation: 'slideDown', hideAnimation: 'slideUp', }\n\t\t\t);\n\t\t\tbreak;\n\t\t\t\n\t\tcase \"bankFull\":\n\t\t\t$(\"#current-bank\").notify(\n\t\t\t\t\"Full!\",\n\t\t\t\t{ position:\"bottom\", className: 'error', showDuration: 400, autoHideDelay: 3000, showAnimation: 'slideDown', hideAnimation: 'slideUp', }\n\t\t\t);\n\t\t\tbreak;\n\t\t\t\n\t\tcase \"birdNest\":\n\t\t\t$.notify(\n\t\t\t\t\"You found a Birds Nest!\",\n\t\t\t\t{ position: 'top right', className: 'success', showDuration: 400, autoHideDelay: 3000, showAnimation: 'slideDown', hideAnimation: 'slideUp', }\n\t\t\t);\n\t\t\tbreak;\n\t\t\t\n\t}\n\t\n}", "title": "" }, { "docid": "a73dab6fbaf2bc89251db58fc5fe1ba5", "score": "0.65217584", "text": "function notify(tipo, msg, extra, onOk){\n alertify.notify( msg, tipo, 5, onOk );\n if (extra){\n alertify.notify( extra, tipo );\n }\n }", "title": "" }, { "docid": "75db8051b53428e78b3bb4ddba23adce", "score": "0.64575344", "text": "function popUpSuccsessMessage(successMsg) {\n noty({\n text: successMsg,\n type: \"info\",\n layout: \"topCenter\",\n timeout: 3500\n });\n }", "title": "" }, { "docid": "2e516dc3d002c2184fd2038e83756747", "score": "0.6435476", "text": "function showConfirmMessage(type) {\n\tvar res;\n\t$(\"#error\").hide();\n\tswitch (type) {\n\tcase 1:\n\t\tres = \"Request performed correctly!!\";\n\t\tbreak;\n\tcase 2:\n\t\tres = \"Rule correctly deleted\";\n\t\tbreak;\n\tcase 3:\n\t\tres = \"XML correctly found\";\n\t\tbreak;\n\t}\n\t$(\"#success\").text(res);\n\t$(\"#success\").show();\n}", "title": "" }, { "docid": "4457c00175057275ef02736755d0531c", "score": "0.6337866", "text": "function notify(text, type){\n var colorStr = \"#FFFFFF\";\n switch(type){\n case NOTIFICATION_TYPE_SYS:\n case NOTIFICATION_TYPE_GOOD:\n colorStr = \"#00FF00\"; // green\n break;\n case NOTIFICATION_TYPE_ALERT:\n colorStr = \"#FFFF00\"; // yellow\n break;\n case NOTIFICATION_TYPE_ERROR:\n case NOTIFICATION_TYPE_BAD:\n colorStr = \"#FF0000\"; // red\n break;\n case NOTIFICATION_TYPE_NORMAL:\n default:\n break; // white\n }\n display.addMessage(text, colorStr);\n}", "title": "" }, { "docid": "33140dfbcb17a0e15ceab3014fdb7435", "score": "0.62879044", "text": "getAlertInfo() {\n if (this.endState === 'off') {\n return {\n style: 'danger',\n verdict: 'You lost?',\n msg: 'The checker went off the board.'\n }\n } else {\n return {\n style: 'success',\n verdict: 'You won?',\n msg: 'The checker entered a cycle.'\n }\n }\n }", "title": "" }, { "docid": "44af746a10166909a3735118d8bd0410", "score": "0.6246288", "text": "function displayAlert(Type, Message) {\n if (Message != \"\") {\n switch (Type) {\n case \"info\":\n toastr.info(Message);\n break;\n case \"success\":\n toastr.success(Message);\n break;\n case \"warning\":\n toastr.warning(Message);\n break;\n case \"danger\":\n toastr.error(Message);\n break;\n default:\n toastr.info(Message);\n break;\n }\n }\n}", "title": "" }, { "docid": "bef3f349fbfa07158a2a0f35ca824955", "score": "0.6222308", "text": "function notify(message, type = 'danger', icon = 'info-circle', duration = 3000) {\n const alert = Object.assign(document.createElement('sl-alert'), {\n type: type,\n closable: true,\n duration: duration,\n innerHTML: `<sl-icon name=\"${icon}\" slot=\"icon\"></sl-icon> ${escapeHtml(message)}`\n });\n document.body.append(alert);\n return alert.toast();\n}", "title": "" }, { "docid": "3cd77ae0b188189d40841619056d8dba", "score": "0.61361814", "text": "function showAlert(title, msg, type, alertType){\n \tvar icon = \"\", alert = \"\", buttons = \"\";\n \tvar alertId = randomString();\n\n \tbuttons = '<button class=\"btn btn-outline btn-custom-alert\" data-value=\"true\">OK</button>'+\n \t'<button class=\"btn btn-outline btn-custom-alert pull-left\" data-value=\"false\" data-dismiss=\"modal\">Cancel</button>';\n\n \tif( alertType == \"prompt\" ){\n \t\tmsg = \t'<div class=\"form-group\">'+\n \t\t'<label>Text</label>'+\n \t\t'<input type=\"text\" class=\"form-control input-custom-alert\">'+\n \t\t'</div>';\n \t} else if( alertType == \"mark_as_paid\") {\n \t\tbuttons = '<button class=\"btn btn-outline btn-custom-alert\" data-value=\"true\">Yes</button>'+\n \t\t'<button class=\"btn btn-outline btn-custom-alert pull-left\" data-value=\"false\" data-dismiss=\"modal\">No</button>';\n \t}else if( alertType == \"alert\" ){\n \t\tbuttons = '<button class=\"btn btn-outline btn-custom-alert\" data-value=\"true\">OK</button>';\n \t}else if( alertType == \"notify\" ){\n \t\tbuttons = '<button class=\"btn btn-outline btn-custom-alert\" data-value=\"false\" data-dismiss=\"modal\">OK</button>';\n \t}\n\n \tswitch(type){\n \t\tcase \"info\" :\n \t\ticon = \"fa-info\";\n \t\tbreak;\n \t\tcase \"success\" : \n \t\ticon = \"fa-check\";\n \t\tbreak;\n \t\tcase \"warning\" : \n \t\ticon = \"fa-warning\";\n \t\tbreak;\n \t\tcase \"danger\" : \n \t\ticon = \"fa-ban\";\n \t\tbreak;\n \t}\n\n \tvar modal = $(\".modal-alert\");\n \tmodal.removeClass('modal-info').removeClass('modal-danger').removeClass('modal-success')\n \t.removeClass('modal-warning').addClass(\"modal-\"+type).addClass('fade');\n \tmodal.find(\".modal-title\").html(title);\n \tmodal.find(\".modal-body\").html(msg);\n \tmodal.find(\".modal-footer\").html(buttons);\n \tmodal.modal('show');\n }", "title": "" }, { "docid": "3da5c037303772c538ec3d784b5838ce", "score": "0.61286545", "text": "function showNotification(type, title, message, options) {\r\n type = type || NOTIFICATION_BOX_TYPES.info;\r\n title = title || \"\";\r\n options = options || {};\r\n\r\n if (!roar) {\r\n init_roar();\r\n }\r\n\r\n roar.setOptions({\r\n duration: 6000\r\n });\r\n roar.setOptions(options);\r\n\r\n if (title == \"\") {\r\n type += ' hide-title';\r\n }\r\n roar.setOptions({\r\n className: type\r\n });\r\n\r\n roar.alert(title, message);\r\n // alert() returns a roar object containing all available notifications\r\n // object -> object.items[0], object.items[1], ...\r\n // to remove a single item -> roar.remove(object.items[0]);\r\n}", "title": "" }, { "docid": "64bf0b46a52680312ecbebf355fa6e70", "score": "0.6120513", "text": "function showAlert(type, text) {\n _reactSAlert2.default[type](text, {\n position: 'top-right',\n effect: 'slide',\n timeout: 5000\n });\n}", "title": "" }, { "docid": "1c2f7b814c2c282cc716a1b59bbb2c16", "score": "0.6077645", "text": "function displaySuccess(message) {\n // Display a noty\n var n = noty({\n layout: \"top\",\n theme: \"bootstrapTheme\",\n type: \"success\",\n text: message,\n maxVisible: 1,\n timeout: 2000,\n killer: true,\n buttons: false\n });\n }", "title": "" }, { "docid": "16ab222cbb6162d33390bbf3ce63e823", "score": "0.60724187", "text": "function showConfirmMessage(type) {\n var res;\n $(\"#error\").hide();\n switch (type) {\n case 1:\n res = \"Request performed correctly!!\";\n break;\n case 2:\n res = \"Model correctly deleted\";\n break;\n case 3:\n res = \"JSON correctly found\";\n break;\n }\n $(\"#success\").text(res);\n $(\"#success\").show();\n}", "title": "" }, { "docid": "64957258ee487765807c96c4be52e3d3", "score": "0.60676515", "text": "function show_message(type, message){\r\n new Noty({\r\n layout : 'topRight',\r\n type: type,\r\n theme : 'mint',\r\n timeout: 10000,\r\n force: true,\r\n closeWith: ['click', 'button'],\r\n text: message\r\n }).show();\r\n }", "title": "" }, { "docid": "39455139ce2dbaa7e226a9b0558a71e9", "score": "0.605771", "text": "function pubnubAlert(id,username,type){\n\tsendMessageFromTable(id,type);\n}", "title": "" }, { "docid": "5d4eac17a8e295ee6449353590265890", "score": "0.6012154", "text": "static AlertType(message, type) {\n alertContainer.className = `alert alert-${type} mb-4`;\n alertContainer.innerHTML = (message);\n alertContainer.style.visibility = 'visible';\n // Vanish in 2 seconds\n setTimeout(() => alertContainer.style.visibility = 'hidden', 2000);\n }", "title": "" }, { "docid": "c6d829617153633f409ac8521666120b", "score": "0.59972304", "text": "function notify(message, type) {\n if(type === null || type == undefined) {\n type = \"warning\";\n }\n var notificationID = \"notification\" + Math.floor((Math.random()*100)+1);\n var notification = $('<div/>', {\n class: \"alert fade in alert-\" + type.toLowerCase(),\n id: notificationID\n })\n .text(message)\n .appendTo($('#alertBox'));\n\n $('<strong></strong>')\n .text(type.toUpperCase() + \"! \")\n .prependTo(notification);\n\n $('<button></button>', {\n type: \"button\",\n class: \"close\",\n 'data-dismiss': \"alert\"\n })\n .text(\"×\")\n .prependTo(notification);\n setTimeout(function(){disposeNotification(notificationID);}, 10000);\n}", "title": "" }, { "docid": "7b1883d72367e5d256dfc63c743d1f59", "score": "0.59816164", "text": "function showMessage(html, type) {\n /* hide progress bar */\n document.getElementById('progress-container').style.display = 'none';\n\n /* display alert message */\n var element = document.createElement('div');\n element.setAttribute('class', 'alert alert-' + (type || 'success'));\n element.innerHTML = html;\n results.appendChild(element);\n $(element).delay(3000).fadeOut(2000);\n }", "title": "" }, { "docid": "ea7497d060f12cfd1d9fe4b814c2fa89", "score": "0.596718", "text": "function displayResponse(type, message) {\n clearResponseArea();\n var responseArea = $('#message');\n if (type == ResponseType.SUCCESS) {\n responseArea.addClass(\"alert alert-success\");\n }\n else if (type = ResponseType.WARNING) {\n responseArea.addClass(\"alert alert-warning\");\n }\n else if(type == ResponseType.FAILURE){\n responseArea.addClass(\"alert alert-danger\");\n }\n responseArea.html(message);\n}", "title": "" }, { "docid": "6d7e4a2a915d7dae96266f1869318b28", "score": "0.59582514", "text": "function setAlert(type, message) {\n self.alerts[0] = {\n type: type,\n msg: message\n };\n }", "title": "" }, { "docid": "c7224221ea890d3233e7374156c475c1", "score": "0.5949024", "text": "function general_message(type = '', val =''){\n var message = '';\n if(type == 'error'){\n message = '<div class=\"alert alert-danger\"><button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-hidden=\"true\">×</button>'+val+'</div>';\n }\n else if(type == 'success'){\n message = '<div class=\"alert alert-success\"><button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-hidden=\"true\">×</button>'+val+'</div>';\n }\n else if(type == 'info'){\n message = '<div class=\"alert alert-info\"><button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-hidden=\"true\">×</button>'+val+'</div>';\n }\n else if(type == 'warning'){\n message = '<div class=\"alert alert-warning\"><button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-hidden=\"true\">×</button>'+val+'</div>';\n }\n return message;\n\n}", "title": "" }, { "docid": "cea50f71378f0620567bb5a6310fb50e", "score": "0.59467006", "text": "function printAlert(message, type) {\n\n //Do not have several error or success messages\n\n const alerta = document.querySelector('.alerta');\n\n if(!alerta){\n const divMessage = document.createElement('div');\n divMessage.classList.add('alert', 'text-center', 'mt-4', 'alerta');\n \n if(type === 'error') {\n divMessage.classList.add('alert-danger');\n } else {\n divMessage.classList.add('alert-success');\n }\n \n divMessage.textContent = message;\n \n newForm.appendChild(divMessage);\n \n setTimeout ( () => {\n divMessage.remove();\n }, 3000); }\n\n\n }", "title": "" }, { "docid": "3ad074b58035c6c915840b59a2649ddb", "score": "0.5946077", "text": "function setFailMessage(text) {\n if (undefined === text) {\n var text = \"Error occurred! Please contact us at <a href='https://smar7apps.com/support' target='_blank'>smar7apps.com</a>\";\n }\n var logoURL = browser.extension.getURL(\"images/package16.png\");\n var errorURL = browser.extension.getURL(\"images/cancel.png\");\n return noty({\n text: \"\\\n <div class='status-header'>\\\n <span class='sm7-title'>SMAR7</span>\\\n <span class='sm7-subtitle'>Express</span>\\\n </div>\\\n <div class='status-image'>\\\n <img src='\" + errorURL + \"'/>\\\n </div>\\\n <div class='status-text'>\\\n <p>\" + text + \"</p>\\\n </div>\",\n layout: \"topRight\",\n theme: \"relax\",\n timeout: null,\n closeWith: ['button'],\n });\n}", "title": "" }, { "docid": "1487347a00efb2f9493f80c0fe5e7f43", "score": "0.5892714", "text": "function setWarningMessage(text) {\n if (undefined === text) {\n var text = \"Error occurred! Please contact us at <a href='https://smar7apps.com/support' target='_blank'>smar7apps.com</a>\";\n }\n var logoURL = browser.extension.getURL(\"images/package16.png\");\n var errorURL = browser.extension.getURL(\"images/warning.png\");\n return noty({\n text: \"\\\n <div class='status-header'>\\\n <span class='sm7-title'>SMAR7</span>\\\n <span class='sm7-subtitle'>Express</span>\\\n </div>\\\n <div class='status-image'>\\\n <img src='\" + errorURL + \"'/>\\\n </div>\\\n <div class='status-text'>\\\n <p>\" + text + \"</p>\\\n </div>\",\n layout: \"topRight\",\n theme: \"relax\",\n timeout: null,\n animation: {\n open: 'noty_effects_open',\n close: null,\n }\n });\n}", "title": "" }, { "docid": "dda7a4bde62d12bbd74a5a3171e9868c", "score": "0.5890307", "text": "function showAlert(msg, titulo,tipo=\"success\") {\n\t$.notify({\n\t\ttitle: titulo,\n\t\tmessage: msg, \n\t},{\n\t\tdelay: 1000,\n\t\ttimer: 1000,\n\t\ttype: tipo,\n\t\tplacement: {\n\t\t\tfrom: \"bottom\"\n\t\t},z_index:2000\n\t\t\n\t});\n}", "title": "" }, { "docid": "dff064b9e7ff609a3456d03713ec7790", "score": "0.5868305", "text": "function alertIcon(type){\n\tif (type === 'message-success'){\n\t\treturn `fa-check-circle`;\n\t} else if(type === 'message-warning'){\n\t\treturn `fa-exclamation-circle`;\n\t} else if(type === 'message-danger'){\n\t\treturn `fa-exclamation-triangle`;\n\t} \n}", "title": "" }, { "docid": "8e62f3fecffbdd3fe9932044b1295226", "score": "0.5867434", "text": "function showMessage(type, message) {\n if (type === 'error') {\n $('#message').empty().removeClass('sr-only alert-info').addClass('alert-danger').text(message);\n } else if (type === 'info') {\n $('#message').empty().removeClass('sr-only alert-danger').addClass('alert-info').text(message);\n }\n}", "title": "" }, { "docid": "103af99cde2d7354132377f5c6e142ca", "score": "0.5860283", "text": "function setSuccessMessage(text) {\n var logoURL = browser.extension.getURL(\"images/package16.png\");\n var tickURL = browser.extension.getURL(\"images/checked.png\");\n return noty({\n text: \"\\\n <div class='status-header'>\\\n <span class='sm7-title'>SMAR7</span>\\\n <span class='sm7-subtitle'>Express</span>\\\n </div>\\\n <div class='status-image'>\\\n <img src='\" + tickURL + \"'/>\\\n </div>\\\n <div class='status-text'>\\\n <p>\" + text + \"</p>\\\n </div>\",\n layout: \"topRight\",\n theme: \"relax\",\n timeout: 6000\n });\n}", "title": "" }, { "docid": "aa36ad3d9f55571c4e0de8688f344db4", "score": "0.5837546", "text": "skipAlert () {\n this.refs.container.success(\n 'Profile is Not Fully Updated',\n '', {\n timeOut: 1000,\n extendedTimeOut: 10000\n });\n }", "title": "" }, { "docid": "0589763f599afb41b5aa6f30f50cba88", "score": "0.5833451", "text": "function PWG_GenerateUnsuccessfulNoty() {\n noty({\n text: 'Error saving settings.',\n type: 'error',\n layout: 'topCenter',\n closeWith: ['button'],\n timeout: 3000\n });\n}", "title": "" }, { "docid": "090cffb7ca6a0873c2f7d0a0daa4788e", "score": "0.58214605", "text": "function BigNotification(msg, content, type) {\n var color = '#739E73'; //success\n if (type == 0) { color = '#C79121'; } //warning\n else if (type == -1) { color = '#C46A69'; } //unsuccess\n else if (type == 2) { color = '#3276B1'; } // info.\n try {\n $.bigBox({\n title: msg,\n content: content,\n color: color,\n //timeout: 8000,\n icon: \"fa fa-bell swing animated\",\n number: \"Valuepad Team\"\n });\n } catch (err) { }\n}", "title": "" }, { "docid": "f6c5a562abf85c8ce6a817e918c7ace8", "score": "0.5820542", "text": "function alertMessage(text, type) {\n const stackBottomModal = new Stack({\n dir1: \"up\",\n push: \"bottom\",\n modal: false,\n context: document.getElementById(\"notice\")\n });\n alert({\n text: text,\n width: \"auto\",\n type: type,\n hide: true,\n delay: 300,\n animateSpeed: 'fast',\n shadow: true,\n animation: 'fade',\n addClass: 'active_notice',\n stack: stackBottomModal\n });\n}", "title": "" }, { "docid": "8a529fea46e73dffd790464d69dfadb6", "score": "0.5816585", "text": "function setNotify(msg, type) {\n $.pnotify({\n text: msg,\n type: type,\n hide: true\n });\n if (type == \"error\") {\n return false;\n }\n }", "title": "" }, { "docid": "2161995e85e2b1b3aa2d22bfbb9c193e", "score": "0.5812743", "text": "function veteranzAlerttoogle(msg,alerttype){\n $( \".alert-label\" ).addClass(\"alert \" + alerttype);\n $( \".alert-label\" ).html(msg).show().delay(2000).fadeOut('slow');\n}", "title": "" }, { "docid": "ad7d72721f58adf2b41fc33634e01817", "score": "0.5810179", "text": "notify(state, { title, body, type }) {\n swal(title, body, type)\n }", "title": "" }, { "docid": "296a9d9af9da4446a569c42c146d6458", "score": "0.5801329", "text": "function notice(message, div, type) {\n switch (type) {\n case 'warning':\n message = '<font color=\"orange\">' + message + '</font>';\n break;\n case 'error':\n message = '<font color=\"red\">' + message + '</font>';\n break;\n default:\n message = message;\n }\n $(div).html(message);\n}", "title": "" }, { "docid": "473578c047d6a2fdff67939c17d77632", "score": "0.5775458", "text": "function notifyUser(msg, icon, type) {\r\n var note = $.notify({\r\n // options\r\n icon: icon,\r\n title: '',\r\n message: msg,\r\n url: '',\r\n target: '_blank'\r\n }, {\r\n // settings\r\n element: 'body',\r\n position: null,\r\n type: type,\r\n allow_dismiss: true,\r\n newest_on_top: false,\r\n showProgressbar: false,\r\n placement: {\r\n from: \"top\",\r\n align: \"right\"\r\n },\r\n offset: 20,\r\n spacing: 10,\r\n z_index: 1031,\r\n delay: 5000,\r\n timer: 1000,\r\n url_target: '_blank',\r\n mouse_over: null,\r\n animate: {\r\n enter: 'animated fadeInDown',\r\n exit: 'animated fadeOutUp'\r\n },\r\n onShow: null,\r\n onShown: null,\r\n onClose: null,\r\n onClosed: null,\r\n icon_type: 'class',\r\n template: '<div data-notify=\"container\" class=\"col-xs-11 col-sm-3 alert alert-{0}\" role=\"alert\">' +\r\n '<button type=\"button\" aria-hidden=\"true\" class=\"close\" data-notify=\"dismiss\">×</button>' +\r\n '<span data-notify=\"icon\"></span> ' +\r\n '<span data-notify=\"title\">{1}</span> ' +\r\n '<span data-notify=\"message\">{2}</span>' +\r\n '<div class=\"progress\" data-notify=\"progressbar\">' +\r\n '<div class=\"progress-bar progress-bar-{0}\" role=\"progressbar\" aria-valuenow=\"0\" aria-valuemin=\"0\" aria-valuemax=\"100\" style=\"width: 0%;\"></div>' +\r\n '</div>' +\r\n '<a href=\"{3}\" target=\"{4}\" data-notify=\"url\"></a>' +\r\n '</div>'\r\n });\r\n}", "title": "" }, { "docid": "58369f62eeb85e3b34c2da6d92501dac", "score": "0.57582766", "text": "function AlertNotifier() {\n}", "title": "" }, { "docid": "32aee0a0c702593c077e3ae761e49e80", "score": "0.5751074", "text": "function CustomAlerts(Title, Message, AlertType, Timetohide, Id) {\n try {\n //needs jquery.gritter.min.css, jquery.gritter.min.js and rubus-gritter.css\n if (AlertType == \"success_notification\") {\n $.gritter.add({\n title: Title,\n text: Message,\n class_name: 'gritter-success gritter-light'\n });\n }\n else if (AlertType == \"error_notification\") {\n $.gritter.add({\n title: Title,\n text: Message,\n class_name: 'gritter-error gritter-light'\n });\n }\n else if (AlertType == \"warning_notification\") {\n $.gritter.add({\n title: Title,\n text: Message,\n class_name: 'gritter-warning gritter-light'\n });\n }\n else if (AlertType == \"info_notification\") {\n $.gritter.add({\n title: Title,\n text: Message,\n class_name: 'gritter-info gritter-light'\n });\n }\n else if (AlertType == \"alert\") {\n bootbox.alert(Message);\n }\n else if (AlertType == \"success_alert\") {\n bootbox.alert({\n title: Title,\n message: Message\n });\n $(\".bootbox-alert\").find('.modal-header').css(\"background-color\", \"#DFF0D8\");\n }\n else if (AlertType == \"error_alert\") {\n bootbox.alert({\n title: Title,\n message: Message\n });\n $(\".bootbox-alert\").find('.modal-header').css(\"background-color\", \"#F2DEDE\");\n }\n else if (AlertType == \"info_alert\") {\n bootbox.alert({\n title: Title,\n message: Message\n });\n $(\".bootbox-alert\").find('.modal-header').css(\"background-color\", \"#D9EDF7\");\n }\n else if (AlertType == \"warning_alert\") {\n bootbox.alert({\n title: Title,\n message: Message\n });\n $(\".bootbox-alert\").find('.modal-header').css(\"background-color\", \"#8A6D3B\");\n }\n else if (AlertType == \"confirmation\") {\n bootbox.confirm(Message, function (result) {\n if (result) {\n\n }\n });\n }\n //<div class=\"row\">\n // <div class=\"col-xs-12 col-sm-12 center bold\">\n // <strong id=\"almessage\" hidden></strong>\n // </div>\n // </div>\n else if (AlertType == \"success_validation\") {\n $(\"#\" + Id).removeClass().addClass('lighter green');\n $(\"#\" + Id).empty().append(Message);\n $(\"#\" + Id).show();\n $(\"#\" + Id).fadeOut(parseInt(Timetohide));\n }\n else if (AlertType == \"error_validation\") {\n $(\"#\" + Id).removeClass().addClass('lighter red');\n $(\"#\" + Id).empty().append(Message);\n $(\"#\" + Id).show();\n $(\"#\" + Id).fadeOut(parseInt(Timetohide));\n }\n else if (AlertType == \"warning_validation\") {\n $(\"#\" + Id).removeClass().addClass('lighter orange');\n $(\"#\" + Id).empty().append(Message);\n $(\"#\" + Id).show();\n $(\"#\" + Id).fadeOut(parseInt(Timetohide));\n }\n else if (AlertType == \"info_validation\") {\n $(\"#\" + Id).removeClass().addClass('lighter blue');\n $(\"#\" + Id).empty().append(Message);\n $(\"#\" + Id).show();\n $(\"#\" + Id).fadeOut(parseInt(Timetohide));\n }\n }\n catch (error) {\n bootbox.alert(error.message);\n }\n}", "title": "" }, { "docid": "65b06be340ab1397bf5e36f3c4997974", "score": "0.5744001", "text": "function notify(message, type) {\n\t\t\t\t\t\t$.growl({\n\t\t\t\t\t\t\tmessage : message\n\t\t\t\t\t\t}, {\n\t\t\t\t\t\t\ttype : type,\n\t\t\t\t\t\t\tallow_dismiss : false,\n\t\t\t\t\t\t\tlabel : 'Cancel',\n\t\t\t\t\t\t\tclassName : 'btn-xs btn-inverse',\n\t\t\t\t\t\t\tplacement : {\n\t\t\t\t\t\t\t\tfrom : 'top',\n\t\t\t\t\t\t\t\talign : 'right'\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tdelay : 2500,\n\t\t\t\t\t\t\tanimate : {\n\t\t\t\t\t\t\t\tenter : 'animated bounceIn',\n\t\t\t\t\t\t\t\texit : 'animated bounceOut'\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\toffset : {\n\t\t\t\t\t\t\t\tx : 20,\n\t\t\t\t\t\t\t\ty : 85\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}", "title": "" }, { "docid": "9d5cb5d05d68803c06afecc7ad433754", "score": "0.5732652", "text": "function pushAlert (message, type = 'info') {\n var $alert = $('<div>').addClass(`alert alert-${type}`)\n\n if (message.error_code && message.error_message) {\n $alert.html(`<b>Error #${message.error_code}:</b> ${message.error_message}`)\n } else {\n $alert.html(message)\n }\n\n // Display the alert\n $alert.hide()\n $('#alerts').prepend($alert)\n $alert.slideDown()\n\n if (type == 'info') {\n setTimeout(() => {\n $alert.slideUp(() => $alert.remove())\n }, 6666)\n }\n\n // Log to the terminal\n switch (type) {\n case 'warning':\n console.warn(message)\n break\n case 'danger':\n console.error(message)\n break\n default:\n console.log(message)\n }\n }", "title": "" }, { "docid": "3b78e22322cfdbd14873cf9fc914482e", "score": "0.572759", "text": "function showFeedback(type, message, title) {\n\n toastr[type](message, title);\n}", "title": "" }, { "docid": "a483730fdce87cb943ec62cc924213eb", "score": "0.5726612", "text": "function alertMessage(message, type) {\n flash.set($filter(\"translate\")(message), type, false);\n }", "title": "" }, { "docid": "24e48858b9aad13b0bd7807a3b9fc66b", "score": "0.57181907", "text": "function showAlert(type, message) {\n $('#alert' + type).removeClass('d-none');\n $('#alert' + type + 'message').html(message);\n}", "title": "" }, { "docid": "8aca9372d11ee4b66f048e15806eb901", "score": "0.5717957", "text": "function showAlertGeneric(id, type, where, text) {\n $(\"#\" + id).alert(\"close\")\n $(where).prepend('<div class=\"alert ' + type + ' alert-dismissible\" id=\"' + id + '\" role=\"alert\">' + text + '.')\n}", "title": "" }, { "docid": "43d5e69fe0e61a0ae220c3c84fe9d6c3", "score": "0.570363", "text": "function sendroidNotify(error, body, showUserPref) {\n\tchrome.notifications.create(\n\t\t\"\" , { \n\t\t\ttype: \"basic\", \n\t\t\ticonUrl: APP_ICON_64, \n\t\t\ttitle: APP_NAME + \" : \" + error, \n\t\t\tmessage: body\n\t\t},\n\t\tfunction() { } \n\t);\n}", "title": "" }, { "docid": "d996f1dcb8735c5bd09435efa47e196d", "score": "0.56995547", "text": "function alert(text, type, timeout){\n\tvar type = type || 'info';\n\tvar timeout = timeout || 5000;\n\talertsCount++;\n\tif (type=='error') type='danger';\n\n\t$('#alert-container').append(\"<div class='alert alert-\" + type +\n\t\t\t\t\t\t\t\t\t\"' id='alert-\" + alertsCount +\n\t\t\t\t\t\t\t\t\t\"' style='display:none'>\" + text + \"</div>\");\n\n\t$('#alert-' + alertsCount).slideDown('fast').on('click', function(){\n\t\t$(this).slideUp('fast', function(){\n\t\t\t$(this).remove();\n\t\t});\n\t});\n\n\tvar tempAlertId = alertsCount;\n\tif (timeout > 0){\n\t\tsetTimeout(function(){\n\t\t\t$('#alert-' + tempAlertId).slideUp('fast', function(){\n\t\t\t\t$(this).remove();\n\t\t\t});\n\t\t}, timeout);\n\t}\n\n\treturn true;\n}", "title": "" }, { "docid": "f718eac0a26c0e57f6349423a356b643", "score": "0.56986856", "text": "function notify(message, type){\n $.growl({\n message: message\n },{\n type: type,\n allow_dismiss: false,\n label: 'Cancel',\n className: 'btn-xs btn-inverse',\n placement: {\n from: 'top',\n align: 'right'\n },\n delay: 2500,\n animate: {\n enter: 'animated bounceIn',\n exit: 'animated bounceOut'\n },\n offset: {\n x: 20,\n y: 85\n }\n });\n }", "title": "" }, { "docid": "299e1a037f722e31d7c345306e5d5a04", "score": "0.5688326", "text": "function notificationPopup() {\n if (type === \"meditation\")\n chrome.notifications.create(meditationOptions, creationCallback);\n else if (type === \"strength\")\n chrome.notifications.create(strengthOptions,creationCallback());\n else if (type === \"stretch\")\n chrome.notifications.create(stretchOptions,creationCallback());\n else if (type === \"cardio\")\n chrome.notifications.create(cardioOptions,creationCallback());\n\n}", "title": "" }, { "docid": "284286c44103321db83fd91b533dfd12", "score": "0.56871146", "text": "function alertPNotify (classType, message, customDelay, customStack) {\n\tvar customStack = (typeof customStack != 'object') ? ($(\"div.row\")) : (customStack);\n\tif (typeof rowStack == 'undefined') rowStack = { dir1: 'down', dir2: 'left', push: 'top', context: customStack };\n\tnew PNotify({\n\t\tstack: rowStack,\n\t\ttext: (typeof message == 'undefined') ? (' -- ') : (message),\n\t\taddclass: (typeof classType == 'undefined') ? ('alert-info') : (classType),\n\t\tdelay: (typeof customDelay == 'undefined') ? (2500) : (parseInt(customDelay)),\n\t\tanimate: { animate: true, in_class: 'slideInDown', out_class: 'slideOutUp' },\n\t\tbuttons: { closer_hover: false, sticker_hover: false }\n\t});\n\t$(\".ui-pnotify\").one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function() { $(this).removeClass(\"slideInDown\"); });\n}", "title": "" }, { "docid": "266ffcbc6bf5eef87beeb75e01fbdee6", "score": "0.568458", "text": "function disconnectedAlert() {\r\n $.notify({\r\n title: '<strong>Warning: </strong>',\r\n icon: 'fas fa-users',\r\n message: \" You are now out of sync of the host\"\r\n }, {\r\n type: 'danger',\r\n delay: 400,\r\n animate: {\r\n enter: 'animated fadeInUp',\r\n exit: 'animated fadeOutRight'\r\n },\r\n placement: {\r\n from: \"bottom\",\r\n align: \"right\"\r\n },\r\n offset: 20,\r\n spacing: 10,\r\n z_index: 1031,\r\n })\r\n}", "title": "" }, { "docid": "519d2c375de748360d11336967074c8d", "score": "0.5664758", "text": "function AlertMessage(){}", "title": "" }, { "docid": "b12bc2a98a74c7ee71adeb4225f81262", "score": "0.565566", "text": "function ALERT_MESSAGE()\n{\n VFPROP_Signal(\"Alert\",VF_BUILD_ARGUMENT_STRING(arguments));\n return;\n}", "title": "" }, { "docid": "f69be66305021dcce398829f7e6bdb55", "score": "0.56475216", "text": "function notify(msg, type, delay) {\n if (typeof( type ) !== 'string') {\n type = 'error';\n }\n if (typeof( msg ) !== 'string') {\n msg = __e('something_went_wrong');\n }\n var classes = 'alert fade in';\n switch (type) {\n\n case 'error':\n classes = 'alert alert-error fade in';\n break;\n\n case 'success':\n classes = 'alert alert-success fade in';\n break;\n\n case 'info':\n classes = 'alert alert-info fade in';\n break;\n\n default:\n classes = 'alert alert-block fade in';\n break;\n }\n $('#msg-container').slideUp(500, function () {\n $('#msg-container').alert();\n $('#msg-container').removeClass().addClass(classes).html(msg).slideDown(500).delay(delay).fadeOut('slow');\n });\n}", "title": "" }, { "docid": "ee19e145054ea1597ed96597fd5be386", "score": "0.56405485", "text": "getDefaultInstructorSuccess() {\n store.state.status = {\n got: true\n };\n store.state.notification_text = '';\n store.state.notification_icon = 'info';\n store.state.notification_color = 'primary';\n }", "title": "" }, { "docid": "a5d57818aa3dc15c6a0bdab4e8723214", "score": "0.5636922", "text": "function bootstarpAlert(ttl, msg, dismiss, msgtype) {\r\n\t$.notify({\r\n\t\ttitle : '<strong>' + ttl + '</strong>',\r\n\t\tmessage : msg\r\n\t}, {\r\n\t\tallow_dismiss : dismiss,\r\n\t\ttype : msgtype,\r\n\t\tdelay : 3000,\r\n\t\toffset : {\r\n\t\t\tx : 450,\r\n\t\t\ty : 65\r\n\t\t}\r\n\t}\r\n\r\n\t);\r\n}", "title": "" }, { "docid": "c095a662c0a8b0b82e12d37cd0171719", "score": "0.5636462", "text": "function ShowAlert(type, title, text) {\n swal({\n title: title,\n text: text,\n html: true,\n confirmButtonText: 'بستن',\n confirmButtonColor: type === 0 ? '#52c466' : '#ff994c',\n type: type === 0 ? 'success' : 'error'\n });\n}", "title": "" }, { "docid": "c3abbc3ca55999b2c122c9f60eef95c6", "score": "0.5625728", "text": "function emitAlert(tipo, mensaje) {\n // Emite un mensaje con los parametros enviados\n Swal.fire({\n type: tipo,\n title: 'Mensaje enviado...',\n text: mensaje,\n footer: '<a href=\"https://www.zurichfondos.cl/\" target=\"_blank\">¿Quieres conocer más acerca de nuestros fondos?</a>'\n })\n}", "title": "" }, { "docid": "fdb2c1f3a012dfaec856a4c34b07e6cf", "score": "0.56236845", "text": "function updatedSuccessfully() {\n noty({\n text: 'Item updated successfully',\n type: 'success',\n layout: 'topCenter',\n timeout: 2000\n });\n }", "title": "" }, { "docid": "779214d870fa170214c86f4c2cae3c56", "score": "0.5616518", "text": "function showNotifications(typeBox, message) {\n let box = $('#' + typeBox);\n box.text(message);\n box.show();\n if (typeBox === 'infoBox') {\n setTimeout(() => {\n box.fadeOut();\n\n }, 3000);\n }\n if (typeBox == 'errorBox') {\n box.click(() => {\n box.fadeOut();\n });\n }\n }", "title": "" }, { "docid": "a9bcc4ea7f4e96b1b6bdd5c6e0cbc7d0", "score": "0.5603541", "text": "function reportFeedback( type, text, e ) {\r\n var messagesDiv = (Ext.get( \"messages\" ) !== null);\r\n if ( type === \"error\" ) {\r\n if ( messagesDiv ) {\r\n Ext.DomHelper.overwrite( \"messages\", {\r\n tag : 'img',\r\n src : ctxBasePath + '/images/icons/warning.png'\r\n } );\r\n Ext.DomHelper.append( \"messages\", {\r\n tag : 'span',\r\n html : \"&nbsp;There was an error:<br/>\" + text + e\r\n } );\r\n } else {\r\n Ext.Msg.show( {\r\n title : 'Error',\r\n msg : \"There was an error:<br/>\" + text + e,\r\n buttons : Ext.Msg.OK,\r\n icon : Ext.MessageBox.WARNING\r\n } );\r\n }\r\n\r\n } else if ( type === \"loading\" ) {\r\n if ( messagesDiv ) {\r\n Ext.DomHelper.overwrite( \"messages\", {\r\n tag : 'img',\r\n src : ctxBasePath + '/images/default/tree/loading.gif'\r\n } );\r\n }\r\n } else if ( type === \"success\" ) {\r\n if ( messagesDiv ) {\r\n Ext.DomHelper.overwrite( \"messages\", \"\" );\r\n }\r\n }\r\n}", "title": "" }, { "docid": "f88b1d0b7451f519e81714f266a621fe", "score": "0.5592891", "text": "function buildAlert(type, message) {\n return '<div class=\"alert '+ type +' alert-dismissible fade show\" role=\"alert\">'\n + message\n + '<button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\">'\n + ' <span aria-hidden=\"true\">&times;</span> '\n + '</button></div>';\n}", "title": "" }, { "docid": "d9eb950dc4cda9374ba4675c035727e9", "score": "0.55907524", "text": "function SmallNotificationTimeOut(content, type, tout) {\n var color = '#739E73'; //success\n if (type == 0) { color = '#C79121'; } //warning\n else if (type == -1) { color = '#C46A69'; } //unsuccess\n else if (type == 2) { color = '#3276B1'; } // info\n try {\n $.smallBox({\n title: 'Valuepad Team',\n content: \"<i class='fa fa-clock-o'></i> <i>\" + content + \"</i>\",\n color: color,\n iconSmall: \"fa fa-check fa-2x fadeInRight animated\",\n timeout: tout\n });\n } catch (err) { }\n}", "title": "" }, { "docid": "5e11115686a297cbd8746a6a9d87a41f", "score": "0.5588867", "text": "function addedSuccessfully() {\n noty({\n text: 'Item added successfully',\n type: 'success',\n layout: 'topCenter',\n timeout: 2000\n });\n }", "title": "" }, { "docid": "af9d57897a2c7c5d5ed6bf5f461cf961", "score": "0.55856407", "text": "function playNextAlert() {\r\n $.notify({\r\n title: '<strong>Queue</strong>',\r\n icon: 'fas fa-list-alt',\r\n message: \" is empty!\"\r\n }, {\r\n type: 'warning',\r\n delay: 400,\r\n animate: {\r\n enter: 'animated fadeInUp',\r\n exit: 'animated fadeOutRight'\r\n },\r\n placement: {\r\n from: \"bottom\",\r\n align: \"right\"\r\n },\r\n offset: 20,\r\n spacing: 10,\r\n z_index: 1031,\r\n });\r\n}", "title": "" }, { "docid": "081f427388c1afb9e707d5a7fe48967c", "score": "0.5583548", "text": "function alerta(message, type='light', position='center', width='')\n {\n if(width == '')\n {bs4pop.notice(message, {type:type, position:position});}\n else\n {bs4pop.notice(message, {type:type, position:position, width:width});}\n }", "title": "" }, { "docid": "fe5047ba087b3f369d0b4afdc4a29a45", "score": "0.5582821", "text": "function showMessage(message, type) {\r\n var $alertBox = $('.mail-response');\r\n\r\n if ($alertBox.is(':visible')) {\r\n $alertBox.finish();\r\n }\r\n\r\n if (type === 'success') {\r\n $alertBox.html(message)\r\n .removeClass('alert-success alert-error')\r\n .addClass('alert-success')\r\n .show()\r\n .delay(ALERT_SHOW_DELAY_MS)\r\n .fadeOut(ALERT_FADE_OUT_MS);\r\n } else if (type === 'error') {\r\n $alertBox.html(message)\r\n .removeClass('alert-success alert-error')\r\n .addClass('alert-error')\r\n .show()\r\n .delay(ALERT_SHOW_DELAY_MS)\r\n .fadeOut(ALERT_FADE_OUT_MS);\r\n }\r\n}", "title": "" }, { "docid": "cd76d64727205aee8b4345a96ed65d90", "score": "0.55670375", "text": "function sweetalert(message, type){\n\n if(type == 'error'){\n var colorBtn = 'btn btn-lg btn-danger';\n }else if(type == 'success'){\n var colorBtn = 'btn btn-lg btn-success';\n }else{\n var colorBtn = 'btn btn-lg btn-primary';\n }\n\n swal({\n text: message,\n type: type,\n allowOutsideClick: false,\n confirmButtonText: 'Ok',\n confirmButtonClass: colorBtn,\n buttonsStyling: false\n });\n\n }", "title": "" }, { "docid": "212db1c0a2ca40943571640d29a43419", "score": "0.55586076", "text": "notify(place, color, message, icon) {\n var options = {};\n options = {\n place: place,\n message: message,\n type: color,\n icon: icon,\n autoDismiss: 5\n };\n this.refs.notify.notificationAlert(options);\n }", "title": "" }, { "docid": "16ad7ef64fc7a477da86b445b3fcd133", "score": "0.55534154", "text": "function genericError () {\n return chatbot.actions.displaySystemMessage({\n translate: true,\n message: 'alert-title',\n id: 'incontact-error',\n options: [{\n label: 'alert-button',\n value: 'try-again'\n }]\n });\n }", "title": "" }, { "docid": "1b9d46ef1eb7333ec0aecef1912a0c53", "score": "0.5550534", "text": "function showNotify(id, where, text) {\n showAlertGeneric(id, \"alert-info\", where, text)\n}", "title": "" }, { "docid": "b793da99f164a5fa46289d412f803234", "score": "0.5549507", "text": "function notice_api(_$title = null,_$body = null,_$icon = null,_$badge = null,_$image = null){\n if(window.Notification && Notification.permission !== \"denied\") {\n Notification.requestPermission(function(_status) {\n var n = new Notification(_$title, { \n body: _$body,\n icon: _$icon,\n image: _$image\n }); \n });\n return true;\n }else{\n return false;\n }\n }", "title": "" }, { "docid": "8b25281094f999e3d388a4defe4d50ed", "score": "0.5542567", "text": "featureNotAvailableMsg(){\n toastr.error(i18n.general.feature_not_available);\n }", "title": "" }, { "docid": "8b25281094f999e3d388a4defe4d50ed", "score": "0.5542567", "text": "featureNotAvailableMsg(){\n toastr.error(i18n.general.feature_not_available);\n }", "title": "" }, { "docid": "8ea9fd5e770fc1941442016c188c5c67", "score": "0.55397797", "text": "function alert(target, text, type = 'danger') {\n target.prepend(createHTMLElement('div', { class: 'alert alert-' + type, role: 'alert', innerHTML: text }));\n}", "title": "" }, { "docid": "80032168acdaadf17a9fa84f8e1b5ae8", "score": "0.55348843", "text": "static addUserMessage(info) {\n if (info.cleanAll) {\n toastr.clear();\n }\n if (info.hasOwnProperty(\"message\")) {\n const title = info.hasOwnProperty(\"title\") && info.title !== \"undefined\" ? info.title : null;\n if (info.hasOwnProperty(\"level\") && info.level === \"success\") {\n toastr.success(info.message, title);\n } else if (info.hasOwnProperty(\"level\") && info.level === \"warning\") {\n toastr.warning(info.message, title);\n } else if (info.hasOwnProperty(\"level\") && info.level === \"error\") {\n toastr.error(info.message, title);\n } else {\n toastr.info(info.message, title);\n }\n }\n }", "title": "" }, { "docid": "c8dd9e9ad8f1b880b7a2509f1f66dec6", "score": "0.55345124", "text": "function displayAlert(type, msg) {\n var alert = `\n <div class='alert alert-dismissible alert-${type}'>\n <p>${msg}</p>\n <a href=\"#\" class=\"close\" data-dismiss=\"alert\" aria-label=\"close\">&times;</a>\n </div>\n `;\n $('#alert-msg').append(alert);\n}", "title": "" }, { "docid": "ff8fc2a9c4abf26f7f2b9abcb0453069", "score": "0.55173206", "text": "function showInfoPopUp(type, status){\n\tif(status != null && status == 'Y'){\n\t\tvar successMsg = MS_FUNC_MSG[type][0];\n\t\tif(successMsg != null && successMsg.length > 0){\n\t\t\t$('div.ms-info-popup').find('.success-msg').text(successMsg).removeClass('hide');\n\t\t}\n\t}\n\telse if(status != null && status == 'N'){\n\t\tvar errorMsg = MS_FUNC_MSG[type][1];\n\t\tif(errorMsg != null && errorMsg.length > 0){\n\t\t\t$('div.ms-info-popup').find('.error-msg').text(errorMsg).removeClass('hide');\n\t\t}\n\t}\n\t$('div#ms-info-popup').modal('show');\n}", "title": "" }, { "docid": "61171fd850b2435a29b095ca0a6392a8", "score": "0.5515358", "text": "function set_message(status, message)\n{\n if(status == 'failed' || status == 'error' || status == 0) \n {\n title = 'Oh No!';\n type = 'error';\n }else{\n title = 'Success!';\n type = 'success';\n }\n\n new PNotify({\n title: title,\n text: message,\n type: type,\n nonblock: {\n nonblock: true\n },\n });\n}", "title": "" }, { "docid": "fa592776e87f58676279b78fb10d6822", "score": "0.550739", "text": "function onAboutInfoAlert(alert)\n{\n var staticTexts = alert.staticTexts();\n var title = staticTexts.length > 0 ? staticTexts[0].name() : \"<null>\";\n UIALogger.logMessage(\"Alert with title = '\" + title + \"'\");\n alert.logElementTree();\n g_aboutInfoIsValid = staticTexts.length == 2 && staticTexts[0].name() == \"TestBed\" && \n staticTexts[1].name().substr(0, 33) == \"Copyright (C) 2010, Irdeto Canada\";\n //target.delay(3);\n return false; // use default handler\n}", "title": "" }, { "docid": "dd8fc54aa783a925b008388bc95b5ccb", "score": "0.5500113", "text": "function notify(text, type, persist) {\n\t\t\n\t\tvar notification = $('#ntv_notification')\n\t\t , cssClass = (type === 'error') ? 'ntv_error' : '';\n\t\t\n\t\tnotification.attr('class','');\n\t\tnotification.addClass(cssClass);\n\t\tnotification.html(text);\n\t\t\n\t\tnotification.fadeIn(200, function() {\n\t\t\tif (!persist) {\n\t\t\t\tnotification.delay(2000).fadeOut(200);\n\t\t\t}\n\t\t});\n\t}", "title": "" }, { "docid": "df5aa956b75871e271e5a30e67e9d145", "score": "0.54911673", "text": "function showSAlert(title, msg, type) {\n Swal.fire(title, msg, type)\n}", "title": "" }, { "docid": "cfdfe04a68f2edfa092155dc045239a0", "score": "0.5489408", "text": "failureMessage() {\n\t\tthis.props.setMessage('Jokin meni pieleen.', 'danger')\n\t}", "title": "" }, { "docid": "d863426e0d6ae0e22d908b648ffb2752", "score": "0.54819185", "text": "function ShowAlert(msg_title, msg_body, msg_type) {\r\n var AlertMsg = $('#alert_message');\n $(AlertMsg).find('strong').html(msg_title);\n $(AlertMsg).find('p').html(msg_body);\n\n if (msg_type == 'success') {\r\n $(AlertMsg).removeClass('alert-info');\n $(AlertMsg).removeClass('alert-warning');\n $(AlertMsg).removeClass('alert-danger');\n $(AlertMsg).addClass('alert-' + msg_type);\r\n } else if (msg_type == 'info') {\r\n $(AlertMsg).removeClass('alert-success');\n $(AlertMsg).removeClass('alert-warning');\n $(AlertMsg).removeClass('alert-danger');\n $(AlertMsg).addClass('alert-' + msg_type);\r\n } else if (msg_type == 'warning') {\r\n $(AlertMsg).removeClass('alert-success');\n $(AlertMsg).removeClass('alert-info');\n $(AlertMsg).removeClass('alert-danger');\n $(AlertMsg).addClass('alert-' + msg_type);\r\n } else if (msg_type == 'danger') {\r\n $(AlertMsg).removeClass('alert-success');\n $(AlertMsg).removeClass('alert-warning');\n $(AlertMsg).removeClass('alert-info');\n $(AlertMsg).addClass('alert-' + msg_type);\r\n }\n $(AlertMsg).show();\r\n}", "title": "" }, { "docid": "bb6bb399b4821a124f90163874be17d7", "score": "0.5477111", "text": "function NotifierNotificationOptions() { }", "title": "" }, { "docid": "7caabc9d570124562c99068288780680", "score": "0.54725856", "text": "function mostrarAlerta(texto, tipo){\n new Message(texto, {\n duration: 4000,\n type: tipo,\n class : 'alerta'\n }).show();\n}", "title": "" }, { "docid": "7caabc9d570124562c99068288780680", "score": "0.54725856", "text": "function mostrarAlerta(texto, tipo){\n new Message(texto, {\n duration: 4000,\n type: tipo,\n class : 'alerta'\n }).show();\n}", "title": "" }, { "docid": "b6beff27d2ce96830f5f7f3b4377fd34", "score": "0.5470799", "text": "function alertHandler (args) {\n \n args = args || {};\n \n if (app.get('env') === 'production' && args.type !== 'error') {\n return;\n }\n \n let types = {\n normal: 'white',\n success: 'green',\n info: 'blue',\n warning: 'yellow',\n error: 'red'\n },\n type = args.type || 'info',\n title = args.title || type,\n message = args.message || 'Remember to specify necessary property type & message in a configuration object.',\n color = types[type],\n messageTemplate = `\n**~~~~~~~~* ${title.toUpperCase()} LOG - OPEN *~~~~~~~~~**\n${message}\n**~~~~~~~~* ${title.toUpperCase()} LOG - CLOSE *~~~~~~~~**`;\n \n console.log(chalk[color](messageTemplate));\n \n}", "title": "" }, { "docid": "1272939f39f45e62396a31e09d9030ff", "score": "0.5470256", "text": "function warning(message, title, onClick) {\n toastr.warning(message, title, {\n timeOut: config.warningTimeOut || config.timeOut || 5000,\n onclick: onClick,\n closeButton: util.isFunction(onClick)\n });\n }", "title": "" }, { "docid": "3600b8436ec98e3e1699a951e5869bc8", "score": "0.545101", "text": "function alertMessage(msg, type){\n alert(msg);\n}", "title": "" }, { "docid": "da80efa0021bcc6668e6660f406f9649", "score": "0.5445189", "text": "function ShowAlertWithTitleAndIcon(title, msg, icontype, footer) {\n Swal.fire({\n icon: icontype,//'error',\n title: title,//'Oops...',\n text: msg,//'Something went wrong!',\n footer: footer//'<a href>Why do I have this issue?</a>'\n })\n}", "title": "" }, { "docid": "a4d8b169e533a59162fcf6b6f72cbe5c", "score": "0.54443806", "text": "function EditionIpAlertSuccess() {\n $.gritter.add({\n title: \"Sauvegarde de l'adresse IP\",\n text: \"Opération effectué\",\n class_name: \"gritter-success\",\n before_open: function () {\n },\n after_open: function (t) {\n },\n before_close: function (t) {\n },\n after_close: function (t) {\n }\n });\n}", "title": "" }, { "docid": "6a42515cb40f5ccd24a8ac25e3ad303b", "score": "0.5435075", "text": "warning(message){\n this.send('yellow',message,2);\n }", "title": "" }, { "docid": "2108c3431158866dc044317cffedd01a", "score": "0.54332507", "text": "confirm(state, info){\n if (typeof info == \"string\"){\n info = {message: info};\n }\n\n info.ifConfirm = true;\n info.ifShow = true;\n state.messagePlugin = info;\n }", "title": "" }, { "docid": "c60ef405bde1e9411db0eaa8e7d0534c", "score": "0.5429129", "text": "function vAlert(str, fn) {\n //you can pass a function to the method if you want to do anything after clicking 'OK'\n Boxy.ask(str, { 'yes': 'OK' }, function(r) { if (fn != null) fn(); }, { title: 'Alert Message' });\n return false;\n}", "title": "" }, { "docid": "70d1dc5783f9400897332d8904929b07", "score": "0.5410542", "text": "function notify(message, type) {\n $.notify({\n message: message\n }, {\n type: type,\n allow_dismiss: false,\n label: 'Cancel',\n className: 'btn-xs btn-default',\n placement: {\n from: 'top',\n align: 'right'\n },\n delay: 2500,\n animate: {\n enter: 'animated flipInX',\n exit: 'animated flipOutX'\n },\n offset: {\n x: 30,\n y: 30\n }\n });\n }", "title": "" }, { "docid": "bc2243bd8891e50fa16298720b35e501", "score": "0.54100937", "text": "setupSiteDetailsInfoSuccess() {\n store.state.status = {\n got: true\n };\n store.state.notification_text = 'Site info successfully udpated!';\n store.state.notification_icon = 'info';\n store.state.notification_color = 'primary';\n\n }", "title": "" }, { "docid": "1d0e91fc853416bc7a67e3b877b6fa16", "score": "0.54099345", "text": "function alert(Title, Text, Duration = 5) {\n xapi.Command.UserInterface.Message.Alert.Display({ Title, Text, Duration });\n}", "title": "" } ]
db0d6d3b960c0704f12f2d0c3d345f63
traverse a wrap, executing the hash callback after each file is hashed, and end callback when all files have been hashed
[ { "docid": "f8eb5c7f798704b478fa6fe80e393cfd", "score": "0.59989727", "text": "function traverseWrap (wrap, cacheDir, hashCB, endCB) {\n var toHash = 0;\n\n Object.keys(wrap.dependencies).forEach(function (depName) {\n _traverseWrap(path.join(npm.dir, depName), depName, wrap.dependencies[depName]);\n });\n\n function _traverseWrap (depPath, name, dep) {\n toHash++;\n var data = localJson(path.join(depPath));\n var sha = getShasum(npm.cache || cacheDir, name, dep.version);\n hashCB(null, name, dep, sha);\n\n if (dep.dependencies) {\n Object.keys(dep.dependencies).forEach(function (depName) {\n // skip bundled bependencies, the sha of the parent covers these\n if (data.bundleDependencies && data.bundleDependencies.indexOf(depName) >= 0) return;\n _traverseWrap(path.join(depPath, 'node_modules', depName), depName, dep.dependencies[depName]);\n });\n }\n if (--toHash === 0) {\n endCB(null, wrap);\n }\n }\n}", "title": "" } ]
[ { "docid": "26cefb65e5c8ec56befd0eed3630d0a9", "score": "0.54622483", "text": "function hash_each(hash, callback) {\n var key, element;\n for (key in hash) if (this.hasOwnProperty(key)) {\n element = hash[key];\n callback(key, element, hash);\n }\n }", "title": "" }, { "docid": "a34ea0076d4b5e9b4effae6b29d033f4", "score": "0.5459949", "text": "function getHashes() {\n var index;\n\n for (index=0; index < length; index++) {\n contract.getHash(index, getHashCb);\n }\n}", "title": "" }, { "docid": "e1a0edf657e132845f7c977cbd482755", "score": "0.54114956", "text": "async function handleHashes(hashArray) {\n output = []\n var hashAsciiArray = hashArray.map(function(item) { return web3.utils.toAscii(item[\"interactionHash\"]);})\n const imageArray = await Promise.all(\n hashAsciiArray.map(hashToFile)\n );\n\n hashArray.forEach(async(element, index) => {\n var dateTime = element['dateTime'];\n var isValid = element['isValid'];\n var hash = element['interactionHash'];\n var hashAscii = web3.utils.toAscii(hash);\n var image = imageArray[index]\n var issuer = element['issuer']\n var recipient = element['recipient']\n output.push({id : index, hash : hashAscii, image, dateTime, issuer, recipient, isValid}) \n })\n return output;\n}", "title": "" }, { "docid": "6f2bbafeda647d872678c2d64b606d51", "score": "0.5403666", "text": "function hashAll() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var hasher = newHash();\n for (var i = 0; i < args.length; i++) {\n blakejs_1[\"default\"].blake2bUpdate(hasher, args[i]);\n }\n return blakejs_1[\"default\"].blake2bFinal(hasher);\n}", "title": "" }, { "docid": "14f3451036f902f5e3d6265f9f6568ec", "score": "0.5356325", "text": "multihash (type, callback) {\n if (typeof type === 'function') {\n callback = type\n type = 'sha2-256'\n }\n if (!this._cached[type] || this._updated) {\n waterfall([\n (cb) => util.serialize(this, cb),\n (serialized, cb) => util.hash(type, serialized, cb)\n ], (err, digest) => {\n if (err) {\n return callback(err)\n }\n\n this._cached[type] = digest\n this._updated = false\n callback(null, this._cached[type])\n })\n } else {\n callback(null, this._cached[type])\n }\n }", "title": "" }, { "docid": "53d9ec8bc25ceeea399cc44110c8ad0f", "score": "0.53340113", "text": "function done(err)\n {\n // get all the hashnames we used/found and do final sort to return\n Object.keys(did).forEach(function(k){ if(queue.indexOf(k) == -1) queue.push(k); });\n Object.keys(doing).forEach(function(k){ if(queue.indexOf(k) == -1) queue.push(k); });\n sort();\n while(cb = hn.seeking.shift()) cb(err, queue.slice());\n }", "title": "" }, { "docid": "53d9ec8bc25ceeea399cc44110c8ad0f", "score": "0.53340113", "text": "function done(err)\n {\n // get all the hashnames we used/found and do final sort to return\n Object.keys(did).forEach(function(k){ if(queue.indexOf(k) == -1) queue.push(k); });\n Object.keys(doing).forEach(function(k){ if(queue.indexOf(k) == -1) queue.push(k); });\n sort();\n while(cb = hn.seeking.shift()) cb(err, queue.slice());\n }", "title": "" }, { "docid": "e3809aa04525ce6b5d93a07ec96552ae", "score": "0.52955115", "text": "async generateImages() {\n for (const hash in this.state.hashes) {\n if (!this.state.hashes.hasOwnProperty(hash)) continue;\n try {\n const res = await this.generateImage(hash);\n if (res.success) {\n this.markHashDone(hash, PROCESSED);\n } else {\n this.markHashDone(hash, ERROR);\n }\n } catch(e) {\n this.markHashDone(hash, ERROR);\n } finally {\n this.updateProgress();\n }\n }\n }", "title": "" }, { "docid": "4dac283cbe310336fe5215cb352907d0", "score": "0.5259011", "text": "async returnBlockFilenameByHash(block_hash, mycallback) {}", "title": "" }, { "docid": "f81807529d2cb974ea61d65cc2e5c86a", "score": "0.5143793", "text": "function iter(block) {\n var hash = crypto.createHash(opts.digest || 'md5');\n hash.update(block);\n hash.update(data);\n hash.update(salt);\n block = hash.digest();\n\n for (var i = 1; i < (opts.count || 1); i++) {\n hash = crypto.createHash(opts.digest || 'md5');\n hash.update(block);\n block = hash.digest();\n }\n\n return block;\n }", "title": "" }, { "docid": "37ecd64f3d8edf72c0905196095eb230", "score": "0.514146", "text": "function GetHash(hash, callback)\n{\n print(\"Creating hash:\");\n hash.Clear(onClear);\n\n function onClear(hashV, status)\n {\n if(wgssSignatureSDK.ResponseStatus.OK == status)\n {\n hash.PutType(wgssSignatureSDK.HashType.HashMD5, onPutType);\n }\n else\n {\n print(\"Hash Clear error: \" + status);\n }\n }\n\n function onPutType(hashV, status)\n {\n if(wgssSignatureSDK.ResponseStatus.OK == status)\n {\n var vFname = new wgssSignatureSDK.Variant();\n vFname.Set(paramModule.fname);\n hash.Add(vFname, onAddFname);\n }\n else\n {\n print(\"Hash PutType error: \" + status);\n }\n }\n\n function onAddFname(hashV, status)\n {\n if(wgssSignatureSDK.ResponseStatus.OK == status)\n {\n var vLname = new wgssSignatureSDK.Variant();\n vLname.Set(paramModule.lname);\n hash.Add(vLname, onAddLname);\n }\n else\n {\n print(\"Hash Add error: \" + status);\n }\n }\n\n function onAddLname(hashV, status)\n {\n if(wgssSignatureSDK.ResponseStatus.OK == status)\n {\n callback();\n }\n else\n {\n print(\"Hash Add error: \" + status);\n }\n }\n}", "title": "" }, { "docid": "23cd40ddbf7cce9fa15727a3e3395958", "score": "0.50313944", "text": "function updateSignaturesFromCache(state,signatureCache){signatureCache.forEach(function(signature,path){return updateSignatureOfFile(state,signature,path);});}", "title": "" }, { "docid": "8bbf99359261711bfd1576e33085dd71", "score": "0.50008386", "text": "function collectFiles() {\n var files = [];\n var passwords = [];\n var urls = [];\n var paths = [];\n transform(compareFileMap, files, passwords);\n transform(compareFileGuidMap, paths, null);\n transform(compareFileUrlMap, urls, null);\n for (var i = 0; i < idx; i++) {\n var prefix = 'idx' + i;\n // fill files and passwords\n transformInternal(compareFileMap, prefix, files, passwords);\n // fill paths by objects with path to file and password\n transformToObj(compareFileGuidMap, prefix, paths);\n // fill urls by objects with url to file and password\n transformToObj(compareFileUrlMap, prefix, urls);\n }\n\n return {\"files\": files, \"passwords\": passwords, \"urls\": urls, \"paths\": paths};\n}", "title": "" }, { "docid": "3b9756a76c947cef5058daafcb7846e8", "score": "0.49445406", "text": "setupShaLookup() {\n console.log('setupShaLookup');\n this.JSONCommits.reduce((results, commit) => {\n results[commit.sha] = commit;\n commit.children = [];\n return results;\n }, this.SHALookup);\n }", "title": "" }, { "docid": "339e7adae2886571920eac84b439ad13", "score": "0.492738", "text": "run(callback) {\n this.start(function loop(entry, iterator, blob, tester) {\n if (!entry.done) {\n let name = entry.value[1].name,\n url = URL.createObjectURL(blob),\n compare = 'compare/' + name + '.png';\n\n tester.compareImagesFromURLs(url, compare, function (imgA, imgB, result) {\n callback({ value: [name, { a: imgA, b: imgB, result }], done: entry.done });\n\n tester.next(loop, iterator);\n });\n } else {\n callback(entry);\n }\n });\n }", "title": "" }, { "docid": "c77b770d114f117a1bd4ecf6e2f3bf9d", "score": "0.49203628", "text": "function hashFiles(patterns, currentWorkspace = '', options, verbose = false) {\n return __awaiter(this, void 0, void 0, function* () {\n let followSymbolicLinks = true;\n if (options && typeof options.followSymbolicLinks === 'boolean') {\n followSymbolicLinks = options.followSymbolicLinks;\n }\n const globber = yield create(patterns, { followSymbolicLinks });\n return internal_hash_files_1.hashFiles(globber, currentWorkspace, verbose);\n });\n}", "title": "" }, { "docid": "1a4b803cdc86a2f03db114d585996109", "score": "0.48912075", "text": "function iter(block){var hash=ethUtil.crypto.createHash(opts.digest||'md5');hash.update(block);hash.update(data);hash.update(salt);block=hash.digest();for(var i=1;i<(opts.count||1);i++){hash=ethUtil.crypto.createHash(opts.digest||'md5');hash.update(block);block=hash.digest();}return block;}", "title": "" }, { "docid": "2887687990afcf93cc58747b26c068cc", "score": "0.48466432", "text": "wrapUploadDoneCallback(callback) {\n return result => {\n project().filesVersionId = result.filesVersionId;\n if (callback) {\n callback(result);\n }\n };\n }", "title": "" }, { "docid": "693e6b56c5eb759e2bce04676794991c", "score": "0.48292476", "text": "function processHashes(pkg, component) {\n if (pkg._shasum) {\n component.hashes.push({ hash: { \"@alg\":\"SHA-1\", value: pkg._shasum} });\n } else if (pkg._integrity) {\n let integrity = ssri.parse(pkg._integrity);\n // Components may have multiple hashes with various lengths. Check each one\n // that is supported by the CycloneDX specification.\n if (integrity.hasOwnProperty(\"sha512\")) {\n addComponentHash(\"SHA-512\", integrity.sha512[0].digest, component);\n }\n if (integrity.hasOwnProperty(\"sha384\")) {\n addComponentHash(\"SHA-384\", integrity.sha384[0].digest, component);\n }\n if (integrity.hasOwnProperty(\"sha256\")) {\n addComponentHash(\"SHA-256\", integrity.sha256[0].digest, component);\n }\n if (integrity.hasOwnProperty(\"sha1\")) {\n addComponentHash(\"SHA-1\", integrity.sha1[0].digest, component);\n }\n }\n if (component.hashes.length === 0) {\n delete component.hashes; // If no hashes exist, delete the hashes node (it's optional)\n }\n}", "title": "" }, { "docid": "7b1ef444f759acd0b15f804fb0445842", "score": "0.4828666", "text": "function iter(block) {\n var hash = ethUtil.crypto.createHash(opts.digest || 'md5');\n hash.update(block);\n hash.update(data);\n hash.update(salt);\n block = hash.digest();\n for (var i = 1; i < (opts.count || 1); i++) {\n hash = ethUtil.crypto.createHash(opts.digest || 'md5');\n hash.update(block);\n block = hash.digest();\n }\n return block;\n }", "title": "" }, { "docid": "76c5087e0180234645ffc433ca556329", "score": "0.481108", "text": "function _hashPaths(id,bnodes,namer,pathNamer,callback){// create SHA-1 digest\nvar md=sha1.create();// group adjacent bnodes by hash, keep properties and references separate\nvar groups={};var groupHashes;var quads=bnodes[id].quads;return groupNodes(0);function groupNodes(i){if(i===quads.length){// done, hash groups\ngroupHashes=Object.keys(groups).sort();return hashGroup(0);}// get adjacent bnode\nvar quad=quads[i];var bnode=_getAdjacentBlankNodeName(quad.subject,id);var direction=null;if(bnode!==null){// normal property\ndirection='p';}else{bnode=_getAdjacentBlankNodeName(quad.object,id);if(bnode!==null){// reverse property\ndirection='r';}}if(bnode!==null){// get bnode name (try canonical, path, then hash)\nvar name;if(namer.isNamed(bnode)){name=namer.getName(bnode);}else if(pathNamer.isNamed(bnode)){name=pathNamer.getName(bnode);}else{name=_hashQuads(bnode,bnodes);}// hash direction, property, and bnode name/hash\nvar md=sha1.create();md.update(direction);md.update(quad.predicate.value);md.update(name);var groupHash=md.digest();// add bnode to hash group\nif(groupHash in groups){groups[groupHash].push(bnode);}else{groups[groupHash]=[bnode];}}return groupNodes(i+1);}// hashes a group of adjacent bnodes\nfunction hashGroup(i){if(i===groupHashes.length){// done, return SHA-1 digest and path namer\nreturn callback(null,{hash:md.digest(),pathNamer:pathNamer});}// digest group hash\nvar groupHash=groupHashes[i];md.update(groupHash);// choose a path and namer from the permutations\nvar chosenPath=null;var chosenNamer=null;var permutator=new Permutator(groups[groupHash]);return permutate();function permutate(){var permutation=permutator.next();var pathNamerCopy=pathNamer.clone();// build adjacent path\nvar path='';var recurse=[];for(var n in permutation){var bnode=permutation[n];// use canonical name if available\nif(namer.isNamed(bnode)){path+=namer.getName(bnode);}else{// recurse if bnode isn't named in the path yet\nif(!pathNamerCopy.isNamed(bnode)){recurse.push(bnode);}path+=pathNamerCopy.getName(bnode);}// skip permutation if path is already >= chosen path\nif(chosenPath!==null&&path.length>=chosenPath.length&&path>chosenPath){return nextPermutation(true);}}// does the next recursion\nreturn nextRecursion(0);function nextRecursion(n){if(n===recurse.length){// done, do next permutation\nreturn nextPermutation(false);}// do recursion\nvar bnode=recurse[n];return _hashPaths(bnode,bnodes,namer,pathNamerCopy,function(err,result){if(err){return callback(err);}path+=pathNamerCopy.getName(bnode)+'<'+result.hash+'>';pathNamerCopy=result.pathNamer;// skip permutation if path is already >= chosen path\nif(chosenPath!==null&&path.length>=chosenPath.length&&path>chosenPath){return nextPermutation(true);}// do next recursion\nreturn nextRecursion(n+1);});}// stores the results of this permutation and runs the next\nfunction nextPermutation(skipped){if(!skipped&&(chosenPath===null||path<chosenPath)){chosenPath=path;chosenNamer=pathNamerCopy;}// do next permutation\nif(permutator.hasNext()){return permutate();}else{// digest chosen path and update namer\nmd.update(chosenPath);pathNamer=chosenNamer;// hash the next group\nreturn hashGroup(i+1);}}}}}", "title": "" }, { "docid": "3c7230c38b0f0deac65412ac9ffcf0b1", "score": "0.4789418", "text": "computeHash() {\n this.hash = this.Hash();\n }", "title": "" }, { "docid": "3cd1cadc8f06e80d01bcfaaf42667b17", "score": "0.47845453", "text": "function hashGroup(i) {\n if(i === groupHashes.length) {\n // done, return SHA-1 digest and path namer\n return callback(null, {hash: md.digest(), pathNamer: pathNamer});\n }\n\n // digest group hash\n var groupHash = groupHashes[i];\n md.update(groupHash);\n\n // choose a path and namer from the permutations\n var chosenPath = null;\n var chosenNamer = null;\n var permutator = new Permutator(groups[groupHash]);\n return permutate();\n function permutate() {\n var permutation = permutator.next();\n var pathNamerCopy = pathNamer.clone();\n\n // build adjacent path\n var path = '';\n var recurse = [];\n for(var n in permutation) {\n var bnode = permutation[n];\n\n // use canonical name if available\n if(namer.isNamed(bnode)) {\n path += namer.getName(bnode);\n } else {\n // recurse if bnode isn't named in the path yet\n if(!pathNamerCopy.isNamed(bnode)) {\n recurse.push(bnode);\n }\n path += pathNamerCopy.getName(bnode);\n }\n\n // skip permutation if path is already >= chosen path\n if(chosenPath !== null && path.length >= chosenPath.length &&\n path > chosenPath) {\n return nextPermutation(true);\n }\n }\n\n // does the next recursion\n return nextRecursion(0);\n function nextRecursion(n) {\n if(n === recurse.length) {\n // done, do next permutation\n return nextPermutation(false);\n }\n\n // do recursion\n var bnode = recurse[n];\n return _hashPaths(bnode, bnodes, namer, pathNamerCopy,\n function(err, result) {\n if(err) {\n return callback(err);\n }\n path += pathNamerCopy.getName(bnode) + '<' + result.hash + '>';\n pathNamerCopy = result.pathNamer;\n\n // skip permutation if path is already >= chosen path\n if(chosenPath !== null && path.length >= chosenPath.length &&\n path > chosenPath) {\n return nextPermutation(true);\n }\n\n // do next recursion\n return nextRecursion(n + 1);\n });\n }\n\n // stores the results of this permutation and runs the next\n function nextPermutation(skipped) {\n if(!skipped && (chosenPath === null || path < chosenPath)) {\n chosenPath = path;\n chosenNamer = pathNamerCopy;\n }\n\n // do next permutation\n if(permutator.hasNext()) {\n return permutate();\n } else {\n // digest chosen path and update namer\n md.update(chosenPath);\n pathNamer = chosenNamer;\n\n // hash the next group\n return hashGroup(i + 1);\n }\n }\n }\n }", "title": "" }, { "docid": "93b19809ec4d82bab44eda225b706262", "score": "0.4783053", "text": "watch(callback) {\n var update_watchers, watchers;\n // Remember which files we are watching\n watchers = {};\n // Updates the watchers list based on the filenames discovered with the last\n // `@squash` operation\n update_watchers = () => {\n var file, fn, j, len, new_watchers, ref, watcher;\n new_watchers = {};\n ref = this.ordered;\n // Otherwise create a watcher for the file\n fn = (file) => { // We use `do` to create a `skip` flag for each file\n var skip;\n skip = false;\n return new_watchers[file] = fs.watch(file, (event, filename = file) => {\n if (skip) {\n return;\n }\n skip = true;\n // Update after a short delay to ensure the file is available for\n // reading, and to ignore duplicate events\n return setTimeout(() => {\n var error, result;\n skip = false;\n this.modules = {};\n this.ordered = [];\n try {\n result = this.squash();\n update_watchers();\n return callback(null, result);\n } catch (error1) {\n error = error1;\n return callback(error);\n }\n }, 25);\n });\n };\n for (j = 0, len = ref.length; j < len; j++) {\n file = ref[j];\n if (file in watchers) {\n // If the file is already being watched just copy the watcher\n new_watchers[file] = watchers[file];\n continue;\n }\n fn(file);\n }\n // Clear the watchers for any file no longer in the dependency tree\n for (file in watchers) {\n watcher = watchers[file];\n if (!(file in new_watchers)) {\n watcher.close();\n }\n }\n return watchers = new_watchers;\n };\n // Start the first round of watchers\n callback(null, this.squash());\n return update_watchers();\n }", "title": "" }, { "docid": "c687f3975ea82130d42655f0bbdbeb8e", "score": "0.47579253", "text": "function hashGroup(i) {\n if(i === groupHashes.length) {\n // done, return SHA-1 digest and path namer\n return callback(null, {hash: md.digest(), pathNamer: pathNamer});\n }\n\n // digest group hash\n var groupHash = groupHashes[i];\n md.update(groupHash);\n\n // choose a path and namer from the permutations\n var chosenPath = null;\n var chosenNamer = null;\n var permutator = new Permutator(groups[groupHash]);\n jsonld.setImmediate(function() {permutate();});\n function permutate() {\n var permutation = permutator.next();\n var pathNamerCopy = pathNamer.clone();\n\n // build adjacent path\n var path = '';\n var recurse = [];\n for(var n in permutation) {\n var bnode = permutation[n];\n\n // use canonical name if available\n if(namer.isNamed(bnode)) {\n path += namer.getName(bnode);\n } else {\n // recurse if bnode isn't named in the path yet\n if(!pathNamerCopy.isNamed(bnode)) {\n recurse.push(bnode);\n }\n path += pathNamerCopy.getName(bnode);\n }\n\n // skip permutation if path is already >= chosen path\n if(chosenPath !== null && path.length >= chosenPath.length &&\n path > chosenPath) {\n return nextPermutation(true);\n }\n }\n\n // does the next recursion\n nextRecursion(0);\n function nextRecursion(n) {\n if(n === recurse.length) {\n // done, do next permutation\n return nextPermutation(false);\n }\n\n // do recursion\n var bnode = recurse[n];\n _hashPaths(bnode, bnodes, namer, pathNamerCopy,\n function(err, result) {\n if(err) {\n return callback(err);\n }\n path += pathNamerCopy.getName(bnode) + '<' + result.hash + '>';\n pathNamerCopy = result.pathNamer;\n\n // skip permutation if path is already >= chosen path\n if(chosenPath !== null && path.length >= chosenPath.length &&\n path > chosenPath) {\n return nextPermutation(true);\n }\n\n // do next recursion\n nextRecursion(n + 1);\n });\n }\n\n // stores the results of this permutation and runs the next\n function nextPermutation(skipped) {\n if(!skipped && (chosenPath === null || path < chosenPath)) {\n chosenPath = path;\n chosenNamer = pathNamerCopy;\n }\n\n // do next permutation\n if(permutator.hasNext()) {\n jsonld.setImmediate(function() {permutate();});\n } else {\n // digest chosen path and update namer\n md.update(chosenPath);\n pathNamer = chosenNamer;\n\n // hash the next group\n hashGroup(i + 1);\n }\n }\n }\n }", "title": "" }, { "docid": "bb3fde226a3b789034dc727c2aca78df", "score": "0.46862093", "text": "function existingHash(callback) {\n //console.log(req.session.shawed)\n File.findOne({ hash: { $exists: true, $in: [req.session.shawed] } }, function(err, file) {\n if (err) throw err;\n if(file){\n req.session.existingHash = true;\n User.findOne({$and:[{\"_id\":req.session.userId},{\"files.hash\":req.session.shawed}]}, function(err,userFile){\n if (err) throw err;\n if(userFile){\n req.session.existingUserHash = true;\n callback()\n }else{\n callback()\n }\n });\n }else{\n callback()\n }\n });\n }", "title": "" }, { "docid": "ca00ba933d2148dd27103823a1677d4e", "score": "0.4685579", "text": "function hashFirstWave(args){\n\tfor(i = 0; i<args.length; i++){\n\t\tlet hash = crypto.createHash('sha256').update(args[i]).digest('hex');\n\t\thashedFirstWave.push(hash)\t\t\n\t}\n\treturn hashedFirstWave\t\n}", "title": "" }, { "docid": "a706d2b239584d928d1452180ca0b813", "score": "0.46809345", "text": "function seek(hn, callback)\n{\n var self = this;\n if(typeof hn == \"string\") hn = self.whois(hn);\n if(!hn) return callback(\"invalid hashname\");\n\n var did = {};\n var doing = {};\n var queue = [];\n var wise = {};\n var closest = 255;\n \n // load all seeds and sort to get the top 3\n var seeds = []\n Object.keys(self.buckets).forEach(function(bucket){\n self.buckets[bucket].forEach(function(link){\n if(link.hashname == hn) return; // ignore the one we're (re)seeking\n if(link.seed) seeds.push(link);\n });\n });\n seeds.sort(function(a,b){ return dhash(hn.hashname,a.hashname) - dhash(hn.hashname,b.hashname) }).slice(0,3).forEach(function(seed){\n wise[seed.hashname] = true;\n queue.push(seed.hashname);\n });\n \n debug(\"seek starting with\",queue);\n\n // always process potentials in order\n function sort()\n {\n queue = queue.sort(function(a,b){\n return dhash(hn.hashname,a) - dhash(hn.hashname,b)\n });\n }\n\n // track when we finish\n function done(err)\n {\n // get all the hashnames we used/found and do final sort to return\n Object.keys(did).forEach(function(k){ if(queue.indexOf(k) == -1) queue.push(k); });\n Object.keys(doing).forEach(function(k){ if(queue.indexOf(k) == -1) queue.push(k); });\n sort();\n while(cb = hn.seeking.shift()) cb(err, queue.slice());\n }\n\n // track callback(s);\n if(!hn.seeking) hn.seeking = [];\n hn.seeking.push(callback);\n if(hn.seeking.length > 1) return;\n\n // main loop, multiples of these running at the same time\n function loop(onetime){\n if(!hn.seeking.length) return; // already returned\n debug(\"SEEK LOOP\",queue);\n // if nothing left to do and nobody's doing anything, failed :(\n if(Object.keys(doing).length == 0 && queue.length == 0) return done(\"failed to find the hashname\");\n \n // get the next one to ask\n var mine = onetime||queue.shift();\n if(!mine) return; // another loop() is still running\n\n // if we found it, yay! :)\n if(mine == hn.hashname) return done();\n // skip dups\n if(did[mine] || doing[mine]) return onetime||loop();\n var distance = dhash(hn.hashname, mine);\n if(distance > closest) return onetime||loop(); // don't \"back up\" further away\n if(wise[mine]) closest = distance; // update distance if trusted\n doing[mine] = true;\n var to = self.whois(mine);\n to.seek(hn.hashname, function(err, see){\n see.forEach(function(item){\n var sug = self.whois(item);\n if(!sug) return;\n // if this is the first entry and from a wise one, give them wisdom too\n if(wise[to.hashname] && see.indexOf(item) == 0) wise[sug.hashname] = true;\n sug.via(to, item);\n queue.push(sug.hashname);\n });\n sort();\n did[mine] = true;\n delete doing[mine];\n onetime||loop();\n });\n }\n \n // start three of them\n loop();loop();loop();\n \n // also force query any locals\n self.locals.forEach(function(local){loop(local.hashname)});\n}", "title": "" }, { "docid": "2ea2c485fda4fcee45e8b44a2a3aa82f", "score": "0.4680692", "text": "function main() {\n eventEmitter.on('done', () => {\n done();\n });\n\n async.eachSeries(my_keys, (outerKey, outerCallback) => {\n let obj = myObj[outerKey];\n async.eachSeries(Object.keys(obj), (innerKey, innerCallback) => {\n outer(outerKey, innerKey, writeToFile);\n innerCallback();\n }, (error) => {\n if (error) {\n console.log('error');\n }\n outerCallback(error);\n });\n }, (error) => {\n if (error) {\n console.log('Error happened! :(');\n }\n // Finish applying async task to each outerKey\n eventEmitter.emit('done');\n });\n}", "title": "" }, { "docid": "5731c8e985384816bc7f038f6ceb2051", "score": "0.46742898", "text": "function hashFile(f) {\n return new Promise((resolve, reject) => {\n if (f.isFile()) {\n fs.hash(f.path, 'sha512')\n .then((data) => { resolve(data) })\n .catch((err) => { reject(err) })\n }\n else { resolve('0') }\n })\n}", "title": "" }, { "docid": "aad77b45a9a854c9aa397dc463c01cfd", "score": "0.46725246", "text": "function on_fileread_accumulate(abs_filepath, abs_outpath, files_meta) {\n let _parsed = path.parse(abs_filepath);\n return function(err, contents) {\n files_meta.count -= 1;\n if(err) { \n console.error(\"ERROR while fs.readFile\", err); \n throw \"Filesystem error.\"; \n } \n files_meta.accumulator.push(build_single_template_js_str(_parsed.name, contents));\n if(files_meta.count <= 0) {\n console.debug(\"files_meta.accumulator.length\", files_meta.accumulator.length, \"Sample\", _.first(files_meta.accumulator));\n guarantee_path_exists(abs_outpath);\n write_combined_templates_file(abs_outpath, files_meta.accumulator);\n }\n }\n}", "title": "" }, { "docid": "e2e5709382dce0fc5298fd4fc5d9aaec", "score": "0.46512395", "text": "function getFunctionHashes(abi) {\n var hashes = [];\n for (var i=0; i<abi.length; i++) {\n var item = abi[i];\n if (item.type != \"function\") continue;\n var signature = item.name + \"(\" + item.inputs.map(function(input) {return input.type;}).join(\",\") + \")\";\n var hash = web3.sha3(signature);\n console.log(item.name + '=' + hash);\n hashes.push({name: item.name, hash: hash});\n }\n return hashes;\n}", "title": "" }, { "docid": "4468849ed06c7f5d2a2453ebc41235c0", "score": "0.46474385", "text": "function hash_files( src_files ) {\n\n let manifest = {};\n\n for( let i = 0; i < src_files.length; i++ ) {\n let regex = /\\\\|\\//g;\n let file_buffer = fs.readFileSync( __dirname + '/' + src_files[i]);\n let sum = crypto.createHash('sha256');\n let filename = src_files[i].split(regex).pop();\n \n sum.update(file_buffer);\n\n manifest[filename] = sum.digest('hex');\n }\n\n return manifest;\n}", "title": "" }, { "docid": "a70cdbf15ac5e6405940f3fda0db3f88", "score": "0.46467173", "text": "async store (data) {\n // store data in IPFS\n let res = await this._node.files.add(Buffer.from(data))\n let results = []\n\n res.forEach((file) => {\n if (file && file.hash) {\n log('successfully stored', file)\n results.push(file)\n return file\n }\n })\n return results\n }", "title": "" }, { "docid": "6f5af3c1fc66fca766c8dd25e75f46af", "score": "0.464253", "text": "buildFiles(files, folder) {\n var hash = {};\n var prefix = folder ? (folder + '/') : '';\n\n files.forEach(node => {\n if (node.type === 'directory') {\n const sub = this.buildFiles(node.files, prefix + node.name);\n Object.keys(sub).forEach(f => hash[f] = 1);\n } else if (node.type === 'file') {\n hash[prefix + node.name] = 1;\n }\n });\n\n return hash;\n }", "title": "" }, { "docid": "738016e47d88f44a12e62a6850af1bdc", "score": "0.46346095", "text": "function sha1File(upthis, uploader,options , upfile) {\n\tvar settings = upfile.getNative();\n\tvar hash = [ 1732584193, -271733879, -1732584194, 271733878, -1009589776 ];\n\tvar buffer = 1024 * 16 * 64;\n\tvar sha1 = function(block, hash) {\n\t\tvar words = [];\n\t\tvar count_parts = 16;\n\t\tvar h0 = hash[0], h1 = hash[1], h2 = hash[2], h3 = hash[3], h4 = hash[4];\n\t\tfor ( var i = 0; i < block.length; i += count_parts) {\n\t\t\tvar th0 = h0, th1 = h1, th2 = h2, th3 = h3, th4 = h4;\n\t\t\tfor ( var j = 0; j < 80; j++) {\n\t\t\t\tif (j < count_parts)\n\t\t\t\t\twords[j] = block[i + j] | 0;\n\t\t\t\telse {\n\t\t\t\t\tvar n = words[j - 3] ^ words[j - 8] ^ words[j - 14]\n\t\t\t\t\t\t\t^ words[j - count_parts];\n\t\t\t\t\twords[j] = (n << 1) | (n >>> 31);\n\t\t\t\t}\n\t\t\t\tvar f, k;\n\t\t\t\tif (j < 20) {\n\t\t\t\t\tf = (h1 & h2 | ~h1 & h3);\n\t\t\t\t\tk = 1518500249;\n\t\t\t\t} else if (j < 40) {\n\t\t\t\t\tf = (h1 ^ h2 ^ h3);\n\t\t\t\t\tk = 1859775393;\n\t\t\t\t} else if (j < 60) {\n\t\t\t\t\tf = (h1 & h2 | h1 & h3 | h2 & h3);\n\t\t\t\t\tk = -1894007588;\n\t\t\t\t} else {\n\t\t\t\t\tf = (h1 ^ h2 ^ h3);\n\t\t\t\t\tk = -899497514;\n\t\t\t\t}\n\n\t\t\t\tvar t = ((h0 << 5) | (h0 >>> 27)) + h4 + (words[j] >>> 0) + f\n\t\t\t\t\t\t+ k;\n\t\t\t\th4 = h3;\n\t\t\t\th3 = h2;\n\t\t\t\th2 = (h1 << 30) | (h1 >>> 2);\n\t\t\t\th1 = h0;\n\t\t\t\th0 = t;\n\t\t\t}\n\t\t\th0 = (h0 + th0) | 0;\n\t\t\th1 = (h1 + th1) | 0;\n\t\t\th2 = (h2 + th2) | 0;\n\t\t\th3 = (h3 + th3) | 0;\n\t\t\th4 = (h4 + th4) | 0;\n\t\t}\n\t\treturn [ h0, h1, h2, h3, h4 ];\n\t}\n\n\tvar run = function(file, inStart, inEnd) {\n\t\tvar end = Math.min(inEnd, file.size);\n\t\tvar start = inStart;\n\t\tvar reader = new FileReader();\n\t\treader.onload = function(event) {\n\t\t\tfile.sha1_progress = (end * 100 / file.size);\n//\t\t\tconsole.log(end)\n\t\t\tfile.percent = Math.round(end * 100 / file.size);\n\t\t\tupthis.updateTotalProgress(options,file,'加载中... ');\n\t\t\tvar event = event || window.event;\n\t\t\tvar result = event.result || event.target.result\n\t\t\tvar block = Crypto.util.bytesToWords(new Uint8Array(result));\n\t\t\tif (end === file.size) {\n\t\t\t\tvar bTotal, bLeft, bTotalH, bTotalL;\n\t\t\t\tbTotal = file.size * 8;\n\t\t\t\tbLeft = (end - start) * 8;\n\n\t\t\t\tbTotalH = Math.floor(bTotal / 0x100000000);\n\t\t\t\tbTotalL = bTotal & 0xFFFFFFFF;\n\n\t\t\t\t// Padding\n\t\t\t\tblock[bLeft >>> 5] |= 0x80 << (24 - bLeft % 32);\n\t\t\t\tblock[((bLeft + 64 >>> 9) << 4) + 14] = bTotalH;\n\t\t\t\tblock[((bLeft + 64 >>> 9) << 4) + 15] = bTotalL;\n\n\t\t\t\thash = sha1(block, hash);\n\t\t\t\tfile.sha1_hash = Utf8Encode(Crypto.util.bytesToHex(Crypto.util\n\t\t\t\t\t\t.wordsToBytes(hash)));\n\t\t\t\t// alert(file.sha1_hash)\n\t\t\t\t$.ajax( {\n\t\t\t\t\ttype : \"POST\",\n\t\t\t\t\turl : options.ctx+\"/_uploadMd5.html\",\n\t\t\t\t\tdataType : 'json',\n\t\t\t\t\tdata : {\n\t\t\t\t\t\t\"md5\" : file.sha1_hash\n\t\t\t\t\t},\n\t\t\t\t\tsuccess : function(data) {\n\t\t\t\t\t\t//console.log(data)\n\t\t\t\t\t\tif (data.status == \"1\") {\n//\t\t\t\t\t\t\t$li = options.$queue.find('li');\n\t\t\t\t\t\t\tupthis.addFiles(upfile, options.$queue);//添加预览图\n\t\t\t\t\t\t\t//alert(1)\n\t\t\t\t\t\t\tuploader.start();//开始上传\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tbb_alert(null, \"上传成功\");\n\t\t\t\t\t\t\turl = data.message;\n\t\t\t\t\t\t\t$(options.setValId).val(url);\n\t\t\t\t\t\t\tupthis.addFiles(upfile, options.$queue);//添加预览图\n\t\t\t\t\t\t\tuploader.removeFile(upfile);\n\t\t\t\t\t\t\tupthis.updateStatus(options,5);\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\n\t\t\t} else {\n\t\t\t\thash = sha1(block, hash);\n\t\t\t\tstart += buffer;\n\t\t\t\tend += buffer;\n\t\t\t\trun(file, start, end);\n\t\t\t}\n\t\t}\n\t\tvar blob = file.slice(start, end);\n\t\treader.readAsArrayBuffer(blob);\n\t}\n\n\tvar Utf8Encode = function(string) {\n\t\tstring = string.replace(/\\r\\n/g, \"\\n\");\n\t\tvar utftext = \"\";\n\n\t\tfor ( var n = 0; n < string.length; n++) {\n\n\t\t\tvar c = string.charCodeAt(n);\n\n\t\t\tif (c < 128) {\n\t\t\t\tutftext += String.fromCharCode(c);\n\t\t\t} else if ((c > 127) && (c < 2048)) {\n\t\t\t\tutftext += String.fromCharCode((c >> 6) | 192);\n\t\t\t\tutftext += String.fromCharCode((c & 63) | 128);\n\t\t\t} else {\n\t\t\t\tutftext += String.fromCharCode((c >> 12) | 224);\n\t\t\t\tutftext += String.fromCharCode(((c >> 6) & 63) | 128);\n\t\t\t\tutftext += String.fromCharCode((c & 63) | 128);\n\t\t\t}\n\n\t\t}\n\n\t\treturn utftext;\n\t};\n\n\tvar checkApi = function() {\n\t\tif ((typeof File == 'undefined'))\n\t\t\treturn false;\n\n\t\tif (!File.prototype.slice) {\n\t\t\tif (File.prototype.webkitSlice)\n\t\t\t\tFile.prototype.slice = File.prototype.webkitSlice;\n\t\t\telse if (File.prototype.mozSlice)\n\t\t\t\tFile.prototype.slice = File.prototype.mozSlice;\n\t\t}\n\n\t\tif (!window.File || !window.FileReader || !window.FileList\n\t\t\t\t|| !window.Blob || !File.prototype.slice)\n\t\t\treturn false;\n\n\t\treturn true;\n\t}\n\n\tif (checkApi()) {\n\t\trun(settings, 0, buffer);\n\t} else\n\t\treturn false;\n}", "title": "" }, { "docid": "223e9cbaa22d9e31320e4928a91a46f8", "score": "0.46144494", "text": "writeHashedFiles() {\n this.manualFiles.forEach(file => file.version());\n\n return this;\n }", "title": "" }, { "docid": "7bfa92bc9a5dcdb1120e0da59e500567", "score": "0.4610703", "text": "function info_about_files(){\n \n files.forEach(function(file){\n fs.stat(base+path+file, function(err, stats){\n children[file] = {};\n if(err != null) { console.log(err); res.send('Ups'); return;}\n if(stats.isFile()){\n children[file].isFile = true;\n children[file].size = stats.size;\n children[file].name = file;\n children[file].lastModified = date_format(stats.mtime);\n children.push(file);\n } else {\n children[file].name = file;\n children[file].lastModified = date_format(stats.mtime);\n children.push(file);\n }\n filesEE.emit('files_stats_ready',file);\n },file );\n });\n\n }", "title": "" }, { "docid": "c0fdd952cac514c59e565f3a06892eee", "score": "0.46103787", "text": "function onGetInitialHash()\n {\n var firstName = paramModule.fname;\n var lastName = paramModule.lname;\n var fullName = firstName + \" \" + lastName;\n var title = paramModule.docName;\n\n dynCapt.Capture(sigCtl, fullName, title, hash, null, onDynCaptCapture);\n }", "title": "" }, { "docid": "dab40b45f236df76360ac5c170d20727", "score": "0.4604553", "text": "function cleanup(hashedid,q,a){\n\tvar path = app.get('persistentDataDir')+'img/'+hashedid+'/';\n\tvar toBeRotated=[];\n\t\n\t/* delete unused images */\n\tfs.readdir(path,function(e,f){\n\t\tif(f==undefined){\n\t\t\t/* if no images were uploaded, then life's but a dream */\n\t\t}else{\n\t\t\tf.forEach(function(v){\n\t\t\t\tvar filename = v.substring(0,v.lastIndexOf('.'));\n\t\t\t\t/* .jpg .png etc */\n\t\t\t\tvar extension = v.substring(v.lastIndexOf('.')); \n\t\t\t\tvar containAlt = (filename.substring(filename.length-5)=='_alt1'||filename.substring(filename.length-5)=='_alt2');\n\t\t\t\tif(containAlt){\n\t\t\t\t\tfs.stat(path+filename.substring(0,filename.length-5)+extension,function(e,s){\n\t\t\t\t\t\tif(e){\n\t\t\t\t\t\t\t/* probably does not exist */\n\t\t\t\t\t\t\t/* filename = filename */\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t/* probably exist */\n\t\t\t\t\t\t\tfilename = filename.substring(0,filename.length-5);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tvar inUseQ = (q.indexOf('img'+filename+'_'+extension.substring(1))>-1)||(q.indexOf('img'+filename+'_alt1_'+extension.substring(1))>-1)||(q.indexOf('img'+filename+'_alt2_'+extension.substring(1))>-1);\n\t\t\t\t\t\tvar inUseA = (a.indexOf('img'+filename+'_'+extension.substring(1))>-1)||(a.indexOf('img'+filename+'_alt1_'+extension.substring(1))>-1)||(a.indexOf('img'+filename+'_alt2_'+extension.substring(1))>-1);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(!inUseQ&&!inUseA){\n\t\t\t\t\t\t\tfs.unlink(path+filename+extension,function(e){\n\t\t\t\t\t\t\t\tif(e){\n\t\t\t\t\t\t\t\t\tcatch_error(e);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tfs.unlink(path+filename+'_alt1'+extension,function(e){\n\t\t\t\t\t\t\t\tif(e){\n\t\t\t\t\t\t\t\t\tcatch_error(e);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tfs.unlink(path+filename+'_alt2'+extension,function(e){\n\t\t\t\t\t\t\t\tif(e){\n\t\t\t\t\t\t\t\t\tcatch_error(e);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t});\n\t\t\t\t}else{\n\t\t\t\t\tvar inUseQ = (q.indexOf('img'+filename+'_'+extension.substring(1))>-1)||(q.indexOf('img'+filename+'_alt1_'+extension.substring(1))>-1)||(q.indexOf('img'+filename+'_alt2_'+extension.substring(1))>-1);\n\t\t\t\t\tvar inUseA = (a.indexOf('img'+filename+'_'+extension.substring(1))>-1)||(a.indexOf('img'+filename+'_alt1_'+extension.substring(1))>-1)||(a.indexOf('img'+filename+'_alt2_'+extension.substring(1))>-1);\n\t\t\t\t\t\n\t\t\t\t\tif(!inUseQ&&!inUseA){\n\t\t\t\t\t\tfs.unlink(path+filename+extension,function(e){\n\t\t\t\t\t\t\tif(e){\n\t\t\t\t\t\t\t\tcatch_error(e);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t\tfs.unlink(path+filename+'_alt1'+extension,function(e){\n\t\t\t\t\t\t\tif(e){\n\t\t\t\t\t\t\t\tcatch_error(e);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t\tfs.unlink(path+filename+'_alt2'+extension,function(e){\n\t\t\t\t\t\t\tif(e){\n\t\t\t\t\t\t\t\tcatch_error(e);\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\t\n\t\t\t})\n\t\t}\n\t})\n\t\n\t/* imgs that were requested to be rotated and remove rotation param */\n\tcleaned_q = q.replace(/\\[img.*?\\]/g,function(s){\n\t\ts_split = s.replace(/\\[|\\]/g,'').split(' ');\n\t\tvar returnstring = '['+s_split[0];\n\t\tfor (var i = 1; i<s_split.length;i++){\n\t\t\tif(s_split[i].substring(0,2)=='r='){\n\t\t\t\tvar r = s_split[i].split('=')[1];\n\t\t\t\ttoBeRotated.push([s_split[0],r]);\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\tif(r==90||r==180||r==270){\n\t\t\t\t\ttoBeRotated.push([s_split[0],r]);\n\t\t\t\t}\n\t\t\t\t*/\n\t\t\t}else{\n\t\t\t\treturnstring +=' '+s_split[i];\n\t\t\t}\n\t\t}\n\t\treturn returnstring+']';\n\t})\n\t\n\tcleaned_a = a.replace(/\\[img.*?\\]/g,function(s){\n\t\ts_split = s.replace(/\\[|\\]/g,'').split(' ');\n\t\tvar returnstring = '['+s_split[0];\n\t\tfor (var i = 0; i<s_split.length;i++){\n\t\t\tif(s_split[i].substring(0,2)=='r='){\n\t\t\t\tvar r = s_split[i].split('=')[1];\n\t\t\t\ttoBeRotated.push([s_split[0],r]);\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\tif(r==90||r==180||r==270){\n\t\t\t\t\ttoBeRotated.push([s_split[0],r]);\n\t\t\t\t}\n\t\t\t\t*/\n\t\t\t}else{\n\t\t\t\treturnstring +=' '+s_split[i];\n\t\t\t}\n\t\t}\n\t\treturn returnstring+']';\n\t})\n\t\n\trotateImage(hashedid,toBeRotated);\n\t\n\treturn [hashedid,cleaned_q,cleaned_a];\n}", "title": "" }, { "docid": "9d25c88e8a580f01d57ae4d671fb2d37", "score": "0.45977026", "text": "function walker(match, cwd, field, pars, outfile, fn1) {\n\n const opt={\n matchRegExp: match\n }\n var count=0\n var rc = []\n\n fwalker(cwd,opt,field)\n .on('file', function(p,s){\n count+=1\n let fullname = path.resolve(cwd, p)\n console.log('Found', count, '=', p)\n let decoded = pars(fullname, field)\n if (!decoded) {\n console.log('Error!')\n } else {\n //console.log('Got', decoded)\n //rc = {..rc, ..decoded}\n Object.assign(rc, decoded)\n }\n })\n .on('done', () => {\n var qitem = Object.assign( {}, rc)\n var jsonstr = stringify(qitem)\n fs.writeFileSync(outfile, jsonstr)\n //console.log('FINAL',jsonstr)\n fn1( count )\n })\n .walk()\n\n}", "title": "" }, { "docid": "dd3a2a5257ac3e8fa60efbb725d8fb29", "score": "0.4590134", "text": "function processFiles(files) { \n let movingFiles = [];\n let encryptingFiles = [];\n\n for (var i = 0, iMax = files.length; i < iMax; i++) {\n let file = new ShFile(files[i]);\n movingFiles.push(moveFile(file));\n }\n\n Promise.all(movingFiles)\n .then((movedFiles) => {\n for (var j = 0, jMax = movedFiles.length; j < jMax; j++) {\n // Some files will not be moved due to name conflicts and errors.\n // If that is the case, the returned value will be null.\n if (movedFiles[j]) {\n encryptingFiles.push(encryptNewFile(movedFiles[j], 'foobarbaz')); // todo: accept this from User\n }\n }\n return Promise.all(encryptingFiles);\n })\n .then(() => {\n logger.info('Finished consuming file(s)');\n })\n .catch(error => {\n logger.error(error);\n });\n}", "title": "" }, { "docid": "815d68bf15273ff87300794ce7ea060c", "score": "0.4584409", "text": "function async_update_md5(file) {\r\n\r\n const chunk_size = 2 * 1024 * 1024; // read in chunks of 2MB\r\n const chunks = Math.ceil(file.size / chunk_size);\r\n const spark = new SparkMD5();\r\n const file_reader = new FileReader();\r\n const start_time = new Date().getTime();\r\n let currentChunk = 0;\r\n\r\n file_reader.onload = function (e) {\r\n console.log('Read chunk number ' + (currentChunk + 1) + ' of ' + chunks);\r\n\r\n spark.appendBinary(e.target.result); // append array buffer\r\n currentChunk += 1;\r\n\r\n if (currentChunk < chunks) {\r\n loadNext();\r\n } else {\r\n const md5_hash = spark.end();\r\n console.log('Finished loading! ');\r\n console.log('Computed hash: ' + md5_hash); // compute hash\r\n console.log('Total time ' + (new Date().getTime() - start_time));\r\n uuid_md5.set(file.upload.uuid, md5_hash);\r\n $.ajax({\r\n data: {\r\n uuid: file.upload.uuid,\r\n md5_hash: md5_hash,\r\n md5_elapsed: (new Date().getTime() - start_time),\r\n },\r\n type: 'POST',\r\n url: '/translation/upload',\r\n });\r\n console.log(uuid_md5)\r\n }\r\n };\r\n\r\n file_reader.onerror = function () {\r\n console.log('Oops, something went wrong.');\r\n };\r\n\r\n function loadNext() {\r\n const start = currentChunk * chunk_size;\r\n const end = start + chunk_size >= file.size ? file.size : start + chunk_size;\r\n\r\n file_reader.readAsBinaryString(File.prototype.slice.call(file, start, end));\r\n }\r\n\r\n console.log('Starting incremental hash (' + file.name + ')');\r\n loadNext();\r\n}", "title": "" }, { "docid": "c05f0c7085ead726df63fe66947d73c7", "score": "0.45813993", "text": "function build_filesSync( dir ){\n\n var obj = [];\n var files = fs.readdirSync(dir);\n for( var i = 0; i < files.length; i++){\n var full_path = dir + \"/\" + files[i];\n var stats = fs.statSync( full_path );\n var tmp_file = {};\n tmp_file.name = files[i];\n if( stats.isDirectory() )\n {\n tmp_file.files = build_filesSync( full_path );\n }else{\n tmp_file.hash = md5(full_path);\n files_hash[tmp_file.hash] = full_path;\n }\n obj.push( tmp_file );\n }\n\n //console.log(util.inspect(obj, null, true));\n return obj;\n}", "title": "" }, { "docid": "b7064ea1638b4c1b135c42c56807b814", "score": "0.45783243", "text": "function fileHashSync(filename){\r\n var sum = crypto.createHash('md5');\r\n var fd = fs.openSync(filename, 'r');\r\n var buf = new Buffer(65536);\r\n\r\n for (;;){\r\n var rlen = fs.readSync(fd, buf, 0, buf.length, null);\r\n if (rlen < 1) break;\r\n sum.update(buf.slice(0, rlen));\r\n }\r\n fs.close(fd);\r\n return sum.digest('base64');\r\n}", "title": "" }, { "docid": "939da0c6946151144f5a0655d1ce79b6", "score": "0.4575478", "text": "function deleteFileByHash(hash) {\n var firstDir = path.join(engine.engineConfig.contractsFilesystemPath,hash.slice(0, 2));\n var secondDir = path.join(firstDir, hash.slice(2, 4));\n var filePath = path.join(secondDir, hash);\n return fs.unlinkAsync(filePath).then(function() {\n // Delete firstDir & secondDir if empty\n return fs.readdirAsync(secondDir);\n }).then(function(files) {\n if (files.length===0) {\n return fs.rmdirAsync(secondDir);\n }\n }).then(function() {\n return fs.readdirAsync(firstDir);\n }).then(function(files) {\n if (files.length===0) {\n return fs.rmdir(firstDir);\n }\n });\n }", "title": "" }, { "docid": "3eb43f59692179b499fc62addf436e63", "score": "0.45731863", "text": "function commitForEachLine (filenames) {\n console.log('blames for', filenames)\n\n var blamePromises = filenames.map(function (name) {\n return R.partial(gitBlame, [name])\n })\n\n var blameInfo = []\n function keepBlameInfo (chain, fn) {\n return chain.then(fn).then(function (blameForFile) {\n blameInfo.push(blameForFile)\n })\n }\n\n return blamePromises\n .reduce(keepBlameInfo, q())\n .then(R.always(blameInfo))\n .then(R.partial(zipBlames, [filenames]))\n}", "title": "" }, { "docid": "4c3ea92d3695e1e94292b9caa51de5d4", "score": "0.45575517", "text": "function useLastHash() {\n self.updateLastHash(lastHash);\n }", "title": "" }, { "docid": "bba24ea6f41d67e380b6493a7d90f8de", "score": "0.4547762", "text": "function seek(hn, callback)\n{\n var self = this;\n if(typeof hn == \"string\") hn = self.whois(hn);\n if(!callback) callback = function(){};\n if(!hn) return callback(\"invalid hashname\");\n\n var did = {};\n var doing = {};\n var queue = [];\n var wise = {};\n var closest = 255;\n\n // load all seeds and sort to get the top 3\n var seeds = []\n Object.keys(self.buckets).forEach(function(bucket){\n self.buckets[bucket].forEach(function(link){\n if(link.hashname == hn) return; // ignore the one we're (re)seeking\n if(link.seed && pathValid(link.to)) seeds.push(link);\n });\n });\n seeds.sort(function(a,b){ return dhash(hn.hashname,a.hashname) - dhash(hn.hashname,b.hashname) }).slice(0,3).forEach(function(seed){\n wise[seed.hashname] = true;\n queue.push(seed.hashname);\n });\n\n debug(\"seek starting with\",queue,seeds.length);\n\n // always process potentials in order\n function sort()\n {\n queue = queue.sort(function(a,b){\n return dhash(hn.hashname,a) - dhash(hn.hashname,b)\n });\n }\n\n // track when we finish\n function done(err)\n {\n // get all the hashnames we used/found and do final sort to return\n Object.keys(did).forEach(function(k){ if(queue.indexOf(k) == -1) queue.push(k); });\n Object.keys(doing).forEach(function(k){ if(queue.indexOf(k) == -1) queue.push(k); });\n sort();\n while(cb = hn.seeking.shift()) cb(err, queue.slice());\n }\n\n // track callback(s);\n if(!hn.seeking) hn.seeking = [];\n hn.seeking.push(callback);\n if(hn.seeking.length > 1) return;\n\n // main loop, multiples of these running at the same time\n function loop(onetime){\n if(!hn.seeking.length) return; // already returned\n debug(\"SEEK LOOP\",queue);\n // if nothing left to do and nobody's doing anything, failed :(\n if(Object.keys(doing).length == 0 && queue.length == 0) return done(\"failed to find the hashname\");\n\n // get the next one to ask\n var mine = onetime||queue.shift();\n if(!mine) return; // another loop() is still running\n\n // if we found it, yay! :)\n if(mine == hn.hashname) return done();\n // skip dups\n if(did[mine] || doing[mine]) return onetime||loop();\n var distance = dhash(hn.hashname, mine);\n if(distance > closest) return onetime||loop(); // don't \"back up\" further away\n if(wise[mine]) closest = distance; // update distance if trusted\n doing[mine] = true;\n var to = self.whois(mine);\n to.seek(hn.hashname, function(err, sees){\n sees.forEach(function(address){\n var see = to.sees(address);\n if(!see) return;\n // if this is the first entry and from a wise one, give them wisdom too\n if(wise[to.hashname] && sees.indexOf(address) == 0) wise[see.hashname] = true;\n queue.push(see.hashname);\n });\n sort();\n did[mine] = true;\n delete doing[mine];\n onetime||loop();\n });\n }\n\n // start three of them\n loop();loop();loop();\n\n // also force query any locals\n self.locals.forEach(function(local){loop(local.hashname)});\n}", "title": "" }, { "docid": "5c66d55acf1d6c049b3f8240e61fc1c1", "score": "0.45198262", "text": "wrapUploadDoneCallback(callback) {\n return callback;\n }", "title": "" }, { "docid": "10b84765e4168d19fa8b35b5d82143ed", "score": "0.4519796", "text": "getHash(callback) {\n this.download(\"api.github.com\", \"/repos/Jiiks/BetterDiscordApp/commits/master\", data => {\n //TODO use the new soon to be implemented tryparse\n callback(JSON.parse(data).sha);\n });\n }", "title": "" }, { "docid": "ddf74e31449476a2e3a7bd2fc6d7b5be", "score": "0.4509285", "text": "filesAndFoldersDo(closure) {\n const thisFolderPath = this.getPath()\n\n const folderContents = fs.readdirSync( thisFolderPath, { withFileTypes: true } )\n\n folderContents.forEach( (eachFileStat) => {\n const fullPath = pathLib.join( thisFolderPath, eachFileStat.name )\n\n const path = eachFileStat.isDirectory() ?\n this.thisClassification().new({ path: fullPath })\n :\n FilePath.new({ path: fullPath })\n\n closure( path )\n }) \n }", "title": "" }, { "docid": "2a65afec8d2423ed44bfe3c40ab98461", "score": "0.4497966", "text": "run(callback) {\n this.start(function loop(entry, iterator, blob, tester) {\n if (!entry.done) {\n let name = entry.value[1].name,\n url = URL.createObjectURL(blob),\n compare = 'compare/' + name + '.png';\n\n tester.comparePixels(url, compare, (imgA, imgB, result) => {\n callback({ value: [name, { a: imgA, b: imgB, result }], done: entry.done });\n\n tester.next(loop, iterator);\n });\n } else {\n callback(entry);\n }\n });\n }", "title": "" }, { "docid": "a95b273493902d565c198540aa19f1c1", "score": "0.44919628", "text": "function notifyAllFilesUploaded(token, s3Key) {\n\n cb.updateProgress({\n progressText: (<div><h5>Checking integrity...</h5><i className=\"fa fa-spinner fa-spin fa-3x fa-fw\"></i></div>)\n });\n\n var formData = new FormData();\n formData.append(\"objectKey\", s3Key);\n formData.append(\"token\", token);\n // TODO abineet, if you want more info from the client, you can grab it from the HTML and\n // formData.append() it.\n\n // notify server of file upload and updates UI to reflect status\n fetch(\"/analyze/integrity-check\", {\n method: \"POST\",\n body: formData\n })\n .then( response => {\n if (response.ok)\n return response.text();\n else {\n return response.json().then( json => {\n throw new Error(json.message || response.statusText);\n })\n }\n })\n .then( success => {\n var contentWithLink = convertMessageWithLink(success);\n cb.updateProgress({\n progressText: ( <div className=\"alert alert-success\"> { contentWithLink } </div> )\n });\n })\n .catch( error => {\n cb.updateProgress({\n progressText: (<div className=\"alert alert-danger\"> { error.message } </div>)\n });\n })\n\n }", "title": "" }, { "docid": "b1ed6f886801aa2339b0201cd13400b6", "score": "0.44909826", "text": "function processFile(blob) {\n\n\n // Size of the file\n var SIZE = blob.size;\n\n // The total number of file chunks\n var Total_Number_of_Chunks = Math.ceil(blob.size / BYTES_PER_CHUNK);\n\n // Array used to hold the total number of chunks, the number of chunks that have been uploaded,\n // and the current chunk. This information is sent to the web worker that uploads the file chunks\n var chunkCount = {\n\n currentNumber: 1,\n numberOfChunks: Total_Number_of_Chunks,\n numberOfUploadedChunks: 0,\n starttime: new Date()\n };\n\n var start = 0;\n var end = BYTES_PER_CHUNK;\n\n var fileReader = new FileReaderSync();\n var spark = new SparkMD5.ArrayBuffer();\n\n while (start < SIZE) {\n\n\n var chunk = blob.slice(start, end);\n\n // Read the chunk into another variable to calculate the checksum\n var chunk1 = fileReader.readAsArrayBuffer(chunk);\n spark.append(chunk1);\n\n // Send the chunk back to the parent\n self.postMessage({ 'type': 'upload', 'filename': blob.name, 'blob': chunk, 'chunkCount': chunkCount, 'asyncstate': asyncstate,'id': workerdata.id });\n \n chunkCount.currentNumber++;\n chunkCount.numberOfUploadedChunks++;\n\n start = end;\n end = start + BYTES_PER_CHUNK;\n\n if (chunkCount.numberOfUploadedChunks == chunkCount.numberOfChunks) {\n\n // All done calculate the checksum\n var md5hash = spark.end();\n self.postMessage({ 'type': 'checksum', 'message': md5hash.toUpperCase(), 'id': workerdata.id });\n\n // Merge the file on the remote server\n self.postMessage({ 'type': 'merge', 'filename': blob.name, 'chunkCount': chunkCount, 'id': workerdata.id });\n }\n }\n\n}", "title": "" }, { "docid": "f6e66bbaa6e14902d26f3597c34b8035", "score": "0.44881892", "text": "function sha256_wrapper(input, cb) {\n\t sha256(input).then(function (digest) {\n\t cb(digest);\n\t });\n\t}", "title": "" }, { "docid": "456dc378cfd90a72f313bf3a78e007fd", "score": "0.44815078", "text": "function rotateImage(hashed_id,arrayIn){\n\tvar path = app.get('persistentDataDir')+'img/'+hashed_id+'/';\n\tvar arrayDone = [];\n\t\n\tfor(var j = 0; j<arrayIn.length; j++){\n\t\tvar filename = arrayIn[j][0].substring(0,arrayIn[j][0].lastIndexOf('_')).substring(3);\n\t\tvar extension = '.'+arrayIn[j][0].substring(arrayIn[j][0].lastIndexOf('_')+1);\n\t\tvar containAlt = (filename.substring(filename.length-5)=='_alt1'||filename.substring(filename.length-5)=='_alt2');\n\t\tif(containAlt){\n\t\t\tfs.stat(path+filename.substring(0,filename.length-5)+extension,function(e,s){\n\t\t\t\tif(e){\n\t\t\t\t\t/* probably does not exist */\n\t\t\t\t\t/* filename = filename */\n\t\t\t\t}else{\n\t\t\t\t\t/* probably exist */\n\t\t\t\t\tfilename = filename.substring(0,filename.length-5);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tvar flag = true;\n\t\t\t\tfor(var k = 0;k<arrayDone.length;k++){\n\t\t\t\t\tif(arrayDone[k]==filename){\n\t\t\t\t\t\tflag = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(flag){\n\t\t\t\t\tarrayDone.push(filename);\n\t\t\t\t\trotateImageBackend(hashed_id,filename,extension,arrayIn[j][1]);\n\t\t\t\t}\n\t\t\t});\n\t\t}else{\n\t\t\tvar flag = true;\n\t\t\tfor(var k = 0;k<arrayDone.length;k++){\n\t\t\t\tif(arrayDone[k]==filename){\n\t\t\t\t\tflag = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(flag){\n\t\t\t\tarrayDone.push(filename);\n\t\t\t\trotateImageBackend(path,hashed_id,filename,extension,arrayIn[j][1]);\n\t\t\t}\n\t\t}\n\t}\n}", "title": "" }, { "docid": "6fe43d3d0b673c88c963eb865f9afb42", "score": "0.4472317", "text": "function webhook(event, context, callback) {\n\n Promise.all([getDropboxTree(), getS3Tree()])\n .then(synchronizeTrees)\n .then((result) => {\n callback(null, result)\n })\n .catch((err) => {\n callback(err)\n })\n}", "title": "" }, { "docid": "4678da919b64bd4bce82527b8c27c31c", "score": "0.44661146", "text": "function _hashPaths(id, bnodes, namer, pathNamer, callback) {\n // create SHA-1 digest\n var md = sha1.create();\n\n // group adjacent bnodes by hash, keep properties and references separate\n var groups = {};\n var groupHashes;\n var quads = bnodes[id].quads;\n return groupNodes(0);\n function groupNodes(i) {\n if(i === quads.length) {\n // done, hash groups\n groupHashes = Object.keys(groups).sort();\n return hashGroup(0);\n }\n\n // get adjacent bnode\n var quad = quads[i];\n var bnode = _getAdjacentBlankNodeName(quad.subject, id);\n var direction = null;\n if(bnode !== null) {\n // normal property\n direction = 'p';\n } else {\n bnode = _getAdjacentBlankNodeName(quad.object, id);\n if(bnode !== null) {\n // reverse property\n direction = 'r';\n }\n }\n\n if(bnode !== null) {\n // get bnode name (try canonical, path, then hash)\n var name;\n if(namer.isNamed(bnode)) {\n name = namer.getName(bnode);\n } else if(pathNamer.isNamed(bnode)) {\n name = pathNamer.getName(bnode);\n } else {\n name = _hashQuads(bnode, bnodes);\n }\n\n // hash direction, property, and bnode name/hash\n var md = sha1.create();\n md.update(direction);\n md.update(quad.predicate.value);\n md.update(name);\n var groupHash = md.digest();\n\n // add bnode to hash group\n if(groupHash in groups) {\n groups[groupHash].push(bnode);\n } else {\n groups[groupHash] = [bnode];\n }\n }\n\n return groupNodes(i + 1);\n }\n\n // hashes a group of adjacent bnodes\n function hashGroup(i) {\n if(i === groupHashes.length) {\n // done, return SHA-1 digest and path namer\n return callback(null, {hash: md.digest(), pathNamer: pathNamer});\n }\n\n // digest group hash\n var groupHash = groupHashes[i];\n md.update(groupHash);\n\n // choose a path and namer from the permutations\n var chosenPath = null;\n var chosenNamer = null;\n var permutator = new Permutator(groups[groupHash]);\n return permutate();\n function permutate() {\n var permutation = permutator.next();\n var pathNamerCopy = pathNamer.clone();\n\n // build adjacent path\n var path = '';\n var recurse = [];\n for(var n in permutation) {\n var bnode = permutation[n];\n\n // use canonical name if available\n if(namer.isNamed(bnode)) {\n path += namer.getName(bnode);\n } else {\n // recurse if bnode isn't named in the path yet\n if(!pathNamerCopy.isNamed(bnode)) {\n recurse.push(bnode);\n }\n path += pathNamerCopy.getName(bnode);\n }\n\n // skip permutation if path is already >= chosen path\n if(chosenPath !== null && path.length >= chosenPath.length &&\n path > chosenPath) {\n return nextPermutation(true);\n }\n }\n\n // does the next recursion\n return nextRecursion(0);\n function nextRecursion(n) {\n if(n === recurse.length) {\n // done, do next permutation\n return nextPermutation(false);\n }\n\n // do recursion\n var bnode = recurse[n];\n return _hashPaths(bnode, bnodes, namer, pathNamerCopy,\n function(err, result) {\n if(err) {\n return callback(err);\n }\n path += pathNamerCopy.getName(bnode) + '<' + result.hash + '>';\n pathNamerCopy = result.pathNamer;\n\n // skip permutation if path is already >= chosen path\n if(chosenPath !== null && path.length >= chosenPath.length &&\n path > chosenPath) {\n return nextPermutation(true);\n }\n\n // do next recursion\n return nextRecursion(n + 1);\n });\n }\n\n // stores the results of this permutation and runs the next\n function nextPermutation(skipped) {\n if(!skipped && (chosenPath === null || path < chosenPath)) {\n chosenPath = path;\n chosenNamer = pathNamerCopy;\n }\n\n // do next permutation\n if(permutator.hasNext()) {\n return permutate();\n } else {\n // digest chosen path and update namer\n md.update(chosenPath);\n pathNamer = chosenNamer;\n\n // hash the next group\n return hashGroup(i + 1);\n }\n }\n }\n }\n }", "title": "" }, { "docid": "957bbd473b56f15a4038eb4a86cb2a24", "score": "0.44637445", "text": "function Hash() {}", "title": "" }, { "docid": "957bbd473b56f15a4038eb4a86cb2a24", "score": "0.44637445", "text": "function Hash() {}", "title": "" }, { "docid": "26d7ba35a1afb7092df6ed636821ba72", "score": "0.44611385", "text": "set fullPathHash(value) {}", "title": "" }, { "docid": "c6d9914cdc1890482a125627f27490b0", "score": "0.44510725", "text": "function processFileChecksum(blob) {\n\n\n // Size of the file\n var SIZE = blob.size;\n \n // The total number of file chunks\n var chunks = Math.ceil(blob.size / BYTES_PER_CHUNK);\n var currentChunk = 0;\n\n // The synchrnous file reader used in the web worker\n var fileReader = new FileReaderSync();\n\n // SparkMD5 MD5 checksum generator variable\n var spark = new SparkMD5.ArrayBuffer();\n\n var start = 0;\n var end = BYTES_PER_CHUNK;\n\n\n // Read the file and generate the checksum\n while (start < SIZE) {\n\n var chunk = fileReader.readAsArrayBuffer(blob.slice(start, end));\n spark.append(chunk);\n\n currentChunk++;\n\n //var progress = parseInt((currentChunk * 100 / chunks), 10);\n //self.postMessage({ 'type': 'progress', 'percentage': progress, 'id': workerdata.id });\n\n start = end;\n end = start + BYTES_PER_CHUNK;\n\n if (chunks == currentChunk) {\n\n // All done calculate the checksum. \n var md5hash = spark.end();\n self.postMessage({ 'type': 'checksum', 'message': md5hash.toUpperCase(), 'id': workerdata.id });\n\n }\n }\n}", "title": "" }, { "docid": "79c03312dd649250a8e23c1da1b7c763", "score": "0.44428992", "text": "function attemptToMatchHash(accounts, hash, success) {\n accountsPaths.forEach(function(urlPart){\n var token;\n\n var tokenRegex = new RegExp(\"^\\\\#\\\\/\" + urlPart + \"\\\\/(.*)$\");\n var match = hash.match(tokenRegex);\n\n if (match) {\n token = match[1];\n\n // XXX COMPAT WITH 0.9.3\n if (urlPart === \"login\") {\n accounts._loginToken = token;\n }\n } else {\n return;\n }\n\n // If no handlers match the hash, then maybe it's meant to be consumed\n // by some entirely different code, so we only clear it the first time\n // a handler successfully matches. Note that later handlers reuse the\n // savedHash, so clearing window.location.hash here will not interfere\n // with their needs.\n window.location.hash = \"\";\n\n // Do some stuff with the token we matched\n success.call(accounts, token, urlPart);\n });\n}", "title": "" }, { "docid": "a5f3404db4a65f52ec7e169ab220357e", "score": "0.44375297", "text": "computeHashGraph() {\n const binaryDoc = this.save()\n this.haveHashGraph = true\n this.changes = []\n this.changeIndexByHash = {}\n this.dependenciesByHash = {}\n this.dependentsByHash = {}\n this.hashesByActor = {}\n this.clock = {}\n\n for (let change of decodeChanges([binaryDoc])) {\n const binaryChange = encodeChange(change) // TODO: avoid decoding and re-encoding again\n this.changes.push(binaryChange)\n this.changeIndexByHash[change.hash] = this.changes.length - 1\n this.dependenciesByHash[change.hash] = change.deps\n this.dependentsByHash[change.hash] = []\n for (let dep of change.deps) this.dependentsByHash[dep].push(change.hash)\n if (change.seq === 1) this.hashesByActor[change.actor] = []\n this.hashesByActor[change.actor].push(change.hash)\n const expectedSeq = (this.clock[change.actor] || 0) + 1\n if (change.seq !== expectedSeq) {\n throw new RangeError(`Expected seq ${expectedSeq}, got seq ${change.seq} from actor ${change.actor}`)\n }\n this.clock[change.actor] = change.seq\n }\n }", "title": "" }, { "docid": "9d88d0f8755b410402b8d93bbed41c40", "score": "0.44349664", "text": "async function hashToFile(hash) {\n var image = await IPFSTools.retrieve(hash).then((res) => {\n return res\n });\n return image;\n}", "title": "" }, { "docid": "c080da357a4949d78dca17ca2436c8cb", "score": "0.4431765", "text": "static findTailHashes (entries) {\n var hashes = {}\n var addToIndex = (e) => hashes[e.hash] = true\n\n var reduceTailHashes = (res, entry, idx, arr) => {\n var addToResult = (e) => {\n if (hashes[e] === undefined) {\n res.splice(0, 0, e)\n }\n }\n entry.next.reverse().forEach(addToResult)\n return res\n }\n\n entries.forEach(addToIndex)\n return entries.reduce(reduceTailHashes, [])\n }", "title": "" }, { "docid": "0603ec13c31724e062614a2987491808", "score": "0.44298884", "text": "function _hashPaths(id, bnodes, namer, pathNamer, callback) {\n // create SHA-1 digest\n var md = sha1.create();\n\n // group adjacent bnodes by hash, keep properties and references separate\n var groups = {};\n var groupHashes;\n var quads = bnodes[id].quads;\n jsonld.setImmediate(function() {groupNodes(0);});\n function groupNodes(i) {\n if(i === quads.length) {\n // done, hash groups\n groupHashes = Object.keys(groups).sort();\n return hashGroup(0);\n }\n\n // get adjacent bnode\n var quad = quads[i];\n var bnode = _getAdjacentBlankNodeName(quad.subject, id);\n var direction = null;\n if(bnode !== null) {\n // normal property\n direction = 'p';\n } else {\n bnode = _getAdjacentBlankNodeName(quad.object, id);\n if(bnode !== null) {\n // reverse property\n direction = 'r';\n }\n }\n\n if(bnode !== null) {\n // get bnode name (try canonical, path, then hash)\n var name;\n if(namer.isNamed(bnode)) {\n name = namer.getName(bnode);\n } else if(pathNamer.isNamed(bnode)) {\n name = pathNamer.getName(bnode);\n } else {\n name = _hashQuads(bnode, bnodes);\n }\n\n // hash direction, property, and bnode name/hash\n var md = sha1.create();\n md.update(direction);\n md.update(quad.predicate.value);\n md.update(name);\n var groupHash = md.digest();\n\n // add bnode to hash group\n if(groupHash in groups) {\n groups[groupHash].push(bnode);\n } else {\n groups[groupHash] = [bnode];\n }\n }\n\n jsonld.setImmediate(function() {groupNodes(i + 1);});\n }\n\n // hashes a group of adjacent bnodes\n function hashGroup(i) {\n if(i === groupHashes.length) {\n // done, return SHA-1 digest and path namer\n return callback(null, {hash: md.digest(), pathNamer: pathNamer});\n }\n\n // digest group hash\n var groupHash = groupHashes[i];\n md.update(groupHash);\n\n // choose a path and namer from the permutations\n var chosenPath = null;\n var chosenNamer = null;\n var permutator = new Permutator(groups[groupHash]);\n jsonld.setImmediate(function() {permutate();});\n function permutate() {\n var permutation = permutator.next();\n var pathNamerCopy = pathNamer.clone();\n\n // build adjacent path\n var path = '';\n var recurse = [];\n for(var n in permutation) {\n var bnode = permutation[n];\n\n // use canonical name if available\n if(namer.isNamed(bnode)) {\n path += namer.getName(bnode);\n } else {\n // recurse if bnode isn't named in the path yet\n if(!pathNamerCopy.isNamed(bnode)) {\n recurse.push(bnode);\n }\n path += pathNamerCopy.getName(bnode);\n }\n\n // skip permutation if path is already >= chosen path\n if(chosenPath !== null && path.length >= chosenPath.length &&\n path > chosenPath) {\n return nextPermutation(true);\n }\n }\n\n // does the next recursion\n nextRecursion(0);\n function nextRecursion(n) {\n if(n === recurse.length) {\n // done, do next permutation\n return nextPermutation(false);\n }\n\n // do recursion\n var bnode = recurse[n];\n _hashPaths(bnode, bnodes, namer, pathNamerCopy,\n function(err, result) {\n if(err) {\n return callback(err);\n }\n path += pathNamerCopy.getName(bnode) + '<' + result.hash + '>';\n pathNamerCopy = result.pathNamer;\n\n // skip permutation if path is already >= chosen path\n if(chosenPath !== null && path.length >= chosenPath.length &&\n path > chosenPath) {\n return nextPermutation(true);\n }\n\n // do next recursion\n nextRecursion(n + 1);\n });\n }\n\n // stores the results of this permutation and runs the next\n function nextPermutation(skipped) {\n if(!skipped && (chosenPath === null || path < chosenPath)) {\n chosenPath = path;\n chosenNamer = pathNamerCopy;\n }\n\n // do next permutation\n if(permutator.hasNext()) {\n jsonld.setImmediate(function() {permutate();});\n } else {\n // digest chosen path and update namer\n md.update(chosenPath);\n pathNamer = chosenNamer;\n\n // hash the next group\n hashGroup(i + 1);\n }\n }\n }\n }\n}", "title": "" }, { "docid": "4be06f9166087a62235285c52994ea3d", "score": "0.44104996", "text": "allFilesAndFoldersBfsDo(closure) {\n const queue = []\n\n queue.unshift( this )\n\n while( queue.length > 0 ) {\n const current = queue.pop()\n\n // First queue the next folder for the iteration, then evaluate the\n // closure on the current file or folder.\n // This ensures that if the iteration performs some operation with\n // secondary effects on the folder (like deleting it) its children\n // were already queuded\n if( current.isFolderPath() ) {\n const currentPath = current.getPath()\n\n const folderContents = fs.readdirSync( currentPath, { withFileTypes: true } )\n\n for( const eachFileStat of folderContents ) {\n const fullPath = pathLib.join( currentPath, eachFileStat.name )\n\n const eachPath = eachFileStat.isDirectory() ?\n this.thisClassification().new({ path: fullPath })\n :\n FilePath.new({ path: fullPath })\n\n queue.unshift( eachPath )\n }\n }\n\n // skip this FolderPath\n if( current !== this ) {\n closure( current )\n }\n }\n }", "title": "" }, { "docid": "7c72e3b86aab539173cf71ada17c72cb", "score": "0.44018134", "text": "function getByHash (inHash, callback) {\n ipfs.files.get(\n inHash,\n function (err, stream) {\n if (err) { throw err; } else {\n stream.on('data', (file) => {\n streamToString(file.content, callback);\n });\n }\n }\n );\n}", "title": "" }, { "docid": "91e56dccfa6e6de8861a78b9a9d8f1b9", "score": "0.44007447", "text": "async function watchModifiedFile(watcher, filePath, id){\n max_time = 0.2\n current_modified = new Date().getTime()\n if (current_modified - last_modified[id] > max_time*60*1000){ \n last_modified[id] = 0\n\n // Write file\n var cipher = crypto.createCipheriv('aes-256-cbc', key, iv)\n var input = fs.createReadStream(filePath);\n console.log(filePath)\n var output = fs.createWriteStream(filePath.substr(0,filePath.lastIndexOf('\\\\')) + '\\\\..\\\\' + filePath.split('\\\\')[filePath.split('\\\\').length - 1] + \".aes\");\n input.pipe(cipher).pipe(output);\n\n output.on('finish', async function () {\n\n // Change hash file \n let mapPath = path.resolve(__dirname, \"..\\\\app-data\\\\map.json\")\n var data = fs.readFileSync(mapPath, 'utf8')\n let tree_file = JSON.parse(data);\n\n tree_file.files[id].check_sum = getHashFile(filePath)\n\n tree_file.last_submission = String(Date.now())\n fs.writeFileSync(mapPath, JSON.stringify(tree_file));\n\n // delete temp file\n if (fs.existsSync(filePath)) {\n fs.unlinkSync(filePath);\n }\n else {\n console.log(`file ${filePath} not found`)\n }\n\n // close the watcher\n watcher.close();\n\n // alert \n showAlert(\"Warning\", \" It's overtime. Any change after this time will not be saved\", 'warning', 5000)\n console.log('timeout')\n\n // Clear the interval\n clearIntervalModifiedFile(id)\n console.log(1)\n // Chưa nghĩ ra solution tốt hơn\n //while (JSON.stringify(last_modified) == JSON.stringify({})){\n // console.log(1)\n // checkSync()\n // console.log(1)\n //}\n\n });\n }\n}", "title": "" }, { "docid": "7d139de3d05b3a4c7d82041a32d2ff9a", "score": "0.43756893", "text": "function _hashChanged() {\n // Store the current hash\n var old = Tools.clone(_hash); // Re-parse the current location hash\n\n _parseHash(); // Check the watches\n\n\n _checkWatches(old);\n}", "title": "" }, { "docid": "4c0af1fe940244f70795d00ac2a0ea07", "score": "0.43752778", "text": "function SaveHash() { }", "title": "" }, { "docid": "4c0af1fe940244f70795d00ac2a0ea07", "score": "0.43752778", "text": "function SaveHash() { }", "title": "" }, { "docid": "4c0af1fe940244f70795d00ac2a0ea07", "score": "0.43752778", "text": "function SaveHash() { }", "title": "" }, { "docid": "4c0af1fe940244f70795d00ac2a0ea07", "score": "0.43752778", "text": "function SaveHash() { }", "title": "" }, { "docid": "73050ff8caa8599d733e1d0b097bcac0", "score": "0.4371136", "text": "calculateHash() {\r\n return sha256(this.index + this.data + this.date + this.previousHash);\r\n }", "title": "" }, { "docid": "5c336714d16433998d946d3e8bc23cc6", "score": "0.4368053", "text": "static getChunkHash(chunk){\n return hash( chunk.voxels ) \n }", "title": "" }, { "docid": "f76f71a09d7b04e4600da8c3d3a95115", "score": "0.43668473", "text": "function callOnHashChange(callback) {\n return installHashChangeHandler(callback);\n}", "title": "" }, { "docid": "6fb5baa069ead67177e1b5f0454d793f", "score": "0.4363465", "text": "function walk() {\n var cached;\n while (index < parts.length) {\n // When traversing through a commit node, load the associated tree first.\n if (entry.mode === modes.commit) {\n // Try to load the commit object from cache\n cached = cache[entry.hash];\n if (!cached) {\n // If it's not there wait or throw depending on mode.\n if (callback) return entry.repo.loadAs(\"commit\", entry.hash, onEntry);\n throw new Error(\"Commit not cached\");\n }\n // Move the entry to the tree object and fall-through to tree case\n entry.mode = modes.tree;\n entry.hash = cached.tree;\n }\n // Load the contents of a tree to find the next segment.\n if (entry.mode === modes.tree) {\n cached = cache[entry.hash];\n // Try to load the tree from cache. Same as before.\n if (!cached) {\n if (callback) return entry.repo.loadAs(\"tree\", entry.hash, onEntry);\n throw new Error(\"Tree not cached\");\n }\n // Whenever we load the tree object for the root of a repo, we load and\n // cache the .gitmodules file too.\n if (partial === entry.root) {\n // Check if the gitmodules cache is up to date\n if (!loadGitmodules(entry.root, cached)) return;\n }\n\n // Move the path up one segment\n var part = parts[index++];\n partial = join(partial, part);\n cached = cached[part];\n entry.mode = cached && cached.mode;\n entry.hash = cached && cached.hash;\n\n // If the path doesn't exist, send an empty entry\n if (!cached) {\n if (callback) return callback(null, entry);\n return entry;\n }\n\n // Non-commit entries can just continue with the next loop\n if (entry.mode !== modes.commit) continue;\n // If the new node is a commit, we need to switch repos to the submodule\n // If it's already configured, load and continue the loop.\n if (configs[partial]) {\n entry.root = partial;\n entry.config = configs[partial];\n entry.repo = findRepo(partial);\n continue;\n }\n // If we don't have the config already, then wait or throw depending.\n if (callback) return getSubModule();\n throw new Error(\"Submodule not cached: \" + partial);\n }\n\n if (entry.mode === modes.sym) {\n cached = cache[entry.hash];\n if (!cached) {\n if (callback) return entry.repo.loadAs(\"blob\", entry.hash, onEntry);\n throw new Error(\"Symlink not cached\");\n }\n var link;\n try { link = binary.toUnicode(cached); }\n catch (err) { return callback(err); }\n console.log({\n partial: partial,\n link: link\n })\n throw up;\n }\n // We reached a non-walkable path, so the target doesn't exist.\n entry.mode = undefined;\n entry.hash = undefined;\n if (callback) return callback(null, entry);\n return entry;\n }\n if (callback) return callback(null, entry);\n return entry;\n }", "title": "" }, { "docid": "e5041bc5bb23d74d2ec73ab518ec3e65", "score": "0.43631208", "text": "filesDo(closure) {\n this.filesAndFoldersDo( (eachPath) => {\n if( ! eachPath.isFilePath() ) { return }\n\n closure( eachPath )\n })\n }", "title": "" }, { "docid": "52f942e89eb01078bc54e7bf00d660b0", "score": "0.4355225", "text": "PlugThingsForDir(dirs, match, fnFolderObject) {\n dirs.forEach((dirname, i) => {\n if (match(dirname)) {\n let ind = this.data.folders.findIndex((v) => v.path == dirname);\n let blob = fnFolderObject(dirname);\n if (ind < 0) {\n this.data.folders.push(blob);\n console.log(` - Append bolb for dir ${dirname}`);\n return;\n }\n let orgBlob = this.data.folders[ind];\n if (!isDeepStrictEqual(orgBlob, blob)) {\n console.log(\n ` - Update bolb for dir ${dirname}, ${JSON.stringify(\n orgBlob\n )} => ${JSON.stringify(blob)}`\n );\n this.data.folders[ind] = blob;\n }\n }\n });\n }", "title": "" }, { "docid": "7f6c0dd7116aa2a5a615045c3540de41", "score": "0.4353757", "text": "writeFastForwardMerge(receiverHash, giverHash) {\n // Point head at `giverHash`.\n Refs.write(Refs.toLocalRef(Refs.headBranchName()), giverHash);\n\n // Make the index mirror the content of `giverHash`.\n Index.write(Index.tocToIndex(Objects.commitToc(giverHash)));\n\n // If the repo is bare, it has no working copy, so there is no\n // more work to do. If the repo is not bare...\n if (!Config.isBare()) {\n // ...Get an object that maps from file paths in the\n // `receiverHash` commit to hashes of the files' content. If\n // `recevierHash` is undefined, the repository has no commits,\n // yet, and the mapping object is empty.\n const receiverToc = receiverHash === undefined ? {} : Objects.commitToc(receiverHash);\n\n // ...and write the content of the files to the working copy.\n WorkingCopy.write(Diff.tocDiff(receiverToc, Objects.commitToc(giverHash)));\n }\n }", "title": "" }, { "docid": "33d5a0f68d3c9c9f21a4035a0e41dcdf", "score": "0.4347287", "text": "_hashChanged() {\n\n\t\t// Re-parse the current location hash\n\t\tthis._parseHash();\n\n\t\t// If there's a callback\n\t\tif(this.change) {\n\t\t\tthis.change(this);\n\t\t}\n\t}", "title": "" }, { "docid": "bc1dcfce4743c515eba55524c68c7942", "score": "0.43468097", "text": "_hash(key) { // very small hash function for demonstration\n let hash = 0;\n for (let i = 0; i < key.length; i++) {\n hash = (hash + key.charCodeAt(i) * i) %\n this.data.length\n }\n return hash;\n }", "title": "" }, { "docid": "adc48b8b9431ca8bc095e3fb022981a1", "score": "0.43452343", "text": "_hash(key) {\n let hash = 0;\n for (let i = 0; i < key.length; i++){\n hash = (hash + key.charCodeAt(i) * i) % this.data.length\n }\n return hash;\n }", "title": "" }, { "docid": "b44ad479650f066e933ac535f6f98eac", "score": "0.43432292", "text": "function hashChange() {\n if ($hook) $hook.trigger('out.ead');\n }", "title": "" }, { "docid": "ce54dee3ad31a88db01ed63d03efee7e", "score": "0.43427888", "text": "function updateActiveHash(event, data) {\n //notify parent\n hashUsed(data.value);\n }", "title": "" }, { "docid": "ace40b69a25ed403a71fc60b2e572698", "score": "0.4328618", "text": "function myOnTree(err, tree, hash) {\n if (err) throw err;\n console.log(\"TREE\", util.inspect(tree));\n tree.forEach(function(entry, index, coll) {\n if(entry.name === 'config.js') {\n tmpRepo.loadAs(\"text\", entry.hash, function(err, file) {\n // we may actually want to use a properties file or something\n try {\n var config = requireFromString(file);\n // TODO actually get the appropriate template\n // also consider an actual file update instead of template...\n console.log('CONFIG: '+util.inspect(config));\n config.templates.forEach(function(tpl) {\n var templatePath = util.format('%s/%s', config.templateDir, tpl);\n var templateName = tpl;\n coll.forEach(function(baseFolder) {\n if(baseFolder.name === config.templateDir) {\n loadTree(tmpRepo, baseFolder.hash, function(err, tDir, hash) {\n if(err) throw err; // TODO\n tDir.forEach(function(tFile) {\n if(tFile.name === templateName)\n tmpRepo.loadAs(\"text\", tFile.hash, function(err, template) {\n var model = {\n changes: {\n template: template,\n solution: userSolution\n },\n filename: templateName, \n solutionDir: config.solutionDir,\n parent: {\n tree: coll, // TODO check if this works now that we have subdirectory\n hash: CHEATING\n },\n repo: tmpRepo\n }\n console.log('reached commit changes');\n commitChanges(model, cb);\n });\n });\n });\n }\n });\n })\n } catch(err) {\n console.log('problem loading config: '+err);\n }\n });\n }\n });\n }", "title": "" }, { "docid": "a3acbc1b17fde2981f76362513e28c3d", "score": "0.43257967", "text": "function initLastBlockHash(onDone){\n\tfs.readFile(LAST_BLOCK_HASH_FILENAME, 'utf8', function(err, data){\n\t\tif (err){\n\t\t\tconsole.log(\"no last block hash\");\n\t\t\treturn onDone();\n\t\t}\n\t\tlastBlockHash = data;\n\t\tconsole.log('last BTC block hash '+lastBlockHash);\n\t\tonDone();\n\t});\n}", "title": "" }, { "docid": "8488a3de34bab2c24923dfdf10d01121", "score": "0.43250102", "text": "function hashchanged(){\n processNotes();\n }", "title": "" }, { "docid": "d5534843fa943f785272d31ce99cb940", "score": "0.4324086", "text": "_hash(key) {\r\n let hash = 0;\r\n for (let i =0; i < key.length; i++){\r\n hash = (hash + key.charCodeAt(i) * i) % this.data.length\r\n }\r\n return hash;\r\n }", "title": "" }, { "docid": "0cc83f938d52eba36e6920a373212174", "score": "0.43201706", "text": "function filesHandler(){\n\t/* Se obtienen los archivos del input */\n\tvar new_files = document.getElementById('input-files').files;\n\n\t/* Se crea una lista para almacenar los nombres de los archivos ya existentes */\n\tvar files_names = [];\n\tfor(var i = 0; i < files.length; i++){\n\t\tfiles_names.push(files[i].name);\n\t}\n\n\t/* Luego se comparan los nombres existentes con los nuevos. El objetivo es evitar archivos duplicados */\n\tfor (var i = 0; i < new_files.length; i++){\n\t\tvar exists = false\n\t\tfor(var key in files){\n\t\t\tif(files.hasOwnProperty(key)){\n\t\t\t\t/* Si el archivo ya existe se cambia el estado */\n\t\t\t\tif(files[key].name == new_files[i].name){\n\t\t\t\t\texists = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/* Solo e almacena en la lista 'files' si el archivo no existe (exists == false) */\n\t\tif(!exists){\n\t\t\tfiles[key_count] = new_files[i];\n\t\t\tgetMeta(key_count, new_files[i]);\n\t\t\tkey_count++;\n\n\t\t\t /* Si la cantidad de archivos es mayor a 0, se habilita el boton para enviar */\n\n\t\t\tcheckFilesSize();\n\t\t}\n\t}\n}", "title": "" }, { "docid": "e275584f1f6cfb21c5f18c460fac7e87", "score": "0.43192345", "text": "uploadSnapshot(snapshotHash, callback) {\n s3.getObjectTagging({\n Bucket,\n Key: snapshotHash + '/dataset_description.json'\n }, (err, data) => {\n\n // check if snapshot is already complete on s3\n let snapshotExists = false;\n if (data && data.TagSet) {\n for (let tag of data.TagSet) {\n if (tag.Key === 'DatasetComplete' && tag.Value === 'true') snapshotExists = true;\n }\n }\n\n if (snapshotExists) {\n callback();\n } else {\n let dirPath = config.location + '/persistent/datasets/' + snapshotHash;\n files.getFiles(dirPath, (files) => {\n async.each(files, (filePath, cb) => {\n let remotePath = filePath.slice((config.location + '/persistent/datasets/').length);\n this.queue.push({\n function: this.uploadFile,\n arguments: [\n filePath,\n remotePath\n ],\n callback: cb\n });\n }, () => {\n // tag upload as complete\n s3.putObjectTagging({\n Bucket,\n Key: snapshotHash + '/dataset_description.json',\n Tagging: {\n TagSet: [\n {\n Key: 'DatasetComplete',\n Value: 'true'\n }\n ]\n }\n }, () => {\n callback();\n });\n });\n });\n }\n });\n }", "title": "" }, { "docid": "8127645f6de021b644a68d52fce465ad", "score": "0.43175876", "text": "function rollup(imbuff)\n{\n var roll = new Buffer(0);\n Object.keys(imbuff).sort().forEach(function(id){\n roll = crypto.createHash('sha256').update(Buffer.concat([roll,new Buffer(id, 'hex')])).digest();\n roll = crypto.createHash('sha256').update(Buffer.concat([roll,imbuff[id]])).digest();\n });\n return roll;\n}", "title": "" }, { "docid": "f9b42f5fabf9707113d6a6d092492cea", "score": "0.43052644", "text": "_end(done){\n extraStat(this.stream.path, (error, stat) => {\n if(error) return this.destroy(error)\n this.pipes.writeHead(200, {\n 'Content-Length': stat.filestat.size,\n 'Content-Type' : stat.mimetype,\n 'x-Content-Mode': stat.filemode,\n 'x-Mode-Owner' : stat.filestat.uid,\n 'x-Mode-Group' : stat.filestat.gid\n })\n\n this.stream.on('data', data => {\n this.push(data) || (this.stream.pause(), this.pipes.once('drain', () => this.stream.resume()))\n }).on('error', done).on('end', done)\n })\n }", "title": "" }, { "docid": "a282fe5619e2ad2973cb50a60f812fcd", "score": "0.4299905", "text": "allFilesDo(closure) {\n this.allFilesAndFoldersDo( (eachPath) => {\n if( ! eachPath.isFilePath() ) { return }\n\n closure( eachPath )\n })\n }", "title": "" }, { "docid": "fe8c9b76490cbc4f71222b2628222f52", "score": "0.4297295", "text": "verify() {\r\n for (let index = 1; index < this.chain.length; index++) {\r\n current = this.chain[index];\r\n previous = this.chain[index - 1];\r\n \r\n if (current.hash != current.calculateHash()) {\r\n return false;\r\n }\r\n\r\n if (current.previousHash != previous.hash) {\r\n return false;\r\n }\r\n\r\n return true;\r\n }\r\n }", "title": "" }, { "docid": "dc0f837b2243689adb5fe2ff9a8e3419", "score": "0.4290714", "text": "allFilesAndFoldersDo(closure) {\n this.allFilesAndFoldersBfsDo( closure )\n }", "title": "" }, { "docid": "d137781042327b629b2bfff085692f4b", "score": "0.42899337", "text": "function group (files, opts, callback) { // opts: { size: boolean }\n if (typeof opts === 'function') return group(files, {}, opts)\n var allAbs = files.every(function (file) {\n return path.isAbsolute(file.path)\n })\n if (!allAbs) return callback(Error('cannot yet handle relative filepaths'))\n var trap = { dirs: [], files: [], paths: [], fdir: [], map: {}, temp: [] }\n var groups = []\n Array.prototype.push.apply(trap.paths, files.map(function (file) {\n return file.path\n }))\n // if single file input always early return as single file\n if (!trap.paths.length) {\n return callback(null, [])\n } else if (trap.paths.length === 1) {\n var singleton = { type: 'file', path: trap.paths[0] }\n if (opts.size) singleton.size = files[0].size\n return callback(null, [ singleton ])\n }\n // split paths into file objects\n trap.fdir = trap.paths.map(function (filepath) {\n return { path: filepath, dir: path.dirname(filepath) }\n })\n // map files to dirs\n trap.map = trap.fdir.reduce(function (acc, cur) {\n if (acc.hasOwnProperty(cur.dir)) acc[cur.dir].push(cur.path)\n else acc[cur.dir] = [ cur.path ]\n return acc\n }, {})\n // push keys of props that represent an entire dir to trap.dirs... via trap.t\n var dirs = Object.keys(trap.map)\n var pending = dirs.length\n dirs.forEach(function (dir) {\n gotAllNestedFiles(dir, trap.map, function (err, truth) {\n if (err) return callback(err, null)\n if (truth) trap.temp.push(dir)\n if (!--pending) finishUp()\n })\n })\n // finish\n function finishUp () {\n // push paths that are not covered by trap.temp to trap.files\n Array.prototype.push.apply(trap.files,\n trap.fdir.filter(function (file) {\n return !trap.temp.some(function (dir) {\n return dir === file.dir\n })\n }).map(function (file) {\n return file.path\n })\n )\n // collapse nested dirs in trap.temp to trap.dirs\n Array.prototype.push.apply(trap.dirs,\n trap.temp.filter(function (dir, i, arr) {\n return !arr.filter(function (d) {\n return d !== dir\n }).some(function (other) {\n return dir.startsWith(other)\n })\n })\n )\n // package neatly\n groups = trap.files.map(function (file) {\n return { type: 'file', path: file }\n }).concat(trap.dirs.map(function (dir) {\n return { type: 'directory', path: dir }\n }))\n // maybe add size\n if (opts.size) {\n groups = groups.map(function (item, i) {\n if (item.type === 'file') {\n item.size = files.find(function (file) {\n return file.path === item.path\n }).size\n } else {\n item.size = files.reduce(function (acc, cur) {\n if (cur.path.startsWith(item.path)) acc += cur.size\n return acc\n }, 0)\n }\n return item\n })\n }\n callback(null, groups)\n }\n}", "title": "" } ]
650ec8326fda2e9b56b1e6d95dda2ff2
listing functions to be executed in the right order
[ { "docid": "7faf6aaae31cc82d7d3ae5b652ad6d05", "score": "0.0", "text": "async function main() {\n createModel();\n await load();\n await train();\n document.getElementById('selectTestDataButton').disabled = false;\n document.getElementById('selectTestDataButton').innerText = \"Ramdom data selection and Recognition process\";\n}", "title": "" } ]
[ { "docid": "e492427ca5f7c174b551c9253e009a1a", "score": "0.6532595", "text": "forEachFunction(callback) {\n const names = Array.from(this.#functions.keys());\n names.sort((a, b) => a.localeCompare(b));\n for (let i = 0; i < names.length; i++) {\n const name = names[i];\n callback((this.#functions.get(name)), i);\n }\n }", "title": "" }, { "docid": "8821f08beb82da71eb1bf6bb9f79e982", "score": "0.6341034", "text": "function listFunctions(){\n\tconsole.log( \" function listFunctions() \" );\n\tconsole.log( \" function send(data,url,method='GET') \" );\n\tconsole.log( \" function dice(limit) \" );\n\tconsole.log( \" function download(src) \" );\n\tconsole.log( \" function downloadAll(imgs, filterkey, limit) \" );\n\tconsole.log( \" function injectJs() \" );\n\tconsole.log( \" function removeDuplicates(listimgs) \" );\t \n\tconsole.log( \" function listAll(tagname='IMG' , attr='src') \" );\n\tconsole.log( \" function injectScript(script_name) \" );\n}", "title": "" }, { "docid": "844bd06887f69c5626929bd4b91a5d31", "score": "0.62173367", "text": "function aplicar_funciones(funs, z) {\n for (let i = 0; i < funs.length; i++) {\n console.log(`Aplicar función ${i} pasando ${z}: ${funs[i](z)}`);\n }\n}", "title": "" }, { "docid": "0232009c81ffef4237d594968cd26919", "score": "0.6210497", "text": "function testList() {\n\tvar fnlist = buildList([1, 2, 3]);\n\t// using j only to help prevent confusion - could use i\n\tfor (var j = 0; j < fnlist.length; j++) {\n\t\tfnlist[j]();\n\t}\n}", "title": "" }, { "docid": "4082e834f6fef600a4c25a0bc2540306", "score": "0.6107636", "text": "function callallfunctions(calls) {\n console.log('##############################');\n console.log('calls', calls);\n console.log('##############################');\n async.series(calls, function(err, result) {\n /* this code will run after all calls finished the job or\n when any of the calls passes an error */\n if (err) {\n console.log('##############################');\n console.log(err);\n console.log('##############################');\n }\n console.log('##############################');\n console.log('all function called');\n console.log('##############################');\n });\n}", "title": "" }, { "docid": "d7a389cf5de5212df89ed55eab8ed2ed", "score": "0.60549515", "text": "function runAll(z){ \n}", "title": "" }, { "docid": "fd4b8e999c152ae07e21c9eea2e8866f", "score": "0.5943281", "text": "function execDrawFuncs() {\n if(drawfuncs.length == 0) {\n\tconsole.log(\"Nothing to do\");\n }\n var funcs = drawfuncs.slice();\n clearDrawFuncs();\n funcs.forEach(function(df){df.call()});\n}", "title": "" }, { "docid": "a62c3109a905232c7bd5e5212edfc1c5", "score": "0.5845194", "text": "function test1() {\n // test1_1();\n // test1_2();\n // test1_3();\n test1_4();\n}", "title": "" }, { "docid": "98df83d07a71ea99f9f7ba078b653ade", "score": "0.57310706", "text": "__executeMultipleFunctions (executableFuncs, primaryValue, ...otherArgs) {\n\n\t\tconst startsWith = Promise.resolve();\n\t\tconst promiseChain = executableFuncs.reduce(\n\t\t\t(chain, func) => chain.then(prevResult => this.__executeFunction(func, primaryValue, otherArgs, prevResult)),\n\t\t\tstartsWith\n\t\t);\n\n\t\treturn promiseChain\n\t\t\t.catch(err => {\n\t\t\t\tif (typeof err !== `string` || err !== `MIDDLEWARE_ENGINE_BREAK`) { throw err; } // Allow chain breaking when the \"stop()\" method is called.\n\t\t\t});\n\n\t}", "title": "" }, { "docid": "5863693790ee11e2dea7f1e0fd3be0d1", "score": "0.5713085", "text": "function execOtherFunction(f){\n testFunction();\n \n}", "title": "" }, { "docid": "ae58ddaf01ed91fcda46fbd16d06097e", "score": "0.5685968", "text": "function runAll() {\n \n}", "title": "" }, { "docid": "80e962f6ae6ed34b2889fde627554b0d", "score": "0.5682502", "text": "function execute(tests) {\n void function next(i, val) {\n var fn = tests[ i++ ]\n\n if (fn)\n process.nextTick(next, i, fn(val))\n }(0)\n}", "title": "" }, { "docid": "f476fe333b020e64f027ca9cfe185fd7", "score": "0.56671417", "text": "runDeferredFunctions() {\n for (var i = 0; i < this.deferredFunctions_.length; ++i) {\n this.deferredFunctions_[i]();\n }\n this.deferredFunctions_ = [];\n }", "title": "" }, { "docid": "17bf9098b901c9783fbcc0cfe49f4a94", "score": "0.5663121", "text": "function callRegisteredFunc() {\n \n angular.forEach(registeredFuncs, function(changeFn) {\n\n changeFn(scrollPosition);\n \n });\n\n }", "title": "" }, { "docid": "7bf92b4c1041c5174d04d1648badcb2a", "score": "0.5660339", "text": "function doSyncSequence(){\n\n // Promise returning functions to execute\n var fnlist = [getLanguagesSync, getCorporaSync, getAuthorsSync, getWorksSync, getTextSync];\n\n pseries(fnlist);\n\n}", "title": "" }, { "docid": "517bd2c15e7c90026cb6fa8f6d63c7d7", "score": "0.56518424", "text": "static _runProcessList(processList) {\n\t\tlet results = [];\n\t\tfor (let method of processList) {\n\t\t\tresults.push(method());\n\t\t}\n\t\treturn results;\n\t}", "title": "" }, { "docid": "6f8567cea2c01278317f65614292e6c0", "score": "0.56514966", "text": "_process_function_calls(tokens) {\n\t\tfor (var i = 0; i < tokens.length; i++) {\n\t\t\tlet token = tokens[i];\n\t\t\tif (token.token === \"name\" && i+1 < tokens.length && tokens[i+1].token === \"group\") {\t\t\t\n\t\t\t\t// we have a name that is followed by a group - this is a funciton call pattern!\n\t\t\t\tlet arg_tokens = tokens[i+1].data;\n\t\t\t\tlet args = [];\n\t\t\t\tif (arg_tokens.length == 0) {\t// nullary function call - do nothing\n\t\t\t\t} else if (arg_tokens.length == 1) {\t// unary function\n\t\t\t\t\tlet arg = arg_tokens[0];\n\t\t\t\t\tif (arg.token !== \"name\") {\t// argument must be a name.\n\t\t\t\t\t\treturn \"Expected name, but found \"+arg.text+\".\";\n\t\t\t\t\t}\n\t\t\t\t\targs.push(arg.data);\t\t\t\t\n\t\t\t\t} else {\t// more arguments - read the whole list\n\t\t\t\t\tlet j = 0;\n\t\t\t\t\tdo {\n\t\t\t\t\t\tlet arg = arg_tokens[j];\n\t\t\t\t\t\tif (arg.token !== \"name\") {\t// argument must be a name.\n\t\t\t\t\t\t\treturn \"Expected name, but found \"+arg.text+\".\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlet variable = this._variableFromName(arg.data);\n\t\t\t\t\t\tif (variable === undefined) {\n\t\t\t\t\t\t\treturn \"Unknown argument '\"+arg.data+\"'. Only variables allowed as arguments.\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\targs.push(arg.data);\n\t\t\t\t\t\tj += 1;\n\t\t\t\t\t\tif (j < arg_tokens.length) {\t// if we are not at the end, expect a comma\n\t\t\t\t\t\t\tif (arg_tokens[j].token !== \"comma\") {\n\t\t\t\t\t\t\t\treturn \"Expected ',', but found \"+arg_tokens[j].text+\".\";\n\t\t\t\t\t\t\t} else { \n\t\t\t\t\t\t\t\tj += 1;\n\t\t\t\t\t\t\t\tif (j == arg_tokens.length) {\n\t\t\t\t\t\t\t\t\treturn \"Unexpected ',' at the end of an argument list.\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} while (j < arg_tokens.length);\n\t\t\t\t}\t\n\t\t\t\ttoken.token = \"call\";\n\t\t\t\ttoken.args = args;\n\t\t\t\ttokens.splice(i+1, 1);\t// remove the group - i will now point to first token after group\t\t\t\n\t\t\t} else if (token.token === \"group\") { // recursively process group\n\t\t\t\tlet result = this._process_function_calls(token.data);\n\t\t\t\tif (typeof result === \"string\") { return result; }\n\t\t\t}\n\t\t}\n\t\treturn tokens;\n\t}", "title": "" }, { "docid": "04531936a5992172e0370a8e789d72a2", "score": "0.5624919", "text": "function allfunctions() \r\n{\r\n if (UI.GetValue([\"Config\", \"Debug\", \"Debug\", \"Print all onetap functions\"])) \r\n {\r\n var mainArray = []\r\n var search = this\r\n mainArray = Object.keys(search)\r\n var time = performance.now()\r\n for (i = 0; i < mainArray.length; i++) {\r\n if (performance.now() - time > 50 || mainArray[i].includes(\"mainArray\") || mainArray[i].includes(\"search\"))\r\n break\r\n \r\n Cheat.Print(mainArray[i])\r\n var type = typeof search[mainArray[i]]\r\n\r\n if (type == \"object\") {\r\n Cheat.Print(\":\")\r\n var array = Object.keys(search[mainArray[i]])\r\n for (x in array) {\r\n mainArray.splice(i + 1, 0, \" \" + mainArray[i] + \".\" + array[x] + \"\")\r\n }\r\n }\r\n\r\n if(type == \"string\") {\r\n Cheat.Print(\":\\n \" + search[mainArray[i]])\r\n }\r\n\r\n Cheat.Print(\"\\n\")\r\n\r\n UI.SetValue([\"Config\", \"Debug\", \"Debug\", \"Print all onetap functions\"], 0);\r\n }\r\n }\r\n}", "title": "" }, { "docid": "eae80baf0bb4d37b315a6ab3b4d85631", "score": "0.5621275", "text": "function functions(obj) {\n var names = [];\n for (var key in obj) {\n if (isFunction(obj[key])) names.push(key);\n }\n return names.sort();\n }", "title": "" }, { "docid": "515f5df10edf9852e79b17dbd08b5328", "score": "0.5613901", "text": "function loadFunctions() {\n \n}", "title": "" }, { "docid": "7d5f27513f68caa56fe6e7bfdfdadb61", "score": "0.56126714", "text": "runTests()\r\n {\r\n this.test1();\r\n this.test2();\r\n this.test3();\r\n this.test4();\r\n this.test5();\r\n this.test6();\r\n this.test7();\r\n }", "title": "" }, { "docid": "0499d0d0aff06468a24206d47e04e8c0", "score": "0.5604528", "text": "function buildFunctions() {\n\t\t\tvar arr = [];\n\t\t\t\n\t\t\tfor (var i = 0; i < 3; i++) {\n\t\t\t\tarr.push(function() {\n\t\t\t\t\tconsole.log(i);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\treturn arr;\n\t\t}", "title": "" }, { "docid": "b95dfc2acebdcee23fdbc4c316f0da7a", "score": "0.55980176", "text": "function functions(obj) {\n var names = [];\n for (var key in obj) {\n if (modules_isFunction(obj[key])) names.push(key);\n }\n return names.sort();\n}", "title": "" }, { "docid": "b95dfc2acebdcee23fdbc4c316f0da7a", "score": "0.55980176", "text": "function functions(obj) {\n var names = [];\n for (var key in obj) {\n if (modules_isFunction(obj[key])) names.push(key);\n }\n return names.sort();\n}", "title": "" }, { "docid": "b95dfc2acebdcee23fdbc4c316f0da7a", "score": "0.55980176", "text": "function functions(obj) {\n var names = [];\n for (var key in obj) {\n if (modules_isFunction(obj[key])) names.push(key);\n }\n return names.sort();\n}", "title": "" }, { "docid": "b95dfc2acebdcee23fdbc4c316f0da7a", "score": "0.55980176", "text": "function functions(obj) {\n var names = [];\n for (var key in obj) {\n if (modules_isFunction(obj[key])) names.push(key);\n }\n return names.sort();\n}", "title": "" }, { "docid": "b95dfc2acebdcee23fdbc4c316f0da7a", "score": "0.55980176", "text": "function functions(obj) {\n var names = [];\n for (var key in obj) {\n if (modules_isFunction(obj[key])) names.push(key);\n }\n return names.sort();\n}", "title": "" }, { "docid": "b95dfc2acebdcee23fdbc4c316f0da7a", "score": "0.55980176", "text": "function functions(obj) {\n var names = [];\n for (var key in obj) {\n if (modules_isFunction(obj[key])) names.push(key);\n }\n return names.sort();\n}", "title": "" }, { "docid": "b95dfc2acebdcee23fdbc4c316f0da7a", "score": "0.55980176", "text": "function functions(obj) {\n var names = [];\n for (var key in obj) {\n if (modules_isFunction(obj[key])) names.push(key);\n }\n return names.sort();\n}", "title": "" }, { "docid": "b95dfc2acebdcee23fdbc4c316f0da7a", "score": "0.55980176", "text": "function functions(obj) {\n var names = [];\n for (var key in obj) {\n if (modules_isFunction(obj[key])) names.push(key);\n }\n return names.sort();\n}", "title": "" }, { "docid": "b95dfc2acebdcee23fdbc4c316f0da7a", "score": "0.55980176", "text": "function functions(obj) {\n var names = [];\n for (var key in obj) {\n if (modules_isFunction(obj[key])) names.push(key);\n }\n return names.sort();\n}", "title": "" }, { "docid": "2adc1fda37c6db75002f4ec8b17b76e3", "score": "0.5597816", "text": "function allCommands (command, args) { \n\tif (command === 'spotify-this-song') { //Calls function in spotify.js\n\t\tif (!args) { // if no song was selected\n\t\t\treturn spotifyFunction('The Sign'); // Searches for default song 'The Sign'\n\t\t};\n\t\tspotifyFunction(args);\n\t};\n\tif (command === 'movie-this') {\n\t\tif (!args) {\n\t\t\treturn omdbFunction('Mr. Nobody');\n\t\t};\n\t\tomdbFunction(args);\n\t};\n\tif(command === 'my-tweets') {\n\t\ttwitterFunction();\n\t};\n}", "title": "" }, { "docid": "f132886c27572ff2a1f336b2e0955303", "score": "0.5594009", "text": "function invokeCallbacks() {\n var callback\n while (callback = callbacks.shift()) {\n invokeCallback(callback.urls, callback.fn)\n }\n }", "title": "" }, { "docid": "92c017035d79ccad4fb04afaf48c74cb", "score": "0.5586555", "text": "function complexPrintout(a, b, funcList){\n for(var i=0; i<funcList.length; i++){\n var result = funcList[i](a,b);//multiply(a,b);\n console.log(result);\n }\n}", "title": "" }, { "docid": "627c665ce32eb1ad7f1ef3077c2a5fe7", "score": "0.55626583", "text": "async addAll(functions, options) {\n return Promise.all(functions.map(async (function_) => this.add(function_, options)));\n }", "title": "" }, { "docid": "627c665ce32eb1ad7f1ef3077c2a5fe7", "score": "0.55626583", "text": "async addAll(functions, options) {\n return Promise.all(functions.map(async (function_) => this.add(function_, options)));\n }", "title": "" }, { "docid": "807a004814257e8f978e08341237fdf3", "score": "0.55476344", "text": "function TestAll (done) {\r\n con.traceLine()\r\n con.trace(module.filename)\r\n con.traceBold(`--------------------------> ${arguments.callee.name}()`) // eslint-disable-line\r\n\r\n // test_1(done)\r\n return testAND(module.filename, true)\r\n}", "title": "" }, { "docid": "8e4db932f987b91bf80e83bf1025b74a", "score": "0.55436033", "text": "function checkDone() {\n if (callOrder.length < 4) {\n return;\n }\n var expected = [ '1-1', '1-2', '2-2', '2-1' ];\n assert.ok(\n expected.every(function(item) { return callOrder.indexOf(item) > -1; }),\n 'every callback should have run');\n\n done();\n }", "title": "" }, { "docid": "0d8dd784b2fc0926683891fe3f5cb9b0", "score": "0.55118775", "text": "function SomeRunner(afunction){ console.log(2+2); afunction();}", "title": "" }, { "docid": "8c4839a452f126f361a51bb7a3b3f570", "score": "0.55070466", "text": "function myFunc3(p1,p2)\r\n{\r\n p1();\r\n p2();\r\n //myFunc4();\r\n}", "title": "" }, { "docid": "ba2e7b86533717b690e29c6aad6b7b4a", "score": "0.5486484", "text": "function functions(obj) {\n var names = [];\n for (var key in obj) {\n if (isFunction$1(obj[key])) names.push(key);\n }\n return names.sort();\n }", "title": "" }, { "docid": "ba2e7b86533717b690e29c6aad6b7b4a", "score": "0.5486484", "text": "function functions(obj) {\n var names = [];\n for (var key in obj) {\n if (isFunction$1(obj[key])) names.push(key);\n }\n return names.sort();\n }", "title": "" }, { "docid": "ba2e7b86533717b690e29c6aad6b7b4a", "score": "0.5486484", "text": "function functions(obj) {\n var names = [];\n for (var key in obj) {\n if (isFunction$1(obj[key])) names.push(key);\n }\n return names.sort();\n }", "title": "" }, { "docid": "02d642366654ee46df3326e608b5aef5", "score": "0.54774886", "text": "function execAll(fnArr, args) {\n\t\tfnArr.forEach(function(fn) {\n\t\t\treturn fn.apply(null, args);\n\t\t});\n\t}", "title": "" }, { "docid": "7a733d090b0955a7e709f8b67c98d103", "score": "0.54682064", "text": "function renderFunctions() {\n for (var i = 0; i < functionProgram.length; i++) {\n var currFunc = $(\"#\" + functionProgram[i].funcIDList[0]);\n if (functionProgram[i].expr === undefined) {\n currFunc.html('Expr');\n } else {\n currFunc.html(createBlock(functionProgram[i].expr, constants.concat(createNewConstants(functionProgram[i])), functions.concat(userFunctions)));\n addDraggableToDefineExpr($(\"#\" + functionProgram[i].funcIDList[0]).find('table'));\n addDroppableWithinDefineExpr($(\"#\" + functionProgram[i].funcIDList[0]).find('.droppable'));\n }\n }\n typeCheckAll();\n\n }", "title": "" }, { "docid": "750014ddd9c225810aa402afd938fe4f", "score": "0.5449742", "text": "exposeFunctions(fns) {\n for (let fn of fns) {\n this.exposeFunction(fn);\n }\n }", "title": "" }, { "docid": "a0cfe55835a62bbfd88497e4a02f7cdf", "score": "0.5441288", "text": "function main() {\n async.series([\n runGetFeature,\n runListFeatures,\n runRecordRoute,\n runRouteChat\n ]);\n}", "title": "" }, { "docid": "ac7a20afe3a7b147029c35715fc6c1cc", "score": "0.54375744", "text": "function invokeAll(events) {\n events.forEach(function(e) {\n e();\n });\n }", "title": "" }, { "docid": "eed6e53a8e0a7883d64ca6b4f1b3d257", "score": "0.54371", "text": "function myFunctions() {}", "title": "" }, { "docid": "d618ba6e9f4e84168f24824a25727819", "score": "0.54281", "text": "function all(func) {\n\t return function() {\n\t var params = getParams(arguments);\n\t var length = params.length;\n\t for (var i = 0; i < length; i++) {\n\t if (!func.call(null, params[i])) {\n\t return false;\n\t }\n\t }\n\t return true;\n\t };\n\t }", "title": "" }, { "docid": "7208a19a2298f2bfa6aac55f0d5856db", "score": "0.5402917", "text": "function any(funcs) {\n const reverse = promise => new Promise((resolve, reject) => promise.then(reject, resolve));\n return reverse(sequence(funcs.map(func => () => reverse(func()))));\n}", "title": "" }, { "docid": "59bf628f57272f46584e3a769dcef6a4", "score": "0.53976256", "text": "exec() {\n this.fns[0].call(this, this.next.bind(this));\n }", "title": "" }, { "docid": "bc1dec89a4ffdf660cfa98d95f6b08e5", "score": "0.53851175", "text": "function execAllChecks(){\n checkRoyalFlush();\n checkStraightFlush();\n check4kind();\n checkFullHouse();\n checkFlush();\n checkStraight();\n check3kind();\n check2pairs();\n checkPair();\n checkHighCard();\n }", "title": "" }, { "docid": "759f6d034b3f682af8a64661fabfe392", "score": "0.5377593", "text": "function execute(func) {\n func.call({}, N, require);\n }", "title": "" }, { "docid": "f3b1db4bbf4116c30ce7cb26a1ba949e", "score": "0.53711224", "text": "function chain() {\n var functions = Array.prototype.slice.call(arguments, 0);\n if (functions.length > 0) {\n var firstFunction = functions.shift();\n var firstPromise = firstFunction.call();\n firstPromise.done(function () {\n chain.apply(null, functions);\n });\n }\n }", "title": "" }, { "docid": "8dba885c1cd4cb1d2aa0ea430fa79788", "score": "0.535781", "text": "function executeCallbacks() {\n while (callbacks.length > 0) {\n var callback = callbacks.shift();\n callback();\n }\n}", "title": "" }, { "docid": "9745e7490f02856f780a9fabefe5edf9", "score": "0.53452253", "text": "function $1e2191638e54f613$export$e08e3b67e392101e(...callbacks) {\n return (...args)=>{\n for (let callback of callbacks)if (typeof callback === \"function\") callback(...args);\n };\n}", "title": "" }, { "docid": "eb06d74f9e90dc58aba420ac992bba73", "score": "0.5334515", "text": "function oncomplete_fn () {\n if ( error_list.length === 0 ) {\n logFn( local_str + 'Success' );\n then_fn();\n }\n else {\n error_list.sort();\n console.log( error_list.join( prefixStr ) );\n failFn( local_str + 'Fail' );\n }\n }", "title": "" }, { "docid": "1e4ff03e93a4c261feb4917a082814a3", "score": "0.5332301", "text": "function myFnc(...args){\n args.sort()\n console.log(args)\n}", "title": "" }, { "docid": "7078bf51d11a9222c4c25f7d46f4c605", "score": "0.5322968", "text": "function multipleFunctions() {\n firstMove();\n gameCount();\n}", "title": "" }, { "docid": "a1df4f97ad110210b128e9688ce3e9f4", "score": "0.5309818", "text": "function carryOutCommands() {\n//Use specified functions based on which command is being used\nswitch (command) {\n\n\t//if my-tweets is in process.argv[2]...\n\tcase \"my-tweets\":\n\n\t\t//print the tweets\n\t\tprintTweets();\n\n\t\tbreak;\n\n\t//if spotify-this-song is in process.argv[2]...\n\tcase \"spotify-this-song\":\n\t\tconsole.log(trackName);\n\t\t//spotify the song\n\t\tprintSpotifyResults()\n\n\t\tbreak;\n\n\t//if movie-this is in process.argv[2]...\n\tcase \"movie-this\":\n\t\t\n\t\t//access omdb api and print those results\n\t\tprintMovieResults();\n\n\t\tbreak;\n\n\t//if there is not a valid command entered\n\tdefault:\n\t \tconsole.log(\"Sorry, that's not a known command.\");\n}\n}", "title": "" }, { "docid": "60e0f827b1f27325f81633c78836b76b", "score": "0.5308517", "text": "function executeDispatchesInOrder(event,cb){forEachEventDispatch(event,cb);event._dispatchListeners = null;event._dispatchIDs = null;}", "title": "" }, { "docid": "c18f6eb8eb3529b0dd4828d95ce9b56e", "score": "0.53075266", "text": "async generateAll() {\n this.log('assigning RPC event handlers');\n const config = this.config();\n if (config.generateServer) {\n await this.generateServer();\n } else {\n this.funcs = this.findFuncs();\n }\n\n await this.generateHandlers();\n\n if (config.generateClients) {\n await this.generateClients();\n }\n }", "title": "" }, { "docid": "365c3ff98b2df1ae53cde8740561bea7", "score": "0.5302081", "text": "runBoundFunctions(instruction, data) {\n if(this.callbacks[instruction].length > 0) {\n for(let callback = 0; callback < this.callbacks[instruction].length; callback++) {\n this.callbacks[instruction][callback](data);\n }\n }\n }", "title": "" }, { "docid": "2869be1abf885ac09757554ee61523ba", "score": "0.5301645", "text": "static invoke() {\n let fns = arguments[0];\n let args = [];\n for (let i = 1; i < arguments.length; i++) args.push(arguments[i]);\n for (let i = 0; i < fns.length; i++) {\n assertFunction(fns[i], \"Functions[\" + i + \"] is not a static\");\n fns[i].apply(null, args);\n }\n }", "title": "" }, { "docid": "6ef850f07dc2475db4202ac365e47085", "score": "0.52954507", "text": "function loadAllAPIFunctionsCalls(funcs) {\n /** Return a reduce(function) */\n /** This is to return values concisely */\n return funcs.reduce(function (accumulated, current) {\n /** Return the function promise */\n /** This promise returns vals that are accessed below */\n return accumulated.then(function (vals) {\n /** Return current function promise */\n return current().then((val) => {\n /** Which returns the concatination of values */\n return vals.concat(val);\n });\n });\n }, Promise.resolve([]));\n}", "title": "" }, { "docid": "346032cd4f7bbf490faf4df945fa37b1", "score": "0.5289972", "text": "function run() {\n for (var i = 0; i < evaluationChain.length; i++) {\n functionCount = i;\n var timeoutCode = setTimeout(evaluationChain[i].function, speed * functionCount);\n evaluationChain[i].timeout = timeoutCode;\n evaluationChain[i].executed = true;\n }\n }", "title": "" }, { "docid": "da1829cf9bc7c9a46412d46fc7ee410e", "score": "0.52786744", "text": "function chain() {\n var functions = Array.prototype.slice.call(arguments, 0);\n if (functions.length > 0) {\n var firstFunction = functions.shift();\n var firstPromise = firstFunction.call();\n firstPromise.done(function () {\n chain.apply(null, functions);\n });\n }\n }", "title": "" }, { "docid": "db578ce5667e67262a814c895c7c1ba4", "score": "0.5275001", "text": "function addFunctions() {\n inquirer\n .prompt([\n {\n type: 'list',\n name: 'chooseAddOption',\n message: 'What would you like to do?',\n choices: [\n 'Add a Department',\n 'Add a Role',\n 'Add an Employee',\n ]\n },\n ])\n .then((answers) => {\n switch (answers.chooseAddOption) {\n case 'Add a Department':\n addDepartment();\n break;\n case 'Add a Role':\n addRole();\n break;\n case 'Add an Employee':\n addEmployee();\n break;\n }\n });\n}", "title": "" }, { "docid": "bd4014aa77f78a05b697908f45a71f0f", "score": "0.52733", "text": "function runListeners() {\n\tonLoadFunctions.forEach(fn => {\n\t\tfn();\n\t});\n}", "title": "" }, { "docid": "e6ccf8adabae6a95b9663a37faef12ca", "score": "0.5264897", "text": "function funcOrder() {\n userInterface()\n insertMoney()\n prodChoice()\n remainingBal()\n anotherPurchase()\n}", "title": "" }, { "docid": "54948340d40270bfd6cfe2c136232afe", "score": "0.5263416", "text": "enterDescFuncNames(ctx) {\n\t}", "title": "" }, { "docid": "4a9dff8e98a7344d9771dfaf12aeaadc", "score": "0.52440554", "text": "function funcao1() {\n funcao2();\n console.log(\"Executou função 1\");\n}", "title": "" }, { "docid": "5ba5c8174e5596d414a9afe42d5d94bc", "score": "0.52427554", "text": "function run(/*args*/) {\n var values = [];\n var fns = Array.prototype.slice.call(arguments);\n\n function invokeNextFn(val) {\n values.unshift(val);\n if (fns.length == 0) return;\n invoke(fns.shift());\n }\n\n function invoke(fn) {\n fn.apply(null, [invokeNextFn].concat(values));\n }\n\n invoke(fns.shift());\n}", "title": "" }, { "docid": "8066034278e78963bcd451f9fde9d34b", "score": "0.5225385", "text": "function matchN(){\r\n\tvar funcs = arguments\r\n\treturn function(){\r\n\t\tvar res = []\r\n\t\tvar err = false\r\n\t\tvar r\r\n\t\t// call everything...\r\n\t\tfor(var i=0; i < funcs.lenght; i++){\r\n\t\t\tr = f0.apply(f0, arguments)\r\n\t\t\t// match the results...\r\n\t\t\tif(r != res[res.length-1]){\r\n\t\t\t\terr = false\r\n\t\t\t}\r\n\t\t\tres.push(r)\r\n\t\t}\r\n\t\tif(err){\r\n\t\t\tconsole.warn('Not all results matched:', r)\r\n\t\t}\r\n\t\treturn res[0]\r\n\t}\r\n}", "title": "" }, { "docid": "d1ea9eba87d104d383330c71bb3b2e1f", "score": "0.52242434", "text": "function _runRegisteredTasks() {\n async.parallel(_registeredTasks, function(err, results) {\n if (err) {\n return;\n }\n _.forEach(results, function(result) {\n console.log(result);\n });\n });\n}", "title": "" }, { "docid": "ceeebbb67eb9969a01e1f798f11a7b00", "score": "0.5218251", "text": "function execute(fn,a,b) {\r\n var result = fn(a,b);\r\n console.log(result);\r\n}", "title": "" }, { "docid": "908ae4159f3965119c1f25264e52dc2b", "score": "0.5216957", "text": "function test2() {\n test2_1();\n test2_2();\n}", "title": "" }, { "docid": "ac90dfc829fadeeb6514069d1261e00c", "score": "0.52164406", "text": "function callInList(list, func, ...params) {\n for(let item in list) {\n if(list[item][func]) list[item][func](...params);\n }\n}", "title": "" }, { "docid": "8eb470866ab425bede1dc4eb47e77250", "score": "0.52104574", "text": "function callOrderedServices(method, services) {\n let service = services.shift();\n if (service) {\n service[method]({\n onResult: function() {\n callOrderedServices(method, services);\n }\n });\n }\n}", "title": "" }, { "docid": "316dc98ac86f3ffaeb8ab6e821149bad", "score": "0.5201338", "text": "function all (fns, callback) {\n\tconst result = [];\n\tlet complete = 0;\n\n\tconst done = (index) => (value) => {\n\t\tresult[index] = value;\n\t\tcomplete++;\n\n\t\tif (complete === fns.length) {\n\t\t\tcallback(result);\n\t\t}\n\t};\n\n\tfns.forEach((fn, index) => fn(done(index)));\n}", "title": "" }, { "docid": "f2401f8119166cadd0d3a919d766e87e", "score": "0.519488", "text": "function all(func) {\n return function() {\n var params = getParams(arguments);\n var length = params.length;\n for (var i = 0; i < length; i++) {\n if (!func.call(null, params[i])) {\n return false;\n }\n }\n return true;\n };\n }", "title": "" }, { "docid": "f2401f8119166cadd0d3a919d766e87e", "score": "0.519488", "text": "function all(func) {\n return function() {\n var params = getParams(arguments);\n var length = params.length;\n for (var i = 0; i < length; i++) {\n if (!func.call(null, params[i])) {\n return false;\n }\n }\n return true;\n };\n }", "title": "" }, { "docid": "8a51cbd349f445a66b392b5283937caf", "score": "0.5193685", "text": "function executeOnce(func) {\n let functionName = lastWord(func.name); //the last word (bind problems)\n if (!Executions[functionName]) {\n Executions[functionName]=\"true\";\n func();\n //show({Executions.toString()});\n }\n }", "title": "" }, { "docid": "4b99b6140861c0d0838e870afae0acfe", "score": "0.51851773", "text": "function callAllGroups(functionName, args) {\n var x, fn;\n for (x in idGroupObject) {\n fn = idGroupObject[x][functionName];\n if (typeof fn === 'function') {\n idGroupObject[x][functionName](args);\n }\n }\n}", "title": "" }, { "docid": "3c95f549ccef295bce404839c651ffb2", "score": "0.51619697", "text": "invokeModules() {\n this._modules.forEach((module) => {\n module.execute();\n });\n }", "title": "" }, { "docid": "95a7adec0fe75e0c4ac6ec7d8338c325", "score": "0.51587975", "text": "function run(func) {\n func()\n}", "title": "" }, { "docid": "b2fc5a5d0121faee3d5f806955c347a5", "score": "0.51410687", "text": "function parse_functions(script) {\n\n var commands = script.split(\"\\n\");\n var help_cmds;\n var new_commands;\n var arr;\n var args_names;\n var line;\n\n for (var i = 0; i < commands.length; i++) {\n line = commands[i];\n\n var f_index = line.indexOf(\"function \");\n\n if ((f_index >= 0) && (line.indexOf(\"{\") > 0)) {\n line = line.replace(/^\\s*/, \"\").replace(/\\s*$/, \"\");\n\n // make arguments... put into an array, and send them to execute commands\n arr = line.split(/[()]/);\n var name = (arr[0].split(\" \"))[1];\n args_names = [];\n if (arr[1].length > 0) {\n args_names = arr[1].split(\", \");\n }\n\n help_cmds = get_bracketed_commands(commands, i);\n i += help_cmds.length - 1;\n new_commands = pre_process_commands(help_cmds);\n\n var func = new UserFunction(name, new_commands, args_names);\n\n g_functions.push(func);\n }\n }\n }", "title": "" }, { "docid": "59d3e46935082c54992f8e85247c4151", "score": "0.5122065", "text": "async function listFunctions(profileName, subscriptionId, options) {\n const fuseProfile = fuseProfiles[profileName].profile;\n const fuseToken = fuseProfiles[profileName].token;\n\n let items = [];\n let next;\n do {\n const url =\n fuseProfile.baseUrl +\n `/v1/account/${fuseProfile.account}/subscription/${subscriptionId}/function?${\n next ? `next=${next}&` : ''\n }${options.criteria.map((c) => `search=${c}`).join('&')}`;\n\n const response = await superagent.get(url).set({ Authorization: 'Bearer ' + fuseToken });\n next = response.body.next;\n items = items.concat(response.body.items);\n } while (next);\n\n console.log(`Identified ${items.length} matching functions...`);\n return items;\n}", "title": "" }, { "docid": "e81136e5ebb3925dcf6f7e8f1649ad31", "score": "0.51201236", "text": "function testFunctions(pattern) {\n\n pattern = pattern || \".*\";\n\n var files = fs.readdirSync(globals.DIRECTIVE_DIR);\n var directive = null;\n var result = {result: false, total: 0, passed: 0, error_count: 0};\n var functionResult = {};\n\n for (var i = 0; i < files.length; i++) {\n //only look at json files.\n\n\n if (!files[i].match(\".*.json\")) {\n continue;\n }\n if (!files[i].match(pattern)) {\n //this file doesn't match the pattern, ignore it.\n continue;\n }\n\n\n //if we get to here we know we have a directive file we want to try\n // to execute.\n\n try {\n directive = JSON.parse(fs.readFileSync(globals.DIRECTIVE_DIR + files[i], \"utf8\"));\n } catch (e) {\n if (!globals.quiet) console.log(\"WARNING:\\tdirective in \" + files[i] + \" contains invalid json, ignoring this directive.\");\n continue;\n }\n\n if (directive.type !== undefined && directive.type !== \"FUNCTION\") {\n continue;\n }\n\n if (\n directive.name === undefined ||\n directive.path === undefined ||\n directive.test === undefined\n ) {\n if (!globals.quiet) console.log(\"WARNING:\\tdirective in \" + files[i] + \" does not all of the fields required for a complete directive, ignoring this directive.\");\n continue;\n }\n\n functionResult = runFunctionTests(directive.test, directive.name);\n\n if (functionResult === null) {\n\n } else {\n result.total += functionResult.count;\n result.passed += functionResult.passed;\n result.error_count += functionResult.error;\n }\n }\n\n if (result.total === result.passed) {\n result.result = true;\n return result;\n } else {\n result.result = false;\n return result;\n }\n}", "title": "" }, { "docid": "ce6a226b8f22f784e3bbc7f0698d33cb", "score": "0.51172423", "text": "function executeDispatchesInOrder(event){\nvar dispatchListeners=event._dispatchListeners;\nvar dispatchInstances=event._dispatchInstances;\n\n{\nvalidateEventDispatches(event);\n}\n\nif(Array.isArray(dispatchListeners)){\nfor(var i=0;i<dispatchListeners.length;i++){\nif(event.isPropagationStopped()){\nbreak;\n}// Listeners and Instances are two parallel arrays that are always in sync.\n\n\nexecuteDispatch(event,dispatchListeners[i],dispatchInstances[i]);\n}\n}else if(dispatchListeners){\nexecuteDispatch(event,dispatchListeners,dispatchInstances);\n}\n\nevent._dispatchListeners=null;\nevent._dispatchInstances=null;\n}", "title": "" }, { "docid": "6859de7a30005373e2d4eef7a27d7eb0", "score": "0.51171815", "text": "function executeDispatchesInOrder(event, cb) {\n\t forEachEventDispatch(event, cb);\n\t event._dispatchListeners = null;\n\t event._dispatchIDs = null;\n\t}", "title": "" }, { "docid": "6859de7a30005373e2d4eef7a27d7eb0", "score": "0.51171815", "text": "function executeDispatchesInOrder(event, cb) {\n\t forEachEventDispatch(event, cb);\n\t event._dispatchListeners = null;\n\t event._dispatchIDs = null;\n\t}", "title": "" }, { "docid": "d0b7b5fc1cfc27c08e02eb2262774461", "score": "0.5110136", "text": "function funcOrder1() {\n userInterface()\n prodChoice()\n remainingBal()\n anotherPurchase()\n}", "title": "" }, { "docid": "04638330b1efb79b265aa58f7e62d083", "score": "0.5108893", "text": "function commitPgFunctions (funcs) {\n var i = 0\n var proceed = () => {\n i = i + 1\n if (i <= funcs.length) commitNext()\n }\n var commitNext = () => {\n var pg = new PG()\n var commit = () => {\n if (!funcs[i]) return process.exit(0)\n var funcPath = path.join(currentDir, 'db', 'pg_funcs', funcs[i])\n var funcText = fs.readFileSync(funcPath).toString()\n pg.query(funcText)\n pg.on('error', (err) => {\n console.log('Error committing ' + funcs[i])\n console.log(err)\n proceed()\n })\n pg.on('data', () => {\n console.log('Successfully committed ' + funcs[i])\n proceed()\n })\n }\n pg.once('ready', commit)\n }\n commitNext()\n}", "title": "" }, { "docid": "7644ae8aac9c966b44e46396873a0eb1", "score": "0.51035285", "text": "function display(functToRun) {\n functToRun();\n}", "title": "" }, { "docid": "b5e112350af9cc3a8c6d6d7a975e4ec4", "score": "0.5102391", "text": "function updateFunctions() {\n var functions = [];\n var functionsinter = [];\n fs.readdir(functionfolder, (err, files) => {\n files.forEach(file => {\n var name = file.slice(0,-3);\n functions.push(name);\n })\n functionarray = functions;\n console.log(`Successfully updated functionarray to [${functionarray.join(\", \")}]`);\n });\n fs.readdir(functioninteractionfolder, (err, files) => {\n files.forEach(file => {\n var name = file.slice(0,-3);\n functionsinter.push(name);\n })\n functionarrayinteraction = functionsinter;\n console.log(`Successfully updated functionarrayinteraction to [${functionarrayinteraction.join(\", \")}]`);\n })\n}", "title": "" }, { "docid": "56195925ee3cb2c5b06537a73e1ee18f", "score": "0.51018715", "text": "__reduceToFunctionList (array) {\n\n\t\tconst functionList = [];\n\n\t\tarray.forEach(func => {\n\t\t\tif (typeof func === `function`) { functionList.push(func); }\n\t\t\telse if (func) { throw new Error(`NOT_A_FUNCTION`); }\n\t\t});\n\n\t\treturn functionList;\n\n\t}", "title": "" }, { "docid": "0dff747c6609115da1c28ee05d2ffcd4", "score": "0.5100285", "text": "function fun(){\n console.log(\"function1\");\n}", "title": "" }, { "docid": "0dff747c6609115da1c28ee05d2ffcd4", "score": "0.5100285", "text": "function fun(){\n console.log(\"function1\");\n}", "title": "" }, { "docid": "fd9fcc1faaa7f53ff84cbeda85568221", "score": "0.50866836", "text": "function visiblefunctions()\n{\n\n}", "title": "" } ]
692763d5062383ae8fd591657f6a3aa7
Transform data as required by data table
[ { "docid": "896aab19d1c3c7bdfdf37b1710043acd", "score": "0.5375159", "text": "function transformData(dataObject, variableName) {\n var newObj, tempArr, keys, oldKeys, numKeys, newObject, tempObj;\n // data sanity testing\n dataObject = dataObject || [];\n // if the dataObject is not an array make it an array\n if (!_.isArray(dataObject)) {\n // if the data returned is of type string, make it an object inside an array\n if (_.isString(dataObject)) {\n keys = variableName.substring(variableName.indexOf('.') + 1, variableName.length).split('.');\n oldKeys = [];\n numKeys = keys.length;\n newObject = {};\n tempObj = newObject;\n // loop over the keys to form appropriate data object required for grid\n keys.forEach(function (key, index) {\n // loop over old keys to create new object at the iterative level\n oldKeys.forEach(function (oldKey) {\n tempObj = newObject[oldKey];\n });\n tempObj[key] = index === numKeys - 1 ? dataObject : {};\n oldKeys.push(key);\n });\n // change the string data to the new dataObject formed\n dataObject = newObject;\n }\n dataObject = [dataObject];\n }\n else {\n /*if the dataObject is an array and each value is a string, then lite-transform the string to an object\n * lite-transform: just checking if the first value is string and then transforming the object, instead of traversing through the whole array\n * */\n if (_.isString(dataObject[0])) {\n tempArr = [];\n _.forEach(dataObject, function (str) {\n newObj = {};\n newObj[variableName.split('.').join('-')] = str;\n tempArr.push(newObj);\n });\n dataObject = tempArr;\n }\n }\n return dataObject;\n }", "title": "" } ]
[ { "docid": "3f57db32096efdcb10e3a83bc3f2e235", "score": "0.7006451", "text": "function transform(data){\n return _.chain(data).map(function (d) {\n var tmp = d.Avhenger + '';\n return row = _.chain(tmp.split(\",\"))\n .filter(function(l){ return !_.isUndefined(l) && !_.isEmpty(l)})\n .map(function (lnk){\n return {\n source : d.Id,\n target: lnk.trim(),\n status: findStatus(d.Status),\n avklaring: fixAvklaring(d.Avklaring),\n strm: d.Strm\n }\n }).value();\n \n }).flatten().value();\n}", "title": "" }, { "docid": "98477a97684a2e02ef036f8e608a4a1b", "score": "0.69631237", "text": "transformData(dbResults, transposeTable = false) {\n const header = ['Field Name'];\n const dataMap = new Map();\n dbResults.forEach((datum) => {\n header.push(datum.id || 'Values');\n Object.keys(datum).forEach((key) => {\n if (key === 'id' || key === 'tdpid') {\n return;\n }\n if (!dataMap.has(key)) {\n dataMap.set(key, [datum[key]]);\n }\n else {\n dataMap.get(key).push(datum[key]);\n }\n });\n });\n // convert Map to Array and concatenate the first elements (keys) with their values to get a full row\n // and sort the rows according to the defined weights\n const body = Array.from(dataMap)\n .map((d) => [d[0], ...d[1]])\n .sort((a, b) => {\n const first = this.fields.find((f) => f.key === a[0]);\n const second = this.fields.find((f) => f.key === b[0]);\n // show elements that have no defined order at the bottom by default\n if (!first && !second) {\n return 0; // both not found --> assume they are equal\n }\n if (!first) {\n return 1; // order for a not defined --> sort b to lower index\n }\n if (!second) {\n return -1; // order for b not defined --> sort a to lower index\n }\n return first.order - second.order;\n });\n if (transposeTable) {\n return d3Transpose([header, ...body]);\n }\n return [header, ...body];\n }", "title": "" }, { "docid": "e85d2d171cb512b2b1c6a7ad55989ecd", "score": "0.690609", "text": "formatTableData() {\n const data = this.props.data;\n let basicData = [];\n let metaData = [];\n if (data && Object.keys(data).length > 0) {\n // Name/State/Type/Commune\n basicData.push({name: 'Nombre', value: data.name},\n {name: 'Estado operacional', value: data.state_description},\n {name: 'Tipo', value: data.type_description});\n\n // Zone (Commune/Region/Province)\n if (data.zone && data.zone.length > 0) {\n if (data.zone.type && data.zone.name) {\n basicData.push({name: data.zone.type, value: data.zone.name});\n }\n if (data.zone.zone_hierarchy) {\n data.zone.zone_hierarchy.forEach((item) => {\n if (item.name && item.type && item.type !== 'pais') {\n basicData.push({name: item.type, value: item.name});\n }\n });\n }\n }\n\n // Meta (Work/Entity/Vol/Ton/Source)\n if (data.meta) {\n metaData = Object.keys(data.meta).map((key) => {\n return data.meta[key]; //{name: \"...\", value: ..., ...}\n });\n }\n return basicData.concat(metaData.filter((item) => item && item.name && item.value));\n }\n return [];\n }", "title": "" }, { "docid": "f35dcf54e86070655083aafae9d7df1f", "score": "0.66564417", "text": "_prepareTableData(dataSet) {\n this.log.info(`_prepareTableData: this.asset.fieldKeys`, this.asset.fieldKeys);\n const Decorator = StorageGetter(this.core, ['repo', 'model', 'decorator'], null);\n const Filter = StorageGetter(this.core, ['repo', 'model', 'filter'], null);\n const appendlist = StorageGetter(this.core.repo, ['model', 'table', 'appendlist'], {});\n if (IsArray(dataSet, true)) {\n if (Filter)\n dataSet = dataSet.filter(Filter);\n dataSet.sort(DynamicSort('id', 'desc'));\n return dataSet.map(row => {\n row = Object.keys(row).reduce((obj, k) => {\n if (k in this.asset.fieldKeys)\n obj[k] = row[k];\n return obj;\n }, {});\n if (IsObject(appendlist, true)) {\n Object.keys(appendlist).map((name) => {\n const value = appendlist[name];\n row[name] = ParseModelValue(value, row);\n });\n }\n if (Decorator)\n row = Decorator(this.core, row);\n return this.srv.pipe.transformObjectValues(row, this.asset.transformations, this.core);\n });\n }\n else {\n return dataSet;\n }\n }", "title": "" }, { "docid": "e2fe165ac92879bec2b5d18ee424c755", "score": "0.6219659", "text": "function transformColumns(rows){\n\n }", "title": "" }, { "docid": "60e8dcbcc024fbc2fa349a75c49fc2bb", "score": "0.6127472", "text": "function transposeData(data) { \n var lrs = [\"latitude\", \"longitude\", \"size\", \"surfacedepth\"].map(function(l) {\n return data.map(function(d) {\n return +d[l];\n });\n });\n\n}", "title": "" }, { "docid": "a1df33f0bae60abd450aee9f63a7e171", "score": "0.60866284", "text": "function preCourseJsonToTable() {}", "title": "" }, { "docid": "28d20737c0c377fe52332823cbf105f9", "score": "0.60593826", "text": "buildStructureFromData(type, data$) {\n this.logWarning(`No table configuration found to render table with type \"${type}\". The table header for \"${type}\" is generated by the help of the first data item`);\n return data$.pipe(map((data) => {\n const cells = Object.keys(data === null || data === void 0 ? void 0 : data[0]).map((key) => key);\n return { type, cells };\n }));\n }", "title": "" }, { "docid": "2baf7c0a678a7294080a6510721798cf", "score": "0.60320526", "text": "function dataTable(data) {\n let keys = Object.keys(data[0]),\n headers = keys.map((name) => {\n return new UnderlinedCell(new TextCell(name))\n })\n\n let body = data.map((row) => {\n return keys.map((name) => {\n let value = row[name]\n if (typeof value == \"number\")\n return new RTextCell(String(value));\n else\n return new TextCell(String(value));\n })\n })\n return [headers].concat(body)\n}", "title": "" }, { "docid": "b40284e1f3adfcab172b12f89268a9e3", "score": "0.60318667", "text": "convertData(dataFromNode) {\n // get table bounds\n let max_row = 0;\n let max_col = 0;\n for (let idx = 0; idx < dataFromNode.length; idx++) {\n let cell = dataFromNode[idx];\n let rowIdx = cell[2];\n let colIdx = cell[3];\n max_row = Math.max(max_row, rowIdx + 1);\n max_col = Math.max(max_col, colIdx + 1);\n }\n\n let data = [];\n\n for (let idx = 0; idx < max_row; idx++) {\n let cols = [];\n for (let j = 0; j < max_col; j++) {\n cols.push([undefined, undefined, 0, true]);\n }\n data.push(cols);\n }\n\n for (let idx = 0; idx < dataFromNode.length; idx++) {\n // unpack cell:\n let cell = dataFromNode[idx];\n let d = cell[0];\n let f = cell[1];\n let rowIdx = cell[2];\n let colIdx = cell[3];\n let version = cell[4];\n let ownedByNode = cell[5]; // simply to make a cell readonly if site served from this node\n data[rowIdx][colIdx] = [d, f, version, ownedByNode]\n }\n return data;\n }", "title": "" }, { "docid": "c7f83538e1f174786e9df6e75c97a6f5", "score": "0.59914774", "text": "_setFieldTableTransformations() {\n this.asset.transformations = {};\n const fields = this.core.repo.model.field;\n Object.keys(this.asset.fieldKeys).map((key) => {\n const field = fields[key];\n if (IsObject(field, ['table', 'model'])) {\n if (field.model.name && field.table.transformation) {\n this.asset.transformations[field.model.name] = CleanObject({\n type: field.table.transformation.type,\n arg1: field.table.transformation.arg1 ? field.table.transformation.arg1 : null,\n arg2: field.table.transformation.arg2 ? field.table.transformation.arg2 : null,\n arg3: field.table.transformation.arg3 ? field.table.transformation.arg3 : null,\n });\n }\n }\n });\n }", "title": "" }, { "docid": "4c117f61641ea45e062bc3a230a6f10c", "score": "0.59880686", "text": "function makeTableData(rawData) {\n const rawColumns = Object.keys(rawData[0]).reduce((acc, k) => {\n if (k === \"learnerId\") {\n return acc\n }\n return [\n ...acc,\n {\n Header:\n k === \"firstName\" ? camelCaseToNormal(\"Name\") : camelCaseToNormal(k),\n accessor: k,\n },\n ]\n }, [])\n\n return [rawData, rawColumns]\n}", "title": "" }, { "docid": "98999dfd5b5e37fbd51bbb9227e5b5a0", "score": "0.59745854", "text": "function format_data(data, data_source) {\n var headings = []\n ,rows = []\n ,row\n , heading_indexes = []\n , headings = data.headings.filter(function(h,i) {\n if(h === 'lat' || h === 'lon' || h === 'Order') {\n return false;\n }\n else {\n heading_indexes.push(i);\n return true;\r\n }\n });\n //filter out and format only those rows we'll be displaying (not lat, lon, order or record id)\n data.rows.forEach(function(r,i) {\n var row = r.filter(function(d,j){ return heading_indexes.indexOf(j) !== -1; });\n row.forEach( function(d,i) {\n //format dates or numbers if the heading is in data_formats (see above)\n //pass the heading and use that to figure out what the query should be\n row[i] = data_formats[headings[i]]?data_formats[headings[i]](row[i], data_source):row[i]; \r\n });\n rows.push(row); \r\n });\n data.rows = rows;\n data.headings = headings;\n return data;\n }", "title": "" }, { "docid": "dc0f8df6b1b5e30256e4b1a80648fe2a", "score": "0.5954323", "text": "function transform_data()\n\t\t\t\t{\n\t\t\t\tscope.total = [$filter('translate')(attrs['label'])];\n\t\t\t\tscope.categories = ['x'];\n\t\t\t\t//scope.categories = [];\n\t\t\t\tfor (var i=0;el=scope.data[i];i++)\n\t\t\t\t\t{\n\t\t\t\t\tscope.total.push(el[attrs['property']]);\n\t\t\t\t\tscope.categories.push(el['year']);\n\t\t\t\t\t}\n\t\t\t\t}", "title": "" }, { "docid": "1989095f41a3cc35ad5e7f082a4c7cb4", "score": "0.5948514", "text": "function dataTable(data) {\n\t \tvar keys = Object.keys(data[0]);\n\t \tvar headers = keys.map(function(name) {\n\t \treturn new UnderlinedCell(new TextCell(name));\n \t});\n\t \tvar body = data.map(function(row) {\n\t \treturn keys.map(function(name) {\n\t \treturn new TextCell(String(row[name]));\n\t });\n \t});\n\t \treturn [headers].concat(body);\n\t}", "title": "" }, { "docid": "99dad8879029861bcdb204fc4f1d50c1", "score": "0.5896906", "text": "function reformatColumns( itcb ) {\n var i, j;\n for ( i = 0; i < dataTable.length; i++ ) {\n\n // reformart the date\n if ( dataTable[i].timestamp ) {\n dataTable[i].timestamp = moment( dataTable[i].timestamp ).format( 'DD.MM.YYYY' );\n }\n\n if ( dataTable[i].content ) {\n dataTable[i].content = dataTable[i].content.replace( '<br/>', '\\n' );\n }\n\n // Look up / translate activity type names\n if ( dataTable[i].actType ) {\n dataTable[i].actTypeName = Y.doccirrus.schemaloader.getEnumListTranslation( 'activity', 'Activity_E', dataTable[i].actType, '-de', 'k.A.' );\n }\n\n // Look up location names\n if ( dataTable[i].locationId ) {\n for ( j = 0; j < context.locations.length; j++ ) {\n if ( context.locations[j]._id + '' === dataTable[i].locationId + '' ) {\n dataTable[i].locationName = context.locations[j].locname + '';\n }\n }\n }\n\n // Add editor name\n if ( dataTable[i].editor && dataTable[i].editor.length ) {\n dataTable[i].editorName = dataTable[i].editor[ dataTable[i].editor.length - 1 ].name;\n }\n }\n\n itcb( null );\n }", "title": "" }, { "docid": "75cc825cfe5172f91798b7e4dbbba84e", "score": "0.5878726", "text": "function result2Table(data) {\n var statusMap={\n \"UNDEPLOY\":'线下',\n \"DEPLOY\":'线上',\n \"DELETE\":'删除'\n };\n var jobTypeMap={\n \"1\":'实时',\n 2:'定期'\n };\n return data.filter((r,i)=>{\n r['statusText']= statusMap[r.status];\n r['jobTypeText']= jobTypeMap[r.jobType];\n return r['status']!=\"DELETE\";\n });\n}", "title": "" }, { "docid": "2ca9c43c6ae21483afc4047a2bcbcf39", "score": "0.58419776", "text": "function prepareData(data) {\n\tconsole.log('Preparing data');\n\n\tconst xs = data.map((d) => [\n\t\t...sexOneHotEncoding(d.Sex),\n\t\t...pclassOneHotEncoding(d.Pclass),\n\t\t...embarkedOneHotEncoding(d.Embarked),\n\t\tprocessQuantitativeParam(d.Fare),\n\t\tprocessQuantitativeParam(d.Age),\n\t\tprocessQuantitativeParam(d.Parch),\n\t\tprocessQuantitativeParam(d.SibSp)\n\t]);\n\tconst ys = data.map((d) => [d.Survived]);\n\n\t// Wrapping these calculations in a tidy will dispose any \n\t// intermediate tensors.\n\treturn tf.tidy(() => {\n\t\tlet xsTensor = tf.tensor2d(xs, [xs.length, 12]);\n\t\txsTensor = normalizeTensor(xsTensor);\n\t\tlet ysTensor = tf.tensor2d(ys, [ys.length, 1]);\n\t\tysTensor = normalizeTensor(ysTensor);\n\n\t\treturn { xsTensor, ysTensor };\n\t});\n}", "title": "" }, { "docid": "99ad1fa70222c06a236f37ee3d71d8df", "score": "0.58347625", "text": "function populateTable(data,datasetBody){\n data.forEach((rowData) => {\n var row = datasetBody.append(\"tr\");\n Object.entries(rowData).forEach(([key, value]) => {\n // round abv to 4 decimal places\n if (key === 'abv' && value !== null ){\n value = value.toFixed(4);\n }\n var cell = row.append(\"td\");\n cell.text(value);\n });\n });\n}", "title": "" }, { "docid": "90a3495adb65ae2c1fe80976beb4dcbe", "score": "0.58282745", "text": "function transformEmployeeData(arr) {\r\n \tvar tranformEmployeeList = []\r\n \tfor(var i of arr)\r\n \t{\r\n \t\tobj={}\r\n \t\tfor(var j=0;j<i.length;j++)\r\n \t\t{\r\n \t\t\tobj[i[j][0]]=i[j][1]\r\n \t\t}\r\n \t\ttranformEmployeeList.push(obj)\r\n \t}\r\n \treturn tranformEmployeeList\r\n}", "title": "" }, { "docid": "66102108600e0428d6f5e59dfa1679e9", "score": "0.58261615", "text": "function buildTable(data) {\n tbody.html(\"\");\n data.forEach((dataRow) => {\n let row = tbody.append(\"tr\");\n Object.values(dataRow).forEach((val) => {\n let cell = row.append(\"td\");\n cell.text(val);\n\n });\n\n });\n\n}", "title": "" }, { "docid": "4f115f3bcab9392884e99e92d3c63ff3", "score": "0.58100516", "text": "function transformData(model) {\n\n // Use the model's transform() method to have it add custom properties we need rendered\n return model.transform();\n}", "title": "" }, { "docid": "cb37f13ceb991ff79316007ec70e2f73", "score": "0.57953155", "text": "function convert() {\n newData = [];\n for (var index in Object.values(data)[0]) {\n elem = Object.values(data)[0][index];\n elem.Year = parseInt(elem.Year);\n elem.Quantity = parseFloat(elem.Quantity);\n }\n}", "title": "" }, { "docid": "520d75693dfb4d18d3617003e6137d75", "score": "0.57898456", "text": "function prepData(data) {\n stripUnitsForColumns(data, dimensions);\n return data;\n}", "title": "" }, { "docid": "8d57da1e2942d9aff680f1009589e8c6", "score": "0.5781036", "text": "function parseData(data_formatted) {\n\t// copy the object so we don't overwrite original\n\tvar output = $.extend(true, {}, FIELDS);\n\n\t// load each key/value pair with the data for that column\n\tObject.keys(output).forEach(function(field){\n\t\toutput[field] = data_formatted.map(function(arr) {\n\t\t\treturn arr[output[field]];\n\t\t});\n\t});\n\n\treturn output;\n}", "title": "" }, { "docid": "ea7610569339420cef036e1b3de19011", "score": "0.5772783", "text": "function buildTable(data){ \n\n tbody.html(\"\");\n\n data.forEach((item) => {\n var newRow= tbody.append('tr');\n Object.values(item).forEach((val) => { \n newRow.append('td').text(val)\n });\n });\n}", "title": "" }, { "docid": "b92fffb9051f2c86763fdf3cb31e3a6a", "score": "0.57615554", "text": "preProcessData(obj) {\n console.log('preProcessData');\n\n if(!obj.layoutObj) {\n return;\n }\n\n //Set up layout defaults and Options\n obj.layoutObj.forEach((fld, idx) => {\n //Initial Sort\n set(fld, \"sort\", idx);\n //Display\n let display = (fld.display !== undefined) ? fld.display : true;\n set(fld, \"display\", display);\n\n });\n\n if(obj.data) {\n obj.data.forEach((row) => {\n //These are metadata items added to the original data under _pg property\n if(!row._pg) {\n //let rowId = obj.incrementProperty ('rowIdCounter');\n let meta = {\n _row: { _id: obj.incrementProperty ('rowIdCounter'), _selected: false, _checked: false, },\n }\n let isChecked = false;\n obj.layoutObj.forEach((fld, fldNum) => {\n let colObj = { _data: row[fld.data] };\n\n //Class for column\n if(fld.class) {\n if(typeof(fld.class) === 'function') {\n colObj._class = fld.class(row);\n } else {\n colObj._class = fld.class;\n }\n }\n\n //Link - expects a funtion that returns array of link params\n if(fld.link && typeof(fld.link) === 'function') {\n colObj._link = fld.link(row);\n }\n\n //Data formatter\n if(fld.formatter && typeof(fld.formatter) === 'function') {\n let data = fld.formatter(row);\n if(fld.html) {\n data = htmlSafe(data);\n }\n colObj._data = data;\n colObj._title = data;\n }\n\n //Display Filter\n if(fld.displayOnlyValues && Array.isArray(fld.displayOnlyValues)) {\n if(!fld.displayOnlyValues.includes(colObj._data)) {\n colObj._data = \"\";\n }\n }\n\n //Checkbox Select\n if(fld.type === 'checkSelect') {\n let showCheck = true;\n if(fld.disableOn && typeof(fld.disableOn) === 'function') {\n showCheck = !fld.disableOn(row);\n }\n if(showCheck) {\n obj.set('checkboxDataKey', fld.data);\n meta._row._checked = Boolean(row[fld.data]);\n isChecked = Boolean(row[fld.data]);\n } else {\n set(row, '_disabled', true);\n }\n }\n\n meta['_col-' + fldNum] = colObj\n\n })\n set(row, '_pg', meta);\n\n //Add checked rows\n let found = obj.checkedRows.findBy(obj.checkboxIdCol, row[obj.checkboxIdCol])\n if(isChecked && !found) {\n obj.checkedRows.pushObject(row);\n }\n //if(isChecked) {\n // obj.checkedRows.addObject(row);\n //}\n }\n\n })\n } else {\n //obj.set('data',[]);\n }\n\n\n console.log(obj.data);\n }", "title": "" }, { "docid": "7b874e36a8ddbdb7912af25b2bb4ca1a", "score": "0.5759993", "text": "function dataTransform(data) {\n data.forEach(country => country.casesPerMill = (country.population) ? country.TotalConfirmed/(country.population/1000000) : null);\n let rank = 0\n data.sort(function(a, b){\n return b.TotalConfirmed-a.TotalConfirmed\n });\n for (let i = 0; i < data.length; i++) {\n data[i].confirmedRank = i + 1\n };\n data.sort(function(a, b){\n return b.casesPerMill-a.casesPerMill\n });\n for (let i = 0; i < data.length; i++) {\n data[i].perMillRank = i + 1\n };\n data.sort(function(a, b){\n return b.population-a.population\n });\n for (let i = 0; i < data.length; i++) {\n data[i].populationRank = i + 1\n };\n dataSummarize(data);\n}", "title": "" }, { "docid": "0f53bbe054c507ff0649c1ce87050a61", "score": "0.57578313", "text": "function transformData(transform){\n var dia = transform.slice(0,2);\n var mes = transform.slice(3,5);\n var ano = transform.slice(6,10);\n var data = dia+mes+ano;\n return data;\n}", "title": "" }, { "docid": "cd30d1b2fdcf8b95619e06e0a2129a06", "score": "0.5756149", "text": "function reformatData(data){\n return new Promise((resolve, reject) => {\n let actual = data.map((m, i) => {\n // transform data to an array of [timestamp, value],\n // and sort by timestamp\n let data = Object.keys(m.dps)\n .sort((a,b) => (+a) - (+b))\n .map(ts => [ts*1000, m.dps[ts]]);\n\n return {\n metric: m.metric,\n color: COLORS[i][0],\n color2: COLORS[i][1],\n tags: m.tags,\n data: data\n };\n });\n resolve(actual);\n });\n}", "title": "" }, { "docid": "fa1750ace9a08fca0e9f83491a2fb95e", "score": "0.5754399", "text": "castData(data) {\n const processed = {};\n\n if (!_.ione(data)) {\n return processed;\n }\n\n this.getFields().forEach(field => {\n const name = field.getName();\n\n if (!(name in data)) {\n return;\n }\n\n processed[name] = field.castValue(data[name]);\n });\n\n return processed;\n }", "title": "" }, { "docid": "0d780cfc3b3a6b83f482f5e7d807fd63", "score": "0.57523865", "text": "function buildTable(data) {\n data.forEach((UFOData) => {\n var row = tbody.append(\"tr\");\n Object.values(UFOData).forEach((value) => {\n row.append(\"td\").text(value);\n });\n });\n}", "title": "" }, { "docid": "5418c7c7c44c038f56fa4bb71aabeee7", "score": "0.57307124", "text": "function buildTable(data) {\n //clear any existing data from the table\n tbody.html(\"\");\n \n //loop through objects and append rows and cells for each value\n data.forEach((dataRow) => {\n var row = tbody.append(\"tr\");\n Object.values(dataRow).forEach((value) => {\n var cell = row.append(\"td\");\n cell.text(value);\n });\n });\n}", "title": "" }, { "docid": "9c3db1b7b647409e21eed307c23ced29", "score": "0.5716584", "text": "function reformat(data) {\n var reformated_data=[]\n for (b = 0; b < data.length; b++) {\n var country = data[b].CountryName;\n\n var gdp_all = [];\n var life_all =[];\n var pop_all=[];\n var migr_all=[];\n var country_years = [];\n\n for (c=0; c < year.length; c++){\n var gdp = data[b][year[c] + \" GDP per capita\"];\n var life = data[b][year[c] + \" Life expectancy\"];\n var pop = data[b][year[c] + \" Population\"];\n var migr = data[b][year[c] + \" Net migration\"];\n var single_yr= year[c];\n\n //only take complete data\n if (gdp == null || life == null || pop == null || migr == null) { }//do nothing if null values\n else {\n country_years.push(single_yr);\n gdp_all.push(gdp);\n life_all.push(life);\n pop_all.push(pop);\n migr_all.push(migr);\n }\n }\n\n country_data= {\n \"Country\": country, \n \"Year\": country_years,\n \"GDP\": gdp_all,\n \"Life\": life_all,\n \"Population\": pop_all,\n \"Migration\":migr_all\n }\n\n reformated_data.push(country_data);\n \n }\n return reformated_data\n}", "title": "" }, { "docid": "7d7a0552089f98b77334eac760c2c569", "score": "0.5707925", "text": "function buildTable(data){\n tbody.html('');\n data.forEach((dataRow) => {\n var row = tbody.append('tr');\n // Get the entries for each function in the array\n Object.values(dataRow).forEach((value) => {\n var cell = row.append('td');\n cell.text(value);\n });\n\n });\n}", "title": "" }, { "docid": "5adff967972f89a21bd39615efcc6490", "score": "0.5702605", "text": "data(data) {\n const { state, color, row, column } = this.query.aesthetic;\n const to_match = [color, row, column]\n data.forEach(d => {\n d[state] = d[state].replace(\" (State)\", \"\")\n })\n this.p.transform = [{\n \"lookup\": \"properties.NAME\",\n \"from\": {\n \"data\": { \"values\": data },\n \"key\": state,\n \"fields\": to_match.filter(d => d) // (No undefined)\n }\n }]\n return this\n }", "title": "" }, { "docid": "18f164c2bab91de1e700f4a261edf1ad", "score": "0.56948704", "text": "function preprocess(data) {\n\t// syllabi, degree programs, etc\n\tstr = '';\n\tfor (var datatype in data) {\n\t\t// Individual entries\n\t\tdataset = data[datatype];\n\t\tfor (var element in dataset) {\n\t\t\tdataset[element][\"toString\"] = toString(dataset[element], datatype);\n\t\t}\n\t}\n\treturn data\n}", "title": "" }, { "docid": "4bd52b4e6ea530267d441b468b89fc50", "score": "0.5693451", "text": "function makeData(originalData){\n originalData.forEach((item)=>{\n item.beginTime=dateFilter(item.beginTime);\n item.endTime=dateFilter(item.endTime);\n })\n}", "title": "" }, { "docid": "79aefcf9b3542b646e566d768ae89dd0", "score": "0.56875616", "text": "function modifyData(data) {\n let result = data.reduce(\n (acc, item) => {\n acc.doses[0].value = (acc.doses[0].value || 0) + Number(item.Male);\n acc.doses[1].value = (acc.doses[1].value || 0) + Number(item.Female);\n acc.doses[2].value =\n (acc.doses[2].value || 0) + Number(item.Transgender);\n acc.doseTypes[0].value =\n (acc.doses[0].value || 0) + Number(item.Covaxin);\n acc.doseTypes[1].value =\n (acc.doses[1].value || 0) + Number(item.CovidShield);\n acc.doseTypes[2].value =\n (acc.doses[2].value || 0) + Number(item.Sputnik);\n acc.doseStages[0].value =\n (acc.doses[0].value || 0) + Number(item.Dose1);\n acc.doseStages[1].value =\n (acc.doses[1].value || 0) + Number(item.Dose2);\n return acc;\n },\n {\n doses: [\n { index: \"Male\", value: 0 },\n { index: \"Female\", value: 0 },\n { index: \"Transgender\", value: 0 }\n ],\n doseTypes: [\n { index: \"Covaxin\", value: 0 },\n { index: \"CovidShield\", value: 0 },\n { index: \"Sputnik\", value: 0 }\n ],\n doseStages: [\n { index: \"Dose 1\", value: 0 },\n { index: \"Dose 2\", value: 0 }\n ]\n }\n );\n setDoses(result);\n }", "title": "" }, { "docid": "43a0c0385df933b4f5222eaf7e5d6b68", "score": "0.568701", "text": "_formatTable(object, cb) {\n\n var self = this;\n var lineType = {};\n // Create object with all line model\n object.forOrder.forEach((type, i) => {\n // If an header rows is define we take line after that header rows\n if (object.headerRows) {\n lineType[type] = _.cloneDeep(object.body[i + object.headerRows]);\n } else {\n lineType[type] = _.cloneDeep(object.body[i]);\n }\n });\n\n if (!object.dataName) {\n if (object.headerRows) {\n object.dataName = this._recoverDataName(object.body[object.headerRows]);\n } else {\n object.dataName = this._recoverDataName(object.body[0]);\n }\n }\n\n // translate columns headers\n for (var i = 0; i < object.headerRows; i++) {\n object.body[i].forEach(function(colonne) {\n\n if (colonne.table) {\n self._recursiveTagHeadersColumnsSynchrone(colonne.table);\n } else {\n if (colonne.text) {\n colonne.text = self._replaceTag(colonne.text);\n }\n if (colonne.image) {\n colonne.image = self.replaceTagImage(colonne.image);\n }\n if (colonne.fillColor) {\n colonne.fillColor = self._replaceTag(colonne.fillColor);\n }\n if (colonne.color) {\n colonne.color = self._replaceTag(colonne.color);\n }\n if (colonne.style) {\n colonne.style = self._replaceTag(colonne.style);\n }\n }\n });\n }\n\n // Remove all model line from dd\n if (object.headerRows) {\n object.body = object.body.slice(0, object.headerRows);\n } else {\n object.body = [];\n }\n\n if (object.dataName) {\n var count = 0;\n // For each line in data we create a new line with correct model and replace all tag with data\n asynk.each(this._data[object.dataName], (line, cb) => {\n if (!line.type) {\n return cb();\n }\n\n if (!lineType[line.type]) {\n return cb();\n }\n\n var newLine = _.cloneDeep(lineType[line.type]);\n\n asynk.each(newLine, (column, cb) => {\n if (_.has(column, 'table.body') && column.table.body[0]) {\n var nameObjetLigneArray = this._recoverDataName(column.table.body[0]);\n\n // when line is array of data\n if (line[nameObjetLigneArray]) {\n if (line[nameObjetLigneArray] && line[nameObjetLigneArray][0]) {\n for (var prop in line[nameObjetLigneArray][0]) {\n self._tag_search = '<' + self._tag + '>' + nameObjetLigneArray + \".\" + prop + '</' + self._tag + '>';\n break;\n }\n }\n // add each array line in the template with the data\n line[nameObjetLigneArray].forEach(function(ligneArray) {\n self._addArrayLigneWithData(column.table.body, ligneArray, self._tag_search);\n });\n // delete the first ligne in the array\n column.table.body = _.filter(column.table.body, function(ligneArray) {\n return !_.map(ligneArray, 'text').includes(self._tag_search);\n });\n } else if (line) { // when line is array\n // case of nomenclature line\n if (line.type === 'composant') {\n if (!line.level) {\n return new Error(\"No nomenclature level for the line \" + JSON.stringify(line));\n }\n //self._addWithds(column.table.widths, line.level);\n self._addArrows(column.table.body, line.level);\n }\n self._addArrayWithData(column.table.body, count);\n }\n }\n // cas when line is a text\n if (column.text) {\n // verify if tag is present, if true replace tag with data\n if (column.text.indexOf(this._tag) != -1) {\n column.text = this._replaceTagLine(column.text, count);\n }\n if (column.rowSpan) {\n column.rowSpan = this._data[object.dataName].length;\n }\n }\n\n if (column.image) {\n if (column.image.indexOf(this._tagImage) != -1) {\n column.image = this._replaceTagImage(column.image);\n }\n }\n\n if (column.fillColor) {\n if (typeof column.fillColor === 'string' || column.fillColor instanceof String) {\n if (column.fillColor.indexOf(this._tag) != -1) {\n column.fillColor = this._replaceTagLine(column.fillColor, count);\n }\n }\n }\n cb();\n }).serie().done(() => {\n object.body.push(newLine);\n\n if (line.type_ligne === \"lot\" && lineType[\"lot\"]) {\n var dataNameLot = lineType[\"lot\"][0].table.dataName;\n\n line[dataNameLot].forEach(function(ligne) {\n var newLineLot = lineType[\"lot\"];\n newLineLot.forEach(function(column) {\n if (_.has(column, 'table.body') && column.table.body[0]) {\n self._addArrayWithData(column.table.body, count);\n }\n\n // cas when line is a text\n if (column.text) {\n // verify if tag is present, if true replace tag with data\n if (column.text.indexOf(this._tagImage) != -1) {\n column.text = self._replaceTagLine(column.text, count);\n }\n }\n if (column.image) {\n if (column.image.indexOf(this._tag) != -1) {\n column.image = self._replaceTagImage(column.image);\n }\n }\n });\n\n object.body.push(newLineLot);\n });\n }\n\n count++;\n cb();\n });\n }).serie().asCallback(cb);\n }\n }", "title": "" }, { "docid": "a939087b2ef0f95c19b797b73005afb1", "score": "0.56652945", "text": "function convertTableToHtml(table) {\n let dataTable = \"\";\n for (let j = 0; j < table.label.length; j++) {\n let newRow = createInfoItem(table.label[j], table.content[j]);\n //Table has only 1 row, open and close div tag\n if (table.label.length === 1) {\n dataTable += `<div class=\"col-12 col-sm-6 extendable info-table ${table.class} sortable-list\">${newRow}</div>`;\n }\n //First row of the table, open div tag, no closing div tag\n else if (j === 0) {\n dataTable += `<div class=\"col-12 col-sm-6 extendable info-table ${table.class} sortable-list\">${newRow}`;\n }\n //Last row of the table, no open div tag, close div tag\n else if (j === table.label.length - 1) {\n dataTable += `${newRow}</div>`;\n }\n //Every other row\n else {\n dataTable += newRow;\n }\n }\n return dataTable;\n }", "title": "" }, { "docid": "ec40e2d462c903c26dea1ac0a5652fa5", "score": "0.56571007", "text": "function generateTable(data){ \n\tvar clear = d3.select(\"#clearfilters\");\n\tvar tbody = d3.select(\"tbody\");\n\t$(\"#tablebody tr\").remove();\n\tdata.forEach(function(ufoData){\n\t\tvar row = tbody.append(\"tr\"); \n\t\tObject.entries(ufoData).forEach(function([key,value]){\n\t\t\tvar cell = row.append(\"td\"); \n\t\t\tcell.text(value);\n\t\t});\n\t});\n}", "title": "" }, { "docid": "0c88fff7e5d7b2a7372cc13d1d486e55", "score": "0.5638122", "text": "function table1(data) {\n // clear data\n tbody.html(\" \");\n data.forEach(selectData => {\n console.table(selectData);\n let row = tbody.append(\"sD\");\n\n console.table(Object.values(selectData));\n Object.values(selectData).forEach((val) => {\n let cell = row.append(\"sD\");\n cell.text(val);\n });\n });\n}", "title": "" }, { "docid": "1573836cd73f52219c2fc02d77f4dfa8", "score": "0.5629305", "text": "function preprocess(data) {\n for (var i = 0; i < data.length; i++) {\n var reservations = data[i]['reservations'];\n var months = [];\n\n for (var j = 0; j < 12; j++) {\n months.push(0);\n };\n\n for (var j = 0; j < reservations.length; j++) {\n months[ reservations[j]['start_time'].getMonth() ] += Math.round((reservations[j]['end_time'] - reservations[j]['start_time']) / 36e5);\n };\n data[i]['data'] = months;\n };\n return data;\n }", "title": "" }, { "docid": "d8877ae81561961aa8b7354fdbe1d024", "score": "0.5624663", "text": "function _transformMetadata(data) {\n return data;\n}", "title": "" }, { "docid": "37d30f2627c4c4aec5e5220a65ff26bf", "score": "0.5621317", "text": "function buildTable(filteredData) {\n\tfilteredData.forEach((data) => {\n\t\tvar row = tbody.append(\"tr\");\n\t\tObject.entries(data).forEach(([key, value]) => {\n\t\t\tconsole.log(key, value);\n\t\t\tvar cell = row.append(\"td\");\n\t\t\tcell.text(value);\n\t\t});\n\t});\n}", "title": "" }, { "docid": "34229dda2300f2b1589142afe3a64514", "score": "0.56173813", "text": "function process(data) {\n return data.map(datum => {\n datum.country = 'Canada';\n datum.name = capitalize(datum.name);\n datum.name = formatDots(datum.name);\n return datum;\n });\n}", "title": "" }, { "docid": "8d9a0db19ba4987886eb929d55c168ff", "score": "0.56098336", "text": "function processData(data) {\n var headers = data[columnNamesKey];\n\n // Restructure data in a MetricsGraphicsJS friendly way.\n var processedData = data.data.map(function(datum) {\n var datumObject = {};\n headers.forEach(function(header, index) {\n datumObject[header] = datum[index];\n });\n return datumObject;\n });\n\n // Give MetricsGraphicsJS the data format it wants.\n processedData = mgjs.convert_dates(processedData, dateFieldKey);\n\n // Now draw the graphs!\n updateGraphsData(processedData);\n }", "title": "" }, { "docid": "f6d08b80dfee89ab7d66c293ded67694", "score": "0.5586051", "text": "function transformForAdminCharts(data, resultColumns, dataColumns) {\n var weeks = { firstweek: 999999, lastweek: 0}, result = [resultColumns];\n\n for (var u = 0; u < dataColumns.length; u++) {\n getStatRange(data[dataColumns[u]], weeks);\n }\n\n for (var i = weeks.firstweek; i <= weeks.lastweek; i++) {\n var resultrow = [formatWeekNumber(i)],\n sum = 0;\n\n for (var u = 0; u < dataColumns.length; u++) {\n var element = getStatData(data[dataColumns[u]], i);\n resultrow.push(element);\n sum += element;\n }\n\n if (sum > 0 || i % 100 < 53) {\n result.push(resultrow);\n }\n }\n return result;\n}", "title": "" }, { "docid": "299fb1b15efa7c86e54fa10cbc4de38d", "score": "0.55826557", "text": "function DataToTable(headers,data,tableId) {\n\tconsole.log('Filling table ', tableId, 'with', headers.length, 'columns (',headers,') on', data.length, 'rows: ', data);\n var output = \"\";\n var headersHtml = \"<tr>\";\n $.each(headers, function(idx) { headersHtml += \"<th>\"+this+\"</th>\" });\n headersHtml += \"</tr>\";\n $(tableId + \" thead\").html(headersHtml);\n\n\tvar table = \"\"; \n\t$.each(data, function(idx) { \n\t\ttable += \"\\t<tr>\\n\"; \n\t\t$.each(this,function(col) { table += \"\\t\\t<td>\" + this + \"</td>\\n\" } ); \n\t\ttable += \"\\t</tr>\\n\"; \n\t} ); \n\t$(tableId + \" tbody\").html(table);\n}", "title": "" }, { "docid": "5e79ef0b4276c02481f614ea708f48ea", "score": "0.55817455", "text": "function formatCrossfilterData(rawViewData) {\n\n var viewDataRows = rawViewData.rows;\n\n viewDataRows.forEach(function (d, i) {\n d.index = i;\n d.dd = parseDate(d[1]);\n d.count = d[0];\n d.month = d3.time.month(d.dd);\n d.viewId = rawViewData[\"view_id\"];\n });\n\n \n\n var viewData = [];\n for (var i = 0; i < viewDataRows.length; i++) {\n if (viewDataRows[i].count > 0) {\n for (var j = 0; j < viewDataRows[i].count; j++) {\n var item = {\n dd: viewDataRows[i][\"dd\"],\n count: viewDataRows[i][\"count\"],\n month: viewDataRows[i][\"month\"],\n viewId: viewDataRows[i][\"viewId\"]\n } \n viewData.push(item);\n }\n }\n }\n\n return viewData;\n\n }", "title": "" }, { "docid": "83009220bd358aa07ac7265c910277af", "score": "0.5578149", "text": "function setRowsDataNonNormalized(sheet, objects, optHeadersRange, optFirstDataRowIndex) {\n var headersRange = optHeadersRange || sheet.getRange(1, 1, 1, sheet.getMaxColumns());\n var firstDataRowIndex = optFirstDataRowIndex || headersRange.getRowIndex() + 1;\n var headers = headersRange.getValues()[0];\n var data = [];\n for (var i = 0; i < objects.length; ++i) {\n var values = []\n for (j = 0; j < headers.length; ++j) {\n var header = headers[j].toString();\n // If the header is non-empty and the object value is 0...\n if ((header.length > 0)&&(objects[i][header] === 0)&&(!(isNaN(parseInt(objects[i][header]))))) {\n values.push(0);\n }\n // If the header is empty or the object value is empty...\n else if ((!(header.length > 0)) || (objects[i][header]=='') || (!objects[i][header])) {\n values.push('');\n }\n else {\n values.push(objects[i][header]);\n }\n }\n data.push(values);\n }\n\n var destinationRange = sheet.getRange(firstDataRowIndex, headersRange.getColumnIndex(),\n objects.length, headers.length);\n destinationRange.setValues(data);\n}", "title": "" }, { "docid": "7a3588409ebdbcb4e936140e186bf2b5", "score": "0.5566196", "text": "function prepareData (fileData) {\n var allData = fileData.allData;\n if (allData == undefined) {\n console.log(\"allData is nil for ID\", fileData.id);\n } else {\n // these columns must contain values\n var mustBeFilledIn = fileData.mustBeFilledIn != undefined ? fileData.mustBeFilledIn : [];\n\n var timeParseFormats = fileData.timeParseFormats; // syntax: {column:format, column:format}\n if (timeParseFormats == undefined) {\n timeParseFormats = {};\n }\n\n var columnCount = getObjectItemCount(allData[0]); // get the column count based on the first item.\n // todo I have to check this later: allData.columns.length\n\n for (var i = allData.length - 1; i > -1 ;i--) { // invert loop for slice (else it will skip items, because the array becomes shorter)\n\n var data = allData[i];\n\n if (data != undefined) {\n\n // define how many checks the item has to pass in order to be OK.\n var checks = columnCount;\n\n // check all properties\n for (var prop in data) {\n var value = data[prop];\n\n // please be lowercase, no need to think about it later.\n var newProp = prop.toLowerCase();\n\n // not sure if it is possible, but I do not want undefined or nulls converted to strings. Will result in \"undefined\"/\"null\" with the >String< function.\n if (value == undefined) {\n value = \"\";\n }\n\n // convert numbers to strings, for the string functions below. (afaik I once has numbers in stead of strings, probably because it were actualy numbers or booleans >0,1<\n value = String(value);\n\n // remove special characters\n newProp = removeAllSpecialCharacters(newProp);\n\n // trim arround\n newProp = newProp.trim();\n value = value.trim();\n\n // replace spaces\n newProp = replaceAll(newProp, \" \", \"_\");\n\n\n // remove new lines\n value = replaceAll(value, \"\\n\", \"\");\n\n\n // make it a number to check if it is a number\n var convertedToNumber = Number(value);\n\n if (newProp === \"datum\" || newProp === \"date\" || newProp === \"year\") { // maybe a date?\n\n // parse the date\n var timeParseFormat = timeParseFormats[newProp] != undefined ? timeParseFormats[newProp] : \"%d-%m-%Y\";\n var convertedToDate = d3.timeParse(timeParseFormat)(value);\n\n\n // no date found? Make a backup (for debug + fixing later purposes)\n if (value == undefined) {\n data[prop + \"_backup\"] = value;\n }\n\n value = convertedToDate;\n\n\n } else if (value.search(\":\") > 0 && value.search(\"-\") <= 0 && (newProp.search(\"tijd\") > 0 || newProp.search(\"time\") > 0 )) { // is it ONLY time?\n\n value = parseTimeHourMinute(value);\n if (value != undefined) {\n var hours = value.getHours();\n value = Math.round((value.getMinutes() / 60) + hours);\n }\n } else if (convertedToNumber && !isNaN(convertedToNumber)) { // Is it a number?\n value = convertedToNumber;\n }\n\n // remove old data, with old index.\n delete data[prop];\n\n if ((!mustBeFilledIn[newProp]) || (value != \"undefined\" && value != null && value !== \"\")) { // OK property is correct.\n\n // lets assign it to the new index.\n data[newProp] = value;\n\n // drop the check count till it is zero. Zero = OK\n checks--;\n\n } else { // Property NOT OK, break the property check loop\n break;\n }\n }\n\n // this will allow me to debug the item and see where it came from.\n data.debugIndex = i;\n\n // give it an id. Which is actually the same value as the debugIndex. But can be used for NON debug purposes, this is done for definition purposes.\n data.id = i;\n\n // item is invalid remove it.\n if (checks !== 0) {\n allData.splice(i, 1);\n }\n\n } else { // no item found? Shouldn't be happening, but just incase remove it.\n allData.splice(i, 1);\n }\n }\n\n // sort the date.\n allData = allData.sort(sortByDateAscending);\n\n return allData;\n }\n return false;\n}", "title": "" }, { "docid": "f9d920e678ae06dbf10bf61e4726c24e", "score": "0.55637413", "text": "function datasetTransform(dataset) {\n const transformations = {\n cost: Number,\n damage: Number,\n loading: Number\n };\n\n return R.evolve(transformations, dataset);\n}", "title": "" }, { "docid": "81322ac3a92874d1f976c5fe55c0cca8", "score": "0.5556837", "text": "function objectify(table) {\n const info = table.querySelectorAll('tr:nth-child(n+4) td');\n const message = table.querySelector('th:first-child');\n const chunks = arrayChunk(Array.from(info), rowCount);\n const collection = [];\n chunks.forEach((chunk, chunkCount) => {\n collection[chunkCount] = {};\n collection[chunkCount].message = formatMessage(message.innerText);\n chunk.forEach((el, index) => {\n collection[chunkCount][tableHeaderMap[index]] = (tableHeaderTypeMap[index] === 'number') ? parseFloat(el.innerText) : stringFormatting(el.innerText);\n })\n });\n return collection;\n}", "title": "" }, { "docid": "18bda82cf1774802c759e5d19f676175", "score": "0.55529225", "text": "function buildTable(data) {\n\n // clear existing data\n tbody.html('');\n\n // loop through each object in the data\n // and append a row and cells for each value in the row\n data.forEach((dataRow) => {\n \n // tells JS to find <tbody> tag in HTML and add a table row <tr>\n let row = tbody.append('tr');\n\n // loops through each value in dataRow\n // and add each value as a table cell <td>\n Object.values(dataRow).forEach((val) => {\n \n // add each value to a cell in the table, table data tag <td>\n let cell = row.append('td');\n // extract only the text of the value\n cell.text(val);\n });\n });\n}", "title": "" }, { "docid": "d5d50d281e50ad80e9e5fdd11fe80863", "score": "0.554132", "text": "function createNewTableOnResultData(data) {\n tableBody.innerHTML= '<tr></tr>';\n\n for (let i = 0; i < 5; i += 1) {\n const newTH = document.createElement('th');\n\n switch (i) {\n case 0:\n newTH.classList.add('coll-sort');\n newTH.setAttribute('data-type', 'string');\n newTH.innerText = 'Show name';\n break;\n case 1:\n newTH.innerText = 'Language';\n break;\n case 2:\n newTH.innerText = 'Genres';\n break;\n case 3:\n newTH.innerText = 'Status of show';\n break;\n case 4:\n newTH.classList.add('coll-sort');\n newTH.setAttribute('data-type', 'number');\n newTH.innerText = 'Rating';\n break;\n\n default:\n break;\n }\n\n tableBody.firstElementChild.appendChild(newTH);\n }\n\n for (let i = 0; i < Object.keys(data).length; i += 1) {\n const newTR = document.createElement('tr');\n newTR.classList.add('table__row-data');\n newTR.setAttribute('data-id', `${data[i].show.id}`);\n\n tableBody.appendChild(newTR);\n\n for (let j = 0; j < 5; j += 1) {\n const newTD = document.createElement('td');\n\n switch (j) {\n case 0:\n newTD.innerText = data[i].show.name;\n break;\n case 1:\n newTD.innerText = data[i].show.language;\n break;\n case 2:\n newTD.innerText = data[i].show.genres.length\n ? data[i].show.genres.join(', ') : '-';\n break;\n case 3:\n newTD.innerText = data[i].show.status;\n break;\n case 4:\n newTD.innerText = data[i].show.rating.average\n ? data[i].show.rating.average : 0;\n break;\n\n default:\n break;\n }\n newTR.appendChild(newTD);\n }\n }\n}", "title": "" }, { "docid": "0927bcfee9a6315d9fe43b13ea7f8f2b", "score": "0.55394506", "text": "function ufoTable(newData){\ntbody.html(\"\");\nnewData.forEach((info) => {\n var row = tbody.append(\"tr\");\n Object.entries(info).forEach(([key, value]) => {\n var cell = tbody.append(\"td\");\n cell.text(value);\n });\n });\n}", "title": "" }, { "docid": "fa7298129f90e8e1288f31d7ceb93815", "score": "0.55297124", "text": "function process_data() {\n var agg_year = d3.nest().rollup(function (d){return aggregate(d);})\n .key(function (d) {return d.Year;});\n var agg_month = d3.nest().rollup(function (d){return aggregate(d);})\n .key(function (d) {return [d.Year,d.Month];});\n var agg_day = d3.nest().rollup(function (d){return aggregate(d);})\n .key(function (d) {return [d.Year,d.Month,d.Day];});\n \n all_data[\"year\"] = agg_year.entries(dataSource);\n all_data[\"month\"] = agg_month.entries(dataSource);\n all_data[\"day\"] = agg_day.entries(dataSource);\n}", "title": "" }, { "docid": "83c5f9f1a7d0ff62d05613eaa1be6614", "score": "0.55224526", "text": "function buildTable(data) {\n// clear data first\ntbody.html(\"\");\n// use forEach like a for loop, forEach only works with arrays\n//then add rows to the table\n//using an arrow funtion cause its cleaner\n//an argument (dataRow) that will represent each row of the data \ndata.forEach((dataRow) => {\n// create a variable that will append a row to the table body\n// let is used becuase the variable is only for this block of code\n// code tells JavaScript to find the <tbody> tag within the HTML and add a table row (\"tr\").\n let row = tbody.append(\"tr\");\n// loop through each field in the dataRow argument\n// function to specify that each object goes on one row\n Object.values(dataRow).forEach((val) => {\n// add each value to a cell each value is wrapped in an html <td> tag\n let cell = row.append(\"td\");\n cell.text(val);\n}\n);\n});\n}", "title": "" }, { "docid": "5d0533940c3ebda981fa846e547b2dfc", "score": "0.5509399", "text": "function makeTable(data) {\n var res\n if (data && data.length > 0) {\n res = \"<table class='table'><thead><tr>\"\n var keys = _.keys(data[0])\n keys.map(x => {res += \"<th>\" + _.startCase(x) + \"</th>\"})\n res += \"</tr></thead><tbody>\"\n data.map(x => {\n var res1 = \"<tr>\"\n keys.map(key => { res1 += \"<td>\" + x[key] + \"</td>\"})\n res += res1 + \"</tr>\"\n \n })\n \n\n res += \"</table>\"\n }\n return res\n}", "title": "" }, { "docid": "a0b3a8124a3a9008318d7e9f56b47d59", "score": "0.5502287", "text": "function reduceToObjects(cols, data) {\r\n var fieldNameMap = $.map(cols, function(col) {\r\n return col.$impl.$fieldName;\r\n });\r\n var dataToReturn = $.map(data, function(d) {\r\n return d.reduce(function(memo, value, idx) {\r\n memo[fieldNameMap[idx]] = value.value;\r\n return memo;\r\n }, {});\r\n });\r\n return dataToReturn;\r\n }", "title": "" }, { "docid": "286b982767e27ac528b6525cb846c1ed", "score": "0.5501853", "text": "function makeTable(tableData){\n const tbody = d3.select(\"#ufo-tbody\");\n \n tableData.forEach(function(ufoSighting) {\n const row = tbody.append(\"tr\");\n\n Object.entries(ufoSighting).forEach(function([key, value]) {\n const cell = row.append(\"td\");\n cell.text(value);\n \n });\n \n });\n\n}", "title": "" }, { "docid": "9f5049465bb3e9eeeb2f6c9fed3f345e", "score": "0.5498623", "text": "function buildTable(data) {\n // First, clear out any existing data\n tbody.html(\"\");\n \n // Next, loop through each object in the data\n // and append a row and cells for each value in the row\n data.forEach((dataRow) => {\n // Append a row to the table body\n let row = tbody.append(\"tr\");\n \n // Loop through each field in the dataRow and add\n // each value as a table cell (td)\n Object.values(dataRow).forEach((val) => {\n let cell = row.append(\"td\");\n cell.text(val);\n }\n );\n });\n}", "title": "" }, { "docid": "72370e0226f81a3c889806463695d1d5", "score": "0.5493077", "text": "_makeColumns (data, oldColumns, extras={}) {\n const result = new Set()\n\n // Trust the data if there is some.\n if (data.length > 0) {\n Object.keys(data[0]).forEach(key => result.add(key))\n }\n\n // Construct.\n else {\n if (oldColumns) {\n oldColumns.forEach(name => result.add(name))\n }\n if ('add' in extras) {\n extras.add.forEach(name => result.add(name))\n }\n if ('remove' in extras) {\n extras.remove.forEach(name => result.remove(name))\n }\n }\n\n return result\n }", "title": "" }, { "docid": "9efdd921276e7b95f477f57e8c4d6e2b", "score": "0.5492412", "text": "function buildTable(data) {\n //First, clear out any existing data\n tbody.html(\"\");\n\n // Next, loop through each object in the data\n // and append a row and cells for each value in the row\n data.forEach((dataRow) => {\n //Append a row to the table body\n let row = tbody.append(\"tr\");\n\n //Loop through each field in the dataRow and add\n //each value as a table cell(td)\n Object.values(dataRow).forEach((val) => {\n let cell = row.append(\"td\");\n cell.text(val);\n });\n });\n}", "title": "" }, { "docid": "29b4b90c1d59f1d28742fab4113982c9", "score": "0.5476353", "text": "function buildTable(data) {\n\tdata.forEach((ufoReport) => {\n\t var row = tbody.append(\"tr\");\n\t Object.entries(ufoReport).forEach(([key, value]) => {\n\t var cell = tbody.append(\"td\");\n\t cell.text(value);\n\t });\n\t});\n}", "title": "" }, { "docid": "500ee77cde1e7b213cede323d909fa81", "score": "0.5465107", "text": "function _getDataToTable(data, dataTampung) {\r\n\t$('.header-table').append(`\r\n <th class=\"py-5\" rowspan=\"2\" colspan=\"2\">Dimensi</th>\r\n <th colspan=\"` + data['tahun'].length + `\">Skor</th>`)\r\n\tdata[\"tahun\"].forEach(function (p) {\r\n\t\t$(\".tahun-ipi\").append(`<th scope=\"col\" class=\"align-middle\">` + p.tahun + `</th>`);\r\n\t});\r\n\r\n\t$(\".iniDataIpi\").append(`<tr class=\"ipi\"></tr>`);\r\n\r\n\t$(\".ipi\").append(\r\n\t\t`\r\n <td colspan=\"2\" scope=\"col\">` +\r\n\t\tdata[\"n_ipi\"] +\r\n\t\t`</td>\r\n `\r\n\t);\r\n\r\n\tfor (var i in data[\"ipi\"]) {\r\n\t\t$(\".ipi\").append(\r\n\t\t\t`\r\n <td class=\"n_ipi\" scope=\"col\">` +\r\n\t\t\tparseFloat(data[\"ipi\"][i]).toFixed(2) +\r\n\t\t\t`</td>\r\n `\r\n\t\t);\r\n\t}\r\n\r\n\tvar tableTr = \"\";\r\n\tvar count = 1;\r\n\tfor (var i in data[\"n_dimensi\"]) {\r\n\t\ttableTr += \"<tr>\";\r\n\t\ttableTr += \"<td>\" + count++ + \"</td>\";\r\n\t\ttableTr += \"<td class='text-left'>\" + data[\"n_dimensi\"][i].nama_dimensi + \"</td>\";\r\n\t\tfor (var j in tahun) {\r\n\t\t\ttableTr +=\r\n\t\t\t\t\"<td>\" +\r\n\t\t\t\tparseFloat(dataTampung[data[\"n_dimensi\"][i].kode_d][j]).toFixed(2) +\r\n\t\t\t\t\"</td>\";\r\n\t\t}\r\n\t\ttableTr += \"</tr>\";\r\n\t}\r\n\t$(\".iniDataIpi\").append(tableTr);\r\n}", "title": "" }, { "docid": "0eff2e5c4f398a7c9778aa24c49007ca", "score": "0.5464512", "text": "function make_table(tableData) {\n tableData.forEach((item) => {\n // append new rows into table\n var row = table.append(\"tr\");\n // insert values from data.js into each new row\n Object.values(item).forEach((value) => {\n // append new cells inside of rows\n var cell = row.append(\"td\");\n // insert values from each object into each new cell\n cell.text(value);\n });\n });\n}", "title": "" }, { "docid": "357caec6bd861b753e2cdbf91e107c0e", "score": "0.5464436", "text": "function buildTable(data) {\n // First, clear out any existing data\n tbody.html(\"\");\n\n // Next, loop through each object in the data\n // and append a row and cells for each value in the row\n data.forEach((dataRow) => {\n // Append a row to the table body\n let row = tbody.append(\"tr\");\n\n // Loop through each field in the dataRow and add\n // each value as a table cell (td)\n Object.values(dataRow).forEach((val) => {\n let cell = row.append(\"td\");\n cell.text(val);\n });\n });\n}", "title": "" }, { "docid": "fc486f107a9c4a879f6198998027f9b8", "score": "0.54625946", "text": "function table(data) {\n tbody.html(\"\");\n data.forEach((dataRow) => {\n var row = tbody.append(\"tr\");\n Object.values(dataRow).forEach((val) => {\n var ufosightings = row.append(\"td\");\n ufosightings.text(val);\n }\n );\n });\n}", "title": "" }, { "docid": "0d4b893213dc1a957e6d13693065eba3", "score": "0.5461545", "text": "function FormatTableData(Data) {\n\tvar data;\n\t// \"total\": \"xxx\", \n\t// \"page\": \"yyy\", \n\t// \"records\": \"zzz\",\n\t// \"rows\" : [\n\t// {\"id\" :\"1\", \"cell\" :[\"cell11\", \"cell12\", \"cell13\"]},\n\t// {\"id\" :\"2\", \"cell\":[\"cell21\", \"cell22\", \"cell23\"]},\n\t// ]\n\tdata = {\n\t\t\"total\" : \"1\",\n\t\t\"page\" : \"1\",\n\t\t\"records\" : \"\" + Data.LedListe.length + \"\",\n\t\t\"rows\" : []\n\t}\n\n\tfor (x in Data.LedListe) {\n\t\t//var data = {id:\"'\"+jsonLEDS.LedListe[x].LedString.LDNUMBER +\"'\",invdate:\"'\"+jsonLEDS.LedListe[x].LedString.LDNAME+\"'\",name:\"'\"+jsonLEDS.LedListe[x].LedString.LDI2CHANNEL+\"'\"};\n\t\t//var row = {\"id\":Data.LedListe[x].LedString.LDNUMBER, \"cell\" :[]};\n\t\t//row.cell=[Data.LedListe[x].LedString.LDNUMBER,Data.LedListe[x].LedString.LDNAME,Data.LedListe[x].LedString.LDI2CCHANNEL];\n\t\t//var row = {\"id\":Data.LedListe[x].LedString.LDNUMBER, \"cell\" :[]};\n\t\tvar row = [ Data.LedListe[x].LedString.LDNUMBER,\n\t\t\t\tData.LedListe[x].LedString.LDNAME,\n\t\t\t\tData.LedListe[x].LedString.LDI2CCHANNEL ];\n\t\tdata.rows[x] = {\n\t\t\t\"id\" : \"\" + Data.LedListe[x].LedString.LDNUMBER + \"\",\n\t\t\t\"cell\" : []\n\t\t}\n\t\tdata.rows[x].cell = row;\n\t\t//data.rows[x]=row;\t\t\n\t}\n\treturn data;\n}", "title": "" }, { "docid": "3d9a1f5407889dab78d85a3f16a0a47d", "score": "0.54606766", "text": "function buildTable(data) {\n // clear the data\n tbody.html (\"\");\n \n // chain a for loop to the data\n data.forEach((dataRow) => {\n // append a row to the table body\n let row = tbody.append(\"tr\");\n \n // loop through each field in dataRow argument\n Object.values(dataRow).forEach ((val) => {\n let cell = row.append(\"td\");\n cell.text(val);\n }\n );\n });\n}", "title": "" }, { "docid": "ee1597da8b121da9a6a5e8868d879b33", "score": "0.54589057", "text": "function transformData(data, content) {\n return {\n date: newDate,\n temp: data.main.temp,\n content\n }\n}", "title": "" }, { "docid": "4c23991ca2c3aa8b1e629362e036d67a", "score": "0.5458537", "text": "function updateData(filterData){\n // clean data\n tbody.html(\"\")\n\n // Refactor to use Arrow Functions!\n \n filterData.forEach((filterData) => {\n var row = tbody.append(\"tr\");\n Object.entries(filterData).forEach(([key, value]) => {\n var cell = row.append(\"td\");\n cell.text(value);\n });\n });\n \n}", "title": "" }, { "docid": "837374f7d427e0d5e114033bb22ae9f5", "score": "0.54568595", "text": "function buildTable(data) {\n tbody.html(\"\");\n data.forEach((wine) => {\n var row = tbody.append(\"tr\");\n // Append a cell to the row for each value\n for (let [key, value] of Object.entries(wine)) {\n var cell = row.append(\"td\");\n cell.text(value);\n }\n });\n }", "title": "" }, { "docid": "48ab055268acd689134eb37c6c9f2acf", "score": "0.5456112", "text": "function outputTable(data){\n tbody.html(\"\");\ndata.forEach((UFOReport) => {\n var row = tbody.append(\"tr\");\n Object.entries(UFOReport).forEach(([key, value]) => {\n var cell = row.append(\"td\");\n cell.text(value);\n });\n });\n}", "title": "" }, { "docid": "4eb0a91d0c70a4e42a669405f119d8e4", "score": "0.54555297", "text": "function prepareRecord(data, model) {\n // remove formula fields -- recalculated as needed\n model.fields.forEach(f => {\n if (f.type == ft.formula)\n delete data[f.id]\n })\n return data\n}", "title": "" }, { "docid": "157d5a0095669d3841603b4c6e5c77a0", "score": "0.54554176", "text": "function convertValues(d) {\n\td.Timestamp = +d.Timestamp;\n\td['A ID'] = +d['A ID'];\n\td['A Value'] = +d['A Value'];\n\td['B ID'] = +d['B ID'];\n\td['B Value'] = +d['B Value'];\n}", "title": "" }, { "docid": "b6ab1e455cf019288bd44a2f800b7253", "score": "0.54544926", "text": "function prepareColumns (data) {\n var columns = [];\n \n for (column in data) {\n value = data[column];\n\n //ignore empty rows\n if (!value) {\n continue;\n }\n\n columns.push(prepareColumn(column, value));\n }\n \n return columns;\n}", "title": "" }, { "docid": "b521743b5d3341464674a229ab68cbe1", "score": "0.5447725", "text": "function buildTable(data) {\n\t\tlet headerData = Object.keys(data[0]);\n\t\tlet table = document.createElement('table');\n\t\tlet headRow = document.createElement('tr');\n\t\theaderData.forEach(header => {\n\t\t\tlet ele = document.createElement('th');\n\t\t\tele.textContent = header;\n\t\t\theadRow.appendChild(ele)\n\t\t})\n\t\ttable.appendChild(headRow);\n\n\t\tdata.forEach(obj => {\n\t\t\tlet row = document.createElement('tr');\n\t\t\tfor(prop in obj) {\n\t\t\t\tlet ele = document.createElement('td');\n\t\t\t\tele.textContent = obj[prop]\n\t\t\t\trow.appendChild(ele)\n\t\t\t}\n\t\t\ttable.appendChild(row)\n\t\t})\n\n\t\treturn table;\n}", "title": "" }, { "docid": "d64fa0cef1be659b4e88f27c248a78a3", "score": "0.54441285", "text": "function renderTable(tableData) {\n // Clear table initially each time function is called\n d3.selectAll('tbody>tr').remove();\n // For loop to grab the value of each UFO sighting and create a new row for each sighting\n for (let i = 0; i < tableData.length; i++) {\n let record = tableData[i];\n let fields = Object.values(record);\n let row = tbody.append('tr');\n // For loop to values of each sighting into the created rows\n for (let j = 0; j < fields.length; j++) {\n row.append('td').text(fields[j])\n }\n }\n}", "title": "" }, { "docid": "17963c98960730b146ada6eb42bb256f", "score": "0.5432432", "text": "updateFromRows() {\n this._rows.forEach((obj, index) => {\n for (let key in obj) {\n if (index === 0) this._cols[key] = [];\n this._cols[key].push(obj[key]);\n }\n });\n\n this._checkConsistency();\n }", "title": "" }, { "docid": "19116a7cc626f1fae2074c9daba3d251", "score": "0.5432145", "text": "function populateDatasetForTable(year) {\n const parsedDataArray = props.data;\n\n const dataForTable = parsedDataArray.filter(\n loan => loan.expiryDate.getFullYear() === years[year]\n );\n\n let x = 0;\n\n return dataForTable.map(loan => ({\n key: x++,\n ...loan\n }));\n }", "title": "" }, { "docid": "9d72861774d776a9621be75ee8b31916", "score": "0.54317343", "text": "function buildTable(data){\n tBody.html(\"\") // to clear the data\n data.forEach((rowData) => {\n var row = tBody.append(\"tr\");\n Object.values(rowData).forEach((value) =>{\n var cellData = row.append(\"td\");\n cellData.text(value);\n });\n });\n}", "title": "" }, { "docid": "9d72861774d776a9621be75ee8b31916", "score": "0.54317343", "text": "function buildTable(data){\n tBody.html(\"\") // to clear the data\n data.forEach((rowData) => {\n var row = tBody.append(\"tr\");\n Object.values(rowData).forEach((value) =>{\n var cellData = row.append(\"td\");\n cellData.text(value);\n });\n });\n}", "title": "" }, { "docid": "b776dbf1c6c08352105f024db06cf3e5", "score": "0.54312104", "text": "function rowConverter(data) {\n return {\n key : data.country,\n value : +data.gdp\n }\n}", "title": "" }, { "docid": "c5cbc44277a71b3cc26c063c7c4061d1", "score": "0.54301023", "text": "function transformData(data, func){\n this.data = data || this.data || null;\n this.transform = func || this.transform || this.content;\n if (typeof this.transform === 'string') {\n this.transform = eval(this.transform);\n }\n if (typeof this.transform === 'function') {\n this.content = this.transform.call(this, this.data);\n }\n else {\n this.content = this.transform;\n }\n return this.content;\n }", "title": "" }, { "docid": "d1f12434253b51ed9ccf3a0189b12a78", "score": "0.5425", "text": "getColumns () {\n return [{\n id: 'page_id',\n alias: 'Page ID',\n dataType: this.tableauDataTypeObject.int\n }, {\n id: 'page_impressions_day',\n alias: 'Impressions Last Day',\n dataType: this.tableauDataTypeObject.int\n }, {\n id: 'page_impressions_week',\n alias: 'Impressions Last Week',\n dataType: this.tableauDataTypeObject.int\n }, {\n id: 'page_impressions_days_28',\n alias: 'Impressions Last Month',\n dataType: this.tableauDataTypeObject.int\n }, {\n id: 'page_impressions_unique_day',\n alias: 'Impressions Unique Last Day',\n dataType: this.tableauDataTypeObject.int\n }, {\n id: 'page_impressions_unique_week',\n alias: 'Impressions Unique Last Week',\n dataType: this.tableauDataTypeObject.int\n }, {\n id: 'page_impressions_unique_days_28',\n alias: 'Impressions Unique Last Month',\n dataType: this.tableauDataTypeObject.int\n }, {\n id: 'page_impressions_paid_day',\n alias: 'Impressions Paid Last Day',\n dataType: this.tableauDataTypeObject.int\n }, {\n id: 'page_impressions_paid_week',\n alias: 'Impressions Paid Last Week',\n dataType: this.tableauDataTypeObject.int\n }, {\n id: 'page_impressions_paid_days_28',\n alias: 'Impressions Paid Last Month',\n dataType: this.tableauDataTypeObject.int\n }, {\n id: 'page_impressions_organic_day',\n alias: 'Impressions Organic Last Day',\n dataType: this.tableauDataTypeObject.int\n }, {\n id: 'page_impressions_organic_week',\n alias: 'Impressions Organic Last Week',\n dataType: this.tableauDataTypeObject.int\n }, {\n id: 'page_impressions_organic_days_28',\n alias: 'Impressions Organic Last Month',\n dataType: this.tableauDataTypeObject.int\n }, {\n id: 'page_engaged_users_day',\n alias: 'Engaged Users Last Day',\n dataType: this.tableauDataTypeObject.int\n }, {\n id: 'page_engaged_users_week',\n alias: 'Engaged Users Last Week',\n dataType: this.tableauDataTypeObject.int\n }, {\n id: 'page_engaged_users_days_28',\n alias: 'Engaged Users Last Month',\n dataType: this.tableauDataTypeObject.int\n }, {\n id: 'page_consumptions_day',\n alias: 'Consumptions Last Day',\n dataType: this.tableauDataTypeObject.int\n }, {\n id: 'page_consumptions_week',\n alias: 'Consumptions Last Week',\n dataType: this.tableauDataTypeObject.int\n }, {\n id: 'page_consumptions_days_28',\n alias: 'Consumptions Last Month',\n dataType: this.tableauDataTypeObject.int\n }, {\n id: 'page_consumptions_unique_day',\n alias: 'Consumptions Unique Last Day',\n dataType: this.tableauDataTypeObject.int\n }, {\n id: 'page_consumptions_unique_week',\n alias: 'Consumptions Unique Last Week',\n dataType: this.tableauDataTypeObject.int\n }, {\n id: 'page_consumptions_unique_days_28',\n alias: 'Comsumptions Unique Last Month',\n dataType: this.tableauDataTypeObject.int\n }, {\n id: 'page_negative_feedback_day',\n alias: 'Negative Feedback Last Day',\n dataType: this.tableauDataTypeObject.int\n }, {\n id: 'page_negative_feedback_week',\n alias: 'Negative Feedback Last Week',\n dataType: this.tableauDataTypeObject.int\n }, {\n id: 'page_negative_feedback_days_28',\n alias: 'Negative Feedback Last Month',\n dataType: this.tableauDataTypeObject.int\n }, {\n id: 'page_negative_feedback_unique_day',\n alias: 'Negative Feedback Unique Last Day',\n dataType: this.tableauDataTypeObject.int\n }, {\n id: 'page_negative_feedback_unique_week',\n alias: 'Negative Feedback Unique Last Week',\n dataType: this.tableauDataTypeObject.int\n }, {\n id: 'page_negative_feedback_unique_days_28',\n alias: 'Negative Feedback Unique Last Month',\n dataType: this.tableauDataTypeObject.int\n }, {\n id: 'page_fan_adds_unique_day',\n alias: 'Fan Adds Unique Last Day',\n dataType: this.tableauDataTypeObject.int\n }, {\n id: 'page_fan_adds_unique_week',\n alias: 'Fan Adds Unique Last Week',\n dataType: this.tableauDataTypeObject.int\n }, {\n id: 'page_fan_adds_unique_days_28',\n alias: 'Fan Adds Unique Last Month',\n dataType: this.tableauDataTypeObject.int\n }, {\n id: 'page_views_total_day',\n alias: 'Views Total Last Day',\n dataType: this.tableauDataTypeObject.int\n }, {\n id: 'page_views_total_week',\n alias: 'Views Total Last Week',\n dataType: this.tableauDataTypeObject.int\n }, {\n id: 'page_views_total_days_28',\n alias: 'Views Total Last Month',\n dataType: this.tableauDataTypeObject.int\n }, {\n id: 'page_views_logged_in_unique_day',\n alias: 'Views Logged In Last Day',\n dataType: this.tableauDataTypeObject.int\n }, {\n id: 'page_views_logged_in_unique_week',\n alias: 'Views Logged In Last Week',\n dataType: this.tableauDataTypeObject.int\n }, {\n id: 'page_views_logged_in_unique_days_28',\n alias: 'Views Logged In Last Month',\n dataType: this.tableauDataTypeObject.int\n }, {\n id: 'page_posts_impressions_day',\n alias: 'Posts Impressions Last Day',\n dataType: this.tableauDataTypeObject.int\n }, {\n id: 'page_posts_impressions_week',\n alias: 'Posts Impressions Last Week',\n dataType: this.tableauDataTypeObject.int\n }, {\n id: 'page_posts_impressions_days_28',\n alias: 'Posts Impressions Last Month',\n dataType: this.tableauDataTypeObject.int\n }, {\n id: 'page_posts_impressions_unique_day',\n alias: 'Posts Impressions Unique Last Day',\n dataType: this.tableauDataTypeObject.int\n }, {\n id: 'page_posts_impressions_unique_week',\n alias: 'Posts Impressions Unique Last Week',\n dataType: this.tableauDataTypeObject.int\n }, {\n id: 'page_posts_impressions_unique_days_28',\n alias: 'Posts Impressions Unique Last Month',\n dataType: this.tableauDataTypeObject.int\n }, {\n id: 'page_posts_impressions_paid_day',\n alias: 'Posts Impressions Paid Last Day',\n dataType: this.tableauDataTypeObject.int\n }, {\n id: 'page_posts_impressions_paid_week',\n alias: 'Posts Impressions Paid Last Week',\n dataType: this.tableauDataTypeObject.int\n }, {\n id: 'page_posts_impressions_paid_days_28',\n alias: 'Posts Impressions Paid Last Month',\n dataType: this.tableauDataTypeObject.int\n }, {\n id: 'page_posts_impressions_organic_day',\n alias: 'Posts Impressions Organic Last Day',\n dataType: this.tableauDataTypeObject.int\n }, {\n id: 'page_posts_impressions_organic_week',\n alias: 'Posts Impressions Organic Last Week',\n dataType: this.tableauDataTypeObject.int\n }, {\n id: 'page_posts_impressions_organic_days_28',\n alias: 'Posts Impressions Organic Last Month',\n dataType: this.tableauDataTypeObject.int\n }, {\n id: 'page_post_engagements_day',\n alias: 'Post Engagements Day',\n dataType: this.tableauDataTypeObject.int\n }, {\n id: 'page_post_engagements_week',\n alias: 'Post Engagements Week',\n dataType: this.tableauDataTypeObject.int\n }, {\n id: 'page_post_engagements_days_28',\n alias: 'Post Engagements Month',\n dataType: this.tableauDataTypeObject.int\n }, {\n id: 'page_video_views_day',\n alias: 'Video Views Day',\n dataType: this.tableauDataTypeObject.int\n }, {\n id: 'page_video_views_week',\n alias: 'Video Views Week',\n dataType: this.tableauDataTypeObject.int\n }, {\n id: 'page_video_views_days_28',\n alias: 'Video Views Month',\n dataType: this.tableauDataTypeObject.int\n }, {\n id: 'created_at',\n alias: 'Created Time',\n dataType: this.tableauDataTypeObject.datetime\n }]\n }", "title": "" }, { "docid": "94ea489d133fe21c0069aa0a47a73d4c", "score": "0.54224396", "text": "function buildTable(data) {\n let table = document.createElement(\"table\"); // table\n table.style.borderCollapse = \"collapse\";\n let tr = document.createElement(\"tr\"); // row element\n let headers = Object.keys(data[0]); // headers content\n\n for (let header of headers) {\n let th = document.createElement(\"th\"); // header element\n th.style.border = \"1px solid black\";\n th.style.padding = \"3px 8px\";\n th.style.textAlign = \"left\";\n th.appendChild(document.createTextNode(header));\n tr.appendChild(th);\n }\n table.appendChild(tr); // add header row to the table\n \n data.forEach(dataRow => { // form data rows with content and style\n tr = document.createElement(\"tr\");\n for (let header of headers) {\n let td = document.createElement(\"td\"); // cell element\n td.style.border = \"1px solid black\";\n td.style.padding = \"3px 8px\";\n td.appendChild(document.createTextNode(dataRow[header]));\n if (typeof dataRow[header] === \"number\") {\n td.style.textAlign = \"right\";\n }\n tr.appendChild(td);\n }\n table.appendChild(tr);\n });\n return table;\n}", "title": "" }, { "docid": "3e20418323471a3817f86aa26e9afd1f", "score": "0.54062665", "text": "function prepData(data) {\n const len = data.length;\n let fullArr = [];\n\n for (let i = 0; i < len; i++) {\n for (let j = 0; j < len; j++) {\n let rowArr = [];\n if (data[i].State === data[j].State && data[i].Year !== data[j].Year) {\n rowArr.push(data[i]);\n rowArr.push(data[j]);\n fullArr.push(rowArr);\n }\n }\n }\n\n return fullArr;\n }", "title": "" }, { "docid": "5478a3a111735ccadf049c9e776400d1", "score": "0.5397608", "text": "formatData (data) {\n this.tableData = []\n let nowTime = Date.now()\n for (let i = 0, len = data.length; i < len; i++) {\n let dataObj = data[i]\n if (dataObj.status === 0) {\n this.getHistoryState(dataObj._id, dataObj.key, i)\n }\n if (dataObj.gId) {\n this.getGName(dataObj.gId, i)\n }\n if (dataObj.pubKey) {\n this.getAccountName(dataObj.pubKey, i)\n }\n this.tableData.push(dataObj)\n this.loading.history = false\n }\n }", "title": "" }, { "docid": "4219687997ddd5d17dbc10ae3b6f4bf9", "score": "0.53946257", "text": "function buildTable(data) {\n tbody.html('');\n\n data.forEach(function(tableData) {\n console.log(tableData);\n var row = tbody.append('tr');\n Object.entries(tableData).forEach(function([key, value]) {\n console.log(key, value);\n var cell = row.append(\"td\");\n cell.text(value);\n\n });\n\n });\n}", "title": "" }, { "docid": "9354b255f75b4977f39a4ef1264c78d7", "score": "0.53868294", "text": "function transform(data) {\n if(!data) return null;\n\n\n var replaceStrings = [\n {oldStr:/[\\*©®ǂ‡†±→§™¹›]/g, newStr: \"\"},\n //{oldStr: //i, newStr: \"\"},\n //{oldStr: //i, newStr: \"\"},\n //{oldStr: //i, newStr: \"\"},\n //{oldStr: //i, newStr: \"\"},\n //{oldStr: //i, newStr: \"\"},\n //{oldStr: //i, newStr: \"\"},\n //{oldStr: //i, newStr: \"\"},\n //{oldStr: //i, newStr: \"\"},\n //{oldStr: //i, newStr: \"\"},\n //{oldStr: //i, newStr: \"\"},\n //{oldStr: //i, newStr: \"\"},\n //{oldStr: //i, newStr: \"\"},\n //{oldStr: //i, newStr: \"\"},\n //{oldStr: //i, newStr: \"\"},\n //{oldStr: //i, newStr: \"\"},\n //{oldStr: //i, newStr: \"\"},\n //{oldStr: //i, newStr: \"\"},\n //{oldStr: //i, newStr: \"\"},\n //{oldStr: //i, newStr: \"\"},\n //{oldStr: //i, newStr: \"\"},\n //{oldStr: //i, newStr: \"\"},\n ];\n\n replaceStrings.forEach(function(el) {\n data = data.replace(el.oldStr, el.newStr);\n });\n\n return data.trim();\n}", "title": "" }, { "docid": "5875d8dc4a35b93c34d180748cc7fe76", "score": "0.5385698", "text": "function UFOtable() {tableData.map (data =>{\n var nextRow = tbody.append('tr');\n\n //create new rows of data for every UFO sighting\n nextRow.append('td').text(data.datetime);\n nextRow.append('td').text(data.city);\n nextRow.append('td').text(data.state);\n nextRow.append('td').text(data.country);\n nextRow.append('td').text(data.shape);\n nextRow.append('td').text(data.durationMinutes);\n nextRow.append('td').text(data.comments);\n});\n\n}", "title": "" }, { "docid": "1823368356f1df502fac20833ee4bdfc", "score": "0.53852284", "text": "toRow() {\n return Util.trim({\n S_BLC_MAP_ID: this.sId,\n BLC_MAP_ID: this.blcMapId,\n UId: this.uId,\n TRX_ID: this.txid,\n ORG_ID: this.orgId,\n SUB_ID: this.subId,\n SUB_UNQ_ID: this.subUnqId,\n DFT_YN: this.dfn,\n DEL_YN: Util.boolToFlag(this.deleted),\n MDFID_DT: this.modified,\n CRTD_DT: this.created\n })\n }", "title": "" }, { "docid": "42435eeb71523ff29f67f2f8c3d2e04b", "score": "0.53763056", "text": "function buildTable(data) {\n let tbody = d3.select(\"tbody\");\n tbody.html(\"\");\n\n data.forEach(row => {\n let tr = tbody.append(\"tr\");\n\n Object.values(row).forEach(cell => {\n let cl = tr.append(\"td\");\n cl.text(cell);\n })\n });\n}", "title": "" }, { "docid": "c36969d38a1c4baf7a1a247325913654", "score": "0.53752655", "text": "function to_table( data_array ) {\n\t\tvar html = '<table>';\n\n\t\tfor ( var row in data_array ) {\n\t\t\thtml += '<tr>';\n\n\t\t\tfor ( var cell in data_array[row] ) {\n\t\t\t\thtml += '<td>' + data_array[row][cell] + '</td>';\n\t\t\t}\n\n\t\t\thtml += '</tr>';\n\t\t}\n\n\t\treturn html + '</table>';\n\t}", "title": "" }, { "docid": "d1fbce08f465e06b9f1645d7f3cdc291", "score": "0.53750604", "text": "transposeColumnDefaults(){\n for(var i=0, len = this.options.columns.length; i < len; i++) {\n var column = this.options.columns[i];\n column.$id = ObjectId();\n\n angular.forEach(ColumnDefaults, (v,k) => {\n if(!column.hasOwnProperty(k)){\n column[k] = v;\n }\n });\n\n if(column.name && !column.prop){\n column.prop = CamelCase(column.name);\n }\n\n this.options.columns[i] = column;\n }\n }", "title": "" }, { "docid": "e69ee542d6e1079e28233e204d8618ed", "score": "0.53727084", "text": "function buildTable(data){\ntbody.html(\"\");\n \n // Populate data \n data.forEach((ufosighting) => {\n var row = tbody.append(\"tr\");\n console.log(row);\n Object.entries(ufosighting).forEach(([key, value]) => {\n var cell = tbody.append(\"td\");\n cell.text(value);\n \n });\n });\n}", "title": "" } ]
0dab9c84ee1fbfbbeba32472c32f71e8
TODO(b/29183165): This is used to get a unique string from a query to, for example, use as a dictionary key, but the implementation is subject to collisions. Make it collisionfree.
[ { "docid": "1a4257ea86e2eb5ec6cc615ab0d3cb9d", "score": "0.0", "text": "function Hn(t) {\n return lt(zn(t)) + \"|lt:\" + t.an;\n}", "title": "" } ]
[ { "docid": "e81fe1e26d7084327b91da96457f8616", "score": "0.6493811", "text": "unique( str ) {\n str = String( str || '' ).replace( /[\\r\\n\\t\\s]+/g, ' ' ).trim();\n let hash = 5381, i = str.length;\n while ( --i ) hash = ( hash * 33 ) ^ str.charCodeAt( i );\n return 'unq_' + ( hash >>> 0 );\n }", "title": "" }, { "docid": "856366ae580fb543da3b8674b2e9f673", "score": "0.6476711", "text": "function uniqueString() {\n return Math.floor(Math.random() * 0x0deadbeef);\n}", "title": "" }, { "docid": "31d70a958cff0472123e0adce67e6087", "score": "0.6211186", "text": "static uniqueId() {\n var input = this.now_timestamp();\n var hash = \"\",\n alphabet = \"0123456789abcdefghijklmnopqrstuvwxyz\".toLocaleUpperCase(),\n alphabetLength = alphabet.length;\n do {\n hash = alphabet[input % alphabetLength] + hash;\n input = parseInt(input / alphabetLength, 10);\n } while (input);\n return hash + alphabet.charAt(Math.floor(Math.random() * alphabet.length));\n }", "title": "" }, { "docid": "31d70a958cff0472123e0adce67e6087", "score": "0.6211186", "text": "static uniqueId() {\n var input = this.now_timestamp();\n var hash = \"\",\n alphabet = \"0123456789abcdefghijklmnopqrstuvwxyz\".toLocaleUpperCase(),\n alphabetLength = alphabet.length;\n do {\n hash = alphabet[input % alphabetLength] + hash;\n input = parseInt(input / alphabetLength, 10);\n } while (input);\n return hash + alphabet.charAt(Math.floor(Math.random() * alphabet.length));\n }", "title": "" }, { "docid": "30f4dbd72164bb7215807155bc02d6ec", "score": "0.6048138", "text": "function getUniqueIdentifierStr() {\n return getIncrementalInteger() + Math.random().toString(16).substr(2);\n}", "title": "" }, { "docid": "96401c3ae0ba41029f9b4b2cab557cdc", "score": "0.59871876", "text": "function getUniqId() {\n let uiqId = encode(getRandomInt(9999, 999999) + randomByte().toString())\n return uiqId;\n}", "title": "" }, { "docid": "2b2cc845c139f7ce3601486a6ca45d4d", "score": "0.59423226", "text": "function createString() {\n var hash;\n var firstWord = randomWord();\n var secondWord = randomWord();\n var number = Math.floor(Math.random()*999)+1;\n\n hash = firstWord + number + secondWord;\n return hash.toString();\n}", "title": "" }, { "docid": "998848cd8a3bb7c90526632cbe1d3afa", "score": "0.59116936", "text": "function getHash(query) {\n try {\n var hashValue = generateHash(JSON.stringify(query)),\n keyArray = [];\n keyArray.push(query.content_type_uid);\n keyArray.push(query.locale);\n if (query.entry_uid) keyArray.push(query.entry_uid);\n keyArray.push(hashValue);\n return keyArray.join('.');\n } catch (e) {}\n}", "title": "" }, { "docid": "6c67d0e30fb1841fa78b3f8280379c84", "score": "0.5862073", "text": "getUniqueId(){\n var uniqid = require('uniqid');\n return uniqid.time('QL');\n }", "title": "" }, { "docid": "098f3f1eefe4c548a9a8b0a67589204c", "score": "0.58236593", "text": "toKey(query) {\n var self = this;\n query = self.normalizeQuery(query);\n if (!query) {\n throw \"Invalid query!\";\n }\n if (typeof query == \"string\") {\n return query;\n } else {\n return new URLSearchParams(query).toString();\n }\n }", "title": "" }, { "docid": "66a777941b92282b84cca4c62ffec017", "score": "0.5746961", "text": "function createUniqeId()\n{\n let s4 = () => {\n return Math.floor((1 + Math.random()) * 0x10000)\n .toString(16)\n .substring(1);\n }\n //return id of format 'aaaaaaaa'-'aaaa'-'aaaa'-'aaaa'-'aaaaaaaaaaaa'\n return s4() + s4() + '-' + s4() + '-' + s4() + '-' + s4() + '-' + s4() + s4() + s4();\n}", "title": "" }, { "docid": "e5b9a3c05d0e9c8af3bb7eec3713f22f", "score": "0.5720555", "text": "function _toString(key) {\n\t\t\t\t\t\t\treturn \"\" + key;\n\t\t\t\t\t\t}", "title": "" }, { "docid": "8f3596b5e40fd9a751a33506865ef14d", "score": "0.5629171", "text": "function getRealId(input) {\n data = input.id.charAt(0).toUpperCase() + input.id.slice(1,8).toLowerCase();\n return data;\n}", "title": "" }, { "docid": "2f10fef80a1bd2117d499a37f29e3025", "score": "0.5618679", "text": "function genUniqueParam(parameter)\n{\n return parameter+'unique_id='+genUniqueId();\n}", "title": "" }, { "docid": "2f10fef80a1bd2117d499a37f29e3025", "score": "0.5618679", "text": "function genUniqueParam(parameter)\n{\n return parameter+'unique_id='+genUniqueId();\n}", "title": "" }, { "docid": "3ef3588ea1b6472d316f36218348e89b", "score": "0.55668384", "text": "function uniqueId () {\n // desired length of Id\n var idStrLen = 32;\n // always start with a letter -- base 36 makes for a nice shortcut\n var idStr = (Math.floor((Math.random() * 25)) + 10).toString(36) + \"_\";\n // add a timestamp in milliseconds (base 36 again) as the base\n idStr += (new Date()).getTime().toString(36) + \"_\";\n // similar to above, complete the Id using random, alphanumeric characters\n do {\n idStr += (Math.floor((Math.random() * 35))).toString(36);\n } while (idStr.length < idStrLen);\n\n return (idStr);\n}", "title": "" }, { "docid": "6d6f7e0a0051867868094742db321946", "score": "0.55252427", "text": "uniqueId() {\n if (!this.hasOwnProperty(\"uniqueIdStr\")) {\n // TODO: should this be global?\n this.constructor.objectCount = (this.constructor.objectCount || 0) + 1;\n this.uniqueIdStr = this.constructor.objectCount + \"R\" + Math.random().toString(36).substr(2);\n }\n return this.uniqueIdStr;\n }", "title": "" }, { "docid": "f4feea36ee9795aa2528547f473bc807", "score": "0.5523911", "text": "idString() {\n return ( Date.now().toString( 36 ) + Math.random().toString( 36 ).substr( 2, 5 ) ).toUpperCase();\n }", "title": "" }, { "docid": "a4613fa6479d5dbcd1ab62b96c54082b", "score": "0.55060965", "text": "_deriveCacheKey(cacheKeySpec, normTab) {\n if (!cacheKeySpec) {\n return null;\n }\n\n const keyParts = cacheKeySpec.map((selector) => {\n return selectn(selector, normTab);\n });\n return keyParts.join('');\n }", "title": "" }, { "docid": "0a6ab6e9ee97c0d587d5df05b42af612", "score": "0.5496138", "text": "static async _generateUniqueRoomKey() {\n let roomKey = null;\n let isUnique = false;\n while (!isUnique) {\n roomKey = Math.floor(1000 + Math.random() * 9000);\n let keyExists;\n try {\n keyExists = await GameDAO.getGame(roomKey);\n } catch (err) {\n throw err;\n }\n\n if (!keyExists) {\n isUnique = true;\n }\n }\n return roomKey;\n }", "title": "" }, { "docid": "ffaf20261580cc53517747b9b7f0d118", "score": "0.5490209", "text": "toStringKey() {\n return JSON.stringify({\n query: this.query.build(),\n changes: this.changes,\n });\n }", "title": "" }, { "docid": "8951ba7fb01b5cfb82c0ddf4d16c8e9e", "score": "0.5485595", "text": "function uniqueId(prefix) {\n const id = ++idCounter;\n return prefix ? String(prefix) + id : id;\n}", "title": "" }, { "docid": "4b2a60a7a5365c7c4dd4e2209714f84a", "score": "0.54840887", "text": "static getUniqueCode()\n {\n return this.getCollectionInstance().getNameNormalized();\n }", "title": "" }, { "docid": "92e47469bebbb8059e05e1785921043a", "score": "0.5483754", "text": "function getKey(str) {\n return str.split(\"\").reverse().join(\"\");\n}", "title": "" }, { "docid": "d3cb92a6ab91a2c1d0d1039e2b515c8b", "score": "0.54736704", "text": "function generateInternalStringId(crypto) {\n return util.makeUuidV4(crypto) + internalStringIdMarker;\n }", "title": "" }, { "docid": "6d9f8a2ec3bac78c853d5781da33dbba", "score": "0.5467979", "text": "function uniqueId () {\n let readableId = greg.sentence().split(' ').join('-');\n return db.select('id').from('farm').where({slug: readableId}).then((results) => {\n if (results.length) {\n return uniqueId();\n } else {\n return Promise.resolve(readableId);\n }\n });\n }", "title": "" }, { "docid": "cb0d4081489f5b2bc1d1803519362782", "score": "0.5442308", "text": "function getKey() {\n return `${new Date().getTime()}-${Math.random()}`;\n}", "title": "" }, { "docid": "cfd479a673c76da9e33b42a97d66305d", "score": "0.5425928", "text": "function unique_id() {\n return '_' + Math.random().toString(36).substr(2, 9);\n}", "title": "" }, { "docid": "3b7bcf4a39366a605ca8ff264ce6ec04", "score": "0.5418343", "text": "static guid() {\n function s4() {\n return Math.floor((1 + Math.random()) * 0x10000)\n .toString(16)\n .substring(1);\n }\n let value = s4() + s4() + '-' + s4() + '-' + s4() + '-' + s4() + '-' + s4() + s4();\n return value.toUpperCase();\n }", "title": "" }, { "docid": "4d193ba8141cd99b6436f53da211b22c", "score": "0.5414244", "text": "function generateUniqueCode(){\n let code = crypto.randomBytes(2).toString('hex');\n while(codeToHost.has(code)){\n code = crypto.randomBytes(2).toString('hex');\n }\n\treturn code.toUpperCase();\n}", "title": "" }, { "docid": "e19ebb2a706fcbc91962059fe92ad659", "score": "0.5409443", "text": "function guid() {\n return (S4() + S4() + S4() + S4() + S4() + S4() + S4() + S4());\n}", "title": "" }, { "docid": "e19ebb2a706fcbc91962059fe92ad659", "score": "0.5409443", "text": "function guid() {\n return (S4() + S4() + S4() + S4() + S4() + S4() + S4() + S4());\n}", "title": "" }, { "docid": "b782f2370585f8f8d79b65b6c06435de", "score": "0.540763", "text": "function uniqueToken() {\r\n var s4 = function () {\r\n return Math.floor(Math.random() * 0x10000).toString(16);\r\n };\r\n return s4() + s4() + \"-\" + s4() + \"-\" + s4() + \"-\" + s4() + \"-\" + s4() + s4() + s4();\r\n}", "title": "" }, { "docid": "14589a27980056dbaffb0b553e9a79a1", "score": "0.5406016", "text": "function getKey(letter){\n let keyString = id.toString + letter;\n }", "title": "" }, { "docid": "234ebd424a42fd834e039ee4ed07c44e", "score": "0.5405815", "text": "function uniqueId(prefix) {\n idCounter = idCounter + 1;\n var id = idCounter + '';\n return prefix ? prefix + id : id;\n }", "title": "" }, { "docid": "b491f930bd83b74f35f3afd50ee05714", "score": "0.5401639", "text": "function encodeQueryKey(text) {\r\n return encodeQueryValue(text).replace(EQUAL_RE, '%3D');\r\n}", "title": "" }, { "docid": "02a490f2e7dd7011151cb6eb2f37ba74", "score": "0.5392786", "text": "static randomId(input) {\n\t\tlet length;\n\n\t\tif (input) {\n\t\t\tlength = input;\n\t\t} else {\n\t\t\tlength = 10;\n\t\t}\n\n\t\tlet text = PCString.randomChar('abcdefghijklmnopqrstuvwxyz');\n\n\t\tfor (let i = 0; i < length - 1; i++) {\n\t\t\ttext += PCString.randomChar('abcdefghijklmnopqrstuvwxyz0123456789');\n\t\t}\n\n\t\treturn text;\n\t}", "title": "" }, { "docid": "1ea36fb2591fa1cdca55e65249250a6d", "score": "0.53908104", "text": "uniqueName(prefix){return`${prefix}${this.nextNameIndex++}`;}", "title": "" }, { "docid": "9a5775f920dddc2c1bd61422ed6e7da2", "score": "0.5390471", "text": "static RandomString() {\n\t\treturn Math.random().toString(36).substring(6);\n\t}", "title": "" }, { "docid": "9b149b2c61ed0d74483a0f31c418ef06", "score": "0.5388868", "text": "function encodeQueryKey(text) {\n return encodeQueryValue(text).replace(EQUAL_RE, '%3D');\n}", "title": "" }, { "docid": "83e1103c9eb99dce56806f87f5021f69", "score": "0.53848445", "text": "uniqueId(baseName='id')\n {\n const ids = new Set(this.ids);\n let i=0, newId=baseName;\n while (ids.has(newId))\n {\n newId = `${baseName}${++i}`;\n }\n return newId;\n }", "title": "" }, { "docid": "8262e539fff1b6606f06680ef0b443e0", "score": "0.53843635", "text": "function generateUid() {\n const LENGTH = 30\n var result = '';\n\n const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n\n var charactersLength = characters.length;\n for (var i = 0; i < LENGTH; i++) {\n result += characters.charAt(Math.floor(Math.random() *\n charactersLength));\n }\n\n return result;\n}", "title": "" }, { "docid": "b96e9750de6a8b7fe9e9b26b32970ebc", "score": "0.53814423", "text": "function unique_char(str) {\n\tvar uniql = \"\";\n\tfor (var x = 0; x < str.length; x++) {\n\t\tvar char = str.charAt(x);\n\t\tif ((/[a-zA-Z]/).test(char) == false) {\n\t\t\tcontinue;\n\t\t}\n\t\tif (uniql.indexOf(char) == -1) {\n\t\t\tuniql += str[x];\n\t\t}\n\t}\n\treturn uniql.length;\n}", "title": "" }, { "docid": "a5c2207fc0d2d1d35baea0499928eebb", "score": "0.53708225", "text": "stringID(state, { userID }) {\n return userID ? `(${userID})` : \"\";\n }", "title": "" }, { "docid": "42a27906d198bf5102d26e5fce27701e", "score": "0.53685904", "text": "function getQuestionKey(intQuestion) {\n\treturn \"q\" + (intQuestion);\n}", "title": "" }, { "docid": "f296db30b5c835d620162e12c643765a", "score": "0.536366", "text": "function makeid() {\n var text = \"\";\n var possible = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789?\";\n for (var i = 0; i < 50; i++)\n text += possible.charAt(Math.floor(Math.random() * possible.length));\n return text;\n }", "title": "" }, { "docid": "bb39371906fdee6201b4eb60e60f8455", "score": "0.5360795", "text": "function uniquieId(){\n\tvar date = new Date();\n\tvar components = [\n\t date.getYear(),\n\t date.getMonth(),\n\t date.getDate(),\n\t date.getHours(),\n\t date.getMinutes(),\n\t date.getSeconds(),\n\t date.getMilliseconds()\n\t];\n\n\treturn components.join(\"\");\n}", "title": "" }, { "docid": "c45f5a3c2fbb38db409bf9920fcc89f1", "score": "0.53568923", "text": "function guid() { \n return (S4()+S4()+\"\"+S4()+\"\"+S4()+\"\"+S4()+\"\"+S4()+S4()+S4()); \n }", "title": "" }, { "docid": "1f24aae6c909275500f2f89012be2939", "score": "0.53515893", "text": "function uniqueString(str) {\n let hash = {};\n for (let i = 0; i < str.length; i++) {\n char = str[i];\n if (hash[char]) {\n console.log(\"found\");\n return;\n } else {\n hash[char] = true;\n }\n }\n console.log(hash);\n}", "title": "" }, { "docid": "9383352e6e2af1c14a0f914a9e07aa18", "score": "0.53514844", "text": "generateRandom(){let tmpUUID='';for(let i=0;i<this._UUIDLength;i++){tmpUUID+=this._UUIDRandomDictionary.charAt(Math.floor(Math.random()*(this._UUIDRandomDictionary.length-1)));}return tmpUUID;}", "title": "" }, { "docid": "22b4109bafc4b1dbf9e57b975e4d0c06", "score": "0.5345092", "text": "function generateRandomString() {\n let id = \"\";\n let possible = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n for (let i = 0; i < 6; i++)\n id += possible.charAt(Math.floor(Math.random() * possible.length));\n return id;\n}", "title": "" }, { "docid": "dc9a13ce088fea76b0b73dbe3d544c09", "score": "0.53417516", "text": "function unique() { return'x'+ ++NOW+''+(+new Date) }", "title": "" }, { "docid": "9a561e300c4a8cace3110af668e4677b", "score": "0.53416914", "text": "function generate() {\n\n var str = '';\n\n var seconds = Math.round((Date.now() - REDUCE_TIME) * 0.01);\n\n if (seconds == previousSeconds) {\n counter++;\n } else {\n counter = 0;\n previousSeconds = seconds;\n }\n\n str = str + encode(alphabet.lookup, version);\n str = str + encode(alphabet.lookup, clusterWorkerId);\n if (counter > 0) {\n str = str + encode(alphabet.lookup, counter);\n }\n str = str + encode(alphabet.lookup, seconds);\n\n return str;\n}", "title": "" }, { "docid": "12a78c20a7eb483a9baadb2a90ee8be7", "score": "0.5341094", "text": "function rndString() {\n // The set of characters from which the random name will be derived.\n var alphas = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\";\n // A recursive helper to progressively append n chars onto s.\n function helper(n,s) {\n if (n==0)\n return s;\n return helper(n-1,s + alphas.charAt(rndInt(alphas.length)));\n }\n var name = helper(nameLength,'');\n // Here we ensure the name just constructed is unique within the tree,\n // and if not we try again recursively.\n if (allNames.indexOf(name)>=0)\n return rndString();\n // Ok, unique, so record the name.\n allNames.push(name);\n return name;\n }", "title": "" }, { "docid": "251ac35cf7809bbc0dca0843ef0a49fb", "score": "0.53343254", "text": "function generate() {\n\n var str = '';\n\n var seconds = Math.floor((Date.now() - REDUCE_TIME) * 0.001);\n\n if (seconds === previousSeconds) {\n counter++;\n } else {\n counter = 0;\n previousSeconds = seconds;\n }\n\n str = str + encode(alphabet.lookup, version);\n str = str + encode(alphabet.lookup, clusterWorkerId);\n if (counter > 0) {\n str = str + encode(alphabet.lookup, counter);\n }\n str = str + encode(alphabet.lookup, seconds);\n\n return str;\n}", "title": "" }, { "docid": "805852de05477d1257bd565cea2aad6f", "score": "0.53277594", "text": "function generateRandomString() {\n return Math.random().toString(36).split('').filter((value, index, self) => self.indexOf(value) === index).join('').substr(2, 6);\n}", "title": "" }, { "docid": "cdf644dd4e3d9fe2c4e4bf3a68f927e7", "score": "0.53263825", "text": "function uniqueId() {\n return Date.now().toString();\n}", "title": "" }, { "docid": "9c5579873f5eadb2635db6d527ad3540", "score": "0.5315482", "text": "function guid(/** if input is supplied, output is deterministic. */ input) {\n return _aguid(input);\n}", "title": "" }, { "docid": "c52ab0d97343a031ab93d0d09a8e7177", "score": "0.5308929", "text": "function makeid() {\n\t\tvar text = '';\n\t\tvar possible =\n\t\t\t'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n\n\t\tfor (var i = 0; i < 5; i++)\n\t\t\ttext += possible.charAt(\n\t\t\t\tMath.floor(Math.random() * possible.length),\n\t\t\t);\n\n\t\treturn text;\n\t}", "title": "" }, { "docid": "631aa99edb864a7475d23f48e171ce52", "score": "0.5301337", "text": "function createID()\r\n\t{\r\n\t\t//Base the to-be-returned String on the milllisecond value of the current time instant\r\n\t\tvar idStr = new Date().getTime() + \"_\";\r\n\t\t\r\n\t\tvar randomCharCount = 4;\r\n\t\t\r\n\t\t//Append to idStr the number of random characters denoted by randomCharCount \r\n\t\tfor(var i = 0; i < randomCharCount; i++)\r\n\t\t{\r\n\t\t\tvar curRandomNum = Math.floor((Math.random() * 26)) + 65;\r\n\t\t\tidStr += String.fromCharCode(curRandomNum);\r\n\t\t}\r\n\t\t/////\r\n\r\n\t\treturn idStr;\r\n\t}", "title": "" }, { "docid": "5616b117365d08db866c0ecb18e09f10", "score": "0.52865607", "text": "function stringInterner(){// eslint-disable-line no-unused-vars\nvar strings=[];\nvar ids={};\nreturn{\nintern:function internString(s){\nvar find=ids[s];\nif(find===undefined){\nvar id=strings.length;\nids[s]=id;\nstrings.push(s);\nreturn id;\n}else{\nreturn find;\n}\n},\nget:function getString(id){\nreturn strings[id];\n}};\n\n}", "title": "" }, { "docid": "0bffbd69b16d97ec5f993b57bf1644b2", "score": "0.5285179", "text": "function makeid() {\n let text = '';\n const possible = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\";\n for (let i = 0; i < 5; i += 1) text += possible.charAt(Math.floor(Math.random() * possible.length));\n return text;\n }", "title": "" }, { "docid": "84965500fa0580ee3d5d335a429446d6", "score": "0.5278489", "text": "function i(){return null!=this._id?String(this._id):null}", "title": "" }, { "docid": "84965500fa0580ee3d5d335a429446d6", "score": "0.5278489", "text": "function i(){return null!=this._id?String(this._id):null}", "title": "" }, { "docid": "84965500fa0580ee3d5d335a429446d6", "score": "0.5278489", "text": "function i(){return null!=this._id?String(this._id):null}", "title": "" }, { "docid": "bb76aa32c146721839fd855e94899f0b", "score": "0.527686", "text": "updateQuery() {\n const { query } = this.state;\n const updatedCharCode = query.charCodeAt() + 1;\n return String.fromCharCode(updatedCharCode);\n }", "title": "" }, { "docid": "608adea37f37239aa1561f438352ee0d", "score": "0.52752095", "text": "function generate() {\n\n\t var str = '';\n\n\t var seconds = Math.floor((Date.now() - REDUCE_TIME) * 0.001);\n\n\t if (seconds === previousSeconds) {\n\t counter++;\n\t } else {\n\t counter = 0;\n\t previousSeconds = seconds;\n\t }\n\n\t str = str + encode(alphabet.lookup, version);\n\t str = str + encode(alphabet.lookup, clusterWorkerId);\n\t if (counter > 0) {\n\t str = str + encode(alphabet.lookup, counter);\n\t }\n\t str = str + encode(alphabet.lookup, seconds);\n\n\t return str;\n\t}", "title": "" }, { "docid": "8a97291695e25e6493f41119d2d0a951", "score": "0.5275177", "text": "static getRandomId()\n\t{\t\t\n\t\tlet result = '';\n\t\tlet characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_.:~*!?';\n\t\tlet charactersLength = characters.length;\n\t\tfor(let i = 0; i < 40; i++ )\n\t\t{\n\t\t\tresult += characters.charAt(Math.floor(Math.random() * charactersLength));\n\t\t}\n\t\treturn result;\n\t}", "title": "" }, { "docid": "735d8ac9cea02424d4a961bf6d0b659f", "score": "0.5275048", "text": "function makeID(){\r\n var result = '';\r\n var characters =\r\n 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\r\n var charactersLength = characters.length;\r\n for ( var i = 0; i < 5; i++ ) {\r\n result += characters.charAt(Math.floor(Math.random() *\r\n charactersLength));\r\n }\r\n return result;\r\n}", "title": "" }, { "docid": "0d5a3137d0beae46bd8c1a6fbd251da0", "score": "0.52710897", "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": "2fe1ced4b6d935b935d3abe0fb1ad7a1", "score": "0.52679294", "text": "function syncTreeMakeQueryKey_(query){return query._path.toString()+'$'+query._queryIdentifier;}", "title": "" }, { "docid": "e677621d819fe014c29f1440130c7d30", "score": "0.52615863", "text": "function unique_id() {\n return (Math.random() + Date.now()).toString().replace('.', '');\n}", "title": "" }, { "docid": "f25bbbc144d7868025f9956316a75343", "score": "0.52612", "text": "function uniqId() {\n\tvar result = Math.round(messageId + (Math.random() * maxRandomIdGenerator));\n return result;\n}", "title": "" }, { "docid": "0542f8506a01cc7189d182a6f2d2e8cf", "score": "0.5260339", "text": "function guid() {\n return (S4() + S4() + \"-\" + S4() + \"-\" + S4() + \"-\" + S4() + \"-\" + S4() + S4() + S4());\n}", "title": "" }, { "docid": "d161c225da5f2c4099855091e40772d4", "score": "0.5254589", "text": "function makeKey() {\n var ret = \"\";\n while (ret.length < keySz) \n ret += hex[Math.floor(Math.random()*15)];\n return ret;\n}", "title": "" }, { "docid": "6c812777f062d614a1aa84871f4ba475", "score": "0.5251157", "text": "function generate() {\n\t\n\t var str = '';\n\t\n\t var seconds = Math.floor((Date.now() - REDUCE_TIME) * 0.001);\n\t\n\t if (seconds === previousSeconds) {\n\t counter++;\n\t } else {\n\t counter = 0;\n\t previousSeconds = seconds;\n\t }\n\t\n\t str = str + encode(alphabet.lookup, version);\n\t str = str + encode(alphabet.lookup, clusterWorkerId);\n\t if (counter > 0) {\n\t str = str + encode(alphabet.lookup, counter);\n\t }\n\t str = str + encode(alphabet.lookup, seconds);\n\t\n\t return str;\n\t}", "title": "" }, { "docid": "7a5a24f4bf2a4d931906bad0e76b2175", "score": "0.5250216", "text": "function guid(prefix)\n {\n \treturn (prefix || '') + Math.round(Math.random() * 1000000).toString();\n }", "title": "" }, { "docid": "089f39f242c163cdca9ffd75c9efda2e", "score": "0.52486485", "text": "function _id() {\n var newId = ('0000' + (Math.random() * Math.pow(36, 4) << 0).toString(36)).slice(-4); // append a 'a' because neo gets mad\n\n newId = \"a\".concat(newId); // ensure not already used\n\n if (!cache[newId]) {\n cache[newId] = true;\n return newId;\n }\n\n return _id();\n }", "title": "" }, { "docid": "6081d0a1501a67d521772896b3d0ab76", "score": "0.5245821", "text": "function generateUniqueCode(callback) {\n var tickCode = getRandomString();\n db[TICKET_DB].find({unique_id: tickCode}, function (err, docs) {\n if (err) return;\n if (docs.length == 0)\n callback(tickCode);\n else\n generateUniqueCode(callback);\n })\n}", "title": "" }, { "docid": "2a0198eb07ab8cae7e7485e010ac29b8", "score": "0.5244366", "text": "uniqueName(prefix) { return `${prefix}${this.nextNameIndex++}`; }", "title": "" }, { "docid": "2a0198eb07ab8cae7e7485e010ac29b8", "score": "0.5244366", "text": "uniqueName(prefix) { return `${prefix}${this.nextNameIndex++}`; }", "title": "" }, { "docid": "2a0198eb07ab8cae7e7485e010ac29b8", "score": "0.5244366", "text": "uniqueName(prefix) { return `${prefix}${this.nextNameIndex++}`; }", "title": "" }, { "docid": "3ddbb72f1019927d4e5c6ff1caa6df01", "score": "0.5244254", "text": "function getKey( obj ) {\n if( obj ) {\n return obj.hash();\n } else {\n return '';\n }\n }", "title": "" }, { "docid": "c347de05a13c9afa8a4fdab993c39579", "score": "0.5243108", "text": "function guid() { \n return (S4()+S4()+\"-\"+S4()+\"-\"+S4()+\"-\"+S4()+\"-\"+S4()+S4()+S4()); \n }", "title": "" }, { "docid": "3b18f86ae8c011906ad5100387d5b82d", "score": "0.5242228", "text": "function strForQuery(value) {\n return value != null ? value : \"\";\n}", "title": "" }, { "docid": "c1553214b0870d2a1d5d07c8379ad5ff", "score": "0.5241944", "text": "function guid() {\n return (S4() + S4() + \"-\" + S4() + \"-\" + S4() + \"-\" + S4() + \"-\" + S4() + S4() + S4());\n}", "title": "" }, { "docid": "4397e34efe45a0f818fd6e2c5a0b193c", "score": "0.5233877", "text": "function _getRedisKey(geocode, query, callback) {\n callback(null, config.redisKeyBeginning + '_' + geocode.country_code + '_' + _encode(geocode.state) + '_' + _encode(query));\n}", "title": "" }, { "docid": "52eb37b6795e49def8f23d513663feff", "score": "0.5232541", "text": "function shortenUrl(){\n const nanoid = require('nanoid');\n const urlID = nanoid.customAlphabet(alphabet,6);\n return urlID();\n}", "title": "" }, { "docid": "e07fefc2494be9a0febc411189c884f5", "score": "0.52312523", "text": "function guid() {\n return (S4()+S4()+\"-\"+S4()+\"-\"+S4()+\"-\"+S4()+\"-\"+S4()+S4()+S4());\n}", "title": "" }, { "docid": "e07fefc2494be9a0febc411189c884f5", "score": "0.52312523", "text": "function guid() {\n return (S4()+S4()+\"-\"+S4()+\"-\"+S4()+\"-\"+S4()+\"-\"+S4()+S4()+S4());\n}", "title": "" }, { "docid": "e07fefc2494be9a0febc411189c884f5", "score": "0.52312523", "text": "function guid() {\n return (S4()+S4()+\"-\"+S4()+\"-\"+S4()+\"-\"+S4()+\"-\"+S4()+S4()+S4());\n}", "title": "" }, { "docid": "e07fefc2494be9a0febc411189c884f5", "score": "0.52312523", "text": "function guid() {\n return (S4()+S4()+\"-\"+S4()+\"-\"+S4()+\"-\"+S4()+\"-\"+S4()+S4()+S4());\n}", "title": "" }, { "docid": "e07fefc2494be9a0febc411189c884f5", "score": "0.52312523", "text": "function guid() {\n return (S4()+S4()+\"-\"+S4()+\"-\"+S4()+\"-\"+S4()+\"-\"+S4()+S4()+S4());\n}", "title": "" }, { "docid": "e07fefc2494be9a0febc411189c884f5", "score": "0.52312523", "text": "function guid() {\n return (S4()+S4()+\"-\"+S4()+\"-\"+S4()+\"-\"+S4()+\"-\"+S4()+S4()+S4());\n}", "title": "" }, { "docid": "a287a6e2681a583c0dde2a17bbb2b88c", "score": "0.5221443", "text": "function getUniqId(q, a) {\n var qid = (typeof q === 'object' ? q.id : q);\n if(qid === undefined || qid === null) {\n throwWithAlert('invalid question id', \"question=\" + q + \" qid=\" + qid);\n }\n var id = \"blockQuest\" + qid;\n\n if(!window.currentHitme.nagAboutSkippedQuestions) id += 'repeat';\n\n if(a) {\n id += \"_answer\" + (typeof a === 'object' ? a.id : a);\n }\n return id;\n}", "title": "" }, { "docid": "a6e9695dfacc3a8cf146023ecf2c2ed8", "score": "0.52188796", "text": "function getAnIdent() {\n return Date.now().toString() + Math.random().toString().slice(2);\n }", "title": "" }, { "docid": "4a20ec5e6ec9c19fcab22ea824c5ad25", "score": "0.5207533", "text": "function makeid() {\n var text = \"\";\n var possible = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n for (var i = 0; i < 5; i++)\n text += possible.charAt(Math.floor(Math.random() * possible.length));\n return text;\n }", "title": "" }, { "docid": "ff7eeb659b539dd866734d4d4d074912", "score": "0.52016354", "text": "function guid() {\n return (S4()+S4()+\"-\"+S4()+\"-\"+S4()+\"-\"+S4()+\"-\"+S4()+S4()+S4());\n }", "title": "" }, { "docid": "3d2b9822971939527ca4a7dc5a047450", "score": "0.5197042", "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": "2c4bb65b7ff191c97b43fe4f46dcb299", "score": "0.51937324", "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": "cb08a976c1171b4321969044c8fa9751", "score": "0.5193517", "text": "function getKeyFromID(id){return'.'+id;}", "title": "" } ]
937949b94473007b2296733e96c65428
AMDcompatible require To copy RequireJS, set window.require = window.requirejs = loader.amdRequire
[ { "docid": "4a5b6b8045b11393ff23b5e0aaf9add6", "score": "0.57050216", "text": "function require(names, callback, errback, referer) {\n // in amd, first arg can be a config object... we just ignore\n if (typeof names == 'object' && !(names instanceof Array))\n return require.apply(null, Array.prototype.splice.call(arguments, 1, arguments.length - 1));\n\n // amd require\n if (typeof names == 'string' && typeof callback == 'function')\n names = [names];\n if (names instanceof Array) {\n var dynamicRequires = [];\n for (var i = 0; i < names.length; i++)\n dynamicRequires.push(loader['import'](names[i], referer));\n Promise.all(dynamicRequires).then(function(modules) {\n if (callback)\n callback.apply(null, modules);\n }, errback);\n }\n\n // commonjs require\n else if (typeof names == 'string') {\n var defaultJSExtension = loader.defaultJSExtensions && names.substr(names.length - 3, 3) != '.js';\n var normalized = loader.decanonicalize(names, referer);\n if (defaultJSExtension && normalized.substr(normalized.length - 3, 3) == '.js')\n normalized = normalized.substr(0, normalized.length - 3);\n var module = loader.get(normalized);\n if (!module)\n throw new Error('Module not already loaded loading \"' + names + '\" as ' + normalized + (referer ? ' from \"' + referer + '\".' : '.'));\n return module.__useDefault ? module['default'] : module;\n }\n\n else\n throw new TypeError('Invalid require');\n }", "title": "" } ]
[ { "docid": "d2f498a2e59a5c804002db6d3bafb90b", "score": "0.6234029", "text": "function require(names,callback,errback,referer){ // in amd, first arg can be a config object... we just ignore\nif((typeof names==='undefined'?'undefined':_typeof(names))=='object'&&!(names instanceof Array))return require.apply(null,Array.prototype.splice.call(arguments,1,arguments.length-1)); // amd require\nif(typeof names=='string'&&typeof callback=='function')names=[names];if(names instanceof Array){var dynamicRequires=[];for(var i=0;i<names.length;i++){dynamicRequires.push(loader['import'](names[i],referer));}Promise.all(dynamicRequires).then(function(modules){if(callback)callback.apply(null,modules);},errback);} // commonjs require\nelse if(typeof names=='string'){var defaultJSExtension=loader.defaultJSExtensions&&names.substr(names.length-3,3)!='.js';var normalized=loader.decanonicalize(names,referer);if(defaultJSExtension&&normalized.substr(normalized.length-3,3)=='.js')normalized=normalized.substr(0,normalized.length-3);var module=loader.get(normalized);if(!module)throw new Error('Module not already loaded loading \"'+names+'\" from \"'+referer+'\".');return module.__useDefault?module['default']:module;}else throw new TypeError('Invalid require');}", "title": "" }, { "docid": "2d5a320517dbb8cc849f6b964b7aabf0", "score": "0.6046209", "text": "function optimizerConfig(require) {\n return require.config({\n baseUrl: \".\",\n paths: {\n \"requireLib\": \"../node_modules/requirejs/require\",\n \"css\": \"../node_modules/require-css/css\",\n \"css-builder\": \"../node_modules/require-css/css-builder\",\n \"normalize\": \"../node_modules/require-css/normalize\",\n \"async\": \"../node_modules/requirejs-plugins/src/async\",\n \"propertyParser\": \"../node_modules/requirejs-plugins/src/propertyParser\",\n \"goog\": \"../node_modules/requirejs-plugins/src/goog\",\n \"text\": \"../node_modules/requirejs-text/text\",\n \"json\": \"../node_modules/requirejs-plugins/src/json\",\n\n \"d3\": \"../bower_components/d3/d3\",\n \"c3\": \"../bower_components/c3/c3\",\n \"dagre\": \"../bower_components/dagre/index\",\n \"topojson\": \"../bower_components/topojson/topojson\",\n \"colorbrewer\": \"../bower_components/colorbrewer/colorbrewer\",\n \"d3-cloud\": \"../bower_components/d3-cloud/build/d3.layout.cloud\",\n \"font-awesome\": \"../bower_components/font-awesome/css/font-awesome\",\n \"es6-promise\": \"../bower_components/es6-promise/promise\",\n \"d3-hexbin\": \"../bower_components/d3-hexbin/index\",\n \"d3-tip\": \"../bower_components/d3-tip/index\",\n\n \"amcharts\": \"../bower_components/amcharts3/amcharts/amcharts\",\n \"amcharts.funnel\": \"../bower_components/amcharts3/amcharts/funnel\",\n \"amcharts.gauge\": \"../bower_components/amcharts3/amcharts/gauge\",\n \"amcharts.pie\": \"../bower_components/amcharts3/amcharts/pie\",\n \"amcharts.radar\": \"../bower_components/amcharts3/amcharts/radar\",\n \"amcharts.serial\": \"../bower_components/amcharts3/amcharts/serial\",\n \"amcharts.xy\": \"../bower_components/amcharts3/amcharts/xy\",\n \"amcharts.gantt\": \"../bower_components/amcharts3/amcharts/gantt\",\n \"amcharts.plugins.responsive\": \"../bower_components/amcharts3/amcharts/plugins/responsive/responsive\",\n \"amchartsImg\": \"../bower_components/amcharts3/amcharts/images/\",\n\n \"simpleheat\": \"../bower_components/simpleheat/index\",\n\n \"src\": \"../src\"\n },\n shim: {\n \"amcharts.funnel\": {\n deps: [\"amcharts\"],\n exports: \"AmCharts\",\n init: function () {\n AmCharts.isReady = true;\n }\n },\n \"amcharts.gauge\": {\n deps: [\"amcharts\"],\n exports: \"AmCharts\",\n init: function () {\n AmCharts.isReady = true;\n }\n },\n \"amcharts.pie\": {\n deps: [\"amcharts\"],\n exports: \"AmCharts\",\n init: function () {\n AmCharts.isReady = true;\n }\n },\n \"amcharts.radar\": {\n deps: [\"amcharts\"],\n exports: \"AmCharts\",\n init: function () {\n AmCharts.isReady = true;\n }\n },\n \"amcharts.serial\": {\n deps: [\"amcharts\"],\n exports: \"AmCharts\",\n init: function () {\n AmCharts.isReady = true;\n }\n },\n \"amcharts.xy\": {\n deps: [\"amcharts\"],\n exports: \"AmCharts\",\n init: function () {\n AmCharts.isReady = true;\n }\n },\n 'amcharts.gantt': {\n deps: ['amcharts', 'amcharts.serial'],\n exports: 'AmCharts',\n init: function () {\n AmCharts.isReady = true;\n }\n },\n \"simpleheat\": {\n exports: \"simpleheat\",\n init: function () {\n simpleheat.isReady = true;\n }\n }\n }\n });\n }", "title": "" }, { "docid": "b701df09662bd5f6ee5fb50650b3fd15", "score": "0.5909597", "text": "function amdLoad(name, require, callback, config) {\n\t\tvar promise = callback.resolve\n\t\t\t? callback\n\t\t\t: {\n\t\t\tresolve: callback,\n\t\t\t\treject: function(err) { throw err; }\n\t\t};\n\n\t\tchain(wire(name), promise);\n\t}", "title": "" }, { "docid": "025a197d446728d42ce4c694cf92df8a", "score": "0.58293843", "text": "function jsRequire() {\n let returnValue;\n const modules = {\n 'require': 'node_modules/requirejs/require.js',\n 'vue': 'node_modules/vue/dist/vue.min.js',\n 'vue-router': 'node_modules/vue-router/dist/vue-router.min.js',\n 'vue-i18n': 'node_modules/vue-i18n/dist/vue-i18n.js',\n 'vue-ctk-date-time-picker': 'node_modules/vue-ctk-date-time-picker/dist/vue-ctk-date-time-picker.umd.js',\n 'fontawesome-svg-core': 'node_modules/@fortawesome/fontawesome-svg-core/index.js',\n 'free-brands-svg-icons': 'node_modules/@fortawesome/free-brands-svg-icons/index.js',\n 'free-regular-svg-icons': 'node_modules/@fortawesome/free-regular-svg-icons/index.js',\n 'free-solid-svg-icons': 'node_modules/@fortawesome/free-solid-svg-icons/index.js',\n 'vue-fontawesome': 'node_modules/@fortawesome/vue-fontawesome/index.js'\n };\n\n if (isEnv('dev', config.env)) {\n modules['vue'] = 'node_modules/vue/dist/vue.js';\n modules['vue-router'] = 'node_modules/vue-router/dist/vue-router.js';\n }\n\n const moduleKeys = Object.keys(modules);\n\n for (const key of moduleKeys) {\n returnValue = gulp.src(modules[key])\n .pipe(rename({ basename: key }))\n .pipe(gulpIf(isEnv(['test', 'prod'], config.env), uglify()))\n .pipe(gulp.dest(config.publicPath + 'js/require/'));\n }\n return returnValue;\n}", "title": "" }, { "docid": "45a33d5fe247036eef9f4f0de5a8f6cb", "score": "0.58224756", "text": "function require(names, callback, errback, referer) {\n // in amd, first arg can be a config object... we just ignore\n if (typeof names === 'object' && !(names instanceof Array)) return require.apply(null, Array.prototype.splice.call(arguments, 1, arguments.length - 1)); // amd require\n\n if (typeof names === 'string' && typeof callback === 'function') names = [names];\n\n if (names instanceof Array) {\n var dynamicRequires = [];\n\n for (var i = 0; i < names.length; i++) dynamicRequires.push(loader.import(names[i], referer));\n\n Promise.all(dynamicRequires).then(function (modules) {\n if (callback) callback.apply(null, modules);\n }, errback);\n } // commonjs require\n else if (typeof names === 'string') {\n var normalized = loader.decanonicalize(names, referer);\n var module = loader.get(normalized);\n if (!module) throw new Error('Module not already loaded loading \"' + names + '\" as ' + normalized + (referer ? ' from \"' + referer + '\".' : '.'));\n return '__useDefault' in module ? module.__useDefault : module;\n } else throw new TypeError('Invalid require');\n }", "title": "" }, { "docid": "dc174281941dea14aeabf46965c32f63", "score": "0.5790267", "text": "function makeRequire(relModuleMap, enableBuildCallback, altRequire) {\n var modRequire = makeContextModuleFunc(altRequire || context.require, relModuleMap, enableBuildCallback);\n\n mixin(modRequire, {\n nameToUrl: makeContextModuleFunc(context.nameToUrl, relModuleMap),\n toUrl: makeContextModuleFunc(context.toUrl, relModuleMap),\n defined: makeContextModuleFunc(context.requireDefined, relModuleMap),\n specified: makeContextModuleFunc(context.requireSpecified, relModuleMap),\n isBrowser: req.isBrowser\n });\n return modRequire;\n }", "title": "" }, { "docid": "681d92a932afc6fe197cf4671220fd77", "score": "0.57521844", "text": "function makeRequire(dom, pathName) {\n return function (reqStr) {\n if (config.logging >= 3) { // log verbatim pull-ins from dom::pathName\n console.log('modul8: ' + dom + '::' + pathName + \" <- \" + reqStr);\n }\n\n if (!isAbsolute(reqStr)) {\n //console.log('relative resolve:', reqStr, 'from domain:', dom, 'join:', path.join(path.dirname(pathName), reqStr));\n return resolve([dom], path.join(path.dirname(pathName), reqStr));\n }\n\n var domSpecific = DomReg.test(reqStr)\n , sDomain = false;\n\n if (domSpecific) {\n sDomain = reqStr.match(DomReg)[1];\n reqStr = reqStr.split('::')[1];\n }\n\n // require from/to npm domain - sandbox and join in current path if exists\n if (dom === 'npm' || (domSpecific && sDomain === 'npm')) {\n if (builtIns.indexOf(reqStr) >= 0) {\n return resolve(['npm'], reqStr); // => can put builtIns on npm::\n }\n if (domSpecific) {\n return resolve(['npm'], config.npmTree[reqStr].main);\n }\n // else, absolute: use included hashmap tree of npm mains\n\n // find root of module referenced in pathName, by counting number of node_modules referenced\n // this ensures our startpoint, when split around /node_modules/ is an array of modules requiring each other\n var order = pathName.split('node_modules').length; //TODO: depending on whether multiple slash types can coexist, conditionally split this based on found slash type\n var root = pathName.split(slash).slice(0, Math.max(2 * (order - 2) + 1, 1)).join(slash);\n\n // server side resolver has figured out where the module resides and its main\n // use resolvers passed down npmTree to get correct require string\n var branch = root.split(slash + 'node_modules' + slash).concat(reqStr);\n //console.log(root, order, reqStr, pathName, branch);\n // use the branch array to find the keys used to traverse the npm tree, to find the key of this particular npm module's main in stash\n var position = config.npmTree[branch[0]];\n for (var i = 1; i < branch.length; i += 1) {\n position = position.deps[branch[i]];\n if (!position) {\n console.error('expected vertex: ' + branch[i] + ' missing from current npm tree branch ' + pathName); // should not happen, remove eventually\n return;\n }\n }\n return resolve(['npm'], position.main);\n }\n\n // domain specific\n if (domSpecific) {\n return resolve([sDomain], reqStr);\n }\n\n // general absolute, try arbiters\n if (arbiters.indexOf(reqStr) >= 0) {\n return resolve(['M8'], reqStr);\n }\n\n // general absolute, not an arbiter, try current domains, then the others\n return resolve([dom].concat(domains.filter(function (e) {\n return (e !== dom && e !== 'npm');\n })), reqStr);\n };\n}", "title": "" }, { "docid": "92cf750a41eb8cc8c78ef2b8e21cb7c3", "score": "0.5679697", "text": "function require(names, callback, errback, referer) {\n // in amd, first arg can be a config object... we just ignore\n if (typeof names == 'object' && !(names instanceof Array))\n return require.apply(null, Array.prototype.splice.call(arguments, 1, arguments.length - 1));\n\n // amd require\n if (typeof names == 'string' && typeof callback == 'function')\n names = [names];\n if (names instanceof Array) {\n var dynamicRequires = [];\n for (var i = 0; i < names.length; i++)\n dynamicRequires.push(loader['import'](names[i], referer));\n Promise.all(dynamicRequires).then(function(modules) {\n if (callback)\n callback.apply(null, modules);\n }, errback);\n }\n\n // commonjs require\n else if (typeof names == 'string') {\n var defaultJSExtension = loader.defaultJSExtensions && names.substr(names.length - 3, 3) != '.js';\n var normalized = loader.decanonicalize(names, referer);\n if (defaultJSExtension && normalized.substr(normalized.length - 3, 3) == '.js')\n normalized = normalized.substr(0, normalized.length - 3);\n var module = loader.get(normalized);\n if (!module)\n throw new Error('Module not already loaded loading \"' + names + '\" from \"' + referer + '\".');\n return module.__useDefault ? module['default'] : module;\n }\n\n else\n throw new TypeError('Invalid require');\n }", "title": "" }, { "docid": "16a817e01b2e4b388f143a42d4e87cc5", "score": "0.5631604", "text": "function makeRequire(viaId) {\n\n // Main synchronously executing \"require()\" function\n var require = function require(id) {\n var topId = normalizeId(resolve(id, viaId));\n return getExports(topId, viaId);\n };\n require.viaId = viaId;\n\n // Asynchronous \"require.async()\" which ensures async executation\n // (even with synchronous loaders)\n require.async = function(id) {\n var topId = normalizeId(resolve(id, viaId));\n return deepLoad(topId, viaId).then(function () {\n return require(topId);\n });\n };\n\n require.resolve = function (id) {\n return normalizeId(resolve(id, viaId));\n };\n\n require.getModule = getModuleDescriptor; // XXX deprecated, use:\n require.getModuleDescriptor = getModuleDescriptor;\n require.load = load;\n require.deepLoad = deepLoad;\n\n require.loadPackage = function (dependency, givenConfig) {\n if (givenConfig) { // explicit configuration, fresh environment\n return Require.loadPackage(dependency, givenConfig);\n } else { // inherited environment\n return config.loadPackage(dependency, config);\n }\n };\n\n require.hasPackage = function (dependency) {\n return config.hasPackage(dependency);\n };\n\n require.getPackage = function (dependency) {\n return config.getPackage(dependency);\n };\n\n require.isMainPackage = function () {\n return require.location === config.mainPackageLocation;\n };\n\n require.injectPackageDescription = function (location, description) {\n Require.injectPackageDescription(location, description, config);\n };\n\n require.injectPackageDescriptionLocation = function (location, descriptionLocation) {\n Require.injectPackageDescriptionLocation(location, descriptionLocation, config);\n };\n\n require.injectMapping = function (dependency, name) {\n dependency = normalizeDependency(dependency, config, name);\n name = name || dependency.name;\n config.mappings[name] = dependency;\n };\n\n require.injectDependency = function (name) {\n require.injectMapping({name: name}, name);\n };\n\n require.identify = identify;\n require.inject = inject;\n\n var exposedConfigs = config.exposedConfigs;\n for(var i = 0, countI = exposedConfigs.length; i < countI; i++) {\n require[exposedConfigs[i]] = config[exposedConfigs[i]];\n }\n\n require.config = config;\n\n require.read = config.read;\n\n return require;\n }", "title": "" }, { "docid": "4d3271270c9749169ddc4c95b9e44789", "score": "0.5534332", "text": "function require(names, callback, errback, referer) {\n // in amd, first arg can be a config object... we just ignore\n if (typeof names == 'object' && !(names instanceof Array))\n return require.apply(null, Array.prototype.splice.call(arguments, 1, arguments.length - 1));\n\n // amd require\n if (typeof names == 'string' && typeof callback == 'function')\n names = [names];\n if (names instanceof Array) {\n var dynamicRequires = [];\n for (var i = 0; i < names.length; i++)\n dynamicRequires.push(loader['import'](names[i], referer));\n Promise.all(dynamicRequires).then(function(modules) {\n if (callback)\n callback.apply(null, modules);\n }, errback);\n }\n\n // commonjs require\n else if (typeof names == 'string') {\n var module = loader.get(names);\n return module.__useDefault ? module['default'] : module;\n }\n\n else\n throw new TypeError('Invalid require');\n }", "title": "" }, { "docid": "1760915585ce52763712b4518ed81bf4", "score": "0.551691", "text": "function $require(name) {\r\n var $module = cache[name];\r\n if (!$module)\r\n modules[name][0].call($module = cache[name] = { exports: {} }, $require, $module, $module.exports);\r\n return $module.exports;\r\n }", "title": "" }, { "docid": "cde764bae032cc091d50cb76dacdc19d", "score": "0.5481233", "text": "function makeRequire(context, moduleName) {\n var contextName = context.contextName,\n modRequire = makeContextModuleFunc(null, contextName, moduleName);\n\n req.mixin(modRequire, {\n //>>excludeStart(\"requireExcludeModify\", pragmas.requireExcludeModify);\n modify: makeContextModuleFunc(\"modify\", contextName, moduleName),\n //>>excludeEnd(\"requireExcludeModify\");\n def: makeContextModuleFunc(\"def\", contextName, moduleName),\n get: makeContextModuleFunc(\"get\", contextName, moduleName),\n nameToUrl: makeContextModuleFunc(\"nameToUrl\", contextName, moduleName),\n toUrl: makeContextModuleFunc(\"toUrl\", contextName, moduleName),\n ready: req.ready,\n context: context,\n config: context.config,\n isBrowser: s.isBrowser\n });\n return modRequire;\n }", "title": "" }, { "docid": "00699a2340469f6e8407d3ab17362bd7", "score": "0.5466294", "text": "function $require(name) {\n var $module = cache[name];\n if (!$module)\n modules[name][0].call($module = cache[name] = { exports: {} }, $require, $module, $module.exports);\n return $module.exports;\n }", "title": "" }, { "docid": "52d46b37a0d80e4c8fcfde99956d3c94", "score": "0.5450687", "text": "function require(name) {\n //if(name.match(/^\\.\\//).length > 0) {\n //Local file\n //For now we just handle a single level of indirection, in the future we should handle multiple\n\n var realName = name.match(/([^\\\\./]*)(.js)?$/)[1];\n if (this[realName]) {\n return this[realName];\n } else if (self[realName]) {\n return this[realName];\n } else if (realName == \"underscore\") {\n //Strange stuff for underscore, not done for jQuery as that is currently only for the browser,\n //while underscore may also be used in node.js\n return this[\"_\"];\n } else {\n debugger;\n throw \"Cannot handle a require for '\" + name + \"' (as I cannot find it).\";\n }\n //} else {\n // //Nodejs file... we can't support this\n // debugger;\n // throw \"Cannot handle a require for '\" + name + \"' .\";\n //}\n}", "title": "" }, { "docid": "b7726840d2b68ae2b2702d321560ce21", "score": "0.54356146", "text": "function hijackRequire() {\n console.log(`Using Adapt modules in ${path.resolve(local_modules_path)}`);\n // keep track of any failed requires, so we only log the problem once\n const failedRequires = [];\n const __require = Module.prototype.require;\n // Hijack the standard require function\n Module.prototype.require = function(modPath) {\n if(modPath.includes('adapt-authoring') && !failedRequires.includes(modPath)) {\n const parts = modPath.split(path.sep);\n let isRoot = false;\n\n if(parts.length > 1) {\n const file = path.basename(modPath);\n let i = 0, m;\n parts.reverse().forEach(p => {\n if(p === file) {\n return i++;\n }\n if(!m) {\n if(p.search(/^adapt-authoring/) > -1) m = p;\n i++;\n }\n });\n modPath = path.join(...parts.reverse().slice(i*-1));\n if(modPath.search(`^${path.basename(process.cwd())}`) > -1) isRoot = true;\n }\n try {\n return __require.call(this, path.resolve(path.join(local_modules_path, modPath)));\n } catch(e) {\n switch(e.name) {\n case 'ReferenceError':\n case 'SyntaxError':\n case 'TypeError':\n console.trace(e);\n return process.exit(1);\n case 'Error':\n if(e.code === 'MODULE_NOT_FOUND') break;\n default:\n console.log(`cli.js => ${e.name}`);\n }\n if(isRoot) {\n try {\n return __require.call(this, path.resolve(process.cwd(), '..', modPath));\n } catch(e) {}\n }\n failedRequires.push(modPath);\n }\n }\n return __require.apply(this, arguments);\n };\n}", "title": "" }, { "docid": "e50db5a466d996215281e54096cb2d61", "score": "0.542819", "text": "function require() {\n if ( isArray( arguments[0] ) ) {\n // Key as undefined instead\n Array.prototype.unshift.call( arguments, undefined);\n }\n\n // First argument is require\n// Array.prototype.unshift.call( arguments, require );\n\n // If loading a script, then push the next call to stack so it is invoked after the script has finished\n // Will allow all define statements to be picked up and registered first.\n // If not loading any scripts then we are not waiting for anything to become defined neither in this current script\n if ( scriptLoading ) {\n stackPush(requireToBase, arguments);\n }\n else {\n requireToBase.apply(that, arguments)\n }\n }", "title": "" }, { "docid": "dd2e29959c4f4aad771c6c0940aabd9d", "score": "0.5427695", "text": "function initializeRequireJs () {\n\tconst requireModuleSupport = vscode.workspace.getConfiguration('requireModuleSupport');\n\tconst rootPath = vscode.workspace.rootPath;\n\n\t// Clean up requirejs configuration from the previously activated context.\n\t// See https://github.com/requirejs/requirejs/issues/1113 for more information.\n\tdelete requirejs.s.contexts._;\n\n\t// Handle the existing modulePath property as baseUrl for require.config()\n\t// to support simple scenarios. More complex projects should supply also\n\t// configFile in addition to baseUrl to resolve any module path.\n\trequirejs.config({ baseUrl: path.join(rootPath, requireModuleSupport.get('modulePath')) });\n\n\t// Reuse the configuration for debugging a requirejs project for editing too.\n\t// Prevent maintaining the same configuration in settings.json.\n\tconst configFile = requireModuleSupport.get('configFile');\n\n\tif (configFile) {\n\t\tconst configContent = fs.readFileSync(path.join(rootPath, configFile), 'utf-8');\n\t\tconst config = amodroConfig.find(configContent);\n\n\t\tif (config) {\n\t\t\trequirejs.config(config);\n\t\t}\n\t}\n}", "title": "" }, { "docid": "93be6bc5d189703d8b8f6add1e266368", "score": "0.5400358", "text": "function require(URL,doc) {\n if (!doc) doc = document\n var scripts = document.getElementsByTagName(\"script\")\n for (var i=0;i<scripts.length;i++)\n if (scripts[i].src == URL) return\n var head = doc.getElementsByTagName('head').item(0)\n \tvar script = doc.createElement('script')\n\tscript.src = URL\n\tscript.type = 'text/javascript'\n\t//script.defer = true\n\tvoid(head.appendChild(script))\n}", "title": "" }, { "docid": "623971d531e8844f899d2fb617387804", "score": "0.5398671", "text": "function load(name, url) {\n return $.Deferred(function(defer) {\n url = url || require.toUrl(name);\n currentlyAddingScript = name;\n var node = document.createElement('script');\n node.type = config.scriptType || 'text/javascript';\n node.charset = 'utf-8';\n node.async = true;\n\n //node.setAttribute('data-requirecontext', context.contextName);\n //node.setAttribute('data-requiremodule', name);\n\n var success = function(evt) {\n currentlyAddingScript = null;\n var node = evt.currentTarget || evt.srcElement;\n\n //Remove the listeners once here.\n removeListener(node, success, 'load', 'onreadystatechange');\n removeListener(node, defer.reject, 'error');\n defer.resolve();\n };\n \n if (node.attachEvent &&!(node.attachEvent.toString && node.attachEvent.toString().indexOf('[native code') < 0) && !isOpera) {\n// useInteractive = true;\n node.attachEvent('onreadystatechange', success);\n } else {\n node.addEventListener('load', success, false);\n node.addEventListener('error', defer.reject, false);\n }\n \n node.src = url;\n head.appendChild(node);\n }).promise();\n }", "title": "" }, { "docid": "452ce13b967013b508d3bc110d207353", "score": "0.5380817", "text": "function callback() {\n var MoJS = window.MoJS || (window.MoJS = {});\n\n MoJS.require = MoJS.MoQR = require;\n MoJS.define = define;\n\n window.require || (window.require = require);\n window.define || (window.define = define );\n }", "title": "" }, { "docid": "a4789d7a058349affc121d5d313ad582", "score": "0.5344155", "text": "function makeRequire(relativeModuleId, context, onError) {\n var require = function (arg1, arg2) {\n // require([dependencies], callback)\n if (util.isArray(arg1)) {\n if (util.isFunction(arg2)) {\n (function (deps, fn) {\n var count = deps.length,\n imports = [],\n key;\n\n function onComplete(key, xprts) {\n if (count) {\n imports[key] = xprts;\n }\n\n count -= 1;\n if (count === 0) {\n fn.apply(undefined, imports);\n }\n }\n\n function makeCompleteCallback(key) {\n return function (xprts) {\n onComplete(key, xprts);\n };\n }\n\n for (key in deps) {\n if (typeof deps[key] === \"function\") {\n continue;\n }\n\n loadModule(context, deps[key], relativeModuleId, makeCompleteCallback(key), onError);\n }\n }(arg1, arg2));\n } else {\n throw new Error(\"TypeError: Expected a callback function.\");\n }\n // require(moduleId)\n } else if (util.isString(arg1)) {\n switch (arg1) {\n case \"require\":\n return makeRequire(relativeModuleId, context, onError);\n case \"config\":\n return makeConfig.immutable(context.config);\n }\n\n if (!context.containsModuleExports(arg1)) {\n throw new Error(\"Module has not been exported into context: \" + arg1);\n } else {\n return context.getModuleExports(arg1);\n }\n } else {\n throw new Error(\"TypeError: Expected a module ID.\");\n }\n };\n require.toUrl = (function () {\n var EXTENSION_REGEXP = /\\.[a-zA-Z0-9_]+$/;\n\n return function (resource) {\n var ext, moduleId, config = context.config;\n\n if (util.isString(resource) && (EXTENSION_REGEXP).test(resource)) {\n // Retrieve and remove the extension.\n ext = resource.match(EXTENSION_REGEXP).pop();\n moduleId = resource.replace(EXTENSION_REGEXP, \"\");\n // Convert to a URL but be sure to preserve the original extension and specify no URL args.\n return toUrl(moduleId, relativeModuleId, config.baseUrl, config.paths, \"\", ext);\n }\n\n throw new Error(\"TypeError: Expected a module ID of the form 'module-id.extension'.\");\n };\n }());\n\n return require;\n }", "title": "" }, { "docid": "50356d2a11f7cbdc3603ba0dc6630611", "score": "0.5311314", "text": "function grequire(moduleName) {\n return require(moduleName);\n}", "title": "" }, { "docid": "ede9dfb0c489ae536b1b0d440b73a4af", "score": "0.52934456", "text": "function requireUnique(id) {\n var moduleCode = define.cache[id],\n exports = {},\n module = {exports: exports};\n\n if(!moduleCode) {\n throw new Error('requireUnique: module not found: \"'+id+'\"');\n }\n\n moduleCode.call(moduleCode, require, module, exports);\n return module.exports;\n}", "title": "" }, { "docid": "cd9397088b2f4600a6027fbd34bc8e8e", "score": "0.52879614", "text": "function requireDependencies() {\n bower = require(\"bower\");\n path = require(\"path\");\n async = require(\"async\");\n colors = require(\"colors\");\n rimraf = require(\"rimraf\").sync;\n validator = require('bower-json');\n BowerAssets = require(\"./lib/bower_assets\");\n AssetCopier = require(\"./lib/asset_copier\");\n LayoutsManager = require(\"./lib/layouts_manager\");\n }", "title": "" }, { "docid": "5d74bcf452b8630b8575e2eeb61355d0", "score": "0.52819884", "text": "function dynamicRequire(mod, request) {\r\n // tslint:disable-next-line: no-unsafe-any\r\n return mod.require(request);\r\n}", "title": "" }, { "docid": "5d74bcf452b8630b8575e2eeb61355d0", "score": "0.52819884", "text": "function dynamicRequire(mod, request) {\r\n // tslint:disable-next-line: no-unsafe-any\r\n return mod.require(request);\r\n}", "title": "" }, { "docid": "91df71db46d2081f4b9d5b537b14b563", "score": "0.52781945", "text": "function requireWrap() {\n throw new Error(\"require can't be called in module.js\");\n }", "title": "" }, { "docid": "91df71db46d2081f4b9d5b537b14b563", "score": "0.52781945", "text": "function requireWrap() {\n throw new Error(\"require can't be called in module.js\");\n }", "title": "" }, { "docid": "a9aa8f85f6e81b039eb6e8b1ca5a3ec3", "score": "0.52473164", "text": "onAMDInjected() {\n // override this method in the sub class\n }", "title": "" }, { "docid": "55bbe88ceeb674d906ffd0422d4b1f4a", "score": "0.52276903", "text": "function dynamicRequire(mod, request) {\n // tslint:disable-next-line: no-unsafe-any\n return mod.require(request);\n}", "title": "" }, { "docid": "55bbe88ceeb674d906ffd0422d4b1f4a", "score": "0.52276903", "text": "function dynamicRequire(mod, request) {\n // tslint:disable-next-line: no-unsafe-any\n return mod.require(request);\n}", "title": "" }, { "docid": "dd7145dd4554ef78a3bd3e29003c6274", "score": "0.52076304", "text": "function prepareRequireJsConfig(config) {\n\t\tvar reqMod = {\n\t\t\tpaths : {\n\t\t\t\t'jquery' : ['../portal-shell/js/libs/jquery/1.9.1/jquery'],\n\t\t\t\t'jquery.dataTables' : [ \"html5-common/libs/datatables/1.9.4/jquery.dataTables\" ],\n\t\t\t\t'angularjs' : ['../portal-shell/js/libs/angular/1.2.11/angular'],\n\t\t\t\t'angularResource' : ['../portal-shell/js/libs/angular/1.2.11/angular-resource'],\n\t\t\t\t'bootstrap' : [ 'html5-common/libs/bootstrap/bootstrap' ],\n\t\t\t\t'ckeditor':['html5-common/libs/ckeditor/ckeditor'],\n\t\t\t\t'portalApplication' : [ 'common/html5/portalApplication' ],\n\t\t\t\t'html5CommonMain' : [ 'html5-common/scripts/main' ],\n\t\t\t\t'sdEventBusService' : [ 'html5-common/scripts/services/sdEventBusService' ],\n\t\t\t\t'httpInterceptorProvider' : [ 'html5-common/scripts/services/sdHttpInterceptorProvider' ],\n\t\t\t\t'sdLoggerService' : [ 'html5-common/scripts/services/sdLoggerService' ],\n\t\t\t\t'sdData' : [ 'html5-common/scripts/directives/sdData' ],\n\t\t\t\t'sdDataTable' : [ 'html5-common/scripts/directives/sdDataTable' ],\n\t\t\t\t'sdUtilService' : [ 'html5-common/scripts/services/sdUtilService' ],\n\t\t\t\t'sdViewUtilService' : [ 'html5-common/scripts/services/sdViewUtilService' ],\n\t\t\t\t'sdPreferenceService' : [ 'html5-common/scripts/services/sdPreferenceService' ],\n\t\t\t\t'sdDialog' : [ 'html5-common/scripts/directives/dialogs/sdDialog' ],\n\t\t\t\t'sdDialogService' : [ 'html5-common/scripts/services/sdDialogService' ],\n\t\t\t\t'sdPortalConfigurationService' : [ 'html5-common/scripts/services/sdPortalConfigurationService' ],\n\t\t\t 'sdLocalizationService' : [ 'html5-common/scripts/services/sdLocalizationService' ],\n\t\t\t 'sdDatePicker': ['html5-common/scripts/directives/sdDatePicker'],\n\t\t\t 'sdPopover': ['html5-common/scripts/directives/sdPopover'],\n\t\t\t 'sdAutoComplete': ['html5-common/scripts/directives/sdAutoComplete'],\n\t\t\t 'sdRichTextEditor':['html5-common/scripts/directives/sdRichTextEditor'],\n\t\t\t 'sdTree' : ['html5-common/scripts/directives/sdTree'],\n\t\t\t 'sdFolderTree' : ['html5-common/scripts/directives/sdFolderTree/sdFolderTree'],\n\t\t\t 'sdProcessDocumentTree': ['html5-common/scripts/directives/sdProcessDocumentsTree/sdProcessDocumentsTree']\n\t\t\t \n\t\t\t},\n\t\t\tshim : {\n\t\t\t\t'jquery.dataTables' : [ 'jquery' ],\n\t\t\t\t'angularjs' : {\n\t\t\t\t\tdeps : [\"jquery\"],\n\t\t\t\t\texports : \"angular\"\n\t\t\t\t},\n\t\t\t\t'angularResource' : ['angularjs'],\n\t\t\t\t'bootstrap' : ['jquery'],\n\t\t\t\t'html5CommonMain' : [ 'angularjs', 'portalApplication'],\n\t\t\t\t'sdEventBusService' : [ 'html5CommonMain' ],\n\t\t\t\t'httpInterceptorProvider' : [ 'html5CommonMain' ],\n\t\t\t\t'sdLoggerService' : [ 'html5CommonMain' ],\n\t\t\t\t'sdData' : [ 'html5CommonMain' ],\n\t\t\t\t'sdDataTable' : [ 'html5CommonMain', 'sdLoggerService', 'sdDialogService' ,'sdPopover'],\n\t\t\t\t'sdUtilService' : [ 'html5CommonMain' ],\n\t\t\t\t'sdViewUtilService' : [ 'html5CommonMain' ],\n\t\t\t\t'sdPreferenceService' : [ 'html5CommonMain','angularResource'],\n\t\t\t\t'sdDialog' : [ 'html5CommonMain', 'sdLoggerService', 'bootstrap' ],\n\t\t\t\t'sdDialogService' : [ 'sdDialog' ],\n\t\t\t\t'sdPortalConfigurationService' : [ 'html5CommonMain' ],\n\t\t\t 'sdLocalizationService' : [ 'html5CommonMain' ],\n\t\t\t 'sdDatePicker' : [ 'html5CommonMain', 'sdLocalizationService' ],\n\t\t\t 'sdPopover' : [ 'html5CommonMain', 'sdLoggerService', 'bootstrap' ],\n\t\t\t 'sdAutoComplete' :['html5CommonMain'],\n\t\t\t 'sdRichTextEditor':['html5CommonMain','ckeditor'],\n\t\t\t 'sdTree' :['html5CommonMain','ckeditor'] ,\n\t\t\t 'sdFolderTree' : ['html5CommonMain','sdUtilService','sdTree'],\n\t\t\t 'sdProcessDocumentTree':['html5CommonMain','sdUtilService','sdTree']\n\t\t\t},\n\t\t\tdeps : [ \"jquery.dataTables\", \"angularjs\", \"angularResource\",\"bootstrap\",\"ckeditor\",\"portalApplication\",\n\t\t\t\t\t\"html5CommonMain\", \"sdEventBusService\", \"httpInterceptorProvider\",\n\t\t\t\t\t\"sdLoggerService\", \"sdData\", \"sdDataTable\",\n\t\t\t\t\t'sdUtilService', 'sdViewUtilService', 'sdPreferenceService', 'sdDialog', 'sdDialogService', 'sdPortalConfigurationService' , 'sdPopover', \n\t\t\t\t\t'sdAutoComplete','sdRichTextEditor','sdTree','sdFolderTree','sdProcessDocumentTree']\n\n\t\t};\n\n\t\tcopyValues(config.paths, reqMod.paths);\n\t\tcopyValues(config.shim, reqMod.shim);\n\t\tconfig.deps = config.deps.concat(reqMod.deps);\n\t\treturn config;\n\t}", "title": "" }, { "docid": "4d9c2635348b730ff21d7514382271ab", "score": "0.5187798", "text": "function require(a){return window.less[a.split(\"/\")[1]]}", "title": "" }, { "docid": "17b71217c0b91d119da5d3c0dcc226b3", "score": "0.51820195", "text": "function require() {\n\t\tthrow new Error('require should not be called from an installer');\n\t}", "title": "" }, { "docid": "3d08f4ffe131db9ccbec2bb1bcb03136", "score": "0.5169364", "text": "function require(id) {\n return module.require(id);\n }", "title": "" }, { "docid": "5a8667edca678a387cecb0c79efde0aa", "score": "0.5162024", "text": "function replace_require() {\n require.extensions['.json'] = function(module, filename) {\n module.exports = requireJSON6(filename);\n };\n}", "title": "" }, { "docid": "01e7b1ab703036292d68457645458c2e", "score": "0.5133919", "text": "function setRequireJSOptions (target) {\n var _ = require('underscore'),\n templates = _.map(\n grunt.file.expand(\n {\n cwd: grunt.config.get('project.src.js')\n },\n 'templates/**/*.hbs'\n ),\n function (filename) {\n // Strip off the extension and prepend with 'hbs!', the plugin name\n return 'hbs!' + _.initial(filename.split('.')).join('.');\n }\n ),\n modules = _.map(\n grunt.file.expand(\n {\n cwd: grunt.config.get('project.src.js')\n },\n '{modules,models,views,transitional,helpers}/**/*.js'\n ),\n function (filename) {\n // Strip off the extension\n return _.initial(filename.split('.')).join('.');\n }\n ),\n optionsDef = {\n baseUrl: '<%= project.src.js %>',\n\n // Which requirejs optimizer to use\n name: 'vendor/require',\n\n // Certain modules are only needed in the development build. Others can be \"stubbed out\", meaning they're not included but a reference is made for them to an empty object.\n stubModules: {\n dev: [],\n dist: []\n }[target],\n\n // We're going to run the optimizer later on\n optimize: 'none',\n\n // Uncomment to wrap up RequireJS functions into an IIFE to protect the global space\n // This is currently commented so that the Juicebox object can be properly registered in the global\n // space, although we could include this as part of the concat operation and shim it.\n // wrap: true\n },\n configTarget = {\n bs2: {\n options: _.defaults(\n {\n mainConfigFile:\n {\n dev: '<%= project.src.js %>/config-dev.js',\n dist: '<%= project.src.js %>/config.js'\n }[target],\n out: {\n dev: '<%= project.build.dev %>/bert.bs2.js',\n dist: '<%= project.build.dist %>/bert.bs2.js'\n }[target],\n\n // Include all of the template files as well as the entry point\n include: _.union(\n templates,\n modules,\n [\n {\n dev: 'config-dev',\n dist: 'config'\n }[target],\n 'bs2'\n ]\n )\n }, optionsDef)\n },\n bs3: {\n options: _.defaults(\n {\n mainConfigFile:\n {\n dev: '<%= project.src.js %>/config-dev.js',\n dist: '<%= project.src.js %>/config.js'\n }[target],\n out: {\n dev: '<%= project.build.dev %>/bert.bs3.js',\n dist: '<%= project.build.dist %>/bert.bs3.js'\n }[target],\n\n // Include all of the template files as well as the entry point\n include: _.union(\n templates,\n modules,\n [\n {\n dev: 'config-dev',\n dist: 'config'\n }[target],\n 'bs3'\n ]\n )\n }, optionsDef)\n }\n };\n\n grunt.log.debug(JSON.stringify(configTarget, null, ' '));\n grunt.config.set('requirejs', configTarget);\n }", "title": "" }, { "docid": "a48b2424d02bfb5f40213005341ed744", "score": "0.51286423", "text": "function require() {\n var scripts = [];\n for (var _i = 0; _i < (arguments.length - 0); _i++) {\n scripts[_i] = arguments[_i + 0];\n }\n var res = true;\n var xhr = getXmlHttp();\n if (xhr) {\n for (var i = 0; i < scripts.length; i++) {\n var script = updateScriptPath(scripts[i]);\n\n if (loadedJs.indexOf(script) != -1)\n continue;\n loadedJs.push(script);\n\n xhr.open(\"GET\", script + \"?_\" + (new Date()).getTime(), false);\n xhr.send();\n if (xhr.status == 200) {\n try {\n eval(xhr.responseText);\n } catch (e) {\n console.log(\"LionSoftJs.require(): Fail on evaluation script '\" + script + \"'. Error: \" + e.message);\n res = false;\n }\n } else {\n var status = xhr.status == 404 ? \"Resource not found.\" : \"Error status: \" + xhr.status;\n console.log(\"LionSoftJs.require(): Fail on loading script '\" + script + \"'. \" + status);\n res = false;\n }\n }\n } else {\n console.log(\"LionSoftJs.require(): Fail on creating XMLHttpRequest\");\n res = false;\n }\n return res;\n }", "title": "" }, { "docid": "258a8408ea98ee203d0449f9df686a37", "score": "0.511631", "text": "function load(resourceId, require, load, config) {\n resourceId ? require([resourceId], load) : load();\n}", "title": "" }, { "docid": "30234f994bedbb686e874432ffa20aa0", "score": "0.5112089", "text": "function require(moduleid) {\n return _moduleCache[moduleid];\n }", "title": "" }, { "docid": "4d00226139e1cd515bf976d857f7f4bb", "score": "0.5095441", "text": "function require(modName) {\n var modObj = modules[modName],\n depModName,i,errMsg;\n if (!modules[modName]) {\n errMsg = 'Requiring unknown module\"' + modName + '\"';\n throw new Error(errMsg);\n }\n if (modObj.hasError) throw new Error('Requiring module \"'\n + modName+ '\" which threw an exception');\n if (modObj.waiting) {\n errMsg = 'Requiring module \"' + modName\n + '\" with unresolved dependencies';\n throw new Error(errMsg);\n }\n\n if (!modObj.exports) {\n var epts = modObj.exports = {},\n foo = modObj.factory;\n if (toStr.call(foo) === '[object Function]') {\n var deps = modObj.dependencies,\n depsLength = deps.length,\n depArray = [],\n wrapFactory;\n if (modObj.special & specialValue) {\n depsLength = Math.min(depsLength, foo.length)\n }\n try {\n for (i=0;i<depsLength;i++) {\n depModName = deps[i];\n depArray.push(depModName === 'module'? modObj : (depModName === 'exports' ? epts : require(depModName)));\n }\n wrapFactory = foo.apply(modObj.context || gbl, depArray);\n } catch (err) {\n modObj.hasError = true;\n throw err;\n }\n if (wrapFactory) modObj.exports = wrapFactory;\n } else modObj.exports = foo;\n }\n if (modObj.refcount--===1) delete modules[modName];\n return modObj.exports;\n }", "title": "" }, { "docid": "709085f44bdfd7ab8900a580027d5298", "score": "0.5078431", "text": "function require(path) {\n var js = document.createElement(\"script\");\n js.type = \"text/javascript\";\n js.src = path;\n document.body.appendChild(js);\n}", "title": "" }, { "docid": "9467deb3c75a9c3f5ffee610cacf1062", "score": "0.5067936", "text": "function load(resourceId, require, load, config) {\n resourceId ? require([resourceId], load) : load();\n }", "title": "" }, { "docid": "17c47151b1ef9bd50250cc93a27ea041", "score": "0.50632304", "text": "function isLoaded() {\n var globalRequire = window['require'];\n // .on() ensures that it's Dojo's AMD loader\n return globalRequire && globalRequire.on;\n}", "title": "" }, { "docid": "d29d3fd30ae61f379244d3a1698365c2", "score": "0.5056994", "text": "function wrapRequire(func) {\n function newFunc(deps, callback, relName, forceSync, alt) {\n insertPlugin(arguments[0]);\n if(!SC.isDevelopment){\n // if not gulp-local force almond.js to execute synchronously,\n // it's required to avoid issue with seo engine, if forceSync is 'false'\n // errors can not be captured!!\n if (typeof relName === 'function') {\n //if relName is a function, the actual forceSync parameter will be the last one (alt)\n return func.call(null, deps, callback, relName, forceSync, true);\n }\n return func.call(null, deps, callback, relName, true, alt);\n }\n return func.apply(null, arguments);\n }\n copyProperties(func, newFunc);\n\n return newFunc;\n }", "title": "" }, { "docid": "4c65a3cc3d5c75a6ba965596de1e7ba7", "score": "0.5055158", "text": "function dynamicRequire(mod, request) {\n return mod.require(request);\n}", "title": "" }, { "docid": "4c65a3cc3d5c75a6ba965596de1e7ba7", "score": "0.5055158", "text": "function dynamicRequire(mod, request) {\n return mod.require(request);\n}", "title": "" }, { "docid": "4c10958995546a3a5e052b44d61b546f", "score": "0.50477386", "text": "function loadModule(moduleName){var module=modules[moduleName];if(module!==undefined){return module;}// This uses a switch for static require analysis\nswitch(moduleName){case'charset':module=__webpack_require__(214);break;case'encoding':module=__webpack_require__(215);break;case'language':module=__webpack_require__(216);break;case'mediaType':module=__webpack_require__(217);break;default:throw new Error('Cannot find module \\''+moduleName+'\\'');}// Store to prevent invoking require()\nmodules[moduleName]=module;return module;}", "title": "" }, { "docid": "001fb2545720cb80481e264197d70782", "score": "0.50346947", "text": "function initRequires() {\n logger = logger || require(rootPrefix + '/lib/logger/custom_console_logger');\n moUtils = require(rootPrefix + '/module_overrides/common/utils');\n}", "title": "" }, { "docid": "2c299566a9c9433338ccc6842fc09268", "score": "0.50218296", "text": "function onRequire(path, name) {\n expect(path).to.match(/(a|b|long_name)\\.js/i);\n expect(name).to.match(/(a|b|long_name)/i);\n\n if (!--count) {\n me.xrequire.removeListener('require', onRequire);\n done()\n }\n }", "title": "" }, { "docid": "4d4c95884c86518fd7f19ca45aea65f9", "score": "0.5006509", "text": "function localRequire(path) {\r\n var resolved = localRequire.resolve(path);\r\n return require(resolved, parent, path);\r\n }", "title": "" }, { "docid": "b5f9771ee76f77b46f1c043e7f1971cd", "score": "0.5001374", "text": "requireModule(currPath, moduleName, bypassRegistryCache) {\n const moduleID = this._getNormalizedModuleID(currPath, moduleName);\n let modulePath;\n\n // I don't like this behavior as it makes the module system's mocking\n // rules harder to understand. Would much prefer that mock state were\n // either \"on\" or \"off\" -- rather than \"automock on\", \"automock off\",\n // \"automock off -- but there's a manual mock, so you get that if you ask\n // for the module and one doesnt exist\", or \"automock off -- but theres a\n // useAutoMock: false entry in the package.json -- and theres a manual\n // mock -- and the module is listed in the unMockList in the test config\n // -- soooo...uhh...fuck I lost track\".\n //\n // To simplify things I'd like to move to a system where tests must\n // explicitly call .mock() on a module to receive the mocked version if\n // automocking is off. If a manual mock exists, that is used. Otherwise\n // we fall back to the automocking system to generate one for you.\n //\n // The only reason we're supporting this in jest for now is because we\n // have some tests that depend on this behavior. I'd like to clean this\n // up at some point in the future.\n let manualMockResource = null;\n let moduleResource = null;\n moduleResource = this._getResource('JS', moduleName);\n manualMockResource = this._getResource('JSMock', moduleName);\n if (\n !moduleResource &&\n manualMockResource &&\n manualMockResource.path !== this._isCurrentlyExecutingManualMock &&\n this._explicitShouldMock[moduleID] !== false\n ) {\n modulePath = manualMockResource.path;\n }\n\n if (NODE_CORE_MODULES[moduleName]) {\n return require(moduleName);\n }\n\n if (!modulePath) {\n modulePath = this._moduleNameToPath(currPath, moduleName);\n }\n\n // Always natively require the jasmine runner.\n if (modulePath.indexOf(VENDOR_PATH) === 0) {\n return require(modulePath);\n }\n\n if (!modulePath) {\n throw new Error(`Cannot find module '${moduleName}' from '${currPath}'`);\n }\n\n let moduleObj;\n if (!bypassRegistryCache) {\n moduleObj = this._moduleRegistry[modulePath];\n }\n if (!moduleObj) {\n // We must register the pre-allocated module object first so that any\n // circular dependencies that may arise while evaluating the module can\n // be satisfied.\n moduleObj = {\n __filename: modulePath,\n exports: {},\n };\n\n if (!bypassRegistryCache) {\n this._moduleRegistry[modulePath] = moduleObj;\n }\n\n if (path.extname(modulePath) === '.json') {\n moduleObj.exports = this._environment.global.JSON.parse(\n fs.readFileSync(modulePath, 'utf8')\n );\n } else if (path.extname(modulePath) === '.node') {\n moduleObj.exports = require(modulePath);\n } else {\n this._execModule(moduleObj);\n }\n }\n\n return moduleObj.exports;\n }", "title": "" }, { "docid": "17745c80d320e3518e3cbce26c022a28", "score": "0.49900243", "text": "function define(_, chunk) {\n if (!shared) {\n shared = chunk;\n } else if (!worker) {\n worker = chunk;\n } else {\n var workerBundleString = 'var sharedChunk = {}; (' + shared + ')(sharedChunk); (' + worker + ')(sharedChunk);'\n\n var sharedChunk = {};\n shared(sharedChunk);\n maplibregl = chunk(sharedChunk);\n if (typeof window !== 'undefined') {\n maplibregl.workerUrl = window.URL.createObjectURL(new Blob([workerBundleString], { type: 'text/javascript' }));\n }\n }\n}", "title": "" }, { "docid": "d581d21c0d343b9466cbdf70b0965caa", "score": "0.49883252", "text": "function isRequire(node) {\n return (node.type === 'CallExpression') && (node.callee.type === 'Identifier') && (node.callee.name === 'require');\n}", "title": "" }, { "docid": "2b90418c834e83ee5a4cdae6a4ede51f", "score": "0.49827236", "text": "function localRequire(path) {\n var resolved = localRequire.resolve(path);\n return require(resolved, parent, path);\n }", "title": "" }, { "docid": "ed0271de9aa164113dd750ff90f10412", "score": "0.4982071", "text": "function testAmdToCommonJs (runner, checker) {\n var tester = function (runner, checker, standalone) {\n var required = {},\n require = function (what) {\n if (what === 'amdtools') {\n return amdtools;\n }\n required[what] = 1;\n return { name: what };\n },\n mainRequire = require,\n exports = {},\n mainExports = exports,\n module = { id: 'name' }\n mainModule = module,\n standalonePostfix = standalone ? ' (standalone)' : '';\n eval(amdtools.amdToCommonJs('(' + runner.toString() + ')();', { standalone: standalone }));\n checker(required, exports, standalonePostfix);\n };\n tester(runner, checker);\n tester(runner, checker, true);\n }", "title": "" }, { "docid": "9679d3d8acb9da13c96571d3d091d021", "score": "0.49777418", "text": "function makeRequireFunction(mod) {\n const Module = mod.constructor;\n\n function require(path) {\n return mod.require(path);\n };\n\n function resolve(request, options) {\n validateString(request, 'request');\n return Module._resolveFilename(request, mod, false, options);\n }\n\n require.resolve = resolve;\n\n function paths(request) {\n validateString(request, 'request');\n return Module._resolveLookupPaths(request, mod);\n }\n\n resolve.paths = paths;\n\n require.main = process.mainModule;\n\n // Enable support to add extra extension types.\n require.extensions = Module._extensions;\n\n require.cache = Module._cache;\n\n return require;\n }", "title": "" }, { "docid": "822eb415200e70851d1172d4b37c19dc", "score": "0.49504238", "text": "function localRequire(path) {\n var resolved = localRequire.resolve(path);\n return require(resolved, parent, path);\n }", "title": "" }, { "docid": "822eb415200e70851d1172d4b37c19dc", "score": "0.49504238", "text": "function localRequire(path) {\n var resolved = localRequire.resolve(path);\n return require(resolved, parent, path);\n }", "title": "" }, { "docid": "765c0f834e25a97dbc1baf814c32d6a4", "score": "0.49451914", "text": "function requireReload(moduleName) {\n console.log(\"REQUIRED RELOAD***********************\")\n clearModule(moduleName);\n //require(moduleName);\n\n return require(moduleName);\n}", "title": "" }, { "docid": "b39e5f00b1349f109b1a058a78c4d47a", "score": "0.492891", "text": "function localRequire(path) {\n var resolved = localRequire.resolve(path);\n return _require(resolved, parent, path);\n }", "title": "" }, { "docid": "b8e5724c30140b2645f908892e026277", "score": "0.49189365", "text": "function safeRequire(moduleName) {\n try {\n return require(moduleName);\n } catch (e) {\n return null;\n }\n}", "title": "" }, { "docid": "36733012165add4668a56e11a1b9650f", "score": "0.49157462", "text": "function internalRequire (moduleId) {\n // use cached module.exports if module is already instantiated\n if (moduleCache.has(moduleId)) {\n const moduleExports = moduleCache.get(moduleId).exports\n return moduleExports\n }\n\n // load and validate module metadata\n // if module metadata is missing, throw an error\n const moduleData = loadModuleData(moduleId)\n if (!moduleData) {\n const err = new Error('Cannot find module \\'' + moduleId + '\\'')\n err.code = 'MODULE_NOT_FOUND'\n throw err\n }\n if (moduleData.id === undefined) {\n throw new Error('LavaMoat - moduleId is not defined correctly.')\n }\n\n // parse and validate module data\n const { package: packageName, source: moduleSource } = moduleData\n if (!packageName) throw new Error(`LavaMoat - invalid packageName for module \"${moduleId}\"`)\n const packagePolicy = getPolicyForPackage(lavamoatConfig, packageName)\n\n // create the moduleObj and initializer\n const { moduleInitializer, moduleObj } = prepareModuleInitializer(moduleData, packagePolicy)\n\n // cache moduleObj here\n // this is important to inf loops when hitting cycles in the dep graph\n // must cache before running the moduleInitializer\n moduleCache.set(moduleId, moduleObj)\n\n // validate moduleInitializer\n if (typeof moduleInitializer !== 'function') {\n throw new Error(`LavaMoat - moduleInitializer is not defined correctly. got \"${typeof moduleInitializer}\"\\n${moduleSource}`)\n }\n\n // initialize the module with the correct context\n const initializerArgs = prepareModuleInitializerArgs(requireRelativeWithContext, moduleObj, moduleData)\n moduleInitializer.apply(moduleObj.exports, initializerArgs)\n const moduleExports = moduleObj.exports\n\n return moduleExports\n\n // this is passed to the module initializer\n // it adds the context of the parent module\n // this could be replaced via \"Function.prototype.bind\" if its more performant\n function requireRelativeWithContext (requestedName) {\n const parentModuleExports = moduleObj.exports\n const parentModuleData = moduleData\n const parentPackagePolicy = packagePolicy\n const parentModuleId = moduleId\n return requireRelative({ requestedName, parentModuleExports, parentModuleData, parentPackagePolicy, parentModuleId })\n }\n }", "title": "" }, { "docid": "fb9b5f1fe7fef3116bf796881f39d545", "score": "0.49133092", "text": "function localRequire(path) {\n var resolved = localRequire.resolve(path);\n return require(resolved, parent, path);\n }", "title": "" }, { "docid": "fb9b5f1fe7fef3116bf796881f39d545", "score": "0.49133092", "text": "function localRequire(path) {\n var resolved = localRequire.resolve(path);\n return require(resolved, parent, path);\n }", "title": "" }, { "docid": "fb9b5f1fe7fef3116bf796881f39d545", "score": "0.49133092", "text": "function localRequire(path) {\n var resolved = localRequire.resolve(path);\n return require(resolved, parent, path);\n }", "title": "" }, { "docid": "fb9b5f1fe7fef3116bf796881f39d545", "score": "0.49133092", "text": "function localRequire(path) {\n var resolved = localRequire.resolve(path);\n return require(resolved, parent, path);\n }", "title": "" }, { "docid": "fb9b5f1fe7fef3116bf796881f39d545", "score": "0.49133092", "text": "function localRequire(path) {\n var resolved = localRequire.resolve(path);\n return require(resolved, parent, path);\n }", "title": "" }, { "docid": "fb9b5f1fe7fef3116bf796881f39d545", "score": "0.49133092", "text": "function localRequire(path) {\n var resolved = localRequire.resolve(path);\n return require(resolved, parent, path);\n }", "title": "" }, { "docid": "fb9b5f1fe7fef3116bf796881f39d545", "score": "0.49133092", "text": "function localRequire(path) {\n var resolved = localRequire.resolve(path);\n return require(resolved, parent, path);\n }", "title": "" }, { "docid": "fb9b5f1fe7fef3116bf796881f39d545", "score": "0.49133092", "text": "function localRequire(path) {\n var resolved = localRequire.resolve(path);\n return require(resolved, parent, path);\n }", "title": "" }, { "docid": "fb9b5f1fe7fef3116bf796881f39d545", "score": "0.49133092", "text": "function localRequire(path) {\n var resolved = localRequire.resolve(path);\n return require(resolved, parent, path);\n }", "title": "" }, { "docid": "fb9b5f1fe7fef3116bf796881f39d545", "score": "0.49133092", "text": "function localRequire(path) {\n var resolved = localRequire.resolve(path);\n return require(resolved, parent, path);\n }", "title": "" }, { "docid": "fb9b5f1fe7fef3116bf796881f39d545", "score": "0.49133092", "text": "function localRequire(path) {\n var resolved = localRequire.resolve(path);\n return require(resolved, parent, path);\n }", "title": "" }, { "docid": "fb9b5f1fe7fef3116bf796881f39d545", "score": "0.49133092", "text": "function localRequire(path) {\n var resolved = localRequire.resolve(path);\n return require(resolved, parent, path);\n }", "title": "" }, { "docid": "fb9b5f1fe7fef3116bf796881f39d545", "score": "0.49133092", "text": "function localRequire(path) {\n var resolved = localRequire.resolve(path);\n return require(resolved, parent, path);\n }", "title": "" }, { "docid": "fb9b5f1fe7fef3116bf796881f39d545", "score": "0.49133092", "text": "function localRequire(path) {\n var resolved = localRequire.resolve(path);\n return require(resolved, parent, path);\n }", "title": "" }, { "docid": "fb9b5f1fe7fef3116bf796881f39d545", "score": "0.49133092", "text": "function localRequire(path) {\n var resolved = localRequire.resolve(path);\n return require(resolved, parent, path);\n }", "title": "" }, { "docid": "fb9b5f1fe7fef3116bf796881f39d545", "score": "0.49133092", "text": "function localRequire(path) {\n var resolved = localRequire.resolve(path);\n return require(resolved, parent, path);\n }", "title": "" }, { "docid": "fb9b5f1fe7fef3116bf796881f39d545", "score": "0.49133092", "text": "function localRequire(path) {\n var resolved = localRequire.resolve(path);\n return require(resolved, parent, path);\n }", "title": "" }, { "docid": "fb9b5f1fe7fef3116bf796881f39d545", "score": "0.49133092", "text": "function localRequire(path) {\n var resolved = localRequire.resolve(path);\n return require(resolved, parent, path);\n }", "title": "" }, { "docid": "fb9b5f1fe7fef3116bf796881f39d545", "score": "0.49133092", "text": "function localRequire(path) {\n var resolved = localRequire.resolve(path);\n return require(resolved, parent, path);\n }", "title": "" }, { "docid": "fb9b5f1fe7fef3116bf796881f39d545", "score": "0.49133092", "text": "function localRequire(path) {\n var resolved = localRequire.resolve(path);\n return require(resolved, parent, path);\n }", "title": "" }, { "docid": "fb9b5f1fe7fef3116bf796881f39d545", "score": "0.49133092", "text": "function localRequire(path) {\n var resolved = localRequire.resolve(path);\n return require(resolved, parent, path);\n }", "title": "" }, { "docid": "fb9b5f1fe7fef3116bf796881f39d545", "score": "0.49133092", "text": "function localRequire(path) {\n var resolved = localRequire.resolve(path);\n return require(resolved, parent, path);\n }", "title": "" }, { "docid": "fb9b5f1fe7fef3116bf796881f39d545", "score": "0.49133092", "text": "function localRequire(path) {\n var resolved = localRequire.resolve(path);\n return require(resolved, parent, path);\n }", "title": "" }, { "docid": "fb9b5f1fe7fef3116bf796881f39d545", "score": "0.49133092", "text": "function localRequire(path) {\n var resolved = localRequire.resolve(path);\n return require(resolved, parent, path);\n }", "title": "" }, { "docid": "fb9b5f1fe7fef3116bf796881f39d545", "score": "0.49133092", "text": "function localRequire(path) {\n var resolved = localRequire.resolve(path);\n return require(resolved, parent, path);\n }", "title": "" }, { "docid": "fb9b5f1fe7fef3116bf796881f39d545", "score": "0.49133092", "text": "function localRequire(path) {\n var resolved = localRequire.resolve(path);\n return require(resolved, parent, path);\n }", "title": "" }, { "docid": "fb9b5f1fe7fef3116bf796881f39d545", "score": "0.49133092", "text": "function localRequire(path) {\n var resolved = localRequire.resolve(path);\n return require(resolved, parent, path);\n }", "title": "" }, { "docid": "fb9b5f1fe7fef3116bf796881f39d545", "score": "0.49133092", "text": "function localRequire(path) {\n var resolved = localRequire.resolve(path);\n return require(resolved, parent, path);\n }", "title": "" }, { "docid": "fb9b5f1fe7fef3116bf796881f39d545", "score": "0.49133092", "text": "function localRequire(path) {\n var resolved = localRequire.resolve(path);\n return require(resolved, parent, path);\n }", "title": "" }, { "docid": "fb9b5f1fe7fef3116bf796881f39d545", "score": "0.49133092", "text": "function localRequire(path) {\n var resolved = localRequire.resolve(path);\n return require(resolved, parent, path);\n }", "title": "" }, { "docid": "fb9b5f1fe7fef3116bf796881f39d545", "score": "0.49133092", "text": "function localRequire(path) {\n var resolved = localRequire.resolve(path);\n return require(resolved, parent, path);\n }", "title": "" }, { "docid": "fb9b5f1fe7fef3116bf796881f39d545", "score": "0.49133092", "text": "function localRequire(path) {\n var resolved = localRequire.resolve(path);\n return require(resolved, parent, path);\n }", "title": "" }, { "docid": "fb9b5f1fe7fef3116bf796881f39d545", "score": "0.49133092", "text": "function localRequire(path) {\n var resolved = localRequire.resolve(path);\n return require(resolved, parent, path);\n }", "title": "" }, { "docid": "fb9b5f1fe7fef3116bf796881f39d545", "score": "0.49133092", "text": "function localRequire(path) {\n var resolved = localRequire.resolve(path);\n return require(resolved, parent, path);\n }", "title": "" }, { "docid": "fb9b5f1fe7fef3116bf796881f39d545", "score": "0.49133092", "text": "function localRequire(path) {\n var resolved = localRequire.resolve(path);\n return require(resolved, parent, path);\n }", "title": "" }, { "docid": "fb9b5f1fe7fef3116bf796881f39d545", "score": "0.49133092", "text": "function localRequire(path) {\n var resolved = localRequire.resolve(path);\n return require(resolved, parent, path);\n }", "title": "" } ]
b4aed0e519fc896f963c9b0dfcee72f4
listening for changes on select boxes. form submits in react are shit.
[ { "docid": "9a5d49d5075e189c18aeca1d3e34f56c", "score": "0.0", "text": "changeDiscipline(e) {\n this.discipline = e.target.value;\n console.log(this.discipline);\n }", "title": "" } ]
[ { "docid": "76f47c60ed7d5ba65a07bb95e2486959", "score": "0.7358122", "text": "recordValueChanged() {\n this.selectTargets.forEach(target => {\n if (!(target instanceof HTMLSelectElement)) return\n this.updateOptions(target)\n })\n }", "title": "" }, { "docid": "fecf2ef707918c7a3a26f7fd1b6b2349", "score": "0.6817446", "text": "onChangeSelect(e) {\n let _event = COMMON_EVENTS[Number(e.target.value)];\n this.setState({\n currentSelect: e.target.value,\n pFor: _event.pFor,\n pAgainst: _event.pAgainst,\n required: _event.required,\n name: (_event.name != 'None') ? _event.name : ''\n });\n }", "title": "" }, { "docid": "34229f34cb4379f5ef09e0e2041d9555", "score": "0.678695", "text": "onSelectChanged(e) {\n\t\t// trigger form change in SS\n\t\tif(typeof(Event) === 'function') {\n\t\t\tvar event = new Event('change', { bubbles: true });\n\t\t\tdocument.querySelector('form').dispatchEvent(event);\n\t\t}\n\t\tthis.setState({\n\t\t\tcurrentNewTile: e.target.value\n\t\t});\n }", "title": "" }, { "docid": "900339f4a87580d5e44f16c1eecf4a6c", "score": "0.6692313", "text": "_onchange() {}", "title": "" }, { "docid": "900339f4a87580d5e44f16c1eecf4a6c", "score": "0.6692313", "text": "_onchange() {}", "title": "" }, { "docid": "9744544491f9cddc2704fb0b44f6e223", "score": "0.6691918", "text": "function selectHandler(e) {\n\t\tsetCurrentValue(e.target.value)\n\t\tcommitChanges(e.target.value)\n\t}", "title": "" }, { "docid": "8619769de6db50a1a5bcc8efc227fd78", "score": "0.6651133", "text": "function handleOptionChange(e){\n e.preventDefault();\n setStatus(e.target.value);\n }", "title": "" }, { "docid": "960449cd991c4d9191b922e3b56e87ea", "score": "0.65561295", "text": "updateSelectEvents() {\n this.updateEventsContainer('select');\n }", "title": "" }, { "docid": "a5734dd720eb9eb307cc8e1b86c2102c", "score": "0.65374255", "text": "function handleOptionChange(e){\n setStatus(e.target.value);\n //console.log(e.target.value);//to check if it is catching\n }", "title": "" }, { "docid": "5cb983088b9db3ad94b91d3b4f6dbb8f", "score": "0.65132076", "text": "handleValueChanges(e) {\r\n // set state properties based on values from input and select element\r\n this.setState({ [e.target.name]: e.target.value });\r\n this.validate(e.target.name, e.target.value);\r\n }", "title": "" }, { "docid": "cbd6f78144ad35df73b0981a79c74255", "score": "0.6494427", "text": "_onChange() {}", "title": "" }, { "docid": "e599d2cc07a97229f024252e4cd2d81b", "score": "0.64111114", "text": "function updateSelects(event) {\n\n var selectsOnPage = document.getElementsByTagName('select').length;\n\n //if the select changed was the last select on the page\n if (event.target === $$('select', selectsOnPage - 1)) {\n\n if (event.target.value.length > 0 && selectsOnPage + 1 <= maxDepth) {\n createSelect(selectsOnPage + 1, event.target.value);\n }\n var queryUpdate = event.target.options[event.target.selectedIndex].firstChild.nodeValue;\n codeAddress(queryUpdate, selectsOnPage * 4);\n if(window.localStorage) {\n localStorage.setItem('choice' + selectsOnPage, event.target.options[event.target.selectedIndex].value);\n } else {\n SetCookie('choice' + selectsOnPage, event.target.options[event.target.selectedIndex].value);\n }\n\n\n } else {\n\n elementToRemove = $$$('select-container', document.getElementsByClassName('select-container').length - 1);\n\n if(window.localStorage) {\n localStorage.removeItem('choice' + selectsOnPage);\n } else {\n DeleteCookie('choice' + selectsOnPage);\n }\n slideSelect(elementToRemove, true, event);\n\n }\n\n if (selectsOnPage == maxDepth) {\n formOnPage = $$$('formContainer');\n if (formOnPage) {\n body.removeChild(formOnPage);\n }\n createForm(event.target.options[event.target.selectedIndex].firstChild.nodeValue);\n\n } else {\n\n formOnPage = $$$('formContainer');\n if (formOnPage) {\n body.removeChild(formOnPage);\n }\n\n }\n\n}", "title": "" }, { "docid": "470bd1c2a5877eb1ffce0b8d66c222ab", "score": "0.6398219", "text": "function attachListeners(){\n $('#selectState').change(function(e){\n applyFilters();\n });\n}", "title": "" }, { "docid": "519210c114d54524141e85372f4bd7bf", "score": "0.6391433", "text": "function onChange() {\r\n\r\n\t\t\t}", "title": "" }, { "docid": "ee9b09cc72fc53a940e56779741c72d9", "score": "0.6386485", "text": "toggleSelect(event) {\n\t\tevent.preventDefault();\n\t\tthis.props.updateFilter(event.target.value);\n\t\tthis.setState({\n\t\t\toptionValue: event.target.value\n\t\t});\n\t}", "title": "" }, { "docid": "d45174c66d228efc81b9dede4bea2073", "score": "0.6355497", "text": "onChange(e) {\n this.doOnChange(e)\n }", "title": "" }, { "docid": "a6500ba098523c8c45b7fead130fd8c6", "score": "0.6347442", "text": "function changeHandler(e) {\n let formObj = e.currentTarget;\n let name = formObj.name, val = formObj.value;\n\n addFormData([name, val]);\n\n if (name === 'witnessesPresent') {\n setWitnesses(val);\n }\n }", "title": "" }, { "docid": "b2a1112d1ff9d1fea020a4a201808799", "score": "0.6341903", "text": "function doAfterSelectOptionChangedForOrdersExt(fieldName)\n{\n //Custom handling\n}", "title": "" }, { "docid": "11abc3b019ffd73bcbf25d2b09ffe07b", "score": "0.6337687", "text": "onChange() {\n\t triggerEvent(this.input, 'input');\n\t triggerEvent(this.input, 'change');\n\t }", "title": "" }, { "docid": "dac6b865e04e7395bec239e4822b7815", "score": "0.6295779", "text": "onChange() {}", "title": "" }, { "docid": "dac6b865e04e7395bec239e4822b7815", "score": "0.6295779", "text": "onChange() {}", "title": "" }, { "docid": "dac6b865e04e7395bec239e4822b7815", "score": "0.6295779", "text": "onChange() {}", "title": "" }, { "docid": "02d90cfc43e37ba38869da2c51552ec7", "score": "0.62823075", "text": "function mycb_change(event) {\n\t\t\tmychoice = event.currentTarget.value;\n\t\t\t\n\t\t\tswitch(mychoice) {\n\t\t\t\tcase 'civil':\n\t\t\t\t\tchosenTopic = civilRightsQuestions;\n\t\t\t\t\tchosenTopicQuestions = civilRightsQuestions.questions.slice();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'science':\n\t\t\t\t\tchosenTopic = scienceQuestions;\n\t\t\t\t\tchosenTopicQuestions = scienceQuestions.questions.slice();\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tchosenTopic = testQuestions;\n\t\t\t\t\tchosenTopicQuestions = testQuestions.questions.slice();\n\t\t\t}\n\t\t\tnumberOfQuestions = chosenTopic.questions.length;\n\t\t\tselectThemeDropdown.startbtn.alpha = 1;\n\t\t\tselectThemeDropdown.startbtn.addEventListener(\"click\", callStartModal);\n\t\t}", "title": "" }, { "docid": "b61c765af8c0d8f94841eab65f94102c", "score": "0.62712526", "text": "connect() {\n this.selectTargets.forEach(target => target.dispatchEvent(new Event('change')))\n }", "title": "" }, { "docid": "f625def181b2784beae0f712e8c7f476", "score": "0.6264809", "text": "_change() {\n this._children.on('click', (e) => {\n let that = $(e.currentTarget);\n let text = that.text();\n let index = that.index();\n that.addClass(Select.classes.active).siblings().removeClass(Select.classes.active);\n this.options.eq(index)\n .attr('selected', true)\n .siblings()\n .removeAttr('selected');\n this._fieldText.html(text);\n this._parent.removeClass(Select.classes.open);\n });\n }", "title": "" }, { "docid": "ad95896ecc6c5bb7ee27792ffec42f59", "score": "0.62579095", "text": "function _events () {\n $filter.on('submit', _submitHandler);\n $filter.find('select').on('change', _submitHandler);\n }", "title": "" }, { "docid": "ac8fd272552488c10017066a2c96e826", "score": "0.6247253", "text": "function handleOptionChange(e){\n setStatus(e.target.value);\n }", "title": "" }, { "docid": "88b134e667dc45b1360562f2b6af50f6", "score": "0.6240997", "text": "handleOptionChange() {\n console.log('listening', this.form.find('[data-behavior~=survey_question_option_input]'))\n this.form.on('click', '[data-behavior~=survey_question_option_input]', evt => {\n console.log('refreshing!')\n this.refreshConditionalQuestionVisibility();\n })\n }", "title": "" }, { "docid": "15042c14654cfa41db5df836011f0d47", "score": "0.62386304", "text": "changeHandler(e) {\n this.trigger('change', e);\n let element = e.target;\n this.validate(element.name);\n }", "title": "" }, { "docid": "b2bbfbc78ddcaf55fa8c832bd9112be5", "score": "0.62214637", "text": "handleReason1Change(event) {\n this.reason1 = event.target.value;\n this.setReason2Picklist(); \n }", "title": "" }, { "docid": "b5f2fe1d4f2667834dd40bcb2bb4a4e5", "score": "0.62054306", "text": "function handleSelect(event) {\n setSelect(event.target.value);\n }", "title": "" }, { "docid": "d293b05369d9221c8ef86d4bceb9c483", "score": "0.6204677", "text": "_handleSelect(event) {\n const selectListItem = event.matchedTarget;\n\n if (!selectListItem || selectListItem.disabled) {\n // @todo it doesn't seem like this should ever happen, but it does\n return;\n }\n\n // Select the corresponding item, or add one if it doesn't exist\n this._selectItem(selectListItem.value, selectListItem.content.innerHTML, true);\n\n if (!this.multiple) {\n this.value = selectListItem.value;\n\n // Make sure the value is changed\n // The setter won't run if we set the same value again\n // This forces the DOM to update\n this._setInputValues(this.value, selectListItem.content.textContent, false);\n } else {\n // Add to values\n this._addValue(selectListItem.value, selectListItem.content.innerHTML, true);\n }\n\n // Focus on the input element\n // We have to wait a frame here because the item steals focus when selected\n window.requestAnimationFrame(() => {\n this._elements.input.focus();\n });\n\n // Hide the options when option is selected in all cases\n this.hideSuggestions();\n\n // Emit the change event when a selection is made\n this.trigger('change');\n }", "title": "" }, { "docid": "4a228dea00dc3b9c46ed8952495a4962", "score": "0.61971766", "text": "function changeDropDown(e){\n newDropDownValue = e.split(\"_\")[0];\n for(i=0; i<componentSelect.length; i++){\n if(newDropDownValue == componentSelect[i].value){\n componentSelect.value = newDropDownValue;\n componentChange()\n } \n }\n}", "title": "" }, { "docid": "6ec6cfff09220e29d925b128069b1b62", "score": "0.6194204", "text": "handleSelectChange(value) {\n this.setState({value});\n }", "title": "" }, { "docid": "94b21cd51f50792791ecada72b948a3e", "score": "0.6184389", "text": "_listBoxChangeHandler(event) {\n const that = this;\n\n if ((that.dropDownAppendTo && that.dropDownAppendTo.length > 0) || that.enableShadowDOM) {\n that.$.fireEvent('change', event.detail);\n }\n\n that._applySelection(that.selectionMode, event.detail);\n }", "title": "" }, { "docid": "c30c8486776d9f88628d9f6a86d7dc29", "score": "0.6180253", "text": "function handleMovieSelectChangeEvent () {\n const movieId = updateFormEl.selectMovie.value,\n saveButton = updateFormEl.commit,\n selectActorsWidget = updateFormEl.querySelector(\".MultiChoiceWidget\"),\n selectDirectorEl = updateFormEl.selectDirector;\n if (movieId) {\n const movie = Movie.instances[movieId];\n updateFormEl.movieId.value = movie.movieId;\n updateFormEl.title.value = movie.title;\n updateFormEl.releaseDate.value = createIsoDateString(movie.releaseDate);\n\n // set up the associated director selection list\n fillSelectWithOptions( selectDirectorEl, Director.instances, \"personId\", {displayProp: \"name\"});\n // set up the associated actors selection widget\n createMultipleChoiceWidget( selectActorsWidget, movie.actors,\n Actor.instances, \"personId\", \"name\", 0); // minCard=0\n // assign associated director as the selected option to select element\n if (movie.director) updateFormEl.selectDirector.value = movie.director.personId;\n saveButton.disabled = false;\n\n if (movie.category) {\n updateFormEl.category.selectedIndex = movie.category;\n // disable category selection (category is frozen)\n updateFormEl.category.disabled = \"disabled\";\n // show category-dependent fields\n displaySegmentFields( updateFormEl, MovieCategoryEL.labels, movie.category);\n switch (movie.category) {\n case MovieCategoryEL.TVSERIESEPISODE:\n updateFormEl.tvSeriesName.value = movie.tvSeriesName;\n updateFormEl.episodeNo.value = movie.episodeNo;\n updateFormEl.about.value = \"\";\n break;\n case MovieCategoryEL.BIOGRAPHY:\n updateFormEl.about.value = movie.about;\n updateFormEl.tvSeriesName.value = \"\";\n updateFormEl.episodeNo.value = \"\";\n break;\n }\n } else { // movie has no value for category\n updateFormEl.category.value = \"\";\n updateFormEl.category.disabled = \"\"; // enable category selection\n updateFormEl.tvSeriesName.value = \"\";\n updateFormEl.episodeNo.value = \"\";\n updateFormEl.about.value = \"\";\n undisplayAllSegmentFields( updateFormEl, MovieCategoryEL.labels);\n }\n } else {\n updateFormEl.reset();\n updateFormEl.selectDirector.selectedIndex = 0;\n selectActorsWidget.innerHTML = \"\";\n saveButton.disabled = true;\n }\n}", "title": "" }, { "docid": "98ebb52712b79c277b668f72ec58cce2", "score": "0.6165854", "text": "function handleChangeSelect(e) {\n e.preventDefault();\n setAssunto(e.target.value);\n }", "title": "" }, { "docid": "a376d7f411d9616926b8e5f5b58d8245", "score": "0.6162706", "text": "_onChange(evt) {\n this.toggleActive().then(res => {\n this.dispatchEvent(new CustomEvent('selected-change',{\n bubbles: true,\n composed: true\n }))\n })\n }", "title": "" }, { "docid": "434d8f53d7e2f1769a8651ca34698fe0", "score": "0.6159679", "text": "function submitChange(action, selectId) \n{\n var form = document.getElementById(\"contentForm\") \n form.action.value = action\n var select = document.getElementById(selectId) \n form.object.value = select.value;\n form.isChanged.value = 1;\n form.submit();\n}", "title": "" }, { "docid": "41d553ceb2ae593b0ba5aaba53776382", "score": "0.61573744", "text": "function doAfterSelectOptionChangedForUserInfoExt(fieldName)\n{\n //Custom handling\n}", "title": "" }, { "docid": "e0ae313114fdf3340eb53868ab096f04", "score": "0.61560273", "text": "function checkSelectChanging (arr) {\n let selectElement = document.getElementById(\"repositories\");\n selectElement.addEventListener(\"change\", function(){\n const selectValue = selectElement.value;\n renderRepositoryInfo(arr, selectValue);\n const repo = arr.filter(repo => repo.id == selectValue)[0];\n const repoContributersUrl = repo.contributors_url;\n getApiResponse(repoContributersUrl, renderRepositoryContributers);\n });\n}", "title": "" }, { "docid": "cdd8d236f87840a1e9f9194e4e0e7bb5", "score": "0.6155419", "text": "change(ev){\n \n this.setState({[ev.target.name]: ev.target.value});// set the value taken form select\n setTimeout(() => {\n if(this.state.act === 'Active'){\n \n if(this.state.slt === 'Completed'||this.state.slt === 'Canceled'||this.state.slt === 'Failed'){\n let {slt} =this.state;\n slt = '';\n this.setState({slt});\n }\n \n let{options} =this.state;\n options = [ {\n name: '-- Select Status Filter --',\n value: '',\n },\n {\n name: 'Opened',\n value: 'Opened',\n },\n {\n name: 'Assigned',\n value: 'Assigned',\n },\n {\n name: 'Reopened',\n value: 'Reopened',\n },\n {\n name: 'Awating Payment',\n value: 'AwatingPayment',\n },\n {\n name: 'Payment Done',\n value: 'PaymentDone',\n },\n {\n name: 'In-House',\n value: 'In-House',\n }]\n this.setState({options});\n \n \n } \n else if(this.state.act === 'Inactive'){\n\n if(this.state.slt === 'AwatingPayment'||this.state.slt === 'PaymentDone'||this.state.slt === 'Opened'||this.state.slt === 'In-House'||this.state.slt === 'Reopened'||this.state.slt === 'Assigned'){\n let {slt} =this.state;\n slt = '';\n this.setState({slt});\n }\n \n let{options} =this.state;\n options = [ {\n name: '-- Select Status Filter --',\n value: '',\n },\n {\n name: 'Canceled',\n value: 'Canceled',\n },\n {\n name: 'Completed',\n value: 'Completed',\n },\n {\n name: 'Failed',\n value: 'Failed',\n }]\n this.setState({options});\n \n }\n else {\n let{options} =this.state;\n options = [\n {\n name: '-- Select Status Filter --',\n value: '',\n },\n {\n name: 'Opened',\n value: 'Opened',\n },\n {\n name: 'Assigned',\n value: 'Assigned',\n },\n {\n name: 'Reopened',\n value: 'Reopened',\n },\n {\n name: 'Canceled',\n value: 'Canceled',\n },\n {\n name: 'Completed',\n value: 'Completed',\n },\n {\n name: 'Failed',\n value: 'Failed',\n },\n {\n name: 'Awating Payment',\n value: 'AwatingPayment',\n },\n {\n name: 'Payment Done',\n value: 'PaymentDone',\n },\n {\n name: 'In-House',\n value: 'In-House',\n },\n ]\n this.setState({options});\n }\n \n // console.log(this.state.slt)\n // console.log(this.state.act)\n // console.log(this.state.offset)\n // console.log(this.state.userId)\n // console.log(this.state.limit)\n // console.log(this.state.search)\n \n let users = JSON.parse(localStorage.getItem(\"user\"));\n let id = users.user_id;\n console.log(id)\n \n\n let formData = new FormData();\n formData.append('user_id',id);\n formData.append('uassign',this.state.userId);\n formData.append('status',this.state.slt);\n formData.append('action',this.state.act);\n formData.append('off_set',this.state.offset);\n formData.append('lmt_set',this.state.limit);\n formData.append('pro_srch',this.state.search);\n \n \n axios({\n method: 'post',\n url: 'http://pm.webq.co/api/fetch_project_api.php',\n data: formData,\n config: { headers: {'Content-Type': 'multipart/form-data' }}\n })\n .then(res => {\n if(res.data){\n let {details} = this.state;\n details = res.data.record;\n \n this.setState({details})\n let {offset,limit} =this.state;\n offset = 0;\n limit =10;\n \n this.setState({offset,limit});\n \n console.log(res.data);\n }\n else{\n console.log(\"error\");\n }\n \n })\n }, 300);\n \n }", "title": "" }, { "docid": "4f3b24a31d6bc817d15bebbb3c137c6d", "score": "0.6150564", "text": "function fireEventSelectChange() {\n var selects = document.getElementsByClassName(\"coral-SelectList-item\");\n for (var i = 0; i < selects.length; i++) {\n\n var select = selects[i];\n select.addEventListener(\"click\", function(select) {\n var value = this.getAttribute(\"data-value\");\n toogleField(value);\n\n });\n }\n\n}", "title": "" }, { "docid": "02256a4ef5d29e5cbc7a2a0f8d5af362", "score": "0.61490184", "text": "change() {\n let selectedIndex = this.$()[0].selectedIndex,\n // ensure DS.HasManyArray is converted to array of models\n options = A(this.get('options') || []).toArray(),\n hasPrompt = !!this.get('prompt'),\n valuePath = this.get('valuePath'),\n actualIndex = hasPrompt ? selectedIndex - 1 : selectedIndex,\n selection = options[actualIndex],\n value = selection;\n\n if (valuePath) {\n value = selection.get ? selection.get(valuePath) : selection[valuePath];\n }\n\n this.get('onChange')(value);\n }", "title": "" }, { "docid": "6b37450b7faf876e7a1d756530b04ff6", "score": "0.61470366", "text": "function dropdowns () {\n // Set the initial method name (in case it was set by the querystring module)\n setSelectedMethod(form.method.button.val());\n\n // Update each dropdown's label when its value(s) change\n onChange(form.allow.menu, setAllowLabel);\n onChange(form.refs.menu, setRefsLabel);\n onChange(form.validate.menu, setValidateLabel);\n\n // Track option changes\n trackCheckbox(form.allow.json);\n trackCheckbox(form.allow.yaml);\n trackCheckbox(form.allow.text);\n trackCheckbox(form.allow.empty);\n trackCheckbox(form.allow.unknown);\n trackCheckbox(form.refs.external);\n trackCheckbox(form.refs.circular);\n trackCheckbox(form.validate.schema);\n trackCheckbox(form.validate.spec);\n\n // Change the button text whenever a new method is selected\n form.method.menu.find(\"a\").on(\"click\", function (event) {\n form.method.menu.dropdown(\"toggle\");\n event.stopPropagation();\n let methodName = $(this).data(\"value\");\n setSelectedMethod(methodName);\n trackButtonLabel(methodName);\n });\n}", "title": "" }, { "docid": "42b29d596ad33cd90b84c74e44402db7", "score": "0.61416286", "text": "onChange () {\n this.dispatch('fieldchange', [{\n value: this.value,\n name: this.properties.name\n }]);\n }", "title": "" }, { "docid": "7f089523c0280052889c2a88dc740b2c", "score": "0.61349237", "text": "function handleStateInput(){\n $('#state-input').change(function(e){\n var selectedState = $(this).find('option:selected').val();\n setState({\n STATE: selectedState\n })\n handleSubmit()\n })\n }", "title": "" }, { "docid": "d9e3b46b1bc8d1d54f44a2a120f870af", "score": "0.6134745", "text": "function optionChanged() {\n var input = idSelect.property(\"value\")\n inputDashboard(input)\n}", "title": "" }, { "docid": "427b17669f17d062307725a161bffb6d", "score": "0.61223", "text": "handleChange() {\n\n // Check if any input was changed.\n let changed = false;\n this._inputs.forEach(input => {\n changed = changed || input.changed();\n });\n\n // If any filter was changed, we make sure the button is not disabled,\n // otherwise, we disable the button because no changes were made.\n if (changed) {\n if (this._submitButton.classList.contains('disabled')) {\n this._submitButton.classList.remove('disabled');\n }\n } else {\n if (!this._submitButton.classList.contains('disabled')) {\n this._submitButton.classList.add('disabled');\n }\n }\n }", "title": "" }, { "docid": "be63e1042a8110081422f9a0d82b09a0", "score": "0.61171573", "text": "handleChange(event) \n {\n // Get the string of the \"value\" attribute on the selected option\n this.selectedOption = event.detail.value; \n this.calculateCurrencyValue(this.selectedOption,this.BitCoinValue);\n }", "title": "" }, { "docid": "293b5f1943d1b2c4239992b342398bf4", "score": "0.610601", "text": "function doAfterSelectOptionChangedForDoctorExt(fieldName)\n{\n //Custom handling\n}", "title": "" }, { "docid": "26b4ac04a18ee3386c476d8ec8707cad", "score": "0.60991246", "text": "on_change(ev){\r\n\t\tthis.val = this.get_value();\r\n\t\t// hack to get around change events not bubbling through the shadow dom\r\n\t\tthis.dispatchEvent(new CustomEvent('pion_change', { \r\n\t\t\tbubbles: true,\r\n\t\t\tcomposed: true\r\n\t\t}));\r\n\t\t\r\n\t\tif(!this.hasAttribute(\"noupdate\")){ //Send value to server\t\t\r\n\t\t\tsend_update(this, this.getAttribute(\"item_name\"), new Value(this.val));\t\t\t\r\n\t\t}\r\n\t\t\r\n\t}", "title": "" }, { "docid": "3eeadd6a51ae395e42839f95d74d0adf", "score": "0.6093926", "text": "function onChangeEvent() {\n 'use strict';\n\n // retrieve index of selected item\n var start = 'option_'.length;\n var reminder = this.value.substr(start);\n\n // store currently selected class (index of this class) in closure\n var index = parseInt(reminder);\n if (index === 0) {\n onLoadQuestions();\n }\n else {\n var course = courses[index - 1];\n onLoadQuestionsOfCourse(course.key);\n }\n }", "title": "" }, { "docid": "dc642bb750a37f0f5e4740a7651e1f99", "score": "0.60886884", "text": "function ChangeHandler() {\n PreviousSelectIndex = SelectIndex; \n /* Contains the Previously Selected Index */\n\n SelectIndex = document.forms[0].lstDropDown.options.selectedIndex;\n /* Contains the Currently Selected Index */\n\n if ((PreviousSelectIndex == (document.forms[0].lstDropDown.options.length - 1)) && (SelectIndex != (document.forms[0].lstDropDown.options.length - 1)) && (SelectChange != 'MANUAL_CLICK')) \n /* To Set value of Index variables */\n {\n document.forms[0].lstDropDown[(document.forms[0].lstDropDown.options.length - 1)].selected=true;\n PreviousSelectIndex = SelectIndex;\n SelectIndex = document.forms[0].lstDropDown.options.selectedIndex;\n SelectChange = 'MANUAL_CLICK'; \n /* Indicates that the Change in dropdown selected \n\t\t\tvalue was due to a Manual Click */\n }\n }", "title": "" }, { "docid": "2b654688b5971eac658c16a898812eca", "score": "0.6087972", "text": "function onSelectChange(event) { \n setProgramme(event.currentTarget.value); // Set programme state to value of option\n localStorage.setItem(\"programme\", event.currentTarget.value); // Set localStorage item to value of option\n props.setStudentProgramme(event.currentTarget.value); // Set global student programme state to value of option\n }", "title": "" }, { "docid": "c74983dd114d51c829edb99200f6ecb2", "score": "0.6086845", "text": "handleSelectValueChange(event) {\n this.selectedVal = event.detail;\n\n //calling the child method to load spinner while waiting for server results.\n if (this.oldval != this.selectedVal) {\n this.template.querySelector('c-search-results').Loading();\n this.oldval = this.selectedVal;\n\n\n //to close ldsDetailComponent \n fireEvent(this.pageRef, \"closeLDSForm\", '');\n }\n }", "title": "" }, { "docid": "1c3992b1ef9cb32979a998585ac27232", "score": "0.6084528", "text": "updateSelectNature(){\n this.props.onChangeUpdateSelect('Nature');\n }", "title": "" }, { "docid": "36f5104431ad2444544dd7e5ffe94d2e", "score": "0.6083382", "text": "registerEvents() {\n submit(document.querySelector('.form'));\n\n this.handleChangeWarrantyOption();\n this.handleChangeRangeUnderWarranty();\n this.handleChangeLoanAmount();\n this.handleChangeInstallments();\n }", "title": "" }, { "docid": "b9fe96ccc5b1dd2bd460d65ba86fbbcb", "score": "0.6076293", "text": "function onSelectChanged(event) {\n const reason = event.target.value\n if (!reason) return\n\n if (reason === 'oth_user_reported') {\n prompt.current.show()\n } else {\n actions.createAuditIssue(reason)\n }\n\n // Clear the value so it's not selected next time\n // This will trigger another `onSelectChanged` with empty reason\n // which will exit on its own.\n select.current.value = null\n }", "title": "" }, { "docid": "99021ad9f7a17c080243980a1c2ff78d", "score": "0.607292", "text": "function onChange() {\n\t\t\tassert.ok(false, \"unexpected event called\");\n\t\t}", "title": "" }, { "docid": "34b84332860b8c1afef5eabca73c526c", "score": "0.60689354", "text": "_onChanged()\n {\n const changed = new CustomEvent(\"change\");\n this.dispatchEvent(changed);\n this._render();\n }", "title": "" }, { "docid": "298f2487c6813166e5497f3af10d2466", "score": "0.6061747", "text": "function genericFireEventSelectChange() {\n var selects = document.getElementsByClassName(\"coral-SelectList-item\");\n for (var i = 0; i < selects.length; i++) {\n\n var select = selects[i];\n select.addEventListener(\"click\", function(select) {\n var value = this.getAttribute(\"data-value\");\n genericToogleField(value);\n\n });\n }\n\n}", "title": "" }, { "docid": "9d3dd03f010417bd851b23afb24b082e", "score": "0.60584", "text": "onchange() {\n _setNotification.onchange = function () {\n console.log(\"setNotification changed to \", _setNotification.value)\n },\n _setNotificationTime.onchange = function () {\n console.log(\"setNotificationTime changed to \", _setNotificationTime.value)\n },\n _popupSize.onchange = function () {\n console.log(\"popupSize changed to \", _popupSize.value)\n },\n\n _theme.onchange = function () {\n console.log(\"theme changed to \", _theme.value)\n }\n\n }", "title": "" }, { "docid": "bc912dcb06c37bfdec802d267ab0e862", "score": "0.6046799", "text": "function onChange(arg) {\n var selected = $.map(this.select(), function (item) {\n return $(item).text();\n });\n if (selected) {\n console.log(\"Selected: \" + selected.length + \" item(s), [\" + selected.join(\", \") + \"]\");\n }\n }", "title": "" }, { "docid": "2b1e5902927adf42396d5bc06e0c1ee0", "score": "0.6043642", "text": "onChange(event) {\n\t\tthis.setState({ selectedQuery: event.target.value }, () => {\n\t\t\tthis.refreshUpdateTimer();\n\t\t});\n\t}", "title": "" }, { "docid": "5285a19da256f35a19aa435f5ba62ef6", "score": "0.60409576", "text": "function jqChangeOption() {\n $('#eventsForm select').on('change', function () {\n var valueSelected = $(this).val();\n $(\"#eventsForm p\").html(valueSelected);\n });\n}", "title": "" }, { "docid": "37ec729e52e3b3f004527a8cdc3619af", "score": "0.60267127", "text": "_watchForSelectionChange() {\n this.selectedOptions.changed.pipe(takeUntil(this._destroyed)).subscribe(event => {\n // Sync external changes to the model back to the options.\n for (let item of event.added) {\n item.selected = true;\n }\n for (let item of event.removed) {\n item.selected = false;\n }\n if (!this._containsFocus()) {\n this._resetActiveOption();\n }\n });\n }", "title": "" }, { "docid": "b3c9edd55b8b4b50b679d494b99df916", "score": "0.60239613", "text": "function doAfterSelectOptionChangedForUserCartExt(fieldName)\n{\n //Custom handling\n}", "title": "" }, { "docid": "1444842aa959a76b93c938440b97e1f6", "score": "0.6009022", "text": "onSelection(callback) {\n $('[data-id=class]').on('change', callback);\n $('[data-id=submit-selection]').on('click', callback);\n }", "title": "" }, { "docid": "1c1e55f6ae7789e9dd5c203a915e08e1", "score": "0.5999224", "text": "handleDropdownChange(e, { value }) {\n this.props.sendDropdownParam(value);\n }", "title": "" }, { "docid": "d1cf87ecdce0f6ec8d54e458431cceb4", "score": "0.5999084", "text": "handleSelect(value) {\n this.props.changeHandler(value ? value.format() : null);\n }", "title": "" }, { "docid": "d09ead4dd6690ff8d46111d16bcff16e", "score": "0.599868", "text": "onValueChange(e) {\n this.setState({\n selectedOption: e.target.value\n });\n }", "title": "" }, { "docid": "839974d019076ef8cbd7147cb31f74ca", "score": "0.5992839", "text": "function selectChange(){\n\tdocument.selectCategory.submit();\n}", "title": "" }, { "docid": "28d119e4b4ba941bf91904abd5e800d9", "score": "0.59917593", "text": "onChange() {\n\t\tconst arg = {\n\t\t\tvalue: this.value,\n\t\t\tstep: this.step,\n\t\t\titem: this.items && this.items[this.step],\n\t\t\tlabels: this.labels && this.items[this.step],\n\t\t}\n\t\tfor (const listener of this.listeners)\n\t\t\tlistener.call(this, arg)\n\t}", "title": "" }, { "docid": "362dd59a6954241048d1431e68d487c5", "score": "0.5991062", "text": "handleSelectChange() {\n let event = arguments[1];\n let type = arguments[0];\n let currencyType = {};\n let rateName = event.target.value;\n currencyType = (type === 0) ? {baseRateName: rateName} : { toRateName: rateName };\n this.setState(currencyType, function() {\n this.getExchangeRate();\n });\n }", "title": "" }, { "docid": "0028031fa5bf9a005dcf74229d1ae80d", "score": "0.59906954", "text": "function optionChanged(dropdown_choice) {\n\nupdatePlotly(dropdown_choice)\nupdateMetaData(dropdown_choice)\n}", "title": "" }, { "docid": "0028031fa5bf9a005dcf74229d1ae80d", "score": "0.59906954", "text": "function optionChanged(dropdown_choice) {\n\nupdatePlotly(dropdown_choice)\nupdateMetaData(dropdown_choice)\n}", "title": "" }, { "docid": "a4e60bba7eb27e55dffdef226b8ced83", "score": "0.59876144", "text": "handleChange(e, variant, onChangeFunc) {\n const isHugeSelect = variant === 'huge';\n\n if (isHugeSelect) {\n this.setState({\n selectHugeHasValue: e.target.value !== '',\n });\n }\n if (onChangeFunc) onChangeFunc(e);\n }", "title": "" }, { "docid": "f0ef045cd46b495eed220981fa003fa8", "score": "0.59855807", "text": "function onChange() {\n\t\t\tthis.owner.onFieldChanged(this, this.getValue());\n\t\t}", "title": "" }, { "docid": "9f224239bf82298d034943aea6d00d01", "score": "0.5985143", "text": "handleSelectChange(event) {\n\t\tthis.setState({\n\t\t\trolename: event.value\n\t\t})\n\t}", "title": "" }, { "docid": "d9fe04ba83d37c8ff40321196b6f959c", "score": "0.59784186", "text": "function listenForChange() {\n \"use strict\";\n //Retrieves the user input fields.\n var dropdownNumDinners = document.getElementById('numDinners'),\n numPersons = document.getElementById('numPersons'),\n btn = document.getElementById('btn');\n\n //Adds event listeners, so that when the user changes the input, other functions run.\n //Changing the input makes the site update.\n dropdownNumDinners.addEventListener(\"change\", update);\n numPersons.addEventListener(\"change\", update);\n //Clicking the submit button triggers the order to be saved an the user sent to the receipt.\n btn.addEventListener(\"click\", save);\n\n\n //Logs in the console. Useful for finding errors.\n if (debug) {console.log(\"Enter function 'listenForChange'\"); }\n}", "title": "" }, { "docid": "1c458dd5f5e74ae1ffa7749a9d992616", "score": "0.597273", "text": "submit() {\n this.dispatchEvent(new CustomEvent(\"cascade-select-submit\", {detail : {}, bubbles: true, composed: true}));\n }", "title": "" }, { "docid": "df84b0cbbf09140447f6889379868faa", "score": "0.5961463", "text": "function DropDownChanged(event)\r\n{\r\n var lsQuery = BuildQueryString(null);\r\n Search(lsQuery, Success, Failed);\r\n}", "title": "" }, { "docid": "644a4d6ec9539c624f469b4382bcc532", "score": "0.59547", "text": "function optionChanged(val){\n console.log(\"Selected\",val);\n plotCharts(val);\n displayData(val);\n plotGauge(val);\n}", "title": "" }, { "docid": "fc3123e3e11cf0177417f2621ccb5a30", "score": "0.59545934", "text": "dropdownSelected(eventKey, event) {\n event.preventDefault();\n this.props.dispatch({type: \"setSetsFilter\", filter: eventKey})\n .then(() => {\n if (this.filterListState.current.value) this.filterList();\n });\n }", "title": "" }, { "docid": "1385f84b6e172473ce2814059b32cdbb", "score": "0.5948917", "text": "handleChange({ option }) {\n\t\tthis.setState({\n\t\t\tvalue: option\n\t\t});\n\t}", "title": "" }, { "docid": "98578be8d7bd3e6b0db7f94dae565b79", "score": "0.5925822", "text": "updatesNewValue(value){ //updates the state of newValue in the parent; when you\n //select option takes you to new option, also used for back button\n this.setState({newValue:value});\n }", "title": "" }, { "docid": "cfdd90f8ff026b68f07d308a472ce5d3", "score": "0.5924144", "text": "function originalChangeEvent(e) {\n\n\t\t\t\tif(ignoreOriginalChangeEvent) {\n\t\t\t\t\tignoreOriginalChangeEvent = false; \n\t\t\t\t\treturn; \n\t\t\t\t}\n\n\t\t\t\t$select.empty();\n\t\t\t\tif(options.useSelect2 && $select2) $select2.empty();\n\t\t\t\t$ol.empty();\n\t\t\t\tbuildSelect();\n\n\t\t\t\t// opera has an issue where it needs a force redraw, otherwise\n\t\t\t\t// the items won't appear until something else forces a redraw\n\t\t\t\t// @todo is this still necessary in 2019?\n\t\t\t\tif(typeof $.browser != \"undefined\") {\n\t\t\t\t\tif ($.browser.opera) $ol.hide().fadeIn(\"fast\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(options.fieldset) setupFieldsets();\n\t\t\t}", "title": "" }, { "docid": "00b23510ea0d4d557ec2c75c221b20de", "score": "0.5919578", "text": "handleChange(ev) {\n if (ev.target) {\n this.props.changeShelf(this.props, ev.target.value);\n }\n }", "title": "" }, { "docid": "d29c33ae0f689cdcc19cae63d892b45d", "score": "0.59154487", "text": "function optionChanged() {\n\n // Get reference to the dropdown menu\n var dropdownMenu = d3.select(\"#selDataset\");\n \n // Assign the value of the dropdown menu option to a variable\n var selId = dropdownMenu.property(\"value\");\n\n // Filter samples data for selected ID\n var selectedid = main_data.filter(row => row.id === selId);\n\n // Filter metadata data for selected ID\n var selectedidMD = main_metadata.filter(row => row.id === parseInt(selId));\n\n // Update panel with new selected data\n buildDemoInfo(selectedidMD);\n\n // Update bar char with new selected data\n updateBarChart(selectedid);\n\n // Update buble char with new selected data\n updateBubbleChart(selectedid);\n \n // Update gauge chart with new selected data\n updateGaugeChart(selectedidMD);\n}", "title": "" }, { "docid": "1376d09154c82c95ac88c0732bbc97d6", "score": "0.5914018", "text": "optionChangeOnClick(e, value, key){\n\n e.preventDefault();\n if (e.button === 0) {\n //call server method\n this.optionChange(value, key);\n }\n }", "title": "" }, { "docid": "40f2b6ca48bd444da37b110f13d71d06", "score": "0.5906311", "text": "function handleChange(event) {\n if (onChange) {\n onChange(event);\n }\n }", "title": "" }, { "docid": "d2cddb839a6ba669ab300427ced705af", "score": "0.5901362", "text": "handleChangeSelect(event) {\n var limit = event.target.value;\n this.setState({ limit: limit, currentPage: 1, currentPageChunk: 1 });\n this.props.onPaginationChange(limit, 0);\n }", "title": "" }, { "docid": "d3f769e17eaef58450fed6133361c4b5", "score": "0.5895412", "text": "function event_dispatcher(t) {\n var e = new Event(\"change\", {\n bubbles: !0,\n });\n t.dispatchEvent(e);\n}", "title": "" }, { "docid": "672068eb73f48257985686cd794532ca", "score": "0.58936995", "text": "function handleChange(event) {\n setSelectedOption(event.target.value);\n }", "title": "" }, { "docid": "e4bfa42b24ba0032b866d8d127bfa3b2", "score": "0.58925873", "text": "function SelectHandler(event)\n {\n }", "title": "" }, { "docid": "a8c0569c2cde28afabe96ccf5e049ecf", "score": "0.5892542", "text": "handleChange (event, index, value) {\n var targetValue = value;\n if (event != null && event.target.value != undefined) {\n targetValue = event.target.value;\n }\n if (this.oldValue === undefined) {\n this.oldValue = this.state.value\n }\n \n this.setState({ value: targetValue });\n\n if (this.props.validate) {\n this.props.validate(targetValue)\n .then(response => {\n if (response.errorMsg !== this.state.errorMsg) {\n this.setState({ errorMsg: response.errorMsg });\n }\n });\n }\n\n // For textfields value is retrieved from the event. For dropdown value is retrieved from the value\n this.triggerUpdate(() => this.updatePythonValue(targetValue));\n }", "title": "" }, { "docid": "91194b526700554c52afcc0916a34c9c", "score": "0.58924943", "text": "function optionChanged(ID_selected) {\n populateDemographic(ID_selected)\n buildCharts(ID_selected)\n}", "title": "" }, { "docid": "eadbf3b44a1acc5bfcd219a081cee0b3", "score": "0.58833224", "text": "function selectControlChangeFn(val) {\n model.valLast = model.valNew;\n model.valNew = val;\n //dosomthing with these values\n }", "title": "" }, { "docid": "50cc677dcf5eb621ab76de80be48a0ed", "score": "0.5877333", "text": "function shouldUseChangeEvent(elem){var nodeName=elem.nodeName&&elem.nodeName.toLowerCase();return\"select\"===nodeName||\"input\"===nodeName&&\"file\"===elem.type}", "title": "" }, { "docid": "f304336308e6fa70e69cc22ea94ad5db", "score": "0.5876238", "text": "function optionChanged(id) {\n Data(id);\n Demographics(id);\n}", "title": "" } ]
463cb65a383b23c7881f3274e96057d0
Throw data into RandomBar Component
[ { "docid": "4aab043b1096dd916fb048004cabeb16", "score": "0.0", "text": "render() {\n return (\n <div>\n <RandomBar\n run={this.state.run}\n name={this.state.name}\n candidate={this.props.candidate}\n major={this.state.major}/>\n <SearchForm\n receiveFormInput={(name, major) => this.receiveFormInput(name, major)}/>\n </div>\n )\n }", "title": "" } ]
[ { "docid": "b4827b5fe5f437cfc5c0371d3655c776", "score": "0.7275166", "text": "generate() {\n let arr = new Array(this.state.numBars);\n for (let i = 0; i < this.state.numBars; i++) {\n arr[i] = Math.floor(Math.random() * 100 - 5 + 1) + 5;\n }\n let barArr = arr.map((item, index) => {\n return <Bar value={item} key={index} backgroundColor={PURPLE} />;\n });\n this.setState({ arrBars: barArr, isSorted: false });\n }", "title": "" }, { "docid": "7381a5bb3d12a2a6a46a0f79e721ae9a", "score": "0.68344456", "text": "function genRandArray() {\n let newArr = [];\n for (let i = 0; i < numBars; i++) {\n newArr.push(Math.floor(Math.random() * barValueRange))\n }\n setBarValues(newArr)\n }", "title": "" }, { "docid": "f1b15ae2556758a46b6cd7a93dfeffbe", "score": "0.64232564", "text": "function draw_Bars() {\r\n let barAmount = document.getElementById(\"randomNumberAmount\").value\r\n\r\n updateList()\r\n fix_dpi()\r\n randNumArray = [];\r\n randomNumArray = [];\r\n\r\n let x = 0;\r\n let y = 0;\r\n for (i = 0; i < barAmount; i++){\r\n let num = randomNumberGenerator();\r\n width = style_width/barAmount\r\n newBar = new Bar(x,y,width ,num)\r\n newBar.draw()\r\n randNumArray.push(num);\r\n randomNumArray.push(newBar);\r\n x += width + 1\r\n\r\n }\r\n}", "title": "" }, { "docid": "d4fb82e98795ecfceb67cd30f9f594e6", "score": "0.6386023", "text": "constructor(posx) {\n\n // this.width = 35; //fixing width of bar\n this.width = 0.07 * world.size; //35 for 500x500 (scaling based on world size)\n\n this.posx = posx; //right side x position\n\n let minGap = 200;\n let maxGap = 300;\n // let minGap = 0.2 * world.size; //(100 for 500x500) (scaling based on world size)\n // let maxGap = 0.4 * world.size; //(200 for 500x500) (scaling based on world size)\n\n this.topheight = random(0 , world.height - minGap);\n this.bottomheight = random(minGap + this.topheight , maxGap + this.topheight);\n\n this.marked = false; //should be checked for collision or not (check if false)\n }", "title": "" }, { "docid": "519063a8905c613843a8a7657ca8f0a9", "score": "0.6371947", "text": "function randomBars(sortingBox)\n{console.log(sortingBox.id.substring(0,sortingBox.id.indexOf('-')));\n let name = sortingBox.id.substring(0,sortingBox.id.indexOf('-'));\n for(let i=0 ; i<number_of_bars ;i++)\n{ \n let x = Math.floor(Math.random() * 71);\n // console.log(x);\n const div = document.createElement('div');\n div.className = 'bar-'+name;\n div.style.height = x+'vh';\n div.style.order = i;\n sortingBox.appendChild(div);\n}}", "title": "" }, { "docid": "120dc9f5302197fa111cf6c6364552f5", "score": "0.6365958", "text": "prepareBasicBarGraph(spec, data) {\r\n /** Basic graph tool tip visibility check */\r\n if (spec.showToolTip) {\r\n if (this.barMarks && this.barMarks.encode && this.barMarks.encode.update) {\r\n this.barMarks.encode.update['tooltip'] = {\r\n 'signal': `{\\\"${this.xAxisField}\\\": ''+datum[\\\"${this.xAxisField}\\\"], \\\"${this.yAxisField}\\\": format(datum[\\\"${this.yAxisField}\\\"], \\\"\\\")}`\r\n };\r\n }\r\n }\r\n /** Basic graph legend check */\r\n if (spec.showLegend) {\r\n this.barLegend = [{\r\n 'title': spec.legendTitle,\r\n 'orient': spec.legendOrient,\r\n 'direction': spec.legendDirection,\r\n 'fill': 'color',\r\n 'gradientLength': { 'signal': 'clamp(height, 64, 200)' },\r\n 'symbolType': 'square'\r\n }];\r\n }\r\n /** Basic graph tool tip orientation check */\r\n if (spec.orientation === 'horizontal') {\r\n this.barScales = [\r\n {\r\n 'name': 'yscale',\r\n 'type': 'band',\r\n 'domain': { 'data': this.dataField, 'field': this.xAxisField },\r\n 'range': 'height',\r\n 'paddingOuter': 0.2,\r\n 'paddingInner': 0.1,\r\n 'reverse': true\r\n },\r\n {\r\n 'name': 'xscale',\r\n 'domain': { 'data': this.dataField, 'field': this.yAxisField },\r\n 'nice': true,\r\n 'range': [0, { 'signal': 'width' }],\r\n },\r\n {\r\n 'name': 'color',\r\n 'type': 'ordinal',\r\n 'domain': [spec.xaxis],\r\n 'range': [this.barConfig.barColourScheme[0]]\r\n }\r\n ];\r\n this.barAxes = [\r\n { 'orient': 'bottom', 'scale': 'xscale', 'title': spec.xaxis, 'grid': true },\r\n { 'orient': 'left', 'scale': 'yscale', 'title': spec.yaxis }\r\n ];\r\n this.barMarks = {\r\n 'type': 'rect',\r\n 'from': { 'data': this.dataField },\r\n 'encode': {\r\n 'update': {\r\n 'fill': { 'value': this.barConfig.barColourScheme[0] },\r\n 'fillOpacity': { 'value': 1 },\r\n 'y': { 'scale': 'yscale', 'field': this.xAxisField },\r\n 'height': { 'scale': 'yscale', 'band': 1 },\r\n 'x': { 'scale': 'xscale', 'field': this.yAxisField },\r\n 'x2': { 'scale': 'xscale', 'value': 0 }\r\n },\r\n 'hover': {\r\n 'fillOpacity': { 'value': 0.7 }\r\n }\r\n }\r\n };\r\n if (spec.showToolTip) {\r\n if (this.barMarks && this.barMarks.encode && this.barMarks.encode.update) {\r\n this.barMarks.encode.update['tooltip'] = {\r\n 'signal': `{\\\"${this.xAxisField}\\\": ''+datum[\\\"${this.xAxisField}\\\"], \\\"${this.yAxisField}\\\": format(datum[\\\"${this.yAxisField}\\\"], \\\"\\\")}`\r\n };\r\n }\r\n }\r\n }\r\n this.barGraphData.data = data;\r\n }", "title": "" }, { "docid": "8e57b59f066d626a3ba4d5b18eeb0435", "score": "0.63373744", "text": "preRenderBar() {\n const barCanvasCtx = this.barCanvas.getContext(\"2d\");\n barCanvasCtx.fillStyle = this.props.colors[23];\n barCanvasCtx.fillRect(0, 0, 6, 2);\n for (let i = 0; i <= 15; i++) {\n const colorNumber = 17 - i;\n barCanvasCtx.fillStyle = this.props.colors[colorNumber];\n const y = 32 - i * 2;\n barCanvasCtx.fillRect(0, y, 6, 2);\n }\n }", "title": "" }, { "docid": "79e76385a801a47019e313d32884bd5a", "score": "0.6294048", "text": "function initbar() {\n\n d3.json(url).then(function(data) {\n\n var samplelist = data.samples;\n //console.log(\"ANOTHER Isolating 'samples' array\")\n //console.log(samplelist)\n\n var idnumber = samplelist[0].id; //console.log(`ID number: ${idnumber}`);\n var otuids = samplelist[0].otu_ids;// console.log('OTU IDs');// console.log(otuids);\n var samplevalues = samplelist[0].sample_values;// console.log('Sample Values');// console.log(samplevalues);\n var otulables = samplelist[0].otu_labels;// console.log('OTU LABELS');// console.log(otulables);\n\n otuidsten = otuids.slice(0,10) //console.log('OTU Ids Top Ten') console.log(otuidsten)\n var otuidstenRev = otuidsten.reverse();\n otuidstenstring = []\n otuidstenRev.forEach(function(item) {otuidstenstring.push(`OTU ${item}`);});\n samplevaluesten = samplevalues.slice(0,10)// console.log('Sample Values Top Ten')// console.log(samplevaluesten)\n var samplevaluestenRev = samplevaluesten.reverse();\n otulablesten = otulables.slice(0,10)// console.log('OTU Labels Top Ten')// console.log(otulablesten)\n var otulablestenRev = otulablesten.reverse();\n\n var trace1 = {\n x: samplevaluestenRev,\n y: otuidstenstring,\n type: \"bar\",\n orientation: 'h',\n text: otulablestenRev,\n\n //text = otulablestenRev,\n //hoverinfo: 'otulablestenRev'\n };\n\n var bardata = [trace1];\n\n var layout = {\n //title: \"'Bar' Chart\",\n //xaxis: { title: \"Drinks\"},\n //yaxis: { title: \"% of Drinks Ordered\"}\n };\n\n Plotly.newPlot(\"bar\", bardata);\n });\n}", "title": "" }, { "docid": "af9404bf7c4737c72d4ddb1432142595", "score": "0.62818646", "text": "function getBarsData(){\n var numOfBars = 11;\n var barHeight = 0;\n var paddingRight = 0;\n for (barIndex = 0; barIndex < numOfBars; barIndex++){\n\n //Get the height\n barHeight = Math.floor(Math.random() * (500 - 150 + 1)) + 150;\n marginRight = Math.floor(Math.random() * (12 - 3 + 1)) + 3;\n\n //Get the margin\n var barHeightToString = (barHeight.toString() + \"px\");\n var marginRightToString = (marginRight.toString() + \"px\");\n \n //Get the color\n var colorIndex = Math.floor(Math.random() * ((colors.length - 1) - 0 + 1)) + 0;\n var color = colors[colorIndex];\n\n //Load the bars variable\n var temp = new Bar(barHeightToString,marginRightToString,color);\n bars.push(temp);\n \n //Set the outer divs for each bar\n var leftBarDOM = document.getElementById(\"LeftBar\" + barIndex.toString());\n leftBarDOM.style.height = barHeightToString;\n leftBarDOM.style.marginRight = marginRightToString;\n \n var rightBarIndex = numOfBars - barIndex - 1;\n var rightBarDOM = document.getElementById(\"RightBar\" + rightBarIndex.toString());\n rightBarDOM.style.height = barHeightToString;\n rightBarDOM.style.marginLeft = marginRightToString;\n \n //Set the colors of each bar\n var leftColorBarDOM = document.getElementById(\"LeftColorBar\" + barIndex.toString());\n var rightColoBarDOM = document.getElementById(\"RightColorBar\" + rightBarIndex.toString());\n leftColorBarDOM.style.backgroundColor = bars[barIndex].color;\n rightColoBarDOM.style.backgroundColor = bars[barIndex].color;\n }\n}", "title": "" }, { "docid": "bd12f583be0efc9338637ea3e493cf30", "score": "0.62335044", "text": "function createBars() {\n const canvasWidth = document.getElementById(\"bars-canvas\").offsetWidth;\n var originalArray = [];\n var originalStates = [];\n const max = 256;\n const min = 1;\n var bars = '';\n for(var i=0; i<(slider.value); i++) {\n // Assign random value to each array element\n originalArray[i] = Math.floor(Math.random()*(max - min)) + min;\n // Assign the value 0 for each of the created values since they have not been handled yet\n originalStates[i] = 0;\n var barColor = getColorStart(originalArray[i]);\n bars += '<td valign=\"bottom\"><div style=\"height:' + originalArray[i] + 'px; width: ' + ((canvasWidth-slider.value)/2/(slider.value)-1) + 'px; background-color:'+ barColor +'; color: '+ barColor +'; font-size: 1px; margin: 1px\"></div></td>';\n }\n document.getElementById(\"bars-canvas\").innerHTML = '<div style=\"position: absolute; bottom: 0; left: 25%\"><table cellspacing=\"0\" cellpadding=\"0\"><tr>' + bars + '</tr></table></div>';\n console.log(originalArray);\n console.log(originalStates);\n return [originalArray, originalStates];\n}", "title": "" }, { "docid": "e9eb665c2fbc3b5292f408ce0d0928f7", "score": "0.6220595", "text": "renderBars() {\n const bars = []\n for(var i = 0; i < this.state.barsNum; i++){\n bars.push(<Bar key={i} />);\n }\n return bars;\n }", "title": "" }, { "docid": "a8e60176ea04069595443e7d0bb7ecee", "score": "0.6193695", "text": "function barPlot(sampleID) {\n //Set data.samples array to variable for clarity\n let sampleData = data.samples;\n //Filter sampleData to match function input\n let matchedSample = sampleData.filter(sample => sample.id == sampleID);\n //Pull filtered data's otu_id from array\n let match = matchedSample[0];\n //Set variables equal to data from match for plotting\n let matchData = match.sample_values;\n let matchLabel = match.otu_ids;\n let matchText = match.otu_labels;\n //Slice 10 largest values\n let slicedData = matchData.slice(0,10);\n let slicedLabel = matchLabel.slice(0,10);\n let slicedText = matchText.slice(0,10);\n //Reverse for Plotly defaults\n let revData = slicedData.reverse();\n let revLabel = slicedLabel.reverse();\n let revText = slicedText.reverse();\n //Map labels scaling and appearance on\n let labels = revLabel.map(label => `OTU ${label}`);\n //Create new title with sample name\n let newLayout = {\n title: `Top 10 Belly Bacteria for Test Subject: ${sampleID}`,\n };\n //Restyle horizontal bar chart\n Plotly.restyle(\"bar\", \"x\", [revData]);\n Plotly.restyle(\"bar\", \"y\", [labels]);\n Plotly.restyle(\"bar\", \"text\", [revText]);\n Plotly.relayout(\"bar\", newLayout);\n }", "title": "" }, { "docid": "6bbb7603ac66d3b3c52b92ee70ba56cb", "score": "0.61876804", "text": "function init () {\n var bar = createBar(rm)\n el.appendChild(bar.el)\n applyGo = bar.go\n }", "title": "" }, { "docid": "84f86651fb81849f6fd6972ce5a22229", "score": "0.6132181", "text": "function barPlot() {\n\n //Selecting the selection value and assigning to a variable (current)\n var selElement = d3.select(\"#selection\");\n var selValue = selElement.property(\"value\");\n\n // Finding the selected value and assigning to a variable\n var sample = samples.find(value => value.id == selValue);\n\n // Slicing the data to get only the first 10 values, assigning to variables to create plot\n var sample_values = sample.sample_values.slice(0, 10);\n var otu_ids = sample.otu_ids.slice(0, 10);\n var otu_labels = sample.otu_labels.slice(0, 10);\n\n //Creating the plot with previous variables\n //Trace\n var trace = {\n x: sample_values,\n y: otu_ids,\n type: \"bar\",\n orientation: \"h\",\n text: otu_labels,\n };\n //Assigning trace to a variable called data\n var data = [trace];\n //Building plot layout\n var layout = {\n xaxis: {\n title: \"Sample Value\"\n },\n yaxis: {\n type: \"category\",\n title: \"OTU ID\",\n showgrid: \"true\",\n side: \"top\"\n },\n title: `Test Subject: ${selValue}`,\n autosize: \"true\"\n }\n //Using plotly to create new plot\n Plotly.newPlot(\"plot1\", data, layout), { responsive: true };\n }", "title": "" }, { "docid": "e55dfe6611cbf2474608e7976116a3e7", "score": "0.61303675", "text": "function makeBarChart(idX){\n let otuId = sampleData.samples[idX].otu_ids;\n let otuLabels = sampleData.samples[idX].otu_labels;\n let sampleValues = sampleData.samples[idX].sample_values;\n // console.log(otuId);\n // console.log(otuLabels);\n // console.log(sampleValues);\n var trace1 = {\n x: sampleValues.slice(0,10).reverse(), \n y: otuId.slice(0,10).reverse().map(sampleValues=> \"OTU \" + sampleValues),\n text: otuLabels.slice(0,10).reverse(), \n name: \"Top 10 Belly Button Bacteria Found\",\n type: \"bar\", \n orientation: \"h\"\n };\n var data = [trace1];\n var layout = \n {\n title: \n {\n text: \"Belly Button Bacteria\",\n font: {size: 24}\n },\n xaxis: \n {\n title: \n {\n text: `Subject: ${sampleData.samples[idX].id}`,\n font: {size: 24}\n }\n },\n margin: \n {\n l: 100,\n r: 100,\n t: 100,\n b: 100\n }\n };\n Plotly.react(\"bar\", data, layout);\n}", "title": "" }, { "docid": "5c34b125b34eaff7650a8cf0c87dfeae", "score": "0.6118393", "text": "function BarPlot(props) {\n // The initial value of props.sample is [] becasue the initial value of Dashboard state.selected sample is []\n // The Dashboard state.selectedSample is updated to \"{id: \"940\", otu_ids: Array(80), otu_labels: Array(8…}\" by the mothod componentDidMount after Dashboard component being rendered\n // When the component BarPlot is first rendered, the props.sample is [], there would be an error \"otu_ids of undefined\" without \"if (props.sample.length > 0)\"\n if (props.sample.length > 0) {\n var data = [\n {\n type: 'bar',\n y: props.sample[0].otu_ids\n .slice(0, 10)\n .map((id) => 'OTU ' + id)\n .reverse(),\n x: props.sample[0].sample_values.slice(0, 10).reverse(),\n orientation: 'h',\n },\n ];\n\n var layout = {\n yaxis: { title: 'OTU ID' },\n xaxis: { title: 'Sample Value' },\n showlegend: false,\n // height: 500,\n // width: 300,\n };\n Plotly.newPlot('bar', data, layout);\n }\n\n return <div id=\"bar\"></div>;\n}", "title": "" }, { "docid": "27e2106e730600eade10c69490de4dd9", "score": "0.61138177", "text": "function genBar(height, width, distFromLeft, color, item, iter) {\n /****************************************************************\n * The height and width of the bars is determined by the *\n * number of bars and the total number of data points, and the *\n * bars relative share of data points *\n ****************************************************************/\n var bar = document.createElement('div');\n bar.setAttribute('class', 'barClass');\n bar.style.height = height + 'px';\n bar.style.width = width + 'px';\n bar.id = iter;\n var graph = document.getElementById('xyAxis' + iter);\n graph.appendChild(bar);\n var fromTop = (300 - height) + \"px\"; \n bar.style.top = fromTop;\n bar.style.left = distFromLeft + 'px';\n bar.style.backgroundColor = color;\n \n //create list item and set color\n // var listItem = document.createElement('li');\n // listItem.innerHTML = item;\n // listItem.style.color = color;\n // document.getElementById('list' + iter).appendChild(listItem);\n }", "title": "" }, { "docid": "cb498fcc08c5a9f9a12725f1d30ec7ab", "score": "0.60465795", "text": "function generateBars(n=-1){\n\tbars=[];\n\tlet container=document.getElementById(\"container\");\n\tn=n<0?Math.random()*20:n;\n\tfor(let i=0;i<n;i++)\n\t\tbars.push('<div class=\"bar\" id=\"'+i+'\" style=\"height:'+Math.floor(2+Math.random()*98)+'%\"></div>');\n\tcontainer.innerHTML=bars.join('');\n}", "title": "" }, { "docid": "2a0f2eec5e670ace90d6d3f20392990e", "score": "0.6027074", "text": "chooseData() {\n\n var currentPlot = d3.select(\"#dataset\").property(\"value\");\n this.updateBarChart(currentPlot);\n \n\n }", "title": "" }, { "docid": "db8c4bb199b2681a5b70e91a48ccda30", "score": "0.602416", "text": "createValueLabels(data) {\n\n if (data == null) return;\n\n // The labels\n let labels = [];\n\n // For each point, create a bar\n for (var i = 0; i < data.length; i++) {\n\n if (data[i].y == null) continue;\n\n // The single datum\n let value = data[i].y;\n\n // Transform the value if necessary\n if (this.props.valueLabelTransform) value = this.props.valueLabelTransform(value, i);\n\n // Positioning of the text\n let x = this.x(data[i].x);\n let y = this.y(data[i].y);\n let key = 'Label-' + Math.random();\n let label;\n\n if (this.props.valueLabelTransform) label = (\n <Text style={[styles.valueLabel, {color: this.state.settings.valueLabelColor}]}>{value}</Text>\n )\n\n // Define the left shift based on the length of the string\n let leftShift = 8;\n if (value.length == 1) leftShift = 4;\n else if (value.length == 2) leftShift = 7;\n else if (value.length == 3) leftShift = 10;\n\n // Create the text element\n let element = (\n <View key={key} style={{position: 'absolute', left: x - leftShift, top: y - 24, alignItems: 'center'}}>\n {label}\n </View>\n );\n\n labels.push(element);\n }\n\n return labels;\n }", "title": "" }, { "docid": "c738e55b2c2724e82770e8b429dbd7a4", "score": "0.600165", "text": "_drawAttributeBars() {\n const bars = new PIXI.Container();\n bars.bar1 = bars.addChild(new PIXI.Graphics());\n bars.bar2 = bars.addChild(new PIXI.Graphics());\n return bars;\n }", "title": "" }, { "docid": "7b354b9cd758a9e57a44ec02bdd53bd5", "score": "0.5997021", "text": "function BarChar() {\n const {state} = useContext(GlobalStore);\n\n // Visual settings for the chart\n const barcharOptions = {\n title:{\n display:true,\n text:'Número de seguidores por usuario',\n fontSize:20\n },\n legend:{\n display:true,\n position:'top'\n }\n };\n\n return (\n <div className='BarChar'>\n <Bar\n data={getBarcharDataset(state.barcharData)}\n options={barcharOptions}\n />\n </div>\n );\n}", "title": "" }, { "docid": "7252084fd00a59c109e5493df6db2c07", "score": "0.59919906", "text": "function barChart() {\n d3.json('samples.json').then(function(data) {\n\n var selection= d3.select('#selDataset');\n var inputValue= selection.property('value');\n demoFill(inputValue);\n\n bubbles(inputValue);\n \n data.samples.forEach((entry)=> {\n if (entry.id == inputValue) {\n var sampV= entry.sample_values.slice(0, 10);\n var oids= entry.otu_ids.slice(0,10).map(i=>'OTU ID: '+i);\n //console.log(sampV);\n //console.log(oids);\n\n var trace1= {\n x: sampV,\n y: oids,\n type: \"bar\",\n orientation: 'h'\n };\n \n var data=[trace1];\n \n var layout = {\n title: `Belly Button ID: ${inputValue}`,\n };\n \n Plotly.newPlot('bar', data, layout);\n \n }\n\n \n });\n });\n}", "title": "" }, { "docid": "6c7ca18da65778587ee5d3ce6ccbd02d", "score": "0.59801096", "text": "function setup({data, element}) {\n\n let dataOrder = data.slice(); //store data without mutating\n\n let buildChart = newElement(div);\n let $buildChart = $(buildChart);\n $buildChart.attr('id', 'chart');\n\n let revData = [...data].reverse(); // bc flipped in css for styling\n\n barFraction = (100 - data.length) / data.length;\n\n/** add bars **/\n for (let num of revData) {\n let dataLabel = \"<p>\" + num + \"</p>\";\n var newdiv = newElement(div, num, \"bar-num\");\n let $newdiv = $(newdiv);\n $newdiv.append(dataLabel);\n $newdiv.addClass(\"bar-num\");\n $newdiv.attr('id', num);\n\n let dataIndex = dataOrder.indexOf(num);\n Object.keys(xlabels[num] = \"Index:\" + dataIndex);\n\n/** set bar widths **/\n barWidth = Math.floor(barFraction) + \"%\";\n $newdiv.css(\"width\", barWidth); // bar width same for all\n\n/** create each bars height based on entry value **/\n //subtract px of bar label font size from css\n let newheight = (num*yAxisSteps) - (24/chartHeight) + \"%\";\n $newdiv.css(\"height\" , newheight);\n\n $buildChart.append(newdiv);\n\n } //end for loop of data entries\n\nrootDims(element, chartHeight, chartWidth);\n$(element).append(buildChart);\n\nreturn;\n}", "title": "" }, { "docid": "c4997b95e90910eded6f9a47e8c820fa", "score": "0.59743184", "text": "handleUpdate(){\n const chartRef = this.barChartRef.current.getContext('2d');\n\n let dataObj = JSON.parse(JSON.stringify(this.props.data));\n dataObj.splice(0,1);\n \n let moods = [];\n let dataToPlot = [];\n if (dataObj.length != 0){\n for (let i = 0; i < 21; i++) {\n moods.push(0);\n }\n \n dataObj.forEach(dataSlice => {\n let val = Math.round(dataSlice.mood * 10) / 10;\n moods[Math.round((val + 1) * 10)] += 1;\n });\n \n for (let i = 0; i < moods.length; i++) {\n moods[i] = (moods[i] / dataObj.length) * 100;\n }\n \n let total = 0;\n for (let i = 0; i < moods.length; i++) {\n total += moods[i];\n }\n \n dataToPlot = moods;\n }\n \n let xAxis = ['-1', '-0.9', '-0.8', '-0.7', '-0.6', '-0.5', '-0.4', '-0.3', '-0.2', '-0.1', '0', '0.1', '0.2', '0.3', '0.4', '0.5', '0.6', '0.7', '0.8', '0.9', '1']\n \n new Chart(chartRef, {\n // The type of chart we want to create\n type: 'bar',\n \n // The data for our dataset\n data: {\n labels: xAxis,\n datasets: [{\n borderColor: '#43e2b2',\n data: dataToPlot,\n backgroundColor: ['#e05841', '#E06641', '#E07341', '#E08141', '#E08E41', '#E09C41', '#E0AA41', '#E0B741', '#E0C541', '#E0D241', '#E0E041', '#D0E042', '#C0E042', '#B0E043', '#A0E043', '#91E144', '#81E145', '#71E145', '#61E146', '#51E146', '#41E147']\n }]\n },\n \n // Configuration options go here\n options: {\n tooltips: false,\n title: {\n display: true,\n text: 'Mood over Responses'\n },\n legend: {\n display: false,\n },\n scales: {\n yAxes: [{\n display: true,\n ticks: {\n min: 0,\n stepSize: 5\n }\n }],\n xAxes: [{\n display: false,\n }]\n }\n }\n });\n }", "title": "" }, { "docid": "50210c0804c8d98ddd0445df372cc8f9", "score": "0.59587204", "text": "function barBubbleDemo(id) {\n d3.json(\"data/samples.json\").then (bellyButton =>{\n // metadata for demographic panel\n var metadata = bellyButton.metadata.filter(d => d.id.toString() === id)[0];\n // update demographic information panel\n var demographic_info = d3.select(\"#sample-metadata\");\n demographic_info.html(\"\");\n Object.entries(metadata).forEach((key, value) => { \n demographic_info.append(\"h5\").text(key + \": \" + value); \n });\n\n //top10 values for chart. reverse took too long for something so simple\n //2 step sorting for changes to dropdown\n var sort_withID = bellyButton.samples.filter(s => s.id.toString() === id)[0];\n var sample_values = sort_withID.sample_values.slice(0,10).reverse();\n // hovertext for the chart, reversed\n var otu_labels = sort_withID.otu_labels.slice(0,10).reverse();\n // ids, reversed, add \"OTU\" for label like example in Readme\n var otu_ids = (sort_withID.otu_ids.slice(0, 10).reverse()).map(d => \"OTU \" + d); \n\n // update demographic information panel\n var demographic_info = d3.select(\"#sample-metadata\");\n demographic_info.html(\"\");\n Object.entries(metadata).forEach((key) => { \n demographic_info.append(\"h5\").text(key[0] + \": \" + key[1]); \n });\n\n var wash_values = bellyButton.metadata.filter(s => s.id.toString() === id)[0];\n var wfreq = wash_values.wfreq\n \n // Bonus gauge chart. (the needle is off by just a little bit)\n var degrees = 180-(wfreq*20);\n //alert(degrees);\n radius = .5;\n var radians = degrees * Math.PI / 180;\n var x = radius * Math.cos(radians);\n var y = radius * Math.sin(radians);\n \n var path1 = (degrees < 45 || degrees > 135) ? 'M -0.0 -0.025 L 0.0 0.025 L ' : 'M -0.025 -0.0 L 0.025 0.0 L ';\n var mainPath = path1,\n pathX = String(x),\n space = ' ',\n pathY = String(y),\n pathEnd = ' Z';\n var path = mainPath.concat(pathX,space,pathY,pathEnd);\n\n var data2 = [{ type: 'scatter',\n x: [0], y:[0],\n marker: {size: 14, color:'850000'},\n showlegend: false,\n name: 'Washing Frequency',\n text: wfreq,},\n { values: [ 1,1,1,1,1,1,1,1,1,9],\n rotation: 90,\n direction: \"clockwise\", \n text: ['0-1','1-2','2-3','3-4','4-5','5-6','6-7','7-8','8-9'],\n textinfo: 'text',\n textposition:'inside', \n marker: {colors:['rgb(255, 255, 299,)', 'rgb(247, 252, 185)',\n 'rgb(217, 240, 163)', 'rgb(202, 209, 95)',\n 'rgb(173, 221, 142)', 'rgb(120, 198, 121)', 'rgb(65, 171, 93)',\n 'rgb(35, 132, 67)',\"rgb(0, 104, 55)\", \"white\"]},\n hoverinfo: 'none',\n hole: .5,\n type: 'pie',\n showlegend: false\n }];\n\n var layout2 = {\n shapes:[{\n type: 'path',\n path: path,\n fillcolor: '850000',\n line: {\n color: '850000'\n }\n }],\n title: { text: \"<b>Belly Button Washing Frequency</b><br>Scrubs per Week\", font: { size: 17 } },\n height: 500,\n width: 600,\n xaxis: {zeroline:false, showticklabels:false,\n showgrid: false, range: [-1, 1]},\n yaxis: {zeroline:false, showticklabels:false,\n showgrid: false, range: [-1, 1]}\n };\n\n Plotly.newPlot('gauge', data2, layout2);\n \n // different type of gauge chart\n // var data2 = [\n // {\n // type: \"indicator\",\n // mode: \"gauge+number\",\n // value: wfreq,\n // title: { text: \"<b>Belly Button Washing Frequency</b><br>Scrubs per Week\", font: { size: 24 } },\n // gauge: {\n // axis: { range: [null, 9], tickwidth: 1, dtick: 1},\n // bar: { color: \"red\", thickness: .1 },\n // steps: [\n // { range: [0, 1], color: 'rgb(255, 255, 229)'},\n // { range: [1, 2], color: \"rgb(247, 252, 185)\" },\n // { range: [2, 3], color: \"rgb(255, 255, 229)\" },\n // { range: [3, 4], color: \"rgb(217, 240, 163)\" },\n // { range: [4, 5], color: \"rgb(173, 221, 142)\" },\n // { range: [5, 6], color: \"rgb(120, 198, 121)\" },\n // { range: [6, 7], color: \"rgb(65, 171, 93)\" },\n // { range: [7, 8], color: \"rgb(35, 132, 67)\" },\n // { range: [8, 9], color: \"rgb(0, 104, 55)\"},\n // ],\n // }\n // }\n // ];\n \n // var layout2 = {\n // width: 600,\n // height: 500,\n // margin: { t: 0, b: 0 },\n // }; \n // Plotly.newPlot('gauge', data2, layout2);\n \n // Top10 Bar Chart\n var trace = {\n x: sample_values,\n y: otu_ids,\n type:\"bar\",\n text: otu_labels,\n marker: {\n color: 'blue'}, \n orientation: \"h\",\n };\n var data = [trace];\n var layout = {\n title: \"Top 10 OTUs<br>(Operational Taxonomic Units)\",\n width: 600,\n height: 500,\n // xaxis: {\n // title:\"Sample Values\"\n // },\n // yaxis: {\n // title:\"OTU IDs\"\n // }\n };\n Plotly.newPlot(\"bar\", data, layout);\n\n // Bubble chart, so simple yet so much time to figure out (data was complicated on this one)\n var trace1 = {\n x: sort_withID.otu_ids,\n y: sort_withID.sample_values,\n mode: \"markers\",\n marker: {\n size: sort_withID.sample_values,\n color: sort_withID.otu_ids\n },\n text: sort_withID.otu_labels \n };\n var layout1 = {\n xaxis:{title: \"OTU ID\"\n }\n };\n var data1 = [trace1];\n Plotly.newPlot(\"bubble\", data1, layout1); \n });\n}", "title": "" }, { "docid": "7520a98fa76f8591f805a1b73918208e", "score": "0.59584427", "text": "function buildBarchart(sample) {\n\n d3.json(\"samples.json\").then((BBdata) => {\n console.log(BBdata);\n var dataSample = BBdata.samples;\n\n var resultArray = dataSample.filter(sampleObject => sampleObject.id == sample);\n\n var resultItem = resultArray[0];\n console.log(resultItem);\n\n var otu_ids = resultItem.otu_ids;\n var otu_labels = resultItem.otu_labels;\n var sample_values = resultItem.sample_values;\n\n\n var yticks = otu_ids.slice(0,10).map(otuID => `OTU ${otuID}`).reverse();\n \n \n // Create the Trace\n var trace1 = [{\n x: sample_values.slice(0,10).reverse(),\n y: yticks,\n type: \"bar\",\n orientation: \"h\",\n text: otu_labels.slice(0,10).reverse(),\n }];\n \n // Create the data array for the bar chart plot\n var bardata = trace1;\n \n // Define the plot layout\n var layout = {\n title: \"Top 10 Bacteria Cultures Found\",\n margin: {t:30, l:170},\n xaxis: { title: \"Sample Value\"},\n yaxis: { title: \"sample IDs\" },\n };\n\n\n \n // Plot the chart to a div tag with id \"bar\"\n Plotly.newPlot(\"bar\", bardata, layout);\n\n\n\n }); \n}", "title": "" }, { "docid": "6bbd236e6aea392a035e70c6494171e6", "score": "0.5952405", "text": "function generateRandom(){\n\n // destory the old chart data before generating a new one\n if(barChart != null){\n barChart.destroy();\n }\n\n // the array to store all building heights\n let heightsArray = [];\n let backgroundArrays = [];\n let buildingNames = [];\n\n let maxHeightFound = 0;\n\n // generate random building heights \n for(let i = 0; i < quantSlider.value; i++){\n\n // the temporary random height we will push into the height array \n let tempRandomHeight = Math.ceil(rangeSlider.value * Math.random())\n\n // the magic if statement to find the sunset buildings\n if(tempRandomHeight > maxHeightFound){\n maxHeightFound = tempRandomHeight;\n // each time we find one that can see the sun we make the building orange\n backgroundArrays.push('#ff7b00');\n }\n else{ // the building is blocked by a larger one\n backgroundArrays.push('#007bff');\n }\n \n // assign the height and building names to the arrays\n heightsArray.push(tempRandomHeight);\n buildingNames.push(`Building ${i+1}`);\n }\n\n console.log(heightsArray);\n\n barChart = new Chart(context, {\n type:'bar',\n data:{\n labels:buildingNames,\n datasets:[{\n label: 'Height',\n data:heightsArray,\n backgroundColor:backgroundArrays,\n }], \n },\n options: {\n tooltips:{\n enabled:true\n },\n legend:{\n display:false\n },\n title:{\n display:true,\n text: \"Building Heights\",\n fontSize:25\n },\n scales: {\n yAxes: [{\n ticks: {\n beginAtZero: true\n }\n }]\n }\n }\n });\n}", "title": "" }, { "docid": "95cbf5c1f3eaca890cd90e3eea36aa7a", "score": "0.59441274", "text": "function barGraph(patientId) {\n getData((importedData) => {\n // pulling out patient sample data\n samples = importedData.samples;\n sample = samples.filter(o => o.id === patientId);\n // console.log('sample');\n // console.log(sample);\n\n // getting arrays of the data for plotting\n // this is for the y axis (since this vertical)\n otuIds = sample[0].otu_ids;\n // console.log(otuIds);\n\n // this is for the x axis\n sampleValues = sample[0].sample_values;\n // console.log(sampleValues);\n\n // this is for the hover text\n otuLabels = sample[0].otu_labels;\n\n\n // This makes a String out of the number Otu for the ticks\n var otuIdsSlice = otuIds.slice(0, 10).reverse();\n var otuIdsSliceStr = [];\n // adding OTU to labels\n for (i = 0; i < otuIdsSlice.length; i++) {\n otuIdsSliceStr[i] = `OTU ${otuIdsSlice[i]}`;\n }\n\n var traceBar = {\n // I want only the first tenn (top) and i them in descenting order\n y: otuIdsSliceStr,\n x: sampleValues.slice(0, 10).reverse(),\n text: otuLabels.slice(0, 10).reverse(),\n type: 'bar',\n orientation: 'h'\n };\n\n var data = [traceBar];\n\n var layout = {\n // title: `Patient ${patientId}'s Belly Button Bacteria`\n };\n\n Plotly.newPlot('bar', data, layout);\n });\n}", "title": "" }, { "docid": "9255e01202532b9f71c6ec8d5dbf3986", "score": "0.59408534", "text": "function DrawBarGraph(sampleID) {\n d3.json(\"data/samples.json\").then(data => {\n var samples = data.samples;\n var resultsArray = samples.filter(s => s.id == sampleID);\n var result = resultsArray[0]\n var otu_ids = result.otu_ids;\n var otu_labels = result.otu_labels;\n var sample_values = result.sample_values;\n\n yticks = otu_ids.slice(0, 10).map(otuID => `OTU ${otuID}`).reverse();\n\n var barData = {\n x: sample_values.slice(0, 10).reverse(),\n y: yticks,\n type: \"bar\",\n text: otu_labels.slice(0, 10).reverse(),\n orientation: \"h\"\n }\n var barArray = [barData];\n var barLayout = {\n title: \"Top 10 Bacteria Cultures Found\",\n margin: { t: 30, 1: 150 }\n }\n Plotly.newPlot(\"bar\", barArray, barLayout);\n });\n}", "title": "" }, { "docid": "5a32be28c06bd2a3938efd6ca472b45d", "score": "0.5935225", "text": "function generateDataMultiBar() {\n return stream_layers(3,50+Math.random()*50,.1).map(function(data, i) {\n return {\n key: 'Stream' + i,\n values: data\n };\n });\n}", "title": "" }, { "docid": "ceba14e5c517b31563d839bff10cdfa0", "score": "0.59220815", "text": "render(condition) {\n setupBarData(condition)\n\n return Chart;\n }", "title": "" }, { "docid": "9d939af0ecae4be0c09a26450a94716e", "score": "0.58873385", "text": "_postdraw() {\n // Set position\n let posY = this.barNumber === 0 ? this.token.h - this.h : 0;\n this.bar.position.set(0, posY);\n }", "title": "" }, { "docid": "196bc89d494f72c193196a6caa3c9a32", "score": "0.58862394", "text": "function buildCharts(sample) {\n d3.json(\"samples.json\").then((data) => {\n var metadata = data.samples;\n var resultArray = metadata.filter(sampleObj => sampleObj.id == sample);\n var bacteria = resultArray.map(sampleValue => sampleValue.sample_values);\n var x = bacteria[0].slice(0, 10).reverse();\n console.log(x)\n var bacteriaName = resultArray.map(otuID => otuID.otu_ids);\n var yBacteriaName = bacteriaName[0].slice(0, 10).reverse();\n console.log(yBacteriaName)\n var y = yBacteriaName.map(i => \"OTU\" + i);\n var trace = {\n x: x,\n y: y,\n type: \"bar\",\n orientation: \"h\"\n };\n var PANEL = d3.select(\"#bar\");\n PANEL.html(\"\");\n Plotly.newPlot(\"bar\", [trace]);\n }\n)}", "title": "" }, { "docid": "7cb41499294aa152a17864dfe81f5cee", "score": "0.58842814", "text": "resetArray() {\n if(!isRunning.value) {\n const array = [];\n for (let i = 0; i <numberOfArrayBars; i++) {\n let max = 80;\n let min = 1;\n array.push(Math.floor(Math.random() * (max - min + 1) + min));\n }\n this.setState({ array });\n const arrayBars = document.getElementsByClassName(\"array-bar\");\n var arrayLength = arrayBars.length;\n for (let j = 0; j < arrayLength; j++) {\n var jBarStyle = arrayBars[j].style;\n jBarStyle.backgroundColor =\"#FE6B64\";\n }\n }\n }", "title": "" }, { "docid": "31302c277577ff9b5a7a4d2a528b4ad6", "score": "0.5884016", "text": "function drawBarUpdate(ob){\n var width = ob.width;\n console.log(ob);\n d3.select(\".bar-rect-\"+ob.k).selectAll(\"rect\").data(data.genomicProfileList[ob.k].mutationList)\n .attr({\n width:width-5,\n x:function(d,i){ return i*(width)},\n });\n\n d3.select(\".bar-text-\"+ob.k).selectAll(\"text\").data(data.genomicProfileList[ob.k].mutationList).text(function(d){\n if (ob.val == \"geneSymbol\") {\n return d.geneSymbol;\n } else if (ob.val == \"strand\") {\n return d.strand;\n } else {\n return d.chromosome.substring(3,5);\n }\n })\n .attr({\n \"font-size\":\"10px\",\n x:function(d,i){ return i*(width)+ob.offset},\n })\n .on(\"click\",function(d,i){\n d3.select(\".bar-rect-\"+ob.k).select(\"rect:nth-child(\"+(i+1)+\")\").style(\"fill\",\"red\");\n var obAnalyticDet = {\n entrezGeneId: d.entrezGeneId,\n geneSymbol: d.geneSymbol,\n referenceGenome: d.referenceGenome,\n chromosome: d.chromosome,\n dnaStartPosition: d.dnaStartPosition,\n dnaEndPosition: d.dnaEndPosition,\n strand: d.strand,\n variantClassification: d.variantClassification,\n referenceAllele: d.referenceAllele,\n variantAllele: d.variantAllele,\n alternativeAlleleReads: d.alternativeAlleleReads,\n referenceAlleleReads: d.referenceAlleleReads,\n dbSnpRsId: d.dbSnpRsId,\n dbSnpRsValStatus: d.dbSnpRsValStatus,\n annotationTranscript: d.annotationTranscript,\n transcriptStrand: d.transcriptStrand,\n cDnaChange: d.cDnaChange,\n codonChange: d.codonChange,\n aaChange: d.aaChange,\n otherTranscript: d.otherTranscript,\n refseqMrnaId: d.refseqMrnaId,\n refseqProtId: d.refseqProtId,\n swissprotAccession: d.swissprotAccession,\n swissprotEntry: d.swissprotEntry,\n uniprotAaPosition: d.uniprotAaPosition,\n uniprotRegion: d.uniprotRegion,\n uniprotSite: d.uniprotSite,\n vertebrateAaAlignment: d.vertebrateAaAlignment\n }\n analyticDetails(obAnalyticDet);\n });\n }", "title": "" }, { "docid": "7a75f6ca9455b214c59647773e7d238f", "score": "0.5881365", "text": "constructor(width,height) {\n this.width = width;\n this.height = height;\n\n this.gravity = 0.5;\n this.speed = 2; //how speed are bars going\n\n this.totalBars = 10;\n this.barspace = 200;\n this.bar = []; //array of all bar objects\n\n //a description of world in small packet\n this.metadata = {\n width : this.width,\n height : this.height,\n gravity : this.gravity,\n speed : this.speed\n };\n\n this.ball = new Ball(this.metadata);\n\n for (let i=0;i<this.totalBars;i++) {\n this.bar[i] = new Bar(this.width+(i*30)+(i*this.barspace),this.metadata);\n }\n }", "title": "" }, { "docid": "9c5b7330e0ed023c0601b1fa567ae20c", "score": "0.5876253", "text": "setData(spec) {\r\n /** config object for font tye and font size */\r\n this.barScales = [\r\n {\r\n 'name': 'xscale',\r\n 'type': 'band',\r\n 'domain': { 'data': this.dataField, 'field': this.xAxisField },\r\n 'range': 'width',\r\n 'paddingOuter': 0.2,\r\n 'paddingInner': 0.1,\r\n 'round': true\r\n },\r\n {\r\n 'name': 'yscale',\r\n 'domain': { 'data': this.dataField, 'field': this.yAxisField },\r\n 'nice': true,\r\n 'range': 'height'\r\n },\r\n {\r\n 'name': 'color',\r\n 'type': 'ordinal',\r\n 'domain': [spec.xaxis],\r\n 'range': [this.barConfig.barColourScheme[0]]\r\n }\r\n ];\r\n this.barAxes = [\r\n { 'orient': 'bottom', 'scale': 'xscale', 'title': spec.xaxis },\r\n { 'orient': 'left', 'scale': 'yscale', 'title': spec.yaxis, 'grid': true }\r\n ];\r\n this.barMarks = {\r\n 'type': 'rect',\r\n 'from': { 'data': this.dataField },\r\n 'encode': {\r\n 'update': {\r\n 'fill': { 'value': this.barConfig.barColourScheme[0] },\r\n 'fillOpacity': { 'value': 1 },\r\n 'x': { 'scale': 'xscale', 'field': this.xAxisField },\r\n 'width': { 'scale': 'xscale', 'band': 1 },\r\n 'y': { 'scale': 'yscale', 'field': this.yAxisField },\r\n 'y2': { 'scale': 'yscale', 'value': 0 }\r\n },\r\n 'hover': {\r\n 'fillOpacity': { 'value': 0.7 }\r\n }\r\n }\r\n };\r\n }", "title": "" }, { "docid": "419e51dea774e5d22824a0ddd5bc2a65", "score": "0.5864447", "text": "function updateBarChart(sample) {\n let newBarData = {\n x: [sample.sample_values.slice(0, 10).reverse()],\n y: [sample.otu_ids.map(e => `OTU ${e}`).slice(0, 10).reverse()],\n text: [sample.otu_labels.slice(0, 10).reverse()],\n type: \"bar\",\n orientation: 'h'\n };\n\n Plotly.restyle(\"bar\", newBarData);\n }", "title": "" }, { "docid": "6d15cb2099a74b74a3d098aef2e4ff4f", "score": "0.58609796", "text": "function renderBrushed(params) {\n const geoScatterSeries = params.batch[0].selected[0];\n const dataIndexes = geoScatterSeries.dataIndex;\n const selectedItems = [];\n const categoryData = [];\n const barData = [];\n const maxBar = 30;\n\n if(dataIndexes.length == 0) {\n return;\n }\n if(dataIndexes.length !== 0) {\n dataIndexes.forEach(d => {\n const dataItem = option.series[0].data[d];\n selectedItems.push(dataItem);\n });\n\n selectedItems.sort((a, b) => b.value[2] - a.value[2]);\n\n for (var i = 0; i < Math.min(selectedItems.length, maxBar); i++) {\n categoryData.push(selectedItems[i].name);\n barData.push(selectedItems[i].value[2]);\n };\n\n this.setOption({\n yAxis : {\n data: categoryData.reverse()\n },\n xAxis: {},\n title: {},\n series: {\n id: \"bar\",\n data: barData.reverse()\n }\n }); \n };\n }", "title": "" }, { "docid": "ccb1fcd92928bf3dcc0a0063e09eac12", "score": "0.58606553", "text": "function BarChartFactory(){}", "title": "" }, { "docid": "ccb1fcd92928bf3dcc0a0063e09eac12", "score": "0.58606553", "text": "function BarChartFactory(){}", "title": "" }, { "docid": "a30e97cea7bbd0c8a855b25b805fd70a", "score": "0.5859304", "text": "function setBarData(attr) {\n d3.csv(FILEPATH).then(function(data) {\n\n if (attr == 'Global_Sales') {\n data = data.slice(0, NUM_EXAMPLES)\n } else {\n data = cleanBarData(data, function(x,y) {return parseFloat(y[attr]) - parseFloat(x[attr]); }, NUM_EXAMPLES);\n };\n\n //set domain for the x axis of the bargraph\n x.domain([0, d3.max(data, function(d) { return parseFloat(d[attr]); })]);\n\n y.domain(data.map(function(d) { return d['Name']; }));\n\n y_axis_label.call(d3.axisLeft(y).tickSize(0).tickPadding(10));\n\n color.domain(data.map(function(d) { return d['Name'] }))\n\n let bars = svg.selectAll(\"rect\").data(data);\n\n bars.enter()\n .append(\"rect\")\n .merge(bars)\n .attr(\"fill\", function(d) { return color(d['Name']) })\n .transition()\n .duration(1000)\n .attr(\"x\", x(0))\n .attr(\"y\", function(d) { return y(d['Name']) })\n .attr(\"width\", function(d) { return x(d[attr]); })\n .attr(\"height\", y.bandwidth());\n \n let counts = countRef.selectAll(\"text\").data(data);\n\n // TODO: Render the text elements on the DOM\n counts.enter()\n .append(\"text\")\n .merge(counts)\n .transition()\n .duration(1000)\n .attr(\"x\", function(d) { return x(d[attr]) + 10; })\n .attr(\"y\", function(d) { return y(d['Name']) + 12; })\n .style(\"text-anchor\", \"start\")\n .text(function(d) { return d[attr]; });\n \n y_axis_text.text(attr);\n if (attr == 'Global_Sales') {\n title.text(\"Top 10 Games Globally\");\n } else if (attr == 'NA_Sales') {\n title.text(\"Top 10 Games In North America\");\n } else if (attr == 'EU_Sales') {\n title.text(\"Top 10 Games In Europe\");\n } else if (attr == 'JP_Sales') {\n title.text(\"Top 10 Games In Japan\");\n } else {\n title.text(\"Top 10 Games Outside North America, Europe, and Japan\");\n }\n });\n\n}", "title": "" }, { "docid": "baa506665e61474e1699ccb8d8542ca1", "score": "0.5859117", "text": "function updateBarData(){\n setBarScale();\n d3.select(\"#bars\").selectAll(\".bar\").data(XDATA).enter().append(\"div\").classed(\"bar\", true);\n BARS = d3.select(\"#bars\").selectAll(\".bar\");\n TARGET_BAR.datum(XTARGETDATA);\n }", "title": "" }, { "docid": "0765d489164ce6c222872c661ea40cd1", "score": "0.58252126", "text": "function makeBar(label, index) {\n \n \n // make the elements of the bar\n let barWrapper = document.createElement('div');\n let barEl = document.createElement('progress');\n let percentEl = document.createElement('span');\n let labelEl = document.createElement('span');\n \n switch(label)\n {\n case 'LMarch':\n labelEl.innerText = 'Correct Left March';\n break;\n case 'CStand':\n labelEl.innerText = 'Correct Stand';\n break; \n case 'RMarch':\n labelEl.innerText = 'Correct Right March';\n break; \n case 'WLMarch':\n labelEl.innerText = 'Left March too slouchy';\n break;\n case 'WRMarch':\n labelEl.innerText = 'Right March too slouchy';\n break;\n case 'WStand':\n labelEl.innerText = 'Put your arms up!';\n break; \n }\n \n \n \n // assemble the elements\n barWrapper.appendChild(labelEl); \n barWrapper.appendChild(barEl);\n barWrapper.appendChild(percentEl);\n \n let graphWrapper = document.getElementById('graph-wrapper');\n graphWrapper.appendChild(barWrapper);\n\n // style the elements\n let color = colors[index % colors.length];\n let lightColor = lightColors[index % colors.length];\n barWrapper.style.color = color;\n barWrapper.style.setProperty('--color', color);\n barWrapper.style.setProperty('--color-light', lightColor);\n\n // save references to each element, so we can update them later\n bars[label] = {\n bar: barEl,\n percent: percentEl\n \n };\n\n}", "title": "" }, { "docid": "20d47203983d749261b1965d861320f2", "score": "0.5822442", "text": "function devut(){\n\tley.clearRect(0,0,x,y);\n\ttxt.clearRect(0,0,x,y);\n\tvar a=40;\n\t//block sit for the bars\n\tley.moveTo(10,0);\n\tley.lineTo(10,y-30);\n\tley.lineTo(x,y-30);\n\tley.strokeStyle=\"white\";\n\tley.stroke();\n\t//beginnig of loop for plotting 6 bars with random height\n\tfor (var i = 0; i<6; i++) {\t\t\t\n\t\tvar b= Math.round(Math.random()*(0.89*y)); //random height\n\t\t//the bars are given colors\n\t\tif (b>200) {\n\t\t\tley.fillStyle=\"green\";\n\t\t\tley.fillRect(a,y-30,30,-b);\n\t\t}\n\t\tif (b>=100 && b<=200){\n\t\t\tley.fillStyle=\"yellow\";\n\t\t\tley.fillRect(a,y-30,30,-b);\n\t\t}else{\n\t\t\tif (b<100) {\n\t\t\t\tley.fillStyle=\"red\";\n\t\t\t\tley.fillRect(a,y-30,30,-b);\n\t\t\t}\n\t\t};\n\t //text are written and positioned below each bar\n\t\ttxt.strokeText(b,a+5,y-7);\n\t\ttxt.font=\"17px century gothic\";\n\t\ttxt.stokeStyle=\"white\";\n\t //parameterized side bar colors to indicate the level of each data\n\t\t\t\ta=a+40;\n\t\tsid1(0,0,10,99);\n\t\tsid2(0,100,10,100);\n\t\tsid3(0,201,10,90); \n\t} \n}", "title": "" }, { "docid": "1ebfad779274bf4abdf32edd2976fe1c", "score": "0.5813433", "text": "function createBarElements() {\n for (var i = 0; i < BARS_AMOUNT; i++) {\n var $barDiv = $(\"<div class='bar'></div>\");\n $(\"#container\").append($barDiv);\n $barDiv.attr(\"id\", \"data-bar-index\" + i);\n $barDiv.css(\"left\", BAR_PADDING + \"px\");\n $barDiv.css(\"top\", BAR_PADDING * i + BAR_START_Y + \"px\");\n }\n}", "title": "" }, { "docid": "22bf385648a42090cd7d88907c849e9a", "score": "0.58047813", "text": "function barChart(subjectId){\r\n d3.json('samples.json').then((data)=>{\r\n var samples = data.samples;\r\n var ID = samples.map(row=>row.id).indexOf(subjectId);\r\n var otuValueTen = samples.map(row=>row.sample_values);\r\n var otuValueTen = otuValueTen[ID].slice(0,10).reverse();\r\n var otuIdTen = samples.map(row=>row.otu_ids);\r\n var otuIdTen = otuIdTen[ID].slice(0,10);\r\n var otuLabelTen = samples.map(row=>row.otu_labels).slice(0,10);\r\n \r\n var trace={\r\n x: otuValueTen,\r\n y: otuIdTen.map(r=>`UTO ${r}`),\r\n text: otuLabelTen,\r\n type:'bar',\r\n orientation:'h'\r\n }\r\n var layout = {title: \"Top 10 OTUs Found\", margin: { t: 30, l: 150 }};\r\n \r\n Plotly.newPlot('bar',[trace],layout);\r\n })\r\n }", "title": "" }, { "docid": "6c9b0e126e2a5734a10886efc791e007", "score": "0.5804052", "text": "buildABar (bin, text, height, width, x, y, barStyle, txtStyle) {\n return {\n className: text,\n text: text,\n height: height,\n data: bin,\n width: width,\n rx: height / 4,\n ry: height / 4,\n x: x,\n y: y,\n barStyle: barStyle,\n textStyle: txtStyle,\n stroke: 'black',\n strokeWidth: '2px'\n }\n }", "title": "" }, { "docid": "991278ce66c5e372a2f245a6725c657a", "score": "0.5802188", "text": "function createBarChart(id) {\n console.log(`This is the bar chart for ${id}`)\n d3.json(\"samples.json\").then((data) => {\n //create variables to store the otu, sample, and id information\n var samples = data.samples\n var idArray = samples.filter(key => key.id == id)\n var sampleValues = idArray[0].sample_values\n console.log(sampleValues)\n var otuId = idArray[0].otu_ids\n var otuLabel = idArray[0].otu_labels\n var sampleId = idArray[0].id\n\n //for loop to get the top 10 values\n var topTenSamples = sampleValues.slice(0,10).reverse();\n var topTenOtuId = otuId.slice(0,10).map(topTenOtuId => `OTU ${topTenOtuId}`).reverse();\n var topTenOtuLabel = otuLabel.slice(0,10).reverse();\n console.log(topTenOtuId)\n console.log(topTenSamples)\n console.log(topTenOtuLabel)\n\n //Make bar chart using plotly\n var trace1 = {\n y: topTenOtuId,\n x: topTenSamples,\n text: topTenOtuLabel,\n type: \"bar\",\n orientation: 'h'\n }\n data = [trace1]\n var layout = {\n title: {text: `Top ten belly button bacteria samples for: ${sampleId}`},\n xaxis: {title: \"OTU Sample Concentration\"},\n yaxis: {title: \"OTU Sample ID\"}\n }\n\n Plotly.newPlot(\"bar\", data, layout);\n });\n}", "title": "" }, { "docid": "48f1fea145c9a56a73f204df68731b0b", "score": "0.5800476", "text": "drawBars ( ) {\n this.singleBar\n .attr( 'class' , 'bar' )\n .attr( 'y' , this.innerHeight )\n .attr( 'x' , d => this.x( d.date ) )\n .attr( 'height' , 0 )\n .attr( 'width' , this.innerWidth / this.data.length +1 )\n // .attr( 'width' , this.x.bandwidth )\n .attr( 'data-date', d => d.dateString )\n .attr( 'data-gdp' , d => d.value )\n this.handleEvents( );\n return this;\n }", "title": "" }, { "docid": "762172112879db78ee8e0e554079ae84", "score": "0.5799242", "text": "createHistogramBars() {\n let self = this;\n\n //draw bars on histogram\n let bar = this.parent.selectAll(\".bar\")\n .data(this.histogramData)\n .enter()\n .append(\"g\")\n .attr(\"class\", \"bar\")\n .attr(\"transform\", function (d) {\n return \"translate(\" + (self.margin.left + self.xScale(d.x)) + \",\" + (self.margin.top + self.yScale(d.y)) + \")\";\n });\n\n bar.append(\"rect\")\n .attr(\"x\", 1)\n .attr(\"width\", self.xScale(this.minValue + this.histogramData[0].dx) - 1)\n .attr(\"height\", function (d) {\n return (self.chartHeight - self.yScale(d.y));\n })\n .style(\"fill\", \"steelblue\");\n\n // place label of value within the bar\n bar.append(\"text\")\n .attr(\"dy\", \".75em\")\n .attr(\"y\", 6)\n .attr(\"x\", this.xScale(this.minValue + this.histogramData[0].dx) / 2) //put label in middle of bar\n .attr(\"text-anchor\", \"middle\")\n .style(\"fill\", \"#fff\") // set the fill colour ;\n .text(function (d) {\n return d.y;\n }); //label is the value of the count\n }", "title": "" }, { "docid": "8fc78f69f6045379348a67716a891d15", "score": "0.57975125", "text": "function updateBar(otus) {\n\n otus.reverse();\n var x = otus.map( (d) => d.sample_values );\n var y = otus.map( (d) => `OTU-${d.otu_ids}` );\n var text= otus.map( (d) => d.otu_labels );\n\n\n Plotly.restyle(\"bar\", \"x\", [x]);\n Plotly.restyle(\"bar\", \"y\", [y]);\n Plotly.restyle(\"bar\", \"text\", [text]);\n\n}", "title": "" }, { "docid": "effefa90e4fc7859fdab7d6514b7be5a", "score": "0.579522", "text": "renderBarGroup(data, barCount, groupIndex) {\n return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react_pose__WEBPACK_IMPORTED_MODULE_3__[\"PoseGroup\"], { animateOnMount: this.props.animated }, data.map((barData, barIndex) => this.renderBar(barData, barIndex, barCount, groupIndex))));\n }", "title": "" }, { "docid": "4572e4749080616d3b9a01064a684bef", "score": "0.5779009", "text": "function createArray(numberOfBars) {\r\n var width = 12;\r\n if (numberOfBars <= 80 && numberOfBars >= 60)\r\n width = 14;\r\n else if (numberOfBars >= 30 && numberOfBars < 60)\r\n width = 16;\r\n else if (numberOfBars < 30)\r\n width = 20;\r\n\r\n var bars = document.getElementById(\"bars\");\r\n // deleting old values of array\r\n bars.innerHTML = \"\";\r\n array = [];\r\n\r\n // creating random values for array\r\n for (var i = 0; i < numberOfBars; i++) {\r\n array.push(Math.floor((Math.random()) * 500) + 5);\r\n }\r\n\r\n// creating bars of array\r\n for (var i = 0; i < numberOfBars; i++) {\r\n var bar = document.createElement(\"div\");\r\n bar.style.height = `${array[i]}px`;\r\n bar.style.width = `${width}px`;\r\n bar.classList.add(\"bar\");\r\n bar.classList.add(`bar${i}`);\r\n bars.appendChild(bar);\r\n }\r\n\r\n}", "title": "" }, { "docid": "0349efb60e67264b7d561abc43b15c12", "score": "0.57740754", "text": "function bPlot(id) {\n // Retrieve the data for visuals from samples.json file\n d3.json(\"samples.json\").then((Data)=> {\n \n \n // Use filter function to filter the data by id(s) \n let samples = Data.samples.filter(s => s.id.toString() === id)[0];\n \n \n // Use the slice() method to extract a section of the string and return it as a new string,\n // without modifying the original string. Isolate top ten in new string. \n let samplevalues = samples.sample_values.slice(0, 10).reverse();\n \n // Use the slice() method to extract a section of the string and return it as a new string,\n // without modifying the original string. Isolate top ten OTU in new string. \n let topOTU = (samples.otu_ids.slice(0, 10)).reverse();\n \n // Use .map() to create an array from calling a specific function on each item in the parent array, in this case OTU_top\n let OTU_id = topOTU.map(d => \"OTU \" + d)\n \n // Use the slice() method to extract a section of the string and return it as a new string,\n // without modifying the original string. Isolate top ten labels in new string.\n let labels = samples.otu_labels.slice(0, 10);\n \n // Declare and assign variable for the bar plots specs\n let trace = {\n x: samplevalues,\n y: OTU_id,\n text: labels,\n marker: {\n color: 'rgb(235,0,0)'},\n type:\"bar\",\n orientation: \"h\",\n };\n \n // Assign and declare a new variable the value of the trace variable\n var Data = [trace];\n \n // Create layout variable to set the title, yaxis, tickmode and all four margins.\n let layout = {\n title: \"The Top 10 OTU\",\n yaxis:{\n tickmode:\"linear\",\n },\n margin: {\n l: 75,\n r: 75,\n t: 75,\n b: 0\n }\n };\n \n // Use plotly to create the bar plot. Apply the data and the specs. via respective variables\n Plotly.newPlot(\"bar\", Data, layout);\n \n \n // Declare and assign a variable for the bubble chart's specs.\n let trace1 = {\n x: samples.otu_ids,\n y: samples.sample_values,\n mode: \"markers\",\n marker: {\n size: samples.sample_values,\n color: samples.otu_ids\n },\n text: samples.otu_labels\n \n };\n \n // Create a variable to set the title, xaxis' title, height and width of the bubble plot.\n let bubbleLayout = {\n title: \"OTU Bubble Plot\",\n xaxis:{title: \"OTU ID\"},\n height: 625,\n width: 1250\n };\n \n // Declare a variable called bubbleData and assign it the value of the variable, trace1\n let bubbleData = [trace1];\n \n // Use plotly to create a bubble plot and call the data, as well as the layout\n Plotly.newPlot(\"bubble\", bubbleData, bubbleLayout); \n \n });\n }", "title": "" }, { "docid": "737e060a5edcf468af623930d48b6b2d", "score": "0.5767867", "text": "function doPick() {\n // if a current bar was picked, it will delete that bar from the field\n if (randomBar.firstChild) {\n randomBar.removeChild(randomBar.firstChild);\n } \n displayPick();\n \n }", "title": "" }, { "docid": "f0800ccd2a10b480590b6457850e46b3", "score": "0.5764477", "text": "drawVisualizer() {\n // Initial bar x coordinate\n let y,\n x = 0;\n\n // Clear the complete canvas\n this.visualizer.ctx.clearRect(\n 0,\n 0,\n this.visualizer.width,\n this.visualizer.height\n );\n /**\n * Set the primary colour of the brand\n * (probably moving to a higher object level variable soon)\n * Start creating a canvas polygon\n */\n this.visualizer.ctx.beginPath();\n // Start at the bottom left\n this.visualizer.ctx.moveTo(x, 0);\n this.visualizer.ctx.fillStyle = this.state.config.translucent;\n this.state.eq.bands.forEach(band => {\n /**\n * Get the overall hight associated to the current band and\n * convert that into a Y position on the canvas\n */\n y = this.state.config.multiplier * band;\n // Draw a line from the current position to the wherever the Y position is\n this.visualizer.ctx.lineTo(x, y);\n /**\n * Continue that line to meet the width of the bars\n * (canvas width ÷ bar count).\n */\n this.visualizer.ctx.lineTo(x + this.visualizer.barWidth, y);\n // Add pixels to the x for the next bar\n x += this.visualizer.barWidth;\n });\n // Bring the line back down to the bottom of the canvas\n this.visualizer.ctx.lineTo(x, 0);\n // Fill it\n this.visualizer.ctx.fill();\n }", "title": "" }, { "docid": "d24bbf788a6c2719de19e5cdad04c7a8", "score": "0.57568884", "text": "function drawBar(k){\n var bar_height = 20;\n d3.select(\"#chart svg\").append(\"g\").attr(\"class\",\"bar-rect-\"+k).attr(\"transform\",\"translate(\"+(margin.left)+\",\"+(k*bar_height+margin.top)+\")\").selectAll(\"rect\").data(data.genomicProfileList[k].mutationList).enter().append(\"rect\")\n .on(\"click\",function(d){\n d3.select(this).style(\"fill\",\"red\")\n var obAnalyticDet = {\n entrezGeneId: d.entrezGeneId,\n geneSymbol: d.geneSymbol,\n referenceGenome: d.referenceGenome,\n chromosome: d.chromosome,\n dnaStartPosition: d.dnaStartPosition,\n dnaEndPosition: d.dnaEndPosition,\n strand: d.strand,\n variantClassification: d.variantClassification,\n referenceAllele: d.referenceAllele,\n variantAllele: d.variantAllele,\n alternativeAlleleReads: d.alternativeAlleleReads,\n referenceAlleleReads: d.referenceAlleleReads,\n dbSnpRsId: d.dbSnpRsId,\n dbSnpRsValStatus: d.dbSnpRsValStatus,\n annotationTranscript: d.annotationTranscript,\n transcriptStrand: d.transcriptStrand,\n cDnaChange: d.cDnaChange,\n codonChange: d.codonChange,\n aaChange: d.aaChange,\n otherTranscript: d.otherTranscript,\n refseqMrnaId: d.refseqMrnaId,\n refseqProtId: d.refseqProtId,\n swissprotAccession: d.swissprotAccession,\n swissprotEntry: d.swissprotEntry,\n uniprotAaPosition: d.uniprotAaPosition,\n uniprotRegion: d.uniprotRegion,\n uniprotSite: d.uniprotSite,\n vertebrateAaAlignment: d.vertebrateAaAlignment\n }\n analyticDetails(obAnalyticDet);\n })\n // .on(\"mouseover\",function(d){\n // d3.select(this).style(\"opacity\",\".8\");\n // tooltip.transition().style(\"opacity\",\"1\")\n // // console.log(d)\n // tooltip.html(d.geneSymbol)\n // .style(\"left\",(d3.event.pageX)+\"px\")\n // .style(\"top\",(d3.event.pageY)-15+\"px\")\n // })\n // .on(\"mouseout\",function(d){\n // d3.select(this).style(\"opacity\",\"1\");\n // tooltip.transition().style(\"opacity\",\"0\")\n // })\n .attr({\n width:width/(data.genomicProfileList[k].mutationList.length)-5,\n x:function(d,i){ return i*(width/(data.genomicProfileList[k].mutationList.length))},\n height:bar_height,\n y:k*bar_height+5\n }).style(\"fill\",\"#575757\").style(\"cursor\",\"pointer\");\n\n d3.select(\"svg\").append(\"g\").attr(\"class\",\"bar-text-\"+k).attr(\"transform\",\"translate(\"+(margin.left)+\",\"+(k*bar_height+margin.top)+\")\").selectAll(\"text\").data(data.genomicProfileList[k].mutationList).enter().append(\"text\").text(function(d){\n return d.chromosome.substring(3,5);\n }).attr({\n \"text-anchor\":\"middle\",\n \"font-size\":\"10px\",\n x:function(d,i){ return i*(width/(data.genomicProfileList[k].mutationList.length))+8},\n y:k*bar_height+19,\n \"fill\":\"#FFF\",\n \"font-weight\":\"bold\",\n \"cursor\":\"pointer\"\n })\n .on(\"click\",function(d,i){\n d3.select(\".bar-rect-\"+k).select(\"rect:nth-child(\"+(i+1)+\")\").style(\"fill\",\"red\");\n var obAnalyticDet = {\n entrezGeneId: d.entrezGeneId,\n geneSymbol: d.geneSymbol,\n referenceGenome: d.referenceGenome,\n chromosome: d.chromosome,\n dnaStartPosition: d.dnaStartPosition,\n dnaEndPosition: d.dnaEndPosition,\n strand: d.strand,\n variantClassification: d.variantClassification,\n referenceAllele: d.referenceAllele,\n variantAllele: d.variantAllele,\n alternativeAlleleReads: d.alternativeAlleleReads,\n referenceAlleleReads: d.referenceAlleleReads,\n dbSnpRsId: d.dbSnpRsId,\n dbSnpRsValStatus: d.dbSnpRsValStatus,\n annotationTranscript: d.annotationTranscript,\n transcriptStrand: d.transcriptStrand,\n cDnaChange: d.cDnaChange,\n codonChange: d.codonChange,\n aaChange: d.aaChange,\n otherTranscript: d.otherTranscript,\n refseqMrnaId: d.refseqMrnaId,\n refseqProtId: d.refseqProtId,\n swissprotAccession: d.swissprotAccession,\n swissprotEntry: d.swissprotEntry,\n uniprotAaPosition: d.uniprotAaPosition,\n uniprotRegion: d.uniprotRegion,\n uniprotSite: d.uniprotSite,\n vertebrateAaAlignment: d.vertebrateAaAlignment\n }\n analyticDetails(obAnalyticDet);\n\n\n })\n // .on(\"mouseover\",function(d){\n // d3.select(this).style(\"opacity\",\".8\");\n // tooltip.transition().style(\"opacity\",\"1\")\n // // console.log(d)\n // tooltip.html(d.geneSymbol)\n // .style(\"left\",(d3.event.pageX)+\"px\")\n // .style(\"top\",(d3.event.pageY)-15+\"px\")\n // })\n // .on(\"mouseout\",function(d){\n // d3.select(this).style(\"opacity\",\"1\");\n // tooltip.transition().style(\"opacity\",\"0\")\n // })\n }", "title": "" }, { "docid": "f2c0f806053eb4dec86517396652a91c", "score": "0.57551694", "text": "function initBarChart(){\r\n barChartData = total;\r\n updateTitle(\"Total\");\r\n handler(2007);\r\n}", "title": "" }, { "docid": "0efcf27b921a1f735d86553f4828f429", "score": "0.5751251", "text": "componentDidMount() {\n this.props.setAlgorithm(this.props.algorithms[0]);\n this.props.setAnimationSpeed(MAX_ANIMATION_SPEED);\n generateNewArray(MIN_GENERATED_NUMBER_RANDOM, MAX_GENERATED_NUMBER\n , this.state.amountBars, ArrayType.RANDOM, this.props.dispatch);\n }", "title": "" }, { "docid": "3eeb52977b0329bef20e56c523b159ac", "score": "0.5732798", "text": "function barChart(value) {\n\n // Filter samples data by id selected in dropdown menu\n var selectedSample = dataDB.samples.filter(subject => \n (subject.id === value));\n\n // Get sample data \n var otuLabels = selectedSample[0].otu_labels;\n var otuIds = selectedSample[0].otu_ids;\n var sampleValues = selectedSample[0].sample_values;\n\n // Slice top 10 from each array\n\n var top10_otuLabels = otuLabels.slice(0, 10);\n var top10_otuIds = otuIds.slice(0, 10);\n var top10_sampleValues = sampleValues.slice(0, 10);\n\n // Loop to add \"OTU\" in front of OTU IDs and convert from integer to string\n var top10_otuIdsLabels = [];\n\n for (var i = 0; i < top10_otuIds.length; i++) {\n top10_otuIdsLabels.push(\"OTU \" + top10_otuIds[i]);\n };\n\n // Reverse the order to plot in descending order\n top10_otuLabels = top10_otuLabels.reverse();\n top10_otuIdsLabels = top10_otuIdsLabels.reverse();\n top10_sampleValues = top10_sampleValues.reverse();\n\n\n // Set up trace\n var trace1 = {\n x: top10_sampleValues, \n y: top10_otuIdsLabels,\n text: top10_otuLabels,\n type: \"bar\",\n orientation: \"h\",\n marker: {\n color: 'rgb(128,0,128)',\n opacity: 0.5,\n line: {\n color: 'rgb(128,0,128)',\n width: 1,\n },\n }\n };\n\n // Data for plotting into an array\n var data = [trace1];\n\n // Set up layout\n var layout = {\n title: \"Top 10 Operational Taxonomic Units (OTU)\",\n xaxis: {\n zeroline: true,\n showline: false,\n showticklabels: true,\n showgrid: true\n }\n };\n\n // Render plot\n Plotly.newPlot(\"bar\", data, layout);\n}", "title": "" }, { "docid": "65ef982176d2ff5c6198ea72dd7c4f2e", "score": "0.5732039", "text": "__DrawGBars(o){\r\n const\r\n set = o.dataset.extract(x => x.status ? x : null)\r\n , serie = set.extract((item, i) => item.plot ? item.plot.calc(SUM) || .001 : .001)\r\n , ymax = Math.max(1, serie.calc(MAX) * o.roof)\r\n , xpace = o.rects.width / serie.length\r\n , h = o.rects.height\r\n , w = Math.min(xpace / 2, o.barWidth || o.fsize)\r\n ;;\r\n serie.each((n, i) => {\r\n const\r\n rec = set[i]\r\n , color = rec.color ? rec.color : PRISM.array()[i % PRISM.array().length]\r\n , y = Math.max(o.fsize, Math.min(h - h * n / ymax, h))\r\n , x = xpace / 2 + i * xpace\r\n ;;\r\n o.node.app(SVG(\"rect\", \"-avoid-pointer --bar\", { width: w, height: h - y, x: x - w / 2, y: y }, { fill: color }))\r\n })\r\n }", "title": "" }, { "docid": "95f14a8b3ba2108f426e2ee068c39834", "score": "0.57319474", "text": "function init(name, info, sample) {\n\n //---- Display demographic info \n demographicInfo(info);\n\n // zip, sort and slice the data in sample\n var otus = sortSample(sample); \n var otus10 = otus.slice(0,10).reverse();\n\n //---- Init bar chart with top 10 otus of the given sample\n var data = [{\n type: 'bar',\n x: otus10.map( (d) => d.sample_values ),\n y: otus10.map( (d) => `OTU-${d.otu_ids}` ),\n text: otus10.map( (d) => d.otu_labels ),\n orientation: 'h'\n }];\n var layout = {\n title: `<b>Top 10 Sample Values</b>`,\n xaxis: {title: \"Sample values\"},\n yaxis: {title: \"OTU ID\"},\n }\n Plotly.newPlot(\"bar\", data, layout);\n\n //---- Init bubble chart with the given sample\n var data = [{\n x: otus.map( (d) => d.otu_ids ),\n y: otus.map( (d) => d.sample_values ),\n text: otus.map( (d) => d.otu_labels ),\n mode: 'markers',\n marker: {\n size: otus.map( (d) => d.sample_values ),\n color: otus.map( (d) => d.otu_ids )\n }\n }]; \n var layout = {\n title: `<b>All Sample Values</b>`,\n xaxis: {title: \"OTU ID\"},\n yaxis: {title: \"Sample values\"},\n showlegend: false\n }; \n Plotly.newPlot('bubble', data, layout);\n\n // ---- Init gauge chart with the given sample\n var gaugeStep = []\n for (var i=0; i<10; i++) {\n gaugeStep.push({ \n range: [i,i+1], \n color: `rgb(${245-i*5},${245-i*20},${220-i*20})`,\n name: `${i}-${i+1}`\n });\n }\n\n // using pie chart\n var markerColors = [\"rgb(255,255,255\"];\n var labelsG = [\" \"];\n var valuesG = [10];\n for (var i=0; i<10; i++) {\n valuesG.push(1);\n labelsG.push(`${i}-${i+1}`);\n markerColors.push(`rgb(${245-i*5},${245-i*20},${220-i*20})`);\n }\n\n var data = [{\n type: \"pie\",\n values: valuesG,\n marker: {colors: markerColors},\n labels: labelsG,\n textinfo: \"label\",\n showlegend: false,\n hole: 0.4,\n direction: \"clockwise\",\n rotation: 90\n }]\n\n var layout = {\n title: `<b>Belly Button Washing Frequency</b><br> Scrubs per Week`,\n width: 500, height: 500, margin: { t: 80, b: 0 }\n };\n Plotly.newPlot(\"gauge\", data, layout);\n\n // Add a needle to the gauge\n gaugeNeedle(info.wfreq);\n}", "title": "" }, { "docid": "fd10f8b47ef33685f9e132efc9efcc3b", "score": "0.5723394", "text": "function generateBarPlot(id){\n\n\td3.json(\"samples.json\").then(data => { \n\t\tvar sampleInfo = data.samples; \n\n\t\tvar filteredData = sampleInfo.filter(sample => sample.id === id)[0]; \n\t\tvar samples = filteredData.sample_values.slice(0,10);\n\t\tvar otus = filteredData.otu_ids.slice(0,10);\n\t\tvar otusIDs = otus.map(d => `OTU ${d}`);\n\t\tvar labels = filteredData.otu_labels.slice(0,10);\n\n\t\tvar data = [{\n\t\t\tx: samples,\n\t\t\ty: otusIDs,\n\t\t\ttext: labels,\n\t\t\ttype: \"bar\",\n\t\t\torientation: \"h\"\n\t\t}]; \n\n\t\tvar layout = {\n\t\t\ttitle: `OTU's For Sample ${id}`,\n\t\t};\n\t\t\n\t\tPlotly.newPlot(\"bar\", data, layout);\n\n\t});\n}", "title": "" }, { "docid": "e12fa2691177ea92b47a6cd8cda3e2b4", "score": "0.57211435", "text": "function barPreInit(target, data, seriesDefaults, options) {\n if (this.rendererOptions.barDirection == 'horizontal') {\n this._stackAxis = 'x';\n this._primaryAxis = '_yaxis';\n }\n if (this.rendererOptions.waterfall == true) {\n this._data = $.extend(true, [], this.data);\n var sum = 0;\n var pos = (!this.rendererOptions.barDirection || this.rendererOptions.barDirection === 'vertical' || this.transposedData === false) ? 1 : 0;\n for(var i=0; i<this.data.length; i++) {\n sum += this.data[i][pos];\n if (i>0) {\n this.data[i][pos] += this.data[i-1][pos];\n }\n }\n this.data[this.data.length] = (pos == 1) ? [this.data.length+1, sum] : [sum, this.data.length+1];\n this._data[this._data.length] = (pos == 1) ? [this._data.length+1, sum] : [sum, this._data.length+1];\n }\n if (this.rendererOptions.groups > 1) {\n this.breakOnNull = true;\n var l = this.data.length;\n var skip = parseInt(l/this.rendererOptions.groups, 10);\n var count = 0;\n for (var i=skip; i<l; i+=skip) {\n this.data.splice(i+count, 0, [null, null]);\n this._plotData.splice(i+count, 0, [null, null]);\n this._stackData.splice(i+count, 0, [null, null]);\n count++;\n }\n for (i=0; i<this.data.length; i++) {\n if (this._primaryAxis == '_xaxis') {\n this.data[i][0] = i+1;\n this._plotData[i][0] = i+1;\n this._stackData[i][0] = i+1;\n }\n else {\n this.data[i][1] = i+1;\n this._plotData[i][1] = i+1;\n this._stackData[i][1] = i+1;\n }\n }\n }\n }", "title": "" }, { "docid": "89a10af2319bf33a16e17c7337829f83", "score": "0.57129836", "text": "function updatebar(indexnumber) {\n d3.json(url).then(function(data) {\n var samplelist = data.samples;\n \n //Isolate arrays\n var idnumber = samplelist[indexnumber].id; //console.log(`ID number: ${idnumber}`);\n var otuids = samplelist[indexnumber].otu_ids;// console.log('OTU IDs');// console.log(otuids);\n var samplevalues = samplelist[indexnumber].sample_values;// console.log('Sample Values');// console.log(samplevalues);\n var otulables = samplelist[indexnumber].otu_labels;// console.log('OTU LABELS');// console.log(otulables);\n\n //Isolate top ten and reverse\n otuidsten = otuids.slice(0,10)\n var otuidstenRev = otuidsten.reverse();\n otuidstenstring = []\n otuidstenRev.forEach(function(item) {otuidstenstring.push(`OTU ${item}`);});\n console.log('New OTU Ids Top Ten')\n console.log(otuidstenstring)\n\n samplevaluesten = samplevalues.slice(0,10)\n var samplevaluestenRev = samplevaluesten.reverse();\n console.log('New Sample Values Top Ten')\n console.log(samplevaluestenRev)\n\n otulablesten = otulables.slice(0,10)\n var otulablestenRev = otulablesten.reverse();\n console.log('New OTU Labels Top Ten')\n console.log(otulablestenRev)\n\n var trace1 = {\n x: samplevaluestenRev,\n y: otuidstenstring,\n type: \"bar\",\n orientation: 'h',\n text: otulablestenRev\n };\n\n var bardata = [trace1];\n\n var layout = {\n //title: \"'Bar' Chart\",\n //xaxis: { title: \"Drinks\"},\n //yaxis: { title: \"% of Drinks Ordered\"}\n };\n\n Plotly.newPlot(\"bar\", bardata);\n //Plotly.restyle(\"plots\", \"x\", [x]);\n });\n\n}", "title": "" }, { "docid": "f7f056237f74d90534da716f5ee66e30", "score": "0.5703143", "text": "function App() {\n const [ data, setData ] = useState([13, 30, 80, 100, 60, 120, 150]);\n \n return (\n <React.Fragment>\n <BarChart data={data} />\n <button onClick={() => setData(data.map( value => value + 5 ))}>\n Update data\n </button>\n <button onClick={() => setData(data.filter( value => value <= 30 ))}>\n Filter data\n </button>\n <button onClick={() => setData([...data, Math.round(Math.random() * 100)])}>\n Add data\n </button>\n </React.Fragment>\n );\n}", "title": "" }, { "docid": "89a8ebb8ad946fd41b5f329ae5e6071a", "score": "0.56970495", "text": "hpBar() {\n return generateHeartsBar(this.currenthp);\n }", "title": "" }, { "docid": "cc2cf8b845859e7398dcd7bbea6909b0", "score": "0.5695612", "text": "function barPreInit(target, data, seriesDefaults, options) {\n if (this.rendererOptions.barDirection == 'horizontal') {\n this._stackAxis = 'x';\n this._primaryAxis = '_yaxis';\n }\n if (this.rendererOptions.waterfall == true) {\n this._data = $.extend(true, [], this.data);\n var sum = 0;\n var pos = (!this.rendererOptions.barDirection || this.rendererOptions.barDirection === 'vertical' || this.transposedData === false) ? 1 : 0;\n for(var i=0; i<this.data.length; i++) {\n sum += this.data[i][pos];\n if (i>0) {\n this.data[i][pos] += this.data[i-1][pos];\n }\n }\n this.data[this.data.length] = (pos == 1) ? [this.data.length+1, sum] : [sum, this.data.length+1];\n this._data[this._data.length] = (pos == 1) ? [this._data.length+1, sum] : [sum, this._data.length+1];\n }\n if (this.rendererOptions.groups > 1) {\n this.breakOnNull = true;\n var l = this.data.length;\n var skip = parseInt(l/this.rendererOptions.groups, 10);\n var count = 0;\n for (var i=skip; i<l; i+=skip) {\n this.data.splice(i+count, 0, [null, null]);\n count++;\n }\n for (i=0; i<this.data.length; i++) {\n if (this._primaryAxis == '_xaxis') {\n this.data[i][0] = i+1;\n }\n else {\n this.data[i][1] = i+1;\n }\n }\n }\n }", "title": "" }, { "docid": "5b29a1f001404a9377ac9f02137aceb3", "score": "0.5677933", "text": "getSeedData() {\n fetch('http://pb-api.herokuapp.com/bars')\n .then(response => response.json())\n .then((data) => {\n this.limit = data.limit;\n this.buttons = data.buttons.sort((a, b) => {\n if (a < b) {\n return -1;\n } if (b < a) {\n return 1;\n }\n return 0;\n });\n\n data.bars.forEach((barValue) => {\n const bar = {\n barValue,\n percentage: Math.round((barValue / this.limit) * 100),\n };\n this.bars.push(bar);\n });\n })\n .catch(() => {\n // Handle error\n });\n }", "title": "" }, { "docid": "140795dce813d9ebecc89586767f5cd1", "score": "0.5676662", "text": "function makeBar(uiName, barName, offsetX, offsetY, width, height, tgtVar, tgtMax, tgtMin){\n\t\tuiElements.find(uiName).subElements.push(new Bar(uiName, barName, offsetX, offsetY, width, height, tgtVar, tgtMax, tgtMin));\n\t}", "title": "" }, { "docid": "c47f9bff3f797e96334aa676151926eb", "score": "0.5676312", "text": "function buildBarChart (xvalues, yvalues, textvalues) {\n // Plot top 10 OTU IDs and Sample Values\n var trace = {\n x: xvalues,\n y: yvalues,\n type: \"bar\",\n orientation: \"h\",\n text: textvalues\n };\n var layout = {\n xaxis: {tick0: 0, dtick: 50},\n yaxis: {autorange: \"reversed\"}\n \n }\n\n data = [trace]\n Plotly.newPlot(\"bar\", data, layout)\n}", "title": "" }, { "docid": "69d6682889a1ba28d4ba28c38173a840", "score": "0.5660559", "text": "init() {\n $sel.at('data-clippy', data.key)\n .style('cursor', 'pointer')\n const titleGroup = $sel.append('div.chart-legend')\n titleGroup.append('text')\n .text(data.key)\n .attr('class', 'method-type')\n\n titleGroup.append('text')\n .text(`•`)\n .attr('class', 'bullet')\n\n const thouFormat = d3.format(',')\n\n titleGroup.append('text')\n .text(`${thouFormat(data.values[0].total)} Respondents`)\n .attr('class', 'method-total')\n\n\t\t\t\t$svg = $sel.append('svg.multipleMethods-chart');\n\t\t\t\t$g = $svg.append('g');\n\n\t\t\t\t// offset chart for margins\n\t\t\t\t$g.at('transform', `translate(${marginLeft}, ${marginTop})`);\n\n\t\t\t\t// create axis\n\t\t\t\t$axis = $g.append('g.g-axis');\n\n\t\t\t\t// setup viz group\n\t\t\t\t$vis = $g.append('g.g-vis');\n\n barGroups = $vis\n .selectAll('.g-bar')\n .data(data.values)\n .enter()\n .append('g')\n .attr('class', 'g-bar')\n .classed('sideEffect', d => {\n const se = d.label.includes('side')\n return se\n })\n .classed('bleeding', d => {\n const blood = d.label.includes('bleeding')\n return blood\n })\n .classed('weight', d => {\n const weight = d.label.includes('weight')\n return weight\n })\n .classed('pain', d => {\n const pain = d.label.includes('pain')\n return pain\n })\n\n\t\t\t\tChart.resize();\n\t\t\t\tChart.render();\n\t\t\t}", "title": "" }, { "docid": "9b15803bdaf229967b893786f69d3e7b", "score": "0.5657521", "text": "getBarData(responseCount) {\n\t\t//set response labels and their respective counts for question 1\n\t\tif (this.state.question === \"q1\") {\n\t\t\treturn [{\n\t\t\t\t\"values\": [\n\t\t\t\t\t{ \"x\": \"Excellent\", \"y\": responseCount[\"1\"]},\n\t\t\t\t\t{ \"x\": \"Good\", \"y\": responseCount[\"2\"]},\n\t\t\t\t\t{ \"x\": \"Only Fair\", \"y\": responseCount[\"3\"]},\n\t\t\t\t\t{ \"x\": \"Poor\", \"y\": responseCount[\"4\"]},\n\t\t\t\t\t{ \"x\": \"No Reponse\", \"y\": responseCount[\"9\"]},\n\t\t\t\t]\n\t\t\t}];\n\t\t} else if (this.state.question === \"q2\") {\n\t\t\t//set response labels and their respective counts for question 2\n\t\t\treturn [{\n\t\t\t\t\"values\": [\n\t\t\t\t\t{ \"x\": \"Very Happy\", \"y\": responseCount[\"1\"]},\n\t\t\t\t\t{ \"x\": \"Pretty Happy\", \"y\": responseCount[\"2\"]},\n\t\t\t\t\t{ \"x\": \"Not Too Happy\", \"y\": responseCount[\"3\"]},\n\t\t\t\t\t{ \"x\": \"No Answer\", \"y\": responseCount[\"9\"]},\n\t\t\t\t]\n\t\t\t}];\n\t\t} else if (this.state.question === \"qa1\") {\n\t\t\t//set response labels and their respective counts for question 3\n\t\t\treturn [{\n\t\t\t \"values\": [\n\t\t\t\t\t{ \"x\": \"Satisfied\", \"y\": responseCount[\"1\"]},\n\t\t\t\t\t{ \"x\": \"Dissatisfied\", \"y\": responseCount[\"2\"]},\n\t\t\t\t\t{ \"x\": \"No Answer\", \"y\": responseCount[\"8\"]},\n\t\t\t ]\n\t\t\t}];\n\t\t} else if (this.state.question === \"qb2_2\") {\n\t\t\t//set response labels and their respective counts for question 4\n\t\t\treturn [{\n\t\t\t \"values\": [\n\t\t\t\t\t{ \"x\": \"Strengthen\", \"y\": responseCount[\"1\"]},\n\t\t\t\t\t{ \"x\": \"Burden\", \"y\": responseCount[\"2\"]},\n\t\t\t\t\t{ \"x\": \"Neither/Both Equally\", \"y\": responseCount[\"3\"]},\n\t\t\t\t\t{ \"x\": \"No Answer\", \"y\": responseCount[\"9\"]}\n\t\t\t ]\n\t\t\t}];\n\t\t} else if (this.state.question === \"qb2_3\") {\n\t\t\t//set response labels and their respective counts for question 5\n\t\t\treturn [{\n\t\t\t \"values\": [\n\t\t\t\t\t{ \"x\": \"Agree\", \"y\": responseCount[\"1\"]},\n\t\t\t\t\t{ \"x\": \"Disagree\", \"y\": responseCount[\"2\"]},\n\t\t\t\t\t{ \"x\": \"Neither/Both Equally\", \"y\": responseCount[\"3\"]},\n\t\t\t\t\t{ \"x\": \"No Answer\", \"y\": responseCount[\"9\"]}\n\t\t\t ]\n\t\t\t}];\n\t\t} else if (this.state.question === \"qb2_4\") {\n\t\t\t//set response labels and their respective counts for question 6\n\t\t\treturn [{\n\t\t\t \"values\": [\n\t\t\t\t\t{ \"x\": \"Agree\", \"y\": responseCount[\"1\"]},\n\t\t\t\t\t{ \"x\": \"Disagree\", \"y\": responseCount[\"2\"]},\n\t\t\t\t\t{ \"x\": \"Neither/Both Equally\", \"y\": responseCount[\"3\"]},\n\t\t\t\t\t{ \"x\": \"No Answer\", \"y\": responseCount[\"9\"]}\n\t\t\t ]\n\t\t\t}];\n\t\t} else if (this.state.question === \"qb2_5\") {\n\t\t\t//set response labels and their respective counts for question 7\n\t\t\treturn [{\n\t\t\t \"values\": [\n\t\t\t\t\t{ \"x\": \"Agree\", \"y\": responseCount[\"1\"]},\n\t\t\t\t\t{ \"x\": \"Disagree\", \"y\": responseCount[\"2\"]},\n\t\t\t\t\t{ \"x\": \"Neither/Both Equally\", \"y\": responseCount[\"3\"]},\n\t\t\t\t\t{ \"x\": \"No Answer\", \"y\": responseCount[\"9\"]}\n\t\t\t ]\n\t\t\t}];\n\t\t} else if (this.state.question === \"qb3\") {\n\t\t\t//set response labels and their respective counts for question 8\n\t\t\treturn [{\n\t\t\t \"values\": [\n\t\t\t\t\t{ \"x\": \"Smaller\", \"y\": responseCount[\"1\"]},\n\t\t\t\t\t{ \"x\": \"Bigger\", \"y\": responseCount[\"2\"]},\n\t\t\t\t\t{ \"x\": \"Depends\", \"y\": responseCount[\"3\"]},\n\t\t\t\t\t{ \"x\": \"No Answer\", \"y\": responseCount[\"9\"]}\n\t\t\t ]\n\t\t\t}];\n\t\t} else if (this.state.question === \"qc2\") {\n\t\t\t//set response labels and their respective counts for question 9\n\t\t\treturn [{\n\t\t\t \"values\": [\n\t\t\t\t\t{ \"x\": \"Right\", \"y\": responseCount[\"1\"]},\n\t\t\t\t\t{ \"x\": \"Wrong\", \"y\": responseCount[\"2\"]},\n\t\t\t\t\t{ \"x\": \"No Answer\", \"y\": responseCount[\"9\"]}\n\t\t\t ]\n\t\t\t}];\n\t\t} else if (this.state.question === \"qd1\") {\n\t\t\t//set response labels and their respective counts for question 10\n\t\t\treturn [{\n\t\t\t \"values\": [\n\t\t\t\t\t{ \"x\": \"More\", \"y\": responseCount[\"1\"]},\n\t\t\t\t\t{ \"x\": \"No Change\", \"y\": responseCount[\"8\"]},\n\t\t\t\t\t{ \"x\": \"Less\", \"y\": responseCount[\"2\"]},\n\t\t\t\t\t{ \"x\": \"No Answer\", \"y\": responseCount[\"9\"]}\n\t\t\t ]\n\t\t\t}];\n\t\t}\n\t}", "title": "" }, { "docid": "17bca41af118dbdfd6c9d02ede8aab83", "score": "0.56572", "text": "function buildBarChart(sampleId) {\n\n // - loop over the samples.json file\n d3.json(\"samples.json\").then((data) =>{\n \n console.log(data)\n var extractSamples = data.samples\n var filteredArray = extractSamples.filter(row => row.id == sampleId)\n var selectedSample = filteredArray[0]\n var ids = selectedSample.otu_ids.map(id => \"OTU\" + id)\n var labels = selectedSample.otu_labels\n var values = selectedSample.sample_values\n\n var tenOTUlabels = labels.slice(0, 10)\n var tenSamples = values.slice(0, 10)\n\n\n var trace = [{\n x: tenSamples,\n y: ids,\n text: tenOTUlabels,\n type: \"bar\",\n orientation: \"h\",\n marker: {\n color: \"orange\"\n }\n }]\n\n var layout = {\n title: \"Top 10 Microbial Species (OTUs)\",\n margin: { t: 30, l: 150 }\n };\n\n Plotly.newPlot(\"bar\", trace, layout);\n });\n}", "title": "" }, { "docid": "9060361a96ca66a1fe88d7d4d740fdd4", "score": "0.5655285", "text": "function showBarChart(option,dataSet) {\n var barData = dataSet.samples.filter(sample => sample.id == option);\n console.log(barData);\n \n var y = barData.map(row =>row.otu_ids); \n var y1 =[];\n\n for(i=0;i<y[0].length;i++){\n y1.push(`OTU ${y[0][i]}`);\n }\n\n var x = barData.map(row =>(row.sample_values));\n var text = barData.map(row =>row.otu_labels);\n\n var trace = {\n x:x[0].slice(0,10),\n y:y1.slice(0,10),\n text:text[0].slice(0,10),\n type:\"bar\",\n orientation:\"h\",\n \n };\n var data = [trace];\n\n var layout = {\n yaxis: {\n autorange: \"reversed\" \n }\n }\n Plotly.newPlot(\"bar\",data,layout);\n}", "title": "" }, { "docid": "cc8bfb74c62feb86237ad66871043925", "score": "0.5651511", "text": "function barchart (subject) { \n // Make sure correct is pulling\n var subid = data.samples.filter(x => x.id == subject)\n console.log(subid)\n var bardata = [{\n x: data.samples.filter(x => x.id == subject)[0][\"sample_values\"].slice(0,10).reverse(),\n y: data.samples.filter(x => x.id == subject)[0][\"otu_ids\"].slice(0,10).reverse(),\n type: 'bar',\n orientation: 'h',\n text: data.samples.filter(x => x.id == subject)[0][\"otu_labels\"].slice(0,10).reverse(),\n marker: {\n color: 'rgb(0,65,130)'\n }\n }];\n \n var barlayout = { \n title: 'Top 10 OTUs',\n hovermode: 'closest',\n yaxis: {\n type: 'category',\n tickprefix: 'OTU '\n },\n height: 600,\n width: 350,\n showlegend: false\n };\n \n Plotly.newPlot('bar', bardata, barlayout);\n}", "title": "" }, { "docid": "31f82c8dea6dbe6d40056cb2cacd9d8a", "score": "0.5649215", "text": "function displayHBar(dataSet){\n\n var xData = dataSet.map(sample_value => sample_value.sample_values)[0];\n var yData = dataSet.map(sample_value => sample_value.otu_ids)[0];\n var textData = dataSet.map(sample_value => sample_value.otu_labels)[0];\n\n var yRenamed = [];\n\n for(var i=0; i<yData.length; i++){\n yRenamed.push(`OTU ${yData[i]}`)\n };\n\n var trace = {\n x: xData.slice(0,10),\n y: yRenamed.slice(0,10),\n text: textData.slice(0,10),\n type: 'bar',\n orientation: 'h'\n };\n\n var data = [trace];\n\n var layout = {\n title: \"Top 10 OTUs\",\n yaxis: {\n autorange: \"reversed\"\n }\n };\n\n Plotly.newPlot('bar-plot', data, layout);\n}", "title": "" }, { "docid": "29a22f24ae90efe710e95a7889a0cbf6", "score": "0.56488883", "text": "getChartData() {\n let area = this.state.results.map((area) => {\n return (area.LGA)\n })\n let numbers = this.state.results.map((number) => {\n return (number.total)\n })\n let rColor = [];\n let rHighlight = [];\n for (var i in area) {\n let r = Math.floor(Math.random() * 200);\n let g = Math.floor(Math.random() * 200);\n let b = Math.floor(Math.random() * 200);\n let c = 'rgb(' + r + ', ' + g + ', ' + b + ')';\n let h = 'rgb(' + (r + 20) + ', ' + (g + 20) + ', ' + (b + 20) + ')';\n rColor[i] = c;\n rHighlight[i] = h;\n }\n this.setState({\n chartData: {\n labels: area,\n datasets: [{\n label: 'Crime Stats in Pie Chart',\n data: numbers,\n backgroundColor: rColor,\n highlight: rHighlight,\n }],\n\n },\n })\n }", "title": "" }, { "docid": "4bb8c2149c08057e66bedd73631bb89e", "score": "0.56430477", "text": "function buildBarChart(sample) {\n\n // Grab the data from the JSON file\n d3.json(\"samples.json\").then((data) => {\n\n // Pull out the necessary data\n var samples = data.samples;\n // Check that the data has been parsed correctly\n console.log(samples);\n\n // Filter data by selected sample\n var sampleArray = samples.filter(sampleObject => sampleObject.id == sample);\n var results = sampleArray[0];\n console.log(results);\n\n // Pull out the ids, labels, and sample values and give them unique variables\n var otu_ids = results.otu_ids;\n var otu_labels = results.otu_labels;\n var sample_values = results.sample_values;\n\n // Set y axis to pull the top 10 samples\n var yticks = otu_ids.slice(0,10).map(otuID => `OTU ${otuID}`).reverse();\n console.log(yticks);\n\n // Specify the plotly data\n var barData = [\n {\n y: yticks,\n x: sample_values.slice(0,10).reverse(),\n text: otu_labels.slice(0,10).reverse(),\n type: \"bar\",\n orientation: \"h\",\n }\n ];\n\n // Specify the plotly layout\n barLayout = {\n title: \"Top 10 Bacterial Cultures Found\",\n hovermode: \"closest\",\n xaxis: { title: \"OTU Count in Sample\"},\n margin: {top: 100, bottom: 100, left: 100, right: 100 },\n };\n\n // Plot the bar chart\n Plotly.newPlot(\"bar\", barData, barLayout);\n\n });\n}", "title": "" }, { "docid": "6a1014c902ab22d8ef6650320a83e778", "score": "0.5641283", "text": "render() {\n let data = [];\n // Puts together the neural network output data to be displayed by the Chart object\n if (this.props.selectedSegment !== null) {\n data = new Array(this.props.outputMap.length)\n .fill(null)\n .map((value, index) => {\n return {\n symbol: this.props.outputMap[index],\n likelihood: this.props.segmentPredictionsInfo[\n this.props.selectedSegment\n ].likelihoods[index],\n };\n });\n }\n const { classes } = this.props;\n //const scale = () => scaleLog().base(2);\n const modifyDomain = (domain) => [0, 1];\n\n return (\n <Card elevation={0} className={classes.root}>\n <CardContent className={classes.cardContent}>\n <Typography\n className={classes.title}\n color=\"textSecondary\"\n gutterBottom\n ></Typography>\n <Chart className={classes.chart} height={220} data={data}>\n <ArgumentAxis />\n <ValueScale modifyDomain={modifyDomain} />\n <ValueAxis showLine={true} />\n <BarSeries\n argumentField=\"symbol\"\n valueField=\"likelihood\"\n color=\"#3a8a74\"\n />\n <Animation />\n </Chart>\n </CardContent>\n </Card>\n );\n }", "title": "" }, { "docid": "12d72dd28d51ccd55decf5cf147dce6e", "score": "0.5637796", "text": "function barType(number) {\n switch (number) {\n case \"Back\":\n return {\n flex: 0.12,\n width: \"90%\",\n backgroundColor: \"hsla(137, 59%, 55%, 1)\",\n borderRadius: 5,\n };\n break;\n case \"Legs\":\n return {\n flex: 0.12,\n width: \"90%\",\n backgroundColor: \"hsla(266, 70%, 66%, 1)\",\n borderRadius: 5,\n };\n break;\n case \"Arms\":\n return {\n flex: 0.12,\n width: \"90%\",\n backgroundColor: \"hsla(40, 73%, 71%, 1)\",\n borderRadius: 5,\n };\n break;\n case \"Abs\":\n return {\n flex: 0.12,\n width: \"90%\",\n backgroundColor: \"blue\",\n borderRadius: 5,\n };\n break;\n case \"Chest\":\n return {\n flex: 0.12,\n width: \"90%\",\n backgroundColor: \"orange\",\n borderRadius: 5,\n };\n break;\n default:\n break;\n }\n }", "title": "" }, { "docid": "9f4036023639dc6d425cda8d123e8fae", "score": "0.5635287", "text": "function barchart(svalue){\n const filtered_sample = dataSamples.filter(sdata=>sdata.id==svalue)[0];\n let data = [{\n x : filtered_sample.sample_values.slice(0, 10),\n y : filtered_sample.otu_ids.slice(0,10).map(item=>'OTU'.concat(' ', item.toString())),\n text : filtered_sample.otu_labels,\n type : 'bar',\n orientation : 'h'\n // ticks: {\n // reverse: true\n // },\n \n \n }]\n var layout = {\n title : {text : 'Top 10 Bacteria Cultures Found', font: { size: 20 }},\n };\n Plotly.newPlot('bar', data, layout)\n}", "title": "" }, { "docid": "f6fa85bddf3cc1d844ea8bd7ff3227cb", "score": "0.56340736", "text": "prepareStackedBarGraph(spec, data) {\r\n this.barMarks = {\r\n 'type': 'rect',\r\n 'from': { 'data': this.dataField },\r\n 'encode': {\r\n 'update': {\r\n 'x': { 'scale': 'xscale', 'field': this.xAxisField },\r\n 'width': { 'scale': 'xscale', 'band': 1, 'offset': -1 },\r\n 'y': { 'scale': 'yscale', 'field': 'y0' },\r\n 'y2': { 'scale': 'yscale', 'field': 'y1' },\r\n 'fill': { 'scale': 'color', 'field': this.valueField },\r\n 'fillOpacity': { 'value': 1 }\r\n },\r\n 'hover': {\r\n 'fillOpacity': { 'value': 0.7 }\r\n }\r\n }\r\n };\r\n /** stack graph legend check */\r\n if (spec.showLegend) {\r\n this.barLegend = [{\r\n 'title': spec.legendTitle,\r\n 'orient': spec.legendOrient,\r\n 'direction': spec.legendDirection,\r\n 'fill': 'color',\r\n 'gradientLength': { 'signal': 'clamp(height, 64, 200)' },\r\n 'symbolType': 'square'\r\n }];\r\n }\r\n /** stack graph tooltip check */\r\n if (spec.showToolTip) {\r\n if (this.barMarks && this.barMarks.encode && this.barMarks.encode.update) {\r\n this.barMarks.encode.update['tooltip'] = {\r\n 'signal': `{\\\"${this.xAxisField}\\\": ''+datum[\\\"${this.xAxisField}\\\"], \\\"${this.yAxisField}\\\": format(datum[\\\"${this.yAxisField}\\\"], \\\"\\\")}`\r\n };\r\n }\r\n }\r\n this.barScales = [\r\n {\r\n 'name': 'xscale',\r\n 'type': 'band',\r\n 'paddingOuter': 0.2,\r\n 'paddingInner': 0.1,\r\n 'range': 'width',\r\n 'domain': { 'data': this.dataField, 'field': this.xAxisField }\r\n },\r\n {\r\n 'name': 'yscale',\r\n 'type': 'linear',\r\n 'range': 'height',\r\n 'nice': true, 'zero': true,\r\n 'domain': { 'data': this.dataField, 'field': 'y1' }\r\n },\r\n {\r\n 'name': 'color',\r\n 'type': 'ordinal',\r\n 'range': this.barConfig.barColourScheme,\r\n 'domain': { 'data': this.dataField, 'field': this.valueField }\r\n }\r\n ];\r\n this.barGraphData.data = data;\r\n this.barGraphData.data['transform'] = [{\r\n 'type': 'stack',\r\n 'groupby': [this.xAxisField],\r\n 'sort': { 'field': this.valueField },\r\n 'field': this.yAxisField\r\n }];\r\n }", "title": "" }, { "docid": "0c714a38160b0558ed5b22df15d3cb3c", "score": "0.5617731", "text": "function buildPlot(){\n d3.json(\"samples.json\").then((importedData) => {\n var data = importedData;\n\n var dataset = d3.select(\"#selDataset\").node().value;\n var testCase = parseInt(dataset);\n var testId = data.metadata.map(row => row[\"id\"])\n var resultindex = testId.indexOf(testCase, 0)\n\n var results=[]\n results.push(testId[resultindex])\n \n var dataSamples = data.samples[resultindex].sample_values\n var dataIds = data.samples[resultindex].otu_ids\n var dataLabels = data.samples[resultindex].otu_labels\n\n \n dataTop10Samples = dataSamples.slice(0,10)\n reversedataTop10Samples = dataTop10Samples.reverse()\n dataTop10IdValues = dataIds.slice(0,10)\n reversedataTop10Values = dataTop10IdValues.reverse().toString()\n\n // Adding string \"OTU\" to integer array to fix label issues\n var finalTop10IdValueArray = [];\n dataTop10IdValues.forEach((i) => {\n finalTop10IdValueArray.push(\"OTU: \" + i)\n })\n\n\n var trace = {\n x: reversedataTop10Samples,\n y: finalTop10IdValueArray,\n type: \"bar\",\n text: dataLabels,\n orientation: \"h\",\n marker: {\n color: [1,2,3,4,5,6,7,8,9,10],\n colorscale: [[0, 'rgb(200, 255, 200)'], [1, 'rgba(214, 0, 0, 1))']]\n }\n };\n\n var data = [trace];\n\n var layout = {\n title: `Test Subject Id #: ${testCase}`,\n };\n\n Plotly.newPlot(\"bar\", data, layout); \n \n buildBubble(); \n })\n}", "title": "" }, { "docid": "9e4bd624a1f7ee803a8924e3fb6f3e3e", "score": "0.5616423", "text": "function renderCallback(renderConfig) {\n\t\tvar chart = renderConfig.moonbeamInstance;\n\t\tvar props = JSON.parse(JSON.stringify(renderConfig.properties));\n\n\t\tprops.width = renderConfig.width;\n\t\tprops.height = renderConfig.height;\n\n//\t\tprops.data = (renderConfig.data || []).map(function(datum){\n//\t\t\tvar datumCpy = jsonCpy(datum);\n//\t\t\tdatumCpy.elClassName = chart.buildClassName('riser', datum._s, datum._g, 'bar');\n//\t\t\treturn datumCpy;\n//\t\t});\n\n\t\tprops.data = renderConfig.data;\n\t\tprops.measureLabel = chart.measureLabel;\n\t\tprops.formatNumber = chart.formatNumber.bind(chart);\n\n\t\tprops.buckets = getFormatedBuckets(renderConfig);\n\n\t\tprops.isInteractionDisabled = renderConfig.disableInteraction;\n\n\t\tvar container = d3.select(renderConfig.container)\n\t\t\t.attr('class', 'com_tdg_histogram');\n\n\t\t// ---------------- INIT YOUR EXTENSION HERE\n\n\n\t\tvar histogram = tdg_histogram(props);\n\t\tcontainer.call(histogram);\n\n\t\td3.selectAll('g.riser rect').attr('class', function(d, g) {\n\t\t\treturn chart.buildClassName('riser', 0, g, 'bar');\n\t\t})\n\t\t.each(function(d, g) {\n\t\t\tvar chart_datum = chart.getDataFromIds({series: 0, group: g});\n\t\t\tif (chart_datum && chart_datum.d) {\n\t\t\t\tchart_datum.d.value = ((d || {}).tooltip || {}).count;\n\t\t\t}\n\t\t\trenderConfig.modules.tooltip.addDefaultToolTipContent(this, 0, g, d);\n\t\t});\n\n\t\t// ---------------- END ( INIT YOUR EXTENSION HERE )\n\n\t\t// ---------------- CALL updateToolTips IF YOU USE MOONBEAM TOOLTIP\n\n\t\trenderConfig.renderComplete();\n\n\t\t// renderConfig.modules.tooltip.updateToolTips();\n\t\t// chart.processRenderComplete();\n\t}", "title": "" }, { "docid": "33d207caa526030d25538d8473e8be99", "score": "0.5605344", "text": "function chartBuilder(sample){\n\n // Creating Filter Sample from SampleData Based on the Selected ID\n var filterSample = [];\n filterSample = sampleData.filter(data => data.id === sample);\n console.log(filterSample);\n\n // Finding the values of sampleId, sampleValues & sampleLabel\n var sampleId = [];\n var sampleValues = [];\n var sampleLabel = [];\n\n filterSample.forEach(info => {\n Object.entries(info).forEach(([key,value]) =>{\n\n switch(key){\n case (\"otu_ids\"):\n sampleId = value.map(y => y);\n console.log(\"sample ID:\", sampleId);\n break;\n\n case(\"sample_values\"):\n sampleValues = value.map( x => x);\n console.log(\"sample value:\", sampleValues);\n break;\n\n case (\"otu_labels\"):\n sampleLabel = value.map(label => label);\n console.log(\"sample Labels:\", sampleLabel);\n break;\n };\n\n });\n });\n\n // Finding the first Top 10 value of each array\n var xAxis = sampleValues.slice(0,10);\n var lable = sampleLabel.slice(0,10);\n\n // Finding the first Top 10 values for OTU_IDS and adding \"OTU\" to them for the chart\n var yAxis = [];\n for (var i = 0; i < xAxis.length; i++){\n yAxis.push(\"OTU \" + sampleId[i]);\n };\n\n // Reversing the values for showing from topest to the least\n xAxis.reverse();\n yAxis.reverse();\n lable.reverse();\n\n // Checking the x and y values for the chart\n console.log(\"xAxis:\", xAxis);\n console.log(\"yAxis:\", yAxis);\n console.log(\"Label:\", lable);\n \n // Creating Bar Chart:\n var trace1 = {\n x: xAxis,\n y: yAxis,\n text: lable,\n name: \"OTUs\",\n type: \"bar\",\n orientation: \"h\",\n marker: {\n color: [\n \"#E0B1CB\",\n \"#CBA0BC\",\n \"#B68FAD\",\n \"#A17E9D\",\n \"#8C6D8E\",\n \"#775D7F\",\n \"#624C70\",\n \"#4D3B60\",\n \"#382A51\",\n \"#231942\"\n\n ]\n }\n };\n\n var data = [trace1];\n\n // Apply the group bar mode to the layout\n var layout = {\n title: `Top 10 OTUs Found in Test ID No.: ${sample}`,\n xaxis: {title: 'Sample Values'},\n yaxis: {title: 'OTUs'},\n margin: {\n l: 100,\n r: 100,\n t: 100,\n b: 100\n }\n };\n\n // Displaying the Bar Chart\n Plotly.newPlot(\"bar\", data, layout);\n\n// *****************************************************//\n\n // Craeting Bubble Chart:\n var trace2 = {\n x: sampleId,\n y: sampleValues,\n text: sampleLabel,\n mode: 'markers',\n marker: {\n color: sampleId,\n size: sampleValues,\n sizeref: 0.05,\n sizemode: 'area'\n }\n };\n \n var data2 = [trace2];\n \n // Apply the mode to the layout\n var layout2 = {\n title: `OTUs Samples for Test ID No.: ${sample}`,\n showlegend: false,\n xaxis: {\n title: \"OTU IDs\",\n showgird: true\n },\n };\n \n // Displaying the Bubble Chart\n Plotly.newPlot(\"bubble\", data2, layout2);\n }", "title": "" }, { "docid": "af9d1c72f4de0aab62f0a5d37c876ca5", "score": "0.5604959", "text": "function Barchart(tableData) {\n console.log(tableData.otu_ids.map(function (otu) {\n return \"OTU \" + otu\n }))\n var number = tableData.sample_values.slice(0, 10);\n var slice = tableData.otu_ids.map(function (otu) {\n return \"OTU \" + otu\n }).slice(0, 10)\n console.log(slice)\n var otu_label = tableData.otu_labels\n var trace1 = [{\n text: otu_label.reverse(),\n type: 'bar',\n x: number.reverse(),\n y: slice.reverse(),\n orientation: 'h'\n }];\n var layout = {\n title: 'Top 10 Bacteria Cultures Found',\n xaxis: { title: \"Bacteria Sample Values\" },\n yaxis: { title: \"OTU IDs\" }\n };\n // Display plot\n Plotly.newPlot(\"bar\", trace1, layout);\n}", "title": "" }, { "docid": "a97b21d8f4ceef40124de5d0a6249a4e", "score": "0.56017053", "text": "function DrawBargraph(sampleId) {\n \n //Get data from json file\n d3.json(\"samples.json\").then((data) => {\n \n var samples = data.samples;\n var resultArray = samples.filter(sample => sample.id == sampleId);\n var result = resultArray[0];\n\n var otu_ids = result.otu_ids;\n var otu_labels = result.otu_labels;\n var sample_values = result.sample_values;\n\n var yticks = otu_ids.slice(0,10).map(otuId => `OTU ${otuId}`).reverse();\n \n var barData = {\n x: sample_values.slice(0,10).reverse(),\n y: yticks,\n type: \"bar\",\n text: otu_labels.slice(0,10).reverse(),\n orientation: \"h\"\n };\n\n var barLayout = {\n title: \"Top 10 Bacteria Cultures Found\",\n margin: {t: 30, l:150}\n };\n\n Plotly.newPlot(\"bar\", [barData], barLayout);\n });\n}", "title": "" }, { "docid": "d97dcabea8e1d1a6e379e1036830d8d3", "score": "0.55926096", "text": "function buildplot(sampleID){\n d3.json(\"data/samples.json\").then((jsonData) => {\n\n // First plot : bar chart for selected subject\n const samples = jsonData.samples;\n // filter data according to \"sampleID\" selected from the dropdown menu\n const filteredId = samples.filter(i =>\n i.id.toString() === sampleID\n )\n console.log(filteredId);\n\n //grab sample_values, otu_ids, otu_labels and define the \"genusArr\"\n const sampleValues = filteredId[0].sample_values.slice(0,10).reverse();\n const otuValues = filteredId[0].otu_ids.slice(0,10).reverse();\n const genusValues = filteredId[0].otu_labels.slice(0,10).reverse();\n const genusArr = genusValues.map(genvalue =>\n genvalue.split(\";\").slice(-1)\n )\n console.log(sampleValues);\n console.log(otuValues);\n console.log(genusValues);\n console.log(genusArr);\n\n // create an array with \"otuValues\" and \"genusArr\"\n const otuGenus = [];\n //loop over \"otuValues\" array and passing indexes to correlate \"genusArr\" indexes\n otuValues.forEach((ov,i) => {\n const ovString = ov + \" : \" + genusArr[i]\n otuGenus.push(ovString)\n })\n console.log(otuGenus);\n\n // define trace , data, layout and plot\n const trace = {\n x: sampleValues,\n y: otuGenus,\n type: \"bar\",\n orientation: \"h\",\n text: genusValues,\n }\n const data = [trace];\n\n const layout = {\n title: \"Top 10 Bacteria - Selected Subject\",\n xaxis: {tickfont: {\n size: 12,\n }},\n yaxis: {tickfont: {\n size: 8,\n }},\n margin: {\n l: 100,\n r: 100,\n t: 30,\n b: 20\n }\n }\n\n Plotly.newPlot(\"bar2\",data,layout);\n\n //##############################################################################\n // All subjects Bar Plot\n //create \"otusObject\" that stores otu_id:sample_values, and a \"genusObject\" that stores otu_id:genus\n const samplesUto = jsonData.samples;\n const otusObject = {};\n const genusObject = {};\n \n //Loop over all subjects/samples\n samplesUto.forEach(sample => {\n //otu_ids\n const otuIden = sample.otu_ids;\n // sample_values\n const sampleVal = sample.sample_values;\n //otu_labels and genus \n const genus = sample.otu_labels;\n const genusVal = genus.map(genvalue => genvalue.split(\";\").slice(-1));\n\n //Loop over each otu_id\n otuIden.forEach((id,i) =>{\n //validate if the id exists\n if (id in otusObject){\n otusObject[id].push(sampleVal[i]);\n genusObject[id].push(genus[i]);\n }\n //initialize the key-value pair\n else{\n otusObject[id] = [sampleVal[i]];\n genusObject[id] = [genus[i]];\n }\n });\n });\n\n console.log(otusObject);\n console.log(genusObject);\n\n //use reduce to aggregate sample_values by otu_id\n const aggOtuObject = {};\n Object.entries(otusObject).forEach(([key,value]) => {\n const reducer = (accumulator, currentValue) => accumulator + currentValue;\n const aggOtuValues = value.reduce(reducer);\n if(key in aggOtuObject){\n aggOtuObject[key].push(aggOtuValues);\n }\n else{\n aggOtuObject[key] = aggOtuValues;\n }\n });\n console.log(aggOtuObject);\n\n //sort and slice aggOtuValues\n const aggOtuArr = Object.entries(aggOtuObject);\n const sortAggOtuArr = aggOtuArr.sort(function(a, b) {\n return b[1] - a[1];\n });\n const sliceAggOtuArr = sortAggOtuArr.slice(0,10);\n \n // adding Genus value within sliceAggOtuArr\n sliceAggOtuArr.forEach(agg => {\n Object.entries(genusObject).forEach(([key,value]) =>{\n if (agg[0] === key) {\n agg.push(value[0]);\n const genusValue = value[0].split(\";\").slice(-1);\n agg.push(key + \" : \" + genusValue);\n }\n })\n });\n console.log(sliceAggOtuArr);\n\n //create trace 2, data2, layout2, and plot\n\n const trace2 = {\n x: sliceAggOtuArr.map(agg => agg[1]).reverse(),\n y: sliceAggOtuArr.map(agg => agg[3]).reverse(),\n type: \"bar\",\n orientation: \"h\",\n text: sliceAggOtuArr.map(agg => agg[2]),\n }\n\n const data2 = [trace2];\n\n const layout2 = {\n title: \"Top 10 Bacteria - All Subjects\",\n xaxis: {tickfont: {\n size: 12,\n }},\n yaxis: {tickfont: {\n size: 8,\n }},\n margin: {\n l: 100,\n r: 100,\n t: 30,\n b: 20\n }\n }\n\n Plotly.newPlot(\"bar1\",data2,layout2);\n\n //################################################################################\n //Bubble Chart\n\n //otu_labels for selected subject\n const otuLabel = filteredId[0].otu_labels;\n\n // grab the family\n const otuFam = otuLabel.map(label =>\n label.split(\";\").slice(0,5));\n const famSampValues = filteredId[0].sample_values;\n console.log(otuFam);\n\n //create a object object where \"family : sample_value\"\n const otuFamObject = {};\n\n // loop within otuFam/families\n otuFam.forEach((fam,i) =>{\n // console.log(famSampValues[i]);\n if (fam in otuFamObject){\n otuFamObject[fam].push(famSampValues[i])\n }\n else{\n otuFamObject[fam] = [famSampValues[i]];\n }\n });\n console.log(otuFamObject);\n\n //reduce sample_value by family\n const aggFamObj = {};\n Object.entries(otuFamObject).forEach(([key,value]) => {\n const famReducer = (accum, currentVal) => accum + currentVal;\n const aggFamValues = value.reduce(famReducer);\n // console.log(aggFamValues);\n if (key in aggFamObj){\n aggFamObj[key].push(aggFamValues);\n }\n else{\n aggFamObj[key] = aggFamValues;\n }\n });\n console.log(aggFamObj);\n\n //sort \"aggFamObj\"\n const sortFamArr = Object.entries(aggFamObj).sort((a,b) =>\n {return b[1] - a[1]});\n console.log(sortFamArr);\n\n //create bubble chart\n //grab family and aggregated sample_values from the resulted arrays\n const familyResult = sortFamArr.map(sortFam => sortFam[0]);\n const sampleValueResult = sortFamArr.map(sortFam => sortFam[1]);\n\n //create bubbletrace, data3, layout3, and plot\n const bubbleTrace = {\n x: sampleValueResult,\n y: familyResult,\n mode: 'markers',\n marker: {size: sampleValueResult,\n sizemode: 'area'},\n }\n\n const data3 = [bubbleTrace];\n\n const layout3 = {\n title: \"Count of Bacteria - Selected Subject\",\n xaxis: {tickfont: {\n size: 12,\n }},\n yaxis: {tickfont: {\n size: 8,\n }},\n margin: {\n l: 350,\n r: 200,\n t: 50,\n b: 50\n }\n }\n\n Plotly.newPlot(\"bubble\",data3,layout3);\n }); \n}", "title": "" }, { "docid": "16d85c59744f1c238d70dce941c72ff4", "score": "0.5591462", "text": "function loadbar(data)\r\n{\r\n\r\n // make an svg for the chart\r\n barsvg = d3.select(\"body\").append(\"svg\").attr(\"class\", \"barchart\")\r\n .attr(\"width\", BARWIDTH)\r\n .attr(\"height\", BARHEIGHT)\r\n\r\n // Produce the axis (yscale domain is hardcoded for readability)\r\n xScale = d3.scaleBand().domain(keys).range([PADDING, BARWIDTH]).padding(0.1)\r\n xAxis = barsvg.append(\"g\").attr(\"transform\", \"translate(0, \" + (BARHEIGHT - PADDING) + \")\")\r\n .call(d3.axisBottom(xScale));\r\n yScale = d3.scaleLinear().domain([0, 215]).range([BARHEIGHT - PADDING, PADDING]).nice()\r\n yAxis = barsvg.append(\"g\").attr(\"transform\", \"translate(\"+ PADDING + \", 0)\")\r\n .call(d3.axisLeft(yScale));\r\n\r\n // Make the text to show what catagory is currently active\r\n bartext = barsvg.append(\"text\").attr(\"class\", \"bartext\")\r\n .attr(\"x\", 100).attr(\"y\", 20)\r\n barsvg.append(\"line\").attr(\"class\", \"averageline\").style(\"stroke\", \"rgb(255,0,0)\")\r\n\r\n // make placeholder bars\r\n bars = barsvg.append(\"g\").attr(\"class\", \"bars\")\r\n .selectAll(\"rect\").data(keys).enter().append(\"rect\")\r\n\r\n // and placeholder tooltip\r\n bars.append(\"title\")\r\n\r\n // returns a function where you can update this graph\r\n // accept an object in the form of {type1: \"string\", type2: \"string\"}\r\n return function(types)\r\n {\r\n text = \"Maintype: \" + types.type1\r\n\r\n // make an object to store all stats\r\n attributes = {}\r\n keys.forEach(function(key)\r\n {\r\n attributes[key] = []\r\n })\r\n\r\n // gets all the nessecary stats from the data stores them in the right location\r\n if (types.type2 === undefined)\r\n {\r\n data.forEach(function(datapoint)\r\n {\r\n if (datapoint.Type1 === types.type1)\r\n {\r\n for (key in datapoint)\r\n {\r\n if (keys.includes(key))\r\n {\r\n attributes[key].push(datapoint[key])\r\n }\r\n }\r\n }\r\n })\r\n }\r\n else\r\n {\r\n text += \" and Subtype: \" + types.type2\r\n data.forEach(function(datapoint)\r\n {\r\n if (datapoint.Type1 === types.type1 && datapoint.Type2 === types.type2)\r\n {\r\n for (key in datapoint)\r\n {\r\n if (keys.includes(key))\r\n {\r\n attributes[key].push(datapoint[key])\r\n }\r\n }\r\n }\r\n })\r\n }\r\n\r\n // average all the stats\r\n for (key in attributes)\r\n {\r\n attributes[key] = average(attributes[key])\r\n }\r\n\r\n // update the graph bars\r\n bars.data(Object.values(attributes)).transition().duration(1000)\r\n .attr(\"width\", xScale.bandwidth())\r\n .attr(\"x\", function(d, i) { return xScale(Object.keys(attributes)[i])})\r\n .attr(\"y\", d => yScale(d))\r\n .attr(\"height\", d => yScale(0) - yScale(d))\r\n .attr(\"fill\", colorfunction(types.type1))\r\n .select(\"title\").text(d => d)\r\n\r\n // update the text\r\n d3.select(\".bartext\").text(text)\r\n\r\n // update the averageline\r\n averagestats = average(Object.values(attributes))\r\n d3.select(\".averageline\")\r\n .attr(\"x1\", PADDING).attr(\"x2\", BARWIDTH)\r\n .attr(\"y1\", yScale(averagestats)).attr(\"y2\", yScale(averagestats))\r\n }\r\n}", "title": "" }, { "docid": "610e2db04fc610a454fc9bf0d8230af9", "score": "0.5584488", "text": "function createBarEvents() {\n svg.selectAll('.bar')\n .on('mouseover', function(d, i) {\n d3.select(this)\n .attr('fill', function(d) {\n var index = dataset.data.indexOf(d);\n return 'rgba(' + dataset.data[index].color + ', 0.4)';\n });\n })\n .on('mouseout', function(d, i) {\n d3.select(this)\n .attr('fill', function(d, i) {\n var index = dataset.data.indexOf(d);\n return 'rgb(' + dataset.data[index].color + ')';\n });\n });\n }", "title": "" }, { "docid": "588ea987a98607bff43f2e049a383d1e", "score": "0.55794835", "text": "componentDidUpdate() {\n // Initialize the chart with the first team, but after that allow users to clear the chart\n if(this.props.league && this.props.data) {\n // On league change, we need to update the team and stat lists.\n if(this.state.currLeague != this.props.league) {\n let choices = [];\n let stats = [];\n for(let d of Object.keys(colors[this.props.league])) {\n choices.push(d);\n }\n for(let stat of Object.keys(this.props.data[0])) {\n if(stat != \"TEAM\" && stat != \"PLAYER\" && stat != \"Champs\") {\n stats.push(stat);\n }\n }\n\n this.setState({currLeague: this.props.league, choices: choices, stats: stats});\n }\n }\n\n this.createBarChart();\n }", "title": "" }, { "docid": "6b8bf2e4686657228123980b9bc17ca0", "score": "0.55792844", "text": "function chartBuilder(dataInput) {\n // Build bar chart\n // Define the dataset\n var trace1 = {\n x: dataInput.otu_ids.slice(0,10).map(id => id.toString()),\n y: dataInput.sample_values.slice(0,10),\n type: \"bar\",\n name: \"OTU Bar Chart\",\n text: dataInput.otu_labels.slice(0,10),\n }\n\n // Define the layout\n var layout = {\n title: \"Count of Highest 10 OTUs per Sample (bar)\",\n xaxis:{title: \"OTU ID No.\", type: \"category\"},\n yaxis:{title: \"Count in Sample\"}\n }\n\n // Define the datasets to plot\n var data = [trace1]\n\n // Plot data\n Plotly.newPlot(\"bar\", data, layout)\n\n}", "title": "" }, { "docid": "248aee3d39a09be648c44581064ea079", "score": "0.5569881", "text": "render() {\n return html `\n <section>\n <ef-canvas @resize=${this.renderBarGauge.bind(this)}></ef-canvas>\n ${this.createLabelTemplate(this.topValue, this.topLabel, 'top')}\n ${this.createLabelTemplate(this.bottomValue, this.bottomLabel, 'bottom')}\n ${this.createLabelTemplate(this.range, this.rangeLabel, 'range')}\n </section>\n `;\n }", "title": "" }, { "docid": "d1c8e12d996aa313285e88b2c8d6aa69", "score": "0.5558833", "text": "function makeBarStations(ctx) {\n myChart = new Chart(ctx, {\n type: \"bar\",\n data: {\n labels: [\"2003\", \"2004\", \"2005\", \"2006\", \"2007\", \"2008\", \"2009\",\n \"2010\", \"2011\", \"2012\", \"2013\", \"2014\", \"2015\", \"2016\"],\n datasets: [{\n label: '# in ' + statName[0],\n fill: false,\n borderColor: cols[0],\n backgroundColor: cols[0],\n data: selectData\n },\n {\n label: '# in ' + statName[1],\n fill: false,\n data: extraSelectedStat[0],\n borderColor: cols[1],\n backgroundColor: cols[1],\n },\n {\n label: '# in ' + statName[2],\n fill: false,\n data: extraSelectedStat[1],\n borderColor: cols[2],\n backgroundColor: cols[2]\n },\n {\n label: '# in ' + statName[3],\n fill: false,\n data: extraSelectedStat[2],\n borderColor: cols[3],\n backgroundColor: cols[3]\n },\n {\n label: '# in ' + statName[4],\n fill: false,\n data: extraSelectedStat[3],\n borderColor: cols[4],\n backgroundColor: cols[4]\n },\n {\n label: '# in ' + statName[5],\n fill: false,\n data: extraSelectedStat[4],\n borderColor: cols[5],\n backgroundColor: cols[5]\n }]\n },\n options: {\n title: {\n display: true,\n padding: 1,\n text: $(\"#crimeDd option:selected\").text()\n },\n responsive: true,\n maintainAspectRatio: false,\n scales: {\n yAxes: [{\n ticks: {\n beginAtZero:true\n }\n }],\n // xAxes: [{\n // stacked: true\n // }]\n },\n tooltips: {\n mode: \"index\",\n intersect: false\n }\n }\n });\n}", "title": "" }, { "docid": "c926eee26d85490d844b7bb09ff32a10", "score": "0.5557785", "text": "function ActuLoadbar(actuator, barcolor){\r\n\r\n\t//Create canvas and containing div element for object\r\n\tvar canvas = document.createElement('canvas');\r\n\tvar div = document.createElement('div');\r\n\tdiv.style.padding = '8px';\r\n\t\r\n\t//Creates text node input containing name of actuator and appends it in div element\r\n\tvar str = document.createTextNode(actuator);\r\n\tdiv.style.color = \"limegreen\";\r\n\tdiv.appendChild(str);\r\n\t\r\n\tdiv.appendChild(canvas);\r\n\t\r\n\tvar actuloadbar = {\r\n\t\t'_canvas': canvas,\r\n\t\t'_div': div,\r\n\t\t\r\n\t\t'_features': {\r\n\t\t\t'color' : barcolor,\r\n\t\t\t'value': 0,\r\n\t\t\t'fnValueToString': function(value) { return value.toString();}\r\n\t\t},\r\n\t\t\r\n\t\t//Draws loadbar\r\n\t\t'create': function() {\r\n\t\t\tvar canvas = this._canvas;\r\n\t\t\t\r\n\t\t\t//Set length and height of loadbar \r\n\t\t\tvar width = 215;\r\n\t\t\tcanvas.height = 25;\r\n\t\t\t\r\n\t\t\tvar features = this._features;\r\n\t\t\tvar color = features.color;\r\n\t\t\tvar value = features.value;\r\n\t\t\tvar valueToString = features.fnValueToString;\r\n\t\t\tvar valueStr = valueToString(value);\r\n\t\t\t\r\n\t\t\tvar ctx = canvas.getContext('2d');\r\n\t\t\t\r\n\t\t\t//Clears canvas upon creation\r\n\t\t\tctx.clearRect(0, 0, canvas.width, canvas.height);\r\n\t\t\t\r\n\t\t\t//Create the loadbar\r\n\t\t\tctx.beginPath();\r\n\t\t\tctx.lineCap = 'round';\r\n\t\t\tctx.lineWidth = 25;\r\n\t\t\tctx.strokeStyle = 'lightgrey';\r\n\t\t\tctx.moveTo(12.5, 12.5);\r\n\t\t\tctx.lineTo(12.5+width, 12.5);\r\n\t\t\tctx.stroke();\r\n\t\t\t\r\n\t\t\tvar lwidth = Math.round((value/100)*width);\r\n\t\t\t\r\n\t\t\t//Create the loader\r\n\t\t\tctx.beginPath();\r\n\t\t\tctx.lineCap = 'round';\r\n\t\t\tctx.lineWidth = 25;\r\n\t\t\tctx.strokeStyle = color;\r\n\t\t\tctx.moveTo(12.5, 12.5);\r\n\t\t\tctx.lineTo(12.5+lwidth, 12.5);\r\n\t\t\tctx.stroke();\r\n\t\t\t\r\n\t\t\t//Inputs relevant percentage value at the start of the loadbar\r\n\t\t\tvar fontSize = 0.75 * 25;\r\n\t\t\tctx.font = fontSize.toString() + 'px Arial';\r\n\t\t\tctx.fillStyle = 'red';\r\n\t\t\tctx.textAlign = 'left';\r\n\t\t\tctx.textBaseline = 'middle';\r\n\t\t\tctx.fillText(valueStr + \"%\", 12.5, 12.5);\r\n\t\t},\r\n\t\t\r\n\t\t//Return div element of object\r\n\t\t'getDiv': function(){\r\n\t\t this.create()\r\n\t\t\treturn this._div;\r\n\t\t},\r\n\t\t\r\n\t\t//Set percentage value of load/ indicator bar\r\n\t\t'setValue': function(value) {\r\n\t this._features.value = value;\r\n\t\t\tthis.create();\r\n\t\t}\r\n\t}\r\n\t\r\n\treturn actuloadbar;\r\n}", "title": "" }, { "docid": "88aca5a917e07bb951bcd89896ca3379", "score": "0.55550206", "text": "function healthBar(){\n let healthValue;\n //map the player's health with the width of the bar\n healthValue = map(playerHealth, 0,650,0,300);\n //setup the bar visuals\n fill(255,0,0);\n rect(35,50,300,20);\n fill(0,255,0);\n //display health loss on bar\n rect(35,50,healthValue,20);\n}", "title": "" }, { "docid": "8a790bda5990489382b84179b78857c8", "score": "0.5554716", "text": "function refresh() {\n var values;\n var rand = Math.random() * 30 + 10;\n var slope = Math.random() * 6 - 3;\n values = d3.range(20).map(function(i) { \n var val = i*slope + rand + Math.random() * 3;\n return (val > 50) ? 50 : val;\n }) \n \n x = d3.scale.linear()\n .domain([0, values.length])\n .range([0, width-margin]);\n \n y = d3.scale.linear()\n .domain([0, 50])\n .range([height-margin, 0]);\n \n //bind generated data to custom dom elements\n var bars = dataContainer.selectAll('.bars').data(values);\n \n //store variables for visual representation. These will be used\n //later by p5 methods.\n bars\n .enter()\n .append('rect')\n .attr('height', 120)\n .attr('class', 'bars')\n .attr('x', function(d, i) { return x(i) })\n .attr('dx', function(d) { return (width-margin*2)/values.length - 1;})\n .attr('y', function(d) { return height; })\n \n bars\n .transition()\n .duration(2000)\n .delay(function(d,i) { return i * 50;})\n .attr('height', function(d) { return height - y(d); })\n .attr('x', function(d, i) { return x(i) })\n .attr('y', function(d) { return y(d); })\n \n}", "title": "" }, { "docid": "d066baa68d94b38957d30d3aaa3d57de", "score": "0.5549073", "text": "function displayItemInformation(item) {\n var fullInfo = item.split(\"*\");\n \n let ratios =getRatios(fullInfo[0]);\n let backgroundStyle = returnLinearGradient(parseInt(ratios[0]),parseInt(ratios[1]),parseInt(ratios[2]),parseInt(ratios[3]));\n \n bar = element(\"ratiosBar\" + barCounter);\n bar.style.background=backgroundStyle;\n bar.classList.add(\"movingBar\");\n bar.style.width=\"100%\";\n\n \n barCounter++;\n bar2 = document.createElement(\"bar\");\n bar2.setAttribute(\"id\",\"ratiosBar\" + barCounter);\n element(\"factory_descriptions\").appendChild(bar2);\n let oldBarCounter = barCounter -3;\n if(oldBarCounter>=1){\n element(\"ratiosBar\"+ oldBarCounter).style.height=0;\n if(oldBarCounter>=2){\n oldBarCounter = barCounter -4;\n element(\"factory_descriptions\").removeChild(element(\"ratiosBar\"+ oldBarCounter));\n }\n }\n \n \n}", "title": "" } ]
f527722a88d7d6cc6ea71770fa9df853
Create body to send
[ { "docid": "80302af56a4b3435381364e0c3fb8da4", "score": "0.63646966", "text": "function _createBody(oauth_keys, binary){\n var body = \"\";\n for( var key in oauth_keys){\n body +=_addOAuth(key, oauth_keys[key]);\n }\n body+=boundary2+'\\r\\n';\n body+='Content-Disposition: form-data; name=\"photo\"; filename=\"a.jpeg\"'+'\\r\\n'+'Content-Type: image/jpeg'+'\\r\\n'+ \n '\\r\\n'+\n binary+'\\r\\n'+\n boundary3+'\\r\\n';\n return body;\n }", "title": "" } ]
[ { "docid": "19eb549291a237dbc89cf5729263cfa0", "score": "0.6684145", "text": "createSendBody(data) {\n const sendBody = super.createSendBody(data);\n\n // set the digest header\n const digest = sha256.update(sendBody).digest('base64');\n this.headers.Digest = `SHA-256=${digest}`;\n\n return sendBody;\n }", "title": "" }, { "docid": "d330b39a0b69c7ba6d8a940b598d50d2", "score": "0.6563708", "text": "constructBody() {\n\t\tthis.from.body = [];\n\t\tthis.from.req\n\t\t\t.on('data', (chunk) => {\n\t\t\t\tthis.from.body.push(chunk);\n\t\t\t})\n\t\t\t.on('end', () => {\n\t\t\t\tthis.from.body = Buffer.concat(this.from.body).toString();\n\t\t\t\tthis.convertBodyToJSON();\n\t\t\t});\n\t}", "title": "" }, { "docid": "552c78a2a079f9df107d09b4278a4204", "score": "0.6537471", "text": "function makeBody(data) {\n\tlet body = \"\";\n\n\tObject.keys(data).forEach(function(key) {\n let value = data[key];\n\t\t\tbody = body + \"&\" + key + '=' + encodeURI(value);\n });\n\n\treturn body\n}", "title": "" }, { "docid": "63068732005420aa326d6decb6afcb8f", "score": "0.63422304", "text": "appendBody(id, value) {\n this.body[id] = value;\n }", "title": "" }, { "docid": "e9a499883d739d745b2d7594ed3e3755", "score": "0.6140806", "text": "send(body) {\n client.messages.create({\n to: this.from || this.to,\n from: config.phoneNumber,\n body: body\n });\n }", "title": "" }, { "docid": "2305030fbe4c7a8651c736589438aa0e", "score": "0.6122975", "text": "setBody(body){this._body=body;return this;}", "title": "" }, { "docid": "d8d3b9d672f7b0095102b0484afb0ffb", "score": "0.6110163", "text": "function createMessage(session, type, body) \n{\n var timestamp = (new Date()).toISOString();\n var message = {\n session: sesion,\n timestamp: timestamp,\n type: type,\n body: body\n };\n return message;\n}", "title": "" }, { "docid": "772b10961291b3f756a1d2d02d5c43a5", "score": "0.6099797", "text": "function bodyBuilder(_ref) {var req = _ref.req,value = _ref.value;\n req.body = value;\n}", "title": "" }, { "docid": "fff0fee313652d7f300b10e8f1561e41", "score": "0.60951746", "text": "create(body) {\n return this.rest.post(`${this.baseUrl}`, typeof body === 'object' ? JSON.stringify(body) : body);\n }", "title": "" }, { "docid": "5ce8b01dc261fa6fb5bd7cac2729f238", "score": "0.6029599", "text": "writeBody (req) {\n if (this.options.body) {\n var body = this.options.body\n if (this.options.json !== false) { body = JSON.stringify(body) }\n if (this.debug) {\n console.error('--> ' + body)\n }\n\n req.setHeader('Content-length', Buffer.byteLength(body, 'utf8'))\n req.write(body)\n } else {\n req.setHeader('Content-length', 0)\n }\n }", "title": "" }, { "docid": "5c0ae739e254fb5e280d5f8a006deb48", "score": "0.5917486", "text": "makeBody(){\n var arr = [];\n let mail ;\n\t\tfor(var i=0;i<this.attachment.length;i++){\n\t\t\tarr[i] = {\n\t\t\t\tpath: this.attachment[i],\n\t\t\t\tencoding: 'base64'\n\t\t\t}\n\t\t}\n\n\t\t//Mail Body is created.\n\t\tif(this.attachment.length){\n\t\t\tmail = new mailComposer({\n\t\t\t\tto: this.to,\n\t\t\t\thtml: this.body,\n\t\t\t\tsubject: this.sub,\n\t\t\t\ttextEncoding: \"base64\",\n\t\t\t\tattachments: arr\n\t\t\t});\t\n\t\t}\n\t\telse{\n\t\t\tmail = new mailComposer({\n\t\t\t\tto: this.to,\n\t\t\t\thtml: this.body,\n\t\t\t\tsubject: this.sub,\n\t\t\t\ttextEncoding: \"base64\"\n\t\t\t});\n\t\t}\n\t\t\n\t\t//Compiles and encodes the mail.\n\t\tmail.compile().build((err, msg) => {\n\t\t\tif (err){\n\t\t\t\treturn console.log('Error compiling email ' + error);\n\t\t\t} \n\t\t\n\t\t\tconst encodedMessage = Buffer.from(msg)\n\t\t\t .toString('base64')\n\t\t\t .replace(/\\+/g, '-')\n\t\t\t .replace(/\\//g, '_')\n\t\t\t .replace(/=+$/, '');\n\t\t\t\n\t\t\tif(this.task === 'mail'){\n\t\t\t\tthis.sendMail(encodedMessage);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tthis.saveDraft(encodedMessage);\n\t\t\t}\n\t\t});\n\t}", "title": "" }, { "docid": "3f12b99e20dae1d19c1be45d931aa980", "score": "0.5873846", "text": "function addToBody() {\n\t state.body = state.body || {};\n\t // ignore if we already have a value\n\t if (state.body[key] == null) {\n\t if (key === 'query' && _.isString(val)) {\n\t val = { query_string: { query: val } };\n\t }\n\n\t state.body[key] = val;\n\t }\n\t }", "title": "" }, { "docid": "6f0727931251bf120505e938bdf59f07", "score": "0.5847329", "text": "create(body, contentType, callback) {\n this.request(POST, `/pad/create`, {'Content-Type': contentType}, body, callback);\n }", "title": "" }, { "docid": "949b8fd81d877ae027ec2572f5524f69", "score": "0.57639223", "text": "body(data) {\n this.data = data;\n\n if (data === undefined) {\n this.raw.send();\n return this;\n }\n\n if (isStream(data)) {\n this.stream(data);\n return this;\n }\n\n if (Buffer.isBuffer(data)) {\n if (!this.getContentType()) {\n this.contentType(\"application/octet-stream\");\n }\n\n this.contentLength(data.length);\n this.raw.send(data);\n return this;\n }\n\n if (isBoolean(data) || isNumber(data) || isString(data) || data === null) {\n this.raw.send(data);\n return this;\n }\n\n this.raw.json(data);\n return this;\n }", "title": "" }, { "docid": "afe0b57b1831e89fcafa214877ffdb3d", "score": "0.57526976", "text": "bodyForCreate () {\n return {\n LarosateID: process.env.LADOK_KTH_LAROSATE_ID,\n Resultat: resultsForCreate\n }\n }", "title": "" }, { "docid": "529518e7b2a58f40ca01dd1296d766e2", "score": "0.57075715", "text": "function makeRequestBody() {\n return {\n userName: currentMember.name,\n profilePicture: currentMember.profileImageUrl\n }\n}", "title": "" }, { "docid": "13112da44b860987c534ecfb6b6d31f7", "score": "0.5691583", "text": "function generateReqBody(callname, obj) {\n var restcall = URL[callname],\n reqObj = obj || {};\n return {\n url: getFinalURL(restcall.url, reqObj),\n method: restcall.method,\n headers: {\n 'Accept': 'application/json'\n },\n json: reqObj.reqBody || {},\n timeout: 5000\n }\n }", "title": "" }, { "docid": "2344f977270a7b9a32627af8166c5f68", "score": "0.5666082", "text": "function rawBody(req, res, next) {\n req.setEncoding(\"utf8\");\n req.body = \"\";\n req.on(\"data\", function (chunk) {\n req.body += chunk;\n // console.log(`Chunck = ${chunk}`)\n });\n req.on(\"end\", function () {\n next();\n });\n }", "title": "" }, { "docid": "4bd3194c33690f08ffd4fe93d9817ae6", "score": "0.56576276", "text": "function createMsg(type, data) {\n let message = {\n type: type,\n data: data\n }\n return JSON.stringify(message)\n}", "title": "" }, { "docid": "d12577c3ba47aed6801862425a0a632f", "score": "0.5621975", "text": "create({ body }, response) {\n response.json(body);\n }", "title": "" }, { "docid": "7030f696951123188c64901fadf379ae", "score": "0.56162935", "text": "function main(params) {\n const TRUDESK_SERVER = params[\"TRUEDESK_SERVER\"];\n const TRUDESK_APIKEY_FULANO = params[\"TRUDESK_APIKEY_FULANO\"];\n let payload = {\n body: params[\"new_message\"],\n cId: params[\"convo\"].id,\n owner: params[\"convo\"].owner\n };\n\n return new Promise((resolve, reject) => {\n request.post(\n {\n json: true,\n url: `${TRUDESK_SERVER}/api/v1/messages/send`,\n headers: {\n accesstoken: TRUDESK_APIKEY_FULANO\n },\n body: payload\n },\n function(err, response, body) {\n if (err) {\n console.error(err);\n reject(err);\n } else if (body && body.error) {\n console.error(body.error);\n reject(new Error(body.error));\n } else if (response.statusCode >= 400) {\n console.error(new Error(\"Status code: \" + response.statusCode));\n } else {\n resolve(Object.assign({}, payload, body));\n }\n }\n );\n });\n}", "title": "" }, { "docid": "c224a0e0e517093101d4b852bb4d9fb1", "score": "0.56148195", "text": "function send(str) {\n var payload = `{\"text\":\"${str}\"}`\n var len = Buffer.byteLength(payload)\n console.log('payload: ' + payload + ' len: ' + len)\n\n var post_options = {\n host: host,\n port: 8000,\n path: path,\n method: 'POST',\n headers: { \n 'content-type': 'application/json',\n 'content-length': len\n }\n }\n\n var post_req = https.request(post_options)\n\n post_req.write(payload)\n post_req.end()\n}", "title": "" }, { "docid": "6e33980b9543e0d72ee12ea816384584", "score": "0.55966496", "text": "body(form) {\n return \"\"\n }", "title": "" }, { "docid": "7c869381589747af0e6c35bdaa1d92c1", "score": "0.55823666", "text": "get body() {\n return this.raw.body;\n }", "title": "" }, { "docid": "2277dc6dbeac4c91ff2efbd65f74a151", "score": "0.5575646", "text": "async create(data, params) {}", "title": "" }, { "docid": "726295f1d4ab2a65b180e74876a02ba3", "score": "0.5540552", "text": "setBody(body) {\n this.body = body;\n return this;\n }", "title": "" }, { "docid": "07c39cab81e1fba14b0f570e40a38f97", "score": "0.5535553", "text": "function getBody(request) {\n var cleanedRequest = mapValues(request, function (v) {\n return v.toString();\n });\n return {\n evt: cleanedRequest,\n bytes: getUTF8Length(JSON.stringify(cleanedRequest)),\n };\n }", "title": "" }, { "docid": "c8aa5cc969aa9c283ab27c5a84106be6", "score": "0.5518562", "text": "createPostData (buffer, signature) {\n console.log('creating post data')\n\n return {\n sample: buffer.toString('base64'),\n sample_bytes: buffer.length,\n access_key: this.access_key,\n data_type: this.data_type,\n signature,\n signature_version: this.signature_version,\n timestamp: this.timestamp,\n }\n }", "title": "" }, { "docid": "5f4a97360af62495125488b7a5f1058f", "score": "0.5480543", "text": "json(body) {\n this.header('Content-Type', 'application/json').send(\n this._serializer(body)\n );\n }", "title": "" }, { "docid": "c92c8d26f585da6be80e1ed008cf350e", "score": "0.5473435", "text": "function toRequestBody(body) {\n return tslib.__awaiter(this, void 0, void 0, function* () {\n if (typeof body === \"string\") {\n return {\n source: body\n };\n }\n else {\n // cache stream to allow retry\n if (isReadableStream(body)) {\n return streamToBuffer(body, MAX_INPUT_DOCUMENT_SIZE);\n }\n return body;\n }\n });\n}", "title": "" }, { "docid": "c14a4c4f6031bbf5248752f186664007", "score": "0.547075", "text": "function addMessageData(callback) {\n baseData.body = {};\n if (item.message !== undefined) {\n baseData.body.message = {\n body: item.message\n };\n }\n callback(null);\n }", "title": "" }, { "docid": "fb0626f00e1cda872d8d9c2b3dd3f59c", "score": "0.5449525", "text": "set body(body) {\n this._body = body;\n }", "title": "" }, { "docid": "a38e9ba4bdf70fea793b77115eaa0b0a", "score": "0.5436999", "text": "twilio(to, body) {\n return new Promise((resolve, reject) => {\n client.messages.create({\n messagingServiceSid: process.env.TWILIO_SID,\n to: to,\n body: body,\n }).then(resolve)\n .catch(function(err) {\n console.log(err)\n })\n })\n }", "title": "" }, { "docid": "b7169ea3d66acc8e253e579b7dd84d3f", "score": "0.5436254", "text": "async create(req, res) {\n\t\tlet results = {\n\t\t\t'status': 500,\n\t\t\t'messager': 'Can not send SMS, please check again your input'\n\t\t}\n\t\tif (req.body.hasOwnProperty('body')\n\t\t\t&& req.body.hasOwnProperty('to')\n\t\t\t&& req.body.hasOwnProperty('from')) {\n\t\t\t\tconst params = {\n\t\t\t body: req.body.body,\n\t\t\t to: req.body.to,\n\t\t\t from: req.body.from // from is number buy on Twillio\n\t\t\t // mediaUrl: 'http://www.yourserver.com/someimage.png'\n\t\t\t\t};\n\t\t\t\tresults = await Messager.sendSMS(params);\n\t\t\t}\n\t\tres.json(results);\n\t}", "title": "" }, { "docid": "dc4e136e646173e47b1d7eaa77dc1e7e", "score": "0.54314816", "text": "function connectRawBody(req, res, next) {\n rawBody(req, function handleBody (err, buff) {\n if (err) {\n next(err);\n }\n req.body = buff;\n next();\n });\n}", "title": "" }, { "docid": "49a7081ad469e25125f7b55456a662ca", "score": "0.54287183", "text": "create({ body }, response) {\n\t\tconsole.log('body', body)\n\t\tvar order = new orderModel(body)\n\t\torder.final_price = order.amount * 10.00\n\t\torder.status = 'ordered'\n\t\torder.save().then(result => {\n\t\t\tresponse.send(result)\n\t\t}).catch(err => {\n\t\t\tconsole.log('err', err)\n\t\t\tresponse.status(500).send(err)\n\t\t})\n\t}", "title": "" }, { "docid": "ee91afc34a09211c1eba409ae77b2b39", "score": "0.54251856", "text": "function sendData(req, res, body) {\n if (body === null || body === undefined) {\n res.end();\n return;\n }\n const contentType = res.getHeader(\"Content-Type\");\n if (body instanceof _stream.Stream) {\n if (!contentType) {\n res.setHeader(\"Content-Type\", \"application/octet-stream\");\n }\n body.pipe(res);\n return;\n }\n const isJSONLike = [\"object\", \"number\", \"boolean\"].includes(\n typeof body\n );\n const stringifiedBody = isJSONLike ? JSON.stringify(body) : body;\n const etag = (0, _etag.default)(stringifiedBody);\n if ((0, _sendPayload.sendEtagResponse)(req, res, etag)) {\n return;\n }\n if (Buffer.isBuffer(body)) {\n if (!contentType) {\n res.setHeader(\"Content-Type\", \"application/octet-stream\");\n }\n res.setHeader(\"Content-Length\", body.length);\n res.end(body);\n return;\n }\n if (isJSONLike) {\n res.setHeader(\"Content-Type\", \"application/json; charset=utf-8\");\n }\n res.setHeader(\"Content-Length\", Buffer.byteLength(stringifiedBody));\n res.end(stringifiedBody);\n }", "title": "" }, { "docid": "e220578a9a8747497fcfabb38c777b1f", "score": "0.54159546", "text": "function sendCreateMessage() {\n try {\n var message = new createFactoryRequest();\n\n console.log(JSON.stringify(message));\n createNodeSocket.send(JSON.stringify(message));\n } catch (e) {\n\n }\n}", "title": "" }, { "docid": "3bfbed1acc7fe49fb0dbe4c209f42497", "score": "0.54111314", "text": "function expeditiousCustomWrite (body, encoding, cb) {\n log('custom write received', body)\n buf += body\n _write(body, encoding, cb)\n }", "title": "" }, { "docid": "bc1ac2f15b83c869c73e46ec452f04ee", "score": "0.5401903", "text": "CreateBody(def = {}) {\n if (this.IsLocked()) {\n throw new Error();\n }\n const b = new b2_body_js_1.b2Body(def, this);\n // Add to world doubly linked list.\n b.m_prev = null;\n b.m_next = this.m_bodyList;\n if (this.m_bodyList) {\n this.m_bodyList.m_prev = b;\n }\n this.m_bodyList = b;\n ++this.m_bodyCount;\n return b;\n }", "title": "" }, { "docid": "3808d39ed3e16bab733f54181d4bfd9e", "score": "0.5398538", "text": "function createNewMessage() {\n var message = {};\n message.webId = Util.getUniqueId();\n message.dateUpdate = Util.getISOCurrentTime();\n message.dateSent = \"\";\n message.value = \"\";\n message.type = 0;\n message.entityType = \"\";\n message.entityId = null;\n message.to = [];\n // FIXME: This should be initialized with the technician's ID\n message.from = \"\";\n return message;\n }", "title": "" }, { "docid": "f81a96f0bfe4aff381568b7aea25d7bd", "score": "0.5385466", "text": "function makeJSON() {\n\n\n var json = {\n\n \"x\": x,\n \"y\": y,\n \"zx\": zx,\n \"zy\": zy,\n \"gears\": gears\n\n }\n\n ws.send(id + \":::\" + JSON.stringify(json));\n\n}", "title": "" }, { "docid": "9c85a80cfcfd924dee993e1bb39aa958", "score": "0.53801286", "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": "d6ea6b13f757c5eae9b4fd3659cbd9d6", "score": "0.53766227", "text": "function createPushSubscribebody(pushSubscibe) {\n let { endpoint } = pushSubscibe;\n let key = pushSubscibe.getKey('p256dh');\n let token = pushSubscibe.getKey('auth');\n let contentEncoding = (PushManager.supportedContentEncodings || ['aesgcm'])[0];\n return JSON.stringify({\n endpoint: endpoint,\n publicKey: key ? btoa(String.fromCharCode.apply(null, new Uint8Array(key))) : null,\n authToken: token ? btoa(String.fromCharCode.apply(null, new Uint8Array(token))) : null,\n contentEncoding,\n });\n}", "title": "" }, { "docid": "2a09b52a284793b84fc3c83ac589a7d5", "score": "0.5346051", "text": "function createApiCallBody() {\n\t\tconst requestBody = selectedDevice.zones.map(zone => {\n\t\t\treturn {\n\t\t\t\tid: zone.id,\n\t\t\t\tsortOrder: 1\n\t\t\t}\n\t\t})\n\t\treturn requestBody;\n\t}", "title": "" }, { "docid": "3915a1f941e7696065e5de75351f8c1f", "score": "0.5322096", "text": "send(body) {\n // Generate Etag\n if (\n this._etag && // if etag support enabled\n ['GET', 'HEAD'].includes(this._request.method) &&\n !this.hasHeader('etag') &&\n this._statusCode === 200\n ) {\n this.header('etag', '\"' + UTILS.generateEtag(body) + '\"');\n }\n\n // Check for matching Etag\n if (\n this._request.headers['if-none-match'] &&\n this._request.headers['if-none-match'] === this.getHeader('etag')\n ) {\n this.status(304);\n body = '';\n }\n\n let headers = {};\n let cookies = {};\n\n if (this._request.payloadVersion === '2.0') {\n if (this._headers['set-cookie']) {\n cookies = { cookies: this._headers['set-cookie'] };\n delete this._headers['set-cookie'];\n }\n }\n\n if (this._request._multiValueSupport) {\n headers = { multiValueHeaders: this._headers };\n } else {\n headers = { headers: UTILS.stringifyHeaders(this._headers) };\n }\n\n // Create the response\n this._response = Object.assign(\n {},\n headers,\n cookies,\n {\n statusCode: this._statusCode,\n body:\n this._request.method === 'HEAD'\n ? ''\n : UTILS.encodeBody(body, this._serializer),\n isBase64Encoded: this._isBase64,\n },\n this._request.interface === 'alb'\n ? {\n statusDescription: `${this._statusCode} ${UTILS.statusLookup(\n this._statusCode\n )}`,\n }\n : {}\n );\n\n // Compress the body\n if (this._compression && this._response.body) {\n const { data, contentEncoding } = compression.compress(\n this._response.body,\n this._request.headers,\n Array.isArray(this._compression) ? this._compression : null\n );\n if (contentEncoding) {\n Object.assign(this._response, {\n body: data.toString('base64'),\n isBase64Encoded: true,\n });\n if (this._response.multiValueHeaders) {\n this._response.multiValueHeaders['content-encoding'] = [\n contentEncoding,\n ];\n } else {\n this._response.headers['content-encoding'] = contentEncoding;\n }\n }\n }\n\n // Trigger the callback function\n this.app._callback(null, this._response, this);\n }", "title": "" }, { "docid": "eec7403aa9daf26a64b8922ebbf53afc", "score": "0.53208727", "text": "function b2Body(ptr) {\nthis.buffer = {};\nthis.ptr = ptr;\nthis.fixtures = [];\n}", "title": "" }, { "docid": "4831a36890d59a609693303668b58a1d", "score": "0.5318755", "text": "function sendData(res, body) {\n if (body === null) {\n res.end();\n return;\n }\n const contentType = res.getHeader('Content-Type');\n if (Buffer.isBuffer(body)) {\n if (!contentType) {\n res.setHeader('Content-Type', 'application/octet-stream');\n }\n res.setHeader('Content-Length', body.length);\n res.end(body);\n return;\n }\n if (body instanceof stream_1.Stream) {\n if (!contentType) {\n res.setHeader('Content-Type', 'application/octet-stream');\n }\n body.pipe(res);\n return;\n }\n let str = body;\n // Stringify JSON body\n if (typeof body === 'object' ||\n typeof body === 'number' ||\n typeof body === 'boolean') {\n str = JSON.stringify(body);\n res.setHeader('Content-Type', 'application/json; charset=utf-8');\n }\n res.setHeader('Content-Length', Buffer.byteLength(str));\n res.end(str);\n}", "title": "" }, { "docid": "4831a36890d59a609693303668b58a1d", "score": "0.5318755", "text": "function sendData(res, body) {\n if (body === null) {\n res.end();\n return;\n }\n const contentType = res.getHeader('Content-Type');\n if (Buffer.isBuffer(body)) {\n if (!contentType) {\n res.setHeader('Content-Type', 'application/octet-stream');\n }\n res.setHeader('Content-Length', body.length);\n res.end(body);\n return;\n }\n if (body instanceof stream_1.Stream) {\n if (!contentType) {\n res.setHeader('Content-Type', 'application/octet-stream');\n }\n body.pipe(res);\n return;\n }\n let str = body;\n // Stringify JSON body\n if (typeof body === 'object' ||\n typeof body === 'number' ||\n typeof body === 'boolean') {\n str = JSON.stringify(body);\n res.setHeader('Content-Type', 'application/json; charset=utf-8');\n }\n res.setHeader('Content-Length', Buffer.byteLength(str));\n res.end(str);\n}", "title": "" }, { "docid": "b5bade2d42c866579c2552543146e24e", "score": "0.5317885", "text": "function sendReceiptMessage(recipientId){// Generate a random receipt ID as the API requires a unique ID\nvar receiptId=\"order\"+Math.floor(Math.random()*1000);var messageData={recipient:{id:recipientId},message:{attachment:{type:\"template\",payload:{template_type:\"receipt\",recipient_name:\"Peter Chang\",order_number:receiptId,currency:\"COP\",payment_method:\"Visa 1234\",timestamp:\"1428444852\",elements:[{title:\"Oculus Rift\",subtitle:\"Includes: headset, sensor, remote\",quantity:1,price:599.00,currency:\"USD\",image_url:SERVER_URL+\"/assets/riftsq.png\"},{title:\"Samsung Gear VR\",subtitle:\"Frost White\",quantity:1,price:99.99,currency:\"USD\",image_url:SERVER_URL+\"/assets/gearvrsq.png\"}],address:{street_1:\"1 Hacker Way\",street_2:\"\",city:\"Menlo Park\",postal_code:\"94025\",state:\"CA\",country:\"US\"},summary:{subtotal:698.99,shipping_cost:20.00,total_tax:57.67,total_cost:626.66},adjustments:[{name:\"New Customer Discount\",amount:-50},{name:\"$100 Off Coupon\",amount:-100}]}}}};callSendAPI(messageData);}", "title": "" }, { "docid": "5474ca57b98cbc2f17270743fd74cb3b", "score": "0.5309913", "text": "async create(body){\n \n return await productDb.insert({\n serial : body.serial,\n title: body.title,\n price: body.price,\n shortDesc: body.shortDesc,\n longDesc: body.longDesc,\n imgFile: body.imgFile\n \n })\n \n }", "title": "" }, { "docid": "004d57e82a50f57bdf44d5ad73548415", "score": "0.5304429", "text": "function createResponse(status, body) {\n return `HTTP/1.1 ${status} OK\nContent-Type: text/html\n\n${body}`;\n}", "title": "" }, { "docid": "74d5b87c78369bbaadd45d97f90f91f7", "score": "0.5302741", "text": "async send (envelope, ...strings) {}", "title": "" }, { "docid": "f38d9392d09402ace7d5c2d6f99f755d", "score": "0.5301774", "text": "function bodyRequestAddUser(docType, documentNumber, name){\n let json = {\n name: name,\n documentNumber: documentNumber,\n document: {\n idDocument: parseInt(docType,10)\n },\n userType: {\n idUserType: 2\n }\n };\n return json;\n}", "title": "" }, { "docid": "eb83895554c0af2e5235543303d04150", "score": "0.52979463", "text": "function sendReceiptMessage(recipientId) {\n // Generate a random receipt ID as the API requires a unique ID\n var receiptId = \"order\" + Math.floor(Math.random()*1000);\n\n var messageData = {\n recipient: {\n id: recipientId\n },\n message:{\n attachment: {\n type: \"template\",\n payload: {\n template_type: \"receipt\",\n recipient_name: \"Peter Chang\",\n order_number: receiptId,\n currency: \"USD\",\n payment_method: \"Visa 1234\", \n timestamp: \"1428444852\", \n elements: [{\n title: \"Oculus Rift\",\n subtitle: \"Includes: headset, sensor, remote\",\n quantity: 1,\n price: 599.00,\n currency: \"USD\",\n image_url: SERVER_URL + \"/assets/riftsq.png\"\n }, {\n title: \"Samsung Gear VR\",\n subtitle: \"Frost White\",\n quantity: 1,\n price: 99.99,\n currency: \"USD\",\n image_url: SERVER_URL + \"/assets/gearvrsq.png\"\n }],\n address: {\n street_1: \"1 Hacker Way\",\n street_2: \"\",\n city: \"Menlo Park\",\n postal_code: \"94025\",\n state: \"CA\",\n country: \"US\"\n },\n summary: {\n subtotal: 698.99,\n shipping_cost: 20.00,\n total_tax: 57.67,\n total_cost: 626.66\n },\n adjustments: [{\n name: \"New Customer Discount\",\n amount: -50\n }, {\n name: \"$100 Off Coupon\",\n amount: -100\n }]\n }\n }\n }\n };\n\n callSendAPI(messageData);\n}", "title": "" }, { "docid": "b1c9cd53f458b023d4db4451f61176a5", "score": "0.52869534", "text": "function Body(options, system) {\n this.construct(options, system, 'basic');\n}", "title": "" }, { "docid": "13939de1f0aa5a5c0bf5640050534442", "score": "0.52712184", "text": "sendToServer() {\n connection.emit('game.building.create', {\n data: {\n buildingId: this.id,\n position: this.position,\n type: this.type\n }\n });\n }", "title": "" }, { "docid": "14b99dc349f542d0172eae2236f4f937", "score": "0.5262105", "text": "function reqCreate(req) {\n return [req.body];\n}", "title": "" }, { "docid": "51c9ebfb293bac1254d8ded4161b4218", "score": "0.5260422", "text": "sendMessage() {\n const body = new FormData\n\n if(this.validateMessage(this.state.writing)) {\n body.append('message', this.state.writing)\n body.append('user', 'client')\n \n const config = {\n method: 'post',\n url: 'http://localhost:8080/api/create-message',\n data: body,\n headers: { \"Content-Type\": \"multipart/form-data\" }\n }\n \n axios(config).then(response => {\n this.clear()\n })\n }\n\n return\n }", "title": "" }, { "docid": "6d073eab8e320290c424f3381f715c80", "score": "0.5247978", "text": "function POST() {\n var responseBody = '';\n\n // Check the http request body\n var jsonObj = http.request.getJsonObj();\n if (!jsonObj) {\n throw http.ScriptException(\n http.HttpStatus.HTTP_BAD_REQUEST, \"fail to get the content of JSON format from the request payload\");\n }\n\n // Initialize the Order variable with the http request body\n var order = Order.create(jsonObj);\n // Add the specific comment\n order.Comments = \"Created via ServiceLayer Script Engine\";\n // User console.logs to better understand your script's behaviour\n console.log(\"OrderComment request body \" + JSON.stringify(order));\n\n // Initialize Service Layer Context\n var slContext = new ServiceLayerContext();\n\n // Add the Orders entity\n var dataSrvRes = slContext.Orders.add(order);\n \n if(!dataSrvRes.isOK()) {\n return http.response.send(http.HttpStatus.HTTP_BAD_REQUEST, dataSrvRes.body);\n }\n // Add operation successfully executed\n else {\n // Return only DocEntry, DocNum, DocTotal and Comments properties\n responseBody = '{ \"Order\": [{\"DocEntry\": ' + dataSrvRes.body.DocEntry + ', \"DocNum\": ' + dataSrvRes.body.DocNum +\n ', \"DocTotal\": ' + dataSrvRes.body.DocTotal + ', \"Comments\": \"' + dataSrvRes.body.Comments + '\"}]}';\n return http.response.send(http.HttpStatus.HTTP_CREATED, responseBody);\n }\n}", "title": "" }, { "docid": "4353ca2e2dbabb62c1ce115443430aca", "score": "0.5245517", "text": "set body(value) {\n if (!this.#writable) {\n throw new Error(\"The response is not writable.\");\n }\n this.#body = value;\n }", "title": "" }, { "docid": "baeb20d8a277f579f1cf65adba70f325", "score": "0.5238705", "text": "static buildQnaRequestBody(userProfile, userQuery) {\n // build request body. if it is a multiturn than add context\n if (userProfile.in.isMultiTurn) {\n const requestBody = {};\n // attach user current query\n requestBody.question = userQuery;\n // attach context\n requestBody.context = {\n previousQnAId: userProfile.in.qnaPreviousId,\n previousUserQuery: userProfile.in.qnaPreviousUserQuery,\n }\n // find the qnaId of the picked answer\n const qnaId = userProfile.in.qnaChoices.find((choice) => {\n return choice.text === userQuery;\n }).qnaId;\n // attach qnaId of the answer that was picked\n requestBody.qnaId = qnaId;\n return requestBody;\n } else {\n // default request body\n return {question: userQuery}\n }\n }", "title": "" }, { "docid": "868975930a7ec618e67ae8a99ea8969d", "score": "0.5226823", "text": "function sendUserName(content){\n let nameObj = {type: 'CREATE_USER_NAME', payload: content}\n return nameObj\n}", "title": "" }, { "docid": "e277dac83629a2182972a805fac7402e", "score": "0.52238214", "text": "function sendPToServer(content){\n // Create a POST request to '/receive'\n const data = {\n author: \"author\",\n contents: content\n }\n console.log(data);\n\n const options = {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json'\n },\n // body: JSON.stringify(data)\n body: JSON.stringify(data)\n }\n // console.log(options.body)\n fetch('/receive', options);\n console.log('text is sent');\n }", "title": "" }, { "docid": "086fc69fd0848ce779eef3ab511a242a", "score": "0.5218529", "text": "function sendReceiptMessage(recipientId) {\n // Generate a random receipt ID as the API requires a unique ID\n var receiptId = \"order\" + Math.floor(Math.random() * 1000);\n\n var messageData = {\n recipient: {\n id: recipientId\n },\n message: {\n attachment: {\n type: \"template\",\n payload: {\n template_type: \"receipt\",\n recipient_name: \"Peter Chang\",\n order_number: receiptId,\n currency: \"USD\",\n payment_method: \"Visa 1234\",\n timestamp: \"1428444852\",\n elements: [{\n title: \"Oculus Rift\",\n subtitle: \"Includes: headset, sensor, remote\",\n quantity: 1,\n price: 599.00,\n currency: \"USD\",\n image_url: SERVER_URL + \"/assets/riftsq.png\"\n }, {\n title: \"Samsung Gear VR\",\n subtitle: \"Frost White\",\n quantity: 1,\n price: 99.99,\n currency: \"USD\",\n image_url: SERVER_URL + \"/assets/gearvrsq.png\"\n }],\n address: {\n street_1: \"1 Hacker Way\",\n street_2: \"\",\n city: \"Menlo Park\",\n postal_code: \"94025\",\n state: \"CA\",\n country: \"US\"\n },\n summary: {\n subtotal: 698.99,\n shipping_cost: 20.00,\n total_tax: 57.67,\n total_cost: 626.66\n },\n adjustments: [{\n name: \"New Customer Discount\",\n amount: -50\n }, {\n name: \"$100 Off Coupon\",\n amount: -100\n }]\n }\n }\n }\n };\n\n callSendAPI(messageData);\n}", "title": "" }, { "docid": "897613dc5ea16cb10403a53242f8b3c7", "score": "0.52168876", "text": "function createPart(request, boundary, idx) {\n var serializedRequest = serializeSubRequest(request);\n var part = \"--\" + boundary + \"\\r\\n\";\n part += \"Content-Length: \" + serializedRequest.length + \"\\r\\n\";\n part += 'Content-Type: application/http\\r\\n';\n part += \"content-id: \" + (idx + 1) + \"\\r\\n\";\n part += 'content-transfer-encoding: binary\\r\\n';\n part += '\\r\\n';\n part += serializedRequest + \"\\r\\n\";\n return part;\n}", "title": "" }, { "docid": "113f7b2aa58efce8020654cc5bbd14be", "score": "0.52141505", "text": "post(url, body, options= {}) {\n options.body = body\n return this.request('POST', url, options)\n }", "title": "" }, { "docid": "71f214d256c497bed526f3621e111796", "score": "0.52117604", "text": "serializeBody() {\n // If no body is present, no need to serialize it.\n if (this.body === null) {\n return null;\n }\n // Check whether the body is already in a serialized form. If so,\n // it can just be returned directly.\n if (isArrayBuffer(this.body) || isBlob(this.body) || isFormData(this.body) ||\n typeof this.body === 'string') {\n return this.body;\n }\n // Check whether the body is an instance of HttpUrlEncodedParams.\n if (this.body instanceof HttpParams) {\n return this.body.toString();\n }\n // Check whether the body is an object or array, and serialize with JSON if so.\n if (typeof this.body === 'object' || typeof this.body === 'boolean' ||\n Array.isArray(this.body)) {\n return JSON.stringify(this.body);\n }\n // Fall back on toString() for everything else.\n return this.body.toString();\n }", "title": "" }, { "docid": "71f214d256c497bed526f3621e111796", "score": "0.52117604", "text": "serializeBody() {\n // If no body is present, no need to serialize it.\n if (this.body === null) {\n return null;\n }\n // Check whether the body is already in a serialized form. If so,\n // it can just be returned directly.\n if (isArrayBuffer(this.body) || isBlob(this.body) || isFormData(this.body) ||\n typeof this.body === 'string') {\n return this.body;\n }\n // Check whether the body is an instance of HttpUrlEncodedParams.\n if (this.body instanceof HttpParams) {\n return this.body.toString();\n }\n // Check whether the body is an object or array, and serialize with JSON if so.\n if (typeof this.body === 'object' || typeof this.body === 'boolean' ||\n Array.isArray(this.body)) {\n return JSON.stringify(this.body);\n }\n // Fall back on toString() for everything else.\n return this.body.toString();\n }", "title": "" }, { "docid": "71f214d256c497bed526f3621e111796", "score": "0.52117604", "text": "serializeBody() {\n // If no body is present, no need to serialize it.\n if (this.body === null) {\n return null;\n }\n // Check whether the body is already in a serialized form. If so,\n // it can just be returned directly.\n if (isArrayBuffer(this.body) || isBlob(this.body) || isFormData(this.body) ||\n typeof this.body === 'string') {\n return this.body;\n }\n // Check whether the body is an instance of HttpUrlEncodedParams.\n if (this.body instanceof HttpParams) {\n return this.body.toString();\n }\n // Check whether the body is an object or array, and serialize with JSON if so.\n if (typeof this.body === 'object' || typeof this.body === 'boolean' ||\n Array.isArray(this.body)) {\n return JSON.stringify(this.body);\n }\n // Fall back on toString() for everything else.\n return this.body.toString();\n }", "title": "" }, { "docid": "71f214d256c497bed526f3621e111796", "score": "0.52117604", "text": "serializeBody() {\n // If no body is present, no need to serialize it.\n if (this.body === null) {\n return null;\n }\n // Check whether the body is already in a serialized form. If so,\n // it can just be returned directly.\n if (isArrayBuffer(this.body) || isBlob(this.body) || isFormData(this.body) ||\n typeof this.body === 'string') {\n return this.body;\n }\n // Check whether the body is an instance of HttpUrlEncodedParams.\n if (this.body instanceof HttpParams) {\n return this.body.toString();\n }\n // Check whether the body is an object or array, and serialize with JSON if so.\n if (typeof this.body === 'object' || typeof this.body === 'boolean' ||\n Array.isArray(this.body)) {\n return JSON.stringify(this.body);\n }\n // Fall back on toString() for everything else.\n return this.body.toString();\n }", "title": "" }, { "docid": "71f214d256c497bed526f3621e111796", "score": "0.52117604", "text": "serializeBody() {\n // If no body is present, no need to serialize it.\n if (this.body === null) {\n return null;\n }\n // Check whether the body is already in a serialized form. If so,\n // it can just be returned directly.\n if (isArrayBuffer(this.body) || isBlob(this.body) || isFormData(this.body) ||\n typeof this.body === 'string') {\n return this.body;\n }\n // Check whether the body is an instance of HttpUrlEncodedParams.\n if (this.body instanceof HttpParams) {\n return this.body.toString();\n }\n // Check whether the body is an object or array, and serialize with JSON if so.\n if (typeof this.body === 'object' || typeof this.body === 'boolean' ||\n Array.isArray(this.body)) {\n return JSON.stringify(this.body);\n }\n // Fall back on toString() for everything else.\n return this.body.toString();\n }", "title": "" }, { "docid": "71f214d256c497bed526f3621e111796", "score": "0.52117604", "text": "serializeBody() {\n // If no body is present, no need to serialize it.\n if (this.body === null) {\n return null;\n }\n // Check whether the body is already in a serialized form. If so,\n // it can just be returned directly.\n if (isArrayBuffer(this.body) || isBlob(this.body) || isFormData(this.body) ||\n typeof this.body === 'string') {\n return this.body;\n }\n // Check whether the body is an instance of HttpUrlEncodedParams.\n if (this.body instanceof HttpParams) {\n return this.body.toString();\n }\n // Check whether the body is an object or array, and serialize with JSON if so.\n if (typeof this.body === 'object' || typeof this.body === 'boolean' ||\n Array.isArray(this.body)) {\n return JSON.stringify(this.body);\n }\n // Fall back on toString() for everything else.\n return this.body.toString();\n }", "title": "" }, { "docid": "71f214d256c497bed526f3621e111796", "score": "0.52117604", "text": "serializeBody() {\n // If no body is present, no need to serialize it.\n if (this.body === null) {\n return null;\n }\n // Check whether the body is already in a serialized form. If so,\n // it can just be returned directly.\n if (isArrayBuffer(this.body) || isBlob(this.body) || isFormData(this.body) ||\n typeof this.body === 'string') {\n return this.body;\n }\n // Check whether the body is an instance of HttpUrlEncodedParams.\n if (this.body instanceof HttpParams) {\n return this.body.toString();\n }\n // Check whether the body is an object or array, and serialize with JSON if so.\n if (typeof this.body === 'object' || typeof this.body === 'boolean' ||\n Array.isArray(this.body)) {\n return JSON.stringify(this.body);\n }\n // Fall back on toString() for everything else.\n return this.body.toString();\n }", "title": "" }, { "docid": "6cc8953641649abd6915ef7d9909bf7b", "score": "0.52107644", "text": "function sendReceiptMessage(recipientId) {\n // Generate a random receipt ID as the API requires a unique ID\n var receiptId = \"order\" + Math.floor(Math.random() * 1000);\n\n var messageData = {\n recipient: {\n id: recipientId\n },\n message: {\n attachment: {\n type: \"template\",\n payload: {\n template_type: \"receipt\",\n recipient_name: \"Peter Chang\",\n order_number: receiptId,\n currency: \"USD\",\n payment_method: \"Visa 1234\",\n timestamp: \"1428444852\",\n elements: [{\n title: \"Oculus Rift\",\n subtitle: \"Includes: headset, sensor, remote\",\n quantity: 1,\n price: 599.00,\n currency: \"USD\",\n image_url: constants.SERVER_URL + \"/assets/riftsq.png\"\n }, {\n title: \"Samsung Gear VR\",\n subtitle: \"Frost White\",\n quantity: 1,\n price: 99.99,\n currency: \"USD\",\n image_url: constants.SERVER_URL + \"/assets/gearvrsq.png\"\n }],\n address: {\n street_1: \"1 Hacker Way\",\n street_2: \"\",\n city: \"Menlo Park\",\n postal_code: \"94025\",\n state: \"CA\",\n country: \"US\"\n },\n summary: {\n subtotal: 698.99,\n shipping_cost: 20.00,\n total_tax: 57.67,\n total_cost: 626.66\n },\n adjustments: [{\n name: \"New Customer Discount\",\n amount: -50\n }, {\n name: \"$100 Off Coupon\",\n amount: -100\n }]\n }\n }\n }\n };\n\n callSendAPI(messageData);\n}", "title": "" }, { "docid": "c3bdee2d829312ee534b26ba6cef2b36", "score": "0.52015746", "text": "function configObjectPost(thatType, newContent, type_id, user_id) {\n return {\n method: 'POST',\n headers: {\n \"Content-type\":\"application/json\"\n },\n body: JSON.stringify({\n \"content\": newContent,\n \"type_id\": type_id, \n \"user_id\": user_id\n // need to call whatever you pass in newContent\n })\n }\n}", "title": "" }, { "docid": "e6d8a3475332bc7a1c0925fe2a7bc257", "score": "0.5201429", "text": "function sendData(req,res,body){if(body===null||body===undefined){res.end();return;}const contentType=res.getHeader('Content-Type');if(body instanceof _stream.Stream){if(!contentType){res.setHeader('Content-Type','application/octet-stream');}body.pipe(res);return;}const isJSONLike=['object','number','boolean'].includes(typeof body);const stringifiedBody=isJSONLike?JSON.stringify(body):body;const etag=(0,_etag.default)(stringifiedBody);if((0,_sendPayload.sendEtagResponse)(req,res,etag)){return;}if(Buffer.isBuffer(body)){if(!contentType){res.setHeader('Content-Type','application/octet-stream');}res.setHeader('Content-Length',body.length);res.end(body);return;}if(isJSONLike){res.setHeader('Content-Type','application/json; charset=utf-8');}res.setHeader('Content-Length',Buffer.byteLength(stringifiedBody));res.end(stringifiedBody);}", "title": "" }, { "docid": "8b32aad30153a65323113dd8f41e6554", "score": "0.5200631", "text": "cleanUp() {\n for (let key in this.body) {\n if (typeof this.body[key] !== 'string') {\n this.body[key] = '';\n }\n }\n this.body = {\n email: this.body.email,\n password: this.body.password,\n };\n }", "title": "" }, { "docid": "9a33820a1fd2406ad83fa2bb20292964", "score": "0.5196499", "text": "serializeBody() {\n // If no body is present, no need to serialize it.\n if (this.body === null) {\n return null;\n }\n // Check whether the body is already in a serialized form. If so,\n // it can just be returned directly.\n if (isArrayBuffer(this.body) || isBlob(this.body) || isFormData(this.body) ||\n isUrlSearchParams(this.body) || typeof this.body === 'string') {\n return this.body;\n }\n // Check whether the body is an instance of HttpUrlEncodedParams.\n if (this.body instanceof HttpParams) {\n return this.body.toString();\n }\n // Check whether the body is an object or array, and serialize with JSON if so.\n if (typeof this.body === 'object' || typeof this.body === 'boolean' ||\n Array.isArray(this.body)) {\n return JSON.stringify(this.body);\n }\n // Fall back on toString() for everything else.\n return this.body.toString();\n }", "title": "" }, { "docid": "cc3e34ae7a4bebf65c7aabfd47ee31a2", "score": "0.5193747", "text": "post(type, data)\n {\n this.socket.send(\n JSON.stringify(\n Object.assign({}, { type }, data)\n )\n );\n }", "title": "" }, { "docid": "eea9bb84fc8a72bb38701d25601bcce5", "score": "0.5191978", "text": "create({body}, res) {\n\n const newUser =\n `{\n set {\n _:newUser <user.name> \"${body.name}\" .\n _:newUser <user.password> \"${body.password}\" .\n _:newUser <user.email> \"${body.email}\" .\n _:newUser <user.joined> \"${(new Date()).toISOString()}\" .\n _:newUser <user.invited_by> <${body.invited_by}> .\n _:newUser <user.reputation> \"100\" .\n }\n }`;\n reqOpts.body = newUser;\n reqOpts.uri = Constants.dbUrl + 'mutate';\n return rp(reqOpts)\n .then((queryRes) => {\n queryRes = JSON.parse(queryRes);\n if (queryRes.errors !== undefined) {\n console.error(queryRes.errors);\n res.status(500).send(queryRes.errors);\n\n return;\n }\n\n console.log(queryRes);\n res.send({message: queryRes.data});\n })\n }", "title": "" }, { "docid": "dc7f40f46fa0827b1b3b7a50f566b55c", "score": "0.5189133", "text": "function createEmailJSON (partner , cc, subject, emailText, read) {\r\n return {\"conversationPartner\" : partner, \"cc\" : cc, \r\n \"subject\" : subject, \"emailText\" : emailText,\r\n \"read\" : read};\r\n}", "title": "" }, { "docid": "8010903fc33ef64fd0f3acf38fb6b071", "score": "0.5186873", "text": "postNewBlock() {\n this.app.post(\"/block\",async (req, res) => {\n if(req.body.body == null){\n res.send(\"can't send an empty block\")\n }else{\n let newBlock = new Block.Block(req.body.body);\n await this.bc.addBlock(newBlock);//this.blocks.push(newBlock);\n res.json(newBlock);\n }\n });\n }", "title": "" }, { "docid": "ac443517bb0bf7e80d05ff29c42535e6", "score": "0.5183377", "text": "postNewBlock() {\n this.server.route({\n method: 'POST',\n path: '/block',\n handler: (request, h) => {\n\t\t\t\t\n\t\t\t\tlet payload = request.payload;\n\t\t\t\tlet walletAddress = payload.address;\n\t\t\t\tlet starCoordinates = payload.star;\n\t\t\t\tlet body = \"\";\n\t\t\t\t\n\t\t\t\tif(!payload) {\n\t\t\t\t\tthrow Boom.badData('Your data is bad and you should feel bad - No payload content!');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(!walletAddress || !starCoordinates || !starCoordinates.ra || !starCoordinates.dec) {\n\t\t\t\t\tthrow Boom.badData('Your data is bad and you should feel bad - Bad body content!');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(!this.verifyAddressRequest(walletAddress)){\n\t\t\t\t\tthrow Boom.badData('Your data is bad and you should feel bad - Verify Address Request Failed!');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tlet encodeStarStory = Buffer.from(starCoordinates.story).toString('hex');\n\t\t\t\t\n\t\t\t\tbody = `{\n\t\t\t\t\t\t\t\"address\":\"${walletAddress}\",\n\t\t\t\t\t\t\t\"star\":{\n\t\t\t\t\t\t\t\t\"ra\":\"${starCoordinates.ra}\",\n\t\t\t\t\t\t\t\t\"dec\":\"${starCoordinates.dec}\",\n\t\t\t\t\t\t\t\t\"story\":\"${encodeStarStory}\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}`;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// reset registerStar valid request to false - only one star can register per valid address request\n\t\t\t\tmempoolValid[walletAddress].registerStar = false;\n\n\t\t\t\treturn(this.postBlock(JSON.parse(body)));\n }\n });\n }", "title": "" }, { "docid": "af5cd431e86fdfe41ea37a2be5c2425d", "score": "0.5180665", "text": "function onBody(request, b) {\n debug('onBody');\n request.connection.active();\n request._adapter.domain.run(function() {\n addPending(request, b);\n });\n }", "title": "" }, { "docid": "962ed769d1f3a77386da3734c987bca6", "score": "0.5173641", "text": "async sendToApiServer () {\n\t\tif (!this.text && this.attachmentData.length === 0) {\n\t\t\t// nothing to post, ignore\n\t\t\tthis.dontNoticeError = true; // suppress notifying New Relic of this error\n\t\t\tthrow 'email rejected because no text and no attachments';\n\t\t}\n\n\t\t// trigger error in secret as needed\n\t\tconst from = this.headers.get('from').value[0];\n\t\tif (\n\t\t\tthis.text.match(/nr codemark reply error/) &&\n\t\t\t(\n\t\t\t\tfrom.address.match(/codestream\\.com$/) ||\n\t\t\t\tfrom.address.match(/newrelic\\.com$/)\n\t\t\t) \n\t\t) {\n\t\t\tthrow new Error('hash table index out of range');\n\t\t}\n\n\t\tconst data = {\n\t\t\tto: this.to,\n\t\t\tfrom,\n\t\t\ttext: this.text,\n\t\t\tmailFile: this.baseName,\n\t\t\tsecret: this.inboundEmailServer.config.sharedSecrets.mail,\n\t\t\tattachments: this.attachmentData\n\t\t};\n\t\tawait this.sendDataToApiServer(data);\n\t}", "title": "" }, { "docid": "e68e5bd46867d49b94131ed81a797fd1", "score": "0.5165598", "text": "function createOrderEmailText(orderData) {\n\n //using ES6 template strings (backticks instead of quotes)\n const subject = `Ride Order from ${orderData.customerName}`;\n const body =\n `Customer Name: ${orderData.customerName}\\n\nCustomer ID: ${orderData.customerNumber}\\n\nTravel Type: ${orderData.travelType}\\n\nFrom: ${orderData.fromLocation}\\n\nTo: ${orderData.toLocation}\\n\n${orderData.leaving ? 'Leaving' : 'Arriving'} at ${orderData.dateTime}\\n\nAdditional Passengers: ${orderData.passengers}\\n\nCustomer Message: ${orderData.comment}`\n\n return { subject: subject, body: body };\n}", "title": "" }, { "docid": "679218743089e33230667c30a08c11ae", "score": "0.5165342", "text": "function check_create_body_request(body) {\n return new Promise(function (resolve, reject) {\n if (!body.organization) {\n reject({\n error: {\n message: 'Missing parameter organization in body request',\n code: 400,\n title: 'Bad Request'\n }\n });\n } else if (!body.organization.name) {\n reject({\n error: {\n message: 'Missing parameter name in body request or empty name',\n code: 400,\n title: 'Bad Request'\n }\n });\n } else {\n resolve();\n }\n });\n}", "title": "" }, { "docid": "2ecca3221118759c8dc535f29d13adc2", "score": "0.51615125", "text": "create_room(room, user){\n this.send({'action': 'create_room', 'params': {'room': room, 'user': user}});\n }", "title": "" }, { "docid": "286468383dfd5e1ae3d01d3f4a589a4a", "score": "0.51586664", "text": "function check_create_body_request(body) {\n return new Promise(function (resolve, reject) {\n if (!body.user) {\n reject({\n error: {\n message: 'Missing parameter user in body request',\n code: 400,\n title: 'Bad Request'\n }\n });\n } else if (!body.user.username) {\n reject({\n error: {\n message: 'Missing parameter username in body request or empty username',\n code: 400,\n title: 'Bad Request'\n }\n });\n } else if (!body.user.password) {\n reject({\n error: {\n message: 'Missing parameter password in body request or empty password',\n code: 400,\n title: 'Bad Request'\n }\n });\n } else if (!body.user.email) {\n reject({\n error: {\n message: 'Missing parameter email in body request or empty email',\n code: 400,\n title: 'Bad Request'\n }\n });\n } else if (config.email_list_type && body.user.email) {\n if (config.email_list_type === 'whitelist' && !email_list.includes(body.user.email.split('@')[1])) {\n reject({\n error: { message: 'Invalid email', code: 400, title: 'Bad Request' }\n });\n }\n\n if (config.email_list_type === 'blacklist' && email_list.includes(body.user.email.split('@')[1])) {\n reject({\n error: { message: 'Invalid email', code: 400, title: 'Bad Request' }\n });\n }\n\n resolve();\n } else {\n resolve();\n }\n });\n}", "title": "" }, { "docid": "2c529c734bb1ca1a5116407c7ee13c61", "score": "0.51551694", "text": "function createBody() {\n // check to see if we have the body element\n if ( !document.body ) {\n // create body element\n var body = document.createElement( 'body' );\n // add to dom\n document.childNodes[ 0 ].appendChild( body );\n } else {\n var body = document.body;\n }\n // change the id now that we have a body\n body.setAttribute( \"id\", \"the_body\" );\n}", "title": "" }, { "docid": "fcdc5338169ead80bb89a073463ef4ef", "score": "0.515175", "text": "function createMessage(status) {\n\n var message = [];\n\n message.push(broadcastIdentifier);\n message.push(compabilityVersion);\n message.push(netId);\n message.push(id);\n message.push(name);\n message.push(self.port);\n message.push(status);\n //message.push(mode);\n payloadLength = payload.length;\n message.push(payloadLength + ':' + payload);\n\n var messageString = message.join(\" \");\n\n return new Buffer(messageString);\n\n }", "title": "" }, { "docid": "3db58899cb8522ad65f1101e191c4f79", "score": "0.5144907", "text": "function createNotificationsBody(type, data) {\r\n if (type === \"stock\" && data) {\r\n //stock body\r\n if (data.stock < 3) {\r\n return `${data.title}'s stock is ${data.stock} now. `;\r\n } else {\r\n // this happens when user delete the sale data and stock comes back as it used to be.\r\n return `${data.title}'s stock is ${\r\n data.stock\r\n } now. Please delete this notificaion.`;\r\n }\r\n } else if (data) {\r\n //sharpening\r\n if (data.customer) {\r\n return `${data.customer.firstName} (${\r\n data.customer.email ? data.customer.email : \"email unknown\"\r\n })`;\r\n } else {\r\n return `More than 80 days have passed since Deleted Customer last purchased knife(s). Please send a sharpening reminder.`;\r\n }\r\n } else {\r\n return \"Error loading notification\";\r\n }\r\n}", "title": "" }, { "docid": "3c7eeda2c103fb0979969be2685012a4", "score": "0.5144845", "text": "function create(params) {\n console.log('Request sent: ' + Date.now());\n var defer = $q.defer();\n \n io.socket.post('/node', params, function(resData, jwres) {\n defer.resolve(resData);\n });\n \n return defer.promise;\n }", "title": "" }, { "docid": "7a9803223c33f59c67bcacef7f30e6bd", "score": "0.5139048", "text": "async function main(body){\n\n // Generate test SMTP service account from ethereal.email\n // Only needed if you don't have a real mail account for testing\n\n // create reusable transporter object using the default SMTP transport\n let transporter = nodemailer.createTransport({\n host: \"smtp.gmail.com\",\n // service: 'gmail',\n port: 465,\n secure: true,\n auth: { type: \"OAuth2\",\n user: '[email protected]',\n clientId: '66743535063-l8milhsfpc3kf20uc41geprref8gi81t.apps.googleusercontent.com',\n clientSecret: 'HJlKjX9EfM-HfPePrDlSVeWg',\n refreshToken: '1/UbF8dJnru721H6cuN7mG6Q5hjLKWL-hy4F2ZWctUUWA',\n accessToken: 'ya29.GlumBsDiyIt9SgxFEmDEj8rE-_2CaNGfT078IX2xcLY_Lgb8fuL3p3oNnGwUX5UM8oMJC96wCZs9Ke2nZAfFqpSg66Z7jlQmAkUfeUplER0bkjbghxOYqtkeFTec'\n \n // user: '[email protected]', // generated ethereal user\n // pass: 'hoss161996' // generated ethereal password\n }\n });\n\n // setup email data with unicode symbols\n let mailOptions = {\n from: '\"Darsy App\" <[email protected]>', // sender address\n to: \"[email protected], [email protected]\", // list of receivers\n subject: \" 📌طلب جديد من التطبيق\", // Subject line\n // text: body, // plain text body\n html: body // html body\n };\n\n // send mail with defined transport object\n let info = await transporter.sendMail(mailOptions)\n\n console.log(\"Message sent: %s\", info.messageId);\n // Preview only available when sending through an Ethereal account\n console.log(\"Preview URL: %s\", nodemailer.getTestMessageUrl(info));\n\n // Message sent: <[email protected]>\n // Preview URL: https://ethereal.email/message/WaQKMgKddxQDoou...\n}", "title": "" }, { "docid": "eb3dc69afd7bdecb93e3e75162a41bd7", "score": "0.51281977", "text": "function createNewNote(body, notesArray) {\n // let notesArray = [];\n const note = body;\n notesArray.push(note);\n\n // write to note.json file in data subdirectoty\n fs.writeFileSync(\n // use path.join() to join the value of the directory of the file we will execute the code in with the path to the json file\n path.join(__dirname, \"../db/db.json\"),\n\n // save the js array as JSON, (non-edited and with whitespace)\n JSON.stringify({ notes: notesArray }, null, 2)\n );\n // return finished code to post route for response\n return note;\n}", "title": "" }, { "docid": "5ca83c071f6c92f1723a8497f7587c22", "score": "0.51237756", "text": "function createCrate(msg) {\n\tconsole.log(\"createCrate: \"+msg);\n\tvar request=JSON.parse(msg);\n\taudioboxDB.createCrate(request);\n}", "title": "" }, { "docid": "663275141968ab5912190731bde35ac1", "score": "0.51185817", "text": "create({body}, res) {\n \n if (body.events && body.events.length) {\n console.log(body.events[0]);\n // if (body.events[0].type === 'follow') {\n const userId = body.events[0].source.userId;\n const client = new Client({ \n channelAccessToken: 'aRYpX5jVUw532GwFclyrfEikfymSoPzGhwEG72vE+AwvrjD5cUW73rUXiyhg9GlTTSJEAYHha4Jo17X43reEJ4J7fEo8nrEYwzQ48c3NhqWNcLf6jIH4Y7opHHfit9v3DcNoEQnpuUTGkjHTh1eINgdB04t89/1O/w1cDnyilFU=',\n channelSecret: 'bf4f42623160c813aad4cab0d3ee67b3'\n });\n client.pushMessage(userId, {\n type: 'text',\n text: \"Please help us. Help you by answering our 1-minute survey. Your answer will help improve our country and our islands. You'll get 2 line points immediately in return for your precious time. https://survey.delta9.link/?userId=\" + userId\n });\n // }\n }\n\n\n res.send('ok');\n }", "title": "" }, { "docid": "dc65f111f2bf4f387501efdbc39faf1e", "score": "0.51146394", "text": "function createMultiPartPayload(dataMap, boundary){\n\t\tvar crlf = \"\\r\\n\";\n\t\tboundary = \"--\" + boundary; //\"------WebKitFormBoundaryT0vQ8QqXc13eTJpa\";// dash boundary = '--' + declaredInHeaderBoundary \n\t\tvar data = \"\";\n\t for ( var key in dataMap){\n\t\t\tdata+= crlf + boundary + crlf + \"Content-Disposition: form-data; name=\\\"\" + key + \"\\\"\" + crlf + crlf + dataMap[key];\n\t\t}\n\t\t//CRLF epilogue\n\t\tdata += crlf + boundary + \"--\" + crlf ;\n\t\treturn data;\n}", "title": "" }, { "docid": "e42e796dddc2fd85c093ea0aab17b4e9", "score": "0.51132953", "text": "static fromBody (body) {\n return new this({ body })\n }", "title": "" } ]
1d484f2de2b4635749c24bdc59e972d4
We can call this function before its definition Function Declaration
[ { "docid": "69bbd4014ba1925388b3d92b2b57f2ff", "score": "0.0", "text": "function walk() {\n console.log('walk');\n}", "title": "" } ]
[ { "docid": "d63eebac7f97c9060132540337aa40a0", "score": "0.7527458", "text": "function func_call_before_declaration(){\r\n console.log('hello there - before declaration ');\r\n}", "title": "" }, { "docid": "d9e930791891042d0a41aa6348dbf98f", "score": "0.73508126", "text": "function func_call_before_declaration(){\r\n console.log('hello there - before declaration new item');\r\n}", "title": "" }, { "docid": "3c924bf53a9ff7c2d64dd100bd3f1c25", "score": "0.73002255", "text": "function func_call_before_declaration(){\r\n console.log('hello there - before declaration third item');\r\n}", "title": "" }, { "docid": "7682bd4a09e257c76f7e64925ff63e9a", "score": "0.7065597", "text": "function declaration () {\n // Code goes here\n}", "title": "" }, { "docid": "f6eed244ead64bbe2615decb85f47a2a", "score": "0.69953394", "text": "function funcionPorDefinicion() //<-- Por definicion\n{\n //Cuerpo de la Funcion \n}", "title": "" }, { "docid": "843f3ed94e10af3ebe7fff2ebcbd4501", "score": "0.69786656", "text": "function funcDeclaration() {\n console.log('Function declaration');\n}", "title": "" }, { "docid": "843f3ed94e10af3ebe7fff2ebcbd4501", "score": "0.69786656", "text": "function funcDeclaration() {\n console.log('Function declaration');\n}", "title": "" }, { "docid": "238eb383435aca5b2c7456639f5e056c", "score": "0.684542", "text": "function funcionDeclarada(){\n console.log(\"Esto es una prueba de la funcion declarada, puede invocarse en cualquier parte del codigo incluso antes de la funcion sea declarada\")\n}", "title": "" }, { "docid": "aec5a85413feb106f7e40a0738fc6495", "score": "0.6839102", "text": "function funcionPorDefinicion() {\n // cuerpo de la funcion\n}", "title": "" }, { "docid": "e97a27a9a15c7e5c340341c6c0a19604", "score": "0.6629731", "text": "function doSomething()\n{\n console.log(`Function Declaration`);\n}", "title": "" }, { "docid": "7b1ce414e5a1ffbc7d48b327ac99f4cb", "score": "0.6589495", "text": "function funcionDeclarada (){ \n console.log('Declarada');\n}", "title": "" }, { "docid": "2abf445a17d992ed965654da90d2c03a", "score": "0.65150243", "text": "function dummyFunction(){}", "title": "" }, { "docid": "e0161aa5446ee63a188b0e215287e17a", "score": "0.6500762", "text": "visitFunctionDeclaration() {\n return false;\n }", "title": "" }, { "docid": "e0161aa5446ee63a188b0e215287e17a", "score": "0.6500762", "text": "visitFunctionDeclaration() {\n return false;\n }", "title": "" }, { "docid": "b4647c9a3405f807e55e3c8f240b4f78", "score": "0.64994556", "text": "enterFunctionDeclaration(ctx) {\n\t}", "title": "" }, { "docid": "b64bf3a9bd9809a14f0ddab5208cc0d8", "score": "0.64846915", "text": "function Funky() {\n\n\n}", "title": "" }, { "docid": "07baaa7b10a2faddf5ad2c1b651b13e9", "score": "0.6480432", "text": "function miFuncion(){}", "title": "" }, { "docid": "10d5627078b78749ec09d72a3aae1520", "score": "0.64743304", "text": "function() {\n\t\t//...\n\t}", "title": "" }, { "docid": "cf0e8c3cadb65602323c4187184bcf27", "score": "0.6443078", "text": "function fc(){}", "title": "" }, { "docid": "53cb5b11086809c484e61c5692161780", "score": "0.63510174", "text": "function Func_s() {\n}", "title": "" }, { "docid": "c344f3044be8491c5171dda20e226e9d", "score": "0.63408077", "text": "function dummy(){\n\n}", "title": "" }, { "docid": "68d4643b9cc4ca020850d9e8c82d69ec", "score": "0.63264817", "text": "visitFunctionDeclaration(node){\r\n this.processFunctionDeclaration(node);\r\n }", "title": "" }, { "docid": "03d6b4570b8be6cc12a3ceedb2a339f1", "score": "0.62965167", "text": "function someFunctionDefinition(){\n console.log(\"this is a function statement\");\n}", "title": "" }, { "docid": "66d66aa4ccf165edf7a4620e3f3526ff", "score": "0.6284321", "text": "function dummyFunction() {}", "title": "" }, { "docid": "1e88e47cfe1e655554ec592a0b05d5c6", "score": "0.6262309", "text": "methodName() {\n // TODO...\n // function definition goes here\n }", "title": "" }, { "docid": "6be59eae870cdc29b243f104756edbac", "score": "0.6258986", "text": "function someFunctionName(){} // this is the standard nomenclature", "title": "" }, { "docid": "e5bb187c254587ce46684e8177bf9483", "score": "0.62549525", "text": "function x(){\n console.log('function declaration')\n}", "title": "" }, { "docid": "ac3f353d94bf185f2782bbf8b29cdf78", "score": "0.6242196", "text": "function funcD () {\n console.log('function declaration');\n}", "title": "" }, { "docid": "3cefac5d61157041d1b944fe72d0e143", "score": "0.62075686", "text": "function exampled () {}", "title": "" }, { "docid": "a95450b24e1f66f68d9a09d8bc6e4028", "score": "0.6203386", "text": "function Bevy() {\n ;\n}", "title": "" }, { "docid": "85fc4112e6994a5933086235a37be2d9", "score": "0.620179", "text": "function ex13_0() {\n\n}", "title": "" }, { "docid": "e6214debdaa9bb97912a4308f193e001", "score": "0.6166991", "text": "function ordinary() {\n ;\n }", "title": "" }, { "docid": "dc870c4ea7723bff88f262616f6a5307", "score": "0.61662114", "text": "function hoistFunctionDeclaration(func) {\n ts.Debug.assert(state > 0 /* Uninitialized */, \"Cannot modify the lexical environment during initialization.\");\n ts.Debug.assert(state < 2 /* Completed */, \"Cannot modify the lexical environment after transformation has completed.\");\n if (!lexicalEnvironmentFunctionDeclarations) {\n lexicalEnvironmentFunctionDeclarations = [func];\n }\n else {\n lexicalEnvironmentFunctionDeclarations.push(func);\n }\n }", "title": "" }, { "docid": "12798e8b7b766ce9ef47608a1f18de95", "score": "0.6131986", "text": "function func()\n{\n}", "title": "" }, { "docid": "56da1c11e294a7c6e3542f83d14eb917", "score": "0.61223346", "text": "function aDeclaredFunction() {\n console.log('hello');\n}", "title": "" }, { "docid": "69bd595e2a0e49d4380dc91029c88bfd", "score": "0.6106341", "text": "function HelperFunctions (){}", "title": "" }, { "docid": "d63516842aad315eaa65e2966af6ba86", "score": "0.60902494", "text": "function worthless(){\n\n}", "title": "" }, { "docid": "027074f8cf52cf4f83ac31c8429f0999", "score": "0.6037679", "text": "function myDeclaredFunction() {\n return 'this is a greeting from declared function';\n}", "title": "" }, { "docid": "a17958321ab3f3dbf14159cbc1362830", "score": "0.6031067", "text": "function FunctionDescription() { }", "title": "" }, { "docid": "2cad8e5c8cc361465fe71b6eac92bd07", "score": "0.6023728", "text": "function defineFirstArg(func, arg) {\n \n }", "title": "" }, { "docid": "b6e812c21d652271d72daf30023defe7", "score": "0.60013074", "text": "function SEA () {}", "title": "" }, { "docid": "e7b25bd71da894d26e16b4ef4c28e8cc", "score": "0.59957194", "text": "function __f_9() {}", "title": "" }, { "docid": "bbdf983ed00cc7884a76355069c07d66", "score": "0.5986822", "text": "function dummy() {}", "title": "" }, { "docid": "bbdf983ed00cc7884a76355069c07d66", "score": "0.5986822", "text": "function dummy() {}", "title": "" }, { "docid": "bbdf983ed00cc7884a76355069c07d66", "score": "0.5986822", "text": "function dummy() {}", "title": "" }, { "docid": "9abd915cedbcbe044d1faceb3ace9090", "score": "0.5967592", "text": "function legos() {\n\n}", "title": "" }, { "docid": "119f2619b285c207d9f745951d41892c", "score": "0.59588486", "text": "function funcao1(){}", "title": "" }, { "docid": "0f488c72258d4e0e5b56c6c7c5e6b726", "score": "0.5948659", "text": "function emitFunctionBodyPreamble(node) {\n\t emitCaptureThisForNodeIfNecessary(node);\n\t emitDefaultValueAssignments(node);\n\t emitRestParameter(node);\n\t }", "title": "" }, { "docid": "aef13f86797f07e88ba0a5bf5ccebef4", "score": "0.59342676", "text": "function sayHello() //sem parametro\n{\n console.log('Hello') //Função declarada mas não invocada\n}", "title": "" }, { "docid": "a811f387d44eefcfb5aab991df1bc426", "score": "0.5932597", "text": "function MyFunction(){}", "title": "" }, { "docid": "15776c03f1ef4055e21e822db2417eef", "score": "0.59325504", "text": "function xh(){}", "title": "" }, { "docid": "57a5d9960a3d065d73746e6928899902", "score": "0.5922828", "text": "function abc(){\n console.log('Function Statement Called!')\n}", "title": "" }, { "docid": "836c93262fcca57202682141f67ce051", "score": "0.592189", "text": "function Foo() {\n// Code here\n}", "title": "" }, { "docid": "77ff8110cfcddb2cbffad04f9640382d", "score": "0.5917932", "text": "function ej_8() {}", "title": "" }, { "docid": "7df7ad2faee7289b1c0aff668e6ad640", "score": "0.5901342", "text": "function DO_NOTHING() {}", "title": "" }, { "docid": "6b2c3365475968136d6cb24401fef205", "score": "0.5895632", "text": "function ba(){}", "title": "" }, { "docid": "6b2c3365475968136d6cb24401fef205", "score": "0.5895632", "text": "function ba(){}", "title": "" }, { "docid": "6b2c3365475968136d6cb24401fef205", "score": "0.5895632", "text": "function ba(){}", "title": "" }, { "docid": "692c2ecffddda755b3d35bf7f7cdc31a", "score": "0.58825934", "text": "function Cauldron() {}", "title": "" }, { "docid": "60fd586d9919f7b9f962acce7d588b1a", "score": "0.5877579", "text": "function Hello()\n{\n //body of the function\n}", "title": "" }, { "docid": "10467df3e6ddb69a08f7975207877bcf", "score": "0.58741176", "text": "function documentedFn () {}", "title": "" }, { "docid": "dc06bcf08cd9500e74461620d8b056c6", "score": "0.5866055", "text": "function X(){}", "title": "" }, { "docid": "e10393b6512e5c603c57720b8e03167f", "score": "0.58604175", "text": "function nada() { }", "title": "" }, { "docid": "532de995469b9b22428658fc5f32d6e3", "score": "0.585315", "text": "enterFunctionTypeParameters(ctx) {\n\t}", "title": "" }, { "docid": "8adb4cb88c191fa0d4e8874fa8649274", "score": "0.5845264", "text": "function function_name (){\n\t// statement;\n}", "title": "" }, { "docid": "f8ff07b8e5cb5eac2b816e0cc64bc9f3", "score": "0.5842802", "text": "enterDeclaration(ctx) {\n\t}", "title": "" }, { "docid": "173384b7b6673f02e1c6a43ec59d7d65", "score": "0.58424735", "text": "function Johnsons() {\n\n}", "title": "" }, { "docid": "af656100a480c209c9b4fcee36e93924", "score": "0.58418024", "text": "function myFunction() {\n\n}", "title": "" }, { "docid": "188c13ede1c88128d9ee9714c169eabf", "score": "0.5838119", "text": "function Code(){\n\n}", "title": "" }, { "docid": "3190f0ec33ca32d38a8c4edea2b53466", "score": "0.58267087", "text": "function functionDeclarationName() {\n var x = \"Declare something!\";\n\n console.log(x);\n}", "title": "" }, { "docid": "76e42fa31ae95cef127e809c7eea9f66", "score": "0.5826173", "text": "function foo() {\n // code\n}", "title": "" }, { "docid": "7536592c5edd345903a749d8391a0abd", "score": "0.5816214", "text": "function foo(){\n\n}", "title": "" }, { "docid": "70209601aa27aed28eae72cd7e384eea", "score": "0.58140135", "text": "function myFunction(){\n\n}", "title": "" }, { "docid": "30a766d4ad9c30caa41cbc0072ff6c25", "score": "0.5794005", "text": "function fn(){\n\n}", "title": "" }, { "docid": "ce203a3867410e81235e1a848a082985", "score": "0.5792704", "text": "function X() { }", "title": "" }, { "docid": "b020f505bcc9f0f178e9945540500e8b", "score": "0.5787391", "text": "function stub() {\r\n}", "title": "" }, { "docid": "b020f505bcc9f0f178e9945540500e8b", "score": "0.5787391", "text": "function stub() {\r\n}", "title": "" }, { "docid": "bbd3f0859db3330ca2657a5ef016b81e", "score": "0.5777234", "text": "function fun() {\n}", "title": "" }, { "docid": "be0a5d5f340f591fcadd892d67cb0677", "score": "0.5772624", "text": "function x(){}", "title": "" }, { "docid": "8b6ec2df056233fe185d47d25eeb2176", "score": "0.5772269", "text": "function F(){}", "title": "" }, { "docid": "58bf75b48f59cbaa82b035c7bcf2fee4", "score": "0.5754436", "text": "function strictFnSpecimen() {}", "title": "" }, { "docid": "c8eb13277c443e55ecfbdc4d32776610", "score": "0.5749403", "text": "function Main()\n {\n \n }", "title": "" }, { "docid": "c8eb13277c443e55ecfbdc4d32776610", "score": "0.5749403", "text": "function Main()\n {\n \n }", "title": "" }, { "docid": "da524cc49c4fac6999e3ce9b06473812", "score": "0.574364", "text": "function Harold() {}", "title": "" }, { "docid": "34e0acf9fbf2c4fd56c7b39962aac1d5", "score": "0.57427067", "text": "function declaration(param1, default_param = ' default value') {\n if (param1) {\n console.log('This is how the function is declared', default_param);\n }\n\n return param1 + default_param;\n}", "title": "" }, { "docid": "38e42c17834d282de77ac21b5f27803b", "score": "0.5737101", "text": "function functionName() {\r\n //code\r\n}", "title": "" }, { "docid": "b24d7bcd875c6944749f874c9637df3d", "score": "0.5736912", "text": "function LibXtralife()\n{\n}", "title": "" }, { "docid": "3aebd98f9e4590985fc8ee500b625ac0", "score": "0.5735127", "text": "function worthless(){}", "title": "" }, { "docid": "ff0eff4e97dc85b0704e34dcf0af82e4", "score": "0.5730384", "text": "function petGinger () { // function declaration\n console.log('I petted da ginger');\n}", "title": "" }, { "docid": "acaa54dd89e89b22700332ee8da032eb", "score": "0.57293934", "text": "function main()\r\n{\r\n \r\n}", "title": "" }, { "docid": "c301905d52cc1165bad2cbd8f8ac1743", "score": "0.5727586", "text": "function doSomethingElse () {\n // ...\n }", "title": "" }, { "docid": "febff74e425045a602e10dd14f3f43e2", "score": "0.57251", "text": "function anotherFunction() {}", "title": "" }, { "docid": "e49940cbad60ff9b63113eab2dcc12ae", "score": "0.5721485", "text": "function Vaildator() {\n}", "title": "" }, { "docid": "defa9134c86d06698b7f2735ebe78268", "score": "0.57204056", "text": "function default_1() { }", "title": "" }, { "docid": "7bba19ab72d7b0fba2c9fe8526915822", "score": "0.57185787", "text": "function foo() { }", "title": "" }, { "docid": "7bba19ab72d7b0fba2c9fe8526915822", "score": "0.57185787", "text": "function foo() { }", "title": "" }, { "docid": "966606887e425c5ce620b27ab207c123", "score": "0.57133543", "text": "function foo () { }", "title": "" }, { "docid": "fc498a8c34d27a83021202b35b578ab3", "score": "0.5710667", "text": "visitFuncdef(ctx) {\r\n console.log(\"visitFuncdef\");\r\n return {\r\n type: \"FunctionDef\",\r\n name: ctx.NAME().getText(),\r\n parameters: this.visit(ctx.parameters()),\r\n body: this.visit(ctx.suite()),\r\n };\r\n }", "title": "" }, { "docid": "1575bb7d1ef4d071f90be967cb35816f", "score": "0.5701778", "text": "function hello() {\n\n}", "title": "" }, { "docid": "1575bb7d1ef4d071f90be967cb35816f", "score": "0.5701778", "text": "function hello() {\n\n}", "title": "" }, { "docid": "87fc1b21d7167a50e4735488793f9eae", "score": "0.5701333", "text": "function foo(){}", "title": "" } ]
752b9444dbe8b1c2cf0ed514a5bca0b8
Sets the custom forced camera aspect ratio to use while rendering.
[ { "docid": "5ff4d0b0588f7c1b3a6db7d19952639f", "score": "0.77354753", "text": "set forceCameraAspect(aspect) {\n this.m_forceCameraAspect = aspect;\n }", "title": "" } ]
[ { "docid": "350f41d3695f973463686b1e33aff083", "score": "0.78740597", "text": "setCameraAspect (ratio) {\n this.camera.aspect = ratio;\n this.camera.updateProjectionMatrix();\n }", "title": "" }, { "docid": "adfe200571a63525ab6b1e3688eac826", "score": "0.7814536", "text": "setCameraAspect (anAspectRatio) {\n this.camera.aspect = anAspectRatio;\n this.camera.updateProjectionMatrix();\n }", "title": "" }, { "docid": "adfe200571a63525ab6b1e3688eac826", "score": "0.7814536", "text": "setCameraAspect (anAspectRatio) {\n this.camera.aspect = anAspectRatio;\n this.camera.updateProjectionMatrix();\n }", "title": "" }, { "docid": "adfe200571a63525ab6b1e3688eac826", "score": "0.7814536", "text": "setCameraAspect (anAspectRatio) {\n this.camera.aspect = anAspectRatio;\n this.camera.updateProjectionMatrix();\n }", "title": "" }, { "docid": "adfe200571a63525ab6b1e3688eac826", "score": "0.7814536", "text": "setCameraAspect (anAspectRatio) {\n this.camera.aspect = anAspectRatio;\n this.camera.updateProjectionMatrix();\n }", "title": "" }, { "docid": "f2bd3058561f483b31f984667bd26c29", "score": "0.72842604", "text": "setCameraAspect (anAspectRatio) {\n this.camaraSala.aspect = anAspectRatio;\n this.camaraSala.updateProjectionMatrix();\n this.mapa.setCameraAspect(anAspectRatio);\n }", "title": "" }, { "docid": "6364b955b3f3fb818b8b1381e5cb913a", "score": "0.696718", "text": "function onWindowResize() {\n // update the size of the renderer AND the canvas\n renderer.setSize(container.clientWidth, container.clientHeight);\n\n camera.aspect = container.clientWidth / container.clientHeight;\n}", "title": "" }, { "docid": "fe7cc289ef2f2ed2dc4a5b05fa155a80", "score": "0.6776255", "text": "onResize() {\n this.camera.aspect = this.canvas.offsetWidth / this.canvas.offsetHeight;\n this.camera.fov = 2.0 * THREE.Math.radToDeg(\n Math.atan(this.canvas.offsetHeight * 0.5 * this.tanPerHeight));\n this.camera.updateProjectionMatrix();\n this.renderers.forEach((renderer) => {\n renderer.setSize(this.canvas.offsetWidth, this.canvas.offsetHeight, false);\n });\n if (this.onResizeExt) {\n this.onResizeExt(this.canvas.width, this.canvas.height);\n }\n }", "title": "" }, { "docid": "c845fdb138ef261b9864721a0fbae102", "score": "0.67420596", "text": "function onResize() {\n renderer.setSize(window.innerWidth, window.innerHeight);\n scale_width = (window.innerWidth * scale_width) / last_width;\n scale_height = (window.innerHeight * scale_height) / last_height;\n last_width = window.innerWidth;\n last_height = window.innerHeight;\n\n if(cameraViewCar == 0){\n if (window.innerWidth / window.innerHeight > ratio)\n resizeOrtCamera(scale_height);\n else\n resizeOrtCamera(scale_width);\n }\n\n else if(cameraViewCar == 1){\n camera[1].aspect = window.innerWidth / window.innerHeight;\n camera[1].updateProjectionMatrix();\n }\n else{\n camera[2].aspect = window.innerWidth / window.innerHeight;\n camera[2].updateProjectionMatrix();\n }\n}", "title": "" }, { "docid": "1db4a9aa65f71c788dd1355f4b952b3b", "score": "0.67291427", "text": "function onWindowResize() {\n camera.aspect = canvas_div.clientWidth*0.90 / container.clientHeight;\n camera.updateProjectionMatrix();\n renderer.setSize(canvas_div.clientWidth*0.90, container.clientHeight);\n}", "title": "" }, { "docid": "87f5f65df53de81b4463219729427fd5", "score": "0.6707288", "text": "resize() {\n this.renderer.setSize( this.container.offsetWidth, this.container.offsetHeight );\n this.camera.aspect = this.container.offsetWidth / this.container.offsetHeight;\n this.camera.updateProjectionMatrix();\n this.requestRender();\n }", "title": "" }, { "docid": "6a48dc9e6f63569c3811396b41195e11", "score": "0.6667655", "text": "function resize() {\n\tconst canvas = renderer.domElement;\n\tconst width = canvas.clientWidth;\n\tconst height = canvas.clientHeight;\n\trenderer.setSize(width, height, false);\n\tcamera.aspect = width / height;\n\tcamera.updateProjectionMatrix();\n}", "title": "" }, { "docid": "320f6129b382b7306c478ad8d03846c0", "score": "0.6641517", "text": "function setRecommendedSize() {\n var isiPad = navigator.userAgent.match(/iPad/i) != null;\n var width = window.innerWidth;\n\n if (width == 1024 && isiPad) {\n width = 1022;\n }\n\n container.css(\"width\", width + \"px\");\n\n WINDOW_HEIGHT = window.innerHeight;\n\n renderer.setSize(width, WINDOW_HEIGHT);\n\n camera.aspect = width / WINDOW_HEIGHT;\n camera.updateProjectionMatrix();\n}", "title": "" }, { "docid": "a30d4f245345958e8c01691690560c9e", "score": "0.66357553", "text": "componentWillUpdate() {\n let width = window.innerWidth\n let height = window.innerHeight\n\n this.renderer.setSize(width, height)\n this.camera.aspect = width / height\n this.camera.updateProjectionMatrix()\n }", "title": "" }, { "docid": "1247ee5ea2618001d779169727d8abab", "score": "0.66111666", "text": "resize() {\n let width = window.innerWidth;\n let height = window.innerHeight;\n\n this.camera.aspect = width / height;\n this.camera.updateProjectionMatrix();\n\n this.renderer.setSize(width, height);\n }", "title": "" }, { "docid": "e6b8dff7cc28a0e412d05fc98d240659", "score": "0.66078866", "text": "function onResize() {\n const width = window.innerWidth;\n const height = window.innerHeight;\n\n renderer.setPixelRatio(window.devicePixelRatio);\n renderer.setSize(width, height);\n\n camera.aspect = width / height;\n camera.updateProjectionMatrix();\n camera_back.aspect = width / height;\n camera_back.updateProjectionMatrix();\n }", "title": "" }, { "docid": "9376b9da7ea678e1fb3a29791b861a2e", "score": "0.65973085", "text": "function syncSize() {\n var width = container.offsetWidth;\n var height = container.offsetHeight;\n renderer.setSize(width, height);\n camera.aspect = width / height;\n camera.updateProjectionMatrix();\n }", "title": "" }, { "docid": "49bea49e72860ccd64bab7208323212b", "score": "0.65936005", "text": "configureCamera() {\n this.cameras.main.startFollow(this.playerBoat);\n this.cameras.main.zoom = Config.cameraZoom;\n }", "title": "" }, { "docid": "e67a90a11f951aef3dde3a0d24d41625", "score": "0.65828073", "text": "resize({ pixelRatio, viewportWidth, viewportHeight }) {\n renderer.setPixelRatio(pixelRatio);\n renderer.setSize(viewportWidth, viewportHeight);\n camera.aspect = viewportWidth / viewportHeight;\n camera.updateProjectionMatrix();\n }", "title": "" }, { "docid": "e67a90a11f951aef3dde3a0d24d41625", "score": "0.65828073", "text": "resize({ pixelRatio, viewportWidth, viewportHeight }) {\n renderer.setPixelRatio(pixelRatio);\n renderer.setSize(viewportWidth, viewportHeight);\n camera.aspect = viewportWidth / viewportHeight;\n camera.updateProjectionMatrix();\n }", "title": "" }, { "docid": "45747a349330a4d59f7b34c48d223c7a", "score": "0.6580102", "text": "resize({ pixelRatio, viewportWidth, viewportHeight }) {\n renderer.setPixelRatio(pixelRatio);\n renderer.setSize(viewportWidth, viewportHeight, false);\n camera.aspect = viewportWidth / viewportHeight;\n camera.updateProjectionMatrix();\n }", "title": "" }, { "docid": "45747a349330a4d59f7b34c48d223c7a", "score": "0.6580102", "text": "resize({ pixelRatio, viewportWidth, viewportHeight }) {\n renderer.setPixelRatio(pixelRatio);\n renderer.setSize(viewportWidth, viewportHeight, false);\n camera.aspect = viewportWidth / viewportHeight;\n camera.updateProjectionMatrix();\n }", "title": "" }, { "docid": "45747a349330a4d59f7b34c48d223c7a", "score": "0.6580102", "text": "resize({ pixelRatio, viewportWidth, viewportHeight }) {\n renderer.setPixelRatio(pixelRatio);\n renderer.setSize(viewportWidth, viewportHeight, false);\n camera.aspect = viewportWidth / viewportHeight;\n camera.updateProjectionMatrix();\n }", "title": "" }, { "docid": "45747a349330a4d59f7b34c48d223c7a", "score": "0.6580102", "text": "resize({ pixelRatio, viewportWidth, viewportHeight }) {\n renderer.setPixelRatio(pixelRatio);\n renderer.setSize(viewportWidth, viewportHeight, false);\n camera.aspect = viewportWidth / viewportHeight;\n camera.updateProjectionMatrix();\n }", "title": "" }, { "docid": "45747a349330a4d59f7b34c48d223c7a", "score": "0.6580102", "text": "resize({ pixelRatio, viewportWidth, viewportHeight }) {\n renderer.setPixelRatio(pixelRatio);\n renderer.setSize(viewportWidth, viewportHeight, false);\n camera.aspect = viewportWidth / viewportHeight;\n camera.updateProjectionMatrix();\n }", "title": "" }, { "docid": "3d623d75b00389a9f9e0d8b571d1356b", "score": "0.65767264", "text": "get forceCameraAspect() {\n return this.m_forceCameraAspect;\n }", "title": "" }, { "docid": "3d623d75b00389a9f9e0d8b571d1356b", "score": "0.65767264", "text": "get forceCameraAspect() {\n return this.m_forceCameraAspect;\n }", "title": "" }, { "docid": "64389418990ccc5e0c86c79362028fac", "score": "0.6558041", "text": "resize(event){\n\n /* Fix Aspect-Ratio */\n this._renderer.setSize(this._element.clientWidth, this._element.clientHeight, false);\n this._camera.aspect = this._element.clientWidth / this._element.clientHeight;\n this._camera.updateProjectionMatrix();\n\n }", "title": "" }, { "docid": "7f6e262fc3299e778e9bfa56363ddc11", "score": "0.65360826", "text": "resize ({ pixelRatio, viewportWidth, viewportHeight }) {\n renderer.setPixelRatio(pixelRatio);\n renderer.setSize(viewportWidth, viewportHeight);\n camera.aspect = viewportWidth / viewportHeight;\n camera.updateProjectionMatrix();\n }", "title": "" }, { "docid": "7f6e262fc3299e778e9bfa56363ddc11", "score": "0.65360826", "text": "resize ({ pixelRatio, viewportWidth, viewportHeight }) {\n renderer.setPixelRatio(pixelRatio);\n renderer.setSize(viewportWidth, viewportHeight);\n camera.aspect = viewportWidth / viewportHeight;\n camera.updateProjectionMatrix();\n }", "title": "" }, { "docid": "ea4471fd9bcd2dc502c156cf329f7d14", "score": "0.653055", "text": "resize({ pixelRatio, viewportWidth, viewportHeight }) {\n renderer.setPixelRatio(pixelRatio);\n renderer.setSize(viewportWidth, viewportHeight, false);\n camera.aspect = viewportWidth / viewportHeight;\n camera.bottom = viewportHeight;\n camera.right = viewportWidth;\n camera.updateProjectionMatrix();\n }", "title": "" }, { "docid": "258eb64a8c844290aac8b1483d597ca3", "score": "0.65243876", "text": "function resize() {\n const w = canvasContainer.offsetWidth;\n const h = canvasContainer.offsetHeight;\n renderer.setSize(w, h);\n camera.aspect = w / h;\n camera.updateProjectionMatrix();\n}", "title": "" }, { "docid": "3e251f9b5a2d6a0cc2a699f3bb195adf", "score": "0.65228266", "text": "updateSize() {\n let viewSize = 30;\n \n this.renderer.setSize(window.innerWidth, window.innerHeight);\n this.camera.left = window.innerWidth / -viewSize;\n this.camera.right = window.innerWidth / viewSize;\n this.camera.top = window.innerHeight / viewSize;\n this.camera.bottom = window.innerHeight / -viewSize;\n this.camera.updateProjectionMatrix();\n }", "title": "" }, { "docid": "356e212fe951695823d86d5789127256", "score": "0.6495552", "text": "function updateRendererSize(){\n renderer.setSize(width, height);\n camera.aspect = width / height;\n camera.updateProjectionMatrix();\n }", "title": "" }, { "docid": "967c3e8066544016ec22d9316d1932fa", "score": "0.64721525", "text": "function onResize() {\n 'use strict';\n\n var aspect_ratio = window.innerWidth / window.innerHeight;\n\n renderer.setSize(window.innerWidth, window.innerHeight);\n\n if (camera === ortho_camera) {\n if (aspect_ratio >= 1) {\n camera.left = -aspect_ratio * camera_height / 2;\n camera.right = aspect_ratio * camera_height / 2;\n camera.bottom = -camera_height / 2;\n camera.top = camera_height / 2;\n } else {\n camera.left = -camera_width / 2;\n camera.right = camera_width / 2;\n camera.bottom = -camera_width / (2 * aspect_ratio);\n camera.top = camera_width / (2 * aspect_ratio);\n }\n } else {\n camera.aspect = renderer.getSize().width / renderer.getSize().height;\n }\n\n camera.updateProjectionMatrix();\n}", "title": "" }, { "docid": "34303114ca63175fa92398d2b3661ea5", "score": "0.64676017", "text": "function onWindowResize() {\n camera.aspect = window.innerWidth / window.innerHeight;\n camera.updateProjectionMatrix(); //maintain aspect ratio\n renderer.setSize(window.innerWidth, window.innerHeight);\n}", "title": "" }, { "docid": "34303114ca63175fa92398d2b3661ea5", "score": "0.64676017", "text": "function onWindowResize() {\n camera.aspect = window.innerWidth / window.innerHeight;\n camera.updateProjectionMatrix(); //maintain aspect ratio\n renderer.setSize(window.innerWidth, window.innerHeight);\n}", "title": "" }, { "docid": "2bcc1920c03850a97a3560079548e997", "score": "0.645915", "text": "resize() {\r\n\r\n\t\tconst w = this.canvas.clientWidth;\r\n\t\tconst h = this.canvas.clientHeight;\r\n\r\n\t\tthis.gl.viewport(0, 0, w, h);\r\n\t\tthis.scene.camera.setAspectRatio(w / h);\r\n\r\n\t\tthis.canvas.width = w;\r\n\t\tthis.canvas.height = h;\r\n\r\n\t}", "title": "" }, { "docid": "84415fcd694e1df642f4a7a7ee7140f4", "score": "0.6436155", "text": "function onResize() {\n camera.aspect = window.innerWidth / window.innerHeight;\n camera.updateProjectionMatrix();\n renderer.setSize(window.innerWidth, window.innerHeight);\n}", "title": "" }, { "docid": "836941d3429bde2530fd5e80a518f868", "score": "0.6432909", "text": "function onResize() {\r\n camera.aspect = window.innerWidth / window.innerHeight;\r\n camera.updateProjectionMatrix();\r\n renderer.setSize(window.innerWidth, window.innerHeight);\r\n}", "title": "" }, { "docid": "144d87fde60e83e68794403044713adb", "score": "0.64260614", "text": "function onResize() {\n\t\trenderer.setSize(container.clientWidth, container.clientHeight);\n\t\tcamera.aspect = container.clientWidth / container.clientHeight;\n\t\tcamera.updateProjectionMatrix();\n\t}", "title": "" }, { "docid": "696955d1419205ada6bf3c50eaf1812c", "score": "0.6413707", "text": "onWindowResize() {\n this.camera.aspect = window.innerWidth / window.innerHeight;\n this.camera.updateProjectionMatrix();\n this.renderer.setSize(window.innerWidth, window.innerHeight);\n }", "title": "" }, { "docid": "819fbc7a89f91d644f0f8b69867ce203", "score": "0.6398026", "text": "function onWindowResize() {\n\tcamera.aspect = 900 / 600;\n\tcamera.updateProjectionMatrix();\n\trenderer.setSize( 900 , 600 );\n}", "title": "" }, { "docid": "bea49d2f676a63ea8844587663fd6489", "score": "0.638534", "text": "onWindowResize() {\n const { width, height } = canvas;\n\n this._camera.aspect = width / height;\n this._camera.updateProjectionMatrix();\n\n this._renderer.setSize(width, height);\n this._effectComposer.setSize(width, height);\n }", "title": "" }, { "docid": "0b04d3aa746a8906a9601a5433668a61", "score": "0.6365467", "text": "onWindowResize() {\n let height = this.container.clientHeight;\n let width = this.container.clientWidth;\n let aspect = width / height;\n let cam_dir = new Vector3();\n cam_dir.subVectors(this.camera.position, this.controls.target);\n let prevDist = cam_dir.length();\n cam_dir.normalize();\n let hspan = prevDist * 2 * Math.tan(this.prevhfov / 2);\n\n this.prevhfov = 2 * Math.atan(Math.tan(Math.PI * this.fov / 2 / 180) * aspect);\n\n let dist = hspan / 2 / Math.tan(this.prevhfov / 2);\n this.camera.position.copy(this.controls.target);\n this.camera.position.addScaledVector(cam_dir, dist);\n\n this.camera.aspect = aspect;\n this.camera.updateProjectionMatrix();\n\n this.renderer.setSize(width, height);\n this.composer.setSize(width * window.devicePixelRatio,\n height * window.devicePixelRatio);\n this.effectFXAA.uniforms['resolution'].value.set(1 / Math.max(width, 1440), 1 / Math.max(height, 900));\n this.controls.handleResize();\n this.render();\n if (this.dispatch['resize'] !== undefined) {\n this.dispatch['resize']();\n }\n }", "title": "" }, { "docid": "73ad7f89e5212eb6a18758a4c249a096", "score": "0.63593924", "text": "function onWindowResize() {\n camera.aspect = window.innerWidth / window.innerHeight;\n camera.updateProjectionMatrix(); // Maintain aspect ratio\n renderer.setSize(window.innerWidth, window.innerHeight);\n}", "title": "" }, { "docid": "b55080f684ab8cd53455b74e0006a2f9", "score": "0.6344472", "text": "resize({ pixelRatio = 0, viewportWidth, viewportHeight }) {\n // renderer.setPixelRatio(pixelRatio)\n // let pixelRatio = window.devicePixelRatio || 0\n renderer.setSize(viewportWidth, viewportHeight)\n composer.setSize(viewportWidth * pixelRatio, viewportHeight * pixelRatio)\n\n renderer.setSize(viewportWidth, viewportHeight)\n camera.aspect = viewportWidth / viewportHeight\n camera.updateProjectionMatrix()\n }", "title": "" }, { "docid": "050ff8b99efa2d3ffacfbd19f92e7284", "score": "0.6338309", "text": "function onWindowResize() {\n\tcamera.aspect = window.innerWidth / window.innerHeight;\n\tcamera.updateProjectionMatrix();\n\trenderer.setSize(window.innerWidth, window.innerHeight);\n}", "title": "" }, { "docid": "4a8af5067eb078026b6d29f75466ff54", "score": "0.63249815", "text": "function onWindowResize() {\n\tcamera.aspect = window.innerWidth / window.innerHeight;\n\tcamera.updateProjectionMatrix();\n\trenderer.setSize( window.innerWidth, window.innerHeight );\n}", "title": "" }, { "docid": "6988238388ffd971ef17fd014136508e", "score": "0.63247377", "text": "function onWindowResize() {\n camera.aspect = window.innerWidth / window.innerHeight;\n camera.updateProjectionMatrix(); //maintain aspect ratio\n renderer.setSize(window.innerWidth, window.innerHeight);\n }", "title": "" }, { "docid": "6d7a4dbc518a48aed0a595bfded68213", "score": "0.6308359", "text": "function onWindowResize() {\n camera.aspect = window.innerWidth / window.innerHeight;\n camera.updateProjectionMatrix();\n renderer.setSize(window.innerWidth, window.innerHeight);\n}", "title": "" }, { "docid": "6d7a4dbc518a48aed0a595bfded68213", "score": "0.6308359", "text": "function onWindowResize() {\n camera.aspect = window.innerWidth / window.innerHeight;\n camera.updateProjectionMatrix();\n renderer.setSize(window.innerWidth, window.innerHeight);\n}", "title": "" }, { "docid": "17aadc30d36c2a4cd976262736b209a2", "score": "0.63074297", "text": "function handleResize() {\n camera.aspect = window.innerWidth / window.innerHeight;\n camera.updateProjectionMatrix();\n renderer.setSize(window.innerWidth, window.innerHeight);\n}", "title": "" }, { "docid": "d6147c894e53e08249515532bd256f4c", "score": "0.6304209", "text": "OnWindowResize(event) {\n this.screenWidth = window.innerWidth;\n this.screenHeight = window.innerHeight;\n this.aspect = this.screenWidth / this.screenHeight;\n this[threeRendererSymbol].setSize(this.screenWidth, this.screenHeight);\n this[threeRendererSymbol].setPixelRatio(window.devicePixelRatio);\n\n this.scenes.forEach(function (scene) {\n let cameras = scene.GetCameras();\n cameras.forEach(function (camera) {\n camera.SetAspectRatio(this.aspect);\n }, this);\n }, this);\n }", "title": "" }, { "docid": "59d1f91b84761dae9799720a42282ef7", "score": "0.6298723", "text": "_onWindowResize() {\n this.camera.aspect = window.innerWidth / window.innerHeight;\n this.camera.fov = (1.5 * (360 / Math.PI) * Math.atan(this.tanFOV\n * (window.innerHeight / this.originalWindowHeight)) / Math.sqrt(this.camera.aspect));\n this.camera.updateProjectionMatrix();\n this.renderer.setSize(window.innerWidth, window.innerHeight);\n }", "title": "" }, { "docid": "9c18d1c9c47ddb9607bf35fb925faac4", "score": "0.6291241", "text": "function resize() {\n const w = container.offsetWidth;\n const h = container.offsetHeight;\n renderer.setSize(w, h);\n camera.aspect = w / h;\n camera.updateProjectionMatrix();\n}", "title": "" }, { "docid": "7dc18123c5551882dde8d3c5f7f7457a", "score": "0.62912285", "text": "function handleResize() {\n camera.aspect = window.innerWidth / window.innerHeight;\n camera.updateProjectionMatrix();\n renderer.setSize(window.innerWidth, window.innerHeight);\n }", "title": "" }, { "docid": "ab2ef5e73f5be7d948593d67ac3cbc01", "score": "0.6290856", "text": "function onWindowResize() {\n camera.aspect = window.innerWidth / window.innerHeight;\n camera.updateProjectionMatrix();\n renderer.setSize( window.innerWidth, window.innerHeight );\n}", "title": "" }, { "docid": "18d71f181cf247509756dd5a93cd35af", "score": "0.6278664", "text": "set pixelRatio(ratio) {\n this.m_pixelRatio = ratio;\n if (this.m_renderTarget && this.pixelRatio !== undefined) {\n this.m_renderTarget.setSize(Math.floor(this.m_savedWidth * this.pixelRatio), Math.floor(this.m_savedHeight * this.pixelRatio));\n }\n }", "title": "" }, { "docid": "a38206f20138f055241727290607bd0e", "score": "0.62703234", "text": "function onWindowResize () {\n camera.aspect = window.innerWidth / window.innerHeight;\n camera.updateProjectionMatrix();\n renderer.setSize(window.innerWidth, window.innerHeight);\n}", "title": "" }, { "docid": "a338ca1dafa0331356a3de6e61da42e2", "score": "0.62689275", "text": "function onWindowResize()\n{\n camera.aspect = window.innerWidth/(window.innerHeight);\n camera.updateProjectionMatrix();\n renderer.setSize(window.innerWidth,(window.innerHeight));\n\n}", "title": "" }, { "docid": "e14ae945499a65308591bfc3b6cfbb59", "score": "0.62657446", "text": "function onWindowResize() {\r\n\r\n\tcamera.aspect = window.innerWidth / window.innerHeight;\r\n\tcamera.updateProjectionMatrix();\r\n\r\n\trenderer.setSize( window.innerWidth, window.innerHeight );\r\n\r\n}", "title": "" }, { "docid": "dcdfb2dba23f3c3dfbfe62aea784a499", "score": "0.6263453", "text": "function onWindowResize() {\n camera.aspect = window.innerWidth / window.innerHeight;\n renderer.setSize(window.innerWidth, window.innerHeight);\n camera.updateProjectionMatrix();\n}", "title": "" }, { "docid": "00ed8dcbac14b5fbe0d110e86826900b", "score": "0.62503976", "text": "function onWindowResize() {\n\n camera.aspect = window.innerWidth / window.innerHeight;\n camera.updateProjectionMatrix();\n\n renderer.setSize(window.innerWidth, window.innerHeight);\n\n}", "title": "" }, { "docid": "02bd98dc1c642cb4f8753e7bfc1b8118", "score": "0.6243007", "text": "function onWindowResize() {\n camera.aspect = window.innerWidth / window.innerHeight;\n camera.updateProjectionMatrix();\n\n renderer.setSize( window.innerWidth, window.innerHeight );\n}", "title": "" }, { "docid": "b0894148847890f67d580be0debc4f8e", "score": "0.6242942", "text": "function onWindowResize() {\n //fix aspect ratios to take up whole frame and refresh\n camera.aspect = window.innerWidth / window.innerHeight;\n camera.updateProjectionMatrix();\n\n renderer.setSize( window.innerWidth, window.innerHeight );\n\n render();\n\n}", "title": "" }, { "docid": "fa25e871b0543ee04cd530993e2384ed", "score": "0.62372315", "text": "function onResize() {\n if (camera instanceof PerspectiveCamera) {\n camera.aspect = window.innerWidth / window.innerHeight;\n camera.updateProjectionMatrix();\n }\n renderer.setSize(window.innerWidth, window.innerHeight);\n}", "title": "" }, { "docid": "2cb7e403c4f3e1de670a238376a07a14", "score": "0.623511", "text": "function updateSize() {\n WIDTH = window.innerWidth;\n HEIGHT = window.innerHeight;\n renderer.setSize(WIDTH, HEIGHT);\n camera.aspect = WIDTH / HEIGHT;\n camera.updateProjectionMatrix();\n}", "title": "" }, { "docid": "28223c9f3a9ca450a6ed99657e2704c3", "score": "0.62347186", "text": "function onWindowResize()\n{\n camera.aspect = window.innerWidth / window.innerHeight;\n camera.updateProjectionMatrix();\n\n renderer.setSize( window.innerWidth, window.innerHeight);\n}", "title": "" }, { "docid": "4efbc4e17c9c2b2274d78f100575499c", "score": "0.6226828", "text": "maybeApplyDesktopAspectRatioAttribute_() {\n if (\n this.isLandscapeSupported_() ||\n !this.element.hasAttribute('desktop-aspect-ratio')\n ) {\n return;\n }\n\n const splittedRatio = this.element\n .getAttribute('desktop-aspect-ratio')\n .split(':');\n if (splittedRatio[1] == 0) {\n return;\n }\n\n const desktopAspectRatio = clamp(\n splittedRatio[0] / splittedRatio[1],\n MIN_CUSTOM_DESKTOP_ONE_PANEL_ASPECT_RATIO,\n MAX_CUSTOM_DESKTOP_ONE_PANEL_ASPECT_RATIO\n );\n setImportantStyles(document.querySelector(':root'), {\n '--i-amphtml-story-desktop-one-panel-ratio': desktopAspectRatio,\n });\n this.storeService_.dispatch(\n Action.SET_DESKTOP_ASPECT_RATIO,\n desktopAspectRatio\n );\n }", "title": "" }, { "docid": "f3d01b3da46539c26bd87e993121f07c", "score": "0.62204564", "text": "function resize() {\n\t\t\t\tif (!self.arMarker) {\n\t\t\t\t\t\t\t\tself.camera.aspect = window.innerWidth / window.innerHeight;\n\t\t\t\t\t\t\t\t// updates the camera object with the new aspect ratios\n\t\t\t\t\t\t\t\tself.camera.updateProjectionMatrix();\n\t\t\t\t\t\t\t\tself.deviceRendered.setSize(window.innerWidth, window.innerHeight);\n\t\t\t\t}\n}", "title": "" }, { "docid": "c1cf806805a5afc35d390aa836442610", "score": "0.6206943", "text": "function cameraZoomToFit()\n{\n\tthis.moveTo(this.viewWidth/2,this.viewHeight/2);\n\t\n\tvar zoomScale;\n\tvar cameraAspect = this.width / this.height;\n\tvar painterAspect = this.viewWidth / this.viewHeight;\n\t\n\t\n\tif(cameraAspect >= painterAspect)\n\t\tzoomScale = this.height / this.viewHeight;\n\telse\n\t\tzoomScale = this.width / this.viewWidth;\n\n\tthis.zoomTo(zoomScale);\n}", "title": "" }, { "docid": "28d1e281aaaa0205ca0f29fcd68598f3", "score": "0.62065953", "text": "function onWindowResize () {\n scene.setCameraAspect (window.innerWidth / window.innerHeight);\n renderer.setSize (window.innerWidth, window.innerHeight);\n}", "title": "" }, { "docid": "7e18b8bc73175cb27151da65ca4105db", "score": "0.6206289", "text": "resize({ pixelRatio, viewportWidth, viewportHeight }) {\n renderer.setPixelRatio(pixelRatio);\n renderer.setSize(viewportWidth, viewportHeight, false);\n const aspect = viewportWidth / viewportHeight;\n\n // Ortho zoom\n const zoom = 2;\n\n // Bounds\n camera.left = -zoom * aspect;\n camera.right = zoom * aspect;\n camera.top = zoom;\n camera.bottom = -zoom;\n\n // Near/Far\n camera.near = -100;\n camera.far = 100;\n\n // Set position & look at world center\n camera.position.set(zoom, zoom, zoom);\n camera.lookAt(new THREE.Vector3());\n\n // Update the camera\n camera.updateProjectionMatrix();\n }", "title": "" }, { "docid": "2e6a30951410f2c346674c9f5efcd032", "score": "0.6193032", "text": "function onWindowResize(){\n let wid = window.innerWidth;\n let hei = window.innerHeight;\n\n renderer.setPixelRatio(window.devicePixelRatio);\n renderer.setSize(wid, hei);\n\tcamera.aspect = wid/hei;\n camera.updateProjectionMatrix();\n}", "title": "" }, { "docid": "8568f95d71e6dd61346b3aed27079cf9", "score": "0.6191622", "text": "function responsiveScene() {\n let width = window.innerWidth;\n let height = window.innerHeight;\n renderer.setSize(width, height);\n camera.aspect = width / height;\n camera.updateProjectionMatrix();\n}", "title": "" }, { "docid": "f8fe79e200935771dc33711e1e19e365", "score": "0.6184504", "text": "function onWindowResize() {\n\n\tcamera.aspect = window.innerWidth / window.innerHeight;\n\tcamera.updateProjectionMatrix();\n\n\trenderer.setSize( window.innerWidth, window.innerHeight );\n\n}", "title": "" }, { "docid": "4c6753bcbe8d81af31eb7dadaeee3693", "score": "0.6173908", "text": "function onWindowResize() {\n var container = document.getElementById('scene');\n camera.aspect = container.offsetWidth / container.offsetHeight;\n renderer.setSize(container.offsetWidth, container.offsetHeight);\n camera.updateProjectionMatrix();\n }", "title": "" }, { "docid": "3afbaf5bcee67554c1f527cbc090cda6", "score": "0.6151258", "text": "function resize() {\n renderer.setSize(window.innerWidth, window.innerHeight);\n for (let i = 0; i < Part.COUNT; ++i) {\n cameras[i].aspect = window.innerWidth / window.innerHeight;\n cameras[i].updateProjectionMatrix();\n }\n}", "title": "" }, { "docid": "33b9ba84aa547654712b42fb00605c71", "score": "0.6148863", "text": "onWindowResize() {\n\n this.windowHalfX = this.window.innerWidth / 2;\n this.windowHalfY = this.window.innerHeight / 2;\n\n this.camera.aspect = this.window.innerWidth / this.window.innerHeight;\n this.camera.updateProjectionMatrix();\n\n this.renderer.setSize(this.window.innerWidth, this.window.innerHeight);\n }", "title": "" }, { "docid": "66f1ff84b01c78170eade24121546d76", "score": "0.61461306", "text": "function resizeViewer() {\n var width = $('#bottomPanel').width();\n var height = window.innerHeight - $('#bottomPanel').height();\n camera.aspect = width / height;\n camera.updateProjectionMatrix();\n renderer.setSize(width, height);\n }", "title": "" }, { "docid": "9931ebf70efed5fe4651b25550e9a195", "score": "0.6138748", "text": "function onWindowResize() {\n\n // For responsive design - change camera aspect as \n camera.aspect = window.innerWidth / window.innerHeight;\n\n // Update projection engine with new aspect settings\n camera.updateProjectionMatrix();\n\n\n // Just like camera, update renderer to render only to size of window.\n renderer.setSize(window.innerWidth, window.innerHeight);\n}", "title": "" }, { "docid": "b4095f9edc097e0287c5fc56ced61100", "score": "0.61347246", "text": "function onResize() {\n camera1.aspect = window.innerWidth / window.innerHeight;\n camera1.updateProjectionMatrix();\n\n camera2.aspect = window.innerWidth / window.innerHeight;\n camera2.updateProjectionMatrix();\n\n renderer.setSize(window.innerWidth, window.innerHeight);\n}", "title": "" }, { "docid": "5457577cc13b33f18b0a36792d0426f3", "score": "0.6133481", "text": "function resize() {\n _screenWidth = window.innerWidth\n _screenHeight = window.innerHeight\n\n // camera settings for to be actual size\n _mainCamera.aspect = _screenWidth / _screenHeight\n _mainCamera.updateProjectionMatrix()\n _mainCamera.position.z = (_screenHeight * 0.5) / Math.tan((_mainCamera.fov * 0.5) * Math.PI / 180)\n\n _renderer.setSize(_screenWidth, _screenHeight)\n\n // update something\n}", "title": "" }, { "docid": "eef154b4cd7a403563ec680dafd411e8", "score": "0.612608", "text": "function changeOrientation() {\n if (isLoaded) {\n camera.aspect = window.innerWidth / window.innerHeight;\n camera.updateProjectionMatrix();\n\n renderer.setSize( window.innerWidth, window.innerHeight );\n\n if (isMobile) {\n if (window.innerHeight > window.innerWidth) {\n if (/iPad/i.test(navigator.userAgent)) {\n document.getElementById('settingsWindow').style.width = '40%';\n }\n else {\n document.getElementById('settingsWindow').style.width = '70%';\n }\n }\n else {\n document.getElementById('settingsWindow').style.width = '40%';\n }\n }\n }\n}", "title": "" }, { "docid": "63ff99953186d16489c1e2f74102999b", "score": "0.6125394", "text": "function onWindowResize(){\n\n camera.aspect = window.innerWidth / window.innerHeight;\n camera.updateProjectionMatrix();\n\n renderer.setSize( window.innerWidth, window.innerHeight );\n\n}", "title": "" }, { "docid": "55cd994f95640ae7d4cd319e13cf0f83", "score": "0.6119543", "text": "function onWindowResize() {\n // set the aspect ratio to match the new browser window aspect ratio\n camera.aspect = container.clientWidth / container.clientHeight;\n\n // update the camera's frustum\n camera.updateProjectionMatrix();\n\n // update the size of the renderer AND the canvas\n renderer.setSize(container.clientWidth, container.clientHeight);\n}", "title": "" }, { "docid": "07f79ecf01bf9639b31e8be402e04edb", "score": "0.6108772", "text": "function onWindowResize() {\n camera.aspect = window.innerWidth / window.innerHeight;\n camera.updateProjectionMatrix();\n renderer.setSize(window.innerWidth, window.innerHeight);\n }", "title": "" }, { "docid": "7d0c5a808f41b13e58002eb34b4c1f89", "score": "0.6102913", "text": "function onWindowResize() {\n\n // set the aspect ratio to match the new browser window aspect ratio\n camera.aspect = container.clientWidth / container.clientHeight;\n\n // update the camera's frustum\n camera.updateProjectionMatrix();\n\n // update the size of the renderer AND the canvas\n renderer.setSize( container.clientWidth, container.clientHeight );\n\n}", "title": "" }, { "docid": "1f72f82767ba30d1c32ed8b0c4edf71e", "score": "0.6099805", "text": "function resize() {\n renderer.setSize(window.innerWidth, window.innerHeight);\n camera.aspect = window.innerWidth / window.innerHeight;\n camera.updateProjectionMatrix();\n }", "title": "" }, { "docid": "ecfdf587a411e1636109755ff2a8aad5", "score": "0.6089699", "text": "function resize() {\n renderer.setSize(window.innerWidth, window.innerHeight);\n camera.aspect = window.innerWidth / window.innerHeight;\n camera.updateProjectionMatrix();\n }", "title": "" }, { "docid": "878a0808a11424438434dae4a6401280", "score": "0.6087806", "text": "function onWindowResize() {\n camera.aspect = window.innerWidth / window.innerHeight;\n camera.updateProjectionMatrix();\n renderer.setSize(window.innerWidth, window.innerHeight);\n }", "title": "" }, { "docid": "3660468adecd17a6c340e1b03632ecf4", "score": "0.60677606", "text": "function onReshape() {\n\n camera.aspect = window.innerWidth / window.innerHeight;\n camera.updateProjectionMatrix();\n\n renderer.setSize( window.innerWidth, window.innerHeight );\n}", "title": "" }, { "docid": "178f18050d5dbfc92a0eb4ad44e2b664", "score": "0.6057383", "text": "function onWindowResize() {\n\t\t\t\tcamera.aspect = window.innerWidth / window.innerHeight;\n\t\t\t\tcamera.updateProjectionMatrix();\n\t\t\t\trenderer.setSize( window.innerWidth, window.innerHeight );\n\t\t\t}", "title": "" }, { "docid": "bcec7adec56d9019f26fbd63c7b7fc0a", "score": "0.604949", "text": "function onWindowResize() {\n\n camera.aspect = window.innerWidth / window.innerHeight;\n camera.updateProjectionMatrix();\n\n renderer.setSize(window.innerWidth, window.innerHeight);\n\n render();\n}", "title": "" }, { "docid": "00cc4242a652453301a10b383605b4ed", "score": "0.6046198", "text": "function resize() {\n console.log('resize called');\n renderer.setSize(window.innerWidth,window.innerHeight);\n camera.aspect = window.innerWidth/window.innerHeight;\n camera.updateProjectionMatrix();\n}", "title": "" }, { "docid": "46146777940e72e4a30c2baa2832c055", "score": "0.60426974", "text": "adjustCanvas (gl, aspectRatio = null) {\n const {width, height, clientWidth} = gl.canvas\n let {clientHeight} = gl.canvas\n if (clientWidth !== width || clientHeight !== height) {\n if (aspectRatio) // adjust css style for aspectRatio\n clientHeight = gl.canvas.style.height = clientWidth / aspectRatio\n gl.canvas.width = clientWidth\n gl.canvas.height = clientHeight\n this.setViewport(gl)\n }\n }", "title": "" }, { "docid": "2def5524a80f207b10473cd7c5c9ef50", "score": "0.60340214", "text": "function resize() {\n renderer.setSize(window.innerWidth,window.innerHeight);\n camera.aspect = window.innerWidth/window.innerHeight;\n camera.updateProjectionMatrix();\n}", "title": "" }, { "docid": "2def5524a80f207b10473cd7c5c9ef50", "score": "0.60340214", "text": "function resize() {\n renderer.setSize(window.innerWidth,window.innerHeight);\n camera.aspect = window.innerWidth/window.innerHeight;\n camera.updateProjectionMatrix();\n}", "title": "" } ]